RTEMS 4.11Annotated Report
Fri Sep 28 12:55:41 2012
0010d220 <IMFS_chown>:
int IMFS_chown(
const rtems_filesystem_location_info_t *loc,
uid_t owner,
gid_t group
)
{
10d220: 55 push %ebp
10d221: 89 e5 mov %esp,%ebp
10d223: 57 push %edi
10d224: 56 push %esi
10d225: 53 push %ebx
10d226: 83 ec 1c sub $0x1c,%esp
10d229: 8b 7d 0c mov 0xc(%ebp),%edi
10d22c: 8b 75 10 mov 0x10(%ebp),%esi
IMFS_jnode_t *jnode;
#if defined(RTEMS_POSIX_API)
uid_t st_uid;
#endif
jnode = (IMFS_jnode_t *) loc->node_access;
10d22f: 8b 45 08 mov 0x8(%ebp),%eax
10d232: 8b 58 08 mov 0x8(%eax),%ebx
/*
* Verify I am the owner of the node or the super user.
*/
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
10d235: e8 0e 08 00 00 call 10da48 <geteuid>
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
10d23a: 66 3b 43 3c cmp 0x3c(%ebx),%ax
10d23e: 74 15 je 10d255 <IMFS_chown+0x35>
10d240: 66 85 c0 test %ax,%ax
10d243: 74 10 je 10d255 <IMFS_chown+0x35> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EPERM );
10d245: e8 92 3c 00 00 call 110edc <__errno>
10d24a: c7 00 01 00 00 00 movl $0x1,(%eax)
10d250: 83 c8 ff or $0xffffffff,%eax
10d253: eb 20 jmp 10d275 <IMFS_chown+0x55>
#endif
jnode->st_uid = owner;
10d255: 66 89 7b 3c mov %di,0x3c(%ebx)
jnode->st_gid = group;
10d259: 66 89 73 3e mov %si,0x3e(%ebx)
IMFS_update_ctime( jnode );
10d25d: 50 push %eax
10d25e: 50 push %eax
10d25f: 6a 00 push $0x0
10d261: 8d 45 e0 lea -0x20(%ebp),%eax
10d264: 50 push %eax
10d265: e8 42 95 ff ff call 1067ac <gettimeofday>
10d26a: 8b 45 e0 mov -0x20(%ebp),%eax
10d26d: 89 43 48 mov %eax,0x48(%ebx)
return 0;
10d270: 83 c4 10 add $0x10,%esp
10d273: 31 c0 xor %eax,%eax
}
10d275: 8d 65 f4 lea -0xc(%ebp),%esp
10d278: 5b pop %ebx
10d279: 5e pop %esi
10d27a: 5f pop %edi
10d27b: 5d pop %ebp
10d27c: c3 ret
0010888c <IMFS_dump_directory>:
*/
static void IMFS_dump_directory(
IMFS_jnode_t *the_directory,
int level
)
{
10888c: 55 push %ebp
10888d: 89 e5 mov %esp,%ebp
10888f: 57 push %edi
108890: 56 push %esi
108891: 53 push %ebx
108892: 83 ec 1c sub $0x1c,%esp
108895: 89 d6 mov %edx,%esi
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
108897: 8b 58 50 mov 0x50(%eax),%ebx
RTEMS_INLINE_ROUTINE bool _Chain_Is_tail(
const Chain_Control *the_chain,
const Chain_Node *the_node
)
{
return (the_node == _Chain_Immutable_tail( the_chain ));
10889a: 83 c0 54 add $0x54,%eax
10889d: 89 45 e4 mov %eax,-0x1c(%ebp)
for ( i=0 ; i<=level ; i++ )
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
if ( IMFS_is_directory( the_jnode ) )
IMFS_dump_directory( the_jnode, level + 1 );
1088a0: 8d 42 01 lea 0x1(%edx),%eax
1088a3: 89 45 e0 mov %eax,-0x20(%ebp)
IMFS_assert( level >= 0 );
IMFS_assert( IMFS_is_directory( the_directory ) );
the_chain = &the_directory->info.directory.Entries;
for ( the_node = rtems_chain_first( the_chain );
1088a6: e9 d7 00 00 00 jmp 108982 <IMFS_dump_directory+0xf6>
the_node = the_node->next ) {
the_jnode = (IMFS_jnode_t *) the_node;
for ( i=0 ; i<=level ; i++ )
fprintf(stdout, "...." );
1088ab: 51 push %ecx
1088ac: 51 push %ecx
1088ad: ff 70 08 pushl 0x8(%eax)
1088b0: 68 81 47 12 00 push $0x124781
1088b5: e8 e2 c3 00 00 call 114c9c <fputs>
!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++ )
1088ba: 47 inc %edi
1088bb: 83 c4 10 add $0x10,%esp
1088be: eb 02 jmp 1088c2 <IMFS_dump_directory+0x36>
IMFS_assert( level >= 0 );
IMFS_assert( IMFS_is_directory( the_directory ) );
the_chain = &the_directory->info.directory.Entries;
for ( the_node = rtems_chain_first( the_chain );
1088c0: 31 ff xor %edi,%edi
!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++ )
1088c2: 39 f7 cmp %esi,%edi
1088c4: a1 00 27 13 00 mov 0x132700,%eax
1088c9: 7e e0 jle 1088ab <IMFS_dump_directory+0x1f>
IMFS_jnode_t *the_jnode
)
{
IMFS_assert( the_jnode );
fprintf(stdout, "%s", the_jnode->name );
1088cb: 52 push %edx
1088cc: 52 push %edx
1088cd: ff 70 08 pushl 0x8(%eax)
1088d0: 8d 43 0c lea 0xc(%ebx),%eax
1088d3: 50 push %eax
1088d4: e8 c3 c3 00 00 call 114c9c <fputs>
rtems_chain_extract_unprotected( &node->Node );
}
static inline IMFS_jnode_types_t IMFS_type( const IMFS_jnode_t *node )
{
return node->control->imfs_type;
1088d9: 8b 43 4c mov 0x4c(%ebx),%eax
1088dc: 8b 10 mov (%eax),%edx
switch( IMFS_type( the_jnode ) ) {
1088de: 83 c4 10 add $0x10,%esp
1088e1: 83 fa 06 cmp $0x6,%edx
1088e4: a1 00 27 13 00 mov 0x132700,%eax
1088e9: 77 62 ja 10894d <IMFS_dump_directory+0xc1><== NEVER TAKEN
1088eb: ff 24 95 5c 48 12 00 jmp *0x12485c(,%edx,4)
case IMFS_DIRECTORY:
fprintf(stdout, "/" );
1088f2: 57 push %edi
1088f3: 57 push %edi
1088f4: ff 70 08 pushl 0x8(%eax)
1088f7: 6a 2f push $0x2f
1088f9: e8 e6 c2 00 00 call 114be4 <fputc>
1088fe: eb 2b jmp 10892b <IMFS_dump_directory+0x9f>
break;
case IMFS_DEVICE:
fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")",
108900: ff 73 54 pushl 0x54(%ebx)
108903: ff 73 50 pushl 0x50(%ebx)
108906: 68 86 47 12 00 push $0x124786
10890b: eb 16 jmp 108923 <IMFS_dump_directory+0x97>
the_jnode->info.device.major, the_jnode->info.device.minor );
break;
case IMFS_LINEAR_FILE:
fprintf(stdout, " (file %" PRId32 " %p)",
10890d: ff 73 58 pushl 0x58(%ebx)
108910: ff 73 50 pushl 0x50(%ebx)
108913: 68 99 47 12 00 push $0x124799
108918: eb 09 jmp 108923 <IMFS_dump_directory+0x97>
the_jnode->info.file.indirect,
the_jnode->info.file.doubly_indirect,
the_jnode->info.file.triply_indirect
);
#else
fprintf(stdout, " (file %" PRId32 ")",
10891a: 51 push %ecx
10891b: ff 73 50 pushl 0x50(%ebx)
10891e: 68 a8 47 12 00 push $0x1247a8
108923: ff 70 08 pushl 0x8(%eax)
108926: e8 51 c2 00 00 call 114b7c <fprintf>
10892b: 83 c4 10 add $0x10,%esp
10892e: eb 2e jmp 10895e <IMFS_dump_directory+0xd2>
case IMFS_HARD_LINK:
fprintf(stdout, " links not printed\n" );
return;
case IMFS_SYM_LINK:
fprintf(stdout, " links not printed\n" );
108930: 52 push %edx
108931: 52 push %edx
108932: ff 70 08 pushl 0x8(%eax)
108935: 68 b4 47 12 00 push $0x1247b4
10893a: eb 0a jmp 108946 <IMFS_dump_directory+0xba>
return;
case IMFS_FIFO:
fprintf(stdout, " FIFO not printed\n" );
10893c: 57 push %edi
10893d: 57 push %edi
10893e: ff 70 08 pushl 0x8(%eax)
108941: 68 c8 47 12 00 push $0x1247c8
108946: e8 51 c3 00 00 call 114c9c <fputs>
10894b: eb 1e jmp 10896b <IMFS_dump_directory+0xdf>
return;
default:
fprintf(stdout, " bad type %d\n", IMFS_type( the_jnode ) );
10894d: 51 push %ecx <== NOT EXECUTED
10894e: 52 push %edx <== NOT EXECUTED
10894f: 68 db 47 12 00 push $0x1247db <== NOT EXECUTED
108954: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED
108957: e8 20 c2 00 00 call 114b7c <fprintf> <== NOT EXECUTED
10895c: eb 0d jmp 10896b <IMFS_dump_directory+0xdf><== NOT EXECUTED
return;
}
puts("");
10895e: 83 ec 0c sub $0xc,%esp
108961: 68 fd 4f 12 00 push $0x124ffd
108966: e8 79 db 00 00 call 1164e4 <puts>
10896b: 83 c4 10 add $0x10,%esp
}
static inline bool IMFS_is_directory( const IMFS_jnode_t *node )
{
return node->control->imfs_type == IMFS_DIRECTORY;
10896e: 8b 43 4c mov 0x4c(%ebx),%eax
the_jnode = (IMFS_jnode_t *) the_node;
for ( i=0 ; i<=level ; i++ )
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
if ( IMFS_is_directory( the_jnode ) )
108971: 83 38 00 cmpl $0x0,(%eax)
108974: 75 0a jne 108980 <IMFS_dump_directory+0xf4>
IMFS_dump_directory( the_jnode, level + 1 );
108976: 8b 55 e0 mov -0x20(%ebp),%edx
108979: 89 d8 mov %ebx,%eax
10897b: e8 0c ff ff ff call 10888c <IMFS_dump_directory>
the_chain = &the_directory->info.directory.Entries;
for ( the_node = rtems_chain_first( the_chain );
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
108980: 8b 1b mov (%ebx),%ebx
IMFS_assert( level >= 0 );
IMFS_assert( IMFS_is_directory( the_directory ) );
the_chain = &the_directory->info.directory.Entries;
for ( the_node = rtems_chain_first( the_chain );
108982: 3b 5d e4 cmp -0x1c(%ebp),%ebx
108985: 0f 85 35 ff ff ff jne 1088c0 <IMFS_dump_directory+0x34>
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
if ( IMFS_is_directory( the_jnode ) )
IMFS_dump_directory( the_jnode, level + 1 );
}
}
10898b: 8d 65 f4 lea -0xc(%ebp),%esp
10898e: 5b pop %ebx
10898f: 5e pop %esi
108990: 5f pop %edi
108991: 5d pop %ebp
108992: c3 ret
0010d39c <IMFS_eval_token>:
rtems_filesystem_eval_path_context_t *ctx,
void *arg,
const char *token,
size_t tokenlen
)
{
10d39c: 55 push %ebp
10d39d: 89 e5 mov %esp,%ebp
10d39f: 57 push %edi
10d3a0: 56 push %esi
10d3a1: 53 push %ebx
10d3a2: 83 ec 28 sub $0x28,%esp
10d3a5: 8b 75 08 mov 0x8(%ebp),%esi
10d3a8: 8b 7d 10 mov 0x10(%ebp),%edi
rtems_filesystem_eval_path_generic_status status =
RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_DONE;
rtems_filesystem_location_info_t *currentloc =
rtems_filesystem_eval_path_get_currentloc( ctx );
IMFS_jnode_t *dir = currentloc->node_access;
10d3ab: 8b 56 20 mov 0x20(%esi),%edx
bool access_ok = rtems_filesystem_eval_path_check_access(
10d3ae: 0f b7 42 3e movzwl 0x3e(%edx),%eax
10d3b2: 50 push %eax
10d3b3: 0f b7 42 3c movzwl 0x3c(%edx),%eax
10d3b7: 50 push %eax
10d3b8: ff 72 30 pushl 0x30(%edx)
10d3bb: 6a 01 push $0x1
10d3bd: 56 push %esi
10d3be: 89 55 e0 mov %edx,-0x20(%ebp)
10d3c1: e8 77 0a 00 00 call 10de3d <rtems_filesystem_eval_path_check_access>
dir->st_mode,
dir->st_uid,
dir->st_gid
);
if ( access_ok ) {
10d3c6: 83 c4 20 add $0x20,%esp
10d3c9: 84 c0 test %al,%al
10d3cb: 8b 55 e0 mov -0x20(%ebp),%edx
10d3ce: 75 05 jne 10d3d5 <IMFS_eval_token+0x39>
10d3d0: e9 0b 01 00 00 jmp 10d4e0 <IMFS_eval_token+0x144>
static inline bool rtems_filesystem_is_current_directory(
const char *token,
size_t tokenlen
)
{
return tokenlen == 1 && token [0] == '.';
10d3d5: 31 c0 xor %eax,%eax
10d3d7: 83 7d 14 01 cmpl $0x1,0x14(%ebp)
10d3db: 75 08 jne 10d3e5 <IMFS_eval_token+0x49>
10d3dd: 31 c0 xor %eax,%eax
10d3df: 80 3f 2e cmpb $0x2e,(%edi)
10d3e2: 0f 94 c0 sete %al
IMFS_jnode_t *dir,
const char *token,
size_t tokenlen
)
{
if ( rtems_filesystem_is_current_directory( token, tokenlen ) ) {
10d3e5: 85 c0 test %eax,%eax
10d3e7: 75 6b jne 10d454 <IMFS_eval_token+0xb8>
static inline bool rtems_filesystem_is_parent_directory(
const char *token,
size_t tokenlen
)
{
return tokenlen == 2 && token [0] == '.' && token [1] == '.';
10d3e9: 83 7d 14 02 cmpl $0x2,0x14(%ebp)
10d3ed: 75 0e jne 10d3fd <IMFS_eval_token+0x61>
10d3ef: 80 3f 2e cmpb $0x2e,(%edi)
10d3f2: 75 09 jne 10d3fd <IMFS_eval_token+0x61>
10d3f4: 31 c0 xor %eax,%eax
10d3f6: 80 7f 01 2e cmpb $0x2e,0x1(%edi)
10d3fa: 0f 94 c0 sete %al
return dir;
} else {
if ( rtems_filesystem_is_parent_directory( token, tokenlen ) ) {
10d3fd: 85 c0 test %eax,%eax
10d3ff: 74 05 je 10d406 <IMFS_eval_token+0x6a>
return dir->Parent;
10d401: 8b 5a 08 mov 0x8(%edx),%ebx
10d404: eb 45 jmp 10d44b <IMFS_eval_token+0xaf>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
10d406: 8b 5a 50 mov 0x50(%edx),%ebx
} else {
rtems_chain_control *entries = &dir->info.directory.Entries;
rtems_chain_node *current = rtems_chain_first( entries );
rtems_chain_node *tail = rtems_chain_tail( entries );
10d409: 8d 42 54 lea 0x54(%edx),%eax
10d40c: 89 45 e4 mov %eax,-0x1c(%ebp)
10d40f: eb 30 jmp 10d441 <IMFS_eval_token+0xa5>
while ( current != tail ) {
IMFS_jnode_t *entry = (IMFS_jnode_t *) current;
bool match = strncmp( entry->name, token, tokenlen ) == 0
10d411: 50 push %eax
10d412: ff 75 14 pushl 0x14(%ebp)
10d415: 57 push %edi
10d416: 8d 43 0c lea 0xc(%ebx),%eax
10d419: 50 push %eax
10d41a: 89 55 e0 mov %edx,-0x20(%ebp)
10d41d: e8 3a 4d 00 00 call 11215c <strncmp>
10d422: 83 c4 10 add $0x10,%esp
&& entry->name [tokenlen] == '\0';
10d425: 31 c9 xor %ecx,%ecx
10d427: 85 c0 test %eax,%eax
10d429: 8b 55 e0 mov -0x20(%ebp),%edx
10d42c: 75 0d jne 10d43b <IMFS_eval_token+0x9f>
10d42e: 8b 45 14 mov 0x14(%ebp),%eax
10d431: 31 c9 xor %ecx,%ecx
10d433: 80 7c 03 0c 00 cmpb $0x0,0xc(%ebx,%eax,1)
10d438: 0f 94 c1 sete %cl
if ( match ) {
10d43b: 85 c9 test %ecx,%ecx
10d43d: 75 0c jne 10d44b <IMFS_eval_token+0xaf>
};
void IMFS_eval_path( rtems_filesystem_eval_path_context_t *ctx )
{
rtems_filesystem_eval_path_generic( ctx, NULL, &IMFS_eval_config );
}
10d43f: 8b 1b mov (%ebx),%ebx
} else {
rtems_chain_control *entries = &dir->info.directory.Entries;
rtems_chain_node *current = rtems_chain_first( entries );
rtems_chain_node *tail = rtems_chain_tail( entries );
while ( current != tail ) {
10d441: 3b 5d e4 cmp -0x1c(%ebp),%ebx
10d444: 75 cb jne 10d411 <IMFS_eval_token+0x75>
10d446: e9 9c 00 00 00 jmp 10d4e7 <IMFS_eval_token+0x14b>
);
if ( access_ok ) {
IMFS_jnode_t *entry = IMFS_search_in_directory( dir, token, tokenlen );
if ( entry != NULL ) {
10d44b: 85 db test %ebx,%ebx
10d44d: 75 07 jne 10d456 <IMFS_eval_token+0xba>
10d44f: e9 93 00 00 00 jmp 10d4e7 <IMFS_eval_token+0x14b>
IMFS_jnode_t *dir,
const char *token,
size_t tokenlen
)
{
if ( rtems_filesystem_is_current_directory( token, tokenlen ) ) {
10d454: 89 d3 mov %edx,%ebx
if ( access_ok ) {
IMFS_jnode_t *entry = IMFS_search_in_directory( dir, token, tokenlen );
if ( entry != NULL ) {
bool terminal = !rtems_filesystem_eval_path_has_path( ctx );
10d456: 83 7e 04 00 cmpl $0x0,0x4(%esi)
10d45a: 0f 94 c0 sete %al
};
void IMFS_eval_path( rtems_filesystem_eval_path_context_t *ctx )
{
rtems_filesystem_eval_path_generic( ctx, NULL, &IMFS_eval_config );
}
10d45d: 8b 7e 10 mov 0x10(%esi),%edi
rtems_chain_extract_unprotected( &node->Node );
}
static inline IMFS_jnode_types_t IMFS_type( const IMFS_jnode_t *node )
{
return node->control->imfs_type;
10d460: 8b 4b 4c mov 0x4c(%ebx),%ecx
10d463: 8b 09 mov (%ecx),%ecx
static inline void rtems_filesystem_eval_path_clear_token(
rtems_filesystem_eval_path_context_t *ctx
)
{
ctx->tokenlen = 0;
10d465: c7 46 0c 00 00 00 00 movl $0x0,0xc(%esi)
bool follow_sym_link = (eval_flags & RTEMS_FS_FOLLOW_SYM_LINK) != 0;
IMFS_jnode_types_t type = IMFS_type( entry );
rtems_filesystem_eval_path_clear_token( ctx );
if ( type == IMFS_HARD_LINK && (follow_hard_link || !terminal)) {
10d46c: 83 f9 02 cmp $0x2,%ecx
10d46f: 75 0e jne 10d47f <IMFS_eval_token+0xe3>
10d471: 84 c0 test %al,%al
10d473: 74 05 je 10d47a <IMFS_eval_token+0xde>
10d475: 83 e7 08 and $0x8,%edi
10d478: 74 74 je 10d4ee <IMFS_eval_token+0x152>
entry = entry->info.hard_link.link_node;
10d47a: 8b 5b 50 mov 0x50(%ebx),%ebx
10d47d: eb 6f jmp 10d4ee <IMFS_eval_token+0x152>
}
if ( type == IMFS_SYM_LINK && (follow_sym_link || !terminal)) {
10d47f: 83 f9 03 cmp $0x3,%ecx
10d482: 75 23 jne 10d4a7 <IMFS_eval_token+0x10b>
10d484: 84 c0 test %al,%al
10d486: 74 05 je 10d48d <IMFS_eval_token+0xf1>
10d488: 83 e7 10 and $0x10,%edi
10d48b: 74 61 je 10d4ee <IMFS_eval_token+0x152>
const char *target = entry->info.sym_link.name;
10d48d: 8b 53 50 mov 0x50(%ebx),%edx
rtems_filesystem_eval_path_recursive( ctx, target, strlen( target ) );
10d490: 31 c0 xor %eax,%eax
10d492: 83 c9 ff or $0xffffffff,%ecx
10d495: 89 d7 mov %edx,%edi
10d497: f2 ae repnz scas %es:(%edi),%al
10d499: f7 d1 not %ecx
10d49b: 49 dec %ecx
10d49c: 53 push %ebx
10d49d: 51 push %ecx
10d49e: 52 push %edx
10d49f: 56 push %esi
10d4a0: e8 b5 a4 ff ff call 10795a <rtems_filesystem_eval_path_recursive>
10d4a5: eb 36 jmp 10d4dd <IMFS_eval_token+0x141>
IMFS_jnode_types_t type
)
{
rtems_filesystem_global_location_t **fs_root_ptr = NULL;
if ( type == IMFS_DIRECTORY ) {
10d4a7: 85 c9 test %ecx,%ecx
10d4a9: 75 43 jne 10d4ee <IMFS_eval_token+0x152>
if ( node->info.directory.mt_fs != NULL ) {
10d4ab: 8b 4b 5c mov 0x5c(%ebx),%ecx
10d4ae: 85 c9 test %ecx,%ecx
10d4b0: 74 3c je 10d4ee <IMFS_eval_token+0x152>
fs_root_ptr = &node->info.directory.mt_fs->mt_fs_root;
10d4b2: 8d 79 24 lea 0x24(%ecx),%edi
if ( !terminal ) {
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_CONTINUE;
}
} else {
access_ok = rtems_filesystem_eval_path_check_access(
10d4b5: 83 ec 0c sub $0xc,%esp
10d4b8: 0f b7 43 3e movzwl 0x3e(%ebx),%eax
10d4bc: 50 push %eax
10d4bd: 0f b7 43 3c movzwl 0x3c(%ebx),%eax
10d4c1: 50 push %eax
10d4c2: ff 73 30 pushl 0x30(%ebx)
10d4c5: 6a 01 push $0x1
10d4c7: 56 push %esi
10d4c8: e8 70 09 00 00 call 10de3d <rtems_filesystem_eval_path_check_access>
RTEMS_FS_PERMS_EXEC,
entry->st_mode,
entry->st_uid,
entry->st_gid
);
if ( access_ok ) {
10d4cd: 83 c4 20 add $0x20,%esp
10d4d0: 84 c0 test %al,%al
10d4d2: 74 0c je 10d4e0 <IMFS_eval_token+0x144> <== NEVER TAKEN
rtems_filesystem_eval_path_restart( ctx, fs_root_ptr );
10d4d4: 50 push %eax
10d4d5: 50 push %eax
10d4d6: 57 push %edi
10d4d7: 56 push %esi
10d4d8: e8 1a a4 ff ff call 1078f7 <rtems_filesystem_eval_path_restart>
10d4dd: 83 c4 10 add $0x10,%esp
void *arg,
const char *token,
size_t tokenlen
)
{
rtems_filesystem_eval_path_generic_status status =
10d4e0: b8 01 00 00 00 mov $0x1,%eax
10d4e5: eb 1e jmp 10d505 <IMFS_eval_token+0x169>
rtems_filesystem_eval_path_restart( ctx, fs_root_ptr );
}
}
}
} else {
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY;
10d4e7: b8 02 00 00 00 mov $0x2,%eax
10d4ec: eb 17 jmp 10d505 <IMFS_eval_token+0x169>
} else {
rtems_filesystem_global_location_t **fs_root_ptr =
IMFS_is_mount_point( entry, type );
if ( fs_root_ptr == NULL ) {
--dir->reference_count;
10d4ee: 66 ff 4a 34 decw 0x34(%edx)
++entry->reference_count;
10d4f2: 66 ff 43 34 incw 0x34(%ebx)
currentloc->node_access = entry;
10d4f6: 89 5e 20 mov %ebx,0x20(%esi)
static inline void IMFS_Set_handlers( rtems_filesystem_location_info_t *loc )
{
IMFS_jnode_t *node = (IMFS_jnode_t *) loc->node_access;
loc->handlers = node->control->handlers;
10d4f9: 8b 53 4c mov 0x4c(%ebx),%edx
10d4fc: 8b 52 04 mov 0x4(%edx),%edx
10d4ff: 89 56 28 mov %edx,0x28(%esi)
void *arg,
const char *token,
size_t tokenlen
)
{
rtems_filesystem_eval_path_generic_status status =
10d502: 0f b6 c0 movzbl %al,%eax
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY;
}
}
return status;
}
10d505: 8d 65 f4 lea -0xc(%ebp),%esp
10d508: 5b pop %ebx
10d509: 5e pop %esi
10d50a: 5f pop %edi
10d50b: 5d pop %ebp
10d50c: c3 ret
0010d528 <IMFS_fchmod>:
int IMFS_fchmod(
const rtems_filesystem_location_info_t *loc,
mode_t mode
)
{
10d528: 55 push %ebp
10d529: 89 e5 mov %esp,%ebp
10d52b: 53 push %ebx
10d52c: 83 ec 14 sub $0x14,%esp
IMFS_jnode_t *jnode;
#if defined(RTEMS_POSIX_API)
uid_t st_uid;
#endif
jnode = loc->node_access;
10d52f: 8b 45 08 mov 0x8(%ebp),%eax
10d532: 8b 58 08 mov 0x8(%eax),%ebx
/*
* Verify I am the owner of the node or the super user.
*/
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
10d535: e8 0e 05 00 00 call 10da48 <geteuid>
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
10d53a: 66 3b 43 3c cmp 0x3c(%ebx),%ax
10d53e: 74 15 je 10d555 <IMFS_fchmod+0x2d>
10d540: 66 85 c0 test %ax,%ax
10d543: 74 10 je 10d555 <IMFS_fchmod+0x2d> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EPERM );
10d545: e8 92 39 00 00 call 110edc <__errno>
10d54a: c7 00 01 00 00 00 movl $0x1,(%eax)
10d550: 83 c8 ff or $0xffffffff,%eax
10d553: eb 2e jmp 10d583 <IMFS_fchmod+0x5b>
/*
* Change only the RWX permissions on the jnode to mode.
*/
jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
10d555: 8b 45 0c mov 0xc(%ebp),%eax
10d558: 25 ff 0f 00 00 and $0xfff,%eax
/*
* Change only the RWX permissions on the jnode to mode.
*/
jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
10d55d: 8b 53 30 mov 0x30(%ebx),%edx
10d560: 81 e2 00 f0 ff ff and $0xfffff000,%edx
jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
10d566: 09 d0 or %edx,%eax
10d568: 89 43 30 mov %eax,0x30(%ebx)
IMFS_update_ctime( jnode );
10d56b: 50 push %eax
10d56c: 50 push %eax
10d56d: 6a 00 push $0x0
10d56f: 8d 45 f0 lea -0x10(%ebp),%eax
10d572: 50 push %eax
10d573: e8 34 92 ff ff call 1067ac <gettimeofday>
10d578: 8b 45 f0 mov -0x10(%ebp),%eax
10d57b: 89 43 48 mov %eax,0x48(%ebx)
return 0;
10d57e: 83 c4 10 add $0x10,%esp
10d581: 31 c0 xor %eax,%eax
}
10d583: 8b 5d fc mov -0x4(%ebp),%ebx
10d586: c9 leave
10d587: c3 ret
00106934 <IMFS_fifo_write>:
static ssize_t IMFS_fifo_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
106934: 55 push %ebp
106935: 89 e5 mov %esp,%ebp
106937: 56 push %esi
106938: 53 push %ebx
106939: 83 ec 10 sub $0x10,%esp
10693c: 8b 45 08 mov 0x8(%ebp),%eax
IMFS_jnode_t *jnode = iop->pathinfo.node_access;
10693f: 8b 70 18 mov 0x18(%eax),%esi
int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop);
106942: 50 push %eax
106943: ff 75 10 pushl 0x10(%ebp)
106946: ff 75 0c pushl 0xc(%ebp)
106949: ff 76 50 pushl 0x50(%esi)
10694c: e8 7c 8d 00 00 call 10f6cd <pipe_write>
106951: 89 c3 mov %eax,%ebx
if (err > 0) {
106953: 83 c4 10 add $0x10,%esp
106956: 83 f8 00 cmp $0x0,%eax
106959: 7e 1b jle 106976 <IMFS_fifo_write+0x42>
IMFS_mtime_ctime_update(jnode);
10695b: 50 push %eax
10695c: 50 push %eax
10695d: 6a 00 push $0x0
10695f: 8d 45 f0 lea -0x10(%ebp),%eax
106962: 50 push %eax
106963: e8 84 0d 00 00 call 1076ec <gettimeofday>
106968: 8b 45 f0 mov -0x10(%ebp),%eax
10696b: 89 46 44 mov %eax,0x44(%esi)
10696e: 89 46 48 mov %eax,0x48(%esi)
106971: 83 c4 10 add $0x10,%esp
106974: eb 0e jmp 106984 <IMFS_fifo_write+0x50>
}
IMFS_FIFO_RETURN(err);
106976: 74 0c je 106984 <IMFS_fifo_write+0x50> <== NEVER TAKEN
106978: e8 d7 c0 00 00 call 112a54 <__errno>
10697d: f7 db neg %ebx
10697f: 89 18 mov %ebx,(%eax)
106981: 83 cb ff or $0xffffffff,%ebx
}
106984: 89 d8 mov %ebx,%eax
106986: 8d 65 f8 lea -0x8(%ebp),%esp
106989: 5b pop %ebx
10698a: 5e pop %esi
10698b: 5d pop %ebp
10698c: c3 ret
0010d588 <IMFS_fsunmount>:
((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next))
void IMFS_fsunmount(
rtems_filesystem_mount_table_entry_t *temp_mt_entry
)
{
10d588: 55 push %ebp
10d589: 89 e5 mov %esp,%ebp
10d58b: 57 push %edi
10d58c: 56 push %esi
10d58d: 53 push %ebx
10d58e: 83 ec 2c sub $0x2c,%esp
/*
* Traverse tree that starts at the mt_fs_root and deallocate memory
* associated memory space
*/
loc = temp_mt_entry->mt_fs_root->location;
10d591: 8b 45 08 mov 0x8(%ebp),%eax
10d594: 8b 40 24 mov 0x24(%eax),%eax
10d597: 8d 7d d0 lea -0x30(%ebp),%edi
10d59a: b9 06 00 00 00 mov $0x6,%ecx
10d59f: 89 c6 mov %eax,%esi
10d5a1: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
jnode = (IMFS_jnode_t *)loc.node_access;
10d5a3: 8b 5d d8 mov -0x28(%ebp),%ebx
/*
* Set this to null to indicate that it is being unmounted.
*/
temp_mt_entry->mt_fs_root->location.node_access = NULL;
10d5a6: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax)
next = jnode->Parent;
loc.node_access = (void *)jnode;
IMFS_Set_handlers( &loc );
if ( !IMFS_is_directory( jnode ) || jnode_has_no_children( jnode ) ) {
result = IMFS_rmnod( NULL, &loc );
10d5ad: 8d 7d d0 lea -0x30(%ebp),%edi
10d5b0: eb 02 jmp 10d5b4 <IMFS_fsunmount+0x2c>
if ( IMFS_is_directory( jnode ) ) {
if ( jnode_has_children( jnode ) )
jnode = jnode_get_first_child( jnode );
}
}
} while (jnode != NULL);
10d5b2: 89 c3 mov %eax,%ebx
*/
temp_mt_entry->mt_fs_root->location.node_access = NULL;
do {
next = jnode->Parent;
10d5b4: 8b 73 08 mov 0x8(%ebx),%esi
loc.node_access = (void *)jnode;
10d5b7: 89 5d d8 mov %ebx,-0x28(%ebp)
10d5ba: 8b 43 4c mov 0x4c(%ebx),%eax
10d5bd: 8b 50 04 mov 0x4(%eax),%edx
10d5c0: 89 55 e0 mov %edx,-0x20(%ebp)
IMFS_Set_handlers( &loc );
if ( !IMFS_is_directory( jnode ) || jnode_has_no_children( jnode ) ) {
10d5c3: 83 38 00 cmpl $0x0,(%eax)
10d5c6: 75 08 jne 10d5d0 <IMFS_fsunmount+0x48>
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
10d5c8: 8d 43 54 lea 0x54(%ebx),%eax
10d5cb: 39 43 50 cmp %eax,0x50(%ebx)
10d5ce: 75 30 jne 10d600 <IMFS_fsunmount+0x78>
result = IMFS_rmnod( NULL, &loc );
10d5d0: 50 push %eax
10d5d1: 50 push %eax
10d5d2: 57 push %edi
10d5d3: 6a 00 push $0x0
10d5d5: e8 32 8d ff ff call 10630c <IMFS_rmnod>
if ( result != 0 )
10d5da: 83 c4 10 add $0x10,%esp
10d5dd: 85 c0 test %eax,%eax
10d5df: 74 0d je 10d5ee <IMFS_fsunmount+0x66> <== ALWAYS TAKEN
rtems_fatal_error_occurred( 0xdeadbeef );
10d5e1: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10d5e4: 68 ef be ad de push $0xdeadbeef <== NOT EXECUTED
10d5e9: e8 c6 cd ff ff call 10a3b4 <rtems_fatal_error_occurred><== NOT EXECUTED
IMFS_node_destroy( jnode );
10d5ee: 83 ec 0c sub $0xc,%esp
10d5f1: 53 push %ebx
10d5f2: e8 68 8a ff ff call 10605f <IMFS_node_destroy>
jnode = next;
}
if ( jnode != NULL ) {
10d5f7: 83 c4 10 add $0x10,%esp
10d5fa: 85 f6 test %esi,%esi
10d5fc: 74 18 je 10d616 <IMFS_fsunmount+0x8e>
10d5fe: 89 f3 mov %esi,%ebx
return node->control->imfs_type;
}
static inline bool IMFS_is_directory( const IMFS_jnode_t *node )
{
return node->control->imfs_type == IMFS_DIRECTORY;
10d600: 8b 43 4c mov 0x4c(%ebx),%eax
if ( IMFS_is_directory( jnode ) ) {
10d603: 83 38 00 cmpl $0x0,(%eax)
10d606: 75 ac jne 10d5b4 <IMFS_fsunmount+0x2c> <== NEVER TAKEN
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
10d608: 8b 43 50 mov 0x50(%ebx),%eax
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
10d60b: 8d 53 54 lea 0x54(%ebx),%edx
if ( jnode_has_children( jnode ) )
10d60e: 39 d0 cmp %edx,%eax
10d610: 74 a2 je 10d5b4 <IMFS_fsunmount+0x2c>
jnode = jnode_get_first_child( jnode );
}
}
} while (jnode != NULL);
10d612: 85 c0 test %eax,%eax
10d614: 75 9c jne 10d5b2 <IMFS_fsunmount+0x2a> <== ALWAYS TAKEN
}
10d616: 8d 65 f4 lea -0xc(%ebp),%esp
10d619: 5b pop %ebx
10d61a: 5e pop %esi
10d61b: 5f pop %edi
10d61c: 5d pop %ebp
10d61d: c3 ret
00105f90 <IMFS_initialize_support>:
int IMFS_initialize_support(
rtems_filesystem_mount_table_entry_t *mt_entry,
const rtems_filesystem_operations_table *op_table,
const IMFS_node_control *const node_controls [IMFS_TYPE_COUNT]
)
{
105f90: 55 push %ebp
105f91: 89 e5 mov %esp,%ebp
105f93: 57 push %edi
105f94: 56 push %esi
105f95: 53 push %ebx
105f96: 83 ec 14 sub $0x14,%esp
105f99: 8b 75 10 mov 0x10(%ebp),%esi
static int imfs_instance;
int rv = 0;
IMFS_fs_info_t *fs_info = calloc( 1, sizeof( *fs_info ) );
105f9c: 6a 24 push $0x24
105f9e: 6a 01 push $0x1
105fa0: e8 87 05 00 00 call 10652c <calloc>
105fa5: 89 c3 mov %eax,%ebx
if ( fs_info != NULL ) {
105fa7: 83 c4 10 add $0x10,%esp
105faa: 85 c0 test %eax,%eax
105fac: 74 6f je 10601d <IMFS_initialize_support+0x8d>
IMFS_jnode_t *root_node;
fs_info->instance = imfs_instance++;
105fae: a1 b8 df 12 00 mov 0x12dfb8,%eax
105fb3: 89 03 mov %eax,(%ebx)
105fb5: 40 inc %eax
105fb6: a3 b8 df 12 00 mov %eax,0x12dfb8
memcpy(
fs_info->node_controls,
105fbb: 8d 43 08 lea 0x8(%ebx),%eax
if ( fs_info != NULL ) {
IMFS_jnode_t *root_node;
fs_info->instance = imfs_instance++;
memcpy(
105fbe: b9 07 00 00 00 mov $0x7,%ecx
105fc3: 89 c7 mov %eax,%edi
105fc5: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
fs_info->node_controls,
node_controls,
sizeof( fs_info->node_controls )
);
root_node = IMFS_allocate_node(
105fc7: 50 push %eax
105fc8: 50 push %eax
105fc9: 6a 00 push $0x0
105fcb: 68 ed 41 00 00 push $0x41ed
105fd0: 6a 00 push $0x0
105fd2: 68 19 fa 11 00 push $0x11fa19
105fd7: ff 73 08 pushl 0x8(%ebx)
105fda: 53 push %ebx
105fdb: e8 a0 72 00 00 call 10d280 <IMFS_allocate_node>
"",
0,
(S_IFDIR | 0755),
NULL
);
if ( root_node != NULL ) {
105fe0: 83 c4 20 add $0x20,%esp
105fe3: 85 c0 test %eax,%eax
105fe5: 74 36 je 10601d <IMFS_initialize_support+0x8d><== NEVER TAKEN
mt_entry->fs_info = fs_info;
105fe7: 8b 55 08 mov 0x8(%ebp),%edx
105fea: 89 5a 08 mov %ebx,0x8(%edx)
mt_entry->ops = op_table;
105fed: 8b 55 0c mov 0xc(%ebp),%edx
105ff0: 8b 4d 08 mov 0x8(%ebp),%ecx
105ff3: 89 51 0c mov %edx,0xc(%ecx)
mt_entry->pathconf_limits_and_options = &IMFS_LIMITS_AND_OPTIONS;
105ff6: c7 41 2c 7c fd 11 00 movl $0x11fd7c,0x2c(%ecx)
mt_entry->mt_fs_root->location.node_access = root_node;
105ffd: 8b 51 24 mov 0x24(%ecx),%edx
106000: 89 42 08 mov %eax,0x8(%edx)
static inline void IMFS_Set_handlers( rtems_filesystem_location_info_t *loc )
{
IMFS_jnode_t *node = (IMFS_jnode_t *) loc->node_access;
loc->handlers = node->control->handlers;
106003: 8b 40 4c mov 0x4c(%eax),%eax
106006: 8b 40 04 mov 0x4(%eax),%eax
106009: 89 42 10 mov %eax,0x10(%edx)
errno = ENOMEM;
rv = -1;
}
if ( rv == 0 ) {
IMFS_determine_bytes_per_block(
10600c: a1 6c a2 12 00 mov 0x12a26c,%eax
106011: ba 06 00 00 00 mov $0x6,%edx
int bit_mask;
/*
* check, whether requested bytes per block is valid
*/
for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) {
106016: b9 10 00 00 00 mov $0x10,%ecx
10601b: eb 0d jmp 10602a <IMFS_initialize_support+0x9a>
} else {
errno = ENOMEM;
rv = -1;
}
} else {
errno = ENOMEM;
10601d: e8 ba ae 00 00 call 110edc <__errno>
106022: c7 00 0c 00 00 00 movl $0xc,(%eax)
106028: eb 19 jmp 106043 <IMFS_initialize_support+0xb3>
/*
* check, whether requested bytes per block is valid
*/
for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) {
if (bit_mask == requested_bytes_per_block) {
10602a: 39 c1 cmp %eax,%ecx
10602c: 74 0c je 10603a <IMFS_initialize_support+0xaa>
is_valid = true;
break;
}
if(bit_mask > requested_bytes_per_block)
10602e: 7f 05 jg 106035 <IMFS_initialize_support+0xa5>
int bit_mask;
/*
* check, whether requested bytes per block is valid
*/
for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) {
106030: d1 e1 shl %ecx
106032: 4a dec %edx
106033: 75 f5 jne 10602a <IMFS_initialize_support+0x9a><== ALWAYS TAKEN
if(bit_mask > requested_bytes_per_block)
break;
}
*dest_bytes_per_block = ((is_valid)
? requested_bytes_per_block
: default_bytes_per_block);
106035: b8 80 00 00 00 mov $0x80,%eax
break;
}
if(bit_mask > requested_bytes_per_block)
break;
}
*dest_bytes_per_block = ((is_valid)
10603a: a3 b4 df 12 00 mov %eax,0x12dfb4
const IMFS_node_control *const node_controls [IMFS_TYPE_COUNT]
)
{
static int imfs_instance;
int rv = 0;
10603f: 31 c0 xor %eax,%eax
106041: eb 03 jmp 106046 <IMFS_initialize_support+0xb6>
if(bit_mask > requested_bytes_per_block)
break;
}
*dest_bytes_per_block = ((is_valid)
? requested_bytes_per_block
: default_bytes_per_block);
106043: 83 c8 ff or $0xffffffff,%eax
IMFS_MEMFILE_DEFAULT_BYTES_PER_BLOCK
);
}
return rv;
}
106046: 8d 65 f4 lea -0xc(%ebp),%esp
106049: 5b pop %ebx
10604a: 5e pop %esi
10604b: 5f pop %edi
10604c: 5d pop %ebp
10604d: c3 ret
001075ed <IMFS_make_generic_node>:
const char *path,
mode_t mode,
const IMFS_node_control *node_control,
void *context
)
{
1075ed: 55 push %ebp
1075ee: 89 e5 mov %esp,%ebp
1075f0: 57 push %edi
1075f1: 56 push %esi
1075f2: 53 push %ebx
1075f3: 83 ec 6c sub $0x6c,%esp
int rv = 0;
mode &= ~rtems_filesystem_umask;
1075f6: a1 24 0c 13 00 mov 0x130c24,%eax
1075fb: 8b 58 08 mov 0x8(%eax),%ebx
1075fe: f7 d3 not %ebx
107600: 23 5d 0c and 0xc(%ebp),%ebx
switch (mode & S_IFMT) {
107603: 89 d8 mov %ebx,%eax
107605: 25 00 f0 00 00 and $0xf000,%eax
10760a: 3d 00 20 00 00 cmp $0x2000,%eax
10760f: 0f 84 c8 00 00 00 je 1076dd <IMFS_make_generic_node+0xf0>
107615: 77 07 ja 10761e <IMFS_make_generic_node+0x31><== ALWAYS TAKEN
107617: 3d 00 10 00 00 cmp $0x1000,%eax <== NOT EXECUTED
10761c: eb 10 jmp 10762e <IMFS_make_generic_node+0x41><== NOT EXECUTED
10761e: 3d 00 60 00 00 cmp $0x6000,%eax
107623: 0f 84 b4 00 00 00 je 1076dd <IMFS_make_generic_node+0xf0>
107629: 3d 00 80 00 00 cmp $0x8000,%eax
10762e: 0f 84 a9 00 00 00 je 1076dd <IMFS_make_generic_node+0xf0><== NEVER TAKEN
107634: e9 94 00 00 00 jmp 1076cd <IMFS_make_generic_node+0xe0>
if ( node_control->imfs_type == IMFS_GENERIC ) {
rtems_filesystem_eval_path_context_t ctx;
int eval_flags = RTEMS_FS_FOLLOW_LINK
| RTEMS_FS_MAKE
| RTEMS_FS_EXCLUSIVE;
const rtems_filesystem_location_info_t *currentloc =
107639: 50 push %eax
10763a: 6a 78 push $0x78
10763c: ff 75 08 pushl 0x8(%ebp)
rtems_filesystem_eval_path_start( &ctx, path, eval_flags );
10763f: 8d 75 b0 lea -0x50(%ebp),%esi
if ( node_control->imfs_type == IMFS_GENERIC ) {
rtems_filesystem_eval_path_context_t ctx;
int eval_flags = RTEMS_FS_FOLLOW_LINK
| RTEMS_FS_MAKE
| RTEMS_FS_EXCLUSIVE;
const rtems_filesystem_location_info_t *currentloc =
107642: 56 push %esi
107643: e8 81 1b 00 00 call 1091c9 <rtems_filesystem_eval_path_start>
107648: 89 c7 mov %eax,%edi
rtems_filesystem_eval_path_start( &ctx, path, eval_flags );
if ( IMFS_is_imfs_instance( currentloc ) ) {
10764a: 89 04 24 mov %eax,(%esp)
10764d: e8 56 ff ff ff call 1075a8 <IMFS_is_imfs_instance>
107652: 83 c4 10 add $0x10,%esp
107655: 84 c0 test %al,%al
107657: 74 50 je 1076a9 <IMFS_make_generic_node+0xbc>
IMFS_types_union info;
IMFS_jnode_t *new_node;
info.generic.context = context;
107659: 8b 45 14 mov 0x14(%ebp),%eax
10765c: 89 45 9c mov %eax,-0x64(%ebp)
new_node = IMFS_create_node_with_control(
10765f: 50 push %eax
107660: 50 push %eax
currentloc,
node_control,
rtems_filesystem_eval_path_get_token( &ctx ),
rtems_filesystem_eval_path_get_tokenlen( &ctx ),
mode,
&info
107661: 8d 45 9c lea -0x64(%ebp),%eax
if ( IMFS_is_imfs_instance( currentloc ) ) {
IMFS_types_union info;
IMFS_jnode_t *new_node;
info.generic.context = context;
new_node = IMFS_create_node_with_control(
107664: 50 push %eax
107665: 53 push %ebx
107666: ff 75 bc pushl -0x44(%ebp)
107669: ff 75 b8 pushl -0x48(%ebp)
10766c: ff 75 10 pushl 0x10(%ebp)
10766f: 57 push %edi
107670: e8 d7 97 00 00 call 110e4c <IMFS_create_node_with_control>
rtems_filesystem_eval_path_get_tokenlen( &ctx ),
mode,
&info
);
if ( new_node != NULL ) {
107675: 83 c4 20 add $0x20,%esp
107678: 85 c0 test %eax,%eax
10767a: 74 3d je 1076b9 <IMFS_make_generic_node+0xcc>
IMFS_jnode_t *parent = currentloc->node_access;
10767c: 8b 5f 08 mov 0x8(%edi),%ebx
IMFS_update_ctime( parent );
10767f: 51 push %ecx
107680: 51 push %ecx
107681: 6a 00 push $0x0
107683: 8d 75 94 lea -0x6c(%ebp),%esi
107686: 56 push %esi
107687: e8 2c 08 00 00 call 107eb8 <gettimeofday>
10768c: 8b 45 94 mov -0x6c(%ebp),%eax
10768f: 89 43 48 mov %eax,0x48(%ebx)
IMFS_update_mtime( parent );
107692: 5f pop %edi
107693: 58 pop %eax
107694: 6a 00 push $0x0
107696: 56 push %esi
107697: e8 1c 08 00 00 call 107eb8 <gettimeofday>
10769c: 8b 45 94 mov -0x6c(%ebp),%eax
10769f: 89 43 44 mov %eax,0x44(%ebx)
1076a2: 83 c4 10 add $0x10,%esp
1076a5: 31 db xor %ebx,%ebx
1076a7: eb 13 jmp 1076bc <IMFS_make_generic_node+0xcf>
} else {
rv = -1;
}
} else {
rtems_filesystem_eval_path_error( &ctx, ENOTSUP );
1076a9: 52 push %edx
1076aa: 52 push %edx
1076ab: 68 86 00 00 00 push $0x86
1076b0: 56 push %esi
1076b1: e8 ec 18 00 00 call 108fa2 <rtems_filesystem_eval_path_error>
1076b6: 83 c4 10 add $0x10,%esp
rv = -1;
1076b9: 83 cb ff or $0xffffffff,%ebx
}
rtems_filesystem_eval_path_cleanup( &ctx );
1076bc: 83 ec 0c sub $0xc,%esp
1076bf: 8d 45 b0 lea -0x50(%ebp),%eax
1076c2: 50 push %eax
1076c3: e8 bd 1b 00 00 call 109285 <rtems_filesystem_eval_path_cleanup>
1076c8: 83 c4 10 add $0x10,%esp
1076cb: eb 1e jmp 1076eb <IMFS_make_generic_node+0xfe>
} else {
errno = EINVAL;
1076cd: e8 52 d1 00 00 call 114824 <__errno>
1076d2: c7 00 16 00 00 00 movl $0x16,(%eax)
rv = -1;
1076d8: 83 cb ff or $0xffffffff,%ebx
1076db: eb 0e jmp 1076eb <IMFS_make_generic_node+0xfe>
rv = -1;
break;
}
if ( rv == 0 ) {
if ( node_control->imfs_type == IMFS_GENERIC ) {
1076dd: 8b 45 10 mov 0x10(%ebp),%eax
1076e0: 83 38 07 cmpl $0x7,(%eax)
1076e3: 0f 84 50 ff ff ff je 107639 <IMFS_make_generic_node+0x4c>
1076e9: eb e2 jmp 1076cd <IMFS_make_generic_node+0xe0>
rv = -1;
}
}
return rv;
}
1076eb: 89 d8 mov %ebx,%eax
1076ed: 8d 65 f4 lea -0xc(%ebp),%esp
1076f0: 5b pop %ebx
1076f1: 5e pop %esi
1076f2: 5f pop %edi
1076f3: 5d pop %ebp
1076f4: c3 ret
0010fbd8 <IMFS_memfile_addblock>:
*/
MEMFILE_STATIC int IMFS_memfile_addblock(
IMFS_jnode_t *the_jnode,
unsigned int block
)
{
10fbd8: 55 push %ebp
10fbd9: 89 e5 mov %esp,%ebp
10fbdb: 56 push %esi
10fbdc: 53 push %ebx
IMFS_assert( IMFS_type( the_jnode ) == IMFS_MEMORY_FILE );
/*
* Obtain the pointer for the specified block number
*/
block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 );
10fbdd: 50 push %eax
10fbde: 6a 01 push $0x1
10fbe0: ff 75 0c pushl 0xc(%ebp)
10fbe3: ff 75 08 pushl 0x8(%ebp)
10fbe6: e8 d7 fc ff ff call 10f8c2 <IMFS_memfile_get_block_pointer>
10fbeb: 89 c6 mov %eax,%esi
if ( *block_entry_ptr )
10fbed: 83 c4 10 add $0x10,%esp
return 0;
10fbf0: 31 db xor %ebx,%ebx
/*
* Obtain the pointer for the specified block number
*/
block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 );
if ( *block_entry_ptr )
10fbf2: 83 38 00 cmpl $0x0,(%eax)
10fbf5: 75 12 jne 10fc09 <IMFS_memfile_addblock+0x31>
return 0;
/*
* There is no memory for this block number so allocate it.
*/
memory = memfile_alloc_block();
10fbf7: e8 a4 fc ff ff call 10f8a0 <memfile_alloc_block>
if ( !memory )
10fbfc: 85 c0 test %eax,%eax
10fbfe: 74 04 je 10fc04 <IMFS_memfile_addblock+0x2c><== NEVER TAKEN
return 1;
*block_entry_ptr = memory;
10fc00: 89 06 mov %eax,(%esi)
return 0;
10fc02: eb 05 jmp 10fc09 <IMFS_memfile_addblock+0x31>
/*
* There is no memory for this block number so allocate it.
*/
memory = memfile_alloc_block();
if ( !memory )
return 1;
10fc04: bb 01 00 00 00 mov $0x1,%ebx <== NOT EXECUTED
*block_entry_ptr = memory;
return 0;
}
10fc09: 89 d8 mov %ebx,%eax
10fc0b: 8d 65 f8 lea -0x8(%ebp),%esp
10fc0e: 5b pop %ebx
10fc0f: 5e pop %esi
10fc10: 5d pop %ebp
10fc11: c3 ret
0010fd7a <IMFS_memfile_extend>:
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
bool zero_fill,
off_t new_length
)
{
10fd7a: 55 push %ebp
10fd7b: 89 e5 mov %esp,%ebp
10fd7d: 57 push %edi
10fd7e: 56 push %esi
10fd7f: 53 push %ebx
10fd80: 83 ec 4c sub $0x4c,%esp
10fd83: 8b 75 08 mov 0x8(%ebp),%esi
10fd86: 8b 45 10 mov 0x10(%ebp),%eax
10fd89: 8b 55 14 mov 0x14(%ebp),%edx
10fd8c: 89 45 d0 mov %eax,-0x30(%ebp)
10fd8f: 89 55 d4 mov %edx,-0x2c(%ebp)
10fd92: 8a 55 0c mov 0xc(%ebp),%dl
10fd95: 88 55 bb mov %dl,-0x45(%ebp)
IMFS_assert( IMFS_type( the_jnode ) == IMFS_MEMORY_FILE );
/*
* Verify new file size is supported
*/
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
10fd98: 8b 1d b4 df 12 00 mov 0x12dfb4,%ebx
10fd9e: 89 da mov %ebx,%edx
10fda0: c1 ea 02 shr $0x2,%edx
10fda3: 8d 42 01 lea 0x1(%edx),%eax
10fda6: 0f af c2 imul %edx,%eax
10fda9: 40 inc %eax
10fdaa: 0f af c2 imul %edx,%eax
10fdad: 48 dec %eax
10fdae: 0f af c3 imul %ebx,%eax
10fdb1: 83 7d d4 00 cmpl $0x0,-0x2c(%ebp)
10fdb5: 7c 17 jl 10fdce <IMFS_memfile_extend+0x54><== NEVER TAKEN
10fdb7: 7f 05 jg 10fdbe <IMFS_memfile_extend+0x44><== NEVER TAKEN
10fdb9: 39 45 d0 cmp %eax,-0x30(%ebp)
10fdbc: 72 10 jb 10fdce <IMFS_memfile_extend+0x54>
rtems_set_errno_and_return_minus_one( EFBIG );
10fdbe: e8 19 11 00 00 call 110edc <__errno>
10fdc3: c7 00 1b 00 00 00 movl $0x1b,(%eax)
10fdc9: e9 c1 00 00 00 jmp 10fe8f <IMFS_memfile_extend+0x115>
/*
* Verify new file size is actually larger than current size
*/
if ( new_length <= the_jnode->info.file.size )
10fdce: 8b 46 50 mov 0x50(%esi),%eax
10fdd1: 8b 56 54 mov 0x54(%esi),%edx
10fdd4: 89 45 c0 mov %eax,-0x40(%ebp)
10fdd7: 89 55 c4 mov %edx,-0x3c(%ebp)
10fdda: 39 55 d4 cmp %edx,-0x2c(%ebp)
10fddd: 0f 8c e9 00 00 00 jl 10fecc <IMFS_memfile_extend+0x152><== NEVER TAKEN
10fde3: 7f 09 jg 10fdee <IMFS_memfile_extend+0x74><== NEVER TAKEN
10fde5: 39 45 d0 cmp %eax,-0x30(%ebp)
10fde8: 0f 86 de 00 00 00 jbe 10fecc <IMFS_memfile_extend+0x152><== NEVER TAKEN
return 0;
/*
* Calculate the number of range of blocks to allocate
*/
new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
10fdee: 89 5d c8 mov %ebx,-0x38(%ebp)
10fdf1: 89 da mov %ebx,%edx
10fdf3: c1 fa 1f sar $0x1f,%edx
10fdf6: 89 55 cc mov %edx,-0x34(%ebp)
10fdf9: ff 75 cc pushl -0x34(%ebp)
10fdfc: ff 75 c8 pushl -0x38(%ebp)
10fdff: ff 75 d4 pushl -0x2c(%ebp)
10fe02: ff 75 d0 pushl -0x30(%ebp)
10fe05: e8 7e d3 00 00 call 11d188 <__divdi3>
10fe0a: 83 c4 10 add $0x10,%esp
10fe0d: 89 45 bc mov %eax,-0x44(%ebp)
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
10fe10: ff 75 cc pushl -0x34(%ebp)
10fe13: ff 75 c8 pushl -0x38(%ebp)
10fe16: ff 75 c4 pushl -0x3c(%ebp)
10fe19: ff 75 c0 pushl -0x40(%ebp)
10fe1c: e8 67 d3 00 00 call 11d188 <__divdi3>
10fe21: 83 c4 10 add $0x10,%esp
10fe24: 89 45 c8 mov %eax,-0x38(%ebp)
offset = the_jnode->info.file.size - old_blocks * IMFS_MEMFILE_BYTES_PER_BLOCK;
10fe27: 0f af d8 imul %eax,%ebx
10fe2a: 8b 7d c0 mov -0x40(%ebp),%edi
10fe2d: 29 df sub %ebx,%edi
/*
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
10fe2f: 89 c3 mov %eax,%ebx
10fe31: eb 62 jmp 10fe95 <IMFS_memfile_extend+0x11b>
if ( !IMFS_memfile_addblock( the_jnode, block ) ) {
10fe33: 50 push %eax
10fe34: 50 push %eax
10fe35: 53 push %ebx
10fe36: 56 push %esi
10fe37: e8 9c fd ff ff call 10fbd8 <IMFS_memfile_addblock>
10fe3c: 83 c4 10 add $0x10,%esp
10fe3f: 85 c0 test %eax,%eax
10fe41: 75 3c jne 10fe7f <IMFS_memfile_extend+0x105><== NEVER TAKEN
if ( zero_fill ) {
10fe43: 80 7d bb 00 cmpb $0x0,-0x45(%ebp)
10fe47: 74 4b je 10fe94 <IMFS_memfile_extend+0x11a>
size_t count = IMFS_MEMFILE_BYTES_PER_BLOCK - offset;
10fe49: 8b 0d b4 df 12 00 mov 0x12dfb4,%ecx
10fe4f: 29 f9 sub %edi,%ecx
block_p *block_ptr =
10fe51: 50 push %eax
10fe52: 6a 00 push $0x0
10fe54: 53 push %ebx
10fe55: 56 push %esi
10fe56: 89 4d b4 mov %ecx,-0x4c(%ebp)
10fe59: e8 64 fa ff ff call 10f8c2 <IMFS_memfile_get_block_pointer>
IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
memset( &(*block_ptr) [offset], 0, count);
10fe5e: 8b 10 mov (%eax),%edx
10fe60: 01 fa add %edi,%edx
10fe62: 31 c0 xor %eax,%eax
10fe64: 8b 4d b4 mov -0x4c(%ebp),%ecx
10fe67: 89 d7 mov %edx,%edi
10fe69: f3 aa rep stos %al,%es:(%edi)
10fe6b: 83 c4 10 add $0x10,%esp
offset = 0;
10fe6e: 31 ff xor %edi,%edi
10fe70: eb 22 jmp 10fe94 <IMFS_memfile_extend+0x11a>
}
} else {
for ( ; block>=old_blocks ; block-- ) {
IMFS_memfile_remove_block( the_jnode, block );
10fe72: 51 push %ecx <== NOT EXECUTED
10fe73: 51 push %ecx <== NOT EXECUTED
10fe74: 53 push %ebx <== NOT EXECUTED
10fe75: 56 push %esi <== NOT EXECUTED
10fe76: e8 d5 fe ff ff call 10fd50 <IMFS_memfile_remove_block><== NOT EXECUTED
memset( &(*block_ptr) [offset], 0, count);
offset = 0;
}
} else {
for ( ; block>=old_blocks ; block-- ) {
10fe7b: 4b dec %ebx <== NOT EXECUTED
10fe7c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10fe7f: 3b 5d c8 cmp -0x38(%ebp),%ebx <== NOT EXECUTED
10fe82: 73 ee jae 10fe72 <IMFS_memfile_extend+0xf8><== NOT EXECUTED
IMFS_memfile_remove_block( the_jnode, block );
}
rtems_set_errno_and_return_minus_one( ENOSPC );
10fe84: e8 53 10 00 00 call 110edc <__errno> <== NOT EXECUTED
10fe89: c7 00 1c 00 00 00 movl $0x1c,(%eax) <== NOT EXECUTED
10fe8f: 83 c8 ff or $0xffffffff,%eax
10fe92: eb 3a jmp 10fece <IMFS_memfile_extend+0x154>
offset = the_jnode->info.file.size - old_blocks * IMFS_MEMFILE_BYTES_PER_BLOCK;
/*
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
10fe94: 43 inc %ebx
10fe95: 3b 5d bc cmp -0x44(%ebp),%ebx
10fe98: 76 99 jbe 10fe33 <IMFS_memfile_extend+0xb9>
}
/*
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
10fe9a: 8b 45 d0 mov -0x30(%ebp),%eax
10fe9d: 8b 55 d4 mov -0x2c(%ebp),%edx
10fea0: 89 46 50 mov %eax,0x50(%esi)
10fea3: 89 56 54 mov %edx,0x54(%esi)
IMFS_update_ctime(the_jnode);
10fea6: 50 push %eax
10fea7: 50 push %eax
10fea8: 6a 00 push $0x0
10feaa: 8d 5d e0 lea -0x20(%ebp),%ebx
10fead: 53 push %ebx
10feae: e8 f9 68 ff ff call 1067ac <gettimeofday>
10feb3: 8b 45 e0 mov -0x20(%ebp),%eax
10feb6: 89 46 48 mov %eax,0x48(%esi)
IMFS_update_mtime(the_jnode);
10feb9: 58 pop %eax
10feba: 5a pop %edx
10febb: 6a 00 push $0x0
10febd: 53 push %ebx
10febe: e8 e9 68 ff ff call 1067ac <gettimeofday>
10fec3: 8b 45 e0 mov -0x20(%ebp),%eax
10fec6: 89 46 44 mov %eax,0x44(%esi)
return 0;
10fec9: 83 c4 10 add $0x10,%esp
/*
* Verify new file size is actually larger than current size
*/
if ( new_length <= the_jnode->info.file.size )
return 0;
10fecc: 31 c0 xor %eax,%eax
the_jnode->info.file.size = new_length;
IMFS_update_ctime(the_jnode);
IMFS_update_mtime(the_jnode);
return 0;
}
10fece: 8d 65 f4 lea -0xc(%ebp),%esp
10fed1: 5b pop %ebx
10fed2: 5e pop %esi
10fed3: 5f pop %edi
10fed4: 5d pop %ebp
10fed5: c3 ret
0010f8c2 <IMFS_memfile_get_block_pointer>:
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
10f8c2: 55 push %ebp
10f8c3: 89 e5 mov %esp,%ebp
10f8c5: 57 push %edi
10f8c6: 56 push %esi
10f8c7: 53 push %ebx
10f8c8: 83 ec 1c sub $0x1c,%esp
10f8cb: 8b 5d 08 mov 0x8(%ebp),%ebx
10f8ce: 8b 75 0c mov 0xc(%ebp),%esi
10f8d1: 8b 7d 10 mov 0x10(%ebp),%edi
my_block = block;
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
10f8d4: 8b 0d b4 df 12 00 mov 0x12dfb4,%ecx
10f8da: c1 e9 02 shr $0x2,%ecx
10f8dd: 8d 41 ff lea -0x1(%ecx),%eax
10f8e0: 39 c6 cmp %eax,%esi
10f8e2: 77 23 ja 10f907 <IMFS_memfile_get_block_pointer+0x45>
p = info->indirect;
10f8e4: 8b 43 58 mov 0x58(%ebx),%eax
if ( malloc_it ) {
10f8e7: 85 ff test %edi,%edi
10f8e9: 74 6f je 10f95a <IMFS_memfile_get_block_pointer+0x98>
if ( !p ) {
10f8eb: 85 c0 test %eax,%eax
10f8ed: 75 13 jne 10f902 <IMFS_memfile_get_block_pointer+0x40>
p = memfile_alloc_block();
10f8ef: e8 ac ff ff ff call 10f8a0 <memfile_alloc_block>
if ( !p )
10f8f4: 85 c0 test %eax,%eax
10f8f6: 75 07 jne 10f8ff <IMFS_memfile_get_block_pointer+0x3d><== ALWAYS TAKEN
return 0;
10f8f8: 31 c0 xor %eax,%eax
10f8fa: e9 fc 00 00 00 jmp 10f9fb <IMFS_memfile_get_block_pointer+0x139><== NOT EXECUTED
info->indirect = p;
10f8ff: 89 43 58 mov %eax,0x58(%ebx)
}
return &info->indirect[ my_block ];
10f902: 8b 43 58 mov 0x58(%ebx),%eax
10f905: eb 57 jmp 10f95e <IMFS_memfile_get_block_pointer+0x9c>
/*
* Is the block number in the doubly indirect portion?
*/
if ( my_block <= LAST_DOUBLY_INDIRECT ) {
10f907: 8d 41 01 lea 0x1(%ecx),%eax
10f90a: 0f af c1 imul %ecx,%eax
10f90d: 8d 50 ff lea -0x1(%eax),%edx
10f910: 39 d6 cmp %edx,%esi
10f912: 77 52 ja 10f966 <IMFS_memfile_get_block_pointer+0xa4>
my_block -= FIRST_DOUBLY_INDIRECT;
10f914: 89 f0 mov %esi,%eax
10f916: 29 c8 sub %ecx,%eax
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
10f918: 31 d2 xor %edx,%edx
10f91a: f7 f1 div %ecx
10f91c: 89 d6 mov %edx,%esi
10f91e: 89 c1 mov %eax,%ecx
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
p = info->doubly_indirect;
10f920: 8b 43 5c mov 0x5c(%ebx),%eax
if ( malloc_it ) {
10f923: 85 ff test %edi,%edi
10f925: 74 2c je 10f953 <IMFS_memfile_get_block_pointer+0x91>
if ( !p ) {
10f927: 85 c0 test %eax,%eax
10f929: 75 12 jne 10f93d <IMFS_memfile_get_block_pointer+0x7b>
p = memfile_alloc_block();
10f92b: 89 4d e0 mov %ecx,-0x20(%ebp)
10f92e: e8 6d ff ff ff call 10f8a0 <memfile_alloc_block>
if ( !p )
10f933: 85 c0 test %eax,%eax
10f935: 8b 4d e0 mov -0x20(%ebp),%ecx
10f938: 74 be je 10f8f8 <IMFS_memfile_get_block_pointer+0x36><== NEVER TAKEN
return 0;
info->doubly_indirect = p;
10f93a: 89 43 5c mov %eax,0x5c(%ebx)
}
p1 = (block_p *)p[ doubly ];
10f93d: 8d 1c 88 lea (%eax,%ecx,4),%ebx
10f940: 8b 03 mov (%ebx),%eax
if ( !p1 ) {
10f942: 85 c0 test %eax,%eax
10f944: 75 18 jne 10f95e <IMFS_memfile_get_block_pointer+0x9c>
p1 = memfile_alloc_block();
10f946: e8 55 ff ff ff call 10f8a0 <memfile_alloc_block>
if ( !p1 )
10f94b: 85 c0 test %eax,%eax
10f94d: 74 a9 je 10f8f8 <IMFS_memfile_get_block_pointer+0x36><== NEVER TAKEN
return 0;
p[ doubly ] = (block_p) p1;
10f94f: 89 03 mov %eax,(%ebx)
10f951: eb 0b jmp 10f95e <IMFS_memfile_get_block_pointer+0x9c>
}
return (block_p *)&p1[ singly ];
}
if ( !p )
10f953: 85 c0 test %eax,%eax
10f955: 74 a1 je 10f8f8 <IMFS_memfile_get_block_pointer+0x36><== NEVER TAKEN
return 0;
p = (block_p *)p[ doubly ];
10f957: 8b 04 88 mov (%eax,%ecx,4),%eax
if ( !p )
10f95a: 85 c0 test %eax,%eax
10f95c: 74 9a je 10f8f8 <IMFS_memfile_get_block_pointer+0x36><== NEVER TAKEN
return 0;
return (block_p *)&p[ singly ];
10f95e: 8d 04 b0 lea (%eax,%esi,4),%eax
10f961: e9 95 00 00 00 jmp 10f9fb <IMFS_memfile_get_block_pointer+0x139>
}
/*
* Is the block number in the triply indirect portion?
*/
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
10f966: 8d 50 01 lea 0x1(%eax),%edx
10f969: 0f af d1 imul %ecx,%edx
10f96c: 4a dec %edx
10f96d: 39 d6 cmp %edx,%esi
10f96f: 77 87 ja 10f8f8 <IMFS_memfile_get_block_pointer+0x36><== NEVER TAKEN
my_block -= FIRST_TRIPLY_INDIRECT;
10f971: 29 c6 sub %eax,%esi
10f973: 89 f0 mov %esi,%eax
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
10f975: 31 d2 xor %edx,%edx
10f977: f7 f1 div %ecx
10f979: 89 55 e4 mov %edx,-0x1c(%ebp)
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
10f97c: 31 d2 xor %edx,%edx
10f97e: f7 f1 div %ecx
10f980: 89 d6 mov %edx,%esi
10f982: 89 c1 mov %eax,%ecx
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
p = info->triply_indirect;
10f984: 8b 43 60 mov 0x60(%ebx),%eax
if ( malloc_it ) {
10f987: 85 ff test %edi,%edi
10f989: 74 4c je 10f9d7 <IMFS_memfile_get_block_pointer+0x115>
if ( !p ) {
10f98b: 85 c0 test %eax,%eax
10f98d: 75 16 jne 10f9a5 <IMFS_memfile_get_block_pointer+0xe3>
p = memfile_alloc_block();
10f98f: 89 4d e0 mov %ecx,-0x20(%ebp)
10f992: e8 09 ff ff ff call 10f8a0 <memfile_alloc_block>
if ( !p )
10f997: 85 c0 test %eax,%eax
10f999: 8b 4d e0 mov -0x20(%ebp),%ecx
10f99c: 0f 84 56 ff ff ff je 10f8f8 <IMFS_memfile_get_block_pointer+0x36><== NEVER TAKEN
return 0;
info->triply_indirect = p;
10f9a2: 89 43 60 mov %eax,0x60(%ebx)
}
p1 = (block_p *) p[ triply ];
10f9a5: 8d 1c 88 lea (%eax,%ecx,4),%ebx
10f9a8: 8b 03 mov (%ebx),%eax
if ( !p1 ) {
10f9aa: 85 c0 test %eax,%eax
10f9ac: 75 0f jne 10f9bd <IMFS_memfile_get_block_pointer+0xfb>
p1 = memfile_alloc_block();
10f9ae: e8 ed fe ff ff call 10f8a0 <memfile_alloc_block>
if ( !p1 )
10f9b3: 85 c0 test %eax,%eax
10f9b5: 0f 84 3d ff ff ff je 10f8f8 <IMFS_memfile_get_block_pointer+0x36><== NEVER TAKEN
return 0;
p[ triply ] = (block_p) p1;
10f9bb: 89 03 mov %eax,(%ebx)
}
p2 = (block_p *)p1[ doubly ];
10f9bd: 8d 1c b0 lea (%eax,%esi,4),%ebx
10f9c0: 8b 03 mov (%ebx),%eax
if ( !p2 ) {
10f9c2: 85 c0 test %eax,%eax
10f9c4: 75 2f jne 10f9f5 <IMFS_memfile_get_block_pointer+0x133><== NEVER TAKEN
p2 = memfile_alloc_block();
10f9c6: e8 d5 fe ff ff call 10f8a0 <memfile_alloc_block>
if ( !p2 )
10f9cb: 85 c0 test %eax,%eax
10f9cd: 0f 84 25 ff ff ff je 10f8f8 <IMFS_memfile_get_block_pointer+0x36><== NEVER TAKEN
return 0;
p1[ doubly ] = (block_p) p2;
10f9d3: 89 03 mov %eax,(%ebx)
10f9d5: eb 1e jmp 10f9f5 <IMFS_memfile_get_block_pointer+0x133>
}
return (block_p *)&p2[ singly ];
}
if ( !p )
10f9d7: 85 c0 test %eax,%eax
10f9d9: 0f 84 19 ff ff ff je 10f8f8 <IMFS_memfile_get_block_pointer+0x36><== NEVER TAKEN
return 0;
p1 = (block_p *) p[ triply ];
10f9df: 8b 04 88 mov (%eax,%ecx,4),%eax
if ( !p1 )
10f9e2: 85 c0 test %eax,%eax
10f9e4: 0f 84 0e ff ff ff je 10f8f8 <IMFS_memfile_get_block_pointer+0x36><== NEVER TAKEN
return 0;
p2 = (block_p *)p1[ doubly ];
10f9ea: 8b 04 90 mov (%eax,%edx,4),%eax
if ( !p2 )
10f9ed: 85 c0 test %eax,%eax
10f9ef: 0f 84 03 ff ff ff je 10f8f8 <IMFS_memfile_get_block_pointer+0x36><== NEVER TAKEN
return 0;
return (block_p *)&p2[ singly ];
10f9f5: 8b 55 e4 mov -0x1c(%ebp),%edx
10f9f8: 8d 04 90 lea (%eax,%edx,4),%eax
/*
* This means the requested block number is out of range.
*/
return 0;
}
10f9fb: 83 c4 1c add $0x1c,%esp
10f9fe: 5b pop %ebx
10f9ff: 5e pop %esi
10fa00: 5f pop %edi
10fa01: 5d pop %ebp
10fa02: c3 ret
0010fa03 <IMFS_memfile_read>:
IMFS_jnode_t *the_jnode,
off_t start,
unsigned char *destination,
unsigned int length
)
{
10fa03: 55 push %ebp
10fa04: 89 e5 mov %esp,%ebp
10fa06: 57 push %edi
10fa07: 56 push %esi
10fa08: 53 push %ebx
10fa09: 83 ec 3c sub $0x3c,%esp
10fa0c: 8b 45 0c mov 0xc(%ebp),%eax
10fa0f: 8b 55 10 mov 0x10(%ebp),%edx
10fa12: 89 45 c8 mov %eax,-0x38(%ebp)
10fa15: 89 55 cc mov %edx,-0x34(%ebp)
rtems_chain_extract_unprotected( &node->Node );
}
static inline IMFS_jnode_types_t IMFS_type( const IMFS_jnode_t *node )
{
return node->control->imfs_type;
10fa18: 8b 55 08 mov 0x8(%ebp),%edx
10fa1b: 8b 42 4c mov 0x4c(%edx),%eax
* Linear files (as created from a tar file are easier to handle
* than block files).
*/
my_length = length;
if ( IMFS_type( the_jnode ) == IMFS_LINEAR_FILE ) {
10fa1e: 83 38 05 cmpl $0x5,(%eax)
10fa21: 75 39 jne 10fa5c <IMFS_memfile_read+0x59>
unsigned char *file_ptr;
file_ptr = (unsigned char *)the_jnode->info.linearfile.direct;
10fa23: 8b 72 58 mov 0x58(%edx),%esi
if (my_length > (the_jnode->info.linearfile.size - start))
10fa26: 8b 42 50 mov 0x50(%edx),%eax
10fa29: 8b 52 54 mov 0x54(%edx),%edx
10fa2c: 89 c1 mov %eax,%ecx
10fa2e: 89 d3 mov %edx,%ebx
10fa30: 2b 4d c8 sub -0x38(%ebp),%ecx
10fa33: 1b 5d cc sbb -0x34(%ebp),%ebx
10fa36: 31 ff xor %edi,%edi
10fa38: 39 df cmp %ebx,%edi
10fa3a: 7c 0e jl 10fa4a <IMFS_memfile_read+0x47><== NEVER TAKEN
10fa3c: 7f 05 jg 10fa43 <IMFS_memfile_read+0x40><== NEVER TAKEN
10fa3e: 39 4d 18 cmp %ecx,0x18(%ebp)
10fa41: 76 07 jbe 10fa4a <IMFS_memfile_read+0x47><== NEVER TAKEN
my_length = the_jnode->info.linearfile.size - start;
10fa43: 89 c3 mov %eax,%ebx
10fa45: 2b 5d c8 sub -0x38(%ebp),%ebx
10fa48: eb 03 jmp 10fa4d <IMFS_memfile_read+0x4a>
/*
* Linear files (as created from a tar file are easier to handle
* than block files).
*/
my_length = length;
10fa4a: 8b 5d 18 mov 0x18(%ebp),%ebx <== NOT EXECUTED
file_ptr = (unsigned char *)the_jnode->info.linearfile.direct;
if (my_length > (the_jnode->info.linearfile.size - start))
my_length = the_jnode->info.linearfile.size - start;
memcpy(dest, &file_ptr[start], my_length);
10fa4d: 03 75 c8 add -0x38(%ebp),%esi
10fa50: 8b 7d 14 mov 0x14(%ebp),%edi
10fa53: 89 d9 mov %ebx,%ecx
10fa55: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
10fa57: e9 1d 01 00 00 jmp 10fb79 <IMFS_memfile_read+0x176>
/*
* 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;
10fa5c: 8b 45 c8 mov -0x38(%ebp),%eax
if ( last_byte > the_jnode->info.file.size )
10fa5f: 8b 55 08 mov 0x8(%ebp),%edx
10fa62: 8b 5a 50 mov 0x50(%edx),%ebx
/*
* 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;
10fa65: 8b 55 18 mov 0x18(%ebp),%edx
10fa68: 01 c2 add %eax,%edx
if ( last_byte > the_jnode->info.file.size )
10fa6a: 31 c9 xor %ecx,%ecx
10fa6c: 8b 75 08 mov 0x8(%ebp),%esi
10fa6f: 3b 4e 54 cmp 0x54(%esi),%ecx
10fa72: 7c 0d jl 10fa81 <IMFS_memfile_read+0x7e><== NEVER TAKEN
10fa74: 7f 04 jg 10fa7a <IMFS_memfile_read+0x77><== NEVER TAKEN
10fa76: 39 da cmp %ebx,%edx
10fa78: 76 07 jbe 10fa81 <IMFS_memfile_read+0x7e>
my_length = the_jnode->info.file.size - start;
10fa7a: 29 c3 sub %eax,%ebx
10fa7c: 89 5d d4 mov %ebx,-0x2c(%ebp)
10fa7f: eb 06 jmp 10fa87 <IMFS_memfile_read+0x84>
/*
* Linear files (as created from a tar file are easier to handle
* than block files).
*/
my_length = length;
10fa81: 8b 45 18 mov 0x18(%ebp),%eax
10fa84: 89 45 d4 mov %eax,-0x2c(%ebp)
*/
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
10fa87: 8b 0d b4 df 12 00 mov 0x12dfb4,%ecx
10fa8d: 89 cb mov %ecx,%ebx
10fa8f: 89 ce mov %ecx,%esi
10fa91: c1 fe 1f sar $0x1f,%esi
10fa94: 56 push %esi
10fa95: 51 push %ecx
10fa96: ff 75 cc pushl -0x34(%ebp)
10fa99: ff 75 c8 pushl -0x38(%ebp)
10fa9c: 89 4d c0 mov %ecx,-0x40(%ebp)
10fa9f: e8 38 d8 00 00 call 11d2dc <__moddi3>
10faa4: 83 c4 10 add $0x10,%esp
10faa7: 89 c7 mov %eax,%edi
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
10faa9: 56 push %esi
10faaa: 53 push %ebx
10faab: ff 75 cc pushl -0x34(%ebp)
10faae: ff 75 c8 pushl -0x38(%ebp)
10fab1: e8 d2 d6 00 00 call 11d188 <__divdi3>
10fab6: 83 c4 10 add $0x10,%esp
10fab9: 89 c2 mov %eax,%edx
if ( start_offset ) {
10fabb: 85 ff test %edi,%edi
10fabd: 8b 4d c0 mov -0x40(%ebp),%ecx
10fac0: 74 39 je 10fafb <IMFS_memfile_read+0xf8>
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
10fac2: 29 f9 sub %edi,%ecx
10fac4: 8b 5d d4 mov -0x2c(%ebp),%ebx
10fac7: 39 cb cmp %ecx,%ebx
10fac9: 76 02 jbe 10facd <IMFS_memfile_read+0xca>
10facb: 89 cb mov %ecx,%ebx
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
10facd: 50 push %eax
10face: 6a 00 push $0x0
10fad0: 52 push %edx
10fad1: ff 75 08 pushl 0x8(%ebp)
10fad4: 89 55 c0 mov %edx,-0x40(%ebp)
10fad7: e8 e6 fd ff ff call 10f8c2 <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
10fadc: 83 c4 10 add $0x10,%esp
10fadf: 85 c0 test %eax,%eax
10fae1: 8b 55 c0 mov -0x40(%ebp),%edx
10fae4: 0f 84 ac 00 00 00 je 10fb96 <IMFS_memfile_read+0x193><== NEVER TAKEN
return copied;
memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
10faea: 8b 30 mov (%eax),%esi
10faec: 01 fe add %edi,%esi
dest += to_copy;
10faee: 8b 7d 14 mov 0x14(%ebp),%edi
10faf1: 89 d9 mov %ebx,%ecx
10faf3: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
block++;
10faf5: 42 inc %edx
my_length -= to_copy;
10faf6: 29 5d d4 sub %ebx,-0x2c(%ebp)
10faf9: eb 05 jmp 10fb00 <IMFS_memfile_read+0xfd>
unsigned int last_byte;
unsigned int copied;
unsigned int start_offset;
unsigned char *dest;
dest = destination;
10fafb: 8b 7d 14 mov 0x14(%ebp),%edi
*/
last_byte = start + length;
if ( last_byte > the_jnode->info.file.size )
my_length = the_jnode->info.file.size - start;
copied = 0;
10fafe: 31 db xor %ebx,%ebx
}
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
10fb00: 8b 0d b4 df 12 00 mov 0x12dfb4,%ecx
10fb06: 89 4d c8 mov %ecx,-0x38(%ebp)
* is considered an error. Read from an offset for more bytes than
* are between the offset and the end of the file will result in
* reading the data between offset and the end of the file (truncated
* read).
*/
MEMFILE_STATIC ssize_t IMFS_memfile_read(
10fb09: 29 df sub %ebx,%edi
10fb0b: 89 7d c4 mov %edi,-0x3c(%ebp)
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
10fb0e: eb 2e jmp 10fb3e <IMFS_memfile_read+0x13b>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
10fb10: 56 push %esi
10fb11: 6a 00 push $0x0
10fb13: 52 push %edx
10fb14: ff 75 08 pushl 0x8(%ebp)
10fb17: 89 55 c0 mov %edx,-0x40(%ebp)
10fb1a: e8 a3 fd ff ff call 10f8c2 <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
10fb1f: 83 c4 10 add $0x10,%esp
10fb22: 85 c0 test %eax,%eax
10fb24: 8b 55 c0 mov -0x40(%ebp),%edx
10fb27: 75 02 jne 10fb2b <IMFS_memfile_read+0x128><== ALWAYS TAKEN
10fb29: eb 3d jmp 10fb68 <IMFS_memfile_read+0x165><== NOT EXECUTED
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
10fb2b: 8b 30 mov (%eax),%esi
10fb2d: 8b 7d d0 mov -0x30(%ebp),%edi
10fb30: 8b 4d c8 mov -0x38(%ebp),%ecx
10fb33: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
dest += to_copy;
block++;
10fb35: 42 inc %edx
my_length -= to_copy;
10fb36: 8b 4d c8 mov -0x38(%ebp),%ecx
10fb39: 29 4d d4 sub %ecx,-0x2c(%ebp)
copied += to_copy;
10fb3c: 01 cb add %ecx,%ebx
* is considered an error. Read from an offset for more bytes than
* are between the offset and the end of the file will result in
* reading the data between offset and the end of the file (truncated
* read).
*/
MEMFILE_STATIC ssize_t IMFS_memfile_read(
10fb3e: 8b 75 c4 mov -0x3c(%ebp),%esi
10fb41: 01 de add %ebx,%esi
10fb43: 89 75 d0 mov %esi,-0x30(%ebp)
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
10fb46: 8b 4d d4 mov -0x2c(%ebp),%ecx
10fb49: 3b 0d b4 df 12 00 cmp 0x12dfb4,%ecx
10fb4f: 73 bf jae 10fb10 <IMFS_memfile_read+0x10d>
/*
* Phase 3: possibly the first part of one block
*/
IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
if ( my_length ) {
10fb51: 85 c9 test %ecx,%ecx
10fb53: 74 24 je 10fb79 <IMFS_memfile_read+0x176>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
10fb55: 51 push %ecx
10fb56: 6a 00 push $0x0
10fb58: 52 push %edx
10fb59: ff 75 08 pushl 0x8(%ebp)
10fb5c: e8 61 fd ff ff call 10f8c2 <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
10fb61: 83 c4 10 add $0x10,%esp
10fb64: 85 c0 test %eax,%eax
10fb66: 75 04 jne 10fb6c <IMFS_memfile_read+0x169><== ALWAYS TAKEN
return copied;
10fb68: 89 d8 mov %ebx,%eax <== NOT EXECUTED
10fb6a: eb 2c jmp 10fb98 <IMFS_memfile_read+0x195><== NOT EXECUTED
memcpy( dest, &(*block_ptr)[ 0 ], my_length );
10fb6c: 8b 30 mov (%eax),%esi
10fb6e: 8b 7d d0 mov -0x30(%ebp),%edi
10fb71: 8b 4d d4 mov -0x2c(%ebp),%ecx
10fb74: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
copied += my_length;
10fb76: 03 5d d4 add -0x2c(%ebp),%ebx
}
IMFS_update_atime( the_jnode );
10fb79: 50 push %eax
10fb7a: 50 push %eax
10fb7b: 6a 00 push $0x0
10fb7d: 8d 45 e0 lea -0x20(%ebp),%eax
10fb80: 50 push %eax
10fb81: e8 26 6c ff ff call 1067ac <gettimeofday>
10fb86: 8b 45 e0 mov -0x20(%ebp),%eax
10fb89: 8b 75 08 mov 0x8(%ebp),%esi
10fb8c: 89 46 40 mov %eax,0x40(%esi)
return copied;
10fb8f: 89 d8 mov %ebx,%eax
10fb91: 83 c4 10 add $0x10,%esp
10fb94: eb 02 jmp 10fb98 <IMFS_memfile_read+0x195>
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
10fb96: 31 c0 xor %eax,%eax
}
IMFS_update_atime( the_jnode );
return copied;
}
10fb98: 8d 65 f4 lea -0xc(%ebp),%esp
10fb9b: 5b pop %ebx
10fb9c: 5e pop %esi
10fb9d: 5f pop %edi
10fb9e: 5d pop %ebp
10fb9f: c3 ret
0010fc7c <IMFS_memfile_remove>:
* is better to stick to simple, easy to understand algorithms.
*/
IMFS_jnode_t *IMFS_memfile_remove(
IMFS_jnode_t *the_jnode
)
{
10fc7c: 55 push %ebp
10fc7d: 89 e5 mov %esp,%ebp
10fc7f: 57 push %edi
10fc80: 56 push %esi
10fc81: 53 push %ebx
10fc82: 83 ec 1c sub $0x1c,%esp
10fc85: 8b 5d 08 mov 0x8(%ebp),%ebx
/*
* 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;
10fc88: 8b 35 b4 df 12 00 mov 0x12dfb4,%esi
10fc8e: c1 ee 02 shr $0x2,%esi
* + doubly indirect
* + triply indirect
*/
info = &the_jnode->info.file;
if ( info->indirect ) {
10fc91: 83 7b 58 00 cmpl $0x0,0x58(%ebx)
10fc95: 74 0a je 10fca1 <IMFS_memfile_remove+0x25>
memfile_free_blocks_in_table( &info->indirect, to_free );
10fc97: 8d 43 58 lea 0x58(%ebx),%eax
10fc9a: 89 f2 mov %esi,%edx
10fc9c: e8 8a ff ff ff call 10fc2b <memfile_free_blocks_in_table>
}
if ( info->doubly_indirect ) {
10fca1: 31 ff xor %edi,%edi
10fca3: 83 7b 5c 00 cmpl $0x0,0x5c(%ebx)
10fca7: 75 15 jne 10fcbe <IMFS_memfile_remove+0x42>
10fca9: eb 29 jmp 10fcd4 <IMFS_memfile_remove+0x58>
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
if ( info->doubly_indirect[i] ) {
10fcab: 8b 43 5c mov 0x5c(%ebx),%eax
10fcae: 8d 04 b8 lea (%eax,%edi,4),%eax
10fcb1: 83 38 00 cmpl $0x0,(%eax)
10fcb4: 74 07 je 10fcbd <IMFS_memfile_remove+0x41><== NEVER TAKEN
memfile_free_blocks_in_table(
10fcb6: 89 f2 mov %esi,%edx
10fcb8: e8 6e ff ff ff call 10fc2b <memfile_free_blocks_in_table>
if ( info->indirect ) {
memfile_free_blocks_in_table( &info->indirect, to_free );
}
if ( info->doubly_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
10fcbd: 47 inc %edi
10fcbe: a1 b4 df 12 00 mov 0x12dfb4,%eax
10fcc3: c1 e8 02 shr $0x2,%eax
10fcc6: 39 c7 cmp %eax,%edi
10fcc8: 72 e1 jb 10fcab <IMFS_memfile_remove+0x2f>
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 );
10fcca: 8d 43 5c lea 0x5c(%ebx),%eax
10fccd: 89 f2 mov %esi,%edx
10fccf: e8 57 ff ff ff call 10fc2b <memfile_free_blocks_in_table>
}
if ( info->triply_indirect ) {
10fcd4: 31 ff xor %edi,%edi
10fcd6: 83 7b 60 00 cmpl $0x0,0x60(%ebx)
10fcda: 75 54 jne 10fd30 <IMFS_memfile_remove+0xb4>
10fcdc: eb 68 jmp 10fd46 <IMFS_memfile_remove+0xca>
* a significant difference in the performance of this routine.
*
* Regardless until the IMFS implementation is proven, it
* is better to stick to simple, easy to understand algorithms.
*/
IMFS_jnode_t *IMFS_memfile_remove(
10fcde: 8d 04 bd 00 00 00 00 lea 0x0(,%edi,4),%eax
10fce5: 89 45 e0 mov %eax,-0x20(%ebp)
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
p = (block_p *) info->triply_indirect[i];
10fce8: 8b 43 60 mov 0x60(%ebx),%eax
10fceb: 8b 0c b8 mov (%eax,%edi,4),%ecx
if ( !p ) /* ensure we have a valid pointer */
10fcee: 85 c9 test %ecx,%ecx
10fcf0: 74 4a je 10fd3c <IMFS_memfile_remove+0xc0><== NEVER TAKEN
10fcf2: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
10fcf9: eb 1a jmp 10fd15 <IMFS_memfile_remove+0x99>
break;
for ( j=0 ; j<IMFS_MEMFILE_BLOCK_SLOTS ; j++ ) {
if ( p[j] ) {
10fcfb: 83 39 00 cmpl $0x0,(%ecx)
10fcfe: 74 0f je 10fd0f <IMFS_memfile_remove+0x93><== NEVER TAKEN
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
10fd00: 89 f2 mov %esi,%edx
10fd02: 89 c8 mov %ecx,%eax
10fd04: 89 4d dc mov %ecx,-0x24(%ebp)
10fd07: e8 1f ff ff ff call 10fc2b <memfile_free_blocks_in_table>
10fd0c: 8b 4d dc mov -0x24(%ebp),%ecx
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
p = (block_p *) info->triply_indirect[i];
if ( !p ) /* ensure we have a valid pointer */
break;
for ( j=0 ; j<IMFS_MEMFILE_BLOCK_SLOTS ; j++ ) {
10fd0f: ff 45 e4 incl -0x1c(%ebp)
10fd12: 83 c1 04 add $0x4,%ecx
10fd15: a1 b4 df 12 00 mov 0x12dfb4,%eax
10fd1a: c1 e8 02 shr $0x2,%eax
10fd1d: 39 45 e4 cmp %eax,-0x1c(%ebp)
10fd20: 72 d9 jb 10fcfb <IMFS_memfile_remove+0x7f>
if ( p[j] ) {
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
}
}
memfile_free_blocks_in_table(
10fd22: 8b 45 e0 mov -0x20(%ebp),%eax
10fd25: 03 43 60 add 0x60(%ebx),%eax
10fd28: 89 f2 mov %esi,%edx
10fd2a: e8 fc fe ff ff call 10fc2b <memfile_free_blocks_in_table>
memfile_free_blocks_in_table( &info->doubly_indirect, to_free );
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
10fd2f: 47 inc %edi
10fd30: a1 b4 df 12 00 mov 0x12dfb4,%eax
10fd35: c1 e8 02 shr $0x2,%eax
10fd38: 39 c7 cmp %eax,%edi
10fd3a: 72 a2 jb 10fcde <IMFS_memfile_remove+0x62>
}
memfile_free_blocks_in_table(
(block_p **)&info->triply_indirect[i], to_free );
}
memfile_free_blocks_in_table(
(block_p **)&info->triply_indirect, to_free );
10fd3c: 8d 43 60 lea 0x60(%ebx),%eax
}
}
memfile_free_blocks_in_table(
(block_p **)&info->triply_indirect[i], to_free );
}
memfile_free_blocks_in_table(
10fd3f: 89 f2 mov %esi,%edx
10fd41: e8 e5 fe ff ff call 10fc2b <memfile_free_blocks_in_table>
(block_p **)&info->triply_indirect, to_free );
}
return the_jnode;
}
10fd46: 89 d8 mov %ebx,%eax
10fd48: 83 c4 1c add $0x1c,%esp
10fd4b: 5b pop %ebx
10fd4c: 5e pop %esi
10fd4d: 5f pop %edi
10fd4e: 5d pop %ebp
10fd4f: c3 ret
0010fd50 <IMFS_memfile_remove_block>:
*/
MEMFILE_STATIC int IMFS_memfile_remove_block(
IMFS_jnode_t *the_jnode,
unsigned int block
)
{
10fd50: 55 push %ebp <== NOT EXECUTED
10fd51: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10fd53: 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 );
10fd56: 6a 00 push $0x0 <== NOT EXECUTED
10fd58: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
10fd5b: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
10fd5e: e8 5f fb ff ff call 10f8c2 <IMFS_memfile_get_block_pointer><== NOT EXECUTED
IMFS_assert( block_ptr );
ptr = *block_ptr;
10fd63: 8b 10 mov (%eax),%edx <== NOT EXECUTED
*block_ptr = 0;
10fd65: c7 00 00 00 00 00 movl $0x0,(%eax) <== NOT EXECUTED
memfile_free_block( ptr );
10fd6b: 89 14 24 mov %edx,(%esp) <== NOT EXECUTED
10fd6e: e8 9f fe ff ff call 10fc12 <memfile_free_block> <== NOT EXECUTED
return 1;
}
10fd73: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
10fd78: c9 leave <== NOT EXECUTED
10fd79: c3 ret <== NOT EXECUTED
0010fed6 <IMFS_memfile_write>:
IMFS_jnode_t *the_jnode,
off_t start,
const unsigned char *source,
unsigned int length
)
{
10fed6: 55 push %ebp
10fed7: 89 e5 mov %esp,%ebp
10fed9: 57 push %edi
10feda: 56 push %esi
10fedb: 53 push %ebx
10fedc: 83 ec 3c sub $0x3c,%esp
10fedf: 8b 45 0c mov 0xc(%ebp),%eax
10fee2: 8b 55 10 mov 0x10(%ebp),%edx
10fee5: 89 45 c8 mov %eax,-0x38(%ebp)
10fee8: 89 55 cc mov %edx,-0x34(%ebp)
/*
* If the last byte we are supposed to write is past the end of this
* in memory file, then extend the length.
*/
last_byte = start + my_length;
10feeb: 8b 75 18 mov 0x18(%ebp),%esi
10feee: 01 c6 add %eax,%esi
if ( last_byte > the_jnode->info.file.size ) {
10fef0: 89 f0 mov %esi,%eax
10fef2: 31 d2 xor %edx,%edx
10fef4: 8b 5d 08 mov 0x8(%ebp),%ebx
10fef7: 8b 4b 50 mov 0x50(%ebx),%ecx
10fefa: 8b 5b 54 mov 0x54(%ebx),%ebx
10fefd: 39 da cmp %ebx,%edx
10feff: 7f 4e jg 10ff4f <IMFS_memfile_write+0x79><== NEVER TAKEN
10ff01: 7c 04 jl 10ff07 <IMFS_memfile_write+0x31><== NEVER TAKEN
10ff03: 39 ce cmp %ecx,%esi
10ff05: 77 48 ja 10ff4f <IMFS_memfile_write+0x79>
*/
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
10ff07: 8b 0d b4 df 12 00 mov 0x12dfb4,%ecx
10ff0d: 89 cb mov %ecx,%ebx
10ff0f: 89 ce mov %ecx,%esi
10ff11: c1 fe 1f sar $0x1f,%esi
10ff14: 56 push %esi
10ff15: 51 push %ecx
10ff16: ff 75 cc pushl -0x34(%ebp)
10ff19: ff 75 c8 pushl -0x38(%ebp)
10ff1c: 89 4d c4 mov %ecx,-0x3c(%ebp)
10ff1f: e8 b8 d3 00 00 call 11d2dc <__moddi3>
10ff24: 83 c4 10 add $0x10,%esp
10ff27: 89 c7 mov %eax,%edi
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
10ff29: 56 push %esi
10ff2a: 53 push %ebx
10ff2b: ff 75 cc pushl -0x34(%ebp)
10ff2e: ff 75 c8 pushl -0x38(%ebp)
10ff31: e8 52 d2 00 00 call 11d188 <__divdi3>
10ff36: 83 c4 10 add $0x10,%esp
10ff39: 89 c2 mov %eax,%edx
if ( start_offset ) {
10ff3b: 85 ff test %edi,%edi
10ff3d: 8b 4d c4 mov -0x3c(%ebp),%ecx
10ff40: 75 37 jne 10ff79 <IMFS_memfile_write+0xa3>
unsigned int last_byte;
unsigned int start_offset;
int copied;
const unsigned char *src;
src = source;
10ff42: 8b 75 14 mov 0x14(%ebp),%esi
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
if ( start_offset ) {
10ff45: 8b 5d 18 mov 0x18(%ebp),%ebx
10ff48: 89 5d d4 mov %ebx,-0x2c(%ebp)
status = IMFS_memfile_extend( the_jnode, zero_fill, last_byte );
if ( status )
return status;
}
copied = 0;
10ff4b: 31 db xor %ebx,%ebx
10ff4d: eb 69 jmp 10ffb8 <IMFS_memfile_write+0xe2>
last_byte = start + my_length;
if ( last_byte > the_jnode->info.file.size ) {
bool zero_fill = start > the_jnode->info.file.size;
status = IMFS_memfile_extend( the_jnode, zero_fill, last_byte );
10ff4f: 52 push %edx
10ff50: 50 push %eax
* in memory file, then extend the length.
*/
last_byte = start + my_length;
if ( last_byte > the_jnode->info.file.size ) {
bool zero_fill = start > the_jnode->info.file.size;
10ff51: b8 01 00 00 00 mov $0x1,%eax
10ff56: 39 5d cc cmp %ebx,-0x34(%ebp)
10ff59: 7f 09 jg 10ff64 <IMFS_memfile_write+0x8e><== NEVER TAKEN
10ff5b: 7c 05 jl 10ff62 <IMFS_memfile_write+0x8c><== NEVER TAKEN
10ff5d: 39 4d c8 cmp %ecx,-0x38(%ebp)
10ff60: 77 02 ja 10ff64 <IMFS_memfile_write+0x8e>
10ff62: 31 c0 xor %eax,%eax
status = IMFS_memfile_extend( the_jnode, zero_fill, last_byte );
10ff64: 50 push %eax
10ff65: ff 75 08 pushl 0x8(%ebp)
10ff68: e8 0d fe ff ff call 10fd7a <IMFS_memfile_extend>
if ( status )
10ff6d: 83 c4 10 add $0x10,%esp
10ff70: 85 c0 test %eax,%eax
10ff72: 74 93 je 10ff07 <IMFS_memfile_write+0x31>
10ff74: e9 d0 00 00 00 jmp 110049 <IMFS_memfile_write+0x173>
10ff79: 89 cb mov %ecx,%ebx
10ff7b: 29 fb sub %edi,%ebx
10ff7d: 3b 5d 18 cmp 0x18(%ebp),%ebx
10ff80: 76 03 jbe 10ff85 <IMFS_memfile_write+0xaf>
10ff82: 8b 5d 18 mov 0x18(%ebp),%ebx
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
if ( start_offset ) {
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 );
10ff85: 50 push %eax
10ff86: 6a 00 push $0x0
10ff88: 52 push %edx
10ff89: ff 75 08 pushl 0x8(%ebp)
10ff8c: 89 55 c4 mov %edx,-0x3c(%ebp)
10ff8f: e8 2e f9 ff ff call 10f8c2 <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
10ff94: 83 c4 10 add $0x10,%esp
10ff97: 85 c0 test %eax,%eax
10ff99: 8b 55 c4 mov -0x3c(%ebp),%edx
10ff9c: 0f 84 a1 00 00 00 je 110043 <IMFS_memfile_write+0x16d><== NEVER TAKEN
block,
to_copy,
src
);
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
10ffa2: 8b 00 mov (%eax),%eax
10ffa4: 01 f8 add %edi,%eax
src += to_copy;
10ffa6: 89 c7 mov %eax,%edi
10ffa8: 8b 75 14 mov 0x14(%ebp),%esi
10ffab: 89 d9 mov %ebx,%ecx
10ffad: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
block++;
10ffaf: 42 inc %edx
my_length -= to_copy;
10ffb0: 8b 7d 18 mov 0x18(%ebp),%edi
10ffb3: 29 df sub %ebx,%edi
10ffb5: 89 7d d4 mov %edi,-0x2c(%ebp)
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
10ffb8: a1 b4 df 12 00 mov 0x12dfb4,%eax
10ffbd: 89 45 c8 mov %eax,-0x38(%ebp)
* IMFS_memfile_write
*
* This routine writes the specified data buffer into the in memory
* file pointed to by the_jnode. The file is extended as needed.
*/
MEMFILE_STATIC ssize_t IMFS_memfile_write(
10ffc0: 29 de sub %ebx,%esi
10ffc2: 89 75 d0 mov %esi,-0x30(%ebp)
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
10ffc5: eb 2b jmp 10fff2 <IMFS_memfile_write+0x11c>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
10ffc7: 50 push %eax
10ffc8: 6a 00 push $0x0
10ffca: 52 push %edx
10ffcb: ff 75 08 pushl 0x8(%ebp)
10ffce: 89 55 c4 mov %edx,-0x3c(%ebp)
10ffd1: e8 ec f8 ff ff call 10f8c2 <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
10ffd6: 83 c4 10 add $0x10,%esp
10ffd9: 85 c0 test %eax,%eax
10ffdb: 8b 55 c4 mov -0x3c(%ebp),%edx
10ffde: 74 67 je 110047 <IMFS_memfile_write+0x171><== NEVER TAKEN
return copied;
#if 0
fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ 0 ], src, to_copy );
10ffe0: 8b 00 mov (%eax),%eax
10ffe2: 89 c7 mov %eax,%edi
10ffe4: 8b 4d c8 mov -0x38(%ebp),%ecx
10ffe7: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
src += to_copy;
block++;
10ffe9: 42 inc %edx
my_length -= to_copy;
10ffea: 8b 7d c8 mov -0x38(%ebp),%edi
10ffed: 29 7d d4 sub %edi,-0x2c(%ebp)
* IMFS_memfile_write
*
* This routine writes the specified data buffer into the in memory
* file pointed to by the_jnode. The file is extended as needed.
*/
MEMFILE_STATIC ssize_t IMFS_memfile_write(
10fff0: 01 fb add %edi,%ebx
10fff2: 8b 75 d0 mov -0x30(%ebp),%esi
10fff5: 01 de add %ebx,%esi
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
10fff7: 8b 45 d4 mov -0x2c(%ebp),%eax
10fffa: 3b 05 b4 df 12 00 cmp 0x12dfb4,%eax
110000: 73 c5 jae 10ffc7 <IMFS_memfile_write+0xf1>
* Phase 3: possibly the first part of one block
*/
IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
to_copy = my_length;
if ( my_length ) {
110002: 85 c0 test %eax,%eax
110004: 74 1f je 110025 <IMFS_memfile_write+0x14f>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
110006: 50 push %eax
110007: 6a 00 push $0x0
110009: 52 push %edx
11000a: ff 75 08 pushl 0x8(%ebp)
11000d: e8 b0 f8 ff ff call 10f8c2 <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
110012: 83 c4 10 add $0x10,%esp
110015: 85 c0 test %eax,%eax
110017: 74 2e je 110047 <IMFS_memfile_write+0x171><== NEVER TAKEN
return copied;
#if 0
fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ 0 ], src, my_length );
110019: 8b 00 mov (%eax),%eax
11001b: 89 c7 mov %eax,%edi
11001d: 8b 4d d4 mov -0x2c(%ebp),%ecx
110020: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
my_length = 0;
copied += to_copy;
110022: 03 5d d4 add -0x2c(%ebp),%ebx
}
IMFS_mtime_ctime_update( the_jnode );
110025: 50 push %eax
110026: 50 push %eax
110027: 6a 00 push $0x0
110029: 8d 45 e0 lea -0x20(%ebp),%eax
11002c: 50 push %eax
11002d: e8 7a 67 ff ff call 1067ac <gettimeofday>
110032: 8b 45 e0 mov -0x20(%ebp),%eax
110035: 8b 55 08 mov 0x8(%ebp),%edx
110038: 89 42 44 mov %eax,0x44(%edx)
11003b: 89 42 48 mov %eax,0x48(%edx)
return copied;
11003e: 83 c4 10 add $0x10,%esp
110041: eb 04 jmp 110047 <IMFS_memfile_write+0x171>
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
110043: 31 c0 xor %eax,%eax
110045: eb 02 jmp 110049 <IMFS_memfile_write+0x173><== NOT EXECUTED
IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
to_copy = my_length;
if ( my_length ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
110047: 89 d8 mov %ebx,%eax
}
IMFS_mtime_ctime_update( the_jnode );
return copied;
}
110049: 8d 65 f4 lea -0xc(%ebp),%esp
11004c: 5b pop %ebx
11004d: 5e pop %esi
11004e: 5f pop %edi
11004f: 5d pop %ebp
110050: c3 ret
00106124 <IMFS_mknod>:
const char *name,
size_t namelen,
mode_t mode,
dev_t dev
)
{
106124: 55 push %ebp
106125: 89 e5 mov %esp,%ebp
106127: 57 push %edi
106128: 56 push %esi
106129: 53 push %ebx
10612a: 83 ec 2c sub $0x2c,%esp
10612d: 8b 5d 08 mov 0x8(%ebp),%ebx
106130: 8b 75 18 mov 0x18(%ebp),%esi
106133: 8b 4d 1c mov 0x1c(%ebp),%ecx
dev_t dev,
IMFS_jnode_types_t *type,
IMFS_types_union *info
)
{
if ( S_ISDIR( mode ) ) {
106136: 8b 55 14 mov 0x14(%ebp),%edx
106139: 81 e2 00 f0 00 00 and $0xf000,%edx
10613f: 81 fa 00 40 00 00 cmp $0x4000,%edx
106145: 74 30 je 106177 <IMFS_mknod+0x53>
*type = IMFS_DIRECTORY;
} else if ( S_ISREG( mode ) ) {
106147: 81 fa 00 80 00 00 cmp $0x8000,%edx
10614d: 74 2c je 10617b <IMFS_mknod+0x57>
*type = IMFS_MEMORY_FILE;
} else if ( S_ISBLK( mode ) || S_ISCHR( mode ) ) {
10614f: 8b 7d 14 mov 0x14(%ebp),%edi
106152: 81 e7 00 b0 00 00 and $0xb000,%edi
106158: 81 ff 00 20 00 00 cmp $0x2000,%edi
10615e: 75 0d jne 10616d <IMFS_mknod+0x49>
*type = IMFS_DEVICE;
rtems_filesystem_split_dev_t(
106160: 89 75 d4 mov %esi,-0x2c(%ebp)
106163: 89 4d d8 mov %ecx,-0x28(%ebp)
if ( S_ISDIR( mode ) ) {
*type = IMFS_DIRECTORY;
} else if ( S_ISREG( mode ) ) {
*type = IMFS_MEMORY_FILE;
} else if ( S_ISBLK( mode ) || S_ISCHR( mode ) ) {
*type = IMFS_DEVICE;
106166: b8 01 00 00 00 mov $0x1,%eax
10616b: eb 1a jmp 106187 <IMFS_mknod+0x63>
rtems_filesystem_split_dev_t(
dev,
info->device.major,
info->device.minor
);
} else if (S_ISFIFO( mode )) {
10616d: 81 fa 00 10 00 00 cmp $0x1000,%edx
106173: 75 12 jne 106187 <IMFS_mknod+0x63> <== NEVER TAKEN
106175: eb 0b jmp 106182 <IMFS_mknod+0x5e>
IMFS_jnode_types_t *type,
IMFS_types_union *info
)
{
if ( S_ISDIR( mode ) ) {
*type = IMFS_DIRECTORY;
106177: 31 c0 xor %eax,%eax
106179: eb 0c jmp 106187 <IMFS_mknod+0x63>
} else if ( S_ISREG( mode ) ) {
*type = IMFS_MEMORY_FILE;
10617b: b8 04 00 00 00 mov $0x4,%eax
106180: eb 05 jmp 106187 <IMFS_mknod+0x63>
dev,
info->device.major,
info->device.minor
);
} else if (S_ISFIFO( mode )) {
*type = IMFS_FIFO;
106182: b8 06 00 00 00 mov $0x6,%eax
106187: 56 push %esi
106188: 56 push %esi
IMFS_types_union info;
IMFS_jnode_t *new_node;
get_type_and_info_by_mode_and_dev( mode, dev, &type, &info );
new_node = IMFS_create_node( parentloc, type, name, namelen, mode, &info );
106189: 8d 55 d4 lea -0x2c(%ebp),%edx
10618c: 52 push %edx
10618d: ff 75 14 pushl 0x14(%ebp)
106190: ff 75 10 pushl 0x10(%ebp)
106193: ff 75 0c pushl 0xc(%ebp)
size_t namelen,
mode_t mode,
const IMFS_types_union *info
)
{
const IMFS_fs_info_t *fs_info =
106196: 8b 53 14 mov 0x14(%ebx),%edx
(const IMFS_fs_info_t *) parentloc->mt_entry->fs_info;
return IMFS_create_node_with_control(
106199: 8b 52 08 mov 0x8(%edx),%edx
10619c: ff 74 82 08 pushl 0x8(%edx,%eax,4)
1061a0: 53 push %ebx
1061a1: e8 9a 71 00 00 call 10d340 <IMFS_create_node_with_control>
if ( new_node != NULL ) {
1061a6: 83 c4 20 add $0x20,%esp
1061a9: 85 c0 test %eax,%eax
1061ab: 74 2d je 1061da <IMFS_mknod+0xb6>
IMFS_jnode_t *parent = parentloc->node_access;
1061ad: 8b 5b 08 mov 0x8(%ebx),%ebx
IMFS_update_ctime( parent );
1061b0: 50 push %eax
1061b1: 50 push %eax
1061b2: 6a 00 push $0x0
1061b4: 8d 75 cc lea -0x34(%ebp),%esi
1061b7: 56 push %esi
1061b8: e8 ef 05 00 00 call 1067ac <gettimeofday>
1061bd: 8b 45 cc mov -0x34(%ebp),%eax
1061c0: 89 43 48 mov %eax,0x48(%ebx)
IMFS_update_mtime( parent );
1061c3: 5a pop %edx
1061c4: 59 pop %ecx
1061c5: 6a 00 push $0x0
1061c7: 56 push %esi
1061c8: e8 df 05 00 00 call 1067ac <gettimeofday>
1061cd: 8b 45 cc mov -0x34(%ebp),%eax
1061d0: 89 43 44 mov %eax,0x44(%ebx)
1061d3: 83 c4 10 add $0x10,%esp
size_t namelen,
mode_t mode,
dev_t dev
)
{
int rv = 0;
1061d6: 31 c0 xor %eax,%eax
1061d8: eb 03 jmp 1061dd <IMFS_mknod+0xb9>
IMFS_jnode_t *parent = parentloc->node_access;
IMFS_update_ctime( parent );
IMFS_update_mtime( parent );
} else {
rv = -1;
1061da: 83 c8 ff or $0xffffffff,%eax
}
return rv;
}
1061dd: 8d 65 f4 lea -0xc(%ebp),%esp
1061e0: 5b pop %ebx
1061e1: 5e pop %esi
1061e2: 5f pop %edi
1061e3: 5d pop %ebp
1061e4: c3 ret
001061e8 <IMFS_mount>:
#endif
#include "imfs.h"
int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry )
{
1061e8: 55 push %ebp
1061e9: 89 e5 mov %esp,%ebp
1061eb: 83 ec 08 sub $0x8,%esp
1061ee: 8b 55 08 mov 0x8(%ebp),%edx
int rv = 0;
IMFS_jnode_t *node = mt_entry->mt_point_node->location.node_access;
1061f1: 8b 42 20 mov 0x20(%edx),%eax
1061f4: 8b 40 08 mov 0x8(%eax),%eax
return node->control->imfs_type;
}
static inline bool IMFS_is_directory( const IMFS_jnode_t *node )
{
return node->control->imfs_type == IMFS_DIRECTORY;
1061f7: 8b 48 4c mov 0x4c(%eax),%ecx
if ( IMFS_is_directory( node ) ) {
1061fa: 83 39 00 cmpl $0x0,(%ecx)
1061fd: 75 1a jne 106219 <IMFS_mount+0x31>
if ( node->info.directory.mt_fs == NULL ) {
1061ff: 83 78 5c 00 cmpl $0x0,0x5c(%eax)
106203: 75 07 jne 10620c <IMFS_mount+0x24> <== NEVER TAKEN
node->info.directory.mt_fs = mt_entry;
106205: 89 50 5c mov %edx,0x5c(%eax)
#include "imfs.h"
int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry )
{
int rv = 0;
106208: 31 c0 xor %eax,%eax
10620a: eb 1b jmp 106227 <IMFS_mount+0x3f>
if ( IMFS_is_directory( node ) ) {
if ( node->info.directory.mt_fs == NULL ) {
node->info.directory.mt_fs = mt_entry;
} else {
errno = EBUSY;
10620c: e8 cb ac 00 00 call 110edc <__errno> <== NOT EXECUTED
106211: c7 00 10 00 00 00 movl $0x10,(%eax) <== NOT EXECUTED
106217: eb 0b jmp 106224 <IMFS_mount+0x3c> <== NOT EXECUTED
rv = -1;
}
} else {
errno = ENOTDIR;
106219: e8 be ac 00 00 call 110edc <__errno>
10621e: c7 00 14 00 00 00 movl $0x14,(%eax)
rv = -1;
106224: 83 c8 ff or $0xffffffff,%eax
}
return rv;
}
106227: c9 leave
106228: c3 ret
0010d6ae <IMFS_node_remove_directory>:
static IMFS_jnode_t *IMFS_node_remove_directory(
IMFS_jnode_t *node,
const IMFS_jnode_t *root_node
)
{
10d6ae: 55 push %ebp
10d6af: 89 e5 mov %esp,%ebp
10d6b1: 83 ec 08 sub $0x8,%esp
10d6b4: 8b 45 08 mov 0x8(%ebp),%eax
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
10d6b7: 8d 50 54 lea 0x54(%eax),%edx
if ( !rtems_chain_is_empty( &node->info.directory.Entries ) ) {
10d6ba: 39 50 50 cmp %edx,0x50(%eax)
10d6bd: 74 0d je 10d6cc <IMFS_node_remove_directory+0x1e>
errno = ENOTEMPTY;
10d6bf: e8 18 38 00 00 call 110edc <__errno>
10d6c4: c7 00 5a 00 00 00 movl $0x5a,(%eax)
10d6ca: eb 16 jmp 10d6e2 <IMFS_node_remove_directory+0x34>
node = NULL;
} else if ( node == root_node || IMFS_is_mount_point( node ) ) {
10d6cc: 3b 45 0c cmp 0xc(%ebp),%eax
10d6cf: 74 06 je 10d6d7 <IMFS_node_remove_directory+0x29>
10d6d1: 83 78 5c 00 cmpl $0x0,0x5c(%eax)
10d6d5: 74 0d je 10d6e4 <IMFS_node_remove_directory+0x36><== ALWAYS TAKEN
errno = EBUSY;
10d6d7: e8 00 38 00 00 call 110edc <__errno>
10d6dc: c7 00 10 00 00 00 movl $0x10,(%eax)
node = NULL;
10d6e2: 31 c0 xor %eax,%eax
}
return node;
}
10d6e4: c9 leave
10d6e5: c3 ret
0010622c <IMFS_node_type>:
#include "imfs.h"
rtems_filesystem_node_types_t IMFS_node_type(
const rtems_filesystem_location_info_t *loc
)
{
10622c: 55 push %ebp
10622d: 89 e5 mov %esp,%ebp
const IMFS_jnode_t *node = loc->node_access;
10622f: 8b 45 08 mov 0x8(%ebp),%eax
106232: 8b 50 08 mov 0x8(%eax),%edx
rtems_chain_extract_unprotected( &node->Node );
}
static inline IMFS_jnode_types_t IMFS_type( const IMFS_jnode_t *node )
{
return node->control->imfs_type;
106235: 8b 42 4c mov 0x4c(%edx),%eax
106238: 8b 00 mov (%eax),%eax
IMFS_jnode_types_t imfs_type = IMFS_type( node );
rtems_filesystem_node_types_t type;
switch ( imfs_type ) {
10623a: 83 f8 02 cmp $0x2,%eax
10623d: 74 09 je 106248 <IMFS_node_type+0x1c>
10623f: 83 f8 05 cmp $0x5,%eax
106242: 75 0c jne 106250 <IMFS_node_type+0x24> <== ALWAYS TAKEN
case IMFS_HARD_LINK:
type = IMFS_type( node->info.hard_link.link_node );
break;
case IMFS_LINEAR_FILE:
type = RTEMS_FILESYSTEM_MEMORY_FILE;
106244: b0 04 mov $0x4,%al <== NOT EXECUTED
106246: eb 08 jmp 106250 <IMFS_node_type+0x24> <== NOT EXECUTED
type = imfs_type;
break;
}
return type;
}
106248: 8b 42 50 mov 0x50(%edx),%eax
10624b: 8b 40 4c mov 0x4c(%eax),%eax
10624e: 8b 00 mov (%eax),%eax
106250: 5d pop %ebp
106251: c3 ret
0010627c <IMFS_rename>:
const rtems_filesystem_location_info_t *oldloc,
const rtems_filesystem_location_info_t *newparentloc,
const char *name,
size_t namelen
)
{
10627c: 55 push %ebp
10627d: 89 e5 mov %esp,%ebp
10627f: 57 push %edi
106280: 56 push %esi
106281: 53 push %ebx
106282: 83 ec 1c sub $0x1c,%esp
106285: 8b 75 14 mov 0x14(%ebp),%esi
int rv = 0;
IMFS_jnode_t *node = oldloc->node_access;
106288: 8b 45 0c mov 0xc(%ebp),%eax
10628b: 8b 58 08 mov 0x8(%eax),%ebx
IMFS_jnode_t *new_parent = newparentloc->node_access;
10628e: 8b 45 10 mov 0x10(%ebp),%eax
106291: 8b 50 08 mov 0x8(%eax),%edx
/*
* FIXME: Due to insufficient checks we can create inaccessible nodes with
* this operation.
*/
if ( node->Parent != NULL ) {
106294: 83 7b 08 00 cmpl $0x0,0x8(%ebx)
106298: 74 5c je 1062f6 <IMFS_rename+0x7a> <== NEVER TAKEN
if ( namelen < IMFS_NAME_MAX ) {
10629a: 83 7d 18 1f cmpl $0x1f,0x18(%ebp)
10629e: 77 49 ja 1062e9 <IMFS_rename+0x6d> <== NEVER TAKEN
memcpy( node->name, name, namelen );
1062a0: 8d 43 0c lea 0xc(%ebx),%eax
1062a3: 89 c7 mov %eax,%edi
1062a5: 8b 4d 18 mov 0x18(%ebp),%ecx
1062a8: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
node->name [namelen] = '\0';
1062aa: 8b 45 18 mov 0x18(%ebp),%eax
1062ad: c6 44 03 0c 00 movb $0x0,0xc(%ebx,%eax,1)
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
1062b2: 8b 0b mov (%ebx),%ecx
previous = the_node->previous;
1062b4: 8b 43 04 mov 0x4(%ebx),%eax
next->previous = previous;
1062b7: 89 41 04 mov %eax,0x4(%ecx)
previous->next = next;
1062ba: 89 08 mov %ecx,(%eax)
static inline void IMFS_add_to_directory(
IMFS_jnode_t *dir,
IMFS_jnode_t *node
)
{
node->Parent = dir;
1062bc: 89 53 08 mov %edx,0x8(%ebx)
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
1062bf: 8b 42 58 mov 0x58(%edx),%eax
RTEMS_INLINE_ROUTINE void _Chain_Append_unprotected(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
1062c2: 8d 4a 54 lea 0x54(%edx),%ecx
1062c5: 89 0b mov %ecx,(%ebx)
Chain_Node *old_last = tail->previous;
the_node->next = tail;
tail->previous = the_node;
1062c7: 89 5a 58 mov %ebx,0x58(%edx)
old_last->next = the_node;
1062ca: 89 18 mov %ebx,(%eax)
the_node->previous = old_last;
1062cc: 89 43 04 mov %eax,0x4(%ebx)
IMFS_remove_from_directory( node );
IMFS_add_to_directory( new_parent, node );
IMFS_update_ctime( node );
1062cf: 50 push %eax
1062d0: 50 push %eax
1062d1: 6a 00 push $0x0
1062d3: 8d 45 e0 lea -0x20(%ebp),%eax
1062d6: 50 push %eax
1062d7: e8 d0 04 00 00 call 1067ac <gettimeofday>
1062dc: 8b 45 e0 mov -0x20(%ebp),%eax
1062df: 89 43 48 mov %eax,0x48(%ebx)
1062e2: 83 c4 10 add $0x10,%esp
const rtems_filesystem_location_info_t *newparentloc,
const char *name,
size_t namelen
)
{
int rv = 0;
1062e5: 31 c0 xor %eax,%eax
1062e7: eb 1b jmp 106304 <IMFS_rename+0x88>
IMFS_remove_from_directory( node );
IMFS_add_to_directory( new_parent, node );
IMFS_update_ctime( node );
} else {
errno = ENAMETOOLONG;
1062e9: e8 ee ab 00 00 call 110edc <__errno> <== NOT EXECUTED
1062ee: c7 00 5b 00 00 00 movl $0x5b,(%eax) <== NOT EXECUTED
1062f4: eb 0b jmp 106301 <IMFS_rename+0x85> <== NOT EXECUTED
rv = -1;
}
} else {
errno = EINVAL;
1062f6: e8 e1 ab 00 00 call 110edc <__errno> <== NOT EXECUTED
1062fb: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
rv = -1;
106301: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
}
return rv;
}
106304: 8d 65 f4 lea -0xc(%ebp),%esp
106307: 5b pop %ebx
106308: 5e pop %esi
106309: 5f pop %edi
10630a: 5d pop %ebp
10630b: c3 ret
001063d4 <IMFS_unmount>:
#endif
#include "imfs.h"
int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry )
{
1063d4: 55 push %ebp
1063d5: 89 e5 mov %esp,%ebp
1063d7: 83 ec 08 sub $0x8,%esp
1063da: 8b 55 08 mov 0x8(%ebp),%edx
int rv = 0;
IMFS_jnode_t *node = mt_entry->mt_point_node->location.node_access;
1063dd: 8b 42 20 mov 0x20(%edx),%eax
1063e0: 8b 40 08 mov 0x8(%eax),%eax
return node->control->imfs_type;
}
static inline bool IMFS_is_directory( const IMFS_jnode_t *node )
{
return node->control->imfs_type == IMFS_DIRECTORY;
1063e3: 8b 48 4c mov 0x4c(%eax),%ecx
if ( IMFS_is_directory( node ) ) {
1063e6: 83 39 00 cmpl $0x0,(%ecx)
1063e9: 75 1d jne 106408 <IMFS_unmount+0x34> <== NEVER TAKEN
if ( node->info.directory.mt_fs == mt_entry ) {
1063eb: 39 50 5c cmp %edx,0x5c(%eax)
1063ee: 75 0b jne 1063fb <IMFS_unmount+0x27> <== NEVER TAKEN
node->info.directory.mt_fs = NULL;
1063f0: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax)
#include "imfs.h"
int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry )
{
int rv = 0;
1063f7: 31 c0 xor %eax,%eax
1063f9: eb 1b jmp 106416 <IMFS_unmount+0x42>
if ( IMFS_is_directory( node ) ) {
if ( node->info.directory.mt_fs == mt_entry ) {
node->info.directory.mt_fs = NULL;
} else {
errno = EINVAL;
1063fb: e8 dc aa 00 00 call 110edc <__errno> <== NOT EXECUTED
106400: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
106406: eb 0b jmp 106413 <IMFS_unmount+0x3f> <== NOT EXECUTED
rv = -1;
}
} else {
errno = ENOTDIR;
106408: e8 cf aa 00 00 call 110edc <__errno> <== NOT EXECUTED
10640d: c7 00 14 00 00 00 movl $0x14,(%eax) <== NOT EXECUTED
rv = -1;
106413: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
}
return rv;
}
106416: c9 leave
106417: c3 ret
001208e4 <Stack_check_Dump_threads_usage>:
static rtems_printk_plugin_t print_handler;
static void Stack_check_Dump_threads_usage(
Thread_Control *the_thread
)
{
1208e4: 55 push %ebp <== NOT EXECUTED
1208e5: 89 e5 mov %esp,%ebp <== NOT EXECUTED
1208e7: 57 push %edi <== NOT EXECUTED
1208e8: 56 push %esi <== NOT EXECUTED
1208e9: 53 push %ebx <== NOT EXECUTED
1208ea: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED
1208ed: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
/*
* Obtain interrupt stack information
*/
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if (the_thread == (Thread_Control *) -1) {
1208f0: 83 fb ff cmp $0xffffffff,%ebx <== NOT EXECUTED
1208f3: 75 1d jne 120912 <Stack_check_Dump_threads_usage+0x2e><== NOT EXECUTED
if (!Stack_check_Interrupt_stack.area)
1208f5: 83 3d 1c ec 16 00 00 cmpl $0x0,0x16ec1c <== NOT EXECUTED
1208fc: 0f 84 f2 00 00 00 je 1209f4 <Stack_check_Dump_threads_usage+0x110><== NOT EXECUTED
return;
stack = &Stack_check_Interrupt_stack;
120902: bf 18 ec 16 00 mov $0x16ec18,%edi <== NOT EXECUTED
the_thread = 0;
current = 0;
120907: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) <== NOT EXECUTED
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if (the_thread == (Thread_Control *) -1) {
if (!Stack_check_Interrupt_stack.area)
return;
stack = &Stack_check_Interrupt_stack;
the_thread = 0;
12090e: 31 db xor %ebx,%ebx <== NOT EXECUTED
120910: eb 0f jmp 120921 <Stack_check_Dump_threads_usage+0x3d><== NOT EXECUTED
current = 0;
} else
#endif
{
stack = &the_thread->Start.Initial_stack;
120912: 8d bb b4 00 00 00 lea 0xb4(%ebx),%edi <== NOT EXECUTED
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
120918: 8b 8b c8 00 00 00 mov 0xc8(%ebx),%ecx <== NOT EXECUTED
12091e: 89 4d d0 mov %ecx,-0x30(%ebp) <== NOT EXECUTED
}
low = Stack_check_usable_stack_start(stack);
120921: 8b 47 04 mov 0x4(%edi),%eax <== NOT EXECUTED
120924: 8d 50 10 lea 0x10(%eax),%edx <== NOT EXECUTED
size = Stack_check_usable_stack_size(stack);
120927: 8b 0f mov (%edi),%ecx <== NOT EXECUTED
120929: 83 e9 10 sub $0x10,%ecx <== NOT EXECUTED
12092c: 89 4d d4 mov %ecx,-0x2c(%ebp) <== NOT EXECUTED
/*
* start at lower memory and find first word that does not
* match pattern
*/
base += PATTERN_SIZE_WORDS;
12092f: 83 c0 20 add $0x20,%eax <== NOT EXECUTED
for (ebase = base + length; base < ebase; base++)
120932: 83 e1 fc and $0xfffffffc,%ecx <== NOT EXECUTED
120935: 01 c1 add %eax,%ecx <== NOT EXECUTED
120937: eb 0b jmp 120944 <Stack_check_Dump_threads_usage+0x60><== NOT EXECUTED
if (*base != U32_PATTERN)
120939: 81 38 a5 a5 a5 a5 cmpl $0xa5a5a5a5,(%eax) <== NOT EXECUTED
12093f: 75 0b jne 12094c <Stack_check_Dump_threads_usage+0x68><== 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++)
120941: 83 c0 04 add $0x4,%eax <== NOT EXECUTED
120944: 39 c8 cmp %ecx,%eax <== NOT EXECUTED
120946: 72 f1 jb 120939 <Stack_check_Dump_threads_usage+0x55><== NOT EXECUTED
high_water_mark = Stack_check_find_high_water_mark(low, size);
if ( high_water_mark )
used = Stack_check_Calculate_used( low, size, high_water_mark );
else
used = 0;
120948: 31 f6 xor %esi,%esi <== NOT EXECUTED
12094a: eb 0d jmp 120959 <Stack_check_Dump_threads_usage+0x75><== NOT EXECUTED
12094c: 31 f6 xor %esi,%esi <== NOT EXECUTED
low = Stack_check_usable_stack_start(stack);
size = Stack_check_usable_stack_size(stack);
high_water_mark = Stack_check_find_high_water_mark(low, size);
if ( high_water_mark )
12094e: 85 c0 test %eax,%eax <== NOT EXECUTED
120950: 74 07 je 120959 <Stack_check_Dump_threads_usage+0x75><== NOT EXECUTED
used = Stack_check_Calculate_used( low, size, high_water_mark );
120952: 8b 75 d4 mov -0x2c(%ebp),%esi <== NOT EXECUTED
120955: 01 d6 add %edx,%esi <== NOT EXECUTED
120957: 29 c6 sub %eax,%esi <== NOT EXECUTED
else
used = 0;
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if ( the_thread )
120959: 85 db test %ebx,%ebx <== NOT EXECUTED
12095b: 74 31 je 12098e <Stack_check_Dump_threads_usage+0xaa><== NOT EXECUTED
#endif
{
(*print_handler)(
12095d: 8b 0d 48 da 16 00 mov 0x16da48,%ecx <== NOT EXECUTED
120963: 50 push %eax <== NOT EXECUTED
120964: 8d 45 e3 lea -0x1d(%ebp),%eax <== NOT EXECUTED
120967: 50 push %eax <== NOT EXECUTED
120968: 6a 05 push $0x5 <== NOT EXECUTED
12096a: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED
12096d: 89 4d cc mov %ecx,-0x34(%ebp) <== NOT EXECUTED
120970: e8 0f fc fe ff call 110584 <rtems_object_get_name> <== NOT EXECUTED
120975: 50 push %eax <== NOT EXECUTED
120976: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED
120979: 68 3b ff 14 00 push $0x14ff3b <== NOT EXECUTED
12097e: ff 35 44 da 16 00 pushl 0x16da44 <== NOT EXECUTED
120984: 8b 4d cc mov -0x34(%ebp),%ecx <== NOT EXECUTED
120987: ff d1 call *%ecx <== NOT EXECUTED
120989: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
12098c: eb 17 jmp 1209a5 <Stack_check_Dump_threads_usage+0xc1><== NOT EXECUTED
rtems_object_get_name( the_thread->Object.id, sizeof(name), name )
);
}
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
12098e: 53 push %ebx <== NOT EXECUTED
12098f: 6a ff push $0xffffffff <== NOT EXECUTED
120991: 68 48 ff 14 00 push $0x14ff48 <== NOT EXECUTED
120996: ff 35 44 da 16 00 pushl 0x16da44 <== NOT EXECUTED
12099c: ff 15 48 da 16 00 call *0x16da48 <== NOT EXECUTED
1209a2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
(*print_handler)(
print_context,
" %010p - %010p %010p %8" PRId32 " ",
stack->area,
stack->area + stack->size - 1,
1209a5: 8b 47 04 mov 0x4(%edi),%eax <== NOT EXECUTED
else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
}
#endif
(*print_handler)(
1209a8: 51 push %ecx <== NOT EXECUTED
1209a9: 51 push %ecx <== NOT EXECUTED
1209aa: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED
1209ad: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED
print_context,
" %010p - %010p %010p %8" PRId32 " ",
stack->area,
stack->area + stack->size - 1,
1209b0: 8b 17 mov (%edi),%edx <== NOT EXECUTED
else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
}
#endif
(*print_handler)(
1209b2: 8d 54 10 ff lea -0x1(%eax,%edx,1),%edx <== NOT EXECUTED
1209b6: 52 push %edx <== NOT EXECUTED
1209b7: 50 push %eax <== NOT EXECUTED
1209b8: 68 56 ff 14 00 push $0x14ff56 <== NOT EXECUTED
1209bd: ff 35 44 da 16 00 pushl 0x16da44 <== NOT EXECUTED
1209c3: ff 15 48 da 16 00 call *0x16da48 <== NOT EXECUTED
stack->area + stack->size - 1,
current,
size
);
if (Stack_check_Initialized == 0) {
1209c9: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
1209cc: 83 3d 40 da 16 00 00 cmpl $0x0,0x16da40 <== NOT EXECUTED
1209d3: 75 09 jne 1209de <Stack_check_Dump_threads_usage+0xfa><== NOT EXECUTED
(*print_handler)( print_context, "Unavailable\n" );
1209d5: 52 push %edx <== NOT EXECUTED
1209d6: 52 push %edx <== NOT EXECUTED
1209d7: 68 74 ff 14 00 push $0x14ff74 <== NOT EXECUTED
1209dc: eb 07 jmp 1209e5 <Stack_check_Dump_threads_usage+0x101><== NOT EXECUTED
} else {
(*print_handler)( print_context, "%8" PRId32 "\n", used );
1209de: 50 push %eax <== NOT EXECUTED
1209df: 56 push %esi <== NOT EXECUTED
1209e0: 68 81 ff 14 00 push $0x14ff81 <== NOT EXECUTED
1209e5: ff 35 44 da 16 00 pushl 0x16da44 <== NOT EXECUTED
1209eb: ff 15 48 da 16 00 call *0x16da48 <== NOT EXECUTED
1209f1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
}
1209f4: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1209f7: 5b pop %ebx <== NOT EXECUTED
1209f8: 5e pop %esi <== NOT EXECUTED
1209f9: 5f pop %edi <== NOT EXECUTED
1209fa: 5d pop %ebp <== NOT EXECUTED
1209fb: c3 ret <== NOT EXECUTED
00120aaa <Stack_check_report_blown_task>:
Thread_Control *running,
bool pattern_ok
) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE;
void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok)
{
120aaa: 55 push %ebp <== NOT EXECUTED
120aab: 89 e5 mov %esp,%ebp <== NOT EXECUTED
120aad: 56 push %esi <== NOT EXECUTED
120aae: 53 push %ebx <== NOT EXECUTED
120aaf: 83 ec 3c sub $0x3c,%esp <== NOT EXECUTED
120ab2: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
120ab5: 8a 4d 0c mov 0xc(%ebp),%cl <== NOT EXECUTED
Stack_Control *stack = &running->Start.Initial_stack;
void *pattern_area = Stack_check_Get_pattern(stack);
120ab8: 8b b3 b8 00 00 00 mov 0xb8(%ebx),%esi <== NOT EXECUTED
char name[32];
printk("BLOWN STACK!!!\n");
120abe: 68 87 ff 14 00 push $0x14ff87 <== NOT EXECUTED
120ac3: 88 4d d4 mov %cl,-0x2c(%ebp) <== NOT EXECUTED
120ac6: e8 91 67 fe ff call 10725c <printk> <== NOT EXECUTED
printk("task control block: 0x%08" PRIxPTR "\n", running);
120acb: 58 pop %eax <== NOT EXECUTED
120acc: 5a pop %edx <== NOT EXECUTED
120acd: 53 push %ebx <== NOT EXECUTED
120ace: 68 97 ff 14 00 push $0x14ff97 <== NOT EXECUTED
120ad3: e8 84 67 fe ff call 10725c <printk> <== NOT EXECUTED
printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id);
120ad8: 59 pop %ecx <== NOT EXECUTED
120ad9: 58 pop %eax <== NOT EXECUTED
120ada: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED
120add: 68 b4 ff 14 00 push $0x14ffb4 <== NOT EXECUTED
120ae2: e8 75 67 fe ff call 10725c <printk> <== NOT EXECUTED
printk(
120ae7: 58 pop %eax <== NOT EXECUTED
120ae8: 5a pop %edx <== NOT EXECUTED
120ae9: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED
120aec: 68 c6 ff 14 00 push $0x14ffc6 <== NOT EXECUTED
120af1: e8 66 67 fe ff call 10725c <printk> <== NOT EXECUTED
"task name: 0x%08" PRIx32 "\n",
running->Object.name.name_u32
);
printk(
120af6: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
120af9: 8d 45 d8 lea -0x28(%ebp),%eax <== NOT EXECUTED
120afc: 50 push %eax <== NOT EXECUTED
120afd: 6a 20 push $0x20 <== NOT EXECUTED
120aff: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED
120b02: e8 7d fa fe ff call 110584 <rtems_object_get_name> <== NOT EXECUTED
120b07: 59 pop %ecx <== NOT EXECUTED
120b08: 5a pop %edx <== NOT EXECUTED
120b09: 50 push %eax <== NOT EXECUTED
120b0a: 68 da ff 14 00 push $0x14ffda <== NOT EXECUTED
120b0f: e8 48 67 fe ff call 10725c <printk> <== NOT EXECUTED
);
printk(
"task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n",
(unsigned long) stack->size,
stack->area,
((char *) stack->area + stack->size)
120b14: 8b 93 b8 00 00 00 mov 0xb8(%ebx),%edx <== NOT EXECUTED
120b1a: 8b 83 b4 00 00 00 mov 0xb4(%ebx),%eax <== NOT EXECUTED
);
printk(
"task name string: %s\n",
rtems_object_get_name(running->Object.id, sizeof(name), name)
);
printk(
120b20: 8d 1c 02 lea (%edx,%eax,1),%ebx <== NOT EXECUTED
120b23: 53 push %ebx <== NOT EXECUTED
120b24: 52 push %edx <== NOT EXECUTED
120b25: 50 push %eax <== NOT EXECUTED
120b26: 68 f0 ff 14 00 push $0x14fff0 <== NOT EXECUTED
120b2b: e8 2c 67 fe ff call 10725c <printk> <== 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) {
120b30: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
120b33: 8a 4d d4 mov -0x2c(%ebp),%cl <== NOT EXECUTED
120b36: 84 c9 test %cl,%cl <== NOT EXECUTED
120b38: 75 17 jne 120b51 <Stack_check_report_blown_task+0xa7><== NOT EXECUTED
printk(
120b3a: 8d 46 18 lea 0x18(%esi),%eax <== NOT EXECUTED
120b3d: 50 push %eax <== NOT EXECUTED
) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE;
void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok)
{
Stack_Control *stack = &running->Start.Initial_stack;
void *pattern_area = Stack_check_Get_pattern(stack);
120b3e: 83 c6 08 add $0x8,%esi <== NOT EXECUTED
(unsigned long) stack->size,
stack->area,
((char *) stack->area + stack->size)
);
if (!pattern_ok) {
printk(
120b41: 56 push %esi <== NOT EXECUTED
120b42: 6a 10 push $0x10 <== NOT EXECUTED
120b44: 68 21 00 15 00 push $0x150021 <== NOT EXECUTED
120b49: e8 0e 67 fe ff call 10725c <printk> <== NOT EXECUTED
120b4e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_configuration_get_user_multiprocessing_table()->node
);
}
#endif
rtems_fatal_error_occurred(0x81);
120b51: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
120b54: 68 81 00 00 00 push $0x81 <== NOT EXECUTED
120b59: e8 2e 96 fe ff call 10a18c <rtems_fatal_error_occurred><== NOT EXECUTED
0010c774 <_CORE_RWLock_Release>:
*/
CORE_RWLock_Status _CORE_RWLock_Release(
CORE_RWLock_Control *the_rwlock
)
{
10c774: 55 push %ebp
10c775: 89 e5 mov %esp,%ebp
10c777: 53 push %ebx
10c778: 51 push %ecx
10c779: 8b 5d 08 mov 0x8(%ebp),%ebx
ISR_Level level;
Thread_Control *executing = _Thread_Executing;
10c77c: 8b 15 e4 18 13 00 mov 0x1318e4,%edx
* Otherwise, we have to block.
* If locked for reading and no waiters, then OK to read.
* If any thread is waiting, then we wait.
*/
_ISR_Disable( level );
10c782: 9c pushf
10c783: fa cli
10c784: 58 pop %eax
if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){
10c785: 8b 4b 44 mov 0x44(%ebx),%ecx
10c788: 85 c9 test %ecx,%ecx
10c78a: 75 0b jne 10c797 <_CORE_RWLock_Release+0x23>
_ISR_Enable( level );
10c78c: 50 push %eax
10c78d: 9d popf
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
10c78e: c7 42 34 02 00 00 00 movl $0x2,0x34(%edx)
return CORE_RWLOCK_SUCCESSFUL;
10c795: eb 6c jmp 10c803 <_CORE_RWLock_Release+0x8f>
}
if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) {
10c797: 49 dec %ecx
10c798: 75 09 jne 10c7a3 <_CORE_RWLock_Release+0x2f>
the_rwlock->number_of_readers -= 1;
if ( the_rwlock->number_of_readers != 0 ) {
10c79a: ff 4b 48 decl 0x48(%ebx)
10c79d: 74 04 je 10c7a3 <_CORE_RWLock_Release+0x2f>
/* must be unlocked again */
_ISR_Enable( level );
10c79f: 50 push %eax
10c7a0: 9d popf
return CORE_RWLOCK_SUCCESSFUL;
10c7a1: eb 60 jmp 10c803 <_CORE_RWLock_Release+0x8f>
}
}
/* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
10c7a3: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx)
/*
* Implicitly transition to "unlocked" and find another thread interested
* in obtaining this rwlock.
*/
the_rwlock->current_state = CORE_RWLOCK_UNLOCKED;
10c7aa: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx)
_ISR_Enable( level );
10c7b1: 50 push %eax
10c7b2: 9d popf
next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue );
10c7b3: 83 ec 0c sub $0xc,%esp
10c7b6: 53 push %ebx
10c7b7: e8 80 18 00 00 call 10e03c <_Thread_queue_Dequeue>
if ( next ) {
10c7bc: 83 c4 10 add $0x10,%esp
10c7bf: 85 c0 test %eax,%eax
10c7c1: 74 40 je 10c803 <_CORE_RWLock_Release+0x8f>
if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) {
10c7c3: 83 78 30 01 cmpl $0x1,0x30(%eax)
10c7c7: 75 09 jne 10c7d2 <_CORE_RWLock_Release+0x5e>
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING;
10c7c9: c7 43 44 02 00 00 00 movl $0x2,0x44(%ebx)
return CORE_RWLOCK_SUCCESSFUL;
10c7d0: eb 31 jmp 10c803 <_CORE_RWLock_Release+0x8f>
}
/*
* Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING
*/
the_rwlock->number_of_readers += 1;
10c7d2: ff 43 48 incl 0x48(%ebx)
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING;
10c7d5: c7 43 44 01 00 00 00 movl $0x1,0x44(%ebx)
/*
* Now see if more readers can be let go.
*/
while ( 1 ) {
next = _Thread_queue_First( &the_rwlock->Wait_queue );
10c7dc: 83 ec 0c sub $0xc,%esp
10c7df: 53 push %ebx
10c7e0: e8 1b 1c 00 00 call 10e400 <_Thread_queue_First>
if ( !next ||
10c7e5: 83 c4 10 add $0x10,%esp
10c7e8: 85 c0 test %eax,%eax
10c7ea: 74 17 je 10c803 <_CORE_RWLock_Release+0x8f>
10c7ec: 83 78 30 01 cmpl $0x1,0x30(%eax)
10c7f0: 74 11 je 10c803 <_CORE_RWLock_Release+0x8f><== NEVER TAKEN
next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE )
return CORE_RWLOCK_SUCCESSFUL;
the_rwlock->number_of_readers += 1;
10c7f2: ff 43 48 incl 0x48(%ebx)
_Thread_queue_Extract( &the_rwlock->Wait_queue, next );
10c7f5: 52 push %edx
10c7f6: 52 push %edx
10c7f7: 50 push %eax
10c7f8: 53 push %ebx
10c7f9: e8 fa 1a 00 00 call 10e2f8 <_Thread_queue_Extract>
}
10c7fe: 83 c4 10 add $0x10,%esp
10c801: eb d9 jmp 10c7dc <_CORE_RWLock_Release+0x68>
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
10c803: 31 c0 xor %eax,%eax
10c805: 8b 5d fc mov -0x4(%ebp),%ebx
10c808: c9 leave
10c809: c3 ret
0010c80c <_CORE_RWLock_Timeout>:
void _CORE_RWLock_Timeout(
Objects_Id id,
void *ignored
)
{
10c80c: 55 push %ebp
10c80d: 89 e5 mov %esp,%ebp
10c80f: 83 ec 20 sub $0x20,%esp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
10c812: 8d 45 f4 lea -0xc(%ebp),%eax
10c815: 50 push %eax
10c816: ff 75 08 pushl 0x8(%ebp)
10c819: e8 d6 14 00 00 call 10dcf4 <_Thread_Get>
switch ( location ) {
10c81e: 83 c4 10 add $0x10,%esp
10c821: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
10c825: 75 1c jne 10c843 <_CORE_RWLock_Timeout+0x37><== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_queue_Process_timeout( the_thread );
10c827: 83 ec 0c sub $0xc,%esp
10c82a: 50 push %eax
10c82b: e8 84 1c 00 00 call 10e4b4 <_Thread_queue_Process_timeout>
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
10c830: a1 dc 13 13 00 mov 0x1313dc,%eax
10c835: 48 dec %eax
10c836: a3 dc 13 13 00 mov %eax,0x1313dc
return _Thread_Dispatch_disable_level;
10c83b: a1 dc 13 13 00 mov 0x1313dc,%eax
10c840: 83 c4 10 add $0x10,%esp
_Thread_Unnest_dispatch();
break;
}
}
10c843: c9 leave
10c844: c3 ret
0010a9a4 <_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
)
{
10a9a4: 55 push %ebp
10a9a5: 89 e5 mov %esp,%ebp
10a9a7: 53 push %ebx
10a9a8: 83 ec 10 sub $0x10,%esp
10a9ab: 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)) ) {
10a9ae: 53 push %ebx
10a9af: e8 c0 17 00 00 call 10c174 <_Thread_queue_Dequeue>
10a9b4: 83 c4 10 add $0x10,%esp
{
Thread_Control *the_thread;
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
10a9b7: 31 d2 xor %edx,%edx
if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) {
10a9b9: 85 c0 test %eax,%eax
10a9bb: 75 15 jne 10a9d2 <_CORE_semaphore_Surrender+0x2e>
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_semaphore_mp_support) ( the_thread, id );
#endif
} else {
_ISR_Disable( level );
10a9bd: 9c pushf
10a9be: fa cli
10a9bf: 59 pop %ecx
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
10a9c0: 8b 43 48 mov 0x48(%ebx),%eax
the_semaphore->count += 1;
else
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
10a9c3: b2 04 mov $0x4,%dl
(*api_semaphore_mp_support) ( the_thread, id );
#endif
} else {
_ISR_Disable( level );
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
10a9c5: 3b 43 40 cmp 0x40(%ebx),%eax
10a9c8: 73 06 jae 10a9d0 <_CORE_semaphore_Surrender+0x2c><== NEVER TAKEN
the_semaphore->count += 1;
10a9ca: 40 inc %eax
10a9cb: 89 43 48 mov %eax,0x48(%ebx)
{
Thread_Control *the_thread;
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
10a9ce: 30 d2 xor %dl,%dl
_ISR_Disable( level );
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
the_semaphore->count += 1;
else
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
10a9d0: 51 push %ecx
10a9d1: 9d popf
}
return status;
}
10a9d2: 89 d0 mov %edx,%eax
10a9d4: 8b 5d fc mov -0x4(%ebp),%ebx
10a9d7: c9 leave
10a9d8: c3 ret
00109a10 <_Event_Surrender>:
*/
void _Event_Surrender(
Thread_Control *the_thread
)
{
109a10: 55 push %ebp
109a11: 89 e5 mov %esp,%ebp
109a13: 57 push %edi
109a14: 56 push %esi
109a15: 53 push %ebx
109a16: 83 ec 1c sub $0x1c,%esp
109a19: 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 ];
109a1c: 8b b3 e4 00 00 00 mov 0xe4(%ebx),%esi
option_set = (rtems_option) the_thread->Wait.option;
109a22: 8b 43 30 mov 0x30(%ebx),%eax
109a25: 89 45 e0 mov %eax,-0x20(%ebp)
_ISR_Disable( level );
109a28: 9c pushf
109a29: fa cli
109a2a: 58 pop %eax
pending_events = api->pending_events;
109a2b: 8b 16 mov (%esi),%edx
109a2d: 89 55 e4 mov %edx,-0x1c(%ebp)
event_condition = (rtems_event_set) the_thread->Wait.count;
109a30: 8b 4b 24 mov 0x24(%ebx),%ecx
seized_events = _Event_sets_Get( pending_events, event_condition );
/*
* No events were seized in this operation
*/
if ( _Event_sets_Is_empty( seized_events ) ) {
109a33: 21 ca and %ecx,%edx
109a35: 75 05 jne 109a3c <_Event_Surrender+0x2c>
109a37: e9 ab 00 00 00 jmp 109ae7 <_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() &&
109a3c: 83 3d e8 e8 12 00 00 cmpl $0x0,0x12e8e8
109a43: 74 47 je 109a8c <_Event_Surrender+0x7c>
109a45: 3b 1d ec e8 12 00 cmp 0x12e8ec,%ebx
109a4b: 75 3f jne 109a8c <_Event_Surrender+0x7c>
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
109a4d: 8b 3d c8 ec 12 00 mov 0x12ecc8,%edi
/*
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
_Thread_Is_executing( the_thread ) &&
109a53: 83 ff 02 cmp $0x2,%edi
109a56: 74 09 je 109a61 <_Event_Surrender+0x51> <== NEVER TAKEN
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
109a58: 8b 3d c8 ec 12 00 mov 0x12ecc8,%edi
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
109a5e: 4f dec %edi
109a5f: 75 2b jne 109a8c <_Event_Surrender+0x7c>
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
109a61: 39 ca cmp %ecx,%edx
109a63: 74 06 je 109a6b <_Event_Surrender+0x5b>
109a65: f6 45 e0 02 testb $0x2,-0x20(%ebp)
109a69: 74 7c je 109ae7 <_Event_Surrender+0xd7> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Clear(
rtems_event_set the_event_set,
rtems_event_set the_mask
)
{
return ( the_event_set & ~(the_mask) );
109a6b: 89 d1 mov %edx,%ecx
109a6d: f7 d1 not %ecx
109a6f: 23 4d e4 and -0x1c(%ebp),%ecx
109a72: 89 0e mov %ecx,(%esi)
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
the_thread->Wait.count = 0;
109a74: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
109a7b: 8b 4b 28 mov 0x28(%ebx),%ecx
109a7e: 89 11 mov %edx,(%ecx)
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
109a80: c7 05 c8 ec 12 00 03 movl $0x3,0x12ecc8
109a87: 00 00 00
109a8a: eb 5b jmp 109ae7 <_Event_Surrender+0xd7>
}
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
109a8c: f6 43 11 01 testb $0x1,0x11(%ebx)
109a90: 74 55 je 109ae7 <_Event_Surrender+0xd7>
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
109a92: 39 ca cmp %ecx,%edx
109a94: 74 06 je 109a9c <_Event_Surrender+0x8c>
109a96: f6 45 e0 02 testb $0x2,-0x20(%ebp)
109a9a: 74 4b je 109ae7 <_Event_Surrender+0xd7> <== NEVER TAKEN
109a9c: 89 d1 mov %edx,%ecx
109a9e: f7 d1 not %ecx
109aa0: 23 4d e4 and -0x1c(%ebp),%ecx
109aa3: 89 0e mov %ecx,(%esi)
api->pending_events = _Event_sets_Clear( pending_events, seized_events );
the_thread->Wait.count = 0;
109aa5: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
109aac: 8b 4b 28 mov 0x28(%ebx),%ecx
109aaf: 89 11 mov %edx,(%ecx)
_ISR_Flash( level );
109ab1: 50 push %eax
109ab2: 9d popf
109ab3: fa cli
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
109ab4: 83 7b 50 02 cmpl $0x2,0x50(%ebx)
109ab8: 74 06 je 109ac0 <_Event_Surrender+0xb0>
_ISR_Enable( level );
109aba: 50 push %eax
109abb: 9d popf
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
109abc: 51 push %ecx
109abd: 51 push %ecx
109abe: eb 17 jmp 109ad7 <_Event_Surrender+0xc7>
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
109ac0: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx)
_Thread_Unblock( the_thread );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
109ac7: 50 push %eax
109ac8: 9d popf
(void) _Watchdog_Remove( &the_thread->Timer );
109ac9: 83 ec 0c sub $0xc,%esp
109acc: 8d 43 48 lea 0x48(%ebx),%eax
109acf: 50 push %eax
109ad0: e8 43 2f 00 00 call 10ca18 <_Watchdog_Remove>
109ad5: 58 pop %eax
109ad6: 5a pop %edx
109ad7: 68 f8 ff 03 10 push $0x1003fff8
109adc: 53 push %ebx
109add: e8 fa 1f 00 00 call 10badc <_Thread_Clear_state>
109ae2: 83 c4 10 add $0x10,%esp
109ae5: eb 02 jmp 109ae9 <_Event_Surrender+0xd9>
_Thread_Unblock( the_thread );
}
return;
}
}
_ISR_Enable( level );
109ae7: 50 push %eax
109ae8: 9d popf
}
109ae9: 8d 65 f4 lea -0xc(%ebp),%esp
109aec: 5b pop %ebx
109aed: 5e pop %esi
109aee: 5f pop %edi
109aef: 5d pop %ebp
109af0: c3 ret
00109af4 <_Event_Timeout>:
void _Event_Timeout(
Objects_Id id,
void *ignored
)
{
109af4: 55 push %ebp
109af5: 89 e5 mov %esp,%ebp
109af7: 83 ec 20 sub $0x20,%esp
Thread_Control *the_thread;
Objects_Locations location;
ISR_Level level;
the_thread = _Thread_Get( id, &location );
109afa: 8d 45 f4 lea -0xc(%ebp),%eax
109afd: 50 push %eax
109afe: ff 75 08 pushl 0x8(%ebp)
109b01: e8 26 23 00 00 call 10be2c <_Thread_Get>
switch ( location ) {
109b06: 83 c4 10 add $0x10,%esp
109b09: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
109b0d: 75 4e jne 109b5d <_Event_Timeout+0x69> <== 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 );
109b0f: 9c pushf
109b10: fa cli
109b11: 5a pop %edx
_ISR_Enable( level );
return;
}
#endif
the_thread->Wait.count = 0;
109b12: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax)
if ( _Thread_Is_executing( the_thread ) ) {
109b19: 3b 05 ec e8 12 00 cmp 0x12e8ec,%eax
109b1f: 75 13 jne 109b34 <_Event_Timeout+0x40>
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
109b21: 8b 0d c8 ec 12 00 mov 0x12ecc8,%ecx
109b27: 49 dec %ecx
109b28: 75 0a jne 109b34 <_Event_Timeout+0x40>
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
109b2a: c7 05 c8 ec 12 00 02 movl $0x2,0x12ecc8
109b31: 00 00 00
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
109b34: c7 40 34 06 00 00 00 movl $0x6,0x34(%eax)
_ISR_Enable( level );
109b3b: 52 push %edx
109b3c: 9d popf
109b3d: 52 push %edx
109b3e: 52 push %edx
109b3f: 68 f8 ff 03 10 push $0x1003fff8
109b44: 50 push %eax
109b45: e8 92 1f 00 00 call 10badc <_Thread_Clear_state>
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
109b4a: a1 e4 e3 12 00 mov 0x12e3e4,%eax
109b4f: 48 dec %eax
109b50: a3 e4 e3 12 00 mov %eax,0x12e3e4
return _Thread_Dispatch_disable_level;
109b55: a1 e4 e3 12 00 mov 0x12e3e4,%eax
109b5a: 83 c4 10 add $0x10,%esp
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
109b5d: c9 leave
109b5e: c3 ret
0010f33f <_Heap_Extend>:
Heap_Control *heap,
void *extend_area_begin_ptr,
uintptr_t extend_area_size,
uintptr_t *extended_size_ptr
)
{
10f33f: 55 push %ebp
10f340: 89 e5 mov %esp,%ebp
10f342: 57 push %edi
10f343: 56 push %esi
10f344: 53 push %ebx
10f345: 83 ec 4c sub $0x4c,%esp
10f348: 8b 5d 08 mov 0x8(%ebp),%ebx
10f34b: 8b 45 10 mov 0x10(%ebp),%eax
Heap_Statistics *const stats = &heap->stats;
Heap_Block *const first_block = heap->first_block;
10f34e: 8b 4b 20 mov 0x20(%ebx),%ecx
10f351: 89 4d b8 mov %ecx,-0x48(%ebp)
Heap_Block *start_block = first_block;
Heap_Block *merge_below_block = NULL;
Heap_Block *merge_above_block = NULL;
Heap_Block *link_below_block = NULL;
Heap_Block *link_above_block = NULL;
Heap_Block *extend_first_block = NULL;
10f354: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
Heap_Block *extend_last_block = NULL;
10f35b: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
uintptr_t const page_size = heap->page_size;
10f362: 8b 73 10 mov 0x10(%ebx),%esi
10f365: 89 75 bc mov %esi,-0x44(%ebp)
uintptr_t const min_block_size = heap->min_block_size;
10f368: 8b 53 14 mov 0x14(%ebx),%edx
uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr;
uintptr_t const extend_area_end = extend_area_begin + extend_area_size;
uintptr_t const free_size = stats->free_size;
10f36b: 8b 4b 30 mov 0x30(%ebx),%ecx
10f36e: 89 4d b4 mov %ecx,-0x4c(%ebp)
uintptr_t extend_first_block_size = 0;
uintptr_t extended_size = 0;
bool extend_area_ok = false;
if ( extend_area_end < extend_area_begin ) {
10f371: 8b 75 0c mov 0xc(%ebp),%esi
10f374: 01 c6 add %eax,%esi
10f376: 89 75 d4 mov %esi,-0x2c(%ebp)
10f379: 73 07 jae 10f382 <_Heap_Extend+0x43>
return false;
10f37b: 31 c0 xor %eax,%eax
10f37d: e9 cb 01 00 00 jmp 10f54d <_Heap_Extend+0x20e>
}
extend_area_ok = _Heap_Get_first_and_last_block(
10f382: 51 push %ecx
10f383: 51 push %ecx
10f384: 8d 4d e4 lea -0x1c(%ebp),%ecx
10f387: 51 push %ecx
10f388: 8d 4d e0 lea -0x20(%ebp),%ecx
10f38b: 51 push %ecx
10f38c: 52 push %edx
10f38d: ff 75 bc pushl -0x44(%ebp)
10f390: 50 push %eax
10f391: ff 75 0c pushl 0xc(%ebp)
10f394: e8 89 b8 ff ff call 10ac22 <_Heap_Get_first_and_last_block>
page_size,
min_block_size,
&extend_first_block,
&extend_last_block
);
if (!extend_area_ok ) {
10f399: 83 c4 20 add $0x20,%esp
10f39c: 84 c0 test %al,%al
10f39e: 74 db je 10f37b <_Heap_Extend+0x3c>
10f3a0: 8b 4d b8 mov -0x48(%ebp),%ecx
10f3a3: c7 45 c8 00 00 00 00 movl $0x0,-0x38(%ebp)
10f3aa: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp)
10f3b1: 31 ff xor %edi,%edi
10f3b3: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp)
return false;
}
do {
uintptr_t const sub_area_begin = (start_block != first_block) ?
(uintptr_t) start_block : heap->area_begin;
10f3ba: 8b 73 18 mov 0x18(%ebx),%esi
10f3bd: 89 75 c0 mov %esi,-0x40(%ebp)
10f3c0: eb 03 jmp 10f3c5 <_Heap_Extend+0x86>
10f3c2: 89 4d c0 mov %ecx,-0x40(%ebp)
uintptr_t const sub_area_end = start_block->prev_size;
10f3c5: 8b 01 mov (%ecx),%eax
10f3c7: 89 45 d0 mov %eax,-0x30(%ebp)
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
10f3ca: 89 c6 mov %eax,%esi
10f3cc: 83 ee 08 sub $0x8,%esi
10f3cf: 31 d2 xor %edx,%edx
10f3d1: f7 75 bc divl -0x44(%ebp)
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
10f3d4: 29 d6 sub %edx,%esi
Heap_Block *const end_block =
_Heap_Block_of_alloc_area( sub_area_end, page_size );
if (
10f3d6: 8b 55 c0 mov -0x40(%ebp),%edx
10f3d9: 39 55 d4 cmp %edx,-0x2c(%ebp)
10f3dc: 76 08 jbe 10f3e6 <_Heap_Extend+0xa7>
10f3de: 8b 45 d0 mov -0x30(%ebp),%eax
10f3e1: 39 45 0c cmp %eax,0xc(%ebp)
10f3e4: 72 95 jb 10f37b <_Heap_Extend+0x3c>
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
) {
return false;
}
if ( extend_area_end == sub_area_begin ) {
10f3e6: 8b 55 c0 mov -0x40(%ebp),%edx
10f3e9: 39 55 d4 cmp %edx,-0x2c(%ebp)
10f3ec: 74 0a je 10f3f8 <_Heap_Extend+0xb9>
merge_below_block = start_block;
} else if ( extend_area_end < sub_area_end ) {
10f3ee: 8b 45 d0 mov -0x30(%ebp),%eax
10f3f1: 39 45 d4 cmp %eax,-0x2c(%ebp)
10f3f4: 72 07 jb 10f3fd <_Heap_Extend+0xbe>
10f3f6: eb 08 jmp 10f400 <_Heap_Extend+0xc1>
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
) {
return false;
}
if ( extend_area_end == sub_area_begin ) {
10f3f8: 89 4d cc mov %ecx,-0x34(%ebp)
10f3fb: eb 03 jmp 10f400 <_Heap_Extend+0xc1>
merge_below_block = start_block;
} else if ( extend_area_end < sub_area_end ) {
10f3fd: 89 4d c4 mov %ecx,-0x3c(%ebp)
link_below_block = start_block;
}
if ( sub_area_end == extend_area_begin ) {
10f400: 8b 55 0c mov 0xc(%ebp),%edx
10f403: 39 55 d0 cmp %edx,-0x30(%ebp)
10f406: 75 09 jne 10f411 <_Heap_Extend+0xd2>
start_block->prev_size = extend_area_end;
10f408: 8b 45 d4 mov -0x2c(%ebp),%eax
10f40b: 89 01 mov %eax,(%ecx)
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 )
10f40d: 89 f7 mov %esi,%edi
10f40f: eb 05 jmp 10f416 <_Heap_Extend+0xd7>
merge_above_block = end_block;
} else if ( sub_area_end < extend_area_begin ) {
10f411: 73 03 jae 10f416 <_Heap_Extend+0xd7>
10f413: 89 75 c8 mov %esi,-0x38(%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;
10f416: 8b 4e 04 mov 0x4(%esi),%ecx
10f419: 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);
10f41c: 01 f1 add %esi,%ecx
link_above_block = end_block;
}
start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) );
} while ( start_block != first_block );
10f41e: 3b 4d b8 cmp -0x48(%ebp),%ecx
10f421: 75 9f jne 10f3c2 <_Heap_Extend+0x83>
if ( extend_area_begin < heap->area_begin ) {
10f423: 8b 4d 0c mov 0xc(%ebp),%ecx
10f426: 3b 4b 18 cmp 0x18(%ebx),%ecx
10f429: 73 05 jae 10f430 <_Heap_Extend+0xf1>
heap->area_begin = extend_area_begin;
10f42b: 89 4b 18 mov %ecx,0x18(%ebx)
10f42e: eb 0b jmp 10f43b <_Heap_Extend+0xfc>
} else if ( heap->area_end < extend_area_end ) {
10f430: 8b 75 d4 mov -0x2c(%ebp),%esi
10f433: 39 73 1c cmp %esi,0x1c(%ebx)
10f436: 73 03 jae 10f43b <_Heap_Extend+0xfc>
heap->area_end = extend_area_end;
10f438: 89 73 1c mov %esi,0x1c(%ebx)
}
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
10f43b: 8b 45 e4 mov -0x1c(%ebp),%eax
10f43e: 8b 55 e0 mov -0x20(%ebp),%edx
heap->area_begin = extend_area_begin;
} else if ( heap->area_end < extend_area_end ) {
heap->area_end = extend_area_end;
}
extend_first_block_size =
10f441: 89 c1 mov %eax,%ecx
10f443: 29 d1 sub %edx,%ecx
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
extend_first_block->prev_size = extend_area_end;
10f445: 8b 75 d4 mov -0x2c(%ebp),%esi
10f448: 89 32 mov %esi,(%edx)
extend_first_block->size_and_flag =
extend_first_block_size | HEAP_PREV_BLOCK_USED;
10f44a: 89 ce mov %ecx,%esi
10f44c: 83 ce 01 or $0x1,%esi
10f44f: 89 72 04 mov %esi,0x4(%edx)
_Heap_Protection_block_initialize( heap, extend_first_block );
extend_last_block->prev_size = extend_first_block_size;
10f452: 89 08 mov %ecx,(%eax)
extend_last_block->size_and_flag = 0;
10f454: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax)
_Heap_Protection_block_initialize( heap, extend_last_block );
if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) {
10f45b: 39 53 20 cmp %edx,0x20(%ebx)
10f45e: 76 05 jbe 10f465 <_Heap_Extend+0x126>
heap->first_block = extend_first_block;
10f460: 89 53 20 mov %edx,0x20(%ebx)
10f463: eb 08 jmp 10f46d <_Heap_Extend+0x12e>
} else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) {
10f465: 39 43 24 cmp %eax,0x24(%ebx)
10f468: 73 03 jae 10f46d <_Heap_Extend+0x12e>
heap->last_block = extend_last_block;
10f46a: 89 43 24 mov %eax,0x24(%ebx)
}
if ( merge_below_block != NULL ) {
10f46d: 83 7d cc 00 cmpl $0x0,-0x34(%ebp)
10f471: 74 35 je 10f4a8 <_Heap_Extend+0x169>
Heap_Control *heap,
uintptr_t extend_area_begin,
Heap_Block *first_block
)
{
uintptr_t const page_size = heap->page_size;
10f473: 8b 73 10 mov 0x10(%ebx),%esi
uintptr_t const new_first_block_alloc_begin =
_Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size );
10f476: 8b 4d 0c mov 0xc(%ebp),%ecx
10f479: 83 c1 08 add $0x8,%ecx
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up(
uintptr_t value,
uintptr_t alignment
)
{
uintptr_t remainder = value % alignment;
10f47c: 89 c8 mov %ecx,%eax
10f47e: 31 d2 xor %edx,%edx
10f480: f7 f6 div %esi
if ( remainder != 0 ) {
10f482: 85 d2 test %edx,%edx
10f484: 74 04 je 10f48a <_Heap_Extend+0x14b>
return value - remainder + alignment;
10f486: 01 f1 add %esi,%ecx
10f488: 29 d1 sub %edx,%ecx
uintptr_t const new_first_block_begin =
10f48a: 8d 51 f8 lea -0x8(%ecx),%edx
uintptr_t const first_block_begin = (uintptr_t) first_block;
uintptr_t const new_first_block_size =
first_block_begin - new_first_block_begin;
Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin;
new_first_block->prev_size = first_block->prev_size;
10f48d: 8b 75 cc mov -0x34(%ebp),%esi
10f490: 8b 06 mov (%esi),%eax
10f492: 89 41 f8 mov %eax,-0x8(%ecx)
uintptr_t const new_first_block_alloc_begin =
_Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size );
uintptr_t const new_first_block_begin =
new_first_block_alloc_begin - HEAP_BLOCK_HEADER_SIZE;
uintptr_t const first_block_begin = (uintptr_t) first_block;
uintptr_t const new_first_block_size =
10f495: 89 f0 mov %esi,%eax
10f497: 29 d0 sub %edx,%eax
first_block_begin - new_first_block_begin;
Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin;
new_first_block->prev_size = first_block->prev_size;
new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED;
10f499: 83 c8 01 or $0x1,%eax
10f49c: 89 42 04 mov %eax,0x4(%edx)
_Heap_Free_block( heap, new_first_block );
10f49f: 89 d8 mov %ebx,%eax
10f4a1: e8 7e fe ff ff call 10f324 <_Heap_Free_block>
10f4a6: eb 11 jmp 10f4b9 <_Heap_Extend+0x17a>
heap->last_block = extend_last_block;
}
if ( merge_below_block != NULL ) {
_Heap_Merge_below( heap, extend_area_begin, merge_below_block );
} else if ( link_below_block != NULL ) {
10f4a8: 83 7d c4 00 cmpl $0x0,-0x3c(%ebp)
10f4ac: 74 0b je 10f4b9 <_Heap_Extend+0x17a>
{
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const link_begin = (uintptr_t) link;
last_block->size_and_flag =
(link_begin - last_block_begin) | HEAP_PREV_BLOCK_USED;
10f4ae: 8b 55 c4 mov -0x3c(%ebp),%edx
10f4b1: 29 c2 sub %eax,%edx
10f4b3: 83 ca 01 or $0x1,%edx
10f4b6: 89 50 04 mov %edx,0x4(%eax)
link_below_block,
extend_last_block
);
}
if ( merge_above_block != NULL ) {
10f4b9: 85 ff test %edi,%edi
10f4bb: 74 33 je 10f4f0 <_Heap_Extend+0x1b1>
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const last_block_new_size = _Heap_Align_down(
extend_area_end - last_block_begin - HEAP_BLOCK_HEADER_SIZE,
10f4bd: 8b 4d d4 mov -0x2c(%ebp),%ecx
10f4c0: 83 e9 08 sub $0x8,%ecx
uintptr_t extend_area_end
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const last_block_new_size = _Heap_Align_down(
10f4c3: 29 f9 sub %edi,%ecx
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
10f4c5: 89 c8 mov %ecx,%eax
10f4c7: 31 d2 xor %edx,%edx
10f4c9: f7 73 10 divl 0x10(%ebx)
10f4cc: 29 d1 sub %edx,%ecx
);
Heap_Block *const new_last_block =
_Heap_Block_at( last_block, last_block_new_size );
new_last_block->size_and_flag =
(last_block->size_and_flag - last_block_new_size)
10f4ce: 8b 47 04 mov 0x4(%edi),%eax
10f4d1: 29 c8 sub %ecx,%eax
| HEAP_PREV_BLOCK_USED;
10f4d3: 83 c8 01 or $0x1,%eax
10f4d6: 89 44 39 04 mov %eax,0x4(%ecx,%edi,1)
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
10f4da: 8b 47 04 mov 0x4(%edi),%eax
10f4dd: 83 e0 01 and $0x1,%eax
block->size_and_flag = size | flag;
10f4e0: 09 c8 or %ecx,%eax
10f4e2: 89 47 04 mov %eax,0x4(%edi)
_Heap_Block_set_size( last_block, last_block_new_size );
_Heap_Free_block( heap, last_block );
10f4e5: 89 fa mov %edi,%edx
10f4e7: 89 d8 mov %ebx,%eax
10f4e9: e8 36 fe ff ff call 10f324 <_Heap_Free_block>
10f4ee: eb 20 jmp 10f510 <_Heap_Extend+0x1d1>
);
}
if ( merge_above_block != NULL ) {
_Heap_Merge_above( heap, merge_above_block, extend_area_end );
} else if ( link_above_block != NULL ) {
10f4f0: 83 7d c8 00 cmpl $0x0,-0x38(%ebp)
10f4f4: 74 1a je 10f510 <_Heap_Extend+0x1d1>
_Heap_Link_above(
10f4f6: 8b 4d e4 mov -0x1c(%ebp),%ecx
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
10f4f9: 8b 75 c8 mov -0x38(%ebp),%esi
10f4fc: 8b 46 04 mov 0x4(%esi),%eax
10f4ff: 83 e0 01 and $0x1,%eax
)
{
uintptr_t const link_begin = (uintptr_t) link;
uintptr_t const first_block_begin = (uintptr_t) first_block;
_Heap_Block_set_size( link, first_block_begin - link_begin );
10f502: 8b 55 e0 mov -0x20(%ebp),%edx
10f505: 29 f2 sub %esi,%edx
block->size_and_flag = size | flag;
10f507: 09 d0 or %edx,%eax
10f509: 89 46 04 mov %eax,0x4(%esi)
last_block->size_and_flag |= HEAP_PREV_BLOCK_USED;
10f50c: 83 49 04 01 orl $0x1,0x4(%ecx)
extend_first_block,
extend_last_block
);
}
if ( merge_below_block == NULL && merge_above_block == NULL ) {
10f510: 85 ff test %edi,%edi
10f512: 75 10 jne 10f524 <_Heap_Extend+0x1e5>
10f514: 83 7d cc 00 cmpl $0x0,-0x34(%ebp)
10f518: 75 0a jne 10f524 <_Heap_Extend+0x1e5>
_Heap_Free_block( heap, extend_first_block );
10f51a: 8b 55 e0 mov -0x20(%ebp),%edx
10f51d: 89 d8 mov %ebx,%eax
10f51f: e8 00 fe ff ff call 10f324 <_Heap_Free_block>
*/
RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap )
{
_Heap_Block_set_size(
heap->last_block,
(uintptr_t) heap->first_block - (uintptr_t) heap->last_block
10f524: 8b 53 24 mov 0x24(%ebx),%edx
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
10f527: 8b 42 04 mov 0x4(%edx),%eax
10f52a: 83 e0 01 and $0x1,%eax
* This feature will be used to terminate the scattered heap area list. See
* also _Heap_Extend().
*/
RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap )
{
_Heap_Block_set_size(
10f52d: 8b 4b 20 mov 0x20(%ebx),%ecx
10f530: 29 d1 sub %edx,%ecx
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
block->size_and_flag = size | flag;
10f532: 09 c8 or %ecx,%eax
10f534: 89 42 04 mov %eax,0x4(%edx)
}
_Heap_Set_last_block_size( heap );
extended_size = stats->free_size - free_size;
10f537: 8b 43 30 mov 0x30(%ebx),%eax
10f53a: 2b 45 b4 sub -0x4c(%ebp),%eax
/* Statistics */
stats->size += extended_size;
10f53d: 01 43 2c add %eax,0x2c(%ebx)
if ( extended_size_ptr != NULL )
10f540: 83 7d 14 00 cmpl $0x0,0x14(%ebp)
10f544: 74 05 je 10f54b <_Heap_Extend+0x20c> <== NEVER TAKEN
*extended_size_ptr = extended_size;
10f546: 8b 4d 14 mov 0x14(%ebp),%ecx
10f549: 89 01 mov %eax,(%ecx)
return true;
10f54b: b0 01 mov $0x1,%al
}
10f54d: 8d 65 f4 lea -0xc(%ebp),%esp
10f550: 5b pop %ebx
10f551: 5e pop %esi
10f552: 5f pop %edi
10f553: 5d pop %ebp
10f554: c3 ret
0010f2d4 <_Heap_Free>:
return do_free;
}
#endif
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
10f2d4: 55 push %ebp
10f2d5: 89 e5 mov %esp,%ebp
10f2d7: 57 push %edi
10f2d8: 56 push %esi
10f2d9: 53 push %ebx
10f2da: 83 ec 14 sub $0x14,%esp
10f2dd: 8b 4d 08 mov 0x8(%ebp),%ecx
10f2e0: 8b 45 0c mov 0xc(%ebp),%eax
/*
* If NULL return true so a free on NULL is considered a valid release. This
* is a special case that could be handled by the in heap check how-ever that
* would result in false being returned which is wrong.
*/
if ( alloc_begin_ptr == NULL ) {
10f2e3: 85 c0 test %eax,%eax
10f2e5: 0f 84 46 01 00 00 je 10f431 <_Heap_Free+0x15d>
10f2eb: 8d 58 f8 lea -0x8(%eax),%ebx
10f2ee: 31 d2 xor %edx,%edx
10f2f0: f7 71 10 divl 0x10(%ecx)
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
10f2f3: 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
10f2f5: 8b 41 20 mov 0x20(%ecx),%eax
10f2f8: 89 45 e8 mov %eax,-0x18(%ebp)
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
10f2fb: 31 d2 xor %edx,%edx
10f2fd: 39 c3 cmp %eax,%ebx
10f2ff: 72 08 jb 10f309 <_Heap_Free+0x35>
10f301: 31 d2 xor %edx,%edx
10f303: 39 59 24 cmp %ebx,0x24(%ecx)
10f306: 0f 93 c2 setae %dl
alloc_begin = (uintptr_t) alloc_begin_ptr;
block = _Heap_Block_of_alloc_area( alloc_begin, heap->page_size );
if ( !_Heap_Is_block_in_heap( heap, block ) ) {
return false;
10f309: 31 c0 xor %eax,%eax
}
alloc_begin = (uintptr_t) alloc_begin_ptr;
block = _Heap_Block_of_alloc_area( alloc_begin, heap->page_size );
if ( !_Heap_Is_block_in_heap( heap, block ) ) {
10f30b: 85 d2 test %edx,%edx
10f30d: 0f 84 20 01 00 00 je 10f433 <_Heap_Free+0x15f>
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
10f313: 8b 43 04 mov 0x4(%ebx),%eax
10f316: 89 45 ec mov %eax,-0x14(%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;
10f319: 89 c7 mov %eax,%edi
10f31b: 83 e7 fe and $0xfffffffe,%edi
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
10f31e: 8d 14 1f lea (%edi,%ebx,1),%edx
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;
10f321: 31 f6 xor %esi,%esi
10f323: 3b 55 e8 cmp -0x18(%ebp),%edx
10f326: 72 0a jb 10f332 <_Heap_Free+0x5e> <== NEVER TAKEN
10f328: 31 c0 xor %eax,%eax
10f32a: 39 51 24 cmp %edx,0x24(%ecx)
10f32d: 0f 93 c0 setae %al
10f330: 89 c6 mov %eax,%esi
alloc_begin = (uintptr_t) alloc_begin_ptr;
block = _Heap_Block_of_alloc_area( alloc_begin, heap->page_size );
if ( !_Heap_Is_block_in_heap( heap, block ) ) {
return false;
10f332: 31 c0 xor %eax,%eax
_Heap_Protection_block_check( heap, block );
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
10f334: 85 f6 test %esi,%esi
10f336: 0f 84 f7 00 00 00 je 10f433 <_Heap_Free+0x15f> <== NEVER TAKEN
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
10f33c: 8b 72 04 mov 0x4(%edx),%esi
return false;
}
_Heap_Protection_block_check( heap, next_block );
if ( !_Heap_Is_prev_used( next_block ) ) {
10f33f: f7 c6 01 00 00 00 test $0x1,%esi
10f345: 0f 84 e8 00 00 00 je 10f433 <_Heap_Free+0x15f> <== 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;
10f34b: 83 e6 fe and $0xfffffffe,%esi
10f34e: 89 75 f0 mov %esi,-0x10(%ebp)
if ( !_Heap_Protection_determine_block_free( heap, block ) ) {
return true;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
10f351: 8b 41 24 mov 0x24(%ecx),%eax
10f354: 89 45 e0 mov %eax,-0x20(%ebp)
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
10f357: 39 c2 cmp %eax,%edx
10f359: 74 0c je 10f367 <_Heap_Free+0x93>
10f35b: 8b 74 32 04 mov 0x4(%edx,%esi,1),%esi
10f35f: 83 f6 01 xor $0x1,%esi
10f362: 83 e6 01 and $0x1,%esi
10f365: eb 02 jmp 10f369 <_Heap_Free+0x95>
10f367: 31 f6 xor %esi,%esi
if ( !_Heap_Protection_determine_block_free( heap, block ) ) {
return true;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
10f369: 89 f0 mov %esi,%eax
10f36b: 88 45 e7 mov %al,-0x19(%ebp)
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
if ( !_Heap_Is_prev_used( block ) ) {
10f36e: f6 45 ec 01 testb $0x1,-0x14(%ebp)
10f372: 75 5e jne 10f3d2 <_Heap_Free+0xfe>
uintptr_t const prev_size = block->prev_size;
10f374: 8b 33 mov (%ebx),%esi
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
10f376: 29 f3 sub %esi,%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;
10f378: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp)
10f37f: 3b 5d e8 cmp -0x18(%ebp),%ebx
10f382: 72 0b jb 10f38f <_Heap_Free+0xbb> <== NEVER TAKEN
10f384: 31 c0 xor %eax,%eax
10f386: 39 5d e0 cmp %ebx,-0x20(%ebp)
10f389: 0f 93 c0 setae %al
10f38c: 89 45 ec mov %eax,-0x14(%ebp)
alloc_begin = (uintptr_t) alloc_begin_ptr;
block = _Heap_Block_of_alloc_area( alloc_begin, heap->page_size );
if ( !_Heap_Is_block_in_heap( heap, block ) ) {
return false;
10f38f: 31 c0 xor %eax,%eax
if ( !_Heap_Is_prev_used( block ) ) {
uintptr_t const prev_size = block->prev_size;
Heap_Block * const prev_block = _Heap_Block_at( block, -prev_size );
if ( !_Heap_Is_block_in_heap( heap, prev_block ) ) {
10f391: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
10f395: 0f 84 98 00 00 00 je 10f433 <_Heap_Free+0x15f> <== 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) ) {
10f39b: f6 43 04 01 testb $0x1,0x4(%ebx)
10f39f: 0f 84 8e 00 00 00 je 10f433 <_Heap_Free+0x15f> <== NEVER TAKEN
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
10f3a5: 80 7d e7 00 cmpb $0x0,-0x19(%ebp)
10f3a9: 8d 34 37 lea (%edi,%esi,1),%esi
10f3ac: 74 14 je 10f3c2 <_Heap_Free+0xee>
uintptr_t const size = block_size + prev_size + next_block_size;
10f3ae: 03 75 f0 add -0x10(%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;
10f3b1: 8b 42 08 mov 0x8(%edx),%eax
Heap_Block *prev = block->prev;
10f3b4: 8b 52 0c mov 0xc(%edx),%edx
prev->next = next;
10f3b7: 89 42 08 mov %eax,0x8(%edx)
next->prev = prev;
10f3ba: 89 50 0c mov %edx,0xc(%eax)
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
10f3bd: ff 49 38 decl 0x38(%ecx)
10f3c0: eb 2d jmp 10f3ef <_Heap_Free+0x11b>
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
} else { /* coalesce prev */
uintptr_t const size = block_size + prev_size;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
10f3c2: 89 f0 mov %esi,%eax
10f3c4: 83 c8 01 or $0x1,%eax
10f3c7: 89 43 04 mov %eax,0x4(%ebx)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
10f3ca: 83 62 04 fe andl $0xfffffffe,0x4(%edx)
next_block->prev_size = size;
10f3ce: 89 32 mov %esi,(%edx)
10f3d0: eb 56 jmp 10f428 <_Heap_Free+0x154>
}
} else if ( next_is_free ) { /* coalesce next */
10f3d2: 80 7d e7 00 cmpb $0x0,-0x19(%ebp)
10f3d6: 74 24 je 10f3fc <_Heap_Free+0x128>
uintptr_t const size = block_size + next_block_size;
10f3d8: 8b 75 f0 mov -0x10(%ebp),%esi
10f3db: 01 fe add %edi,%esi
RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace(
Heap_Block *old_block,
Heap_Block *new_block
)
{
Heap_Block *next = old_block->next;
10f3dd: 8b 42 08 mov 0x8(%edx),%eax
Heap_Block *prev = old_block->prev;
10f3e0: 8b 52 0c mov 0xc(%edx),%edx
new_block->next = next;
10f3e3: 89 43 08 mov %eax,0x8(%ebx)
new_block->prev = prev;
10f3e6: 89 53 0c mov %edx,0xc(%ebx)
next->prev = new_block;
10f3e9: 89 58 0c mov %ebx,0xc(%eax)
prev->next = new_block;
10f3ec: 89 5a 08 mov %ebx,0x8(%edx)
_Heap_Free_list_replace( next_block, block );
block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
10f3ef: 89 f0 mov %esi,%eax
10f3f1: 83 c8 01 or $0x1,%eax
10f3f4: 89 43 04 mov %eax,0x4(%ebx)
next_block = _Heap_Block_at( block, size );
next_block->prev_size = size;
10f3f7: 89 34 1e mov %esi,(%esi,%ebx,1)
10f3fa: eb 2c jmp 10f428 <_Heap_Free+0x154>
RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after(
Heap_Block *block_before,
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
10f3fc: 8b 41 08 mov 0x8(%ecx),%eax
new_block->next = next;
10f3ff: 89 43 08 mov %eax,0x8(%ebx)
new_block->prev = block_before;
10f402: 89 4b 0c mov %ecx,0xc(%ebx)
block_before->next = new_block;
10f405: 89 59 08 mov %ebx,0x8(%ecx)
next->prev = new_block;
10f408: 89 58 0c mov %ebx,0xc(%eax)
} 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;
10f40b: 89 f8 mov %edi,%eax
10f40d: 83 c8 01 or $0x1,%eax
10f410: 89 43 04 mov %eax,0x4(%ebx)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
10f413: 83 62 04 fe andl $0xfffffffe,0x4(%edx)
next_block->prev_size = block_size;
10f417: 89 3a mov %edi,(%edx)
/* Statistics */
++stats->free_blocks;
10f419: 8b 41 38 mov 0x38(%ecx),%eax
10f41c: 40 inc %eax
10f41d: 89 41 38 mov %eax,0x38(%ecx)
if ( stats->max_free_blocks < stats->free_blocks ) {
10f420: 39 41 3c cmp %eax,0x3c(%ecx)
10f423: 73 03 jae 10f428 <_Heap_Free+0x154>
stats->max_free_blocks = stats->free_blocks;
10f425: 89 41 3c mov %eax,0x3c(%ecx)
}
}
/* Statistics */
--stats->used_blocks;
10f428: ff 49 40 decl 0x40(%ecx)
++stats->frees;
10f42b: ff 41 50 incl 0x50(%ecx)
stats->free_size += block_size;
10f42e: 01 79 30 add %edi,0x30(%ecx)
* If NULL return true so a free on NULL is considered a valid release. This
* is a special case that could be handled by the in heap check how-ever that
* would result in false being returned which is wrong.
*/
if ( alloc_begin_ptr == NULL ) {
return true;
10f431: b0 01 mov $0x1,%al
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
10f433: 83 c4 14 add $0x14,%esp
10f436: 5b pop %ebx
10f437: 5e pop %esi
10f438: 5f pop %edi
10f439: 5d pop %ebp
10f43a: c3 ret
0010c528 <_Heap_Greedy_allocate>:
Heap_Block *_Heap_Greedy_allocate(
Heap_Control *heap,
const uintptr_t *block_sizes,
size_t block_count
)
{
10c528: 55 push %ebp
10c529: 89 e5 mov %esp,%ebp
10c52b: 57 push %edi
10c52c: 56 push %esi
10c52d: 53 push %ebx
10c52e: 83 ec 1c sub $0x1c,%esp
10c531: 8b 5d 08 mov 0x8(%ebp),%ebx
Heap_Block *allocated_blocks = NULL;
Heap_Block *blocks = NULL;
Heap_Block *current;
size_t i;
for (i = 0; i < block_count; ++i) {
10c534: 31 f6 xor %esi,%esi
const uintptr_t *block_sizes,
size_t block_count
)
{
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
Heap_Block *allocated_blocks = NULL;
10c536: 31 c9 xor %ecx,%ecx
Heap_Block *blocks = NULL;
Heap_Block *current;
size_t i;
for (i = 0; i < block_count; ++i) {
10c538: eb 2d jmp 10c567 <_Heap_Greedy_allocate+0x3f>
* @brief See _Heap_Allocate_aligned_with_boundary() with alignment and
* boundary equals zero.
*/
RTEMS_INLINE_ROUTINE void *_Heap_Allocate( Heap_Control *heap, uintptr_t size )
{
return _Heap_Allocate_aligned_with_boundary( heap, size, 0, 0 );
10c53a: 6a 00 push $0x0
10c53c: 6a 00 push $0x0
10c53e: 8b 45 0c mov 0xc(%ebp),%eax
10c541: ff 34 b0 pushl (%eax,%esi,4)
10c544: 53 push %ebx
10c545: 89 4d e4 mov %ecx,-0x1c(%ebp)
10c548: e8 bb 67 00 00 call 112d08 <_Heap_Allocate_aligned_with_boundary>
void *next = _Heap_Allocate( heap, block_sizes [i] );
if ( next != NULL ) {
10c54d: 83 c4 10 add $0x10,%esp
10c550: 85 c0 test %eax,%eax
10c552: 8b 4d e4 mov -0x1c(%ebp),%ecx
10c555: 74 0f je 10c566 <_Heap_Greedy_allocate+0x3e><== NEVER TAKEN
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
10c557: 8d 78 f8 lea -0x8(%eax),%edi
10c55a: 31 d2 xor %edx,%edx
10c55c: f7 73 10 divl 0x10(%ebx)
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
10c55f: 29 d7 sub %edx,%edi
Heap_Block *next_block = _Heap_Block_of_alloc_area(
(uintptr_t) next,
heap->page_size
);
next_block->next = allocated_blocks;
10c561: 89 4f 08 mov %ecx,0x8(%edi)
10c564: 89 f9 mov %edi,%ecx
Heap_Block *allocated_blocks = NULL;
Heap_Block *blocks = NULL;
Heap_Block *current;
size_t i;
for (i = 0; i < block_count; ++i) {
10c566: 46 inc %esi
10c567: 3b 75 10 cmp 0x10(%ebp),%esi
10c56a: 75 ce jne 10c53a <_Heap_Greedy_allocate+0x12>
10c56c: 31 f6 xor %esi,%esi
10c56e: eb 23 jmp 10c593 <_Heap_Greedy_allocate+0x6b>
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
10c570: 8b 47 04 mov 0x4(%edi),%eax
10c573: 83 e0 fe and $0xfffffffe,%eax
allocated_blocks = next_block;
}
}
while ( (current = _Heap_Free_list_first( heap )) != free_list_tail ) {
_Heap_Block_allocate(
10c576: 83 e8 08 sub $0x8,%eax
10c579: 50 push %eax
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
10c57a: 8d 47 08 lea 0x8(%edi),%eax
10c57d: 50 push %eax
10c57e: 57 push %edi
10c57f: 53 push %ebx
10c580: 89 4d e4 mov %ecx,-0x1c(%ebp)
10c583: e8 8e 02 00 00 call 10c816 <_Heap_Block_allocate>
current,
_Heap_Alloc_area_of_block( current ),
_Heap_Block_size( current ) - HEAP_BLOCK_HEADER_SIZE
);
current->next = blocks;
10c588: 89 77 08 mov %esi,0x8(%edi)
10c58b: 89 fe mov %edi,%esi
10c58d: 83 c4 10 add $0x10,%esp
10c590: 8b 4d e4 mov -0x1c(%ebp),%ecx
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
10c593: 8b 7b 08 mov 0x8(%ebx),%edi
next_block->next = allocated_blocks;
allocated_blocks = next_block;
}
}
while ( (current = _Heap_Free_list_first( heap )) != free_list_tail ) {
10c596: 39 df cmp %ebx,%edi
10c598: 75 d6 jne 10c570 <_Heap_Greedy_allocate+0x48>
10c59a: eb 14 jmp 10c5b0 <_Heap_Greedy_allocate+0x88>
blocks = current;
}
while ( allocated_blocks != NULL ) {
current = allocated_blocks;
allocated_blocks = allocated_blocks->next;
10c59c: 8b 79 08 mov 0x8(%ecx),%edi
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( current ) );
10c59f: 50 push %eax
10c5a0: 50 push %eax
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
10c5a1: 83 c1 08 add $0x8,%ecx
10c5a4: 51 push %ecx
10c5a5: 53 push %ebx
10c5a6: e8 b5 68 00 00 call 112e60 <_Heap_Free>
10c5ab: 83 c4 10 add $0x10,%esp
blocks = current;
}
while ( allocated_blocks != NULL ) {
current = allocated_blocks;
allocated_blocks = allocated_blocks->next;
10c5ae: 89 f9 mov %edi,%ecx
current->next = blocks;
blocks = current;
}
while ( allocated_blocks != NULL ) {
10c5b0: 85 c9 test %ecx,%ecx
10c5b2: 75 e8 jne 10c59c <_Heap_Greedy_allocate+0x74>
allocated_blocks = allocated_blocks->next;
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( current ) );
}
return blocks;
}
10c5b4: 89 f0 mov %esi,%eax
10c5b6: 8d 65 f4 lea -0xc(%ebp),%esp
10c5b9: 5b pop %ebx
10c5ba: 5e pop %esi
10c5bb: 5f pop %edi
10c5bc: 5d pop %ebp
10c5bd: c3 ret
00112620 <_Heap_Iterate>:
void _Heap_Iterate(
Heap_Control *heap,
Heap_Block_visitor visitor,
void *visitor_arg
)
{
112620: 55 push %ebp
112621: 89 e5 mov %esp,%ebp
112623: 56 push %esi
112624: 53 push %ebx
112625: 8b 45 08 mov 0x8(%ebp),%eax
Heap_Block *current = heap->first_block;
112628: 8b 50 20 mov 0x20(%eax),%edx
Heap_Block *end = heap->last_block;
11262b: 8b 58 24 mov 0x24(%eax),%ebx
bool stop = false;
11262e: 31 c0 xor %eax,%eax
while ( !stop && current != end ) {
112630: eb 1f jmp 112651 <_Heap_Iterate+0x31>
112632: 8b 42 04 mov 0x4(%edx),%eax
112635: 83 e0 fe and $0xfffffffe,%eax
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
112638: 8d 34 02 lea (%edx,%eax,1),%esi
uintptr_t size = _Heap_Block_size( current );
Heap_Block *next = _Heap_Block_at( current, size );
bool used = _Heap_Is_prev_used( next );
stop = (*visitor)( current, size, used, visitor_arg );
11263b: ff 75 10 pushl 0x10(%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;
11263e: 8b 4e 04 mov 0x4(%esi),%ecx
112641: 83 e1 01 and $0x1,%ecx
112644: 51 push %ecx
112645: 50 push %eax
112646: 52 push %edx
112647: 8b 55 0c mov 0xc(%ebp),%edx
11264a: ff d2 call *%edx
11264c: 89 f2 mov %esi,%edx
11264e: 83 c4 10 add $0x10,%esp
{
Heap_Block *current = heap->first_block;
Heap_Block *end = heap->last_block;
bool stop = false;
while ( !stop && current != end ) {
112651: 39 da cmp %ebx,%edx
112653: 74 04 je 112659 <_Heap_Iterate+0x39>
112655: fe c8 dec %al
112657: 75 d9 jne 112632 <_Heap_Iterate+0x12> <== ALWAYS TAKEN
stop = (*visitor)( current, size, used, visitor_arg );
current = next;
}
}
112659: 8d 65 f8 lea -0x8(%ebp),%esp
11265c: 5b pop %ebx
11265d: 5e pop %esi
11265e: 5d pop %ebp
11265f: c3 ret
0010f534 <_Heap_Size_of_alloc_area>:
bool _Heap_Size_of_alloc_area(
Heap_Control *heap,
void *alloc_begin_ptr,
uintptr_t *alloc_size
)
{
10f534: 55 push %ebp
10f535: 89 e5 mov %esp,%ebp
10f537: 57 push %edi
10f538: 56 push %esi
10f539: 53 push %ebx
10f53a: 8b 5d 08 mov 0x8(%ebp),%ebx
10f53d: 8b 75 0c mov 0xc(%ebp),%esi
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
10f540: 8d 4e f8 lea -0x8(%esi),%ecx
10f543: 89 f0 mov %esi,%eax
10f545: 31 d2 xor %edx,%edx
10f547: f7 73 10 divl 0x10(%ebx)
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
10f54a: 29 d1 sub %edx,%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
10f54c: 8b 53 20 mov 0x20(%ebx),%edx
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
10f54f: 31 ff xor %edi,%edi
10f551: 39 d1 cmp %edx,%ecx
10f553: 72 0a jb 10f55f <_Heap_Size_of_alloc_area+0x2b>
10f555: 31 c0 xor %eax,%eax
10f557: 39 4b 24 cmp %ecx,0x24(%ebx)
10f55a: 0f 93 c0 setae %al
10f55d: 89 c7 mov %eax,%edi
Heap_Block *block = _Heap_Block_of_alloc_area( alloc_begin, page_size );
Heap_Block *next_block = NULL;
uintptr_t block_size = 0;
if ( !_Heap_Is_block_in_heap( heap, block ) ) {
return false;
10f55f: 31 c0 xor %eax,%eax
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 ) ) {
10f561: 85 ff test %edi,%edi
10f563: 74 30 je 10f595 <_Heap_Size_of_alloc_area+0x61>
- 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;
10f565: 8b 41 04 mov 0x4(%ecx),%eax
10f568: 83 e0 fe and $0xfffffffe,%eax
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
10f56b: 01 c1 add %eax,%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;
10f56d: 31 ff xor %edi,%edi
10f56f: 39 d1 cmp %edx,%ecx
10f571: 72 0a jb 10f57d <_Heap_Size_of_alloc_area+0x49><== NEVER TAKEN
10f573: 31 c0 xor %eax,%eax
10f575: 39 4b 24 cmp %ecx,0x24(%ebx)
10f578: 0f 93 c0 setae %al
10f57b: 89 c7 mov %eax,%edi
return false;
10f57d: 31 c0 xor %eax,%eax
}
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if (
10f57f: 85 ff test %edi,%edi
10f581: 74 12 je 10f595 <_Heap_Size_of_alloc_area+0x61><== NEVER TAKEN
!_Heap_Is_block_in_heap( heap, next_block )
|| !_Heap_Is_prev_used( next_block )
10f583: f6 41 04 01 testb $0x1,0x4(%ecx)
10f587: 74 0c je 10f595 <_Heap_Size_of_alloc_area+0x61><== NEVER TAKEN
) {
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin;
10f589: 29 f1 sub %esi,%ecx
10f58b: 8d 51 04 lea 0x4(%ecx),%edx
10f58e: 8b 45 10 mov 0x10(%ebp),%eax
10f591: 89 10 mov %edx,(%eax)
return true;
10f593: b0 01 mov $0x1,%al
}
10f595: 5b pop %ebx
10f596: 5e pop %esi
10f597: 5f pop %edi
10f598: 5d pop %ebp
10f599: c3 ret
0010b5d2 <_Heap_Walk>:
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
10b5d2: 55 push %ebp
10b5d3: 89 e5 mov %esp,%ebp
10b5d5: 57 push %edi
10b5d6: 56 push %esi
10b5d7: 53 push %ebx
10b5d8: 83 ec 3c sub $0x3c,%esp
10b5db: 8b 7d 0c mov 0xc(%ebp),%edi
uintptr_t const page_size = heap->page_size;
10b5de: 8b 4d 08 mov 0x8(%ebp),%ecx
10b5e1: 8b 49 10 mov 0x10(%ecx),%ecx
10b5e4: 89 4d e0 mov %ecx,-0x20(%ebp)
uintptr_t const min_block_size = heap->min_block_size;
10b5e7: 8b 4d 08 mov 0x8(%ebp),%ecx
10b5ea: 8b 49 14 mov 0x14(%ecx),%ecx
10b5ed: 89 4d d8 mov %ecx,-0x28(%ebp)
Heap_Block *const first_block = heap->first_block;
10b5f0: 8b 4d 08 mov 0x8(%ebp),%ecx
10b5f3: 8b 71 20 mov 0x20(%ecx),%esi
Heap_Block *const last_block = heap->last_block;
10b5f6: 8b 49 24 mov 0x24(%ecx),%ecx
10b5f9: 89 4d d4 mov %ecx,-0x2c(%ebp)
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
10b5fc: bb 94 b5 10 00 mov $0x10b594,%ebx
10b601: 80 7d 10 00 cmpb $0x0,0x10(%ebp)
10b605: 74 05 je 10b60c <_Heap_Walk+0x3a>
10b607: bb 99 b5 10 00 mov $0x10b599,%ebx
if ( !_System_state_Is_up( _System_state_Get() ) ) {
10b60c: 83 3d a8 05 13 00 03 cmpl $0x3,0x1305a8
10b613: 74 07 je 10b61c <_Heap_Walk+0x4a>
return true;
10b615: b0 01 mov $0x1,%al
10b617: e9 ec 02 00 00 jmp 10b908 <_Heap_Walk+0x336>
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)(
10b61c: 50 push %eax
10b61d: 8b 4d 08 mov 0x8(%ebp),%ecx
10b620: ff 71 0c pushl 0xc(%ecx)
10b623: ff 71 08 pushl 0x8(%ecx)
10b626: ff 75 d4 pushl -0x2c(%ebp)
10b629: 56 push %esi
10b62a: ff 71 1c pushl 0x1c(%ecx)
10b62d: ff 71 18 pushl 0x18(%ecx)
10b630: ff 75 d8 pushl -0x28(%ebp)
10b633: ff 75 e0 pushl -0x20(%ebp)
10b636: 68 e4 07 12 00 push $0x1207e4
10b63b: 6a 00 push $0x0
10b63d: 57 push %edi
10b63e: ff d3 call *%ebx
heap->area_begin, heap->area_end,
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
10b640: 83 c4 30 add $0x30,%esp
10b643: 83 7d e0 00 cmpl $0x0,-0x20(%ebp)
10b647: 75 0b jne 10b654 <_Heap_Walk+0x82>
(*printer)( source, true, "page size is zero\n" );
10b649: 50 push %eax
10b64a: 68 75 08 12 00 push $0x120875
10b64f: e9 d5 00 00 00 jmp 10b729 <_Heap_Walk+0x157>
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
10b654: f6 45 e0 03 testb $0x3,-0x20(%ebp)
10b658: 74 0d je 10b667 <_Heap_Walk+0x95>
(*printer)(
10b65a: ff 75 e0 pushl -0x20(%ebp)
10b65d: 68 88 08 12 00 push $0x120888
10b662: e9 c2 00 00 00 jmp 10b729 <_Heap_Walk+0x157>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
10b667: 8b 45 d8 mov -0x28(%ebp),%eax
10b66a: 31 d2 xor %edx,%edx
10b66c: f7 75 e0 divl -0x20(%ebp)
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
10b66f: 85 d2 test %edx,%edx
10b671: 74 0d je 10b680 <_Heap_Walk+0xae>
(*printer)(
10b673: ff 75 d8 pushl -0x28(%ebp)
10b676: 68 a6 08 12 00 push $0x1208a6
10b67b: e9 a9 00 00 00 jmp 10b729 <_Heap_Walk+0x157>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
10b680: 8d 46 08 lea 0x8(%esi),%eax
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
10b683: 31 d2 xor %edx,%edx
10b685: f7 75 e0 divl -0x20(%ebp)
);
return false;
}
if (
10b688: 85 d2 test %edx,%edx
10b68a: 74 0b je 10b697 <_Heap_Walk+0xc5>
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
10b68c: 56 push %esi
10b68d: 68 ca 08 12 00 push $0x1208ca
10b692: e9 92 00 00 00 jmp 10b729 <_Heap_Walk+0x157>
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
10b697: f6 46 04 01 testb $0x1,0x4(%esi)
10b69b: 75 0b jne 10b6a8 <_Heap_Walk+0xd6>
(*printer)(
10b69d: 50 push %eax
10b69e: 68 fb 08 12 00 push $0x1208fb
10b6a3: e9 81 00 00 00 jmp 10b729 <_Heap_Walk+0x157>
- 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;
10b6a8: 8b 4d d4 mov -0x2c(%ebp),%ecx
10b6ab: 8b 41 04 mov 0x4(%ecx),%eax
10b6ae: 83 e0 fe and $0xfffffffe,%eax
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
10b6b1: 01 c8 add %ecx,%eax
10b6b3: 89 45 d0 mov %eax,-0x30(%ebp)
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
10b6b6: f6 40 04 01 testb $0x1,0x4(%eax)
10b6ba: 75 08 jne 10b6c4 <_Heap_Walk+0xf2>
(*printer)(
10b6bc: 50 push %eax
10b6bd: 68 29 09 12 00 push $0x120929
10b6c2: eb 65 jmp 10b729 <_Heap_Walk+0x157>
);
return false;
}
if (
10b6c4: 39 75 d0 cmp %esi,-0x30(%ebp)
10b6c7: 74 08 je 10b6d1 <_Heap_Walk+0xff>
_Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block
) {
(*printer)(
10b6c9: 56 push %esi
10b6ca: 68 3e 09 12 00 push $0x12093e
10b6cf: eb 58 jmp 10b729 <_Heap_Walk+0x157>
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
10b6d1: 8b 4d 08 mov 0x8(%ebp),%ecx
10b6d4: 8b 49 10 mov 0x10(%ecx),%ecx
10b6d7: 89 4d e4 mov %ecx,-0x1c(%ebp)
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
10b6da: 8b 45 08 mov 0x8(%ebp),%eax
10b6dd: 8b 48 08 mov 0x8(%eax),%ecx
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
10b6e0: 89 c6 mov %eax,%esi
10b6e2: eb 6d jmp 10b751 <_Heap_Walk+0x17f>
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;
10b6e4: 31 c0 xor %eax,%eax
10b6e6: 8b 55 08 mov 0x8(%ebp),%edx
10b6e9: 39 4a 20 cmp %ecx,0x20(%edx)
10b6ec: 77 08 ja 10b6f6 <_Heap_Walk+0x124>
10b6ee: 31 c0 xor %eax,%eax
10b6f0: 39 4a 24 cmp %ecx,0x24(%edx)
10b6f3: 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 ) ) {
10b6f6: 85 c0 test %eax,%eax
10b6f8: 75 08 jne 10b702 <_Heap_Walk+0x130>
(*printer)(
10b6fa: 51 push %ecx
10b6fb: 68 6d 09 12 00 push $0x12096d
10b700: eb 27 jmp 10b729 <_Heap_Walk+0x157>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
10b702: 8d 41 08 lea 0x8(%ecx),%eax
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
10b705: 31 d2 xor %edx,%edx
10b707: f7 75 e4 divl -0x1c(%ebp)
);
return false;
}
if (
10b70a: 85 d2 test %edx,%edx
10b70c: 74 08 je 10b716 <_Heap_Walk+0x144>
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
10b70e: 51 push %ecx
10b70f: 68 8d 09 12 00 push $0x12098d
10b714: eb 13 jmp 10b729 <_Heap_Walk+0x157>
- 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;
10b716: 8b 41 04 mov 0x4(%ecx),%eax
10b719: 83 e0 fe and $0xfffffffe,%eax
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
10b71c: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1)
10b721: 74 13 je 10b736 <_Heap_Walk+0x164>
(*printer)(
10b723: 51 push %ecx
10b724: 68 bd 09 12 00 push $0x1209bd
10b729: 6a 01 push $0x1
10b72b: 57 push %edi
10b72c: ff d3 call *%ebx
10b72e: 83 c4 10 add $0x10,%esp
10b731: e9 c3 01 00 00 jmp 10b8f9 <_Heap_Walk+0x327>
);
return false;
}
if ( free_block->prev != prev_block ) {
10b736: 8b 41 0c mov 0xc(%ecx),%eax
10b739: 39 f0 cmp %esi,%eax
10b73b: 74 0f je 10b74c <_Heap_Walk+0x17a>
(*printer)(
10b73d: 83 ec 0c sub $0xc,%esp
10b740: 50 push %eax
10b741: 51 push %ecx
10b742: 68 d9 09 12 00 push $0x1209d9
10b747: e9 42 01 00 00 jmp 10b88e <_Heap_Walk+0x2bc>
return false;
}
prev_block = free_block;
free_block = free_block->next;
10b74c: 89 ce mov %ecx,%esi
10b74e: 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 ) {
10b751: 3b 4d 08 cmp 0x8(%ebp),%ecx
10b754: 75 8e jne 10b6e4 <_Heap_Walk+0x112>
10b756: 8b 75 d0 mov -0x30(%ebp),%esi
block = next_block;
} while ( block != first_block );
return true;
}
10b759: 8b 46 04 mov 0x4(%esi),%eax
10b75c: 89 c1 mov %eax,%ecx
10b75e: 83 e1 fe and $0xfffffffe,%ecx
10b761: 89 4d e4 mov %ecx,-0x1c(%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;
10b764: 83 e0 01 and $0x1,%eax
10b767: 89 45 c8 mov %eax,-0x38(%ebp)
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
10b76a: 01 f1 add %esi,%ecx
10b76c: 89 4d dc mov %ecx,-0x24(%ebp)
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
bool const prev_used = _Heap_Is_prev_used( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
bool const is_not_last_block = block != last_block;
10b76f: 3b 75 d4 cmp -0x2c(%ebp),%esi
10b772: 0f 95 c1 setne %cl
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;
10b775: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp)
10b77c: 8b 55 dc mov -0x24(%ebp),%edx
10b77f: 8b 45 08 mov 0x8(%ebp),%eax
10b782: 39 50 20 cmp %edx,0x20(%eax)
10b785: 77 0c ja 10b793 <_Heap_Walk+0x1c1> <== NEVER TAKEN
10b787: 39 50 24 cmp %edx,0x24(%eax)
10b78a: 0f 93 c0 setae %al
10b78d: 0f b6 c0 movzbl %al,%eax
10b790: 89 45 cc mov %eax,-0x34(%ebp)
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
10b793: 83 7d cc 00 cmpl $0x0,-0x34(%ebp)
10b797: 75 11 jne 10b7aa <_Heap_Walk+0x1d8>
(*printer)(
10b799: 83 ec 0c sub $0xc,%esp
10b79c: ff 75 dc pushl -0x24(%ebp)
10b79f: 56 push %esi
10b7a0: 68 0b 0a 12 00 push $0x120a0b
10b7a5: e9 e4 00 00 00 jmp 10b88e <_Heap_Walk+0x2bc>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
10b7aa: 8b 45 e4 mov -0x1c(%ebp),%eax
10b7ad: 31 d2 xor %edx,%edx
10b7af: f7 75 e0 divl -0x20(%ebp)
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
10b7b2: 85 d2 test %edx,%edx
10b7b4: 74 15 je 10b7cb <_Heap_Walk+0x1f9>
10b7b6: 84 c9 test %cl,%cl
10b7b8: 74 11 je 10b7cb <_Heap_Walk+0x1f9>
(*printer)(
10b7ba: 83 ec 0c sub $0xc,%esp
10b7bd: ff 75 e4 pushl -0x1c(%ebp)
10b7c0: 56 push %esi
10b7c1: 68 38 0a 12 00 push $0x120a38
10b7c6: e9 c3 00 00 00 jmp 10b88e <_Heap_Walk+0x2bc>
);
return false;
}
if ( block_size < min_block_size && is_not_last_block ) {
10b7cb: 8b 45 d8 mov -0x28(%ebp),%eax
10b7ce: 39 45 e4 cmp %eax,-0x1c(%ebp)
10b7d1: 73 15 jae 10b7e8 <_Heap_Walk+0x216>
10b7d3: 84 c9 test %cl,%cl
10b7d5: 74 11 je 10b7e8 <_Heap_Walk+0x216> <== NEVER TAKEN
(*printer)(
10b7d7: 51 push %ecx
10b7d8: 51 push %ecx
10b7d9: 50 push %eax
10b7da: ff 75 e4 pushl -0x1c(%ebp)
10b7dd: 56 push %esi
10b7de: 68 66 0a 12 00 push $0x120a66
10b7e3: e9 a6 00 00 00 jmp 10b88e <_Heap_Walk+0x2bc>
);
return false;
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
10b7e8: 3b 75 dc cmp -0x24(%ebp),%esi
10b7eb: 72 15 jb 10b802 <_Heap_Walk+0x230>
10b7ed: 84 c9 test %cl,%cl
10b7ef: 74 11 je 10b802 <_Heap_Walk+0x230>
(*printer)(
10b7f1: 83 ec 0c sub $0xc,%esp
10b7f4: ff 75 dc pushl -0x24(%ebp)
10b7f7: 56 push %esi
10b7f8: 68 91 0a 12 00 push $0x120a91
10b7fd: e9 8c 00 00 00 jmp 10b88e <_Heap_Walk+0x2bc>
);
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
10b802: 8b 4d dc mov -0x24(%ebp),%ecx
10b805: f6 41 04 01 testb $0x1,0x4(%ecx)
10b809: 0f 85 b0 00 00 00 jne 10b8bf <_Heap_Walk+0x2ed>
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
10b80f: 8b 45 08 mov 0x8(%ebp),%eax
10b812: 8b 48 08 mov 0x8(%eax),%ecx
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
10b815: 8b 56 08 mov 0x8(%esi),%edx
10b818: 89 55 c4 mov %edx,-0x3c(%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)(
10b81b: 3b 50 0c cmp 0xc(%eax),%edx
10b81e: 74 14 je 10b834 <_Heap_Walk+0x262>
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
10b820: b8 89 06 12 00 mov $0x120689,%eax
10b825: 8b 55 08 mov 0x8(%ebp),%edx
10b828: 39 55 c4 cmp %edx,-0x3c(%ebp)
10b82b: 75 0c jne 10b839 <_Heap_Walk+0x267>
10b82d: b8 c0 07 12 00 mov $0x1207c0,%eax
10b832: eb 05 jmp 10b839 <_Heap_Walk+0x267>
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)(
10b834: b8 b1 07 12 00 mov $0x1207b1,%eax
false,
"block 0x%08x: size %u, prev 0x%08x%s, next 0x%08x%s\n",
block,
block_size,
block->prev,
block->prev == first_free_block ?
10b839: 8b 56 0c mov 0xc(%esi),%edx
10b83c: 89 55 cc mov %edx,-0x34(%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)(
10b83f: 39 ca cmp %ecx,%edx
10b841: 74 14 je 10b857 <_Heap_Walk+0x285>
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
10b843: ba 89 06 12 00 mov $0x120689,%edx
10b848: 8b 4d 08 mov 0x8(%ebp),%ecx
10b84b: 39 4d cc cmp %ecx,-0x34(%ebp)
10b84e: 75 0c jne 10b85c <_Heap_Walk+0x28a>
10b850: ba da 07 12 00 mov $0x1207da,%edx
10b855: eb 05 jmp 10b85c <_Heap_Walk+0x28a>
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)(
10b857: ba ca 07 12 00 mov $0x1207ca,%edx
10b85c: 83 ec 0c sub $0xc,%esp
10b85f: 50 push %eax
10b860: ff 75 c4 pushl -0x3c(%ebp)
10b863: 52 push %edx
10b864: ff 75 cc pushl -0x34(%ebp)
10b867: ff 75 e4 pushl -0x1c(%ebp)
10b86a: 56 push %esi
10b86b: 68 c5 0a 12 00 push $0x120ac5
10b870: 6a 00 push $0x0
10b872: 57 push %edi
10b873: ff d3 call *%ebx
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
10b875: 8b 4d dc mov -0x24(%ebp),%ecx
10b878: 8b 01 mov (%ecx),%eax
10b87a: 83 c4 30 add $0x30,%esp
10b87d: 39 45 e4 cmp %eax,-0x1c(%ebp)
10b880: 74 16 je 10b898 <_Heap_Walk+0x2c6>
(*printer)(
10b882: 52 push %edx
10b883: 51 push %ecx
10b884: 50 push %eax
10b885: ff 75 e4 pushl -0x1c(%ebp)
10b888: 56 push %esi
10b889: 68 fa 0a 12 00 push $0x120afa
10b88e: 6a 01 push $0x1
10b890: 57 push %edi
10b891: ff d3 call *%ebx
10b893: 83 c4 20 add $0x20,%esp
10b896: eb 61 jmp 10b8f9 <_Heap_Walk+0x327>
);
return false;
}
if ( !prev_used ) {
10b898: 83 7d c8 00 cmpl $0x0,-0x38(%ebp)
10b89c: 75 0b jne 10b8a9 <_Heap_Walk+0x2d7>
(*printer)(
10b89e: 56 push %esi
10b89f: 68 33 0b 12 00 push $0x120b33
10b8a4: e9 80 fe ff ff jmp 10b729 <_Heap_Walk+0x157>
10b8a9: 8b 4d 08 mov 0x8(%ebp),%ecx
10b8ac: 8b 41 08 mov 0x8(%ecx),%eax
10b8af: eb 07 jmp 10b8b8 <_Heap_Walk+0x2e6>
{
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 ) {
10b8b1: 39 f0 cmp %esi,%eax
10b8b3: 74 33 je 10b8e8 <_Heap_Walk+0x316>
return true;
}
free_block = free_block->next;
10b8b5: 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 ) {
10b8b8: 3b 45 08 cmp 0x8(%ebp),%eax
10b8bb: 75 f4 jne 10b8b1 <_Heap_Walk+0x2df>
10b8bd: eb 3e jmp 10b8fd <_Heap_Walk+0x32b>
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
}
} else if (prev_used) {
10b8bf: 83 7d c8 00 cmpl $0x0,-0x38(%ebp)
10b8c3: 74 0e je 10b8d3 <_Heap_Walk+0x301>
(*printer)(
10b8c5: 83 ec 0c sub $0xc,%esp
10b8c8: ff 75 e4 pushl -0x1c(%ebp)
10b8cb: 56 push %esi
10b8cc: 68 62 0b 12 00 push $0x120b62
10b8d1: eb 0d jmp 10b8e0 <_Heap_Walk+0x30e>
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
10b8d3: 50 push %eax
10b8d4: 50 push %eax
10b8d5: ff 36 pushl (%esi)
10b8d7: ff 75 e4 pushl -0x1c(%ebp)
10b8da: 56 push %esi
10b8db: 68 79 0b 12 00 push $0x120b79
10b8e0: 6a 00 push $0x0
10b8e2: 57 push %edi
10b8e3: ff d3 call *%ebx
10b8e5: 83 c4 20 add $0x20,%esp
10b8e8: 8b 75 dc mov -0x24(%ebp),%esi
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
10b8eb: 3b 75 d0 cmp -0x30(%ebp),%esi
10b8ee: 0f 85 65 fe ff ff jne 10b759 <_Heap_Walk+0x187>
10b8f4: e9 1c fd ff ff jmp 10b615 <_Heap_Walk+0x43>
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
10b8f9: 31 c0 xor %eax,%eax
10b8fb: eb 0b jmp 10b908 <_Heap_Walk+0x336>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
10b8fd: 56 push %esi
10b8fe: 68 9e 0b 12 00 push $0x120b9e
10b903: e9 21 fe ff ff jmp 10b729 <_Heap_Walk+0x157>
block = next_block;
} while ( block != first_block );
return true;
}
10b908: 8d 65 f4 lea -0xc(%ebp),%esp
10b90b: 5b pop %ebx
10b90c: 5e pop %esi
10b90d: 5f pop %edi
10b90e: 5d pop %ebp
10b90f: c3 ret
0010adcc <_Internal_error_Occurred>:
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
10adcc: 55 push %ebp
10adcd: 89 e5 mov %esp,%ebp
10adcf: 53 push %ebx
10add0: 83 ec 08 sub $0x8,%esp
10add3: 8b 55 08 mov 0x8(%ebp),%edx
10add6: 8b 45 0c mov 0xc(%ebp),%eax
10add9: 8b 5d 10 mov 0x10(%ebp),%ebx
_Internal_errors_What_happened.the_source = the_source;
10addc: 89 15 64 e4 12 00 mov %edx,0x12e464
_Internal_errors_What_happened.is_internal = is_internal;
10ade2: a2 68 e4 12 00 mov %al,0x12e468
_Internal_errors_What_happened.the_error = the_error;
10ade7: 89 1d 6c e4 12 00 mov %ebx,0x12e46c
_User_extensions_Fatal( the_source, is_internal, the_error );
10aded: 53 push %ebx
10adee: 0f b6 c0 movzbl %al,%eax
10adf1: 50 push %eax
10adf2: 52 push %edx
10adf3: e8 01 1a 00 00 call 10c7f9 <_User_extensions_Fatal>
RTEMS_INLINE_ROUTINE void _System_state_Set (
System_state_Codes state
)
{
_System_state_Current = state;
10adf8: c7 05 20 e5 12 00 05 movl $0x5,0x12e520 <== NOT EXECUTED
10adff: 00 00 00
_System_state_Set( SYSTEM_STATE_FAILED );
_CPU_Fatal_halt( the_error );
10ae02: fa cli <== NOT EXECUTED
10ae03: 89 d8 mov %ebx,%eax <== NOT EXECUTED
10ae05: f4 hlt <== NOT EXECUTED
10ae06: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10ae09: eb fe jmp 10ae09 <_Internal_error_Occurred+0x3d><== NOT EXECUTED
0010ae5c <_Objects_Allocate>:
*/
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
10ae5c: 55 push %ebp
10ae5d: 89 e5 mov %esp,%ebp
10ae5f: 56 push %esi
10ae60: 53 push %ebx
10ae61: 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 )
10ae64: 83 7b 18 00 cmpl $0x0,0x18(%ebx)
10ae68: 75 04 jne 10ae6e <_Objects_Allocate+0x12><== ALWAYS TAKEN
return NULL;
10ae6a: 31 c9 xor %ecx,%ecx
10ae6c: eb 51 jmp 10aebf <_Objects_Allocate+0x63>
/*
* 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 );
10ae6e: 8d 73 20 lea 0x20(%ebx),%esi
10ae71: 83 ec 0c sub $0xc,%esp
10ae74: 56 push %esi
10ae75: e8 06 f8 ff ff call 10a680 <_Chain_Get>
10ae7a: 89 c1 mov %eax,%ecx
if ( information->auto_extend ) {
10ae7c: 83 c4 10 add $0x10,%esp
10ae7f: 80 7b 12 00 cmpb $0x0,0x12(%ebx)
10ae83: 74 3a je 10aebf <_Objects_Allocate+0x63>
/*
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
10ae85: 85 c0 test %eax,%eax
10ae87: 75 1a jne 10aea3 <_Objects_Allocate+0x47>
_Objects_Extend_information( information );
10ae89: 83 ec 0c sub $0xc,%esp
10ae8c: 53 push %ebx
10ae8d: e8 56 00 00 00 call 10aee8 <_Objects_Extend_information>
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
10ae92: 89 34 24 mov %esi,(%esp)
10ae95: e8 e6 f7 ff ff call 10a680 <_Chain_Get>
10ae9a: 89 c1 mov %eax,%ecx
}
if ( the_object ) {
10ae9c: 83 c4 10 add $0x10,%esp
10ae9f: 85 c0 test %eax,%eax
10aea1: 74 c7 je 10ae6a <_Objects_Allocate+0xe>
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
10aea3: 0f b7 41 08 movzwl 0x8(%ecx),%eax
10aea7: 0f b7 53 08 movzwl 0x8(%ebx),%edx
10aeab: 29 d0 sub %edx,%eax
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
10aead: 0f b7 73 14 movzwl 0x14(%ebx),%esi
10aeb1: 31 d2 xor %edx,%edx
10aeb3: f7 f6 div %esi
information->inactive_per_block[ block ]--;
10aeb5: 8b 53 30 mov 0x30(%ebx),%edx
10aeb8: ff 0c 82 decl (%edx,%eax,4)
information->inactive--;
10aebb: 66 ff 4b 2c decw 0x2c(%ebx)
);
}
#endif
return the_object;
}
10aebf: 89 c8 mov %ecx,%eax
10aec1: 8d 65 f8 lea -0x8(%ebp),%esp
10aec4: 5b pop %ebx
10aec5: 5e pop %esi
10aec6: 5d pop %ebp
10aec7: c3 ret
0010aee8 <_Objects_Extend_information>:
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
10aee8: 55 push %ebp
10aee9: 89 e5 mov %esp,%ebp
10aeeb: 57 push %edi
10aeec: 56 push %esi
10aeed: 53 push %ebx
10aeee: 83 ec 3c sub $0x3c,%esp
10aef1: 8b 5d 08 mov 0x8(%ebp),%ebx
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
10aef4: 0f b7 43 08 movzwl 0x8(%ebx),%eax
10aef8: 89 45 c8 mov %eax,-0x38(%ebp)
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
10aefb: 8b 73 34 mov 0x34(%ebx),%esi
10aefe: 85 f6 test %esi,%esi
10af00: 74 40 je 10af42 <_Objects_Extend_information+0x5a>
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
10af02: 0f b7 4b 14 movzwl 0x14(%ebx),%ecx
10af06: 8b 43 10 mov 0x10(%ebx),%eax
10af09: 31 d2 xor %edx,%edx
10af0b: 66 f7 f1 div %cx
10af0e: 0f b7 c0 movzwl %ax,%eax
10af11: 89 45 d0 mov %eax,-0x30(%ebp)
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
10af14: 8b 55 c8 mov -0x38(%ebp),%edx
10af17: 89 55 cc mov %edx,-0x34(%ebp)
index_base = minimum_index;
block = 0;
10af1a: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp)
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
10af21: eb 10 jmp 10af33 <_Objects_Extend_information+0x4b>
if ( information->object_blocks[ block ] == NULL ) {
10af23: 8b 55 d4 mov -0x2c(%ebp),%edx
10af26: 83 3c 96 00 cmpl $0x0,(%esi,%edx,4)
10af2a: 74 31 je 10af5d <_Objects_Extend_information+0x75>
* information - object information table
*
* Output parameters: NONE
*/
void _Objects_Extend_information(
10af2c: 01 4d cc add %ecx,-0x34(%ebp)
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
10af2f: 42 inc %edx
10af30: 89 55 d4 mov %edx,-0x2c(%ebp)
10af33: 8b 55 d0 mov -0x30(%ebp),%edx
10af36: 39 55 d4 cmp %edx,-0x2c(%ebp)
10af39: 72 e8 jb 10af23 <_Objects_Extend_information+0x3b>
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
10af3b: be 01 00 00 00 mov $0x1,%esi
10af40: eb 1d jmp 10af5f <_Objects_Extend_information+0x77>
minimum_index = _Objects_Get_index( information->minimum_id );
10af42: 8b 4d c8 mov -0x38(%ebp),%ecx
10af45: 89 4d cc mov %ecx,-0x34(%ebp)
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
10af48: be 01 00 00 00 mov $0x1,%esi
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
10af4d: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp)
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
block_count = 0;
10af54: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp)
10af5b: eb 02 jmp 10af5f <_Objects_Extend_information+0x77>
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL ) {
do_extend = false;
10af5d: 31 f6 xor %esi,%esi
} else
index_base += information->allocation_size;
}
}
maximum = (uint32_t) information->maximum + information->allocation_size;
10af5f: 0f b7 43 14 movzwl 0x14(%ebx),%eax
10af63: 0f b7 53 10 movzwl 0x10(%ebx),%edx
10af67: 01 c2 add %eax,%edx
10af69: 89 55 bc mov %edx,-0x44(%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 ) {
10af6c: 81 fa ff ff 00 00 cmp $0xffff,%edx
10af72: 0f 87 bb 01 00 00 ja 10b133 <_Objects_Extend_information+0x24b><== 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;
10af78: 0f af 43 18 imul 0x18(%ebx),%eax
if ( information->auto_extend ) {
10af7c: 80 7b 12 00 cmpb $0x0,0x12(%ebx)
10af80: 74 18 je 10af9a <_Objects_Extend_information+0xb2>
new_object_block = _Workspace_Allocate( block_size );
10af82: 83 ec 0c sub $0xc,%esp
10af85: 50 push %eax
10af86: e8 b9 1b 00 00 call 10cb44 <_Workspace_Allocate>
10af8b: 89 45 c0 mov %eax,-0x40(%ebp)
if ( !new_object_block )
10af8e: 83 c4 10 add $0x10,%esp
10af91: 85 c0 test %eax,%eax
10af93: 75 14 jne 10afa9 <_Objects_Extend_information+0xc1>
10af95: e9 99 01 00 00 jmp 10b133 <_Objects_Extend_information+0x24b>
return;
} else {
new_object_block = _Workspace_Allocate_or_fatal_error( block_size );
10af9a: 83 ec 0c sub $0xc,%esp
10af9d: 50 push %eax
10af9e: e8 d2 1b 00 00 call 10cb75 <_Workspace_Allocate_or_fatal_error>
10afa3: 89 45 c0 mov %eax,-0x40(%ebp)
10afa6: 83 c4 10 add $0x10,%esp
}
/*
* Do we need to grow the tables?
*/
if ( do_extend ) {
10afa9: 89 f0 mov %esi,%eax
10afab: 84 c0 test %al,%al
10afad: 0f 84 fd 00 00 00 je 10b0b0 <_Objects_Extend_information+0x1c8>
*/
/*
* Up the block count and maximum
*/
block_count++;
10afb3: 8b 75 d0 mov -0x30(%ebp),%esi
10afb6: 46 inc %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 );
10afb7: 83 ec 0c sub $0xc,%esp
/*
* 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 *));
10afba: 8b 55 bc mov -0x44(%ebp),%edx
10afbd: 03 55 c8 add -0x38(%ebp),%edx
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
10afc0: 8d 04 76 lea (%esi,%esi,2),%eax
10afc3: 01 d0 add %edx,%eax
block_count++;
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
10afc5: c1 e0 02 shl $0x2,%eax
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
((maximum + minimum_index) * sizeof(Objects_Control *));
object_blocks = (void**) _Workspace_Allocate( block_size );
10afc8: 50 push %eax
10afc9: e8 76 1b 00 00 call 10cb44 <_Workspace_Allocate>
10afce: 89 c2 mov %eax,%edx
if ( !object_blocks ) {
10afd0: 83 c4 10 add $0x10,%esp
10afd3: 85 c0 test %eax,%eax
10afd5: 75 13 jne 10afea <_Objects_Extend_information+0x102>
_Workspace_Free( new_object_block );
10afd7: 83 ec 0c sub $0xc,%esp
10afda: ff 75 c0 pushl -0x40(%ebp)
10afdd: e8 7b 1b 00 00 call 10cb5d <_Workspace_Free>
10afe2: 83 c4 10 add $0x10,%esp
10afe5: e9 49 01 00 00 jmp 10b133 <_Objects_Extend_information+0x24b>
10afea: 8d 0c b0 lea (%eax,%esi,4),%ecx
10afed: 89 4d b8 mov %ecx,-0x48(%ebp)
10aff0: 8d 34 f0 lea (%eax,%esi,8),%esi
10aff3: 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 ) {
10aff6: 0f b7 4b 10 movzwl 0x10(%ebx),%ecx
10affa: 31 c0 xor %eax,%eax
10affc: 3b 4d c8 cmp -0x38(%ebp),%ecx
10afff: 76 38 jbe 10b039 <_Objects_Extend_information+0x151>
/*
* 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,
10b001: 8b 45 d0 mov -0x30(%ebp),%eax
10b004: c1 e0 02 shl $0x2,%eax
10b007: 8b 73 34 mov 0x34(%ebx),%esi
10b00a: 89 d7 mov %edx,%edi
10b00c: 89 c1 mov %eax,%ecx
10b00e: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
10b010: 8b 73 30 mov 0x30(%ebx),%esi
10b013: 8b 7d b8 mov -0x48(%ebp),%edi
10b016: 89 c1 mov %eax,%ecx
10b018: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
information->local_table,
(information->maximum + minimum_index) * sizeof(Objects_Control *) );
10b01a: 0f b7 4b 10 movzwl 0x10(%ebx),%ecx
10b01e: 03 4d c8 add -0x38(%ebp),%ecx
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
10b021: c1 e1 02 shl $0x2,%ecx
10b024: 8b 73 1c mov 0x1c(%ebx),%esi
10b027: 8b 7d c4 mov -0x3c(%ebp),%edi
10b02a: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
10b02c: eb 10 jmp 10b03e <_Objects_Extend_information+0x156>
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
local_table[ index ] = NULL;
10b02e: 8b 75 c4 mov -0x3c(%ebp),%esi
10b031: c7 04 86 00 00 00 00 movl $0x0,(%esi,%eax,4)
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
10b038: 40 inc %eax
10b039: 3b 45 c8 cmp -0x38(%ebp),%eax
10b03c: 75 f0 jne 10b02e <_Objects_Extend_information+0x146>
}
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
10b03e: 8b 45 d0 mov -0x30(%ebp),%eax
10b041: c7 04 82 00 00 00 00 movl $0x0,(%edx,%eax,4)
inactive_per_block[block_count] = 0;
10b048: 8b 4d b8 mov -0x48(%ebp),%ecx
10b04b: c7 04 81 00 00 00 00 movl $0x0,(%ecx,%eax,4)
for ( index=index_base ;
index < ( information->allocation_size + index_base );
10b052: 0f b7 4b 14 movzwl 0x14(%ebx),%ecx
10b056: 03 4d cc add -0x34(%ebp),%ecx
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
10b059: 8b 45 cc mov -0x34(%ebp),%eax
10b05c: eb 0b jmp 10b069 <_Objects_Extend_information+0x181>
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
10b05e: 8b 75 c4 mov -0x3c(%ebp),%esi
10b061: c7 04 86 00 00 00 00 movl $0x0,(%esi,%eax,4)
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
index++ ) {
10b068: 40 inc %eax
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
10b069: 39 c8 cmp %ecx,%eax
10b06b: 72 f1 jb 10b05e <_Objects_Extend_information+0x176>
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
}
_ISR_Disable( level );
10b06d: 9c pushf
10b06e: fa cli
10b06f: 5e pop %esi
old_tables = information->object_blocks;
10b070: 8b 4b 34 mov 0x34(%ebx),%ecx
information->object_blocks = object_blocks;
10b073: 89 53 34 mov %edx,0x34(%ebx)
information->inactive_per_block = inactive_per_block;
10b076: 8b 45 b8 mov -0x48(%ebp),%eax
10b079: 89 43 30 mov %eax,0x30(%ebx)
information->local_table = local_table;
10b07c: 8b 55 c4 mov -0x3c(%ebp),%edx
10b07f: 89 53 1c mov %edx,0x1c(%ebx)
information->maximum = (Objects_Maximum) maximum;
10b082: 8b 45 bc mov -0x44(%ebp),%eax
10b085: 66 89 43 10 mov %ax,0x10(%ebx)
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
10b089: 8b 03 mov (%ebx),%eax
10b08b: c1 e0 18 shl $0x18,%eax
10b08e: 0d 00 00 01 00 or $0x10000,%eax
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
10b093: 0b 45 bc or -0x44(%ebp),%eax
information->maximum_id = _Objects_Build_id(
10b096: 0f b7 53 04 movzwl 0x4(%ebx),%edx
10b09a: c1 e2 1b shl $0x1b,%edx
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
10b09d: 09 d0 or %edx,%eax
10b09f: 89 43 0c mov %eax,0xc(%ebx)
information->the_class,
_Objects_Local_node,
information->maximum
);
_ISR_Enable( level );
10b0a2: 56 push %esi
10b0a3: 9d popf
_Workspace_Free( old_tables );
10b0a4: 83 ec 0c sub $0xc,%esp
10b0a7: 51 push %ecx
10b0a8: e8 b0 1a 00 00 call 10cb5d <_Workspace_Free>
10b0ad: 83 c4 10 add $0x10,%esp
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
10b0b0: 8b 55 d4 mov -0x2c(%ebp),%edx
10b0b3: c1 e2 02 shl $0x2,%edx
10b0b6: 89 55 d0 mov %edx,-0x30(%ebp)
10b0b9: 8b 43 34 mov 0x34(%ebx),%eax
10b0bc: 8b 4d c0 mov -0x40(%ebp),%ecx
10b0bf: 8b 55 d4 mov -0x2c(%ebp),%edx
10b0c2: 89 0c 90 mov %ecx,(%eax,%edx,4)
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
10b0c5: ff 73 18 pushl 0x18(%ebx)
10b0c8: 0f b7 43 14 movzwl 0x14(%ebx),%eax
10b0cc: 50 push %eax
10b0cd: 8b 43 34 mov 0x34(%ebx),%eax
10b0d0: ff 34 90 pushl (%eax,%edx,4)
10b0d3: 8d 7d dc lea -0x24(%ebp),%edi
10b0d6: 57 push %edi
10b0d7: e8 c8 f5 ff ff call 10a6a4 <_Chain_Initialize>
/*
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
10b0dc: 83 c4 10 add $0x10,%esp
);
/*
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
10b0df: 8b 75 cc mov -0x34(%ebp),%esi
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
10b0e2: 8d 7b 20 lea 0x20(%ebx),%edi
/*
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
10b0e5: eb 26 jmp 10b10d <_Objects_Extend_information+0x225>
10b0e7: 8b 13 mov (%ebx),%edx
10b0e9: c1 e2 18 shl $0x18,%edx
10b0ec: 81 ca 00 00 01 00 or $0x10000,%edx
the_object->id = _Objects_Build_id(
10b0f2: 0f b7 4b 04 movzwl 0x4(%ebx),%ecx
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
10b0f6: c1 e1 1b shl $0x1b,%ecx
10b0f9: 09 ca or %ecx,%edx
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
10b0fb: 09 f2 or %esi,%edx
10b0fd: 89 50 08 mov %edx,0x8(%eax)
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
10b100: 52 push %edx
10b101: 52 push %edx
10b102: 50 push %eax
10b103: 57 push %edi
10b104: e8 53 f5 ff ff call 10a65c <_Chain_Append>
index++;
10b109: 46 inc %esi
10b10a: 83 c4 10 add $0x10,%esp
/*
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
10b10d: 83 ec 0c sub $0xc,%esp
10b110: 8d 45 dc lea -0x24(%ebp),%eax
10b113: 50 push %eax
10b114: e8 67 f5 ff ff call 10a680 <_Chain_Get>
10b119: 83 c4 10 add $0x10,%esp
10b11c: 85 c0 test %eax,%eax
10b11e: 75 c7 jne 10b0e7 <_Objects_Extend_information+0x1ff>
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
10b120: 8b 43 14 mov 0x14(%ebx),%eax
10b123: 8b 53 30 mov 0x30(%ebx),%edx
10b126: 0f b7 c8 movzwl %ax,%ecx
10b129: 8b 75 d0 mov -0x30(%ebp),%esi
10b12c: 89 0c 32 mov %ecx,(%edx,%esi,1)
information->inactive =
(Objects_Maximum)(information->inactive + information->allocation_size);
10b12f: 66 01 43 2c add %ax,0x2c(%ebx)
}
10b133: 8d 65 f4 lea -0xc(%ebp),%esp
10b136: 5b pop %ebx
10b137: 5e pop %esi
10b138: 5f pop %edi
10b139: 5d pop %ebp
10b13a: c3 ret
0010b1cc <_Objects_Get_information>:
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint16_t the_class
)
{
10b1cc: 55 push %ebp
10b1cd: 89 e5 mov %esp,%ebp
10b1cf: 56 push %esi
10b1d0: 53 push %ebx
10b1d1: 8b 5d 08 mov 0x8(%ebp),%ebx
10b1d4: 0f b7 75 0c movzwl 0xc(%ebp),%esi
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
10b1d8: 66 85 f6 test %si,%si
10b1db: 75 04 jne 10b1e1 <_Objects_Get_information+0x15>
return NULL;
10b1dd: 31 c0 xor %eax,%eax
10b1df: eb 2d jmp 10b20e <_Objects_Get_information+0x42>
/*
* 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 );
10b1e1: 83 ec 0c sub $0xc,%esp
10b1e4: 53 push %ebx
10b1e5: e8 b2 43 00 00 call 10f59c <_Objects_API_maximum_class>
if ( the_class_api_maximum == 0 )
10b1ea: 83 c4 10 add $0x10,%esp
10b1ed: 85 c0 test %eax,%eax
10b1ef: 74 ec je 10b1dd <_Objects_Get_information+0x11>
return NULL;
if ( the_class > (uint32_t) the_class_api_maximum )
10b1f1: 39 c6 cmp %eax,%esi
10b1f3: 77 e8 ja 10b1dd <_Objects_Get_information+0x11>
return NULL;
if ( !_Objects_Information_table[ the_api ] )
10b1f5: 8b 04 9d bc e3 12 00 mov 0x12e3bc(,%ebx,4),%eax
10b1fc: 85 c0 test %eax,%eax
10b1fe: 74 dd je 10b1dd <_Objects_Get_information+0x11><== NEVER TAKEN
return NULL;
info = _Objects_Information_table[ the_api ][ the_class ];
10b200: 8b 04 b0 mov (%eax,%esi,4),%eax
if ( !info )
10b203: 85 c0 test %eax,%eax
10b205: 74 d6 je 10b1dd <_Objects_Get_information+0x11><== 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 )
10b207: 66 83 78 10 00 cmpw $0x0,0x10(%eax)
10b20c: 74 cf je 10b1dd <_Objects_Get_information+0x11>
return NULL;
#endif
return info;
}
10b20e: 8d 65 f8 lea -0x8(%ebp),%esp
10b211: 5b pop %ebx
10b212: 5e pop %esi
10b213: 5d pop %ebp
10b214: c3 ret
001187b4 <_Objects_Get_no_protection>:
Objects_Control *_Objects_Get_no_protection(
Objects_Information *information,
Objects_Id id,
Objects_Locations *location
)
{
1187b4: 55 push %ebp
1187b5: 89 e5 mov %esp,%ebp
1187b7: 53 push %ebx
1187b8: 8b 55 08 mov 0x8(%ebp),%edx
1187bb: 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;
1187be: b8 01 00 00 00 mov $0x1,%eax
1187c3: 2b 42 08 sub 0x8(%edx),%eax
1187c6: 03 45 0c add 0xc(%ebp),%eax
if ( information->maximum >= index ) {
1187c9: 0f b7 5a 10 movzwl 0x10(%edx),%ebx
1187cd: 39 c3 cmp %eax,%ebx
1187cf: 72 12 jb 1187e3 <_Objects_Get_no_protection+0x2f>
if ( (the_object = information->local_table[ index ]) != NULL ) {
1187d1: 8b 52 1c mov 0x1c(%edx),%edx
1187d4: 8b 04 82 mov (%edx,%eax,4),%eax
1187d7: 85 c0 test %eax,%eax
1187d9: 74 08 je 1187e3 <_Objects_Get_no_protection+0x2f><== NEVER TAKEN
*location = OBJECTS_LOCAL;
1187db: c7 01 00 00 00 00 movl $0x0,(%ecx)
return the_object;
1187e1: eb 08 jmp 1187eb <_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;
1187e3: c7 01 01 00 00 00 movl $0x1,(%ecx)
return NULL;
1187e9: 31 c0 xor %eax,%eax
}
1187eb: 5b pop %ebx
1187ec: 5d pop %ebp
1187ed: c3 ret
0010e310 <_Objects_Id_to_name>:
*/
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
10e310: 55 push %ebp
10e311: 89 e5 mov %esp,%ebp
10e313: 83 ec 18 sub $0x18,%esp
/*
* Caller is trusted for name != NULL.
*/
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
10e316: 8b 45 08 mov 0x8(%ebp),%eax
10e319: 85 c0 test %eax,%eax
10e31b: 75 08 jne 10e325 <_Objects_Id_to_name+0x15>
10e31d: a1 ec a1 13 00 mov 0x13a1ec,%eax
10e322: 8b 40 08 mov 0x8(%eax),%eax
10e325: 89 c2 mov %eax,%edx
10e327: c1 ea 18 shr $0x18,%edx
10e32a: 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 )
10e32d: 8d 4a ff lea -0x1(%edx),%ecx
10e330: 83 f9 02 cmp $0x2,%ecx
10e333: 76 3d jbe 10e372 <_Objects_Id_to_name+0x62>
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
10e335: b8 03 00 00 00 mov $0x3,%eax
10e33a: eb 43 jmp 10e37f <_Objects_Id_to_name+0x6f>
*/
RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class(
Objects_Id id
)
{
return (uint32_t)
10e33c: 89 c1 mov %eax,%ecx
10e33e: c1 e9 1b shr $0x1b,%ecx
if ( !_Objects_Information_table[ the_api ] )
return OBJECTS_INVALID_ID;
the_class = _Objects_Get_class( tmpId );
information = _Objects_Information_table[ the_api ][ the_class ];
10e341: 8b 14 8a mov (%edx,%ecx,4),%edx
if ( !information )
10e344: 85 d2 test %edx,%edx
10e346: 74 ed je 10e335 <_Objects_Id_to_name+0x25><== NEVER TAKEN
return OBJECTS_INVALID_ID;
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string )
10e348: 80 7a 38 00 cmpb $0x0,0x38(%edx)
10e34c: 75 e7 jne 10e335 <_Objects_Id_to_name+0x25><== NEVER TAKEN
return OBJECTS_INVALID_ID;
#endif
the_object = _Objects_Get( information, tmpId, &ignored_location );
10e34e: 51 push %ecx
10e34f: 8d 4d f4 lea -0xc(%ebp),%ecx
10e352: 51 push %ecx
10e353: 50 push %eax
10e354: 52 push %edx
10e355: e8 56 ff ff ff call 10e2b0 <_Objects_Get>
if ( !the_object )
10e35a: 83 c4 10 add $0x10,%esp
10e35d: 85 c0 test %eax,%eax
10e35f: 74 d4 je 10e335 <_Objects_Id_to_name+0x25>
return OBJECTS_INVALID_ID;
*name = the_object->name;
10e361: 8b 50 0c mov 0xc(%eax),%edx
10e364: 8b 45 0c mov 0xc(%ebp),%eax
10e367: 89 10 mov %edx,(%eax)
_Thread_Enable_dispatch();
10e369: e8 5a 0b 00 00 call 10eec8 <_Thread_Enable_dispatch>
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
10e36e: 31 c0 xor %eax,%eax
10e370: eb 0d jmp 10e37f <_Objects_Id_to_name+0x6f>
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
if ( !_Objects_Information_table[ the_api ] )
10e372: 8b 14 95 7c 9c 13 00 mov 0x139c7c(,%edx,4),%edx
10e379: 85 d2 test %edx,%edx
10e37b: 75 bf jne 10e33c <_Objects_Id_to_name+0x2c>
10e37d: eb b6 jmp 10e335 <_Objects_Id_to_name+0x25>
return OBJECTS_INVALID_ID;
*name = the_object->name;
_Thread_Enable_dispatch();
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
}
10e37f: c9 leave
10e380: c3 ret
00110704 <_POSIX_Keys_Run_destructors>:
*/
void _POSIX_Keys_Run_destructors(
Thread_Control *thread
)
{
110704: 55 push %ebp
110705: 89 e5 mov %esp,%ebp
110707: 57 push %edi
110708: 56 push %esi
110709: 53 push %ebx
11070a: 83 ec 1c sub $0x1c,%esp
Objects_Maximum thread_index = _Objects_Get_index( thread->Object.id );
11070d: 8b 45 08 mov 0x8(%ebp),%eax
110710: 8b 40 08 mov 0x8(%eax),%eax
110713: 89 c6 mov %eax,%esi
110715: c1 ee 18 shr $0x18,%esi
110718: 83 e6 07 and $0x7,%esi
for ( index = 1 ; index <= max ; ++index ) {
POSIX_Keys_Control *key = (POSIX_Keys_Control *)
_POSIX_Keys_Information.local_table [ index ];
if ( key != NULL && key->destructor != NULL ) {
void *value = key->Values [ thread_api ][ thread_index ];
11071b: 25 ff ff 00 00 and $0xffff,%eax
110720: c1 e0 02 shl $0x2,%eax
110723: 89 45 e0 mov %eax,-0x20(%ebp)
*
* Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99.
*/
while ( !done ) {
Objects_Maximum index = 0;
Objects_Maximum max = _POSIX_Keys_Information.maximum;
110726: a1 d0 e7 12 00 mov 0x12e7d0,%eax
11072b: 66 89 45 e6 mov %ax,-0x1a(%ebp)
done = true;
for ( index = 1 ; index <= max ; ++index ) {
11072f: bb 01 00 00 00 mov $0x1,%ebx
*/
while ( !done ) {
Objects_Maximum index = 0;
Objects_Maximum max = _POSIX_Keys_Information.maximum;
done = true;
110734: b2 01 mov $0x1,%dl
for ( index = 1 ; index <= max ; ++index ) {
110736: eb 35 jmp 11076d <_POSIX_Keys_Run_destructors+0x69>
POSIX_Keys_Control *key = (POSIX_Keys_Control *)
_POSIX_Keys_Information.local_table [ index ];
110738: 0f b7 cb movzwl %bx,%ecx
Objects_Maximum max = _POSIX_Keys_Information.maximum;
done = true;
for ( index = 1 ; index <= max ; ++index ) {
POSIX_Keys_Control *key = (POSIX_Keys_Control *)
11073b: a1 dc e7 12 00 mov 0x12e7dc,%eax
110740: 8b 04 88 mov (%eax,%ecx,4),%eax
_POSIX_Keys_Information.local_table [ index ];
if ( key != NULL && key->destructor != NULL ) {
110743: 85 c0 test %eax,%eax
110745: 74 25 je 11076c <_POSIX_Keys_Run_destructors+0x68>
110747: 83 78 10 00 cmpl $0x0,0x10(%eax)
11074b: 74 1f je 11076c <_POSIX_Keys_Run_destructors+0x68>
void *value = key->Values [ thread_api ][ thread_index ];
11074d: 8b 7d e0 mov -0x20(%ebp),%edi
110750: 03 7c b0 14 add 0x14(%eax,%esi,4),%edi
110754: 8b 0f mov (%edi),%ecx
if ( value != NULL ) {
110756: 85 c9 test %ecx,%ecx
110758: 74 12 je 11076c <_POSIX_Keys_Run_destructors+0x68><== ALWAYS TAKEN
key->Values [ thread_api ][ thread_index ] = NULL;
11075a: c7 07 00 00 00 00 movl $0x0,(%edi) <== NOT EXECUTED
(*key->destructor)( value );
110760: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
110763: 51 push %ecx <== NOT EXECUTED
110764: ff 50 10 call *0x10(%eax) <== NOT EXECUTED
110767: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
done = false;
11076a: 31 d2 xor %edx,%edx <== NOT EXECUTED
Objects_Maximum index = 0;
Objects_Maximum max = _POSIX_Keys_Information.maximum;
done = true;
for ( index = 1 ; index <= max ; ++index ) {
11076c: 43 inc %ebx
11076d: 66 3b 5d e6 cmp -0x1a(%ebp),%bx
110771: 76 c5 jbe 110738 <_POSIX_Keys_Run_destructors+0x34>
* number of iterations. An infinite loop may happen if destructors set
* thread specific data. This can be considered dubious.
*
* Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99.
*/
while ( !done ) {
110773: 84 d2 test %dl,%dl
110775: 74 af je 110726 <_POSIX_Keys_Run_destructors+0x22><== NEVER TAKEN
done = false;
}
}
}
}
}
110777: 8d 65 f4 lea -0xc(%ebp),%esp
11077a: 5b pop %ebx
11077b: 5e pop %esi
11077c: 5f pop %edi
11077d: 5d pop %ebp
11077e: c3 ret
0010dd3c <_POSIX_Message_queue_Receive_support>:
size_t msg_len,
unsigned int *msg_prio,
bool wait,
Watchdog_Interval timeout
)
{
10dd3c: 55 push %ebp
10dd3d: 89 e5 mov %esp,%ebp
10dd3f: 57 push %edi
10dd40: 56 push %esi
10dd41: 53 push %ebx
10dd42: 83 ec 30 sub $0x30,%esp
10dd45: 8b 75 08 mov 0x8(%ebp),%esi
10dd48: 8b 5d 14 mov 0x14(%ebp),%ebx
10dd4b: 8a 4d 18 mov 0x18(%ebp),%cl
POSIX_Message_queue_Control_fd *the_mq_fd;
Objects_Locations location;
size_t length_out;
bool do_wait;
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
10dd4e: 8d 45 e0 lea -0x20(%ebp),%eax
RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd (
mqd_t id,
Objects_Locations *location
)
{
return (POSIX_Message_queue_Control_fd *) _Objects_Get(
10dd51: 50 push %eax
10dd52: 56 push %esi
10dd53: 68 b4 5d 13 00 push $0x135db4
10dd58: 88 4d d4 mov %cl,-0x2c(%ebp)
10dd5b: e8 34 2b 00 00 call 110894 <_Objects_Get>
switch ( location ) {
10dd60: 83 c4 10 add $0x10,%esp
10dd63: 83 7d e0 00 cmpl $0x0,-0x20(%ebp)
10dd67: 8a 4d d4 mov -0x2c(%ebp),%cl
10dd6a: 0f 85 b6 00 00 00 jne 10de26 <_POSIX_Message_queue_Receive_support+0xea>
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) {
10dd70: 8b 78 14 mov 0x14(%eax),%edi
10dd73: 89 fa mov %edi,%edx
10dd75: 83 e2 03 and $0x3,%edx
10dd78: 4a dec %edx
10dd79: 75 0a jne 10dd85 <_POSIX_Message_queue_Receive_support+0x49>
_Thread_Enable_dispatch();
10dd7b: e8 c4 36 00 00 call 111444 <_Thread_Enable_dispatch>
10dd80: e9 a1 00 00 00 jmp 10de26 <_POSIX_Message_queue_Receive_support+0xea>
rtems_set_errno_and_return_minus_one( EBADF );
}
the_mq = the_mq_fd->Queue;
10dd85: 8b 50 10 mov 0x10(%eax),%edx
if ( msg_len < the_mq->Message_queue.maximum_message_size ) {
10dd88: 8b 42 68 mov 0x68(%edx),%eax
10dd8b: 39 45 10 cmp %eax,0x10(%ebp)
10dd8e: 73 15 jae 10dda5 <_POSIX_Message_queue_Receive_support+0x69>
_Thread_Enable_dispatch();
10dd90: e8 af 36 00 00 call 111444 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EMSGSIZE );
10dd95: e8 a6 88 00 00 call 116640 <__errno>
10dd9a: c7 00 7a 00 00 00 movl $0x7a,(%eax)
10dda0: e9 8c 00 00 00 jmp 10de31 <_POSIX_Message_queue_Receive_support+0xf5>
/*
* Now if something goes wrong, we return a "length" of -1
* to indicate an error.
*/
length_out = -1;
10dda5: c7 45 e4 ff ff ff ff movl $0xffffffff,-0x1c(%ebp)
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
10ddac: 31 c0 xor %eax,%eax
10ddae: 84 c9 test %cl,%cl
10ddb0: 74 0b je 10ddbd <_POSIX_Message_queue_Receive_support+0x81>
do_wait = (the_mq_fd->oflag & O_NONBLOCK) ? false : true;
10ddb2: 89 f8 mov %edi,%eax
10ddb4: c1 e8 0e shr $0xe,%eax
10ddb7: 83 f0 01 xor $0x1,%eax
10ddba: 83 e0 01 and $0x1,%eax
do_wait = wait;
/*
* Now perform the actual message receive
*/
_CORE_message_queue_Seize(
10ddbd: 51 push %ecx
10ddbe: 51 push %ecx
10ddbf: ff 75 1c pushl 0x1c(%ebp)
10ddc2: 0f b6 c0 movzbl %al,%eax
10ddc5: 50 push %eax
10ddc6: 8d 45 e4 lea -0x1c(%ebp),%eax
10ddc9: 50 push %eax
10ddca: ff 75 0c pushl 0xc(%ebp)
10ddcd: 56 push %esi
10ddce: 83 c2 1c add $0x1c,%edx
10ddd1: 52 push %edx
10ddd2: e8 dd 1c 00 00 call 10fab4 <_CORE_message_queue_Seize>
&length_out,
do_wait,
timeout
);
_Thread_Enable_dispatch();
10ddd7: 83 c4 20 add $0x20,%esp
10ddda: e8 65 36 00 00 call 111444 <_Thread_Enable_dispatch>
if (msg_prio) {
10dddf: 85 db test %ebx,%ebx
10dde1: 74 15 je 10ddf8 <_POSIX_Message_queue_Receive_support+0xbc><== NEVER TAKEN
*msg_prio = _POSIX_Message_queue_Priority_from_core(
_Thread_Executing->Wait.count
10dde3: 8b 15 2c 5e 13 00 mov 0x135e2c,%edx
RTEMS_INLINE_ROUTINE unsigned int _POSIX_Message_queue_Priority_from_core(
CORE_message_queue_Submit_types priority
)
{
/* absolute value without a library dependency */
return (unsigned int) ((priority >= 0) ? priority : -priority);
10dde9: 8b 42 24 mov 0x24(%edx),%eax
10ddec: c1 f8 1f sar $0x1f,%eax
10ddef: 8b 52 24 mov 0x24(%edx),%edx
10ddf2: 31 c2 xor %eax,%edx
10ddf4: 89 13 mov %edx,(%ebx)
10ddf6: 29 03 sub %eax,(%ebx)
);
}
if ( !_Thread_Executing->Wait.return_code )
10ddf8: a1 2c 5e 13 00 mov 0x135e2c,%eax
10ddfd: 83 78 34 00 cmpl $0x0,0x34(%eax)
10de01: 75 05 jne 10de08 <_POSIX_Message_queue_Receive_support+0xcc>
return length_out;
10de03: 8b 45 e4 mov -0x1c(%ebp),%eax
10de06: eb 2c jmp 10de34 <_POSIX_Message_queue_Receive_support+0xf8>
rtems_set_errno_and_return_minus_one(
10de08: e8 33 88 00 00 call 116640 <__errno>
10de0d: 89 c3 mov %eax,%ebx
10de0f: 83 ec 0c sub $0xc,%esp
10de12: a1 2c 5e 13 00 mov 0x135e2c,%eax
10de17: ff 70 34 pushl 0x34(%eax)
10de1a: e8 f1 01 00 00 call 10e010 <_POSIX_Message_queue_Translate_core_message_queue_return_code>
10de1f: 89 03 mov %eax,(%ebx)
10de21: 83 c4 10 add $0x10,%esp
10de24: eb 0b jmp 10de31 <_POSIX_Message_queue_Receive_support+0xf5>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
10de26: e8 15 88 00 00 call 116640 <__errno>
10de2b: c7 00 09 00 00 00 movl $0x9,(%eax)
10de31: 83 c8 ff or $0xffffffff,%eax
}
10de34: 8d 65 f4 lea -0xc(%ebp),%esp
10de37: 5b pop %ebx
10de38: 5e pop %esi
10de39: 5f pop %edi
10de3a: 5d pop %ebp
10de3b: c3 ret
001100d8 <_POSIX_Semaphore_Create_support>:
size_t name_len,
int pshared,
unsigned int value,
POSIX_Semaphore_Control **the_sem
)
{
1100d8: 55 push %ebp
1100d9: 89 e5 mov %esp,%ebp
1100db: 56 push %esi
1100dc: 53 push %ebx
1100dd: 8b 75 08 mov 0x8(%ebp),%esi
POSIX_Semaphore_Control *the_semaphore;
CORE_semaphore_Attributes *the_sem_attr;
char *name;
/* Sharing semaphores among processes is not currently supported */
if (pshared != 0)
1100e0: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
1100e4: 74 0d je 1100f3 <_POSIX_Semaphore_Create_support+0x1b>
rtems_set_errno_and_return_minus_one( ENOSYS );
1100e6: e8 ad 27 00 00 call 112898 <__errno>
1100eb: c7 00 58 00 00 00 movl $0x58,(%eax)
1100f1: eb 36 jmp 110129 <_POSIX_Semaphore_Create_support+0x51>
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
1100f3: a1 b4 31 13 00 mov 0x1331b4,%eax
1100f8: 40 inc %eax
1100f9: a3 b4 31 13 00 mov %eax,0x1331b4
return _Thread_Dispatch_disable_level;
1100fe: a1 b4 31 13 00 mov 0x1331b4,%eax
* _POSIX_Semaphore_Allocate
*/
RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void )
{
return (POSIX_Semaphore_Control *)
110103: 83 ec 0c sub $0xc,%esp
110106: 68 78 34 13 00 push $0x133478
11010b: e8 a8 c5 ff ff call 10c6b8 <_Objects_Allocate>
110110: 89 c3 mov %eax,%ebx
_Thread_Disable_dispatch();
the_semaphore = _POSIX_Semaphore_Allocate();
if ( !the_semaphore ) {
110112: 83 c4 10 add $0x10,%esp
110115: 85 c0 test %eax,%eax
110117: 75 18 jne 110131 <_POSIX_Semaphore_Create_support+0x59>
_Thread_Enable_dispatch();
110119: e8 9e d5 ff ff call 10d6bc <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( ENOSPC );
11011e: e8 75 27 00 00 call 112898 <__errno>
110123: c7 00 1c 00 00 00 movl $0x1c,(%eax)
110129: 83 c8 ff or $0xffffffff,%eax
11012c: e9 a4 00 00 00 jmp 1101d5 <_POSIX_Semaphore_Create_support+0xfd>
/*
* Make a copy of the user's string for name just in case it was
* dynamically constructed.
*/
if ( name_arg != NULL ) {
110131: 85 f6 test %esi,%esi
110133: 74 36 je 11016b <_POSIX_Semaphore_Create_support+0x93>
name = _Workspace_String_duplicate( name_arg, name_len );
110135: 51 push %ecx
110136: 51 push %ecx
110137: ff 75 0c pushl 0xc(%ebp)
11013a: 56 push %esi
11013b: e8 d4 12 00 00 call 111414 <_Workspace_String_duplicate>
110140: 89 c6 mov %eax,%esi
if ( !name ) {
110142: 83 c4 10 add $0x10,%esp
110145: 85 c0 test %eax,%eax
110147: 75 24 jne 11016d <_POSIX_Semaphore_Create_support+0x95><== ALWAYS TAKEN
RTEMS_INLINE_ROUTINE void _POSIX_Semaphore_Free (
POSIX_Semaphore_Control *the_semaphore
)
{
_Objects_Free( &_POSIX_Semaphore_Information, &the_semaphore->Object );
110149: 52 push %edx <== NOT EXECUTED
11014a: 52 push %edx <== NOT EXECUTED
11014b: 53 push %ebx <== NOT EXECUTED
11014c: 68 78 34 13 00 push $0x133478 <== NOT EXECUTED
110151: e8 42 c8 ff ff call 10c998 <_Objects_Free> <== NOT EXECUTED
_POSIX_Semaphore_Free( the_semaphore );
_Thread_Enable_dispatch();
110156: e8 61 d5 ff ff call 10d6bc <_Thread_Enable_dispatch><== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOMEM );
11015b: e8 38 27 00 00 call 112898 <__errno> <== NOT EXECUTED
110160: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED
110166: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
110169: eb be jmp 110129 <_POSIX_Semaphore_Create_support+0x51><== NOT EXECUTED
}
} else {
name = NULL;
11016b: 31 f6 xor %esi,%esi
}
the_semaphore->process_shared = pshared;
11016d: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx)
if ( name ) {
110174: 85 f6 test %esi,%esi
110176: 74 11 je 110189 <_POSIX_Semaphore_Create_support+0xb1>
the_semaphore->named = true;
110178: c6 43 14 01 movb $0x1,0x14(%ebx)
the_semaphore->open_count = 1;
11017c: c7 43 18 01 00 00 00 movl $0x1,0x18(%ebx)
the_semaphore->linked = true;
110183: c6 43 15 01 movb $0x1,0x15(%ebx)
110187: eb 0f jmp 110198 <_POSIX_Semaphore_Create_support+0xc0>
} else {
the_semaphore->named = false;
110189: c6 43 14 00 movb $0x0,0x14(%ebx)
the_semaphore->open_count = 0;
11018d: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx)
the_semaphore->linked = false;
110194: c6 43 15 00 movb $0x0,0x15(%ebx)
* blocking tasks on this semaphore should be. It could somehow
* be derived from the current scheduling policy. One
* thing is certain, no matter what we decide, it won't be
* the same as all other POSIX implementations. :)
*/
the_sem_attr->discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO;
110198: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx)
/*
* This effectively disables limit checking.
*/
the_sem_attr->maximum_count = 0xFFFFFFFF;
11019f: c7 43 5c ff ff ff ff movl $0xffffffff,0x5c(%ebx)
_CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value );
1101a6: 50 push %eax
1101a7: ff 75 14 pushl 0x14(%ebp)
the_semaphore->named = false;
the_semaphore->open_count = 0;
the_semaphore->linked = false;
}
the_sem_attr = &the_semaphore->Semaphore.Attributes;
1101aa: 8d 43 5c lea 0x5c(%ebx),%eax
/*
* This effectively disables limit checking.
*/
the_sem_attr->maximum_count = 0xFFFFFFFF;
_CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value );
1101ad: 50 push %eax
1101ae: 8d 43 1c lea 0x1c(%ebx),%eax
1101b1: 50 push %eax
1101b2: e8 e9 bf ff ff call 10c1a0 <_CORE_semaphore_Initialize>
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
_Objects_Set_local_object(
1101b7: 0f b7 53 08 movzwl 0x8(%ebx),%edx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
1101bb: a1 94 34 13 00 mov 0x133494,%eax
1101c0: 89 1c 90 mov %ebx,(%eax,%edx,4)
the_object
);
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
/* ASSERT: information->is_string */
the_object->name.name_p = name;
1101c3: 89 73 0c mov %esi,0xc(%ebx)
&_POSIX_Semaphore_Information,
&the_semaphore->Object,
name
);
*the_sem = the_semaphore;
1101c6: 8b 45 18 mov 0x18(%ebp),%eax
1101c9: 89 18 mov %ebx,(%eax)
_Thread_Enable_dispatch();
1101cb: e8 ec d4 ff ff call 10d6bc <_Thread_Enable_dispatch>
return 0;
1101d0: 83 c4 10 add $0x10,%esp
1101d3: 31 c0 xor %eax,%eax
}
1101d5: 8d 65 f8 lea -0x8(%ebp),%esp
1101d8: 5b pop %ebx
1101d9: 5e pop %esi
1101da: 5d pop %ebp
1101db: c3 ret
0010e1a8 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>:
#include <rtems/posix/pthread.h>
void _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(
Thread_Control *the_thread
)
{
10e1a8: 55 push %ebp
10e1a9: 89 e5 mov %esp,%ebp
10e1ab: 83 ec 08 sub $0x8,%esp
10e1ae: 8b 55 08 mov 0x8(%ebp),%edx
POSIX_API_Control *thread_support;
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
10e1b1: 8b 82 e8 00 00 00 mov 0xe8(%edx),%eax
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
10e1b7: 83 b8 d8 00 00 00 00 cmpl $0x0,0xd8(%eax)
10e1be: 75 31 jne 10e1f1 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x49><== NEVER TAKEN
10e1c0: 83 b8 dc 00 00 00 01 cmpl $0x1,0xdc(%eax)
10e1c7: 75 28 jne 10e1f1 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x49>
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
10e1c9: 83 b8 e0 00 00 00 00 cmpl $0x0,0xe0(%eax)
10e1d0: 74 1f je 10e1f1 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x49>
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
10e1d2: a1 dc e3 12 00 mov 0x12e3dc,%eax
10e1d7: 48 dec %eax
10e1d8: a3 dc e3 12 00 mov %eax,0x12e3dc
return _Thread_Dispatch_disable_level;
10e1dd: a1 dc e3 12 00 mov 0x12e3dc,%eax
thread_support->cancelation_requested ) {
_Thread_Unnest_dispatch();
_POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED );
10e1e2: 50 push %eax
10e1e3: 50 push %eax
10e1e4: 6a ff push $0xffffffff
10e1e6: 52 push %edx
10e1e7: e8 e4 05 00 00 call 10e7d0 <_POSIX_Thread_Exit>
10e1ec: 83 c4 10 add $0x10,%esp
10e1ef: eb 06 jmp 10e1f7 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x4f>
} else
_Thread_Enable_dispatch();
}
10e1f1: c9 leave
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
thread_support->cancelation_requested ) {
_Thread_Unnest_dispatch();
_POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED );
} else
_Thread_Enable_dispatch();
10e1f2: e9 61 dd ff ff jmp 10bf58 <_Thread_Enable_dispatch>
}
10e1f7: c9 leave
10e1f8: c3 ret
0010f20c <_POSIX_Thread_Translate_sched_param>:
int policy,
struct sched_param *param,
Thread_CPU_budget_algorithms *budget_algorithm,
Thread_CPU_budget_algorithm_callout *budget_callout
)
{
10f20c: 55 push %ebp
10f20d: 89 e5 mov %esp,%ebp
10f20f: 57 push %edi
10f210: 56 push %esi
10f211: 53 push %ebx
10f212: 83 ec 18 sub $0x18,%esp
10f215: 8b 75 08 mov 0x8(%ebp),%esi
10f218: 8b 7d 0c mov 0xc(%ebp),%edi
10f21b: 8b 5d 10 mov 0x10(%ebp),%ebx
if ( !_POSIX_Priority_Is_valid( param->sched_priority ) )
10f21e: ff 37 pushl (%edi)
10f220: e8 c7 ff ff ff call 10f1ec <_POSIX_Priority_Is_valid>
10f225: 83 c4 10 add $0x10,%esp
10f228: 84 c0 test %al,%al
10f22a: 75 0a jne 10f236 <_POSIX_Thread_Translate_sched_param+0x2a><== ALWAYS TAKEN
return EINVAL;
10f22c: b8 16 00 00 00 mov $0x16,%eax
10f231: e9 91 00 00 00 jmp 10f2c7 <_POSIX_Thread_Translate_sched_param+0xbb>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
10f236: c7 03 00 00 00 00 movl $0x0,(%ebx)
*budget_callout = NULL;
10f23c: 8b 45 14 mov 0x14(%ebp),%eax
10f23f: c7 00 00 00 00 00 movl $0x0,(%eax)
if ( policy == SCHED_OTHER ) {
10f245: 85 f6 test %esi,%esi
10f247: 75 08 jne 10f251 <_POSIX_Thread_Translate_sched_param+0x45>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
10f249: c7 03 01 00 00 00 movl $0x1,(%ebx)
10f24f: eb 74 jmp 10f2c5 <_POSIX_Thread_Translate_sched_param+0xb9>
return 0;
}
if ( policy == SCHED_FIFO ) {
10f251: 83 fe 01 cmp $0x1,%esi
10f254: 74 6f je 10f2c5 <_POSIX_Thread_Translate_sched_param+0xb9>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
return 0;
}
if ( policy == SCHED_RR ) {
10f256: 83 fe 02 cmp $0x2,%esi
10f259: 75 08 jne 10f263 <_POSIX_Thread_Translate_sched_param+0x57>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE;
10f25b: c7 03 02 00 00 00 movl $0x2,(%ebx)
10f261: eb 62 jmp 10f2c5 <_POSIX_Thread_Translate_sched_param+0xb9>
return 0;
}
if ( policy == SCHED_SPORADIC ) {
10f263: 83 fe 04 cmp $0x4,%esi
10f266: 75 c4 jne 10f22c <_POSIX_Thread_Translate_sched_param+0x20>
if ( (param->sched_ss_repl_period.tv_sec == 0) &&
10f268: 83 7f 08 00 cmpl $0x0,0x8(%edi)
10f26c: 75 06 jne 10f274 <_POSIX_Thread_Translate_sched_param+0x68>
10f26e: 83 7f 0c 00 cmpl $0x0,0xc(%edi)
10f272: 74 b8 je 10f22c <_POSIX_Thread_Translate_sched_param+0x20>
(param->sched_ss_repl_period.tv_nsec == 0) )
return EINVAL;
if ( (param->sched_ss_init_budget.tv_sec == 0) &&
10f274: 83 7f 10 00 cmpl $0x0,0x10(%edi)
10f278: 75 06 jne 10f280 <_POSIX_Thread_Translate_sched_param+0x74>
10f27a: 83 7f 14 00 cmpl $0x0,0x14(%edi)
10f27e: 74 ac je 10f22c <_POSIX_Thread_Translate_sched_param+0x20>
(param->sched_ss_init_budget.tv_nsec == 0) )
return EINVAL;
if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) <
10f280: 83 ec 0c sub $0xc,%esp
10f283: 8d 47 08 lea 0x8(%edi),%eax
10f286: 50 push %eax
10f287: e8 74 e1 ff ff call 10d400 <_Timespec_To_ticks>
10f28c: 89 c6 mov %eax,%esi
_Timespec_To_ticks( ¶m->sched_ss_init_budget ) )
10f28e: 8d 47 10 lea 0x10(%edi),%eax
10f291: 89 04 24 mov %eax,(%esp)
10f294: e8 67 e1 ff ff call 10d400 <_Timespec_To_ticks>
if ( (param->sched_ss_init_budget.tv_sec == 0) &&
(param->sched_ss_init_budget.tv_nsec == 0) )
return EINVAL;
if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) <
10f299: 83 c4 10 add $0x10,%esp
10f29c: 39 c6 cmp %eax,%esi
10f29e: 72 8c jb 10f22c <_POSIX_Thread_Translate_sched_param+0x20>
_Timespec_To_ticks( ¶m->sched_ss_init_budget ) )
return EINVAL;
if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) )
10f2a0: 83 ec 0c sub $0xc,%esp
10f2a3: ff 77 04 pushl 0x4(%edi)
10f2a6: e8 41 ff ff ff call 10f1ec <_POSIX_Priority_Is_valid>
10f2ab: 83 c4 10 add $0x10,%esp
10f2ae: 84 c0 test %al,%al
10f2b0: 0f 84 76 ff ff ff je 10f22c <_POSIX_Thread_Translate_sched_param+0x20>
return EINVAL;
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT;
10f2b6: c7 03 03 00 00 00 movl $0x3,(%ebx)
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
10f2bc: 8b 45 14 mov 0x14(%ebp),%eax
10f2bf: c7 00 fb a2 10 00 movl $0x10a2fb,(%eax)
return 0;
}
if ( policy == SCHED_FIFO ) {
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
return 0;
10f2c5: 31 c0 xor %eax,%eax
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
return 0;
}
return EINVAL;
}
10f2c7: 8d 65 f4 lea -0xc(%ebp),%esp
10f2ca: 5b pop %ebx
10f2cb: 5e pop %esi
10f2cc: 5f pop %edi
10f2cd: 5d pop %ebp
10f2ce: c3 ret
0010e3c1 <_POSIX_Threads_Delete_extension>:
*/
static void _POSIX_Threads_Delete_extension(
Thread_Control *executing __attribute__((unused)),
Thread_Control *deleted
)
{
10e3c1: 55 push %ebp
10e3c2: 89 e5 mov %esp,%ebp
10e3c4: 57 push %edi
10e3c5: 56 push %esi
10e3c6: 53 push %ebx
10e3c7: 83 ec 28 sub $0x28,%esp
10e3ca: 8b 5d 0c mov 0xc(%ebp),%ebx
Thread_Control *the_thread;
POSIX_API_Control *api;
void **value_ptr;
api = deleted->API_Extensions[ THREAD_API_POSIX ];
10e3cd: 8b b3 e8 00 00 00 mov 0xe8(%ebx),%esi
/*
* Run the POSIX cancellation handlers
*/
_POSIX_Threads_cancel_run( deleted );
10e3d3: 53 push %ebx
10e3d4: e8 cb 22 00 00 call 1106a4 <_POSIX_Threads_cancel_run>
/*
* Run all the key destructors
*/
_POSIX_Keys_Run_destructors( deleted );
10e3d9: 89 1c 24 mov %ebx,(%esp)
10e3dc: e8 23 23 00 00 call 110704 <_POSIX_Keys_Run_destructors>
/*
* Wakeup all the tasks which joined with this one
*/
value_ptr = (void **) deleted->Wait.return_argument;
10e3e1: 8b 53 28 mov 0x28(%ebx),%edx
while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) )
10e3e4: 83 c4 10 add $0x10,%esp
10e3e7: 8d 7e 44 lea 0x44(%esi),%edi
10e3ea: eb 05 jmp 10e3f1 <_POSIX_Threads_Delete_extension+0x30>
*(void **)the_thread->Wait.return_argument = value_ptr;
10e3ec: 8b 40 28 mov 0x28(%eax),%eax <== NOT EXECUTED
10e3ef: 89 10 mov %edx,(%eax) <== NOT EXECUTED
/*
* Wakeup all the tasks which joined with this one
*/
value_ptr = (void **) deleted->Wait.return_argument;
while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) )
10e3f1: 83 ec 0c sub $0xc,%esp
10e3f4: 57 push %edi
10e3f5: 89 55 e4 mov %edx,-0x1c(%ebp)
10e3f8: e8 77 dd ff ff call 10c174 <_Thread_queue_Dequeue>
10e3fd: 83 c4 10 add $0x10,%esp
10e400: 85 c0 test %eax,%eax
10e402: 8b 55 e4 mov -0x1c(%ebp),%edx
10e405: 75 e5 jne 10e3ec <_POSIX_Threads_Delete_extension+0x2b><== NEVER TAKEN
*(void **)the_thread->Wait.return_argument = value_ptr;
if ( api->schedpolicy == SCHED_SPORADIC )
10e407: 83 be 84 00 00 00 04 cmpl $0x4,0x84(%esi)
10e40e: 75 12 jne 10e422 <_POSIX_Threads_Delete_extension+0x61>
(void) _Watchdog_Remove( &api->Sporadic_timer );
10e410: 83 ec 0c sub $0xc,%esp
10e413: 8d 86 a8 00 00 00 lea 0xa8(%esi),%eax
10e419: 50 push %eax
10e41a: e8 f9 e5 ff ff call 10ca18 <_Watchdog_Remove>
10e41f: 83 c4 10 add $0x10,%esp
deleted->API_Extensions[ THREAD_API_POSIX ] = NULL;
10e422: c7 83 e8 00 00 00 00 movl $0x0,0xe8(%ebx)
10e429: 00 00 00
_Workspace_Free( api );
10e42c: 89 75 08 mov %esi,0x8(%ebp)
}
10e42f: 8d 65 f4 lea -0xc(%ebp),%esp
10e432: 5b pop %ebx
10e433: 5e pop %esi
10e434: 5f pop %edi
10e435: 5d pop %ebp
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
deleted->API_Extensions[ THREAD_API_POSIX ] = NULL;
_Workspace_Free( api );
10e436: e9 22 e7 ff ff jmp 10cb5d <_Workspace_Free>
0010a028 <_POSIX_Threads_Initialize_user_threads_body>:
*
* Output parameters: NONE
*/
void _POSIX_Threads_Initialize_user_threads_body(void)
{
10a028: 55 push %ebp
10a029: 89 e5 mov %esp,%ebp
10a02b: 57 push %edi
10a02c: 56 push %esi
10a02d: 53 push %ebx
10a02e: 83 ec 6c sub $0x6c,%esp
uint32_t maximum;
posix_initialization_threads_table *user_threads;
pthread_t thread_id;
pthread_attr_t attr;
user_threads = Configuration_POSIX_API.User_initialization_threads_table;
10a031: 8b 3d c4 b1 12 00 mov 0x12b1c4,%edi
maximum = Configuration_POSIX_API.number_of_initialization_threads;
10a037: 8b 15 c0 b1 12 00 mov 0x12b1c0,%edx
if ( !user_threads || maximum == 0 )
10a03d: 85 d2 test %edx,%edx
10a03f: 74 54 je 10a095 <_POSIX_Threads_Initialize_user_threads_body+0x6d><== NEVER TAKEN
10a041: 85 ff test %edi,%edi
10a043: 74 50 je 10a095 <_POSIX_Threads_Initialize_user_threads_body+0x6d><== NEVER TAKEN
10a045: 31 db xor %ebx,%ebx
for ( index=0 ; index < maximum ; index++ ) {
/*
* There is no way for these calls to fail in this situation.
*/
(void) pthread_attr_init( &attr );
10a047: 8d 75 a8 lea -0x58(%ebp),%esi
10a04a: 83 ec 0c sub $0xc,%esp
10a04d: 56 push %esi
10a04e: 89 55 94 mov %edx,-0x6c(%ebp)
10a051: e8 7a 52 00 00 call 10f2d0 <pthread_attr_init>
(void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
10a056: 59 pop %ecx
10a057: 58 pop %eax
10a058: 6a 02 push $0x2
10a05a: 56 push %esi
10a05b: e8 98 52 00 00 call 10f2f8 <pthread_attr_setinheritsched>
(void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size);
10a060: 58 pop %eax
10a061: 5a pop %edx
10a062: ff 74 df 04 pushl 0x4(%edi,%ebx,8)
10a066: 56 push %esi
10a067: e8 b8 52 00 00 call 10f324 <pthread_attr_setstacksize>
status = pthread_create(
10a06c: 6a 00 push $0x0
10a06e: ff 34 df pushl (%edi,%ebx,8)
10a071: 56 push %esi
10a072: 8d 45 a4 lea -0x5c(%ebp),%eax
10a075: 50 push %eax
10a076: e8 75 fc ff ff call 109cf0 <pthread_create>
&thread_id,
&attr,
user_threads[ index ].thread_entry,
NULL
);
if ( status )
10a07b: 83 c4 20 add $0x20,%esp
10a07e: 85 c0 test %eax,%eax
10a080: 8b 55 94 mov -0x6c(%ebp),%edx
10a083: 74 0b je 10a090 <_POSIX_Threads_Initialize_user_threads_body+0x68>
_Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status );
10a085: 52 push %edx
10a086: 50 push %eax
10a087: 6a 01 push $0x1
10a089: 6a 02 push $0x2
10a08b: e8 98 1a 00 00 call 10bb28 <_Internal_error_Occurred>
*
* Setting the attributes explicitly is critical, since we don't want
* to inherit the idle tasks attributes.
*/
for ( index=0 ; index < maximum ; index++ ) {
10a090: 43 inc %ebx
10a091: 39 d3 cmp %edx,%ebx
10a093: 75 b5 jne 10a04a <_POSIX_Threads_Initialize_user_threads_body+0x22><== NEVER TAKEN
NULL
);
if ( status )
_Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status );
}
}
10a095: 8d 65 f4 lea -0xc(%ebp),%esp
10a098: 5b pop %ebx
10a099: 5e pop %esi
10a09a: 5f pop %edi
10a09b: 5d pop %ebp
10a09c: c3 ret
0010e56d <_POSIX_Threads_Sporadic_budget_TSR>:
*/
void _POSIX_Threads_Sporadic_budget_TSR(
Objects_Id id __attribute__((unused)),
void *argument
)
{
10e56d: 55 push %ebp
10e56e: 89 e5 mov %esp,%ebp
10e570: 56 push %esi
10e571: 53 push %ebx
10e572: 8b 5d 0c mov 0xc(%ebp),%ebx
Thread_Control *the_thread;
POSIX_API_Control *api;
the_thread = argument;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
10e575: 8b b3 e8 00 00 00 mov 0xe8(%ebx),%esi
/* ticks is guaranteed to be at least one */
ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget );
10e57b: 83 ec 0c sub $0xc,%esp
10e57e: 8d 86 98 00 00 00 lea 0x98(%esi),%eax
10e584: 50 push %eax
10e585: e8 a2 12 00 00 call 10f82c <_Timespec_To_ticks>
the_thread->cpu_time_budget = ticks;
10e58a: 89 43 74 mov %eax,0x74(%ebx)
RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core(
int priority
)
{
return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1);
10e58d: 0f b6 05 88 a1 12 00 movzbl 0x12a188,%eax
10e594: 2b 86 88 00 00 00 sub 0x88(%esi),%eax
new_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority );
the_thread->real_priority = new_priority;
10e59a: 89 43 18 mov %eax,0x18(%ebx)
*/
#if 0
printk( "TSR %d %d %d\n", the_thread->resource_count,
the_thread->current_priority, new_priority );
#endif
if ( the_thread->resource_count == 0 ) {
10e59d: 83 c4 10 add $0x10,%esp
10e5a0: 83 7b 1c 00 cmpl $0x0,0x1c(%ebx)
10e5a4: 75 12 jne 10e5b8 <_POSIX_Threads_Sporadic_budget_TSR+0x4b><== NEVER TAKEN
/*
* If this would make them less important, then do not change it.
*/
if ( the_thread->current_priority > new_priority ) {
10e5a6: 39 43 14 cmp %eax,0x14(%ebx)
10e5a9: 76 0d jbe 10e5b8 <_POSIX_Threads_Sporadic_budget_TSR+0x4b>
_Thread_Change_priority( the_thread, new_priority, true );
10e5ab: 52 push %edx
10e5ac: 6a 01 push $0x1
10e5ae: 50 push %eax
10e5af: 53 push %ebx
10e5b0: e8 67 d4 ff ff call 10ba1c <_Thread_Change_priority>
10e5b5: 83 c4 10 add $0x10,%esp
#endif
}
}
/* ticks is guaranteed to be at least one */
ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period );
10e5b8: 83 ec 0c sub $0xc,%esp
10e5bb: 8d 86 90 00 00 00 lea 0x90(%esi),%eax
10e5c1: 50 push %eax
10e5c2: e8 65 12 00 00 call 10f82c <_Timespec_To_ticks>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10e5c7: 89 86 b4 00 00 00 mov %eax,0xb4(%esi)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
10e5cd: 83 c4 10 add $0x10,%esp
_Watchdog_Insert_ticks( &api->Sporadic_timer, ticks );
10e5d0: 81 c6 a8 00 00 00 add $0xa8,%esi
10e5d6: 89 75 0c mov %esi,0xc(%ebp)
10e5d9: c7 45 08 88 e4 12 00 movl $0x12e488,0x8(%ebp)
}
10e5e0: 8d 65 f8 lea -0x8(%ebp),%esp
10e5e3: 5b pop %ebx
10e5e4: 5e pop %esi
10e5e5: 5d pop %ebp
10e5e6: e9 19 e3 ff ff jmp 10c904 <_Watchdog_Insert>
0010e5eb <_POSIX_Threads_Sporadic_budget_callout>:
* _POSIX_Threads_Sporadic_budget_callout
*/
void _POSIX_Threads_Sporadic_budget_callout(
Thread_Control *the_thread
)
{
10e5eb: 55 push %ebp
10e5ec: 89 e5 mov %esp,%ebp
10e5ee: 83 ec 08 sub $0x8,%esp
10e5f1: 8b 45 08 mov 0x8(%ebp),%eax
POSIX_API_Control *api;
uint32_t new_priority;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
10e5f4: 8b 88 e8 00 00 00 mov 0xe8(%eax),%ecx
/*
* This will prevent the thread from consuming its entire "budget"
* while at low priority.
*/
the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */
10e5fa: c7 40 74 ff ff ff ff movl $0xffffffff,0x74(%eax)
10e601: 0f b6 15 88 a1 12 00 movzbl 0x12a188,%edx
10e608: 2b 91 8c 00 00 00 sub 0x8c(%ecx),%edx
new_priority = _POSIX_Priority_To_core(api->schedparam.sched_ss_low_priority);
the_thread->real_priority = new_priority;
10e60e: 89 50 18 mov %edx,0x18(%eax)
*/
#if 0
printk( "callout %d %d %d\n", the_thread->resource_count,
the_thread->current_priority, new_priority );
#endif
if ( the_thread->resource_count == 0 ) {
10e611: 83 78 1c 00 cmpl $0x0,0x1c(%eax)
10e615: 75 12 jne 10e629 <_POSIX_Threads_Sporadic_budget_callout+0x3e><== NEVER TAKEN
/*
* Make sure we are actually lowering it. If they have lowered it
* to logically lower than sched_ss_low_priority, then we do not want to
* change it.
*/
if ( the_thread->current_priority < new_priority ) {
10e617: 39 50 14 cmp %edx,0x14(%eax)
10e61a: 73 0d jae 10e629 <_POSIX_Threads_Sporadic_budget_callout+0x3e><== NEVER TAKEN
_Thread_Change_priority( the_thread, new_priority, true );
10e61c: 51 push %ecx
10e61d: 6a 01 push $0x1
10e61f: 52 push %edx
10e620: 50 push %eax
10e621: e8 f6 d3 ff ff call 10ba1c <_Thread_Change_priority>
10e626: 83 c4 10 add $0x10,%esp
#if 0
printk( "lower priority\n" );
#endif
}
}
}
10e629: c9 leave
10e62a: c3 ret
00109bb8 <_POSIX_Timer_TSR>:
* This is the operation that is run when a timer expires
*/
void _POSIX_Timer_TSR(
Objects_Id timer __attribute__((unused)),
void *data)
{
109bb8: 55 push %ebp
109bb9: 89 e5 mov %esp,%ebp
109bbb: 57 push %edi
109bbc: 56 push %esi
109bbd: 53 push %ebx
109bbe: 83 ec 1c sub $0x1c,%esp
109bc1: 8b 5d 0c mov 0xc(%ebp),%ebx
bool activated;
ptimer = (POSIX_Timer_Control *)data;
/* Increment the number of expirations. */
ptimer->overrun = ptimer->overrun + 1;
109bc4: ff 43 68 incl 0x68(%ebx)
/* The timer must be reprogrammed */
if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
109bc7: 83 7b 54 00 cmpl $0x0,0x54(%ebx)
109bcb: 75 06 jne 109bd3 <_POSIX_Timer_TSR+0x1b>
109bcd: 83 7b 58 00 cmpl $0x0,0x58(%ebx)
109bd1: 74 5f je 109c32 <_POSIX_Timer_TSR+0x7a> <== NEVER TAKEN
( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) {
activated = _POSIX_Timer_Insert_helper(
109bd3: 83 ec 0c sub $0xc,%esp
109bd6: 53 push %ebx
109bd7: 68 b8 9b 10 00 push $0x109bb8
109bdc: ff 73 08 pushl 0x8(%ebx)
109bdf: ff 73 64 pushl 0x64(%ebx)
109be2: 8d 43 10 lea 0x10(%ebx),%eax
109be5: 50 push %eax
109be6: e8 65 51 00 00 call 10ed50 <_POSIX_Timer_Insert_helper>
ptimer->ticks,
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated )
109beb: 83 c4 20 add $0x20,%esp
109bee: 84 c0 test %al,%al
109bf0: 74 5b je 109c4d <_POSIX_Timer_TSR+0x95> <== NEVER TAKEN
struct timespec *tod_as_timespec
)
{
Timestamp_Control tod_as_timestamp;
_TOD_Get_as_timestamp( &tod_as_timestamp );
109bf2: 83 ec 0c sub $0xc,%esp
109bf5: 8d 45 e0 lea -0x20(%ebp),%eax
109bf8: 50 push %eax
109bf9: e8 5e 13 00 00 call 10af5c <_TOD_Get_as_timestamp>
_Timestamp_To_timespec( &tod_as_timestamp, tod_as_timespec );
109bfe: 8b 75 e0 mov -0x20(%ebp),%esi
109c01: 8b 7d e4 mov -0x1c(%ebp),%edi
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
109c04: 6a 00 push $0x0
109c06: 68 00 ca 9a 3b push $0x3b9aca00
109c0b: 57 push %edi
109c0c: 56 push %esi
109c0d: e8 d2 3f 01 00 call 11dbe4 <__divdi3>
109c12: 83 c4 10 add $0x10,%esp
109c15: 89 43 6c mov %eax,0x6c(%ebx)
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
109c18: 6a 00 push $0x0
109c1a: 68 00 ca 9a 3b push $0x3b9aca00
109c1f: 57 push %edi
109c20: 56 push %esi
109c21: e8 12 41 01 00 call 11dd38 <__moddi3>
109c26: 89 43 70 mov %eax,0x70(%ebx)
/* Store the time when the timer was started again */
_TOD_Get( &ptimer->time );
/* The state really did not change but just to be safe */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
109c29: c6 43 3c 03 movb $0x3,0x3c(%ebx)
109c2d: 83 c4 20 add $0x20,%esp
109c30: eb 04 jmp 109c36 <_POSIX_Timer_TSR+0x7e>
} else {
/* Indicates that the timer is stopped */
ptimer->state = POSIX_TIMER_STATE_CREATE_STOP;
109c32: c6 43 3c 04 movb $0x4,0x3c(%ebx) <== NOT EXECUTED
/*
* The sending of the signal to the process running the handling function
* specified for that signal is simulated
*/
if ( pthread_kill ( ptimer->thread_id, ptimer->inf.sigev_signo ) ) {
109c36: 50 push %eax
109c37: 50 push %eax
109c38: ff 73 44 pushl 0x44(%ebx)
109c3b: ff 73 38 pushl 0x38(%ebx)
109c3e: e8 0d 4d 00 00 call 10e950 <pthread_kill>
}
/* After the signal handler returns, the count of expirations of the
* timer must be set to 0.
*/
ptimer->overrun = 0;
109c43: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx)
109c4a: 83 c4 10 add $0x10,%esp
}
109c4d: 8d 65 f4 lea -0xc(%ebp),%esp
109c50: 5b pop %ebx
109c51: 5e pop %esi
109c52: 5f pop %edi
109c53: 5d pop %ebp
109c54: c3 ret
00110780 <_POSIX_signals_Check_signal>:
bool _POSIX_signals_Check_signal(
POSIX_API_Control *api,
int signo,
bool is_global
)
{
110780: 55 push %ebp
110781: 89 e5 mov %esp,%ebp
110783: 57 push %edi
110784: 56 push %esi
110785: 53 push %ebx
110786: 83 ec 68 sub $0x68,%esp
siginfo_t siginfo_struct;
sigset_t saved_signals_blocked;
Thread_Wait_information stored_thread_wait_information;
if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct,
110789: 6a 01 push $0x1
11078b: 0f b6 45 10 movzbl 0x10(%ebp),%eax
11078f: 50 push %eax
110790: 8d 45 b4 lea -0x4c(%ebp),%eax
110793: 50 push %eax
110794: ff 75 0c pushl 0xc(%ebp)
110797: ff 75 08 pushl 0x8(%ebp)
11079a: e8 91 00 00 00 call 110830 <_POSIX_signals_Clear_signals>
11079f: 83 c4 20 add $0x20,%esp
is_global, true ) )
return false;
1107a2: 31 c9 xor %ecx,%ecx
{
siginfo_t siginfo_struct;
sigset_t saved_signals_blocked;
Thread_Wait_information stored_thread_wait_information;
if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct,
1107a4: 84 c0 test %al,%al
1107a6: 74 7d je 110825 <_POSIX_signals_Check_signal+0xa5>
#endif
/*
* Just to prevent sending a signal which is currently being ignored.
*/
if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN )
1107a8: 6b 55 0c 0c imul $0xc,0xc(%ebp),%edx
1107ac: 8b 9a 30 e9 12 00 mov 0x12e930(%edx),%ebx
1107b2: 83 fb 01 cmp $0x1,%ebx
1107b5: 74 6e je 110825 <_POSIX_signals_Check_signal+0xa5><== NEVER TAKEN
return false;
/*
* Block the signals requested in sa_mask
*/
saved_signals_blocked = api->signals_blocked;
1107b7: 8b 4d 08 mov 0x8(%ebp),%ecx
1107ba: 8b 89 d0 00 00 00 mov 0xd0(%ecx),%ecx
1107c0: 89 4d a4 mov %ecx,-0x5c(%ebp)
api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask;
1107c3: 8b 82 2c e9 12 00 mov 0x12e92c(%edx),%eax
1107c9: 09 c8 or %ecx,%eax
1107cb: 8b 4d 08 mov 0x8(%ebp),%ecx
1107ce: 89 81 d0 00 00 00 mov %eax,0xd0(%ecx)
/*
* We have to save the blocking information of the current wait queue
* because the signal handler may subsequently go on and put the thread
* on a wait queue, for its own purposes.
*/
memcpy( &stored_thread_wait_information, &_Thread_Executing->Wait,
1107d4: 8d 7d c0 lea -0x40(%ebp),%edi
1107d7: 8b 35 ec e8 12 00 mov 0x12e8ec,%esi
1107dd: 83 c6 20 add $0x20,%esi
1107e0: b9 0a 00 00 00 mov $0xa,%ecx
1107e5: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
sizeof( Thread_Wait_information ));
/*
* Here, the signal handler function executes
*/
switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) {
1107e7: 83 ba 28 e9 12 00 02 cmpl $0x2,0x12e928(%edx)
1107ee: 75 09 jne 1107f9 <_POSIX_signals_Check_signal+0x79>
case SA_SIGINFO:
(*_POSIX_signals_Vectors[ signo ].sa_sigaction)(
1107f0: 50 push %eax
1107f1: 6a 00 push $0x0
1107f3: 8d 45 b4 lea -0x4c(%ebp),%eax
1107f6: 50 push %eax
1107f7: eb 03 jmp 1107fc <_POSIX_signals_Check_signal+0x7c>
&siginfo_struct,
NULL /* context is undefined per 1003.1b-1993, p. 66 */
);
break;
default:
(*_POSIX_signals_Vectors[ signo ].sa_handler)( signo );
1107f9: 83 ec 0c sub $0xc,%esp
1107fc: ff 75 0c pushl 0xc(%ebp)
1107ff: ff d3 call *%ebx
break;
110801: 83 c4 10 add $0x10,%esp
}
/*
* Restore the blocking information
*/
memcpy( &_Thread_Executing->Wait, &stored_thread_wait_information,
110804: 8b 3d ec e8 12 00 mov 0x12e8ec,%edi
11080a: 83 c7 20 add $0x20,%edi
11080d: 8d 75 c0 lea -0x40(%ebp),%esi
110810: b9 0a 00 00 00 mov $0xa,%ecx
110815: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
sizeof( Thread_Wait_information ));
/*
* Restore the previous set of blocked signals
*/
api->signals_blocked = saved_signals_blocked;
110817: 8b 45 a4 mov -0x5c(%ebp),%eax
11081a: 8b 55 08 mov 0x8(%ebp),%edx
11081d: 89 82 d0 00 00 00 mov %eax,0xd0(%edx)
return true;
110823: b1 01 mov $0x1,%cl
}
110825: 88 c8 mov %cl,%al
110827: 8d 65 f4 lea -0xc(%ebp),%esp
11082a: 5b pop %ebx
11082b: 5e pop %esi
11082c: 5f pop %edi
11082d: 5d pop %ebp
11082e: c3 ret
00110e54 <_POSIX_signals_Clear_process_signals>:
*/
void _POSIX_signals_Clear_process_signals(
int signo
)
{
110e54: 55 push %ebp
110e55: 89 e5 mov %esp,%ebp
110e57: 53 push %ebx
110e58: 8b 55 08 mov 0x8(%ebp),%edx
110e5b: 8d 4a ff lea -0x1(%edx),%ecx
110e5e: b8 01 00 00 00 mov $0x1,%eax
110e63: d3 e0 shl %cl,%eax
clear_signal = true;
mask = signo_to_mask( signo );
ISR_Level level;
_ISR_Disable( level );
110e65: 9c pushf
110e66: fa cli
110e67: 59 pop %ecx
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
110e68: 6b d2 0c imul $0xc,%edx,%edx
110e6b: 83 ba 28 e9 12 00 02 cmpl $0x2,0x12e928(%edx)
110e72: 75 12 jne 110e86 <_POSIX_signals_Clear_process_signals+0x32>
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
110e74: 8d 9a 24 eb 12 00 lea 0x12eb24(%edx),%ebx
if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) )
110e7a: 39 9a 20 eb 12 00 cmp %ebx,0x12eb20(%edx)
110e80: 74 04 je 110e86 <_POSIX_signals_Clear_process_signals+0x32><== ALWAYS TAKEN
clear_signal = false;
}
if ( clear_signal ) {
_POSIX_signals_Pending &= ~mask;
}
_ISR_Enable( level );
110e82: 51 push %ecx
110e83: 9d popf
110e84: eb 0a jmp 110e90 <_POSIX_signals_Clear_process_signals+0x3c>
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) )
clear_signal = false;
}
if ( clear_signal ) {
_POSIX_signals_Pending &= ~mask;
110e86: f7 d0 not %eax
110e88: 21 05 1c eb 12 00 and %eax,0x12eb1c
110e8e: eb f2 jmp 110e82 <_POSIX_signals_Clear_process_signals+0x2e>
}
_ISR_Enable( level );
}
110e90: 5b pop %ebx
110e91: 5d pop %ebp
110e92: c3 ret
0010a6c4 <_POSIX_signals_Get_lowest>:
#include <rtems/score/isr.h>
static int _POSIX_signals_Get_lowest(
sigset_t set
)
{
10a6c4: 55 push %ebp
10a6c5: 89 e5 mov %esp,%ebp
10a6c7: 56 push %esi
10a6c8: 53 push %ebx
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
10a6c9: ba 1b 00 00 00 mov $0x1b,%edx
10a6ce: bb 01 00 00 00 mov $0x1,%ebx
#include <rtems/posix/psignal.h>
#include <rtems/seterr.h>
#include <rtems/posix/time.h>
#include <rtems/score/isr.h>
static int _POSIX_signals_Get_lowest(
10a6d3: 8d 4a ff lea -0x1(%edx),%ecx
10a6d6: 89 de mov %ebx,%esi
10a6d8: d3 e6 shl %cl,%esi
)
{
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
if ( set & signo_to_mask( signo ) ) {
10a6da: 85 c6 test %eax,%esi
10a6dc: 75 1e jne 10a6fc <_POSIX_signals_Get_lowest+0x38><== NEVER TAKEN
sigset_t set
)
{
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
10a6de: 42 inc %edx
10a6df: 83 fa 20 cmp $0x20,%edx
10a6e2: 75 ef jne 10a6d3 <_POSIX_signals_Get_lowest+0xf>
10a6e4: b2 01 mov $0x1,%dl
10a6e6: bb 01 00 00 00 mov $0x1,%ebx
#include <rtems/posix/psignal.h>
#include <rtems/seterr.h>
#include <rtems/posix/time.h>
#include <rtems/score/isr.h>
static int _POSIX_signals_Get_lowest(
10a6eb: 8d 4a ff lea -0x1(%edx),%ecx
10a6ee: 89 de mov %ebx,%esi
10a6f0: d3 e6 shl %cl,%esi
#if (SIGHUP != 1)
#error "Assumption that SIGHUP==1 violated!!"
#endif
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
if ( set & signo_to_mask( signo ) ) {
10a6f2: 85 c6 test %eax,%esi
10a6f4: 75 06 jne 10a6fc <_POSIX_signals_Get_lowest+0x38>
*/
#if (SIGHUP != 1)
#error "Assumption that SIGHUP==1 violated!!"
#endif
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
10a6f6: 42 inc %edx
10a6f7: 83 fa 1b cmp $0x1b,%edx
10a6fa: 75 ef jne 10a6eb <_POSIX_signals_Get_lowest+0x27><== ALWAYS TAKEN
* a return 0. This routine will NOT be called unless a signal
* is pending in the set passed in.
*/
found_it:
return signo;
}
10a6fc: 89 d0 mov %edx,%eax
10a6fe: 5b pop %ebx
10a6ff: 5e pop %esi
10a700: 5d pop %ebp
10a701: c3 ret
0011dbf0 <_POSIX_signals_Unblock_thread>:
bool _POSIX_signals_Unblock_thread(
Thread_Control *the_thread,
int signo,
siginfo_t *info
)
{
11dbf0: 55 push %ebp
11dbf1: 89 e5 mov %esp,%ebp
11dbf3: 57 push %edi
11dbf4: 56 push %esi
11dbf5: 53 push %ebx
11dbf6: 83 ec 0c sub $0xc,%esp
11dbf9: 8b 5d 08 mov 0x8(%ebp),%ebx
11dbfc: 8b 75 0c mov 0xc(%ebp),%esi
POSIX_API_Control *api;
sigset_t mask;
siginfo_t *the_info = NULL;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
11dbff: 8b bb e8 00 00 00 mov 0xe8(%ebx),%edi
11dc05: 8d 4e ff lea -0x1(%esi),%ecx
11dc08: b8 01 00 00 00 mov $0x1,%eax
11dc0d: d3 e0 shl %cl,%eax
/*
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
11dc0f: 8b 53 10 mov 0x10(%ebx),%edx
11dc12: 89 d1 mov %edx,%ecx
11dc14: 81 e1 00 80 00 10 and $0x10008000,%ecx
11dc1a: 81 f9 00 80 00 10 cmp $0x10008000,%ecx
11dc20: 75 54 jne 11dc76 <_POSIX_signals_Unblock_thread+0x86>
if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) {
11dc22: 85 43 30 test %eax,0x30(%ebx)
11dc25: 75 11 jne 11dc38 <_POSIX_signals_Unblock_thread+0x48>
11dc27: 8b 97 d0 00 00 00 mov 0xd0(%edi),%edx
11dc2d: f7 d2 not %edx
11dc2f: 85 d0 test %edx,%eax
11dc31: 75 05 jne 11dc38 <_POSIX_signals_Unblock_thread+0x48>
11dc33: e9 ab 00 00 00 jmp 11dce3 <_POSIX_signals_Unblock_thread+0xf3>
the_thread->Wait.return_code = EINTR;
11dc38: c7 43 34 04 00 00 00 movl $0x4,0x34(%ebx)
the_info = (siginfo_t *) the_thread->Wait.return_argument;
11dc3f: 8b 43 28 mov 0x28(%ebx),%eax
if ( !info ) {
11dc42: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
11dc46: 75 12 jne 11dc5a <_POSIX_signals_Unblock_thread+0x6a>
the_info->si_signo = signo;
11dc48: 89 30 mov %esi,(%eax)
the_info->si_code = SI_USER;
11dc4a: c7 40 04 01 00 00 00 movl $0x1,0x4(%eax)
the_info->si_value.sival_int = 0;
11dc51: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax)
11dc58: eb 0c jmp 11dc66 <_POSIX_signals_Unblock_thread+0x76>
} else {
*the_info = *info;
11dc5a: b9 03 00 00 00 mov $0x3,%ecx
11dc5f: 89 c7 mov %eax,%edi
11dc61: 8b 75 10 mov 0x10(%ebp),%esi
11dc64: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
}
_Thread_queue_Extract_with_proxy( the_thread );
11dc66: 83 ec 0c sub $0xc,%esp
11dc69: 53 push %ebx
11dc6a: e8 c1 e7 fe ff call 10c430 <_Thread_queue_Extract_with_proxy>
return true;
11dc6f: 83 c4 10 add $0x10,%esp
11dc72: b0 01 mov $0x1,%al
11dc74: eb 6f jmp 11dce5 <_POSIX_signals_Unblock_thread+0xf5>
}
/*
* Thread is not waiting due to a sigwait.
*/
if ( ~api->signals_blocked & mask ) {
11dc76: 8b 8f d0 00 00 00 mov 0xd0(%edi),%ecx
11dc7c: f7 d1 not %ecx
11dc7e: 85 c8 test %ecx,%eax
11dc80: 74 61 je 11dce3 <_POSIX_signals_Unblock_thread+0xf3>
* it is not blocked, THEN
* we need to dispatch at the end of this ISR.
* + Any other combination, do nothing.
*/
if ( _States_Is_interruptible_by_signal( the_thread->current_state ) ) {
11dc82: f7 c2 00 00 00 10 test $0x10000000,%edx
11dc88: 74 3d je 11dcc7 <_POSIX_signals_Unblock_thread+0xd7>
the_thread->Wait.return_code = EINTR;
11dc8a: c7 43 34 04 00 00 00 movl $0x4,0x34(%ebx)
/*
* In pthread_cond_wait, a thread will be blocking on a thread
* queue, but is also interruptible by a POSIX signal.
*/
if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) )
11dc91: f7 c2 e0 be 03 00 test $0x3bee0,%edx
11dc97: 74 0b je 11dca4 <_POSIX_signals_Unblock_thread+0xb4>
_Thread_queue_Extract_with_proxy( the_thread );
11dc99: 83 ec 0c sub $0xc,%esp
11dc9c: 53 push %ebx
11dc9d: e8 8e e7 fe ff call 10c430 <_Thread_queue_Extract_with_proxy>
11dca2: eb 1e jmp 11dcc2 <_POSIX_signals_Unblock_thread+0xd2>
else if ( _States_Is_delaying(the_thread->current_state) ) {
11dca4: 80 e2 08 and $0x8,%dl
11dca7: 74 3a je 11dce3 <_POSIX_signals_Unblock_thread+0xf3><== NEVER TAKEN
(void) _Watchdog_Remove( &the_thread->Timer );
11dca9: 83 ec 0c sub $0xc,%esp
11dcac: 8d 43 48 lea 0x48(%ebx),%eax
11dcaf: 50 push %eax
11dcb0: e8 63 ed fe ff call 10ca18 <_Watchdog_Remove>
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
11dcb5: 58 pop %eax
11dcb6: 5a pop %edx
11dcb7: 68 f8 ff 03 10 push $0x1003fff8
11dcbc: 53 push %ebx
11dcbd: e8 1a de fe ff call 10badc <_Thread_Clear_state>
11dcc2: 83 c4 10 add $0x10,%esp
11dcc5: eb 1c jmp 11dce3 <_POSIX_signals_Unblock_thread+0xf3>
_Thread_Unblock( the_thread );
}
} else if ( the_thread->current_state == STATES_READY ) {
11dcc7: 85 d2 test %edx,%edx
11dcc9: 75 18 jne 11dce3 <_POSIX_signals_Unblock_thread+0xf3><== NEVER TAKEN
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
11dccb: 83 3d e8 e8 12 00 00 cmpl $0x0,0x12e8e8
11dcd2: 74 0f je 11dce3 <_POSIX_signals_Unblock_thread+0xf3>
11dcd4: 3b 1d ec e8 12 00 cmp 0x12e8ec,%ebx
11dcda: 75 07 jne 11dce3 <_POSIX_signals_Unblock_thread+0xf3><== NEVER TAKEN
_Thread_Dispatch_necessary = true;
11dcdc: c6 05 f8 e8 12 00 01 movb $0x1,0x12e8f8
}
}
return false;
11dce3: 31 c0 xor %eax,%eax
}
11dce5: 8d 65 f4 lea -0xc(%ebp),%esp
11dce8: 5b pop %ebx
11dce9: 5e pop %esi
11dcea: 5f pop %edi
11dceb: 5d pop %ebp
11dcec: c3 ret
0010c004 <_RBTree_Extract_unprotected>:
*/
void _RBTree_Extract_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
10c004: 55 push %ebp
10c005: 89 e5 mov %esp,%ebp
10c007: 57 push %edi
10c008: 56 push %esi
10c009: 53 push %ebx
10c00a: 83 ec 1c sub $0x1c,%esp
10c00d: 8b 7d 08 mov 0x8(%ebp),%edi
10c010: 8b 5d 0c mov 0xc(%ebp),%ebx
RBTree_Node *leaf, *target;
RBTree_Color victim_color;
RBTree_Direction dir;
if (!the_node) return;
10c013: 85 db test %ebx,%ebx
10c015: 0f 84 0d 01 00 00 je 10c128 <_RBTree_Extract_unprotected+0x124>
/* check if min needs to be updated */
if (the_node == the_rbtree->first[RBT_LEFT]) {
10c01b: 3b 5f 08 cmp 0x8(%edi),%ebx
10c01e: 75 10 jne 10c030 <_RBTree_Extract_unprotected+0x2c>
*/
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Successor_unprotected(
const RBTree_Node *node
)
{
return _RBTree_Next_unprotected( node, RBT_RIGHT );
10c020: 50 push %eax
10c021: 50 push %eax
10c022: 6a 01 push $0x1
10c024: 53 push %ebx
10c025: e8 5a 03 00 00 call 10c384 <_RBTree_Next_unprotected>
RBTree_Node *next;
next = _RBTree_Successor_unprotected(the_node);
the_rbtree->first[RBT_LEFT] = next;
10c02a: 89 47 08 mov %eax,0x8(%edi)
10c02d: 83 c4 10 add $0x10,%esp
}
/* Check if max needs to be updated. min=max for 1 element trees so
* do not use else if here. */
if (the_node == the_rbtree->first[RBT_RIGHT]) {
10c030: 3b 5f 0c cmp 0xc(%edi),%ebx
10c033: 75 10 jne 10c045 <_RBTree_Extract_unprotected+0x41>
*/
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Predecessor_unprotected(
const RBTree_Node *node
)
{
return _RBTree_Next_unprotected( node, RBT_LEFT );
10c035: 56 push %esi
10c036: 56 push %esi
10c037: 6a 00 push $0x0
10c039: 53 push %ebx
10c03a: e8 45 03 00 00 call 10c384 <_RBTree_Next_unprotected>
RBTree_Node *previous;
previous = _RBTree_Predecessor_unprotected(the_node);
the_rbtree->first[RBT_RIGHT] = previous;
10c03f: 89 47 0c mov %eax,0xc(%edi)
10c042: 83 c4 10 add $0x10,%esp
* either max in node->child[RBT_LEFT] or min in node->child[RBT_RIGHT],
* and replace the_node with the target node. This maintains the binary
* search tree property, but may violate the red-black properties.
*/
if (the_node->child[RBT_LEFT] && the_node->child[RBT_RIGHT]) {
10c045: 8b 73 04 mov 0x4(%ebx),%esi
10c048: 85 f6 test %esi,%esi
10c04a: 74 77 je 10c0c3 <_RBTree_Extract_unprotected+0xbf>
10c04c: 83 7b 08 00 cmpl $0x0,0x8(%ebx)
10c050: 75 04 jne 10c056 <_RBTree_Extract_unprotected+0x52>
10c052: eb 78 jmp 10c0cc <_RBTree_Extract_unprotected+0xc8>
target = the_node->child[RBT_LEFT]; /* find max in node->child[RBT_LEFT] */
while (target->child[RBT_RIGHT]) target = target->child[RBT_RIGHT];
10c054: 89 c6 mov %eax,%esi
10c056: 8b 46 08 mov 0x8(%esi),%eax
10c059: 85 c0 test %eax,%eax
10c05b: 75 f7 jne 10c054 <_RBTree_Extract_unprotected+0x50>
* target's position (target is the right child of target->parent)
* when target vacates it. if there is no child, then target->parent
* should become NULL. This may cause the coloring to be violated.
* For now we store the color of the node being deleted in victim_color.
*/
leaf = target->child[RBT_LEFT];
10c05d: 8b 56 04 mov 0x4(%esi),%edx
if(leaf) {
10c060: 85 d2 test %edx,%edx
10c062: 74 06 je 10c06a <_RBTree_Extract_unprotected+0x66>
leaf->parent = target->parent;
10c064: 8b 06 mov (%esi),%eax
10c066: 89 02 mov %eax,(%edx)
10c068: eb 0d jmp 10c077 <_RBTree_Extract_unprotected+0x73>
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(target);
10c06a: 89 f0 mov %esi,%eax
10c06c: 89 55 e0 mov %edx,-0x20(%ebp)
10c06f: e8 53 fe ff ff call 10bec7 <_RBTree_Extract_validate_unprotected>
10c074: 8b 55 e0 mov -0x20(%ebp),%edx
}
victim_color = target->color;
10c077: 8b 46 0c mov 0xc(%esi),%eax
10c07a: 89 45 e4 mov %eax,-0x1c(%ebp)
dir = target != target->parent->child[0];
10c07d: 8b 06 mov (%esi),%eax
10c07f: 31 c9 xor %ecx,%ecx
10c081: 3b 70 04 cmp 0x4(%eax),%esi
10c084: 0f 95 c1 setne %cl
target->parent->child[dir] = leaf;
10c087: 89 54 88 04 mov %edx,0x4(%eax,%ecx,4)
/* now replace the_node with target */
dir = the_node != the_node->parent->child[0];
10c08b: 8b 03 mov (%ebx),%eax
10c08d: 31 c9 xor %ecx,%ecx
10c08f: 3b 58 04 cmp 0x4(%eax),%ebx
10c092: 0f 95 c1 setne %cl
the_node->parent->child[dir] = target;
10c095: 89 74 88 04 mov %esi,0x4(%eax,%ecx,4)
/* set target's new children to the original node's children */
target->child[RBT_RIGHT] = the_node->child[RBT_RIGHT];
10c099: 8b 43 08 mov 0x8(%ebx),%eax
10c09c: 89 46 08 mov %eax,0x8(%esi)
if (the_node->child[RBT_RIGHT])
10c09f: 8b 43 08 mov 0x8(%ebx),%eax
10c0a2: 85 c0 test %eax,%eax
10c0a4: 74 02 je 10c0a8 <_RBTree_Extract_unprotected+0xa4><== NEVER TAKEN
the_node->child[RBT_RIGHT]->parent = target;
10c0a6: 89 30 mov %esi,(%eax)
target->child[RBT_LEFT] = the_node->child[RBT_LEFT];
10c0a8: 8b 43 04 mov 0x4(%ebx),%eax
10c0ab: 89 46 04 mov %eax,0x4(%esi)
if (the_node->child[RBT_LEFT])
10c0ae: 8b 43 04 mov 0x4(%ebx),%eax
10c0b1: 85 c0 test %eax,%eax
10c0b3: 74 02 je 10c0b7 <_RBTree_Extract_unprotected+0xb3>
the_node->child[RBT_LEFT]->parent = target;
10c0b5: 89 30 mov %esi,(%eax)
/* finally, update the parent node and recolor. target has completely
* replaced the_node, and target's child has moved up the tree if needed.
* the_node is no longer part of the tree, although it has valid pointers
* still.
*/
target->parent = the_node->parent;
10c0b7: 8b 03 mov (%ebx),%eax
10c0b9: 89 06 mov %eax,(%esi)
target->color = the_node->color;
10c0bb: 8b 43 0c mov 0xc(%ebx),%eax
10c0be: 89 46 0c mov %eax,0xc(%esi)
10c0c1: eb 32 jmp 10c0f5 <_RBTree_Extract_unprotected+0xf1>
* the_node's location in the tree. This may cause the coloring to be
* violated. We will fix it later.
* For now we store the color of the node being deleted in victim_color.
*/
leaf = the_node->child[RBT_LEFT] ?
the_node->child[RBT_LEFT] : the_node->child[RBT_RIGHT];
10c0c3: 8b 53 08 mov 0x8(%ebx),%edx
if( leaf ) {
10c0c6: 85 d2 test %edx,%edx
10c0c8: 75 04 jne 10c0ce <_RBTree_Extract_unprotected+0xca>
10c0ca: eb 08 jmp 10c0d4 <_RBTree_Extract_unprotected+0xd0>
* either max in node->child[RBT_LEFT] or min in node->child[RBT_RIGHT],
* and replace the_node with the target node. This maintains the binary
* search tree property, but may violate the red-black properties.
*/
if (the_node->child[RBT_LEFT] && the_node->child[RBT_RIGHT]) {
10c0cc: 89 f2 mov %esi,%edx
* For now we store the color of the node being deleted in victim_color.
*/
leaf = the_node->child[RBT_LEFT] ?
the_node->child[RBT_LEFT] : the_node->child[RBT_RIGHT];
if( leaf ) {
leaf->parent = the_node->parent;
10c0ce: 8b 03 mov (%ebx),%eax
10c0d0: 89 02 mov %eax,(%edx)
10c0d2: eb 0d jmp 10c0e1 <_RBTree_Extract_unprotected+0xdd>
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(the_node);
10c0d4: 89 d8 mov %ebx,%eax
10c0d6: 89 55 e0 mov %edx,-0x20(%ebp)
10c0d9: e8 e9 fd ff ff call 10bec7 <_RBTree_Extract_validate_unprotected>
10c0de: 8b 55 e0 mov -0x20(%ebp),%edx
}
victim_color = the_node->color;
10c0e1: 8b 43 0c mov 0xc(%ebx),%eax
10c0e4: 89 45 e4 mov %eax,-0x1c(%ebp)
/* remove the_node from the tree */
dir = the_node != the_node->parent->child[0];
10c0e7: 8b 03 mov (%ebx),%eax
10c0e9: 31 c9 xor %ecx,%ecx
10c0eb: 3b 58 04 cmp 0x4(%eax),%ebx
10c0ee: 0f 95 c1 setne %cl
the_node->parent->child[dir] = leaf;
10c0f1: 89 54 88 04 mov %edx,0x4(%eax,%ecx,4)
/* fix coloring. leaf has moved up the tree. The color of the deleted
* node is in victim_color. There are two cases:
* 1. Deleted a red node, its child must be black. Nothing must be done.
* 2. Deleted a black node, its child must be red. Paint child black.
*/
if (victim_color == RBT_BLACK) { /* eliminate case 1 */
10c0f5: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp)
10c0f9: 75 0b jne 10c106 <_RBTree_Extract_unprotected+0x102>
if (leaf) {
10c0fb: 85 d2 test %edx,%edx
10c0fd: 74 07 je 10c106 <_RBTree_Extract_unprotected+0x102>
leaf->color = RBT_BLACK; /* case 2 */
10c0ff: c7 42 0c 00 00 00 00 movl $0x0,0xc(%edx)
*/
RTEMS_INLINE_ROUTINE void _RBTree_Set_off_rbtree(
RBTree_Node *node
)
{
node->parent = node->child[RBT_LEFT] = node->child[RBT_RIGHT] = NULL;
10c106: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
10c10d: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx)
10c114: c7 03 00 00 00 00 movl $0x0,(%ebx)
/* Wipe the_node */
_RBTree_Set_off_rbtree(the_node);
/* set root to black, if it exists */
if (the_rbtree->root) the_rbtree->root->color = RBT_BLACK;
10c11a: 8b 47 04 mov 0x4(%edi),%eax
10c11d: 85 c0 test %eax,%eax
10c11f: 74 07 je 10c128 <_RBTree_Extract_unprotected+0x124>
10c121: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
}
10c128: 8d 65 f4 lea -0xc(%ebp),%esp
10c12b: 5b pop %ebx
10c12c: 5e pop %esi
10c12d: 5f pop %edi
10c12e: 5d pop %ebp
10c12f: c3 ret
0010cb1c <_RBTree_Initialize>:
void *starting_address,
size_t number_nodes,
size_t node_size,
bool is_unique
)
{
10cb1c: 55 push %ebp
10cb1d: 89 e5 mov %esp,%ebp
10cb1f: 57 push %edi
10cb20: 56 push %esi
10cb21: 53 push %ebx
10cb22: 83 ec 0c sub $0xc,%esp
10cb25: 8b 5d 08 mov 0x8(%ebp),%ebx
10cb28: 8b 75 14 mov 0x14(%ebp),%esi
10cb2b: 8b 45 1c mov 0x1c(%ebp),%eax
size_t count;
RBTree_Node *next;
/* TODO: Error message? */
if (!the_rbtree) return;
10cb2e: 85 db test %ebx,%ebx
10cb30: 74 3d je 10cb6f <_RBTree_Initialize+0x53><== NEVER TAKEN
RBTree_Control *the_rbtree,
RBTree_Compare_function compare_function,
bool is_unique
)
{
the_rbtree->permanent_null = NULL;
10cb32: c7 03 00 00 00 00 movl $0x0,(%ebx)
the_rbtree->root = NULL;
10cb38: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx)
the_rbtree->first[0] = NULL;
10cb3f: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
the_rbtree->first[1] = NULL;
10cb46: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
the_rbtree->compare_function = compare_function;
10cb4d: 8b 55 0c mov 0xc(%ebp),%edx
10cb50: 89 53 10 mov %edx,0x10(%ebx)
the_rbtree->is_unique = is_unique;
10cb53: 88 43 14 mov %al,0x14(%ebx)
/* could do sanity checks here */
_RBTree_Initialize_empty(the_rbtree, compare_function, is_unique);
count = number_nodes;
next = starting_address;
10cb56: 8b 7d 10 mov 0x10(%ebp),%edi
while ( count-- ) {
10cb59: eb 10 jmp 10cb6b <_RBTree_Initialize+0x4f>
_RBTree_Insert_unprotected(the_rbtree, next);
10cb5b: 50 push %eax
10cb5c: 50 push %eax
10cb5d: 57 push %edi
10cb5e: 53 push %ebx
10cb5f: e8 a8 fd ff ff call 10c90c <_RBTree_Insert_unprotected>
* node_size - size of node in bytes
*
* Output parameters: NONE
*/
void _RBTree_Initialize(
10cb64: 03 7d 18 add 0x18(%ebp),%edi
10cb67: 4e dec %esi
10cb68: 83 c4 10 add $0x10,%esp
/* could do sanity checks here */
_RBTree_Initialize_empty(the_rbtree, compare_function, is_unique);
count = number_nodes;
next = starting_address;
while ( count-- ) {
10cb6b: 85 f6 test %esi,%esi
10cb6d: 75 ec jne 10cb5b <_RBTree_Initialize+0x3f>
_RBTree_Insert_unprotected(the_rbtree, next);
next = (RBTree_Node *)
_Addresses_Add_offset( (void *) next, node_size );
}
}
10cb6f: 8d 65 f4 lea -0xc(%ebp),%esp
10cb72: 5b pop %ebx
10cb73: 5e pop %esi
10cb74: 5f pop %edi
10cb75: 5d pop %ebp
10cb76: c3 ret
0010c194 <_RBTree_Insert_unprotected>:
*/
RBTree_Node *_RBTree_Insert_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
10c194: 55 push %ebp
10c195: 89 e5 mov %esp,%ebp
10c197: 57 push %edi
10c198: 56 push %esi
10c199: 53 push %ebx
10c19a: 83 ec 1c sub $0x1c,%esp
10c19d: 8b 75 08 mov 0x8(%ebp),%esi
10c1a0: 8b 5d 0c mov 0xc(%ebp),%ebx
if(!the_node) return (RBTree_Node*)-1;
10c1a3: 85 db test %ebx,%ebx
10c1a5: 0f 84 55 01 00 00 je 10c300 <_RBTree_Insert_unprotected+0x16c>
RBTree_Node *iter_node = the_rbtree->root;
10c1ab: 8b 7e 04 mov 0x4(%esi),%edi
int compare_result;
if (!iter_node) { /* special case: first node inserted */
10c1ae: 89 f9 mov %edi,%ecx
10c1b0: 85 ff test %edi,%edi
10c1b2: 75 27 jne 10c1db <_RBTree_Insert_unprotected+0x47>
the_node->color = RBT_BLACK;
10c1b4: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
the_rbtree->root = the_node;
10c1bb: 89 5e 04 mov %ebx,0x4(%esi)
the_rbtree->first[0] = the_rbtree->first[1] = the_node;
10c1be: 89 5e 0c mov %ebx,0xc(%esi)
10c1c1: 89 5e 08 mov %ebx,0x8(%esi)
the_node->parent = (RBTree_Node *) the_rbtree;
10c1c4: 89 33 mov %esi,(%ebx)
the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL;
10c1c6: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
10c1cd: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx)
10c1d4: e9 37 01 00 00 jmp 10c310 <_RBTree_Insert_unprotected+0x17c>
(dir && _RBTree_Is_greater(compare_result)) ) {
the_rbtree->first[dir] = the_node;
}
break;
} else {
iter_node = iter_node->child[dir];
10c1d9: 89 f9 mov %edi,%ecx
the_node->parent = (RBTree_Node *) the_rbtree;
the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL;
} else {
/* typical binary search tree insert, descend tree to leaf and insert */
while (iter_node) {
compare_result = the_rbtree->compare_function(the_node, iter_node);
10c1db: 52 push %edx
10c1dc: 52 push %edx
10c1dd: 57 push %edi
10c1de: 53 push %ebx
10c1df: 89 4d e4 mov %ecx,-0x1c(%ebp)
10c1e2: ff 56 10 call *0x10(%esi)
if ( the_rbtree->is_unique && _RBTree_Is_equal( compare_result ) )
10c1e5: 83 c4 10 add $0x10,%esp
10c1e8: 80 7e 14 00 cmpb $0x0,0x14(%esi)
10c1ec: 8b 4d e4 mov -0x1c(%ebp),%ecx
10c1ef: 74 08 je 10c1f9 <_RBTree_Insert_unprotected+0x65>
10c1f1: 85 c0 test %eax,%eax
10c1f3: 0f 84 17 01 00 00 je 10c310 <_RBTree_Insert_unprotected+0x17c>
return iter_node;
RBTree_Direction dir = !_RBTree_Is_lesser( compare_result );
10c1f9: 89 c2 mov %eax,%edx
10c1fb: f7 d2 not %edx
10c1fd: c1 ea 1f shr $0x1f,%edx
if (!iter_node->child[dir]) {
10c200: 8b 7c 97 04 mov 0x4(%edi,%edx,4),%edi
10c204: 85 ff test %edi,%edi
10c206: 75 d1 jne 10c1d9 <_RBTree_Insert_unprotected+0x45>
the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL;
10c208: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
10c20f: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx)
the_node->color = RBT_RED;
10c216: c7 43 0c 01 00 00 00 movl $0x1,0xc(%ebx)
iter_node->child[dir] = the_node;
10c21d: 89 5c 91 04 mov %ebx,0x4(%ecx,%edx,4)
the_node->parent = iter_node;
10c221: 89 0b mov %ecx,(%ebx)
/* update min/max */
compare_result = the_rbtree->compare_function(
10c223: 50 push %eax
10c224: 50 push %eax
10c225: ff 74 96 08 pushl 0x8(%esi,%edx,4)
10c229: 53 push %ebx
10c22a: 89 55 e4 mov %edx,-0x1c(%ebp)
10c22d: ff 56 10 call *0x10(%esi)
the_node,
_RBTree_First(the_rbtree, dir)
);
if ( (!dir && _RBTree_Is_lesser(compare_result)) ||
10c230: 83 c4 10 add $0x10,%esp
10c233: 8b 55 e4 mov -0x1c(%ebp),%edx
10c236: 85 d2 test %edx,%edx
10c238: 75 0a jne 10c244 <_RBTree_Insert_unprotected+0xb0>
10c23a: 85 c0 test %eax,%eax
10c23c: 0f 89 9f 00 00 00 jns 10c2e1 <_RBTree_Insert_unprotected+0x14d>
10c242: eb 08 jmp 10c24c <_RBTree_Insert_unprotected+0xb8>
(dir && _RBTree_Is_greater(compare_result)) ) {
10c244: 85 c0 test %eax,%eax
10c246: 0f 8e 95 00 00 00 jle 10c2e1 <_RBTree_Insert_unprotected+0x14d>
the_rbtree->first[dir] = the_node;
10c24c: 89 5c 96 08 mov %ebx,0x8(%esi,%edx,4)
10c250: e9 8c 00 00 00 jmp 10c2e1 <_RBTree_Insert_unprotected+0x14d>
const RBTree_Node *the_node
)
{
if(!the_node) return NULL;
if(!(the_node->parent)) return NULL;
if(!(the_node->parent->parent)) return NULL;
10c255: 85 f6 test %esi,%esi
10c257: 74 1b je 10c274 <_RBTree_Insert_unprotected+0xe0><== NEVER TAKEN
if(!(the_node->parent->parent->parent)) return NULL;
10c259: 83 3e 00 cmpl $0x0,(%esi)
10c25c: 74 16 je 10c274 <_RBTree_Insert_unprotected+0xe0><== NEVER TAKEN
{
if(!the_node) return NULL;
if(!(the_node->parent)) return NULL;
if(!(the_node->parent->parent)) return NULL;
if(the_node == the_node->parent->child[RBT_LEFT])
10c25e: 8b 56 04 mov 0x4(%esi),%edx
10c261: 39 d0 cmp %edx,%eax
10c263: 75 03 jne 10c268 <_RBTree_Insert_unprotected+0xd4>
return the_node->parent->child[RBT_RIGHT];
10c265: 8b 56 08 mov 0x8(%esi),%edx
*/
RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
const RBTree_Node *the_node
)
{
return (the_node && the_node->color == RBT_RED);
10c268: 85 d2 test %edx,%edx
10c26a: 74 0a je 10c276 <_RBTree_Insert_unprotected+0xe2>
10c26c: 83 7a 0c 01 cmpl $0x1,0xc(%edx)
10c270: 75 04 jne 10c276 <_RBTree_Insert_unprotected+0xe2>
10c272: eb 06 jmp 10c27a <_RBTree_Insert_unprotected+0xe6>
)
{
if(!the_node) return NULL;
if(!(the_node->parent)) return NULL;
if(!(the_node->parent->parent)) return NULL;
if(!(the_node->parent->parent->parent)) return NULL;
10c274: 31 d2 xor %edx,%edx <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
const RBTree_Node *the_node
)
{
return (the_node && the_node->color == RBT_RED);
10c276: 31 c9 xor %ecx,%ecx
10c278: eb 05 jmp 10c27f <_RBTree_Insert_unprotected+0xeb>
10c27a: b9 01 00 00 00 mov $0x1,%ecx
while (_RBTree_Is_red(_RBTree_Parent(the_node))) {
u = _RBTree_Parent_sibling(the_node);
g = the_node->parent->parent;
/* if uncle is red, repaint uncle/parent black and grandparent red */
if(_RBTree_Is_red(u)) {
10c27f: 85 c9 test %ecx,%ecx
10c281: 74 17 je 10c29a <_RBTree_Insert_unprotected+0x106>
the_node->parent->color = RBT_BLACK;
10c283: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
u->color = RBT_BLACK;
10c28a: c7 42 0c 00 00 00 00 movl $0x0,0xc(%edx)
g->color = RBT_RED;
10c291: c7 46 0c 01 00 00 00 movl $0x1,0xc(%esi)
10c298: eb 45 jmp 10c2df <_RBTree_Insert_unprotected+0x14b>
the_node = g;
} else { /* if uncle is black */
RBTree_Direction dir = the_node != the_node->parent->child[0];
RBTree_Direction pdir = the_node->parent != g->child[0];
10c29a: 31 c9 xor %ecx,%ecx
10c29c: 3b 46 04 cmp 0x4(%esi),%eax
10c29f: 0f 95 c1 setne %cl
the_node->parent->color = RBT_BLACK;
u->color = RBT_BLACK;
g->color = RBT_RED;
the_node = g;
} else { /* if uncle is black */
RBTree_Direction dir = the_node != the_node->parent->child[0];
10c2a2: 31 d2 xor %edx,%edx
10c2a4: 3b 58 04 cmp 0x4(%eax),%ebx
10c2a7: 0f 95 c2 setne %dl
RBTree_Direction pdir = the_node->parent != g->child[0];
/* ensure node is on the same branch direction as parent */
if (dir != pdir) {
10c2aa: 39 ca cmp %ecx,%edx
10c2ac: 74 11 je 10c2bf <_RBTree_Insert_unprotected+0x12b>
_RBTree_Rotate(the_node->parent, pdir);
10c2ae: 89 ca mov %ecx,%edx
10c2b0: 89 4d e4 mov %ecx,-0x1c(%ebp)
10c2b3: e8 98 fe ff ff call 10c150 <_RBTree_Rotate>
the_node = the_node->child[pdir];
10c2b8: 8b 4d e4 mov -0x1c(%ebp),%ecx
10c2bb: 8b 5c 8b 04 mov 0x4(%ebx,%ecx,4),%ebx
}
the_node->parent->color = RBT_BLACK;
10c2bf: 8b 03 mov (%ebx),%eax
10c2c1: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
g->color = RBT_RED;
10c2c8: c7 46 0c 01 00 00 00 movl $0x1,0xc(%esi)
/* now rotate grandparent in the other branch direction (toward uncle) */
_RBTree_Rotate(g, (1-pdir));
10c2cf: ba 01 00 00 00 mov $0x1,%edx
10c2d4: 29 ca sub %ecx,%edx
10c2d6: 89 f0 mov %esi,%eax
10c2d8: e8 73 fe ff ff call 10c150 <_RBTree_Rotate>
10c2dd: 89 de mov %ebx,%esi
10c2df: 89 f3 mov %esi,%ebx
_ISR_Disable( level );
return_node = _RBTree_Insert_unprotected( tree, node );
_ISR_Enable( level );
return return_node;
}
10c2e1: 8b 03 mov (%ebx),%eax
*/
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Parent(
const RBTree_Node *the_node
)
{
if (!the_node->parent->parent) return NULL;
10c2e3: 8b 30 mov (%eax),%esi
10c2e5: 85 f6 test %esi,%esi
10c2e7: 75 1c jne 10c305 <_RBTree_Insert_unprotected+0x171>
*/
RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
const RBTree_Node *the_node
)
{
return (the_node && the_node->color == RBT_RED);
10c2e9: 31 d2 xor %edx,%edx
RBTree_Node *u,*g;
/* note: the insert root case is handled already */
/* if the parent is black, nothing needs to be done
* otherwise may need to loop a few times */
while (_RBTree_Is_red(_RBTree_Parent(the_node))) {
10c2eb: 85 d2 test %edx,%edx
10c2ed: 0f 85 62 ff ff ff jne 10c255 <_RBTree_Insert_unprotected+0xc1>
/* now rotate grandparent in the other branch direction (toward uncle) */
_RBTree_Rotate(g, (1-pdir));
}
}
if(!the_node->parent->parent) the_node->color = RBT_BLACK;
10c2f3: 85 f6 test %esi,%esi
10c2f5: 75 19 jne 10c310 <_RBTree_Insert_unprotected+0x17c>
10c2f7: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
10c2fe: eb 10 jmp 10c310 <_RBTree_Insert_unprotected+0x17c>
RBTree_Node *_RBTree_Insert_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
if(!the_node) return (RBTree_Node*)-1;
10c300: 83 cf ff or $0xffffffff,%edi
10c303: eb 0b jmp 10c310 <_RBTree_Insert_unprotected+0x17c>
10c305: 31 d2 xor %edx,%edx
10c307: 83 78 0c 01 cmpl $0x1,0xc(%eax)
10c30b: 0f 94 c2 sete %dl
10c30e: eb db jmp 10c2eb <_RBTree_Insert_unprotected+0x157>
/* verify red-black properties */
_RBTree_Validate_insert_unprotected(the_node);
}
return (RBTree_Node*)0;
}
10c310: 89 f8 mov %edi,%eax
10c312: 8d 65 f4 lea -0xc(%ebp),%esp
10c315: 5b pop %ebx
10c316: 5e pop %esi
10c317: 5f pop %edi
10c318: 5d pop %ebp
10c319: c3 ret
0010c338 <_RBTree_Iterate_unprotected>:
const RBTree_Control *rbtree,
RBTree_Direction dir,
RBTree_Visitor visitor,
void *visitor_arg
)
{
10c338: 55 push %ebp
10c339: 89 e5 mov %esp,%ebp
10c33b: 57 push %edi
10c33c: 56 push %esi
10c33d: 53 push %ebx
10c33e: 83 ec 0c sub $0xc,%esp
10c341: 8b 5d 0c mov 0xc(%ebp),%ebx
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
10c344: 31 d2 xor %edx,%edx
10c346: 85 db test %ebx,%ebx
10c348: 0f 94 c2 sete %dl
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_First(
const RBTree_Control *the_rbtree,
RBTree_Direction dir
)
{
return the_rbtree->first[dir];
10c34b: 8b 45 08 mov 0x8(%ebp),%eax
10c34e: 8b 74 90 08 mov 0x8(%eax,%edx,4),%esi
RBTree_Direction opp_dir = _RBTree_Opposite_direction( dir );
const RBTree_Node *current = _RBTree_First( rbtree, opp_dir );
bool stop = false;
10c352: 31 ff xor %edi,%edi
while ( !stop && current != NULL ) {
10c354: eb 1b jmp 10c371 <_RBTree_Iterate_unprotected+0x39>
stop = (*visitor)( current, dir, visitor_arg );
10c356: 50 push %eax
10c357: ff 75 14 pushl 0x14(%ebp)
10c35a: 53 push %ebx
10c35b: 56 push %esi
10c35c: 8b 55 10 mov 0x10(%ebp),%edx
10c35f: ff d2 call *%edx
10c361: 89 c7 mov %eax,%edi
current = _RBTree_Next_unprotected( current, dir );
10c363: 5a pop %edx
10c364: 59 pop %ecx
10c365: 53 push %ebx
10c366: 56 push %esi
10c367: e8 18 00 00 00 call 10c384 <_RBTree_Next_unprotected>
10c36c: 89 c6 mov %eax,%esi
10c36e: 83 c4 10 add $0x10,%esp
{
RBTree_Direction opp_dir = _RBTree_Opposite_direction( dir );
const RBTree_Node *current = _RBTree_First( rbtree, opp_dir );
bool stop = false;
while ( !stop && current != NULL ) {
10c371: 85 f6 test %esi,%esi
10c373: 74 06 je 10c37b <_RBTree_Iterate_unprotected+0x43>
10c375: 89 f8 mov %edi,%eax
10c377: fe c8 dec %al
10c379: 75 db jne 10c356 <_RBTree_Iterate_unprotected+0x1e><== ALWAYS TAKEN
stop = (*visitor)( current, dir, visitor_arg );
current = _RBTree_Next_unprotected( current, dir );
}
}
10c37b: 8d 65 f4 lea -0xc(%ebp),%esp
10c37e: 5b pop %ebx
10c37f: 5e pop %esi
10c380: 5f pop %edi
10c381: 5d pop %ebp
10c382: c3 ret
0010be83 <_RBTree_Rotate>:
RBTree_Node *the_node,
RBTree_Direction dir
)
{
RBTree_Node *c;
if (the_node == NULL) return;
10be83: 85 c0 test %eax,%eax
10be85: 74 3f je 10bec6 <_RBTree_Rotate+0x43> <== NEVER TAKEN
*/
RTEMS_INLINE_ROUTINE void _RBTree_Rotate(
RBTree_Node *the_node,
RBTree_Direction dir
)
{
10be87: 55 push %ebp
10be88: 89 e5 mov %esp,%ebp
10be8a: 56 push %esi
10be8b: 53 push %ebx
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
10be8c: 31 db xor %ebx,%ebx
10be8e: 85 d2 test %edx,%edx
10be90: 0f 94 c3 sete %bl
RBTree_Direction dir
)
{
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return;
10be93: 8b 4c 98 04 mov 0x4(%eax,%ebx,4),%ecx
10be97: 85 c9 test %ecx,%ecx
10be99: 74 28 je 10bec3 <_RBTree_Rotate+0x40> <== NEVER TAKEN
c = the_node->child[_RBTree_Opposite_direction(dir)];
the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir];
10be9b: 8b 74 91 04 mov 0x4(%ecx,%edx,4),%esi
10be9f: 89 74 98 04 mov %esi,0x4(%eax,%ebx,4)
if (c->child[dir])
10bea3: 8b 5c 91 04 mov 0x4(%ecx,%edx,4),%ebx
10bea7: 85 db test %ebx,%ebx
10bea9: 74 02 je 10bead <_RBTree_Rotate+0x2a>
c->child[dir]->parent = the_node;
10beab: 89 03 mov %eax,(%ebx)
c->child[dir] = the_node;
10bead: 89 44 91 04 mov %eax,0x4(%ecx,%edx,4)
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
10beb1: 8b 10 mov (%eax),%edx
10beb3: 31 db xor %ebx,%ebx
10beb5: 3b 42 04 cmp 0x4(%edx),%eax
10beb8: 0f 95 c3 setne %bl
10bebb: 89 4c 9a 04 mov %ecx,0x4(%edx,%ebx,4)
c->parent = the_node->parent;
10bebf: 89 11 mov %edx,(%ecx)
the_node->parent = c;
10bec1: 89 08 mov %ecx,(%eax)
}
10bec3: 5b pop %ebx
10bec4: 5e pop %esi
10bec5: 5d pop %ebp
10bec6: c3 ret
0010be5f <_RBTree_Sibling>:
* exists, and NULL if not.
*/
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling(
const RBTree_Node *the_node
)
{
10be5f: 55 push %ebp
10be60: 89 e5 mov %esp,%ebp
if(!the_node) return NULL;
10be62: 85 c0 test %eax,%eax
10be64: 74 17 je 10be7d <_RBTree_Sibling+0x1e> <== NEVER TAKEN
if(!(the_node->parent)) return NULL;
10be66: 8b 08 mov (%eax),%ecx
10be68: 85 c9 test %ecx,%ecx
10be6a: 74 11 je 10be7d <_RBTree_Sibling+0x1e> <== NEVER TAKEN
if(!(the_node->parent->parent)) return NULL;
10be6c: 83 39 00 cmpl $0x0,(%ecx)
10be6f: 74 0c je 10be7d <_RBTree_Sibling+0x1e>
if(the_node == the_node->parent->child[RBT_LEFT])
10be71: 8b 51 04 mov 0x4(%ecx),%edx
10be74: 39 d0 cmp %edx,%eax
10be76: 75 07 jne 10be7f <_RBTree_Sibling+0x20>
return the_node->parent->child[RBT_RIGHT];
10be78: 8b 51 08 mov 0x8(%ecx),%edx
10be7b: eb 02 jmp 10be7f <_RBTree_Sibling+0x20>
*/
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling(
const RBTree_Node *the_node
)
{
if(!the_node) return NULL;
10be7d: 31 d2 xor %edx,%edx
if(the_node == the_node->parent->child[RBT_LEFT])
return the_node->parent->child[RBT_RIGHT];
else
return the_node->parent->child[RBT_LEFT];
}
10be7f: 89 d0 mov %edx,%eax
10be81: 5d pop %ebp
10be82: c3 ret
0012dbb8 <_Rate_monotonic_Get_status>:
bool _Rate_monotonic_Get_status(
Rate_monotonic_Control *the_period,
Rate_monotonic_Period_time_t *wall_since_last_period,
Thread_CPU_usage_t *cpu_since_last_period
)
{
12dbb8: 55 push %ebp
12dbb9: 89 e5 mov %esp,%ebp
12dbbb: 57 push %edi
12dbbc: 56 push %esi
12dbbd: 53 push %ebx
12dbbe: 83 ec 28 sub $0x28,%esp
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
Timestamp_Control uptime;
#endif
Thread_Control *owning_thread = the_period->owner;
12dbc1: 8b 45 08 mov 0x8(%ebp),%eax
12dbc4: 8b 78 40 mov 0x40(%eax),%edi
/*
* Determine elapsed wall time since period initiated.
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_TOD_Get_uptime( &uptime );
12dbc7: 8d 45 e0 lea -0x20(%ebp),%eax
12dbca: 50 push %eax
12dbcb: e8 e4 30 fe ff call 110cb4 <_TOD_Get_uptime>
_Timestamp_Subtract(
12dbd0: 8b 45 e0 mov -0x20(%ebp),%eax
12dbd3: 8b 55 e4 mov -0x1c(%ebp),%edx
const Timestamp64_Control *_start,
const Timestamp64_Control *_end,
Timestamp64_Control *_result
)
{
*_result = *_end - *_start;
12dbd6: 89 c1 mov %eax,%ecx
12dbd8: 89 d3 mov %edx,%ebx
12dbda: 8b 75 08 mov 0x8(%ebp),%esi
12dbdd: 2b 4e 4c sub 0x4c(%esi),%ecx
12dbe0: 1b 5e 50 sbb 0x50(%esi),%ebx
12dbe3: 8b 75 0c mov 0xc(%ebp),%esi
12dbe6: 89 0e mov %ecx,(%esi)
12dbe8: 89 5e 04 mov %ebx,0x4(%esi)
#endif
/*
* Determine cpu usage since period initiated.
*/
used = owning_thread->cpu_time_used;
12dbeb: 8b 8f 80 00 00 00 mov 0x80(%edi),%ecx
12dbf1: 8b 9f 84 00 00 00 mov 0x84(%edi),%ebx
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
if (owning_thread == _Thread_Executing) {
12dbf7: 83 c4 10 add $0x10,%esp
if (used < the_period->cpu_usage_period_initiated)
return false;
*cpu_since_last_period = used - the_period->cpu_usage_period_initiated;
#endif
return true;
12dbfa: be 01 00 00 00 mov $0x1,%esi
* Determine cpu usage since period initiated.
*/
used = owning_thread->cpu_time_used;
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
if (owning_thread == _Thread_Executing) {
12dbff: 3b 3d 04 e7 16 00 cmp 0x16e704,%edi
12dc05: 75 38 jne 12dc3f <_Rate_monotonic_Get_status+0x87>
12dc07: 2b 05 14 e7 16 00 sub 0x16e714,%eax
12dc0d: 1b 15 18 e7 16 00 sbb 0x16e718,%edx
static inline void _Timestamp64_implementation_Add_to(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
*_time += *_add;
12dc13: 01 c8 add %ecx,%eax
12dc15: 11 da adc %ebx,%edx
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
12dc17: 8b 75 08 mov 0x8(%ebp),%esi
12dc1a: 8b 4e 44 mov 0x44(%esi),%ecx
12dc1d: 8b 5e 48 mov 0x48(%esi),%ebx
/*
* The cpu usage info was reset while executing. Can't
* determine a status.
*/
if (_Timestamp_Less_than(&used, &the_period->cpu_usage_period_initiated))
12dc20: 39 da cmp %ebx,%edx
12dc22: 7c 19 jl 12dc3d <_Rate_monotonic_Get_status+0x85><== NEVER TAKEN
12dc24: 7f 04 jg 12dc2a <_Rate_monotonic_Get_status+0x72>
12dc26: 39 c8 cmp %ecx,%eax
12dc28: 72 13 jb 12dc3d <_Rate_monotonic_Get_status+0x85>
const Timestamp64_Control *_start,
const Timestamp64_Control *_end,
Timestamp64_Control *_result
)
{
*_result = *_end - *_start;
12dc2a: 29 c8 sub %ecx,%eax
12dc2c: 19 da sbb %ebx,%edx
12dc2e: 8b 4d 10 mov 0x10(%ebp),%ecx
12dc31: 89 01 mov %eax,(%ecx)
12dc33: 89 51 04 mov %edx,0x4(%ecx)
if (used < the_period->cpu_usage_period_initiated)
return false;
*cpu_since_last_period = used - the_period->cpu_usage_period_initiated;
#endif
return true;
12dc36: be 01 00 00 00 mov $0x1,%esi
12dc3b: eb 02 jmp 12dc3f <_Rate_monotonic_Get_status+0x87>
/*
* The cpu usage info was reset while executing. Can't
* determine a status.
*/
if (_Timestamp_Less_than(&used, &the_period->cpu_usage_period_initiated))
return false;
12dc3d: 31 f6 xor %esi,%esi
return false;
*cpu_since_last_period = used - the_period->cpu_usage_period_initiated;
#endif
return true;
}
12dc3f: 89 f0 mov %esi,%eax
12dc41: 8d 65 f4 lea -0xc(%ebp),%esp
12dc44: 5b pop %ebx
12dc45: 5e pop %esi
12dc46: 5f pop %edi
12dc47: 5d pop %ebp
12dc48: c3 ret
0012dedc <_Rate_monotonic_Timeout>:
void _Rate_monotonic_Timeout(
Objects_Id id,
void *ignored
)
{
12dedc: 55 push %ebp
12dedd: 89 e5 mov %esp,%ebp
12dedf: 53 push %ebx
12dee0: 83 ec 18 sub $0x18,%esp
/*
* 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 );
12dee3: 8d 45 f4 lea -0xc(%ebp),%eax
12dee6: 50 push %eax
12dee7: ff 75 08 pushl 0x8(%ebp)
12deea: 68 a0 ec 16 00 push $0x16eca0
12deef: e8 4c d1 fd ff call 10b040 <_Objects_Get>
switch ( location ) {
12def4: 83 c4 10 add $0x10,%esp
12def7: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
12defb: 75 6b jne 12df68 <_Rate_monotonic_Timeout+0x8c><== NEVER TAKEN
12defd: 89 c3 mov %eax,%ebx
case OBJECTS_LOCAL:
the_thread = the_period->owner;
12deff: 8b 40 40 mov 0x40(%eax),%eax
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
12df02: f6 40 11 40 testb $0x40,0x11(%eax)
12df06: 74 18 je 12df20 <_Rate_monotonic_Timeout+0x44>
12df08: 8b 53 08 mov 0x8(%ebx),%edx
12df0b: 39 50 20 cmp %edx,0x20(%eax)
12df0e: 75 10 jne 12df20 <_Rate_monotonic_Timeout+0x44>
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
12df10: 51 push %ecx
12df11: 51 push %ecx
12df12: 68 f8 ff 03 10 push $0x1003fff8
12df17: 50 push %eax
12df18: e8 27 d9 fd ff call 10b844 <_Thread_Clear_state>
the_thread->Wait.id == the_period->Object.id ) {
_Thread_Unblock( the_thread );
_Rate_monotonic_Initiate_statistics( the_period );
12df1d: 58 pop %eax
12df1e: eb 10 jmp 12df30 <_Rate_monotonic_Timeout+0x54>
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) {
12df20: 83 7b 38 01 cmpl $0x1,0x38(%ebx)
12df24: 75 2b jne 12df51 <_Rate_monotonic_Timeout+0x75>
the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING;
12df26: c7 43 38 03 00 00 00 movl $0x3,0x38(%ebx)
_Rate_monotonic_Initiate_statistics( the_period );
12df2d: 83 ec 0c sub $0xc,%esp
12df30: 53 push %ebx
12df31: e8 b2 fd ff ff call 12dce8 <_Rate_monotonic_Initiate_statistics>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
12df36: 8b 43 3c mov 0x3c(%ebx),%eax
12df39: 89 43 1c mov %eax,0x1c(%ebx)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
12df3c: 58 pop %eax
12df3d: 5a pop %edx
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
12df3e: 83 c3 10 add $0x10,%ebx
12df41: 53 push %ebx
12df42: 68 a0 e2 16 00 push $0x16e2a0
12df47: e8 20 e7 fd ff call 10c66c <_Watchdog_Insert>
12df4c: 83 c4 10 add $0x10,%esp
12df4f: eb 07 jmp 12df58 <_Rate_monotonic_Timeout+0x7c>
} else
the_period->state = RATE_MONOTONIC_EXPIRED;
12df51: c7 43 38 04 00 00 00 movl $0x4,0x38(%ebx)
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
12df58: a1 fc e1 16 00 mov 0x16e1fc,%eax
12df5d: 48 dec %eax
12df5e: a3 fc e1 16 00 mov %eax,0x16e1fc
return _Thread_Dispatch_disable_level;
12df63: a1 fc e1 16 00 mov 0x16e1fc,%eax
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
12df68: 8b 5d fc mov -0x4(%ebp),%ebx
12df6b: c9 leave
12df6c: c3 ret
0012dc49 <_Rate_monotonic_Update_statistics>:
}
static void _Rate_monotonic_Update_statistics(
Rate_monotonic_Control *the_period
)
{
12dc49: 55 push %ebp
12dc4a: 89 e5 mov %esp,%ebp
12dc4c: 56 push %esi
12dc4d: 53 push %ebx
12dc4e: 83 ec 10 sub $0x10,%esp
12dc51: 89 c6 mov %eax,%esi
/*
* Update the counts.
*/
stats = &the_period->Statistics;
stats->count++;
12dc53: ff 40 54 incl 0x54(%eax)
if ( the_period->state == RATE_MONOTONIC_EXPIRED )
12dc56: 83 78 38 04 cmpl $0x4,0x38(%eax)
12dc5a: 75 03 jne 12dc5f <_Rate_monotonic_Update_statistics+0x16>
stats->missed_count++;
12dc5c: ff 40 58 incl 0x58(%eax)
/*
* Grab status for time statistics.
*/
valid_status =
12dc5f: 50 push %eax
_Rate_monotonic_Get_status( the_period, &since_last_period, &executed );
12dc60: 8d 45 e8 lea -0x18(%ebp),%eax
stats->missed_count++;
/*
* Grab status for time statistics.
*/
valid_status =
12dc63: 50 push %eax
_Rate_monotonic_Get_status( the_period, &since_last_period, &executed );
12dc64: 8d 45 f0 lea -0x10(%ebp),%eax
stats->missed_count++;
/*
* Grab status for time statistics.
*/
valid_status =
12dc67: 50 push %eax
12dc68: 56 push %esi
12dc69: e8 4a ff ff ff call 12dbb8 <_Rate_monotonic_Get_status>
_Rate_monotonic_Get_status( the_period, &since_last_period, &executed );
if (!valid_status)
12dc6e: 83 c4 10 add $0x10,%esp
12dc71: 84 c0 test %al,%al
12dc73: 74 6c je 12dce1 <_Rate_monotonic_Update_statistics+0x98>
/*
* Update CPU time
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Add_to( &stats->total_cpu_time, &executed );
12dc75: 8b 4d e8 mov -0x18(%ebp),%ecx
12dc78: 8b 5d ec mov -0x14(%ebp),%ebx
static inline void _Timestamp64_implementation_Add_to(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
*_time += *_add;
12dc7b: 01 4e 6c add %ecx,0x6c(%esi)
12dc7e: 11 5e 70 adc %ebx,0x70(%esi)
if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) )
12dc81: 3b 5e 60 cmp 0x60(%esi),%ebx
12dc84: 7f 0d jg 12dc93 <_Rate_monotonic_Update_statistics+0x4a><== NEVER TAKEN
12dc86: 7c 05 jl 12dc8d <_Rate_monotonic_Update_statistics+0x44>
12dc88: 3b 4e 5c cmp 0x5c(%esi),%ecx
12dc8b: 73 06 jae 12dc93 <_Rate_monotonic_Update_statistics+0x4a>
stats->min_cpu_time = executed;
12dc8d: 89 4e 5c mov %ecx,0x5c(%esi)
12dc90: 89 5e 60 mov %ebx,0x60(%esi)
if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) )
12dc93: 39 5e 68 cmp %ebx,0x68(%esi)
12dc96: 7f 0d jg 12dca5 <_Rate_monotonic_Update_statistics+0x5c><== NEVER TAKEN
12dc98: 7c 05 jl 12dc9f <_Rate_monotonic_Update_statistics+0x56><== NEVER TAKEN
12dc9a: 39 4e 64 cmp %ecx,0x64(%esi)
12dc9d: 73 06 jae 12dca5 <_Rate_monotonic_Update_statistics+0x5c>
stats->max_cpu_time = executed;
12dc9f: 89 4e 64 mov %ecx,0x64(%esi)
12dca2: 89 5e 68 mov %ebx,0x68(%esi)
/*
* Update Wall time
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Add_to( &stats->total_wall_time, &since_last_period );
12dca5: 8b 4d f0 mov -0x10(%ebp),%ecx
12dca8: 8b 5d f4 mov -0xc(%ebp),%ebx
12dcab: 01 8e 84 00 00 00 add %ecx,0x84(%esi)
12dcb1: 11 9e 88 00 00 00 adc %ebx,0x88(%esi)
if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) )
12dcb7: 3b 5e 78 cmp 0x78(%esi),%ebx
12dcba: 7f 0d jg 12dcc9 <_Rate_monotonic_Update_statistics+0x80><== NEVER TAKEN
12dcbc: 7c 05 jl 12dcc3 <_Rate_monotonic_Update_statistics+0x7a>
12dcbe: 3b 4e 74 cmp 0x74(%esi),%ecx
12dcc1: 73 06 jae 12dcc9 <_Rate_monotonic_Update_statistics+0x80>
stats->min_wall_time = since_last_period;
12dcc3: 89 4e 74 mov %ecx,0x74(%esi)
12dcc6: 89 5e 78 mov %ebx,0x78(%esi)
if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) )
12dcc9: 39 9e 80 00 00 00 cmp %ebx,0x80(%esi)
12dccf: 7f 10 jg 12dce1 <_Rate_monotonic_Update_statistics+0x98>
12dcd1: 7c 05 jl 12dcd8 <_Rate_monotonic_Update_statistics+0x8f><== NEVER TAKEN
12dcd3: 39 4e 7c cmp %ecx,0x7c(%esi)
12dcd6: 73 09 jae 12dce1 <_Rate_monotonic_Update_statistics+0x98>
stats->max_wall_time = since_last_period;
12dcd8: 89 4e 7c mov %ecx,0x7c(%esi)
12dcdb: 89 9e 80 00 00 00 mov %ebx,0x80(%esi)
stats->min_wall_time = since_last_period;
if ( since_last_period > stats->max_wall_time )
stats->max_wall_time = since_last_period;
#endif
}
12dce1: 8d 65 f8 lea -0x8(%ebp),%esp
12dce4: 5b pop %ebx
12dce5: 5e pop %esi
12dce6: 5d pop %ebp
12dce7: c3 ret
0010bcd8 <_Scheduler_CBS_Allocate>:
#include <rtems/score/wkspace.h>
void *_Scheduler_CBS_Allocate(
Thread_Control *the_thread
)
{
10bcd8: 55 push %ebp
10bcd9: 89 e5 mov %esp,%ebp
10bcdb: 53 push %ebx
10bcdc: 83 ec 10 sub $0x10,%esp
10bcdf: 8b 5d 08 mov 0x8(%ebp),%ebx
void *sched;
Scheduler_CBS_Per_thread *schinfo;
sched = _Workspace_Allocate(sizeof(Scheduler_CBS_Per_thread));
10bce2: 6a 1c push $0x1c
10bce4: e8 a7 15 00 00 call 10d290 <_Workspace_Allocate>
if ( sched ) {
10bce9: 83 c4 10 add $0x10,%esp
10bcec: 85 c0 test %eax,%eax
10bcee: 74 16 je 10bd06 <_Scheduler_CBS_Allocate+0x2e><== NEVER TAKEN
the_thread->scheduler_info = sched;
10bcf0: 89 83 88 00 00 00 mov %eax,0x88(%ebx)
schinfo = (Scheduler_CBS_Per_thread *)(the_thread->scheduler_info);
schinfo->edf_per_thread.thread = the_thread;
10bcf6: 89 18 mov %ebx,(%eax)
schinfo->edf_per_thread.queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN;
10bcf8: c7 40 14 02 00 00 00 movl $0x2,0x14(%eax)
schinfo->cbs_server = NULL;
10bcff: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax)
}
return sched;
}
10bd06: 8b 5d fc mov -0x4(%ebp),%ebx
10bd09: c9 leave
10bd0a: c3 ret
0010d104 <_Scheduler_CBS_Budget_callout>:
Scheduler_CBS_Server **_Scheduler_CBS_Server_list;
void _Scheduler_CBS_Budget_callout(
Thread_Control *the_thread
)
{
10d104: 55 push %ebp
10d105: 89 e5 mov %esp,%ebp
10d107: 53 push %ebx
10d108: 83 ec 14 sub $0x14,%esp
10d10b: 8b 5d 08 mov 0x8(%ebp),%ebx
Priority_Control new_priority;
Scheduler_CBS_Per_thread *sched_info;
Scheduler_CBS_Server_id server_id;
/* Put violating task to background until the end of period. */
new_priority = the_thread->Start.initial_priority;
10d10e: 8b 83 ac 00 00 00 mov 0xac(%ebx),%eax
if ( the_thread->real_priority != new_priority )
10d114: 39 43 18 cmp %eax,0x18(%ebx)
10d117: 74 03 je 10d11c <_Scheduler_CBS_Budget_callout+0x18><== NEVER TAKEN
the_thread->real_priority = new_priority;
10d119: 89 43 18 mov %eax,0x18(%ebx)
if ( the_thread->current_priority != new_priority )
10d11c: 39 43 14 cmp %eax,0x14(%ebx)
10d11f: 74 0d je 10d12e <_Scheduler_CBS_Budget_callout+0x2a><== NEVER TAKEN
_Thread_Change_priority(the_thread, new_priority, true);
10d121: 52 push %edx
10d122: 6a 01 push $0x1
10d124: 50 push %eax
10d125: 53 push %ebx
10d126: e8 b5 04 00 00 call 10d5e0 <_Thread_Change_priority>
10d12b: 83 c4 10 add $0x10,%esp
/* Invoke callback function if any. */
sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
10d12e: 8b 9b 88 00 00 00 mov 0x88(%ebx),%ebx
if ( sched_info->cbs_server->cbs_budget_overrun ) {
10d134: 8b 43 18 mov 0x18(%ebx),%eax
10d137: 83 78 0c 00 cmpl $0x0,0xc(%eax)
10d13b: 74 1a je 10d157 <_Scheduler_CBS_Budget_callout+0x53>
_Scheduler_CBS_Get_server_id(
10d13d: 52 push %edx
10d13e: 52 push %edx
10d13f: 8d 55 f4 lea -0xc(%ebp),%edx
10d142: 52 push %edx
10d143: ff 30 pushl (%eax)
10d145: e8 7e ff ff ff call 10d0c8 <_Scheduler_CBS_Get_server_id>
sched_info->cbs_server->task_id,
&server_id
);
sched_info->cbs_server->cbs_budget_overrun( server_id );
10d14a: 59 pop %ecx
10d14b: 8b 43 18 mov 0x18(%ebx),%eax
10d14e: ff 75 f4 pushl -0xc(%ebp)
10d151: ff 50 0c call *0xc(%eax)
10d154: 83 c4 10 add $0x10,%esp
}
}
10d157: 8b 5d fc mov -0x4(%ebp),%ebx
10d15a: c9 leave
10d15b: c3 ret
0010cdcc <_Scheduler_CBS_Create_server>:
int _Scheduler_CBS_Create_server (
Scheduler_CBS_Parameters *params,
Scheduler_CBS_Budget_overrun budget_overrun_callback,
rtems_id *server_id
)
{
10cdcc: 55 push %ebp
10cdcd: 89 e5 mov %esp,%ebp
10cdcf: 57 push %edi
10cdd0: 56 push %esi
10cdd1: 53 push %ebx
10cdd2: 83 ec 0c sub $0xc,%esp
10cdd5: 8b 5d 08 mov 0x8(%ebp),%ebx
10cdd8: 8b 75 10 mov 0x10(%ebp),%esi
unsigned int i;
Scheduler_CBS_Server *the_server;
if ( params->budget <= 0 ||
10cddb: 83 7b 04 00 cmpl $0x0,0x4(%ebx)
10cddf: 7e 42 jle 10ce23 <_Scheduler_CBS_Create_server+0x57>
10cde1: 83 3b 00 cmpl $0x0,(%ebx)
10cde4: 7e 3d jle 10ce23 <_Scheduler_CBS_Create_server+0x57>
params->deadline <= 0 ||
params->budget >= SCHEDULER_EDF_PRIO_MSB ||
params->deadline >= SCHEDULER_EDF_PRIO_MSB )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
10cde6: 8b 15 6c d2 12 00 mov 0x12d26c,%edx
if ( !_Scheduler_CBS_Server_list[i] )
10cdec: 8b 0d ac 19 13 00 mov 0x1319ac,%ecx
10cdf2: 31 c0 xor %eax,%eax
10cdf4: eb 07 jmp 10cdfd <_Scheduler_CBS_Create_server+0x31>
10cdf6: 83 3c 81 00 cmpl $0x0,(%ecx,%eax,4)
10cdfa: 74 35 je 10ce31 <_Scheduler_CBS_Create_server+0x65>
params->deadline <= 0 ||
params->budget >= SCHEDULER_EDF_PRIO_MSB ||
params->deadline >= SCHEDULER_EDF_PRIO_MSB )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
10cdfc: 40 inc %eax
10cdfd: 39 d0 cmp %edx,%eax
10cdff: 75 f5 jne 10cdf6 <_Scheduler_CBS_Create_server+0x2a>
if ( !_Scheduler_CBS_Server_list[i] )
break;
}
if ( i == _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_FULL;
10ce01: b8 e6 ff ff ff mov $0xffffffe6,%eax
10ce06: eb 53 jmp 10ce5b <_Scheduler_CBS_Create_server+0x8f>
_Workspace_Allocate( sizeof(Scheduler_CBS_Server) );
the_server = _Scheduler_CBS_Server_list[*server_id];
if ( !the_server )
return SCHEDULER_CBS_ERROR_NO_MEMORY;
the_server->parameters = *params;
10ce08: 8b 03 mov (%ebx),%eax
10ce0a: 8b 53 04 mov 0x4(%ebx),%edx
10ce0d: 89 41 04 mov %eax,0x4(%ecx)
10ce10: 89 51 08 mov %edx,0x8(%ecx)
the_server->task_id = -1;
10ce13: c7 01 ff ff ff ff movl $0xffffffff,(%ecx)
the_server->cbs_budget_overrun = budget_overrun_callback;
10ce19: 8b 45 0c mov 0xc(%ebp),%eax
10ce1c: 89 41 0c mov %eax,0xc(%ecx)
return SCHEDULER_CBS_OK;
10ce1f: 31 c0 xor %eax,%eax
10ce21: eb 38 jmp 10ce5b <_Scheduler_CBS_Create_server+0x8f>
if ( params->budget <= 0 ||
params->deadline <= 0 ||
params->budget >= SCHEDULER_EDF_PRIO_MSB ||
params->deadline >= SCHEDULER_EDF_PRIO_MSB )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
10ce23: b8 ee ff ff ff mov $0xffffffee,%eax
10ce28: eb 31 jmp 10ce5b <_Scheduler_CBS_Create_server+0x8f>
*server_id = i;
_Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *)
_Workspace_Allocate( sizeof(Scheduler_CBS_Server) );
the_server = _Scheduler_CBS_Server_list[*server_id];
if ( !the_server )
return SCHEDULER_CBS_ERROR_NO_MEMORY;
10ce2a: b8 ef ff ff ff mov $0xffffffef,%eax <== NOT EXECUTED
10ce2f: eb 2a jmp 10ce5b <_Scheduler_CBS_Create_server+0x8f><== NOT EXECUTED
}
if ( i == _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_FULL;
*server_id = i;
10ce31: 89 06 mov %eax,(%esi)
_Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *)
10ce33: 8b 15 ac 19 13 00 mov 0x1319ac,%edx
10ce39: 8d 3c 82 lea (%edx,%eax,4),%edi
_Workspace_Allocate( sizeof(Scheduler_CBS_Server) );
10ce3c: 83 ec 0c sub $0xc,%esp
10ce3f: 6a 10 push $0x10
10ce41: e8 c2 18 00 00 call 10e708 <_Workspace_Allocate>
if ( i == _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_FULL;
*server_id = i;
_Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *)
10ce46: 89 07 mov %eax,(%edi)
_Workspace_Allocate( sizeof(Scheduler_CBS_Server) );
the_server = _Scheduler_CBS_Server_list[*server_id];
10ce48: 8b 16 mov (%esi),%edx
10ce4a: a1 ac 19 13 00 mov 0x1319ac,%eax
10ce4f: 8b 0c 90 mov (%eax,%edx,4),%ecx
if ( !the_server )
10ce52: 83 c4 10 add $0x10,%esp
10ce55: 85 c9 test %ecx,%ecx
10ce57: 75 af jne 10ce08 <_Scheduler_CBS_Create_server+0x3c><== ALWAYS TAKEN
10ce59: eb cf jmp 10ce2a <_Scheduler_CBS_Create_server+0x5e><== NOT EXECUTED
the_server->parameters = *params;
the_server->task_id = -1;
the_server->cbs_budget_overrun = budget_overrun_callback;
return SCHEDULER_CBS_OK;
}
10ce5b: 8d 65 f4 lea -0xc(%ebp),%esp
10ce5e: 5b pop %ebx
10ce5f: 5e pop %esi
10ce60: 5f pop %edi
10ce61: 5d pop %ebp
10ce62: c3 ret
0010ced4 <_Scheduler_CBS_Detach_thread>:
int _Scheduler_CBS_Detach_thread (
Scheduler_CBS_Server_id server_id,
rtems_id task_id
)
{
10ced4: 55 push %ebp
10ced5: 89 e5 mov %esp,%ebp
10ced7: 57 push %edi
10ced8: 56 push %esi
10ced9: 53 push %ebx
10ceda: 83 ec 24 sub $0x24,%esp
10cedd: 8b 7d 08 mov 0x8(%ebp),%edi
10cee0: 8b 75 0c mov 0xc(%ebp),%esi
Objects_Locations location;
Thread_Control *the_thread;
Scheduler_CBS_Per_thread *sched_info;
the_thread = _Thread_Get(task_id, &location);
10cee3: 8d 45 e4 lea -0x1c(%ebp),%eax
10cee6: 50 push %eax
10cee7: 56 push %esi
10cee8: e8 03 0b 00 00 call 10d9f0 <_Thread_Get>
10ceed: 89 c3 mov %eax,%ebx
/* The routine _Thread_Get may disable dispatch and not enable again. */
if ( the_thread ) {
10ceef: 83 c4 10 add $0x10,%esp
10cef2: 85 c0 test %eax,%eax
10cef4: 74 05 je 10cefb <_Scheduler_CBS_Detach_thread+0x27>
_Thread_Enable_dispatch();
10cef6: e8 d5 0a 00 00 call 10d9d0 <_Thread_Enable_dispatch>
}
if ( server_id >= _Scheduler_CBS_Maximum_servers )
10cefb: 3b 3d 6c d2 12 00 cmp 0x12d26c,%edi
10cf01: 73 4d jae 10cf50 <_Scheduler_CBS_Detach_thread+0x7c>
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
if ( !the_thread )
10cf03: 85 db test %ebx,%ebx
10cf05: 74 49 je 10cf50 <_Scheduler_CBS_Detach_thread+0x7c>
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
/* Server is not valid. */
if ( !_Scheduler_CBS_Server_list[server_id] )
10cf07: a1 ac 19 13 00 mov 0x1319ac,%eax
10cf0c: 8b 04 b8 mov (%eax,%edi,4),%eax
10cf0f: 85 c0 test %eax,%eax
10cf11: 74 36 je 10cf49 <_Scheduler_CBS_Detach_thread+0x75>
return SCHEDULER_CBS_ERROR_NOSERVER;
/* Thread and server are not attached. */
if ( _Scheduler_CBS_Server_list[server_id]->task_id != task_id )
10cf13: 39 30 cmp %esi,(%eax)
10cf15: 75 39 jne 10cf50 <_Scheduler_CBS_Detach_thread+0x7c><== NEVER TAKEN
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
_Scheduler_CBS_Server_list[server_id]->task_id = -1;
10cf17: c7 00 ff ff ff ff movl $0xffffffff,(%eax)
sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
sched_info->cbs_server = NULL;
10cf1d: 8b 83 88 00 00 00 mov 0x88(%ebx),%eax
10cf23: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax)
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
10cf2a: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax
10cf30: 89 43 78 mov %eax,0x78(%ebx)
the_thread->budget_callout = the_thread->Start.budget_callout;
10cf33: 8b 83 a4 00 00 00 mov 0xa4(%ebx),%eax
10cf39: 89 43 7c mov %eax,0x7c(%ebx)
the_thread->is_preemptible = the_thread->Start.is_preemptible;
10cf3c: 8a 83 9c 00 00 00 mov 0x9c(%ebx),%al
10cf42: 88 43 70 mov %al,0x70(%ebx)
return SCHEDULER_CBS_OK;
10cf45: 31 c0 xor %eax,%eax
10cf47: eb 0c jmp 10cf55 <_Scheduler_CBS_Detach_thread+0x81>
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
if ( !the_thread )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
/* Server is not valid. */
if ( !_Scheduler_CBS_Server_list[server_id] )
return SCHEDULER_CBS_ERROR_NOSERVER;
10cf49: b8 e7 ff ff ff mov $0xffffffe7,%eax
10cf4e: eb 05 jmp 10cf55 <_Scheduler_CBS_Detach_thread+0x81>
if ( the_thread ) {
_Thread_Enable_dispatch();
}
if ( server_id >= _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
10cf50: b8 ee ff ff ff mov $0xffffffee,%eax
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
the_thread->budget_callout = the_thread->Start.budget_callout;
the_thread->is_preemptible = the_thread->Start.is_preemptible;
return SCHEDULER_CBS_OK;
}
10cf55: 8d 65 f4 lea -0xc(%ebp),%esp
10cf58: 5b pop %ebx
10cf59: 5e pop %esi
10cf5a: 5f pop %edi
10cf5b: 5d pop %ebp
10cf5c: c3 ret
0010cf98 <_Scheduler_CBS_Get_execution_time>:
int _Scheduler_CBS_Get_execution_time (
Scheduler_CBS_Server_id server_id,
time_t *exec_time,
time_t *abs_time
)
{
10cf98: 55 push %ebp
10cf99: 89 e5 mov %esp,%ebp
10cf9b: 57 push %edi
10cf9c: 56 push %esi
10cf9d: 53 push %ebx
10cf9e: 83 ec 1c sub $0x1c,%esp
10cfa1: 8b 5d 08 mov 0x8(%ebp),%ebx
10cfa4: 8b 75 0c mov 0xc(%ebp),%esi
Objects_Locations location;
Thread_Control *the_thread;
if ( server_id >= _Scheduler_CBS_Maximum_servers )
10cfa7: 3b 1d 6c d2 12 00 cmp 0x12d26c,%ebx
10cfad: 73 58 jae 10d007 <_Scheduler_CBS_Get_execution_time+0x6f>
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
if ( !_Scheduler_CBS_Server_list[server_id] )
10cfaf: a1 ac 19 13 00 mov 0x1319ac,%eax
10cfb4: 8b 04 98 mov (%eax,%ebx,4),%eax
10cfb7: 85 c0 test %eax,%eax
10cfb9: 74 53 je 10d00e <_Scheduler_CBS_Get_execution_time+0x76>
return SCHEDULER_CBS_ERROR_NOSERVER;
if ( _Scheduler_CBS_Server_list[server_id]->task_id == -1 ) {
10cfbb: 8b 00 mov (%eax),%eax
10cfbd: 83 f8 ff cmp $0xffffffff,%eax
10cfc0: 75 08 jne 10cfca <_Scheduler_CBS_Get_execution_time+0x32>
*exec_time = 0;
10cfc2: c7 06 00 00 00 00 movl $0x0,(%esi)
10cfc8: eb 39 jmp 10d003 <_Scheduler_CBS_Get_execution_time+0x6b>
return SCHEDULER_CBS_OK;
}
the_thread = _Thread_Get(
10cfca: 52 push %edx
10cfcb: 52 push %edx
10cfcc: 8d 55 e4 lea -0x1c(%ebp),%edx
10cfcf: 52 push %edx
10cfd0: 50 push %eax
10cfd1: e8 1a 0a 00 00 call 10d9f0 <_Thread_Get>
10cfd6: 89 c7 mov %eax,%edi
_Scheduler_CBS_Server_list[server_id]->task_id,
&location
);
/* The routine _Thread_Get may disable dispatch and not enable again. */
if ( the_thread ) {
10cfd8: 83 c4 10 add $0x10,%esp
10cfdb: 85 c0 test %eax,%eax
10cfdd: 74 17 je 10cff6 <_Scheduler_CBS_Get_execution_time+0x5e><== NEVER TAKEN
_Thread_Enable_dispatch();
10cfdf: e8 ec 09 00 00 call 10d9d0 <_Thread_Enable_dispatch>
*exec_time = _Scheduler_CBS_Server_list[server_id]->parameters.budget -
10cfe4: a1 ac 19 13 00 mov 0x1319ac,%eax
10cfe9: 8b 04 98 mov (%eax,%ebx,4),%eax
10cfec: 8b 50 08 mov 0x8(%eax),%edx
10cfef: 2b 57 74 sub 0x74(%edi),%edx
10cff2: 89 16 mov %edx,(%esi)
10cff4: eb 0d jmp 10d003 <_Scheduler_CBS_Get_execution_time+0x6b>
the_thread->cpu_time_budget;
}
else {
*exec_time = _Scheduler_CBS_Server_list[server_id]->parameters.budget;
10cff6: a1 ac 19 13 00 mov 0x1319ac,%eax <== NOT EXECUTED
10cffb: 8b 04 98 mov (%eax,%ebx,4),%eax <== NOT EXECUTED
10cffe: 8b 40 08 mov 0x8(%eax),%eax <== NOT EXECUTED
10d001: 89 06 mov %eax,(%esi) <== NOT EXECUTED
}
return SCHEDULER_CBS_OK;
10d003: 31 c0 xor %eax,%eax
10d005: eb 0c jmp 10d013 <_Scheduler_CBS_Get_execution_time+0x7b>
{
Objects_Locations location;
Thread_Control *the_thread;
if ( server_id >= _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
10d007: b8 ee ff ff ff mov $0xffffffee,%eax
10d00c: eb 05 jmp 10d013 <_Scheduler_CBS_Get_execution_time+0x7b>
if ( !_Scheduler_CBS_Server_list[server_id] )
return SCHEDULER_CBS_ERROR_NOSERVER;
10d00e: b8 e7 ff ff ff mov $0xffffffe7,%eax
}
else {
*exec_time = _Scheduler_CBS_Server_list[server_id]->parameters.budget;
}
return SCHEDULER_CBS_OK;
}
10d013: 8d 65 f4 lea -0xc(%ebp),%esp
10d016: 5b pop %ebx
10d017: 5e pop %esi
10d018: 5f pop %edi
10d019: 5d pop %ebp
10d01a: c3 ret
0010d058 <_Scheduler_CBS_Get_remaining_budget>:
int _Scheduler_CBS_Get_remaining_budget (
Scheduler_CBS_Server_id server_id,
time_t *remaining_budget
)
{
10d058: 55 push %ebp
10d059: 89 e5 mov %esp,%ebp
10d05b: 56 push %esi
10d05c: 53 push %ebx
10d05d: 83 ec 10 sub $0x10,%esp
10d060: 8b 45 08 mov 0x8(%ebp),%eax
10d063: 8b 5d 0c mov 0xc(%ebp),%ebx
Objects_Locations location;
Thread_Control *the_thread;
if ( server_id >= _Scheduler_CBS_Maximum_servers )
10d066: 3b 05 6c d2 12 00 cmp 0x12d26c,%eax
10d06c: 73 44 jae 10d0b2 <_Scheduler_CBS_Get_remaining_budget+0x5a>
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
if ( !_Scheduler_CBS_Server_list[server_id] )
10d06e: 8b 15 ac 19 13 00 mov 0x1319ac,%edx
10d074: 8b 04 82 mov (%edx,%eax,4),%eax
10d077: 85 c0 test %eax,%eax
10d079: 74 3e je 10d0b9 <_Scheduler_CBS_Get_remaining_budget+0x61>
return SCHEDULER_CBS_ERROR_NOSERVER;
if ( _Scheduler_CBS_Server_list[server_id]->task_id == -1 ) {
10d07b: 8b 10 mov (%eax),%edx
10d07d: 83 fa ff cmp $0xffffffff,%edx
10d080: 75 05 jne 10d087 <_Scheduler_CBS_Get_remaining_budget+0x2f>
*remaining_budget = _Scheduler_CBS_Server_list[server_id]->parameters.budget;
10d082: 8b 40 08 mov 0x8(%eax),%eax
10d085: eb 1d jmp 10d0a4 <_Scheduler_CBS_Get_remaining_budget+0x4c>
return SCHEDULER_CBS_OK;
}
the_thread = _Thread_Get(
10d087: 50 push %eax
10d088: 50 push %eax
10d089: 8d 45 f4 lea -0xc(%ebp),%eax
10d08c: 50 push %eax
10d08d: 52 push %edx
10d08e: e8 5d 09 00 00 call 10d9f0 <_Thread_Get>
10d093: 89 c6 mov %eax,%esi
_Scheduler_CBS_Server_list[server_id]->task_id,
&location
);
/* The routine _Thread_Get may disable dispatch and not enable again. */
if ( the_thread ) {
10d095: 83 c4 10 add $0x10,%esp
10d098: 85 c0 test %eax,%eax
10d09a: 74 0c je 10d0a8 <_Scheduler_CBS_Get_remaining_budget+0x50><== NEVER TAKEN
_Thread_Enable_dispatch();
10d09c: e8 2f 09 00 00 call 10d9d0 <_Thread_Enable_dispatch>
*remaining_budget = the_thread->cpu_time_budget;
10d0a1: 8b 46 74 mov 0x74(%esi),%eax
10d0a4: 89 03 mov %eax,(%ebx)
10d0a6: eb 06 jmp 10d0ae <_Scheduler_CBS_Get_remaining_budget+0x56>
}
else {
*remaining_budget = 0;
10d0a8: c7 03 00 00 00 00 movl $0x0,(%ebx) <== NOT EXECUTED
}
return SCHEDULER_CBS_OK;
10d0ae: 31 c0 xor %eax,%eax
10d0b0: eb 0c jmp 10d0be <_Scheduler_CBS_Get_remaining_budget+0x66>
{
Objects_Locations location;
Thread_Control *the_thread;
if ( server_id >= _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
10d0b2: b8 ee ff ff ff mov $0xffffffee,%eax
10d0b7: eb 05 jmp 10d0be <_Scheduler_CBS_Get_remaining_budget+0x66>
if ( !_Scheduler_CBS_Server_list[server_id] )
return SCHEDULER_CBS_ERROR_NOSERVER;
10d0b9: b8 e7 ff ff ff mov $0xffffffe7,%eax
else {
*remaining_budget = 0;
}
return SCHEDULER_CBS_OK;
}
10d0be: 8d 65 f8 lea -0x8(%ebp),%esp
10d0c1: 5b pop %ebx
10d0c2: 5e pop %esi
10d0c3: 5d pop %ebp
10d0c4: c3 ret
0010d15c <_Scheduler_CBS_Initialize>:
int _Scheduler_CBS_Initialize(void)
{
10d15c: 55 push %ebp
10d15d: 89 e5 mov %esp,%ebp
10d15f: 83 ec 14 sub $0x14,%esp
unsigned int i;
_Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate(
10d162: a1 6c d2 12 00 mov 0x12d26c,%eax
10d167: c1 e0 02 shl $0x2,%eax
10d16a: 50 push %eax
10d16b: e8 98 15 00 00 call 10e708 <_Workspace_Allocate>
10d170: a3 ac 19 13 00 mov %eax,0x1319ac
_Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) );
if ( !_Scheduler_CBS_Server_list )
10d175: 83 c4 10 add $0x10,%esp
10d178: 85 c0 test %eax,%eax
10d17a: 74 20 je 10d19c <_Scheduler_CBS_Initialize+0x40><== NEVER TAKEN
return SCHEDULER_CBS_ERROR_NO_MEMORY;
for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) {
10d17c: 8b 15 6c d2 12 00 mov 0x12d26c,%edx
10d182: 31 c0 xor %eax,%eax
10d184: eb 0e jmp 10d194 <_Scheduler_CBS_Initialize+0x38>
_Scheduler_CBS_Server_list[i] = NULL;
10d186: 8b 0d ac 19 13 00 mov 0x1319ac,%ecx
10d18c: c7 04 81 00 00 00 00 movl $0x0,(%ecx,%eax,4)
unsigned int i;
_Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate(
_Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) );
if ( !_Scheduler_CBS_Server_list )
return SCHEDULER_CBS_ERROR_NO_MEMORY;
for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) {
10d193: 40 inc %eax
10d194: 39 d0 cmp %edx,%eax
10d196: 75 ee jne 10d186 <_Scheduler_CBS_Initialize+0x2a>
_Scheduler_CBS_Server_list[i] = NULL;
}
return SCHEDULER_CBS_OK;
10d198: 31 c0 xor %eax,%eax
10d19a: eb 05 jmp 10d1a1 <_Scheduler_CBS_Initialize+0x45>
{
unsigned int i;
_Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate(
_Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) );
if ( !_Scheduler_CBS_Server_list )
return SCHEDULER_CBS_ERROR_NO_MEMORY;
10d19c: b8 ef ff ff ff mov $0xffffffef,%eax <== NOT EXECUTED
for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) {
_Scheduler_CBS_Server_list[i] = NULL;
}
return SCHEDULER_CBS_OK;
}
10d1a1: c9 leave
10d1a2: c3 ret
0010bd0c <_Scheduler_CBS_Release_job>:
void _Scheduler_CBS_Release_job(
Thread_Control *the_thread,
uint32_t deadline
)
{
10bd0c: 55 push %ebp
10bd0d: 89 e5 mov %esp,%ebp
10bd0f: 83 ec 08 sub $0x8,%esp
10bd12: 8b 55 08 mov 0x8(%ebp),%edx
10bd15: 8b 45 0c mov 0xc(%ebp),%eax
Priority_Control new_priority;
Scheduler_CBS_Per_thread *sched_info =
(Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
Scheduler_CBS_Server *serv_info =
(Scheduler_CBS_Server *) sched_info->cbs_server;
10bd18: 8b 8a 88 00 00 00 mov 0x88(%edx),%ecx
)
{
Priority_Control new_priority;
Scheduler_CBS_Per_thread *sched_info =
(Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
Scheduler_CBS_Server *serv_info =
10bd1e: 8b 49 18 mov 0x18(%ecx),%ecx
(Scheduler_CBS_Server *) sched_info->cbs_server;
if (deadline) {
10bd21: 85 c0 test %eax,%eax
10bd23: 74 22 je 10bd47 <_Scheduler_CBS_Release_job+0x3b>
/* Initializing or shifting deadline. */
if (serv_info)
10bd25: 85 c9 test %ecx,%ecx
10bd27: 74 0f je 10bd38 <_Scheduler_CBS_Release_job+0x2c>
new_priority = (_Watchdog_Ticks_since_boot + serv_info->parameters.deadline)
10bd29: a1 40 f5 12 00 mov 0x12f540,%eax
10bd2e: 03 41 04 add 0x4(%ecx),%eax
10bd31: 25 ff ff ff 7f and $0x7fffffff,%eax
10bd36: eb 19 jmp 10bd51 <_Scheduler_CBS_Release_job+0x45>
& ~SCHEDULER_EDF_PRIO_MSB;
else
new_priority = (_Watchdog_Ticks_since_boot + deadline)
10bd38: 8b 0d 40 f5 12 00 mov 0x12f540,%ecx
10bd3e: 01 c8 add %ecx,%eax
10bd40: 25 ff ff ff 7f and $0x7fffffff,%eax
10bd45: eb 10 jmp 10bd57 <_Scheduler_CBS_Release_job+0x4b>
& ~SCHEDULER_EDF_PRIO_MSB;
}
else {
/* Switch back to background priority. */
new_priority = the_thread->Start.initial_priority;
10bd47: 8b 82 ac 00 00 00 mov 0xac(%edx),%eax
}
/* Budget replenishment for the next job. */
if (serv_info)
10bd4d: 85 c9 test %ecx,%ecx
10bd4f: 74 06 je 10bd57 <_Scheduler_CBS_Release_job+0x4b><== NEVER TAKEN
the_thread->cpu_time_budget = serv_info->parameters.budget;
10bd51: 8b 49 08 mov 0x8(%ecx),%ecx
10bd54: 89 4a 74 mov %ecx,0x74(%edx)
the_thread->real_priority = new_priority;
10bd57: 89 42 18 mov %eax,0x18(%edx)
_Thread_Change_priority(the_thread, new_priority, true);
10bd5a: 51 push %ecx
10bd5b: 6a 01 push $0x1
10bd5d: 50 push %eax
10bd5e: 52 push %edx
10bd5f: e8 9c 03 00 00 call 10c100 <_Thread_Change_priority>
10bd64: 83 c4 10 add $0x10,%esp
}
10bd67: c9 leave
10bd68: c3 ret
0010bd6c <_Scheduler_CBS_Unblock>:
#include <rtems/score/schedulercbs.h>
void _Scheduler_CBS_Unblock(
Thread_Control *the_thread
)
{
10bd6c: 55 push %ebp
10bd6d: 89 e5 mov %esp,%ebp
10bd6f: 56 push %esi
10bd70: 53 push %ebx
10bd71: 8b 5d 08 mov 0x8(%ebp),%ebx
Scheduler_CBS_Per_thread *sched_info;
Scheduler_CBS_Server *serv_info;
Priority_Control new_priority;
_Scheduler_EDF_Enqueue(the_thread);
10bd74: 83 ec 0c sub $0xc,%esp
10bd77: 53 push %ebx
10bd78: e8 cf 00 00 00 call 10be4c <_Scheduler_EDF_Enqueue>
/* TODO: flash critical section? */
sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
serv_info = (Scheduler_CBS_Server *) sched_info->cbs_server;
10bd7d: 8b 83 88 00 00 00 mov 0x88(%ebx),%eax
10bd83: 8b 40 18 mov 0x18(%eax),%eax
* Late unblock rule for deadline-driven tasks. The remaining time to
* deadline must be sufficient to serve the remaining computation time
* without increased utilization of this task. It might cause a deadline
* miss of another task.
*/
if (serv_info) {
10bd86: 83 c4 10 add $0x10,%esp
10bd89: 85 c0 test %eax,%eax
10bd8b: 74 3d je 10bdca <_Scheduler_CBS_Unblock+0x5e>
time_t deadline = serv_info->parameters.deadline;
time_t budget = serv_info->parameters.budget;
time_t deadline_left = the_thread->cpu_time_budget;
time_t budget_left = the_thread->real_priority -
10bd8d: 8b 4b 18 mov 0x18(%ebx),%ecx
10bd90: 8b 15 40 f5 12 00 mov 0x12f540,%edx
10bd96: 89 ce mov %ecx,%esi
10bd98: 29 d6 sub %edx,%esi
_Watchdog_Ticks_since_boot;
if ( deadline*budget_left > budget*deadline_left ) {
10bd9a: 8b 50 04 mov 0x4(%eax),%edx
10bd9d: 0f af d6 imul %esi,%edx
10bda0: 8b 40 08 mov 0x8(%eax),%eax
10bda3: 0f af 43 74 imul 0x74(%ebx),%eax
10bda7: 39 c2 cmp %eax,%edx
10bda9: 7e 1f jle 10bdca <_Scheduler_CBS_Unblock+0x5e>
/* Put late unblocked task to background until the end of period. */
new_priority = the_thread->Start.initial_priority;
10bdab: 8b 83 ac 00 00 00 mov 0xac(%ebx),%eax
if ( the_thread->real_priority != new_priority )
10bdb1: 39 c1 cmp %eax,%ecx
10bdb3: 74 03 je 10bdb8 <_Scheduler_CBS_Unblock+0x4c>
the_thread->real_priority = new_priority;
10bdb5: 89 43 18 mov %eax,0x18(%ebx)
if ( the_thread->current_priority != new_priority )
10bdb8: 39 43 14 cmp %eax,0x14(%ebx)
10bdbb: 74 0d je 10bdca <_Scheduler_CBS_Unblock+0x5e>
_Thread_Change_priority(the_thread, new_priority, true);
10bdbd: 52 push %edx
10bdbe: 6a 01 push $0x1
10bdc0: 50 push %eax
10bdc1: 53 push %ebx
10bdc2: e8 39 03 00 00 call 10c100 <_Thread_Change_priority>
10bdc7: 83 c4 10 add $0x10,%esp
10bdca: 50 push %eax
10bdcb: 50 push %eax
* a context switch.
* Pseudo-ISR case:
* Even if the thread isn't preemptible, if the new heir is
* a pseudo-ISR system task, we need to do a context switch.
*/
if ( _Scheduler_Is_priority_higher_than( the_thread->current_priority,
10bdcc: a1 58 f9 12 00 mov 0x12f958,%eax
10bdd1: ff 70 14 pushl 0x14(%eax)
10bdd4: ff 73 14 pushl 0x14(%ebx)
10bdd7: ff 15 60 b2 12 00 call *0x12b260
10bddd: 83 c4 10 add $0x10,%esp
10bde0: 85 c0 test %eax,%eax
10bde2: 7e 1e jle 10be02 <_Scheduler_CBS_Unblock+0x96>
_Thread_Heir->current_priority)) {
_Thread_Heir = the_thread;
10bde4: 89 1d 58 f9 12 00 mov %ebx,0x12f958
if ( _Thread_Executing->is_preemptible ||
10bdea: a1 54 f9 12 00 mov 0x12f954,%eax
10bdef: 80 78 70 00 cmpb $0x0,0x70(%eax)
10bdf3: 75 06 jne 10bdfb <_Scheduler_CBS_Unblock+0x8f>
10bdf5: 83 7b 14 00 cmpl $0x0,0x14(%ebx)
10bdf9: 75 07 jne 10be02 <_Scheduler_CBS_Unblock+0x96><== ALWAYS TAKEN
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
10bdfb: c6 05 60 f9 12 00 01 movb $0x1,0x12f960
}
}
10be02: 8d 65 f8 lea -0x8(%ebp),%esp
10be05: 5b pop %ebx
10be06: 5e pop %esi
10be07: 5d pop %ebp
10be08: c3 ret
0010bcd8 <_Scheduler_EDF_Allocate>:
#include <rtems/score/wkspace.h>
void *_Scheduler_EDF_Allocate(
Thread_Control *the_thread
)
{
10bcd8: 55 push %ebp
10bcd9: 89 e5 mov %esp,%ebp
10bcdb: 53 push %ebx
10bcdc: 83 ec 10 sub $0x10,%esp
10bcdf: 8b 5d 08 mov 0x8(%ebp),%ebx
void *sched;
Scheduler_EDF_Per_thread *schinfo;
sched = _Workspace_Allocate( sizeof(Scheduler_EDF_Per_thread) );
10bce2: 6a 18 push $0x18
10bce4: e8 27 15 00 00 call 10d210 <_Workspace_Allocate>
if ( sched ) {
10bce9: 83 c4 10 add $0x10,%esp
10bcec: 85 c0 test %eax,%eax
10bcee: 74 0f je 10bcff <_Scheduler_EDF_Allocate+0x27><== NEVER TAKEN
the_thread->scheduler_info = sched;
10bcf0: 89 83 88 00 00 00 mov %eax,0x88(%ebx)
schinfo = (Scheduler_EDF_Per_thread *)(the_thread->scheduler_info);
schinfo->thread = the_thread;
10bcf6: 89 18 mov %ebx,(%eax)
schinfo->queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN;
10bcf8: c7 40 14 02 00 00 00 movl $0x2,0x14(%eax)
}
return sched;
}
10bcff: 8b 5d fc mov -0x4(%ebp),%ebx
10bd02: c9 leave
10bd03: c3 ret
0010bea0 <_Scheduler_EDF_Unblock>:
#include <rtems/score/scheduleredf.h>
void _Scheduler_EDF_Unblock(
Thread_Control *the_thread
)
{
10bea0: 55 push %ebp
10bea1: 89 e5 mov %esp,%ebp
10bea3: 53 push %ebx
10bea4: 83 ec 10 sub $0x10,%esp
10bea7: 8b 5d 08 mov 0x8(%ebp),%ebx
_Scheduler_EDF_Enqueue(the_thread);
10beaa: 53 push %ebx
10beab: e8 94 fe ff ff call 10bd44 <_Scheduler_EDF_Enqueue>
10beb0: 58 pop %eax
10beb1: 5a pop %edx
10beb2: ff 73 14 pushl 0x14(%ebx)
* a context switch.
* Pseudo-ISR case:
* Even if the thread isn't preemptible, if the new heir is
* a pseudo-ISR system task, we need to do a context switch.
*/
if ( _Scheduler_Is_priority_lower_than(
10beb5: a1 58 f9 12 00 mov 0x12f958,%eax
10beba: ff 70 14 pushl 0x14(%eax)
10bebd: ff 15 60 b2 12 00 call *0x12b260
10bec3: 83 c4 10 add $0x10,%esp
10bec6: 85 c0 test %eax,%eax
10bec8: 79 1e jns 10bee8 <_Scheduler_EDF_Unblock+0x48>
_Thread_Heir->current_priority,
the_thread->current_priority )) {
_Thread_Heir = the_thread;
10beca: 89 1d 58 f9 12 00 mov %ebx,0x12f958
if ( _Thread_Executing->is_preemptible ||
10bed0: a1 54 f9 12 00 mov 0x12f954,%eax
10bed5: 80 78 70 00 cmpb $0x0,0x70(%eax)
10bed9: 75 06 jne 10bee1 <_Scheduler_EDF_Unblock+0x41>
10bedb: 83 7b 14 00 cmpl $0x0,0x14(%ebx)
10bedf: 75 07 jne 10bee8 <_Scheduler_EDF_Unblock+0x48><== ALWAYS TAKEN
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
10bee1: c6 05 60 f9 12 00 01 movb $0x1,0x12f960
}
}
10bee8: 8b 5d fc mov -0x4(%ebp),%ebx
10beeb: c9 leave
10beec: c3 ret
0010b854 <_Scheduler_priority_Tick>:
#include <rtems/system.h>
#include <rtems/score/schedulerpriority.h>
void _Scheduler_priority_Tick( void )
{
10b854: 55 push %ebp
10b855: 89 e5 mov %esp,%ebp
10b857: 53 push %ebx
10b858: 50 push %eax
Thread_Control *executing;
executing = _Thread_Executing;
10b859: 8b 1d ec e8 12 00 mov 0x12e8ec,%ebx
/*
* If the thread is not preemptible or is not ready, then
* just return.
*/
if ( !executing->is_preemptible )
10b85f: 80 7b 70 00 cmpb $0x0,0x70(%ebx)
10b863: 74 44 je 10b8a9 <_Scheduler_priority_Tick+0x55>
return;
if ( !_States_Is_ready( executing->current_state ) )
10b865: 83 7b 10 00 cmpl $0x0,0x10(%ebx)
10b869: 75 3e jne 10b8a9 <_Scheduler_priority_Tick+0x55>
/*
* The cpu budget algorithm determines what happens next.
*/
switch ( executing->budget_algorithm ) {
10b86b: 8b 43 78 mov 0x78(%ebx),%eax
10b86e: 83 f8 01 cmp $0x1,%eax
10b871: 72 36 jb 10b8a9 <_Scheduler_priority_Tick+0x55>
10b873: 83 f8 02 cmp $0x2,%eax
10b876: 76 07 jbe 10b87f <_Scheduler_priority_Tick+0x2b>
10b878: 83 f8 03 cmp $0x3,%eax
10b87b: 75 2c jne 10b8a9 <_Scheduler_priority_Tick+0x55><== NEVER TAKEN
10b87d: eb 1b jmp 10b89a <_Scheduler_priority_Tick+0x46>
case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE:
#if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE)
case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE:
#endif
if ( (int)(--executing->cpu_time_budget) <= 0 ) {
10b87f: 8b 43 74 mov 0x74(%ebx),%eax
10b882: 48 dec %eax
10b883: 89 43 74 mov %eax,0x74(%ebx)
10b886: 85 c0 test %eax,%eax
10b888: 7f 1f jg 10b8a9 <_Scheduler_priority_Tick+0x55>
* always operates on the scheduler that 'owns' the currently executing
* thread.
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Yield( void )
{
_Scheduler.Operations.yield();
10b88a: ff 15 3c a2 12 00 call *0x12a23c
* executing thread's timeslice is reset. Otherwise, the
* currently executing thread is placed at the rear of the
* FIFO for this priority and a new heir is selected.
*/
_Scheduler_Yield();
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
10b890: a1 b8 e3 12 00 mov 0x12e3b8,%eax
10b895: 89 43 74 mov %eax,0x74(%ebx)
10b898: eb 0f jmp 10b8a9 <_Scheduler_priority_Tick+0x55>
}
break;
#if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT)
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
if ( --executing->cpu_time_budget == 0 )
10b89a: ff 4b 74 decl 0x74(%ebx)
10b89d: 75 0a jne 10b8a9 <_Scheduler_priority_Tick+0x55>
(*executing->budget_callout)( executing );
10b89f: 83 ec 0c sub $0xc,%esp
10b8a2: 53 push %ebx
10b8a3: ff 53 7c call *0x7c(%ebx)
10b8a6: 83 c4 10 add $0x10,%esp
break;
#endif
}
}
10b8a9: 8b 5d fc mov -0x4(%ebp),%ebx
10b8ac: c9 leave
10b8ad: c3 ret
0010a6b8 <_TOD_Validate>:
*/
bool _TOD_Validate(
const rtems_time_of_day *the_tod
)
{
10a6b8: 55 push %ebp
10a6b9: 89 e5 mov %esp,%ebp
10a6bb: 53 push %ebx
10a6bc: 8b 4d 08 mov 0x8(%ebp),%ecx
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
10a6bf: b8 40 42 0f 00 mov $0xf4240,%eax
10a6c4: 31 d2 xor %edx,%edx
10a6c6: f7 35 0c c8 12 00 divl 0x12c80c
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
return false;
10a6cc: 31 db xor %ebx,%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) ||
10a6ce: 85 c9 test %ecx,%ecx
10a6d0: 74 4c je 10a71e <_TOD_Validate+0x66> <== NEVER TAKEN
10a6d2: 39 41 18 cmp %eax,0x18(%ecx)
10a6d5: 73 47 jae 10a71e <_TOD_Validate+0x66>
(the_tod->ticks >= ticks_per_second) ||
10a6d7: 83 79 14 3b cmpl $0x3b,0x14(%ecx)
10a6db: 77 41 ja 10a71e <_TOD_Validate+0x66>
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
10a6dd: 83 79 10 3b cmpl $0x3b,0x10(%ecx)
10a6e1: 77 3b ja 10a71e <_TOD_Validate+0x66>
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
10a6e3: 83 79 0c 17 cmpl $0x17,0xc(%ecx)
10a6e7: 77 35 ja 10a71e <_TOD_Validate+0x66>
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
10a6e9: 8b 51 04 mov 0x4(%ecx),%edx
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
(the_tod->ticks >= ticks_per_second) ||
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
10a6ec: 85 d2 test %edx,%edx
10a6ee: 74 2e je 10a71e <_TOD_Validate+0x66> <== NEVER TAKEN
(the_tod->month == 0) ||
10a6f0: 83 fa 0c cmp $0xc,%edx
10a6f3: 77 29 ja 10a71e <_TOD_Validate+0x66>
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
10a6f5: 8b 01 mov (%ecx),%eax
(the_tod->ticks >= ticks_per_second) ||
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
10a6f7: 3d c3 07 00 00 cmp $0x7c3,%eax
10a6fc: 76 20 jbe 10a71e <_TOD_Validate+0x66>
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
10a6fe: 8b 49 08 mov 0x8(%ecx),%ecx
(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) ||
10a701: 85 c9 test %ecx,%ecx
10a703: 74 19 je 10a71e <_TOD_Validate+0x66> <== NEVER TAKEN
(the_tod->day == 0) )
return false;
if ( (the_tod->year % 4) == 0 )
10a705: a8 03 test $0x3,%al
10a707: 75 09 jne 10a712 <_TOD_Validate+0x5a>
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
10a709: 8b 04 95 b8 18 12 00 mov 0x1218b8(,%edx,4),%eax
10a710: eb 07 jmp 10a719 <_TOD_Validate+0x61>
else
days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ];
10a712: 8b 04 95 84 18 12 00 mov 0x121884(,%edx,4),%eax
if ( the_tod->day > days_in_month )
10a719: 39 c1 cmp %eax,%ecx
10a71b: 0f 96 c3 setbe %bl
return false;
return true;
}
10a71e: 88 d8 mov %bl,%al
10a720: 5b pop %ebx
10a721: 5d pop %ebp
10a722: c3 ret
0010ba1c <_Thread_Change_priority>:
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
10ba1c: 55 push %ebp
10ba1d: 89 e5 mov %esp,%ebp
10ba1f: 57 push %edi
10ba20: 56 push %esi
10ba21: 53 push %ebx
10ba22: 83 ec 28 sub $0x28,%esp
10ba25: 8b 7d 08 mov 0x8(%ebp),%edi
10ba28: 8b 5d 0c mov 0xc(%ebp),%ebx
10ba2b: 8a 45 10 mov 0x10(%ebp),%al
10ba2e: 88 45 e7 mov %al,-0x19(%ebp)
States_Control state, original_state;
/*
* Save original state
*/
original_state = the_thread->current_state;
10ba31: 8b 77 10 mov 0x10(%edi),%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 );
10ba34: 57 push %edi
10ba35: e8 72 0b 00 00 call 10c5ac <_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 )
10ba3a: 83 c4 10 add $0x10,%esp
10ba3d: 39 5f 14 cmp %ebx,0x14(%edi)
10ba40: 74 0c je 10ba4e <_Thread_Change_priority+0x32>
_Thread_Set_priority( the_thread, new_priority );
10ba42: 50 push %eax
10ba43: 50 push %eax
10ba44: 53 push %ebx
10ba45: 57 push %edi
10ba46: e8 15 0b 00 00 call 10c560 <_Thread_Set_priority>
10ba4b: 83 c4 10 add $0x10,%esp
_ISR_Disable( level );
10ba4e: 9c pushf
10ba4f: fa cli
10ba50: 5b pop %ebx
/*
* 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;
10ba51: 8b 47 10 mov 0x10(%edi),%eax
if ( state != STATES_TRANSIENT ) {
10ba54: 83 f8 04 cmp $0x4,%eax
10ba57: 74 2b je 10ba84 <_Thread_Change_priority+0x68>
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
10ba59: 83 e6 04 and $0x4,%esi
10ba5c: 75 08 jne 10ba66 <_Thread_Change_priority+0x4a><== NEVER TAKEN
RTEMS_INLINE_ROUTINE States_Control _States_Clear (
States_Control states_to_clear,
States_Control current_state
)
{
return (current_state & ~states_to_clear);
10ba5e: 89 c2 mov %eax,%edx
10ba60: 83 e2 fb and $0xfffffffb,%edx
10ba63: 89 57 10 mov %edx,0x10(%edi)
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
_ISR_Enable( level );
10ba66: 53 push %ebx
10ba67: 9d popf
if ( _States_Is_waiting_on_thread_queue( state ) ) {
10ba68: a9 e0 be 03 00 test $0x3bee0,%eax
10ba6d: 74 65 je 10bad4 <_Thread_Change_priority+0xb8>
_Thread_queue_Requeue( the_thread->Wait.queue, the_thread );
10ba6f: 89 7d 0c mov %edi,0xc(%ebp)
10ba72: 8b 47 44 mov 0x44(%edi),%eax
10ba75: 89 45 08 mov %eax,0x8(%ebp)
if ( !_Thread_Is_executing_also_the_heir() &&
_Thread_Executing->is_preemptible )
_Thread_Dispatch_necessary = true;
_ISR_Enable( level );
}
10ba78: 8d 65 f4 lea -0xc(%ebp),%esp
10ba7b: 5b pop %ebx
10ba7c: 5e pop %esi
10ba7d: 5f pop %edi
10ba7e: 5d pop %ebp
/* 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 );
10ba7f: e9 4c 0a 00 00 jmp 10c4d0 <_Thread_queue_Requeue>
}
return;
}
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) ) {
10ba84: 83 e6 04 and $0x4,%esi
10ba87: 75 26 jne 10baaf <_Thread_Change_priority+0x93><== 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 );
10ba89: c7 47 10 00 00 00 00 movl $0x0,0x10(%edi)
if ( prepend_it )
10ba90: 80 7d e7 00 cmpb $0x0,-0x19(%ebp)
10ba94: 74 0c je 10baa2 <_Thread_Change_priority+0x86>
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue_first(
Thread_Control *the_thread
)
{
_Scheduler.Operations.enqueue_first( the_thread );
10ba96: 83 ec 0c sub $0xc,%esp
10ba99: 57 push %edi
10ba9a: ff 15 58 a2 12 00 call *0x12a258
10baa0: eb 0a jmp 10baac <_Thread_Change_priority+0x90>
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue(
Thread_Control *the_thread
)
{
_Scheduler.Operations.enqueue( the_thread );
10baa2: 83 ec 0c sub $0xc,%esp
10baa5: 57 push %edi
10baa6: ff 15 54 a2 12 00 call *0x12a254
10baac: 83 c4 10 add $0x10,%esp
_Scheduler_Enqueue_first( the_thread );
else
_Scheduler_Enqueue( the_thread );
}
_ISR_Flash( level );
10baaf: 53 push %ebx
10bab0: 9d popf
10bab1: fa cli
* This kernel routine implements the scheduling decision logic for
* the scheduler. It does NOT dispatch.
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Schedule( void )
{
_Scheduler.Operations.schedule();
10bab2: ff 15 38 a2 12 00 call *0x12a238
* is also the heir thread, and false otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void )
{
return ( _Thread_Executing == _Thread_Heir );
10bab8: a1 ec e8 12 00 mov 0x12e8ec,%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.
*/
_Scheduler_Schedule();
if ( !_Thread_Is_executing_also_the_heir() &&
10babd: 3b 05 f0 e8 12 00 cmp 0x12e8f0,%eax
10bac3: 74 0d je 10bad2 <_Thread_Change_priority+0xb6>
10bac5: 80 78 70 00 cmpb $0x0,0x70(%eax)
10bac9: 74 07 je 10bad2 <_Thread_Change_priority+0xb6>
_Thread_Executing->is_preemptible )
_Thread_Dispatch_necessary = true;
10bacb: c6 05 f8 e8 12 00 01 movb $0x1,0x12e8f8
_ISR_Enable( level );
10bad2: 53 push %ebx
10bad3: 9d popf
}
10bad4: 8d 65 f4 lea -0xc(%ebp),%esp
10bad7: 5b pop %ebx
10bad8: 5e pop %esi
10bad9: 5f pop %edi
10bada: 5d pop %ebp
10badb: c3 ret
0010bc90 <_Thread_Delay_ended>:
void _Thread_Delay_ended(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
10bc90: 55 push %ebp
10bc91: 89 e5 mov %esp,%ebp
10bc93: 83 ec 20 sub $0x20,%esp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
10bc96: 8d 45 f4 lea -0xc(%ebp),%eax
10bc99: 50 push %eax
10bc9a: ff 75 08 pushl 0x8(%ebp)
10bc9d: e8 8a 01 00 00 call 10be2c <_Thread_Get>
switch ( location ) {
10bca2: 83 c4 10 add $0x10,%esp
10bca5: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
10bca9: 75 20 jne 10bccb <_Thread_Delay_ended+0x3b><== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_Clear_state(
10bcab: 52 push %edx
10bcac: 52 push %edx
10bcad: 68 18 00 00 10 push $0x10000018
10bcb2: 50 push %eax
10bcb3: e8 24 fe ff ff call 10badc <_Thread_Clear_state>
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
10bcb8: a1 e4 e3 12 00 mov 0x12e3e4,%eax
10bcbd: 48 dec %eax
10bcbe: a3 e4 e3 12 00 mov %eax,0x12e3e4
return _Thread_Dispatch_disable_level;
10bcc3: a1 e4 e3 12 00 mov 0x12e3e4,%eax
10bcc8: 83 c4 10 add $0x10,%esp
| STATES_INTERRUPTIBLE_BY_SIGNAL
);
_Thread_Unnest_dispatch();
break;
}
}
10bccb: c9 leave
10bccc: c3 ret
0010bcd0 <_Thread_Dispatch>:
* INTERRUPT LATENCY:
* dispatch thread
* no dispatch thread
*/
void _Thread_Dispatch( void )
{
10bcd0: 55 push %ebp
10bcd1: 89 e5 mov %esp,%ebp
10bcd3: 57 push %edi
10bcd4: 56 push %esi
10bcd5: 53 push %ebx
10bcd6: 83 ec 1c sub $0x1c,%esp
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
10bcd9: a1 e4 e3 12 00 mov 0x12e3e4,%eax
10bcde: 40 inc %eax
10bcdf: a3 e4 e3 12 00 mov %eax,0x12e3e4
return _Thread_Dispatch_disable_level;
10bce4: a1 e4 e3 12 00 mov 0x12e3e4,%eax
void _Thread_Disable_dispatch( void );
#else
RTEMS_INLINE_ROUTINE void _Thread_Disable_dispatch( void )
{
_Thread_Dispatch_increment_disable_level();
RTEMS_COMPILER_MEMORY_BARRIER();
10bce9: e9 f9 00 00 00 jmp 10bde7 <_Thread_Dispatch+0x117>
*/
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
heir = _Thread_Heir;
10bcee: 8b 35 f0 e8 12 00 mov 0x12e8f0,%esi
_Thread_Dispatch_necessary = false;
10bcf4: c6 05 f8 e8 12 00 00 movb $0x0,0x12e8f8
_Thread_Executing = heir;
10bcfb: 89 35 ec e8 12 00 mov %esi,0x12e8ec
/*
* When the heir and executing are the same, then we are being
* requested to do the post switch dispatching. This is normally
* done to dispatch signals.
*/
if ( heir == executing )
10bd01: 39 fe cmp %edi,%esi
10bd03: 75 1c jne 10bd21 <_Thread_Dispatch+0x51>
_ISR_Disable( level );
}
post_switch:
_ISR_Enable( level );
10bd05: 50 push %eax
10bd06: 9d popf
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
10bd07: a1 e4 e3 12 00 mov 0x12e3e4,%eax
10bd0c: 48 dec %eax
10bd0d: a3 e4 e3 12 00 mov %eax,0x12e3e4
return _Thread_Dispatch_disable_level;
10bd12: a1 e4 e3 12 00 mov 0x12e3e4,%eax
_Thread_Unnest_dispatch();
_API_extensions_Run_postswitch();
10bd17: e8 39 e8 ff ff call 10a555 <_API_extensions_Run_postswitch>
10bd1c: e9 e2 00 00 00 jmp 10be03 <_Thread_Dispatch+0x133>
*/
#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 )
10bd21: 83 7e 78 01 cmpl $0x1,0x78(%esi)
10bd25: 75 09 jne 10bd30 <_Thread_Dispatch+0x60>
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
10bd27: 8b 15 b8 e3 12 00 mov 0x12e3b8,%edx
10bd2d: 89 56 74 mov %edx,0x74(%esi)
_ISR_Enable( level );
10bd30: 50 push %eax
10bd31: 9d popf
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
10bd32: 83 ec 0c sub $0xc,%esp
10bd35: 8d 45 e0 lea -0x20(%ebp),%eax
10bd38: 50 push %eax
10bd39: e8 06 34 00 00 call 10f144 <_TOD_Get_uptime>
_Timestamp_Subtract(
10bd3e: 8b 45 e0 mov -0x20(%ebp),%eax
10bd41: 8b 55 e4 mov -0x1c(%ebp),%edx
const Timestamp64_Control *_start,
const Timestamp64_Control *_end,
Timestamp64_Control *_result
)
{
*_result = *_end - *_start;
10bd44: 89 c1 mov %eax,%ecx
10bd46: 89 d3 mov %edx,%ebx
10bd48: 2b 0d fc e8 12 00 sub 0x12e8fc,%ecx
10bd4e: 1b 1d 00 e9 12 00 sbb 0x12e900,%ebx
static inline void _Timestamp64_implementation_Add_to(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
*_time += *_add;
10bd54: 01 8f 80 00 00 00 add %ecx,0x80(%edi)
10bd5a: 11 9f 84 00 00 00 adc %ebx,0x84(%edi)
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
_Thread_Time_of_last_context_switch = uptime;
10bd60: a3 fc e8 12 00 mov %eax,0x12e8fc
10bd65: 89 15 00 e9 12 00 mov %edx,0x12e900
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
10bd6b: a1 5c e4 12 00 mov 0x12e45c,%eax
10bd70: 83 c4 10 add $0x10,%esp
10bd73: 85 c0 test %eax,%eax
10bd75: 74 10 je 10bd87 <_Thread_Dispatch+0xb7> <== NEVER TAKEN
executing->libc_reent = *_Thread_libc_reent;
10bd77: 8b 10 mov (%eax),%edx
10bd79: 89 97 e0 00 00 00 mov %edx,0xe0(%edi)
*_Thread_libc_reent = heir->libc_reent;
10bd7f: 8b 96 e0 00 00 00 mov 0xe0(%esi),%edx
10bd85: 89 10 mov %edx,(%eax)
}
_User_extensions_Thread_switch( executing, heir );
10bd87: 50 push %eax
10bd88: 50 push %eax
10bd89: 56 push %esi
10bd8a: 57 push %edi
10bd8b: e8 48 0b 00 00 call 10c8d8 <_User_extensions_Thread_switch>
if ( executing->fp_context != NULL )
_Context_Save_fp( &executing->fp_context );
#endif
#endif
_Context_Switch( &executing->Registers, &heir->Registers );
10bd90: 5a pop %edx
10bd91: 59 pop %ecx
10bd92: 8d 86 c4 00 00 00 lea 0xc4(%esi),%eax
10bd98: 50 push %eax
10bd99: 8d 87 c4 00 00 00 lea 0xc4(%edi),%eax
10bd9f: 50 push %eax
10bda0: e8 0b 0e 00 00 call 10cbb0 <_CPU_Context_switch>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
10bda5: 83 c4 10 add $0x10,%esp
10bda8: 83 bf dc 00 00 00 00 cmpl $0x0,0xdc(%edi)
10bdaf: 74 36 je 10bde7 <_Thread_Dispatch+0x117>
#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 );
10bdb1: a1 58 e4 12 00 mov 0x12e458,%eax
10bdb6: 39 c7 cmp %eax,%edi
10bdb8: 74 2d je 10bde7 <_Thread_Dispatch+0x117>
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
10bdba: 85 c0 test %eax,%eax
10bdbc: 74 11 je 10bdcf <_Thread_Dispatch+0xff>
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
10bdbe: 83 ec 0c sub $0xc,%esp
10bdc1: 05 dc 00 00 00 add $0xdc,%eax
10bdc6: 50 push %eax
10bdc7: e8 18 0e 00 00 call 10cbe4 <_CPU_Context_save_fp>
10bdcc: 83 c4 10 add $0x10,%esp
_Context_Restore_fp( &executing->fp_context );
10bdcf: 83 ec 0c sub $0xc,%esp
10bdd2: 8d 87 dc 00 00 00 lea 0xdc(%edi),%eax
10bdd8: 50 push %eax
10bdd9: e8 10 0e 00 00 call 10cbee <_CPU_Context_restore_fp>
_Thread_Allocated_fp = executing;
10bdde: 89 3d 58 e4 12 00 mov %edi,0x12e458
10bde4: 83 c4 10 add $0x10,%esp
if ( executing->fp_context != NULL )
_Context_Restore_fp( &executing->fp_context );
#endif
#endif
executing = _Thread_Executing;
10bde7: 8b 3d ec e8 12 00 mov 0x12e8ec,%edi
_ISR_Disable( level );
10bded: 9c pushf
10bdee: fa cli
10bdef: 58 pop %eax
/*
* Now determine if we need to perform a dispatch on the current CPU.
*/
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
10bdf0: 8a 15 f8 e8 12 00 mov 0x12e8f8,%dl
10bdf6: 84 d2 test %dl,%dl
10bdf8: 0f 85 f0 fe ff ff jne 10bcee <_Thread_Dispatch+0x1e>
10bdfe: e9 02 ff ff ff jmp 10bd05 <_Thread_Dispatch+0x35>
_ISR_Enable( level );
_Thread_Unnest_dispatch();
_API_extensions_Run_postswitch();
}
10be03: 8d 65 f4 lea -0xc(%ebp),%esp
10be06: 5b pop %ebx
10be07: 5e pop %esi
10be08: 5f pop %edi
10be09: 5d pop %ebp
10be0a: c3 ret
00110d08 <_Thread_Handler>:
* Input parameters: NONE
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
110d08: 55 push %ebp
110d09: 89 e5 mov %esp,%ebp
110d0b: 53 push %ebx
110d0c: 83 ec 14 sub $0x14,%esp
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
static bool doneConstructors;
bool doCons;
#endif
executing = _Thread_Executing;
110d0f: 8b 1d ec e8 12 00 mov 0x12e8ec,%ebx
/*
* have to put level into a register for those cpu's that use
* inline asm here
*/
level = executing->Start.isr_level;
110d15: 8b 83 a8 00 00 00 mov 0xa8(%ebx),%eax
_ISR_Set_level(level);
110d1b: 85 c0 test %eax,%eax
110d1d: 74 03 je 110d22 <_Thread_Handler+0x1a>
110d1f: fa cli
110d20: eb 01 jmp 110d23 <_Thread_Handler+0x1b>
110d22: fb sti
doCons = !doneConstructors
&& _Objects_Get_API( executing->Object.id ) != OBJECTS_INTERNAL_API;
if (doCons)
doneConstructors = true;
#else
doCons = !doneConstructors;
110d23: a0 d4 e0 12 00 mov 0x12e0d4,%al
110d28: 88 45 f7 mov %al,-0x9(%ebp)
doneConstructors = true;
110d2b: c6 05 d4 e0 12 00 01 movb $0x1,0x12e0d4
#endif
#endif
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
110d32: 83 bb dc 00 00 00 00 cmpl $0x0,0xdc(%ebx)
110d39: 74 24 je 110d5f <_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 );
110d3b: a1 58 e4 12 00 mov 0x12e458,%eax
110d40: 39 c3 cmp %eax,%ebx
110d42: 74 1b je 110d5f <_Thread_Handler+0x57>
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
110d44: 85 c0 test %eax,%eax
110d46: 74 11 je 110d59 <_Thread_Handler+0x51>
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
110d48: 83 ec 0c sub $0xc,%esp
110d4b: 05 dc 00 00 00 add $0xdc,%eax
110d50: 50 push %eax
110d51: e8 8e be ff ff call 10cbe4 <_CPU_Context_save_fp>
110d56: 83 c4 10 add $0x10,%esp
_Thread_Allocated_fp = executing;
110d59: 89 1d 58 e4 12 00 mov %ebx,0x12e458
/*
* 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 );
110d5f: 83 ec 0c sub $0xc,%esp
110d62: 53 push %ebx
110d63: e8 34 ba ff ff call 10c79c <_User_extensions_Thread_begin>
/*
* At this point, the dispatch disable level BETTER be 1.
*/
_Thread_Enable_dispatch();
110d68: e8 9f b0 ff ff call 10be0c <_Thread_Enable_dispatch>
/*
* _init could be a weak symbol and we SHOULD test it but it isn't
* in any configuration I know of and it generates a warning on every
* RTEMS target configuration. --joel (12 May 2007)
*/
if (doCons) /* && (volatile void *)_init) */ {
110d6d: 83 c4 10 add $0x10,%esp
110d70: 80 7d f7 00 cmpb $0x0,-0x9(%ebp)
110d74: 75 05 jne 110d7b <_Thread_Handler+0x73>
INIT_NAME ();
110d76: e8 b1 d0 00 00 call 11de2c <__start_set_sysctl_set>
_Thread_Enable_dispatch();
#endif
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
110d7b: 8b 83 90 00 00 00 mov 0x90(%ebx),%eax
110d81: 85 c0 test %eax,%eax
110d83: 75 0b jne 110d90 <_Thread_Handler+0x88>
executing->Wait.return_argument =
(*(Thread_Entry_numeric) executing->Start.entry_point)(
110d85: 83 ec 0c sub $0xc,%esp
110d88: ff b3 98 00 00 00 pushl 0x98(%ebx)
110d8e: eb 0c jmp 110d9c <_Thread_Handler+0x94>
executing->Start.numeric_argument
);
}
#if defined(RTEMS_POSIX_API)
else if ( executing->Start.prototype == THREAD_START_POINTER ) {
110d90: 48 dec %eax
110d91: 75 15 jne 110da8 <_Thread_Handler+0xa0> <== NEVER TAKEN
executing->Wait.return_argument =
(*(Thread_Entry_pointer) executing->Start.entry_point)(
110d93: 83 ec 0c sub $0xc,%esp
110d96: ff b3 94 00 00 00 pushl 0x94(%ebx)
110d9c: ff 93 8c 00 00 00 call *0x8c(%ebx)
executing->Start.numeric_argument
);
}
#if defined(RTEMS_POSIX_API)
else if ( executing->Start.prototype == THREAD_START_POINTER ) {
executing->Wait.return_argument =
110da2: 89 43 28 mov %eax,0x28(%ebx)
110da5: 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 );
110da8: 83 ec 0c sub $0xc,%esp
110dab: 53 push %ebx
110dac: e8 19 ba ff ff call 10c7ca <_User_extensions_Thread_exitted>
_Internal_error_Occurred(
110db1: 83 c4 0c add $0xc,%esp
110db4: 6a 05 push $0x5
110db6: 6a 01 push $0x1
110db8: 6a 00 push $0x0
110dba: e8 0d a0 ff ff call 10adcc <_Internal_error_Occurred>
0010c0d8 <_Thread_Handler_initialization>:
*
* Output parameters: NONE
*/
void _Thread_Handler_initialization(void)
{
10c0d8: 55 push %ebp
10c0d9: 89 e5 mov %esp,%ebp
10c0db: 56 push %esi
10c0dc: 53 push %ebx
uint32_t ticks_per_timeslice =
10c0dd: 8b 1d 54 a1 12 00 mov 0x12a154,%ebx
rtems_configuration_get_ticks_per_timeslice();
uint32_t maximum_extensions =
10c0e3: 8b 35 48 a1 12 00 mov 0x12a148,%esi
rtems_configuration_get_maximum_extensions();
rtems_stack_allocate_init_hook stack_allocate_init_hook =
10c0e9: a1 64 a1 12 00 mov 0x12a164,%eax
#if defined(RTEMS_MULTIPROCESSING)
uint32_t maximum_proxies =
_Configuration_MP_table->maximum_proxies;
#endif
if ( rtems_configuration_get_stack_allocate_hook() == NULL ||
10c0ee: 83 3d 68 a1 12 00 00 cmpl $0x0,0x12a168
10c0f5: 74 09 je 10c100 <_Thread_Handler_initialization+0x28>
10c0f7: 83 3d 6c a1 12 00 00 cmpl $0x0,0x12a16c
10c0fe: 75 0c jne 10c10c <_Thread_Handler_initialization+0x34><== ALWAYS TAKEN
rtems_configuration_get_stack_free_hook() == NULL)
_Internal_error_Occurred(
10c100: 52 push %edx
10c101: 6a 0e push $0xe
10c103: 6a 01 push $0x1
10c105: 6a 00 push $0x0
10c107: e8 c0 ec ff ff call 10adcc <_Internal_error_Occurred>
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_BAD_STACK_HOOK
);
if ( stack_allocate_init_hook != NULL )
10c10c: 85 c0 test %eax,%eax
10c10e: 74 0e je 10c11e <_Thread_Handler_initialization+0x46>
(*stack_allocate_init_hook)( rtems_configuration_get_stack_space_size() );
10c110: 83 ec 0c sub $0xc,%esp
10c113: ff 35 44 a1 12 00 pushl 0x12a144
10c119: ff d0 call *%eax
10c11b: 83 c4 10 add $0x10,%esp
_Thread_Dispatch_necessary = false;
10c11e: c6 05 f8 e8 12 00 00 movb $0x0,0x12e8f8
_Thread_Executing = NULL;
10c125: c7 05 ec e8 12 00 00 movl $0x0,0x12e8ec
10c12c: 00 00 00
_Thread_Heir = NULL;
10c12f: c7 05 f0 e8 12 00 00 movl $0x0,0x12e8f0
10c136: 00 00 00
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
_Thread_Allocated_fp = NULL;
10c139: c7 05 58 e4 12 00 00 movl $0x0,0x12e458
10c140: 00 00 00
#endif
_Thread_Maximum_extensions = maximum_extensions;
10c143: 89 35 60 e4 12 00 mov %esi,0x12e460
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
10c149: 89 1d b8 e3 12 00 mov %ebx,0x12e3b8
#if defined(RTEMS_MULTIPROCESSING)
if ( _System_state_Is_multiprocessing )
maximum_internal_threads += 1;
#endif
_Objects_Initialize_information(
10c14f: 50 push %eax
10c150: 6a 08 push $0x8
10c152: 6a 00 push $0x0
10c154: 68 f4 00 00 00 push $0xf4
10c159: 6a 01 push $0x1
10c15b: 6a 01 push $0x1
10c15d: 6a 01 push $0x1
10c15f: 68 e0 e4 12 00 push $0x12e4e0
10c164: e8 5f f1 ff ff call 10b2c8 <_Objects_Initialize_information>
10c169: 83 c4 20 add $0x20,%esp
false, /* true if this is a global object class */
NULL /* Proxy extraction support callout */
#endif
);
}
10c16c: 8d 65 f8 lea -0x8(%ebp),%esp
10c16f: 5b pop %ebx
10c170: 5e pop %esi
10c171: 5d pop %ebp
10c172: c3 ret
0010beac <_Thread_Initialize>:
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
10beac: 55 push %ebp
10bead: 89 e5 mov %esp,%ebp
10beaf: 57 push %edi
10beb0: 56 push %esi
10beb1: 53 push %ebx
10beb2: 83 ec 1c sub $0x1c,%esp
10beb5: 8b 5d 0c mov 0xc(%ebp),%ebx
10beb8: 8b 4d 10 mov 0x10(%ebp),%ecx
10bebb: 8b 75 14 mov 0x14(%ebp),%esi
10bebe: 8a 55 18 mov 0x18(%ebp),%dl
10bec1: 8a 45 20 mov 0x20(%ebp),%al
10bec4: 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;
10bec7: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx)
10bece: 00 00 00
10bed1: c7 83 e8 00 00 00 00 movl $0x0,0xe8(%ebx)
10bed8: 00 00 00
extensions_area = NULL;
the_thread->libc_reent = NULL;
10bedb: c7 83 e0 00 00 00 00 movl $0x0,0xe0(%ebx)
10bee2: 00 00 00
if ( !actual_stack_size || actual_stack_size < stack_size )
return false; /* stack allocation failed */
stack = the_thread->Start.stack;
#else
if ( !stack_area ) {
10bee5: 85 c9 test %ecx,%ecx
10bee7: 75 31 jne 10bf1a <_Thread_Initialize+0x6e>
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
10bee9: 57 push %edi
10beea: 57 push %edi
10beeb: 56 push %esi
10beec: 53 push %ebx
10beed: 88 55 e0 mov %dl,-0x20(%ebp)
10bef0: e8 e7 06 00 00 call 10c5dc <_Thread_Stack_Allocate>
if ( !actual_stack_size || actual_stack_size < stack_size )
10bef5: 83 c4 10 add $0x10,%esp
10bef8: 39 f0 cmp %esi,%eax
10befa: 8a 55 e0 mov -0x20(%ebp),%dl
10befd: 0f 82 c7 01 00 00 jb 10c0ca <_Thread_Initialize+0x21e>
10bf03: 85 c0 test %eax,%eax
10bf05: 0f 84 bf 01 00 00 je 10c0ca <_Thread_Initialize+0x21e><== NEVER TAKEN
return false; /* stack allocation failed */
stack = the_thread->Start.stack;
10bf0b: 8b 8b c0 00 00 00 mov 0xc0(%ebx),%ecx
the_thread->Start.core_allocated_stack = true;
10bf11: c6 83 b0 00 00 00 01 movb $0x1,0xb0(%ebx)
10bf18: eb 09 jmp 10bf23 <_Thread_Initialize+0x77>
} else {
stack = stack_area;
actual_stack_size = stack_size;
the_thread->Start.core_allocated_stack = false;
10bf1a: c6 83 b0 00 00 00 00 movb $0x0,0xb0(%ebx)
10bf21: 89 f0 mov %esi,%eax
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
10bf23: 89 8b b8 00 00 00 mov %ecx,0xb8(%ebx)
the_stack->size = size;
10bf29: 89 83 b4 00 00 00 mov %eax,0xb4(%ebx)
extensions_area = NULL;
the_thread->libc_reent = NULL;
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
fp_area = NULL;
10bf2f: 31 ff xor %edi,%edi
/*
* Allocate the floating point area for this thread
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
10bf31: 84 d2 test %dl,%dl
10bf33: 74 17 je 10bf4c <_Thread_Initialize+0xa0>
fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
10bf35: 83 ec 0c sub $0xc,%esp
10bf38: 6a 6c push $0x6c
10bf3a: e8 05 0c 00 00 call 10cb44 <_Workspace_Allocate>
10bf3f: 89 c7 mov %eax,%edi
if ( !fp_area )
10bf41: 83 c4 10 add $0x10,%esp
10bf44: 85 c0 test %eax,%eax
10bf46: 0f 84 2b 01 00 00 je 10c077 <_Thread_Initialize+0x1cb><== NEVER TAKEN
goto failed;
fp_area = _Context_Fp_start( fp_area, 0 );
}
the_thread->fp_context = fp_area;
10bf4c: 89 bb dc 00 00 00 mov %edi,0xdc(%ebx)
the_thread->Start.fp_context = fp_area;
10bf52: 89 bb bc 00 00 00 mov %edi,0xbc(%ebx)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
10bf58: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx)
the_watchdog->routine = routine;
10bf5f: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx)
the_watchdog->id = id;
10bf66: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx)
the_watchdog->user_data = user_data;
10bf6d: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx)
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
10bf74: a1 60 e4 12 00 mov 0x12e460,%eax
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
extensions_area = NULL;
10bf79: 31 f6 xor %esi,%esi
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
10bf7b: 85 c0 test %eax,%eax
10bf7d: 74 1d je 10bf9c <_Thread_Initialize+0xf0>
extensions_area = _Workspace_Allocate(
10bf7f: 83 ec 0c sub $0xc,%esp
10bf82: 8d 04 85 04 00 00 00 lea 0x4(,%eax,4),%eax
10bf89: 50 push %eax
10bf8a: e8 b5 0b 00 00 call 10cb44 <_Workspace_Allocate>
10bf8f: 89 c6 mov %eax,%esi
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
10bf91: 83 c4 10 add $0x10,%esp
10bf94: 85 c0 test %eax,%eax
10bf96: 0f 84 dd 00 00 00 je 10c079 <_Thread_Initialize+0x1cd><== NEVER TAKEN
goto failed;
}
the_thread->extensions = (void **) extensions_area;
10bf9c: 89 b3 ec 00 00 00 mov %esi,0xec(%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 ) {
10bfa2: 85 f6 test %esi,%esi
10bfa4: 75 23 jne 10bfc9 <_Thread_Initialize+0x11d>
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
10bfa6: 8a 45 e7 mov -0x19(%ebp),%al
10bfa9: 88 83 9c 00 00 00 mov %al,0x9c(%ebx)
the_thread->Start.budget_algorithm = budget_algorithm;
10bfaf: 8b 45 24 mov 0x24(%ebp),%eax
10bfb2: 89 83 a0 00 00 00 mov %eax,0xa0(%ebx)
the_thread->Start.budget_callout = budget_callout;
10bfb8: 8b 45 28 mov 0x28(%ebp),%eax
10bfbb: 89 83 a4 00 00 00 mov %eax,0xa4(%ebx)
switch ( budget_algorithm ) {
10bfc1: 83 7d 24 02 cmpl $0x2,0x24(%ebp)
10bfc5: 75 28 jne 10bfef <_Thread_Initialize+0x143>
10bfc7: eb 1e jmp 10bfe7 <_Thread_Initialize+0x13b>
* 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++ )
10bfc9: 8b 15 60 e4 12 00 mov 0x12e460,%edx
10bfcf: 31 c0 xor %eax,%eax
10bfd1: eb 0e jmp 10bfe1 <_Thread_Initialize+0x135>
the_thread->extensions[i] = NULL;
10bfd3: 8b 8b ec 00 00 00 mov 0xec(%ebx),%ecx
10bfd9: c7 04 81 00 00 00 00 movl $0x0,(%ecx,%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++ )
10bfe0: 40 inc %eax
10bfe1: 39 d0 cmp %edx,%eax
10bfe3: 76 ee jbe 10bfd3 <_Thread_Initialize+0x127>
10bfe5: eb bf jmp 10bfa6 <_Thread_Initialize+0xfa>
case THREAD_CPU_BUDGET_ALGORITHM_NONE:
case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE:
break;
#if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE)
case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE:
the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
10bfe7: a1 b8 e3 12 00 mov 0x12e3b8,%eax
10bfec: 89 43 74 mov %eax,0x74(%ebx)
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
10bfef: 8b 45 2c mov 0x2c(%ebp),%eax
10bff2: 89 83 a8 00 00 00 mov %eax,0xa8(%ebx)
the_thread->current_state = STATES_DORMANT;
10bff8: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx)
the_thread->Wait.queue = NULL;
10bfff: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx)
the_thread->resource_count = 0;
10c006: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx)
the_thread->real_priority = priority;
10c00d: 8b 45 1c mov 0x1c(%ebp),%eax
10c010: 89 43 18 mov %eax,0x18(%ebx)
the_thread->Start.initial_priority = priority;
10c013: 89 83 ac 00 00 00 mov %eax,0xac(%ebx)
*/
RTEMS_INLINE_ROUTINE void* _Scheduler_Allocate(
Thread_Control *the_thread
)
{
return _Scheduler.Operations.allocate( the_thread );
10c019: 83 ec 0c sub $0xc,%esp
10c01c: 53 push %ebx
10c01d: ff 15 48 a2 12 00 call *0x12a248
10c023: 89 c2 mov %eax,%edx
sched =_Scheduler_Allocate( the_thread );
if ( !sched )
10c025: 83 c4 10 add $0x10,%esp
10c028: 85 c0 test %eax,%eax
10c02a: 74 4f je 10c07b <_Thread_Initialize+0x1cf>
goto failed;
_Thread_Set_priority( the_thread, priority );
10c02c: 51 push %ecx
10c02d: 51 push %ecx
10c02e: ff 75 1c pushl 0x1c(%ebp)
10c031: 53 push %ebx
10c032: 89 45 e0 mov %eax,-0x20(%ebp)
10c035: e8 26 05 00 00 call 10c560 <_Thread_Set_priority>
static inline void _Timestamp64_implementation_Set_to_zero(
Timestamp64_Control *_time
)
{
*_time = 0;
10c03a: c7 83 80 00 00 00 00 movl $0x0,0x80(%ebx)
10c041: 00 00 00
10c044: c7 83 84 00 00 00 00 movl $0x0,0x84(%ebx)
10c04b: 00 00 00
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
10c04e: 0f b7 4b 08 movzwl 0x8(%ebx),%ecx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10c052: 8b 45 08 mov 0x8(%ebp),%eax
10c055: 8b 40 1c mov 0x1c(%eax),%eax
10c058: 89 1c 88 mov %ebx,(%eax,%ecx,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
10c05b: 8b 45 30 mov 0x30(%ebp),%eax
10c05e: 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 );
10c061: 89 1c 24 mov %ebx,(%esp)
10c064: e8 c7 07 00 00 call 10c830 <_User_extensions_Thread_create>
if ( extension_status )
10c069: 83 c4 10 add $0x10,%esp
return true;
10c06c: b1 01 mov $0x1,%cl
* 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 );
if ( extension_status )
10c06e: 84 c0 test %al,%al
10c070: 8b 55 e0 mov -0x20(%ebp),%edx
10c073: 74 06 je 10c07b <_Thread_Initialize+0x1cf>
10c075: eb 55 jmp 10c0cc <_Thread_Initialize+0x220>
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
extensions_area = NULL;
10c077: 31 f6 xor %esi,%esi
size_t actual_stack_size = 0;
void *stack = NULL;
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
void *fp_area;
#endif
void *sched = NULL;
10c079: 31 d2 xor %edx,%edx
extension_status = _User_extensions_Thread_create( the_thread );
if ( extension_status )
return true;
failed:
_Workspace_Free( the_thread->libc_reent );
10c07b: 83 ec 0c sub $0xc,%esp
10c07e: ff b3 e0 00 00 00 pushl 0xe0(%ebx)
10c084: 89 55 e0 mov %edx,-0x20(%ebp)
10c087: e8 d1 0a 00 00 call 10cb5d <_Workspace_Free>
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
_Workspace_Free( the_thread->API_Extensions[i] );
10c08c: 58 pop %eax
10c08d: ff b3 e4 00 00 00 pushl 0xe4(%ebx)
10c093: e8 c5 0a 00 00 call 10cb5d <_Workspace_Free>
10c098: 5a pop %edx
10c099: ff b3 e8 00 00 00 pushl 0xe8(%ebx)
10c09f: e8 b9 0a 00 00 call 10cb5d <_Workspace_Free>
_Workspace_Free( extensions_area );
10c0a4: 89 34 24 mov %esi,(%esp)
10c0a7: e8 b1 0a 00 00 call 10cb5d <_Workspace_Free>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
_Workspace_Free( fp_area );
10c0ac: 89 3c 24 mov %edi,(%esp)
10c0af: e8 a9 0a 00 00 call 10cb5d <_Workspace_Free>
#endif
_Workspace_Free( sched );
10c0b4: 8b 55 e0 mov -0x20(%ebp),%edx
10c0b7: 89 14 24 mov %edx,(%esp)
10c0ba: e8 9e 0a 00 00 call 10cb5d <_Workspace_Free>
_Thread_Stack_Free( the_thread );
10c0bf: 89 1c 24 mov %ebx,(%esp)
10c0c2: e8 51 05 00 00 call 10c618 <_Thread_Stack_Free>
return false;
10c0c7: 83 c4 10 add $0x10,%esp
stack = the_thread->Start.stack;
#else
if ( !stack_area ) {
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
if ( !actual_stack_size || actual_stack_size < stack_size )
return false; /* stack allocation failed */
10c0ca: 31 c9 xor %ecx,%ecx
_Workspace_Free( sched );
_Thread_Stack_Free( the_thread );
return false;
}
10c0cc: 88 c8 mov %cl,%al
10c0ce: 8d 65 f4 lea -0xc(%ebp),%esp
10c0d1: 5b pop %ebx
10c0d2: 5e pop %esi
10c0d3: 5f pop %edi
10c0d4: 5d pop %ebp
10c0d5: c3 ret
0010c618 <_Thread_Stack_Free>:
*/
void _Thread_Stack_Free(
Thread_Control *the_thread
)
{
10c618: 55 push %ebp
10c619: 89 e5 mov %esp,%ebp
10c61b: 8b 45 08 mov 0x8(%ebp),%eax
rtems_stack_free_hook stack_free_hook =
10c61e: 8b 15 6c a1 12 00 mov 0x12a16c,%edx
#if defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API)
/*
* If the API provided the stack space, then don't free it.
*/
if ( !the_thread->Start.core_allocated_stack )
10c624: 80 b8 b0 00 00 00 00 cmpb $0x0,0xb0(%eax)
10c62b: 74 0c je 10c639 <_Thread_Stack_Free+0x21><== NEVER TAKEN
* Call ONLY the CPU table stack free hook, or the
* the RTEMS workspace free. This is so the free
* routine properly matches the allocation of the stack.
*/
(*stack_free_hook)( the_thread->Start.Initial_stack.area );
10c62d: 8b 80 b8 00 00 00 mov 0xb8(%eax),%eax
10c633: 89 45 08 mov %eax,0x8(%ebp)
}
10c636: 5d pop %ebp
* Call ONLY the CPU table stack free hook, or the
* the RTEMS workspace free. This is so the free
* routine properly matches the allocation of the stack.
*/
(*stack_free_hook)( the_thread->Start.Initial_stack.area );
10c637: ff e2 jmp *%edx
}
10c639: 5d pop %ebp <== NOT EXECUTED
10c63a: c3 ret <== NOT EXECUTED
0010c4d0 <_Thread_queue_Requeue>:
void _Thread_queue_Requeue(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
10c4d0: 55 push %ebp
10c4d1: 89 e5 mov %esp,%ebp
10c4d3: 57 push %edi
10c4d4: 56 push %esi
10c4d5: 53 push %ebx
10c4d6: 83 ec 1c sub $0x1c,%esp
10c4d9: 8b 5d 08 mov 0x8(%ebp),%ebx
10c4dc: 8b 75 0c mov 0xc(%ebp),%esi
/*
* Just in case the thread really wasn't blocked on a thread queue
* when we get here.
*/
if ( !the_thread_queue )
10c4df: 85 db test %ebx,%ebx
10c4e1: 74 36 je 10c519 <_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 ) {
10c4e3: 83 7b 34 01 cmpl $0x1,0x34(%ebx)
10c4e7: 75 30 jne 10c519 <_Thread_queue_Requeue+0x49><== NEVER TAKEN
Thread_queue_Control *tq = the_thread_queue;
ISR_Level level;
ISR_Level level_ignored;
_ISR_Disable( level );
10c4e9: 9c pushf
10c4ea: fa cli
10c4eb: 5f pop %edi
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
10c4ec: f7 46 10 e0 be 03 00 testl $0x3bee0,0x10(%esi)
10c4f3: 74 22 je 10c517 <_Thread_queue_Requeue+0x47><== NEVER TAKEN
RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section (
Thread_queue_Control *the_thread_queue
)
{
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
10c4f5: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx)
_Thread_queue_Enter_critical_section( tq );
_Thread_queue_Extract_priority_helper( tq, the_thread, true );
10c4fc: 50 push %eax
10c4fd: 6a 01 push $0x1
10c4ff: 56 push %esi
10c500: 53 push %ebx
10c501: e8 0a 32 00 00 call 10f710 <_Thread_queue_Extract_priority_helper>
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
10c506: 83 c4 0c add $0xc,%esp
10c509: 8d 45 e4 lea -0x1c(%ebp),%eax
10c50c: 50 push %eax
10c50d: 56 push %esi
10c50e: 53 push %ebx
10c50f: e8 e4 fd ff ff call 10c2f8 <_Thread_queue_Enqueue_priority>
10c514: 83 c4 10 add $0x10,%esp
}
_ISR_Enable( level );
10c517: 57 push %edi
10c518: 9d popf
}
}
10c519: 8d 65 f4 lea -0xc(%ebp),%esp
10c51c: 5b pop %ebx
10c51d: 5e pop %esi
10c51e: 5f pop %edi
10c51f: 5d pop %ebp
10c520: c3 ret
0010c524 <_Thread_queue_Timeout>:
void _Thread_queue_Timeout(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
10c524: 55 push %ebp
10c525: 89 e5 mov %esp,%ebp
10c527: 83 ec 20 sub $0x20,%esp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
10c52a: 8d 45 f4 lea -0xc(%ebp),%eax
10c52d: 50 push %eax
10c52e: ff 75 08 pushl 0x8(%ebp)
10c531: e8 f6 f8 ff ff call 10be2c <_Thread_Get>
switch ( location ) {
10c536: 83 c4 10 add $0x10,%esp
10c539: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
10c53d: 75 1c jne 10c55b <_Thread_queue_Timeout+0x37><== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_queue_Process_timeout( the_thread );
10c53f: 83 ec 0c sub $0xc,%esp
10c542: 50 push %eax
10c543: e8 78 32 00 00 call 10f7c0 <_Thread_queue_Process_timeout>
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
10c548: a1 e4 e3 12 00 mov 0x12e3e4,%eax
10c54d: 48 dec %eax
10c54e: a3 e4 e3 12 00 mov %eax,0x12e3e4
return _Thread_Dispatch_disable_level;
10c553: a1 e4 e3 12 00 mov 0x12e3e4,%eax
10c558: 83 c4 10 add $0x10,%esp
_Thread_Unnest_dispatch();
break;
}
}
10c55b: c9 leave
10c55c: c3 ret
00116732 <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
116732: 55 push %ebp
116733: 89 e5 mov %esp,%ebp
116735: 57 push %edi
116736: 56 push %esi
116737: 53 push %ebx
116738: 83 ec 3c sub $0x3c,%esp
11673b: 8b 5d 08 mov 0x8(%ebp),%ebx
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
11673e: 8d 45 d0 lea -0x30(%ebp),%eax
116741: 8d 55 d4 lea -0x2c(%ebp),%edx
116744: 89 55 d0 mov %edx,-0x30(%ebp)
head->previous = NULL;
116747: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp)
tail->previous = head;
11674e: 89 45 d8 mov %eax,-0x28(%ebp)
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
116751: 8d 75 dc lea -0x24(%ebp),%esi
116754: 8d 55 e0 lea -0x20(%ebp),%edx
116757: 89 55 dc mov %edx,-0x24(%ebp)
head->previous = NULL;
11675a: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
tail->previous = head;
116761: 89 75 e4 mov %esi,-0x1c(%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;
116764: 8d 45 d0 lea -0x30(%ebp),%eax
116767: 89 43 78 mov %eax,0x78(%ebx)
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
11676a: 8d 7b 30 lea 0x30(%ebx),%edi
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
11676d: a1 48 7f 14 00 mov 0x147f48,%eax
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
116772: 8b 53 3c mov 0x3c(%ebx),%edx
watchdogs->last_snapshot = snapshot;
116775: 89 43 3c mov %eax,0x3c(%ebx)
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
116778: 51 push %ecx
116779: 56 push %esi
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
11677a: 29 d0 sub %edx,%eax
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
11677c: 50 push %eax
11677d: 57 push %edi
11677e: e8 25 38 00 00 call 119fa8 <_Watchdog_Adjust_to_chain>
116783: 6a 00 push $0x0
116785: 68 00 ca 9a 3b push $0x3b9aca00
11678a: ff 35 14 7e 14 00 pushl 0x147e14
116790: ff 35 10 7e 14 00 pushl 0x147e10
116796: e8 59 3e 01 00 call 12a5f4 <__divdi3>
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
11679b: 8b 53 74 mov 0x74(%ebx),%edx
/*
* 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 ) {
11679e: 83 c4 20 add $0x20,%esp
1167a1: 39 d0 cmp %edx,%eax
1167a3: 76 15 jbe 1167ba <_Timer_server_Body+0x88>
/*
* 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 );
1167a5: 51 push %ecx
1167a6: 56 push %esi
if ( snapshot > last_snapshot ) {
/*
* This path is for normal forward movement and cases where the
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
1167a7: 89 c1 mov %eax,%ecx
1167a9: 29 d1 sub %edx,%ecx
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
1167ab: 51 push %ecx
1167ac: 8d 53 68 lea 0x68(%ebx),%edx
1167af: 52 push %edx
1167b0: 89 45 c0 mov %eax,-0x40(%ebp)
1167b3: e8 f0 37 00 00 call 119fa8 <_Watchdog_Adjust_to_chain>
1167b8: eb 14 jmp 1167ce <_Timer_server_Body+0x9c>
} else if ( snapshot < last_snapshot ) {
1167ba: 73 18 jae 1167d4 <_Timer_server_Body+0xa2>
/*
* 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 );
1167bc: 51 push %ecx
} else if ( snapshot < last_snapshot ) {
/*
* The current TOD is before the last TOD which indicates that
* TOD has been set backwards.
*/
delta = last_snapshot - snapshot;
1167bd: 29 c2 sub %eax,%edx
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
1167bf: 52 push %edx
1167c0: 6a 01 push $0x1
1167c2: 8d 53 68 lea 0x68(%ebx),%edx
1167c5: 52 push %edx
1167c6: 89 45 c0 mov %eax,-0x40(%ebp)
1167c9: e8 72 37 00 00 call 119f40 <_Watchdog_Adjust>
1167ce: 83 c4 10 add $0x10,%esp
1167d1: 8b 45 c0 mov -0x40(%ebp),%eax
}
watchdogs->last_snapshot = snapshot;
1167d4: 89 43 74 mov %eax,0x74(%ebx)
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
1167d7: 8d 4b 68 lea 0x68(%ebx),%ecx
1167da: 89 4d c4 mov %ecx,-0x3c(%ebp)
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
1167dd: 8b 43 78 mov 0x78(%ebx),%eax
1167e0: 83 ec 0c sub $0xc,%esp
1167e3: 50 push %eax
1167e4: e8 cf 07 00 00 call 116fb8 <_Chain_Get>
if ( timer == NULL ) {
1167e9: 83 c4 10 add $0x10,%esp
1167ec: 85 c0 test %eax,%eax
1167ee: 74 29 je 116819 <_Timer_server_Body+0xe7><== ALWAYS TAKEN
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
1167f0: 8b 50 38 mov 0x38(%eax),%edx <== NOT EXECUTED
1167f3: 83 fa 01 cmp $0x1,%edx <== NOT EXECUTED
1167f6: 75 09 jne 116801 <_Timer_server_Body+0xcf><== NOT EXECUTED
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
1167f8: 52 push %edx <== NOT EXECUTED
1167f9: 52 push %edx <== NOT EXECUTED
1167fa: 83 c0 10 add $0x10,%eax <== NOT EXECUTED
1167fd: 50 push %eax <== NOT EXECUTED
1167fe: 57 push %edi <== NOT EXECUTED
1167ff: eb 0e jmp 11680f <_Timer_server_Body+0xdd><== NOT EXECUTED
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
116801: 83 fa 03 cmp $0x3,%edx <== NOT EXECUTED
116804: 75 d7 jne 1167dd <_Timer_server_Body+0xab><== NOT EXECUTED
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
116806: 51 push %ecx <== NOT EXECUTED
116807: 51 push %ecx <== NOT EXECUTED
116808: 83 c0 10 add $0x10,%eax <== NOT EXECUTED
11680b: 50 push %eax <== NOT EXECUTED
11680c: ff 75 c4 pushl -0x3c(%ebp) <== NOT EXECUTED
11680f: e8 18 38 00 00 call 11a02c <_Watchdog_Insert> <== NOT EXECUTED
116814: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
116817: eb c4 jmp 1167dd <_Timer_server_Body+0xab><== 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 );
116819: 9c pushf
11681a: fa cli
11681b: 58 pop %eax
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
11681c: 8d 55 d4 lea -0x2c(%ebp),%edx
if ( _Chain_Is_empty( insert_chain ) ) {
11681f: 39 55 d0 cmp %edx,-0x30(%ebp)
116822: 75 13 jne 116837 <_Timer_server_Body+0x105><== NEVER TAKEN
ts->insert_chain = NULL;
116824: c7 43 78 00 00 00 00 movl $0x0,0x78(%ebx)
_ISR_Enable( level );
11682b: 50 push %eax
11682c: 9d popf
11682d: 8d 7d e0 lea -0x20(%ebp),%edi
_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 ) ) {
116830: 39 7d dc cmp %edi,-0x24(%ebp)
116833: 75 09 jne 11683e <_Timer_server_Body+0x10c>
116835: eb 39 jmp 116870 <_Timer_server_Body+0x13e>
ts->insert_chain = NULL;
_ISR_Enable( level );
break;
} else {
_ISR_Enable( level );
116837: 50 push %eax <== NOT EXECUTED
116838: 9d popf <== NOT EXECUTED
116839: e9 2f ff ff ff jmp 11676d <_Timer_server_Body+0x3b><== 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 );
11683e: 9c pushf
11683f: fa cli
116840: 5a pop %edx
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
116841: 8b 45 dc mov -0x24(%ebp),%eax
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
116844: 39 f8 cmp %edi,%eax
116846: 74 21 je 116869 <_Timer_server_Body+0x137>
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
116848: 8b 08 mov (%eax),%ecx
head->next = new_first;
11684a: 89 4d dc mov %ecx,-0x24(%ebp)
new_first->previous = head;
11684d: 89 71 04 mov %esi,0x4(%ecx)
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
116850: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax)
_ISR_Enable( level );
116857: 52 push %edx
116858: 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 );
116859: 52 push %edx
11685a: 52 push %edx
11685b: ff 70 24 pushl 0x24(%eax)
11685e: ff 70 20 pushl 0x20(%eax)
116861: ff 50 1c call *0x1c(%eax)
}
116864: 83 c4 10 add $0x10,%esp
116867: eb d5 jmp 11683e <_Timer_server_Body+0x10c>
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
_ISR_Enable( level );
} else {
_ISR_Enable( level );
116869: 52 push %edx
11686a: 9d popf
11686b: e9 f4 fe ff ff jmp 116764 <_Timer_server_Body+0x32>
* the active flag of the timer server is true.
*/
(*watchdog->routine)( watchdog->id, watchdog->user_data );
}
} else {
ts->active = false;
116870: c6 43 7c 00 movb $0x0,0x7c(%ebx)
116874: e8 ef fc ff ff call 116568 <_Thread_Dispatch_increment_disable_level>
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
_Thread_Set_state( ts->thread, STATES_DELAYING );
116879: 57 push %edi
11687a: 57 push %edi
11687b: 6a 08 push $0x8
11687d: ff 33 pushl (%ebx)
11687f: e8 f8 32 00 00 call 119b7c <_Thread_Set_state>
_Timer_server_Reset_interval_system_watchdog( ts );
116884: 89 d8 mov %ebx,%eax
116886: e8 f2 fc ff ff call 11657d <_Timer_server_Reset_interval_system_watchdog>
_Timer_server_Reset_tod_system_watchdog( ts );
11688b: 89 d8 mov %ebx,%eax
11688d: e8 31 fd ff ff call 1165c3 <_Timer_server_Reset_tod_system_watchdog>
_Thread_Enable_dispatch();
116892: e8 fd 2a 00 00 call 119394 <_Thread_Enable_dispatch>
ts->active = true;
116897: 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 );
11689b: 8d 43 08 lea 0x8(%ebx),%eax
11689e: 89 04 24 mov %eax,(%esp)
1168a1: e8 9a 38 00 00 call 11a140 <_Watchdog_Remove>
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
1168a6: 8d 43 40 lea 0x40(%ebx),%eax
1168a9: 89 04 24 mov %eax,(%esp)
1168ac: e8 8f 38 00 00 call 11a140 <_Watchdog_Remove>
1168b1: 83 c4 10 add $0x10,%esp
1168b4: e9 ab fe ff ff jmp 116764 <_Timer_server_Body+0x32>
00116609 <_Timer_server_Schedule_operation_method>:
static void _Timer_server_Schedule_operation_method(
Timer_server_Control *ts,
Timer_Control *timer
)
{
116609: 55 push %ebp
11660a: 89 e5 mov %esp,%ebp
11660c: 57 push %edi
11660d: 56 push %esi
11660e: 53 push %ebx
11660f: 83 ec 1c sub $0x1c,%esp
116612: 8b 5d 08 mov 0x8(%ebp),%ebx
116615: 8b 7d 0c mov 0xc(%ebp),%edi
if ( ts->insert_chain == NULL ) {
116618: 8b 43 78 mov 0x78(%ebx),%eax
11661b: 85 c0 test %eax,%eax
11661d: 0f 85 fa 00 00 00 jne 11671d <_Timer_server_Schedule_operation_method+0x114><== NEVER TAKEN
#if defined ( __THREAD_DO_NOT_INLINE_DISABLE_DISPATCH__ )
void _Thread_Disable_dispatch( void );
#else
RTEMS_INLINE_ROUTINE void _Thread_Disable_dispatch( void )
{
_Thread_Dispatch_increment_disable_level();
116623: e8 40 ff ff ff call 116568 <_Thread_Dispatch_increment_disable_level>
* being inserted. This could result in an integer overflow.
*/
_Thread_Disable_dispatch();
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
116628: 8b 47 38 mov 0x38(%edi),%eax
11662b: 83 f8 01 cmp $0x1,%eax
11662e: 75 61 jne 116691 <_Timer_server_Schedule_operation_method+0x88>
/*
* We have to advance the last known ticks value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
116630: 9c pushf
116631: fa cli
116632: 8f 45 e0 popl -0x20(%ebp)
snapshot = _Watchdog_Ticks_since_boot;
116635: 8b 15 48 7f 14 00 mov 0x147f48,%edx
last_snapshot = ts->Interval_watchdogs.last_snapshot;
11663b: 8b 4b 3c mov 0x3c(%ebx),%ecx
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
11663e: 8b 43 30 mov 0x30(%ebx),%eax
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
116641: 8d 73 34 lea 0x34(%ebx),%esi
if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) {
116644: 39 f0 cmp %esi,%eax
116646: 74 19 je 116661 <_Timer_server_Schedule_operation_method+0x58>
first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain );
/*
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
116648: 89 d6 mov %edx,%esi
11664a: 29 ce sub %ecx,%esi
11664c: 89 75 e4 mov %esi,-0x1c(%ebp)
delta_interval = first_watchdog->delta_interval;
11664f: 8b 70 10 mov 0x10(%eax),%esi
if (delta_interval > delta) {
delta_interval -= delta;
} else {
delta_interval = 0;
116652: 31 c9 xor %ecx,%ecx
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
delta_interval = first_watchdog->delta_interval;
if (delta_interval > delta) {
116654: 3b 75 e4 cmp -0x1c(%ebp),%esi
116657: 76 05 jbe 11665e <_Timer_server_Schedule_operation_method+0x55>
delta_interval -= delta;
116659: 89 f1 mov %esi,%ecx
11665b: 2b 4d e4 sub -0x1c(%ebp),%ecx
} else {
delta_interval = 0;
}
first_watchdog->delta_interval = delta_interval;
11665e: 89 48 10 mov %ecx,0x10(%eax)
}
ts->Interval_watchdogs.last_snapshot = snapshot;
116661: 89 53 3c mov %edx,0x3c(%ebx)
_ISR_Enable( level );
116664: ff 75 e0 pushl -0x20(%ebp)
116667: 9d popf
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
116668: 56 push %esi
116669: 56 push %esi
11666a: 8d 47 10 lea 0x10(%edi),%eax
11666d: 50 push %eax
11666e: 8d 43 30 lea 0x30(%ebx),%eax
116671: 50 push %eax
116672: e8 b5 39 00 00 call 11a02c <_Watchdog_Insert>
if ( !ts->active ) {
116677: 8a 43 7c mov 0x7c(%ebx),%al
11667a: 83 c4 10 add $0x10,%esp
11667d: 84 c0 test %al,%al
11667f: 0f 85 8c 00 00 00 jne 116711 <_Timer_server_Schedule_operation_method+0x108>
_Timer_server_Reset_interval_system_watchdog( ts );
116685: 89 d8 mov %ebx,%eax
116687: e8 f1 fe ff ff call 11657d <_Timer_server_Reset_interval_system_watchdog>
11668c: e9 80 00 00 00 jmp 116711 <_Timer_server_Schedule_operation_method+0x108>
}
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
116691: 83 f8 03 cmp $0x3,%eax
116694: 75 7b jne 116711 <_Timer_server_Schedule_operation_method+0x108>
/*
* We have to advance the last known seconds value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
116696: 9c pushf
116697: fa cli
116698: 8f 45 e0 popl -0x20(%ebp)
11669b: 6a 00 push $0x0
11669d: 68 00 ca 9a 3b push $0x3b9aca00
1166a2: ff 35 14 7e 14 00 pushl 0x147e14
1166a8: ff 35 10 7e 14 00 pushl 0x147e10
1166ae: e8 41 3f 01 00 call 12a5f4 <__divdi3>
1166b3: 83 c4 10 add $0x10,%esp
snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
last_snapshot = ts->TOD_watchdogs.last_snapshot;
1166b6: 8b 53 74 mov 0x74(%ebx),%edx
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
1166b9: 8b 4b 68 mov 0x68(%ebx),%ecx
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
1166bc: 8d 73 6c lea 0x6c(%ebx),%esi
if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) {
1166bf: 39 f1 cmp %esi,%ecx
1166c1: 74 27 je 1166ea <_Timer_server_Schedule_operation_method+0xe1>
first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain );
delta_interval = first_watchdog->delta_interval;
1166c3: 8b 71 10 mov 0x10(%ecx),%esi
1166c6: 89 75 dc mov %esi,-0x24(%ebp)
if ( snapshot > last_snapshot ) {
1166c9: 39 d0 cmp %edx,%eax
1166cb: 76 15 jbe 1166e2 <_Timer_server_Schedule_operation_method+0xd9>
/*
* We advanced in time.
*/
delta = snapshot - last_snapshot;
1166cd: 89 c6 mov %eax,%esi
1166cf: 29 d6 sub %edx,%esi
1166d1: 89 75 e4 mov %esi,-0x1c(%ebp)
if (delta_interval > delta) {
delta_interval -= delta;
} else {
delta_interval = 0;
1166d4: 31 d2 xor %edx,%edx
if ( snapshot > last_snapshot ) {
/*
* We advanced in time.
*/
delta = snapshot - last_snapshot;
if (delta_interval > delta) {
1166d6: 39 75 dc cmp %esi,-0x24(%ebp)
1166d9: 76 0c jbe 1166e7 <_Timer_server_Schedule_operation_method+0xde><== NEVER TAKEN
delta_interval -= delta;
1166db: 8b 55 dc mov -0x24(%ebp),%edx
1166de: 29 f2 sub %esi,%edx
1166e0: eb 05 jmp 1166e7 <_Timer_server_Schedule_operation_method+0xde>
}
} else {
/*
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
1166e2: 03 55 dc add -0x24(%ebp),%edx
delta_interval += delta;
1166e5: 29 c2 sub %eax,%edx
}
first_watchdog->delta_interval = delta_interval;
1166e7: 89 51 10 mov %edx,0x10(%ecx)
}
ts->TOD_watchdogs.last_snapshot = snapshot;
1166ea: 89 43 74 mov %eax,0x74(%ebx)
_ISR_Enable( level );
1166ed: ff 75 e0 pushl -0x20(%ebp)
1166f0: 9d popf
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
1166f1: 51 push %ecx
1166f2: 51 push %ecx
1166f3: 8d 47 10 lea 0x10(%edi),%eax
1166f6: 50 push %eax
1166f7: 8d 43 68 lea 0x68(%ebx),%eax
1166fa: 50 push %eax
1166fb: e8 2c 39 00 00 call 11a02c <_Watchdog_Insert>
if ( !ts->active ) {
116700: 8a 43 7c mov 0x7c(%ebx),%al
116703: 83 c4 10 add $0x10,%esp
116706: 84 c0 test %al,%al
116708: 75 07 jne 116711 <_Timer_server_Schedule_operation_method+0x108>
_Timer_server_Reset_tod_system_watchdog( ts );
11670a: 89 d8 mov %ebx,%eax
11670c: e8 b2 fe ff ff call 1165c3 <_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 );
}
}
116711: 8d 65 f4 lea -0xc(%ebp),%esp
116714: 5b pop %ebx
116715: 5e pop %esi
116716: 5f pop %edi
116717: 5d pop %ebp
if ( !ts->active ) {
_Timer_server_Reset_tod_system_watchdog( ts );
}
}
_Thread_Enable_dispatch();
116718: e9 77 2c 00 00 jmp 119394 <_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 );
11671d: 8b 43 78 mov 0x78(%ebx),%eax <== NOT EXECUTED
116720: 89 7d 0c mov %edi,0xc(%ebp) <== NOT EXECUTED
116723: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED
}
}
116726: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
116729: 5b pop %ebx <== NOT EXECUTED
11672a: 5e pop %esi <== NOT EXECUTED
11672b: 5f pop %edi <== NOT EXECUTED
11672c: 5d pop %ebp <== 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 );
11672d: e9 62 08 00 00 jmp 116f94 <_Chain_Append> <== NOT EXECUTED
0010d974 <_Timestamp64_Divide>:
const Timestamp64_Control *_lhs,
const Timestamp64_Control *_rhs,
uint32_t *_ival_percentage,
uint32_t *_fval_percentage
)
{
10d974: 55 push %ebp
10d975: 89 e5 mov %esp,%ebp
10d977: 57 push %edi
10d978: 56 push %esi
10d979: 53 push %ebx
10d97a: 83 ec 0c sub $0xc,%esp
10d97d: 8b 55 08 mov 0x8(%ebp),%edx
Timestamp64_Control answer;
if ( *_rhs == 0 ) {
10d980: 8b 45 0c mov 0xc(%ebp),%eax
10d983: 8b 08 mov (%eax),%ecx
10d985: 8b 58 04 mov 0x4(%eax),%ebx
10d988: 89 d8 mov %ebx,%eax
10d98a: 09 c8 or %ecx,%eax
10d98c: 75 14 jne 10d9a2 <_Timestamp64_Divide+0x2e><== ALWAYS TAKEN
*_ival_percentage = 0;
10d98e: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED
10d991: c7 02 00 00 00 00 movl $0x0,(%edx) <== NOT EXECUTED
*_fval_percentage = 0;
10d997: 8b 45 14 mov 0x14(%ebp),%eax <== NOT EXECUTED
10d99a: c7 00 00 00 00 00 movl $0x0,(%eax) <== NOT EXECUTED
return;
10d9a0: eb 4c jmp 10d9ee <_Timestamp64_Divide+0x7a><== NOT EXECUTED
* This looks odd but gives the results the proper precision.
*
* TODO: Rounding on the last digit of the fval.
*/
answer = (*_lhs * 100000) / *_rhs;
10d9a2: 69 72 04 a0 86 01 00 imul $0x186a0,0x4(%edx),%esi
10d9a9: b8 a0 86 01 00 mov $0x186a0,%eax
10d9ae: f7 22 mull (%edx)
10d9b0: 01 f2 add %esi,%edx
10d9b2: 53 push %ebx
10d9b3: 51 push %ecx
10d9b4: 52 push %edx
10d9b5: 50 push %eax
10d9b6: e8 5d 10 01 00 call 11ea18 <__divdi3>
10d9bb: 83 c4 10 add $0x10,%esp
10d9be: 89 c6 mov %eax,%esi
10d9c0: 89 d7 mov %edx,%edi
*_ival_percentage = answer / 1000;
10d9c2: 6a 00 push $0x0
10d9c4: 68 e8 03 00 00 push $0x3e8
10d9c9: 52 push %edx
10d9ca: 50 push %eax
10d9cb: e8 48 10 01 00 call 11ea18 <__divdi3>
10d9d0: 83 c4 10 add $0x10,%esp
10d9d3: 8b 55 10 mov 0x10(%ebp),%edx
10d9d6: 89 02 mov %eax,(%edx)
*_fval_percentage = answer % 1000;
10d9d8: 6a 00 push $0x0
10d9da: 68 e8 03 00 00 push $0x3e8
10d9df: 57 push %edi
10d9e0: 56 push %esi
10d9e1: e8 86 11 01 00 call 11eb6c <__moddi3>
10d9e6: 83 c4 10 add $0x10,%esp
10d9e9: 8b 55 14 mov 0x14(%ebp),%edx
10d9ec: 89 02 mov %eax,(%edx)
}
10d9ee: 8d 65 f4 lea -0xc(%ebp),%esp
10d9f1: 5b pop %ebx
10d9f2: 5e pop %esi
10d9f3: 5f pop %edi
10d9f4: 5d pop %ebp
10d9f5: c3 ret
0010c6ec <_User_extensions_Handler_initialization>:
#include <rtems/score/userext.h>
#include <rtems/score/wkspace.h>
#include <string.h>
void _User_extensions_Handler_initialization(void)
{
10c6ec: 55 push %ebp
10c6ed: 89 e5 mov %esp,%ebp
10c6ef: 57 push %edi
10c6f0: 56 push %esi
10c6f1: 53 push %ebx
10c6f2: 83 ec 1c sub $0x1c,%esp
User_extensions_Control *extension;
uint32_t i;
uint32_t number_of_extensions;
User_extensions_Table *initial_extensions;
number_of_extensions = Configuration.number_of_initial_extensions;
10c6f5: a1 80 a1 12 00 mov 0x12a180,%eax
10c6fa: 89 45 e4 mov %eax,-0x1c(%ebp)
initial_extensions = Configuration.User_extension_table;
10c6fd: 8b 1d 84 a1 12 00 mov 0x12a184,%ebx
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
10c703: c7 05 90 e5 12 00 94 movl $0x12e594,0x12e590
10c70a: e5 12 00
head->previous = NULL;
10c70d: c7 05 94 e5 12 00 00 movl $0x0,0x12e594
10c714: 00 00 00
tail->previous = head;
10c717: c7 05 98 e5 12 00 90 movl $0x12e590,0x12e598
10c71e: e5 12 00
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
10c721: c7 05 e8 e3 12 00 ec movl $0x12e3ec,0x12e3e8
10c728: e3 12 00
head->previous = NULL;
10c72b: c7 05 ec e3 12 00 00 movl $0x0,0x12e3ec
10c732: 00 00 00
tail->previous = head;
10c735: c7 05 f0 e3 12 00 e8 movl $0x12e3e8,0x12e3f0
10c73c: e3 12 00
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
10c73f: 85 db test %ebx,%ebx
10c741: 74 4f je 10c792 <_User_extensions_Handler_initialization+0xa6><== NEVER TAKEN
extension = (User_extensions_Control *)
_Workspace_Allocate_or_fatal_error(
10c743: 6b f0 34 imul $0x34,%eax,%esi
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
extension = (User_extensions_Control *)
10c746: 83 ec 0c sub $0xc,%esp
10c749: 56 push %esi
10c74a: e8 26 04 00 00 call 10cb75 <_Workspace_Allocate_or_fatal_error>
10c74f: 89 c2 mov %eax,%edx
_Workspace_Allocate_or_fatal_error(
number_of_extensions * sizeof( User_extensions_Control )
);
memset (
10c751: 31 c0 xor %eax,%eax
10c753: 89 d7 mov %edx,%edi
10c755: 89 f1 mov %esi,%ecx
10c757: f3 aa rep stos %al,%es:(%edi)
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
10c759: 83 c4 10 add $0x10,%esp
10c75c: 31 c0 xor %eax,%eax
10c75e: eb 2d jmp 10c78d <_User_extensions_Handler_initialization+0xa1>
#include <rtems/config.h>
#include <rtems/score/userext.h>
#include <rtems/score/wkspace.h>
#include <string.h>
void _User_extensions_Handler_initialization(void)
10c760: 89 c6 mov %eax,%esi
10c762: c1 e6 05 shl $0x5,%esi
RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table(
User_extensions_Control *extension,
const User_extensions_Table *extension_table
)
{
extension->Callouts = *extension_table;
10c765: 8d 7a 14 lea 0x14(%edx),%edi
10c768: 01 de add %ebx,%esi
10c76a: b9 08 00 00 00 mov $0x8,%ecx
10c76f: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
_User_extensions_Add_set( extension );
10c771: 83 ec 0c sub $0xc,%esp
10c774: 52 push %edx
10c775: 89 45 dc mov %eax,-0x24(%ebp)
10c778: 89 55 e0 mov %edx,-0x20(%ebp)
10c77b: e8 e4 30 00 00 call 10f864 <_User_extensions_Add_set>
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
_User_extensions_Add_set_with_table (extension, &initial_extensions[i]);
extension++;
10c780: 8b 55 e0 mov -0x20(%ebp),%edx
10c783: 83 c2 34 add $0x34,%edx
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
10c786: 8b 45 dc mov -0x24(%ebp),%eax
10c789: 40 inc %eax
10c78a: 83 c4 10 add $0x10,%esp
10c78d: 3b 45 e4 cmp -0x1c(%ebp),%eax
10c790: 75 ce jne 10c760 <_User_extensions_Handler_initialization+0x74>
_User_extensions_Add_set_with_table (extension, &initial_extensions[i]);
extension++;
}
}
}
10c792: 8d 65 f4 lea -0xc(%ebp),%esp
10c795: 5b pop %ebx
10c796: 5e pop %esi
10c797: 5f pop %edi
10c798: 5d pop %ebp
10c799: c3 ret
0010dc4c <_Watchdog_Adjust>:
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
10dc4c: 55 push %ebp
10dc4d: 89 e5 mov %esp,%ebp
10dc4f: 57 push %edi
10dc50: 56 push %esi
10dc51: 53 push %ebx
10dc52: 83 ec 0c sub $0xc,%esp
10dc55: 8b 75 08 mov 0x8(%ebp),%esi
10dc58: 8b 4d 0c mov 0xc(%ebp),%ecx
10dc5b: 8b 5d 10 mov 0x10(%ebp),%ebx
ISR_Level level;
_ISR_Disable( level );
10dc5e: 9c pushf
10dc5f: fa cli
10dc60: 58 pop %eax
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
10dc61: 8b 16 mov (%esi),%edx
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
10dc63: 8d 7e 04 lea 0x4(%esi),%edi
* hence the compiler must not assume *header to remain
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
10dc66: 39 fa cmp %edi,%edx
10dc68: 74 3e je 10dca8 <_Watchdog_Adjust+0x5c>
switch ( direction ) {
10dc6a: 85 c9 test %ecx,%ecx
10dc6c: 74 36 je 10dca4 <_Watchdog_Adjust+0x58>
10dc6e: 49 dec %ecx
10dc6f: 75 37 jne 10dca8 <_Watchdog_Adjust+0x5c> <== NEVER TAKEN
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
10dc71: 01 5a 10 add %ebx,0x10(%edx)
break;
10dc74: eb 32 jmp 10dca8 <_Watchdog_Adjust+0x5c>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
10dc76: 8b 16 mov (%esi),%edx
case WATCHDOG_FORWARD:
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
10dc78: 8b 4a 10 mov 0x10(%edx),%ecx
10dc7b: 39 cb cmp %ecx,%ebx
10dc7d: 73 07 jae 10dc86 <_Watchdog_Adjust+0x3a>
_Watchdog_First( header )->delta_interval -= units;
10dc7f: 29 d9 sub %ebx,%ecx
10dc81: 89 4a 10 mov %ecx,0x10(%edx)
break;
10dc84: eb 22 jmp 10dca8 <_Watchdog_Adjust+0x5c>
} else {
units -= _Watchdog_First( header )->delta_interval;
10dc86: 29 cb sub %ecx,%ebx
_Watchdog_First( header )->delta_interval = 1;
10dc88: c7 42 10 01 00 00 00 movl $0x1,0x10(%edx)
_ISR_Enable( level );
10dc8f: 50 push %eax
10dc90: 9d popf
_Watchdog_Tickle( header );
10dc91: 83 ec 0c sub $0xc,%esp
10dc94: 56 push %esi
10dc95: e8 96 01 00 00 call 10de30 <_Watchdog_Tickle>
_ISR_Disable( level );
10dc9a: 9c pushf
10dc9b: fa cli
10dc9c: 58 pop %eax
if ( _Chain_Is_empty( header ) )
10dc9d: 83 c4 10 add $0x10,%esp
10dca0: 39 3e cmp %edi,(%esi)
10dca2: 74 04 je 10dca8 <_Watchdog_Adjust+0x5c>
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
10dca4: 85 db test %ebx,%ebx
10dca6: 75 ce jne 10dc76 <_Watchdog_Adjust+0x2a> <== ALWAYS TAKEN
}
break;
}
}
_ISR_Enable( level );
10dca8: 50 push %eax
10dca9: 9d popf
}
10dcaa: 8d 65 f4 lea -0xc(%ebp),%esp
10dcad: 5b pop %ebx
10dcae: 5e pop %esi
10dcaf: 5f pop %edi
10dcb0: 5d pop %ebp
10dcb1: c3 ret
0010ca18 <_Watchdog_Remove>:
*/
Watchdog_States _Watchdog_Remove(
Watchdog_Control *the_watchdog
)
{
10ca18: 55 push %ebp
10ca19: 89 e5 mov %esp,%ebp
10ca1b: 56 push %esi
10ca1c: 53 push %ebx
10ca1d: 8b 55 08 mov 0x8(%ebp),%edx
ISR_Level level;
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
10ca20: 9c pushf
10ca21: fa cli
10ca22: 5e pop %esi
previous_state = the_watchdog->state;
10ca23: 8b 42 08 mov 0x8(%edx),%eax
switch ( previous_state ) {
10ca26: 83 f8 01 cmp $0x1,%eax
10ca29: 74 09 je 10ca34 <_Watchdog_Remove+0x1c>
10ca2b: 72 42 jb 10ca6f <_Watchdog_Remove+0x57>
10ca2d: 83 f8 03 cmp $0x3,%eax
10ca30: 77 3d ja 10ca6f <_Watchdog_Remove+0x57> <== NEVER TAKEN
10ca32: eb 09 jmp 10ca3d <_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;
10ca34: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx)
break;
10ca3b: eb 32 jmp 10ca6f <_Watchdog_Remove+0x57>
case WATCHDOG_ACTIVE:
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
10ca3d: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx)
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
_ISR_Enable( level );
return( previous_state );
}
10ca44: 8b 0a mov (%edx),%ecx
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
next_watchdog = _Watchdog_Next( the_watchdog );
if ( _Watchdog_Next(next_watchdog) )
10ca46: 83 39 00 cmpl $0x0,(%ecx)
10ca49: 74 06 je 10ca51 <_Watchdog_Remove+0x39>
next_watchdog->delta_interval += the_watchdog->delta_interval;
10ca4b: 8b 5a 10 mov 0x10(%edx),%ebx
10ca4e: 01 59 10 add %ebx,0x10(%ecx)
if ( _Watchdog_Sync_count )
10ca51: 8b 1d d4 e4 12 00 mov 0x12e4d4,%ebx
10ca57: 85 db test %ebx,%ebx
10ca59: 74 0c je 10ca67 <_Watchdog_Remove+0x4f>
_Watchdog_Sync_level = _ISR_Nest_level;
10ca5b: 8b 1d e8 e8 12 00 mov 0x12e8e8,%ebx
10ca61: 89 1d 74 e4 12 00 mov %ebx,0x12e474
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
10ca67: 8b 5a 04 mov 0x4(%edx),%ebx
next->previous = previous;
10ca6a: 89 59 04 mov %ebx,0x4(%ecx)
previous->next = next;
10ca6d: 89 0b mov %ecx,(%ebx)
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
10ca6f: 8b 0d d8 e4 12 00 mov 0x12e4d8,%ecx
10ca75: 89 4a 18 mov %ecx,0x18(%edx)
_ISR_Enable( level );
10ca78: 56 push %esi
10ca79: 9d popf
return( previous_state );
}
10ca7a: 5b pop %ebx
10ca7b: 5e pop %esi
10ca7c: 5d pop %ebp
10ca7d: c3 ret
001124df <_fat_block_read>:
uint32_t start,
uint32_t offset,
uint32_t count,
void *buff
)
{
1124df: 55 push %ebp
1124e0: 89 e5 mov %esp,%ebp
1124e2: 57 push %edi
1124e3: 56 push %esi
1124e4: 53 push %ebx
1124e5: 83 ec 2c sub $0x2c,%esp
int rc = RC_OK;
ssize_t cmpltd = 0;
uint32_t blk = start;
uint32_t ofs = offset;
rtems_bdbuf_buffer *block = NULL;
1124e8: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
)
{
int rc = RC_OK;
ssize_t cmpltd = 0;
uint32_t blk = start;
uint32_t ofs = offset;
1124ef: 8b 75 10 mov 0x10(%ebp),%esi
void *buff
)
{
int rc = RC_OK;
ssize_t cmpltd = 0;
uint32_t blk = start;
1124f2: 8b 45 0c mov 0xc(%ebp),%eax
1124f5: 89 45 d4 mov %eax,-0x2c(%ebp)
uint32_t count,
void *buff
)
{
int rc = RC_OK;
ssize_t cmpltd = 0;
1124f8: 31 db xor %ebx,%ebx
uint32_t blk = start;
uint32_t ofs = offset;
rtems_bdbuf_buffer *block = NULL;
uint32_t c = 0;
while (count > 0)
1124fa: eb 43 jmp 11253f <_fat_block_read+0x60>
{
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
1124fc: 8d 45 e4 lea -0x1c(%ebp),%eax
1124ff: 50 push %eax
112500: 6a 01 push $0x1
112502: ff 75 d4 pushl -0x2c(%ebp)
112505: ff 75 08 pushl 0x8(%ebp)
112508: e8 f7 fc ff ff call 112204 <fat_buf_access>
if (rc != RC_OK)
11250d: 83 c4 10 add $0x10,%esp
112510: 85 c0 test %eax,%eax
112512: 75 33 jne 112547 <_fat_block_read+0x68> <== NEVER TAKEN
return -1;
c = MIN(count, (fs_info->vol.bps - ofs));
112514: 8b 45 08 mov 0x8(%ebp),%eax
112517: 0f b7 10 movzwl (%eax),%edx
11251a: 29 f2 sub %esi,%edx
11251c: 3b 55 14 cmp 0x14(%ebp),%edx
11251f: 76 03 jbe 112524 <_fat_block_read+0x45>
112521: 8b 55 14 mov 0x14(%ebp),%edx
memcpy((buff + cmpltd), (block->buffer + ofs), c);
112524: 8b 45 18 mov 0x18(%ebp),%eax
112527: 01 d8 add %ebx,%eax
112529: 8b 4d e4 mov -0x1c(%ebp),%ecx
11252c: 03 71 1c add 0x1c(%ecx),%esi
11252f: 89 c7 mov %eax,%edi
112531: 89 d1 mov %edx,%ecx
112533: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
count -= c;
112535: 29 55 14 sub %edx,0x14(%ebp)
cmpltd += c;
112538: 01 d3 add %edx,%ebx
blk++;
11253a: ff 45 d4 incl -0x2c(%ebp)
ofs = 0;
11253d: 31 f6 xor %esi,%esi
uint32_t blk = start;
uint32_t ofs = offset;
rtems_bdbuf_buffer *block = NULL;
uint32_t c = 0;
while (count > 0)
11253f: 83 7d 14 00 cmpl $0x0,0x14(%ebp)
112543: 75 b7 jne 1124fc <_fat_block_read+0x1d>
112545: eb 03 jmp 11254a <_fat_block_read+0x6b>
{
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
if (rc != RC_OK)
return -1;
112547: 83 cb ff or $0xffffffff,%ebx <== NOT EXECUTED
cmpltd += c;
blk++;
ofs = 0;
}
return cmpltd;
}
11254a: 89 d8 mov %ebx,%eax
11254c: 8d 65 f4 lea -0xc(%ebp),%esp
11254f: 5b pop %ebx
112550: 5e pop %esi
112551: 5f pop %edi
112552: 5d pop %ebp
112553: c3 ret
00112554 <_fat_block_write>:
fat_fs_info_t *fs_info,
uint32_t start,
uint32_t offset,
uint32_t count,
const void *buff)
{
112554: 55 push %ebp
112555: 89 e5 mov %esp,%ebp
112557: 57 push %edi
112558: 56 push %esi
112559: 53 push %ebx
11255a: 83 ec 2c sub $0x2c,%esp
int rc = RC_OK;
ssize_t cmpltd = 0;
uint32_t blk = start;
uint32_t ofs = offset;
rtems_bdbuf_buffer *block = NULL;
11255d: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
const void *buff)
{
int rc = RC_OK;
ssize_t cmpltd = 0;
uint32_t blk = start;
uint32_t ofs = offset;
112564: 8b 75 10 mov 0x10(%ebp),%esi
uint32_t count,
const void *buff)
{
int rc = RC_OK;
ssize_t cmpltd = 0;
uint32_t blk = start;
112567: 8b 55 0c mov 0xc(%ebp),%edx
uint32_t offset,
uint32_t count,
const void *buff)
{
int rc = RC_OK;
ssize_t cmpltd = 0;
11256a: 31 db xor %ebx,%ebx
uint32_t blk = start;
uint32_t ofs = offset;
rtems_bdbuf_buffer *block = NULL;
uint32_t c = 0;
while(count > 0)
11256c: eb 67 jmp 1125d5 <_fat_block_write+0x81>
{
c = MIN(count, (fs_info->vol.bps - ofs));
11256e: 8b 4d 08 mov 0x8(%ebp),%ecx
112571: 0f b7 01 movzwl (%ecx),%eax
112574: 89 c1 mov %eax,%ecx
112576: 29 f1 sub %esi,%ecx
112578: 89 4d d4 mov %ecx,-0x2c(%ebp)
11257b: 8b 4d 14 mov 0x14(%ebp),%ecx
11257e: 39 4d d4 cmp %ecx,-0x2c(%ebp)
112581: 76 03 jbe 112586 <_fat_block_write+0x32>
112583: 89 4d d4 mov %ecx,-0x2c(%ebp)
if (c == fs_info->vol.bps)
112586: 39 45 d4 cmp %eax,-0x2c(%ebp)
112589: 75 08 jne 112593 <_fat_block_write+0x3f>
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block);
11258b: 8d 45 e4 lea -0x1c(%ebp),%eax
11258e: 50 push %eax
11258f: 6a 02 push $0x2
112591: eb 06 jmp 112599 <_fat_block_write+0x45>
else
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
112593: 8d 4d e4 lea -0x1c(%ebp),%ecx
112596: 51 push %ecx
112597: 6a 01 push $0x1
112599: 52 push %edx
11259a: ff 75 08 pushl 0x8(%ebp)
11259d: 89 55 d0 mov %edx,-0x30(%ebp)
1125a0: e8 5f fc ff ff call 112204 <fat_buf_access>
1125a5: 83 c4 10 add $0x10,%esp
1125a8: 8b 55 d0 mov -0x30(%ebp),%edx
if (rc != RC_OK)
1125ab: 85 c0 test %eax,%eax
1125ad: 75 2e jne 1125dd <_fat_block_write+0x89> <== NEVER TAKEN
return -1;
memcpy((block->buffer + ofs), (buff + cmpltd), c);
1125af: 8b 45 e4 mov -0x1c(%ebp),%eax
1125b2: 8b 40 1c mov 0x1c(%eax),%eax
1125b5: 01 f0 add %esi,%eax
1125b7: 8b 75 18 mov 0x18(%ebp),%esi
1125ba: 01 de add %ebx,%esi
1125bc: 89 c7 mov %eax,%edi
1125be: 8b 4d d4 mov -0x2c(%ebp),%ecx
1125c1: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
}
static inline void
fat_buf_mark_modified(fat_fs_info_t *fs_info)
{
fs_info->c.modified = true;
1125c3: 8b 45 08 mov 0x8(%ebp),%eax
1125c6: c6 40 7c 01 movb $0x1,0x7c(%eax)
fat_buf_mark_modified(fs_info);
count -= c;
1125ca: 8b 4d d4 mov -0x2c(%ebp),%ecx
1125cd: 29 4d 14 sub %ecx,0x14(%ebp)
cmpltd +=c;
1125d0: 01 cb add %ecx,%ebx
blk++;
1125d2: 42 inc %edx
ofs = 0;
1125d3: 31 f6 xor %esi,%esi
uint32_t blk = start;
uint32_t ofs = offset;
rtems_bdbuf_buffer *block = NULL;
uint32_t c = 0;
while(count > 0)
1125d5: 83 7d 14 00 cmpl $0x0,0x14(%ebp)
1125d9: 75 93 jne 11256e <_fat_block_write+0x1a>
1125db: eb 03 jmp 1125e0 <_fat_block_write+0x8c>
if (c == fs_info->vol.bps)
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block);
else
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
if (rc != RC_OK)
return -1;
1125dd: 83 cb ff or $0xffffffff,%ebx <== NOT EXECUTED
cmpltd +=c;
blk++;
ofs = 0;
}
return cmpltd;
}
1125e0: 89 d8 mov %ebx,%eax
1125e2: 8d 65 f4 lea -0xc(%ebp),%esp
1125e5: 5b pop %ebx
1125e6: 5e pop %esi
1125e7: 5f pop %edi
1125e8: 5d pop %ebp
1125e9: c3 ret
001125ea <_fat_block_zero>:
_fat_block_zero(
fat_fs_info_t *fs_info,
uint32_t start,
uint32_t offset,
uint32_t count)
{
1125ea: 55 push %ebp
1125eb: 89 e5 mov %esp,%ebp
1125ed: 57 push %edi
1125ee: 56 push %esi
1125ef: 53 push %ebx
1125f0: 83 ec 1c sub $0x1c,%esp
int rc = RC_OK;
uint32_t blk = start;
uint32_t ofs = offset;
rtems_bdbuf_buffer *block = NULL;
1125f3: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
uint32_t offset,
uint32_t count)
{
int rc = RC_OK;
uint32_t blk = start;
uint32_t ofs = offset;
1125fa: 8b 7d 10 mov 0x10(%ebp),%edi
uint32_t start,
uint32_t offset,
uint32_t count)
{
int rc = RC_OK;
uint32_t blk = start;
1125fd: 8b 75 0c mov 0xc(%ebp),%esi
uint32_t ofs = offset;
rtems_bdbuf_buffer *block = NULL;
uint32_t c = 0;
while(count > 0)
112600: eb 51 jmp 112653 <_fat_block_zero+0x69>
{
c = MIN(count, (fs_info->vol.bps - ofs));
112602: 8b 55 08 mov 0x8(%ebp),%edx
112605: 0f b7 02 movzwl (%edx),%eax
112608: 89 c3 mov %eax,%ebx
11260a: 29 fb sub %edi,%ebx
11260c: 3b 5d 14 cmp 0x14(%ebp),%ebx
11260f: 76 03 jbe 112614 <_fat_block_zero+0x2a> <== ALWAYS TAKEN
112611: 8b 5d 14 mov 0x14(%ebp),%ebx <== NOT EXECUTED
if (c == fs_info->vol.bps)
112614: 39 c3 cmp %eax,%ebx
112616: 75 08 jne 112620 <_fat_block_zero+0x36>
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block);
112618: 8d 45 e4 lea -0x1c(%ebp),%eax
11261b: 50 push %eax
11261c: 6a 02 push $0x2
11261e: eb 06 jmp 112626 <_fat_block_zero+0x3c>
else
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
112620: 8d 55 e4 lea -0x1c(%ebp),%edx
112623: 52 push %edx
112624: 6a 01 push $0x1
112626: 56 push %esi
112627: ff 75 08 pushl 0x8(%ebp)
11262a: e8 d5 fb ff ff call 112204 <fat_buf_access>
11262f: 83 c4 10 add $0x10,%esp
if (rc != RC_OK)
112632: 85 c0 test %eax,%eax
112634: 75 27 jne 11265d <_fat_block_zero+0x73> <== NEVER TAKEN
return -1;
memset((block->buffer + ofs), 0, c);
112636: 8b 45 e4 mov -0x1c(%ebp),%eax
112639: 8b 50 1c mov 0x1c(%eax),%edx
11263c: 01 fa add %edi,%edx
11263e: 31 c0 xor %eax,%eax
112640: 89 d7 mov %edx,%edi
112642: 89 d9 mov %ebx,%ecx
112644: f3 aa rep stos %al,%es:(%edi)
112646: 8b 55 08 mov 0x8(%ebp),%edx
112649: c6 42 7c 01 movb $0x1,0x7c(%edx)
fat_buf_mark_modified(fs_info);
count -= c;
11264d: 29 5d 14 sub %ebx,0x14(%ebp)
blk++;
112650: 46 inc %esi
ofs = 0;
112651: 31 ff xor %edi,%edi
uint32_t blk = start;
uint32_t ofs = offset;
rtems_bdbuf_buffer *block = NULL;
uint32_t c = 0;
while(count > 0)
112653: 83 7d 14 00 cmpl $0x0,0x14(%ebp)
112657: 75 a9 jne 112602 <_fat_block_zero+0x18>
count -= c;
blk++;
ofs = 0;
}
return 0;
112659: 31 c0 xor %eax,%eax
11265b: eb 03 jmp 112660 <_fat_block_zero+0x76>
if (c == fs_info->vol.bps)
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block);
else
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
if (rc != RC_OK)
return -1;
11265d: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
count -= c;
blk++;
ofs = 0;
}
return 0;
}
112660: 8d 65 f4 lea -0xc(%ebp),%esp
112663: 5b pop %ebx
112664: 5e pop %esi
112665: 5f pop %edi
112666: 5d pop %ebp
112667: c3 ret
00104935 <_lstat_r>:
int _STAT_R_NAME(
struct _reent *ptr __attribute__((unused)),
const char *path,
struct stat *buf
)
{
104935: 55 push %ebp <== NOT EXECUTED
104936: 89 e5 mov %esp,%ebp <== NOT EXECUTED
104938: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
return _STAT_NAME( path, buf );
10493b: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED
10493e: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED
104941: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED
}
104944: 5d pop %ebp <== NOT EXECUTED
struct _reent *ptr __attribute__((unused)),
const char *path,
struct stat *buf
)
{
return _STAT_NAME( path, buf );
104945: e9 a6 ff ff ff jmp 1048f0 <lstat> <== NOT EXECUTED
0010757d <_stat_r>:
int _STAT_R_NAME(
struct _reent *ptr __attribute__((unused)),
const char *path,
struct stat *buf
)
{
10757d: 55 push %ebp <== NOT EXECUTED
10757e: 89 e5 mov %esp,%ebp <== NOT EXECUTED
107580: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
return _STAT_NAME( path, buf );
107583: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED
107586: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED
107589: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED
}
10758c: 5d pop %ebp <== NOT EXECUTED
struct _reent *ptr __attribute__((unused)),
const char *path,
struct stat *buf
)
{
return _STAT_NAME( path, buf );
10758d: e9 a6 ff ff ff jmp 107538 <stat> <== NOT EXECUTED
00109dc4 <aio_cancel>:
* operation(s) cannot be canceled
*/
int aio_cancel(int fildes, struct aiocb *aiocbp)
{
109dc4: 55 push %ebp
109dc5: 89 e5 mov %esp,%ebp
109dc7: 57 push %edi
109dc8: 56 push %esi
109dc9: 53 push %ebx
109dca: 83 ec 18 sub $0x18,%esp
109dcd: 8b 75 08 mov 0x8(%ebp),%esi
109dd0: 8b 5d 0c mov 0xc(%ebp),%ebx
rtems_aio_request_chain *r_chain;
int result;
pthread_mutex_lock (&aio_request_queue.mutex);
109dd3: 68 08 03 13 00 push $0x130308
109dd8: e8 2b 10 00 00 call 10ae08 <pthread_mutex_lock>
if (fcntl (fildes, F_GETFD) < 0) {
109ddd: 58 pop %eax
109dde: 5a pop %edx
109ddf: 6a 01 push $0x1
109de1: 56 push %esi
109de2: e8 a9 5b 00 00 call 10f990 <fcntl>
109de7: 83 c4 10 add $0x10,%esp
109dea: 85 c0 test %eax,%eax
109dec: 79 1d jns 109e0b <aio_cancel+0x47>
pthread_mutex_unlock(&aio_request_queue.mutex);
109dee: 83 ec 0c sub $0xc,%esp
109df1: 68 08 03 13 00 push $0x130308
109df6: e8 8d 10 00 00 call 10ae88 <pthread_mutex_unlock>
rtems_set_errno_and_return_minus_one (EBADF);
109dfb: e8 1c 8f 00 00 call 112d1c <__errno>
109e00: c7 00 09 00 00 00 movl $0x9,(%eax)
109e06: e9 20 01 00 00 jmp 109f2b <aio_cancel+0x167>
}
/* if aiocbp is NULL remove all request for given file descriptor */
if (aiocbp == NULL) {
109e0b: 85 db test %ebx,%ebx
109e0d: 0f 85 bc 00 00 00 jne 109ecf <aio_cancel+0x10b>
AIO_printf ("Cancel all requests\n");
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0);
109e13: 50 push %eax
109e14: 6a 00 push $0x0
109e16: 56 push %esi
109e17: 68 50 03 13 00 push $0x130350
109e1c: e8 9e 05 00 00 call 10a3bf <rtems_aio_search_fd>
109e21: 89 c3 mov %eax,%ebx
if (r_chain == NULL) {
109e23: 83 c4 10 add $0x10,%esp
109e26: 85 c0 test %eax,%eax
109e28: 75 6b jne 109e95 <aio_cancel+0xd1>
AIO_printf ("Request chain not on [WQ]\n");
if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) {
109e2a: 81 3d 5c 03 13 00 60 cmpl $0x130360,0x13035c
109e31: 03 13 00
109e34: 74 17 je 109e4d <aio_cancel+0x89> <== NEVER TAKEN
r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0);
109e36: 50 push %eax
109e37: 6a 00 push $0x0
109e39: 56 push %esi
109e3a: 68 5c 03 13 00 push $0x13035c
109e3f: e8 7b 05 00 00 call 10a3bf <rtems_aio_search_fd>
109e44: 89 c3 mov %eax,%ebx
if (r_chain == NULL) {
109e46: 83 c4 10 add $0x10,%esp
109e49: 85 c0 test %eax,%eax
109e4b: 75 1a jne 109e67 <aio_cancel+0xa3>
pthread_mutex_unlock(&aio_request_queue.mutex);
109e4d: 83 ec 0c sub $0xc,%esp
109e50: 68 08 03 13 00 push $0x130308
109e55: e8 2e 10 00 00 call 10ae88 <pthread_mutex_unlock>
return AIO_ALLDONE;
109e5a: 83 c4 10 add $0x10,%esp
109e5d: bb 02 00 00 00 mov $0x2,%ebx
109e62: e9 0d 01 00 00 jmp 109f74 <aio_cancel+0x1b0>
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
109e67: 83 ec 0c sub $0xc,%esp
109e6a: 50 push %eax
109e6b: e8 94 26 00 00 call 10c504 <_Chain_Extract>
}
AIO_printf ("Request chain on [IQ]\n");
rtems_chain_extract (&r_chain->next_fd);
rtems_aio_remove_fd (r_chain);
109e70: 89 1c 24 mov %ebx,(%esp)
109e73: e8 d5 05 00 00 call 10a44d <rtems_aio_remove_fd>
pthread_mutex_destroy (&r_chain->mutex);
109e78: 8d 73 1c lea 0x1c(%ebx),%esi
109e7b: 89 34 24 mov %esi,(%esp)
109e7e: e8 59 0d 00 00 call 10abdc <pthread_mutex_destroy>
pthread_cond_destroy (&r_chain->mutex);
109e83: 89 34 24 mov %esi,(%esp)
109e86: e8 4d 0a 00 00 call 10a8d8 <pthread_cond_destroy>
free (r_chain);
109e8b: 89 1c 24 mov %ebx,(%esp)
109e8e: e8 c5 cc ff ff call 106b58 <free>
109e93: eb 24 jmp 109eb9 <aio_cancel+0xf5>
return AIO_ALLDONE;
}
AIO_printf ("Request chain on [WQ]\n");
pthread_mutex_lock (&r_chain->mutex);
109e95: 8d 70 1c lea 0x1c(%eax),%esi
109e98: 83 ec 0c sub $0xc,%esp
109e9b: 56 push %esi
109e9c: e8 67 0f 00 00 call 10ae08 <pthread_mutex_lock>
109ea1: 89 1c 24 mov %ebx,(%esp)
109ea4: e8 5b 26 00 00 call 10c504 <_Chain_Extract>
rtems_chain_extract (&r_chain->next_fd);
rtems_aio_remove_fd (r_chain);
109ea9: 89 1c 24 mov %ebx,(%esp)
109eac: e8 9c 05 00 00 call 10a44d <rtems_aio_remove_fd>
pthread_mutex_unlock (&r_chain->mutex);
109eb1: 89 34 24 mov %esi,(%esp)
109eb4: e8 cf 0f 00 00 call 10ae88 <pthread_mutex_unlock>
pthread_mutex_unlock (&aio_request_queue.mutex);
109eb9: c7 04 24 08 03 13 00 movl $0x130308,(%esp)
109ec0: e8 c3 0f 00 00 call 10ae88 <pthread_mutex_unlock>
return AIO_CANCELED;
109ec5: 83 c4 10 add $0x10,%esp
109ec8: 31 db xor %ebx,%ebx
109eca: e9 a5 00 00 00 jmp 109f74 <aio_cancel+0x1b0>
} else {
AIO_printf ("Cancel request\n");
if (aiocbp->aio_fildes != fildes) {
109ecf: 8b 3b mov (%ebx),%edi
109ed1: 39 f7 cmp %esi,%edi
109ed3: 74 02 je 109ed7 <aio_cancel+0x113>
109ed5: eb 3c jmp 109f13 <aio_cancel+0x14f>
pthread_mutex_unlock (&aio_request_queue.mutex);
rtems_set_errno_and_return_minus_one (EINVAL);
}
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0);
109ed7: 50 push %eax
109ed8: 6a 00 push $0x0
109eda: 57 push %edi
109edb: 68 50 03 13 00 push $0x130350
109ee0: e8 da 04 00 00 call 10a3bf <rtems_aio_search_fd>
109ee5: 89 c6 mov %eax,%esi
if (r_chain == NULL) {
109ee7: 83 c4 10 add $0x10,%esp
109eea: 85 c0 test %eax,%eax
109eec: 75 55 jne 109f43 <aio_cancel+0x17f>
if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) {
109eee: 81 3d 5c 03 13 00 60 cmpl $0x130360,0x13035c
109ef5: 03 13 00
109ef8: 0f 84 4f ff ff ff je 109e4d <aio_cancel+0x89> <== NEVER TAKEN
r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0);
109efe: 56 push %esi
109eff: 6a 00 push $0x0
109f01: 57 push %edi
109f02: 68 5c 03 13 00 push $0x13035c
109f07: e8 b3 04 00 00 call 10a3bf <rtems_aio_search_fd>
if (r_chain == NULL) {
109f0c: 83 c4 10 add $0x10,%esp
109f0f: 85 c0 test %eax,%eax
109f11: 75 20 jne 109f33 <aio_cancel+0x16f>
pthread_mutex_unlock (&aio_request_queue.mutex);
109f13: 83 ec 0c sub $0xc,%esp
109f16: 68 08 03 13 00 push $0x130308
109f1b: e8 68 0f 00 00 call 10ae88 <pthread_mutex_unlock>
rtems_set_errno_and_return_minus_one (EINVAL);
109f20: e8 f7 8d 00 00 call 112d1c <__errno>
109f25: c7 00 16 00 00 00 movl $0x16,(%eax)
109f2b: 83 c4 10 add $0x10,%esp
109f2e: 83 cb ff or $0xffffffff,%ebx
109f31: eb 41 jmp 109f74 <aio_cancel+0x1b0>
}
AIO_printf ("Request on [IQ]\n");
result = rtems_aio_remove_req (&r_chain->perfd, aiocbp);
109f33: 51 push %ecx
109f34: 51 push %ecx
109f35: 53 push %ebx
109f36: 83 c0 08 add $0x8,%eax
109f39: 50 push %eax
109f3a: e8 57 05 00 00 call 10a496 <rtems_aio_remove_req>
109f3f: 89 c3 mov %eax,%ebx
109f41: eb 22 jmp 109f65 <aio_cancel+0x1a1>
return AIO_ALLDONE;
}
}
AIO_printf ("Request on [WQ]\n");
pthread_mutex_lock (&r_chain->mutex);
109f43: 8d 78 1c lea 0x1c(%eax),%edi
109f46: 83 ec 0c sub $0xc,%esp
109f49: 57 push %edi
109f4a: e8 b9 0e 00 00 call 10ae08 <pthread_mutex_lock>
result = rtems_aio_remove_req (&r_chain->perfd, aiocbp);
109f4f: 58 pop %eax
109f50: 5a pop %edx
109f51: 53 push %ebx
109f52: 83 c6 08 add $0x8,%esi
109f55: 56 push %esi
109f56: e8 3b 05 00 00 call 10a496 <rtems_aio_remove_req>
109f5b: 89 c3 mov %eax,%ebx
pthread_mutex_unlock (&r_chain->mutex);
109f5d: 89 3c 24 mov %edi,(%esp)
109f60: e8 23 0f 00 00 call 10ae88 <pthread_mutex_unlock>
pthread_mutex_unlock (&aio_request_queue.mutex);
109f65: c7 04 24 08 03 13 00 movl $0x130308,(%esp)
109f6c: e8 17 0f 00 00 call 10ae88 <pthread_mutex_unlock>
return result;
109f71: 83 c4 10 add $0x10,%esp
}
return AIO_ALLDONE;
}
109f74: 89 d8 mov %ebx,%eax
109f76: 8d 65 f4 lea -0xc(%ebp),%esp
109f79: 5b pop %ebx
109f7a: 5e pop %esi
109f7b: 5f pop %edi
109f7c: 5d pop %ebp
109f7d: c3 ret
00109f8c <aio_fsync>:
int aio_fsync(
int op,
struct aiocb *aiocbp
)
{
109f8c: 55 push %ebp
109f8d: 89 e5 mov %esp,%ebp
109f8f: 53 push %ebx
109f90: 52 push %edx
109f91: 8b 5d 0c mov 0xc(%ebp),%ebx
rtems_aio_request *req;
int mode;
if (op != O_SYNC)
109f94: 81 7d 08 00 20 00 00 cmpl $0x2000,0x8(%ebp)
109f9b: 74 1b je 109fb8 <aio_fsync+0x2c>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
109f9d: c7 43 30 16 00 00 00 movl $0x16,0x30(%ebx)
109fa4: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx)
109fab: e8 6c 8d 00 00 call 112d1c <__errno>
109fb0: c7 00 16 00 00 00 movl $0x16,(%eax)
109fb6: eb 74 jmp 10a02c <aio_fsync+0xa0>
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
109fb8: 50 push %eax
109fb9: 50 push %eax
109fba: 6a 03 push $0x3
109fbc: ff 33 pushl (%ebx)
109fbe: e8 cd 59 00 00 call 10f990 <fcntl>
if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR)))
109fc3: 83 e0 03 and $0x3,%eax
109fc6: 48 dec %eax
109fc7: 83 c4 10 add $0x10,%esp
109fca: 83 f8 01 cmp $0x1,%eax
109fcd: 76 1b jbe 109fea <aio_fsync+0x5e>
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
109fcf: c7 43 30 09 00 00 00 movl $0x9,0x30(%ebx)
109fd6: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx)
109fdd: e8 3a 8d 00 00 call 112d1c <__errno>
109fe2: c7 00 09 00 00 00 movl $0x9,(%eax)
109fe8: eb 42 jmp 10a02c <aio_fsync+0xa0>
req = malloc (sizeof (rtems_aio_request));
109fea: 83 ec 0c sub $0xc,%esp
109fed: 6a 18 push $0x18
109fef: e8 3c cf ff ff call 106f30 <malloc>
if (req == NULL)
109ff4: 83 c4 10 add $0x10,%esp
109ff7: 85 c0 test %eax,%eax
109ff9: 75 1b jne 10a016 <aio_fsync+0x8a> <== ALWAYS TAKEN
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
109ffb: c7 43 30 0b 00 00 00 movl $0xb,0x30(%ebx) <== NOT EXECUTED
10a002: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx) <== NOT EXECUTED
10a009: e8 0e 8d 00 00 call 112d1c <__errno> <== NOT EXECUTED
10a00e: c7 00 0b 00 00 00 movl $0xb,(%eax) <== NOT EXECUTED
10a014: eb 16 jmp 10a02c <aio_fsync+0xa0> <== NOT EXECUTED
req->aiocbp = aiocbp;
10a016: 89 58 14 mov %ebx,0x14(%eax)
req->aiocbp->aio_lio_opcode = LIO_SYNC;
10a019: c7 43 2c 03 00 00 00 movl $0x3,0x2c(%ebx)
return rtems_aio_enqueue (req);
10a020: 89 45 08 mov %eax,0x8(%ebp)
}
10a023: 8b 5d fc mov -0x4(%ebp),%ebx
10a026: c9 leave
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_SYNC;
return rtems_aio_enqueue (req);
10a027: e9 ce 04 00 00 jmp 10a4fa <rtems_aio_enqueue>
}
10a02c: 83 c8 ff or $0xffffffff,%eax
10a02f: 8b 5d fc mov -0x4(%ebp),%ebx
10a032: c9 leave
10a033: c3 ret
0010a6dc <aio_read>:
* 0 - otherwise
*/
int
aio_read (struct aiocb *aiocbp)
{
10a6dc: 55 push %ebp
10a6dd: 89 e5 mov %esp,%ebp
10a6df: 53 push %ebx
10a6e0: 83 ec 0c sub $0xc,%esp
10a6e3: 8b 5d 08 mov 0x8(%ebp),%ebx
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
10a6e6: 6a 03 push $0x3
10a6e8: ff 33 pushl (%ebx)
10a6ea: e8 a1 52 00 00 call 10f990 <fcntl>
if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR)))
10a6ef: 83 c4 10 add $0x10,%esp
10a6f2: a8 01 test $0x1,%al
10a6f4: 74 1b je 10a711 <aio_read+0x35>
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
10a6f6: c7 43 30 09 00 00 00 movl $0x9,0x30(%ebx)
10a6fd: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx)
10a704: e8 13 86 00 00 call 112d1c <__errno>
10a709: c7 00 09 00 00 00 movl $0x9,(%eax)
10a70f: eb 6b jmp 10a77c <aio_read+0xa0>
if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX)
10a711: 83 7b 14 00 cmpl $0x0,0x14(%ebx)
10a715: 74 02 je 10a719 <aio_read+0x3d>
10a717: eb 06 jmp 10a71f <aio_read+0x43>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
if (aiocbp->aio_offset < 0)
10a719: 83 7b 08 00 cmpl $0x0,0x8(%ebx)
10a71d: 79 1b jns 10a73a <aio_read+0x5e>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
10a71f: c7 43 30 16 00 00 00 movl $0x16,0x30(%ebx)
10a726: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx)
10a72d: e8 ea 85 00 00 call 112d1c <__errno>
10a732: c7 00 16 00 00 00 movl $0x16,(%eax)
10a738: eb 42 jmp 10a77c <aio_read+0xa0>
req = malloc (sizeof (rtems_aio_request));
10a73a: 83 ec 0c sub $0xc,%esp
10a73d: 6a 18 push $0x18
10a73f: e8 ec c7 ff ff call 106f30 <malloc>
if (req == NULL)
10a744: 83 c4 10 add $0x10,%esp
10a747: 85 c0 test %eax,%eax
10a749: 75 1b jne 10a766 <aio_read+0x8a> <== ALWAYS TAKEN
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
10a74b: c7 43 30 0b 00 00 00 movl $0xb,0x30(%ebx) <== NOT EXECUTED
10a752: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx) <== NOT EXECUTED
10a759: e8 be 85 00 00 call 112d1c <__errno> <== NOT EXECUTED
10a75e: c7 00 0b 00 00 00 movl $0xb,(%eax) <== NOT EXECUTED
10a764: eb 16 jmp 10a77c <aio_read+0xa0> <== NOT EXECUTED
req->aiocbp = aiocbp;
10a766: 89 58 14 mov %ebx,0x14(%eax)
req->aiocbp->aio_lio_opcode = LIO_READ;
10a769: c7 43 2c 01 00 00 00 movl $0x1,0x2c(%ebx)
return rtems_aio_enqueue (req);
10a770: 89 45 08 mov %eax,0x8(%ebp)
}
10a773: 8b 5d fc mov -0x4(%ebp),%ebx
10a776: c9 leave
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_READ;
return rtems_aio_enqueue (req);
10a777: e9 7e fd ff ff jmp 10a4fa <rtems_aio_enqueue>
}
10a77c: 83 c8 ff or $0xffffffff,%eax
10a77f: 8b 5d fc mov -0x4(%ebp),%ebx
10a782: c9 leave
10a783: c3 ret
0010a790 <aio_write>:
* 0 - otherwise
*/
int
aio_write (struct aiocb *aiocbp)
{
10a790: 55 push %ebp
10a791: 89 e5 mov %esp,%ebp
10a793: 53 push %ebx
10a794: 83 ec 0c sub $0xc,%esp
10a797: 8b 5d 08 mov 0x8(%ebp),%ebx
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
10a79a: 6a 03 push $0x3
10a79c: ff 33 pushl (%ebx)
10a79e: e8 ed 51 00 00 call 10f990 <fcntl>
if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR)))
10a7a3: 83 e0 03 and $0x3,%eax
10a7a6: 48 dec %eax
10a7a7: 83 c4 10 add $0x10,%esp
10a7aa: 83 f8 01 cmp $0x1,%eax
10a7ad: 76 1b jbe 10a7ca <aio_write+0x3a>
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
10a7af: c7 43 30 09 00 00 00 movl $0x9,0x30(%ebx)
10a7b6: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx)
10a7bd: e8 5a 85 00 00 call 112d1c <__errno>
10a7c2: c7 00 09 00 00 00 movl $0x9,(%eax)
10a7c8: eb 6b jmp 10a835 <aio_write+0xa5>
if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX)
10a7ca: 83 7b 14 00 cmpl $0x0,0x14(%ebx)
10a7ce: 74 02 je 10a7d2 <aio_write+0x42>
10a7d0: eb 06 jmp 10a7d8 <aio_write+0x48>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
if (aiocbp->aio_offset < 0)
10a7d2: 83 7b 08 00 cmpl $0x0,0x8(%ebx)
10a7d6: 79 1b jns 10a7f3 <aio_write+0x63>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
10a7d8: c7 43 30 16 00 00 00 movl $0x16,0x30(%ebx)
10a7df: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx)
10a7e6: e8 31 85 00 00 call 112d1c <__errno>
10a7eb: c7 00 16 00 00 00 movl $0x16,(%eax)
10a7f1: eb 42 jmp 10a835 <aio_write+0xa5>
req = malloc (sizeof (rtems_aio_request));
10a7f3: 83 ec 0c sub $0xc,%esp
10a7f6: 6a 18 push $0x18
10a7f8: e8 33 c7 ff ff call 106f30 <malloc>
if (req == NULL)
10a7fd: 83 c4 10 add $0x10,%esp
10a800: 85 c0 test %eax,%eax
10a802: 75 1b jne 10a81f <aio_write+0x8f> <== ALWAYS TAKEN
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
10a804: c7 43 30 0b 00 00 00 movl $0xb,0x30(%ebx) <== NOT EXECUTED
10a80b: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx) <== NOT EXECUTED
10a812: e8 05 85 00 00 call 112d1c <__errno> <== NOT EXECUTED
10a817: c7 00 0b 00 00 00 movl $0xb,(%eax) <== NOT EXECUTED
10a81d: eb 16 jmp 10a835 <aio_write+0xa5> <== NOT EXECUTED
req->aiocbp = aiocbp;
10a81f: 89 58 14 mov %ebx,0x14(%eax)
req->aiocbp->aio_lio_opcode = LIO_WRITE;
10a822: c7 43 2c 02 00 00 00 movl $0x2,0x2c(%ebx)
return rtems_aio_enqueue (req);
10a829: 89 45 08 mov %eax,0x8(%ebp)
}
10a82c: 8b 5d fc mov -0x4(%ebp),%ebx
10a82f: c9 leave
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_WRITE;
return rtems_aio_enqueue (req);
10a830: e9 c5 fc ff ff jmp 10a4fa <rtems_aio_enqueue>
}
10a835: 83 c8 ff or $0xffffffff,%eax
10a838: 8b 5d fc mov -0x4(%ebp),%ebx
10a83b: c9 leave
10a83c: c3 ret
00104608 <chroot>:
#include <unistd.h>
#include <rtems/libio_.h>
int chroot( const char *path )
{
104608: 55 push %ebp
104609: 89 e5 mov %esp,%ebp
10460b: 53 push %ebx
10460c: 83 ec 70 sub $0x70,%esp
/*
* We use the global environment for path evaluation. This makes it possible
* to escape from a chroot environment referencing an unmounted file system.
*/
rtems_filesystem_eval_path_start_with_root_and_current(
10460f: 68 60 7b 12 00 push $0x127b60
104614: 68 64 7b 12 00 push $0x127b64
104619: 6a 19 push $0x19
10461b: ff 75 08 pushl 0x8(%ebp)
10461e: 8d 45 c0 lea -0x40(%ebp),%eax
104621: 50 push %eax
104622: e8 45 11 00 00 call 10576c <rtems_filesystem_eval_path_start_with_root_and_current>
104627: 83 c4 18 add $0x18,%esp
10462a: 8d 45 d8 lea -0x28(%ebp),%eax
10462d: 50 push %eax
eval_flags,
&rtems_global_user_env.root_directory,
&rtems_global_user_env.current_directory
);
rtems_filesystem_eval_path_extract_currentloc( &ctx, &loc );
10462e: 8d 5d a8 lea -0x58(%ebp),%ebx
104631: 53 push %ebx
104632: e8 00 15 00 00 call 105b37 <rtems_filesystem_location_copy_and_detach>
new_current_loc = rtems_filesystem_location_transform_to_global( &loc );
104637: 89 1c 24 mov %ebx,(%esp)
10463a: e8 6b 16 00 00 call 105caa <rtems_filesystem_location_transform_to_global>
10463f: 89 45 a4 mov %eax,-0x5c(%ebp)
if ( !rtems_filesystem_global_location_is_null( new_current_loc ) ) {
104642: 83 c4 10 add $0x10,%esp
104645: 81 78 10 24 d6 11 00 cmpl $0x11d624,0x10(%eax)
10464c: 74 7a je 1046c8 <chroot+0xc0>
rtems_filesystem_global_location_t *new_root_loc =
10464e: 83 ec 0c sub $0xc,%esp
rtems_filesystem_global_location_obtain( &new_current_loc );
104651: 8d 45 a4 lea -0x5c(%ebp),%eax
);
rtems_filesystem_eval_path_extract_currentloc( &ctx, &loc );
new_current_loc = rtems_filesystem_location_transform_to_global( &loc );
if ( !rtems_filesystem_global_location_is_null( new_current_loc ) ) {
rtems_filesystem_global_location_t *new_root_loc =
104654: 50 push %eax
104655: e8 c9 15 00 00 call 105c23 <rtems_filesystem_global_location_obtain>
10465a: 89 c3 mov %eax,%ebx
rtems_filesystem_global_location_obtain( &new_current_loc );
rtems_filesystem_node_types_t type =
(*new_root_loc->location.mt_entry->ops->node_type_h)(
10465c: 8b 40 14 mov 0x14(%eax),%eax
10465f: 8b 40 0c mov 0xc(%eax),%eax
rtems_filesystem_eval_path_extract_currentloc( &ctx, &loc );
new_current_loc = rtems_filesystem_location_transform_to_global( &loc );
if ( !rtems_filesystem_global_location_is_null( new_current_loc ) ) {
rtems_filesystem_global_location_t *new_root_loc =
rtems_filesystem_global_location_obtain( &new_current_loc );
rtems_filesystem_node_types_t type =
104662: 89 1c 24 mov %ebx,(%esp)
104665: ff 50 14 call *0x14(%eax)
(*new_root_loc->location.mt_entry->ops->node_type_h)(
&new_root_loc->location
);
if ( type == RTEMS_FILESYSTEM_DIRECTORY ) {
104668: 83 c4 10 add $0x10,%esp
10466b: 85 c0 test %eax,%eax
10466d: 75 43 jne 1046b2 <chroot+0xaa>
sc = rtems_libio_set_private_env();
10466f: e8 93 0b 00 00 call 105207 <rtems_libio_set_private_env>
if (sc == RTEMS_SUCCESSFUL) {
104674: 85 c0 test %eax,%eax
104676: 75 28 jne 1046a0 <chroot+0x98>
rtems_filesystem_global_location_assign(
104678: 50 push %eax
104679: 50 push %eax
10467a: 53 push %ebx
10467b: a1 5c 7b 12 00 mov 0x127b5c,%eax
104680: 83 c0 04 add $0x4,%eax
104683: 50 push %eax
104684: e8 7d 15 00 00 call 105c06 <rtems_filesystem_global_location_assign>
&rtems_filesystem_root,
new_root_loc
);
rtems_filesystem_global_location_assign(
104689: 5a pop %edx
10468a: 59 pop %ecx
10468b: ff 75 a4 pushl -0x5c(%ebp)
10468e: ff 35 5c 7b 12 00 pushl 0x127b5c
104694: e8 6d 15 00 00 call 105c06 <rtems_filesystem_global_location_assign>
104699: 83 c4 10 add $0x10,%esp
10469c: 31 db xor %ebx,%ebx
10469e: eb 2b jmp 1046cb <chroot+0xc3>
&rtems_filesystem_current,
new_current_loc
);
} else {
if (sc != RTEMS_UNSATISFIED) {
1046a0: 83 f8 0d cmp $0xd,%eax
1046a3: 74 49 je 1046ee <chroot+0xe6> <== NEVER TAKEN
errno = ENOMEM;
1046a5: e8 6a 6c 00 00 call 10b314 <__errno>
1046aa: c7 00 0c 00 00 00 movl $0xc,(%eax)
1046b0: eb 3c jmp 1046ee <chroot+0xe6>
static inline void rtems_filesystem_location_error(
const rtems_filesystem_location_info_t *loc,
int eno
)
{
if ( !rtems_filesystem_location_is_null( loc ) ) {
1046b2: 81 7b 10 24 d6 11 00 cmpl $0x11d624,0x10(%ebx)
1046b9: 74 33 je 1046ee <chroot+0xe6> <== NEVER TAKEN
errno = eno;
1046bb: e8 54 6c 00 00 call 10b314 <__errno>
1046c0: c7 00 14 00 00 00 movl $0x14,(%eax)
1046c6: eb 26 jmp 1046ee <chroot+0xe6>
if ( rv != 0 ) {
rtems_filesystem_global_location_release( new_root_loc );
}
} else {
rv = -1;
1046c8: 83 cb ff or $0xffffffff,%ebx
}
rtems_filesystem_eval_path_cleanup( &ctx );
1046cb: 83 ec 0c sub $0xc,%esp
1046ce: 8d 45 c0 lea -0x40(%ebp),%eax
1046d1: 50 push %eax
1046d2: e8 86 11 00 00 call 10585d <rtems_filesystem_eval_path_cleanup>
if ( rv != 0 ) {
1046d7: 83 c4 10 add $0x10,%esp
1046da: 85 db test %ebx,%ebx
1046dc: 74 1e je 1046fc <chroot+0xf4>
rtems_filesystem_global_location_release( new_current_loc );
1046de: 83 ec 0c sub $0xc,%esp
1046e1: ff 75 a4 pushl -0x5c(%ebp)
1046e4: e8 d8 14 00 00 call 105bc1 <rtems_filesystem_global_location_release>
1046e9: 83 c4 10 add $0x10,%esp
1046ec: eb 0e jmp 1046fc <chroot+0xf4>
rtems_filesystem_location_error( &new_root_loc->location, ENOTDIR );
rv = -1;
}
if ( rv != 0 ) {
rtems_filesystem_global_location_release( new_root_loc );
1046ee: 83 ec 0c sub $0xc,%esp
1046f1: 53 push %ebx
1046f2: e8 ca 14 00 00 call 105bc1 <rtems_filesystem_global_location_release>
1046f7: 83 c4 10 add $0x10,%esp
1046fa: eb cc jmp 1046c8 <chroot+0xc0>
if ( rv != 0 ) {
rtems_filesystem_global_location_release( new_current_loc );
}
return rv;
}
1046fc: 89 d8 mov %ebx,%eax
1046fe: 8b 5d fc mov -0x4(%ebp),%ebx
104701: c9 leave
104702: c3 ret
00109a54 <clock_gettime>:
int clock_gettime(
clockid_t clock_id,
struct timespec *tp
)
{
109a54: 55 push %ebp
109a55: 89 e5 mov %esp,%ebp
109a57: 57 push %edi
109a58: 56 push %esi
109a59: 53 push %ebx
109a5a: 83 ec 1c sub $0x1c,%esp
109a5d: 8b 45 08 mov 0x8(%ebp),%eax
109a60: 8b 5d 0c mov 0xc(%ebp),%ebx
if ( !tp )
109a63: 85 db test %ebx,%ebx
109a65: 75 02 jne 109a69 <clock_gettime+0x15>
109a67: eb 6c jmp 109ad5 <clock_gettime+0x81>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
109a69: 83 f8 01 cmp $0x1,%eax
109a6c: 75 3b jne 109aa9 <clock_gettime+0x55>
struct timespec *tod_as_timespec
)
{
Timestamp_Control tod_as_timestamp;
_TOD_Get_as_timestamp( &tod_as_timestamp );
109a6e: 83 ec 0c sub $0xc,%esp
109a71: 8d 45 e0 lea -0x20(%ebp),%eax
109a74: 50 push %eax
109a75: e8 ba 1a 00 00 call 10b534 <_TOD_Get_as_timestamp>
_Timestamp_To_timespec( &tod_as_timestamp, tod_as_timespec );
109a7a: 8b 75 e0 mov -0x20(%ebp),%esi
109a7d: 8b 7d e4 mov -0x1c(%ebp),%edi
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
109a80: 6a 00 push $0x0
109a82: 68 00 ca 9a 3b push $0x3b9aca00
109a87: 57 push %edi
109a88: 56 push %esi
109a89: e8 86 52 01 00 call 11ed14 <__divdi3>
109a8e: 83 c4 10 add $0x10,%esp
109a91: 89 03 mov %eax,(%ebx)
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
109a93: 6a 00 push $0x0
109a95: 68 00 ca 9a 3b push $0x3b9aca00
109a9a: 57 push %edi
109a9b: 56 push %esi
109a9c: e8 c7 53 01 00 call 11ee68 <__moddi3>
109aa1: 83 c4 10 add $0x10,%esp
109aa4: 89 43 04 mov %eax,0x4(%ebx)
109aa7: eb 0e jmp 109ab7 <clock_gettime+0x63>
_TOD_Get(tp);
return 0;
}
#ifdef CLOCK_MONOTONIC
if ( clock_id == CLOCK_MONOTONIC ) {
109aa9: 83 f8 04 cmp $0x4,%eax
109aac: 75 10 jne 109abe <clock_gettime+0x6a> <== ALWAYS TAKEN
_TOD_Get_uptime_as_timespec( tp );
109aae: 83 ec 0c sub $0xc,%esp
109ab1: 53 push %ebx
109ab2: e8 b5 1a 00 00 call 10b56c <_TOD_Get_uptime_as_timespec>
return 0;
109ab7: 83 c4 10 add $0x10,%esp
109aba: 31 c0 xor %eax,%eax
109abc: eb 25 jmp 109ae3 <clock_gettime+0x8f>
}
#endif
#ifdef _POSIX_CPUTIME
if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) {
109abe: 83 f8 02 cmp $0x2,%eax
109ac1: 74 eb je 109aae <clock_gettime+0x5a>
return 0;
}
#endif
#ifdef _POSIX_THREAD_CPUTIME
if ( clock_id == CLOCK_THREAD_CPUTIME_ID )
109ac3: 83 f8 03 cmp $0x3,%eax
109ac6: 75 0d jne 109ad5 <clock_gettime+0x81>
rtems_set_errno_and_return_minus_one( ENOSYS );
109ac8: e8 cf 80 00 00 call 111b9c <__errno>
109acd: c7 00 58 00 00 00 movl $0x58,(%eax)
109ad3: eb 0b jmp 109ae0 <clock_gettime+0x8c>
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
109ad5: e8 c2 80 00 00 call 111b9c <__errno>
109ada: c7 00 16 00 00 00 movl $0x16,(%eax)
109ae0: 83 c8 ff or $0xffffffff,%eax
return 0;
}
109ae3: 8d 65 f4 lea -0xc(%ebp),%esp
109ae6: 5b pop %ebx
109ae7: 5e pop %esi
109ae8: 5f pop %edi
109ae9: 5d pop %ebp
109aea: c3 ret
001233a0 <clock_settime>:
int clock_settime(
clockid_t clock_id,
const struct timespec *tp
)
{
1233a0: 55 push %ebp
1233a1: 89 e5 mov %esp,%ebp
1233a3: 53 push %ebx
1233a4: 83 ec 14 sub $0x14,%esp
1233a7: 8b 45 08 mov 0x8(%ebp),%eax
1233aa: 8b 4d 0c mov 0xc(%ebp),%ecx
if ( !tp )
1233ad: 85 c9 test %ecx,%ecx
1233af: 75 02 jne 1233b3 <clock_settime+0x13> <== ALWAYS TAKEN
1233b1: eb 69 jmp 12341c <clock_settime+0x7c> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
1233b3: 83 f8 01 cmp $0x1,%eax
1233b6: 75 4b jne 123403 <clock_settime+0x63>
if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 )
1233b8: 81 39 ff e4 da 21 cmpl $0x21dae4ff,(%ecx)
1233be: 77 02 ja 1233c2 <clock_settime+0x22>
1233c0: eb 5a jmp 12341c <clock_settime+0x7c>
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
1233c2: a1 fc e1 16 00 mov 0x16e1fc,%eax
1233c7: 40 inc %eax
1233c8: a3 fc e1 16 00 mov %eax,0x16e1fc
return _Thread_Dispatch_disable_level;
1233cd: a1 fc e1 16 00 mov 0x16e1fc,%eax
Timestamp64_Control *_time,
Timestamp64_Control _seconds,
Timestamp64_Control _nanoseconds
)
{
*_time = _seconds * 1000000000L + _nanoseconds;
1233d2: b8 00 ca 9a 3b mov $0x3b9aca00,%eax
1233d7: f7 29 imull (%ecx)
const struct timespec *tod_as_timespec
)
{
Timestamp_Control tod_as_timestamp;
_Timestamp_Set(
1233d9: 8b 49 04 mov 0x4(%ecx),%ecx
1233dc: 89 cb mov %ecx,%ebx
1233de: c1 fb 1f sar $0x1f,%ebx
1233e1: 01 c8 add %ecx,%eax
1233e3: 11 da adc %ebx,%edx
1233e5: 89 45 f0 mov %eax,-0x10(%ebp)
1233e8: 89 55 f4 mov %edx,-0xc(%ebp)
&tod_as_timestamp,
tod_as_timespec->tv_sec,
tod_as_timespec->tv_nsec
);
_TOD_Set_with_timestamp( &tod_as_timestamp );
1233eb: 83 ec 0c sub $0xc,%esp
1233ee: 8d 45 f0 lea -0x10(%ebp),%eax
1233f1: 50 push %eax
1233f2: e8 0d 0e 00 00 call 124204 <_TOD_Set_with_timestamp>
rtems_set_errno_and_return_minus_one( EINVAL );
_Thread_Disable_dispatch();
_TOD_Set( tp );
_Thread_Enable_dispatch();
1233f7: e8 78 87 fe ff call 10bb74 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
1233fc: 83 c4 10 add $0x10,%esp
1233ff: 31 c0 xor %eax,%eax
123401: eb 27 jmp 12342a <clock_settime+0x8a>
_Thread_Disable_dispatch();
_TOD_Set( tp );
_Thread_Enable_dispatch();
}
#ifdef _POSIX_CPUTIME
else if ( clock_id == CLOCK_PROCESS_CPUTIME_ID )
123403: 83 f8 02 cmp $0x2,%eax
123406: 75 02 jne 12340a <clock_settime+0x6a>
123408: eb 05 jmp 12340f <clock_settime+0x6f>
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
#ifdef _POSIX_THREAD_CPUTIME
else if ( clock_id == CLOCK_THREAD_CPUTIME_ID )
12340a: 83 f8 03 cmp $0x3,%eax
12340d: 75 0d jne 12341c <clock_settime+0x7c>
rtems_set_errno_and_return_minus_one( ENOSYS );
12340f: e8 74 da 00 00 call 130e88 <__errno>
123414: c7 00 58 00 00 00 movl $0x58,(%eax)
12341a: eb 0b jmp 123427 <clock_settime+0x87>
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
12341c: e8 67 da 00 00 call 130e88 <__errno>
123421: c7 00 16 00 00 00 movl $0x16,(%eax)
123427: 83 c8 ff or $0xffffffff,%eax
return 0;
}
12342a: 8b 5d fc mov -0x4(%ebp),%ebx
12342d: c9 leave
12342e: c3 ret
0010666a <create_disk>:
dev_t dev,
const char *name,
rtems_disk_device **dd_ptr,
char **alloc_name_ptr
)
{
10666a: 55 push %ebp
10666b: 89 e5 mov %esp,%ebp
10666d: 57 push %edi
10666e: 56 push %esi
10666f: 53 push %ebx
106670: 83 ec 2c sub $0x2c,%esp
106673: 89 45 d8 mov %eax,-0x28(%ebp)
106676: 89 55 dc mov %edx,-0x24(%ebp)
106679: 89 4d d4 mov %ecx,-0x2c(%ebp)
)
{
union __rtems_dev_t temp;
temp.device = device;
return temp.__overlay.major;
10667c: 89 c6 mov %eax,%esi
dev_t device
)
{
union __rtems_dev_t temp;
temp.device = device;
10667e: 89 55 e0 mov %edx,-0x20(%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) {
106681: 8b 3d 9c 1f 13 00 mov 0x131f9c,%edi
106687: 39 f8 cmp %edi,%eax
106689: 72 49 jb 1066d4 <create_disk+0x6a>
rtems_disk_device_table *table = disktab;
10668b: a1 a0 1f 13 00 mov 0x131fa0,%eax
rtems_device_major_number old_size = disktab_size;
rtems_device_major_number new_size = 2 * old_size;
106690: 8d 1c 3f lea (%edi,%edi,1),%ebx
if (major >= new_size) {
106693: 39 de cmp %ebx,%esi
106695: 72 03 jb 10669a <create_disk+0x30> <== NEVER TAKEN
new_size = major + 1;
106697: 8d 5e 01 lea 0x1(%esi),%ebx
}
table = realloc(table, new_size * sizeof(*table));
10669a: 51 push %ecx
10669b: 51 push %ecx
10669c: 8d 14 dd 00 00 00 00 lea 0x0(,%ebx,8),%edx
1066a3: 52 push %edx
1066a4: 50 push %eax
1066a5: e8 fa 1c 00 00 call 1083a4 <realloc>
1066aa: 89 c2 mov %eax,%edx
if (table == NULL) {
1066ac: 83 c4 10 add $0x10,%esp
1066af: 85 c0 test %eax,%eax
1066b1: 0f 84 25 01 00 00 je 1067dc <create_disk+0x172> <== ALWAYS TAKEN
return NULL;
}
memset(table + old_size, 0, (new_size - old_size) * sizeof(*table));
1066b7: 89 d9 mov %ebx,%ecx <== NOT EXECUTED
1066b9: 29 f9 sub %edi,%ecx <== NOT EXECUTED
1066bb: c1 e1 03 shl $0x3,%ecx <== NOT EXECUTED
1066be: 8d 3c f8 lea (%eax,%edi,8),%edi <== NOT EXECUTED
1066c1: 89 7d e4 mov %edi,-0x1c(%ebp) <== NOT EXECUTED
1066c4: 31 c0 xor %eax,%eax <== NOT EXECUTED
1066c6: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED
disktab = table;
1066c8: 89 15 a0 1f 13 00 mov %edx,0x131fa0 <== NOT EXECUTED
disktab_size = new_size;
1066ce: 89 1d 9c 1f 13 00 mov %ebx,0x131f9c <== NOT EXECUTED
}
if (disktab [major].minor == NULL || minor >= disktab[major].size) {
1066d4: a1 a0 1f 13 00 mov 0x131fa0,%eax
1066d9: 8d 1c f0 lea (%eax,%esi,8),%ebx
1066dc: 8b 03 mov (%ebx),%eax
1066de: 85 c0 test %eax,%eax
1066e0: 74 08 je 1066ea <create_disk+0x80>
1066e2: 8b 55 e0 mov -0x20(%ebp),%edx
1066e5: 3b 53 04 cmp 0x4(%ebx),%edx
1066e8: 72 4b jb 106735 <create_disk+0xcb>
rtems_disk_device **table = disktab [major].minor;
rtems_device_minor_number old_size = disktab [major].size;
1066ea: 8b 7b 04 mov 0x4(%ebx),%edi
rtems_device_minor_number new_size = 0;
if (old_size == 0) {
new_size = DISKTAB_INITIAL_SIZE;
1066ed: be 08 00 00 00 mov $0x8,%esi
if (disktab [major].minor == NULL || minor >= disktab[major].size) {
rtems_disk_device **table = disktab [major].minor;
rtems_device_minor_number old_size = disktab [major].size;
rtems_device_minor_number new_size = 0;
if (old_size == 0) {
1066f2: 85 ff test %edi,%edi
1066f4: 74 03 je 1066f9 <create_disk+0x8f>
new_size = DISKTAB_INITIAL_SIZE;
} else {
new_size = 2 * old_size;
1066f6: 8d 34 3f lea (%edi,%edi,1),%esi
}
if (minor >= new_size) {
1066f9: 39 75 e0 cmp %esi,-0x20(%ebp)
1066fc: 72 04 jb 106702 <create_disk+0x98>
new_size = minor + 1;
1066fe: 8b 75 e0 mov -0x20(%ebp),%esi
106701: 46 inc %esi
}
table = realloc(table, new_size * sizeof(*table));
106702: 52 push %edx
106703: 52 push %edx
106704: 8d 14 b5 00 00 00 00 lea 0x0(,%esi,4),%edx
10670b: 52 push %edx
10670c: 50 push %eax
10670d: e8 92 1c 00 00 call 1083a4 <realloc>
106712: 89 c2 mov %eax,%edx
if (table == NULL) {
106714: 83 c4 10 add $0x10,%esp
106717: 85 c0 test %eax,%eax
106719: 0f 84 bd 00 00 00 je 1067dc <create_disk+0x172>
return NULL;
}
memset(table + old_size, 0, (new_size - old_size) * sizeof(*table));
10671f: 89 f1 mov %esi,%ecx
106721: 29 f9 sub %edi,%ecx
106723: c1 e1 02 shl $0x2,%ecx
106726: 8d 3c b8 lea (%eax,%edi,4),%edi
106729: 89 7d e4 mov %edi,-0x1c(%ebp)
10672c: 31 c0 xor %eax,%eax
10672e: f3 aa rep stos %al,%es:(%edi)
disktab [major].minor = table;
106730: 89 13 mov %edx,(%ebx)
disktab [major].size = new_size;
106732: 89 73 04 mov %esi,0x4(%ebx)
}
return disktab [major].minor + minor;
106735: 8b 03 mov (%ebx),%eax
106737: 8b 55 e0 mov -0x20(%ebp),%edx
10673a: 8d 1c 90 lea (%eax,%edx,4),%ebx
{
rtems_disk_device **dd_entry = create_disk_table_entry(dev);
rtems_disk_device *dd = NULL;
char *alloc_name = NULL;
if (dd_entry == NULL) {
10673d: 85 db test %ebx,%ebx
10673f: 75 05 jne 106746 <create_disk+0xdc> <== ALWAYS TAKEN
106741: e9 96 00 00 00 jmp 1067dc <create_disk+0x172> <== NOT EXECUTED
return RTEMS_NO_MEMORY;
}
if (*dd_entry != NULL) {
return RTEMS_RESOURCE_IN_USE;
106746: b8 0c 00 00 00 mov $0xc,%eax
if (dd_entry == NULL) {
return RTEMS_NO_MEMORY;
}
if (*dd_entry != NULL) {
10674b: 83 3b 00 cmpl $0x0,(%ebx)
10674e: 0f 85 8d 00 00 00 jne 1067e1 <create_disk+0x177>
return RTEMS_RESOURCE_IN_USE;
}
dd = malloc(sizeof(*dd));
106754: 83 ec 0c sub $0xc,%esp
106757: 6a 74 push $0x74
106759: e8 e6 11 00 00 call 107944 <malloc>
10675e: 89 c6 mov %eax,%esi
if (dd == NULL) {
106760: 83 c4 10 add $0x10,%esp
106763: 85 c0 test %eax,%eax
106765: 74 75 je 1067dc <create_disk+0x172> <== NEVER TAKEN
return RTEMS_NO_MEMORY;
}
if (name != NULL) {
106767: 83 7d d4 00 cmpl $0x0,-0x2c(%ebp)
10676b: 74 3d je 1067aa <create_disk+0x140>
alloc_name = strdup(name);
10676d: 83 ec 0c sub $0xc,%esp
106770: ff 75 d4 pushl -0x2c(%ebp)
106773: e8 08 ea 00 00 call 115180 <strdup>
106778: 89 c7 mov %eax,%edi
if (alloc_name == NULL) {
10677a: 83 c4 10 add $0x10,%esp
10677d: 85 c0 test %eax,%eax
10677f: 75 3b jne 1067bc <create_disk+0x152> <== ALWAYS TAKEN
free(dd);
106781: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
106784: 56 push %esi <== NOT EXECUTED
106785: e8 9a 0d 00 00 call 107524 <free> <== NOT EXECUTED
return RTEMS_NO_MEMORY;
10678a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10678d: eb 4d jmp 1067dc <create_disk+0x172> <== NOT EXECUTED
}
}
if (name != NULL) {
if (mknod(alloc_name, 0777 | S_IFBLK, dev) < 0) {
free(alloc_name);
10678f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
106792: 57 push %edi <== NOT EXECUTED
106793: e8 8c 0d 00 00 call 107524 <free> <== NOT EXECUTED
free(dd);
106798: 89 34 24 mov %esi,(%esp) <== NOT EXECUTED
10679b: e8 84 0d 00 00 call 107524 <free> <== NOT EXECUTED
return RTEMS_UNSATISFIED;
1067a0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1067a3: b8 0d 00 00 00 mov $0xd,%eax <== NOT EXECUTED
1067a8: eb 37 jmp 1067e1 <create_disk+0x177> <== NOT EXECUTED
char **alloc_name_ptr
)
{
rtems_disk_device **dd_entry = create_disk_table_entry(dev);
rtems_disk_device *dd = NULL;
char *alloc_name = NULL;
1067aa: 31 d2 xor %edx,%edx
free(dd);
return RTEMS_UNSATISFIED;
}
}
*dd_entry = dd;
1067ac: 89 33 mov %esi,(%ebx)
*dd_ptr = dd;
1067ae: 8b 45 08 mov 0x8(%ebp),%eax
1067b1: 89 30 mov %esi,(%eax)
*alloc_name_ptr = alloc_name;
1067b3: 8b 45 0c mov 0xc(%ebp),%eax
1067b6: 89 10 mov %edx,(%eax)
return RTEMS_SUCCESSFUL;
1067b8: 31 c0 xor %eax,%eax
1067ba: eb 25 jmp 1067e1 <create_disk+0x177>
return RTEMS_NO_MEMORY;
}
}
if (name != NULL) {
if (mknod(alloc_name, 0777 | S_IFBLK, dev) < 0) {
1067bc: ff 75 dc pushl -0x24(%ebp)
1067bf: ff 75 d8 pushl -0x28(%ebp)
1067c2: 68 ff 61 00 00 push $0x61ff
1067c7: 50 push %eax
1067c8: 89 45 d0 mov %eax,-0x30(%ebp)
1067cb: e8 c8 12 00 00 call 107a98 <mknod>
1067d0: 83 c4 10 add $0x10,%esp
1067d3: 85 c0 test %eax,%eax
1067d5: 8b 55 d0 mov -0x30(%ebp),%edx
1067d8: 79 d2 jns 1067ac <create_disk+0x142> <== ALWAYS TAKEN
1067da: eb b3 jmp 10678f <create_disk+0x125> <== NOT EXECUTED
rtems_disk_device **dd_entry = create_disk_table_entry(dev);
rtems_disk_device *dd = NULL;
char *alloc_name = NULL;
if (dd_entry == NULL) {
return RTEMS_NO_MEMORY;
1067dc: b8 1a 00 00 00 mov $0x1a,%eax
*dd_entry = dd;
*dd_ptr = dd;
*alloc_name_ptr = alloc_name;
return RTEMS_SUCCESSFUL;
}
1067e1: 8d 65 f4 lea -0xc(%ebp),%esp
1067e4: 5b pop %ebx
1067e5: 5e pop %esi
1067e6: 5f pop %edi
1067e7: 5d pop %ebp
1067e8: c3 ret
00107766 <data_to_part_desc.part.1>:
* RTEMS_SUCCESSFUL, if success;
* RTEMS_NO_MEMOTY, if cannot allocate memory for part_desc_t strucure;
* RTEMS_INTERNAL_ERROR, if other error occurs.
*/
static rtems_status_code
data_to_part_desc(uint8_t *data, rtems_part_desc_t **new_part_desc)
107766: 55 push %ebp
107767: 89 e5 mov %esp,%ebp
107769: 57 push %edi
10776a: 56 push %esi
10776b: 53 push %ebx
10776c: 83 ec 14 sub $0x14,%esp
10776f: 89 c6 mov %eax,%esi
107771: 89 d7 mov %edx,%edi
if (new_part_desc == NULL)
{
return RTEMS_INTERNAL_ERROR;
}
*new_part_desc = NULL;
107773: c7 02 00 00 00 00 movl $0x0,(%edx)
if ((part_desc = calloc(1, sizeof(rtems_part_desc_t))) == NULL)
107779: 6a 28 push $0x28
10777b: 6a 01 push $0x1
10777d: e8 3a 0a 00 00 call 1081bc <calloc>
107782: 89 c3 mov %eax,%ebx
107784: 83 c4 10 add $0x10,%esp
107787: 85 c0 test %eax,%eax
107789: 74 4e je 1077d9 <data_to_part_desc.part.1+0x73><== NEVER TAKEN
{
return RTEMS_NO_MEMORY;
}
part_desc->bootable = *(data + RTEMS_IDE_PARTITION_BOOTABLE_OFFSET);
10778b: 8a 06 mov (%esi),%al
10778d: 88 03 mov %al,(%ebx)
part_desc->sys_type = *(data + RTEMS_IDE_PARTITION_SYS_TYPE_OFFSET);
10778f: 0f b6 46 04 movzbl 0x4(%esi),%eax
107793: 88 43 01 mov %al,0x1(%ebx)
/* read the offset start position and partition size in sectors */
/* due to incorrect data alignment one have to align data first */
memcpy(&temp, data + RTEMS_IDE_PARTITION_START_OFFSET, sizeof(uint32_t));
107796: 8b 56 08 mov 0x8(%esi),%edx
part_desc->start = LE_TO_CPU_U32(temp);
107799: 89 53 04 mov %edx,0x4(%ebx)
memcpy(&temp, data + RTEMS_IDE_PARTITION_SIZE_OFFSET, sizeof(uint32_t));
10779c: 8b 76 0c mov 0xc(%esi),%esi
part_desc->size = LE_TO_CPU_U32(temp);
10779f: 89 73 08 mov %esi,0x8(%ebx)
* true if partition type is extended, false otherwise
*/
static bool
is_extended(uint8_t type)
{
return ((type == EXTENDED_PARTITION) || (type == LINUX_EXTENDED));
1077a2: 88 c2 mov %al,%dl
1077a4: 83 e2 7f and $0x7f,%edx
* use partitions that are
* - extended
* or
* - FAT type and non-zero
*/
if (is_extended(part_desc->sys_type) ||
1077a7: 80 fa 05 cmp $0x5,%dl
1077aa: 74 19 je 1077c5 <data_to_part_desc.part.1+0x5f>
DOS_P32MB_PARTITION,
FAT32_PARTITION ,FAT32_LBA_PARTITION,
FAT16_LBA_PARTITION
};
return (NULL != memchr(fat_part_types,type,sizeof(fat_part_types)));
1077ac: 52 push %edx
1077ad: 6a 06 push $0x6
1077af: 50 push %eax
1077b0: 68 90 38 12 00 push $0x123890
1077b5: e8 d6 e1 00 00 call 115990 <memchr>
1077ba: 83 c4 10 add $0x10,%esp
* use partitions that are
* - extended
* or
* - FAT type and non-zero
*/
if (is_extended(part_desc->sys_type) ||
1077bd: 85 c0 test %eax,%eax
1077bf: 74 08 je 1077c9 <data_to_part_desc.part.1+0x63>
((is_fat_partition(part_desc->sys_type)) && (part_desc->size != 0))) {
1077c1: 85 f6 test %esi,%esi
1077c3: 74 04 je 1077c9 <data_to_part_desc.part.1+0x63><== NEVER TAKEN
*new_part_desc = part_desc;
1077c5: 89 1f mov %ebx,(%edi)
1077c7: eb 0c jmp 1077d5 <data_to_part_desc.part.1+0x6f>
}
else {
/* empty partition */
free(part_desc);
1077c9: 83 ec 0c sub $0xc,%esp
1077cc: 53 push %ebx
1077cd: e8 56 0c 00 00 call 108428 <free>
1077d2: 83 c4 10 add $0x10,%esp
}
return RTEMS_SUCCESSFUL;
1077d5: 31 c0 xor %eax,%eax
1077d7: eb 05 jmp 1077de <data_to_part_desc.part.1+0x78>
*new_part_desc = NULL;
if ((part_desc = calloc(1, sizeof(rtems_part_desc_t))) == NULL)
{
return RTEMS_NO_MEMORY;
1077d9: b8 1a 00 00 00 mov $0x1a,%eax <== NOT EXECUTED
else {
/* empty partition */
free(part_desc);
}
return RTEMS_SUCCESSFUL;
}
1077de: 8d 65 f4 lea -0xc(%ebp),%esp
1077e1: 5b pop %ebx
1077e2: 5e pop %esi
1077e3: 5f pop %edi
1077e4: 5d pop %ebp
1077e5: c3 ret
00105e08 <devFS_Show>:
#include "devfs.h"
void devFS_Show(void)
{
rtems_filesystem_location_info_t *rootloc = &rtems_filesystem_root->location;
105e08: a1 14 91 12 00 mov 0x129114,%eax
if (rootloc->mt_entry->ops == &devFS_ops) {
105e0d: 8b 40 04 mov 0x4(%eax),%eax
105e10: 8b 40 14 mov 0x14(%eax),%eax
105e13: 81 78 0c 10 d6 11 00 cmpl $0x11d610,0xc(%eax)
105e1a: 75 77 jne 105e93 <devFS_Show+0x8b> <== NEVER TAKEN
#endif
#include "devfs.h"
void devFS_Show(void)
{
105e1c: 55 push %ebp
105e1d: 89 e5 mov %esp,%ebp
105e1f: 57 push %edi
105e20: 56 push %esi
105e21: 53 push %ebx
105e22: 83 ec 1c sub $0x1c,%esp
static inline const devFS_data *devFS_get_data(
const rtems_filesystem_location_info_t *loc
)
{
return (const devFS_data *) loc->mt_entry->immutable_fs_info;
105e25: 8b 40 10 mov 0x10(%eax),%eax
rtems_filesystem_location_info_t *rootloc = &rtems_filesystem_root->location;
if (rootloc->mt_entry->ops == &devFS_ops) {
const devFS_data *data = devFS_get_data(rootloc);
size_t i = 0;
size_t n = data->count;
105e28: 8b 50 04 mov 0x4(%eax),%edx
105e2b: 89 55 e4 mov %edx,-0x1c(%ebp)
105e2e: 8b 30 mov (%eax),%esi
devFS_node *nodes = data->nodes;
for (i = 0; i < n; ++i) {
105e30: 31 db xor %ebx,%ebx
105e32: eb 53 jmp 105e87 <devFS_Show+0x7f>
devFS_node *current = nodes + i;
if (current->name != NULL) {
105e34: 83 3e 00 cmpl $0x0,(%esi)
105e37: 74 4a je 105e83 <devFS_Show+0x7b> <== NEVER TAKEN
size_t j = 0;
size_t m = current->namelen;
105e39: 8b 46 04 mov 0x4(%esi),%eax
105e3c: 89 45 e0 mov %eax,-0x20(%ebp)
printk("/");
105e3f: 83 ec 0c sub $0xc,%esp
105e42: 68 64 d6 11 00 push $0x11d664
105e47: e8 60 10 00 00 call 106eac <printk>
for (j = 0; j < m; ++j) {
105e4c: 83 c4 10 add $0x10,%esp
105e4f: 31 ff xor %edi,%edi
105e51: eb 17 jmp 105e6a <devFS_Show+0x62>
printk("%c", current->name [j]);
105e53: 52 push %edx
105e54: 52 push %edx
105e55: 8b 0e mov (%esi),%ecx
105e57: 0f be 0c 39 movsbl (%ecx,%edi,1),%ecx
105e5b: 51 push %ecx
105e5c: 68 66 d6 11 00 push $0x11d666
105e61: e8 46 10 00 00 call 106eac <printk>
if (current->name != NULL) {
size_t j = 0;
size_t m = current->namelen;
printk("/");
for (j = 0; j < m; ++j) {
105e66: 47 inc %edi
105e67: 83 c4 10 add $0x10,%esp
105e6a: 3b 7d e0 cmp -0x20(%ebp),%edi
105e6d: 75 e4 jne 105e53 <devFS_Show+0x4b>
printk("%c", current->name [j]);
}
printk(
105e6f: 50 push %eax
105e70: ff 76 0c pushl 0xc(%esi)
105e73: ff 76 08 pushl 0x8(%esi)
105e76: 68 69 d6 11 00 push $0x11d669
105e7b: e8 2c 10 00 00 call 106eac <printk>
105e80: 83 c4 10 add $0x10,%esp
const devFS_data *data = devFS_get_data(rootloc);
size_t i = 0;
size_t n = data->count;
devFS_node *nodes = data->nodes;
for (i = 0; i < n; ++i) {
105e83: 43 inc %ebx
105e84: 83 c6 14 add $0x14,%esi
105e87: 3b 5d e4 cmp -0x1c(%ebp),%ebx
105e8a: 75 a8 jne 105e34 <devFS_Show+0x2c>
(unsigned long) current->minor
);
}
}
}
}
105e8c: 8d 65 f4 lea -0xc(%ebp),%esp
105e8f: 5b pop %ebx
105e90: 5e pop %esi
105e91: 5f pop %edi
105e92: 5d pop %ebp
105e93: c3 ret
0010da90 <devFS_eval_path>:
}
void devFS_eval_path(
rtems_filesystem_eval_path_context_t *ctx
)
{
10da90: 55 push %ebp
10da91: 89 e5 mov %esp,%ebp
10da93: 57 push %edi
10da94: 56 push %esi
10da95: 53 push %ebx
10da96: 83 ec 2c sub $0x2c,%esp
10da99: 8b 5d 08 mov 0x8(%ebp),%ebx
}
} else {
rtems_filesystem_eval_path_error(ctx, ENOENT);
}
}
}
10da9c: 8b 53 04 mov 0x4(%ebx),%edx
10da9f: 8b 0b mov (%ebx),%ecx
10daa1: 89 4d e0 mov %ecx,-0x20(%ebp)
static inline const devFS_data *devFS_get_data(
const rtems_filesystem_location_info_t *loc
)
{
return (const devFS_data *) loc->mt_entry->immutable_fs_info;
10daa4: 8b 43 2c mov 0x2c(%ebx),%eax
10daa7: 8b 40 10 mov 0x10(%eax),%eax
size_t pathlen,
devFS_node **free_node_ptr
)
{
size_t i = 0;
size_t n = data->count;
10daaa: 8b 48 04 mov 0x4(%eax),%ecx
10daad: 89 4d d8 mov %ecx,-0x28(%ebp)
10dab0: 8b 30 mov (%eax),%esi
devFS_node *nodes = data->nodes;
devFS_node *node = NULL;
devFS_node *free_node = NULL;
10dab2: 31 c0 xor %eax,%eax
)
{
size_t i = 0;
size_t n = data->count;
devFS_node *nodes = data->nodes;
devFS_node *node = NULL;
10dab4: 31 ff xor %edi,%edi
devFS_node *free_node = NULL;
for (i = 0; (free_node == NULL || node == NULL) && i < n; ++i) {
10dab6: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
10dabd: eb 34 jmp 10daf3 <devFS_eval_path+0x63>
devFS_node *current = nodes + i;
10dabf: 89 75 dc mov %esi,-0x24(%ebp)
if (current->name != NULL) {
10dac2: 8b 0e mov (%esi),%ecx
10dac4: 85 c9 test %ecx,%ecx
10dac6: 74 22 je 10daea <devFS_eval_path+0x5a>
if (
10dac8: 89 45 dc mov %eax,-0x24(%ebp)
10dacb: 39 56 04 cmp %edx,0x4(%esi)
10dace: 75 1a jne 10daea <devFS_eval_path+0x5a>
current->namelen == pathlen
&& memcmp(current->name, path, pathlen) == 0
10dad0: 50 push %eax
10dad1: 52 push %edx
10dad2: ff 75 e0 pushl -0x20(%ebp)
10dad5: 51 push %ecx
10dad6: 89 55 d4 mov %edx,-0x2c(%ebp)
10dad9: e8 6a 34 00 00 call 110f48 <memcmp>
10dade: 83 c4 10 add $0x10,%esp
10dae1: 85 c0 test %eax,%eax
10dae3: 8b 55 d4 mov -0x2c(%ebp),%edx
10dae6: 75 02 jne 10daea <devFS_eval_path+0x5a>
10dae8: 89 f7 mov %esi,%edi
size_t n = data->count;
devFS_node *nodes = data->nodes;
devFS_node *node = NULL;
devFS_node *free_node = NULL;
for (i = 0; (free_node == NULL || node == NULL) && i < n; ++i) {
10daea: ff 45 e4 incl -0x1c(%ebp)
10daed: 83 c6 14 add $0x14,%esi
10daf0: 8b 45 dc mov -0x24(%ebp),%eax
10daf3: 85 ff test %edi,%edi
10daf5: 74 0d je 10db04 <devFS_eval_path+0x74>
10daf7: 85 c0 test %eax,%eax
10daf9: 74 09 je 10db04 <devFS_eval_path+0x74> <== ALWAYS TAKEN
}
} else {
rtems_filesystem_eval_path_error(ctx, ENOENT);
}
}
}
10dafb: 8b 4b 10 mov 0x10(%ebx),%ecx
rtems_filesystem_eval_path_get_pathlen(ctx),
&free_node
);
int eval_flags = rtems_filesystem_eval_path_get_flags(ctx);
if (node != NULL) {
10dafe: 85 ff test %edi,%edi
10db00: 75 0c jne 10db0e <devFS_eval_path+0x7e>
10db02: eb 1a jmp 10db1e <devFS_eval_path+0x8e>
size_t n = data->count;
devFS_node *nodes = data->nodes;
devFS_node *node = NULL;
devFS_node *free_node = NULL;
for (i = 0; (free_node == NULL || node == NULL) && i < n; ++i) {
10db04: 8b 4d d8 mov -0x28(%ebp),%ecx
10db07: 39 4d e4 cmp %ecx,-0x1c(%ebp)
10db0a: 75 b3 jne 10dabf <devFS_eval_path+0x2f>
10db0c: eb ed jmp 10dafb <devFS_eval_path+0x6b>
&free_node
);
int eval_flags = rtems_filesystem_eval_path_get_flags(ctx);
if (node != NULL) {
if ((eval_flags & RTEMS_FS_EXCLUSIVE) == 0) {
10db0e: 80 e1 40 and $0x40,%cl
10db11: 75 05 jne 10db18 <devFS_eval_path+0x88> <== NEVER TAKEN
currentloc->node_access = node;
10db13: 89 7b 20 mov %edi,0x20(%ebx)
10db16: eb 22 jmp 10db3a <devFS_eval_path+0xaa>
rtems_filesystem_eval_path_clear_path(ctx);
} else {
rtems_filesystem_eval_path_error(ctx, EEXIST);
10db18: 51 push %ecx <== NOT EXECUTED
10db19: 51 push %ecx <== NOT EXECUTED
10db1a: 6a 11 push $0x11 <== NOT EXECUTED
10db1c: eb 2f jmp 10db4d <devFS_eval_path+0xbd> <== NOT EXECUTED
}
} else {
if ((eval_flags & RTEMS_FS_MAKE) != 0) {
10db1e: 80 e1 20 and $0x20,%cl
10db21: 74 26 je 10db49 <devFS_eval_path+0xb9> <== NEVER TAKEN
if (free_node != NULL) {
10db23: 85 c0 test %eax,%eax
10db25: 74 1c je 10db43 <devFS_eval_path+0xb3>
free_node->mode = S_IRWXU | S_IRWXG | S_IRWXO;
10db27: c7 40 10 ff 01 00 00 movl $0x1ff,0x10(%eax)
currentloc->node_access = free_node;
10db2e: 89 43 20 mov %eax,0x20(%ebx)
rtems_filesystem_eval_path_context_t *ctx,
const char *token,
size_t tokenlen
)
{
ctx->token = token;
10db31: 8b 4d e0 mov -0x20(%ebp),%ecx
10db34: 89 4b 08 mov %ecx,0x8(%ebx)
ctx->tokenlen = tokenlen;
10db37: 89 53 0c mov %edx,0xc(%ebx)
static inline void rtems_filesystem_eval_path_clear_path(
rtems_filesystem_eval_path_context_t *ctx
)
{
ctx->pathlen = 0;
10db3a: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx)
10db41: eb 13 jmp 10db56 <devFS_eval_path+0xc6>
rtems_filesystem_eval_path_get_path(ctx),
rtems_filesystem_eval_path_get_pathlen(ctx)
);
rtems_filesystem_eval_path_clear_path(ctx);
} else {
rtems_filesystem_eval_path_error(ctx, ENOSPC);
10db43: 52 push %edx
10db44: 52 push %edx
10db45: 6a 1c push $0x1c
10db47: eb 04 jmp 10db4d <devFS_eval_path+0xbd>
}
} else {
rtems_filesystem_eval_path_error(ctx, ENOENT);
10db49: 50 push %eax <== NOT EXECUTED
10db4a: 50 push %eax <== NOT EXECUTED
10db4b: 6a 02 push $0x2 <== NOT EXECUTED
10db4d: 53 push %ebx
10db4e: e8 f7 a0 ff ff call 107c4a <rtems_filesystem_eval_path_error>
10db53: 83 c4 10 add $0x10,%esp
}
}
}
10db56: 8d 65 f4 lea -0xc(%ebp),%esp
10db59: 5b pop %ebx
10db5a: 5e pop %esi
10db5b: 5f pop %edi
10db5c: 5d pop %ebp
10db5d: c3 ret
00106884 <devFS_mknod>:
const char *name,
size_t namelen,
mode_t mode,
dev_t dev
)
{
106884: 55 push %ebp
106885: 89 e5 mov %esp,%ebp
106887: 57 push %edi
106888: 56 push %esi
106889: 53 push %ebx
10688a: 83 ec 1c sub $0x1c,%esp
10688d: 8b 75 0c mov 0xc(%ebp),%esi
106890: 8b 4d 10 mov 0x10(%ebp),%ecx
106893: 8b 7d 18 mov 0x18(%ebp),%edi
106896: 8b 5d 1c mov 0x1c(%ebp),%ebx
int rv = 0;
if (namelen != 3 || name [0] != 'd' || name [1] != 'e' || name [2] != 'v') {
106899: 83 f9 03 cmp $0x3,%ecx
10689c: 75 11 jne 1068af <devFS_mknod+0x2b>
10689e: 80 3e 64 cmpb $0x64,(%esi)
1068a1: 75 0c jne 1068af <devFS_mknod+0x2b> <== NEVER TAKEN
1068a3: 80 7e 01 65 cmpb $0x65,0x1(%esi)
1068a7: 75 06 jne 1068af <devFS_mknod+0x2b> <== NEVER TAKEN
1068a9: 80 7e 02 76 cmpb $0x76,0x2(%esi)
1068ad: 74 51 je 106900 <devFS_mknod+0x7c> <== ALWAYS TAKEN
if (S_ISBLK(mode) || S_ISCHR(mode)) {
1068af: 8b 45 14 mov 0x14(%ebp),%eax
1068b2: 25 00 b0 00 00 and $0xb000,%eax
1068b7: 3d 00 20 00 00 cmp $0x2000,%eax
1068bc: 75 55 jne 106913 <devFS_mknod+0x8f>
char *dupname = malloc(namelen);
1068be: 83 ec 0c sub $0xc,%esp
1068c1: 51 push %ecx
1068c2: 89 4d e4 mov %ecx,-0x1c(%ebp)
1068c5: e8 3e 06 00 00 call 106f08 <malloc>
if (dupname != NULL) {
1068ca: 83 c4 10 add $0x10,%esp
1068cd: 85 c0 test %eax,%eax
1068cf: 8b 4d e4 mov -0x1c(%ebp),%ecx
1068d2: 74 1f je 1068f3 <devFS_mknod+0x6f> <== NEVER TAKEN
devFS_node *node = parentloc->node_access;
1068d4: 8b 55 08 mov 0x8(%ebp),%edx
1068d7: 8b 52 08 mov 0x8(%edx),%edx
node->name = dupname;
1068da: 89 02 mov %eax,(%edx)
node->namelen = namelen;
1068dc: 89 4a 04 mov %ecx,0x4(%edx)
node->major = rtems_filesystem_dev_major_t(dev);
1068df: 89 7a 08 mov %edi,0x8(%edx)
node->minor = rtems_filesystem_dev_minor_t(dev);
1068e2: 89 5a 0c mov %ebx,0xc(%edx)
node->mode = mode;
1068e5: 8b 5d 14 mov 0x14(%ebp),%ebx
1068e8: 89 5a 10 mov %ebx,0x10(%edx)
memcpy(dupname, name, namelen);
1068eb: 89 c7 mov %eax,%edi
1068ed: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
size_t namelen,
mode_t mode,
dev_t dev
)
{
int rv = 0;
1068ef: 31 c0 xor %eax,%eax
1068f1: eb 2e jmp 106921 <devFS_mknod+0x9d>
node->major = rtems_filesystem_dev_major_t(dev);
node->minor = rtems_filesystem_dev_minor_t(dev);
node->mode = mode;
memcpy(dupname, name, namelen);
} else {
errno = ENOMEM;
1068f3: e8 80 98 00 00 call 110178 <__errno> <== NOT EXECUTED
1068f8: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED
1068fe: eb 1e jmp 10691e <devFS_mknod+0x9a> <== NOT EXECUTED
} else {
errno = ENOTSUP;
rv = -1;
}
} else {
if (!S_ISDIR(mode)) {
106900: 8b 55 14 mov 0x14(%ebp),%edx
106903: 81 e2 00 f0 00 00 and $0xf000,%edx
size_t namelen,
mode_t mode,
dev_t dev
)
{
int rv = 0;
106909: 31 c0 xor %eax,%eax
} else {
errno = ENOTSUP;
rv = -1;
}
} else {
if (!S_ISDIR(mode)) {
10690b: 81 fa 00 40 00 00 cmp $0x4000,%edx
106911: 74 0e je 106921 <devFS_mknod+0x9d> <== ALWAYS TAKEN
errno = ENOTSUP;
106913: e8 60 98 00 00 call 110178 <__errno>
106918: c7 00 86 00 00 00 movl $0x86,(%eax)
rv = -1;
10691e: 83 c8 ff or $0xffffffff,%eax
}
}
return rv;
}
106921: 8d 65 f4 lea -0xc(%ebp),%esp
106924: 5b pop %ebx
106925: 5e pop %esi
106926: 5f pop %edi
106927: 5d pop %ebp
106928: c3 ret
0010697c <devFS_read>:
ssize_t devFS_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
10697c: 55 push %ebp <== NOT EXECUTED
10697d: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10697f: 83 ec 14 sub $0x14,%esp <== NOT EXECUTED
106982: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
const devFS_node *np = iop->pathinfo.node_access;
106985: 8b 50 18 mov 0x18(%eax),%edx <== NOT EXECUTED
return rtems_deviceio_read( iop, buffer, count, np->major, np->minor );
106988: ff 72 0c pushl 0xc(%edx) <== NOT EXECUTED
10698b: ff 72 08 pushl 0x8(%edx) <== NOT EXECUTED
10698e: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED
106991: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
106994: 50 push %eax <== NOT EXECUTED
106995: e8 72 11 00 00 call 107b0c <rtems_deviceio_read> <== NOT EXECUTED
}
10699a: c9 leave <== NOT EXECUTED
10699b: c3 ret <== NOT EXECUTED
0010660e <disk_lock>:
*/
static volatile bool diskdevs_protected;
static rtems_status_code
disk_lock(void)
{
10660e: 55 push %ebp
10660f: 89 e5 mov %esp,%ebp
106611: 83 ec 0c sub $0xc,%esp
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_semaphore_obtain(diskdevs_mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
106614: 6a 00 push $0x0
106616: 6a 00 push $0x0
106618: ff 35 98 1f 13 00 pushl 0x131f98
10661e: e8 11 47 00 00 call 10ad34 <rtems_semaphore_obtain>
if (sc == RTEMS_SUCCESSFUL) {
106623: 83 c4 10 add $0x10,%esp
diskdevs_protected = true;
return RTEMS_SUCCESSFUL;
} else {
return RTEMS_NOT_CONFIGURED;
106626: ba 16 00 00 00 mov $0x16,%edx
disk_lock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_semaphore_obtain(diskdevs_mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc == RTEMS_SUCCESSFUL) {
10662b: 85 c0 test %eax,%eax
10662d: 75 09 jne 106638 <disk_lock+0x2a> <== NEVER TAKEN
diskdevs_protected = true;
10662f: c6 05 94 1f 13 00 01 movb $0x1,0x131f94
return RTEMS_SUCCESSFUL;
106636: 30 d2 xor %dl,%dl
} else {
return RTEMS_NOT_CONFIGURED;
}
}
106638: 89 d0 mov %edx,%eax
10663a: c9 leave
10663b: c3 ret
0010663c <disk_unlock>:
static void
disk_unlock(void)
{
10663c: 55 push %ebp
10663d: 89 e5 mov %esp,%ebp
10663f: 83 ec 14 sub $0x14,%esp
rtems_status_code sc = RTEMS_SUCCESSFUL;
diskdevs_protected = false;
106642: c6 05 94 1f 13 00 00 movb $0x0,0x131f94
sc = rtems_semaphore_release(diskdevs_mutex);
106649: ff 35 98 1f 13 00 pushl 0x131f98
10664f: e8 d0 47 00 00 call 10ae24 <rtems_semaphore_release>
if (sc != RTEMS_SUCCESSFUL) {
106654: 83 c4 10 add $0x10,%esp
106657: 85 c0 test %eax,%eax
106659: 74 0d je 106668 <disk_unlock+0x2c> <== ALWAYS TAKEN
/* FIXME: Error number */
rtems_fatal_error_occurred(0xdeadbeef);
10665b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10665e: 68 ef be ad de push $0xdeadbeef <== NOT EXECUTED
106663: e8 a8 4c 00 00 call 10b310 <rtems_fatal_error_occurred><== NOT EXECUTED
}
}
106668: c9 leave
106669: c3 ret
00107fa6 <drainOutput.part.0>:
/*
* Drain output queue
*/
static void
drainOutput (struct rtems_termios_tty *tty)
107fa6: 55 push %ebp
107fa7: 89 e5 mov %esp,%ebp
107fa9: 53 push %ebx
107faa: 52 push %edx
107fab: 89 c3 mov %eax,%ebx
107fad: eb 2c jmp 107fdb <drainOutput.part.0+0x35>
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
rtems_interrupt_disable (level);
while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) {
tty->rawOutBufState = rob_wait;
107faf: c7 83 94 00 00 00 02 movl $0x2,0x94(%ebx)
107fb6: 00 00 00
rtems_interrupt_enable (level);
107fb9: 50 push %eax
107fba: 9d popf
sc = rtems_semaphore_obtain(
107fbb: 50 push %eax
107fbc: 6a 00 push $0x0
107fbe: 6a 00 push $0x0
107fc0: ff b3 8c 00 00 00 pushl 0x8c(%ebx)
107fc6: e8 c5 1d 00 00 call 109d90 <rtems_semaphore_obtain>
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
107fcb: 83 c4 10 add $0x10,%esp
107fce: 85 c0 test %eax,%eax
107fd0: 74 09 je 107fdb <drainOutput.part.0+0x35><== ALWAYS TAKEN
rtems_fatal_error_occurred (sc);
107fd2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107fd5: 50 push %eax <== NOT EXECUTED
107fd6: e8 d9 23 00 00 call 10a3b4 <rtems_fatal_error_occurred><== NOT EXECUTED
rtems_interrupt_disable (level);
107fdb: 9c pushf
107fdc: fa cli
107fdd: 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) {
107fde: 8b 8b 84 00 00 00 mov 0x84(%ebx),%ecx
107fe4: 8b 93 80 00 00 00 mov 0x80(%ebx),%edx
107fea: 39 d1 cmp %edx,%ecx
107fec: 75 c1 jne 107faf <drainOutput.part.0+0x9>
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
}
rtems_interrupt_enable (level);
107fee: 50 push %eax
107fef: 9d popf
}
}
107ff0: 8b 5d fc mov -0x4(%ebp),%ebx
107ff3: c9 leave
107ff4: c3 ret
00106bac <dup2>:
int dup2(
int fildes,
int fildes2
)
{
106bac: 55 push %ebp
106bad: 89 e5 mov %esp,%ebp
106baf: 57 push %edi
106bb0: 56 push %esi
106bb1: 53 push %ebx
106bb2: 83 ec 64 sub $0x64,%esp
106bb5: 8b 5d 08 mov 0x8(%ebp),%ebx
106bb8: 8b 75 0c mov 0xc(%ebp),%esi
/*
* If fildes is not valid, then fildes2 should not be closed.
*/
status = fstat( fildes, &buf );
106bbb: 8d 7d a0 lea -0x60(%ebp),%edi
106bbe: 57 push %edi
106bbf: 53 push %ebx
106bc0: e8 eb 04 00 00 call 1070b0 <fstat>
if ( status == -1 )
106bc5: 83 c4 10 add $0x10,%esp
106bc8: 40 inc %eax
106bc9: 75 05 jne 106bd0 <dup2+0x24>
return -1;
106bcb: 83 c8 ff or $0xffffffff,%eax
106bce: eb 1c jmp 106bec <dup2+0x40>
/*
* If fildes2 is not valid, then we should not do anything either.
*/
status = fstat( fildes2, &buf );
106bd0: 52 push %edx
106bd1: 52 push %edx
106bd2: 57 push %edi
106bd3: 56 push %esi
106bd4: e8 d7 04 00 00 call 1070b0 <fstat>
if ( status == -1 )
106bd9: 83 c4 10 add $0x10,%esp
106bdc: 40 inc %eax
106bdd: 74 ec je 106bcb <dup2+0x1f> <== NEVER TAKEN
/*
* This fcntl handles everything else.
*/
return fcntl( fildes, F_DUPFD, fildes2 );
106bdf: 50 push %eax
106be0: 56 push %esi
106be1: 6a 00 push $0x0
106be3: 53 push %ebx
106be4: e8 eb 01 00 00 call 106dd4 <fcntl>
106be9: 83 c4 10 add $0x10,%esp
}
106bec: 8d 65 f4 lea -0xc(%ebp),%esp
106bef: 5b pop %ebx
106bf0: 5e pop %esi
106bf1: 5f pop %edi
106bf2: 5d pop %ebp
106bf3: c3 ret
00108ae8 <echo>:
/*
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
108ae8: 55 push %ebp
108ae9: 89 e5 mov %esp,%ebp
108aeb: 53 push %ebx
108aec: 83 ec 24 sub $0x24,%esp
if ((tty->termios.c_lflag & ECHOCTL) &&
108aef: f6 42 3d 02 testb $0x2,0x3d(%edx)
108af3: 74 3e je 108b33 <echo+0x4b> <== NEVER TAKEN
iscntrl(c) && (c != '\t') && (c != '\n')) {
108af5: 0f b6 c8 movzbl %al,%ecx
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
if ((tty->termios.c_lflag & ECHOCTL) &&
108af8: 8b 1d 88 c2 12 00 mov 0x12c288,%ebx
108afe: f6 44 0b 01 20 testb $0x20,0x1(%ebx,%ecx,1)
108b03: 74 2e je 108b33 <echo+0x4b>
iscntrl(c) && (c != '\t') && (c != '\n')) {
108b05: 8d 48 f7 lea -0x9(%eax),%ecx
108b08: 80 f9 01 cmp $0x1,%cl
108b0b: 76 26 jbe 108b33 <echo+0x4b>
char echobuf[2];
echobuf[0] = '^';
108b0d: c6 45 f6 5e movb $0x5e,-0xa(%ebp)
echobuf[1] = c ^ 0x40;
108b11: 83 f0 40 xor $0x40,%eax
108b14: 88 45 f7 mov %al,-0x9(%ebp)
rtems_termios_puts (echobuf, 2, tty);
108b17: 53 push %ebx
108b18: 52 push %edx
108b19: 6a 02 push $0x2
108b1b: 8d 45 f6 lea -0xa(%ebp),%eax
108b1e: 50 push %eax
108b1f: 89 55 e4 mov %edx,-0x1c(%ebp)
108b22: e8 9e fd ff ff call 1088c5 <rtems_termios_puts>
tty->column += 2;
108b27: 8b 55 e4 mov -0x1c(%ebp),%edx
108b2a: 83 42 28 02 addl $0x2,0x28(%edx)
108b2e: 83 c4 10 add $0x10,%esp
108b31: eb 08 jmp 108b3b <echo+0x53>
} else {
oproc (c, tty);
108b33: 0f b6 c0 movzbl %al,%eax
108b36: e8 96 fe ff ff call 1089d1 <oproc>
}
}
108b3b: 8b 5d fc mov -0x4(%ebp),%ebx
108b3e: c9 leave
108b3f: c3 ret
00122635 <endgrent>:
void endgrent(void)
{
if (group_fp != NULL)
122635: a1 20 dc 16 00 mov 0x16dc20,%eax
12263a: 85 c0 test %eax,%eax
12263c: 74 10 je 12264e <endgrent+0x19> <== NEVER TAKEN
fclose(group_fp);
group_fp = fopen("/etc/group", "r");
}
void endgrent(void)
{
12263e: 55 push %ebp
12263f: 89 e5 mov %esp,%ebp
122641: 83 ec 14 sub $0x14,%esp
if (group_fp != NULL)
fclose(group_fp);
122644: 50 push %eax
122645: e8 5a e9 00 00 call 130fa4 <fclose>
12264a: 83 c4 10 add $0x10,%esp
}
12264d: c9 leave
12264e: c3 ret
001224f7 <endpwent>:
void endpwent(void)
{
if (passwd_fp != NULL)
1224f7: a1 44 db 16 00 mov 0x16db44,%eax
1224fc: 85 c0 test %eax,%eax
1224fe: 74 10 je 122510 <endpwent+0x19> <== NEVER TAKEN
fclose(passwd_fp);
passwd_fp = fopen("/etc/passwd", "r");
}
void endpwent(void)
{
122500: 55 push %ebp
122501: 89 e5 mov %esp,%ebp
122503: 83 ec 14 sub $0x14,%esp
if (passwd_fp != NULL)
fclose(passwd_fp);
122506: 50 push %eax
122507: e8 98 ea 00 00 call 130fa4 <fclose>
12250c: 83 c4 10 add $0x10,%esp
}
12250f: c9 leave
122510: c3 ret
00108b40 <erase.part.2>:
* 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)
108b40: 55 push %ebp
108b41: 89 e5 mov %esp,%ebp
108b43: 57 push %edi
108b44: 56 push %esi
108b45: 53 push %ebx
108b46: 83 ec 2c sub $0x2c,%esp
108b49: 89 c3 mov %eax,%ebx
108b4b: 89 55 e4 mov %edx,-0x1c(%ebp)
108b4e: e9 09 01 00 00 jmp 108c5c <erase.part.2+0x11c>
return;
}
}
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
108b53: 8b 53 1c mov 0x1c(%ebx),%edx
108b56: 89 55 d4 mov %edx,-0x2c(%ebp)
108b59: 8d 50 ff lea -0x1(%eax),%edx
108b5c: 89 53 20 mov %edx,0x20(%ebx)
108b5f: 8b 75 d4 mov -0x2c(%ebp),%esi
108b62: 8a 4c 06 ff mov -0x1(%esi,%eax,1),%cl
if (tty->termios.c_lflag & ECHO) {
108b66: 8b 53 3c mov 0x3c(%ebx),%edx
108b69: f6 c2 08 test $0x8,%dl
108b6c: 0f 84 e4 00 00 00 je 108c56 <erase.part.2+0x116> <== NEVER TAKEN
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
108b72: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp)
108b76: 75 17 jne 108b8f <erase.part.2+0x4f>
108b78: f6 c2 10 test $0x10,%dl
108b7b: 75 12 jne 108b8f <erase.part.2+0x4f> <== ALWAYS TAKEN
echo (tty->termios.c_cc[VERASE], tty);
108b7d: 0f b6 43 43 movzbl 0x43(%ebx),%eax <== NOT EXECUTED
108b81: 89 da mov %ebx,%edx <== NOT EXECUTED
}
}
if (!lineFlag)
break;
}
}
108b83: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
108b86: 5b pop %ebx <== NOT EXECUTED
108b87: 5e pop %esi <== NOT EXECUTED
108b88: 5f pop %edi <== NOT EXECUTED
108b89: 5d pop %ebp <== 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);
108b8a: e9 59 ff ff ff jmp 108ae8 <echo> <== NOT EXECUTED
} else if (c == '\t') {
108b8f: 80 f9 09 cmp $0x9,%cl
108b92: 8b 3d 88 c2 12 00 mov 0x12c288,%edi
108b98: 89 7d e0 mov %edi,-0x20(%ebp)
108b9b: 75 5d jne 108bfa <erase.part.2+0xba>
int col = tty->read_start_column;
108b9d: 8b 73 2c mov 0x2c(%ebx),%esi
* 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)
108ba0: b9 01 00 00 00 mov $0x1,%ecx
while (i != tty->ccount) {
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
} else if (iscntrl (c)) {
if (tty->termios.c_lflag & ECHOCTL)
108ba5: 81 e2 00 02 00 00 and $0x200,%edx
108bab: 89 55 dc mov %edx,-0x24(%ebp)
108bae: eb 29 jmp 108bd9 <erase.part.2+0x99>
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
c = tty->cbuf[i++];
108bb0: 8b 7d d4 mov -0x2c(%ebp),%edi
108bb3: 0f b6 54 0f ff movzbl -0x1(%edi,%ecx,1),%edx
if (c == '\t') {
108bb8: 80 fa 09 cmp $0x9,%dl
108bbb: 75 05 jne 108bc2 <erase.part.2+0x82>
col = (col | 7) + 1;
108bbd: 83 ce 07 or $0x7,%esi
108bc0: eb 15 jmp 108bd7 <erase.part.2+0x97>
} else if (iscntrl (c)) {
108bc2: 8b 7d e0 mov -0x20(%ebp),%edi
108bc5: f6 44 17 01 20 testb $0x20,0x1(%edi,%edx,1)
108bca: 74 0b je 108bd7 <erase.part.2+0x97> <== ALWAYS TAKEN
if (tty->termios.c_lflag & ECHOCTL)
108bcc: 83 7d dc 00 cmpl $0x0,-0x24(%ebp) <== NOT EXECUTED
108bd0: 74 06 je 108bd8 <erase.part.2+0x98> <== NOT EXECUTED
col += 2;
108bd2: 83 c6 02 add $0x2,%esi <== NOT EXECUTED
108bd5: eb 01 jmp 108bd8 <erase.part.2+0x98> <== NOT EXECUTED
} else {
col++;
108bd7: 46 inc %esi
108bd8: 41 inc %ecx
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
108bd9: 39 c1 cmp %eax,%ecx
108bdb: 75 d3 jne 108bb0 <erase.part.2+0x70>
108bdd: eb 14 jmp 108bf3 <erase.part.2+0xb3>
/*
* Back up over the tab
*/
while (tty->column > col) {
rtems_termios_puts ("\b", 1, tty);
108bdf: 50 push %eax
108be0: 53 push %ebx
108be1: 6a 01 push $0x1
108be3: 68 18 fa 11 00 push $0x11fa18
108be8: e8 d8 fc ff ff call 1088c5 <rtems_termios_puts>
tty->column--;
108bed: ff 4b 28 decl 0x28(%ebx)
108bf0: 83 c4 10 add $0x10,%esp
}
/*
* Back up over the tab
*/
while (tty->column > col) {
108bf3: 39 73 28 cmp %esi,0x28(%ebx)
108bf6: 7f e7 jg 108bdf <erase.part.2+0x9f>
108bf8: eb 5c jmp 108c56 <erase.part.2+0x116>
rtems_termios_puts ("\b", 1, tty);
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
108bfa: 0f b6 f1 movzbl %cl,%esi
108bfd: 8b 45 e0 mov -0x20(%ebp),%eax
108c00: f6 44 30 01 20 testb $0x20,0x1(%eax,%esi,1)
108c05: 74 21 je 108c28 <erase.part.2+0xe8> <== ALWAYS TAKEN
108c07: 80 e6 02 and $0x2,%dh <== NOT EXECUTED
108c0a: 74 1c je 108c28 <erase.part.2+0xe8> <== NOT EXECUTED
rtems_termios_puts ("\b \b", 3, tty);
108c0c: 57 push %edi <== NOT EXECUTED
108c0d: 53 push %ebx <== NOT EXECUTED
108c0e: 6a 03 push $0x3 <== NOT EXECUTED
108c10: 68 16 fa 11 00 push $0x11fa16 <== NOT EXECUTED
108c15: e8 ab fc ff ff call 1088c5 <rtems_termios_puts> <== NOT EXECUTED
if (tty->column)
108c1a: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED
108c1d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
108c20: 85 c0 test %eax,%eax <== NOT EXECUTED
108c22: 74 04 je 108c28 <erase.part.2+0xe8> <== NOT EXECUTED
tty->column--;
108c24: 48 dec %eax <== NOT EXECUTED
108c25: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED
}
if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) {
108c28: a1 88 c2 12 00 mov 0x12c288,%eax
108c2d: f6 44 30 01 20 testb $0x20,0x1(%eax,%esi,1)
108c32: 74 06 je 108c3a <erase.part.2+0xfa> <== ALWAYS TAKEN
108c34: f6 43 3d 02 testb $0x2,0x3d(%ebx) <== NOT EXECUTED
108c38: 74 1c je 108c56 <erase.part.2+0x116> <== NOT EXECUTED
rtems_termios_puts ("\b \b", 3, tty);
108c3a: 56 push %esi
108c3b: 53 push %ebx
108c3c: 6a 03 push $0x3
108c3e: 68 16 fa 11 00 push $0x11fa16
108c43: e8 7d fc ff ff call 1088c5 <rtems_termios_puts>
if (tty->column)
108c48: 8b 43 28 mov 0x28(%ebx),%eax
108c4b: 83 c4 10 add $0x10,%esp
108c4e: 85 c0 test %eax,%eax
108c50: 74 04 je 108c56 <erase.part.2+0x116> <== NEVER TAKEN
tty->column--;
108c52: 48 dec %eax
108c53: 89 43 28 mov %eax,0x28(%ebx)
}
}
}
if (!lineFlag)
108c56: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp)
108c5a: 74 0b je 108c67 <erase.part.2+0x127>
echo ('\n', tty);
return;
}
}
while (tty->ccount) {
108c5c: 8b 43 20 mov 0x20(%ebx),%eax
108c5f: 85 c0 test %eax,%eax
108c61: 0f 85 ec fe ff ff jne 108b53 <erase.part.2+0x13>
}
}
if (!lineFlag)
break;
}
}
108c67: 8d 65 f4 lea -0xc(%ebp),%esp
108c6a: 5b pop %ebx
108c6b: 5e pop %esi
108c6c: 5f pop %edi
108c6d: 5d pop %ebp
108c6e: c3 ret
001076e7 <eval_path_start>:
size_t pathlen,
int eval_flags,
rtems_filesystem_global_location_t *const *global_root_ptr,
rtems_filesystem_global_location_t *const *global_current_ptr
)
{
1076e7: 55 push %ebp
1076e8: 89 e5 mov %esp,%ebp
1076ea: 57 push %edi
1076eb: 56 push %esi
1076ec: 53 push %ebx
1076ed: 83 ec 2c sub $0x2c,%esp
1076f0: 89 c3 mov %eax,%ebx
1076f2: 89 ce mov %ecx,%esi
memset(ctx, 0, sizeof(*ctx));
1076f4: b9 0e 00 00 00 mov $0xe,%ecx
1076f9: 31 c0 xor %eax,%eax
1076fb: 89 df mov %ebx,%edi
1076fd: f3 ab rep stos %eax,%es:(%edi)
ctx->path = path;
1076ff: 89 13 mov %edx,(%ebx)
ctx->pathlen = pathlen;
107701: 89 73 04 mov %esi,0x4(%ebx)
ctx->flags = eval_flags;
107704: 8b 45 08 mov 0x8(%ebp),%eax
107707: 89 43 10 mov %eax,0x10(%ebx)
rtems_filesystem_eval_path_context_t *ctx,
rtems_filesystem_global_location_t *const *global_root_ptr,
rtems_filesystem_global_location_t *const *global_current_ptr
)
{
if (ctx->pathlen > 0) {
10770a: 85 f6 test %esi,%esi
10770c: 74 41 je 10774f <eval_path_start+0x68>
char c = ctx->path [0];
10770e: 8a 12 mov (%edx),%dl
ctx->rootloc = rtems_filesystem_global_location_obtain(global_root_ptr);
107710: 83 ec 0c sub $0xc,%esp
107713: ff 75 0c pushl 0xc(%ebp)
107716: 88 55 d4 mov %dl,-0x2c(%ebp)
107719: e8 0d 05 00 00 call 107c2b <rtems_filesystem_global_location_obtain>
10771e: 89 43 30 mov %eax,0x30(%ebx)
gid_t node_gid
);
static inline bool rtems_filesystem_is_delimiter(char c)
{
return c == '/' || c == '\\';
107721: 83 c4 10 add $0x10,%esp
if (rtems_filesystem_is_delimiter(c)) {
107724: 8a 55 d4 mov -0x2c(%ebp),%dl
107727: 80 fa 5c cmp $0x5c,%dl
10772a: 74 05 je 107731 <eval_path_start+0x4a> <== NEVER TAKEN
10772c: 80 fa 2f cmp $0x2f,%dl
10772f: 75 0e jne 10773f <eval_path_start+0x58>
++ctx->path;
107731: ff 03 incl (%ebx)
--ctx->pathlen;
107733: ff 4b 04 decl 0x4(%ebx)
ctx->startloc = rtems_filesystem_global_location_obtain(
107736: 83 ec 0c sub $0xc,%esp
&ctx->rootloc
107739: 8d 43 30 lea 0x30(%ebx),%eax
ctx->rootloc = rtems_filesystem_global_location_obtain(global_root_ptr);
if (rtems_filesystem_is_delimiter(c)) {
++ctx->path;
--ctx->pathlen;
ctx->startloc = rtems_filesystem_global_location_obtain(
10773c: 50 push %eax
10773d: eb 06 jmp 107745 <eval_path_start+0x5e>
&ctx->rootloc
);
} else {
ctx->startloc = rtems_filesystem_global_location_obtain(
10773f: 83 ec 0c sub $0xc,%esp
107742: ff 75 10 pushl 0x10(%ebp)
107745: e8 e1 04 00 00 call 107c2b <rtems_filesystem_global_location_obtain>
10774a: 89 43 34 mov %eax,0x34(%ebx)
10774d: eb 33 jmp 107782 <eval_path_start+0x9b>
);
static inline rtems_filesystem_global_location_t *
rtems_filesystem_global_location_obtain_null(void)
{
rtems_filesystem_global_location_t *global_loc = NULL;
10774f: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
return rtems_filesystem_global_location_obtain( &global_loc );
107756: 83 ec 0c sub $0xc,%esp
107759: 8d 75 e4 lea -0x1c(%ebp),%esi
10775c: 56 push %esi
10775d: e8 c9 04 00 00 call 107c2b <rtems_filesystem_global_location_obtain>
global_current_ptr
);
}
} else {
ctx->rootloc = rtems_filesystem_global_location_obtain_null();
107762: 89 43 30 mov %eax,0x30(%ebx)
);
static inline rtems_filesystem_global_location_t *
rtems_filesystem_global_location_obtain_null(void)
{
rtems_filesystem_global_location_t *global_loc = NULL;
107765: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
return rtems_filesystem_global_location_obtain( &global_loc );
10776c: 89 34 24 mov %esi,(%esp)
10776f: e8 b7 04 00 00 call 107c2b <rtems_filesystem_global_location_obtain>
ctx->startloc = rtems_filesystem_global_location_obtain_null();
107774: 89 43 34 mov %eax,0x34(%ebx)
errno = ENOENT;
107777: e8 60 97 00 00 call 110edc <__errno>
10777c: c7 00 02 00 00 00 movl $0x2,(%eax)
&ctx->startloc,
rtems_filesystem_global_location_obtain(newstartloc_ptr)
);
rtems_filesystem_instance_lock(&ctx->startloc->location);
rtems_filesystem_location_clone(&ctx->currentloc, &ctx->startloc->location);
}
107782: 8b 43 34 mov 0x34(%ebx),%eax
107785: 8b 40 14 mov 0x14(%eax),%eax
const rtems_filesystem_location_info_t *loc
)
{
const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry;
(*mt_entry->ops->lock_h)( mt_entry );
107788: 8b 50 0c mov 0xc(%eax),%edx
10778b: 89 04 24 mov %eax,(%esp)
10778e: ff 12 call *(%edx)
set_startloc(ctx, global_root_ptr, global_current_ptr);
rtems_filesystem_instance_lock(&ctx->startloc->location);
rtems_filesystem_location_clone(
107790: 8d 73 18 lea 0x18(%ebx),%esi
107793: 5f pop %edi
107794: 58 pop %eax
107795: ff 73 34 pushl 0x34(%ebx)
107798: 56 push %esi
107799: e8 aa 61 00 00 call 10d948 <rtems_filesystem_location_clone>
&ctx->currentloc,
&ctx->startloc->location
);
rtems_filesystem_eval_path_continue(ctx);
10779e: 89 1c 24 mov %ebx,(%esp)
1077a1: e8 e5 fe ff ff call 10768b <rtems_filesystem_eval_path_continue>
return &ctx->currentloc;
}
1077a6: 89 f0 mov %esi,%eax
1077a8: 8d 65 f4 lea -0xc(%ebp),%esp
1077ab: 5b pop %ebx
1077ac: 5e pop %esi
1077ad: 5f pop %edi
1077ae: 5d pop %ebp
1077af: c3 ret
00112204 <fat_buf_access>:
#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)
{
112204: 55 push %ebp
112205: 89 e5 mov %esp,%ebp
112207: 57 push %edi
112208: 56 push %esi
112209: 53 push %ebx
11220a: 83 ec 2c sub $0x2c,%esp
11220d: 8b 5d 08 mov 0x8(%ebp),%ebx
rtems_status_code sc = RTEMS_SUCCESSFUL;
uint8_t i;
bool sec_of_fat;
if (fs_info->c.state == FAT_CACHE_EMPTY)
112210: 80 7b 7d 00 cmpb $0x0,0x7d(%ebx)
112214: 75 42 jne 112258 <fat_buf_access+0x54>
{
if (op_type == FAT_OP_TYPE_READ)
112216: 83 7d 10 01 cmpl $0x1,0x10(%ebp)
11221a: 8d 83 80 00 00 00 lea 0x80(%ebx),%eax
112220: 75 0f jne 112231 <fat_buf_access+0x2d>
sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &fs_info->c.buf);
112222: 52 push %edx
112223: 50 push %eax
112224: ff 75 0c pushl 0xc(%ebp)
112227: ff 73 58 pushl 0x58(%ebx)
11222a: e8 e2 eb ff ff call 110e11 <rtems_bdbuf_read>
11222f: eb 0d jmp 11223e <fat_buf_access+0x3a>
else
sc = rtems_bdbuf_get(fs_info->vol.dd, blk, &fs_info->c.buf);
112231: 57 push %edi
112232: 50 push %eax
112233: ff 75 0c pushl 0xc(%ebp)
112236: ff 73 58 pushl 0x58(%ebx)
112239: e8 37 eb ff ff call 110d75 <rtems_bdbuf_get>
11223e: 83 c4 10 add $0x10,%esp
if (sc != RTEMS_SUCCESSFUL)
112241: 85 c0 test %eax,%eax
112243: 74 05 je 11224a <fat_buf_access+0x46> <== ALWAYS TAKEN
112245: e9 40 01 00 00 jmp 11238a <fat_buf_access+0x186> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
fs_info->c.blk_num = blk;
11224a: 8b 45 0c mov 0xc(%ebp),%eax
11224d: 89 43 78 mov %eax,0x78(%ebx)
fs_info->c.modified = 0;
112250: c6 43 7c 00 movb $0x0,0x7c(%ebx)
fs_info->c.state = FAT_CACHE_ACTUAL;
112254: c6 43 7d 01 movb $0x1,0x7d(%ebx)
}
sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) &&
112258: 8b 43 78 mov 0x78(%ebx),%eax
11225b: 0f b7 4b 14 movzwl 0x14(%ebx),%ecx
11225f: 31 d2 xor %edx,%edx
112261: 39 c8 cmp %ecx,%eax
112263: 72 08 jb 11226d <fat_buf_access+0x69> <== NEVER TAKEN
112265: 31 d2 xor %edx,%edx
112267: 3b 43 1c cmp 0x1c(%ebx),%eax
11226a: 0f 92 c2 setb %dl
(fs_info->c.blk_num < fs_info->vol.rdir_loc));
if (fs_info->c.blk_num != blk)
11226d: 3b 45 0c cmp 0xc(%ebp),%eax
112270: 0f 84 2e 01 00 00 je 1123a4 <fat_buf_access+0x1a0>
{
if (fs_info->c.modified)
112276: 80 7b 7c 00 cmpb $0x0,0x7c(%ebx)
11227a: 0f 84 c0 00 00 00 je 112340 <fat_buf_access+0x13c>
{
if (sec_of_fat && !fs_info->vol.mirror)
112280: 84 d2 test %dl,%dl
112282: 74 1a je 11229e <fat_buf_access+0x9a>
112284: 80 7b 48 00 cmpb $0x0,0x48(%ebx)
112288: 75 14 jne 11229e <fat_buf_access+0x9a> <== NEVER TAKEN
memcpy(fs_info->sec_buf, fs_info->c.buf->buffer,
11228a: 0f b7 0b movzwl (%ebx),%ecx
11228d: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax
112293: 8b 70 1c mov 0x1c(%eax),%esi
112296: 8b bb 84 00 00 00 mov 0x84(%ebx),%edi
11229c: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
fs_info->vol.bps);
sc = rtems_bdbuf_release_modified(fs_info->c.buf);
11229e: 83 ec 0c sub $0xc,%esp
1122a1: ff b3 80 00 00 00 pushl 0x80(%ebx)
1122a7: 88 55 d0 mov %dl,-0x30(%ebp)
1122aa: e8 51 ed ff ff call 111000 <rtems_bdbuf_release_modified>
fs_info->c.state = FAT_CACHE_EMPTY;
1122af: c6 43 7d 00 movb $0x0,0x7d(%ebx)
fs_info->c.modified = 0;
1122b3: c6 43 7c 00 movb $0x0,0x7c(%ebx)
if (sc != RTEMS_SUCCESSFUL)
1122b7: 83 c4 10 add $0x10,%esp
1122ba: 85 c0 test %eax,%eax
1122bc: 8a 55 d0 mov -0x30(%ebp),%dl
1122bf: 74 05 je 1122c6 <fat_buf_access+0xc2> <== ALWAYS TAKEN
1122c1: e9 c4 00 00 00 jmp 11238a <fat_buf_access+0x186> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
if (sec_of_fat && !fs_info->vol.mirror)
1122c6: 84 d2 test %dl,%dl
1122c8: 0f 84 8d 00 00 00 je 11235b <fat_buf_access+0x157>
1122ce: 80 7b 48 00 cmpb $0x0,0x48(%ebx)
1122d2: 74 5e je 112332 <fat_buf_access+0x12e> <== ALWAYS TAKEN
1122d4: e9 82 00 00 00 jmp 11235b <fat_buf_access+0x157> <== NOT EXECUTED
{
rtems_bdbuf_buffer *b;
for (i = 1; i < fs_info->vol.fats; i++)
{
sc = rtems_bdbuf_get(fs_info->vol.dd,
1122d9: 56 push %esi
1122da: 8d 45 e4 lea -0x1c(%ebp),%eax
1122dd: 50 push %eax
fs_info->c.blk_num +
fs_info->vol.fat_length * i,
1122de: 0f b6 45 d7 movzbl -0x29(%ebp),%eax
1122e2: 0f af 43 18 imul 0x18(%ebx),%eax
{
rtems_bdbuf_buffer *b;
for (i = 1; i < fs_info->vol.fats; i++)
{
sc = rtems_bdbuf_get(fs_info->vol.dd,
1122e6: 03 43 78 add 0x78(%ebx),%eax
1122e9: 50 push %eax
1122ea: ff 73 58 pushl 0x58(%ebx)
1122ed: e8 83 ea ff ff call 110d75 <rtems_bdbuf_get>
fs_info->c.blk_num +
fs_info->vol.fat_length * i,
&b);
if ( sc != RTEMS_SUCCESSFUL)
1122f2: 83 c4 10 add $0x10,%esp
1122f5: 85 c0 test %eax,%eax
1122f7: 74 02 je 1122fb <fat_buf_access+0xf7> <== ALWAYS TAKEN
1122f9: eb 25 jmp 112320 <fat_buf_access+0x11c> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps);
1122fb: 8b 45 e4 mov -0x1c(%ebp),%eax
1122fe: 8b 40 1c mov 0x1c(%eax),%eax
112301: 0f b7 0b movzwl (%ebx),%ecx
112304: 8b b3 84 00 00 00 mov 0x84(%ebx),%esi
11230a: 89 c7 mov %eax,%edi
11230c: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
sc = rtems_bdbuf_release_modified(b);
11230e: 83 ec 0c sub $0xc,%esp
112311: ff 75 e4 pushl -0x1c(%ebp)
112314: e8 e7 ec ff ff call 111000 <rtems_bdbuf_release_modified>
if ( sc != RTEMS_SUCCESSFUL)
112319: 83 c4 10 add $0x10,%esp
11231c: 85 c0 test %eax,%eax
11231e: 74 0d je 11232d <fat_buf_access+0x129> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one(ENOMEM);
112320: e8 eb 74 00 00 call 119810 <__errno> <== NOT EXECUTED
112325: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED
11232b: eb 68 jmp 112395 <fat_buf_access+0x191> <== NOT EXECUTED
if (sec_of_fat && !fs_info->vol.mirror)
{
rtems_bdbuf_buffer *b;
for (i = 1; i < fs_info->vol.fats; i++)
11232d: fe 45 d7 incb -0x29(%ebp)
112330: eb 04 jmp 112336 <fat_buf_access+0x132>
fs_info->c.state = FAT_CACHE_EMPTY;
fs_info->c.modified = 0;
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
if (sec_of_fat && !fs_info->vol.mirror)
112332: c6 45 d7 01 movb $0x1,-0x29(%ebp)
{
rtems_bdbuf_buffer *b;
for (i = 1; i < fs_info->vol.fats; i++)
112336: 8a 45 d7 mov -0x29(%ebp),%al
112339: 3a 43 09 cmp 0x9(%ebx),%al
11233c: 72 9b jb 1122d9 <fat_buf_access+0xd5>
11233e: eb 1b jmp 11235b <fat_buf_access+0x157>
}
}
}
else
{
sc = rtems_bdbuf_release(fs_info->c.buf);
112340: 83 ec 0c sub $0xc,%esp
112343: ff b3 80 00 00 00 pushl 0x80(%ebx)
112349: e8 21 ec ff ff call 110f6f <rtems_bdbuf_release>
fs_info->c.state = FAT_CACHE_EMPTY;
11234e: c6 43 7d 00 movb $0x0,0x7d(%ebx)
if (sc != RTEMS_SUCCESSFUL)
112352: 83 c4 10 add $0x10,%esp
112355: 85 c0 test %eax,%eax
112357: 74 02 je 11235b <fat_buf_access+0x157> <== ALWAYS TAKEN
112359: eb 2f jmp 11238a <fat_buf_access+0x186> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
}
if (op_type == FAT_OP_TYPE_READ)
11235b: 83 7d 10 01 cmpl $0x1,0x10(%ebp)
11235f: 8d 83 80 00 00 00 lea 0x80(%ebx),%eax
112365: 75 0f jne 112376 <fat_buf_access+0x172>
sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &fs_info->c.buf);
112367: 51 push %ecx
112368: 50 push %eax
112369: ff 75 0c pushl 0xc(%ebp)
11236c: ff 73 58 pushl 0x58(%ebx)
11236f: e8 9d ea ff ff call 110e11 <rtems_bdbuf_read>
112374: eb 0d jmp 112383 <fat_buf_access+0x17f>
else
sc = rtems_bdbuf_get(fs_info->vol.dd, blk, &fs_info->c.buf);
112376: 52 push %edx
112377: 50 push %eax
112378: ff 75 0c pushl 0xc(%ebp)
11237b: ff 73 58 pushl 0x58(%ebx)
11237e: e8 f2 e9 ff ff call 110d75 <rtems_bdbuf_get>
112383: 83 c4 10 add $0x10,%esp
if (sc != RTEMS_SUCCESSFUL)
112386: 85 c0 test %eax,%eax
112388: 74 10 je 11239a <fat_buf_access+0x196> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one(EIO);
11238a: e8 81 74 00 00 call 119810 <__errno> <== NOT EXECUTED
11238f: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
112395: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
112398: eb 17 jmp 1123b1 <fat_buf_access+0x1ad> <== NOT EXECUTED
fs_info->c.blk_num = blk;
11239a: 8b 45 0c mov 0xc(%ebp),%eax
11239d: 89 43 78 mov %eax,0x78(%ebx)
fs_info->c.state = FAT_CACHE_ACTUAL;
1123a0: c6 43 7d 01 movb $0x1,0x7d(%ebx)
}
*buf = fs_info->c.buf;
1123a4: 8b 93 80 00 00 00 mov 0x80(%ebx),%edx
1123aa: 8b 45 14 mov 0x14(%ebp),%eax
1123ad: 89 10 mov %edx,(%eax)
return RC_OK;
1123af: 31 c0 xor %eax,%eax
}
1123b1: 8d 65 f4 lea -0xc(%ebp),%esp
1123b4: 5b pop %ebx
1123b5: 5e pop %esi
1123b6: 5f pop %edi
1123b7: 5d pop %ebp
1123b8: c3 ret
001123b9 <fat_buf_release>:
int
fat_buf_release(fat_fs_info_t *fs_info)
{
1123b9: 55 push %ebp
1123ba: 89 e5 mov %esp,%ebp
1123bc: 57 push %edi
1123bd: 56 push %esi
1123be: 53 push %ebx
1123bf: 83 ec 2c sub $0x2c,%esp
1123c2: 8b 5d 08 mov 0x8(%ebp),%ebx
rtems_status_code sc = RTEMS_SUCCESSFUL;
uint8_t i;
bool sec_of_fat;
if (fs_info->c.state == FAT_CACHE_EMPTY)
return RC_OK;
1123c5: 31 c0 xor %eax,%eax
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
uint8_t i;
bool sec_of_fat;
if (fs_info->c.state == FAT_CACHE_EMPTY)
1123c7: 80 7b 7d 00 cmpb $0x0,0x7d(%ebx)
1123cb: 0f 84 06 01 00 00 je 1124d7 <fat_buf_release+0x11e>
return RC_OK;
sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) &&
1123d1: 8b 43 78 mov 0x78(%ebx),%eax
1123d4: 0f b7 4b 14 movzwl 0x14(%ebx),%ecx
1123d8: 31 d2 xor %edx,%edx
1123da: 39 c8 cmp %ecx,%eax
1123dc: 72 08 jb 1123e6 <fat_buf_release+0x2d> <== NEVER TAKEN
1123de: 31 d2 xor %edx,%edx
1123e0: 3b 43 1c cmp 0x1c(%ebx),%eax
1123e3: 0f 92 c2 setb %dl
(fs_info->c.blk_num < fs_info->vol.rdir_loc));
if (fs_info->c.modified)
1123e6: 80 7b 7c 00 cmpb $0x0,0x7c(%ebx)
1123ea: 0f 84 bc 00 00 00 je 1124ac <fat_buf_release+0xf3>
{
if (sec_of_fat && !fs_info->vol.mirror)
1123f0: 84 d2 test %dl,%dl
1123f2: 74 1a je 11240e <fat_buf_release+0x55>
1123f4: 80 7b 48 00 cmpb $0x0,0x48(%ebx)
1123f8: 75 14 jne 11240e <fat_buf_release+0x55> <== NEVER TAKEN
memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, fs_info->vol.bps);
1123fa: 0f b7 0b movzwl (%ebx),%ecx
1123fd: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax
112403: 8b 70 1c mov 0x1c(%eax),%esi
112406: 8b bb 84 00 00 00 mov 0x84(%ebx),%edi
11240c: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
sc = rtems_bdbuf_release_modified(fs_info->c.buf);
11240e: 83 ec 0c sub $0xc,%esp
112411: ff b3 80 00 00 00 pushl 0x80(%ebx)
112417: 88 55 d0 mov %dl,-0x30(%ebp)
11241a: e8 e1 eb ff ff call 111000 <rtems_bdbuf_release_modified>
if (sc != RTEMS_SUCCESSFUL)
11241f: 83 c4 10 add $0x10,%esp
112422: 85 c0 test %eax,%eax
112424: 8a 55 d0 mov -0x30(%ebp),%dl
112427: 74 05 je 11242e <fat_buf_release+0x75> <== ALWAYS TAKEN
112429: e9 93 00 00 00 jmp 1124c1 <fat_buf_release+0x108> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
fs_info->c.modified = 0;
11242e: c6 43 7c 00 movb $0x0,0x7c(%ebx)
if (sec_of_fat && !fs_info->vol.mirror)
112432: 84 d2 test %dl,%dl
112434: 0f 84 97 00 00 00 je 1124d1 <fat_buf_release+0x118>
11243a: 80 7b 48 00 cmpb $0x0,0x48(%ebx)
11243e: 74 5e je 11249e <fat_buf_release+0xe5> <== ALWAYS TAKEN
112440: e9 8c 00 00 00 jmp 1124d1 <fat_buf_release+0x118> <== NOT EXECUTED
{
rtems_bdbuf_buffer *b;
for (i = 1; i < fs_info->vol.fats; i++)
{
sc = rtems_bdbuf_get(fs_info->vol.dd,
112445: 51 push %ecx
112446: 8d 45 e4 lea -0x1c(%ebp),%eax
112449: 50 push %eax
fs_info->c.blk_num +
fs_info->vol.fat_length * i,
11244a: 0f b6 45 d7 movzbl -0x29(%ebp),%eax
11244e: 0f af 43 18 imul 0x18(%ebx),%eax
{
rtems_bdbuf_buffer *b;
for (i = 1; i < fs_info->vol.fats; i++)
{
sc = rtems_bdbuf_get(fs_info->vol.dd,
112452: 03 43 78 add 0x78(%ebx),%eax
112455: 50 push %eax
112456: ff 73 58 pushl 0x58(%ebx)
112459: e8 17 e9 ff ff call 110d75 <rtems_bdbuf_get>
fs_info->c.blk_num +
fs_info->vol.fat_length * i,
&b);
if ( sc != RTEMS_SUCCESSFUL)
11245e: 83 c4 10 add $0x10,%esp
112461: 85 c0 test %eax,%eax
112463: 74 02 je 112467 <fat_buf_release+0xae> <== ALWAYS TAKEN
112465: eb 25 jmp 11248c <fat_buf_release+0xd3> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps);
112467: 8b 45 e4 mov -0x1c(%ebp),%eax
11246a: 8b 40 1c mov 0x1c(%eax),%eax
11246d: 0f b7 0b movzwl (%ebx),%ecx
112470: 8b b3 84 00 00 00 mov 0x84(%ebx),%esi
112476: 89 c7 mov %eax,%edi
112478: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
sc = rtems_bdbuf_release_modified(b);
11247a: 83 ec 0c sub $0xc,%esp
11247d: ff 75 e4 pushl -0x1c(%ebp)
112480: e8 7b eb ff ff call 111000 <rtems_bdbuf_release_modified>
if ( sc != RTEMS_SUCCESSFUL)
112485: 83 c4 10 add $0x10,%esp
112488: 85 c0 test %eax,%eax
11248a: 74 0d je 112499 <fat_buf_release+0xe0> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one(ENOMEM);
11248c: e8 7f 73 00 00 call 119810 <__errno> <== NOT EXECUTED
112491: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED
112497: eb 33 jmp 1124cc <fat_buf_release+0x113> <== NOT EXECUTED
if (sec_of_fat && !fs_info->vol.mirror)
{
rtems_bdbuf_buffer *b;
for (i = 1; i < fs_info->vol.fats; i++)
112499: fe 45 d7 incb -0x29(%ebp)
11249c: eb 04 jmp 1124a2 <fat_buf_release+0xe9>
sc = rtems_bdbuf_release_modified(fs_info->c.buf);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
fs_info->c.modified = 0;
if (sec_of_fat && !fs_info->vol.mirror)
11249e: c6 45 d7 01 movb $0x1,-0x29(%ebp)
{
rtems_bdbuf_buffer *b;
for (i = 1; i < fs_info->vol.fats; i++)
1124a2: 8a 45 d7 mov -0x29(%ebp),%al
1124a5: 3a 43 09 cmp 0x9(%ebx),%al
1124a8: 72 9b jb 112445 <fat_buf_release+0x8c>
1124aa: eb 25 jmp 1124d1 <fat_buf_release+0x118>
}
}
}
else
{
sc = rtems_bdbuf_release(fs_info->c.buf);
1124ac: 83 ec 0c sub $0xc,%esp
1124af: ff b3 80 00 00 00 pushl 0x80(%ebx)
1124b5: e8 b5 ea ff ff call 110f6f <rtems_bdbuf_release>
if (sc != RTEMS_SUCCESSFUL)
1124ba: 83 c4 10 add $0x10,%esp
1124bd: 85 c0 test %eax,%eax
1124bf: 74 10 je 1124d1 <fat_buf_release+0x118> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one(EIO);
1124c1: e8 4a 73 00 00 call 119810 <__errno> <== NOT EXECUTED
1124c6: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
1124cc: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
1124cf: eb 06 jmp 1124d7 <fat_buf_release+0x11e> <== NOT EXECUTED
}
fs_info->c.state = FAT_CACHE_EMPTY;
1124d1: c6 43 7d 00 movb $0x0,0x7d(%ebx)
return RC_OK;
1124d5: 31 c0 xor %eax,%eax
}
1124d7: 8d 65 f4 lea -0xc(%ebp),%esp
1124da: 5b pop %ebx
1124db: 5e pop %esi
1124dc: 5f pop %edi
1124dd: 5d pop %ebp
1124de: c3 ret
001117b8 <fat_cluster_num_to_sector_num>:
static inline uint32_t
fat_cluster_num_to_sector_num(
const fat_fs_info_t *fs_info,
uint32_t cln
)
{
1117b8: 55 push %ebp
1117b9: 89 e5 mov %esp,%ebp
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
1117bb: 85 d2 test %edx,%edx
1117bd: 75 0b jne 1117ca <fat_cluster_num_to_sector_num+0x12>
1117bf: f6 40 0a 03 testb $0x3,0xa(%eax)
1117c3: 74 05 je 1117ca <fat_cluster_num_to_sector_num+0x12><== NEVER TAKEN
return fs_info->vol.rdir_loc;
1117c5: 8b 50 1c mov 0x1c(%eax),%edx
1117c8: eb 0c jmp 1117d6 <fat_cluster_num_to_sector_num+0x1e>
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
1117ca: 83 ea 02 sub $0x2,%edx
1117cd: 0f b6 48 05 movzbl 0x5(%eax),%ecx
1117d1: d3 e2 shl %cl,%edx
1117d3: 03 50 30 add 0x30(%eax),%edx
fs_info->vol.data_fsec);
}
1117d6: 89 d0 mov %edx,%eax
1117d8: 5d pop %ebp
1117d9: c3 ret
00112671 <fat_cluster_read>:
fat_cluster_read(
fat_fs_info_t *fs_info,
uint32_t cln,
void *buff
)
{
112671: 55 push %ebp <== NOT EXECUTED
112672: 89 e5 mov %esp,%ebp <== NOT EXECUTED
112674: 53 push %ebx <== NOT EXECUTED
112675: 53 push %ebx <== NOT EXECUTED
112676: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
112679: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
fat_cluster_num_to_sector_num(
const fat_fs_info_t *fs_info,
uint32_t cln
)
{
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
11267c: 85 d2 test %edx,%edx <== NOT EXECUTED
11267e: 75 0b jne 11268b <fat_cluster_read+0x1a> <== NOT EXECUTED
112680: f6 40 0a 03 testb $0x3,0xa(%eax) <== NOT EXECUTED
112684: 74 05 je 11268b <fat_cluster_read+0x1a> <== NOT EXECUTED
return fs_info->vol.rdir_loc;
112686: 8b 50 1c mov 0x1c(%eax),%edx <== NOT EXECUTED
112689: eb 0c jmp 112697 <fat_cluster_read+0x26> <== NOT EXECUTED
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
11268b: 83 ea 02 sub $0x2,%edx <== NOT EXECUTED
11268e: 0f b6 48 05 movzbl 0x5(%eax),%ecx <== NOT EXECUTED
112692: d3 e2 shl %cl,%edx <== NOT EXECUTED
112694: 03 50 30 add 0x30(%eax),%edx <== NOT EXECUTED
uint32_t fsec = 0;
fsec = fat_cluster_num_to_sector_num(fs_info, cln);
return _fat_block_read(fs_info, fsec, 0,
112697: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11269a: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED
fs_info->vol.spc << fs_info->vol.sec_log2, buff);
11269d: 0f b6 58 04 movzbl 0x4(%eax),%ebx <== NOT EXECUTED
1126a1: 0f b6 48 02 movzbl 0x2(%eax),%ecx <== NOT EXECUTED
1126a5: d3 e3 shl %cl,%ebx <== NOT EXECUTED
{
uint32_t fsec = 0;
fsec = fat_cluster_num_to_sector_num(fs_info, cln);
return _fat_block_read(fs_info, fsec, 0,
1126a7: 53 push %ebx <== NOT EXECUTED
1126a8: 6a 00 push $0x0 <== NOT EXECUTED
1126aa: 52 push %edx <== NOT EXECUTED
1126ab: 50 push %eax <== NOT EXECUTED
1126ac: e8 2e fe ff ff call 1124df <_fat_block_read> <== NOT EXECUTED
fs_info->vol.spc << fs_info->vol.sec_log2, buff);
}
1126b1: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
1126b4: c9 leave <== NOT EXECUTED
1126b5: c3 ret <== NOT EXECUTED
001126b6 <fat_cluster_write>:
fat_cluster_write(
fat_fs_info_t *fs_info,
uint32_t cln,
const void *buff
)
{
1126b6: 55 push %ebp
1126b7: 89 e5 mov %esp,%ebp
1126b9: 53 push %ebx
1126ba: 50 push %eax
1126bb: 8b 45 08 mov 0x8(%ebp),%eax
1126be: 8b 55 0c mov 0xc(%ebp),%edx
fat_cluster_num_to_sector_num(
const fat_fs_info_t *fs_info,
uint32_t cln
)
{
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
1126c1: 85 d2 test %edx,%edx
1126c3: 75 0b jne 1126d0 <fat_cluster_write+0x1a><== ALWAYS TAKEN
1126c5: f6 40 0a 03 testb $0x3,0xa(%eax) <== NOT EXECUTED
1126c9: 74 05 je 1126d0 <fat_cluster_write+0x1a><== NOT EXECUTED
return fs_info->vol.rdir_loc;
1126cb: 8b 50 1c mov 0x1c(%eax),%edx <== NOT EXECUTED
1126ce: eb 0c jmp 1126dc <fat_cluster_write+0x26><== NOT EXECUTED
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
1126d0: 83 ea 02 sub $0x2,%edx
1126d3: 0f b6 48 05 movzbl 0x5(%eax),%ecx
1126d7: d3 e2 shl %cl,%edx
1126d9: 03 50 30 add 0x30(%eax),%edx
uint32_t fsec = 0;
fsec = fat_cluster_num_to_sector_num(fs_info, cln);
return _fat_block_write(fs_info, fsec, 0,
1126dc: 83 ec 0c sub $0xc,%esp
1126df: ff 75 10 pushl 0x10(%ebp)
fs_info->vol.spc << fs_info->vol.sec_log2, buff);
1126e2: 0f b6 58 04 movzbl 0x4(%eax),%ebx
1126e6: 0f b6 48 02 movzbl 0x2(%eax),%ecx
1126ea: d3 e3 shl %cl,%ebx
{
uint32_t fsec = 0;
fsec = fat_cluster_num_to_sector_num(fs_info, cln);
return _fat_block_write(fs_info, fsec, 0,
1126ec: 53 push %ebx
1126ed: 6a 00 push $0x0
1126ef: 52 push %edx
1126f0: 50 push %eax
1126f1: e8 5e fe ff ff call 112554 <_fat_block_write>
fs_info->vol.spc << fs_info->vol.sec_log2, buff);
}
1126f6: 8b 5d fc mov -0x4(%ebp),%ebx
1126f9: c9 leave
1126fa: c3 ret
0011286a <fat_fat32_update_fsinfo_sector>:
fat_fat32_update_fsinfo_sector(
fat_fs_info_t *fs_info,
uint32_t free_count,
uint32_t next_free
)
{
11286a: 55 push %ebp <== NOT EXECUTED
11286b: 89 e5 mov %esp,%ebp <== NOT EXECUTED
11286d: 56 push %esi <== NOT EXECUTED
11286e: 53 push %ebx <== NOT EXECUTED
11286f: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED
112872: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
ssize_t ret1 = 0, ret2 = 0;
uint32_t le_free_count = 0;
uint32_t le_next_free = 0;
le_free_count = CT_LE_L(free_count);
112875: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
112878: 89 45 f0 mov %eax,-0x10(%ebp) <== NOT EXECUTED
le_next_free = CT_LE_L(next_free);
11287b: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
11287e: 89 45 f4 mov %eax,-0xc(%ebp) <== NOT EXECUTED
ret1 = _fat_block_write(fs_info,
fs_info->vol.info_sec,
FAT_FSINFO_FREE_CLUSTER_COUNT_OFFSET,
4,
(char *)(&le_free_count));
112881: 8d 45 f0 lea -0x10(%ebp),%eax <== NOT EXECUTED
uint32_t le_next_free = 0;
le_free_count = CT_LE_L(free_count);
le_next_free = CT_LE_L(next_free);
ret1 = _fat_block_write(fs_info,
112884: 50 push %eax <== NOT EXECUTED
112885: 6a 04 push $0x4 <== NOT EXECUTED
112887: 68 e8 01 00 00 push $0x1e8 <== NOT EXECUTED
11288c: 0f b7 43 3c movzwl 0x3c(%ebx),%eax <== NOT EXECUTED
112890: 50 push %eax <== NOT EXECUTED
112891: 53 push %ebx <== NOT EXECUTED
112892: e8 bd fc ff ff call 112554 <_fat_block_write> <== NOT EXECUTED
112897: 89 c6 mov %eax,%esi <== NOT EXECUTED
fs_info->vol.info_sec,
FAT_FSINFO_FREE_CLUSTER_COUNT_OFFSET,
4,
(char *)(&le_free_count));
ret2 = _fat_block_write(fs_info,
112899: 83 c4 14 add $0x14,%esp <== NOT EXECUTED
fs_info->vol.info_sec,
FAT_FSINFO_NEXT_FREE_CLUSTER_OFFSET,
4,
(char *)(&le_next_free));
11289c: 8d 45 f4 lea -0xc(%ebp),%eax <== NOT EXECUTED
fs_info->vol.info_sec,
FAT_FSINFO_FREE_CLUSTER_COUNT_OFFSET,
4,
(char *)(&le_free_count));
ret2 = _fat_block_write(fs_info,
11289f: 50 push %eax <== NOT EXECUTED
1128a0: 6a 04 push $0x4 <== NOT EXECUTED
1128a2: 68 ec 01 00 00 push $0x1ec <== NOT EXECUTED
1128a7: 0f b7 43 3c movzwl 0x3c(%ebx),%eax <== NOT EXECUTED
1128ab: 50 push %eax <== NOT EXECUTED
1128ac: 53 push %ebx <== NOT EXECUTED
1128ad: e8 a2 fc ff ff call 112554 <_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) )
1128b2: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
1128b5: c1 e8 1f shr $0x1f,%eax <== NOT EXECUTED
1128b8: 75 07 jne 1128c1 <fat_fat32_update_fsinfo_sector+0x57><== NOT EXECUTED
return -1;
return RC_OK;
1128ba: 31 c0 xor %eax,%eax <== NOT EXECUTED
fs_info->vol.info_sec,
FAT_FSINFO_NEXT_FREE_CLUSTER_OFFSET,
4,
(char *)(&le_next_free));
if ( (ret1 < 0) || (ret2 < 0) )
1128bc: c1 ee 1f shr $0x1f,%esi <== NOT EXECUTED
1128bf: 74 03 je 1128c4 <fat_fat32_update_fsinfo_sector+0x5a><== NOT EXECUTED
return -1;
1128c1: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
return RC_OK;
}
1128c4: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
1128c7: 5b pop %ebx <== NOT EXECUTED
1128c8: 5e pop %esi <== NOT EXECUTED
1128c9: 5d pop %ebp <== NOT EXECUTED
1128ca: c3 ret <== NOT EXECUTED
00111c38 <fat_file_close>:
int
fat_file_close(
fat_fs_info_t *fs_info,
fat_file_fd_t *fat_fd
)
{
111c38: 55 push %ebp
111c39: 89 e5 mov %esp,%ebp
111c3b: 56 push %esi
111c3c: 53 push %ebx
111c3d: 8b 75 08 mov 0x8(%ebp),%esi
111c40: 8b 5d 0c mov 0xc(%ebp),%ebx
/*
* 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)
111c43: 8b 43 08 mov 0x8(%ebx),%eax
111c46: 83 f8 01 cmp $0x1,%eax
111c49: 76 0b jbe 111c56 <fat_file_close+0x1e>
{
fat_fd->links_num--;
111c4b: 48 dec %eax
111c4c: 89 43 08 mov %eax,0x8(%ebx)
return rc;
111c4f: 31 c0 xor %eax,%eax
111c51: e9 81 00 00 00 jmp 111cd7 <fat_file_close+0x9f>
}
key = fat_construct_key(fs_info, &fat_fd->dir_pos.sname);
if (fat_fd->flags & FAT_FILE_REMOVED)
111c56: f6 43 30 01 testb $0x1,0x30(%ebx)
111c5a: 74 3f je 111c9b <fat_file_close+0x63>
{
rc = fat_file_truncate(fs_info, fat_fd, 0);
111c5c: 51 push %ecx
111c5d: 6a 00 push $0x0
111c5f: 53 push %ebx
111c60: 56 push %esi
111c61: e8 f4 fe ff ff call 111b5a <fat_file_truncate>
if ( rc != RC_OK )
111c66: 83 c4 10 add $0x10,%esp
111c69: 85 c0 test %eax,%eax
111c6b: 75 6a jne 111cd7 <fat_file_close+0x9f> <== NEVER TAKEN
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
111c6d: 83 ec 0c sub $0xc,%esp
111c70: 53 push %ebx
111c71: e8 7a 31 00 00 call 114df0 <_Chain_Extract>
return rc;
_hash_delete(fs_info->rhash, key, fat_fd->ino, fat_fd);
if ( fat_ino_is_unique(fs_info, fat_fd->ino) )
111c76: 58 pop %eax
111c77: 5a pop %edx
111c78: ff 73 0c pushl 0xc(%ebx)
111c7b: 56 push %esi
111c7c: e8 d8 0b 00 00 call 112859 <fat_ino_is_unique>
111c81: 83 c4 10 add $0x10,%esp
111c84: 84 c0 test %al,%al
111c86: 74 0e je 111c96 <fat_file_close+0x5e> <== ALWAYS TAKEN
fat_free_unique_ino(fs_info, fat_fd->ino);
111c88: 50 push %eax <== NOT EXECUTED
111c89: 50 push %eax <== NOT EXECUTED
111c8a: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED
111c8d: 56 push %esi <== NOT EXECUTED
111c8e: e8 a2 0b 00 00 call 112835 <fat_free_unique_ino> <== NOT EXECUTED
111c93: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
free(fat_fd);
111c96: 83 ec 0c sub $0xc,%esp
111c99: eb 25 jmp 111cc0 <fat_file_close+0x88>
}
else
{
if (fat_ino_is_unique(fs_info, fat_fd->ino))
111c9b: 50 push %eax
111c9c: 50 push %eax
111c9d: ff 73 0c pushl 0xc(%ebx)
111ca0: 56 push %esi
111ca1: e8 b3 0b 00 00 call 112859 <fat_ino_is_unique>
111ca6: 83 c4 10 add $0x10,%esp
111ca9: 84 c0 test %al,%al
111cab: 74 09 je 111cb6 <fat_file_close+0x7e> <== ALWAYS TAKEN
{
fat_fd->links_num = 0;
111cad: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) <== NOT EXECUTED
111cb4: eb 13 jmp 111cc9 <fat_file_close+0x91> <== NOT EXECUTED
111cb6: 83 ec 0c sub $0xc,%esp
111cb9: 53 push %ebx
111cba: e8 31 31 00 00 call 114df0 <_Chain_Extract>
}
else
{
_hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd);
free(fat_fd);
111cbf: 58 pop %eax
111cc0: 53 push %ebx
111cc1: e8 66 55 ff ff call 10722c <free>
111cc6: 83 c4 10 add $0x10,%esp
}
}
/*
* flush any modified "cached" buffer back to disk
*/
rc = fat_buf_release(fs_info);
111cc9: 89 75 08 mov %esi,0x8(%ebp)
return rc;
}
111ccc: 8d 65 f8 lea -0x8(%ebp),%esp
111ccf: 5b pop %ebx
111cd0: 5e pop %esi
111cd1: 5d pop %ebp
}
}
/*
* flush any modified "cached" buffer back to disk
*/
rc = fat_buf_release(fs_info);
111cd2: e9 e2 06 00 00 jmp 1123b9 <fat_buf_release>
return rc;
}
111cd7: 8d 65 f8 lea -0x8(%ebp),%esp
111cda: 5b pop %ebx
111cdb: 5e pop %esi
111cdc: 5d pop %ebp
111cdd: c3 ret
00111d64 <fat_file_extend>:
fat_file_fd_t *fat_fd,
bool zero_fill,
uint32_t new_length,
uint32_t *a_length
)
{
111d64: 55 push %ebp
111d65: 89 e5 mov %esp,%ebp
111d67: 57 push %edi
111d68: 56 push %esi
111d69: 53 push %ebx
111d6a: 83 ec 2c sub $0x2c,%esp
111d6d: 8b 5d 08 mov 0x8(%ebp),%ebx
111d70: 8b 75 0c mov 0xc(%ebp),%esi
111d73: 8a 45 10 mov 0x10(%ebp),%al
111d76: 88 45 cf mov %al,-0x31(%ebp)
int rc = RC_OK;
uint32_t chain = 0;
111d79: c7 45 d8 00 00 00 00 movl $0x0,-0x28(%ebp)
uint32_t bytes2add = 0;
uint32_t cls2add = 0;
uint32_t old_last_cl;
uint32_t last_cl = 0;
111d80: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
uint32_t bytes_remain = 0;
uint32_t cls_added;
*a_length = new_length;
111d87: 8b 4d 14 mov 0x14(%ebp),%ecx
111d8a: 8b 55 18 mov 0x18(%ebp),%edx
111d8d: 89 0a mov %ecx,(%edx)
if (new_length <= fat_fd->fat_file_size)
111d8f: 8b 46 18 mov 0x18(%esi),%eax
111d92: 39 c1 cmp %eax,%ecx
111d94: 77 07 ja 111d9d <fat_file_extend+0x39>
return RC_OK;
111d96: 31 d2 xor %edx,%edx
111d98: e9 db 01 00 00 jmp 111f78 <fat_file_extend+0x214>
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
111d9d: 83 7e 20 01 cmpl $0x1,0x20(%esi)
111da1: 75 11 jne 111db4 <fat_file_extend+0x50> <== ALWAYS TAKEN
111da3: 83 7e 24 00 cmpl $0x0,0x24(%esi) <== NOT EXECUTED
111da7: 75 0b jne 111db4 <fat_file_extend+0x50> <== NOT EXECUTED
111da9: f6 43 0a 03 testb $0x3,0xa(%ebx) <== NOT EXECUTED
111dad: 74 05 je 111db4 <fat_file_extend+0x50> <== NOT EXECUTED
111daf: e9 d3 00 00 00 jmp 111e87 <fat_file_extend+0x123> <== NOT EXECUTED
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
rtems_set_errno_and_return_minus_one( ENOSPC );
bytes_remain = (fs_info->vol.bpc -
(fat_fd->fat_file_size & (fs_info->vol.bpc - 1))) &
111db4: 0f b7 7b 06 movzwl 0x6(%ebx),%edi
111db8: 8d 57 ff lea -0x1(%edi),%edx
111dbb: 89 d1 mov %edx,%ecx
111dbd: 21 c1 and %eax,%ecx
111dbf: 89 4d d0 mov %ecx,-0x30(%ebp)
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 -
111dc2: 29 cf sub %ecx,%edi
111dc4: 21 d7 and %edx,%edi
(fat_fd->fat_file_size & (fs_info->vol.bpc - 1))) &
(fs_info->vol.bpc - 1);
bytes2add = new_length - fat_fd->fat_file_size;
111dc6: 8b 55 14 mov 0x14(%ebp),%edx
111dc9: 29 c2 sub %eax,%edx
if (bytes2add > bytes_remain)
bytes2add -= bytes_remain;
else
bytes2add = 0;
111dcb: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp)
(fat_fd->fat_file_size & (fs_info->vol.bpc - 1))) &
(fs_info->vol.bpc - 1);
bytes2add = new_length - fat_fd->fat_file_size;
if (bytes2add > bytes_remain)
111dd2: 39 fa cmp %edi,%edx
111dd4: 76 05 jbe 111ddb <fat_file_extend+0x77>
bytes2add -= bytes_remain;
111dd6: 29 fa sub %edi,%edx
111dd8: 89 55 d4 mov %edx,-0x2c(%ebp)
else
bytes2add = 0;
if (zero_fill && bytes_remain > 0) {
111ddb: 85 ff test %edi,%edi
111ddd: 74 5d je 111e3c <fat_file_extend+0xd8>
111ddf: 80 7d cf 00 cmpb $0x0,-0x31(%ebp)
111de3: 74 57 je 111e3c <fat_file_extend+0xd8>
uint32_t ofs = start & (fs_info->vol.bpc - 1);
uint32_t cur_cln;
uint32_t sec;
uint32_t byte;
rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln);
111de5: 83 ec 0c sub $0xc,%esp
else
bytes2add = 0;
if (zero_fill && bytes_remain > 0) {
uint32_t start = fat_fd->fat_file_size;
uint32_t cl_start = start >> fs_info->vol.bpc_log2;
111de8: 0f b6 4b 08 movzbl 0x8(%ebx),%ecx
111dec: d3 e8 shr %cl,%eax
111dee: 89 c1 mov %eax,%ecx
uint32_t ofs = start & (fs_info->vol.bpc - 1);
uint32_t cur_cln;
uint32_t sec;
uint32_t byte;
rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln);
111df0: 8d 45 e4 lea -0x1c(%ebp),%eax
111df3: 50 push %eax
111df4: 89 f2 mov %esi,%edx
111df6: 89 d8 mov %ebx,%eax
111df8: e8 1c fa ff ff call 111819 <fat_file_lseek>
111dfd: 89 c2 mov %eax,%edx
if (rc != RC_OK)
111dff: 83 c4 10 add $0x10,%esp
111e02: 85 c0 test %eax,%eax
111e04: 0f 85 6e 01 00 00 jne 111f78 <fat_file_extend+0x214> <== NEVER TAKEN
return rc;
sec = fat_cluster_num_to_sector_num(fs_info, cur_cln);
111e0a: 8b 55 e4 mov -0x1c(%ebp),%edx
111e0d: 89 d8 mov %ebx,%eax
111e0f: e8 a4 f9 ff ff call 1117b8 <fat_cluster_num_to_sector_num>
sec += ofs >> fs_info->vol.sec_log2;
byte = ofs & (fs_info->vol.bps - 1);
rc = _fat_block_zero(fs_info, sec, byte, bytes_remain);
111e14: 57 push %edi
if (rc != RC_OK)
return rc;
sec = fat_cluster_num_to_sector_num(fs_info, cur_cln);
sec += ofs >> fs_info->vol.sec_log2;
byte = ofs & (fs_info->vol.bps - 1);
111e15: 0f b7 13 movzwl (%ebx),%edx
111e18: 4a dec %edx
111e19: 23 55 d0 and -0x30(%ebp),%edx
rc = _fat_block_zero(fs_info, sec, byte, bytes_remain);
111e1c: 52 push %edx
rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln);
if (rc != RC_OK)
return rc;
sec = fat_cluster_num_to_sector_num(fs_info, cur_cln);
sec += ofs >> fs_info->vol.sec_log2;
111e1d: 0f b6 4b 02 movzbl 0x2(%ebx),%ecx
111e21: 8b 55 d0 mov -0x30(%ebp),%edx
111e24: d3 ea shr %cl,%edx
111e26: 01 d0 add %edx,%eax
byte = ofs & (fs_info->vol.bps - 1);
rc = _fat_block_zero(fs_info, sec, byte, bytes_remain);
111e28: 50 push %eax
111e29: 53 push %ebx
111e2a: e8 bb 07 00 00 call 1125ea <_fat_block_zero>
111e2f: 89 c2 mov %eax,%edx
if (rc != RC_OK)
111e31: 83 c4 10 add $0x10,%esp
111e34: 85 c0 test %eax,%eax
111e36: 0f 85 3c 01 00 00 jne 111f78 <fat_file_extend+0x214> <== NEVER TAKEN
/*
* 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)
111e3c: 83 7d d4 00 cmpl $0x0,-0x2c(%ebp)
111e40: 0f 84 50 ff ff ff je 111d96 <fat_file_extend+0x32>
return RC_OK;
cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1;
111e46: 8b 45 d4 mov -0x2c(%ebp),%eax
111e49: 48 dec %eax
111e4a: 0f b6 4b 08 movzbl 0x8(%ebx),%ecx
111e4e: d3 e8 shr %cl,%eax
111e50: 8d 48 01 lea 0x1(%eax),%ecx
rc = fat_scan_fat_for_free_clusters(fs_info, &chain, cls2add,
111e53: 50 push %eax
111e54: 50 push %eax
111e55: 0f b6 45 cf movzbl -0x31(%ebp),%eax
111e59: 50 push %eax
111e5a: 8d 45 e0 lea -0x20(%ebp),%eax
111e5d: 50 push %eax
111e5e: 8d 45 e4 lea -0x1c(%ebp),%eax
111e61: 50 push %eax
111e62: 51 push %ecx
111e63: 8d 45 d8 lea -0x28(%ebp),%eax
111e66: 50 push %eax
111e67: 53 push %ebx
111e68: 89 4d c8 mov %ecx,-0x38(%ebp)
111e6b: e8 96 60 00 00 call 117f06 <fat_scan_fat_for_free_clusters>
111e70: 89 c2 mov %eax,%edx
&cls_added, &last_cl, zero_fill);
/* this means that low level I/O error occured */
if (rc != RC_OK)
111e72: 83 c4 20 add $0x20,%esp
111e75: 85 c0 test %eax,%eax
111e77: 8b 4d c8 mov -0x38(%ebp),%ecx
111e7a: 0f 85 f8 00 00 00 jne 111f78 <fat_file_extend+0x214> <== NEVER TAKEN
return rc;
/* this means that no space left on device */
if ((cls_added == 0) && (bytes_remain == 0))
111e80: 8b 45 e4 mov -0x1c(%ebp),%eax
111e83: 09 c7 or %eax,%edi
111e85: 75 13 jne 111e9a <fat_file_extend+0x136> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one(ENOSPC);
111e87: e8 84 79 00 00 call 119810 <__errno> <== NOT EXECUTED
111e8c: c7 00 1c 00 00 00 movl $0x1c,(%eax) <== NOT EXECUTED
111e92: 83 ca ff or $0xffffffff,%edx <== NOT EXECUTED
111e95: e9 de 00 00 00 jmp 111f78 <fat_file_extend+0x214> <== NOT EXECUTED
/* check wether we satisfied request for 'cls2add' clusters */
if (cls2add != cls_added)
111e9a: 39 c1 cmp %eax,%ecx
111e9c: 74 18 je 111eb6 <fat_file_extend+0x152> <== ALWAYS TAKEN
{
new_length -= bytes2add & (fs_info->vol.bpc - 1);
111e9e: 0f b7 7b 06 movzwl 0x6(%ebx),%edi <== NOT EXECUTED
111ea2: 4f dec %edi <== NOT EXECUTED
111ea3: 23 7d d4 and -0x2c(%ebp),%edi <== NOT EXECUTED
111ea6: 29 7d 14 sub %edi,0x14(%ebp) <== NOT EXECUTED
new_length -= (cls2add - cls_added) << fs_info->vol.bpc_log2;
111ea9: 29 c1 sub %eax,%ecx <== NOT EXECUTED
111eab: 89 c8 mov %ecx,%eax <== NOT EXECUTED
111ead: 0f b6 4b 08 movzbl 0x8(%ebx),%ecx <== NOT EXECUTED
111eb1: d3 e0 shl %cl,%eax <== NOT EXECUTED
111eb3: 29 45 14 sub %eax,0x14(%ebp) <== NOT EXECUTED
}
/* add new chain to the end of existed */
if ( fat_fd->fat_file_size == 0 )
111eb6: 8b 46 18 mov 0x18(%esi),%eax
111eb9: 85 c0 test %eax,%eax
111ebb: 75 12 jne 111ecf <fat_file_extend+0x16b>
{
fat_fd->map.disk_cln = fat_fd->cln = chain;
111ebd: 8b 45 d8 mov -0x28(%ebp),%eax
111ec0: 89 46 1c mov %eax,0x1c(%esi)
111ec3: 89 46 38 mov %eax,0x38(%esi)
fat_fd->map.file_cln = 0;
111ec6: c7 46 34 00 00 00 00 movl $0x0,0x34(%esi)
111ecd: eb 60 jmp 111f2f <fat_file_extend+0x1cb>
}
else
{
if (fat_fd->map.last_cln != FAT_UNDEFINED_VALUE)
111ecf: 8b 4e 3c mov 0x3c(%esi),%ecx
111ed2: 83 f9 ff cmp $0xffffffff,%ecx
111ed5: 74 05 je 111edc <fat_file_extend+0x178> <== NEVER TAKEN
{
old_last_cl = fat_fd->map.last_cln;
111ed7: 89 4d dc mov %ecx,-0x24(%ebp)
111eda: eb 23 jmp 111eff <fat_file_extend+0x19b>
}
else
{
rc = fat_file_ioctl(fs_info, fat_fd, F_CLU_NUM,
111edc: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
111edf: 8d 4d dc lea -0x24(%ebp),%ecx <== NOT EXECUTED
111ee2: 51 push %ecx <== NOT EXECUTED
111ee3: 48 dec %eax <== NOT EXECUTED
111ee4: 50 push %eax <== NOT EXECUTED
111ee5: 6a 01 push $0x1 <== NOT EXECUTED
111ee7: 56 push %esi <== NOT EXECUTED
111ee8: 53 push %ebx <== NOT EXECUTED
111ee9: 89 55 c8 mov %edx,-0x38(%ebp) <== NOT EXECUTED
111eec: e8 ed fd ff ff call 111cde <fat_file_ioctl> <== NOT EXECUTED
111ef1: 89 c7 mov %eax,%edi <== NOT EXECUTED
(fat_fd->fat_file_size - 1), &old_last_cl);
if ( rc != RC_OK )
111ef3: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
111ef6: 85 c0 test %eax,%eax <== NOT EXECUTED
111ef8: 8b 55 c8 mov -0x38(%ebp),%edx <== NOT EXECUTED
111efb: 74 02 je 111eff <fat_file_extend+0x19b> <== NOT EXECUTED
111efd: eb 5c jmp 111f5b <fat_file_extend+0x1f7> <== NOT EXECUTED
fat_free_fat_clusters_chain(fs_info, chain);
return rc;
}
}
rc = fat_set_fat_cluster(fs_info, old_last_cl, chain);
111eff: 50 push %eax
111f00: ff 75 d8 pushl -0x28(%ebp)
111f03: ff 75 dc pushl -0x24(%ebp)
111f06: 53 push %ebx
111f07: 89 55 c8 mov %edx,-0x38(%ebp)
111f0a: e8 3a 5d 00 00 call 117c49 <fat_set_fat_cluster>
111f0f: 89 c7 mov %eax,%edi
if ( rc != RC_OK )
111f11: 83 c4 10 add $0x10,%esp
111f14: 85 c0 test %eax,%eax
111f16: 8b 55 c8 mov -0x38(%ebp),%edx
111f19: 74 02 je 111f1d <fat_file_extend+0x1b9> <== ALWAYS TAKEN
111f1b: eb 3e jmp 111f5b <fat_file_extend+0x1f7> <== NOT EXECUTED
{
fat_free_fat_clusters_chain(fs_info, chain);
return rc;
}
fat_buf_release(fs_info);
111f1d: 83 ec 0c sub $0xc,%esp
111f20: 53 push %ebx
111f21: 89 55 c8 mov %edx,-0x38(%ebp)
111f24: e8 90 04 00 00 call 1123b9 <fat_buf_release>
111f29: 83 c4 10 add $0x10,%esp
111f2c: 8b 55 c8 mov -0x38(%ebp),%edx
}
/* update number of the last cluster of the file if it changed */
if (cls_added != 0)
111f2f: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp)
111f33: 74 38 je 111f6d <fat_file_extend+0x209> <== NEVER TAKEN
{
fat_fd->map.last_cln = last_cl;
111f35: 8b 45 e0 mov -0x20(%ebp),%eax
111f38: 89 46 3c mov %eax,0x3c(%esi)
if (fat_fd->fat_file_type == FAT_DIRECTORY)
111f3b: 83 7e 10 00 cmpl $0x0,0x10(%esi)
111f3f: 75 2c jne 111f6d <fat_file_extend+0x209>
{
rc = fat_init_clusters_chain(fs_info, chain);
111f41: 57 push %edi
111f42: 57 push %edi
111f43: ff 75 d8 pushl -0x28(%ebp)
111f46: 53 push %ebx
111f47: 89 55 c8 mov %edx,-0x38(%ebp)
111f4a: e8 ac 07 00 00 call 1126fb <fat_init_clusters_chain>
111f4f: 89 c7 mov %eax,%edi
if ( rc != RC_OK )
111f51: 83 c4 10 add $0x10,%esp
111f54: 85 c0 test %eax,%eax
111f56: 8b 55 c8 mov -0x38(%ebp),%edx
111f59: 74 12 je 111f6d <fat_file_extend+0x209> <== ALWAYS TAKEN
{
fat_free_fat_clusters_chain(fs_info, chain);
111f5b: 56 push %esi <== NOT EXECUTED
111f5c: 56 push %esi <== NOT EXECUTED
111f5d: ff 75 d8 pushl -0x28(%ebp) <== NOT EXECUTED
111f60: 53 push %ebx <== NOT EXECUTED
111f61: e8 fc 5e 00 00 call 117e62 <fat_free_fat_clusters_chain><== NOT EXECUTED
111f66: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
111f69: 89 fa mov %edi,%edx <== NOT EXECUTED
111f6b: eb 0b jmp 111f78 <fat_file_extend+0x214> <== NOT EXECUTED
return rc;
}
}
}
*a_length = new_length;
111f6d: 8b 4d 14 mov 0x14(%ebp),%ecx
111f70: 8b 45 18 mov 0x18(%ebp),%eax
111f73: 89 08 mov %ecx,(%eax)
fat_fd->fat_file_size = new_length;
111f75: 89 4e 18 mov %ecx,0x18(%esi)
return RC_OK;
}
111f78: 89 d0 mov %edx,%eax
111f7a: 8d 65 f4 lea -0xc(%ebp),%esp
111f7d: 5b pop %ebx
111f7e: 5e pop %esi
111f7f: 5f pop %edi
111f80: 5d pop %ebp
111f81: c3 ret
00111cde <fat_file_ioctl>:
fat_file_ioctl(
fat_fs_info_t *fs_info,
fat_file_fd_t *fat_fd,
int cmd,
...)
{
111cde: 55 push %ebp
111cdf: 89 e5 mov %esp,%ebp
111ce1: 56 push %esi
111ce2: 53 push %ebx
111ce3: 83 ec 10 sub $0x10,%esp
111ce6: 8b 45 08 mov 0x8(%ebp),%eax
111ce9: 8b 55 0c mov 0xc(%ebp),%edx
int rc = RC_OK;
uint32_t cur_cln = 0;
111cec: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
uint32_t *ret;
va_list ap;
va_start(ap, cmd);
switch (cmd)
111cf3: 83 7d 10 01 cmpl $0x1,0x10(%ebp)
111cf7: 75 56 jne 111d4f <fat_file_ioctl+0x71> <== NEVER TAKEN
{
case F_CLU_NUM:
pos = va_arg(ap, uint32_t);
111cf9: 8b 75 14 mov 0x14(%ebp),%esi
ret = va_arg(ap, uint32_t *);
111cfc: 8b 5d 18 mov 0x18(%ebp),%ebx
/* sanity check */
if ( pos >= fat_fd->fat_file_size ) {
111cff: 3b 72 18 cmp 0x18(%edx),%esi
111d02: 72 0d jb 111d11 <fat_file_ioctl+0x33> <== ALWAYS TAKEN
va_end(ap);
rtems_set_errno_and_return_minus_one( EIO );
111d04: e8 07 7b 00 00 call 119810 <__errno> <== NOT EXECUTED
111d09: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
111d0f: eb 49 jmp 111d5a <fat_file_ioctl+0x7c> <== NOT EXECUTED
}
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
111d11: 83 7a 20 01 cmpl $0x1,0x20(%edx)
111d15: 75 16 jne 111d2d <fat_file_ioctl+0x4f>
111d17: 83 7a 24 00 cmpl $0x0,0x24(%edx)
111d1b: 75 10 jne 111d2d <fat_file_ioctl+0x4f> <== NEVER TAKEN
111d1d: f6 40 0a 03 testb $0x3,0xa(%eax)
111d21: 74 0a je 111d2d <fat_file_ioctl+0x4f> <== NEVER TAKEN
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
{
/* cluster 0 (zero) reserved for root dir */
*ret = 0;
111d23: c7 03 00 00 00 00 movl $0x0,(%ebx)
rc = RC_OK;
111d29: 31 c0 xor %eax,%eax
break;
111d2b: eb 30 jmp 111d5d <fat_file_ioctl+0x7f>
}
cl_start = pos >> fs_info->vol.bpc_log2;
rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln);
111d2d: 83 ec 0c sub $0xc,%esp
*ret = 0;
rc = RC_OK;
break;
}
cl_start = pos >> fs_info->vol.bpc_log2;
111d30: 0f b6 48 08 movzbl 0x8(%eax),%ecx
111d34: d3 ee shr %cl,%esi
111d36: 89 f1 mov %esi,%ecx
rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln);
111d38: 8d 75 f4 lea -0xc(%ebp),%esi
111d3b: 56 push %esi
111d3c: e8 d8 fa ff ff call 111819 <fat_file_lseek>
if ( rc != RC_OK )
111d41: 83 c4 10 add $0x10,%esp
111d44: 85 c0 test %eax,%eax
111d46: 75 15 jne 111d5d <fat_file_ioctl+0x7f> <== NEVER TAKEN
break;
*ret = cur_cln;
111d48: 8b 55 f4 mov -0xc(%ebp),%edx
111d4b: 89 13 mov %edx,(%ebx)
break;
111d4d: eb 0e jmp 111d5d <fat_file_ioctl+0x7f>
default:
errno = EINVAL;
111d4f: e8 bc 7a 00 00 call 119810 <__errno> <== NOT EXECUTED
111d54: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
rc = -1;
111d5a: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
break;
}
va_end(ap);
return rc;
}
111d5d: 8d 65 f8 lea -0x8(%ebp),%esp
111d60: 5b pop %ebx
111d61: 5e pop %esi
111d62: 5d pop %ebp
111d63: c3 ret
00111819 <fat_file_lseek>:
fat_fs_info_t *fs_info,
fat_file_fd_t *fat_fd,
uint32_t file_cln,
uint32_t *disk_cln
)
{
111819: 55 push %ebp
11181a: 89 e5 mov %esp,%ebp
11181c: 57 push %edi
11181d: 56 push %esi
11181e: 53 push %ebx
11181f: 83 ec 2c sub $0x2c,%esp
111822: 89 c7 mov %eax,%edi
111824: 89 d3 mov %edx,%ebx
111826: 89 ce mov %ecx,%esi
int rc = RC_OK;
if (file_cln == fat_fd->map.file_cln)
111828: 8b 42 34 mov 0x34(%edx),%eax
11182b: 39 c1 cmp %eax,%ecx
11182d: 75 05 jne 111834 <fat_file_lseek+0x1b>
*disk_cln = fat_fd->map.disk_cln;
11182f: 8b 42 38 mov 0x38(%edx),%eax
111832: eb 51 jmp 111885 <fat_file_lseek+0x6c>
{
uint32_t cur_cln;
uint32_t count;
uint32_t i;
if (file_cln > fat_fd->map.file_cln)
111834: 76 0f jbe 111845 <fat_file_lseek+0x2c>
{
cur_cln = fat_fd->map.disk_cln;
111836: 8b 52 38 mov 0x38(%edx),%edx
111839: 89 55 e4 mov %edx,-0x1c(%ebp)
count = file_cln - fat_fd->map.file_cln;
11183c: 89 ca mov %ecx,%edx
11183e: 29 c2 sub %eax,%edx
111840: 89 55 d4 mov %edx,-0x2c(%ebp)
111843: eb 09 jmp 11184e <fat_file_lseek+0x35>
}
else
{
cur_cln = fat_fd->cln;
111845: 8b 42 1c mov 0x1c(%edx),%eax
111848: 89 45 e4 mov %eax,-0x1c(%ebp)
11184b: 89 4d d4 mov %ecx,-0x2c(%ebp)
count = file_cln;
}
/* skip over the clusters */
for (i = 0; i < count; i++)
11184e: 31 d2 xor %edx,%edx
{
rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln);
111850: 8d 4d e4 lea -0x1c(%ebp),%ecx
cur_cln = fat_fd->cln;
count = file_cln;
}
/* skip over the clusters */
for (i = 0; i < count; i++)
111853: eb 22 jmp 111877 <fat_file_lseek+0x5e>
{
rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln);
111855: 50 push %eax
111856: 51 push %ecx
111857: ff 75 e4 pushl -0x1c(%ebp)
11185a: 57 push %edi
11185b: 89 55 d0 mov %edx,-0x30(%ebp)
11185e: 89 4d cc mov %ecx,-0x34(%ebp)
111861: e8 9a 62 00 00 call 117b00 <fat_get_fat_cluster>
if ( rc != RC_OK )
111866: 83 c4 10 add $0x10,%esp
111869: 85 c0 test %eax,%eax
11186b: 8b 55 d0 mov -0x30(%ebp),%edx
11186e: 8b 4d cc mov -0x34(%ebp),%ecx
111871: 74 03 je 111876 <fat_file_lseek+0x5d> <== ALWAYS TAKEN
return rc;
111873: 99 cltd <== NOT EXECUTED
111874: eb 18 jmp 11188e <fat_file_lseek+0x75> <== NOT EXECUTED
cur_cln = fat_fd->cln;
count = file_cln;
}
/* skip over the clusters */
for (i = 0; i < count; i++)
111876: 42 inc %edx
111877: 3b 55 d4 cmp -0x2c(%ebp),%edx
11187a: 75 d9 jne 111855 <fat_file_lseek+0x3c>
if ( rc != RC_OK )
return rc;
}
/* update cache */
fat_fd->map.file_cln = file_cln;
11187c: 89 73 34 mov %esi,0x34(%ebx)
fat_fd->map.disk_cln = cur_cln;
11187f: 8b 45 e4 mov -0x1c(%ebp),%eax
111882: 89 43 38 mov %eax,0x38(%ebx)
*disk_cln = cur_cln;
111885: 8b 55 08 mov 0x8(%ebp),%edx
111888: 89 02 mov %eax,(%edx)
}
return RC_OK;
11188a: 31 c0 xor %eax,%eax
11188c: 31 d2 xor %edx,%edx
}
11188e: 8d 65 f4 lea -0xc(%ebp),%esp
111891: 5b pop %ebx
111892: 5e pop %esi
111893: 5f pop %edi
111894: 5d pop %ebp
111895: c3 ret
00111896 <fat_file_open>:
fat_file_open(
fat_fs_info_t *fs_info,
fat_dir_pos_t *dir_pos,
fat_file_fd_t **fat_fd
)
{
111896: 55 push %ebp
111897: 89 e5 mov %esp,%ebp
111899: 57 push %edi
11189a: 56 push %esi
11189b: 53 push %ebx
11189c: 83 ec 1c sub $0x1c,%esp
11189f: 8b 75 0c mov 0xc(%ebp),%esi
int rc = RC_OK;
fat_file_fd_t *lfat_fd = NULL;
uint32_t key = 0;
/* construct key */
key = fat_construct_key(fs_info, &dir_pos->sname);
1118a2: 89 f2 mov %esi,%edx
1118a4: 8b 45 08 mov 0x8(%ebp),%eax
1118a7: e8 2e ff ff ff call 1117da <fat_construct_key>
1118ac: 89 45 e4 mov %eax,-0x1c(%ebp)
uint32_t key1,
uint32_t key2,
fat_file_fd_t **ret
)
{
uint32_t mod = (key1) % FAT_HASH_MODULE;
1118af: 83 e0 01 and $0x1,%eax
rtems_chain_node *the_node = rtems_chain_first(hash + mod);
1118b2: 6b c0 0c imul $0xc,%eax,%eax
1118b5: 89 45 e0 mov %eax,-0x20(%ebp)
1118b8: 89 c3 mov %eax,%ebx
1118ba: 8b 45 08 mov 0x8(%ebp),%eax
1118bd: 03 58 60 add 0x60(%eax),%ebx
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
1118c0: 8b 3b mov (%ebx),%edi
RTEMS_INLINE_ROUTINE bool _Chain_Is_tail(
const Chain_Control *the_chain,
const Chain_Node *the_node
)
{
return (the_node == _Chain_Immutable_tail( the_chain ));
1118c2: 83 c3 04 add $0x4,%ebx
1118c5: eb 1f jmp 1118e6 <fat_file_open+0x50>
for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; )
{
fat_file_fd_t *ffd = (fat_file_fd_t *)the_node;
uint32_t ck = fat_construct_key(fs_info, &ffd->dir_pos.sname);
1118c7: 8d 57 20 lea 0x20(%edi),%edx
1118ca: 8b 45 08 mov 0x8(%ebp),%eax
1118cd: e8 08 ff ff ff call 1117da <fat_construct_key>
if ( (key1) == ck)
1118d2: 39 45 e4 cmp %eax,-0x1c(%ebp)
1118d5: 75 0d jne 1118e4 <fat_file_open+0x4e>
/* access "valid" hash table */
rc = _hash_search(fs_info, fs_info->vhash, key, 0, &lfat_fd);
if ( rc == RC_OK )
{
/* return pointer to fat_file_descriptor allocated before */
(*fat_fd) = lfat_fd;
1118d7: 8b 55 10 mov 0x10(%ebp),%edx
1118da: 89 3a mov %edi,(%edx)
lfat_fd->links_num++;
1118dc: ff 47 08 incl 0x8(%edi)
1118df: e9 db 00 00 00 jmp 1119bf <fat_file_open+0x129>
{
*ret = (void *)the_node;
return 0;
}
}
the_node = the_node->next;
1118e4: 8b 3f mov (%edi),%edi
)
{
uint32_t mod = (key1) % FAT_HASH_MODULE;
rtems_chain_node *the_node = rtems_chain_first(hash + mod);
for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; )
1118e6: 39 df cmp %ebx,%edi
1118e8: 75 dd jne 1118c7 <fat_file_open+0x31>
1118ea: e9 d4 00 00 00 jmp 1119c3 <fat_file_open+0x12d>
{
fat_file_fd_t *ffd = (fat_file_fd_t *)the_node;
uint32_t ck = fat_construct_key(fs_info, &ffd->dir_pos.sname);
1118ef: 8d 57 20 lea 0x20(%edi),%edx <== NOT EXECUTED
1118f2: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
1118f5: e8 e0 fe ff ff call 1117da <fat_construct_key> <== NOT EXECUTED
if ( (key1) == ck)
1118fa: 39 45 e4 cmp %eax,-0x1c(%ebp) <== NOT EXECUTED
1118fd: 75 0e jne 11190d <fat_file_open+0x77> <== NOT EXECUTED
{
if ( ((key2) == 0) || ((key2) == ffd->ino) )
1118ff: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) <== NOT EXECUTED
111903: 74 13 je 111918 <fat_file_open+0x82> <== NOT EXECUTED
111905: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
111908: 3b 47 0c cmp 0xc(%edi),%eax <== NOT EXECUTED
11190b: 74 0b je 111918 <fat_file_open+0x82> <== NOT EXECUTED
{
*ret = (void *)the_node;
return 0;
}
}
the_node = the_node->next;
11190d: 8b 3f mov (%edi),%edi <== NOT EXECUTED
)
{
uint32_t mod = (key1) % FAT_HASH_MODULE;
rtems_chain_node *the_node = rtems_chain_first(hash + mod);
for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; )
11190f: 39 df cmp %ebx,%edi
111911: 75 dc jne 1118ef <fat_file_open+0x59> <== NEVER TAKEN
return 0;
}
}
the_node = the_node->next;
}
return -1;
111913: 83 ca ff or $0xffffffff,%edx
111916: eb 02 jmp 11191a <fat_file_open+0x84>
if ( (key1) == ck)
{
if ( ((key2) == 0) || ((key2) == ffd->ino) )
{
*ret = (void *)the_node;
return 0;
111918: 31 d2 xor %edx,%edx <== NOT EXECUTED
}
/* access "removed-but-still-open" hash table */
rc = _hash_search(fs_info, fs_info->rhash, key, key, &lfat_fd);
lfat_fd = (*fat_fd) = (fat_file_fd_t*)malloc(sizeof(fat_file_fd_t));
11191a: 83 ec 0c sub $0xc,%esp
11191d: 6a 44 push $0x44
11191f: 89 55 dc mov %edx,-0x24(%ebp)
111922: e8 e1 5d ff ff call 107708 <malloc>
111927: 89 c3 mov %eax,%ebx
111929: 8b 45 10 mov 0x10(%ebp),%eax
11192c: 89 18 mov %ebx,(%eax)
if ( lfat_fd == NULL )
11192e: 83 c4 10 add $0x10,%esp
111931: 85 db test %ebx,%ebx
111933: 8b 55 dc mov -0x24(%ebp),%edx
111936: 75 0d jne 111945 <fat_file_open+0xaf> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOMEM );
111938: e8 d3 7e 00 00 call 119810 <__errno> <== NOT EXECUTED
11193d: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED
111943: eb 60 jmp 1119a5 <fat_file_open+0x10f> <== NOT EXECUTED
memset(lfat_fd, 0, sizeof(fat_file_fd_t));
111945: b9 11 00 00 00 mov $0x11,%ecx
11194a: 31 c0 xor %eax,%eax
11194c: 89 df mov %ebx,%edi
11194e: f3 ab rep stos %eax,%es:(%edi)
lfat_fd->links_num = 1;
111950: c7 43 08 01 00 00 00 movl $0x1,0x8(%ebx)
lfat_fd->flags &= ~FAT_FILE_REMOVED;
111957: 80 63 30 fe andb $0xfe,0x30(%ebx)
lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE;
11195b: c7 43 3c ff ff ff ff movl $0xffffffff,0x3c(%ebx)
lfat_fd->dir_pos = *dir_pos;
111962: 8d 7b 20 lea 0x20(%ebx),%edi
111965: b1 04 mov $0x4,%cl
111967: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
if ( rc != RC_OK )
111969: 85 d2 test %edx,%edx
11196b: 74 08 je 111975 <fat_file_open+0xdf> <== NEVER TAKEN
lfat_fd->ino = key;
11196d: 8b 45 e4 mov -0x1c(%ebp),%eax
111970: 89 43 0c mov %eax,0xc(%ebx)
111973: eb 35 jmp 1119aa <fat_file_open+0x114>
else
{
lfat_fd->ino = fat_get_unique_ino(fs_info);
111975: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
111978: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
11197b: e8 1b 0e 00 00 call 11279b <fat_get_unique_ino> <== NOT EXECUTED
111980: 89 43 0c mov %eax,0xc(%ebx) <== NOT EXECUTED
if ( lfat_fd->ino == 0 )
111983: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
111986: 85 c0 test %eax,%eax <== NOT EXECUTED
111988: 75 20 jne 1119aa <fat_file_open+0x114> <== NOT EXECUTED
{
free((*fat_fd));
11198a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11198d: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED
111990: ff 32 pushl (%edx) <== NOT EXECUTED
111992: e8 95 58 ff ff call 10722c <free> <== 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 );
111997: e8 74 7e 00 00 call 119810 <__errno> <== NOT EXECUTED
11199c: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED
1119a2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1119a5: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
1119a8: eb 2c jmp 1119d6 <fat_file_open+0x140> <== 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 );
1119aa: 52 push %edx
1119ab: 52 push %edx
1119ac: 53 push %ebx
*/
static inline void
_hash_insert(rtems_chain_control *hash, uint32_t key1, uint32_t key2,
fat_file_fd_t *el)
{
rtems_chain_append((hash) + ((key1) % FAT_HASH_MODULE), &(el)->link);
1119ad: 8b 45 e0 mov -0x20(%ebp),%eax
1119b0: 8b 55 08 mov 0x8(%ebp),%edx
1119b3: 03 42 60 add 0x60(%edx),%eax
1119b6: 50 push %eax
1119b7: e8 3c 9d ff ff call 10b6f8 <_Chain_Append>
1119bc: 83 c4 10 add $0x10,%esp
/*
* other fields of fat-file descriptor will be initialized on upper
* level
*/
return RC_OK;
1119bf: 31 c0 xor %eax,%eax
1119c1: eb 13 jmp 1119d6 <fat_file_open+0x140>
uint32_t key2,
fat_file_fd_t **ret
)
{
uint32_t mod = (key1) % FAT_HASH_MODULE;
rtems_chain_node *the_node = rtems_chain_first(hash + mod);
1119c3: 8b 5d e0 mov -0x20(%ebp),%ebx
1119c6: 8b 45 08 mov 0x8(%ebp),%eax
1119c9: 03 58 64 add 0x64(%eax),%ebx
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
1119cc: 8b 3b mov (%ebx),%edi
RTEMS_INLINE_ROUTINE bool _Chain_Is_tail(
const Chain_Control *the_chain,
const Chain_Node *the_node
)
{
return (the_node == _Chain_Immutable_tail( the_chain ));
1119ce: 83 c3 04 add $0x4,%ebx
1119d1: e9 39 ff ff ff jmp 11190f <fat_file_open+0x79>
* other fields of fat-file descriptor will be initialized on upper
* level
*/
return RC_OK;
}
1119d6: 8d 65 f4 lea -0xc(%ebp),%esp
1119d9: 5b pop %ebx
1119da: 5e pop %esi
1119db: 5f pop %edi
1119dc: 5d pop %ebp
1119dd: c3 ret
001119eb <fat_file_read>:
fat_file_fd_t *fat_fd,
uint32_t start,
uint32_t count,
uint8_t *buf
)
{
1119eb: 55 push %ebp
1119ec: 89 e5 mov %esp,%ebp
1119ee: 57 push %edi
1119ef: 56 push %esi
1119f0: 53 push %ebx
1119f1: 83 ec 2c sub $0x2c,%esp
1119f4: 8b 5d 08 mov 0x8(%ebp),%ebx
1119f7: 8b 75 10 mov 0x10(%ebp),%esi
int rc = RC_OK;
ssize_t ret = 0;
uint32_t cmpltd = 0;
uint32_t cur_cln = 0;
1119fa: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
uint32_t byte = 0;
uint32_t c = 0;
/* it couldn't be removed - otherwise cache update will be broken */
if (count == 0)
return cmpltd;
111a01: 31 c0 xor %eax,%eax
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)
111a03: 83 7d 14 00 cmpl $0x0,0x14(%ebp)
111a07: 0f 84 45 01 00 00 je 111b52 <fat_file_read+0x167> <== NEVER TAKEN
/*
* >= because start is offset and computed from 0 and file_size
* computed from 1
*/
if ( start >= fat_fd->fat_file_size )
111a0d: 8b 4d 0c mov 0xc(%ebp),%ecx
111a10: 8b 51 18 mov 0x18(%ecx),%edx
111a13: 39 d6 cmp %edx,%esi
111a15: 0f 83 37 01 00 00 jae 111b52 <fat_file_read+0x167>
return FAT_EOF;
if ((count > fat_fd->fat_file_size) ||
111a1b: 39 55 14 cmp %edx,0x14(%ebp)
111a1e: 77 09 ja 111a29 <fat_file_read+0x3e> <== NEVER TAKEN
(start > fat_fd->fat_file_size - count))
111a20: 89 d0 mov %edx,%eax
111a22: 2b 45 14 sub 0x14(%ebp),%eax
* computed from 1
*/
if ( start >= fat_fd->fat_file_size )
return FAT_EOF;
if ((count > fat_fd->fat_file_size) ||
111a25: 39 c6 cmp %eax,%esi
111a27: 76 05 jbe 111a2e <fat_file_read+0x43>
(start > fat_fd->fat_file_size - count))
count = fat_fd->fat_file_size - start;
111a29: 29 f2 sub %esi,%edx
111a2b: 89 55 14 mov %edx,0x14(%ebp)
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
111a2e: 8b 45 0c mov 0xc(%ebp),%eax
111a31: 83 78 20 01 cmpl $0x1,0x20(%eax)
111a35: 75 45 jne 111a7c <fat_file_read+0x91>
111a37: 83 78 24 00 cmpl $0x0,0x24(%eax)
111a3b: 75 3f jne 111a7c <fat_file_read+0x91> <== NEVER TAKEN
111a3d: f6 43 0a 03 testb $0x3,0xa(%ebx)
111a41: 74 39 je 111a7c <fat_file_read+0x91> <== NEVER TAKEN
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
{
sec = fat_cluster_num_to_sector_num(fs_info, fat_fd->cln);
111a43: 8b 50 1c mov 0x1c(%eax),%edx
111a46: 89 d8 mov %ebx,%eax
111a48: e8 6b fd ff ff call 1117b8 <fat_cluster_num_to_sector_num>
sec += (start >> fs_info->vol.sec_log2);
byte = start & (fs_info->vol.bps - 1);
ret = _fat_block_read(fs_info, sec, byte, count, buf);
111a4d: 83 ec 0c sub $0xc,%esp
111a50: ff 75 18 pushl 0x18(%ebp)
111a53: ff 75 14 pushl 0x14(%ebp)
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
{
sec = fat_cluster_num_to_sector_num(fs_info, fat_fd->cln);
sec += (start >> fs_info->vol.sec_log2);
byte = start & (fs_info->vol.bps - 1);
111a56: 0f b7 13 movzwl (%ebx),%edx
111a59: 4a dec %edx
111a5a: 21 f2 and %esi,%edx
ret = _fat_block_read(fs_info, sec, byte, count, buf);
111a5c: 52 push %edx
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
{
sec = fat_cluster_num_to_sector_num(fs_info, fat_fd->cln);
sec += (start >> fs_info->vol.sec_log2);
111a5d: 0f b6 4b 02 movzbl 0x2(%ebx),%ecx
111a61: d3 ee shr %cl,%esi
111a63: 01 f0 add %esi,%eax
byte = start & (fs_info->vol.bps - 1);
ret = _fat_block_read(fs_info, sec, byte, count, buf);
111a65: 50 push %eax
111a66: 53 push %ebx
111a67: e8 73 0a 00 00 call 1124df <_fat_block_read>
if ( ret < 0 )
111a6c: 83 c4 20 add $0x20,%esp
111a6f: 85 c0 test %eax,%eax
111a71: 0f 89 db 00 00 00 jns 111b52 <fat_file_read+0x167> <== ALWAYS TAKEN
111a77: e9 d3 00 00 00 jmp 111b4f <fat_file_read+0x164> <== NOT EXECUTED
return -1;
return ret;
}
cl_start = start >> fs_info->vol.bpc_log2;
111a7c: 0f b6 4b 08 movzbl 0x8(%ebx),%ecx
111a80: 89 f0 mov %esi,%eax
111a82: d3 e8 shr %cl,%eax
111a84: 89 45 cc mov %eax,-0x34(%ebp)
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
111a87: 66 8b 4b 06 mov 0x6(%ebx),%cx
111a8b: 66 89 4d d4 mov %cx,-0x2c(%ebp)
rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln);
111a8f: 83 ec 0c sub $0xc,%esp
111a92: 8d 7d e4 lea -0x1c(%ebp),%edi
111a95: 57 push %edi
111a96: 89 c1 mov %eax,%ecx
111a98: 8b 55 0c mov 0xc(%ebp),%edx
111a9b: 89 d8 mov %ebx,%eax
111a9d: e8 77 fd ff ff call 111819 <fat_file_lseek>
if (rc != RC_OK)
111aa2: 83 c4 10 add $0x10,%esp
111aa5: 85 c0 test %eax,%eax
111aa7: 0f 85 a5 00 00 00 jne 111b52 <fat_file_read+0x167> <== NEVER TAKEN
return ret;
}
cl_start = start >> fs_info->vol.bpc_log2;
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
111aad: 0f b7 45 d4 movzwl -0x2c(%ebp),%eax
111ab1: 48 dec %eax
111ab2: 21 f0 and %esi,%eax
111ab4: 89 45 d0 mov %eax,-0x30(%ebp)
111ab7: 89 c6 mov %eax,%esi
111ab9: 31 d2 xor %edx,%edx
111abb: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp)
111ac2: eb 64 jmp 111b28 <fat_file_read+0x13d>
if (rc != RC_OK)
return rc;
while (count > 0)
{
c = MIN(count, (fs_info->vol.bpc - ofs));
111ac4: 0f b7 7b 06 movzwl 0x6(%ebx),%edi
111ac8: 29 f7 sub %esi,%edi
111aca: 3b 7d 14 cmp 0x14(%ebp),%edi
111acd: 76 03 jbe 111ad2 <fat_file_read+0xe7>
111acf: 8b 7d 14 mov 0x14(%ebp),%edi
sec = fat_cluster_num_to_sector_num(fs_info, cur_cln);
111ad2: 8b 55 e4 mov -0x1c(%ebp),%edx
111ad5: 89 d8 mov %ebx,%eax
111ad7: e8 dc fc ff ff call 1117b8 <fat_cluster_num_to_sector_num>
sec += (ofs >> fs_info->vol.sec_log2);
byte = ofs & (fs_info->vol.bps - 1);
ret = _fat_block_read(fs_info, sec, byte, c, buf + cmpltd);
111adc: 83 ec 0c sub $0xc,%esp
111adf: 8b 55 18 mov 0x18(%ebp),%edx
111ae2: 03 55 d4 add -0x2c(%ebp),%edx
111ae5: 52 push %edx
111ae6: 57 push %edi
{
c = MIN(count, (fs_info->vol.bpc - ofs));
sec = fat_cluster_num_to_sector_num(fs_info, cur_cln);
sec += (ofs >> fs_info->vol.sec_log2);
byte = ofs & (fs_info->vol.bps - 1);
111ae7: 0f b7 13 movzwl (%ebx),%edx
111aea: 4a dec %edx
111aeb: 21 f2 and %esi,%edx
ret = _fat_block_read(fs_info, sec, byte, c, buf + cmpltd);
111aed: 52 push %edx
while (count > 0)
{
c = MIN(count, (fs_info->vol.bpc - ofs));
sec = fat_cluster_num_to_sector_num(fs_info, cur_cln);
sec += (ofs >> fs_info->vol.sec_log2);
111aee: 0f b6 4b 02 movzbl 0x2(%ebx),%ecx
111af2: d3 ee shr %cl,%esi
111af4: 01 f0 add %esi,%eax
byte = ofs & (fs_info->vol.bps - 1);
ret = _fat_block_read(fs_info, sec, byte, c, buf + cmpltd);
111af6: 50 push %eax
111af7: 53 push %ebx
111af8: e8 e2 09 00 00 call 1124df <_fat_block_read>
if ( ret < 0 )
111afd: 83 c4 20 add $0x20,%esp
111b00: 85 c0 test %eax,%eax
111b02: 78 4b js 111b4f <fat_file_read+0x164> <== NEVER TAKEN
return -1;
count -= c;
111b04: 29 7d 14 sub %edi,0x14(%ebp)
cmpltd += c;
111b07: 01 7d d4 add %edi,-0x2c(%ebp)
save_cln = cur_cln;
111b0a: 8b 55 e4 mov -0x1c(%ebp),%edx
rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln);
111b0d: 51 push %ecx
111b0e: 8d 75 e4 lea -0x1c(%ebp),%esi
111b11: 56 push %esi
111b12: 52 push %edx
111b13: 53 push %ebx
111b14: 89 55 c8 mov %edx,-0x38(%ebp)
111b17: e8 e4 5f 00 00 call 117b00 <fat_get_fat_cluster>
if ( rc != RC_OK )
return rc;
ofs = 0;
111b1c: 31 f6 xor %esi,%esi
count -= c;
cmpltd += c;
save_cln = cur_cln;
rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln);
if ( rc != RC_OK )
111b1e: 83 c4 10 add $0x10,%esp
111b21: 85 c0 test %eax,%eax
111b23: 8b 55 c8 mov -0x38(%ebp),%edx
111b26: 75 2a jne 111b52 <fat_file_read+0x167> <== NEVER TAKEN
rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln);
if (rc != RC_OK)
return rc;
while (count > 0)
111b28: 83 7d 14 00 cmpl $0x0,0x14(%ebp)
111b2c: 75 96 jne 111ac4 <fat_file_read+0xd9>
}
/* update cache */
/* XXX: check this - I'm not sure :( */
fat_fd->map.file_cln = cl_start +
((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2);
111b2e: 8b 4d d4 mov -0x2c(%ebp),%ecx
111b31: 8b 75 d0 mov -0x30(%ebp),%esi
111b34: 8d 44 31 ff lea -0x1(%ecx,%esi,1),%eax
111b38: 0f b6 4b 08 movzbl 0x8(%ebx),%ecx
111b3c: d3 e8 shr %cl,%eax
ofs = 0;
}
/* update cache */
/* XXX: check this - I'm not sure :( */
fat_fd->map.file_cln = cl_start +
111b3e: 03 45 cc add -0x34(%ebp),%eax
111b41: 8b 75 0c mov 0xc(%ebp),%esi
111b44: 89 46 34 mov %eax,0x34(%esi)
((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2);
fat_fd->map.disk_cln = save_cln;
111b47: 89 56 38 mov %edx,0x38(%esi)
return cmpltd;
111b4a: 8b 45 d4 mov -0x2c(%ebp),%eax
111b4d: eb 03 jmp 111b52 <fat_file_read+0x167>
sec += (ofs >> fs_info->vol.sec_log2);
byte = ofs & (fs_info->vol.bps - 1);
ret = _fat_block_read(fs_info, sec, byte, c, buf + cmpltd);
if ( ret < 0 )
return -1;
111b4f: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
fat_fd->map.file_cln = cl_start +
((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2);
fat_fd->map.disk_cln = save_cln;
return cmpltd;
}
111b52: 8d 65 f4 lea -0xc(%ebp),%esp
111b55: 5b pop %ebx
111b56: 5e pop %esi
111b57: 5f pop %edi
111b58: 5d pop %ebp
111b59: c3 ret
0011218c <fat_file_size>:
int
fat_file_size(
fat_fs_info_t *fs_info,
fat_file_fd_t *fat_fd
)
{
11218c: 55 push %ebp
11218d: 89 e5 mov %esp,%ebp
11218f: 57 push %edi
112190: 56 push %esi
112191: 53 push %ebx
112192: 83 ec 2c sub $0x2c,%esp
112195: 8b 75 08 mov 0x8(%ebp),%esi
112198: 8b 5d 0c mov 0xc(%ebp),%ebx
int rc = RC_OK;
uint32_t cur_cln = fat_fd->cln;
11219b: 8b 43 1c mov 0x1c(%ebx),%eax
11219e: 89 45 e4 mov %eax,-0x1c(%ebp)
uint32_t save_cln = 0;
/* Have we requested root dir size for FAT12/16? */
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
1121a1: 83 7b 20 01 cmpl $0x1,0x20(%ebx)
1121a5: 75 14 jne 1121bb <fat_file_size+0x2f> <== ALWAYS TAKEN
1121a7: 83 7b 24 00 cmpl $0x0,0x24(%ebx) <== NOT EXECUTED
1121ab: 75 0e jne 1121bb <fat_file_size+0x2f> <== NOT EXECUTED
1121ad: f6 46 0a 03 testb $0x3,0xa(%esi) <== NOT EXECUTED
1121b1: 74 08 je 1121bb <fat_file_size+0x2f> <== NOT EXECUTED
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
{
fat_fd->fat_file_size = fs_info->vol.rdir_size;
1121b3: 8b 46 28 mov 0x28(%esi),%eax <== NOT EXECUTED
1121b6: 89 43 18 mov %eax,0x18(%ebx) <== NOT EXECUTED
1121b9: eb 3d jmp 1121f8 <fat_file_size+0x6c> <== NOT EXECUTED
return rc;
}
fat_fd->fat_file_size = 0;
1121bb: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx)
fat_file_fd_t *fat_fd
)
{
int rc = RC_OK;
uint32_t cur_cln = fat_fd->cln;
uint32_t save_cln = 0;
1121c2: 31 c0 xor %eax,%eax
fat_fd->fat_file_size = 0;
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
{
save_cln = cur_cln;
rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln);
1121c4: 8d 55 e4 lea -0x1c(%ebp),%edx
return rc;
}
fat_fd->fat_file_size = 0;
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
1121c7: eb 1f jmp 1121e8 <fat_file_size+0x5c>
{
save_cln = cur_cln;
rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln);
1121c9: 51 push %ecx
1121ca: 52 push %edx
1121cb: 57 push %edi
1121cc: 56 push %esi
1121cd: 89 55 d4 mov %edx,-0x2c(%ebp)
1121d0: e8 2b 59 00 00 call 117b00 <fat_get_fat_cluster>
if ( rc != RC_OK )
1121d5: 83 c4 10 add $0x10,%esp
1121d8: 85 c0 test %eax,%eax
1121da: 8b 55 d4 mov -0x2c(%ebp),%edx
1121dd: 75 1b jne 1121fa <fat_file_size+0x6e> <== NEVER TAKEN
return rc;
fat_fd->fat_file_size += fs_info->vol.bpc;
1121df: 0f b7 46 06 movzwl 0x6(%esi),%eax
1121e3: 01 43 18 add %eax,0x18(%ebx)
fat_fd->fat_file_size = 0;
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
{
save_cln = cur_cln;
1121e6: 89 f8 mov %edi,%eax
return rc;
}
fat_fd->fat_file_size = 0;
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
1121e8: 8b 7d e4 mov -0x1c(%ebp),%edi
1121eb: 8b 4e 0c mov 0xc(%esi),%ecx
1121ee: 21 f9 and %edi,%ecx
1121f0: 3b 4e 10 cmp 0x10(%esi),%ecx
1121f3: 72 d4 jb 1121c9 <fat_file_size+0x3d>
if ( rc != RC_OK )
return rc;
fat_fd->fat_file_size += fs_info->vol.bpc;
}
fat_fd->map.last_cln = save_cln;
1121f5: 89 43 3c mov %eax,0x3c(%ebx)
1121f8: 31 c0 xor %eax,%eax
return rc;
}
1121fa: 8d 65 f4 lea -0xc(%ebp),%esp
1121fd: 5b pop %ebx
1121fe: 5e pop %esi
1121ff: 5f pop %edi
112200: 5d pop %ebp
112201: c3 ret
00111b5a <fat_file_truncate>:
fat_file_truncate(
fat_fs_info_t *fs_info,
fat_file_fd_t *fat_fd,
uint32_t new_length
)
{
111b5a: 55 push %ebp
111b5b: 89 e5 mov %esp,%ebp
111b5d: 57 push %edi
111b5e: 56 push %esi
111b5f: 53 push %ebx
111b60: 83 ec 1c sub $0x1c,%esp
111b63: 8b 7d 08 mov 0x8(%ebp),%edi
111b66: 8b 75 0c mov 0xc(%ebp),%esi
111b69: 8b 55 10 mov 0x10(%ebp),%edx
int rc = RC_OK;
uint32_t cur_cln = 0;
111b6c: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
uint32_t cl_start = 0;
uint32_t new_last_cln = FAT_UNDEFINED_VALUE;
111b73: c7 45 e4 ff ff ff ff movl $0xffffffff,-0x1c(%ebp)
if ( new_length >= fat_fd->fat_file_size )
111b7a: 8b 46 18 mov 0x18(%esi),%eax
111b7d: 39 c2 cmp %eax,%edx
111b7f: 72 07 jb 111b88 <fat_file_truncate+0x2e>
return rc;
111b81: 31 c0 xor %eax,%eax
111b83: e9 a8 00 00 00 jmp 111c30 <fat_file_truncate+0xd6>
assert(fat_fd->fat_file_size);
111b88: 85 c0 test %eax,%eax
111b8a: 75 19 jne 111ba5 <fat_file_truncate+0x4b><== ALWAYS TAKEN
111b8c: 68 b8 86 12 00 push $0x1286b8 <== NOT EXECUTED
111b91: 68 18 87 12 00 push $0x128718 <== NOT EXECUTED
111b96: 68 7d 02 00 00 push $0x27d <== NOT EXECUTED
111b9b: 68 ce 86 12 00 push $0x1286ce <== NOT EXECUTED
111ba0: e8 17 1b 00 00 call 1136bc <__assert_func> <== NOT EXECUTED
cl_start = (new_length + fs_info->vol.bpc - 1) >> fs_info->vol.bpc_log2;
111ba5: 0f b6 4f 08 movzbl 0x8(%edi),%ecx
111ba9: 0f b7 5f 06 movzwl 0x6(%edi),%ebx
111bad: 8d 5c 1a ff lea -0x1(%edx,%ebx,1),%ebx
111bb1: d3 eb shr %cl,%ebx
if ((cl_start << fs_info->vol.bpc_log2) >= fat_fd->fat_file_size)
111bb3: 89 da mov %ebx,%edx
111bb5: d3 e2 shl %cl,%edx
111bb7: 39 c2 cmp %eax,%edx
111bb9: 73 c6 jae 111b81 <fat_file_truncate+0x27>
return RC_OK;
if (cl_start != 0)
111bbb: 85 db test %ebx,%ebx
111bbd: 75 1b jne 111bda <fat_file_truncate+0x80>
if (rc != RC_OK)
return rc;
}
rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln);
111bbf: 83 ec 0c sub $0xc,%esp
111bc2: 8d 45 e0 lea -0x20(%ebp),%eax
111bc5: 50 push %eax
111bc6: 89 d9 mov %ebx,%ecx
111bc8: 89 f2 mov %esi,%edx
111bca: 89 f8 mov %edi,%eax
111bcc: e8 48 fc ff ff call 111819 <fat_file_lseek>
if (rc != RC_OK)
111bd1: 83 c4 10 add $0x10,%esp
111bd4: 85 c0 test %eax,%eax
111bd6: 75 58 jne 111c30 <fat_file_truncate+0xd6><== NEVER TAKEN
111bd8: eb 1c jmp 111bf6 <fat_file_truncate+0x9c>
if ((cl_start << fs_info->vol.bpc_log2) >= fat_fd->fat_file_size)
return RC_OK;
if (cl_start != 0)
{
rc = fat_file_lseek(fs_info, fat_fd, cl_start - 1, &new_last_cln);
111bda: 83 ec 0c sub $0xc,%esp
111bdd: 8d 4b ff lea -0x1(%ebx),%ecx
111be0: 8d 45 e4 lea -0x1c(%ebp),%eax
111be3: 50 push %eax
111be4: 89 f2 mov %esi,%edx
111be6: 89 f8 mov %edi,%eax
111be8: e8 2c fc ff ff call 111819 <fat_file_lseek>
if (rc != RC_OK)
111bed: 83 c4 10 add $0x10,%esp
111bf0: 85 c0 test %eax,%eax
111bf2: 74 cb je 111bbf <fat_file_truncate+0x65><== ALWAYS TAKEN
111bf4: eb 3a jmp 111c30 <fat_file_truncate+0xd6><== NOT EXECUTED
rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln);
if (rc != RC_OK)
return rc;
rc = fat_free_fat_clusters_chain(fs_info, cur_cln);
111bf6: 50 push %eax
111bf7: 50 push %eax
111bf8: ff 75 e0 pushl -0x20(%ebp)
111bfb: 57 push %edi
111bfc: e8 61 62 00 00 call 117e62 <fat_free_fat_clusters_chain>
if (rc != RC_OK)
111c01: 83 c4 10 add $0x10,%esp
111c04: 85 c0 test %eax,%eax
111c06: 75 28 jne 111c30 <fat_file_truncate+0xd6><== NEVER TAKEN
return rc;
if (cl_start != 0)
111c08: 85 db test %ebx,%ebx
111c0a: 0f 84 71 ff ff ff je 111b81 <fat_file_truncate+0x27>
{
rc = fat_set_fat_cluster(fs_info, new_last_cln, FAT_GENFAT_EOC);
111c10: 50 push %eax
111c11: 6a ff push $0xffffffff
111c13: ff 75 e4 pushl -0x1c(%ebp)
111c16: 57 push %edi
111c17: e8 2d 60 00 00 call 117c49 <fat_set_fat_cluster>
if ( rc != RC_OK )
111c1c: 83 c4 10 add $0x10,%esp
111c1f: 85 c0 test %eax,%eax
111c21: 75 0d jne 111c30 <fat_file_truncate+0xd6><== NEVER TAKEN
return rc;
fat_fd->map.file_cln = cl_start - 1;
111c23: 4b dec %ebx
111c24: 89 5e 34 mov %ebx,0x34(%esi)
fat_fd->map.disk_cln = new_last_cln;
111c27: 8b 55 e4 mov -0x1c(%ebp),%edx
111c2a: 89 56 38 mov %edx,0x38(%esi)
fat_fd->map.last_cln = new_last_cln;
111c2d: 89 56 3c mov %edx,0x3c(%esi)
}
return RC_OK;
}
111c30: 8d 65 f4 lea -0xc(%ebp),%esp
111c33: 5b pop %ebx
111c34: 5e pop %esi
111c35: 5f pop %edi
111c36: 5d pop %ebp
111c37: c3 ret
00111f82 <fat_file_write>:
fat_file_fd_t *fat_fd,
uint32_t start,
uint32_t count,
const uint8_t *buf
)
{
111f82: 55 push %ebp
111f83: 89 e5 mov %esp,%ebp
111f85: 57 push %edi
111f86: 56 push %esi
111f87: 53 push %ebx
111f88: 83 ec 3c sub $0x3c,%esp
111f8b: 8b 5d 08 mov 0x8(%ebp),%ebx
111f8e: 8b 75 0c mov 0xc(%ebp),%esi
111f91: 8b 7d 10 mov 0x10(%ebp),%edi
111f94: 8b 4d 14 mov 0x14(%ebp),%ecx
int rc = 0;
ssize_t ret = 0;
uint32_t cmpltd = 0;
uint32_t cur_cln = 0;
111f97: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
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;
111f9e: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
bool zero_fill = start > fat_fd->fat_file_size;
111fa5: 8b 56 18 mov 0x18(%esi),%edx
if ( count == 0 )
return cmpltd;
111fa8: 31 c0 xor %eax,%eax
uint32_t sec = 0;
uint32_t byte = 0;
uint32_t c = 0;
bool zero_fill = start > fat_fd->fat_file_size;
if ( count == 0 )
111faa: 85 c9 test %ecx,%ecx
111fac: 0f 84 8b 01 00 00 je 11213d <fat_file_write+0x1bb> <== NEVER TAKEN
return cmpltd;
if (start >= fat_fd->size_limit)
111fb2: 8b 46 14 mov 0x14(%esi),%eax
111fb5: 39 c7 cmp %eax,%edi
111fb7: 72 10 jb 111fc9 <fat_file_write+0x47> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one(EFBIG);
111fb9: e8 52 78 00 00 call 119810 <__errno> <== NOT EXECUTED
111fbe: c7 00 1b 00 00 00 movl $0x1b,(%eax) <== NOT EXECUTED
111fc4: e9 71 01 00 00 jmp 11213a <fat_file_write+0x1b8> <== NOT EXECUTED
111fc9: 29 f8 sub %edi,%eax
111fcb: 89 45 d0 mov %eax,-0x30(%ebp)
111fce: 39 c8 cmp %ecx,%eax
111fd0: 76 03 jbe 111fd5 <fat_file_write+0x53> <== NEVER TAKEN
111fd2: 89 4d d0 mov %ecx,-0x30(%ebp)
if (count > fat_fd->size_limit - start)
count = fat_fd->size_limit - start;
rc = fat_file_extend(fs_info, fat_fd, zero_fill, start + count, &c);
111fd5: 8b 4d d0 mov -0x30(%ebp),%ecx
111fd8: 01 f9 add %edi,%ecx
111fda: 83 ec 0c sub $0xc,%esp
111fdd: 8d 45 e4 lea -0x1c(%ebp),%eax
111fe0: 50 push %eax
111fe1: 51 push %ecx
uint32_t ofs = 0;
uint32_t save_ofs;
uint32_t sec = 0;
uint32_t byte = 0;
uint32_t c = 0;
bool zero_fill = start > fat_fd->fat_file_size;
111fe2: 31 c0 xor %eax,%eax
111fe4: 39 d7 cmp %edx,%edi
111fe6: 0f 97 c0 seta %al
rtems_set_errno_and_return_minus_one(EFBIG);
if (count > fat_fd->size_limit - start)
count = fat_fd->size_limit - start;
rc = fat_file_extend(fs_info, fat_fd, zero_fill, start + count, &c);
111fe9: 50 push %eax
111fea: 56 push %esi
111feb: 53 push %ebx
111fec: 89 4d c0 mov %ecx,-0x40(%ebp)
111fef: e8 70 fd ff ff call 111d64 <fat_file_extend>
if (rc != RC_OK)
111ff4: 83 c4 20 add $0x20,%esp
111ff7: 85 c0 test %eax,%eax
111ff9: 8b 4d c0 mov -0x40(%ebp),%ecx
111ffc: 0f 85 3b 01 00 00 jne 11213d <fat_file_write+0x1bb> <== NEVER TAKEN
/*
* check whether there was enough room on device to locate
* file of 'start + count' bytes
*/
if (c != (start + count))
112002: 8b 45 e4 mov -0x1c(%ebp),%eax
112005: 39 c8 cmp %ecx,%eax
112007: 74 05 je 11200e <fat_file_write+0x8c> <== ALWAYS TAKEN
count = c - start;
112009: 29 f8 sub %edi,%eax <== NOT EXECUTED
11200b: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
11200e: 83 7e 20 01 cmpl $0x1,0x20(%esi)
112012: 75 47 jne 11205b <fat_file_write+0xd9>
112014: 83 7e 24 00 cmpl $0x0,0x24(%esi)
112018: 75 41 jne 11205b <fat_file_write+0xd9> <== NEVER TAKEN
11201a: f6 43 0a 03 testb $0x3,0xa(%ebx)
11201e: 74 3b je 11205b <fat_file_write+0xd9> <== NEVER TAKEN
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
{
sec = fat_cluster_num_to_sector_num(fs_info, fat_fd->cln);
112020: 8b 56 1c mov 0x1c(%esi),%edx
112023: 89 d8 mov %ebx,%eax
112025: e8 8e f7 ff ff call 1117b8 <fat_cluster_num_to_sector_num>
sec += (start >> fs_info->vol.sec_log2);
byte = start & (fs_info->vol.bps - 1);
ret = _fat_block_write(fs_info, sec, byte, count, buf);
11202a: 83 ec 0c sub $0xc,%esp
11202d: ff 75 18 pushl 0x18(%ebp)
112030: ff 75 d0 pushl -0x30(%ebp)
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
{
sec = fat_cluster_num_to_sector_num(fs_info, fat_fd->cln);
sec += (start >> fs_info->vol.sec_log2);
byte = start & (fs_info->vol.bps - 1);
112033: 0f b7 13 movzwl (%ebx),%edx
112036: 4a dec %edx
112037: 21 fa and %edi,%edx
ret = _fat_block_write(fs_info, sec, byte, count, buf);
112039: 52 push %edx
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
{
sec = fat_cluster_num_to_sector_num(fs_info, fat_fd->cln);
sec += (start >> fs_info->vol.sec_log2);
11203a: 0f b6 4b 02 movzbl 0x2(%ebx),%ecx
11203e: 89 fa mov %edi,%edx
112040: d3 ea shr %cl,%edx
112042: 01 d0 add %edx,%eax
byte = start & (fs_info->vol.bps - 1);
ret = _fat_block_write(fs_info, sec, byte, count, buf);
112044: 50 push %eax
112045: 53 push %ebx
112046: e8 09 05 00 00 call 112554 <_fat_block_write>
if ( ret < 0 )
11204b: 83 c4 20 add $0x20,%esp
11204e: 85 c0 test %eax,%eax
112050: 0f 89 e7 00 00 00 jns 11213d <fat_file_write+0x1bb> <== ALWAYS TAKEN
112056: e9 df 00 00 00 jmp 11213a <fat_file_write+0x1b8> <== NOT EXECUTED
return -1;
return ret;
}
cl_start = start >> fs_info->vol.bpc_log2;
11205b: 0f b6 4b 08 movzbl 0x8(%ebx),%ecx
11205f: 89 f8 mov %edi,%eax
112061: d3 e8 shr %cl,%eax
112063: 89 45 c4 mov %eax,-0x3c(%ebp)
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
112066: 66 8b 4b 06 mov 0x6(%ebx),%cx
11206a: 66 89 4d cc mov %cx,-0x34(%ebp)
rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln);
11206e: 83 ec 0c sub $0xc,%esp
112071: 8d 45 e0 lea -0x20(%ebp),%eax
112074: 89 45 d4 mov %eax,-0x2c(%ebp)
112077: 50 push %eax
112078: 8b 4d c4 mov -0x3c(%ebp),%ecx
11207b: 89 f2 mov %esi,%edx
11207d: 89 d8 mov %ebx,%eax
11207f: e8 95 f7 ff ff call 111819 <fat_file_lseek>
if (rc != RC_OK)
112084: 83 c4 10 add $0x10,%esp
112087: 85 c0 test %eax,%eax
112089: 0f 85 ae 00 00 00 jne 11213d <fat_file_write+0x1bb> <== NEVER TAKEN
return ret;
}
cl_start = start >> fs_info->vol.bpc_log2;
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
11208f: 0f b7 45 cc movzwl -0x34(%ebp),%eax
112093: 48 dec %eax
112094: 21 f8 and %edi,%eax
112096: 89 45 c8 mov %eax,-0x38(%ebp)
112099: 89 c7 mov %eax,%edi
11209b: 31 d2 xor %edx,%edx
11209d: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp)
1120a4: eb 70 jmp 112116 <fat_file_write+0x194>
if (rc != RC_OK)
return rc;
while (count > 0)
{
c = MIN(count, (fs_info->vol.bpc - ofs));
1120a6: 0f b7 4b 06 movzwl 0x6(%ebx),%ecx
1120aa: 29 f9 sub %edi,%ecx
1120ac: 3b 4d d0 cmp -0x30(%ebp),%ecx
1120af: 76 03 jbe 1120b4 <fat_file_write+0x132>
1120b1: 8b 4d d0 mov -0x30(%ebp),%ecx
1120b4: 89 4d e4 mov %ecx,-0x1c(%ebp)
sec = fat_cluster_num_to_sector_num(fs_info, cur_cln);
1120b7: 8b 55 e0 mov -0x20(%ebp),%edx
1120ba: 89 d8 mov %ebx,%eax
1120bc: 89 4d c0 mov %ecx,-0x40(%ebp)
1120bf: e8 f4 f6 ff ff call 1117b8 <fat_cluster_num_to_sector_num>
sec += (ofs >> fs_info->vol.sec_log2);
byte = ofs & (fs_info->vol.bps - 1);
ret = _fat_block_write(fs_info, sec, byte, c, buf + cmpltd);
1120c4: 83 ec 0c sub $0xc,%esp
1120c7: 8b 55 18 mov 0x18(%ebp),%edx
1120ca: 03 55 cc add -0x34(%ebp),%edx
1120cd: 52 push %edx
1120ce: 8b 4d c0 mov -0x40(%ebp),%ecx
1120d1: 51 push %ecx
{
c = MIN(count, (fs_info->vol.bpc - ofs));
sec = fat_cluster_num_to_sector_num(fs_info, cur_cln);
sec += (ofs >> fs_info->vol.sec_log2);
byte = ofs & (fs_info->vol.bps - 1);
1120d2: 0f b7 13 movzwl (%ebx),%edx
1120d5: 4a dec %edx
1120d6: 21 fa and %edi,%edx
ret = _fat_block_write(fs_info, sec, byte, c, buf + cmpltd);
1120d8: 52 push %edx
while (count > 0)
{
c = MIN(count, (fs_info->vol.bpc - ofs));
sec = fat_cluster_num_to_sector_num(fs_info, cur_cln);
sec += (ofs >> fs_info->vol.sec_log2);
1120d9: 0f b6 4b 02 movzbl 0x2(%ebx),%ecx
1120dd: d3 ef shr %cl,%edi
1120df: 01 f8 add %edi,%eax
byte = ofs & (fs_info->vol.bps - 1);
ret = _fat_block_write(fs_info, sec, byte, c, buf + cmpltd);
1120e1: 50 push %eax
1120e2: 53 push %ebx
1120e3: e8 6c 04 00 00 call 112554 <_fat_block_write>
if ( ret < 0 )
1120e8: 83 c4 20 add $0x20,%esp
1120eb: 85 c0 test %eax,%eax
1120ed: 78 4b js 11213a <fat_file_write+0x1b8> <== NEVER TAKEN
return -1;
count -= c;
1120ef: 8b 45 e4 mov -0x1c(%ebp),%eax
1120f2: 29 45 d0 sub %eax,-0x30(%ebp)
cmpltd += c;
1120f5: 01 45 cc add %eax,-0x34(%ebp)
save_cln = cur_cln;
1120f8: 8b 55 e0 mov -0x20(%ebp),%edx
rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln);
1120fb: 50 push %eax
1120fc: 8d 7d e0 lea -0x20(%ebp),%edi
1120ff: 57 push %edi
112100: 52 push %edx
112101: 53 push %ebx
112102: 89 55 c0 mov %edx,-0x40(%ebp)
112105: e8 f6 59 00 00 call 117b00 <fat_get_fat_cluster>
if ( rc != RC_OK )
return rc;
ofs = 0;
11210a: 31 ff xor %edi,%edi
count -= c;
cmpltd += c;
save_cln = cur_cln;
rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln);
if ( rc != RC_OK )
11210c: 83 c4 10 add $0x10,%esp
11210f: 85 c0 test %eax,%eax
112111: 8b 55 c0 mov -0x40(%ebp),%edx
112114: 75 27 jne 11213d <fat_file_write+0x1bb> <== NEVER TAKEN
rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln);
if (rc != RC_OK)
return rc;
while (count > 0)
112116: 83 7d d0 00 cmpl $0x0,-0x30(%ebp)
11211a: 75 8a jne 1120a6 <fat_file_write+0x124>
}
/* update cache */
/* XXX: check this - I'm not sure :( */
fat_fd->map.file_cln = cl_start +
((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2);
11211c: 8b 4d cc mov -0x34(%ebp),%ecx
11211f: 8b 7d c8 mov -0x38(%ebp),%edi
112122: 8d 44 39 ff lea -0x1(%ecx,%edi,1),%eax
112126: 0f b6 4b 08 movzbl 0x8(%ebx),%ecx
11212a: d3 e8 shr %cl,%eax
ofs = 0;
}
/* update cache */
/* XXX: check this - I'm not sure :( */
fat_fd->map.file_cln = cl_start +
11212c: 03 45 c4 add -0x3c(%ebp),%eax
11212f: 89 46 34 mov %eax,0x34(%esi)
((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2);
fat_fd->map.disk_cln = save_cln;
112132: 89 56 38 mov %edx,0x38(%esi)
return cmpltd;
112135: 8b 45 cc mov -0x34(%ebp),%eax
112138: eb 03 jmp 11213d <fat_file_write+0x1bb>
sec += (ofs >> fs_info->vol.sec_log2);
byte = ofs & (fs_info->vol.bps - 1);
ret = _fat_block_write(fs_info, sec, byte, c, buf + cmpltd);
if ( ret < 0 )
return -1;
11213a: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
fat_fd->map.file_cln = cl_start +
((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2);
fat_fd->map.disk_cln = save_cln;
return cmpltd;
}
11213d: 8d 65 f4 lea -0xc(%ebp),%esp
112140: 5b pop %ebx
112141: 5e pop %esi
112142: 5f pop %edi
112143: 5d pop %ebp
112144: c3 ret
00117e62 <fat_free_fat_clusters_chain>:
int
fat_free_fat_clusters_chain(
fat_fs_info_t *fs_info,
uint32_t chain
)
{
117e62: 55 push %ebp
117e63: 89 e5 mov %esp,%ebp
117e65: 57 push %edi
117e66: 56 push %esi
117e67: 53 push %ebx
117e68: 83 ec 2c sub $0x2c,%esp
117e6b: 8b 5d 08 mov 0x8(%ebp),%ebx
int rc = RC_OK, rc1 = RC_OK;
uint32_t cur_cln = chain;
uint32_t next_cln = 0;
117e6e: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
fat_fs_info_t *fs_info,
uint32_t chain
)
{
int rc = RC_OK, rc1 = RC_OK;
uint32_t cur_cln = chain;
117e75: 8b 55 0c mov 0xc(%ebp),%edx
uint32_t next_cln = 0;
uint32_t freed_cls_cnt = 0;
117e78: 31 f6 xor %esi,%esi
fat_free_fat_clusters_chain(
fat_fs_info_t *fs_info,
uint32_t chain
)
{
int rc = RC_OK, rc1 = RC_OK;
117e7a: 31 ff xor %edi,%edi
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)
117e7c: eb 53 jmp 117ed1 <fat_free_fat_clusters_chain+0x6f>
{
rc = fat_get_fat_cluster(fs_info, cur_cln, &next_cln);
117e7e: 51 push %ecx
117e7f: 8d 45 e4 lea -0x1c(%ebp),%eax
117e82: 50 push %eax
117e83: 52 push %edx
117e84: 53 push %ebx
117e85: 89 55 d4 mov %edx,-0x2c(%ebp)
117e88: e8 73 fc ff ff call 117b00 <fat_get_fat_cluster>
117e8d: 89 c1 mov %eax,%ecx
if ( rc != RC_OK )
117e8f: 83 c4 10 add $0x10,%esp
117e92: 85 c0 test %eax,%eax
117e94: 8b 55 d4 mov -0x2c(%ebp),%edx
117e97: 74 21 je 117eba <fat_free_fat_clusters_chain+0x58><== ALWAYS TAKEN
{
if(fs_info->vol.free_cls != FAT_UNDEFINED_VALUE)
117e99: 8b 43 40 mov 0x40(%ebx),%eax <== NOT EXECUTED
117e9c: 83 f8 ff cmp $0xffffffff,%eax <== NOT EXECUTED
117e9f: 74 05 je 117ea6 <fat_free_fat_clusters_chain+0x44><== NOT EXECUTED
fs_info->vol.free_cls += freed_cls_cnt;
117ea1: 01 c6 add %eax,%esi <== NOT EXECUTED
117ea3: 89 73 40 mov %esi,0x40(%ebx) <== NOT EXECUTED
fat_buf_release(fs_info);
117ea6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
117ea9: 53 push %ebx <== NOT EXECUTED
117eaa: 89 4d d4 mov %ecx,-0x2c(%ebp) <== NOT EXECUTED
117ead: e8 07 a5 ff ff call 1123b9 <fat_buf_release> <== NOT EXECUTED
117eb2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
117eb5: 8b 4d d4 mov -0x2c(%ebp),%ecx <== NOT EXECUTED
117eb8: eb 42 jmp 117efc <fat_free_fat_clusters_chain+0x9a><== NOT EXECUTED
return rc;
}
rc = fat_set_fat_cluster(fs_info, cur_cln, FAT_GENFAT_FREE);
117eba: 50 push %eax
117ebb: 6a 00 push $0x0
117ebd: 52 push %edx
117ebe: 53 push %ebx
117ebf: e8 85 fd ff ff call 117c49 <fat_set_fat_cluster>
if ( rc != RC_OK )
117ec4: 83 c4 10 add $0x10,%esp
117ec7: 85 c0 test %eax,%eax
117ec9: 74 02 je 117ecd <fat_free_fat_clusters_chain+0x6b><== ALWAYS TAKEN
117ecb: 89 c7 mov %eax,%edi <== NOT EXECUTED
rc1 = rc;
freed_cls_cnt++;
117ecd: 46 inc %esi
cur_cln = next_cln;
117ece: 8b 55 e4 mov -0x1c(%ebp),%edx
int rc = RC_OK, rc1 = RC_OK;
uint32_t cur_cln = chain;
uint32_t next_cln = 0;
uint32_t freed_cls_cnt = 0;
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
117ed1: 8b 43 0c mov 0xc(%ebx),%eax
117ed4: 21 d0 and %edx,%eax
117ed6: 3b 43 10 cmp 0x10(%ebx),%eax
117ed9: 72 a3 jb 117e7e <fat_free_fat_clusters_chain+0x1c>
freed_cls_cnt++;
cur_cln = next_cln;
}
fs_info->vol.next_cl = chain;
117edb: 8b 45 0c mov 0xc(%ebp),%eax
117ede: 89 43 44 mov %eax,0x44(%ebx)
if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE)
117ee1: 8b 43 40 mov 0x40(%ebx),%eax
117ee4: 83 f8 ff cmp $0xffffffff,%eax
117ee7: 74 05 je 117eee <fat_free_fat_clusters_chain+0x8c><== ALWAYS TAKEN
fs_info->vol.free_cls += freed_cls_cnt;
117ee9: 01 c6 add %eax,%esi <== NOT EXECUTED
117eeb: 89 73 40 mov %esi,0x40(%ebx) <== NOT EXECUTED
fat_buf_release(fs_info);
117eee: 83 ec 0c sub $0xc,%esp
117ef1: 53 push %ebx
117ef2: e8 c2 a4 ff ff call 1123b9 <fat_buf_release>
117ef7: 83 c4 10 add $0x10,%esp
117efa: 89 f9 mov %edi,%ecx
if (rc1 != RC_OK)
return rc1;
return RC_OK;
}
117efc: 89 c8 mov %ecx,%eax
117efe: 8d 65 f4 lea -0xc(%ebp),%esp
117f01: 5b pop %ebx
117f02: 5e pop %esi
117f03: 5f pop %edi
117f04: 5d pop %ebp
117f05: c3 ret
00112835 <fat_free_unique_ino>:
void
fat_free_unique_ino(
fat_fs_info_t *fs_info,
uint32_t ino
)
{
112835: 55 push %ebp <== NOT EXECUTED
112836: 89 e5 mov %esp,%ebp <== NOT EXECUTED
112838: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
11283b: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED
FAT_SET_UNIQ_INO_FREE((ino - fs_info->uino_base), fs_info->uino);
11283e: 2b 4a 74 sub 0x74(%edx),%ecx <== NOT EXECUTED
112841: 89 c8 mov %ecx,%eax <== NOT EXECUTED
112843: c1 e8 03 shr $0x3,%eax <== NOT EXECUTED
112846: 03 42 68 add 0x68(%edx),%eax <== NOT EXECUTED
112849: 83 e1 07 and $0x7,%ecx <== NOT EXECUTED
11284c: ba 01 00 00 00 mov $0x1,%edx <== NOT EXECUTED
112851: d3 e2 shl %cl,%edx <== NOT EXECUTED
112853: f7 d2 not %edx <== NOT EXECUTED
112855: 20 10 and %dl,(%eax) <== NOT EXECUTED
}
112857: 5d pop %ebp <== NOT EXECUTED
112858: c3 ret <== NOT EXECUTED
00117b00 <fat_get_fat_cluster>:
fat_get_fat_cluster(
fat_fs_info_t *fs_info,
uint32_t cln,
uint32_t *ret_val
)
{
117b00: 55 push %ebp
117b01: 89 e5 mov %esp,%ebp
117b03: 57 push %edi
117b04: 56 push %esi
117b05: 53 push %ebx
117b06: 83 ec 2c sub $0x2c,%esp
117b09: 8b 75 08 mov 0x8(%ebp),%esi
117b0c: 8b 5d 10 mov 0x10(%ebp),%ebx
int rc = RC_OK;
rtems_bdbuf_buffer *block0 = NULL;
117b0f: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
uint32_t sec = 0;
uint32_t ofs = 0;
/* sanity check */
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
117b16: 83 7d 0c 01 cmpl $0x1,0xc(%ebp)
117b1a: 0f 86 0d 01 00 00 jbe 117c2d <fat_get_fat_cluster+0x12d><== NEVER TAKEN
117b20: 8b 46 34 mov 0x34(%esi),%eax
117b23: 40 inc %eax
117b24: 39 45 0c cmp %eax,0xc(%ebp)
117b27: 76 05 jbe 117b2e <fat_get_fat_cluster+0x2e><== ALWAYS TAKEN
117b29: e9 ff 00 00 00 jmp 117c2d <fat_get_fat_cluster+0x12d><== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
117b2e: 8a 56 0a mov 0xa(%esi),%dl
117b31: 88 d0 mov %dl,%al
117b33: 8b 7d 0c mov 0xc(%ebp),%edi
117b36: 24 01 and $0x1,%al
117b38: 74 07 je 117b41 <fat_get_fat_cluster+0x41><== NEVER TAKEN
117b3a: d1 ef shr %edi
117b3c: 03 7d 0c add 0xc(%ebp),%edi
117b3f: eb 0c jmp 117b4d <fat_get_fat_cluster+0x4d>
117b41: f6 c2 02 test $0x2,%dl <== NOT EXECUTED
117b44: 74 04 je 117b4a <fat_get_fat_cluster+0x4a><== NOT EXECUTED
117b46: d1 e7 shl %edi <== NOT EXECUTED
117b48: eb 03 jmp 117b4d <fat_get_fat_cluster+0x4d><== NOT EXECUTED
117b4a: c1 e7 02 shl $0x2,%edi <== NOT EXECUTED
117b4d: 0f b6 4e 02 movzbl 0x2(%esi),%ecx
117b51: d3 ef shr %cl,%edi
117b53: 8b 4e 4c mov 0x4c(%esi),%ecx
117b56: 01 cf add %ecx,%edi
117b58: 89 7d d4 mov %edi,-0x2c(%ebp)
fs_info->vol.afat_loc;
ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1);
117b5b: 8b 7d 0c mov 0xc(%ebp),%edi
117b5e: 84 c0 test %al,%al
117b60: 74 07 je 117b69 <fat_get_fat_cluster+0x69><== NEVER TAKEN
117b62: d1 ef shr %edi
117b64: 03 7d 0c add 0xc(%ebp),%edi
117b67: eb 0c jmp 117b75 <fat_get_fat_cluster+0x75>
117b69: 80 e2 02 and $0x2,%dl <== NOT EXECUTED
117b6c: 74 04 je 117b72 <fat_get_fat_cluster+0x72><== NOT EXECUTED
117b6e: d1 e7 shl %edi <== NOT EXECUTED
117b70: eb 03 jmp 117b75 <fat_get_fat_cluster+0x75><== NOT EXECUTED
117b72: c1 e7 02 shl $0x2,%edi <== NOT EXECUTED
117b75: 8b 0e mov (%esi),%ecx
117b77: 66 89 4d d0 mov %cx,-0x30(%ebp)
rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0);
117b7b: 8d 45 e4 lea -0x1c(%ebp),%eax
117b7e: 50 push %eax
117b7f: 6a 01 push $0x1
117b81: ff 75 d4 pushl -0x2c(%ebp)
117b84: 56 push %esi
117b85: e8 7a a6 ff ff call 112204 <fat_buf_access>
117b8a: 89 c1 mov %eax,%ecx
if (rc != RC_OK)
117b8c: 83 c4 10 add $0x10,%esp
117b8f: 85 c0 test %eax,%eax
117b91: 0f 85 a8 00 00 00 jne 117c3f <fat_get_fat_cluster+0x13f><== NEVER TAKEN
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);
117b97: 0f b7 45 d0 movzwl -0x30(%ebp),%eax
117b9b: 48 dec %eax
117b9c: 21 f8 and %edi,%eax
rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0);
if (rc != RC_OK)
return rc;
switch ( fs_info->vol.type )
117b9e: 8a 56 0a mov 0xa(%esi),%dl
117ba1: 80 fa 02 cmp $0x2,%dl
117ba4: 74 6e je 117c14 <fat_get_fat_cluster+0x114><== NEVER TAKEN
117ba6: 80 fa 04 cmp $0x4,%dl
117ba9: 74 75 je 117c20 <fat_get_fat_cluster+0x120><== NEVER TAKEN
117bab: fe ca dec %dl
117bad: 75 7e jne 117c2d <fat_get_fat_cluster+0x12d><== NEVER TAKEN
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)));
117baf: 8b 55 e4 mov -0x1c(%ebp),%edx
117bb2: 8b 52 1c mov 0x1c(%edx),%edx
117bb5: 0f b6 3c 02 movzbl (%edx,%eax,1),%edi
117bb9: 89 7d d0 mov %edi,-0x30(%ebp)
117bbc: 89 3b mov %edi,(%ebx)
if ( ofs == (fs_info->vol.bps - 1) )
117bbe: 0f b7 3e movzwl (%esi),%edi
117bc1: 4f dec %edi
117bc2: 39 f8 cmp %edi,%eax
117bc4: 75 2e jne 117bf4 <fat_get_fat_cluster+0xf4><== ALWAYS TAKEN
{
rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ,
117bc6: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED
117bc9: 50 push %eax <== NOT EXECUTED
117bca: 6a 01 push $0x1 <== NOT EXECUTED
117bcc: 8b 7d d4 mov -0x2c(%ebp),%edi <== NOT EXECUTED
117bcf: 47 inc %edi <== NOT EXECUTED
117bd0: 57 push %edi <== NOT EXECUTED
117bd1: 56 push %esi <== NOT EXECUTED
117bd2: 89 4d cc mov %ecx,-0x34(%ebp) <== NOT EXECUTED
117bd5: e8 2a a6 ff ff call 112204 <fat_buf_access> <== NOT EXECUTED
&block0);
if (rc != RC_OK)
117bda: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
117bdd: 85 c0 test %eax,%eax <== NOT EXECUTED
117bdf: 8b 4d cc mov -0x34(%ebp),%ecx <== NOT EXECUTED
117be2: 75 59 jne 117c3d <fat_get_fat_cluster+0x13d><== NOT EXECUTED
return rc;
*ret_val |= (*((uint8_t *)(block0->buffer)))<<8;
117be4: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
117be7: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED
117bea: 0f b6 00 movzbl (%eax),%eax <== NOT EXECUTED
117bed: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED
117bf0: 09 03 or %eax,(%ebx) <== NOT EXECUTED
117bf2: eb 0d jmp 117c01 <fat_get_fat_cluster+0x101><== NOT EXECUTED
}
else
{
*ret_val |= (*((uint8_t *)(block0->buffer + ofs + 1)))<<8;
117bf4: 0f b6 44 02 01 movzbl 0x1(%edx,%eax,1),%eax
117bf9: c1 e0 08 shl $0x8,%eax
117bfc: 0b 45 d0 or -0x30(%ebp),%eax
117bff: 89 03 mov %eax,(%ebx)
}
if ( FAT_CLUSTER_IS_ODD(cln) )
117c01: f6 45 0c 01 testb $0x1,0xc(%ebp)
117c05: 74 05 je 117c0c <fat_get_fat_cluster+0x10c>
*ret_val = (*ret_val) >> FAT12_SHIFT;
117c07: c1 2b 04 shrl $0x4,(%ebx)
117c0a: eb 33 jmp 117c3f <fat_get_fat_cluster+0x13f>
else
*ret_val = (*ret_val) & FAT_FAT12_MASK;
117c0c: 81 23 ff 0f 00 00 andl $0xfff,(%ebx)
117c12: eb 2b jmp 117c3f <fat_get_fat_cluster+0x13f>
break;
case FAT_FAT16:
*ret_val = *((uint16_t *)(block0->buffer + ofs));
117c14: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
117c17: 8b 52 1c mov 0x1c(%edx),%edx <== NOT EXECUTED
117c1a: 0f b7 04 02 movzwl (%edx,%eax,1),%eax <== NOT EXECUTED
117c1e: eb 09 jmp 117c29 <fat_get_fat_cluster+0x129><== NOT EXECUTED
*ret_val = CF_LE_W(*ret_val);
break;
case FAT_FAT32:
*ret_val = *((uint32_t *)(block0->buffer + ofs));
117c20: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
117c23: 8b 52 1c mov 0x1c(%edx),%edx <== NOT EXECUTED
117c26: 8b 04 02 mov (%edx,%eax,1),%eax <== NOT EXECUTED
117c29: 89 03 mov %eax,(%ebx) <== NOT EXECUTED
*ret_val = CF_LE_L(*ret_val);
break;
117c2b: eb 12 jmp 117c3f <fat_get_fat_cluster+0x13f><== NOT EXECUTED
default:
rtems_set_errno_and_return_minus_one(EIO);
117c2d: e8 de 1b 00 00 call 119810 <__errno> <== NOT EXECUTED
117c32: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
117c38: 83 c9 ff or $0xffffffff,%ecx <== NOT EXECUTED
117c3b: eb 02 jmp 117c3f <fat_get_fat_cluster+0x13f><== NOT EXECUTED
*ret_val = (*((uint8_t *)(block0->buffer + ofs)));
if ( ofs == (fs_info->vol.bps - 1) )
{
rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ,
&block0);
if (rc != RC_OK)
117c3d: 89 c1 mov %eax,%ecx <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
break;
}
return RC_OK;
}
117c3f: 89 c8 mov %ecx,%eax
117c41: 8d 65 f4 lea -0xc(%ebp),%esp
117c44: 5b pop %ebx
117c45: 5e pop %esi
117c46: 5f pop %edi
117c47: 5d pop %ebp
117c48: c3 ret
0011279b <fat_get_unique_ino>:
* 0 means FAILED !!!
*
*/
uint32_t
fat_get_unique_ino(fat_fs_info_t *fs_info)
{
11279b: 55 push %ebp <== NOT EXECUTED
11279c: 89 e5 mov %esp,%ebp <== NOT EXECUTED
11279e: 57 push %edi <== NOT EXECUTED
11279f: 56 push %esi <== NOT EXECUTED
1127a0: 53 push %ebx <== NOT EXECUTED
1127a1: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED
1127a4: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
uint32_t j = 0;
bool resrc_unsuff = false;
while (!resrc_unsuff)
1127a7: eb 7a jmp 112823 <fat_get_unique_ino+0x88><== NOT EXECUTED
{
for (j = 0; j < fs_info->uino_pool_size; j++)
{
if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino))
1127a9: 8b 73 6c mov 0x6c(%ebx),%esi <== NOT EXECUTED
1127ac: 89 f0 mov %esi,%eax <== NOT EXECUTED
1127ae: c1 e8 03 shr $0x3,%eax <== NOT EXECUTED
1127b1: 03 43 68 add 0x68(%ebx),%eax <== NOT EXECUTED
1127b4: 8a 08 mov (%eax),%cl <== NOT EXECUTED
1127b6: 88 4d e3 mov %cl,-0x1d(%ebp) <== NOT EXECUTED
1127b9: 89 f1 mov %esi,%ecx <== NOT EXECUTED
1127bb: 83 e1 07 and $0x7,%ecx <== NOT EXECUTED
1127be: 0f be 7d e3 movsbl -0x1d(%ebp),%edi <== NOT EXECUTED
1127c2: 0f a3 cf bt %ecx,%edi <== NOT EXECUTED
1127c5: 72 14 jb 1127db <fat_get_unique_ino+0x40><== NOT EXECUTED
{
FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino);
1127c7: ba 01 00 00 00 mov $0x1,%edx <== NOT EXECUTED
1127cc: d3 e2 shl %cl,%edx <== NOT EXECUTED
1127ce: 0a 55 e3 or -0x1d(%ebp),%dl <== NOT EXECUTED
1127d1: 88 10 mov %dl,(%eax) <== NOT EXECUTED
return (fs_info->uino_base + fs_info->index);
1127d3: 8b 43 6c mov 0x6c(%ebx),%eax <== NOT EXECUTED
1127d6: 03 43 74 add 0x74(%ebx),%eax <== NOT EXECUTED
1127d9: eb 52 jmp 11282d <fat_get_unique_ino+0x92><== NOT EXECUTED
}
fs_info->index++;
1127db: 46 inc %esi <== NOT EXECUTED
if (fs_info->index >= fs_info->uino_pool_size)
1127dc: 3b 75 e4 cmp -0x1c(%ebp),%esi <== NOT EXECUTED
1127df: 73 05 jae 1127e6 <fat_get_unique_ino+0x4b><== NOT EXECUTED
if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino))
{
FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino);
return (fs_info->uino_base + fs_info->index);
}
fs_info->index++;
1127e1: 89 73 6c mov %esi,0x6c(%ebx) <== NOT EXECUTED
1127e4: eb 07 jmp 1127ed <fat_get_unique_ino+0x52><== NOT EXECUTED
if (fs_info->index >= fs_info->uino_pool_size)
fs_info->index = 0;
1127e6: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) <== NOT EXECUTED
uint32_t j = 0;
bool resrc_unsuff = false;
while (!resrc_unsuff)
{
for (j = 0; j < fs_info->uino_pool_size; j++)
1127ed: 42 inc %edx <== NOT EXECUTED
1127ee: 3b 55 e4 cmp -0x1c(%ebp),%edx <== NOT EXECUTED
1127f1: 75 b6 jne 1127a9 <fat_get_unique_ino+0xe><== 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))
1127f3: d1 e2 shl %edx <== NOT EXECUTED
1127f5: b8 ff ff ff 0f mov $0xfffffff,%eax <== NOT EXECUTED
1127fa: 2b 43 74 sub 0x74(%ebx),%eax <== NOT EXECUTED
1127fd: 39 c2 cmp %eax,%edx <== NOT EXECUTED
1127ff: 72 04 jb 112805 <fat_get_unique_ino+0x6a><== NOT EXECUTED
resrc_unsuff = true;
}
else
resrc_unsuff = true;
}
return 0;
112801: 31 c0 xor %eax,%eax <== NOT EXECUTED
112803: eb 28 jmp 11282d <fat_get_unique_ino+0x92><== NOT EXECUTED
fs_info->index = 0;
}
if ((fs_info->uino_pool_size << 1) < (0x0FFFFFFF - fs_info->uino_base))
{
fs_info->uino_pool_size <<= 1;
112805: 89 53 70 mov %edx,0x70(%ebx) <== NOT EXECUTED
fs_info->uino = realloc(fs_info->uino, fs_info->uino_pool_size);
112808: 51 push %ecx <== NOT EXECUTED
112809: 51 push %ecx <== NOT EXECUTED
11280a: 52 push %edx <== NOT EXECUTED
11280b: ff 73 68 pushl 0x68(%ebx) <== NOT EXECUTED
11280e: e8 c5 59 ff ff call 1081d8 <realloc> <== NOT EXECUTED
112813: 89 43 68 mov %eax,0x68(%ebx) <== NOT EXECUTED
if (fs_info->uino != NULL)
112816: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
112819: 85 c0 test %eax,%eax <== NOT EXECUTED
11281b: 74 e4 je 112801 <fat_get_unique_ino+0x66><== NOT EXECUTED
fs_info->index = fs_info->uino_pool_size;
11281d: 8b 43 70 mov 0x70(%ebx),%eax <== NOT EXECUTED
112820: 89 43 6c mov %eax,0x6c(%ebx) <== NOT EXECUTED
uint32_t j = 0;
bool resrc_unsuff = false;
while (!resrc_unsuff)
{
for (j = 0; j < fs_info->uino_pool_size; j++)
112823: 8b 43 70 mov 0x70(%ebx),%eax <== NOT EXECUTED
112826: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED
112829: 31 d2 xor %edx,%edx <== NOT EXECUTED
11282b: eb c1 jmp 1127ee <fat_get_unique_ino+0x53><== NOT EXECUTED
}
else
resrc_unsuff = true;
}
return 0;
}
11282d: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
112830: 5b pop %ebx <== NOT EXECUTED
112831: 5e pop %esi <== NOT EXECUTED
112832: 5f pop %edi <== NOT EXECUTED
112833: 5d pop %ebp <== NOT EXECUTED
112834: c3 ret <== NOT EXECUTED
001126fb <fat_init_clusters_chain>:
int
fat_init_clusters_chain(
fat_fs_info_t *fs_info,
uint32_t start_cln
)
{
1126fb: 55 push %ebp
1126fc: 89 e5 mov %esp,%ebp
1126fe: 57 push %edi
1126ff: 56 push %esi
112700: 53 push %ebx
112701: 83 ec 34 sub $0x34,%esp
112704: 8b 5d 08 mov 0x8(%ebp),%ebx
int rc = RC_OK;
ssize_t ret = 0;
uint32_t cur_cln = start_cln;
112707: 8b 45 0c mov 0xc(%ebp),%eax
11270a: 89 45 e4 mov %eax,-0x1c(%ebp)
char *buf;
buf = calloc(fs_info->vol.bpc, sizeof(char));
11270d: 6a 01 push $0x1
11270f: 0f b7 43 06 movzwl 0x6(%ebx),%eax
112713: 50 push %eax
112714: e8 a7 48 ff ff call 106fc0 <calloc>
112719: 89 c6 mov %eax,%esi
if ( buf == NULL )
11271b: 83 c4 10 add $0x10,%esp
{
free(buf);
return -1;
}
rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln);
11271e: 8d 7d e4 lea -0x1c(%ebp),%edi
ssize_t ret = 0;
uint32_t cur_cln = start_cln;
char *buf;
buf = calloc(fs_info->vol.bpc, sizeof(char));
if ( buf == NULL )
112721: 85 c0 test %eax,%eax
112723: 75 53 jne 112778 <fat_init_clusters_chain+0x7d><== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EIO );
112725: e8 e6 70 00 00 call 119810 <__errno> <== NOT EXECUTED
11272a: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
112730: eb 1b jmp 11274d <fat_init_clusters_chain+0x52><== NOT EXECUTED
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
{
ret = fat_cluster_write(fs_info, cur_cln, buf);
112732: 52 push %edx
112733: 56 push %esi
112734: 50 push %eax
112735: 53 push %ebx
112736: e8 7b ff ff ff call 1126b6 <fat_cluster_write>
if ( ret == -1 )
11273b: 83 c4 10 add $0x10,%esp
11273e: 40 inc %eax
11273f: 75 11 jne 112752 <fat_init_clusters_chain+0x57><== ALWAYS TAKEN
{
free(buf);
112741: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
112744: 56 push %esi <== NOT EXECUTED
112745: e8 e2 4a ff ff call 10722c <free> <== NOT EXECUTED
11274a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
return -1;
11274d: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
112750: eb 41 jmp 112793 <fat_init_clusters_chain+0x98><== NOT EXECUTED
}
rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln);
112752: 50 push %eax
112753: 57 push %edi
112754: ff 75 e4 pushl -0x1c(%ebp)
112757: 53 push %ebx
112758: e8 a3 53 00 00 call 117b00 <fat_get_fat_cluster>
if ( rc != RC_OK )
11275d: 83 c4 10 add $0x10,%esp
112760: 85 c0 test %eax,%eax
112762: 74 14 je 112778 <fat_init_clusters_chain+0x7d><== ALWAYS TAKEN
{
free(buf);
112764: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
112767: 56 push %esi <== NOT EXECUTED
112768: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED
11276b: e8 bc 4a ff ff call 10722c <free> <== NOT EXECUTED
112770: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
112773: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED
112776: eb 1b jmp 112793 <fat_init_clusters_chain+0x98><== 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)
112778: 8b 45 e4 mov -0x1c(%ebp),%eax
11277b: 8b 53 0c mov 0xc(%ebx),%edx
11277e: 21 c2 and %eax,%edx
112780: 3b 53 10 cmp 0x10(%ebx),%edx
112783: 72 ad jb 112732 <fat_init_clusters_chain+0x37>
free(buf);
return rc;
}
}
free(buf);
112785: 83 ec 0c sub $0xc,%esp
112788: 56 push %esi
112789: e8 9e 4a ff ff call 10722c <free>
11278e: 83 c4 10 add $0x10,%esp
112791: 31 c0 xor %eax,%eax
return rc;
}
112793: 8d 65 f4 lea -0xc(%ebp),%esp
112796: 5b pop %ebx
112797: 5e pop %esi
112798: 5f pop %edi
112799: 5d pop %ebp
11279a: c3 ret
001129c7 <fat_init_volume_info>:
* RC_OK on success, or -1 if error occured
* and errno set appropriately
*/
int
fat_init_volume_info(fat_fs_info_t *fs_info, const char *device)
{
1129c7: 55 push %ebp
1129c8: 89 e5 mov %esp,%ebp
1129ca: 57 push %edi
1129cb: 56 push %esi
1129cc: 53 push %ebx
1129cd: 81 ec 14 01 00 00 sub $0x114,%esp
1129d3: 8b 5d 08 mov 0x8(%ebp),%ebx
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;
1129d6: c7 45 90 00 00 00 00 movl $0x0,-0x70(%ebp)
vol->fd = open(device, O_RDWR);
1129dd: 6a 02 push $0x2
1129df: ff 75 0c pushl 0xc(%ebp)
1129e2: e8 09 56 ff ff call 107ff0 <open>
1129e7: 89 43 54 mov %eax,0x54(%ebx)
if (vol->fd < 0)
1129ea: 83 c4 10 add $0x10,%esp
1129ed: 85 c0 test %eax,%eax
1129ef: 79 10 jns 112a01 <fat_init_volume_info+0x3a><== ALWAYS TAKEN
{
rtems_set_errno_and_return_minus_one(ENXIO);
1129f1: e8 1a 6e 00 00 call 119810 <__errno> <== NOT EXECUTED
1129f6: c7 00 06 00 00 00 movl $0x6,(%eax) <== NOT EXECUTED
1129fc: e9 6a 06 00 00 jmp 11306b <fat_init_volume_info+0x6a4><== NOT EXECUTED
}
rc = fstat(vol->fd, &stat_buf);
112a01: 52 push %edx
112a02: 52 push %edx
112a03: 8d 55 a0 lea -0x60(%ebp),%edx
112a06: 52 push %edx
112a07: 50 push %eax
112a08: e8 93 0e 00 00 call 1138a0 <fstat>
if (rc != 0)
112a0d: 83 c4 10 add $0x10,%esp
112a10: 85 c0 test %eax,%eax
112a12: 74 02 je 112a16 <fat_init_volume_info+0x4f><== ALWAYS TAKEN
112a14: eb 2c jmp 112a42 <fat_init_volume_info+0x7b><== NOT EXECUTED
close(vol->fd);
rtems_set_errno_and_return_minus_one(ENXIO);
}
/* Must be a block device. */
if (!S_ISBLK(stat_buf.st_mode))
112a16: 8b 45 ac mov -0x54(%ebp),%eax
112a19: 25 00 f0 00 00 and $0xf000,%eax
112a1e: 3d 00 60 00 00 cmp $0x6000,%eax
112a23: 74 02 je 112a27 <fat_init_volume_info+0x60><== ALWAYS TAKEN
112a25: eb 1b jmp 112a42 <fat_init_volume_info+0x7b><== NOT EXECUTED
static inline int rtems_disk_fd_get_disk_device(
int fd,
rtems_disk_device **dd_ptr
)
{
return ioctl(fd, RTEMS_BLKIO_GETDISKDEV, dd_ptr);
112a27: 50 push %eax
close(vol->fd);
rtems_set_errno_and_return_minus_one(ENXIO);
}
/* check that device is registred as block device and lock it */
rc = rtems_disk_fd_get_disk_device(vol->fd, &vol->dd);
112a28: 8d 43 58 lea 0x58(%ebx),%eax
112a2b: 50 push %eax
112a2c: 68 09 42 04 40 push $0x40044209
112a31: ff 73 54 pushl 0x54(%ebx)
112a34: e8 3f 49 ff ff call 107378 <ioctl>
112a39: 89 c6 mov %eax,%esi
if (rc != 0) {
112a3b: 83 c4 10 add $0x10,%esp
112a3e: 85 c0 test %eax,%eax
112a40: 74 1b je 112a5d <fat_init_volume_info+0x96><== ALWAYS TAKEN
close(vol->fd);
112a42: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
112a45: ff 73 54 pushl 0x54(%ebx) <== NOT EXECUTED
112a48: e8 af 45 ff ff call 106ffc <close> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENXIO);
112a4d: e8 be 6d 00 00 call 119810 <__errno> <== NOT EXECUTED
112a52: c7 00 06 00 00 00 movl $0x6,(%eax) <== NOT EXECUTED
112a58: e9 0b 06 00 00 jmp 113068 <fat_init_volume_info+0x6a1><== NOT EXECUTED
}
/* Read boot record */
/* FIXME: Asserts FAT_MAX_BPB_SIZE < bdbuf block size */
sc = rtems_bdbuf_read( vol->dd, 0, &block);
112a5d: 50 push %eax
112a5e: 8d 45 90 lea -0x70(%ebp),%eax
112a61: 50 push %eax
112a62: 6a 00 push $0x0
112a64: ff 73 58 pushl 0x58(%ebx)
112a67: e8 a5 e3 ff ff call 110e11 <rtems_bdbuf_read>
if (sc != RTEMS_SUCCESSFUL)
112a6c: 83 c4 10 add $0x10,%esp
112a6f: 85 c0 test %eax,%eax
112a71: 74 05 je 112a78 <fat_init_volume_info+0xb1><== ALWAYS TAKEN
112a73: e9 ec 00 00 00 jmp 112b64 <fat_init_volume_info+0x19d><== NOT EXECUTED
{
close(vol->fd);
rtems_set_errno_and_return_minus_one( EIO);
}
memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE);
112a78: 8b 55 90 mov -0x70(%ebp),%edx
112a7b: 8b 42 1c mov 0x1c(%edx),%eax
112a7e: 8a 48 0b mov 0xb(%eax),%cl
112a81: 88 8d 78 ff ff ff mov %cl,-0x88(%ebp)
112a87: 0f b6 78 0c movzbl 0xc(%eax),%edi
112a8b: 8a 48 0d mov 0xd(%eax),%cl
112a8e: 88 4d 87 mov %cl,-0x79(%ebp)
112a91: 8a 48 0e mov 0xe(%eax),%cl
112a94: 88 8d 07 ff ff ff mov %cl,-0xf9(%ebp)
112a9a: 8a 48 0f mov 0xf(%eax),%cl
112a9d: 88 8d e8 fe ff ff mov %cl,-0x118(%ebp)
112aa3: 8a 48 10 mov 0x10(%eax),%cl
112aa6: 88 4d 85 mov %cl,-0x7b(%ebp)
112aa9: 8a 48 11 mov 0x11(%eax),%cl
112aac: 88 8d 06 ff ff ff mov %cl,-0xfa(%ebp)
112ab2: 8a 48 12 mov 0x12(%eax),%cl
112ab5: 88 8d 18 ff ff ff mov %cl,-0xe8(%ebp)
112abb: 8a 48 13 mov 0x13(%eax),%cl
112abe: 88 8d 7a ff ff ff mov %cl,-0x86(%ebp)
112ac4: 8a 48 14 mov 0x14(%eax),%cl
112ac7: 88 8d 08 ff ff ff mov %cl,-0xf8(%ebp)
112acd: 8a 48 16 mov 0x16(%eax),%cl
112ad0: 88 8d 79 ff ff ff mov %cl,-0x87(%ebp)
112ad6: 8a 48 17 mov 0x17(%eax),%cl
112ad9: 88 8d 28 ff ff ff mov %cl,-0xd8(%ebp)
112adf: 8a 48 20 mov 0x20(%eax),%cl
112ae2: 88 8d 7b ff ff ff mov %cl,-0x85(%ebp)
112ae8: 8a 48 21 mov 0x21(%eax),%cl
112aeb: 88 4d 80 mov %cl,-0x80(%ebp)
112aee: 8a 48 22 mov 0x22(%eax),%cl
112af1: 88 8d 7f ff ff ff mov %cl,-0x81(%ebp)
112af7: 8a 48 23 mov 0x23(%eax),%cl
112afa: 88 8d 38 ff ff ff mov %cl,-0xc8(%ebp)
112b00: 8a 48 24 mov 0x24(%eax),%cl
112b03: 88 8d 7e ff ff ff mov %cl,-0x82(%ebp)
112b09: 8a 48 25 mov 0x25(%eax),%cl
112b0c: 88 8d 7d ff ff ff mov %cl,-0x83(%ebp)
112b12: 8a 48 26 mov 0x26(%eax),%cl
112b15: 88 8d 7c ff ff ff mov %cl,-0x84(%ebp)
112b1b: 8a 48 27 mov 0x27(%eax),%cl
112b1e: 88 8d 68 ff ff ff mov %cl,-0x98(%ebp)
112b24: 8a 48 28 mov 0x28(%eax),%cl
112b27: 88 4d 86 mov %cl,-0x7a(%ebp)
112b2a: 8a 48 2c mov 0x2c(%eax),%cl
112b2d: 88 4d 84 mov %cl,-0x7c(%ebp)
112b30: 8a 48 2d mov 0x2d(%eax),%cl
112b33: 88 4d 83 mov %cl,-0x7d(%ebp)
112b36: 8a 48 2e mov 0x2e(%eax),%cl
112b39: 88 4d 82 mov %cl,-0x7e(%ebp)
112b3c: 8a 48 2f mov 0x2f(%eax),%cl
112b3f: 88 8d 58 ff ff ff mov %cl,-0xa8(%ebp)
112b45: 8a 48 30 mov 0x30(%eax),%cl
112b48: 88 4d 81 mov %cl,-0x7f(%ebp)
112b4b: 8a 40 31 mov 0x31(%eax),%al
112b4e: 88 85 48 ff ff ff mov %al,-0xb8(%ebp)
sc = rtems_bdbuf_release( block);
112b54: 83 ec 0c sub $0xc,%esp
112b57: 52 push %edx
112b58: e8 12 e4 ff ff call 110f6f <rtems_bdbuf_release>
if (sc != RTEMS_SUCCESSFUL)
112b5d: 83 c4 10 add $0x10,%esp
112b60: 85 c0 test %eax,%eax
112b62: 74 1b je 112b7f <fat_init_volume_info+0x1b8><== ALWAYS TAKEN
{
close(vol->fd);
112b64: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
112b67: ff 73 54 pushl 0x54(%ebx) <== NOT EXECUTED
112b6a: e8 8d 44 ff ff call 106ffc <close> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EIO );
112b6f: e8 9c 6c 00 00 call 119810 <__errno> <== NOT EXECUTED
112b74: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
112b7a: e9 e9 04 00 00 jmp 113068 <fat_init_volume_info+0x6a1><== NOT EXECUTED
}
/* Evaluate boot record */
vol->bps = FAT_GET_BR_BYTES_PER_SECTOR(boot_rec);
112b7f: c1 e7 08 shl $0x8,%edi
112b82: 0f b6 85 78 ff ff ff movzbl -0x88(%ebp),%eax
112b89: 09 c7 or %eax,%edi
112b8b: 66 89 3b mov %di,(%ebx)
if ( (vol->bps != 512) &&
112b8e: 66 81 ff 00 04 cmp $0x400,%di
112b93: 74 1a je 112baf <fat_init_volume_info+0x1e8><== NEVER TAKEN
112b95: 66 81 ff 00 02 cmp $0x200,%di
112b9a: 74 13 je 112baf <fat_init_volume_info+0x1e8><== ALWAYS TAKEN
(vol->bps != 1024) &&
112b9c: 66 81 ff 00 08 cmp $0x800,%di <== NOT EXECUTED
112ba1: 74 0c je 112baf <fat_init_volume_info+0x1e8><== NOT EXECUTED
(vol->bps != 2048) &&
112ba3: 66 81 ff 00 10 cmp $0x1000,%di <== NOT EXECUTED
112ba8: 74 05 je 112baf <fat_init_volume_info+0x1e8><== NOT EXECUTED
112baa: e9 3f 02 00 00 jmp 112dee <fat_init_volume_info+0x427><== NOT EXECUTED
{
close(vol->fd);
rtems_set_errno_and_return_minus_one( EINVAL );
}
for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0;
112baf: c6 43 03 00 movb $0x0,0x3(%ebx)
112bb3: 89 f8 mov %edi,%eax
112bb5: 66 c1 e8 09 shr $0x9,%ax
112bb9: 0f b7 c0 movzwl %ax,%eax
112bbc: eb 05 jmp 112bc3 <fat_init_volume_info+0x1fc>
i >>= 1, vol->sec_mul++);
112bbe: d1 f8 sar %eax <== NOT EXECUTED
112bc0: fe 43 03 incb 0x3(%ebx) <== NOT EXECUTED
{
close(vol->fd);
rtems_set_errno_and_return_minus_one( EINVAL );
}
for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0;
112bc3: a8 01 test $0x1,%al
112bc5: 74 f7 je 112bbe <fat_init_volume_info+0x1f7><== NEVER TAKEN
i >>= 1, vol->sec_mul++);
for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0;
112bc7: c6 43 02 00 movb $0x0,0x2(%ebx)
112bcb: 0f b7 ff movzwl %di,%edi
112bce: 89 bd 00 ff ff ff mov %edi,-0x100(%ebp)
112bd4: 89 f8 mov %edi,%eax
112bd6: eb 05 jmp 112bdd <fat_init_volume_info+0x216>
i >>= 1, vol->sec_log2++);
112bd8: d1 f8 sar %eax
112bda: fe 43 02 incb 0x2(%ebx)
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;
112bdd: a8 01 test $0x1,%al
112bdf: 74 f7 je 112bd8 <fat_init_volume_info+0x211>
i >>= 1, vol->sec_log2++);
vol->spc = FAT_GET_BR_SECTORS_PER_CLUSTER(boot_rec);
112be1: 8a 45 87 mov -0x79(%ebp),%al
112be4: 88 43 04 mov %al,0x4(%ebx)
/*
* "sectors per cluster" of zero is invalid
* (and would hang the following loop)
*/
if (vol->spc == 0)
112be7: 84 c0 test %al,%al
112be9: 75 05 jne 112bf0 <fat_init_volume_info+0x229><== ALWAYS TAKEN
112beb: e9 fe 01 00 00 jmp 112dee <fat_init_volume_info+0x427><== NOT EXECUTED
{
close(vol->fd);
rtems_set_errno_and_return_minus_one(EINVAL);
}
for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0;
112bf0: c6 43 05 00 movb $0x0,0x5(%ebx)
112bf4: 0f b6 45 87 movzbl -0x79(%ebp),%eax
112bf8: eb 05 jmp 112bff <fat_init_volume_info+0x238>
i >>= 1, vol->spc_log2++);
112bfa: d1 f8 sar %eax
112bfc: fe 43 05 incb 0x5(%ebx)
{
close(vol->fd);
rtems_set_errno_and_return_minus_one(EINVAL);
}
for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0;
112bff: a8 01 test $0x1,%al
112c01: 74 f7 je 112bfa <fat_init_volume_info+0x233>
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)
112c03: 0f b6 4b 05 movzbl 0x5(%ebx),%ecx
112c07: 8b 95 00 ff ff ff mov -0x100(%ebp),%edx
112c0d: d3 e2 shl %cl,%edx
112c0f: 89 d1 mov %edx,%ecx
112c11: 66 89 53 06 mov %dx,0x6(%ebx)
112c15: 66 81 fa 00 80 cmp $0x8000,%dx
112c1a: 76 05 jbe 112c21 <fat_init_volume_info+0x25a><== ALWAYS TAKEN
112c1c: e9 cd 01 00 00 jmp 112dee <fat_init_volume_info+0x427><== NOT EXECUTED
{
close(vol->fd);
rtems_set_errno_and_return_minus_one(EINVAL);
}
for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0;
112c21: c6 43 08 00 movb $0x0,0x8(%ebx)
112c25: 81 e1 ff ff 00 00 and $0xffff,%ecx
112c2b: eb 05 jmp 112c32 <fat_init_volume_info+0x26b>
i >>= 1, vol->bpc_log2++);
112c2d: d1 f9 sar %ecx
112c2f: fe 43 08 incb 0x8(%ebx)
{
close(vol->fd);
rtems_set_errno_and_return_minus_one(EINVAL);
}
for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0;
112c32: f6 c1 01 test $0x1,%cl
112c35: 74 f6 je 112c2d <fat_init_volume_info+0x266>
i >>= 1, vol->bpc_log2++);
vol->fats = FAT_GET_BR_FAT_NUM(boot_rec);
112c37: 8a 4d 85 mov -0x7b(%ebp),%cl
112c3a: 88 4b 09 mov %cl,0x9(%ebx)
vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec);
112c3d: 8a 95 e8 fe ff ff mov -0x118(%ebp),%dl
112c43: c1 e2 08 shl $0x8,%edx
112c46: 89 d7 mov %edx,%edi
112c48: 0f b6 85 07 ff ff ff movzbl -0xf9(%ebp),%eax
112c4f: 09 c7 or %eax,%edi
112c51: 66 89 7b 14 mov %di,0x14(%ebx)
vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec);
112c55: 8a 85 18 ff ff ff mov -0xe8(%ebp),%al
112c5b: c1 e0 08 shl $0x8,%eax
112c5e: 0f b6 8d 06 ff ff ff movzbl -0xfa(%ebp),%ecx
112c65: 09 c8 or %ecx,%eax
112c67: 66 89 43 20 mov %ax,0x20(%ebx)
/* calculate the count of sectors occupied by the root directory */
vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) /
112c6b: 0f b7 c0 movzwl %ax,%eax
112c6e: c1 e0 05 shl $0x5,%eax
112c71: 8b 95 00 ff ff ff mov -0x100(%ebp),%edx
112c77: 8d 44 02 ff lea -0x1(%edx,%eax,1),%eax
112c7b: 99 cltd
112c7c: f7 bd 00 ff ff ff idivl -0x100(%ebp)
112c82: 89 43 24 mov %eax,0x24(%ebx)
vol->bps;
vol->rdir_size = vol->rdir_secs << vol->sec_log2;
112c85: 0f b6 4b 02 movzbl 0x2(%ebx),%ecx
112c89: 89 c2 mov %eax,%edx
112c8b: d3 e2 shl %cl,%edx
112c8d: 89 53 28 mov %edx,0x28(%ebx)
if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0)
112c90: 8a 8d 28 ff ff ff mov -0xd8(%ebp),%cl
112c96: c1 e1 08 shl $0x8,%ecx
112c99: 0f b6 95 79 ff ff ff movzbl -0x87(%ebp),%edx
112ca0: 66 09 ca or %cx,%dx
112ca3: 74 05 je 112caa <fat_init_volume_info+0x2e3><== NEVER TAKEN
vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec);
112ca5: 0f b7 d2 movzwl %dx,%edx
112ca8: eb 2a jmp 112cd4 <fat_init_volume_info+0x30d>
else
vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec);
112caa: 0f b6 95 7d ff ff ff movzbl -0x83(%ebp),%edx <== NOT EXECUTED
112cb1: c1 e2 08 shl $0x8,%edx <== NOT EXECUTED
112cb4: 0f b6 8d 7c ff ff ff movzbl -0x84(%ebp),%ecx <== NOT EXECUTED
112cbb: c1 e1 10 shl $0x10,%ecx <== NOT EXECUTED
112cbe: 09 ca or %ecx,%edx <== NOT EXECUTED
112cc0: 0f b6 8d 7e ff ff ff movzbl -0x82(%ebp),%ecx <== NOT EXECUTED
112cc7: 09 ca or %ecx,%edx <== NOT EXECUTED
112cc9: 8a 8d 68 ff ff ff mov -0x98(%ebp),%cl <== NOT EXECUTED
112ccf: c1 e1 18 shl $0x18,%ecx <== NOT EXECUTED
112cd2: 09 ca or %ecx,%edx <== NOT EXECUTED
112cd4: 89 53 18 mov %edx,0x18(%ebx)
vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length +
112cd7: 0f b7 ff movzwl %di,%edi
112cda: 0f b6 55 85 movzbl -0x7b(%ebp),%edx
112cde: 0f af 53 18 imul 0x18(%ebx),%edx
112ce2: 01 d7 add %edx,%edi
112ce4: 8d 14 38 lea (%eax,%edi,1),%edx
112ce7: 89 53 30 mov %edx,0x30(%ebx)
vol->rdir_secs;
/* for FAT12/16 root dir starts at(sector) */
vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length;
112cea: 89 7b 1c mov %edi,0x1c(%ebx)
if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0)
112ced: 8a 8d 08 ff ff ff mov -0xf8(%ebp),%cl
112cf3: c1 e1 08 shl $0x8,%ecx
112cf6: 0f b6 85 7a ff ff ff movzbl -0x86(%ebp),%eax
112cfd: 66 09 c8 or %cx,%ax
112d00: 74 08 je 112d0a <fat_init_volume_info+0x343><== NEVER TAKEN
vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec);
112d02: 0f b7 c0 movzwl %ax,%eax
112d05: 89 43 2c mov %eax,0x2c(%ebx)
112d08: eb 2a jmp 112d34 <fat_init_volume_info+0x36d>
else
vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM32(boot_rec);
112d0a: 0f b6 4d 80 movzbl -0x80(%ebp),%ecx <== NOT EXECUTED
112d0e: c1 e1 08 shl $0x8,%ecx <== NOT EXECUTED
112d11: 0f b6 85 7f ff ff ff movzbl -0x81(%ebp),%eax <== NOT EXECUTED
112d18: c1 e0 10 shl $0x10,%eax <== NOT EXECUTED
112d1b: 09 c1 or %eax,%ecx <== NOT EXECUTED
112d1d: 0f b6 85 7b ff ff ff movzbl -0x85(%ebp),%eax <== NOT EXECUTED
112d24: 09 c1 or %eax,%ecx <== NOT EXECUTED
112d26: 8a 85 38 ff ff ff mov -0xc8(%ebp),%al <== NOT EXECUTED
112d2c: c1 e0 18 shl $0x18,%eax <== NOT EXECUTED
112d2f: 09 c1 or %eax,%ecx <== NOT EXECUTED
112d31: 89 4b 2c mov %ecx,0x2c(%ebx) <== NOT EXECUTED
data_secs = vol->tot_secs - vol->data_fsec;
112d34: 8b 43 2c mov 0x2c(%ebx),%eax
112d37: 29 d0 sub %edx,%eax
vol->data_cls = data_secs / vol->spc;
112d39: 0f b6 4d 87 movzbl -0x79(%ebp),%ecx
112d3d: 31 d2 xor %edx,%edx
112d3f: f7 f1 div %ecx
112d41: 89 43 34 mov %eax,0x34(%ebx)
/* determine FAT type at least */
if ( vol->data_cls < FAT_FAT12_MAX_CLN)
112d44: 3d f4 0f 00 00 cmp $0xff4,%eax
112d49: 77 14 ja 112d5f <fat_init_volume_info+0x398><== NEVER TAKEN
{
vol->type = FAT_FAT12;
112d4b: c6 43 0a 01 movb $0x1,0xa(%ebx)
vol->mask = FAT_FAT12_MASK;
112d4f: c7 43 0c ff 0f 00 00 movl $0xfff,0xc(%ebx)
vol->eoc_val = FAT_FAT12_EOC;
112d56: c7 43 10 f8 0f 00 00 movl $0xff8,0x10(%ebx)
112d5d: eb 2d jmp 112d8c <fat_init_volume_info+0x3c5>
}
else
{
if ( vol->data_cls < FAT_FAT16_MAX_CLN)
112d5f: 3d f4 ff 00 00 cmp $0xfff4,%eax <== NOT EXECUTED
112d64: 77 14 ja 112d7a <fat_init_volume_info+0x3b3><== NOT EXECUTED
{
vol->type = FAT_FAT16;
112d66: c6 43 0a 02 movb $0x2,0xa(%ebx) <== NOT EXECUTED
vol->mask = FAT_FAT16_MASK;
112d6a: c7 43 0c ff ff 00 00 movl $0xffff,0xc(%ebx) <== NOT EXECUTED
vol->eoc_val = FAT_FAT16_EOC;
112d71: c7 43 10 f8 ff 00 00 movl $0xfff8,0x10(%ebx) <== NOT EXECUTED
112d78: eb 12 jmp 112d8c <fat_init_volume_info+0x3c5><== NOT EXECUTED
}
else
{
vol->type = FAT_FAT32;
112d7a: c6 43 0a 04 movb $0x4,0xa(%ebx) <== NOT EXECUTED
vol->mask = FAT_FAT32_MASK;
112d7e: c7 43 0c ff ff ff 0f movl $0xfffffff,0xc(%ebx) <== NOT EXECUTED
vol->eoc_val = FAT_FAT32_EOC;
112d85: c7 43 10 f8 ff ff 0f movl $0xffffff8,0x10(%ebx) <== NOT EXECUTED
}
}
if (vol->type == FAT_FAT32)
112d8c: 80 7b 0a 04 cmpb $0x4,0xa(%ebx)
112d90: 0f 85 6e 01 00 00 jne 112f04 <fat_init_volume_info+0x53d><== ALWAYS TAKEN
{
vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec);
112d96: 0f b6 45 83 movzbl -0x7d(%ebp),%eax <== NOT EXECUTED
112d9a: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED
112d9d: 0f b6 55 82 movzbl -0x7e(%ebp),%edx <== NOT EXECUTED
112da1: c1 e2 10 shl $0x10,%edx <== NOT EXECUTED
112da4: 09 d0 or %edx,%eax <== NOT EXECUTED
112da6: 0f b6 55 84 movzbl -0x7c(%ebp),%edx <== NOT EXECUTED
112daa: 09 d0 or %edx,%eax <== NOT EXECUTED
112dac: 8a 95 58 ff ff ff mov -0xa8(%ebp),%dl <== NOT EXECUTED
112db2: c1 e2 18 shl $0x18,%edx <== NOT EXECUTED
112db5: 09 d0 or %edx,%eax <== NOT EXECUTED
112db7: 89 43 38 mov %eax,0x38(%ebx) <== NOT EXECUTED
vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR;
112dba: 8a 45 86 mov -0x7a(%ebp),%al <== NOT EXECUTED
112dbd: 83 e0 80 and $0xffffff80,%eax <== NOT EXECUTED
112dc0: 88 43 48 mov %al,0x48(%ebx) <== NOT EXECUTED
if (vol->mirror)
112dc3: 84 c0 test %al,%al <== NOT EXECUTED
112dc5: 74 0b je 112dd2 <fat_init_volume_info+0x40b><== NOT EXECUTED
vol->afat = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_FAT_NUM;
112dc7: 8a 45 86 mov -0x7a(%ebp),%al <== NOT EXECUTED
112dca: 83 e0 0f and $0xf,%eax <== NOT EXECUTED
112dcd: 88 43 50 mov %al,0x50(%ebx) <== NOT EXECUTED
112dd0: eb 04 jmp 112dd6 <fat_init_volume_info+0x40f><== NOT EXECUTED
else
vol->afat = 0;
112dd2: c6 43 50 00 movb $0x0,0x50(%ebx) <== NOT EXECUTED
vol->info_sec = FAT_GET_BR_FAT32_FS_INFO_SECTOR(boot_rec);
112dd6: 8a 85 48 ff ff ff mov -0xb8(%ebp),%al <== NOT EXECUTED
112ddc: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED
112ddf: 0f b6 55 81 movzbl -0x7f(%ebp),%edx <== NOT EXECUTED
112de3: 09 d0 or %edx,%eax <== NOT EXECUTED
112de5: 66 89 43 3c mov %ax,0x3c(%ebx) <== NOT EXECUTED
if( vol->info_sec == 0 )
112de9: 66 85 c0 test %ax,%ax <== NOT EXECUTED
112dec: 75 05 jne 112df3 <fat_init_volume_info+0x42c><== NOT EXECUTED
{
close(vol->fd);
112dee: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
112df1: eb 51 jmp 112e44 <fat_init_volume_info+0x47d><== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
}
else
{
ret = _fat_block_read(fs_info, vol->info_sec , 0,
112df3: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
FAT_FSI_LEADSIG_SIZE, fs_info_sector);
112df6: 8d 7d 94 lea -0x6c(%ebp),%edi <== NOT EXECUTED
close(vol->fd);
rtems_set_errno_and_return_minus_one( EINVAL );
}
else
{
ret = _fat_block_read(fs_info, vol->info_sec , 0,
112df9: 57 push %edi <== NOT EXECUTED
112dfa: 6a 04 push $0x4 <== NOT EXECUTED
112dfc: 6a 00 push $0x0 <== NOT EXECUTED
112dfe: 0f b7 c0 movzwl %ax,%eax <== NOT EXECUTED
112e01: 50 push %eax <== NOT EXECUTED
112e02: 53 push %ebx <== NOT EXECUTED
112e03: e8 d7 f6 ff ff call 1124df <_fat_block_read> <== NOT EXECUTED
FAT_FSI_LEADSIG_SIZE, fs_info_sector);
if ( ret < 0 )
112e08: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
112e0b: 85 c0 test %eax,%eax <== NOT EXECUTED
112e0d: 79 05 jns 112e14 <fat_init_volume_info+0x44d><== NOT EXECUTED
{
close(vol->fd);
112e0f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
112e12: eb 6f jmp 112e83 <fat_init_volume_info+0x4bc><== NOT EXECUTED
return -1;
}
if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) !=
112e14: 0f b6 45 95 movzbl -0x6b(%ebp),%eax <== NOT EXECUTED
112e18: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED
112e1b: 0f b6 55 96 movzbl -0x6a(%ebp),%edx <== NOT EXECUTED
112e1f: c1 e2 10 shl $0x10,%edx <== NOT EXECUTED
112e22: 09 d0 or %edx,%eax <== NOT EXECUTED
112e24: 0f b6 55 94 movzbl -0x6c(%ebp),%edx <== NOT EXECUTED
112e28: 09 d0 or %edx,%eax <== NOT EXECUTED
112e2a: 0f b6 55 97 movzbl -0x69(%ebp),%edx <== NOT EXECUTED
112e2e: c1 e2 18 shl $0x18,%edx <== NOT EXECUTED
112e31: 09 d0 or %edx,%eax <== NOT EXECUTED
112e33: 3d 52 52 61 41 cmp $0x41615252,%eax <== NOT EXECUTED
112e38: 74 22 je 112e5c <fat_init_volume_info+0x495><== NOT EXECUTED
FAT_FSINFO_LEAD_SIGNATURE_VALUE)
{
_fat_block_release(fs_info);
112e3a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
112e3d: 53 push %ebx <== NOT EXECUTED
112e3e: e8 25 f8 ff ff call 112668 <_fat_block_release> <== NOT EXECUTED
close(vol->fd);
112e43: 58 pop %eax <== NOT EXECUTED
112e44: ff 73 54 pushl 0x54(%ebx) <== NOT EXECUTED
112e47: e8 b0 41 ff ff call 106ffc <close> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
112e4c: e8 bf 69 00 00 call 119810 <__errno> <== NOT EXECUTED
112e51: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
112e57: e9 0c 02 00 00 jmp 113068 <fat_init_volume_info+0x6a1><== NOT EXECUTED
}
else
{
ret = _fat_block_read(fs_info, vol->info_sec , FAT_FSI_INFO,
112e5c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
112e5f: 57 push %edi <== NOT EXECUTED
112e60: 6a 0c push $0xc <== NOT EXECUTED
112e62: 68 e4 01 00 00 push $0x1e4 <== NOT EXECUTED
112e67: 0f b7 43 3c movzwl 0x3c(%ebx),%eax <== NOT EXECUTED
112e6b: 50 push %eax <== NOT EXECUTED
112e6c: 53 push %ebx <== NOT EXECUTED
112e6d: e8 6d f6 ff ff call 1124df <_fat_block_read> <== NOT EXECUTED
FAT_USEFUL_INFO_SIZE, fs_info_sector);
if ( ret < 0 )
112e72: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
112e75: 85 c0 test %eax,%eax <== NOT EXECUTED
112e77: 79 17 jns 112e90 <fat_init_volume_info+0x4c9><== NOT EXECUTED
{
_fat_block_release(fs_info);
112e79: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
112e7c: 53 push %ebx <== NOT EXECUTED
112e7d: e8 e6 f7 ff ff call 112668 <_fat_block_release> <== NOT EXECUTED
close(vol->fd);
112e82: 58 pop %eax <== NOT EXECUTED
112e83: ff 73 54 pushl 0x54(%ebx) <== NOT EXECUTED
112e86: e8 71 41 ff ff call 106ffc <close> <== NOT EXECUTED
112e8b: e9 d8 01 00 00 jmp 113068 <fat_init_volume_info+0x6a1><== NOT EXECUTED
return -1;
}
vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector);
112e90: 0f b6 45 99 movzbl -0x67(%ebp),%eax <== NOT EXECUTED
112e94: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED
112e97: 0f b6 55 9a movzbl -0x66(%ebp),%edx <== NOT EXECUTED
112e9b: c1 e2 10 shl $0x10,%edx <== NOT EXECUTED
112e9e: 09 d0 or %edx,%eax <== NOT EXECUTED
112ea0: 0f b6 55 98 movzbl -0x68(%ebp),%edx <== NOT EXECUTED
112ea4: 09 d0 or %edx,%eax <== NOT EXECUTED
112ea6: 0f b6 55 9b movzbl -0x65(%ebp),%edx <== NOT EXECUTED
112eaa: c1 e2 18 shl $0x18,%edx <== NOT EXECUTED
112ead: 09 d0 or %edx,%eax <== NOT EXECUTED
112eaf: 89 43 40 mov %eax,0x40(%ebx) <== NOT EXECUTED
vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector);
112eb2: 0f b6 45 9d movzbl -0x63(%ebp),%eax <== NOT EXECUTED
112eb6: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED
112eb9: 0f b6 55 9e movzbl -0x62(%ebp),%edx <== NOT EXECUTED
112ebd: c1 e2 10 shl $0x10,%edx <== NOT EXECUTED
112ec0: 09 d0 or %edx,%eax <== NOT EXECUTED
112ec2: 0f b6 55 9c movzbl -0x64(%ebp),%edx <== NOT EXECUTED
112ec6: 09 d0 or %edx,%eax <== NOT EXECUTED
112ec8: 0f b6 55 9f movzbl -0x61(%ebp),%edx <== NOT EXECUTED
112ecc: c1 e2 18 shl $0x18,%edx <== NOT EXECUTED
112ecf: 09 d0 or %edx,%eax <== NOT EXECUTED
112ed1: 89 43 44 mov %eax,0x44(%ebx) <== NOT EXECUTED
rc = fat_fat32_update_fsinfo_sector(fs_info, 0xFFFFFFFF,
112ed4: 57 push %edi <== NOT EXECUTED
112ed5: 6a ff push $0xffffffff <== NOT EXECUTED
112ed7: 6a ff push $0xffffffff <== NOT EXECUTED
112ed9: 53 push %ebx <== NOT EXECUTED
112eda: e8 8b f9 ff ff call 11286a <fat_fat32_update_fsinfo_sector><== NOT EXECUTED
112edf: 89 c7 mov %eax,%edi <== NOT EXECUTED
0xFFFFFFFF);
if ( rc != RC_OK )
112ee1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
112ee4: 85 c0 test %eax,%eax <== NOT EXECUTED
112ee6: 74 39 je 112f21 <fat_init_volume_info+0x55a><== NOT EXECUTED
{
_fat_block_release(fs_info);
112ee8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
112eeb: 53 push %ebx <== NOT EXECUTED
112eec: e8 77 f7 ff ff call 112668 <_fat_block_release> <== NOT EXECUTED
close(vol->fd);
112ef1: 59 pop %ecx <== NOT EXECUTED
112ef2: ff 73 54 pushl 0x54(%ebx) <== NOT EXECUTED
112ef5: e8 02 41 ff ff call 106ffc <close> <== NOT EXECUTED
112efa: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
112efd: 89 fe mov %edi,%esi <== NOT EXECUTED
112eff: e9 6a 01 00 00 jmp 11306e <fat_init_volume_info+0x6a7><== NOT EXECUTED
}
}
}
else
{
vol->rdir_cl = 0;
112f04: c7 43 38 00 00 00 00 movl $0x0,0x38(%ebx)
vol->mirror = 0;
112f0b: c6 43 48 00 movb $0x0,0x48(%ebx)
vol->afat = 0;
112f0f: c6 43 50 00 movb $0x0,0x50(%ebx)
vol->free_cls = 0xFFFFFFFF;
112f13: c7 43 40 ff ff ff ff movl $0xffffffff,0x40(%ebx)
vol->next_cl = 0xFFFFFFFF;
112f1a: c7 43 44 ff ff ff ff movl $0xffffffff,0x44(%ebx)
}
_fat_block_release(fs_info);
112f21: 83 ec 0c sub $0xc,%esp
112f24: 53 push %ebx
112f25: e8 3e f7 ff ff call 112668 <_fat_block_release>
vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat;
112f2a: 0f b6 43 50 movzbl 0x50(%ebx),%eax
112f2e: 0f af 43 18 imul 0x18(%ebx),%eax
112f32: 0f b7 53 14 movzwl 0x14(%ebx),%edx
112f36: 01 d0 add %edx,%eax
112f38: 89 43 4c mov %eax,0x4c(%ebx)
/* set up collection of fat-files fd */
fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control));
112f3b: 58 pop %eax
112f3c: 5a pop %edx
112f3d: 6a 0c push $0xc
112f3f: 6a 02 push $0x2
112f41: e8 7a 40 ff ff call 106fc0 <calloc>
112f46: 89 43 60 mov %eax,0x60(%ebx)
if ( fs_info->vhash == NULL )
112f49: 83 c4 10 add $0x10,%esp
112f4c: 85 c0 test %eax,%eax
112f4e: 74 39 je 112f89 <fat_init_volume_info+0x5c2><== NEVER TAKEN
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
112f50: 8d 50 04 lea 0x4(%eax),%edx
112f53: 89 10 mov %edx,(%eax)
head->next = tail;
head->previous = NULL;
112f55: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax)
tail->previous = head;
112f5c: 89 40 08 mov %eax,0x8(%eax)
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
112f5f: 8d 50 0c lea 0xc(%eax),%edx
112f62: 8d 48 10 lea 0x10(%eax),%ecx
112f65: 89 48 0c mov %ecx,0xc(%eax)
head->next = tail;
head->previous = NULL;
112f68: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
112f6f: 89 50 14 mov %edx,0x14(%eax)
}
for (i = 0; i < FAT_HASH_SIZE; i++)
rtems_chain_initialize_empty(fs_info->vhash + i);
fs_info->rhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control));
112f72: 50 push %eax
112f73: 50 push %eax
112f74: 6a 0c push $0xc
112f76: 6a 02 push $0x2
112f78: e8 43 40 ff ff call 106fc0 <calloc>
112f7d: 89 43 64 mov %eax,0x64(%ebx)
if ( fs_info->rhash == NULL )
112f80: 83 c4 10 add $0x10,%esp
112f83: 85 c0 test %eax,%eax
112f85: 75 12 jne 112f99 <fat_init_volume_info+0x5d2><== ALWAYS TAKEN
112f87: eb 69 jmp 112ff2 <fat_init_volume_info+0x62b><== NOT EXECUTED
/* set up collection of fat-files fd */
fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control));
if ( fs_info->vhash == NULL )
{
close(vol->fd);
112f89: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
112f8c: ff 73 54 pushl 0x54(%ebx) <== NOT EXECUTED
112f8f: e8 68 40 ff ff call 106ffc <close> <== NOT EXECUTED
112f94: e9 c4 00 00 00 jmp 11305d <fat_init_volume_info+0x696><== NOT EXECUTED
Chain_Node *tail = _Chain_Tail( the_chain );
112f99: 8d 50 04 lea 0x4(%eax),%edx
112f9c: 89 10 mov %edx,(%eax)
head->next = tail;
head->previous = NULL;
112f9e: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax)
tail->previous = head;
112fa5: 89 40 08 mov %eax,0x8(%eax)
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
112fa8: 8d 50 0c lea 0xc(%eax),%edx
112fab: 8d 48 10 lea 0x10(%eax),%ecx
112fae: 89 48 0c mov %ecx,0xc(%eax)
head->next = tail;
head->previous = NULL;
112fb1: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
112fb8: 89 50 14 mov %edx,0x14(%eax)
rtems_set_errno_and_return_minus_one( ENOMEM );
}
for (i = 0; i < FAT_HASH_SIZE; i++)
rtems_chain_initialize_empty(fs_info->rhash + i);
fs_info->uino_pool_size = FAT_UINO_POOL_INIT_SIZE;
112fbb: c7 43 70 00 01 00 00 movl $0x100,0x70(%ebx)
fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4;
112fc2: 0f b6 4b 03 movzbl 0x3(%ebx),%ecx
112fc6: 8b 43 2c mov 0x2c(%ebx),%eax
112fc9: d3 e0 shl %cl,%eax
112fcb: c1 e0 04 shl $0x4,%eax
112fce: 89 43 74 mov %eax,0x74(%ebx)
fs_info->index = 0;
112fd1: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx)
fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char));
112fd8: 50 push %eax
112fd9: 50 push %eax
112fda: 6a 01 push $0x1
112fdc: 68 00 01 00 00 push $0x100
112fe1: e8 da 3f ff ff call 106fc0 <calloc>
112fe6: 89 43 68 mov %eax,0x68(%ebx)
if ( fs_info->uino == NULL )
112fe9: 83 c4 10 add $0x10,%esp
112fec: 85 c0 test %eax,%eax
112fee: 75 2d jne 11301d <fat_init_volume_info+0x656><== ALWAYS TAKEN
112ff0: eb 11 jmp 113003 <fat_init_volume_info+0x63c><== NOT EXECUTED
rtems_chain_initialize_empty(fs_info->vhash + i);
fs_info->rhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control));
if ( fs_info->rhash == NULL )
{
close(vol->fd);
112ff2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
112ff5: ff 73 54 pushl 0x54(%ebx) <== NOT EXECUTED
112ff8: e8 ff 3f ff ff call 106ffc <close> <== NOT EXECUTED
free(fs_info->vhash);
112ffd: 58 pop %eax <== NOT EXECUTED
112ffe: ff 73 60 pushl 0x60(%ebx) <== NOT EXECUTED
113001: eb 55 jmp 113058 <fat_init_volume_info+0x691><== NOT EXECUTED
fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4;
fs_info->index = 0;
fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char));
if ( fs_info->uino == NULL )
{
close(vol->fd);
113003: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
113006: ff 73 54 pushl 0x54(%ebx) <== NOT EXECUTED
113009: e8 ee 3f ff ff call 106ffc <close> <== NOT EXECUTED
free(fs_info->vhash);
11300e: 58 pop %eax <== NOT EXECUTED
11300f: ff 73 60 pushl 0x60(%ebx) <== NOT EXECUTED
113012: e8 15 42 ff ff call 10722c <free> <== NOT EXECUTED
free(fs_info->rhash);
113017: 58 pop %eax <== NOT EXECUTED
113018: ff 73 64 pushl 0x64(%ebx) <== NOT EXECUTED
11301b: eb 3b jmp 113058 <fat_init_volume_info+0x691><== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOMEM );
}
fs_info->sec_buf = (uint8_t *)calloc(vol->bps, sizeof(uint8_t));
11301d: 57 push %edi
11301e: 57 push %edi
11301f: 6a 01 push $0x1
113021: 0f b7 03 movzwl (%ebx),%eax
113024: 50 push %eax
113025: e8 96 3f ff ff call 106fc0 <calloc>
11302a: 89 83 84 00 00 00 mov %eax,0x84(%ebx)
if (fs_info->sec_buf == NULL)
113030: 83 c4 10 add $0x10,%esp
113033: 85 c0 test %eax,%eax
113035: 75 37 jne 11306e <fat_init_volume_info+0x6a7><== ALWAYS TAKEN
{
close(vol->fd);
113037: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11303a: ff 73 54 pushl 0x54(%ebx) <== NOT EXECUTED
11303d: e8 ba 3f ff ff call 106ffc <close> <== NOT EXECUTED
free(fs_info->vhash);
113042: 58 pop %eax <== NOT EXECUTED
113043: ff 73 60 pushl 0x60(%ebx) <== NOT EXECUTED
113046: e8 e1 41 ff ff call 10722c <free> <== NOT EXECUTED
free(fs_info->rhash);
11304b: 5a pop %edx <== NOT EXECUTED
11304c: ff 73 64 pushl 0x64(%ebx) <== NOT EXECUTED
11304f: e8 d8 41 ff ff call 10722c <free> <== NOT EXECUTED
free(fs_info->uino);
113054: 59 pop %ecx <== NOT EXECUTED
113055: ff 73 68 pushl 0x68(%ebx) <== NOT EXECUTED
113058: e8 cf 41 ff ff call 10722c <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOMEM );
11305d: e8 ae 67 00 00 call 119810 <__errno> <== NOT EXECUTED
113062: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED
113068: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11306b: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED
}
return RC_OK;
}
11306e: 89 f0 mov %esi,%eax
113070: 8d 65 f4 lea -0xc(%ebp),%esp
113073: 5b pop %ebx
113074: 5e pop %esi
113075: 5f pop %edi
113076: 5d pop %ebp
113077: c3 ret
00117f06 <fat_scan_fat_for_free_clusters>:
uint32_t count,
uint32_t *cls_added,
uint32_t *last_cl,
bool zero_fill
)
{
117f06: 55 push %ebp
117f07: 89 e5 mov %esp,%ebp
117f09: 57 push %edi
117f0a: 56 push %esi
117f0b: 53 push %ebx
117f0c: 83 ec 3c sub $0x3c,%esp
117f0f: 8b 5d 08 mov 0x8(%ebp),%ebx
117f12: 8a 55 1c mov 0x1c(%ebp),%dl
117f15: 88 55 cf mov %dl,-0x31(%ebp)
int rc = RC_OK;
uint32_t cl4find = 2;
uint32_t next_cln = 0;
117f18: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
uint32_t save_cln = 0;
uint32_t data_cls_val = fs_info->vol.data_cls + 2;
117f1f: 8b 43 34 mov 0x34(%ebx),%eax
uint32_t i = 2;
*cls_added = 0;
117f22: 8b 55 14 mov 0x14(%ebp),%edx
117f25: c7 02 00 00 00 00 movl $0x0,(%edx)
if (count == 0)
return rc;
117f2b: 31 ff xor %edi,%edi
uint32_t data_cls_val = fs_info->vol.data_cls + 2;
uint32_t i = 2;
*cls_added = 0;
if (count == 0)
117f2d: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
117f31: 0f 84 bd 01 00 00 je 1180f4 <fat_scan_fat_for_free_clusters+0x1ee><== NEVER TAKEN
return rc;
if (fs_info->vol.next_cl != FAT_UNDEFINED_VALUE)
117f37: 8b 73 44 mov 0x44(%ebx),%esi
117f3a: 83 fe ff cmp $0xffffffff,%esi
117f3d: 75 05 jne 117f44 <fat_scan_fat_for_free_clusters+0x3e>
uint32_t *last_cl,
bool zero_fill
)
{
int rc = RC_OK;
uint32_t cl4find = 2;
117f3f: be 02 00 00 00 mov $0x2,%esi
uint32_t next_cln = 0;
uint32_t save_cln = 0;
uint32_t data_cls_val = fs_info->vol.data_cls + 2;
117f44: 83 c0 02 add $0x2,%eax
117f47: 89 45 d0 mov %eax,-0x30(%ebp)
117f4a: c7 45 d4 02 00 00 00 movl $0x2,-0x2c(%ebp)
117f51: 31 d2 xor %edx,%edx
117f53: e9 38 01 00 00 jmp 118090 <fat_scan_fat_for_free_clusters+0x18a>
* starting at cluster 2, so the maximum valid cluster number is
* (fs_info->vol.data_cls + 1)
*/
while (i < data_cls_val)
{
rc = fat_get_fat_cluster(fs_info, cl4find, &next_cln);
117f58: 50 push %eax
117f59: 8d 4d e4 lea -0x1c(%ebp),%ecx
117f5c: 51 push %ecx
117f5d: 56 push %esi
117f5e: 53 push %ebx
117f5f: 89 55 c4 mov %edx,-0x3c(%ebp)
117f62: e8 99 fb ff ff call 117b00 <fat_get_fat_cluster>
117f67: 89 c7 mov %eax,%edi
if ( rc != RC_OK )
117f69: 83 c4 10 add $0x10,%esp
117f6c: 85 c0 test %eax,%eax
117f6e: 8b 55 c4 mov -0x3c(%ebp),%edx
117f71: 74 1e je 117f91 <fat_scan_fat_for_free_clusters+0x8b><== ALWAYS TAKEN
{
if (*cls_added != 0)
117f73: 8b 55 14 mov 0x14(%ebp),%edx <== NOT EXECUTED
117f76: 83 3a 00 cmpl $0x0,(%edx) <== NOT EXECUTED
117f79: 0f 84 75 01 00 00 je 1180f4 <fat_scan_fat_for_free_clusters+0x1ee><== NOT EXECUTED
fat_free_fat_clusters_chain(fs_info, (*chain));
117f7f: 50 push %eax <== NOT EXECUTED
117f80: 50 push %eax <== NOT EXECUTED
117f81: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
117f84: ff 32 pushl (%edx) <== NOT EXECUTED
117f86: 53 push %ebx <== NOT EXECUTED
117f87: e8 d6 fe ff ff call 117e62 <fat_free_fat_clusters_chain><== NOT EXECUTED
117f8c: e9 ec 00 00 00 jmp 11807d <fat_scan_fat_for_free_clusters+0x177><== NOT EXECUTED
return rc;
}
if (next_cln == FAT_GENFAT_FREE)
117f91: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp)
117f95: 0f 85 e7 00 00 00 jne 118082 <fat_scan_fat_for_free_clusters+0x17c>
/*
* 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)
117f9b: 8b 4d 14 mov 0x14(%ebp),%ecx
117f9e: 83 39 00 cmpl $0x0,(%ecx)
117fa1: 75 22 jne 117fc5 <fat_scan_fat_for_free_clusters+0xbf>
{
*chain = cl4find;
117fa3: 8b 55 0c mov 0xc(%ebp),%edx
117fa6: 89 32 mov %esi,(%edx)
rc = fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_EOC);
117fa8: 50 push %eax
117fa9: 6a ff push $0xffffffff
117fab: 56 push %esi
117fac: 53 push %ebx
117fad: e8 97 fc ff ff call 117c49 <fat_set_fat_cluster>
if ( rc != RC_OK )
117fb2: 83 c4 10 add $0x10,%esp
117fb5: 85 c0 test %eax,%eax
117fb7: 0f 85 35 01 00 00 jne 1180f2 <fat_scan_fat_for_free_clusters+0x1ec><== NEVER TAKEN
rc = fat_set_fat_cluster(fs_info, save_cln, cl4find);
if ( rc != RC_OK )
goto cleanup;
}
if (zero_fill) {
117fbd: 80 7d cf 00 cmpb $0x0,-0x31(%ebp)
117fc1: 74 4f je 118012 <fat_scan_fat_for_free_clusters+0x10c>
117fc3: eb 63 jmp 118028 <fat_scan_fat_for_free_clusters+0x122>
}
}
else
{
/* set EOC value to new allocated cluster */
rc = fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_EOC);
117fc5: 50 push %eax
117fc6: 6a ff push $0xffffffff
117fc8: 56 push %esi
117fc9: 53 push %ebx
117fca: 89 55 c4 mov %edx,-0x3c(%ebp)
117fcd: e8 77 fc ff ff call 117c49 <fat_set_fat_cluster>
117fd2: 89 c1 mov %eax,%ecx
if ( rc != RC_OK )
117fd4: 83 c4 10 add $0x10,%esp
117fd7: 85 c0 test %eax,%eax
117fd9: 8b 55 c4 mov -0x3c(%ebp),%edx
117fdc: 74 1d je 117ffb <fat_scan_fat_for_free_clusters+0xf5><== ALWAYS TAKEN
{
/* cleanup activity */
fat_free_fat_clusters_chain(fs_info, (*chain));
117fde: 50 push %eax <== NOT EXECUTED
117fdf: 50 push %eax <== NOT EXECUTED
117fe0: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
117fe3: ff 32 pushl (%edx) <== NOT EXECUTED
117fe5: 53 push %ebx <== NOT EXECUTED
117fe6: 89 4d c4 mov %ecx,-0x3c(%ebp) <== NOT EXECUTED
117fe9: e8 74 fe ff ff call 117e62 <fat_free_fat_clusters_chain><== NOT EXECUTED
117fee: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
}
else
{
/* set EOC value to new allocated cluster */
rc = fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_EOC);
117ff1: 8b 4d c4 mov -0x3c(%ebp),%ecx <== NOT EXECUTED
117ff4: 89 cf mov %ecx,%edi <== NOT EXECUTED
117ff6: e9 f9 00 00 00 jmp 1180f4 <fat_scan_fat_for_free_clusters+0x1ee><== NOT EXECUTED
/* cleanup activity */
fat_free_fat_clusters_chain(fs_info, (*chain));
return rc;
}
rc = fat_set_fat_cluster(fs_info, save_cln, cl4find);
117ffb: 50 push %eax
117ffc: 56 push %esi
117ffd: 52 push %edx
117ffe: 53 push %ebx
117fff: e8 45 fc ff ff call 117c49 <fat_set_fat_cluster>
118004: 89 c2 mov %eax,%edx
if ( rc != RC_OK )
118006: 83 c4 10 add $0x10,%esp
118009: 85 c0 test %eax,%eax
11800b: 74 b0 je 117fbd <fat_scan_fat_for_free_clusters+0xb7><== ALWAYS TAKEN
11800d: e9 b2 00 00 00 jmp 1180c4 <fat_scan_fat_for_free_clusters+0x1be><== NOT EXECUTED
if ( rc != RC_OK )
goto cleanup;
}
save_cln = cl4find;
(*cls_added)++;
118012: 8b 55 14 mov 0x14(%ebp),%edx
118015: 8b 12 mov (%edx),%edx
118017: 89 d0 mov %edx,%eax
118019: 40 inc %eax
11801a: 8b 55 14 mov 0x14(%ebp),%edx
11801d: 89 02 mov %eax,(%edx)
/* have we satisfied request ? */
if (*cls_added == count)
11801f: 3b 45 10 cmp 0x10(%ebp),%eax
118022: 74 38 je 11805c <fat_scan_fat_for_free_clusters+0x156>
118024: 89 f2 mov %esi,%edx
118026: eb 5a jmp 118082 <fat_scan_fat_for_free_clusters+0x17c>
fat_cluster_num_to_sector_num(
const fat_fs_info_t *fs_info,
uint32_t cln
)
{
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
118028: 85 f6 test %esi,%esi
11802a: 75 0b jne 118037 <fat_scan_fat_for_free_clusters+0x131><== ALWAYS TAKEN
11802c: f6 43 0a 03 testb $0x3,0xa(%ebx) <== NOT EXECUTED
118030: 74 05 je 118037 <fat_scan_fat_for_free_clusters+0x131><== NOT EXECUTED
return fs_info->vol.rdir_loc;
118032: 8b 43 1c mov 0x1c(%ebx),%eax <== NOT EXECUTED
118035: eb 0c jmp 118043 <fat_scan_fat_for_free_clusters+0x13d><== NOT EXECUTED
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
118037: 8d 46 fe lea -0x2(%esi),%eax
11803a: 0f b6 4b 05 movzbl 0x5(%ebx),%ecx
11803e: d3 e0 shl %cl,%eax
118040: 03 43 30 add 0x30(%ebx),%eax
if (zero_fill) {
uint32_t sec = fat_cluster_num_to_sector_num(fs_info,
cl4find);
rc = _fat_block_zero(fs_info, sec, 0, fs_info->vol.bpc);
118043: 0f b7 53 06 movzwl 0x6(%ebx),%edx
118047: 52 push %edx
118048: 6a 00 push $0x0
11804a: 50 push %eax
11804b: 53 push %ebx
11804c: e8 99 a5 ff ff call 1125ea <_fat_block_zero>
118051: 89 c2 mov %eax,%edx
if ( rc != RC_OK )
118053: 83 c4 10 add $0x10,%esp
118056: 85 c0 test %eax,%eax
118058: 74 b8 je 118012 <fat_scan_fat_for_free_clusters+0x10c><== ALWAYS TAKEN
11805a: eb 68 jmp 1180c4 <fat_scan_fat_for_free_clusters+0x1be><== NOT EXECUTED
(*cls_added)++;
/* have we satisfied request ? */
if (*cls_added == count)
{
fs_info->vol.next_cl = save_cln;
11805c: 89 73 44 mov %esi,0x44(%ebx)
if (fs_info->vol.free_cls != 0xFFFFFFFF)
11805f: 8b 43 40 mov 0x40(%ebx),%eax
118062: 83 f8 ff cmp $0xffffffff,%eax
118065: 74 08 je 11806f <fat_scan_fat_for_free_clusters+0x169><== ALWAYS TAKEN
fs_info->vol.free_cls -= (*cls_added);
118067: 8b 55 14 mov 0x14(%ebp),%edx <== NOT EXECUTED
11806a: 2b 02 sub (%edx),%eax <== NOT EXECUTED
11806c: 89 43 40 mov %eax,0x40(%ebx) <== NOT EXECUTED
*last_cl = save_cln;
11806f: 8b 55 18 mov 0x18(%ebp),%edx
118072: 89 32 mov %esi,(%edx)
fat_buf_release(fs_info);
118074: 83 ec 0c sub $0xc,%esp
118077: 53 push %ebx
118078: e8 3c a3 ff ff call 1123b9 <fat_buf_release>
11807d: 83 c4 10 add $0x10,%esp
118080: eb 72 jmp 1180f4 <fat_scan_fat_for_free_clusters+0x1ee>
return rc;
}
}
i++;
118082: ff 45 d4 incl -0x2c(%ebp)
cl4find++;
118085: 46 inc %esi
if (cl4find >= data_cls_val)
118086: 3b 75 d0 cmp -0x30(%ebp),%esi
118089: 72 05 jb 118090 <fat_scan_fat_for_free_clusters+0x18a><== ALWAYS TAKEN
cl4find = 2;
11808b: be 02 00 00 00 mov $0x2,%esi <== 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)
118090: 8b 4d d0 mov -0x30(%ebp),%ecx
118093: 39 4d d4 cmp %ecx,-0x2c(%ebp)
118096: 0f 82 bc fe ff ff jb 117f58 <fat_scan_fat_for_free_clusters+0x52><== ALWAYS TAKEN
cl4find++;
if (cl4find >= data_cls_val)
cl4find = 2;
}
fs_info->vol.next_cl = save_cln;
11809c: 89 53 44 mov %edx,0x44(%ebx) <== NOT EXECUTED
if (fs_info->vol.free_cls != 0xFFFFFFFF)
11809f: 8b 43 40 mov 0x40(%ebx),%eax <== NOT EXECUTED
1180a2: 83 f8 ff cmp $0xffffffff,%eax <== NOT EXECUTED
1180a5: 74 08 je 1180af <fat_scan_fat_for_free_clusters+0x1a9><== NOT EXECUTED
fs_info->vol.free_cls -= (*cls_added);
1180a7: 8b 4d 14 mov 0x14(%ebp),%ecx <== NOT EXECUTED
1180aa: 2b 01 sub (%ecx),%eax <== NOT EXECUTED
1180ac: 89 43 40 mov %eax,0x40(%ebx) <== NOT EXECUTED
*last_cl = save_cln;
1180af: 8b 45 18 mov 0x18(%ebp),%eax <== NOT EXECUTED
1180b2: 89 10 mov %edx,(%eax) <== NOT EXECUTED
fat_buf_release(fs_info);
1180b4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1180b7: 53 push %ebx <== NOT EXECUTED
1180b8: e8 fc a2 ff ff call 1123b9 <fat_buf_release> <== NOT EXECUTED
1180bd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
return RC_OK;
1180c0: 31 ff xor %edi,%edi <== NOT EXECUTED
1180c2: eb 30 jmp 1180f4 <fat_scan_fat_for_free_clusters+0x1ee><== NOT EXECUTED
cleanup:
/* cleanup activity */
fat_free_fat_clusters_chain(fs_info, (*chain));
1180c4: 57 push %edi <== NOT EXECUTED
1180c5: 57 push %edi <== NOT EXECUTED
1180c6: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED
1180c9: ff 31 pushl (%ecx) <== NOT EXECUTED
1180cb: 53 push %ebx <== NOT EXECUTED
1180cc: 89 55 c4 mov %edx,-0x3c(%ebp) <== NOT EXECUTED
1180cf: e8 8e fd ff ff call 117e62 <fat_free_fat_clusters_chain><== NOT EXECUTED
/* trying to save last allocated cluster for future use */
fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_FREE);
1180d4: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
1180d7: 6a 00 push $0x0 <== NOT EXECUTED
1180d9: 56 push %esi <== NOT EXECUTED
1180da: 53 push %ebx <== NOT EXECUTED
1180db: e8 69 fb ff ff call 117c49 <fat_set_fat_cluster> <== NOT EXECUTED
fat_buf_release(fs_info);
1180e0: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED
1180e3: e8 d1 a2 ff ff call 1123b9 <fat_buf_release> <== NOT EXECUTED
1180e8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
return rc;
1180eb: 8b 55 c4 mov -0x3c(%ebp),%edx <== NOT EXECUTED
1180ee: 89 d7 mov %edx,%edi <== NOT EXECUTED
1180f0: eb 02 jmp 1180f4 <fat_scan_fat_for_free_clusters+0x1ee><== NOT EXECUTED
* wouldn't work properly
*/
if (*cls_added == 0)
{
*chain = cl4find;
rc = fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_EOC);
1180f2: 89 c7 mov %eax,%edi <== NOT EXECUTED
fat_free_fat_clusters_chain(fs_info, (*chain));
/* trying to save last allocated cluster for future use */
fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_FREE);
fat_buf_release(fs_info);
return rc;
}
1180f4: 89 f8 mov %edi,%eax
1180f6: 8d 65 f4 lea -0xc(%ebp),%esp
1180f9: 5b pop %ebx
1180fa: 5e pop %esi
1180fb: 5f pop %edi
1180fc: 5d pop %ebp
1180fd: c3 ret
00117c49 <fat_set_fat_cluster>:
fat_set_fat_cluster(
fat_fs_info_t *fs_info,
uint32_t cln,
uint32_t in_val
)
{
117c49: 55 push %ebp
117c4a: 89 e5 mov %esp,%ebp
117c4c: 57 push %edi
117c4d: 56 push %esi
117c4e: 53 push %ebx
117c4f: 83 ec 3c sub $0x3c,%esp
117c52: 8b 5d 08 mov 0x8(%ebp),%ebx
117c55: 8b 75 0c mov 0xc(%ebp),%esi
int rc = RC_OK;
uint32_t sec = 0;
uint32_t ofs = 0;
uint16_t fat16_clv = 0;
uint32_t fat32_clv = 0;
rtems_bdbuf_buffer *block0 = NULL;
117c58: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
/* sanity check */
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
117c5f: 83 fe 01 cmp $0x1,%esi
117c62: 0f 86 e4 01 00 00 jbe 117e4c <fat_set_fat_cluster+0x203><== NEVER TAKEN
117c68: 8b 43 34 mov 0x34(%ebx),%eax
117c6b: 40 inc %eax
117c6c: 39 c6 cmp %eax,%esi
117c6e: 76 05 jbe 117c75 <fat_set_fat_cluster+0x2c><== ALWAYS TAKEN
117c70: e9 d7 01 00 00 jmp 117e4c <fat_set_fat_cluster+0x203><== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
117c75: 8a 53 0a mov 0xa(%ebx),%dl
117c78: 88 d0 mov %dl,%al
117c7a: 24 01 and $0x1,%al
117c7c: 74 08 je 117c86 <fat_set_fat_cluster+0x3d><== NEVER TAKEN
117c7e: 89 f7 mov %esi,%edi
117c80: d1 ef shr %edi
117c82: 01 f7 add %esi,%edi
117c84: eb 11 jmp 117c97 <fat_set_fat_cluster+0x4e>
117c86: f6 c2 02 test $0x2,%dl <== NOT EXECUTED
117c89: 74 05 je 117c90 <fat_set_fat_cluster+0x47><== NOT EXECUTED
117c8b: 8d 3c 36 lea (%esi,%esi,1),%edi <== NOT EXECUTED
117c8e: eb 07 jmp 117c97 <fat_set_fat_cluster+0x4e><== NOT EXECUTED
117c90: 8d 3c b5 00 00 00 00 lea 0x0(,%esi,4),%edi <== NOT EXECUTED
117c97: 0f b6 4b 02 movzbl 0x2(%ebx),%ecx
117c9b: d3 ef shr %cl,%edi
117c9d: 8b 4b 4c mov 0x4c(%ebx),%ecx
117ca0: 01 f9 add %edi,%ecx
fs_info->vol.afat_loc;
ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1);
117ca2: 84 c0 test %al,%al
117ca4: 74 08 je 117cae <fat_set_fat_cluster+0x65><== NEVER TAKEN
117ca6: 89 f2 mov %esi,%edx
117ca8: d1 ea shr %edx
117caa: 01 f2 add %esi,%edx
117cac: eb 11 jmp 117cbf <fat_set_fat_cluster+0x76>
117cae: 80 e2 02 and $0x2,%dl <== NOT EXECUTED
117cb1: 74 05 je 117cb8 <fat_set_fat_cluster+0x6f><== NOT EXECUTED
117cb3: 8d 14 36 lea (%esi,%esi,1),%edx <== NOT EXECUTED
117cb6: eb 07 jmp 117cbf <fat_set_fat_cluster+0x76><== NOT EXECUTED
117cb8: 8d 14 b5 00 00 00 00 lea 0x0(,%esi,4),%edx <== NOT EXECUTED
117cbf: 0f b7 3b movzwl (%ebx),%edi
rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0);
117cc2: 8d 45 e4 lea -0x1c(%ebp),%eax
117cc5: 50 push %eax
117cc6: 6a 01 push $0x1
117cc8: 51 push %ecx
117cc9: 53 push %ebx
117cca: 89 55 d0 mov %edx,-0x30(%ebp)
117ccd: 89 4d cc mov %ecx,-0x34(%ebp)
117cd0: e8 2f a5 ff ff call 112204 <fat_buf_access>
if (rc != RC_OK)
117cd5: 83 c4 10 add $0x10,%esp
117cd8: 85 c0 test %eax,%eax
117cda: 8b 55 d0 mov -0x30(%ebp),%edx
117cdd: 8b 4d cc mov -0x34(%ebp),%ecx
117ce0: 0f 85 74 01 00 00 jne 117e5a <fat_set_fat_cluster+0x211><== NEVER TAKEN
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);
117ce6: 4f dec %edi
117ce7: 21 d7 and %edx,%edi
rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0);
if (rc != RC_OK)
return rc;
switch ( fs_info->vol.type )
117ce9: 8a 53 0a mov 0xa(%ebx),%dl
117cec: 80 fa 02 cmp $0x2,%dl
117cef: 0f 84 27 01 00 00 je 117e1c <fat_set_fat_cluster+0x1d3><== NEVER TAKEN
117cf5: 80 fa 04 cmp $0x4,%dl
117cf8: 0f 84 2d 01 00 00 je 117e2b <fat_set_fat_cluster+0x1e2><== NEVER TAKEN
117cfe: fe ca dec %dl
117d00: 0f 85 46 01 00 00 jne 117e4c <fat_set_fat_cluster+0x203><== NEVER TAKEN
{
case FAT_FAT12:
if ( FAT_CLUSTER_IS_ODD(cln) )
117d06: 83 e6 01 and $0x1,%esi
117d09: 8b 55 e4 mov -0x1c(%ebp),%edx
117d0c: 0f 84 84 00 00 00 je 117d96 <fat_set_fat_cluster+0x14d>
{
fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT;
117d12: 8b 75 10 mov 0x10(%ebp),%esi
117d15: c1 e6 04 shl $0x4,%esi
117d18: 66 89 75 c8 mov %si,-0x38(%ebp)
*((uint8_t *)(block0->buffer + ofs)) =
(*((uint8_t *)(block0->buffer + ofs))) & 0x0F;
117d1c: 8b 52 1c mov 0x1c(%edx),%edx
117d1f: 01 fa add %edi,%edx
{
case FAT_FAT12:
if ( FAT_CLUSTER_IS_ODD(cln) )
{
fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT;
*((uint8_t *)(block0->buffer + ofs)) =
117d21: 80 22 0f andb $0xf,(%edx)
(*((uint8_t *)(block0->buffer + ofs))) & 0x0F;
*((uint8_t *)(block0->buffer + ofs)) =
(*((uint8_t *)(block0->buffer + ofs))) |
117d24: 8b 55 e4 mov -0x1c(%ebp),%edx
117d27: 8b 52 1c mov 0x1c(%edx),%edx
117d2a: 01 fa add %edi,%edx
117d2c: 89 55 d4 mov %edx,-0x2c(%ebp)
{
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)) =
117d2f: 8a 55 c8 mov -0x38(%ebp),%dl
117d32: 8b 75 d4 mov -0x2c(%ebp),%esi
117d35: 08 16 or %dl,(%esi)
}
static inline void
fat_buf_mark_modified(fat_fs_info_t *fs_info)
{
fs_info->c.modified = true;
117d37: c6 43 7c 01 movb $0x1,0x7c(%ebx)
(*((uint8_t *)(block0->buffer + ofs))) |
(uint8_t )(fat16_clv & 0x00FF);
fat_buf_mark_modified(fs_info);
if ( ofs == (fs_info->vol.bps - 1) )
117d3b: 0f b7 13 movzwl (%ebx),%edx
117d3e: 4a dec %edx
117d3f: 39 d7 cmp %edx,%edi
117d41: 75 32 jne 117d75 <fat_set_fat_cluster+0x12c><== ALWAYS TAKEN
{
rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ,
117d43: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED
117d46: 50 push %eax <== NOT EXECUTED
117d47: 6a 01 push $0x1 <== NOT EXECUTED
117d49: 8d 41 01 lea 0x1(%ecx),%eax <== NOT EXECUTED
117d4c: 50 push %eax <== NOT EXECUTED
117d4d: 53 push %ebx <== NOT EXECUTED
117d4e: e8 b1 a4 ff ff call 112204 <fat_buf_access> <== NOT EXECUTED
&block0);
if (rc != RC_OK)
117d53: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
117d56: 85 c0 test %eax,%eax <== NOT EXECUTED
117d58: 0f 85 fc 00 00 00 jne 117e5a <fat_set_fat_cluster+0x211><== NOT EXECUTED
return rc;
*((uint8_t *)(block0->buffer)) &= 0x00;
117d5e: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
117d61: 8b 52 1c mov 0x1c(%edx),%edx <== NOT EXECUTED
117d64: c6 02 00 movb $0x0,(%edx) <== NOT EXECUTED
*((uint8_t *)(block0->buffer)) =
(*((uint8_t *)(block0->buffer))) |
117d67: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
117d6a: 8b 52 1c mov 0x1c(%edx),%edx <== NOT EXECUTED
(uint8_t )((fat16_clv & 0xFF00)>>8);
117d6d: 8b 4d c8 mov -0x38(%ebp),%ecx <== NOT EXECUTED
117d70: e9 81 00 00 00 jmp 117df6 <fat_set_fat_cluster+0x1ad><== NOT EXECUTED
fat_buf_mark_modified(fs_info);
}
else
{
*((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00;
117d75: 8b 55 e4 mov -0x1c(%ebp),%edx
117d78: 8b 52 1c mov 0x1c(%edx),%edx
117d7b: c6 44 3a 01 00 movb $0x0,0x1(%edx,%edi,1)
*((uint8_t *)(block0->buffer + ofs + 1)) =
(*((uint8_t *)(block0->buffer + ofs + 1))) |
117d80: 8b 55 e4 mov -0x1c(%ebp),%edx
117d83: 8b 52 1c mov 0x1c(%edx),%edx
(uint8_t )((fat16_clv & 0xFF00)>>8);
117d86: 8b 4d c8 mov -0x38(%ebp),%ecx
117d89: 66 c1 e9 08 shr $0x8,%cx
}
else
{
*((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00;
*((uint8_t *)(block0->buffer + ofs + 1)) =
117d8d: 08 4c 3a 01 or %cl,0x1(%edx,%edi,1)
117d91: e9 c4 00 00 00 jmp 117e5a <fat_set_fat_cluster+0x211>
(uint8_t )((fat16_clv & 0xFF00)>>8);
}
}
else
{
fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK;
117d96: 8b 75 10 mov 0x10(%ebp),%esi
117d99: 81 e6 ff 0f 00 00 and $0xfff,%esi
117d9f: 89 75 d4 mov %esi,-0x2c(%ebp)
117da2: 66 89 75 c6 mov %si,-0x3a(%ebp)
*((uint8_t *)(block0->buffer + ofs)) &= 0x00;
117da6: 8b 52 1c mov 0x1c(%edx),%edx
117da9: c6 04 3a 00 movb $0x0,(%edx,%edi,1)
*((uint8_t *)(block0->buffer + ofs)) =
(*((uint8_t *)(block0->buffer + ofs))) |
117dad: 8b 55 e4 mov -0x1c(%ebp),%edx
117db0: 8b 52 1c mov 0x1c(%edx),%edx
117db3: 01 fa add %edi,%edx
117db5: 89 55 c8 mov %edx,-0x38(%ebp)
else
{
fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK;
*((uint8_t *)(block0->buffer + ofs)) &= 0x00;
*((uint8_t *)(block0->buffer + ofs)) =
117db8: 8a 55 d4 mov -0x2c(%ebp),%dl
117dbb: 8b 75 c8 mov -0x38(%ebp),%esi
117dbe: 08 16 or %dl,(%esi)
117dc0: c6 43 7c 01 movb $0x1,0x7c(%ebx)
(*((uint8_t *)(block0->buffer + ofs))) |
(uint8_t )(fat16_clv & 0x00FF);
fat_buf_mark_modified(fs_info);
if ( ofs == (fs_info->vol.bps - 1) )
117dc4: 0f b7 13 movzwl (%ebx),%edx
117dc7: 4a dec %edx
117dc8: 39 d7 cmp %edx,%edi
117dca: 75 32 jne 117dfe <fat_set_fat_cluster+0x1b5><== ALWAYS TAKEN
{
rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ,
117dcc: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED
117dcf: 50 push %eax <== NOT EXECUTED
117dd0: 6a 01 push $0x1 <== NOT EXECUTED
117dd2: 8d 41 01 lea 0x1(%ecx),%eax <== NOT EXECUTED
117dd5: 50 push %eax <== NOT EXECUTED
117dd6: 53 push %ebx <== NOT EXECUTED
117dd7: e8 28 a4 ff ff call 112204 <fat_buf_access> <== NOT EXECUTED
&block0);
if (rc != RC_OK)
117ddc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
117ddf: 85 c0 test %eax,%eax <== NOT EXECUTED
117de1: 75 77 jne 117e5a <fat_set_fat_cluster+0x211><== NOT EXECUTED
return rc;
*((uint8_t *)(block0->buffer)) =
(*((uint8_t *)(block0->buffer))) & 0xF0;
117de3: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
117de6: 8b 52 1c mov 0x1c(%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)) =
117de9: 80 22 f0 andb $0xf0,(%edx) <== NOT EXECUTED
(*((uint8_t *)(block0->buffer))) & 0xF0;
*((uint8_t *)(block0->buffer)) =
(*((uint8_t *)(block0->buffer))) |
117dec: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
117def: 8b 52 1c mov 0x1c(%edx),%edx <== NOT EXECUTED
(uint8_t )((fat16_clv & 0xFF00)>>8);
117df2: 66 8b 4d c6 mov -0x3a(%ebp),%cx <== NOT EXECUTED
117df6: 66 c1 e9 08 shr $0x8,%cx <== NOT EXECUTED
return rc;
*((uint8_t *)(block0->buffer)) =
(*((uint8_t *)(block0->buffer))) & 0xF0;
*((uint8_t *)(block0->buffer)) =
117dfa: 08 0a or %cl,(%edx) <== NOT EXECUTED
117dfc: eb 48 jmp 117e46 <fat_set_fat_cluster+0x1fd><== NOT EXECUTED
fat_buf_mark_modified(fs_info);
}
else
{
*((uint8_t *)(block0->buffer + ofs + 1)) =
(*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0;
117dfe: 47 inc %edi
117dff: 8b 55 e4 mov -0x1c(%ebp),%edx
117e02: 8b 52 1c mov 0x1c(%edx),%edx
117e05: 01 fa add %edi,%edx
fat_buf_mark_modified(fs_info);
}
else
{
*((uint8_t *)(block0->buffer + ofs + 1)) =
117e07: 80 22 f0 andb $0xf0,(%edx)
(*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0;
*((uint8_t *)(block0->buffer + ofs+1)) =
(*((uint8_t *)(block0->buffer + ofs+1))) |
117e0a: 8b 55 e4 mov -0x1c(%ebp),%edx
117e0d: 03 7a 1c add 0x1c(%edx),%edi
(uint8_t )((fat16_clv & 0xFF00)>>8);
117e10: 66 8b 55 c6 mov -0x3a(%ebp),%dx
117e14: 66 c1 ea 08 shr $0x8,%dx
else
{
*((uint8_t *)(block0->buffer + ofs + 1)) =
(*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0;
*((uint8_t *)(block0->buffer + ofs+1)) =
117e18: 08 17 or %dl,(%edi)
117e1a: eb 3e jmp 117e5a <fat_set_fat_cluster+0x211>
}
}
break;
case FAT_FAT16:
*((uint16_t *)(block0->buffer + ofs)) =
117e1c: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
117e1f: 8b 52 1c mov 0x1c(%edx),%edx <== NOT EXECUTED
(uint16_t )(CT_LE_W(in_val));
117e22: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED
117e25: 66 89 0c 3a mov %cx,(%edx,%edi,1) <== NOT EXECUTED
117e29: eb 1b jmp 117e46 <fat_set_fat_cluster+0x1fd><== 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));
117e2b: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
117e2e: 03 7a 1c add 0x1c(%edx),%edi <== NOT EXECUTED
117e31: 8b 17 mov (%edi),%edx <== NOT EXECUTED
117e33: 81 e2 00 00 00 f0 and $0xf0000000,%edx <== NOT EXECUTED
(uint16_t )(CT_LE_W(in_val));
fat_buf_mark_modified(fs_info);
break;
case FAT_FAT32:
fat32_clv = CT_LE_L((in_val & FAT_FAT32_MASK));
117e39: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED
117e3c: 81 e1 ff ff ff 0f and $0xfffffff,%ecx <== NOT EXECUTED
*((uint32_t *)(block0->buffer + ofs)) =
(*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000));
*((uint32_t *)(block0->buffer + ofs)) =
fat32_clv | (*((uint32_t *)(block0->buffer + ofs)));
117e42: 09 ca or %ecx,%edx <== NOT EXECUTED
117e44: 89 17 mov %edx,(%edi) <== NOT EXECUTED
117e46: c6 43 7c 01 movb $0x1,0x7c(%ebx) <== NOT EXECUTED
117e4a: eb 0e jmp 117e5a <fat_set_fat_cluster+0x211><== NOT EXECUTED
fat_buf_mark_modified(fs_info);
break;
default:
rtems_set_errno_and_return_minus_one(EIO);
117e4c: e8 bf 19 00 00 call 119810 <__errno> <== NOT EXECUTED
117e51: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
117e57: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
break;
}
return RC_OK;
}
117e5a: 8d 65 f4 lea -0xc(%ebp),%esp
117e5d: 5b pop %ebx
117e5e: 5e pop %esi
117e5f: 5f pop %edi
117e60: 5d pop %ebp
117e61: c3 ret
001128cb <fat_shutdown_drive>:
* RC_OK on success, or -1 if error occured
* and errno set appropriately
*/
int
fat_shutdown_drive(fat_fs_info_t *fs_info)
{
1128cb: 55 push %ebp
1128cc: 89 e5 mov %esp,%ebp
1128ce: 57 push %edi
1128cf: 56 push %esi
1128d0: 53 push %ebx
1128d1: 83 ec 1c sub $0x1c,%esp
1128d4: 8b 5d 08 mov 0x8(%ebp),%ebx
int rc = RC_OK;
1128d7: 31 f6 xor %esi,%esi
int i = 0;
if (fs_info->vol.type & FAT_FAT32)
1128d9: f6 43 0a 04 testb $0x4,0xa(%ebx)
1128dd: 74 19 je 1128f8 <fat_shutdown_drive+0x2d><== ALWAYS TAKEN
{
rc = fat_fat32_update_fsinfo_sector(fs_info, fs_info->vol.free_cls,
1128df: 50 push %eax <== NOT EXECUTED
1128e0: ff 73 44 pushl 0x44(%ebx) <== NOT EXECUTED
1128e3: ff 73 40 pushl 0x40(%ebx) <== NOT EXECUTED
1128e6: 53 push %ebx <== NOT EXECUTED
1128e7: e8 7e ff ff ff call 11286a <fat_fat32_update_fsinfo_sector><== NOT EXECUTED
1128ec: 89 c6 mov %eax,%esi <== NOT EXECUTED
fs_info->vol.next_cl);
if ( rc != RC_OK )
1128ee: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1128f1: 85 c0 test %eax,%eax <== NOT EXECUTED
1128f3: 74 03 je 1128f8 <fat_shutdown_drive+0x2d><== NOT EXECUTED
rc = -1;
1128f5: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED
}
fat_buf_release(fs_info);
1128f8: 83 ec 0c sub $0xc,%esp
1128fb: 53 push %ebx
1128fc: e8 b8 fa ff ff call 1123b9 <fat_buf_release>
if (rtems_bdbuf_syncdev(fs_info->vol.dd) != RTEMS_SUCCESSFUL)
112901: 58 pop %eax
112902: ff 73 58 pushl 0x58(%ebx)
112905: e8 29 e8 ff ff call 111133 <rtems_bdbuf_syncdev>
11290a: 83 c4 10 add $0x10,%esp
11290d: 85 c0 test %eax,%eax
11290f: 74 03 je 112914 <fat_shutdown_drive+0x49><== ALWAYS TAKEN
rc = -1;
112911: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED
112914: 31 ff xor %edi,%edi
for (i = 0; i < FAT_HASH_SIZE; i++)
{
rtems_chain_node *node = NULL;
rtems_chain_control *the_chain = fs_info->vhash + i;
112916: 8b 43 60 mov 0x60(%ebx),%eax
112919: 01 f8 add %edi,%eax
11291b: 89 45 e4 mov %eax,-0x1c(%ebp)
while ( (node = rtems_chain_get(the_chain)) != NULL )
11291e: eb 0c jmp 11292c <fat_shutdown_drive+0x61>
free(node);
112920: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
112923: 50 push %eax <== NOT EXECUTED
112924: e8 03 49 ff ff call 10722c <free> <== NOT EXECUTED
112929: 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 );
11292c: 83 ec 0c sub $0xc,%esp
11292f: ff 75 e4 pushl -0x1c(%ebp)
112932: e8 e5 8d ff ff call 10b71c <_Chain_Get>
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 )
112937: 83 c4 10 add $0x10,%esp
11293a: 85 c0 test %eax,%eax
11293c: 75 e2 jne 112920 <fat_shutdown_drive+0x55><== NEVER TAKEN
11293e: 83 c7 0c add $0xc,%edi
fat_buf_release(fs_info);
if (rtems_bdbuf_syncdev(fs_info->vol.dd) != RTEMS_SUCCESSFUL)
rc = -1;
for (i = 0; i < FAT_HASH_SIZE; i++)
112941: 83 ff 18 cmp $0x18,%edi
112944: 75 d0 jne 112916 <fat_shutdown_drive+0x4b>
112946: 66 31 ff xor %di,%di
}
for (i = 0; i < FAT_HASH_SIZE; i++)
{
rtems_chain_node *node = NULL;
rtems_chain_control *the_chain = fs_info->rhash + i;
112949: 8b 43 64 mov 0x64(%ebx),%eax
11294c: 01 f8 add %edi,%eax
11294e: 89 45 e4 mov %eax,-0x1c(%ebp)
while ( (node = rtems_chain_get(the_chain)) != NULL )
112951: eb 0c jmp 11295f <fat_shutdown_drive+0x94>
free(node);
112953: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
112956: 50 push %eax <== NOT EXECUTED
112957: e8 d0 48 ff ff call 10722c <free> <== NOT EXECUTED
11295c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11295f: 83 ec 0c sub $0xc,%esp
112962: ff 75 e4 pushl -0x1c(%ebp)
112965: e8 b2 8d ff ff call 10b71c <_Chain_Get>
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 )
11296a: 83 c4 10 add $0x10,%esp
11296d: 85 c0 test %eax,%eax
11296f: 75 e2 jne 112953 <fat_shutdown_drive+0x88><== NEVER TAKEN
112971: 83 c7 0c add $0xc,%edi
while ( (node = rtems_chain_get(the_chain)) != NULL )
free(node);
}
for (i = 0; i < FAT_HASH_SIZE; i++)
112974: 83 ff 18 cmp $0x18,%edi
112977: 75 d0 jne 112949 <fat_shutdown_drive+0x7e>
while ( (node = rtems_chain_get(the_chain)) != NULL )
free(node);
}
free(fs_info->vhash);
112979: 83 ec 0c sub $0xc,%esp
11297c: ff 73 60 pushl 0x60(%ebx)
11297f: e8 a8 48 ff ff call 10722c <free>
free(fs_info->rhash);
112984: 5f pop %edi
112985: ff 73 64 pushl 0x64(%ebx)
112988: e8 9f 48 ff ff call 10722c <free>
free(fs_info->uino);
11298d: 58 pop %eax
11298e: ff 73 68 pushl 0x68(%ebx)
112991: e8 96 48 ff ff call 10722c <free>
free(fs_info->sec_buf);
112996: 58 pop %eax
112997: ff b3 84 00 00 00 pushl 0x84(%ebx)
11299d: e8 8a 48 ff ff call 10722c <free>
close(fs_info->vol.fd);
1129a2: 58 pop %eax
1129a3: ff 73 54 pushl 0x54(%ebx)
1129a6: e8 51 46 ff ff call 106ffc <close>
if (rc)
1129ab: 83 c4 10 add $0x10,%esp
1129ae: 85 f6 test %esi,%esi
1129b0: 74 0b je 1129bd <fat_shutdown_drive+0xf2><== ALWAYS TAKEN
errno = EIO;
1129b2: e8 59 6e 00 00 call 119810 <__errno> <== NOT EXECUTED
1129b7: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
return rc;
}
1129bd: 89 f0 mov %esi,%eax
1129bf: 8d 65 f4 lea -0xc(%ebp),%esp
1129c2: 5b pop %ebx
1129c3: 5e pop %esi
1129c4: 5f pop %edi
1129c5: 5d pop %ebp
1129c6: c3 ret
0012d5e4 <fchdir>:
#include <unistd.h>
#include <rtems/libio_.h>
int fchdir( int fd )
{
12d5e4: 55 push %ebp
12d5e5: 89 e5 mov %esp,%ebp
12d5e7: 57 push %edi
12d5e8: 56 push %esi
12d5e9: 53 push %ebx
12d5ea: 83 ec 6c sub $0x6c,%esp
12d5ed: 8b 5d 08 mov 0x8(%ebp),%ebx
int rv = 0;
rtems_libio_t *iop;
struct stat st;
rtems_filesystem_location_info_t loc;
st.st_mode = 0;
12d5f0: c7 45 ac 00 00 00 00 movl $0x0,-0x54(%ebp)
st.st_uid = 0;
12d5f7: 66 c7 45 b2 00 00 movw $0x0,-0x4e(%ebp)
st.st_gid = 0;
12d5fd: 66 c7 45 b4 00 00 movw $0x0,-0x4c(%ebp)
rtems_libio_check_fd( fd );
12d603: 3b 1d 1c 69 16 00 cmp 0x16691c,%ebx
12d609: 72 02 jb 12d60d <fchdir+0x29>
12d60b: eb 0f jmp 12d61c <fchdir+0x38>
iop = rtems_libio_iop( fd );
12d60d: 6b db 30 imul $0x30,%ebx,%ebx
12d610: 03 1d e8 e0 16 00 add 0x16e0e8,%ebx
rtems_libio_check_is_open( iop );
12d616: f6 43 0d 01 testb $0x1,0xd(%ebx)
12d61a: 75 13 jne 12d62f <fchdir+0x4b>
12d61c: e8 67 38 00 00 call 130e88 <__errno>
12d621: c7 00 09 00 00 00 movl $0x9,(%eax)
12d627: 83 ce ff or $0xffffffff,%esi
12d62a: e9 84 00 00 00 jmp 12d6b3 <fchdir+0xcf>
if ( rv == 0 ) {
rv = rtems_filesystem_chdir( &loc );
}
return rv;
}
12d62f: 8b 43 24 mov 0x24(%ebx),%eax
const rtems_filesystem_location_info_t *loc
)
{
const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry;
(*mt_entry->ops->lock_h)( mt_entry );
12d632: 83 ec 0c sub $0xc,%esp
12d635: 8b 50 0c mov 0xc(%eax),%edx
12d638: 50 push %eax
12d639: ff 12 call *(%edx)
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
rtems_filesystem_instance_lock( &iop->pathinfo );
rv = (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, &st );
12d63b: 8d 7b 10 lea 0x10(%ebx),%edi
12d63e: 5a pop %edx
12d63f: 59 pop %ecx
12d640: 8b 43 20 mov 0x20(%ebx),%eax
12d643: 8d 55 a0 lea -0x60(%ebp),%edx
12d646: 52 push %edx
12d647: 57 push %edi
12d648: ff 50 18 call *0x18(%eax)
12d64b: 89 c6 mov %eax,%esi
if ( rv == 0 ) {
12d64d: 83 c4 10 add $0x10,%esp
12d650: 85 c0 test %eax,%eax
12d652: 75 3a jne 12d68e <fchdir+0xaa> <== NEVER TAKEN
bool access_ok = rtems_filesystem_check_access(
12d654: 0f b7 45 b4 movzwl -0x4c(%ebp),%eax
12d658: 50 push %eax
12d659: 0f b7 45 b2 movzwl -0x4e(%ebp),%eax
12d65d: 50 push %eax
12d65e: ff 75 ac pushl -0x54(%ebp)
12d661: 6a 01 push $0x1
12d663: e8 ec 22 fe ff call 10f954 <rtems_filesystem_check_access>
st.st_mode,
st.st_uid,
st.st_gid
);
if ( access_ok ) {
12d668: 83 c4 10 add $0x10,%esp
12d66b: 84 c0 test %al,%al
12d66d: 74 11 je 12d680 <fchdir+0x9c> <== NEVER TAKEN
rtems_filesystem_location_clone( &loc, &iop->pathinfo );
12d66f: 50 push %eax
12d670: 50 push %eax
12d671: 57 push %edi
12d672: 8d 45 88 lea -0x78(%ebp),%eax
12d675: 50 push %eax
12d676: e8 31 1e fe ff call 10f4ac <rtems_filesystem_location_clone>
12d67b: 83 c4 10 add $0x10,%esp
12d67e: eb 0e jmp 12d68e <fchdir+0xaa>
} else {
errno = EACCES;
12d680: e8 03 38 00 00 call 130e88 <__errno>
12d685: c7 00 0d 00 00 00 movl $0xd,(%eax)
rv = -1;
12d68b: 83 ce ff or $0xffffffff,%esi
if ( rv == 0 ) {
rv = rtems_filesystem_chdir( &loc );
}
return rv;
}
12d68e: 8b 43 24 mov 0x24(%ebx),%eax
const rtems_filesystem_location_info_t *loc
)
{
const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry;
(*mt_entry->ops->unlock_h)( mt_entry );
12d691: 83 ec 0c sub $0xc,%esp
12d694: 8b 50 0c mov 0xc(%eax),%edx
12d697: 50 push %eax
12d698: ff 52 04 call *0x4(%edx)
rv = -1;
}
}
rtems_filesystem_instance_unlock( &iop->pathinfo );
if ( rv == 0 ) {
12d69b: 83 c4 10 add $0x10,%esp
12d69e: 85 f6 test %esi,%esi
12d6a0: 75 11 jne 12d6b3 <fchdir+0xcf>
rv = rtems_filesystem_chdir( &loc );
12d6a2: 83 ec 0c sub $0xc,%esp
12d6a5: 8d 45 88 lea -0x78(%ebp),%eax
12d6a8: 50 push %eax
12d6a9: e8 7a 43 ff ff call 121a28 <rtems_filesystem_chdir>
12d6ae: 89 c6 mov %eax,%esi
12d6b0: 83 c4 10 add $0x10,%esp
}
return rv;
}
12d6b3: 89 f0 mov %esi,%eax
12d6b5: 8d 65 f4 lea -0xc(%ebp),%esp
12d6b8: 5b pop %ebx
12d6b9: 5e pop %esi
12d6ba: 5f pop %edi
12d6bb: 5d pop %ebp
12d6bc: c3 ret
00121cc4 <fchmod>:
#include <sys/stat.h>
#include <rtems/libio_.h>
int fchmod( int fd, mode_t mode )
{
121cc4: 55 push %ebp
121cc5: 89 e5 mov %esp,%ebp
121cc7: 53 push %ebx
121cc8: 83 ec 14 sub $0x14,%esp
121ccb: 8b 5d 08 mov 0x8(%ebp),%ebx
int rv;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
121cce: 3b 1d 1c 69 16 00 cmp 0x16691c,%ebx
121cd4: 72 02 jb 121cd8 <fchmod+0x14>
121cd6: eb 0f jmp 121ce7 <fchmod+0x23>
iop = rtems_libio_iop( fd );
121cd8: 6b db 30 imul $0x30,%ebx,%ebx
121cdb: 03 1d e8 e0 16 00 add 0x16e0e8,%ebx
rtems_libio_check_is_open(iop);
121ce1: f6 43 0d 01 testb $0x1,0xd(%ebx)
121ce5: 75 0d jne 121cf4 <fchmod+0x30>
121ce7: e8 9c f1 00 00 call 130e88 <__errno>
121cec: c7 00 09 00 00 00 movl $0x9,(%eax)
121cf2: eb 46 jmp 121d3a <fchmod+0x76>
if (iop->pathinfo.mt_entry->writeable) {
121cf4: 8b 43 24 mov 0x24(%ebx),%eax
121cf7: 80 78 29 00 cmpb $0x0,0x29(%eax)
121cfb: 74 32 je 121d2f <fchmod+0x6b> <== NEVER TAKEN
const rtems_filesystem_location_info_t *loc
)
{
const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry;
(*mt_entry->ops->lock_h)( mt_entry );
121cfd: 83 ec 0c sub $0xc,%esp
121d00: 8b 50 0c mov 0xc(%eax),%edx
121d03: 50 push %eax
121d04: ff 12 call *(%edx)
rtems_filesystem_instance_lock( &iop->pathinfo );
rv = (*iop->pathinfo.mt_entry->ops->fchmod_h)( &iop->pathinfo, mode );
121d06: 58 pop %eax
121d07: 5a pop %edx
121d08: 8b 43 24 mov 0x24(%ebx),%eax
121d0b: 8b 40 0c mov 0xc(%eax),%eax
121d0e: ff 75 0c pushl 0xc(%ebp)
121d11: 8d 53 10 lea 0x10(%ebx),%edx
121d14: 52 push %edx
121d15: ff 50 20 call *0x20(%eax)
errno = EROFS;
rv = -1;
}
return rv;
}
121d18: 8b 53 24 mov 0x24(%ebx),%edx
const rtems_filesystem_location_info_t *loc
)
{
const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry;
(*mt_entry->ops->unlock_h)( mt_entry );
121d1b: 8b 4a 0c mov 0xc(%edx),%ecx
121d1e: 89 14 24 mov %edx,(%esp)
121d21: 89 45 f4 mov %eax,-0xc(%ebp)
121d24: ff 51 04 call *0x4(%ecx)
121d27: 83 c4 10 add $0x10,%esp
121d2a: 8b 45 f4 mov -0xc(%ebp),%eax
121d2d: eb 0e jmp 121d3d <fchmod+0x79>
if (iop->pathinfo.mt_entry->writeable) {
rtems_filesystem_instance_lock( &iop->pathinfo );
rv = (*iop->pathinfo.mt_entry->ops->fchmod_h)( &iop->pathinfo, mode );
rtems_filesystem_instance_unlock( &iop->pathinfo );
} else {
errno = EROFS;
121d2f: e8 54 f1 00 00 call 130e88 <__errno> <== NOT EXECUTED
121d34: c7 00 1e 00 00 00 movl $0x1e,(%eax) <== NOT EXECUTED
rv = -1;
121d3a: 83 c8 ff or $0xffffffff,%eax
}
return rv;
}
121d3d: 8b 5d fc mov -0x4(%ebp),%ebx
121d40: c9 leave
121d41: c3 ret
00121d44 <fchown>:
#include <unistd.h>
#include <rtems/libio_.h>
int fchown( int fd, uid_t owner, gid_t group )
{
121d44: 55 push %ebp
121d45: 89 e5 mov %esp,%ebp
121d47: 57 push %edi
121d48: 56 push %esi
121d49: 53 push %ebx
121d4a: 83 ec 1c sub $0x1c,%esp
121d4d: 8b 5d 08 mov 0x8(%ebp),%ebx
121d50: 0f b7 75 0c movzwl 0xc(%ebp),%esi
121d54: 0f b7 7d 10 movzwl 0x10(%ebp),%edi
int rv = 0;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
121d58: 3b 1d 1c 69 16 00 cmp 0x16691c,%ebx
121d5e: 72 02 jb 121d62 <fchown+0x1e>
121d60: eb 0f jmp 121d71 <fchown+0x2d>
iop = rtems_libio_iop( fd );
121d62: 6b db 30 imul $0x30,%ebx,%ebx
121d65: 03 1d e8 e0 16 00 add 0x16e0e8,%ebx
rtems_libio_check_is_open(iop);
121d6b: f6 43 0d 01 testb $0x1,0xd(%ebx)
121d6f: 75 0d jne 121d7e <fchown+0x3a>
121d71: e8 12 f1 00 00 call 130e88 <__errno>
121d76: c7 00 09 00 00 00 movl $0x9,(%eax)
121d7c: eb 46 jmp 121dc4 <fchown+0x80>
if (iop->pathinfo.mt_entry->writeable) {
121d7e: 8b 43 24 mov 0x24(%ebx),%eax
121d81: 80 78 29 00 cmpb $0x0,0x29(%eax)
121d85: 74 32 je 121db9 <fchown+0x75> <== NEVER TAKEN
const rtems_filesystem_location_info_t *loc
)
{
const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry;
(*mt_entry->ops->lock_h)( mt_entry );
121d87: 83 ec 0c sub $0xc,%esp
121d8a: 8b 50 0c mov 0xc(%eax),%edx
121d8d: 50 push %eax
121d8e: ff 12 call *(%edx)
rtems_filesystem_instance_lock( &iop->pathinfo );
rv = (*iop->pathinfo.mt_entry->ops->chown_h)(
121d90: 83 c4 0c add $0xc,%esp
121d93: 8b 43 24 mov 0x24(%ebx),%eax
121d96: 8b 40 0c mov 0xc(%eax),%eax
121d99: 57 push %edi
121d9a: 56 push %esi
&iop->pathinfo,
121d9b: 8d 53 10 lea 0x10(%ebx),%edx
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
if (iop->pathinfo.mt_entry->writeable) {
rtems_filesystem_instance_lock( &iop->pathinfo );
rv = (*iop->pathinfo.mt_entry->ops->chown_h)(
121d9e: 52 push %edx
121d9f: ff 50 24 call *0x24(%eax)
errno = EROFS;
rv = -1;
}
return rv;
}
121da2: 8b 53 24 mov 0x24(%ebx),%edx
const rtems_filesystem_location_info_t *loc
)
{
const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry;
(*mt_entry->ops->unlock_h)( mt_entry );
121da5: 8b 4a 0c mov 0xc(%edx),%ecx
121da8: 89 14 24 mov %edx,(%esp)
121dab: 89 45 e4 mov %eax,-0x1c(%ebp)
121dae: ff 51 04 call *0x4(%ecx)
121db1: 83 c4 10 add $0x10,%esp
121db4: 8b 45 e4 mov -0x1c(%ebp),%eax
121db7: eb 0e jmp 121dc7 <fchown+0x83>
owner,
group
);
rtems_filesystem_instance_unlock( &iop->pathinfo );
} else {
errno = EROFS;
121db9: e8 ca f0 00 00 call 130e88 <__errno> <== NOT EXECUTED
121dbe: c7 00 1e 00 00 00 movl $0x1e,(%eax) <== NOT EXECUTED
rv = -1;
121dc4: 83 c8 ff or $0xffffffff,%eax
}
return rv;
}
121dc7: 8d 65 f4 lea -0xc(%ebp),%esp
121dca: 5b pop %ebx
121dcb: 5e pop %esi
121dcc: 5f pop %edi
121dcd: 5d pop %ebp
121dce: c3 ret
0012c490 <fcntl>:
int fcntl(
int fd,
int cmd,
...
)
{
12c490: 55 push %ebp
12c491: 89 e5 mov %esp,%ebp
12c493: 57 push %edi
12c494: 56 push %esi
12c495: 53 push %ebx
12c496: 83 ec 1c sub $0x1c,%esp
12c499: 8b 55 08 mov 0x8(%ebp),%edx
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
12c49c: 3b 15 08 f7 13 00 cmp 0x13f708,%edx
12c4a2: 72 02 jb 12c4a6 <fcntl+0x16>
12c4a4: eb 11 jmp 12c4b7 <fcntl+0x27>
iop = rtems_libio_iop( fd );
12c4a6: 6b fa 30 imul $0x30,%edx,%edi
12c4a9: 03 3d d8 38 15 00 add 0x1538d8,%edi
rtems_libio_check_is_open(iop);
12c4af: 8b 5f 0c mov 0xc(%edi),%ebx
12c4b2: f6 c7 01 test $0x1,%bh
12c4b5: 75 10 jne 12c4c7 <fcntl+0x37>
12c4b7: e8 10 2d ff ff call 11f1cc <__errno>
12c4bc: c7 00 09 00 00 00 movl $0x9,(%eax)
12c4c2: e9 29 01 00 00 jmp 12c5f0 <fcntl+0x160>
/*
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
12c4c7: 83 7d 0c 09 cmpl $0x9,0xc(%ebp)
12c4cb: 0f 87 f2 00 00 00 ja 12c5c3 <fcntl+0x133>
12c4d1: 8b 45 0c mov 0xc(%ebp),%eax
12c4d4: ff 24 85 64 36 13 00 jmp *0x133664(,%eax,4)
/*
* FIXME: We ignore the start value fd2 for the file descriptor search. This
* is not POSIX conform.
*/
rtems_libio_t *diop = rtems_libio_allocate();
12c4db: e8 d8 dc fd ff call 10a1b8 <rtems_libio_allocate>
12c4e0: 89 c6 mov %eax,%esi
if (diop != NULL) {
12c4e2: 85 c0 test %eax,%eax
12c4e4: 0f 84 06 01 00 00 je 12c5f0 <fcntl+0x160>
int oflag = rtems_libio_to_fcntl_flags( iop->flags );
12c4ea: 83 ec 0c sub $0xc,%esp
12c4ed: ff 77 0c pushl 0xc(%edi)
12c4f0: e8 83 dc fd ff call 10a178 <rtems_libio_to_fcntl_flags>
12c4f5: 89 c1 mov %eax,%ecx
oflag &= ~O_CREAT;
12c4f7: 80 e5 fd and $0xfd,%ch
diop->flags |= rtems_libio_fcntl_flags( oflag );
12c4fa: 8b 5e 0c mov 0xc(%esi),%ebx
12c4fd: 89 0c 24 mov %ecx,(%esp)
12c500: 89 4d e4 mov %ecx,-0x1c(%ebp)
12c503: e8 3c dc fd ff call 10a144 <rtems_libio_fcntl_flags>
12c508: 09 d8 or %ebx,%eax
12c50a: 89 46 0c mov %eax,0xc(%esi)
int cmd,
int arg
)
{
return fcntl( fd, cmd, arg );
}
12c50d: 8b 47 24 mov 0x24(%edi),%eax
const rtems_filesystem_location_info_t *loc
)
{
const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry;
(*mt_entry->ops->lock_h)( mt_entry );
12c510: 8b 58 0c mov 0xc(%eax),%ebx
12c513: 89 04 24 mov %eax,(%esp)
12c516: ff 13 call *(%ebx)
oflag &= ~O_CREAT;
diop->flags |= rtems_libio_fcntl_flags( oflag );
rtems_filesystem_instance_lock( &iop->pathinfo );
rtems_filesystem_location_clone( &diop->pathinfo, &iop->pathinfo );
12c518: 5a pop %edx
12c519: 59 pop %ecx
12c51a: 8d 47 10 lea 0x10(%edi),%eax
12c51d: 50 push %eax
12c51e: 8d 46 10 lea 0x10(%esi),%eax
12c521: 50 push %eax
12c522: e8 89 9e fe ff call 1163b0 <rtems_filesystem_location_clone>
int cmd,
int arg
)
{
return fcntl( fd, cmd, arg );
}
12c527: 8b 47 24 mov 0x24(%edi),%eax
const rtems_filesystem_location_info_t *loc
)
{
const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry;
(*mt_entry->ops->unlock_h)( mt_entry );
12c52a: 8b 58 0c mov 0xc(%eax),%ebx
12c52d: 89 04 24 mov %eax,(%esp)
12c530: ff 53 04 call *0x4(%ebx)
/*
* XXX: We call the open handler here to have a proper open and close pair.
*
* FIXME: What to do with the path?
*/
rv = (*diop->pathinfo.handlers->open_h)( diop, NULL, oflag, 0 );
12c533: 8b 46 20 mov 0x20(%esi),%eax
12c536: 6a 00 push $0x0
12c538: 8b 4d e4 mov -0x1c(%ebp),%ecx
12c53b: 51 push %ecx
12c53c: 6a 00 push $0x0
12c53e: 56 push %esi
12c53f: ff 10 call *(%eax)
12c541: 89 c3 mov %eax,%ebx
if ( rv == 0 ) {
12c543: 83 c4 20 add $0x20,%esp
12c546: 85 c0 test %eax,%eax
12c548: 75 11 jne 12c55b <fcntl+0xcb> <== NEVER TAKEN
rv = diop - rtems_libio_iops;
12c54a: 2b 35 d8 38 15 00 sub 0x1538d8,%esi
12c550: c1 fe 04 sar $0x4,%esi
12c553: 69 de ab aa aa aa imul $0xaaaaaaab,%esi,%ebx
12c559: eb 75 jmp 12c5d0 <fcntl+0x140>
} else {
rtems_libio_free( diop );
12c55b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12c55e: 56 push %esi <== NOT EXECUTED
12c55f: e8 a7 dc fd ff call 10a20b <rtems_libio_free> <== NOT EXECUTED
12c564: eb 26 jmp 12c58c <fcntl+0xfc> <== NOT EXECUTED
fd2 = va_arg( ap, int );
ret = duplicate_iop( iop, fd2 );
break;
case F_GETFD: /* get f_flags */
ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0);
12c566: c1 eb 0b shr $0xb,%ebx
12c569: 83 e3 01 and $0x1,%ebx
12c56c: eb 66 jmp 12c5d4 <fcntl+0x144>
* 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 ) )
12c56e: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
12c572: 74 05 je 12c579 <fcntl+0xe9>
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
12c574: 80 cf 08 or $0x8,%bh
12c577: eb 03 jmp 12c57c <fcntl+0xec>
else
iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
12c579: 80 e7 f7 and $0xf7,%bh
12c57c: 89 5f 0c mov %ebx,0xc(%edi)
12c57f: eb 31 jmp 12c5b2 <fcntl+0x122>
break;
case F_GETFL: /* more flags (cloexec) */
ret = rtems_libio_to_fcntl_flags( iop->flags );
12c581: 83 ec 0c sub $0xc,%esp
12c584: 53 push %ebx
12c585: e8 ee db fd ff call 10a178 <rtems_libio_to_fcntl_flags>
12c58a: 89 c3 mov %eax,%ebx
12c58c: 83 c4 10 add $0x10,%esp
12c58f: eb 3f jmp 12c5d0 <fcntl+0x140>
break;
case F_SETFL:
flags = rtems_libio_fcntl_flags( va_arg( ap, int ) );
12c591: 83 ec 0c sub $0xc,%esp
12c594: ff 75 10 pushl 0x10(%ebp)
12c597: e8 a8 db fd ff call 10a144 <rtems_libio_fcntl_flags>
/*
* XXX If we are turning on append, should we seek to the end?
*/
iop->flags = (iop->flags & ~mask) | (flags & mask);
12c59c: 25 01 02 00 00 and $0x201,%eax
12c5a1: 8b 4f 0c mov 0xc(%edi),%ecx
12c5a4: 81 e1 fe fd ff ff and $0xfffffdfe,%ecx
12c5aa: 09 c8 or %ecx,%eax
12c5ac: 89 47 0c mov %eax,0xc(%edi)
12c5af: 83 c4 10 add $0x10,%esp
{
rtems_libio_t *iop;
int fd2;
int flags;
int mask;
int ret = 0;
12c5b2: 31 db xor %ebx,%ebx
12c5b4: eb 1e jmp 12c5d4 <fcntl+0x144>
errno = ENOTSUP;
ret = -1;
break;
case F_GETOWN: /* for sockets. */
errno = ENOTSUP;
12c5b6: e8 11 2c ff ff call 11f1cc <__errno>
12c5bb: c7 00 86 00 00 00 movl $0x86,(%eax)
12c5c1: eb 2d jmp 12c5f0 <fcntl+0x160>
ret = -1;
break;
default:
errno = EINVAL;
12c5c3: e8 04 2c ff ff call 11f1cc <__errno>
12c5c8: c7 00 16 00 00 00 movl $0x16,(%eax)
12c5ce: eb 20 jmp 12c5f0 <fcntl+0x160>
/*
* If we got this far successfully, then we give the optional
* filesystem specific handler a chance to process this.
*/
if (ret >= 0) {
12c5d0: 85 db test %ebx,%ebx
12c5d2: 78 1f js 12c5f3 <fcntl+0x163> <== NEVER TAKEN
int err = (*iop->pathinfo.handlers->fcntl_h)( iop, cmd );
12c5d4: 50 push %eax
12c5d5: 50 push %eax
12c5d6: 8b 47 20 mov 0x20(%edi),%eax
12c5d9: ff 75 0c pushl 0xc(%ebp)
12c5dc: 57 push %edi
12c5dd: ff 50 28 call *0x28(%eax)
12c5e0: 89 c6 mov %eax,%esi
if (err) {
12c5e2: 83 c4 10 add $0x10,%esp
12c5e5: 85 c0 test %eax,%eax
12c5e7: 74 0a je 12c5f3 <fcntl+0x163> <== ALWAYS TAKEN
errno = err;
12c5e9: e8 de 2b ff ff call 11f1cc <__errno> <== NOT EXECUTED
12c5ee: 89 30 mov %esi,(%eax) <== NOT EXECUTED
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
12c5f0: 83 cb ff or $0xffffffff,%ebx
va_list ap;
va_start( ap, cmd );
ret = vfcntl(fd,cmd,ap);
va_end(ap);
return ret;
}
12c5f3: 89 d8 mov %ebx,%eax
12c5f5: 8d 65 f4 lea -0xc(%ebp),%esp
12c5f8: 5b pop %ebx
12c5f9: 5e pop %esi
12c5fa: 5f pop %edi
12c5fb: 5d pop %ebp
12c5fc: c3 ret
0010f178 <fifo_open>:
*/
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
10f178: 55 push %ebp
10f179: 89 e5 mov %esp,%ebp
10f17b: 57 push %edi
10f17c: 56 push %esi
10f17d: 53 push %ebx
10f17e: 83 ec 2c sub $0x2c,%esp
10f181: 8b 75 08 mov 0x8(%ebp),%esi
static int pipe_lock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (pipe_semaphore == RTEMS_ID_NONE) {
10f184: 83 3d d4 00 13 00 00 cmpl $0x0,0x1300d4
10f18b: 74 1f je 10f1ac <fifo_open+0x34>
rtems_libio_unlock();
}
if (sc == RTEMS_SUCCESSFUL) {
sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
10f18d: 50 push %eax
10f18e: 6a 00 push $0x0
10f190: 6a 00 push $0x0
10f192: ff 35 d4 00 13 00 pushl 0x1300d4
10f198: e8 cf bf ff ff call 10b16c <rtems_semaphore_obtain>
10f19d: 89 c2 mov %eax,%edx
}
if (sc == RTEMS_SUCCESSFUL) {
10f19f: 83 c4 10 add $0x10,%esp
10f1a2: 85 c0 test %eax,%eax
10f1a4: 0f 84 87 03 00 00 je 10f531 <fifo_open+0x3b9> <== ALWAYS TAKEN
10f1aa: eb 50 jmp 10f1fc <fifo_open+0x84> <== NOT EXECUTED
*/
#include <rtems/userenv.h>
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
10f1ac: 50 push %eax
10f1ad: 6a 00 push $0x0
10f1af: 6a 00 push $0x0
10f1b1: ff 35 e0 02 13 00 pushl 0x1302e0
10f1b7: e8 b0 bf ff ff call 10b16c <rtems_semaphore_obtain>
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (pipe_semaphore == RTEMS_ID_NONE) {
rtems_libio_lock();
if (pipe_semaphore == RTEMS_ID_NONE) {
10f1bc: 83 c4 10 add $0x10,%esp
free(pipe);
}
static int pipe_lock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
10f1bf: 31 db xor %ebx,%ebx
if (pipe_semaphore == RTEMS_ID_NONE) {
rtems_libio_lock();
if (pipe_semaphore == RTEMS_ID_NONE) {
10f1c1: 83 3d d4 00 13 00 00 cmpl $0x0,0x1300d4
10f1c8: 75 1d jne 10f1e7 <fifo_open+0x6f> <== NEVER TAKEN
sc = rtems_semaphore_create(
10f1ca: 83 ec 0c sub $0xc,%esp
10f1cd: 68 d4 00 13 00 push $0x1300d4
10f1d2: 6a 00 push $0x0
10f1d4: 6a 54 push $0x54
10f1d6: 6a 01 push $0x1
10f1d8: 68 45 50 49 50 push $0x50495045
10f1dd: e8 5a bd ff ff call 10af3c <rtems_semaphore_create>
10f1e2: 89 c3 mov %eax,%ebx
10f1e4: 83 c4 20 add $0x20,%esp
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
10f1e7: 83 ec 0c sub $0xc,%esp
10f1ea: ff 35 e0 02 13 00 pushl 0x1302e0
10f1f0: e8 67 c0 ff ff call 10b25c <rtems_semaphore_release>
}
rtems_libio_unlock();
}
if (sc == RTEMS_SUCCESSFUL) {
10f1f5: 83 c4 10 add $0x10,%esp
10f1f8: 85 db test %ebx,%ebx
10f1fa: 74 91 je 10f18d <fifo_open+0x15>
}
if (sc == RTEMS_SUCCESSFUL) {
return 0;
} else {
return -ENOMEM;
10f1fc: bf f4 ff ff ff mov $0xfffffff4,%edi
10f201: e9 4f 03 00 00 jmp 10f555 <fifo_open+0x3dd>
{
static char c = 'a';
pipe_control_t *pipe;
int err = -ENOMEM;
pipe = malloc(sizeof(pipe_control_t));
10f206: 83 ec 0c sub $0xc,%esp
10f209: 6a 34 push $0x34
10f20b: 89 55 d0 mov %edx,-0x30(%ebp)
10f20e: e8 0d 88 ff ff call 107a20 <malloc>
10f213: 89 c3 mov %eax,%ebx
if (pipe == NULL)
10f215: 83 c4 10 add $0x10,%esp
10f218: 85 c0 test %eax,%eax
10f21a: 8b 55 d0 mov -0x30(%ebp),%edx
10f21d: 0f 84 1d 03 00 00 je 10f540 <fifo_open+0x3c8> <== NEVER TAKEN
return err;
memset(pipe, 0, sizeof(pipe_control_t));
10f223: b9 0d 00 00 00 mov $0xd,%ecx
10f228: 89 c7 mov %eax,%edi
10f22a: 89 d0 mov %edx,%eax
10f22c: f3 ab rep stos %eax,%es:(%edi)
pipe->Size = PIPE_BUF;
10f22e: c7 43 04 00 02 00 00 movl $0x200,0x4(%ebx)
pipe->Buffer = malloc(pipe->Size);
10f235: 83 ec 0c sub $0xc,%esp
10f238: 68 00 02 00 00 push $0x200
10f23d: e8 de 87 ff ff call 107a20 <malloc>
10f242: 89 03 mov %eax,(%ebx)
if (! pipe->Buffer)
10f244: 83 c4 10 add $0x10,%esp
10f247: 85 c0 test %eax,%eax
10f249: 0f 84 ed 00 00 00 je 10f33c <fifo_open+0x1c4> <== NEVER TAKEN
goto err_buf;
err = -ENOMEM;
if (rtems_barrier_create(
10f24f: 8d 43 2c lea 0x2c(%ebx),%eax
10f252: 50 push %eax
10f253: 6a 00 push $0x0
10f255: 6a 00 push $0x0
rtems_build_name ('P', 'I', 'r', c),
10f257: 0f be 05 b0 e1 12 00 movsbl 0x12e1b0,%eax
if (! pipe->Buffer)
goto err_buf;
err = -ENOMEM;
if (rtems_barrier_create(
10f25e: 0d 00 72 49 50 or $0x50497200,%eax
10f263: 50 push %eax
10f264: e8 8f 16 00 00 call 1108f8 <rtems_barrier_create>
10f269: 83 c4 10 add $0x10,%esp
10f26c: 85 c0 test %eax,%eax
10f26e: 0f 85 bb 00 00 00 jne 10f32f <fifo_open+0x1b7>
rtems_build_name ('P', 'I', 'r', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->readBarrier) != RTEMS_SUCCESSFUL)
goto err_rbar;
if (rtems_barrier_create(
10f274: 8d 43 30 lea 0x30(%ebx),%eax
10f277: 50 push %eax
10f278: 6a 00 push $0x0
10f27a: 6a 00 push $0x0
rtems_build_name ('P', 'I', 'w', c),
10f27c: 0f be 05 b0 e1 12 00 movsbl 0x12e1b0,%eax
if (rtems_barrier_create(
rtems_build_name ('P', 'I', 'r', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->readBarrier) != RTEMS_SUCCESSFUL)
goto err_rbar;
if (rtems_barrier_create(
10f283: 0d 00 77 49 50 or $0x50497700,%eax
10f288: 50 push %eax
10f289: e8 6a 16 00 00 call 1108f8 <rtems_barrier_create>
10f28e: 83 c4 10 add $0x10,%esp
10f291: 85 c0 test %eax,%eax
10f293: 0f 85 88 00 00 00 jne 10f321 <fifo_open+0x1a9>
rtems_build_name ('P', 'I', 'w', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->writeBarrier) != RTEMS_SUCCESSFUL)
goto err_wbar;
if (rtems_semaphore_create(
10f299: 83 ec 0c sub $0xc,%esp
10f29c: 8d 43 28 lea 0x28(%ebx),%eax
10f29f: 50 push %eax
10f2a0: 6a 00 push $0x0
10f2a2: 6a 10 push $0x10
10f2a4: 6a 01 push $0x1
rtems_build_name ('P', 'I', 's', c), 1,
10f2a6: 0f be 05 b0 e1 12 00 movsbl 0x12e1b0,%eax
if (rtems_barrier_create(
rtems_build_name ('P', 'I', 'w', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->writeBarrier) != RTEMS_SUCCESSFUL)
goto err_wbar;
if (rtems_semaphore_create(
10f2ad: 0d 00 73 49 50 or $0x50497300,%eax
10f2b2: 50 push %eax
10f2b3: e8 84 bc ff ff call 10af3c <rtems_semaphore_create>
10f2b8: 83 c4 20 add $0x20,%esp
10f2bb: 85 c0 test %eax,%eax
10f2bd: 75 54 jne 10f313 <fifo_open+0x19b>
RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Barrier_Control *)
10f2bf: 50 push %eax
/* Set barriers to be interruptible by signals. */
static void pipe_interruptible(pipe_control_t *pipe)
{
Objects_Locations location;
_Barrier_Get(pipe->readBarrier, &location)->Barrier.Wait_queue.state
10f2c0: 8d 7d e4 lea -0x1c(%ebp),%edi
10f2c3: 57 push %edi
10f2c4: ff 73 2c pushl 0x2c(%ebx)
10f2c7: 68 d0 0c 13 00 push $0x130cd0
10f2cc: e8 eb d3 ff ff call 10c6bc <_Objects_Get>
|= STATES_INTERRUPTIBLE_BY_SIGNAL;
10f2d1: 81 48 4c 00 00 00 10 orl $0x10000000,0x4c(%eax)
_Thread_Enable_dispatch();
10f2d8: e8 13 df ff ff call 10d1f0 <_Thread_Enable_dispatch>
10f2dd: 83 c4 0c add $0xc,%esp
10f2e0: 57 push %edi
10f2e1: ff 73 30 pushl 0x30(%ebx)
10f2e4: 68 d0 0c 13 00 push $0x130cd0
10f2e9: e8 ce d3 ff ff call 10c6bc <_Objects_Get>
_Barrier_Get(pipe->writeBarrier, &location)->Barrier.Wait_queue.state
|= STATES_INTERRUPTIBLE_BY_SIGNAL;
10f2ee: 81 48 4c 00 00 00 10 orl $0x10000000,0x4c(%eax)
_Thread_Enable_dispatch();
10f2f5: e8 f6 de ff ff call 10d1f0 <_Thread_Enable_dispatch>
#ifdef RTEMS_POSIX_API
pipe_interruptible(pipe);
#endif
*pipep = pipe;
if (c ++ == 'z')
10f2fa: a0 b0 e1 12 00 mov 0x12e1b0,%al
10f2ff: 83 c4 10 add $0x10,%esp
10f302: 3c 7a cmp $0x7a,%al
10f304: 0f 85 40 02 00 00 jne 10f54a <fifo_open+0x3d2>
c = 'a';
10f30a: c6 05 b0 e1 12 00 61 movb $0x61,0x12e1b0
10f311: eb 3a jmp 10f34d <fifo_open+0x1d5>
return 0;
err_sem:
rtems_barrier_delete(pipe->writeBarrier);
10f313: 83 ec 0c sub $0xc,%esp
10f316: ff 73 30 pushl 0x30(%ebx)
10f319: e8 9a 16 00 00 call 1109b8 <rtems_barrier_delete>
10f31e: 83 c4 10 add $0x10,%esp
err_wbar:
rtems_barrier_delete(pipe->readBarrier);
10f321: 83 ec 0c sub $0xc,%esp
10f324: ff 73 2c pushl 0x2c(%ebx)
10f327: e8 8c 16 00 00 call 1109b8 <rtems_barrier_delete>
10f32c: 83 c4 10 add $0x10,%esp
err_rbar:
free(pipe->Buffer);
10f32f: 83 ec 0c sub $0xc,%esp
10f332: ff 33 pushl (%ebx)
10f334: e8 2b 83 ff ff call 107664 <free>
10f339: 83 c4 10 add $0x10,%esp
err_buf:
free(pipe);
10f33c: 83 ec 0c sub $0xc,%esp
10f33f: 53 push %ebx
10f340: e8 1f 83 ff ff call 107664 <free>
10f345: 83 c4 10 add $0x10,%esp
10f348: e9 f3 01 00 00 jmp 10f540 <fifo_open+0x3c8>
err = pipe_alloc(&pipe);
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
10f34d: 57 push %edi
10f34e: 6a 00 push $0x0
10f350: 6a 00 push $0x0
10f352: ff 73 28 pushl 0x28(%ebx)
10f355: e8 12 be ff ff call 10b16c <rtems_semaphore_obtain>
10f35a: 83 c4 10 add $0x10,%esp
10f35d: 83 f8 01 cmp $0x1,%eax
10f360: 19 ff sbb %edi,%edi
10f362: f7 d7 not %edi
10f364: 83 e7 fc and $0xfffffffc,%edi
err = -EINTR;
if (*pipep == NULL) {
10f367: 83 3e 00 cmpl $0x0,(%esi)
10f36a: 75 0f jne 10f37b <fifo_open+0x203>
if (err)
10f36c: 85 ff test %edi,%edi
10f36e: 74 09 je 10f379 <fifo_open+0x201> <== ALWAYS TAKEN
pipe_free(pipe);
10f370: 89 d8 mov %ebx,%eax <== NOT EXECUTED
10f372: e8 31 fd ff ff call 10f0a8 <pipe_free> <== NOT EXECUTED
10f377: eb 02 jmp 10f37b <fifo_open+0x203> <== NOT EXECUTED
else
*pipep = pipe;
10f379: 89 1e mov %ebx,(%esi)
#ifdef RTEMS_DEBUG
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc =
#endif
rtems_semaphore_release(pipe_semaphore);
10f37b: 83 ec 0c sub $0xc,%esp
10f37e: ff 35 d4 00 13 00 pushl 0x1300d4
10f384: e8 d3 be ff ff call 10b25c <rtems_semaphore_release>
pipe_control_t *pipe;
unsigned int prevCounter;
int err;
err = pipe_new(pipep);
if (err)
10f389: 83 c4 10 add $0x10,%esp
10f38c: 85 ff test %edi,%edi
10f38e: 0f 85 c1 01 00 00 jne 10f555 <fifo_open+0x3dd> <== NEVER TAKEN
return err;
pipe = *pipep;
10f394: 8b 1e mov (%esi),%ebx
switch (LIBIO_ACCMODE(iop)) {
10f396: 8b 55 0c mov 0xc(%ebp),%edx
10f399: 8b 42 0c mov 0xc(%edx),%eax
10f39c: 83 e0 06 and $0x6,%eax
10f39f: 83 f8 04 cmp $0x4,%eax
10f3a2: 0f 84 97 00 00 00 je 10f43f <fifo_open+0x2c7>
10f3a8: 83 f8 06 cmp $0x6,%eax
10f3ab: 0f 84 1c 01 00 00 je 10f4cd <fifo_open+0x355> <== NEVER TAKEN
10f3b1: 83 f8 02 cmp $0x2,%eax
10f3b4: 0f 85 55 01 00 00 jne 10f50f <fifo_open+0x397> <== NEVER TAKEN
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
10f3ba: ff 43 20 incl 0x20(%ebx)
if (pipe->Readers ++ == 0)
10f3bd: 8b 43 10 mov 0x10(%ebx),%eax
10f3c0: 8d 48 01 lea 0x1(%eax),%ecx
10f3c3: 89 4b 10 mov %ecx,0x10(%ebx)
10f3c6: 85 c0 test %eax,%eax
10f3c8: 75 11 jne 10f3db <fifo_open+0x263> <== NEVER TAKEN
PIPE_WAKEUPWRITERS(pipe);
10f3ca: 51 push %ecx
10f3cb: 51 push %ecx
10f3cc: 8d 45 e0 lea -0x20(%ebp),%eax
10f3cf: 50 push %eax
10f3d0: ff 73 30 pushl 0x30(%ebx)
10f3d3: e8 6c 16 00 00 call 110a44 <rtems_barrier_release>
10f3d8: 83 c4 10 add $0x10,%esp
if (pipe->Writers == 0) {
10f3db: 83 7b 14 00 cmpl $0x0,0x14(%ebx)
10f3df: 0f 85 2a 01 00 00 jne 10f50f <fifo_open+0x397>
/* Not an error */
if (LIBIO_NODELAY(iop))
10f3e5: 8b 55 0c mov 0xc(%ebp),%edx
10f3e8: f6 42 0c 01 testb $0x1,0xc(%edx)
10f3ec: 0f 85 1d 01 00 00 jne 10f50f <fifo_open+0x397>
break;
prevCounter = pipe->writerCounter;
10f3f2: 8b 53 24 mov 0x24(%ebx),%edx
10f3f5: 89 55 d4 mov %edx,-0x2c(%ebp)
err = -EINTR;
/* Wait until a writer opens the pipe */
do {
PIPE_UNLOCK(pipe);
10f3f8: 83 ec 0c sub $0xc,%esp
10f3fb: ff 73 28 pushl 0x28(%ebx)
10f3fe: e8 59 be ff ff call 10b25c <rtems_semaphore_release>
if (! PIPE_READWAIT(pipe))
10f403: 58 pop %eax
10f404: 5a pop %edx
10f405: 6a 00 push $0x0
10f407: ff 73 2c pushl 0x2c(%ebx)
10f40a: e8 8d 16 00 00 call 110a9c <rtems_barrier_wait>
10f40f: 83 c4 10 add $0x10,%esp
10f412: 85 c0 test %eax,%eax
10f414: 0f 85 02 01 00 00 jne 10f51c <fifo_open+0x3a4> <== NEVER TAKEN
goto out_error;
if (! PIPE_LOCK(pipe))
10f41a: 50 push %eax
10f41b: 6a 00 push $0x0
10f41d: 6a 00 push $0x0
10f41f: ff 73 28 pushl 0x28(%ebx)
10f422: e8 45 bd ff ff call 10b16c <rtems_semaphore_obtain>
10f427: 83 c4 10 add $0x10,%esp
10f42a: 85 c0 test %eax,%eax
10f42c: 0f 85 ea 00 00 00 jne 10f51c <fifo_open+0x3a4> <== NEVER TAKEN
goto out_error;
} while (prevCounter == pipe->writerCounter);
10f432: 8b 55 d4 mov -0x2c(%ebp),%edx
10f435: 3b 53 24 cmp 0x24(%ebx),%edx
10f438: 74 be je 10f3f8 <fifo_open+0x280> <== NEVER TAKEN
10f43a: e9 d0 00 00 00 jmp 10f50f <fifo_open+0x397>
}
break;
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
10f43f: ff 43 24 incl 0x24(%ebx)
if (pipe->Writers ++ == 0)
10f442: 8b 43 14 mov 0x14(%ebx),%eax
10f445: 8d 48 01 lea 0x1(%eax),%ecx
10f448: 89 4b 14 mov %ecx,0x14(%ebx)
10f44b: 85 c0 test %eax,%eax
10f44d: 75 11 jne 10f460 <fifo_open+0x2e8> <== NEVER TAKEN
PIPE_WAKEUPREADERS(pipe);
10f44f: 51 push %ecx
10f450: 51 push %ecx
10f451: 8d 45 e0 lea -0x20(%ebp),%eax
10f454: 50 push %eax
10f455: ff 73 2c pushl 0x2c(%ebx)
10f458: e8 e7 15 00 00 call 110a44 <rtems_barrier_release>
10f45d: 83 c4 10 add $0x10,%esp
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
10f460: 83 7b 10 00 cmpl $0x0,0x10(%ebx)
10f464: 0f 85 a5 00 00 00 jne 10f50f <fifo_open+0x397>
10f46a: 8b 55 0c mov 0xc(%ebp),%edx
10f46d: f6 42 0c 01 testb $0x1,0xc(%edx)
10f471: 74 18 je 10f48b <fifo_open+0x313>
PIPE_UNLOCK(pipe);
10f473: 83 ec 0c sub $0xc,%esp
10f476: ff 73 28 pushl 0x28(%ebx)
10f479: e8 de bd ff ff call 10b25c <rtems_semaphore_release>
err = -ENXIO;
goto out_error;
10f47e: 83 c4 10 add $0x10,%esp
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
PIPE_UNLOCK(pipe);
err = -ENXIO;
10f481: bf fa ff ff ff mov $0xfffffffa,%edi
goto out_error;
10f486: e9 96 00 00 00 jmp 10f521 <fifo_open+0x3a9>
}
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
10f48b: 8b 53 20 mov 0x20(%ebx),%edx
10f48e: 89 55 d4 mov %edx,-0x2c(%ebp)
err = -EINTR;
do {
PIPE_UNLOCK(pipe);
10f491: 83 ec 0c sub $0xc,%esp
10f494: ff 73 28 pushl 0x28(%ebx)
10f497: e8 c0 bd ff ff call 10b25c <rtems_semaphore_release>
if (! PIPE_WRITEWAIT(pipe))
10f49c: 58 pop %eax
10f49d: 5a pop %edx
10f49e: 6a 00 push $0x0
10f4a0: ff 73 30 pushl 0x30(%ebx)
10f4a3: e8 f4 15 00 00 call 110a9c <rtems_barrier_wait>
10f4a8: 83 c4 10 add $0x10,%esp
10f4ab: 85 c0 test %eax,%eax
10f4ad: 75 6d jne 10f51c <fifo_open+0x3a4> <== NEVER TAKEN
goto out_error;
if (! PIPE_LOCK(pipe))
10f4af: 50 push %eax
10f4b0: 6a 00 push $0x0
10f4b2: 6a 00 push $0x0
10f4b4: ff 73 28 pushl 0x28(%ebx)
10f4b7: e8 b0 bc ff ff call 10b16c <rtems_semaphore_obtain>
10f4bc: 83 c4 10 add $0x10,%esp
10f4bf: 85 c0 test %eax,%eax
10f4c1: 75 59 jne 10f51c <fifo_open+0x3a4> <== NEVER TAKEN
goto out_error;
} while (prevCounter == pipe->readerCounter);
10f4c3: 8b 55 d4 mov -0x2c(%ebp),%edx
10f4c6: 3b 53 20 cmp 0x20(%ebx),%edx
10f4c9: 74 c6 je 10f491 <fifo_open+0x319> <== NEVER TAKEN
10f4cb: eb 42 jmp 10f50f <fifo_open+0x397>
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
10f4cd: ff 43 20 incl 0x20(%ebx)
if (pipe->Readers ++ == 0)
10f4d0: 8b 43 10 mov 0x10(%ebx),%eax
10f4d3: 8d 48 01 lea 0x1(%eax),%ecx
10f4d6: 89 4b 10 mov %ecx,0x10(%ebx)
10f4d9: 85 c0 test %eax,%eax
10f4db: 75 11 jne 10f4ee <fifo_open+0x376> <== NEVER TAKEN
PIPE_WAKEUPWRITERS(pipe);
10f4dd: 50 push %eax
10f4de: 50 push %eax
10f4df: 8d 45 e0 lea -0x20(%ebp),%eax
10f4e2: 50 push %eax
10f4e3: ff 73 30 pushl 0x30(%ebx)
10f4e6: e8 59 15 00 00 call 110a44 <rtems_barrier_release>
10f4eb: 83 c4 10 add $0x10,%esp
pipe->writerCounter ++;
10f4ee: ff 43 24 incl 0x24(%ebx)
if (pipe->Writers ++ == 0)
10f4f1: 8b 43 14 mov 0x14(%ebx),%eax
10f4f4: 8d 48 01 lea 0x1(%eax),%ecx
10f4f7: 89 4b 14 mov %ecx,0x14(%ebx)
10f4fa: 85 c0 test %eax,%eax
10f4fc: 75 11 jne 10f50f <fifo_open+0x397> <== NEVER TAKEN
PIPE_WAKEUPREADERS(pipe);
10f4fe: 50 push %eax
10f4ff: 50 push %eax
10f500: 8d 45 e0 lea -0x20(%ebp),%eax
10f503: 50 push %eax
10f504: ff 73 2c pushl 0x2c(%ebx)
10f507: e8 38 15 00 00 call 110a44 <rtems_barrier_release>
10f50c: 83 c4 10 add $0x10,%esp
break;
}
PIPE_UNLOCK(pipe);
10f50f: 83 ec 0c sub $0xc,%esp
10f512: ff 73 28 pushl 0x28(%ebx)
10f515: e8 42 bd ff ff call 10b25c <rtems_semaphore_release>
10f51a: eb 10 jmp 10f52c <fifo_open+0x3b4>
/* Not an error */
if (LIBIO_NODELAY(iop))
break;
prevCounter = pipe->writerCounter;
err = -EINTR;
10f51c: bf fc ff ff ff mov $0xfffffffc,%edi <== NOT EXECUTED
PIPE_UNLOCK(pipe);
return 0;
out_error:
pipe_release(pipep, iop);
10f521: 50 push %eax
10f522: 50 push %eax
10f523: ff 75 0c pushl 0xc(%ebp)
10f526: 56 push %esi
10f527: e8 b7 fb ff ff call 10f0e3 <pipe_release>
return err;
10f52c: 83 c4 10 add $0x10,%esp
10f52f: eb 24 jmp 10f555 <fifo_open+0x3dd>
err = pipe_lock();
if (err)
return err;
pipe = *pipep;
10f531: 8b 1e mov (%esi),%ebx
if (pipe == NULL) {
10f533: 85 db test %ebx,%ebx
10f535: 0f 85 12 fe ff ff jne 10f34d <fifo_open+0x1d5>
10f53b: e9 c6 fc ff ff jmp 10f206 <fifo_open+0x8e>
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
err = -EINTR;
10f540: bf f4 ff ff ff mov $0xfffffff4,%edi
10f545: e9 31 fe ff ff jmp 10f37b <fifo_open+0x203>
#ifdef RTEMS_POSIX_API
pipe_interruptible(pipe);
#endif
*pipep = pipe;
if (c ++ == 'z')
10f54a: 40 inc %eax
10f54b: a2 b0 e1 12 00 mov %al,0x12e1b0
10f550: e9 f8 fd ff ff jmp 10f34d <fifo_open+0x1d5>
return 0;
out_error:
pipe_release(pipep, iop);
return err;
}
10f555: 89 f8 mov %edi,%eax
10f557: 8d 65 f4 lea -0xc(%ebp),%esp
10f55a: 5b pop %ebx
10f55b: 5e pop %esi
10f55c: 5f pop %edi
10f55d: 5d pop %ebp
10f55e: c3 ret
0010948c <fpathconf>:
long fpathconf(
int fd,
int name
)
{
10948c: 55 push %ebp
10948d: 89 e5 mov %esp,%ebp
10948f: 83 ec 08 sub $0x8,%esp
109492: 8b 45 08 mov 0x8(%ebp),%eax
109495: 8b 55 0c mov 0xc(%ebp),%edx
long return_value;
rtems_libio_t *iop;
const rtems_filesystem_limits_and_options_t *the_limits;
rtems_libio_check_fd(fd);
109498: 3b 05 54 72 12 00 cmp 0x127254,%eax
10949e: 72 02 jb 1094a2 <fpathconf+0x16>
1094a0: eb 0f jmp 1094b1 <fpathconf+0x25>
iop = rtems_libio_iop(fd);
1094a2: 6b c0 30 imul $0x30,%eax,%eax
1094a5: 03 05 34 b2 12 00 add 0x12b234,%eax
rtems_libio_check_is_open(iop);
1094ab: f6 40 0d 01 testb $0x1,0xd(%eax)
1094af: 75 0d jne 1094be <fpathconf+0x32> <== ALWAYS TAKEN
1094b1: e8 5e 1e 00 00 call 10b314 <__errno>
1094b6: c7 00 09 00 00 00 movl $0x9,(%eax)
1094bc: eb 58 jmp 109516 <fpathconf+0x8a>
/*
* Now process the information request.
*/
the_limits = iop->pathinfo.mt_entry->pathconf_limits_and_options;
1094be: 8b 40 24 mov 0x24(%eax),%eax
1094c1: 8b 40 2c mov 0x2c(%eax),%eax
switch ( name ) {
1094c4: 83 fa 0b cmp $0xb,%edx
1094c7: 77 42 ja 10950b <fpathconf+0x7f>
1094c9: ff 24 95 58 d9 11 00 jmp *0x11d958(,%edx,4)
case _PC_LINK_MAX:
return_value = the_limits->link_max;
1094d0: 8b 00 mov (%eax),%eax
break;
1094d2: eb 45 jmp 109519 <fpathconf+0x8d>
case _PC_MAX_CANON:
return_value = the_limits->max_canon;
1094d4: 8b 40 04 mov 0x4(%eax),%eax
break;
1094d7: eb 40 jmp 109519 <fpathconf+0x8d>
case _PC_MAX_INPUT:
return_value = the_limits->max_input;
1094d9: 8b 40 08 mov 0x8(%eax),%eax
break;
1094dc: eb 3b jmp 109519 <fpathconf+0x8d>
case _PC_NAME_MAX:
return_value = the_limits->name_max;
1094de: 8b 40 0c mov 0xc(%eax),%eax
break;
1094e1: eb 36 jmp 109519 <fpathconf+0x8d>
case _PC_PATH_MAX:
return_value = the_limits->path_max;
1094e3: 8b 40 10 mov 0x10(%eax),%eax
break;
1094e6: eb 31 jmp 109519 <fpathconf+0x8d>
case _PC_PIPE_BUF:
return_value = the_limits->pipe_buf;
1094e8: 8b 40 14 mov 0x14(%eax),%eax
break;
1094eb: eb 2c jmp 109519 <fpathconf+0x8d>
case _PC_CHOWN_RESTRICTED:
return_value = the_limits->posix_chown_restrictions;
1094ed: 8b 40 1c mov 0x1c(%eax),%eax
break;
1094f0: eb 27 jmp 109519 <fpathconf+0x8d>
case _PC_NO_TRUNC:
return_value = the_limits->posix_no_trunc;
1094f2: 8b 40 20 mov 0x20(%eax),%eax
break;
1094f5: eb 22 jmp 109519 <fpathconf+0x8d>
case _PC_VDISABLE:
return_value = the_limits->posix_vdisable;
1094f7: 8b 40 2c mov 0x2c(%eax),%eax
break;
1094fa: eb 1d jmp 109519 <fpathconf+0x8d>
case _PC_ASYNC_IO:
return_value = the_limits->posix_async_io;
1094fc: 8b 40 18 mov 0x18(%eax),%eax
break;
1094ff: eb 18 jmp 109519 <fpathconf+0x8d>
case _PC_PRIO_IO:
return_value = the_limits->posix_prio_io;
109501: 8b 40 24 mov 0x24(%eax),%eax
break;
109504: eb 13 jmp 109519 <fpathconf+0x8d>
case _PC_SYNC_IO:
return_value = the_limits->posix_sync_io;
109506: 8b 40 28 mov 0x28(%eax),%eax
break;
109509: eb 0e jmp 109519 <fpathconf+0x8d>
default:
rtems_set_errno_and_return_minus_one( EINVAL );
10950b: e8 04 1e 00 00 call 10b314 <__errno>
109510: c7 00 16 00 00 00 movl $0x16,(%eax)
109516: 83 c8 ff or $0xffffffff,%eax
break;
}
return return_value;
}
109519: c9 leave
10951a: c3 ret
00106734 <free>:
#include <stdlib.h>
void free(
void *ptr
)
{
106734: 55 push %ebp
106735: 89 e5 mov %esp,%ebp
106737: 53 push %ebx
106738: 52 push %edx
106739: 8b 5d 08 mov 0x8(%ebp),%ebx
MSBUMP(free_calls, 1);
10673c: ff 05 f4 e2 12 00 incl 0x12e2f4
if ( !ptr )
106742: 85 db test %ebx,%ebx
106744: 74 5f je 1067a5 <free+0x71>
return;
/*
* Do not attempt to free memory if in a critical section or ISR.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
106746: 83 3d 20 e5 12 00 03 cmpl $0x3,0x12e520
10674d: 75 15 jne 106764 <free+0x30> <== NEVER TAKEN
!malloc_is_system_state_OK() ) {
10674f: e8 78 01 00 00 call 1068cc <malloc_is_system_state_OK>
return;
/*
* Do not attempt to free memory if in a critical section or ISR.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
106754: 84 c0 test %al,%al
106756: 75 0c jne 106764 <free+0x30>
!malloc_is_system_state_OK() ) {
malloc_deferred_free(ptr);
106758: 89 5d 08 mov %ebx,0x8(%ebp)
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
);
}
}
10675b: 8b 5d fc mov -0x4(%ebp),%ebx
10675e: c9 leave
/*
* 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);
10675f: e9 d1 01 00 00 jmp 106935 <malloc_deferred_free>
}
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
106764: a1 04 c8 12 00 mov 0x12c804,%eax
106769: 85 c0 test %eax,%eax
10676b: 74 0a je 106777 <free+0x43>
(*rtems_malloc_statistics_helpers->at_free)(ptr);
10676d: 83 ec 0c sub $0xc,%esp
106770: 53 push %ebx
106771: ff 50 08 call *0x8(%eax)
106774: 83 c4 10 add $0x10,%esp
if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) {
106777: 50 push %eax
106778: 50 push %eax
106779: 53 push %ebx
10677a: ff 35 2c a2 12 00 pushl 0x12a22c
106780: e8 87 4d 00 00 call 10b50c <_Protected_heap_Free>
106785: 83 c4 10 add $0x10,%esp
106788: 84 c0 test %al,%al
10678a: 75 19 jne 1067a5 <free+0x71>
printk( "Program heap: free of bad pointer %p -- range %p - %p \n",
ptr,
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
10678c: a1 2c a2 12 00 mov 0x12a22c,%eax
*/
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",
106791: ff 70 1c pushl 0x1c(%eax)
106794: ff 70 18 pushl 0x18(%eax)
106797: 53 push %ebx
106798: 68 28 f8 11 00 push $0x11f828
10679d: e8 9a 0c 00 00 call 10743c <printk>
1067a2: 83 c4 10 add $0x10,%esp
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
);
}
}
1067a5: 8b 5d fc mov -0x4(%ebp),%ebx
1067a8: c9 leave
1067a9: c3 ret
0011d718 <fstat>:
int fstat(
int fd,
struct stat *sbuf
)
{
11d718: 55 push %ebp
11d719: 89 e5 mov %esp,%ebp
11d71b: 57 push %edi
11d71c: 53 push %ebx
11d71d: 8b 55 08 mov 0x8(%ebp),%edx
11d720: 8b 5d 0c mov 0xc(%ebp),%ebx
rtems_libio_t *iop;
/*
* Check to see if we were passed a valid pointer.
*/
if ( !sbuf )
11d723: 85 db test %ebx,%ebx
11d725: 75 0d jne 11d734 <fstat+0x1c> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EFAULT );
11d727: e8 b0 37 ff ff call 110edc <__errno> <== NOT EXECUTED
11d72c: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED
11d732: eb 43 jmp 11d777 <fstat+0x5f> <== NOT EXECUTED
/*
* Now process the stat() request.
*/
iop = rtems_libio_iop( fd );
11d734: 3b 15 70 a2 12 00 cmp 0x12a270,%edx
11d73a: 73 0f jae 11d74b <fstat+0x33>
11d73c: 6b d2 30 imul $0x30,%edx,%edx
11d73f: 03 15 d0 e2 12 00 add 0x12e2d0,%edx
rtems_libio_check_fd( fd );
rtems_libio_check_is_open(iop);
11d745: f6 42 0d 01 testb $0x1,0xd(%edx)
11d749: 75 0d jne 11d758 <fstat+0x40>
11d74b: e8 8c 37 ff ff call 110edc <__errno>
11d750: c7 00 09 00 00 00 movl $0x9,(%eax)
11d756: eb 1f jmp 11d777 <fstat+0x5f>
/*
* Zero out the stat structure so the various support
* versions of stat don't have to.
*/
memset( sbuf, 0, sizeof(struct stat) );
11d758: b9 12 00 00 00 mov $0x12,%ecx
11d75d: 31 c0 xor %eax,%eax
11d75f: 89 df mov %ebx,%edi
11d761: f3 ab rep stos %eax,%es:(%edi)
return (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf );
11d763: 8b 42 20 mov 0x20(%edx),%eax
11d766: 89 5d 0c mov %ebx,0xc(%ebp)
11d769: 83 c2 10 add $0x10,%edx
11d76c: 89 55 08 mov %edx,0x8(%ebp)
11d76f: 8b 40 18 mov 0x18(%eax),%eax
}
11d772: 5b pop %ebx
11d773: 5f pop %edi
11d774: 5d pop %ebp
* Zero out the stat structure so the various support
* versions of stat don't have to.
*/
memset( sbuf, 0, sizeof(struct stat) );
return (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf );
11d775: ff e0 jmp *%eax
}
11d777: 83 c8 ff or $0xffffffff,%eax
11d77a: 5b pop %ebx
11d77b: 5f pop %edi
11d77c: 5d pop %ebp
11d77d: c3 ret
0010657c <get_disk_entry>:
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) {
10657c: 3b 05 9c 1f 13 00 cmp 0x131f9c,%eax
106582: 73 32 jae 1065b6 <get_disk_entry+0x3a> <== NEVER TAKEN
}
}
static rtems_disk_device *
get_disk_entry(dev_t dev, bool lookup_only)
{
106584: 55 push %ebp
106585: 89 e5 mov %esp,%ebp
106587: 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) {
106588: 8b 1d a0 1f 13 00 mov 0x131fa0,%ebx
10658e: 85 db test %ebx,%ebx
106590: 74 27 je 1065b9 <get_disk_entry+0x3d> <== NEVER TAKEN
rtems_disk_device_table *dtab = disktab + major;
106592: 8d 04 c3 lea (%ebx,%eax,8),%eax
if (minor < dtab->size && dtab->minor != NULL) {
106595: 3b 50 04 cmp 0x4(%eax),%edx
106598: 73 1f jae 1065b9 <get_disk_entry+0x3d> <== NEVER TAKEN
10659a: 8b 00 mov (%eax),%eax
10659c: 85 c0 test %eax,%eax
10659e: 74 19 je 1065b9 <get_disk_entry+0x3d> <== NEVER TAKEN
rtems_disk_device *dd = dtab->minor [minor];
1065a0: 8b 04 90 mov (%eax,%edx,4),%eax
if (dd != NULL && !lookup_only) {
1065a3: fe c9 dec %cl
1065a5: 74 14 je 1065bb <get_disk_entry+0x3f>
1065a7: 85 c0 test %eax,%eax
1065a9: 74 10 je 1065bb <get_disk_entry+0x3f> <== NEVER TAKEN
if (!dd->deleted) {
1065ab: 80 78 40 00 cmpb $0x0,0x40(%eax)
1065af: 75 08 jne 1065b9 <get_disk_entry+0x3d>
++dd->uses;
1065b1: ff 40 14 incl 0x14(%eax)
1065b4: eb 05 jmp 1065bb <get_disk_entry+0x3f>
return dd;
}
}
return NULL;
1065b6: 31 c0 xor %eax,%eax
}
1065b8: c3 ret <== NOT EXECUTED
return dd;
}
}
return NULL;
1065b9: 31 c0 xor %eax,%eax
}
1065bb: 5b pop %ebx
1065bc: 5d pop %ebp
1065bd: c3 ret
001076fc <get_sector.part.0>:
* NOTES:
* get_sector() operates with device via bdbuf library,
* and does not support devices with sector size other than 512 bytes
*/
static rtems_status_code
get_sector(int fd,
1076fc: 55 push %ebp
1076fd: 89 e5 mov %esp,%ebp
1076ff: 57 push %edi
107700: 56 push %esi
107701: 53 push %ebx
107702: 83 ec 28 sub $0x28,%esp
107705: 89 c7 mov %eax,%edi
107707: 89 d6 mov %edx,%esi
107709: 89 cb mov %ecx,%ebx
new_off = lseek(fd, off, SEEK_SET);
if (new_off != off) {
return RTEMS_IO_ERROR;
}
s = (rtems_sector_data_t *) malloc(sizeof(rtems_sector_data_t) + RTEMS_IDE_SECTOR_SIZE);
10770b: 68 04 02 00 00 push $0x204
107710: e8 2b 12 00 00 call 108940 <malloc>
107715: 89 c2 mov %eax,%edx
if (s == NULL)
107717: 83 c4 10 add $0x10,%esp
{
return RTEMS_NO_MEMORY;
10771a: b8 1a 00 00 00 mov $0x1a,%eax
if (new_off != off) {
return RTEMS_IO_ERROR;
}
s = (rtems_sector_data_t *) malloc(sizeof(rtems_sector_data_t) + RTEMS_IDE_SECTOR_SIZE);
if (s == NULL)
10771f: 85 d2 test %edx,%edx
107721: 74 3b je 10775e <get_sector.part.0+0x62><== NEVER TAKEN
{
return RTEMS_NO_MEMORY;
}
n = read(fd, s->data, RTEMS_IDE_SECTOR_SIZE);
107723: 50 push %eax
107724: 68 00 02 00 00 push $0x200
107729: 8d 42 04 lea 0x4(%edx),%eax
10772c: 50 push %eax
10772d: 57 push %edi
10772e: 89 55 e4 mov %edx,-0x1c(%ebp)
107731: e8 6a 1c 00 00 call 1093a0 <read>
if (n != RTEMS_IDE_SECTOR_SIZE)
107736: 83 c4 10 add $0x10,%esp
107739: 3d 00 02 00 00 cmp $0x200,%eax
10773e: 8b 55 e4 mov -0x1c(%ebp),%edx
107741: 74 13 je 107756 <get_sector.part.0+0x5a><== ALWAYS TAKEN
{
free(s);
107743: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107746: 52 push %edx <== NOT EXECUTED
107747: e8 dc 0c 00 00 call 108428 <free> <== NOT EXECUTED
10774c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
return RTEMS_IO_ERROR;
10774f: b8 1b 00 00 00 mov $0x1b,%eax <== NOT EXECUTED
107754: eb 08 jmp 10775e <get_sector.part.0+0x62><== NOT EXECUTED
}
s->sector_num = sector_num;
107756: 89 32 mov %esi,(%edx)
*sector = s;
107758: 89 13 mov %edx,(%ebx)
return RTEMS_SUCCESSFUL;
10775a: 31 c0 xor %eax,%eax
10775c: eb 00 jmp 10775e <get_sector.part.0+0x62>
}
10775e: 8d 65 f4 lea -0xc(%ebp),%esp
107761: 5b pop %ebx
107762: 5e pop %esi
107763: 5f pop %edi
107764: 5d pop %ebp
107765: c3 ret
0012c628 <getdents>:
int getdents(
int dd_fd,
char *dd_buf,
int dd_len
)
{
12c628: 55 push %ebp
12c629: 89 e5 mov %esp,%ebp
12c62b: 57 push %edi
12c62c: 56 push %esi
12c62d: 53 push %ebx
12c62e: 83 ec 0c sub $0xc,%esp
12c631: 8b 45 08 mov 0x8(%ebp),%eax
12c634: 8b 75 0c mov 0xc(%ebp),%esi
12c637: 8b 7d 10 mov 0x10(%ebp),%edi
rtems_filesystem_node_types_t type;
/*
* Get the file control block structure associated with the file descriptor
*/
iop = rtems_libio_iop( dd_fd );
12c63a: 31 db xor %ebx,%ebx
12c63c: 3b 05 08 f7 13 00 cmp 0x13f708,%eax
12c642: 73 09 jae 12c64d <getdents+0x25> <== NEVER TAKEN
12c644: 6b d8 30 imul $0x30,%eax,%ebx
12c647: 03 1d d8 38 15 00 add 0x1538d8,%ebx
/*
* Make sure we are working on a directory
*/
type = rtems_filesystem_node_type( &iop->pathinfo );
12c64d: 83 ec 0c sub $0xc,%esp
12c650: 8d 43 10 lea 0x10(%ebx),%eax
12c653: 50 push %eax
12c654: e8 d3 f3 fd ff call 10ba2c <rtems_filesystem_node_type>
if ( type != RTEMS_FILESYSTEM_DIRECTORY )
12c659: 83 c4 10 add $0x10,%esp
12c65c: 85 c0 test %eax,%eax
12c65e: 75 18 jne 12c678 <getdents+0x50>
/*
* Return the number of bytes that were actually transfered as a result
* of the read attempt.
*/
return (*iop->pathinfo.handlers->read_h)( iop, dd_buf, dd_len );
12c660: 8b 43 20 mov 0x20(%ebx),%eax
12c663: 89 7d 10 mov %edi,0x10(%ebp)
12c666: 89 75 0c mov %esi,0xc(%ebp)
12c669: 89 5d 08 mov %ebx,0x8(%ebp)
12c66c: 8b 40 08 mov 0x8(%eax),%eax
}
12c66f: 8d 65 f4 lea -0xc(%ebp),%esp
12c672: 5b pop %ebx
12c673: 5e pop %esi
12c674: 5f pop %edi
12c675: 5d pop %ebp
/*
* Return the number of bytes that were actually transfered as a result
* of the read attempt.
*/
return (*iop->pathinfo.handlers->read_h)( iop, dd_buf, dd_len );
12c676: ff e0 jmp *%eax
/*
* Make sure we are working on a directory
*/
type = rtems_filesystem_node_type( &iop->pathinfo );
if ( type != RTEMS_FILESYSTEM_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
12c678: e8 4f 2b ff ff call 11f1cc <__errno>
12c67d: c7 00 14 00 00 00 movl $0x14,(%eax)
/*
* Return the number of bytes that were actually transfered as a result
* of the read attempt.
*/
return (*iop->pathinfo.handlers->read_h)( iop, dd_buf, dd_len );
}
12c683: 83 c8 ff or $0xffffffff,%eax
12c686: 8d 65 f4 lea -0xc(%ebp),%esp
12c689: 5b pop %ebx
12c68a: 5e pop %esi
12c68b: 5f pop %edi
12c68c: 5d pop %ebp
12c68d: c3 ret
001221a0 <init_etc_passwd_group>:
void init_etc_passwd_group(void)
{
FILE *fp;
static char etc_passwd_initted = 0;
if (etc_passwd_initted)
1221a0: 80 3d 5c da 16 00 00 cmpb $0x0,0x16da5c
1221a7: 0f 85 c1 00 00 00 jne 12226e <init_etc_passwd_group+0xce>
/*
* Initialize useable but dummy databases
*/
void init_etc_passwd_group(void)
{
1221ad: 55 push %ebp
1221ae: 89 e5 mov %esp,%ebp
1221b0: 53 push %ebx
1221b1: 83 ec 0c sub $0xc,%esp
FILE *fp;
static char etc_passwd_initted = 0;
if (etc_passwd_initted)
return;
etc_passwd_initted = 1;
1221b4: c6 05 5c da 16 00 01 movb $0x1,0x16da5c
mkdir("/etc", 0777);
1221bb: 68 ff 01 00 00 push $0x1ff
1221c0: 68 41 03 15 00 push $0x150341
1221c5: e8 ea 46 fe ff call 1068b4 <mkdir>
/*
* Initialize /etc/passwd
*/
if ((fp = fopen("/etc/passwd", "r")) != NULL) {
1221ca: 58 pop %eax
1221cb: 5a pop %edx
1221cc: 68 7b c9 14 00 push $0x14c97b
1221d1: 68 46 03 15 00 push $0x150346
1221d6: e8 41 f6 00 00 call 13181c <fopen>
1221db: 83 c4 10 add $0x10,%esp
1221de: 85 c0 test %eax,%eax
1221e0: 74 06 je 1221e8 <init_etc_passwd_group+0x48>
fclose(fp);
1221e2: 83 ec 0c sub $0xc,%esp
1221e5: 50 push %eax
1221e6: eb 2a jmp 122212 <init_etc_passwd_group+0x72>
}
else if ((fp = fopen("/etc/passwd", "w")) != NULL) {
1221e8: 50 push %eax
1221e9: 50 push %eax
1221ea: 68 78 c9 14 00 push $0x14c978
1221ef: 68 46 03 15 00 push $0x150346
1221f4: e8 23 f6 00 00 call 13181c <fopen>
1221f9: 89 c3 mov %eax,%ebx
1221fb: 83 c4 10 add $0x10,%esp
1221fe: 85 c0 test %eax,%eax
122200: 74 18 je 12221a <init_etc_passwd_group+0x7a><== NEVER TAKEN
fprintf(fp, "root:*:0:0:root::/:/bin/sh\n"
122202: 50 push %eax
122203: 50 push %eax
122204: 53 push %ebx
122205: 68 52 03 15 00 push $0x150352
12220a: e8 7d f7 00 00 call 13198c <fputs>
"rtems:*:1:1:RTEMS Application::/:/bin/sh\n"
"tty:!:2:2:tty owner::/:/bin/false\n" );
fclose(fp);
12220f: 89 1c 24 mov %ebx,(%esp)
122212: e8 8d ed 00 00 call 130fa4 <fclose>
122217: 83 c4 10 add $0x10,%esp
}
/*
* Initialize /etc/group
*/
if ((fp = fopen("/etc/group", "r")) != NULL) {
12221a: 53 push %ebx
12221b: 53 push %ebx
12221c: 68 7b c9 14 00 push $0x14c97b
122221: 68 b9 03 15 00 push $0x1503b9
122226: e8 f1 f5 00 00 call 13181c <fopen>
12222b: 83 c4 10 add $0x10,%esp
12222e: 85 c0 test %eax,%eax
122230: 74 06 je 122238 <init_etc_passwd_group+0x98>
fclose(fp);
122232: 83 ec 0c sub $0xc,%esp
122235: 50 push %eax
122236: eb 2a jmp 122262 <init_etc_passwd_group+0xc2>
}
else if ((fp = fopen("/etc/group", "w")) != NULL) {
122238: 51 push %ecx
122239: 51 push %ecx
12223a: 68 78 c9 14 00 push $0x14c978
12223f: 68 b9 03 15 00 push $0x1503b9
122244: e8 d3 f5 00 00 call 13181c <fopen>
122249: 89 c3 mov %eax,%ebx
12224b: 83 c4 10 add $0x10,%esp
12224e: 85 c0 test %eax,%eax
122250: 74 18 je 12226a <init_etc_passwd_group+0xca><== NEVER TAKEN
fprintf( fp, "root:x:0:root\n"
122252: 52 push %edx
122253: 52 push %edx
122254: 50 push %eax
122255: 68 c4 03 15 00 push $0x1503c4
12225a: e8 2d f7 00 00 call 13198c <fputs>
"rtems:x:1:rtems\n"
"tty:x:2:tty\n" );
fclose(fp);
12225f: 89 1c 24 mov %ebx,(%esp)
122262: e8 3d ed 00 00 call 130fa4 <fclose>
122267: 83 c4 10 add $0x10,%esp
}
}
12226a: 8b 5d fc mov -0x4(%ebp),%ebx
12226d: c9 leave
12226e: c3 ret
00108c6f <iproc>:
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
108c6f: 55 push %ebp
108c70: 89 e5 mov %esp,%ebp
108c72: 53 push %ebx
108c73: 83 ec 14 sub $0x14,%esp
108c76: 89 d3 mov %edx,%ebx
108c78: 88 c1 mov %al,%cl
if (tty->termios.c_iflag & ISTRIP)
108c7a: 8b 42 30 mov 0x30(%edx),%eax
108c7d: a8 20 test $0x20,%al
108c7f: 74 03 je 108c84 <iproc+0x15> <== ALWAYS TAKEN
c &= 0x7f;
108c81: 83 e1 7f and $0x7f,%ecx <== NOT EXECUTED
if (tty->termios.c_iflag & IUCLC)
108c84: f6 c4 02 test $0x2,%ah
108c87: 74 17 je 108ca0 <iproc+0x31>
c = tolower (c);
108c89: 0f b6 c9 movzbl %cl,%ecx
108c8c: 8b 15 88 c2 12 00 mov 0x12c288,%edx
108c92: 8a 54 0a 01 mov 0x1(%edx,%ecx,1),%dl
108c96: 83 e2 03 and $0x3,%edx
108c99: fe ca dec %dl
108c9b: 75 03 jne 108ca0 <iproc+0x31>
108c9d: 83 c1 20 add $0x20,%ecx
if (c == '\r') {
108ca0: 80 f9 0d cmp $0xd,%cl
108ca3: 75 12 jne 108cb7 <iproc+0x48>
if (tty->termios.c_iflag & IGNCR)
108ca5: a8 80 test $0x80,%al
108ca7: 74 05 je 108cae <iproc+0x3f> <== ALWAYS TAKEN
108ca9: e9 20 01 00 00 jmp 108dce <iproc+0x15f> <== NOT EXECUTED
return 0;
if (tty->termios.c_iflag & ICRNL)
108cae: f6 c4 01 test $0x1,%ah
108cb1: 74 19 je 108ccc <iproc+0x5d> <== NEVER TAKEN
c = '\n';
108cb3: b1 0a mov $0xa,%cl
108cb5: eb 15 jmp 108ccc <iproc+0x5d>
} else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
108cb7: 80 f9 0a cmp $0xa,%cl
108cba: 75 08 jne 108cc4 <iproc+0x55>
108cbc: a8 40 test $0x40,%al
108cbe: 74 0c je 108ccc <iproc+0x5d> <== ALWAYS TAKEN
c = '\r';
108cc0: b1 0d mov $0xd,%cl <== NOT EXECUTED
108cc2: eb 08 jmp 108ccc <iproc+0x5d> <== NOT EXECUTED
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
108cc4: 84 c9 test %cl,%cl
108cc6: 0f 84 d4 00 00 00 je 108da0 <iproc+0x131> <== NEVER TAKEN
108ccc: 8b 43 3c mov 0x3c(%ebx),%eax
108ccf: a8 02 test $0x2,%al
108cd1: 0f 84 c9 00 00 00 je 108da0 <iproc+0x131>
if (c == tty->termios.c_cc[VERASE]) {
108cd7: 3a 4b 43 cmp 0x43(%ebx),%cl
108cda: 75 0d jne 108ce9 <iproc+0x7a>
108cdc: 31 d2 xor %edx,%edx
* FIXME: Some of the tests should check for IEXTEN, too.
*/
static void
erase (struct rtems_termios_tty *tty, int lineFlag)
{
if (tty->ccount == 0)
108cde: 83 7b 20 00 cmpl $0x0,0x20(%ebx)
108ce2: 75 59 jne 108d3d <iproc+0xce>
108ce4: e9 e5 00 00 00 jmp 108dce <iproc+0x15f>
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
if (c == tty->termios.c_cc[VERASE]) {
erase (tty, 0);
return 0;
}
else if (c == tty->termios.c_cc[VKILL]) {
108ce9: 3a 4b 44 cmp 0x44(%ebx),%cl
108cec: 75 5b jne 108d49 <iproc+0xda>
* FIXME: Some of the tests should check for IEXTEN, too.
*/
static void
erase (struct rtems_termios_tty *tty, int lineFlag)
{
if (tty->ccount == 0)
108cee: 83 7b 20 00 cmpl $0x0,0x20(%ebx)
108cf2: 0f 84 d6 00 00 00 je 108dce <iproc+0x15f> <== NEVER TAKEN
return;
if (lineFlag) {
if (!(tty->termios.c_lflag & ECHO)) {
108cf8: a8 08 test $0x8,%al
108cfa: 75 0c jne 108d08 <iproc+0x99> <== ALWAYS TAKEN
tty->ccount = 0;
108cfc: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx) <== NOT EXECUTED
108d03: e9 c6 00 00 00 jmp 108dce <iproc+0x15f> <== NOT EXECUTED
108d08: ba 01 00 00 00 mov $0x1,%edx
return;
}
if (!(tty->termios.c_lflag & ECHOE)) {
108d0d: a8 10 test $0x10,%al
108d0f: 75 2c jne 108d3d <iproc+0xce> <== ALWAYS TAKEN
tty->ccount = 0;
108d11: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx) <== NOT EXECUTED
echo (tty->termios.c_cc[VKILL], tty);
108d18: 0f b6 c1 movzbl %cl,%eax <== NOT EXECUTED
108d1b: 89 da mov %ebx,%edx <== NOT EXECUTED
108d1d: e8 c6 fd ff ff call 108ae8 <echo> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOK)
108d22: f6 43 3c 20 testb $0x20,0x3c(%ebx) <== NOT EXECUTED
108d26: 0f 84 a2 00 00 00 je 108dce <iproc+0x15f> <== NOT EXECUTED
echo ('\n', tty);
108d2c: 89 da mov %ebx,%edx <== NOT EXECUTED
108d2e: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED
108d33: e8 b0 fd ff ff call 108ae8 <echo> <== NOT EXECUTED
108d38: e9 91 00 00 00 jmp 108dce <iproc+0x15f> <== NOT EXECUTED
108d3d: 89 d8 mov %ebx,%eax
108d3f: e8 fc fd ff ff call 108b40 <erase.part.2>
108d44: e9 85 00 00 00 jmp 108dce <iproc+0x15f>
}
else if (c == tty->termios.c_cc[VKILL]) {
erase (tty, 1);
return 0;
}
else if (c == tty->termios.c_cc[VEOF]) {
108d49: 3a 4b 45 cmp 0x45(%ebx),%cl
108d4c: 0f 84 80 00 00 00 je 108dd2 <iproc+0x163> <== NEVER TAKEN
return 1;
} else if (c == '\n') {
108d52: 80 f9 0a cmp $0xa,%cl
108d55: 75 1c jne 108d73 <iproc+0x104>
if (tty->termios.c_lflag & (ECHO | ECHONL))
108d57: a8 48 test $0x48,%al
108d59: 74 0c je 108d67 <iproc+0xf8> <== NEVER TAKEN
echo (c, tty);
108d5b: 89 da mov %ebx,%edx
108d5d: b8 0a 00 00 00 mov $0xa,%eax
108d62: e8 81 fd ff ff call 108ae8 <echo>
tty->cbuf[tty->ccount++] = c;
108d67: 8b 43 20 mov 0x20(%ebx),%eax
108d6a: 8b 53 1c mov 0x1c(%ebx),%edx
108d6d: c6 04 02 0a movb $0xa,(%edx,%eax,1)
108d71: eb 27 jmp 108d9a <iproc+0x12b>
return 1;
} else if ((c == tty->termios.c_cc[VEOL]) ||
108d73: 3a 4b 4c cmp 0x4c(%ebx),%cl
108d76: 74 05 je 108d7d <iproc+0x10e> <== NEVER TAKEN
108d78: 3a 4b 51 cmp 0x51(%ebx),%cl
108d7b: 75 23 jne 108da0 <iproc+0x131> <== ALWAYS TAKEN
(c == tty->termios.c_cc[VEOL2])) {
if (tty->termios.c_lflag & ECHO)
108d7d: a8 08 test $0x8,%al <== NOT EXECUTED
108d7f: 74 10 je 108d91 <iproc+0x122> <== NOT EXECUTED
echo (c, tty);
108d81: 0f b6 c1 movzbl %cl,%eax <== NOT EXECUTED
108d84: 89 da mov %ebx,%edx <== NOT EXECUTED
108d86: 88 4d f4 mov %cl,-0xc(%ebp) <== NOT EXECUTED
108d89: e8 5a fd ff ff call 108ae8 <echo> <== NOT EXECUTED
108d8e: 8a 4d f4 mov -0xc(%ebp),%cl <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
108d91: 8b 43 20 mov 0x20(%ebx),%eax <== NOT EXECUTED
108d94: 8b 53 1c mov 0x1c(%ebx),%edx <== NOT EXECUTED
108d97: 88 0c 02 mov %cl,(%edx,%eax,1) <== NOT EXECUTED
108d9a: 40 inc %eax
108d9b: 89 43 20 mov %eax,0x20(%ebx)
108d9e: eb 32 jmp 108dd2 <iproc+0x163>
}
/*
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
108da0: a1 0c c1 12 00 mov 0x12c10c,%eax
108da5: 48 dec %eax
108da6: 39 43 20 cmp %eax,0x20(%ebx)
108da9: 73 23 jae 108dce <iproc+0x15f> <== NEVER TAKEN
if (tty->termios.c_lflag & ECHO)
108dab: f6 43 3c 08 testb $0x8,0x3c(%ebx)
108daf: 74 10 je 108dc1 <iproc+0x152> <== NEVER TAKEN
echo (c, tty);
108db1: 0f b6 c1 movzbl %cl,%eax
108db4: 89 da mov %ebx,%edx
108db6: 88 4d f4 mov %cl,-0xc(%ebp)
108db9: e8 2a fd ff ff call 108ae8 <echo>
108dbe: 8a 4d f4 mov -0xc(%ebp),%cl
tty->cbuf[tty->ccount++] = c;
108dc1: 8b 43 20 mov 0x20(%ebx),%eax
108dc4: 8b 53 1c mov 0x1c(%ebx),%edx
108dc7: 88 0c 02 mov %cl,(%edx,%eax,1)
108dca: 40 inc %eax
108dcb: 89 43 20 mov %eax,0x20(%ebx)
}
return 0;
108dce: 31 c0 xor %eax,%eax
108dd0: eb 05 jmp 108dd7 <iproc+0x168>
else if (c == tty->termios.c_cc[VKILL]) {
erase (tty, 1);
return 0;
}
else if (c == tty->termios.c_cc[VEOF]) {
return 1;
108dd2: b8 01 00 00 00 mov $0x1,%eax
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
}
return 0;
}
108dd7: 83 c4 14 add $0x14,%esp
108dda: 5b pop %ebx
108ddb: 5d pop %ebp
108ddc: c3 ret
0011d990 <killinfo>:
int killinfo(
pid_t pid,
int sig,
const union sigval *value
)
{
11d990: 55 push %ebp
11d991: 89 e5 mov %esp,%ebp
11d993: 57 push %edi
11d994: 56 push %esi
11d995: 53 push %ebx
11d996: 83 ec 3c sub $0x3c,%esp
11d999: 8b 5d 0c mov 0xc(%ebp),%ebx
11d99c: 8b 75 10 mov 0x10(%ebp),%esi
POSIX_signals_Siginfo_node *psiginfo;
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid != getpid() )
11d99f: e8 f0 fd ff ff call 11d794 <getpid>
11d9a4: 39 45 08 cmp %eax,0x8(%ebp)
11d9a7: 74 10 je 11d9b9 <killinfo+0x29>
rtems_set_errno_and_return_minus_one( ESRCH );
11d9a9: e8 2e 35 ff ff call 110edc <__errno>
11d9ae: c7 00 03 00 00 00 movl $0x3,(%eax)
11d9b4: e9 f1 01 00 00 jmp 11dbaa <killinfo+0x21a>
/*
* Validate the signal passed.
*/
if ( !sig )
11d9b9: 85 db test %ebx,%ebx
11d9bb: 75 02 jne 11d9bf <killinfo+0x2f>
11d9bd: eb 08 jmp 11d9c7 <killinfo+0x37>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
11d9bf: 8d 4b ff lea -0x1(%ebx),%ecx
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
11d9c2: 83 f9 1f cmp $0x1f,%ecx
11d9c5: 76 10 jbe 11d9d7 <killinfo+0x47>
rtems_set_errno_and_return_minus_one( EINVAL );
11d9c7: e8 10 35 ff ff call 110edc <__errno>
11d9cc: c7 00 16 00 00 00 movl $0x16,(%eax)
11d9d2: e9 d3 01 00 00 jmp 11dbaa <killinfo+0x21a>
/*
* If the signal is being ignored, then we are out of here.
*/
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN )
11d9d7: 6b c3 0c imul $0xc,%ebx,%eax
11d9da: 83 b8 30 e9 12 00 01 cmpl $0x1,0x12e930(%eax)
11d9e1: 0f 84 e9 01 00 00 je 11dbd0 <killinfo+0x240>
/*
* P1003.1c/Draft 10, p. 33 says that certain signals should always
* be directed to the executing thread such as those caused by hardware
* faults.
*/
if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) )
11d9e7: 83 fb 04 cmp $0x4,%ebx
11d9ea: 74 0a je 11d9f6 <killinfo+0x66>
11d9ec: 83 fb 08 cmp $0x8,%ebx
11d9ef: 74 05 je 11d9f6 <killinfo+0x66>
11d9f1: 83 fb 0b cmp $0xb,%ebx
11d9f4: 75 16 jne 11da0c <killinfo+0x7c>
return pthread_kill( pthread_self(), sig );
11d9f6: e8 9d 03 00 00 call 11dd98 <pthread_self>
11d9fb: 56 push %esi
11d9fc: 56 push %esi
11d9fd: 53 push %ebx
11d9fe: 50 push %eax
11d9ff: e8 ec 02 00 00 call 11dcf0 <pthread_kill>
11da04: 83 c4 10 add $0x10,%esp
11da07: e9 c6 01 00 00 jmp 11dbd2 <killinfo+0x242>
static inline sigset_t signo_to_mask(
uint32_t sig
)
{
return 1u << (sig - 1);
11da0c: bf 01 00 00 00 mov $0x1,%edi
11da11: d3 e7 shl %cl,%edi
/*
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
11da13: 89 5d dc mov %ebx,-0x24(%ebp)
siginfo->si_code = SI_USER;
11da16: c7 45 e0 01 00 00 00 movl $0x1,-0x20(%ebp)
if ( !value ) {
11da1d: 85 f6 test %esi,%esi
11da1f: 75 09 jne 11da2a <killinfo+0x9a>
siginfo->si_value.sival_int = 0;
11da21: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
11da28: eb 05 jmp 11da2f <killinfo+0x9f>
} else {
siginfo->si_value = *value;
11da2a: 8b 06 mov (%esi),%eax
11da2c: 89 45 e4 mov %eax,-0x1c(%ebp)
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
11da2f: a1 e4 e3 12 00 mov 0x12e3e4,%eax
11da34: 40 inc %eax
11da35: a3 e4 e3 12 00 mov %eax,0x12e3e4
return _Thread_Dispatch_disable_level;
11da3a: a1 e4 e3 12 00 mov 0x12e3e4,%eax
/*
* Is the currently executing thread interested? If so then it will
* get it an execute it as soon as the dispatcher executes.
*/
the_thread = _Thread_Executing;
11da3f: a1 ec e8 12 00 mov 0x12e8ec,%eax
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( _POSIX_signals_Is_interested( api, mask ) ) {
11da44: 8b 90 e8 00 00 00 mov 0xe8(%eax),%edx
11da4a: 8b 92 d0 00 00 00 mov 0xd0(%edx),%edx
11da50: f7 d2 not %edx
11da52: 85 d7 test %edx,%edi
11da54: 0f 85 fa 00 00 00 jne 11db54 <killinfo+0x1c4>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
11da5a: a1 b4 ea 12 00 mov 0x12eab4,%eax
/* XXX violation of visibility -- need to define thread queue support */
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo;
for ( the_node = _Chain_First( the_chain );
11da5f: eb 21 jmp 11da82 <killinfo+0xf2>
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
the_thread = (Thread_Control *)the_node;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
11da61: 8b 90 e8 00 00 00 mov 0xe8(%eax),%edx
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
11da67: 85 78 30 test %edi,0x30(%eax)
11da6a: 0f 85 e4 00 00 00 jne 11db54 <killinfo+0x1c4>
/*
* Is this thread is blocked waiting for another signal but has
* not blocked this one?
*/
if (~api->signals_blocked & mask)
11da70: 8b 92 d0 00 00 00 mov 0xd0(%edx),%edx
11da76: f7 d2 not %edx
11da78: 85 d7 test %edx,%edi
11da7a: 0f 85 d4 00 00 00 jne 11db54 <killinfo+0x1c4>
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo;
for ( the_node = _Chain_First( the_chain );
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
11da80: 8b 00 mov (%eax),%eax
/* XXX violation of visibility -- need to define thread queue support */
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo;
for ( the_node = _Chain_First( the_chain );
11da82: 3d b8 ea 12 00 cmp $0x12eab8,%eax
11da87: 75 d8 jne 11da61 <killinfo+0xd1>
* NOTES:
*
* + rtems internal threads do not receive signals.
*/
interested = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
11da89: 0f b6 05 88 a1 12 00 movzbl 0x12a188,%eax
11da90: 40 inc %eax
11da91: 89 45 bc mov %eax,-0x44(%ebp)
*
* NOTES:
*
* + rtems internal threads do not receive signals.
*/
interested = NULL;
11da94: 31 c0 xor %eax,%eax
interested_priority = PRIORITY_MAXIMUM + 1;
for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) {
11da96: c7 45 cc 02 00 00 00 movl $0x2,-0x34(%ebp)
/*
* This can occur when no one is interested and an API is not configured.
*/
if ( !_Objects_Information_table[ the_api ] )
11da9d: 8b 4d cc mov -0x34(%ebp),%ecx
11daa0: 8b 14 8d bc e3 12 00 mov 0x12e3bc(,%ecx,4),%edx
11daa7: 85 d2 test %edx,%edx
11daa9: 0f 84 94 00 00 00 je 11db43 <killinfo+0x1b3> <== NEVER TAKEN
continue;
the_info = _Objects_Information_table[ the_api ][ 1 ];
11daaf: 8b 52 04 mov 0x4(%edx),%edx
*/
if ( !the_info )
continue;
#endif
maximum = the_info->maximum;
11dab2: 0f b7 72 10 movzwl 0x10(%edx),%esi
11dab6: 89 75 c4 mov %esi,-0x3c(%ebp)
object_table = the_info->local_table;
11dab9: 8b 52 1c mov 0x1c(%edx),%edx
11dabc: 89 55 c0 mov %edx,-0x40(%ebp)
for ( index = 1 ; index <= maximum ; index++ ) {
11dabf: c7 45 d0 01 00 00 00 movl $0x1,-0x30(%ebp)
11dac6: eb 73 jmp 11db3b <killinfo+0x1ab>
the_thread = (Thread_Control *) object_table[ index ];
11dac8: 8b 4d d0 mov -0x30(%ebp),%ecx
11dacb: 8b 75 c0 mov -0x40(%ebp),%esi
11dace: 8b 14 8e mov (%esi,%ecx,4),%edx
if ( !the_thread )
11dad1: 85 d2 test %edx,%edx
11dad3: 74 63 je 11db38 <killinfo+0x1a8>
/*
* If this thread is of lower priority than the interested thread,
* go on to the next thread.
*/
if ( the_thread->current_priority > interested_priority )
11dad5: 8b 4a 14 mov 0x14(%edx),%ecx
11dad8: 89 4d d4 mov %ecx,-0x2c(%ebp)
11dadb: 8b 75 bc mov -0x44(%ebp),%esi
11dade: 39 f1 cmp %esi,%ecx
11dae0: 77 56 ja 11db38 <killinfo+0x1a8>
#if defined(RTEMS_DEBUG)
if ( !api )
continue;
#endif
if ( !_POSIX_signals_Is_interested( api, mask ) )
11dae2: 8b b2 e8 00 00 00 mov 0xe8(%edx),%esi
11dae8: 8b b6 d0 00 00 00 mov 0xd0(%esi),%esi
11daee: f7 d6 not %esi
11daf0: 85 f7 test %esi,%edi
11daf2: 74 44 je 11db38 <killinfo+0x1a8>
*
* NOTE: We initialized interested_priority to PRIORITY_MAXIMUM + 1
* so we never have to worry about deferencing a NULL
* interested thread.
*/
if ( the_thread->current_priority < interested_priority ) {
11daf4: 8b 75 bc mov -0x44(%ebp),%esi
11daf7: 39 f1 cmp %esi,%ecx
11daf9: 72 2d jb 11db28 <killinfo+0x198>
* and blocking interruptibutable by signal.
*
* If the interested thread is ready, don't think about changing.
*/
if ( interested && !_States_Is_ready( interested->current_state ) ) {
11dafb: 85 c0 test %eax,%eax
11dafd: 74 39 je 11db38 <killinfo+0x1a8> <== NEVER TAKEN
11daff: 8b 48 10 mov 0x10(%eax),%ecx
11db02: 89 4d c8 mov %ecx,-0x38(%ebp)
11db05: 85 c9 test %ecx,%ecx
11db07: 74 2f je 11db38 <killinfo+0x1a8> <== NEVER TAKEN
/* preferred ready over blocked */
DEBUG_STEP("5");
if ( _States_Is_ready( the_thread->current_state ) ) {
11db09: 8b 72 10 mov 0x10(%edx),%esi
11db0c: 85 f6 test %esi,%esi
11db0e: 74 20 je 11db30 <killinfo+0x1a0>
continue;
}
DEBUG_STEP("6");
/* prefer blocked/interruptible over blocked/not interruptible */
if ( !_States_Is_interruptible_by_signal(interested->current_state) ) {
11db10: 81 e1 00 00 00 10 and $0x10000000,%ecx
11db16: 75 20 jne 11db38 <killinfo+0x1a8>
DEBUG_STEP("7");
if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) {
11db18: 81 e6 00 00 00 10 and $0x10000000,%esi
11db1e: 74 18 je 11db38 <killinfo+0x1a8>
11db20: 8b 75 d4 mov -0x2c(%ebp),%esi
11db23: 89 75 bc mov %esi,-0x44(%ebp)
11db26: eb 0e jmp 11db36 <killinfo+0x1a6>
*
* NOTE: We initialized interested_priority to PRIORITY_MAXIMUM + 1
* so we never have to worry about deferencing a NULL
* interested thread.
*/
if ( the_thread->current_priority < interested_priority ) {
11db28: 8b 45 d4 mov -0x2c(%ebp),%eax
11db2b: 89 45 bc mov %eax,-0x44(%ebp)
11db2e: eb 06 jmp 11db36 <killinfo+0x1a6>
*/
if ( interested && !_States_Is_ready( interested->current_state ) ) {
/* preferred ready over blocked */
DEBUG_STEP("5");
if ( _States_Is_ready( the_thread->current_state ) ) {
11db30: 8b 4d d4 mov -0x2c(%ebp),%ecx
11db33: 89 4d bc mov %ecx,-0x44(%ebp)
11db36: 89 d0 mov %edx,%eax
#endif
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
11db38: ff 45 d0 incl -0x30(%ebp)
11db3b: 8b 75 c4 mov -0x3c(%ebp),%esi
11db3e: 39 75 d0 cmp %esi,-0x30(%ebp)
11db41: 76 85 jbe 11dac8 <killinfo+0x138>
* + rtems internal threads do not receive signals.
*/
interested = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) {
11db43: ff 45 cc incl -0x34(%ebp)
11db46: 83 7d cc 04 cmpl $0x4,-0x34(%ebp)
11db4a: 0f 85 4d ff ff ff jne 11da9d <killinfo+0x10d>
}
}
}
}
if ( interested ) {
11db50: 85 c0 test %eax,%eax
11db52: 74 1a je 11db6e <killinfo+0x1de>
/*
* Returns true if the signal was synchronously given to a thread
* blocked waiting for the signal.
*/
if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) {
11db54: 51 push %ecx
mask = signo_to_mask( sig );
/*
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
11db55: 8d 55 dc lea -0x24(%ebp),%edx
/*
* Returns true if the signal was synchronously given to a thread
* blocked waiting for the signal.
*/
if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) {
11db58: 52 push %edx
11db59: 53 push %ebx
11db5a: 50 push %eax
11db5b: e8 90 00 00 00 call 11dbf0 <_POSIX_signals_Unblock_thread>
11db60: 83 c4 10 add $0x10,%esp
11db63: 84 c0 test %al,%al
11db65: 74 07 je 11db6e <killinfo+0x1de>
_Thread_Enable_dispatch();
11db67: e8 a0 e2 fe ff call 10be0c <_Thread_Enable_dispatch>
11db6c: eb 62 jmp 11dbd0 <killinfo+0x240>
/*
* We may have woken up a thread but we definitely need to post the
* signal to the process wide information set.
*/
_POSIX_signals_Set_process_signals( mask );
11db6e: 83 ec 0c sub $0xc,%esp
11db71: 57 push %edi
11db72: e8 65 00 00 00 call 11dbdc <_POSIX_signals_Set_process_signals>
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
11db77: 6b db 0c imul $0xc,%ebx,%ebx
11db7a: 83 c4 10 add $0x10,%esp
11db7d: 83 bb 28 e9 12 00 02 cmpl $0x2,0x12e928(%ebx)
11db84: 75 e1 jne 11db67 <killinfo+0x1d7>
psiginfo = (POSIX_signals_Siginfo_node *)
11db86: 83 ec 0c sub $0xc,%esp
11db89: 68 a8 ea 12 00 push $0x12eaa8
11db8e: e8 ed ca fe ff call 10a680 <_Chain_Get>
_Chain_Get( &_POSIX_signals_Inactive_siginfo );
if ( !psiginfo ) {
11db93: 83 c4 10 add $0x10,%esp
11db96: 85 c0 test %eax,%eax
11db98: 75 15 jne 11dbaf <killinfo+0x21f>
_Thread_Enable_dispatch();
11db9a: e8 6d e2 fe ff call 10be0c <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EAGAIN );
11db9f: e8 38 33 ff ff call 110edc <__errno>
11dba4: c7 00 0b 00 00 00 movl $0xb,(%eax)
11dbaa: 83 c8 ff or $0xffffffff,%eax
11dbad: eb 23 jmp 11dbd2 <killinfo+0x242>
}
psiginfo->Info = *siginfo;
11dbaf: 8d 78 08 lea 0x8(%eax),%edi
11dbb2: 8d 75 dc lea -0x24(%ebp),%esi
11dbb5: b9 03 00 00 00 mov $0x3,%ecx
11dbba: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
11dbbc: 52 push %edx
11dbbd: 52 push %edx
11dbbe: 50 push %eax
11dbbf: 81 c3 20 eb 12 00 add $0x12eb20,%ebx
11dbc5: 53 push %ebx
11dbc6: e8 91 ca fe ff call 10a65c <_Chain_Append>
11dbcb: 83 c4 10 add $0x10,%esp
11dbce: eb 97 jmp 11db67 <killinfo+0x1d7>
/*
* If the signal is being ignored, then we are out of here.
*/
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN )
return 0;
11dbd0: 31 c0 xor %eax,%eax
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
return 0;
}
11dbd2: 8d 65 f4 lea -0xc(%ebp),%esp
11dbd5: 5b pop %ebx
11dbd6: 5e pop %esi
11dbd7: 5f pop %edi
11dbd8: 5d pop %ebp
11dbd9: c3 ret
00106e64 <libc_wrapup>:
/*
* In case RTEMS is already down, don't do this. It could be
* dangerous.
*/
if (!_System_state_Is_up(_System_state_Get()))
106e64: 83 3d 20 e5 12 00 03 cmpl $0x3,0x12e520
106e6b: 75 58 jne 106ec5 <libc_wrapup+0x61> <== NEVER TAKEN
extern void _wrapup_reent(struct _reent *);
extern void _reclaim_reent(struct _reent *);
void libc_wrapup(void)
{
106e6d: 55 push %ebp
106e6e: 89 e5 mov %esp,%ebp
106e70: 53 push %ebx
106e71: 51 push %ecx
/*
* This was already done if the user called exit() directly .
_wrapup_reent(0);
*/
if (_REENT != _global_impure_ptr) {
106e72: 8b 1d 60 04 12 00 mov 0x120460,%ebx
106e78: 39 1d a0 c2 12 00 cmp %ebx,0x12c2a0
106e7e: 74 12 je 106e92 <libc_wrapup+0x2e>
_wrapup_reent(_global_impure_ptr);
106e80: 83 ec 0c sub $0xc,%esp
106e83: 53 push %ebx
106e84: e8 a7 aa 00 00 call 111930 <_wrapup_reent>
/* Don't reclaim this one, just in case we do printfs
* on the way out to ROM.
*/
_reclaim_reent(&libc_global_reent);
#endif
_REENT = _global_impure_ptr;
106e89: 89 1d a0 c2 12 00 mov %ebx,0x12c2a0
106e8f: 83 c4 10 add $0x10,%esp
*
* Should this be changed to do *all* file streams?
* _fwalk (_REENT, fclose);
*/
fclose (stdin);
106e92: 83 ec 0c sub $0xc,%esp
106e95: a1 a0 c2 12 00 mov 0x12c2a0,%eax
106e9a: ff 70 04 pushl 0x4(%eax)
106e9d: e8 56 a1 00 00 call 110ff8 <fclose>
fclose (stdout);
106ea2: 58 pop %eax
106ea3: a1 a0 c2 12 00 mov 0x12c2a0,%eax
106ea8: ff 70 08 pushl 0x8(%eax)
106eab: e8 48 a1 00 00 call 110ff8 <fclose>
fclose (stderr);
106eb0: 5a pop %edx
106eb1: a1 a0 c2 12 00 mov 0x12c2a0,%eax
106eb6: ff 70 0c pushl 0xc(%eax)
106eb9: e8 3a a1 00 00 call 110ff8 <fclose>
106ebe: 83 c4 10 add $0x10,%esp
}
106ec1: 8b 5d fc mov -0x4(%ebp),%ebx
106ec4: c9 leave
106ec5: c3 ret
001069f4 <malloc>:
#include "malloc_p.h"
void *malloc(
size_t size
)
{
1069f4: 55 push %ebp
1069f5: 89 e5 mov %esp,%ebp
1069f7: 56 push %esi
1069f8: 53 push %ebx
1069f9: 8b 75 08 mov 0x8(%ebp),%esi
void *return_this;
MSBUMP(malloc_calls, 1);
1069fc: ff 05 ec e2 12 00 incl 0x12e2ec
/*
* If some free's have been deferred, then do them now.
*/
malloc_deferred_frees_process();
106a02: e8 04 ff ff ff call 10690b <malloc_deferred_frees_process>
/*
* Validate the parameters
*/
if ( !size )
106a07: 85 f6 test %esi,%esi
106a09: 75 02 jne 106a0d <malloc+0x19>
106a0b: eb 43 jmp 106a50 <malloc+0x5c>
return (void *) 0;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
106a0d: 83 3d 20 e5 12 00 03 cmpl $0x3,0x12e520
106a14: 74 1b je 106a31 <malloc+0x3d>
RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate(
Heap_Control *heap,
uintptr_t size
)
{
return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 );
106a16: 6a 00 push $0x0
106a18: 6a 00 push $0x0
106a1a: 56 push %esi
106a1b: ff 35 2c a2 12 00 pushl 0x12a22c
106a21: e8 ae 4a 00 00 call 10b4d4 <_Protected_heap_Allocate_aligned_with_boundary>
* If this fails then return a NULL pointer.
*/
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
if ( !return_this ) {
106a26: 83 c4 10 add $0x10,%esp
106a29: 85 c0 test %eax,%eax
106a2b: 74 0f je 106a3c <malloc+0x48>
106a2d: 89 c3 mov %eax,%ebx
106a2f: eb 33 jmp 106a64 <malloc+0x70>
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
!malloc_is_system_state_OK() )
106a31: e8 96 fe ff ff call 1068cc <malloc_is_system_state_OK>
return (void *) 0;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
106a36: 84 c0 test %al,%al
106a38: 75 dc jne 106a16 <malloc+0x22> <== ALWAYS TAKEN
106a3a: eb 14 jmp 106a50 <malloc+0x5c> <== NOT EXECUTED
*/
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
if ( !return_this ) {
if (rtems_malloc_sbrk_helpers)
106a3c: a1 00 c8 12 00 mov 0x12c800,%eax
106a41: 85 c0 test %eax,%eax
106a43: 75 0f jne 106a54 <malloc+0x60>
return_this = (*rtems_malloc_sbrk_helpers->extend)( size );
if ( !return_this ) {
errno = ENOMEM;
106a45: e8 92 a4 00 00 call 110edc <__errno>
106a4a: c7 00 0c 00 00 00 movl $0xc,(%eax)
return (void *) 0;
106a50: 31 db xor %ebx,%ebx
106a52: eb 35 jmp 106a89 <malloc+0x95>
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
if ( !return_this ) {
if (rtems_malloc_sbrk_helpers)
return_this = (*rtems_malloc_sbrk_helpers->extend)( size );
106a54: 83 ec 0c sub $0xc,%esp
106a57: 56 push %esi
106a58: ff 50 04 call *0x4(%eax)
106a5b: 89 c3 mov %eax,%ebx
if ( !return_this ) {
106a5d: 83 c4 10 add $0x10,%esp
106a60: 85 c0 test %eax,%eax
106a62: 74 e1 je 106a45 <malloc+0x51>
}
/*
* If the user wants us to dirty the allocated memory, then do it.
*/
if ( rtems_malloc_dirty_helper )
106a64: a1 fc c7 12 00 mov 0x12c7fc,%eax
106a69: 85 c0 test %eax,%eax
106a6b: 74 09 je 106a76 <malloc+0x82>
(*rtems_malloc_dirty_helper)( return_this, size );
106a6d: 52 push %edx
106a6e: 52 push %edx
106a6f: 56 push %esi
106a70: 53 push %ebx
106a71: ff d0 call *%eax
106a73: 83 c4 10 add $0x10,%esp
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
106a76: a1 04 c8 12 00 mov 0x12c804,%eax
106a7b: 85 c0 test %eax,%eax
106a7d: 74 0a je 106a89 <malloc+0x95>
(*rtems_malloc_statistics_helpers->at_malloc)(return_this);
106a7f: 83 ec 0c sub $0xc,%esp
106a82: 53 push %ebx
106a83: ff 50 04 call *0x4(%eax)
106a86: 83 c4 10 add $0x10,%esp
return return_this;
}
106a89: 89 d8 mov %ebx,%eax
106a8b: 8d 65 f8 lea -0x8(%ebp),%esp
106a8e: 5b pop %ebx
106a8f: 5e pop %esi
106a90: 5d pop %ebp
106a91: c3 ret
00106a90 <malloc_sbrk_extend_and_allocate>:
}
static void *malloc_sbrk_extend_and_allocate(
size_t size
)
{
106a90: 55 push %ebp
106a91: 89 e5 mov %esp,%ebp
106a93: 56 push %esi
106a94: 53 push %ebx
106a95: 8b 75 08 mov 0x8(%ebp),%esi
* Round to the "requested sbrk amount" so hopefully we won't have
* to grow again for a while. This effectively does sbrk() calls
* in "page" amounts.
*/
sbrk_amount = RTEMS_Malloc_Sbrk_amount;
106a98: 8b 0d 9c ea 12 00 mov 0x12ea9c,%ecx
if ( sbrk_amount == 0 )
106a9e: 85 c9 test %ecx,%ecx
106aa0: 75 02 jne 106aa4 <malloc_sbrk_extend_and_allocate+0x14><== ALWAYS TAKEN
106aa2: eb 4b jmp 106aef <malloc_sbrk_extend_and_allocate+0x5f><== NOT EXECUTED
return (void *) 0;
the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount);
106aa4: 8d 04 0e lea (%esi,%ecx,1),%eax
106aa7: 31 d2 xor %edx,%edx
106aa9: f7 f1 div %ecx
106aab: 89 c3 mov %eax,%ebx
106aad: 0f af d9 imul %ecx,%ebx
starting_address = (void *) sbrk(the_size);
106ab0: 83 ec 0c sub $0xc,%esp
106ab3: 53 push %ebx
106ab4: e8 1c 99 ff ff call 1003d5 <sbrk>
if ( starting_address == (void*) -1 )
106ab9: 83 c4 10 add $0x10,%esp
106abc: 83 f8 ff cmp $0xffffffff,%eax
106abf: 74 2e je 106aef <malloc_sbrk_extend_and_allocate+0x5f>
return (void *) 0;
if ( !_Protected_heap_Extend(
106ac1: 52 push %edx
106ac2: 53 push %ebx
106ac3: 50 push %eax
106ac4: ff 35 6c a8 12 00 pushl 0x12a86c
106aca: e8 51 4a 00 00 call 10b520 <_Protected_heap_Extend>
106acf: 83 c4 10 add $0x10,%esp
106ad2: 84 c0 test %al,%al
106ad4: 75 1d jne 106af3 <malloc_sbrk_extend_and_allocate+0x63>
RTEMS_Malloc_Heap, starting_address, the_size) ) {
sbrk(-the_size);
106ad6: 83 ec 0c sub $0xc,%esp
106ad9: f7 db neg %ebx
106adb: 53 push %ebx
106adc: e8 f4 98 ff ff call 1003d5 <sbrk>
errno = ENOMEM;
106ae1: e8 7a a6 00 00 call 111160 <__errno>
106ae6: c7 00 0c 00 00 00 movl $0xc,(%eax)
return (void *) 0;
106aec: 83 c4 10 add $0x10,%esp
106aef: 31 c0 xor %eax,%eax
106af1: eb 19 jmp 106b0c <malloc_sbrk_extend_and_allocate+0x7c>
}
MSBUMP(space_available, the_size);
106af3: 01 1d 70 ea 12 00 add %ebx,0x12ea70
106af9: 6a 00 push $0x0
106afb: 6a 00 push $0x0
106afd: 56 push %esi
106afe: ff 35 6c a8 12 00 pushl 0x12a86c
106b04: e8 df 49 00 00 call 10b4e8 <_Protected_heap_Allocate_aligned_with_boundary>
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
return return_this;
106b09: 83 c4 10 add $0x10,%esp
}
106b0c: 8d 65 f8 lea -0x8(%ebp),%esp
106b0f: 5b pop %ebx
106b10: 5e pop %esi
106b11: 5d pop %ebp
106b12: c3 ret
00106b13 <malloc_sbrk_initialize>:
static void *malloc_sbrk_initialize(
void *starting_address,
size_t length
)
{
106b13: 55 push %ebp
106b14: 89 e5 mov %esp,%ebp
106b16: 83 ec 08 sub $0x8,%esp
106b19: 8b 45 08 mov 0x8(%ebp),%eax
106b1c: 8b 55 0c mov 0xc(%ebp),%edx
uintptr_t old_address;
uintptr_t uaddress;
RTEMS_Malloc_Sbrk_amount = length;
106b1f: 89 15 9c ea 12 00 mov %edx,0x12ea9c
* If the starting address is 0 then we are to attempt to
* get length worth of memory using sbrk. Make sure we
* align the address that we get back.
*/
if (!starting_address) {
106b25: 85 c0 test %eax,%eax
106b27: 75 25 jne 106b4e <malloc_sbrk_initialize+0x3b>
uaddress = (uintptr_t)sbrk(length);
106b29: 83 ec 0c sub $0xc,%esp
106b2c: 52 push %edx
106b2d: e8 a3 98 ff ff call 1003d5 <sbrk>
if (uaddress == (uintptr_t) -1) {
106b32: 83 c4 10 add $0x10,%esp
106b35: 83 f8 ff cmp $0xffffffff,%eax
106b38: 75 0a jne 106b44 <malloc_sbrk_initialize+0x31><== NEVER TAKEN
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
106b3a: 83 ec 0c sub $0xc,%esp
106b3d: 6a 1a push $0x1a
106b3f: e8 f4 38 00 00 call 10a438 <rtems_fatal_error_occurred>
/* DOES NOT RETURN!!! */
}
if (uaddress & (CPU_HEAP_ALIGNMENT-1)) {
106b44: a8 03 test $0x3,%al <== NOT EXECUTED
106b46: 74 06 je 106b4e <malloc_sbrk_initialize+0x3b><== NOT EXECUTED
old_address = uaddress;
uaddress = (uaddress + CPU_HEAP_ALIGNMENT) & ~(CPU_HEAP_ALIGNMENT-1);
106b48: 83 c0 04 add $0x4,%eax <== NOT EXECUTED
106b4b: 83 e0 fc and $0xfffffffc,%eax <== NOT EXECUTED
}
starting_address = (void *)uaddress;
}
return starting_address;
}
106b4e: c9 leave
106b4f: c3 ret
0010f8a0 <memfile_alloc_block>:
* Allocate a block for an in-memory file.
*/
int memfile_blocks_allocated = 0;
void *memfile_alloc_block(void)
{
10f8a0: 55 push %ebp
10f8a1: 89 e5 mov %esp,%ebp
10f8a3: 83 ec 10 sub $0x10,%esp
void *memory;
memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK);
10f8a6: ff 35 b4 df 12 00 pushl 0x12dfb4
10f8ac: 6a 01 push $0x1
10f8ae: e8 79 6c ff ff call 10652c <calloc>
if ( memory )
10f8b3: 83 c4 10 add $0x10,%esp
10f8b6: 85 c0 test %eax,%eax
10f8b8: 74 06 je 10f8c0 <memfile_alloc_block+0x20><== NEVER TAKEN
memfile_blocks_allocated++;
10f8ba: ff 05 d0 e0 12 00 incl 0x12e0d0
return memory;
}
10f8c0: c9 leave
10f8c1: c3 ret
0011010a <memfile_ftruncate>:
*/
int memfile_ftruncate(
rtems_libio_t *iop,
off_t length
)
{
11010a: 55 push %ebp
11010b: 89 e5 mov %esp,%ebp
11010d: 53 push %ebx
11010e: 83 ec 14 sub $0x14,%esp
110111: 8b 45 0c mov 0xc(%ebp),%eax
110114: 8b 55 10 mov 0x10(%ebp),%edx
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
110117: 8b 4d 08 mov 0x8(%ebp),%ecx
11011a: 8b 59 18 mov 0x18(%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 )
11011d: 3b 53 54 cmp 0x54(%ebx),%edx
110120: 7c 16 jl 110138 <memfile_ftruncate+0x2e><== NEVER TAKEN
110122: 7f 05 jg 110129 <memfile_ftruncate+0x1f><== NEVER TAKEN
110124: 3b 43 50 cmp 0x50(%ebx),%eax
110127: 76 0f jbe 110138 <memfile_ftruncate+0x2e>
return IMFS_memfile_extend( the_jnode, true, length );
110129: 52 push %edx
11012a: 50 push %eax
11012b: 6a 01 push $0x1
11012d: 53 push %ebx
11012e: e8 47 fc ff ff call 10fd7a <IMFS_memfile_extend>
110133: 83 c4 10 add $0x10,%esp
110136: eb 1e jmp 110156 <memfile_ftruncate+0x4c>
/*
* 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;
110138: 89 43 50 mov %eax,0x50(%ebx)
11013b: 89 53 54 mov %edx,0x54(%ebx)
IMFS_update_atime( the_jnode );
11013e: 51 push %ecx
11013f: 51 push %ecx
110140: 6a 00 push $0x0
110142: 8d 45 f0 lea -0x10(%ebp),%eax
110145: 50 push %eax
110146: e8 61 66 ff ff call 1067ac <gettimeofday>
11014b: 8b 45 f0 mov -0x10(%ebp),%eax
11014e: 89 43 40 mov %eax,0x40(%ebx)
return 0;
110151: 83 c4 10 add $0x10,%esp
110154: 31 c0 xor %eax,%eax
}
110156: 8b 5d fc mov -0x4(%ebp),%ebx
110159: c9 leave
11015a: c3 ret
0011009c <memfile_open>:
rtems_libio_t *iop,
const char *pathname,
int oflag,
mode_t mode
)
{
11009c: 55 push %ebp
11009d: 89 e5 mov %esp,%ebp
11009f: 83 ec 08 sub $0x8,%esp
1100a2: 8b 55 08 mov 0x8(%ebp),%edx
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
1100a5: 8b 42 18 mov 0x18(%edx),%eax
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & LIBIO_FLAGS_WRITE)
1100a8: f6 42 0c 04 testb $0x4,0xc(%edx)
1100ac: 75 04 jne 1100b2 <memfile_open+0x16>
if ((count != 0)
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
return -1;
}
return 0;
1100ae: 31 c0 xor %eax,%eax
1100b0: eb 56 jmp 110108 <memfile_open+0x6c>
1100b2: 8b 50 4c mov 0x4c(%eax),%edx
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & LIBIO_FLAGS_WRITE)
&& (IMFS_type( the_jnode ) == IMFS_LINEAR_FILE)) {
1100b5: 83 3a 05 cmpl $0x5,(%edx)
1100b8: 75 f4 jne 1100ae <memfile_open+0x12> <== ALWAYS TAKEN
uint32_t count = the_jnode->info.linearfile.size;
1100ba: 8b 50 50 mov 0x50(%eax),%edx <== NOT EXECUTED
const unsigned char *buffer = the_jnode->info.linearfile.direct;
1100bd: 8b 48 58 mov 0x58(%eax),%ecx <== NOT EXECUTED
the_jnode->control = &IMFS_node_control_memfile;
1100c0: c7 40 4c 9c fe 11 00 movl $0x11fe9c,0x4c(%eax) <== NOT EXECUTED
the_jnode->info.file.size = 0;
1100c7: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) <== NOT EXECUTED
1100ce: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) <== NOT EXECUTED
the_jnode->info.file.indirect = 0;
1100d5: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) <== NOT EXECUTED
the_jnode->info.file.doubly_indirect = 0;
1100dc: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) <== NOT EXECUTED
the_jnode->info.file.triply_indirect = 0;
1100e3: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax) <== NOT EXECUTED
if ((count != 0)
1100ea: 85 d2 test %edx,%edx <== NOT EXECUTED
1100ec: 74 c0 je 1100ae <memfile_open+0x12> <== NOT EXECUTED
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
1100ee: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1100f1: 52 push %edx <== NOT EXECUTED
1100f2: 51 push %ecx <== NOT EXECUTED
1100f3: 6a 00 push $0x0 <== NOT EXECUTED
1100f5: 6a 00 push $0x0 <== NOT EXECUTED
1100f7: 50 push %eax <== NOT EXECUTED
1100f8: e8 d9 fd ff ff call 10fed6 <IMFS_memfile_write> <== NOT EXECUTED
1100fd: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
return -1;
110100: 40 inc %eax <== NOT EXECUTED
110101: 0f 95 c0 setne %al <== NOT EXECUTED
110104: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED
110107: 48 dec %eax <== NOT EXECUTED
}
return 0;
}
110108: c9 leave
110109: c3 ret
00106bac <mount>:
const char *target,
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
106bac: 55 push %ebp
106bad: 89 e5 mov %esp,%ebp
106baf: 57 push %edi
106bb0: 56 push %esi
106bb1: 53 push %ebx
106bb2: 83 ec 7c sub $0x7c,%esp
106bb5: 8b 75 10 mov 0x10(%ebp),%esi
int rv = 0;
if (
106bb8: 83 7d 14 01 cmpl $0x1,0x14(%ebp)
106bbc: 0f 87 6e 02 00 00 ja 106e30 <mount+0x284>
options == RTEMS_FILESYSTEM_READ_ONLY
|| options == RTEMS_FILESYSTEM_READ_WRITE
) {
rtems_filesystem_fsmount_me_t fsmount_me_h =
106bc2: 83 ec 0c sub $0xc,%esp
106bc5: 56 push %esi
106bc6: e8 c4 70 00 00 call 10dc8f <rtems_filesystem_get_mount_handler>
106bcb: 89 45 84 mov %eax,-0x7c(%ebp)
rtems_filesystem_get_mount_handler( filesystemtype );
if ( fsmount_me_h != NULL ) {
106bce: 83 c4 10 add $0x10,%esp
106bd1: 85 c0 test %eax,%eax
106bd3: 0f 84 57 02 00 00 je 106e30 <mount+0x284>
const char *target_or_null,
const char *filesystemtype,
size_t *target_length_ptr
)
{
const char *target = target_or_null != NULL ? target_or_null : "/";
106bd9: 8b 55 0c mov 0xc(%ebp),%edx
106bdc: 89 55 88 mov %edx,-0x78(%ebp)
106bdf: 85 d2 test %edx,%edx
106be1: 75 07 jne 106bea <mount+0x3e>
106be3: c7 45 88 60 f8 11 00 movl $0x11f860,-0x78(%ebp)
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
106bea: 83 cb ff or $0xffffffff,%ebx
106bed: 31 c0 xor %eax,%eax
106bef: 89 d9 mov %ebx,%ecx
106bf1: 89 f7 mov %esi,%edi
106bf3: f2 ae repnz scas %es:(%edi),%al
106bf5: f7 d1 not %ecx
106bf7: 89 4d 94 mov %ecx,-0x6c(%ebp)
106bfa: 89 ca mov %ecx,%edx
106bfc: 4a dec %edx
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
106bfd: 83 7d 08 00 cmpl $0x0,0x8(%ebp)
106c01: 74 0e je 106c11 <mount+0x65>
106c03: 89 d9 mov %ebx,%ecx
106c05: 8b 7d 08 mov 0x8(%ebp),%edi
106c08: f2 ae repnz scas %es:(%edi),%al
106c0a: f7 d1 not %ecx
106c0c: 89 4d 90 mov %ecx,-0x70(%ebp)
106c0f: eb 07 jmp 106c18 <mount+0x6c>
106c11: c7 45 90 00 00 00 00 movl $0x0,-0x70(%ebp)
size_t target_size = strlen( target ) + 1;
106c18: 31 c0 xor %eax,%eax
106c1a: 83 c9 ff or $0xffffffff,%ecx
106c1d: 8b 7d 88 mov -0x78(%ebp),%edi
106c20: f2 ae repnz scas %es:(%edi),%al
106c22: f7 d1 not %ecx
106c24: 89 4d 8c mov %ecx,-0x74(%ebp)
size_t size = sizeof( rtems_filesystem_mount_table_entry_t )
+ filesystemtype_size + source_size + target_size
+ sizeof( rtems_filesystem_global_location_t );
rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size );
106c27: 51 push %ecx
106c28: 51 push %ecx
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
size_t target_size = strlen( target ) + 1;
size_t size = sizeof( rtems_filesystem_mount_table_entry_t )
+ filesystemtype_size + source_size + target_size
106c29: 8b 4d 90 mov -0x70(%ebp),%ecx
106c2c: 8d 44 0a 65 lea 0x65(%edx,%ecx,1),%eax
const char *target = target_or_null != NULL ? target_or_null : "/";
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
size_t target_size = strlen( target ) + 1;
size_t size = sizeof( rtems_filesystem_mount_table_entry_t )
106c30: 03 45 8c add -0x74(%ebp),%eax
+ filesystemtype_size + source_size + target_size
+ sizeof( rtems_filesystem_global_location_t );
rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size );
106c33: 50 push %eax
106c34: 6a 01 push $0x1
106c36: e8 f1 f8 ff ff call 10652c <calloc>
106c3b: 89 c3 mov %eax,%ebx
if ( mt_entry != NULL ) {
106c3d: 83 c4 10 add $0x10,%esp
106c40: 85 c0 test %eax,%eax
106c42: 0f 84 03 02 00 00 je 106e4b <mount+0x29f> <== NEVER TAKEN
rtems_filesystem_global_location_t *mt_fs_root =
106c48: 8d 50 40 lea 0x40(%eax),%edx
(rtems_filesystem_global_location_t *)
((char *) mt_entry + sizeof( *mt_entry ));
char *str = (char *) mt_fs_root + sizeof( *mt_fs_root );
106c4b: 8d 40 64 lea 0x64(%eax),%eax
memcpy( str, filesystemtype, filesystemtype_size );
106c4e: 89 c7 mov %eax,%edi
106c50: 8b 4d 94 mov -0x6c(%ebp),%ecx
106c53: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
106c55: 89 7d 94 mov %edi,-0x6c(%ebp)
mt_entry->type = str;
106c58: 89 43 34 mov %eax,0x34(%ebx)
str += filesystemtype_size;
memcpy( str, source_or_null, source_size );
106c5b: 8b 75 08 mov 0x8(%ebp),%esi
106c5e: 8b 4d 90 mov -0x70(%ebp),%ecx
106c61: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
106c63: 89 f8 mov %edi,%eax
mt_entry->dev = str;
106c65: 8b 7d 94 mov -0x6c(%ebp),%edi
106c68: 89 7b 38 mov %edi,0x38(%ebx)
str += source_size;
memcpy( str, target, target_size );
106c6b: 89 c7 mov %eax,%edi
106c6d: 8b 75 88 mov -0x78(%ebp),%esi
106c70: 8b 4d 8c mov -0x74(%ebp),%ecx
106c73: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
mt_entry->target = str;
106c75: 89 43 30 mov %eax,0x30(%ebx)
str += target_size;
mt_entry->mounted = true;
106c78: c6 43 28 01 movb $0x1,0x28(%ebx)
mt_entry->mt_fs_root = mt_fs_root;
106c7c: 89 53 24 mov %edx,0x24(%ebx)
mt_entry->pathconf_limits_and_options = &rtems_filesystem_default_pathconf;
106c7f: c7 43 2c 64 f8 11 00 movl $0x11f864,0x2c(%ebx)
mt_fs_root->location.mt_entry = mt_entry;
106c86: 89 5b 54 mov %ebx,0x54(%ebx)
mt_fs_root->reference_count = 1;
106c89: c7 43 58 01 00 00 00 movl $0x1,0x58(%ebx)
void *starting_address,
size_t number_nodes,
size_t node_size
)
{
_Chain_Initialize( the_chain, starting_address, number_nodes, node_size );
106c90: 6a 24 push $0x24
106c92: 6a 01 push $0x1
106c94: 52 push %edx
rtems_chain_initialize(
106c95: 8d 43 14 lea 0x14(%ebx),%eax
106c98: 50 push %eax
106c99: e8 06 3a 00 00 call 10a6a4 <_Chain_Initialize>
filesystemtype,
&target_length
);
if ( mt_entry != NULL ) {
mt_entry->writeable = options == RTEMS_FILESYSTEM_READ_WRITE;
106c9e: 8a 45 14 mov 0x14(%ebp),%al
106ca1: 88 43 29 mov %al,0x29(%ebx)
106ca4: 80 63 29 01 andb $0x1,0x29(%ebx)
rv = (*fsmount_me_h)( mt_entry, data );
106ca8: 58 pop %eax
106ca9: 5a pop %edx
106caa: ff 75 18 pushl 0x18(%ebp)
106cad: 53 push %ebx
106cae: 8b 55 84 mov -0x7c(%ebp),%edx
106cb1: ff d2 call *%edx
106cb3: 89 c6 mov %eax,%esi
if ( rv == 0 ) {
106cb5: 83 c4 10 add $0x10,%esp
106cb8: 85 c0 test %eax,%eax
106cba: 0f 85 7d 01 00 00 jne 106e3d <mount+0x291>
if ( target != NULL ) {
106cc0: 83 7d 0c 00 cmpl $0x0,0xc(%ebp)
106cc4: 0f 84 c4 00 00 00 je 106d8e <mount+0x1e2>
{
int rv = 0;
rtems_filesystem_eval_path_context_t ctx;
int eval_flags = RTEMS_FS_PERMS_RWX
| RTEMS_FS_FOLLOW_LINK;
rtems_filesystem_location_info_t *currentloc =
106cca: 50 push %eax
106ccb: 6a 1f push $0x1f
106ccd: ff 75 0c pushl 0xc(%ebp)
rtems_filesystem_eval_path_start( &ctx, target, eval_flags );
106cd0: 8d 75 b0 lea -0x50(%ebp),%esi
{
int rv = 0;
rtems_filesystem_eval_path_context_t ctx;
int eval_flags = RTEMS_FS_PERMS_RWX
| RTEMS_FS_FOLLOW_LINK;
rtems_filesystem_location_info_t *currentloc =
106cd3: 56 push %esi
106cd4: e8 0c 0b 00 00 call 1077e5 <rtems_filesystem_eval_path_start>
static inline bool rtems_filesystem_location_is_root(
const rtems_filesystem_location_info_t *loc
)
{
const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry;
106cd9: 8b 50 14 mov 0x14(%eax),%edx
return (*mt_entry->ops->are_nodes_equal_h)(
106cdc: 59 pop %ecx
106cdd: 5f pop %edi
106cde: 8b 4a 0c mov 0xc(%edx),%ecx
106ce1: ff 72 24 pushl 0x24(%edx)
106ce4: 50 push %eax
106ce5: ff 51 10 call *0x10(%ecx)
rtems_filesystem_eval_path_start( &ctx, target, eval_flags );
if ( !rtems_filesystem_location_is_root( currentloc ) ) {
106ce8: 83 c4 10 add $0x10,%esp
106ceb: 84 c0 test %al,%al
106ced: 75 73 jne 106d62 <mount+0x1b6>
static inline void rtems_filesystem_eval_path_extract_currentloc(
rtems_filesystem_eval_path_context_t *ctx,
rtems_filesystem_location_info_t *get
)
{
rtems_filesystem_location_copy_and_detach(
106cef: 50 push %eax
106cf0: 50 push %eax
106cf1: 8d 45 c8 lea -0x38(%ebp),%eax
106cf4: 50 push %eax
rtems_filesystem_location_info_t targetloc;
rtems_filesystem_global_location_t *mt_point_node;
rtems_filesystem_eval_path_extract_currentloc( &ctx, &targetloc );
106cf5: 8d 75 98 lea -0x68(%ebp),%esi
106cf8: 56 push %esi
106cf9: e8 41 0e 00 00 call 107b3f <rtems_filesystem_location_copy_and_detach>
mt_point_node = rtems_filesystem_location_transform_to_global( &targetloc );
106cfe: 89 34 24 mov %esi,(%esp)
106d01: e8 ac 0f 00 00 call 107cb2 <rtems_filesystem_location_transform_to_global>
106d06: 89 c7 mov %eax,%edi
mt_entry->mt_point_node = mt_point_node;
106d08: 89 43 20 mov %eax,0x20(%ebx)
rv = (*mt_point_node->location.mt_entry->ops->mount_h)( mt_entry );
106d0b: 8b 40 14 mov 0x14(%eax),%eax
106d0e: 8b 40 0c mov 0xc(%eax),%eax
106d11: 89 1c 24 mov %ebx,(%esp)
106d14: ff 50 30 call *0x30(%eax)
106d17: 89 c6 mov %eax,%esi
if ( rv == 0 ) {
106d19: 83 c4 10 add $0x10,%esp
106d1c: 85 c0 test %eax,%eax
106d1e: 75 34 jne 106d54 <mount+0x1a8>
*/
#include <rtems/userenv.h>
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
106d20: 50 push %eax
106d21: 6a 00 push $0x0
106d23: 6a 00 push $0x0
106d25: ff 35 d8 e2 12 00 pushl 0x12e2d8
106d2b: e8 60 30 00 00 call 109d90 <rtems_semaphore_obtain>
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
106d30: a1 fc c0 12 00 mov 0x12c0fc,%eax
the_node->next = tail;
106d35: c7 03 f8 c0 12 00 movl $0x12c0f8,(%ebx)
tail->previous = the_node;
106d3b: 89 1d fc c0 12 00 mov %ebx,0x12c0fc
old_last->next = the_node;
106d41: 89 18 mov %ebx,(%eax)
the_node->previous = old_last;
106d43: 89 43 04 mov %eax,0x4(%ebx)
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
106d46: 58 pop %eax
106d47: ff 35 d8 e2 12 00 pushl 0x12e2d8
106d4d: e8 2e 31 00 00 call 109e80 <rtems_semaphore_release>
106d52: eb 09 jmp 106d5d <mount+0x1b1>
&rtems_filesystem_mount_table,
&mt_entry->mt_node
);
rtems_filesystem_mt_unlock();
} else {
rtems_filesystem_global_location_release( mt_point_node );
106d54: 83 ec 0c sub $0xc,%esp
106d57: 57 push %edi
106d58: e8 6c 0e 00 00 call 107bc9 <rtems_filesystem_global_location_release>
106d5d: 83 c4 10 add $0x10,%esp
106d60: eb 10 jmp 106d72 <mount+0x1c6>
}
} else {
rtems_filesystem_eval_path_error( &ctx, EBUSY );
106d62: 50 push %eax
106d63: 50 push %eax
106d64: 6a 10 push $0x10
106d66: 56 push %esi
106d67: e8 52 08 00 00 call 1075be <rtems_filesystem_eval_path_error>
106d6c: 83 c4 10 add $0x10,%esp
rv = -1;
106d6f: 83 ce ff or $0xffffffff,%esi
}
rtems_filesystem_eval_path_cleanup( &ctx );
106d72: 83 ec 0c sub $0xc,%esp
106d75: 8d 45 b0 lea -0x50(%ebp),%eax
106d78: 50 push %eax
106d79: e8 23 0b 00 00 call 1078a1 <rtems_filesystem_eval_path_cleanup>
106d7e: 83 c4 10 add $0x10,%esp
rv = register_subordinate_file_system( mt_entry, target );
} else {
rv = register_root_file_system( mt_entry );
}
if ( rv != 0 ) {
106d81: 85 f6 test %esi,%esi
106d83: 0f 84 d0 00 00 00 je 106e59 <mount+0x2ad>
106d89: e9 93 00 00 00 jmp 106e21 <mount+0x275>
*/
#include <rtems/userenv.h>
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
106d8e: 50 push %eax
106d8f: 6a 00 push $0x0
106d91: 6a 00 push $0x0
106d93: ff 35 d8 e2 12 00 pushl 0x12e2d8
106d99: e8 f2 2f 00 00 call 109d90 <rtems_semaphore_obtain>
)
{
int rv = 0;
rtems_filesystem_mt_lock();
if ( rtems_chain_is_empty( &rtems_filesystem_mount_table ) ) {
106d9e: 83 c4 10 add $0x10,%esp
106da1: 81 3d f4 c0 12 00 f8 cmpl $0x12c0f8,0x12c0f4
106da8: c0 12 00
106dab: 75 18 jne 106dc5 <mount+0x219> <== NEVER TAKEN
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
106dad: a1 fc c0 12 00 mov 0x12c0fc,%eax
the_node->next = tail;
106db2: c7 03 f8 c0 12 00 movl $0x12c0f8,(%ebx)
tail->previous = the_node;
106db8: 89 1d fc c0 12 00 mov %ebx,0x12c0fc
old_last->next = the_node;
106dbe: 89 18 mov %ebx,(%eax)
the_node->previous = old_last;
106dc0: 89 43 04 mov %eax,0x4(%ebx)
106dc3: eb 0e jmp 106dd3 <mount+0x227>
rtems_chain_append_unprotected(
&rtems_filesystem_mount_table,
&mt_entry->mt_node
);
} else {
errno = EINVAL;
106dc5: e8 12 a1 00 00 call 110edc <__errno> <== NOT EXECUTED
106dca: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
rv = -1;
106dd0: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
106dd3: 83 ec 0c sub $0xc,%esp
106dd6: ff 35 d8 e2 12 00 pushl 0x12e2d8
106ddc: e8 9f 30 00 00 call 109e80 <rtems_semaphore_release>
}
rtems_filesystem_mt_unlock();
if ( rv == 0 ) {
106de1: 83 c4 10 add $0x10,%esp
106de4: 85 f6 test %esi,%esi
106de6: 75 39 jne 106e21 <mount+0x275> <== NEVER TAKEN
rtems_filesystem_global_location_t *new_fs_root =
rtems_filesystem_global_location_obtain( &mt_entry->mt_fs_root );
106de8: 83 c3 24 add $0x24,%ebx
rv = -1;
}
rtems_filesystem_mt_unlock();
if ( rv == 0 ) {
rtems_filesystem_global_location_t *new_fs_root =
106deb: 83 ec 0c sub $0xc,%esp
106dee: 53 push %ebx
106def: e8 37 0e 00 00 call 107c2b <rtems_filesystem_global_location_obtain>
106df4: 89 c7 mov %eax,%edi
rtems_filesystem_global_location_obtain( &mt_entry->mt_fs_root );
rtems_filesystem_global_location_t *new_fs_current =
106df6: 89 1c 24 mov %ebx,(%esp)
106df9: e8 2d 0e 00 00 call 107c2b <rtems_filesystem_global_location_obtain>
106dfe: 89 c3 mov %eax,%ebx
rtems_filesystem_global_location_obtain( &mt_entry->mt_fs_root );
rtems_filesystem_global_location_assign(
106e00: 58 pop %eax
106e01: 5a pop %edx
106e02: 57 push %edi
106e03: a1 14 c1 12 00 mov 0x12c114,%eax
106e08: 83 c0 04 add $0x4,%eax
106e0b: 50 push %eax
106e0c: e8 fd 0d 00 00 call 107c0e <rtems_filesystem_global_location_assign>
&rtems_filesystem_root,
new_fs_root
);
rtems_filesystem_global_location_assign(
106e11: 59 pop %ecx
106e12: 5f pop %edi
106e13: 53 push %ebx
106e14: ff 35 14 c1 12 00 pushl 0x12c114
106e1a: e8 ef 0d 00 00 call 107c0e <rtems_filesystem_global_location_assign>
106e1f: eb 25 jmp 106e46 <mount+0x29a>
} else {
rv = register_root_file_system( mt_entry );
}
if ( rv != 0 ) {
(*mt_entry->ops->fsunmount_me_h)( mt_entry );
106e21: 83 ec 0c sub $0xc,%esp
106e24: 8b 43 0c mov 0xc(%ebx),%eax
106e27: 53 push %ebx
106e28: ff 50 3c call *0x3c(%eax)
106e2b: 83 c4 10 add $0x10,%esp
106e2e: eb 0d jmp 106e3d <mount+0x291>
} else {
errno = EINVAL;
rv = -1;
}
} else {
errno = EINVAL;
106e30: e8 a7 a0 00 00 call 110edc <__errno>
106e35: c7 00 16 00 00 00 movl $0x16,(%eax)
106e3b: eb 19 jmp 106e56 <mount+0x2aa>
(*mt_entry->ops->fsunmount_me_h)( mt_entry );
}
}
if ( rv != 0 ) {
free( mt_entry );
106e3d: 83 ec 0c sub $0xc,%esp
106e40: 53 push %ebx
106e41: e8 ee f8 ff ff call 106734 <free>
106e46: 83 c4 10 add $0x10,%esp
106e49: eb 0e jmp 106e59 <mount+0x2ad>
}
} else {
errno = ENOMEM;
106e4b: e8 8c a0 00 00 call 110edc <__errno> <== NOT EXECUTED
106e50: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED
rv = -1;
106e56: 83 ce ff or $0xffffffff,%esi
errno = EINVAL;
rv = -1;
}
return rv;
}
106e59: 89 f0 mov %esi,%eax
106e5b: 8d 65 f4 lea -0xc(%ebp),%esp
106e5e: 5b pop %ebx
106e5f: 5e pop %esi
106e60: 5f pop %edi
106e61: 5d pop %ebp
106e62: c3 ret
0010a5b8 <mount_and_make_target_path>:
const char *target,
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
10a5b8: 55 push %ebp
10a5b9: 89 e5 mov %esp,%ebp
10a5bb: 57 push %edi
10a5bc: 56 push %esi
10a5bd: 53 push %ebx
10a5be: 83 ec 1c sub $0x1c,%esp
10a5c1: 8b 75 08 mov 0x8(%ebp),%esi
10a5c4: 8b 5d 0c mov 0xc(%ebp),%ebx
10a5c7: 8b 7d 10 mov 0x10(%ebp),%edi
10a5ca: 8b 55 14 mov 0x14(%ebp),%edx
10a5cd: 8b 4d 18 mov 0x18(%ebp),%ecx
int rv = -1;
if (target != NULL) {
10a5d0: 85 db test %ebx,%ebx
10a5d2: 74 3b je 10a60f <mount_and_make_target_path+0x57><== NEVER TAKEN
rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO);
10a5d4: 50 push %eax
10a5d5: 50 push %eax
10a5d6: 68 ff 01 00 00 push $0x1ff
10a5db: 53 push %ebx
10a5dc: 89 55 e4 mov %edx,-0x1c(%ebp)
10a5df: 89 4d e0 mov %ecx,-0x20(%ebp)
10a5e2: e8 d1 0a 00 00 call 10b0b8 <rtems_mkdir>
if (rv == 0) {
10a5e7: 83 c4 10 add $0x10,%esp
10a5ea: 85 c0 test %eax,%eax
10a5ec: 8b 55 e4 mov -0x1c(%ebp),%edx
10a5ef: 8b 4d e0 mov -0x20(%ebp),%ecx
10a5f2: 75 29 jne 10a61d <mount_and_make_target_path+0x65><== NEVER TAKEN
rv = mount(
10a5f4: 89 4d 18 mov %ecx,0x18(%ebp)
10a5f7: 89 55 14 mov %edx,0x14(%ebp)
10a5fa: 89 7d 10 mov %edi,0x10(%ebp)
10a5fd: 89 5d 0c mov %ebx,0xc(%ebp)
10a600: 89 75 08 mov %esi,0x8(%ebp)
} else {
errno = EINVAL;
}
return rv;
}
10a603: 8d 65 f4 lea -0xc(%ebp),%esp
10a606: 5b pop %ebx
10a607: 5e pop %esi
10a608: 5f pop %edi
10a609: 5d pop %ebp
int rv = -1;
if (target != NULL) {
rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO);
if (rv == 0) {
rv = mount(
10a60a: e9 19 00 00 00 jmp 10a628 <mount>
options,
data
);
}
} else {
errno = EINVAL;
10a60f: e8 b8 4b 01 00 call 11f1cc <__errno>
10a614: c7 00 16 00 00 00 movl $0x16,(%eax)
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
int rv = -1;
10a61a: 83 c8 ff or $0xffffffff,%eax
} else {
errno = EINVAL;
}
return rv;
}
10a61d: 8d 65 f4 lea -0xc(%ebp),%esp
10a620: 5b pop %ebx
10a621: 5e pop %esi
10a622: 5f pop %edi
10a623: 5d pop %ebp
10a624: c3 ret
0011623c <msdos_creat_node>:
msdos_node_type_t type,
const char *name,
int name_len,
mode_t mode,
const fat_file_fd_t *link_fd)
{
11623c: 55 push %ebp
11623d: 89 e5 mov %esp,%ebp
11623f: 57 push %edi
116240: 56 push %esi
116241: 53 push %ebx
116242: 81 ec bc 00 00 00 sub $0xbc,%esp
116248: 8b 75 1c mov 0x1c(%ebp),%esi
int rc = RC_OK;
ssize_t ret = 0;
msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info;
11624b: 8b 55 08 mov 0x8(%ebp),%edx
11624e: 8b 42 14 mov 0x14(%edx),%eax
116251: 8b 58 08 mov 0x8(%eax),%ebx
fat_file_fd_t *parent_fat_fd = parent_loc->node_access;
116254: 8b 52 08 mov 0x8(%edx),%edx
116257: 89 95 40 ff ff ff mov %edx,-0xc0(%ebp)
fat_file_fd_t *fat_fd = NULL;
11625d: c7 85 54 ff ff ff 00 movl $0x0,-0xac(%ebp)
116264: 00 00 00
time_t time_ret = 0;
uint16_t time_val = 0;
116267: 66 c7 85 50 ff ff ff movw $0x0,-0xb0(%ebp)
11626e: 00 00
uint16_t date = 0;
116270: 66 c7 85 52 ff ff ff movw $0x0,-0xae(%ebp)
116277: 00 00
static inline void
fat_dir_pos_init(
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
116279: c7 85 58 ff ff ff 00 movl $0x0,-0xa8(%ebp)
116280: 00 00 00
dir_pos->sname.ofs = 0;
116283: c7 85 5c ff ff ff 00 movl $0x0,-0xa4(%ebp)
11628a: 00 00 00
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
11628d: c7 85 60 ff ff ff ff movl $0xffffffff,-0xa0(%ebp)
116294: ff ff ff
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
116297: c7 85 64 ff ff ff ff movl $0xffffffff,-0x9c(%ebp)
11629e: ff ff ff
uint32_t sec = 0;
uint32_t byte = 0;
fat_dir_pos_init(&dir_pos);
memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
1162a1: 8d 95 68 ff ff ff lea -0x98(%ebp),%edx
1162a7: 31 c0 xor %eax,%eax
1162a9: b9 08 00 00 00 mov $0x8,%ecx
1162ae: 89 d7 mov %edx,%edi
1162b0: f3 ab rep stos %eax,%es:(%edi)
memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2);
1162b2: 8d 4d a8 lea -0x58(%ebp),%ecx
1162b5: 89 8d 44 ff ff ff mov %ecx,-0xbc(%ebp)
1162bb: b9 10 00 00 00 mov $0x10,%ecx
1162c0: 8b bd 44 ff ff ff mov -0xbc(%ebp),%edi
1162c6: f3 ab rep stos %eax,%es:(%edi)
if (name_len > MSDOS_NAME_MAX_LFN_WITH_DOT) {
1162c8: 81 7d 14 04 01 00 00 cmpl $0x104,0x14(%ebp)
1162cf: 7e 0d jle 1162de <msdos_creat_node+0xa2> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one(ENAMETOOLONG);
1162d1: e8 3a 35 00 00 call 119810 <__errno> <== NOT EXECUTED
1162d6: c7 00 5b 00 00 00 movl $0x5b,(%eax) <== NOT EXECUTED
1162dc: eb 22 jmp 116300 <msdos_creat_node+0xc4> <== NOT EXECUTED
}
name_type = msdos_long_to_short (name, name_len,
1162de: 6a 0b push $0xb
1162e0: 52 push %edx
1162e1: ff 75 14 pushl 0x14(%ebp)
1162e4: ff 75 10 pushl 0x10(%ebp)
1162e7: e8 22 04 00 00 call 11670e <msdos_long_to_short>
1162ec: 89 c7 mov %eax,%edi
MSDOS_DIR_NAME(short_node),
MSDOS_NAME_MAX);
if (name_type == MSDOS_NAME_INVALID) {
1162ee: 83 c4 10 add $0x10,%esp
1162f1: 85 c0 test %eax,%eax
1162f3: 75 13 jne 116308 <msdos_creat_node+0xcc> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one(EINVAL);
1162f5: e8 16 35 00 00 call 119810 <__errno> <== NOT EXECUTED
1162fa: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
116300: 83 cf ff or $0xffffffff,%edi <== NOT EXECUTED
116303: e9 a7 02 00 00 jmp 1165af <msdos_creat_node+0x373><== NOT EXECUTED
}
/* fill reserved field */
*MSDOS_DIR_NT_RES(short_node) = MSDOS_RES_NT_VALUE;
116308: c6 85 74 ff ff ff 00 movb $0x0,-0x8c(%ebp)
/* set up last write date and time */
time_ret = time(NULL);
11630f: 83 ec 0c sub $0xc,%esp
116312: 6a 00 push $0x0
116314: e8 4b 78 00 00 call 11db64 <time>
if ( time_ret == -1 )
116319: 83 c4 10 add $0x10,%esp
11631c: 83 f8 ff cmp $0xffffffff,%eax
11631f: 75 02 jne 116323 <msdos_creat_node+0xe7> <== ALWAYS TAKEN
116321: eb dd jmp 116300 <msdos_creat_node+0xc4> <== NOT EXECUTED
return -1;
msdos_date_unix2dos(time_ret, &date, &time_val);
116323: 52 push %edx
116324: 8d 95 50 ff ff ff lea -0xb0(%ebp),%edx
11632a: 52 push %edx
11632b: 8d 95 52 ff ff ff lea -0xae(%ebp),%edx
116331: 52 push %edx
116332: 50 push %eax
116333: e8 34 27 00 00 call 118a6c <msdos_date_unix2dos>
*MSDOS_DIR_CRT_TIME(short_node) = CT_LE_W(time_val);
116338: 8b 95 50 ff ff ff mov -0xb0(%ebp),%edx
11633e: 66 89 95 76 ff ff ff mov %dx,-0x8a(%ebp)
*MSDOS_DIR_CRT_DATE(short_node) = CT_LE_W(date);
116345: 66 8b 85 52 ff ff ff mov -0xae(%ebp),%ax
11634c: 66 89 85 78 ff ff ff mov %ax,-0x88(%ebp)
*MSDOS_DIR_WRITE_TIME(short_node) = CT_LE_W(time_val);
116353: 66 89 95 7e ff ff ff mov %dx,-0x82(%ebp)
*MSDOS_DIR_WRITE_DATE(short_node) = CT_LE_W(date);
11635a: 66 89 45 80 mov %ax,-0x80(%ebp)
*MSDOS_DIR_LAST_ACCESS_DATE(short_node) = CT_LE_W(date);
11635e: 66 89 85 7a ff ff ff mov %ax,-0x86(%ebp)
/* initialize directory/file size */
*MSDOS_DIR_FILE_SIZE(short_node) = MSDOS_INIT_DIR_SIZE;
116365: c7 45 84 00 00 00 00 movl $0x0,-0x7c(%ebp)
if (type == MSDOS_DIRECTORY) {
11636c: 83 c4 10 add $0x10,%esp
11636f: 83 7d 0c 00 cmpl $0x0,0xc(%ebp)
116373: 75 0c jne 116381 <msdos_creat_node+0x145>
*MSDOS_DIR_ATTR(short_node) |= MSDOS_ATTR_DIRECTORY;
116375: 80 8d 73 ff ff ff 10 orb $0x10,-0x8d(%ebp)
11637c: e9 a0 00 00 00 jmp 116421 <msdos_creat_node+0x1e5>
}
else if (type == MSDOS_HARD_LINK) {
116381: 83 7d 0c 02 cmpl $0x2,0xc(%ebp)
116385: 0f 85 8f 00 00 00 jne 11641a <msdos_creat_node+0x1de><== ALWAYS TAKEN
* node to the newly created
*/
/*
* read the original directory entry
*/
sec = fat_cluster_num_to_sector_num(&fs_info->fat,
11638b: 8b 46 20 mov 0x20(%esi),%eax <== NOT EXECUTED
fat_cluster_num_to_sector_num(
const fat_fs_info_t *fs_info,
uint32_t cln
)
{
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
11638e: 85 c0 test %eax,%eax <== NOT EXECUTED
116390: 75 0b jne 11639d <msdos_creat_node+0x161><== NOT EXECUTED
116392: f6 43 0a 03 testb $0x3,0xa(%ebx) <== NOT EXECUTED
116396: 74 05 je 11639d <msdos_creat_node+0x161><== NOT EXECUTED
return fs_info->vol.rdir_loc;
116398: 8b 43 1c mov 0x1c(%ebx),%eax <== NOT EXECUTED
11639b: eb 0c jmp 1163a9 <msdos_creat_node+0x16d><== NOT EXECUTED
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
11639d: 83 e8 02 sub $0x2,%eax <== NOT EXECUTED
1163a0: 0f b6 4b 05 movzbl 0x5(%ebx),%ecx <== NOT EXECUTED
1163a4: d3 e0 shl %cl,%eax <== NOT EXECUTED
1163a6: 03 43 30 add 0x30(%ebx),%eax <== NOT EXECUTED
link_fd->dir_pos.sname.cln);
sec += (link_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
1163a9: 8b 56 24 mov 0x24(%esi),%edx <== NOT EXECUTED
byte = (link_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1));
ret = _fat_block_read(&fs_info->fat,
1163ac: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
sec, byte, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE,
link_node);
1163af: 8d 4d 88 lea -0x78(%ebp),%ecx <== NOT EXECUTED
sec = fat_cluster_num_to_sector_num(&fs_info->fat,
link_fd->dir_pos.sname.cln);
sec += (link_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
byte = (link_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1));
ret = _fat_block_read(&fs_info->fat,
1163b2: 51 push %ecx <== NOT EXECUTED
1163b3: 6a 20 push $0x20 <== NOT EXECUTED
* read the original directory entry
*/
sec = fat_cluster_num_to_sector_num(&fs_info->fat,
link_fd->dir_pos.sname.cln);
sec += (link_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
byte = (link_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1));
1163b5: 0f b7 0b movzwl (%ebx),%ecx <== NOT EXECUTED
1163b8: 49 dec %ecx <== NOT EXECUTED
1163b9: 21 d1 and %edx,%ecx <== NOT EXECUTED
ret = _fat_block_read(&fs_info->fat,
1163bb: 51 push %ecx <== NOT EXECUTED
/*
* read the original directory entry
*/
sec = fat_cluster_num_to_sector_num(&fs_info->fat,
link_fd->dir_pos.sname.cln);
sec += (link_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
1163bc: 0f b6 4b 02 movzbl 0x2(%ebx),%ecx <== NOT EXECUTED
1163c0: d3 ea shr %cl,%edx <== NOT EXECUTED
1163c2: 01 c2 add %eax,%edx <== NOT EXECUTED
byte = (link_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1));
ret = _fat_block_read(&fs_info->fat,
1163c4: 52 push %edx <== NOT EXECUTED
1163c5: 53 push %ebx <== NOT EXECUTED
1163c6: e8 14 c1 ff ff call 1124df <_fat_block_read> <== NOT EXECUTED
sec, byte, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE,
link_node);
if (ret < 0) {
1163cb: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
1163ce: 85 c0 test %eax,%eax <== NOT EXECUTED
1163d0: 0f 88 2a ff ff ff js 116300 <msdos_creat_node+0xc4> <== NOT EXECUTED
return -1;
}
/*
* copy various attributes
*/
*MSDOS_DIR_ATTR(short_node) =*MSDOS_DIR_ATTR(link_node);
1163d6: 8a 45 93 mov -0x6d(%ebp),%al <== NOT EXECUTED
*MSDOS_DIR_CRT_TIME_TENTH(short_node)=*MSDOS_DIR_CRT_TIME_TENTH(link_node);
1163d9: 8a 55 95 mov -0x6b(%ebp),%dl <== NOT EXECUTED
1163dc: 88 95 75 ff ff ff mov %dl,-0x8b(%ebp) <== NOT EXECUTED
*MSDOS_DIR_CRT_TIME(short_node) =*MSDOS_DIR_CRT_TIME(link_node);
1163e2: 66 8b 55 96 mov -0x6a(%ebp),%dx <== NOT EXECUTED
1163e6: 66 89 95 76 ff ff ff mov %dx,-0x8a(%ebp) <== NOT EXECUTED
*MSDOS_DIR_CRT_DATE(short_node) =*MSDOS_DIR_CRT_DATE(link_node);
1163ed: 8b 55 98 mov -0x68(%ebp),%edx <== NOT EXECUTED
1163f0: 66 89 95 78 ff ff ff mov %dx,-0x88(%ebp) <== NOT EXECUTED
/*
* copy/set "file size", "first cluster"
*/
*MSDOS_DIR_FILE_SIZE(short_node) =*MSDOS_DIR_FILE_SIZE(link_node);
1163f7: 8b 55 a4 mov -0x5c(%ebp),%edx <== NOT EXECUTED
1163fa: 89 55 84 mov %edx,-0x7c(%ebp) <== NOT EXECUTED
*MSDOS_DIR_FIRST_CLUSTER_LOW(short_node) =
1163fd: 66 8b 55 a2 mov -0x5e(%ebp),%dx <== NOT EXECUTED
116401: 66 89 55 82 mov %dx,-0x7e(%ebp) <== NOT EXECUTED
*MSDOS_DIR_FIRST_CLUSTER_LOW(link_node);
*MSDOS_DIR_FIRST_CLUSTER_HI(short_node) =
116405: 8b 55 9c mov -0x64(%ebp),%edx <== NOT EXECUTED
116408: 66 89 95 7c ff ff ff mov %dx,-0x84(%ebp) <== NOT EXECUTED
*MSDOS_DIR_FIRST_CLUSTER_HI(link_node);
/*
* set "archive bit" due to changes
*/
*MSDOS_DIR_ATTR(short_node) |= MSDOS_ATTR_ARCHIVE;
11640f: 83 c8 20 or $0x20,%eax <== NOT EXECUTED
116412: 88 85 73 ff ff ff mov %al,-0x8d(%ebp) <== NOT EXECUTED
116418: eb 07 jmp 116421 <msdos_creat_node+0x1e5><== NOT EXECUTED
}
else { /* regular file... */
*MSDOS_DIR_ATTR(short_node) |= MSDOS_ATTR_ARCHIVE;
11641a: 80 8d 73 ff ff ff 20 orb $0x20,-0x8d(%ebp)
/*
* find free space in the parent directory and write new initialized
* FAT 32 Bytes Directory Entry Structure to the disk
*/
rc = msdos_get_name_node(parent_loc, true, name, name_len,
116421: 50 push %eax
name_type, &dir_pos, short_node);
116422: 8d 85 68 ff ff ff lea -0x98(%ebp),%eax
116428: 89 85 44 ff ff ff mov %eax,-0xbc(%ebp)
/*
* find free space in the parent directory and write new initialized
* FAT 32 Bytes Directory Entry Structure to the disk
*/
rc = msdos_get_name_node(parent_loc, true, name, name_len,
11642e: 50 push %eax
11642f: 8d b5 58 ff ff ff lea -0xa8(%ebp),%esi
116435: 56 push %esi
116436: 57 push %edi
116437: ff 75 14 pushl 0x14(%ebp)
11643a: ff 75 10 pushl 0x10(%ebp)
11643d: 6a 01 push $0x1
11643f: ff 75 08 pushl 0x8(%ebp)
116442: e8 df 11 00 00 call 117626 <msdos_get_name_node>
116447: 89 c7 mov %eax,%edi
name_type, &dir_pos, short_node);
if ( rc != RC_OK )
116449: 83 c4 20 add $0x20,%esp
11644c: 85 c0 test %eax,%eax
11644e: 0f 85 5b 01 00 00 jne 1165af <msdos_creat_node+0x373><== NEVER TAKEN
/*
* if we create a new file we are done, if directory there are more steps
* to do
*/
if (type == MSDOS_DIRECTORY)
116454: 83 7d 0c 00 cmpl $0x0,0xc(%ebp)
116458: 0f 85 51 01 00 00 jne 1165af <msdos_creat_node+0x373>
{
/* open new directory as fat-file */
rc = fat_file_open(&fs_info->fat, &dir_pos, &fat_fd);
11645e: 57 push %edi
11645f: 8d 85 54 ff ff ff lea -0xac(%ebp),%eax
116465: 50 push %eax
116466: 56 push %esi
116467: 53 push %ebx
116468: e8 29 b4 ff ff call 111896 <fat_file_open>
11646d: 89 c7 mov %eax,%edi
if (rc != RC_OK)
11646f: 83 c4 10 add $0x10,%esp
116472: 85 c0 test %eax,%eax
116474: 0f 85 1a 01 00 00 jne 116594 <msdos_creat_node+0x358><== NEVER TAKEN
/*
* we opened fat-file for node we just created, so initialize fat-file
* descritor
*/
fat_fd->fat_file_size = 0;
11647a: 8b 95 54 ff ff ff mov -0xac(%ebp),%edx
116480: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx)
fat_fd->fat_file_type = FAT_DIRECTORY;
116487: c7 42 10 00 00 00 00 movl $0x0,0x10(%edx)
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
11648e: c7 42 14 00 00 20 00 movl $0x200000,0x14(%edx)
/*
* dot and dotdot entries are identical to new node except the
* names
*/
memcpy(DOT_NODE_P(dot_dotdot), short_node,
116495: 8d 7d a8 lea -0x58(%ebp),%edi
116498: b9 08 00 00 00 mov $0x8,%ecx
11649d: 8b b5 44 ff ff ff mov -0xbc(%ebp),%esi
1164a3: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
memcpy(DOTDOT_NODE_P(dot_dotdot), short_node,
1164a5: 8d 7d c8 lea -0x38(%ebp),%edi
1164a8: b1 08 mov $0x8,%cl
1164aa: 8b b5 44 ff ff ff mov -0xbc(%ebp),%esi
1164b0: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
memcpy(MSDOS_DIR_NAME(DOT_NODE_P(dot_dotdot)), MSDOS_DOT_NAME,
1164b2: 8d 45 a8 lea -0x58(%ebp),%eax
1164b5: 8b 35 b4 8b 12 00 mov 0x128bb4,%esi
1164bb: b1 0b mov $0xb,%cl
1164bd: 89 c7 mov %eax,%edi
1164bf: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
MSDOS_NAME_MAX);
memcpy(MSDOS_DIR_NAME(DOTDOT_NODE_P(dot_dotdot)), MSDOS_DOTDOT_NAME,
1164c1: 8d 45 c8 lea -0x38(%ebp),%eax
1164c4: 8b 35 b0 8b 12 00 mov 0x128bb0,%esi
1164ca: b1 0b mov $0xb,%cl
1164cc: 89 c7 mov %eax,%edi
1164ce: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
/*
* here we can ommit FAT32 condition because for all FAT types dirs
* right under root dir should contain 0 in dotdot entry but for
* FAT12/16 parent_fat_fd->cluster_num always contains such value
*/
if ((FAT_FD_OF_ROOT_DIR(parent_fat_fd)) &&
1164d0: 8b 8d 40 ff ff ff mov -0xc0(%ebp),%ecx
1164d6: 83 79 20 01 cmpl $0x1,0x20(%ecx)
1164da: 75 1a jne 1164f6 <msdos_creat_node+0x2ba>
1164dc: 83 79 24 00 cmpl $0x0,0x24(%ecx)
1164e0: 75 14 jne 1164f6 <msdos_creat_node+0x2ba><== NEVER TAKEN
1164e2: f6 43 0a 04 testb $0x4,0xa(%ebx)
1164e6: 74 0e je 1164f6 <msdos_creat_node+0x2ba><== ALWAYS TAKEN
(fs_info->fat.vol.type & FAT_FAT32))
{
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOTDOT_NODE_P(dot_dotdot)) = 0x0000;
1164e8: 66 c7 45 e2 00 00 movw $0x0,-0x1e(%ebp) <== NOT EXECUTED
*MSDOS_DIR_FIRST_CLUSTER_HI(DOTDOT_NODE_P(dot_dotdot)) = 0x0000;
1164ee: 66 c7 45 dc 00 00 movw $0x0,-0x24(%ebp) <== NOT EXECUTED
1164f4: eb 14 jmp 11650a <msdos_creat_node+0x2ce><== NOT EXECUTED
}
else
{
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOTDOT_NODE_P(dot_dotdot)) =
CT_LE_W((uint16_t )((parent_fat_fd->cln) & 0x0000FFFF));
1164f6: 8b 8d 40 ff ff ff mov -0xc0(%ebp),%ecx
1164fc: 8b 41 1c mov 0x1c(%ecx),%eax
1164ff: 66 89 45 e2 mov %ax,-0x1e(%ebp)
*MSDOS_DIR_FIRST_CLUSTER_HI(DOTDOT_NODE_P(dot_dotdot)) =
CT_LE_W((uint16_t )(((parent_fat_fd->cln) & 0xFFFF0000)>>16));
116503: c1 e8 10 shr $0x10,%eax
116506: 66 89 45 dc mov %ax,-0x24(%ebp)
/*
* write dot and dotdot entries to new fat-file: currently fat-file
* correspondes to a new node is zero length, so it will be extended
* by one cluster and entries will be written
*/
ret = fat_file_write(&fs_info->fat, fat_fd, 0,
11650a: 83 ec 0c sub $0xc,%esp
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2,
(uint8_t *)dot_dotdot);
11650d: 8d 75 a8 lea -0x58(%ebp),%esi
/*
* write dot and dotdot entries to new fat-file: currently fat-file
* correspondes to a new node is zero length, so it will be extended
* by one cluster and entries will be written
*/
ret = fat_file_write(&fs_info->fat, fat_fd, 0,
116510: 56 push %esi
116511: 6a 40 push $0x40
116513: 6a 00 push $0x0
116515: 52 push %edx
116516: 53 push %ebx
116517: e8 66 ba ff ff call 111f82 <fat_file_write>
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2,
(uint8_t *)dot_dotdot);
if (ret < 0)
11651c: 83 c4 20 add $0x20,%esp
11651f: 85 c0 test %eax,%eax
116521: 78 5d js 116580 <msdos_creat_node+0x344><== NEVER TAKEN
rc = -1;
goto error;
}
/* increment fat-file size by cluster size */
fat_fd->fat_file_size += fs_info->fat.vol.bpc;
116523: 8b 85 54 ff ff ff mov -0xac(%ebp),%eax
116529: 0f b7 53 06 movzwl 0x6(%ebx),%edx
11652d: 01 50 18 add %edx,0x18(%eax)
/* set up cluster num for dot entry */
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOT_NODE_P(dot_dotdot)) =
CT_LE_W((uint16_t )((fat_fd->cln) & 0x0000FFFF));
116530: 8b 50 1c mov 0x1c(%eax),%edx
116533: 66 89 55 c2 mov %dx,-0x3e(%ebp)
*MSDOS_DIR_FIRST_CLUSTER_HI(DOT_NODE_P(dot_dotdot)) =
CT_LE_W((uint16_t )(((fat_fd->cln) & 0xFFFF0000) >> 16));
116537: c1 ea 10 shr $0x10,%edx
11653a: 66 89 55 bc mov %dx,-0x44(%ebp)
/* rewrite dot entry */
ret = fat_file_write(&fs_info->fat, fat_fd, 0,
11653e: 83 ec 0c sub $0xc,%esp
116541: 56 push %esi
116542: 6a 20 push $0x20
116544: 6a 00 push $0x0
116546: 50 push %eax
116547: 53 push %ebx
116548: e8 35 ba ff ff call 111f82 <fat_file_write>
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE,
(uint8_t *)DOT_NODE_P(dot_dotdot));
if (ret < 0)
11654d: 83 c4 20 add $0x20,%esp
116550: 85 c0 test %eax,%eax
116552: 78 2c js 116580 <msdos_creat_node+0x344><== NEVER TAKEN
rc = -1;
goto error;
}
/* write first cluster num of a new directory to disk */
rc = msdos_set_first_cluster_num(parent_loc->mt_entry, fat_fd);
116554: 56 push %esi
116555: 56 push %esi
116556: ff b5 54 ff ff ff pushl -0xac(%ebp)
11655c: 8b 55 08 mov 0x8(%ebp),%edx
11655f: ff 72 14 pushl 0x14(%edx)
116562: e8 ee 03 00 00 call 116955 <msdos_set_first_cluster_num>
116567: 89 c7 mov %eax,%edi
if (rc != RC_OK)
116569: 83 c4 10 add $0x10,%esp
11656c: 85 c0 test %eax,%eax
11656e: 75 13 jne 116583 <msdos_creat_node+0x347><== NEVER TAKEN
goto error;
fat_file_close(&fs_info->fat, fat_fd);
116570: 51 push %ecx
116571: 51 push %ecx
116572: ff b5 54 ff ff ff pushl -0xac(%ebp)
116578: 53 push %ebx
116579: e8 ba b6 ff ff call 111c38 <fat_file_close>
11657e: eb 2c jmp 1165ac <msdos_creat_node+0x370>
ret = fat_file_write(&fs_info->fat, fat_fd, 0,
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2,
(uint8_t *)dot_dotdot);
if (ret < 0)
{
rc = -1;
116580: 83 cf ff or $0xffffffff,%edi <== NOT EXECUTED
fat_file_close(&fs_info->fat, fat_fd);
}
return RC_OK;
error:
fat_file_close(&fs_info->fat, fat_fd);
116583: 52 push %edx <== NOT EXECUTED
116584: 52 push %edx <== NOT EXECUTED
116585: ff b5 54 ff ff ff pushl -0xac(%ebp) <== NOT EXECUTED
11658b: 53 push %ebx <== NOT EXECUTED
11658c: e8 a7 b6 ff ff call 111c38 <fat_file_close> <== NOT EXECUTED
116591: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
err:
/* mark the used 32bytes structure on the disk as free */
msdos_set_first_char4file_name(parent_loc->mt_entry, &dir_pos, 0xE5);
116594: 50 push %eax <== NOT EXECUTED
116595: 68 e5 00 00 00 push $0xe5 <== NOT EXECUTED
11659a: 8d 85 58 ff ff ff lea -0xa8(%ebp),%eax <== NOT EXECUTED
1165a0: 50 push %eax <== NOT EXECUTED
1165a1: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
1165a4: ff 72 14 pushl 0x14(%edx) <== NOT EXECUTED
1165a7: e8 9e 04 00 00 call 116a4a <msdos_set_first_char4file_name><== NOT EXECUTED
1165ac: 83 c4 10 add $0x10,%esp
return rc;
}
1165af: 89 f8 mov %edi,%eax
1165b1: 8d 65 f4 lea -0xc(%ebp),%esp
1165b4: 5b pop %ebx
1165b5: 5e pop %esi
1165b6: 5f pop %edi
1165b7: 5d pop %ebp
1165b8: c3 ret
00118b5e <msdos_date_dos2unix>:
* called from the stat(), and fstat() system calls and so probably need
* not be too efficient.
*/
unsigned int
msdos_date_dos2unix(unsigned int dd, unsigned int dt)
{
118b5e: 55 push %ebp
118b5f: 89 e5 mov %esp,%ebp
118b61: 57 push %edi
118b62: 56 push %esi
118b63: 53 push %ebx
118b64: 51 push %ecx
118b65: 8b 4d 08 mov 0x8(%ebp),%ecx
118b68: 8b 55 0c mov 0xc(%ebp),%edx
uint32_t days;
uint16_t *months;
seconds = 2 * ((dt & MSDOS_DT_2SECONDS_MASK) >> MSDOS_DT_2SECONDS_SHIFT)
+ ((dt & MSDOS_DT_MINUTES_MASK) >> MSDOS_DT_MINUTES_SHIFT) * 60
+ ((dt & MSDOS_DT_HOURS_MASK) >> MSDOS_DT_HOURS_SHIFT) * 3600;
118b6b: 89 d0 mov %edx,%eax
118b6d: 25 00 f8 00 00 and $0xf800,%eax
118b72: c1 e8 0b shr $0xb,%eax
118b75: 69 c0 08 07 00 00 imul $0x708,%eax,%eax
uint32_t y, year;
uint32_t days;
uint16_t *months;
seconds = 2 * ((dt & MSDOS_DT_2SECONDS_MASK) >> MSDOS_DT_2SECONDS_SHIFT)
+ ((dt & MSDOS_DT_MINUTES_MASK) >> MSDOS_DT_MINUTES_SHIFT) * 60
118b7b: 89 d3 mov %edx,%ebx
118b7d: 81 e3 e0 07 00 00 and $0x7e0,%ebx
118b83: c1 eb 05 shr $0x5,%ebx
118b86: 6b db 1e imul $0x1e,%ebx,%ebx
+ ((dt & MSDOS_DT_HOURS_MASK) >> MSDOS_DT_HOURS_SHIFT) * 3600;
118b89: 01 d8 add %ebx,%eax
uint32_t m, month;
uint32_t y, year;
uint32_t days;
uint16_t *months;
seconds = 2 * ((dt & MSDOS_DT_2SECONDS_MASK) >> MSDOS_DT_2SECONDS_SHIFT)
118b8b: 83 e2 1f and $0x1f,%edx
+ ((dt & MSDOS_DT_MINUTES_MASK) >> MSDOS_DT_MINUTES_SHIFT) * 60
+ ((dt & MSDOS_DT_HOURS_MASK) >> MSDOS_DT_HOURS_SHIFT) * 3600;
118b8e: 01 d0 add %edx,%eax
uint32_t m, month;
uint32_t y, year;
uint32_t days;
uint16_t *months;
seconds = 2 * ((dt & MSDOS_DT_2SECONDS_MASK) >> MSDOS_DT_2SECONDS_SHIFT)
118b90: d1 e0 shl %eax
+ ((dt & MSDOS_DT_HOURS_MASK) >> MSDOS_DT_HOURS_SHIFT) * 3600;
/*
* If the year, month, and day from the last conversion are the
* same then use the saved value.
*/
if (lastdosdate != dd) {
118b92: 0f b7 15 ce 81 13 00 movzwl 0x1381ce,%edx
118b99: 39 ca cmp %ecx,%edx
118b9b: 74 7e je 118c1b <msdos_date_dos2unix+0xbd>
lastdosdate = dd;
118b9d: 66 89 0d ce 81 13 00 mov %cx,0x1381ce
days = 0;
year = (dd & MSDOS_DD_YEAR_MASK) >> MSDOS_DD_YEAR_SHIFT;
118ba4: 89 ce mov %ecx,%esi
118ba6: 81 e6 00 fe 00 00 and $0xfe00,%esi
118bac: c1 ee 09 shr $0x9,%esi
* If the year, month, and day from the last conversion are the
* same then use the saved value.
*/
if (lastdosdate != dd) {
lastdosdate = dd;
days = 0;
118baf: 31 d2 xor %edx,%edx
year = (dd & MSDOS_DD_YEAR_MASK) >> MSDOS_DD_YEAR_SHIFT;
for (y = 0; y < year; y++)
118bb1: 31 db xor %ebx,%ebx
118bb3: eb 14 jmp 118bc9 <msdos_date_dos2unix+0x6b>
days += y & 0x03 ? 365 : 366;
118bb5: 89 df mov %ebx,%edi
118bb7: 83 e7 03 and $0x3,%edi
118bba: 83 ff 01 cmp $0x1,%edi
118bbd: 19 ff sbb %edi,%edi
118bbf: f7 d7 not %edi
118bc1: 8d 94 3a 6e 01 00 00 lea 0x16e(%edx,%edi,1),%edx
*/
if (lastdosdate != dd) {
lastdosdate = dd;
days = 0;
year = (dd & MSDOS_DD_YEAR_MASK) >> MSDOS_DD_YEAR_SHIFT;
for (y = 0; y < year; y++)
118bc8: 43 inc %ebx
118bc9: 39 f3 cmp %esi,%ebx
118bcb: 75 e8 jne 118bb5 <msdos_date_dos2unix+0x57>
days += y & 0x03 ? 365 : 366;
months = year & 0x03 ? regyear : leapyear;
118bcd: be c0 62 13 00 mov $0x1362c0,%esi
118bd2: 80 e3 03 and $0x3,%bl
118bd5: 74 05 je 118bdc <msdos_date_dos2unix+0x7e><== ALWAYS TAKEN
118bd7: be a8 62 13 00 mov $0x1362a8,%esi <== NOT EXECUTED
/*
* Prevent going from 0 to 0xffffffff in the following
* loop.
*/
month = (dd & MSDOS_DD_MONTH_MASK) >> MSDOS_DD_MONTH_SHIFT;
118bdc: 89 cf mov %ecx,%edi
118bde: 81 e7 e0 01 00 00 and $0x1e0,%edi
if (month == 0) {
118be4: c1 ef 05 shr $0x5,%edi
118be7: 75 05 jne 118bee <msdos_date_dos2unix+0x90><== ALWAYS TAKEN
month = 1;
118be9: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED
}
for (m = 0; m < month - 1; m++)
118bee: 31 db xor %ebx,%ebx
118bf0: 4f dec %edi
118bf1: 89 7d f0 mov %edi,-0x10(%ebp)
118bf4: eb 07 jmp 118bfd <msdos_date_dos2unix+0x9f>
days += months[m];
118bf6: 0f b7 3c 5e movzwl (%esi,%ebx,2),%edi <== NOT EXECUTED
118bfa: 01 fa add %edi,%edx <== NOT EXECUTED
*/
month = (dd & MSDOS_DD_MONTH_MASK) >> MSDOS_DD_MONTH_SHIFT;
if (month == 0) {
month = 1;
}
for (m = 0; m < month - 1; m++)
118bfc: 43 inc %ebx <== NOT EXECUTED
118bfd: 3b 5d f0 cmp -0x10(%ebp),%ebx
118c00: 72 f4 jb 118bf6 <msdos_date_dos2unix+0x98><== NEVER TAKEN
days += months[m];
days += ((dd & MSDOS_DD_DAY_MASK) >> MSDOS_DD_DAY_SHIFT) - 1;
118c02: 83 e1 1f and $0x1f,%ecx
118c05: 8d 54 0a ff lea -0x1(%edx,%ecx,1),%edx
lastseconds = (days + DAYSTO1980) * SECONDSPERDAY;
118c09: 69 d2 80 51 01 00 imul $0x15180,%edx,%edx
118c0f: 81 c2 00 a6 ce 12 add $0x12cea600,%edx
118c15: 89 15 d0 81 13 00 mov %edx,0x1381d0
}
return seconds + lastseconds;
118c1b: 03 05 d0 81 13 00 add 0x1381d0,%eax
}
118c21: 5a pop %edx
118c22: 5b pop %ebx
118c23: 5e pop %esi
118c24: 5f pop %edi
118c25: 5d pop %ebp
118c26: c3 ret
00118a6c <msdos_date_unix2dos>:
* file timestamps. The passed in unix time is assumed to be in GMT.
*/
void
msdos_date_unix2dos(unsigned int t, uint16_t *ddp,
uint16_t *dtp)
{
118a6c: 55 push %ebp
118a6d: 89 e5 mov %esp,%ebp
118a6f: 57 push %edi
118a70: 56 push %esi
118a71: 53 push %ebx
118a72: 8b 4d 08 mov 0x8(%ebp),%ecx
/*
* If the time from the last conversion is the same as now, then
* skip the computations and use the saved result.
*/
if (lasttime != t) {
118a75: 39 0d c0 81 13 00 cmp %ecx,0x1381c0
118a7b: 0f 84 be 00 00 00 je 118b3f <msdos_date_unix2dos+0xd3>
lasttime = t;
118a81: 89 0d c0 81 13 00 mov %ecx,0x1381c0
lastdtime = (((t % 60) >> 1) << MSDOS_DT_2SECONDS_SHIFT)
+ (((t / 60) % 60) << MSDOS_DT_MINUTES_SHIFT)
118a87: bb 3c 00 00 00 mov $0x3c,%ebx
118a8c: 89 c8 mov %ecx,%eax
118a8e: 31 d2 xor %edx,%edx
118a90: f7 f3 div %ebx
118a92: 89 d6 mov %edx,%esi
118a94: 31 d2 xor %edx,%edx
118a96: f7 f3 div %ebx
* If the time from the last conversion is the same as now, then
* skip the computations and use the saved result.
*/
if (lasttime != t) {
lasttime = t;
lastdtime = (((t % 60) >> 1) << MSDOS_DT_2SECONDS_SHIFT)
118a98: 89 d7 mov %edx,%edi
118a9a: c1 e7 05 shl $0x5,%edi
+ (((t / 60) % 60) << MSDOS_DT_MINUTES_SHIFT)
+ (((t / 3600) % 24) << MSDOS_DT_HOURS_SHIFT);
118a9d: 66 bb 10 0e mov $0xe10,%bx
118aa1: 89 c8 mov %ecx,%eax
118aa3: 31 d2 xor %edx,%edx
118aa5: f7 f3 div %ebx
118aa7: 66 bb 18 00 mov $0x18,%bx
118aab: 31 d2 xor %edx,%edx
118aad: f7 f3 div %ebx
* If the time from the last conversion is the same as now, then
* skip the computations and use the saved result.
*/
if (lasttime != t) {
lasttime = t;
lastdtime = (((t % 60) >> 1) << MSDOS_DT_2SECONDS_SHIFT)
118aaf: c1 e2 0b shl $0xb,%edx
118ab2: 01 d7 add %edx,%edi
118ab4: d1 ee shr %esi
118ab6: 01 fe add %edi,%esi
118ab8: 66 89 35 c4 81 13 00 mov %si,0x1381c4
/*
* If the number of days since 1970 is the same as the last
* time we did the computation then skip all this leap year
* and month stuff.
*/
days = t / (SECONDSPERDAY);
118abf: bb 80 51 01 00 mov $0x15180,%ebx
118ac4: 89 c8 mov %ecx,%eax
118ac6: 31 d2 xor %edx,%edx
118ac8: f7 f3 div %ebx
if (days != lastday) {
118aca: 3b 05 c8 81 13 00 cmp 0x1381c8,%eax
118ad0: 74 6d je 118b3f <msdos_date_unix2dos+0xd3><== NEVER TAKEN
lastday = days;
118ad2: a3 c8 81 13 00 mov %eax,0x1381c8
for (year = 1970;; year++) {
118ad7: b9 b2 07 00 00 mov $0x7b2,%ecx
inc = year & 0x03 ? 365 : 366;
118adc: 89 cb mov %ecx,%ebx
118ade: 83 e3 03 and $0x3,%ebx
118ae1: 83 fb 01 cmp $0x1,%ebx
118ae4: 19 d2 sbb %edx,%edx
118ae6: f7 d2 not %edx
118ae8: 81 c2 6e 01 00 00 add $0x16e,%edx
if (days < inc)
118aee: 39 d0 cmp %edx,%eax
118af0: 72 05 jb 118af7 <msdos_date_unix2dos+0x8b>
break;
days -= inc;
118af2: 29 d0 sub %edx,%eax
* and month stuff.
*/
days = t / (SECONDSPERDAY);
if (days != lastday) {
lastday = days;
for (year = 1970;; year++) {
118af4: 41 inc %ecx
inc = year & 0x03 ? 365 : 366;
if (days < inc)
break;
days -= inc;
}
118af5: eb e5 jmp 118adc <msdos_date_unix2dos+0x70>
months = year & 0x03 ? regyear : leapyear;
118af7: be c0 62 13 00 mov $0x1362c0,%esi
118afc: 85 db test %ebx,%ebx
118afe: 74 05 je 118b05 <msdos_date_unix2dos+0x99><== ALWAYS TAKEN
118b00: be a8 62 13 00 mov $0x1362a8,%esi <== NOT EXECUTED
for (month = 0; month < 12; month++) {
118b05: 31 d2 xor %edx,%edx
if (days < months[month])
118b07: 0f b7 1c 56 movzwl (%esi,%edx,2),%ebx
118b0b: 39 d8 cmp %ebx,%eax
118b0d: 72 08 jb 118b17 <msdos_date_unix2dos+0xab><== ALWAYS TAKEN
break;
days -= months[month];
118b0f: 29 d8 sub %ebx,%eax <== NOT EXECUTED
if (days < inc)
break;
days -= inc;
}
months = year & 0x03 ? regyear : leapyear;
for (month = 0; month < 12; month++) {
118b11: 42 inc %edx <== NOT EXECUTED
118b12: 83 fa 0c cmp $0xc,%edx <== NOT EXECUTED
118b15: 75 f0 jne 118b07 <msdos_date_unix2dos+0x9b><== NOT EXECUTED
if (days < months[month])
break;
days -= months[month];
}
lastddate = ((days + 1) << MSDOS_DD_DAY_SHIFT)
118b17: 42 inc %edx
118b18: c1 e2 05 shl $0x5,%edx
118b1b: 8d 54 02 01 lea 0x1(%edx,%eax,1),%edx
118b1f: 66 89 15 cc 81 13 00 mov %dx,0x1381cc
* Remember dos's idea of time is relative to 1980.
* unix's is relative to 1970. If somehow we get a
* time before 1980 then don't give totally crazy
* results.
*/
if (year > 1980)
118b26: 81 f9 bc 07 00 00 cmp $0x7bc,%ecx
118b2c: 76 11 jbe 118b3f <msdos_date_unix2dos+0xd3><== NEVER TAKEN
lastddate += (year - 1980) <<
118b2e: 66 81 e9 bc 07 sub $0x7bc,%cx
118b33: c1 e1 09 shl $0x9,%ecx
118b36: 01 d1 add %edx,%ecx
118b38: 66 89 0d cc 81 13 00 mov %cx,0x1381cc
MSDOS_DD_YEAR_SHIFT;
}
}
*dtp = lastdtime;
118b3f: 66 8b 15 c4 81 13 00 mov 0x1381c4,%dx
118b46: 8b 45 10 mov 0x10(%ebp),%eax
118b49: 66 89 10 mov %dx,(%eax)
*ddp = lastddate;
118b4c: 66 8b 15 cc 81 13 00 mov 0x1381cc,%dx
118b53: 8b 45 0c mov 0xc(%ebp),%eax
118b56: 66 89 10 mov %dx,(%eax)
}
118b59: 5b pop %ebx
118b5a: 5e pop %esi
118b5b: 5f pop %edi
118b5c: 5d pop %ebp
118b5d: c3 ret
00116b20 <msdos_dir_is_empty>:
msdos_dir_is_empty(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd,
bool *ret_val
)
{
116b20: 55 push %ebp
116b21: 89 e5 mov %esp,%ebp
116b23: 57 push %edi
116b24: 56 push %esi
116b25: 53 push %ebx
116b26: 83 ec 1c sub $0x1c,%esp
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
116b29: 8b 45 08 mov 0x8(%ebp),%eax
116b2c: 8b 58 08 mov 0x8(%eax),%ebx
uint32_t j = 0, i = 0;
/* dir is not empty */
*ret_val = false;
116b2f: 8b 55 10 mov 0x10(%ebp),%edx
116b32: c6 02 00 movb $0x0,(%edx)
bool *ret_val
)
{
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t j = 0, i = 0;
116b35: 31 ff xor %edi,%edi
/* dir is not empty */
*ret_val = false;
while ((ret = fat_file_read(&fs_info->fat, fat_fd, j * fs_info->fat.vol.bps,
116b37: e9 8f 00 00 00 jmp 116bcb <msdos_dir_is_empty+0xab>
fs_info->fat.vol.bps,
fs_info->cl_buf)) != FAT_EOF)
{
if (ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
116b3c: 83 f8 1f cmp $0x1f,%eax
116b3f: 0f 8e b3 00 00 00 jle 116bf8 <msdos_dir_is_empty+0xd8><== NEVER TAKEN
return -1;
assert(ret == fs_info->fat.vol.bps);
116b45: 0f b7 0b movzwl (%ebx),%ecx
116b48: 39 c8 cmp %ecx,%eax
116b4a: 74 74 je 116bc0 <msdos_dir_is_empty+0xa0><== ALWAYS TAKEN
116b4c: 68 15 8b 12 00 push $0x128b15 <== NOT EXECUTED
116b51: 68 b8 8b 12 00 push $0x128bb8 <== NOT EXECUTED
116b56: 68 60 03 00 00 push $0x360 <== NOT EXECUTED
116b5b: 68 31 8b 12 00 push $0x128b31 <== NOT EXECUTED
116b60: e8 57 cb ff ff call 1136bc <__assert_func> <== NOT EXECUTED
/* have to look at the DIR_NAME as "raw" 8-bit data */
for (i = 0;
i < fs_info->fat.vol.bps;
i += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
{
char* entry = (char*) fs_info->cl_buf + i;
116b65: 8b 8b 94 00 00 00 mov 0x94(%ebx),%ecx
116b6b: 01 f1 add %esi,%ecx
* then consider it as empty.
*
* Just ignore long file name entries. They must have a short entry to
* be valid.
*/
if (((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
116b6d: 8a 11 mov (%ecx),%dl
116b6f: 88 55 e7 mov %dl,-0x19(%ebp)
116b72: 80 fa e5 cmp $0xe5,%dl
116b75: 74 3a je 116bb1 <msdos_dir_is_empty+0x91><== NEVER TAKEN
MSDOS_THIS_DIR_ENTRY_EMPTY) ||
((*MSDOS_DIR_ATTR(entry) & MSDOS_ATTR_LFN_MASK) ==
116b77: 8a 41 0b mov 0xb(%ecx),%al
116b7a: 83 e0 3f and $0x3f,%eax
*
* Just ignore long file name entries. They must have a short entry to
* be valid.
*/
if (((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
MSDOS_THIS_DIR_ENTRY_EMPTY) ||
116b7d: 3c 0f cmp $0xf,%al
116b7f: 74 30 je 116bb1 <msdos_dir_is_empty+0x91><== NEVER TAKEN
((*MSDOS_DIR_ATTR(entry) & MSDOS_ATTR_LFN_MASK) ==
MSDOS_ATTR_LFN) ||
(strncmp(MSDOS_DIR_NAME((entry)), MSDOS_DOT_NAME,
116b81: 50 push %eax
116b82: 6a 0b push $0xb
116b84: 68 7b 8b 12 00 push $0x128b7b
116b89: 51 push %ecx
116b8a: 89 4d dc mov %ecx,-0x24(%ebp)
116b8d: e8 0a 40 00 00 call 11ab9c <strncmp>
116b92: 83 c4 10 add $0x10,%esp
* be valid.
*/
if (((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
MSDOS_THIS_DIR_ENTRY_EMPTY) ||
((*MSDOS_DIR_ATTR(entry) & MSDOS_ATTR_LFN_MASK) ==
MSDOS_ATTR_LFN) ||
116b95: 85 c0 test %eax,%eax
116b97: 8b 4d dc mov -0x24(%ebp),%ecx
116b9a: 74 15 je 116bb1 <msdos_dir_is_empty+0x91>
(strncmp(MSDOS_DIR_NAME((entry)), MSDOS_DOT_NAME,
MSDOS_SHORT_NAME_LEN) == 0) ||
(strncmp(MSDOS_DIR_NAME((entry)),
116b9c: 50 push %eax
116b9d: 6a 0b push $0xb
116b9f: 68 87 8b 12 00 push $0x128b87
116ba4: 51 push %ecx
116ba5: e8 f2 3f 00 00 call 11ab9c <strncmp>
116baa: 83 c4 10 add $0x10,%esp
if (((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
MSDOS_THIS_DIR_ENTRY_EMPTY) ||
((*MSDOS_DIR_ATTR(entry) & MSDOS_ATTR_LFN_MASK) ==
MSDOS_ATTR_LFN) ||
(strncmp(MSDOS_DIR_NAME((entry)), MSDOS_DOT_NAME,
MSDOS_SHORT_NAME_LEN) == 0) ||
116bad: 85 c0 test %eax,%eax
116baf: 75 05 jne 116bb6 <msdos_dir_is_empty+0x96>
assert(ret == fs_info->fat.vol.bps);
/* have to look at the DIR_NAME as "raw" 8-bit data */
for (i = 0;
i < fs_info->fat.vol.bps;
i += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
116bb1: 83 c6 20 add $0x20,%esi
116bb4: eb 0f jmp 116bc5 <msdos_dir_is_empty+0xa5>
}
/*
* Short file name entries mean not empty.
*/
return RC_OK;
116bb6: 31 c0 xor %eax,%eax
continue;
/*
* Nothing more to look at.
*/
if ((*MSDOS_DIR_NAME(entry)) ==
116bb8: 80 7d e7 00 cmpb $0x0,-0x19(%ebp)
116bbc: 75 3d jne 116bfb <msdos_dir_is_empty+0xdb>
116bbe: eb 30 jmp 116bf0 <msdos_dir_is_empty+0xd0>
fs_info->cl_buf)) != FAT_EOF)
{
if (ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
return -1;
assert(ret == fs_info->fat.vol.bps);
116bc0: 31 f6 xor %esi,%esi
/* have to look at the DIR_NAME as "raw" 8-bit data */
for (i = 0;
i < fs_info->fat.vol.bps;
116bc2: 89 45 e0 mov %eax,-0x20(%ebp)
return -1;
assert(ret == fs_info->fat.vol.bps);
/* have to look at the DIR_NAME as "raw" 8-bit data */
for (i = 0;
116bc5: 3b 75 e0 cmp -0x20(%ebp),%esi
116bc8: 72 9b jb 116b65 <msdos_dir_is_empty+0x45><== ALWAYS TAKEN
/*
* Short file name entries mean not empty.
*/
return RC_OK;
}
j++;
116bca: 47 inc %edi <== NOT EXECUTED
uint32_t j = 0, i = 0;
/* dir is not empty */
*ret_val = false;
while ((ret = fat_file_read(&fs_info->fat, fat_fd, j * fs_info->fat.vol.bps,
116bcb: 0f b7 03 movzwl (%ebx),%eax
116bce: 83 ec 0c sub $0xc,%esp
116bd1: ff b3 94 00 00 00 pushl 0x94(%ebx)
116bd7: 50 push %eax
116bd8: 0f af c7 imul %edi,%eax
116bdb: 50 push %eax
116bdc: ff 75 0c pushl 0xc(%ebp)
116bdf: 53 push %ebx
116be0: e8 06 ae ff ff call 1119eb <fat_file_read>
116be5: 83 c4 20 add $0x20,%esp
116be8: 85 c0 test %eax,%eax
116bea: 0f 85 4c ff ff ff jne 116b3c <msdos_dir_is_empty+0x1c><== ALWAYS TAKEN
*/
return RC_OK;
}
j++;
}
*ret_val = true;
116bf0: 8b 55 10 mov 0x10(%ebp),%edx
116bf3: c6 02 01 movb $0x1,(%edx)
return RC_OK;
116bf6: eb 03 jmp 116bfb <msdos_dir_is_empty+0xdb>
while ((ret = fat_file_read(&fs_info->fat, fat_fd, j * fs_info->fat.vol.bps,
fs_info->fat.vol.bps,
fs_info->cl_buf)) != FAT_EOF)
{
if (ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
return -1;
116bf8: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
}
j++;
}
*ret_val = true;
return RC_OK;
}
116bfb: 8d 65 f4 lea -0xc(%ebp),%esp
116bfe: 5b pop %ebx
116bff: 5e pop %esi
116c00: 5f pop %edi
116c01: 5d pop %ebp
116c02: c3 ret
00118cfc <msdos_dir_read>:
* the number of bytes read on success, or -1 if error occured (errno
* set apropriately).
*/
ssize_t
msdos_dir_read(rtems_libio_t *iop, void *buffer, size_t count)
{
118cfc: 55 push %ebp <== NOT EXECUTED
118cfd: 89 e5 mov %esp,%ebp <== NOT EXECUTED
118cff: 57 push %edi <== NOT EXECUTED
118d00: 56 push %esi <== NOT EXECUTED
118d01: 53 push %ebx <== NOT EXECUTED
118d02: 81 ec 7c 01 00 00 sub $0x17c,%esp <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
118d08: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
118d0b: 8b 43 24 mov 0x24(%ebx),%eax <== NOT EXECUTED
118d0e: 8b 40 08 mov 0x8(%eax),%eax <== NOT EXECUTED
118d11: 89 85 b0 fe ff ff mov %eax,-0x150(%ebp) <== NOT EXECUTED
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
118d17: 8b 5b 18 mov 0x18(%ebx),%ebx <== NOT EXECUTED
118d1a: 89 9d 9c fe ff ff mov %ebx,-0x164(%ebp) <== NOT EXECUTED
fat_file_fd_t *tmp_fat_fd = NULL;
118d20: c7 85 c0 fe ff ff 00 movl $0x0,-0x140(%ebp) <== NOT EXECUTED
118d27: 00 00 00
uint32_t start = 0;
ssize_t ret = 0;
uint32_t cmpltd = 0;
uint32_t j = 0, i = 0;
uint32_t bts2rd = 0;
uint32_t cur_cln = 0;
118d2a: c7 85 c4 fe ff ff 00 movl $0x0,-0x13c(%ebp) <== NOT EXECUTED
118d31: 00 00 00
/*
* cast start and count - protect against using sizes that are not exact
* multiples of the -dirent- size. These could result in unexpected
* results
*/
start = iop->offset / sizeof(struct dirent);
118d34: 6a 00 push $0x0 <== NOT EXECUTED
118d36: 68 10 01 00 00 push $0x110 <== NOT EXECUTED
118d3b: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
118d3e: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED
118d41: ff 73 04 pushl 0x4(%ebx) <== NOT EXECUTED
118d44: e8 df cd 00 00 call 125b28 <__divdi3> <== NOT EXECUTED
118d49: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
118d4c: 89 85 90 fe ff ff mov %eax,-0x170(%ebp) <== NOT EXECUTED
count = (count / sizeof(struct dirent)) * sizeof(struct dirent);
118d52: b9 10 01 00 00 mov $0x110,%ecx <== NOT EXECUTED
118d57: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
118d5a: 31 d2 xor %edx,%edx <== NOT EXECUTED
118d5c: f7 f1 div %ecx <== NOT EXECUTED
118d5e: 69 c0 10 01 00 00 imul $0x110,%eax,%eax <== NOT EXECUTED
118d64: 89 85 94 fe ff ff mov %eax,-0x16c(%ebp) <== NOT EXECUTED
* too, so read such set of sectors is quick operation for low-level IO
* layer.
*/
bts2rd = (FAT_FD_OF_ROOT_DIR(fat_fd) &&
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16))) ?
fat_fd->fat_file_size :
118d6a: 8b 9d 9c fe ff ff mov -0x164(%ebp),%ebx <== NOT EXECUTED
118d70: 83 7b 20 01 cmpl $0x1,0x20(%ebx) <== NOT EXECUTED
118d74: 75 1d jne 118d93 <msdos_dir_read+0x97> <== NOT EXECUTED
* optimization: we know that root directory for FAT12/16 volumes is
* sequential set of sectors and any cluster is sequential set of sectors
* too, so read such set of sectors is quick operation for low-level IO
* layer.
*/
bts2rd = (FAT_FD_OF_ROOT_DIR(fat_fd) &&
118d76: 83 7b 24 00 cmpl $0x0,0x24(%ebx) <== NOT EXECUTED
118d7a: 75 17 jne 118d93 <msdos_dir_read+0x97> <== NOT EXECUTED
118d7c: 8b 9d b0 fe ff ff mov -0x150(%ebp),%ebx <== NOT EXECUTED
118d82: f6 43 0a 03 testb $0x3,0xa(%ebx) <== NOT EXECUTED
118d86: 74 0b je 118d93 <msdos_dir_read+0x97> <== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16))) ?
fat_fd->fat_file_size :
118d88: 8b 9d 9c fe ff ff mov -0x164(%ebp),%ebx <== NOT EXECUTED
118d8e: 8b 5b 18 mov 0x18(%ebx),%ebx <== NOT EXECUTED
118d91: eb 0a jmp 118d9d <msdos_dir_read+0xa1> <== NOT EXECUTED
118d93: 8b 9d b0 fe ff ff mov -0x150(%ebp),%ebx <== NOT EXECUTED
118d99: 0f b7 5b 06 movzwl 0x6(%ebx),%ebx <== NOT EXECUTED
118d9d: 89 9d 88 fe ff ff mov %ebx,-0x178(%ebp) <== NOT EXECUTED
fs_info->fat.vol.bpc;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
118da3: 51 push %ecx <== NOT EXECUTED
118da4: 6a 00 push $0x0 <== NOT EXECUTED
118da6: 6a 00 push $0x0 <== NOT EXECUTED
118da8: 8b 9d b0 fe ff ff mov -0x150(%ebp),%ebx <== NOT EXECUTED
118dae: ff b3 90 00 00 00 pushl 0x90(%ebx) <== NOT EXECUTED
118db4: e8 ab 20 ff ff call 10ae64 <rtems_semaphore_obtain><== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
118db9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
118dbc: 85 c0 test %eax,%eax <== NOT EXECUTED
118dbe: 0f 84 28 04 00 00 je 1191ec <msdos_dir_read+0x4f0> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
118dc4: e8 47 0a 00 00 call 119810 <__errno> <== NOT EXECUTED
118dc9: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
118dcf: eb 55 jmp 118e26 <msdos_dir_read+0x12a> <== NOT EXECUTED
* fat-file is already opened by open call, so read it
* Always read directory fat-file from the beggining because of MSDOS
* directories feature :( - we should count elements currently
* present in the directory because there may be holes :)
*/
ret = fat_file_read(&fs_info->fat, fat_fd, (j * bts2rd),
118dd1: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
118dd4: 8b 9d b0 fe ff ff mov -0x150(%ebp),%ebx <== NOT EXECUTED
118dda: ff b3 94 00 00 00 pushl 0x94(%ebx) <== NOT EXECUTED
118de0: ff b5 88 fe ff ff pushl -0x178(%ebp) <== NOT EXECUTED
118de6: ff b5 98 fe ff ff pushl -0x168(%ebp) <== NOT EXECUTED
118dec: ff b5 9c fe ff ff pushl -0x164(%ebp) <== NOT EXECUTED
118df2: 53 push %ebx <== NOT EXECUTED
118df3: e8 f3 8b ff ff call 1119eb <fat_file_read> <== NOT EXECUTED
118df8: 89 85 84 fe ff ff mov %eax,-0x17c(%ebp) <== NOT EXECUTED
bts2rd, fs_info->cl_buf);
if (ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
118dfe: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
118e01: 83 f8 1f cmp $0x1f,%eax <== NOT EXECUTED
118e04: 0f 8f b8 03 00 00 jg 1191c2 <msdos_dir_read+0x4c6> <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
118e0a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
118e0d: ff b3 90 00 00 00 pushl 0x90(%ebx) <== NOT EXECUTED
118e13: e8 3c 21 ff ff call 10af54 <rtems_semaphore_release><== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
118e18: e8 f3 09 00 00 call 119810 <__errno> <== NOT EXECUTED
118e1d: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
118e23: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
118e26: 83 cb ff or $0xffffffff,%ebx <== NOT EXECUTED
118e29: e9 62 04 00 00 jmp 119290 <msdos_dir_read+0x594> <== NOT EXECUTED
}
for (i = 0; i < ret; i += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
{
char* entry = (char*) fs_info->cl_buf + i;
118e2e: 8b b5 a4 fe ff ff mov -0x15c(%ebp),%esi <== NOT EXECUTED
118e34: 8b 9d b0 fe ff ff mov -0x150(%ebp),%ebx <== NOT EXECUTED
118e3a: 03 b3 94 00 00 00 add 0x94(%ebx),%esi <== NOT EXECUTED
/*
* Is this directory from here on empty ?
*/
if ((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
118e40: 8a 06 mov (%esi),%al <== NOT EXECUTED
118e42: 84 c0 test %al,%al <== NOT EXECUTED
118e44: 75 08 jne 118e4e <msdos_dir_read+0x152> <== NOT EXECUTED
MSDOS_THIS_DIR_ENTRY_AND_REST_EMPTY)
{
rtems_semaphore_release(fs_info->vol_sema);
118e46: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
118e49: e9 e3 03 00 00 jmp 119231 <msdos_dir_read+0x535> <== NOT EXECUTED
return cmpltd;
}
/* Is the directory entry empty */
if ((*MSDOS_DIR_ENTRY_TYPE(entry)) == MSDOS_THIS_DIR_ENTRY_EMPTY)
118e4e: 3c e5 cmp $0xe5,%al <== NOT EXECUTED
118e50: 0f 84 63 03 00 00 je 1191b9 <msdos_dir_read+0x4bd> <== NOT EXECUTED
continue;
/* Is the directory entry empty a volume label */
if (((*MSDOS_DIR_ATTR(entry)) & MSDOS_ATTR_VOLUME_ID) &&
118e56: 8a 56 0b mov 0xb(%esi),%dl <== NOT EXECUTED
118e59: f6 c2 08 test $0x8,%dl <== NOT EXECUTED
118e5c: 74 0e je 118e6c <msdos_dir_read+0x170> <== NOT EXECUTED
((*MSDOS_DIR_ATTR(entry) & MSDOS_ATTR_LFN_MASK) != MSDOS_ATTR_LFN))
118e5e: 88 d1 mov %dl,%cl <== NOT EXECUTED
118e60: 83 e1 3f and $0x3f,%ecx <== NOT EXECUTED
/* Is the directory entry empty */
if ((*MSDOS_DIR_ENTRY_TYPE(entry)) == MSDOS_THIS_DIR_ENTRY_EMPTY)
continue;
/* Is the directory entry empty a volume label */
if (((*MSDOS_DIR_ATTR(entry)) & MSDOS_ATTR_VOLUME_ID) &&
118e63: 80 f9 0f cmp $0xf,%cl <== NOT EXECUTED
118e66: 0f 85 4d 03 00 00 jne 1191b9 <msdos_dir_read+0x4bd> <== NOT EXECUTED
/*
* Check the attribute to see if the entry is for a long file
* name.
*/
if ((*MSDOS_DIR_ATTR(entry) & MSDOS_ATTR_LFN_MASK) ==
118e6c: 83 e2 3f and $0x3f,%edx <== NOT EXECUTED
118e6f: 80 fa 0f cmp $0xf,%dl <== NOT EXECUTED
118e72: 0f 85 c6 00 00 00 jne 118f3e <msdos_dir_read+0x242> <== NOT EXECUTED
int q;
/*
* Is this is the first entry of a LFN ?
*/
if (lfn_start == FAT_FILE_SHORT_NAME)
118e78: 83 bd b4 fe ff ff ff cmpl $0xffffffff,-0x14c(%ebp) <== NOT EXECUTED
118e7f: 75 42 jne 118ec3 <msdos_dir_read+0x1c7> <== NOT EXECUTED
{
/*
* The first entry must have the last long entry flag set.
*/
if ((*MSDOS_DIR_ENTRY_TYPE(entry) &
118e81: a8 40 test $0x40,%al <== NOT EXECUTED
118e83: 0f 84 30 03 00 00 je 1191b9 <msdos_dir_read+0x4bd> <== NOT EXECUTED
* RETURNS:
* the number of bytes read on success, or -1 if error occured (errno
* set apropriately).
*/
ssize_t
msdos_dir_read(rtems_libio_t *iop, void *buffer, size_t count)
118e89: 8b 95 a4 fe ff ff mov -0x15c(%ebp),%edx <== NOT EXECUTED
118e8f: 03 95 98 fe ff ff add -0x168(%ebp),%edx <== NOT EXECUTED
continue;
/*
* Remember the start location of the long file name.
*/
lfn_start =
118e95: c1 ea 05 shr $0x5,%edx <== NOT EXECUTED
118e98: 89 95 b4 fe ff ff mov %edx,-0x14c(%ebp) <== NOT EXECUTED
/*
* Get the number of entries so we can count down and
* also the checksum of the short entry.
*/
lfn_entries = (*MSDOS_DIR_ENTRY_TYPE(entry) &
118e9e: 89 c3 mov %eax,%ebx <== NOT EXECUTED
118ea0: 83 e3 3f and $0x3f,%ebx <== NOT EXECUTED
118ea3: 89 9d a0 fe ff ff mov %ebx,-0x160(%ebp) <== NOT EXECUTED
MSDOS_LAST_LONG_ENTRY_MASK);
lfn_checksum = *MSDOS_DIR_LFN_CHECKSUM(entry);
118ea9: 8a 56 0d mov 0xd(%esi),%dl <== NOT EXECUTED
118eac: 88 95 8f fe ff ff mov %dl,-0x171(%ebp) <== NOT EXECUTED
memset (tmp_dirent.d_name, 0, sizeof(tmp_dirent.d_name));
118eb2: 8d 95 e8 fe ff ff lea -0x118(%ebp),%edx <== NOT EXECUTED
118eb8: b9 40 00 00 00 mov $0x40,%ecx <== NOT EXECUTED
118ebd: 31 c0 xor %eax,%eax <== NOT EXECUTED
118ebf: 89 d7 mov %edx,%edi <== NOT EXECUTED
118ec1: f3 ab rep stos %eax,%es:(%edi) <== NOT EXECUTED
* If the entry number or the check sum do not match
* forget this series of long directory entries. These could
* be orphaned entries depending on the history of the
* disk.
*/
if ((lfn_entries != (*MSDOS_DIR_ENTRY_TYPE(entry) &
118ec3: 8a 06 mov (%esi),%al <== NOT EXECUTED
118ec5: 83 e0 3f and $0x3f,%eax <== NOT EXECUTED
118ec8: 39 85 a0 fe ff ff cmp %eax,-0x160(%ebp) <== NOT EXECUTED
118ece: 0f 85 db 02 00 00 jne 1191af <msdos_dir_read+0x4b3> <== NOT EXECUTED
MSDOS_LAST_LONG_ENTRY_MASK)) ||
118ed4: 8a 9d 8f fe ff ff mov -0x171(%ebp),%bl <== NOT EXECUTED
118eda: 3a 5e 0d cmp 0xd(%esi),%bl <== NOT EXECUTED
118edd: 0f 85 cc 02 00 00 jne 1191af <msdos_dir_read+0x4b3> <== NOT EXECUTED
* The DOS maximum length is 255 characters without the
* trailing nul character. We need to range check the length to
* fit in the directory entry name field.
*/
lfn_entries--;
118ee3: ff 8d a0 fe ff ff decl -0x160(%ebp) <== NOT EXECUTED
p = entry + 1;
118ee9: 8d 46 01 lea 0x1(%esi),%eax <== NOT EXECUTED
o = lfn_entries * MSDOS_LFN_LEN_PER_ENTRY;
118eec: 6b 8d a0 fe ff ff 0d imul $0xd,-0x160(%ebp),%ecx <== NOT EXECUTED
for (q = 0; q < MSDOS_LFN_LEN_PER_ENTRY; q++)
118ef3: 31 d2 xor %edx,%edx <== NOT EXECUTED
* RETURNS:
* the number of bytes read on success, or -1 if error occured (errno
* set apropriately).
*/
ssize_t
msdos_dir_read(rtems_libio_t *iop, void *buffer, size_t count)
118ef5: 8d bc 0d d8 fe ff ff lea -0x128(%ebp,%ecx,1),%edi <== NOT EXECUTED
p = entry + 1;
o = lfn_entries * MSDOS_LFN_LEN_PER_ENTRY;
for (q = 0; q < MSDOS_LFN_LEN_PER_ENTRY; q++)
{
if (o >= (sizeof(tmp_dirent.d_name) - 1))
118efc: 8d 34 0a lea (%edx,%ecx,1),%esi <== NOT EXECUTED
118eff: 81 fe fe 00 00 00 cmp $0xfe,%esi <== NOT EXECUTED
118f05: 0f 87 99 02 00 00 ja 1191a4 <msdos_dir_read+0x4a8> <== NOT EXECUTED
break;
tmp_dirent.d_name[o++] = *p;
118f0b: 8a 18 mov (%eax),%bl <== NOT EXECUTED
118f0d: 88 5c 17 10 mov %bl,0x10(%edi,%edx,1) <== NOT EXECUTED
if (*p == '\0')
118f11: 80 38 00 cmpb $0x0,(%eax) <== NOT EXECUTED
118f14: 0f 84 8a 02 00 00 je 1191a4 <msdos_dir_read+0x4a8> <== NOT EXECUTED
break;
switch (q)
118f1a: 83 fa 04 cmp $0x4,%edx <== NOT EXECUTED
118f1d: 74 07 je 118f26 <msdos_dir_read+0x22a> <== NOT EXECUTED
118f1f: 83 fa 0a cmp $0xa,%edx <== NOT EXECUTED
118f22: 75 0c jne 118f30 <msdos_dir_read+0x234> <== NOT EXECUTED
118f24: eb 05 jmp 118f2b <msdos_dir_read+0x22f> <== NOT EXECUTED
{
case 4:
p += 5;
118f26: 83 c0 05 add $0x5,%eax <== NOT EXECUTED
break;
118f29: eb 08 jmp 118f33 <msdos_dir_read+0x237> <== NOT EXECUTED
case 10:
p += 4;
118f2b: 83 c0 04 add $0x4,%eax <== NOT EXECUTED
break;
118f2e: eb 03 jmp 118f33 <msdos_dir_read+0x237> <== NOT EXECUTED
default:
p += 2;
118f30: 83 c0 02 add $0x2,%eax <== NOT EXECUTED
lfn_entries--;
p = entry + 1;
o = lfn_entries * MSDOS_LFN_LEN_PER_ENTRY;
for (q = 0; q < MSDOS_LFN_LEN_PER_ENTRY; q++)
118f33: 42 inc %edx <== NOT EXECUTED
118f34: 83 fa 0d cmp $0xd,%edx <== NOT EXECUTED
118f37: 75 c3 jne 118efc <msdos_dir_read+0x200> <== NOT EXECUTED
118f39: e9 66 02 00 00 jmp 1191a4 <msdos_dir_read+0x4a8> <== NOT EXECUTED
fat_dir_pos_t dir_pos;
/*
* Skip active entries until get the entry to start from.
*/
if (start)
118f3e: 83 bd 90 fe ff ff 00 cmpl $0x0,-0x170(%ebp) <== NOT EXECUTED
118f45: 74 0b je 118f52 <msdos_dir_read+0x256> <== NOT EXECUTED
{
lfn_start = FAT_FILE_SHORT_NAME;
start--;
118f47: ff 8d 90 fe ff ff decl -0x170(%ebp) <== NOT EXECUTED
118f4d: e9 5d 02 00 00 jmp 1191af <msdos_dir_read+0x4b3> <== NOT EXECUTED
* unfortunately there is no method to extract ino except to
* open fat-file descriptor :( ... so, open it
*/
/* get number of cluster we are working with */
rc = fat_file_ioctl(&fs_info->fat, fat_fd, F_CLU_NUM,
118f52: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
118f55: 8d 85 c4 fe ff ff lea -0x13c(%ebp),%eax <== NOT EXECUTED
118f5b: 50 push %eax <== NOT EXECUTED
118f5c: ff b5 98 fe ff ff pushl -0x168(%ebp) <== NOT EXECUTED
118f62: 6a 01 push $0x1 <== NOT EXECUTED
118f64: ff b5 9c fe ff ff pushl -0x164(%ebp) <== NOT EXECUTED
118f6a: ff b5 b0 fe ff ff pushl -0x150(%ebp) <== NOT EXECUTED
118f70: e8 69 8d ff ff call 111cde <fat_file_ioctl> <== NOT EXECUTED
118f75: 89 c3 mov %eax,%ebx <== NOT EXECUTED
j * bts2rd, &cur_cln);
if (rc != RC_OK)
118f77: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
118f7a: 85 c0 test %eax,%eax <== NOT EXECUTED
118f7c: 74 02 je 118f80 <msdos_dir_read+0x284> <== NOT EXECUTED
118f7e: eb 4f jmp 118fcf <msdos_dir_read+0x2d3> <== NOT EXECUTED
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
dir_pos->sname.ofs = 0;
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
118f80: c7 85 d0 fe ff ff ff movl $0xffffffff,-0x130(%ebp) <== NOT EXECUTED
118f87: ff ff ff
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
118f8a: c7 85 d4 fe ff ff ff movl $0xffffffff,-0x12c(%ebp) <== NOT EXECUTED
118f91: ff ff ff
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
fat_dir_pos_init(&dir_pos);
dir_pos.sname.cln = cur_cln;
118f94: 8b 85 c4 fe ff ff mov -0x13c(%ebp),%eax <== NOT EXECUTED
118f9a: 89 85 c8 fe ff ff mov %eax,-0x138(%ebp) <== NOT EXECUTED
dir_pos.sname.ofs = i;
118fa0: 8b 9d a4 fe ff ff mov -0x15c(%ebp),%ebx <== NOT EXECUTED
118fa6: 89 9d cc fe ff ff mov %ebx,-0x134(%ebp) <== NOT EXECUTED
rc = fat_file_open(&fs_info->fat, &dir_pos, &tmp_fat_fd);
118fac: 52 push %edx <== NOT EXECUTED
118fad: 8d 85 c0 fe ff ff lea -0x140(%ebp),%eax <== NOT EXECUTED
118fb3: 50 push %eax <== NOT EXECUTED
118fb4: 8d 85 c8 fe ff ff lea -0x138(%ebp),%eax <== NOT EXECUTED
118fba: 50 push %eax <== NOT EXECUTED
118fbb: ff b5 b0 fe ff ff pushl -0x150(%ebp) <== NOT EXECUTED
118fc1: e8 d0 88 ff ff call 111896 <fat_file_open> <== NOT EXECUTED
118fc6: 89 c3 mov %eax,%ebx <== NOT EXECUTED
if (rc != RC_OK)
118fc8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
118fcb: 85 c0 test %eax,%eax <== NOT EXECUTED
118fcd: 74 14 je 118fe3 <msdos_dir_read+0x2e7> <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
118fcf: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
118fd2: 8b 95 b0 fe ff ff mov -0x150(%ebp),%edx <== NOT EXECUTED
118fd8: ff b2 90 00 00 00 pushl 0x90(%edx) <== NOT EXECUTED
118fde: e9 b7 01 00 00 jmp 11919a <msdos_dir_read+0x49e> <== NOT EXECUTED
return rc;
}
/* fill in dirent structure */
/* XXX: from what and in what d_off should be computed ?! */
tmp_dirent.d_off = start + cmpltd;
118fe3: 8b 9d a8 fe ff ff mov -0x158(%ebp),%ebx <== NOT EXECUTED
118fe9: 89 9d dc fe ff ff mov %ebx,-0x124(%ebp) <== NOT EXECUTED
118fef: c7 85 e0 fe ff ff 00 movl $0x0,-0x120(%ebp) <== NOT EXECUTED
118ff6: 00 00 00
tmp_dirent.d_reclen = sizeof(struct dirent);
118ff9: 66 c7 85 e4 fe ff ff movw $0x110,-0x11c(%ebp) <== NOT EXECUTED
119000: 10 01
tmp_dirent.d_ino = tmp_fat_fd->ino;
119002: 8b 85 c0 fe ff ff mov -0x140(%ebp),%eax <== NOT EXECUTED
119008: 8b 40 0c mov 0xc(%eax),%eax <== NOT EXECUTED
11900b: 89 85 d8 fe ff ff mov %eax,-0x128(%ebp) <== NOT EXECUTED
/*
* If a long file name check if the correct number of
* entries have been found and if the checksum is correct.
* If not return the short file name.
*/
if (lfn_start != FAT_FILE_SHORT_NAME)
119011: 83 bd b4 fe ff ff ff cmpl $0xffffffff,-0x14c(%ebp) <== NOT EXECUTED
119018: 74 39 je 119053 <msdos_dir_read+0x357> <== NOT EXECUTED
11901a: 31 c9 xor %ecx,%ecx <== NOT EXECUTED
11901c: 31 d2 xor %edx,%edx <== NOT EXECUTED
uint8_t cs = 0;
uint8_t* p = (uint8_t*) entry;
int i;
for (i = 0; i < 11; i++, p++)
cs = ((cs & 1) ? 0x80 : 0) + (cs >> 1) + *p;
11901e: 88 d0 mov %dl,%al <== NOT EXECUTED
119020: 83 e0 01 and $0x1,%eax <== NOT EXECUTED
119023: f7 d8 neg %eax <== NOT EXECUTED
119025: 83 e0 80 and $0xffffff80,%eax <== NOT EXECUTED
119028: d0 ea shr %dl <== NOT EXECUTED
11902a: 02 14 0e add (%esi,%ecx,1),%dl <== NOT EXECUTED
11902d: 01 c2 add %eax,%edx <== NOT EXECUTED
{
uint8_t cs = 0;
uint8_t* p = (uint8_t*) entry;
int i;
for (i = 0; i < 11; i++, p++)
11902f: 41 inc %ecx <== NOT EXECUTED
119030: 83 f9 0b cmp $0xb,%ecx <== NOT EXECUTED
119033: 75 e9 jne 11901e <msdos_dir_read+0x322> <== NOT EXECUTED
cs = ((cs & 1) ? 0x80 : 0) + (cs >> 1) + *p;
if (lfn_entries || (lfn_checksum != cs))
119035: 38 95 8f fe ff ff cmp %dl,-0x171(%ebp) <== NOT EXECUTED
11903b: 75 16 jne 119053 <msdos_dir_read+0x357> <== NOT EXECUTED
11903d: 83 bd a0 fe ff ff 00 cmpl $0x0,-0x160(%ebp) <== NOT EXECUTED
119044: 0f 95 c0 setne %al <== NOT EXECUTED
119047: 75 0a jne 119053 <msdos_dir_read+0x357> <== NOT EXECUTED
119049: e9 f9 01 00 00 jmp 119247 <msdos_dir_read+0x54b> <== NOT EXECUTED
const char *src_tmp;
/*
* find last non-blank character of base name
*/
for ((i = MSDOS_SHORT_BASE_LEN ,
11904e: 4a dec %edx <== NOT EXECUTED
11904f: 75 07 jne 119058 <msdos_dir_read+0x35c> <== NOT EXECUTED
119051: eb 0c jmp 11905f <msdos_dir_read+0x363> <== NOT EXECUTED
119053: ba 08 00 00 00 mov $0x8,%edx <== NOT EXECUTED
src_tmp = src + MSDOS_SHORT_BASE_LEN-1);
((i > 0) &&
119058: 80 7c 16 ff 20 cmpb $0x20,-0x1(%esi,%edx,1) <== NOT EXECUTED
11905d: 74 ef je 11904e <msdos_dir_read+0x352> <== NOT EXECUTED
* copy base name to destination
*/
src_tmp = src;
len = i;
while (i-- > 0) {
*dst++ = tolower((unsigned char)(*src_tmp++));
11905f: 8b 3d d8 62 13 00 mov 0x1362d8,%edi <== NOT EXECUTED
119065: 89 f1 mov %esi,%ecx <== NOT EXECUTED
{
/*
* convert dir entry from fixed 8+3 format (without dot)
* to 0..8 + 1dot + 0..3 format
*/
tmp_dirent.d_namlen = msdos_format_dirent_with_dot(
119067: 8d 85 e8 fe ff ff lea -0x118(%ebp),%eax <== NOT EXECUTED
* RETURNS:
* the number of bytes read on success, or -1 if error occured (errno
* set apropriately).
*/
ssize_t
msdos_dir_read(rtems_libio_t *iop, void *buffer, size_t count)
11906d: 8d 1c 10 lea (%eax,%edx,1),%ebx <== NOT EXECUTED
119070: 89 9d ac fe ff ff mov %ebx,-0x154(%ebp) <== NOT EXECUTED
119076: eb 2c jmp 1190a4 <msdos_dir_read+0x3a8> <== NOT EXECUTED
* copy base name to destination
*/
src_tmp = src;
len = i;
while (i-- > 0) {
*dst++ = tolower((unsigned char)(*src_tmp++));
119078: 0f b6 19 movzbl (%ecx),%ebx <== NOT EXECUTED
11907b: 41 inc %ecx <== NOT EXECUTED
11907c: 89 9d 80 fe ff ff mov %ebx,-0x180(%ebp) <== NOT EXECUTED
119082: 8a 5c 1f 01 mov 0x1(%edi,%ebx,1),%bl <== NOT EXECUTED
119086: 83 e3 03 and $0x3,%ebx <== NOT EXECUTED
119089: 88 9d b4 fe ff ff mov %bl,-0x14c(%ebp) <== NOT EXECUTED
11908f: 8b 9d 80 fe ff ff mov -0x180(%ebp),%ebx <== NOT EXECUTED
119095: 80 bd b4 fe ff ff 01 cmpb $0x1,-0x14c(%ebp) <== NOT EXECUTED
11909c: 75 03 jne 1190a1 <msdos_dir_read+0x3a5> <== NOT EXECUTED
11909e: 83 c3 20 add $0x20,%ebx <== NOT EXECUTED
1190a1: 88 18 mov %bl,(%eax) <== NOT EXECUTED
1190a3: 40 inc %eax <== NOT EXECUTED
* RETURNS:
* the number of bytes read on success, or -1 if error occured (errno
* set apropriately).
*/
ssize_t
msdos_dir_read(rtems_libio_t *iop, void *buffer, size_t count)
1190a4: 8b 9d ac fe ff ff mov -0x154(%ebp),%ebx <== NOT EXECUTED
1190aa: 29 c3 sub %eax,%ebx <== NOT EXECUTED
/*
* copy base name to destination
*/
src_tmp = src;
len = i;
while (i-- > 0) {
1190ac: 85 db test %ebx,%ebx <== NOT EXECUTED
1190ae: 7f c8 jg 119078 <msdos_dir_read+0x37c> <== NOT EXECUTED
/*
* find last non-blank character of extension
*/
for ((i = MSDOS_SHORT_EXT_LEN ,
src_tmp = src + MSDOS_SHORT_BASE_LEN+MSDOS_SHORT_EXT_LEN-1);
((i > 0) &&
1190b0: 80 7e 0a 20 cmpb $0x20,0xa(%esi) <== NOT EXECUTED
1190b4: 0f 85 a7 01 00 00 jne 119261 <msdos_dir_read+0x565> <== NOT EXECUTED
1190ba: 80 7e 09 20 cmpb $0x20,0x9(%esi) <== NOT EXECUTED
1190be: 0f 85 a4 01 00 00 jne 119268 <msdos_dir_read+0x56c> <== NOT EXECUTED
1190c4: b9 01 00 00 00 mov $0x1,%ecx <== NOT EXECUTED
1190c9: 80 7e 08 20 cmpb $0x20,0x8(%esi) <== NOT EXECUTED
1190cd: 0f 85 9a 01 00 00 jne 11926d <msdos_dir_read+0x571> <== NOT EXECUTED
1190d3: eb 4e jmp 119123 <msdos_dir_read+0x427> <== NOT EXECUTED
if (i > 0) {
*dst++ = '.'; /* append dot */
len += i + 1; /* extension + dot */
src_tmp = src + MSDOS_SHORT_BASE_LEN;
while (i-- > 0) {
*dst++ = tolower((unsigned char)(*src_tmp++));
1190d5: 0f b6 5c 16 08 movzbl 0x8(%esi,%edx,1),%ebx <== NOT EXECUTED
1190da: 89 9d 7c fe ff ff mov %ebx,-0x184(%ebp) <== NOT EXECUTED
1190e0: 8a 5c 1f 01 mov 0x1(%edi,%ebx,1),%bl <== NOT EXECUTED
1190e4: 83 e3 03 and $0x3,%ebx <== NOT EXECUTED
1190e7: 88 9d b4 fe ff ff mov %bl,-0x14c(%ebp) <== NOT EXECUTED
1190ed: 8b 9d 7c fe ff ff mov -0x184(%ebp),%ebx <== NOT EXECUTED
1190f3: 80 bd b4 fe ff ff 01 cmpb $0x1,-0x14c(%ebp) <== NOT EXECUTED
1190fa: 75 03 jne 1190ff <msdos_dir_read+0x403> <== NOT EXECUTED
1190fc: 83 c3 20 add $0x20,%ebx <== NOT EXECUTED
1190ff: 88 5c 10 01 mov %bl,0x1(%eax,%edx,1) <== NOT EXECUTED
119103: 42 inc %edx <== NOT EXECUTED
* RETURNS:
* the number of bytes read on success, or -1 if error occured (errno
* set apropriately).
*/
ssize_t
msdos_dir_read(rtems_libio_t *iop, void *buffer, size_t count)
119104: 89 cb mov %ecx,%ebx <== NOT EXECUTED
119106: 29 d3 sub %edx,%ebx <== NOT EXECUTED
*/
if (i > 0) {
*dst++ = '.'; /* append dot */
len += i + 1; /* extension + dot */
src_tmp = src + MSDOS_SHORT_BASE_LEN;
while (i-- > 0) {
119108: 85 db test %ebx,%ebx <== NOT EXECUTED
11910a: 7f c9 jg 1190d5 <msdos_dir_read+0x3d9> <== NOT EXECUTED
* RETURNS:
* the number of bytes read on success, or -1 if error occured (errno
* set apropriately).
*/
ssize_t
msdos_dir_read(rtems_libio_t *iop, void *buffer, size_t count)
11910c: 89 ca mov %ecx,%edx <== NOT EXECUTED
11910e: f7 d2 not %edx <== NOT EXECUTED
119110: c1 fa 1f sar $0x1f,%edx <== NOT EXECUTED
119113: 21 ca and %ecx,%edx <== NOT EXECUTED
119115: 8b 85 ac fe ff ff mov -0x154(%ebp),%eax <== NOT EXECUTED
11911b: 01 d0 add %edx,%eax <== NOT EXECUTED
11911d: 03 95 80 fe ff ff add -0x180(%ebp),%edx <== NOT EXECUTED
while (i-- > 0) {
*dst++ = tolower((unsigned char)(*src_tmp++));
len++;
}
}
*dst = '\0'; /* terminate string */
119123: c6 00 00 movb $0x0,(%eax) <== NOT EXECUTED
{
/*
* convert dir entry from fixed 8+3 format (without dot)
* to 0..8 + 1dot + 0..3 format
*/
tmp_dirent.d_namlen = msdos_format_dirent_with_dot(
119126: 66 89 95 e6 fe ff ff mov %dx,-0x11a(%ebp) <== NOT EXECUTED
11912d: c7 85 b4 fe ff ff ff movl $0xffffffff,-0x14c(%ebp) <== NOT EXECUTED
119134: ff ff ff
else
{
tmp_dirent.d_namlen = strlen(tmp_dirent.d_name);
}
memcpy(buffer + cmpltd, &tmp_dirent, sizeof(struct dirent));
119137: 8b 7d 0c mov 0xc(%ebp),%edi <== NOT EXECUTED
11913a: 03 bd a8 fe ff ff add -0x158(%ebp),%edi <== NOT EXECUTED
119140: 8d b5 d8 fe ff ff lea -0x128(%ebp),%esi <== NOT EXECUTED
119146: b9 44 00 00 00 mov $0x44,%ecx <== NOT EXECUTED
11914b: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED
iop->offset = iop->offset + sizeof(struct dirent);
11914d: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
119150: 81 43 04 10 01 00 00 addl $0x110,0x4(%ebx) <== NOT EXECUTED
119157: 83 53 08 00 adcl $0x0,0x8(%ebx) <== NOT EXECUTED
cmpltd += (sizeof(struct dirent));
11915b: 81 85 a8 fe ff ff 10 addl $0x110,-0x158(%ebp) <== NOT EXECUTED
119162: 01 00 00
count -= (sizeof(struct dirent));
119165: 81 ad 94 fe ff ff 10 subl $0x110,-0x16c(%ebp) <== NOT EXECUTED
11916c: 01 00 00
/* inode number extracted, close fat-file */
rc = fat_file_close(&fs_info->fat, tmp_fat_fd);
11916f: 50 push %eax <== NOT EXECUTED
119170: 50 push %eax <== NOT EXECUTED
119171: ff b5 c0 fe ff ff pushl -0x140(%ebp) <== NOT EXECUTED
119177: ff b5 b0 fe ff ff pushl -0x150(%ebp) <== NOT EXECUTED
11917d: e8 b6 8a ff ff call 111c38 <fat_file_close> <== NOT EXECUTED
119182: 89 c3 mov %eax,%ebx <== NOT EXECUTED
if (rc != RC_OK)
119184: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
119187: 85 c0 test %eax,%eax <== NOT EXECUTED
119189: 74 19 je 1191a4 <msdos_dir_read+0x4a8> <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
11918b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11918e: 8b 85 b0 fe ff ff mov -0x150(%ebp),%eax <== NOT EXECUTED
119194: ff b0 90 00 00 00 pushl 0x90(%eax) <== NOT EXECUTED
11919a: e8 b5 1d ff ff call 10af54 <rtems_semaphore_release><== NOT EXECUTED
11919f: e9 9e 00 00 00 jmp 119242 <msdos_dir_read+0x546> <== NOT EXECUTED
return rc;
}
}
if (count <= 0)
1191a4: 83 bd 94 fe ff ff 00 cmpl $0x0,-0x16c(%ebp) <== NOT EXECUTED
1191ab: 75 0c jne 1191b9 <msdos_dir_read+0x4bd> <== NOT EXECUTED
1191ad: eb 2f jmp 1191de <msdos_dir_read+0x4e2> <== NOT EXECUTED
*/
if ((lfn_entries != (*MSDOS_DIR_ENTRY_TYPE(entry) &
MSDOS_LAST_LONG_ENTRY_MASK)) ||
(lfn_checksum != *MSDOS_DIR_LFN_CHECKSUM(entry)))
{
lfn_start = FAT_FILE_SHORT_NAME;
1191af: c7 85 b4 fe ff ff ff movl $0xffffffff,-0x14c(%ebp) <== NOT EXECUTED
1191b6: ff ff ff
{
rtems_semaphore_release(fs_info->vol_sema);
rtems_set_errno_and_return_minus_one(EIO);
}
for (i = 0; i < ret; i += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
1191b9: 83 85 a4 fe ff ff 20 addl $0x20,-0x15c(%ebp) <== NOT EXECUTED
1191c0: eb 0a jmp 1191cc <msdos_dir_read+0x4d0> <== NOT EXECUTED
* directories feature :( - we should count elements currently
* present in the directory because there may be holes :)
*/
ret = fat_file_read(&fs_info->fat, fat_fd, (j * bts2rd),
bts2rd, fs_info->cl_buf);
if (ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
1191c2: c7 85 a4 fe ff ff 00 movl $0x0,-0x15c(%ebp) <== NOT EXECUTED
1191c9: 00 00 00
{
rtems_semaphore_release(fs_info->vol_sema);
rtems_set_errno_and_return_minus_one(EIO);
}
for (i = 0; i < ret; i += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
1191cc: 8b 85 84 fe ff ff mov -0x17c(%ebp),%eax <== NOT EXECUTED
1191d2: 39 85 a4 fe ff ff cmp %eax,-0x15c(%ebp) <== NOT EXECUTED
1191d8: 0f 82 50 fc ff ff jb 118e2e <msdos_dir_read+0x132> <== NOT EXECUTED
1191de: 8b 95 88 fe ff ff mov -0x178(%ebp),%edx <== NOT EXECUTED
1191e4: 01 95 98 fe ff ff add %edx,-0x168(%ebp) <== NOT EXECUTED
1191ea: eb 2f jmp 11921b <msdos_dir_read+0x51f> <== NOT EXECUTED
fat_fd->fat_file_size :
fs_info->fat.vol.bpc;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
1191ec: c7 85 98 fe ff ff 00 movl $0x0,-0x168(%ebp) <== NOT EXECUTED
1191f3: 00 00 00
1191f6: c7 85 a0 fe ff ff 00 movl $0x0,-0x160(%ebp) <== NOT EXECUTED
1191fd: 00 00 00
119200: c6 85 8f fe ff ff 00 movb $0x0,-0x171(%ebp) <== NOT EXECUTED
119207: c7 85 b4 fe ff ff ff movl $0xffffffff,-0x14c(%ebp) <== NOT EXECUTED
11920e: ff ff ff
119211: c7 85 a8 fe ff ff 00 movl $0x0,-0x158(%ebp) <== NOT EXECUTED
119218: 00 00 00
rtems_set_errno_and_return_minus_one(EIO);
while (count > 0)
11921b: 83 bd 94 fe ff ff 00 cmpl $0x0,-0x16c(%ebp) <== NOT EXECUTED
119222: 0f 85 a9 fb ff ff jne 118dd1 <msdos_dir_read+0xd5> <== NOT EXECUTED
break;
}
j++;
}
rtems_semaphore_release(fs_info->vol_sema);
119228: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11922b: 8b 9d b0 fe ff ff mov -0x150(%ebp),%ebx <== NOT EXECUTED
119231: ff b3 90 00 00 00 pushl 0x90(%ebx) <== NOT EXECUTED
119237: e8 18 1d ff ff call 10af54 <rtems_semaphore_release><== NOT EXECUTED
return cmpltd;
11923c: 8b 9d a8 fe ff ff mov -0x158(%ebp),%ebx <== NOT EXECUTED
119242: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
119245: eb 49 jmp 119290 <msdos_dir_read+0x594> <== NOT EXECUTED
tmp_dirent.d_namlen = msdos_format_dirent_with_dot(
tmp_dirent.d_name, entry); /* src text */
}
else
{
tmp_dirent.d_namlen = strlen(tmp_dirent.d_name);
119247: 8d bd e8 fe ff ff lea -0x118(%ebp),%edi <== NOT EXECUTED
11924d: 83 c9 ff or $0xffffffff,%ecx <== NOT EXECUTED
119250: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED
119252: f7 d1 not %ecx <== NOT EXECUTED
119254: 49 dec %ecx <== NOT EXECUTED
119255: 66 89 8d e6 fe ff ff mov %cx,-0x11a(%ebp) <== NOT EXECUTED
11925c: e9 d6 fe ff ff jmp 119137 <msdos_dir_read+0x43b> <== NOT EXECUTED
*dst++ = tolower((unsigned char)(*src_tmp++));
}
/*
* find last non-blank character of extension
*/
for ((i = MSDOS_SHORT_EXT_LEN ,
119261: b9 03 00 00 00 mov $0x3,%ecx <== NOT EXECUTED
119266: eb 05 jmp 11926d <msdos_dir_read+0x571> <== NOT EXECUTED
src_tmp = src + MSDOS_SHORT_BASE_LEN+MSDOS_SHORT_EXT_LEN-1);
((i > 0) &&
(*src_tmp == ' '));
i--,src_tmp--)
119268: b9 02 00 00 00 mov $0x2,%ecx <== NOT EXECUTED
{};
/*
* extension is not empty
*/
if (i > 0) {
*dst++ = '.'; /* append dot */
11926d: c6 00 2e movb $0x2e,(%eax) <== NOT EXECUTED
119270: 8d 58 01 lea 0x1(%eax),%ebx <== NOT EXECUTED
119273: 89 9d ac fe ff ff mov %ebx,-0x154(%ebp) <== NOT EXECUTED
len += i + 1; /* extension + dot */
119279: 8d 54 0a 01 lea 0x1(%edx,%ecx,1),%edx <== NOT EXECUTED
11927d: 89 95 80 fe ff ff mov %edx,-0x180(%ebp) <== NOT EXECUTED
src_tmp = src + MSDOS_SHORT_BASE_LEN;
while (i-- > 0) {
*dst++ = tolower((unsigned char)(*src_tmp++));
119283: 8b 3d d8 62 13 00 mov 0x1362d8,%edi <== NOT EXECUTED
119289: 31 d2 xor %edx,%edx <== NOT EXECUTED
11928b: e9 74 fe ff ff jmp 119104 <msdos_dir_read+0x408> <== NOT EXECUTED
j++;
}
rtems_semaphore_release(fs_info->vol_sema);
return cmpltd;
}
119290: 89 d8 mov %ebx,%eax <== NOT EXECUTED
119292: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
119295: 5b pop %ebx <== NOT EXECUTED
119296: 5e pop %esi <== NOT EXECUTED
119297: 5f pop %edi <== NOT EXECUTED
119298: 5d pop %ebp <== NOT EXECUTED
119299: c3 ret <== NOT EXECUTED
0011929a <msdos_dir_stat>:
int
msdos_dir_stat(
const rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
11929a: 55 push %ebp
11929b: 89 e5 mov %esp,%ebp
11929d: 57 push %edi
11929e: 56 push %esi
11929f: 53 push %ebx
1192a0: 83 ec 10 sub $0x10,%esp
1192a3: 8b 45 08 mov 0x8(%ebp),%eax
1192a6: 8b 5d 0c mov 0xc(%ebp),%ebx
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
1192a9: 8b 50 14 mov 0x14(%eax),%edx
1192ac: 8b 72 08 mov 0x8(%edx),%esi
fat_file_fd_t *fat_fd = loc->node_access;
1192af: 8b 78 08 mov 0x8(%eax),%edi
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
1192b2: 6a 00 push $0x0
1192b4: 6a 00 push $0x0
1192b6: ff b6 90 00 00 00 pushl 0x90(%esi)
1192bc: e8 a3 1b ff ff call 10ae64 <rtems_semaphore_obtain>
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
1192c1: 83 c4 10 add $0x10,%esp
1192c4: 85 c0 test %eax,%eax
1192c6: 74 10 je 1192d8 <msdos_dir_stat+0x3e> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one(EIO);
1192c8: e8 43 05 00 00 call 119810 <__errno> <== NOT EXECUTED
1192cd: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
1192d3: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
1192d6: eb 5a jmp 119332 <msdos_dir_stat+0x98> <== NOT EXECUTED
static inline dev_t rtems_disk_get_device_identifier(
const rtems_disk_device *dd
)
{
return dd->dev;
1192d8: 8b 46 58 mov 0x58(%esi),%eax
buf->st_dev = rtems_disk_get_device_identifier(fs_info->fat.vol.dd);
1192db: 8b 50 04 mov 0x4(%eax),%edx
1192de: 8b 00 mov (%eax),%eax
1192e0: 89 03 mov %eax,(%ebx)
1192e2: 89 53 04 mov %edx,0x4(%ebx)
buf->st_ino = fat_fd->ino;
1192e5: 8b 47 0c mov 0xc(%edi),%eax
1192e8: 89 43 08 mov %eax,0x8(%ebx)
buf->st_mode = S_IFDIR | S_IRWXU | S_IRWXG | S_IRWXO;
1192eb: c7 43 0c ff 41 00 00 movl $0x41ff,0xc(%ebx)
buf->st_rdev = 0ll;
1192f2: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx)
1192f9: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx)
buf->st_size = fat_fd->fat_file_size;
119300: 8b 47 18 mov 0x18(%edi),%eax
119303: 89 43 20 mov %eax,0x20(%ebx)
119306: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx)
buf->st_blocks = fat_fd->fat_file_size >> FAT_SECTOR512_BITS;
11930d: c1 e8 09 shr $0x9,%eax
119310: 89 43 44 mov %eax,0x44(%ebx)
buf->st_blksize = fs_info->fat.vol.bps;
119313: 0f b7 06 movzwl (%esi),%eax
119316: 89 43 40 mov %eax,0x40(%ebx)
buf->st_mtime = fat_fd->mtime;
119319: 8b 47 40 mov 0x40(%edi),%eax
11931c: 89 43 30 mov %eax,0x30(%ebx)
rtems_semaphore_release(fs_info->vol_sema);
11931f: 83 ec 0c sub $0xc,%esp
119322: ff b6 90 00 00 00 pushl 0x90(%esi)
119328: e8 27 1c ff ff call 10af54 <rtems_semaphore_release>
return RC_OK;
11932d: 83 c4 10 add $0x10,%esp
119330: 31 c0 xor %eax,%eax
}
119332: 8d 65 f4 lea -0xc(%ebp),%esp
119335: 5b pop %ebx
119336: 5e pop %esi
119337: 5f pop %edi
119338: 5d pop %ebp
119339: c3 ret
001165ce <msdos_eval_token>:
rtems_filesystem_eval_path_context_t *ctx,
void *arg,
const char *token,
size_t tokenlen
)
{
1165ce: 55 push %ebp
1165cf: 89 e5 mov %esp,%ebp
1165d1: 53 push %ebx
1165d2: 53 push %ebx
1165d3: 8b 5d 08 mov 0x8(%ebp),%ebx
1165d6: 8b 45 10 mov 0x10(%ebp),%eax
1165d9: 8b 55 14 mov 0x14(%ebp),%edx
static inline bool rtems_filesystem_is_current_directory(
const char *token,
size_t tokenlen
)
{
return tokenlen == 1 && token [0] == '.';
1165dc: 31 c9 xor %ecx,%ecx
1165de: 83 fa 01 cmp $0x1,%edx
1165e1: 75 08 jne 1165eb <msdos_eval_token+0x1d>
1165e3: 31 c9 xor %ecx,%ecx
1165e5: 80 38 2e cmpb $0x2e,(%eax)
1165e8: 0f 94 c1 sete %cl
rtems_filesystem_eval_path_generic_status status =
RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_DONE;
if (rtems_filesystem_is_current_directory(token, tokenlen)) {
1165eb: 85 c9 test %ecx,%ecx
1165ed: 74 0b je 1165fa <msdos_eval_token+0x2c>
static inline void rtems_filesystem_eval_path_clear_token(
rtems_filesystem_eval_path_context_t *ctx
)
{
ctx->tokenlen = 0;
1165ef: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
rtems_filesystem_eval_path_clear_token(ctx);
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_CONTINUE;
1165f6: 31 d2 xor %edx,%edx
1165f8: eb 63 jmp 11665d <msdos_eval_token+0x8f>
} else {
rtems_filesystem_location_info_t *currentloc =
rtems_filesystem_eval_path_get_currentloc(ctx);
int rc = msdos_find_name(currentloc, token, tokenlen);
1165fa: 51 push %ecx
1165fb: 52 push %edx
1165fc: 50 push %eax
if (rtems_filesystem_is_current_directory(token, tokenlen)) {
rtems_filesystem_eval_path_clear_token(ctx);
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_CONTINUE;
} else {
rtems_filesystem_location_info_t *currentloc =
1165fd: 8d 43 18 lea 0x18(%ebx),%eax
rtems_filesystem_eval_path_get_currentloc(ctx);
int rc = msdos_find_name(currentloc, token, tokenlen);
116600: 50 push %eax
116601: e8 eb 10 00 00 call 1176f1 <msdos_find_name>
if (rc == RC_OK) {
116606: 83 c4 10 add $0x10,%esp
116609: 85 c0 test %eax,%eax
11660b: 75 32 jne 11663f <msdos_eval_token+0x71>
11660d: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
* None
*/
static void
msdos_set_handlers(rtems_filesystem_location_info_t *loc)
{
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
116614: 8b 43 2c mov 0x2c(%ebx),%eax
116617: 8b 40 08 mov 0x8(%eax),%eax
fat_file_fd_t *fat_fd = loc->node_access;
if (fat_fd->fat_file_type == FAT_DIRECTORY)
11661a: 8b 53 20 mov 0x20(%ebx),%edx
11661d: 83 7a 10 00 cmpl $0x0,0x10(%edx)
116621: 75 08 jne 11662b <msdos_eval_token+0x5d>
loc->handlers = fs_info->directory_handlers;
116623: 8b 80 88 00 00 00 mov 0x88(%eax),%eax
116629: eb 06 jmp 116631 <msdos_eval_token+0x63>
else
loc->handlers = fs_info->file_handlers;
11662b: 8b 80 8c 00 00 00 mov 0x8c(%eax),%eax
116631: 89 43 28 mov %eax,0x28(%ebx)
void *arg,
const char *token,
size_t tokenlen
)
{
rtems_filesystem_eval_path_generic_status status =
116634: 31 d2 xor %edx,%edx
116636: 83 7b 04 00 cmpl $0x0,0x4(%ebx)
11663a: 0f 94 c2 sete %dl
11663d: eb 1e jmp 11665d <msdos_eval_token+0x8f>
msdos_set_handlers(currentloc);
if (rtems_filesystem_eval_path_has_path(ctx)) {
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_CONTINUE;
}
} else if (rc == MSDOS_NAME_NOT_FOUND_ERR) {
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY;
11663f: ba 02 00 00 00 mov $0x2,%edx
rtems_filesystem_eval_path_clear_token(ctx);
msdos_set_handlers(currentloc);
if (rtems_filesystem_eval_path_has_path(ctx)) {
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_CONTINUE;
}
} else if (rc == MSDOS_NAME_NOT_FOUND_ERR) {
116644: 3d 01 7d 00 00 cmp $0x7d01,%eax
116649: 74 12 je 11665d <msdos_eval_token+0x8f> <== ALWAYS TAKEN
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY;
} else {
rtems_filesystem_eval_path_error(ctx, 0);
11664b: 50 push %eax <== NOT EXECUTED
11664c: 50 push %eax <== NOT EXECUTED
11664d: 6a 00 push $0x0 <== NOT EXECUTED
11664f: 53 push %ebx <== NOT EXECUTED
116650: e8 6d 1e ff ff call 1084c2 <rtems_filesystem_eval_path_error><== NOT EXECUTED
116655: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
void *arg,
const char *token,
size_t tokenlen
)
{
rtems_filesystem_eval_path_generic_status status =
116658: ba 01 00 00 00 mov $0x1,%edx <== NOT EXECUTED
rtems_filesystem_eval_path_error(ctx, 0);
}
}
return status;
}
11665d: 89 d0 mov %edx,%eax
11665f: 8b 5d fc mov -0x4(%ebp),%ebx
116662: c9 leave
116663: c3 ret
00119389 <msdos_file_close>:
* RC_OK, if file closed successfully, or -1 if error occured (errno set
* appropriately)
*/
int
msdos_file_close(rtems_libio_t *iop)
{
119389: 55 push %ebp
11938a: 89 e5 mov %esp,%ebp
11938c: 56 push %esi
11938d: 53 push %ebx
11938e: 8b 75 08 mov 0x8(%ebp),%esi
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
119391: 8b 46 24 mov 0x24(%esi),%eax
119394: 8b 58 08 mov 0x8(%eax),%ebx
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
119397: 50 push %eax
119398: 6a 00 push $0x0
11939a: 6a 00 push $0x0
11939c: ff b3 90 00 00 00 pushl 0x90(%ebx)
1193a2: e8 bd 1a ff ff call 10ae64 <rtems_semaphore_obtain>
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
1193a7: 83 c4 10 add $0x10,%esp
1193aa: 85 c0 test %eax,%eax
1193ac: 74 10 je 1193be <msdos_file_close+0x35> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one(EIO);
1193ae: e8 5d 04 00 00 call 119810 <__errno> <== NOT EXECUTED
1193b3: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
1193b9: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED
1193bc: eb 1a jmp 1193d8 <msdos_file_close+0x4f> <== NOT EXECUTED
rc = msdos_file_update(iop);
1193be: 89 f0 mov %esi,%eax
1193c0: e8 77 ff ff ff call 11933c <msdos_file_update>
1193c5: 89 c6 mov %eax,%esi
rtems_semaphore_release(fs_info->vol_sema);
1193c7: 83 ec 0c sub $0xc,%esp
1193ca: ff b3 90 00 00 00 pushl 0x90(%ebx)
1193d0: e8 7f 1b ff ff call 10af54 <rtems_semaphore_release>
return rc;
1193d5: 83 c4 10 add $0x10,%esp
}
1193d8: 89 f0 mov %esi,%eax
1193da: 8d 65 f8 lea -0x8(%ebp),%esp
1193dd: 5b pop %ebx
1193de: 5e pop %esi
1193df: 5d pop %ebp
1193e0: c3 ret
001195ed <msdos_file_ftruncate>:
* RETURNS:
* RC_OK on success, or -1 if error occured (errno set appropriately).
*/
int
msdos_file_ftruncate(rtems_libio_t *iop, off_t length)
{
1195ed: 55 push %ebp
1195ee: 89 e5 mov %esp,%ebp
1195f0: 57 push %edi
1195f1: 56 push %esi
1195f2: 53 push %ebx
1195f3: 83 ec 30 sub $0x30,%esp
1195f6: 8b 45 08 mov 0x8(%ebp),%eax
1195f9: 8b 55 0c mov 0xc(%ebp),%edx
1195fc: 89 55 d4 mov %edx,-0x2c(%ebp)
1195ff: 8b 55 10 mov 0x10(%ebp),%edx
119602: 89 55 d0 mov %edx,-0x30(%ebp)
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
119605: 8b 50 24 mov 0x24(%eax),%edx
119608: 8b 72 08 mov 0x8(%edx),%esi
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
11960b: 8b 78 18 mov 0x18(%eax),%edi
uint32_t old_length;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
11960e: 6a 00 push $0x0
119610: 6a 00 push $0x0
119612: ff b6 90 00 00 00 pushl 0x90(%esi)
119618: e8 47 18 ff ff call 10ae64 <rtems_semaphore_obtain>
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
11961d: 83 c4 10 add $0x10,%esp
119620: 85 c0 test %eax,%eax
119622: 74 13 je 119637 <msdos_file_ftruncate+0x4a><== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one(EIO);
119624: e8 e7 01 00 00 call 119810 <__errno> <== NOT EXECUTED
119629: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
11962f: 83 cb ff or $0xffffffff,%ebx <== NOT EXECUTED
119632: e9 89 00 00 00 jmp 1196c0 <msdos_file_ftruncate+0xd3><== NOT EXECUTED
old_length = fat_fd->fat_file_size;
119637: 8b 4f 18 mov 0x18(%edi),%ecx
if (length < old_length) {
11963a: 83 7d d0 00 cmpl $0x0,-0x30(%ebp)
11963e: 7f 1d jg 11965d <msdos_file_ftruncate+0x70><== NEVER TAKEN
119640: 7c 05 jl 119647 <msdos_file_ftruncate+0x5a><== NEVER TAKEN
119642: 39 4d d4 cmp %ecx,-0x2c(%ebp)
119645: 73 16 jae 11965d <msdos_file_ftruncate+0x70>
rc = fat_file_truncate(&fs_info->fat, fat_fd, length);
119647: 50 push %eax
119648: ff 75 d4 pushl -0x2c(%ebp)
11964b: 57 push %edi
11964c: 56 push %esi
11964d: e8 08 85 ff ff call 111b5a <fat_file_truncate>
119652: 89 c3 mov %eax,%ebx
119654: 83 c4 10 add $0x10,%esp
errno = ENOSPC;
rc = -1;
}
}
if (rc == RC_OK) {
119657: 85 c0 test %eax,%eax
119659: 74 4e je 1196a9 <msdos_file_ftruncate+0xbc><== ALWAYS TAKEN
11965b: eb 52 jmp 1196af <msdos_file_ftruncate+0xc2><== NOT EXECUTED
if (length < old_length) {
rc = fat_file_truncate(&fs_info->fat, fat_fd, length);
} else {
uint32_t new_length;
rc = fat_file_extend(&fs_info->fat,
11965d: 83 ec 0c sub $0xc,%esp
119660: 8d 45 e4 lea -0x1c(%ebp),%eax
119663: 50 push %eax
119664: ff 75 d4 pushl -0x2c(%ebp)
119667: 6a 01 push $0x1
119669: 57 push %edi
11966a: 56 push %esi
11966b: 89 4d cc mov %ecx,-0x34(%ebp)
11966e: e8 f1 86 ff ff call 111d64 <fat_file_extend>
119673: 89 c3 mov %eax,%ebx
fat_fd,
true,
length,
&new_length);
if (rc == RC_OK && length != new_length) {
119675: 83 c4 20 add $0x20,%esp
119678: 85 c0 test %eax,%eax
11967a: 8b 4d cc mov -0x34(%ebp),%ecx
11967d: 75 30 jne 1196af <msdos_file_ftruncate+0xc2><== NEVER TAKEN
11967f: 8b 45 e4 mov -0x1c(%ebp),%eax
119682: 83 7d d0 00 cmpl $0x0,-0x30(%ebp)
119686: 75 05 jne 11968d <msdos_file_ftruncate+0xa0><== NEVER TAKEN
119688: 39 45 d4 cmp %eax,-0x2c(%ebp)
11968b: 74 1c je 1196a9 <msdos_file_ftruncate+0xbc><== ALWAYS TAKEN
fat_file_truncate(&fs_info->fat, fat_fd, old_length);
11968d: 50 push %eax <== NOT EXECUTED
11968e: 51 push %ecx <== NOT EXECUTED
11968f: 57 push %edi <== NOT EXECUTED
119690: 56 push %esi <== NOT EXECUTED
119691: e8 c4 84 ff ff call 111b5a <fat_file_truncate> <== NOT EXECUTED
errno = ENOSPC;
119696: e8 75 01 00 00 call 119810 <__errno> <== NOT EXECUTED
11969b: c7 00 1c 00 00 00 movl $0x1c,(%eax) <== NOT EXECUTED
1196a1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rc = -1;
1196a4: 83 cb ff or $0xffffffff,%ebx <== NOT EXECUTED
1196a7: eb 06 jmp 1196af <msdos_file_ftruncate+0xc2><== NOT EXECUTED
}
}
if (rc == RC_OK) {
fat_fd->fat_file_size = length;
1196a9: 8b 55 d4 mov -0x2c(%ebp),%edx
1196ac: 89 57 18 mov %edx,0x18(%edi)
}
rtems_semaphore_release(fs_info->vol_sema);
1196af: 83 ec 0c sub $0xc,%esp
1196b2: ff b6 90 00 00 00 pushl 0x90(%esi)
1196b8: e8 97 18 ff ff call 10af54 <rtems_semaphore_release>
return rc;
1196bd: 83 c4 10 add $0x10,%esp
}
1196c0: 89 d8 mov %ebx,%eax
1196c2: 8d 65 f4 lea -0xc(%ebp),%esp
1196c5: 5b pop %ebx
1196c6: 5e pop %esi
1196c7: 5f pop %edi
1196c8: 5d pop %ebp
1196c9: c3 ret
001193e1 <msdos_file_read>:
* the number of bytes read on success, or -1 if error occured (errno set
* appropriately)
*/
ssize_t
msdos_file_read(rtems_libio_t *iop, void *buffer, size_t count)
{
1193e1: 55 push %ebp
1193e2: 89 e5 mov %esp,%ebp
1193e4: 57 push %edi
1193e5: 56 push %esi
1193e6: 53 push %ebx
1193e7: 83 ec 20 sub $0x20,%esp
1193ea: 8b 75 08 mov 0x8(%ebp),%esi
ssize_t ret = 0;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
1193ed: 8b 46 24 mov 0x24(%esi),%eax
1193f0: 8b 50 08 mov 0x8(%eax),%edx
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
1193f3: 8b 5e 18 mov 0x18(%esi),%ebx
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
1193f6: 6a 00 push $0x0
1193f8: 6a 00 push $0x0
1193fa: ff b2 90 00 00 00 pushl 0x90(%edx)
119400: 89 55 e4 mov %edx,-0x1c(%ebp)
119403: e8 5c 1a ff ff call 10ae64 <rtems_semaphore_obtain>
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
119408: 83 c4 10 add $0x10,%esp
11940b: 85 c0 test %eax,%eax
11940d: 8b 55 e4 mov -0x1c(%ebp),%edx
119410: 74 10 je 119422 <msdos_file_read+0x41> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one(EIO);
119412: e8 f9 03 00 00 call 119810 <__errno> <== NOT EXECUTED
119417: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
11941d: 83 cf ff or $0xffffffff,%edi <== NOT EXECUTED
119420: eb 3e jmp 119460 <msdos_file_read+0x7f> <== NOT EXECUTED
ret = fat_file_read(&fs_info->fat, fat_fd, iop->offset, count,
119422: 83 ec 0c sub $0xc,%esp
119425: ff 75 0c pushl 0xc(%ebp)
119428: ff 75 10 pushl 0x10(%ebp)
11942b: ff 76 04 pushl 0x4(%esi)
11942e: 53 push %ebx
11942f: 52 push %edx
119430: 89 55 e4 mov %edx,-0x1c(%ebp)
119433: e8 b3 85 ff ff call 1119eb <fat_file_read>
119438: 89 c7 mov %eax,%edi
buffer);
if (ret > 0)
11943a: 83 c4 20 add $0x20,%esp
11943d: 85 c0 test %eax,%eax
11943f: 8b 55 e4 mov -0x1c(%ebp),%edx
119442: 7e 0b jle 11944f <msdos_file_read+0x6e>
iop->offset += ret;
119444: 89 c3 mov %eax,%ebx
119446: c1 fb 1f sar $0x1f,%ebx
119449: 01 46 04 add %eax,0x4(%esi)
11944c: 11 5e 08 adc %ebx,0x8(%esi)
rtems_semaphore_release(fs_info->vol_sema);
11944f: 83 ec 0c sub $0xc,%esp
119452: ff b2 90 00 00 00 pushl 0x90(%edx)
119458: e8 f7 1a ff ff call 10af54 <rtems_semaphore_release>
return ret;
11945d: 83 c4 10 add $0x10,%esp
}
119460: 89 f8 mov %edi,%eax
119462: 8d 65 f4 lea -0xc(%ebp),%esp
119465: 5b pop %ebx
119466: 5e pop %esi
119467: 5f pop %edi
119468: 5d pop %ebp
119469: c3 ret
0011954d <msdos_file_stat>:
int
msdos_file_stat(
const rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
11954d: 55 push %ebp
11954e: 89 e5 mov %esp,%ebp
119550: 57 push %edi
119551: 56 push %esi
119552: 53 push %ebx
119553: 83 ec 10 sub $0x10,%esp
119556: 8b 45 08 mov 0x8(%ebp),%eax
119559: 8b 5d 0c mov 0xc(%ebp),%ebx
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
11955c: 8b 50 14 mov 0x14(%eax),%edx
11955f: 8b 72 08 mov 0x8(%edx),%esi
fat_file_fd_t *fat_fd = loc->node_access;
119562: 8b 78 08 mov 0x8(%eax),%edi
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
119565: 6a 00 push $0x0
119567: 6a 00 push $0x0
119569: ff b6 90 00 00 00 pushl 0x90(%esi)
11956f: e8 f0 18 ff ff call 10ae64 <rtems_semaphore_obtain>
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
119574: 83 c4 10 add $0x10,%esp
119577: 85 c0 test %eax,%eax
119579: 74 10 je 11958b <msdos_file_stat+0x3e> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one(EIO);
11957b: e8 90 02 00 00 call 119810 <__errno> <== NOT EXECUTED
119580: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
119586: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
119589: eb 5a jmp 1195e5 <msdos_file_stat+0x98> <== NOT EXECUTED
11958b: 8b 46 58 mov 0x58(%esi),%eax
buf->st_dev = rtems_disk_get_device_identifier(fs_info->fat.vol.dd);
11958e: 8b 50 04 mov 0x4(%eax),%edx
119591: 8b 00 mov (%eax),%eax
119593: 89 03 mov %eax,(%ebx)
119595: 89 53 04 mov %edx,0x4(%ebx)
buf->st_ino = fat_fd->ino;
119598: 8b 47 0c mov 0xc(%edi),%eax
11959b: 89 43 08 mov %eax,0x8(%ebx)
buf->st_mode = S_IFREG | S_IRWXU | S_IRWXG | S_IRWXO;
11959e: c7 43 0c ff 81 00 00 movl $0x81ff,0xc(%ebx)
buf->st_rdev = 0ll;
1195a5: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx)
1195ac: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx)
buf->st_size = fat_fd->fat_file_size;
1195b3: 8b 47 18 mov 0x18(%edi),%eax
1195b6: 89 43 20 mov %eax,0x20(%ebx)
1195b9: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx)
buf->st_blocks = fat_fd->fat_file_size >> FAT_SECTOR512_BITS;
1195c0: c1 e8 09 shr $0x9,%eax
1195c3: 89 43 44 mov %eax,0x44(%ebx)
buf->st_blksize = fs_info->fat.vol.bps;
1195c6: 0f b7 06 movzwl (%esi),%eax
1195c9: 89 43 40 mov %eax,0x40(%ebx)
buf->st_mtime = fat_fd->mtime;
1195cc: 8b 47 40 mov 0x40(%edi),%eax
1195cf: 89 43 30 mov %eax,0x30(%ebx)
rtems_semaphore_release(fs_info->vol_sema);
1195d2: 83 ec 0c sub $0xc,%esp
1195d5: ff b6 90 00 00 00 pushl 0x90(%esi)
1195db: e8 74 19 ff ff call 10af54 <rtems_semaphore_release>
return RC_OK;
1195e0: 83 c4 10 add $0x10,%esp
1195e3: 31 c0 xor %eax,%eax
}
1195e5: 8d 65 f4 lea -0xc(%ebp),%esp
1195e8: 5b pop %ebx
1195e9: 5e pop %esi
1195ea: 5f pop %edi
1195eb: 5d pop %ebp
1195ec: c3 ret
001196ca <msdos_file_sync>:
* RETURNS:
* RC_OK on success, or -1 if error occured (errno set appropriately)
*/
int
msdos_file_sync(rtems_libio_t *iop)
{
1196ca: 55 push %ebp
1196cb: 89 e5 mov %esp,%ebp
1196cd: 56 push %esi
1196ce: 53 push %ebx
1196cf: 8b 75 08 mov 0x8(%ebp),%esi
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
1196d2: 8b 46 24 mov 0x24(%esi),%eax
1196d5: 8b 58 08 mov 0x8(%eax),%ebx
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
1196d8: 50 push %eax
1196d9: 6a 00 push $0x0
1196db: 6a 00 push $0x0
1196dd: ff b3 90 00 00 00 pushl 0x90(%ebx)
1196e3: e8 7c 17 ff ff call 10ae64 <rtems_semaphore_obtain>
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
1196e8: 83 c4 10 add $0x10,%esp
1196eb: 85 c0 test %eax,%eax
1196ed: 74 10 je 1196ff <msdos_file_sync+0x35> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one(EIO);
1196ef: e8 1c 01 00 00 call 119810 <__errno> <== NOT EXECUTED
1196f4: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
1196fa: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED
1196fd: eb 2a jmp 119729 <msdos_file_sync+0x5f> <== NOT EXECUTED
rc = msdos_file_update(iop);
1196ff: 89 f0 mov %esi,%eax
119701: e8 36 fc ff ff call 11933c <msdos_file_update>
119706: 89 c6 mov %eax,%esi
if (rc != RC_OK)
119708: 85 c0 test %eax,%eax
11970a: 74 05 je 119711 <msdos_file_sync+0x47> <== ALWAYS TAKEN
{
rtems_semaphore_release(fs_info->vol_sema);
11970c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11970f: eb 0a jmp 11971b <msdos_file_sync+0x51> <== NOT EXECUTED
return rc;
}
rc = msdos_sync_unprotected(fs_info);
119711: 83 ec 0c sub $0xc,%esp
119714: 53 push %ebx
119715: e8 54 e1 ff ff call 11786e <msdos_sync_unprotected>
rtems_semaphore_release(fs_info->vol_sema);
11971a: 58 pop %eax
11971b: ff b3 90 00 00 00 pushl 0x90(%ebx)
119721: e8 2e 18 ff ff call 10af54 <rtems_semaphore_release>
return RC_OK;
119726: 83 c4 10 add $0x10,%esp
}
119729: 89 f0 mov %esi,%eax
11972b: 8d 65 f8 lea -0x8(%ebp),%esp
11972e: 5b pop %ebx
11972f: 5e pop %esi
119730: 5d pop %ebp
119731: c3 ret
0011933c <msdos_file_update>:
#include "msdos.h"
static int
msdos_file_update(rtems_libio_t *iop)
{
11933c: 55 push %ebp
11933d: 89 e5 mov %esp,%ebp
11933f: 56 push %esi
119340: 53 push %ebx
119341: 89 c3 mov %eax,%ebx
int rc = RC_OK;
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
119343: 8b 70 18 mov 0x18(%eax),%esi
#include "msdos.h"
static int
msdos_file_update(rtems_libio_t *iop)
{
int rc = RC_OK;
119346: 31 c0 xor %eax,%eax
/*
* if fat-file descriptor is not marked as "removed", synchronize
* size, first cluster number, write time and date fields of the file
*/
if (!FAT_FILE_IS_REMOVED(fat_fd))
119348: f6 46 30 01 testb $0x1,0x30(%esi)
11934c: 75 34 jne 119382 <msdos_file_update+0x46><== NEVER TAKEN
{
rc = msdos_set_first_cluster_num(iop->pathinfo.mt_entry, fat_fd);
11934e: 51 push %ecx
11934f: 51 push %ecx
119350: 56 push %esi
119351: ff 73 24 pushl 0x24(%ebx)
119354: e8 fc d5 ff ff call 116955 <msdos_set_first_cluster_num>
if (rc != RC_OK)
119359: 83 c4 10 add $0x10,%esp
11935c: 85 c0 test %eax,%eax
11935e: 75 22 jne 119382 <msdos_file_update+0x46><== NEVER TAKEN
{
return rc;
}
rc = msdos_set_file_size(iop->pathinfo.mt_entry, fat_fd);
119360: 52 push %edx
119361: 52 push %edx
119362: 56 push %esi
119363: ff 73 24 pushl 0x24(%ebx)
119366: e8 84 d6 ff ff call 1169ef <msdos_set_file_size>
if (rc != RC_OK)
11936b: 83 c4 10 add $0x10,%esp
11936e: 85 c0 test %eax,%eax
119370: 75 10 jne 119382 <msdos_file_update+0x46><== NEVER TAKEN
{
return rc;
}
rc = msdos_set_dir_wrt_time_and_date(iop->pathinfo.mt_entry, fat_fd);
119372: 50 push %eax
119373: 50 push %eax
119374: 56 push %esi
119375: ff 73 24 pushl 0x24(%ebx)
119378: e8 2d d5 ff ff call 1168aa <msdos_set_dir_wrt_time_and_date>
11937d: 83 c4 10 add $0x10,%esp
119380: eb 00 jmp 119382 <msdos_file_update+0x46>
return rc;
}
}
return rc;
}
119382: 8d 65 f8 lea -0x8(%ebp),%esp
119385: 5b pop %ebx
119386: 5e pop %esi
119387: 5d pop %ebp
119388: c3 ret
0011946a <msdos_file_write>:
* the number of bytes written on success, or -1 if error occured
* and errno set appropriately
*/
ssize_t
msdos_file_write(rtems_libio_t *iop,const void *buffer, size_t count)
{
11946a: 55 push %ebp
11946b: 89 e5 mov %esp,%ebp
11946d: 57 push %edi
11946e: 56 push %esi
11946f: 53 push %ebx
119470: 83 ec 30 sub $0x30,%esp
119473: 8b 75 08 mov 0x8(%ebp),%esi
ssize_t ret = 0;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
119476: 8b 46 24 mov 0x24(%esi),%eax
119479: 8b 40 08 mov 0x8(%eax),%eax
11947c: 89 45 d0 mov %eax,-0x30(%ebp)
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
11947f: 8b 7e 18 mov 0x18(%esi),%edi
119482: 89 7d e4 mov %edi,-0x1c(%ebp)
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
119485: 6a 00 push $0x0
119487: 6a 00 push $0x0
119489: ff b0 90 00 00 00 pushl 0x90(%eax)
11948f: e8 d0 19 ff ff call 10ae64 <rtems_semaphore_obtain>
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
119494: 83 c4 10 add $0x10,%esp
119497: 85 c0 test %eax,%eax
119499: 74 0d je 1194a8 <msdos_file_write+0x3e> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one(EIO);
11949b: e8 70 03 00 00 call 119810 <__errno> <== NOT EXECUTED
1194a0: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
1194a6: eb 4a jmp 1194f2 <msdos_file_write+0x88> <== NOT EXECUTED
if ((iop->flags & LIBIO_FLAGS_APPEND) != 0)
1194a8: f6 46 0d 02 testb $0x2,0xd(%esi)
1194ac: 74 10 je 1194be <msdos_file_write+0x54>
iop->offset = fat_fd->fat_file_size;
1194ae: 8b 7d e4 mov -0x1c(%ebp),%edi
1194b1: 8b 7f 18 mov 0x18(%edi),%edi
1194b4: 89 7e 04 mov %edi,0x4(%esi)
1194b7: c7 46 08 00 00 00 00 movl $0x0,0x8(%esi)
ret = fat_file_write(&fs_info->fat, fat_fd, iop->offset, count,
1194be: 83 ec 0c sub $0xc,%esp
1194c1: ff 75 0c pushl 0xc(%ebp)
1194c4: ff 75 10 pushl 0x10(%ebp)
1194c7: ff 76 04 pushl 0x4(%esi)
1194ca: ff 75 e4 pushl -0x1c(%ebp)
1194cd: ff 75 d0 pushl -0x30(%ebp)
1194d0: e8 ad 8a ff ff call 111f82 <fat_file_write>
1194d5: 89 c2 mov %eax,%edx
buffer);
if (ret < 0)
1194d7: 83 c4 20 add $0x20,%esp
1194da: 85 c0 test %eax,%eax
1194dc: 79 19 jns 1194f7 <msdos_file_write+0x8d> <== ALWAYS TAKEN
{
rtems_semaphore_release(fs_info->vol_sema);
1194de: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1194e1: 8b 75 d0 mov -0x30(%ebp),%esi <== NOT EXECUTED
1194e4: ff b6 90 00 00 00 pushl 0x90(%esi) <== NOT EXECUTED
1194ea: e8 65 1a ff ff call 10af54 <rtems_semaphore_release><== NOT EXECUTED
return -1;
1194ef: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1194f2: 83 ca ff or $0xffffffff,%edx <== NOT EXECUTED
1194f5: eb 4c jmp 119543 <msdos_file_write+0xd9> <== NOT EXECUTED
/*
* update file size in both fat-file descriptor and file control block if
* file was extended
*/
iop->offset += ret;
1194f7: 89 c1 mov %eax,%ecx
1194f9: 89 c3 mov %eax,%ebx
1194fb: c1 fb 1f sar $0x1f,%ebx
1194fe: 03 4e 04 add 0x4(%esi),%ecx
119501: 13 5e 08 adc 0x8(%esi),%ebx
119504: 89 4e 04 mov %ecx,0x4(%esi)
119507: 89 5e 08 mov %ebx,0x8(%esi)
if (iop->offset > fat_fd->fat_file_size)
11950a: 8b 7d e4 mov -0x1c(%ebp),%edi
11950d: 8b 77 18 mov 0x18(%edi),%esi
119510: 31 ff xor %edi,%edi
119512: 89 75 d8 mov %esi,-0x28(%ebp)
119515: 89 7d dc mov %edi,-0x24(%ebp)
119518: 83 fb 00 cmp $0x0,%ebx
11951b: 7c 0c jl 119529 <msdos_file_write+0xbf> <== NEVER TAKEN
11951d: 7f 04 jg 119523 <msdos_file_write+0xb9> <== NEVER TAKEN
11951f: 39 f1 cmp %esi,%ecx
119521: 76 06 jbe 119529 <msdos_file_write+0xbf>
fat_fd->fat_file_size = iop->offset;
119523: 8b 75 e4 mov -0x1c(%ebp),%esi
119526: 89 4e 18 mov %ecx,0x18(%esi)
rtems_semaphore_release(fs_info->vol_sema);
119529: 83 ec 0c sub $0xc,%esp
11952c: 8b 7d d0 mov -0x30(%ebp),%edi
11952f: ff b7 90 00 00 00 pushl 0x90(%edi)
119535: 89 55 d4 mov %edx,-0x2c(%ebp)
119538: e8 17 1a ff ff call 10af54 <rtems_semaphore_release>
return ret;
11953d: 83 c4 10 add $0x10,%esp
119540: 8b 55 d4 mov -0x2c(%ebp),%edx
}
119543: 89 d0 mov %edx,%eax
119545: 8d 65 f4 lea -0xc(%ebp),%esp
119548: 5b pop %ebx
119549: 5e pop %esi
11954a: 5f pop %edi
11954b: 5d pop %ebp
11954c: c3 ret
00118c27 <msdos_filename_unix2dos>:
* Convert a unix filename to a DOS filename. Return -1 if wrong name is
* supplied.
*/
int
msdos_filename_unix2dos(const char *un, int unlen, char *dn)
{
118c27: 55 push %ebp
118c28: 89 e5 mov %esp,%ebp
118c2a: 57 push %edi
118c2b: 56 push %esi
118c2c: 53 push %ebx
118c2d: 8b 45 08 mov 0x8(%ebp),%eax
118c30: 8b 55 0c mov 0xc(%ebp),%edx
/*
* Fill the dos filename string with blanks. These are DOS's pad
* characters.
*/
for (i = 0; i <= 10; i++)
118c33: 31 db xor %ebx,%ebx
dn[i] = ' ';
118c35: 8b 4d 10 mov 0x10(%ebp),%ecx
118c38: c6 04 19 20 movb $0x20,(%ecx,%ebx,1)
/*
* Fill the dos filename string with blanks. These are DOS's pad
* characters.
*/
for (i = 0; i <= 10; i++)
118c3c: 43 inc %ebx
118c3d: 83 fb 0b cmp $0xb,%ebx
118c40: 75 f3 jne 118c35 <msdos_filename_unix2dos+0xe>
/*
* The filenames "." and ".." are handled specially, since they
* don't follow dos filename rules.
*/
if (un[0] == '.' && unlen == 1) {
118c42: 80 38 2e cmpb $0x2e,(%eax)
118c45: 75 29 jne 118c70 <msdos_filename_unix2dos+0x49><== ALWAYS TAKEN
118c47: 83 fa 01 cmp $0x1,%edx <== NOT EXECUTED
118c4a: 75 08 jne 118c54 <msdos_filename_unix2dos+0x2d><== NOT EXECUTED
dn[0] = '.';
118c4c: c6 01 2e movb $0x2e,(%ecx) <== NOT EXECUTED
return 0;
118c4f: e9 9f 00 00 00 jmp 118cf3 <msdos_filename_unix2dos+0xcc><== NOT EXECUTED
}
if (un[0] == '.' && un[1] == '.' && unlen == 2) {
118c54: 80 78 01 2e cmpb $0x2e,0x1(%eax) <== NOT EXECUTED
118c58: 75 16 jne 118c70 <msdos_filename_unix2dos+0x49><== NOT EXECUTED
118c5a: 83 fa 02 cmp $0x2,%edx <== NOT EXECUTED
118c5d: 75 11 jne 118c70 <msdos_filename_unix2dos+0x49><== NOT EXECUTED
dn[0] = '.';
118c5f: 8b 7d 10 mov 0x10(%ebp),%edi <== NOT EXECUTED
118c62: c6 07 2e movb $0x2e,(%edi) <== NOT EXECUTED
dn[1] = '.';
118c65: c6 47 01 2e movb $0x2e,0x1(%edi) <== NOT EXECUTED
return 0;
118c69: e9 85 00 00 00 jmp 118cf3 <msdos_filename_unix2dos+0xcc><== NOT EXECUTED
/*
* Remove any dots from the start of a file name.
*/
while (unlen && (*un == '.')) {
un++;
118c6e: 40 inc %eax <== NOT EXECUTED
unlen--;
118c6f: 4a dec %edx <== NOT EXECUTED
}
/*
* Remove any dots from the start of a file name.
*/
while (unlen && (*un == '.')) {
118c70: 85 d2 test %edx,%edx
118c72: 75 07 jne 118c7b <msdos_filename_unix2dos+0x54><== ALWAYS TAKEN
118c74: 89 c7 mov %eax,%edi
118c76: 8b 75 10 mov 0x10(%ebp),%esi
118c79: eb 16 jmp 118c91 <msdos_filename_unix2dos+0x6a>
118c7b: 80 38 2e cmpb $0x2e,(%eax)
118c7e: 74 ee je 118c6e <msdos_filename_unix2dos+0x47><== NEVER TAKEN
118c80: eb f2 jmp 118c74 <msdos_filename_unix2dos+0x4d>
* of string, a '.', or 8 characters. Whichever happens first stops
* us. This forms the name portion of the dos filename. Fold to
* upper case.
*/
for (i = 0; i <= 7 && unlen && (c = *un) && c != '.'; i++) {
if (msdos_map[c] == 0)
118c82: 8a 9b 14 8c 12 00 mov 0x128c14(%ebx),%bl
118c88: 84 db test %bl,%bl
118c8a: 74 27 je 118cb3 <msdos_filename_unix2dos+0x8c>
break;
dn[i] = msdos_map[c];
118c8c: 88 1e mov %bl,(%esi)
un++;
118c8e: 40 inc %eax
unlen--;
118c8f: 4a dec %edx
118c90: 46 inc %esi
/*
* Convert a unix filename to a DOS filename. Return -1 if wrong name is
* supplied.
*/
int
msdos_filename_unix2dos(const char *un, int unlen, char *dn)
118c91: 89 c3 mov %eax,%ebx
118c93: 29 fb sub %edi,%ebx
* Copy the unix filename into the dos filename string upto the end
* of string, a '.', or 8 characters. Whichever happens first stops
* us. This forms the name portion of the dos filename. Fold to
* upper case.
*/
for (i = 0; i <= 7 && unlen && (c = *un) && c != '.'; i++) {
118c95: 83 fb 07 cmp $0x7,%ebx
118c98: 7f 19 jg 118cb3 <msdos_filename_unix2dos+0x8c>
118c9a: 85 d2 test %edx,%edx
118c9c: 74 15 je 118cb3 <msdos_filename_unix2dos+0x8c>
118c9e: 0f b6 18 movzbl (%eax),%ebx
118ca1: 84 db test %bl,%bl
118ca3: 74 0e je 118cb3 <msdos_filename_unix2dos+0x8c><== NEVER TAKEN
118ca5: 80 fb 2e cmp $0x2e,%bl
118ca8: 75 d8 jne 118c82 <msdos_filename_unix2dos+0x5b>
118caa: eb 07 jmp 118cb3 <msdos_filename_unix2dos+0x8c>
/*
* Strip any further characters up to a '.' or the end of the
* string.
*/
while (unlen && (c = *un)) {
un++;
118cac: 40 inc %eax
unlen--;
118cad: 4a dec %edx
/* Make sure we've skipped over the dot before stopping. */
if (c == '.')
118cae: 80 fb 2e cmp $0x2e,%bl
118cb1: 74 0a je 118cbd <msdos_filename_unix2dos+0x96>
/*
* Strip any further characters up to a '.' or the end of the
* string.
*/
while (unlen && (c = *un)) {
118cb3: 85 d2 test %edx,%edx
118cb5: 74 06 je 118cbd <msdos_filename_unix2dos+0x96>
118cb7: 8a 18 mov (%eax),%bl
118cb9: 84 db test %bl,%bl
118cbb: 75 ef jne 118cac <msdos_filename_unix2dos+0x85><== ALWAYS TAKEN
}
/*
* Remove any dots from the start of a file name.
*/
while (unlen && (*un == '.')) {
118cbd: bb 08 00 00 00 mov $0x8,%ebx
118cc2: eb 1b jmp 118cdf <msdos_filename_unix2dos+0xb8>
* Copy in the extension part of the name, if any. Force to upper
* case. Note that the extension is allowed to contain '.'s.
* Filenames in this form are probably inaccessable under dos.
*/
for (i = 8; i <= 10 && unlen && (c = *un); i++) {
if (msdos_map[c] == 0)
118cc4: 81 e6 ff 00 00 00 and $0xff,%esi
118cca: 0f b6 b6 14 8c 12 00 movzbl 0x128c14(%esi),%esi
118cd1: 89 f1 mov %esi,%ecx
118cd3: 84 c9 test %cl,%cl
118cd5: 74 1c je 118cf3 <msdos_filename_unix2dos+0xcc><== ALWAYS TAKEN
break;
dn[i] = msdos_map[c];
118cd7: 8b 7d 10 mov 0x10(%ebp),%edi <== NOT EXECUTED
118cda: 88 0c 1f mov %cl,(%edi,%ebx,1) <== NOT EXECUTED
un++;
unlen--;
118cdd: 4a dec %edx <== NOT EXECUTED
/*
* Copy in the extension part of the name, if any. Force to upper
* case. Note that the extension is allowed to contain '.'s.
* Filenames in this form are probably inaccessable under dos.
*/
for (i = 8; i <= 10 && unlen && (c = *un); i++) {
118cde: 43 inc %ebx <== NOT EXECUTED
118cdf: 85 d2 test %edx,%edx
118ce1: 74 10 je 118cf3 <msdos_filename_unix2dos+0xcc>
118ce3: 83 fb 0a cmp $0xa,%ebx
118ce6: 7f 0b jg 118cf3 <msdos_filename_unix2dos+0xcc><== NEVER TAKEN
118ce8: 0f b6 74 18 f8 movzbl -0x8(%eax,%ebx,1),%esi
118ced: 89 f1 mov %esi,%ecx
118cef: 84 c9 test %cl,%cl
118cf1: 75 d1 jne 118cc4 <msdos_filename_unix2dos+0x9d><== ALWAYS TAKEN
dn[i] = msdos_map[c];
un++;
unlen--;
}
return 0;
}
118cf3: 31 c0 xor %eax,%eax
118cf5: 5b pop %ebx
118cf6: 5e pop %esi
118cf7: 5f pop %edi
118cf8: 5d pop %ebp
118cf9: c3 ret
001176f1 <msdos_find_name>:
msdos_find_name(
rtems_filesystem_location_info_t *parent_loc,
const char *name,
int name_len
)
{
1176f1: 55 push %ebp
1176f2: 89 e5 mov %esp,%ebp
1176f4: 57 push %edi
1176f5: 56 push %esi
1176f6: 53 push %ebx
1176f7: 83 ec 5c sub $0x5c,%esp
1176fa: 8b 5d 10 mov 0x10(%ebp),%ebx
int rc = RC_OK;
msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info;
1176fd: 8b 55 08 mov 0x8(%ebp),%edx
117700: 8b 42 14 mov 0x14(%edx),%eax
117703: 8b 40 08 mov 0x8(%eax),%eax
117706: 89 45 a4 mov %eax,-0x5c(%ebp)
fat_file_fd_t *fat_fd = NULL;
117709: c7 45 b4 00 00 00 00 movl $0x0,-0x4c(%ebp)
fat_dir_pos_t dir_pos;
unsigned short time_val = 0;
unsigned short date = 0;
char node_entry[MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE];
memset(node_entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
117710: 8d 75 c8 lea -0x38(%ebp),%esi
117713: b9 08 00 00 00 mov $0x8,%ecx
117718: 31 c0 xor %eax,%eax
11771a: 89 f7 mov %esi,%edi
11771c: f3 ab rep stos %eax,%es:(%edi)
name_type = msdos_long_to_short (name,
11771e: 6a 0b push $0xb
117720: 56 push %esi
117721: 53 push %ebx
117722: ff 75 0c pushl 0xc(%ebp)
117725: e8 e4 ef ff ff call 11670e <msdos_long_to_short>
/*
* find the node which correspondes to the name in the directory pointed by
* 'parent_loc'
*/
rc = msdos_get_name_node(parent_loc, false, name, name_len, name_type,
11772a: 83 c4 0c add $0xc,%esp
11772d: 56 push %esi
11772e: 8d 75 b8 lea -0x48(%ebp),%esi
117731: 56 push %esi
117732: 50 push %eax
117733: 53 push %ebx
117734: ff 75 0c pushl 0xc(%ebp)
117737: 6a 00 push $0x0
117739: ff 75 08 pushl 0x8(%ebp)
11773c: e8 e5 fe ff ff call 117626 <msdos_get_name_node>
117741: 89 c3 mov %eax,%ebx
&dir_pos, node_entry);
if (rc != RC_OK)
117743: 83 c4 20 add $0x20,%esp
117746: 85 c0 test %eax,%eax
117748: 0f 85 16 01 00 00 jne 117864 <msdos_find_name+0x173>
return rc;
if (((*MSDOS_DIR_ATTR(node_entry)) & MSDOS_ATTR_VOLUME_ID) ||
11774e: 8a 45 d3 mov -0x2d(%ebp),%al
((*MSDOS_DIR_ATTR(node_entry) & MSDOS_ATTR_LFN_MASK) == MSDOS_ATTR_LFN))
return MSDOS_NAME_NOT_FOUND_ERR;
117751: 66 bb 01 7d mov $0x7d01,%bx
rc = msdos_get_name_node(parent_loc, false, name, name_len, name_type,
&dir_pos, node_entry);
if (rc != RC_OK)
return rc;
if (((*MSDOS_DIR_ATTR(node_entry)) & MSDOS_ATTR_VOLUME_ID) ||
117755: a8 08 test $0x8,%al
117757: 0f 85 07 01 00 00 jne 117864 <msdos_find_name+0x173> <== NEVER TAKEN
((*MSDOS_DIR_ATTR(node_entry) & MSDOS_ATTR_LFN_MASK) == MSDOS_ATTR_LFN))
11775d: 83 e0 3f and $0x3f,%eax
rc = msdos_get_name_node(parent_loc, false, name, name_len, name_type,
&dir_pos, node_entry);
if (rc != RC_OK)
return rc;
if (((*MSDOS_DIR_ATTR(node_entry)) & MSDOS_ATTR_VOLUME_ID) ||
117760: 3c 0f cmp $0xf,%al
117762: 0f 84 fc 00 00 00 je 117864 <msdos_find_name+0x173> <== NEVER TAKEN
((*MSDOS_DIR_ATTR(node_entry) & MSDOS_ATTR_LFN_MASK) == MSDOS_ATTR_LFN))
return MSDOS_NAME_NOT_FOUND_ERR;
/* open fat-file corresponded to the found node */
rc = fat_file_open(&fs_info->fat, &dir_pos, &fat_fd);
117768: 53 push %ebx
117769: 8d 45 b4 lea -0x4c(%ebp),%eax
11776c: 50 push %eax
11776d: 56 push %esi
11776e: ff 75 a4 pushl -0x5c(%ebp)
117771: e8 20 a1 ff ff call 111896 <fat_file_open>
117776: 89 c3 mov %eax,%ebx
if (rc != RC_OK)
117778: 83 c4 10 add $0x10,%esp
11777b: 85 c0 test %eax,%eax
11777d: 0f 85 e1 00 00 00 jne 117864 <msdos_find_name+0x173> <== NEVER TAKEN
return rc;
fat_fd->dir_pos = dir_pos;
117783: 8b 5d b4 mov -0x4c(%ebp),%ebx
117786: 8d 7b 20 lea 0x20(%ebx),%edi
117789: b9 04 00 00 00 mov $0x4,%ecx
11778e: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
* size and first cluster num to the disk after each write operation
* (even if one byte is written - that is TOO slow) because
* otherwise real values of these fields stored in fat-file descriptor
* may be accidentally rewritten with wrong values stored on the disk
*/
if (fat_fd->links_num == 1)
117790: 83 7b 08 01 cmpl $0x1,0x8(%ebx)
117794: 0f 85 96 00 00 00 jne 117830 <msdos_find_name+0x13f>
{
fat_fd->cln = MSDOS_EXTRACT_CLUSTER_NUM(node_entry);
11779a: 0f b7 45 dc movzwl -0x24(%ebp),%eax
11779e: c1 e0 10 shl $0x10,%eax
1177a1: 0f b7 55 e2 movzwl -0x1e(%ebp),%edx
1177a5: 09 d0 or %edx,%eax
1177a7: 89 43 1c mov %eax,0x1c(%ebx)
time_val = *MSDOS_DIR_WRITE_TIME(node_entry);
date = *MSDOS_DIR_WRITE_DATE(node_entry);
fat_fd->mtime = msdos_date_dos2unix(CF_LE_W(date), CF_LE_W(time_val));
1177aa: 51 push %ecx
1177ab: 51 push %ecx
1177ac: 0f b7 45 de movzwl -0x22(%ebp),%eax
1177b0: 50 push %eax
1177b1: 0f b7 45 e0 movzwl -0x20(%ebp),%eax
1177b5: 50 push %eax
1177b6: e8 a3 13 00 00 call 118b5e <msdos_date_dos2unix>
1177bb: 89 43 40 mov %eax,0x40(%ebx)
if ((*MSDOS_DIR_ATTR(node_entry)) & MSDOS_ATTR_DIRECTORY)
1177be: 83 c4 10 add $0x10,%esp
1177c1: f6 45 d3 10 testb $0x10,-0x2d(%ebp)
1177c5: 8b 45 b4 mov -0x4c(%ebp),%eax
1177c8: 74 24 je 1177ee <msdos_find_name+0xfd>
{
fat_fd->fat_file_type = FAT_DIRECTORY;
1177ca: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax)
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
1177d1: c7 40 14 00 00 20 00 movl $0x200000,0x14(%eax)
rc = fat_file_size(&fs_info->fat, fat_fd);
1177d8: 52 push %edx
1177d9: 52 push %edx
1177da: 50 push %eax
1177db: ff 75 a4 pushl -0x5c(%ebp)
1177de: e8 a9 a9 ff ff call 11218c <fat_file_size>
1177e3: 89 c3 mov %eax,%ebx
if (rc != RC_OK)
1177e5: 83 c4 10 add $0x10,%esp
1177e8: 85 c0 test %eax,%eax
1177ea: 74 16 je 117802 <msdos_find_name+0x111> <== ALWAYS TAKEN
1177ec: eb 5b jmp 117849 <msdos_find_name+0x158> <== NOT EXECUTED
return rc;
}
}
else
{
fat_fd->fat_file_size = CF_LE_L(*MSDOS_DIR_FILE_SIZE(node_entry));
1177ee: 8b 55 e4 mov -0x1c(%ebp),%edx
1177f1: 89 50 18 mov %edx,0x18(%eax)
fat_fd->fat_file_type = FAT_FILE;
1177f4: c7 40 10 04 00 00 00 movl $0x4,0x10(%eax)
fat_fd->size_limit = MSDOS_MAX_FILE_SIZE;
1177fb: c7 40 14 ff ff ff ff movl $0xffffffff,0x14(%eax)
}
/* these data is not actual for zero-length fat-file */
fat_fd->map.file_cln = 0;
117802: 8b 45 b4 mov -0x4c(%ebp),%eax
117805: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax)
fat_fd->map.disk_cln = fat_fd->cln;
11780c: 8b 50 1c mov 0x1c(%eax),%edx
11780f: 89 50 38 mov %edx,0x38(%eax)
if ((fat_fd->fat_file_size != 0) &&
117812: 8b 48 18 mov 0x18(%eax),%ecx
117815: 85 c9 test %ecx,%ecx
117817: 74 10 je 117829 <msdos_find_name+0x138>
(fat_fd->fat_file_size <= fs_info->fat.vol.bpc))
117819: 8b 75 a4 mov -0x5c(%ebp),%esi
11781c: 0f b7 5e 06 movzwl 0x6(%esi),%ebx
/* these data is not actual for zero-length fat-file */
fat_fd->map.file_cln = 0;
fat_fd->map.disk_cln = fat_fd->cln;
if ((fat_fd->fat_file_size != 0) &&
117820: 39 d9 cmp %ebx,%ecx
117822: 77 05 ja 117829 <msdos_find_name+0x138>
(fat_fd->fat_file_size <= fs_info->fat.vol.bpc))
{
fat_fd->map.last_cln = fat_fd->cln;
117824: 89 50 3c mov %edx,0x3c(%eax)
117827: eb 07 jmp 117830 <msdos_find_name+0x13f>
}
else
{
fat_fd->map.last_cln = FAT_UNDEFINED_VALUE;
117829: c7 40 3c ff ff ff ff movl $0xffffffff,0x3c(%eax)
}
}
/* close fat-file corresponded to the node we searched in */
rc = fat_file_close(&fs_info->fat, parent_loc->node_access);
117830: 50 push %eax
117831: 50 push %eax
117832: 8b 55 08 mov 0x8(%ebp),%edx
117835: ff 72 08 pushl 0x8(%edx)
117838: ff 75 a4 pushl -0x5c(%ebp)
11783b: e8 f8 a3 ff ff call 111c38 <fat_file_close>
117840: 89 c3 mov %eax,%ebx
if (rc != RC_OK)
117842: 83 c4 10 add $0x10,%esp
117845: 85 c0 test %eax,%eax
117847: 74 12 je 11785b <msdos_find_name+0x16a> <== ALWAYS TAKEN
{
fat_file_close(&fs_info->fat, fat_fd);
117849: 50 push %eax <== NOT EXECUTED
11784a: 50 push %eax <== NOT EXECUTED
11784b: ff 75 b4 pushl -0x4c(%ebp) <== NOT EXECUTED
11784e: ff 75 a4 pushl -0x5c(%ebp) <== NOT EXECUTED
117851: e8 e2 a3 ff ff call 111c38 <fat_file_close> <== NOT EXECUTED
117856: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
117859: eb 09 jmp 117864 <msdos_find_name+0x173> <== NOT EXECUTED
return rc;
}
/* update node_info_ptr field */
parent_loc->node_access = fat_fd;
11785b: 8b 45 b4 mov -0x4c(%ebp),%eax
11785e: 8b 55 08 mov 0x8(%ebp),%edx
117861: 89 42 08 mov %eax,0x8(%edx)
return rc;
}
117864: 89 d8 mov %ebx,%eax
117866: 8d 65 f4 lea -0xc(%ebp),%esp
117869: 5b pop %ebx
11786a: 5e pop %esi
11786b: 5f pop %edi
11786c: 5d pop %ebp
11786d: c3 ret
00116c03 <msdos_find_name_in_fat_file>:
int name_len,
msdos_name_type_t name_type,
fat_dir_pos_t *dir_pos,
char *name_dir_entry
)
{
116c03: 55 push %ebp
116c04: 89 e5 mov %esp,%ebp
116c06: 57 push %edi
116c07: 56 push %esi
116c08: 53 push %ebx
116c09: 83 ec 6c sub $0x6c,%esp
116c0c: 8a 4d 10 mov 0x10(%ebp),%cl
116c0f: 88 4d bf mov %cl,-0x41(%ebp)
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
116c12: 8b 45 08 mov 0x8(%ebp),%eax
116c15: 8b 40 08 mov 0x8(%eax),%eax
116c18: 89 45 cc mov %eax,-0x34(%ebp)
uint32_t empty_space_count = 0;
bool empty_space_found = false;
uint32_t entries_per_block;
bool read_cluster = false;
assert(name_len > 0);
116c1b: 83 7d 18 00 cmpl $0x0,0x18(%ebp)
116c1f: 7f 14 jg 116c35 <msdos_find_name_in_fat_file+0x32><== ALWAYS TAKEN
116c21: 68 93 8b 12 00 push $0x128b93 <== NOT EXECUTED
116c26: 68 cc 8b 12 00 push $0x128bcc <== NOT EXECUTED
116c2b: 68 c4 03 00 00 push $0x3c4 <== NOT EXECUTED
116c30: e9 d7 00 00 00 jmp 116d0c <msdos_find_name_in_fat_file+0x109><== NOT EXECUTED
static inline void
fat_dir_pos_init(
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
116c35: 8b 5d 20 mov 0x20(%ebp),%ebx
116c38: c7 03 00 00 00 00 movl $0x0,(%ebx)
dir_pos->sname.ofs = 0;
116c3e: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx)
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
116c45: c7 43 08 ff ff ff ff movl $0xffffffff,0x8(%ebx)
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
116c4c: c7 43 0c ff ff ff ff movl $0xffffffff,0xc(%ebx)
fat_dir_pos_init(dir_pos);
lfn_start.cln = lfn_start.ofs = FAT_FILE_SHORT_NAME;
116c53: c7 45 e4 ff ff ff ff movl $0xffffffff,-0x1c(%ebp)
116c5a: c7 45 e0 ff ff ff ff movl $0xffffffff,-0x20(%ebp)
* is short still check for possible long entries with the short name.
*
* In PR1491 we need to have a LFN for a short file name entry. To
* test this make this test always fail, ie add "0 &&".
*/
if (create_node && (name_type == MSDOS_NAME_SHORT))
116c61: 83 7d 1c 01 cmpl $0x1,0x1c(%ebp)
116c65: 0f 94 45 bc sete -0x44(%ebp)
116c69: 75 0d jne 116c78 <msdos_find_name_in_fat_file+0x75>
lfn_entries = 0;
116c6b: c7 45 c0 00 00 00 00 movl $0x0,-0x40(%ebp)
* is short still check for possible long entries with the short name.
*
* In PR1491 we need to have a LFN for a short file name entry. To
* test this make this test always fail, ie add "0 &&".
*/
if (create_node && (name_type == MSDOS_NAME_SHORT))
116c72: 80 7d bf 00 cmpb $0x0,-0x41(%ebp)
116c76: 75 11 jne 116c89 <msdos_find_name_in_fat_file+0x86>
lfn_entries = 0;
else
lfn_entries =
((name_len - 1) + MSDOS_LFN_LEN_PER_ENTRY) / MSDOS_LFN_LEN_PER_ENTRY;
116c78: 8b 45 18 mov 0x18(%ebp),%eax
116c7b: 83 c0 0c add $0xc,%eax
* test this make this test always fail, ie add "0 &&".
*/
if (create_node && (name_type == MSDOS_NAME_SHORT))
lfn_entries = 0;
else
lfn_entries =
116c7e: b9 0d 00 00 00 mov $0xd,%ecx
116c83: 99 cltd
116c84: f7 f9 idiv %ecx
116c86: 89 45 c0 mov %eax,-0x40(%ebp)
((name_len - 1) + MSDOS_LFN_LEN_PER_ENTRY) / MSDOS_LFN_LEN_PER_ENTRY;
if (FAT_FD_OF_ROOT_DIR(fat_fd) &&
116c89: 8b 5d 0c mov 0xc(%ebp),%ebx
116c8c: 83 7b 20 01 cmpl $0x1,0x20(%ebx)
116c90: 75 17 jne 116ca9 <msdos_find_name_in_fat_file+0xa6>
116c92: 83 7b 24 00 cmpl $0x0,0x24(%ebx)
116c96: 75 11 jne 116ca9 <msdos_find_name_in_fat_file+0xa6><== NEVER TAKEN
116c98: 8b 5d cc mov -0x34(%ebp),%ebx
116c9b: f6 43 0a 03 testb $0x3,0xa(%ebx)
116c9f: 74 08 je 116ca9 <msdos_find_name_in_fat_file+0xa6><== NEVER TAKEN
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
bts2rd = fat_fd->fat_file_size;
116ca1: 8b 5d 0c mov 0xc(%ebp),%ebx
116ca4: 8b 5b 18 mov 0x18(%ebx),%ebx
116ca7: eb 07 jmp 116cb0 <msdos_find_name_in_fat_file+0xad>
else
bts2rd = fs_info->fat.vol.bpc;
116ca9: 8b 5d cc mov -0x34(%ebp),%ebx
116cac: 0f b7 5b 06 movzwl 0x6(%ebx),%ebx
116cb0: 89 5d d0 mov %ebx,-0x30(%ebp)
/*
* Scan the directory seeing if the file is present. While
* doing this see if a suitable location can be found to
* create the entry if the name is not found.
*/
while ((ret = fat_file_read(&fs_info->fat, fat_fd, (dir_offset * bts2rd),
116cb3: c7 45 b0 00 00 00 00 movl $0x0,-0x50(%ebp)
int lfn_entries;
int lfn_entry = 0;
uint32_t empty_space_offset = 0;
uint32_t empty_space_entry = 0;
uint32_t empty_space_count = 0;
bool empty_space_found = false;
116cba: c6 45 bd 00 movb $0x0,-0x43(%ebp)
uint8_t lfn_checksum = 0;
int lfn_entries;
int lfn_entry = 0;
uint32_t empty_space_offset = 0;
uint32_t empty_space_entry = 0;
uint32_t empty_space_count = 0;
116cbe: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp)
bool lfn_matched = false;
uint8_t lfn_checksum = 0;
int lfn_entries;
int lfn_entry = 0;
uint32_t empty_space_offset = 0;
uint32_t empty_space_entry = 0;
116cc5: c7 45 b4 00 00 00 00 movl $0x0,-0x4c(%ebp)
fat_pos_t lfn_start;
bool lfn_matched = false;
uint8_t lfn_checksum = 0;
int lfn_entries;
int lfn_entry = 0;
uint32_t empty_space_offset = 0;
116ccc: c7 45 b8 00 00 00 00 movl $0x0,-0x48(%ebp)
uint32_t bts2rd = 0;
fat_pos_t lfn_start;
bool lfn_matched = false;
uint8_t lfn_checksum = 0;
int lfn_entries;
int lfn_entry = 0;
116cd3: 31 ff xor %edi,%edi
uint32_t dir_offset = 0;
uint32_t dir_entry = 0;
uint32_t bts2rd = 0;
fat_pos_t lfn_start;
bool lfn_matched = false;
uint8_t lfn_checksum = 0;
116cd5: c6 45 ac 00 movb $0x0,-0x54(%ebp)
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t dir_offset = 0;
uint32_t dir_entry = 0;
uint32_t bts2rd = 0;
fat_pos_t lfn_start;
bool lfn_matched = false;
116cd9: 31 db xor %ebx,%ebx
char *name_dir_entry
)
{
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t dir_offset = 0;
116cdb: c7 45 c8 00 00 00 00 movl $0x0,-0x38(%ebp)
/*
* Remainder is not empty so is this entry empty ?
*/
empty_space_count++;
if (empty_space_count == (lfn_entries + 1))
116ce2: 8b 45 c0 mov -0x40(%ebp),%eax
116ce5: 40 inc %eax
116ce6: 89 45 9c mov %eax,-0x64(%ebp)
/*
* Scan the directory seeing if the file is present. While
* doing this see if a suitable location can be found to
* create the entry if the name is not found.
*/
while ((ret = fat_file_read(&fs_info->fat, fat_fd, (dir_offset * bts2rd),
116ce9: e9 92 02 00 00 jmp 116f80 <msdos_find_name_in_fat_file+0x37d>
bool remainder_empty = false;
#if MSDOS_FIND_PRINT
printf ("MSFS:[2] dir_offset:%li\n", dir_offset);
#endif
if (ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
116cee: 83 f8 1f cmp $0x1f,%eax
116cf1: 7f 05 jg 116cf8 <msdos_find_name_in_fat_file+0xf5><== ALWAYS TAKEN
116cf3: e9 c8 05 00 00 jmp 1172c0 <msdos_find_name_in_fat_file+0x6bd><== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
assert(ret == bts2rd);
116cf8: 3b 45 d0 cmp -0x30(%ebp),%eax
116cfb: 74 19 je 116d16 <msdos_find_name_in_fat_file+0x113><== ALWAYS TAKEN
116cfd: 68 a0 8b 12 00 push $0x128ba0 <== NOT EXECUTED
116d02: 68 cc 8b 12 00 push $0x128bcc <== NOT EXECUTED
116d07: 68 f4 03 00 00 push $0x3f4 <== NOT EXECUTED
116d0c: 68 31 8b 12 00 push $0x128b31 <== NOT EXECUTED
116d11: e8 a6 c9 ff ff call 1136bc <__assert_func> <== NOT EXECUTED
116d16: 8b 55 cc mov -0x34(%ebp),%edx
116d19: 8b b2 94 00 00 00 mov 0x94(%edx),%esi
/* have to look at the DIR_NAME as "raw" 8-bit data */
for (dir_entry = 0;
dir_entry < bts2rd;
dir_entry += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
{
char* entry = (char*) fs_info->cl_buf + dir_entry;
116d1f: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp)
/*
* See if the entry is empty or the remainder of the directory is
* empty ? Localise to make the code read better.
*/
bool entry_empty = (*MSDOS_DIR_ENTRY_TYPE(entry) ==
116d26: 8a 06 mov (%esi),%al
* to here and write the long file name if this is the start of
* a series of empty entries. If empty_space_count is 0 then
* we are currently not inside an empty series of entries. It
* is a count of empty entries.
*/
if (empty_space_count == 0)
116d28: 83 7d d4 00 cmpl $0x0,-0x2c(%ebp)
116d2c: 75 0c jne 116d3a <msdos_find_name_in_fat_file+0x137>
116d2e: 8b 4d c4 mov -0x3c(%ebp),%ecx
116d31: 89 4d b4 mov %ecx,-0x4c(%ebp)
116d34: 8b 55 c8 mov -0x38(%ebp),%edx
116d37: 89 55 b8 mov %edx,-0x48(%ebp)
{
empty_space_entry = dir_entry;
empty_space_offset = dir_offset;
}
if (remainder_empty)
116d3a: 84 c0 test %al,%al
116d3c: 75 31 jne 116d6f <msdos_find_name_in_fat_file+0x16c>
#endif
/*
* If just looking and there is no more entries in the
* directory - return name-not-found
*/
if (!create_node)
116d3e: 80 7d bf 00 cmpb $0x0,-0x41(%ebp)
116d42: 75 0a jne 116d4e <msdos_find_name_in_fat_file+0x14b>
return MSDOS_NAME_NOT_FOUND_ERR;
116d44: bb 01 7d 00 00 mov $0x7d01,%ebx
116d49: e9 b3 05 00 00 jmp 117301 <msdos_find_name_in_fat_file+0x6fe>
* Lets go and write the directory entries. If we have not found
* any available space add the remaining number of entries to any that
* we may have already found that are just before this entry. If more
* are needed FAT_EOF is returned by the read and we extend the file.
*/
if (!empty_space_found)
116d4e: 80 7d bd 00 cmpb $0x0,-0x43(%ebp)
116d52: 0f 85 58 02 00 00 jne 116fb0 <msdos_find_name_in_fat_file+0x3ad>
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
bts2rd = fat_fd->fat_file_size;
else
bts2rd = fs_info->fat.vol.bpc;
entries_per_block = bts2rd / MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
116d58: 8b 45 d0 mov -0x30(%ebp),%eax
116d5b: c1 e8 05 shr $0x5,%eax
* are needed FAT_EOF is returned by the read and we extend the file.
*/
if (!empty_space_found)
{
empty_space_count +=
entries_per_block - (dir_entry / MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
116d5e: 01 45 d4 add %eax,-0x2c(%ebp)
116d61: 8b 45 c4 mov -0x3c(%ebp),%eax
116d64: c1 e8 05 shr $0x5,%eax
* we may have already found that are just before this entry. If more
* are needed FAT_EOF is returned by the read and we extend the file.
*/
if (!empty_space_found)
{
empty_space_count +=
116d67: 29 45 d4 sub %eax,-0x2c(%ebp)
116d6a: e9 41 02 00 00 jmp 116fb0 <msdos_find_name_in_fat_file+0x3ad>
printf ("MSFS:[3.2] esf:%i esc%i\n", empty_space_found, empty_space_count);
#endif
}
break;
}
else if (entry_empty)
116d6f: 3c e5 cmp $0xe5,%al
116d71: 75 1e jne 116d91 <msdos_find_name_in_fat_file+0x18e>
{
if (create_node)
116d73: 80 7d bf 00 cmpb $0x0,-0x41(%ebp)
116d77: 0f 84 ea 01 00 00 je 116f67 <msdos_find_name_in_fat_file+0x364>
{
/*
* Remainder is not empty so is this entry empty ?
*/
empty_space_count++;
116d7d: ff 45 d4 incl -0x2c(%ebp)
if (empty_space_count == (lfn_entries + 1))
116d80: 8b 4d 9c mov -0x64(%ebp),%ecx
116d83: 39 4d d4 cmp %ecx,-0x2c(%ebp)
116d86: 0f 85 db 01 00 00 jne 116f67 <msdos_find_name_in_fat_file+0x364>
116d8c: e9 d2 01 00 00 jmp 116f63 <msdos_find_name_in_fat_file+0x360>
* A valid entry so handle it.
*
* If empty space has not been found we need to start the
* count again.
*/
if (create_node && !empty_space_found)
116d91: 80 7d bd 00 cmpb $0x0,-0x43(%ebp)
116d95: 75 14 jne 116dab <msdos_find_name_in_fat_file+0x1a8><== NEVER TAKEN
116d97: 80 7d bf 00 cmpb $0x0,-0x41(%ebp)
116d9b: 74 0e je 116dab <msdos_find_name_in_fat_file+0x1a8>
{
empty_space_entry = 0;
empty_space_count = 0;
116d9d: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp)
* If empty space has not been found we need to start the
* count again.
*/
if (create_node && !empty_space_found)
{
empty_space_entry = 0;
116da4: c7 45 b4 00 00 00 00 movl $0x0,-0x4c(%ebp)
/*
* Check the attribute to see if the entry is for a long
* file name.
*/
if ((*MSDOS_DIR_ATTR(entry) & MSDOS_ATTR_LFN_MASK) ==
116dab: 8a 56 0b mov 0xb(%esi),%dl
116dae: 83 e2 3f and $0x3f,%edx
116db1: 80 fa 0f cmp $0xf,%dl
116db4: 0f 85 d6 00 00 00 jne 116e90 <msdos_find_name_in_fat_file+0x28d>
#endif
/*
* If we are not already processing a LFN see if this is
* the first entry of a LFN ?
*/
if (lfn_start.cln == FAT_FILE_SHORT_NAME)
116dba: 83 7d e0 ff cmpl $0xffffffff,-0x20(%ebp)
116dbe: 75 2b jne 116deb <msdos_find_name_in_fat_file+0x1e8>
{
lfn_matched = false;
116dc0: 31 db xor %ebx,%ebx
/*
* The first entry must have the last long entry
* flag set.
*/
if ((*MSDOS_DIR_ENTRY_TYPE(entry) &
116dc2: a8 40 test $0x40,%al
116dc4: 0f 84 9d 01 00 00 je 116f67 <msdos_find_name_in_fat_file+0x364>
* entry match the number we expect for this
* file name. Note we do not know the number of
* characters in the entry so this is check further
* on when the characters are checked.
*/
if (lfn_entries != (*MSDOS_DIR_ENTRY_TYPE(entry) &
116dca: 83 e0 3f and $0x3f,%eax
116dcd: 39 45 c0 cmp %eax,-0x40(%ebp)
116dd0: 0f 85 91 01 00 00 jne 116f67 <msdos_find_name_in_fat_file+0x364>
continue;
/*
* Get the checksum of the short entry.
*/
lfn_start.cln = dir_offset;
116dd6: 8b 55 c8 mov -0x38(%ebp),%edx
116dd9: 89 55 e0 mov %edx,-0x20(%ebp)
lfn_start.ofs = dir_entry;
116ddc: 8b 4d c4 mov -0x3c(%ebp),%ecx
116ddf: 89 4d e4 mov %ecx,-0x1c(%ebp)
lfn_entry = lfn_entries;
lfn_checksum = *MSDOS_DIR_LFN_CHECKSUM(entry);
116de2: 8a 56 0d mov 0xd(%esi),%dl
116de5: 88 55 ac mov %dl,-0x54(%ebp)
116de8: 8b 7d c0 mov -0x40(%ebp),%edi
* If the entry number or the check sum do not match
* forget this series of long directory entries. These
* could be orphaned entries depending on the history
* of the disk.
*/
if ((lfn_entry != (*MSDOS_DIR_ENTRY_TYPE(entry) &
116deb: 8a 06 mov (%esi),%al
116ded: 83 e0 3f and $0x3f,%eax
116df0: 39 c7 cmp %eax,%edi
116df2: 75 08 jne 116dfc <msdos_find_name_in_fat_file+0x1f9><== NEVER TAKEN
MSDOS_LAST_LONG_ENTRY_MASK)) ||
116df4: 8a 4d ac mov -0x54(%ebp),%cl
116df7: 3a 4e 0d cmp 0xd(%esi),%cl
116dfa: 74 0c je 116e08 <msdos_find_name_in_fat_file+0x205><== ALWAYS TAKEN
(lfn_checksum != *MSDOS_DIR_LFN_CHECKSUM(entry)))
{
#if MSDOS_FIND_PRINT
printf ("MSFS:[4.4] no match\n");
#endif
lfn_start.cln = FAT_FILE_SHORT_NAME;
116dfc: c7 45 e0 ff ff ff ff movl $0xffffffff,-0x20(%ebp) <== NOT EXECUTED
continue;
116e03: e9 5f 01 00 00 jmp 116f67 <msdos_find_name_in_fat_file+0x364><== NOT EXECUTED
}
lfn_entry--;
116e08: 8d 5f ff lea -0x1(%edi),%ebx
116e0b: 89 5d a8 mov %ebx,-0x58(%ebp)
o = lfn_entry * MSDOS_LFN_LEN_PER_ENTRY;
116e0e: 6b c3 0d imul $0xd,%ebx,%eax
116e11: 89 45 94 mov %eax,-0x6c(%ebp)
* RC_OK on success, or error code if error occured (errno set
* appropriately)
*
*/
#define MSDOS_FIND_PRINT 0
int msdos_find_name_in_fat_file(
116e14: 8d 56 01 lea 0x1(%esi),%edx
p = entry + 1;
#if MSDOS_FIND_PRINT
printf ("MSFS:[5] lfne:%i\n", lfn_entry);
#endif
for (i = 0; i < MSDOS_LFN_LEN_PER_ENTRY; i++)
116e17: 31 c0 xor %eax,%eax
* RC_OK on success, or error code if error occured (errno set
* appropriately)
*
*/
#define MSDOS_FIND_PRINT 0
int msdos_find_name_in_fat_file(
116e19: 8b 5d 14 mov 0x14(%ebp),%ebx
116e1c: 03 5d 94 add -0x6c(%ebp),%ebx
116e1f: 89 5d a0 mov %ebx,-0x60(%ebp)
{
#if MSDOS_FIND_PRINT > 1
printf ("MSFS:[6] o:%i i:%i *p:%c(%02x) name[o + i]:%c(%02x)\n",
o, i, *p, *p, name[o + i], name[o + i]);
#endif
if (*p == '\0')
116e22: 8a 0a mov (%edx),%cl
116e24: 88 4d be mov %cl,-0x42(%ebp)
116e27: 84 c9 test %cl,%cl
116e29: 75 0f jne 116e3a <msdos_find_name_in_fat_file+0x237>
/*
* If this is the first entry, ie the last part of the
* long file name and the length does not match then
* the file names do not match.
*/
if (((lfn_entry + 1) == lfn_entries) &&
116e2b: 3b 7d c0 cmp -0x40(%ebp),%edi
116e2e: 75 47 jne 116e77 <msdos_find_name_in_fat_file+0x274><== NEVER TAKEN
((o + i) != name_len))
116e30: 03 45 94 add -0x6c(%ebp),%eax
/*
* If this is the first entry, ie the last part of the
* long file name and the length does not match then
* the file names do not match.
*/
if (((lfn_entry + 1) == lfn_entries) &&
116e33: 3b 45 18 cmp 0x18(%ebp),%eax
116e36: 74 3f je 116e77 <msdos_find_name_in_fat_file+0x274><== ALWAYS TAKEN
116e38: eb 15 jmp 116e4f <msdos_find_name_in_fat_file+0x24c><== NOT EXECUTED
* RC_OK on success, or error code if error occured (errno set
* appropriately)
*
*/
#define MSDOS_FIND_PRINT 0
int msdos_find_name_in_fat_file(
116e3a: 8b 4d 94 mov -0x6c(%ebp),%ecx
116e3d: 01 c1 add %eax,%ecx
((o + i) != name_len))
lfn_start.cln = FAT_FILE_SHORT_NAME;
break;
}
if (((o + i) >= name_len) || (*p != name[o + i]))
116e3f: 3b 4d 18 cmp 0x18(%ebp),%ecx
116e42: 7d 0b jge 116e4f <msdos_find_name_in_fat_file+0x24c>
116e44: 8a 5d be mov -0x42(%ebp),%bl
116e47: 8b 4d a0 mov -0x60(%ebp),%ecx
116e4a: 3a 1c 01 cmp (%ecx,%eax,1),%bl
116e4d: 74 09 je 116e58 <msdos_find_name_in_fat_file+0x255>
{
lfn_start.cln = FAT_FILE_SHORT_NAME;
116e4f: c7 45 e0 ff ff ff ff movl $0xffffffff,-0x20(%ebp)
break;
116e56: eb 1f jmp 116e77 <msdos_find_name_in_fat_file+0x274>
}
switch (i)
116e58: 83 f8 04 cmp $0x4,%eax
116e5b: 74 07 je 116e64 <msdos_find_name_in_fat_file+0x261>
116e5d: 83 f8 0a cmp $0xa,%eax
116e60: 75 0c jne 116e6e <msdos_find_name_in_fat_file+0x26b>
116e62: eb 05 jmp 116e69 <msdos_find_name_in_fat_file+0x266>
{
case 4:
p += 5;
116e64: 83 c2 05 add $0x5,%edx
break;
116e67: eb 08 jmp 116e71 <msdos_find_name_in_fat_file+0x26e>
case 10:
p += 4;
116e69: 83 c2 04 add $0x4,%edx
break;
116e6c: eb 03 jmp 116e71 <msdos_find_name_in_fat_file+0x26e>
default:
p += 2;
116e6e: 83 c2 02 add $0x2,%edx
p = entry + 1;
#if MSDOS_FIND_PRINT
printf ("MSFS:[5] lfne:%i\n", lfn_entry);
#endif
for (i = 0; i < MSDOS_LFN_LEN_PER_ENTRY; i++)
116e71: 40 inc %eax
116e72: 83 f8 0d cmp $0xd,%eax
116e75: 75 ab jne 116e22 <msdos_find_name_in_fat_file+0x21f>
p += 2;
break;
}
}
lfn_matched = ((lfn_entry == 0) &&
116e77: 31 db xor %ebx,%ebx
116e79: 83 7d a8 00 cmpl $0x0,-0x58(%ebp)
116e7d: 75 09 jne 116e88 <msdos_find_name_in_fat_file+0x285>
116e7f: 31 db xor %ebx,%ebx
116e81: 83 7d e0 ff cmpl $0xffffffff,-0x20(%ebp)
116e85: 0f 95 c3 setne %bl
#endif
lfn_start.cln = FAT_FILE_SHORT_NAME;
continue;
}
lfn_entry--;
116e88: 8b 7d a8 mov -0x58(%ebp),%edi
116e8b: e9 d7 00 00 00 jmp 116f67 <msdos_find_name_in_fat_file+0x364>
* If a LFN has been found and it matched check the
* entries have all been found and the checksum is
* correct. If this is the case return the short file
* name entry.
*/
if (lfn_matched)
116e90: 84 db test %bl,%bl
116e92: 0f 84 5a 04 00 00 je 1172f2 <msdos_find_name_in_fat_file+0x6ef>
116e98: 31 c9 xor %ecx,%ecx
116e9a: 31 d2 xor %edx,%edx
uint8_t cs = 0;
uint8_t* p = (uint8_t*) MSDOS_DIR_NAME(entry);
int i;
for (i = 0; i < MSDOS_SHORT_NAME_LEN; i++, p++)
cs = ((cs & 1) ? 0x80 : 0) + (cs >> 1) + *p;
116e9c: 88 d0 mov %dl,%al
116e9e: 83 e0 01 and $0x1,%eax
116ea1: f7 d8 neg %eax
116ea3: 83 e0 80 and $0xffffff80,%eax
116ea6: d0 ea shr %dl
116ea8: 02 14 0e add (%esi,%ecx,1),%dl
116eab: 01 c2 add %eax,%edx
{
uint8_t cs = 0;
uint8_t* p = (uint8_t*) MSDOS_DIR_NAME(entry);
int i;
for (i = 0; i < MSDOS_SHORT_NAME_LEN; i++, p++)
116ead: 41 inc %ecx
116eae: 83 f9 0b cmp $0xb,%ecx
116eb1: 75 e9 jne 116e9c <msdos_find_name_in_fat_file+0x299>
cs = ((cs & 1) ? 0x80 : 0) + (cs >> 1) + *p;
if (lfn_entry || (lfn_checksum != cs))
116eb3: 38 55 ac cmp %dl,-0x54(%ebp)
116eb6: 0f 85 36 04 00 00 jne 1172f2 <msdos_find_name_in_fat_file+0x6ef><== NEVER TAKEN
116ebc: 85 ff test %edi,%edi
116ebe: 0f 85 2e 04 00 00 jne 1172f2 <msdos_find_name_in_fat_file+0x6ef><== NEVER TAKEN
#endif
/*
* We get the entry we looked for - fill the position
* structure and the 32 bytes of the short entry
*/
int rc = fat_file_ioctl(&fs_info->fat, fat_fd, F_CLU_NUM,
116ec4: 83 ec 0c sub $0xc,%esp
116ec7: ff 75 20 pushl 0x20(%ebp)
116eca: ff 75 b0 pushl -0x50(%ebp)
116ecd: 6a 01 push $0x1
116ecf: ff 75 0c pushl 0xc(%ebp)
116ed2: ff 75 cc pushl -0x34(%ebp)
116ed5: e8 04 ae ff ff call 111cde <fat_file_ioctl>
116eda: 89 c3 mov %eax,%ebx
dir_offset * bts2rd,
&dir_pos->sname.cln);
if (rc != RC_OK)
116edc: 83 c4 20 add $0x20,%esp
116edf: 85 c0 test %eax,%eax
116ee1: 74 20 je 116f03 <msdos_find_name_in_fat_file+0x300><== ALWAYS TAKEN
116ee3: e9 19 04 00 00 jmp 117301 <msdos_find_name_in_fat_file+0x6fe><== NOT EXECUTED
* match a long file name against a short file name because
* a long file name that generates a matching short file
* name is not a long file name.
*/
if (lfn_matched ||
((name_type == MSDOS_NAME_SHORT) &&
116ee8: 83 7d e0 ff cmpl $0xffffffff,-0x20(%ebp)
116eec: 75 6a jne 116f58 <msdos_find_name_in_fat_file+0x355><== NEVER TAKEN
(lfn_start.cln == FAT_FILE_SHORT_NAME) &&
(memcmp(MSDOS_DIR_NAME(entry),
116eee: 50 push %eax
116eef: 6a 0b push $0xb
116ef1: ff 75 24 pushl 0x24(%ebp)
116ef4: 56 push %esi
116ef5: e8 de 31 00 00 call 11a0d8 <memcmp>
116efa: 83 c4 10 add $0x10,%esp
* a long file name that generates a matching short file
* name is not a long file name.
*/
if (lfn_matched ||
((name_type == MSDOS_NAME_SHORT) &&
(lfn_start.cln == FAT_FILE_SHORT_NAME) &&
116efd: 85 c0 test %eax,%eax
116eff: 75 57 jne 116f58 <msdos_find_name_in_fat_file+0x355>
116f01: eb c1 jmp 116ec4 <msdos_find_name_in_fat_file+0x2c1>
dir_offset * bts2rd,
&dir_pos->sname.cln);
if (rc != RC_OK)
return rc;
dir_pos->sname.ofs = dir_entry;
116f03: 8b 55 c4 mov -0x3c(%ebp),%edx
116f06: 8b 45 20 mov 0x20(%ebp),%eax
116f09: 89 50 04 mov %edx,0x4(%eax)
if (lfn_start.cln != FAT_FILE_SHORT_NAME)
116f0c: 8b 45 e0 mov -0x20(%ebp),%eax
116f0f: 83 f8 ff cmp $0xffffffff,%eax
116f12: 75 1e jne 116f32 <msdos_find_name_in_fat_file+0x32f>
&lfn_start.cln);
if (rc != RC_OK)
return rc;
}
dir_pos->lname.cln = lfn_start.cln;
116f14: 8b 45 e0 mov -0x20(%ebp),%eax
116f17: 8b 4d 20 mov 0x20(%ebp),%ecx
116f1a: 89 41 08 mov %eax,0x8(%ecx)
dir_pos->lname.ofs = lfn_start.ofs;
116f1d: 8b 45 e4 mov -0x1c(%ebp),%eax
116f20: 89 41 0c mov %eax,0xc(%ecx)
memcpy(name_dir_entry, entry,
116f23: b9 08 00 00 00 mov $0x8,%ecx
116f28: 8b 7d 24 mov 0x24(%ebp),%edi
116f2b: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
116f2d: e9 cf 03 00 00 jmp 117301 <msdos_find_name_in_fat_file+0x6fe>
dir_pos->sname.ofs = dir_entry;
if (lfn_start.cln != FAT_FILE_SHORT_NAME)
{
rc = fat_file_ioctl(&fs_info->fat, fat_fd, F_CLU_NUM,
116f32: 83 ec 0c sub $0xc,%esp
116f35: 8d 55 e0 lea -0x20(%ebp),%edx
116f38: 52 push %edx
116f39: 0f af 45 d0 imul -0x30(%ebp),%eax
116f3d: 50 push %eax
116f3e: 6a 01 push $0x1
116f40: ff 75 0c pushl 0xc(%ebp)
116f43: ff 75 cc pushl -0x34(%ebp)
116f46: e8 93 ad ff ff call 111cde <fat_file_ioctl>
lfn_start.cln * bts2rd,
&lfn_start.cln);
if (rc != RC_OK)
116f4b: 83 c4 20 add $0x20,%esp
116f4e: 85 c0 test %eax,%eax
116f50: 0f 85 93 03 00 00 jne 1172e9 <msdos_find_name_in_fat_file+0x6e6><== NEVER TAKEN
116f56: eb bc jmp 116f14 <msdos_find_name_in_fat_file+0x311>
memcpy(name_dir_entry, entry,
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
return RC_OK;
}
lfn_start.cln = FAT_FILE_SHORT_NAME;
116f58: c7 45 e0 ff ff ff ff movl $0xffffffff,-0x20(%ebp)
lfn_matched = false;
116f5f: 31 db xor %ebx,%ebx
116f61: eb 04 jmp 116f67 <msdos_find_name_in_fat_file+0x364>
* Remainder is not empty so is this entry empty ?
*/
empty_space_count++;
if (empty_space_count == (lfn_entries + 1))
empty_space_found = true;
116f63: c6 45 bd 01 movb $0x1,-0x43(%ebp)
assert(ret == bts2rd);
/* have to look at the DIR_NAME as "raw" 8-bit data */
for (dir_entry = 0;
dir_entry < bts2rd;
dir_entry += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
116f67: 83 45 c4 20 addl $0x20,-0x3c(%ebp)
116f6b: 83 c6 20 add $0x20,%esi
rtems_set_errno_and_return_minus_one(EIO);
assert(ret == bts2rd);
/* have to look at the DIR_NAME as "raw" 8-bit data */
for (dir_entry = 0;
116f6e: 8b 4d d0 mov -0x30(%ebp),%ecx
116f71: 39 4d c4 cmp %ecx,-0x3c(%ebp)
116f74: 0f 82 ac fd ff ff jb 116d26 <msdos_find_name_in_fat_file+0x123><== ALWAYS TAKEN
}
if (remainder_empty)
break;
dir_offset++;
116f7a: ff 45 c8 incl -0x38(%ebp) <== NOT EXECUTED
116f7d: 01 4d b0 add %ecx,-0x50(%ebp) <== NOT EXECUTED
/*
* Scan the directory seeing if the file is present. While
* doing this see if a suitable location can be found to
* create the entry if the name is not found.
*/
while ((ret = fat_file_read(&fs_info->fat, fat_fd, (dir_offset * bts2rd),
116f80: 83 ec 0c sub $0xc,%esp
116f83: 8b 45 cc mov -0x34(%ebp),%eax
116f86: ff b0 94 00 00 00 pushl 0x94(%eax)
116f8c: ff 75 d0 pushl -0x30(%ebp)
116f8f: ff 75 b0 pushl -0x50(%ebp)
116f92: ff 75 0c pushl 0xc(%ebp)
116f95: 50 push %eax
116f96: e8 50 aa ff ff call 1119eb <fat_file_read>
116f9b: 83 c4 20 add $0x20,%esp
116f9e: 85 c0 test %eax,%eax
116fa0: 0f 85 48 fd ff ff jne 116cee <msdos_find_name_in_fat_file+0xeb><== ALWAYS TAKEN
}
/*
* If we are not to create the entry return a not found error.
*/
if (!create_node)
116fa6: 80 7d bf 00 cmpb $0x0,-0x41(%ebp) <== NOT EXECUTED
116faa: 0f 84 94 fd ff ff je 116d44 <msdos_find_name_in_fat_file+0x141><== NOT EXECUTED
* data to place in each long file name entry. First set the short
* file name to the slot of the SFN entry. This will mean no clashes
* in this directory.
*/
lfn_checksum = 0;
if (name_type == MSDOS_NAME_LONG)
116fb0: 83 7d 1c 02 cmpl $0x2,0x1c(%ebp)
116fb4: 75 6a jne 117020 <msdos_find_name_in_fat_file+0x41d>
{
int slot = (((empty_space_offset * bts2rd) + empty_space_entry) /
116fb6: 8b 45 b8 mov -0x48(%ebp),%eax
116fb9: 0f af 45 d0 imul -0x30(%ebp),%eax
116fbd: 03 45 b4 add -0x4c(%ebp),%eax
116fc0: c1 e8 05 shr $0x5,%eax
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE) + lfn_entries + 1;
116fc3: 8b 4d c0 mov -0x40(%ebp),%ecx
116fc6: 8d 54 01 01 lea 0x1(%ecx,%eax,1),%edx
{
static const char* hex = "0123456789ABCDEF";
char* c = MSDOS_DIR_NAME(sfn);
int i;
for (i = 0; i < 2; i++, c++)
if ((*c == ' ') || (*c == '.'))
116fca: 8b 5d 24 mov 0x24(%ebp),%ebx
116fcd: 8a 03 mov (%ebx),%al
116fcf: 3c 2e cmp $0x2e,%al
116fd1: 74 04 je 116fd7 <msdos_find_name_in_fat_file+0x3d4><== NEVER TAKEN
116fd3: 3c 20 cmp $0x20,%al
116fd5: 75 06 jne 116fdd <msdos_find_name_in_fat_file+0x3da>
*c = '_';
116fd7: 8b 5d 24 mov 0x24(%ebp),%ebx
116fda: c6 03 5f movb $0x5f,(%ebx)
{
static const char* hex = "0123456789ABCDEF";
char* c = MSDOS_DIR_NAME(sfn);
int i;
for (i = 0; i < 2; i++, c++)
if ((*c == ' ') || (*c == '.'))
116fdd: 8b 5d 24 mov 0x24(%ebp),%ebx
116fe0: 8a 43 01 mov 0x1(%ebx),%al
116fe3: 3c 2e cmp $0x2e,%al
116fe5: 74 04 je 116feb <msdos_find_name_in_fat_file+0x3e8><== NEVER TAKEN
116fe7: 3c 20 cmp $0x20,%al
116fe9: 75 07 jne 116ff2 <msdos_find_name_in_fat_file+0x3ef>
*c = '_';
116feb: 8b 5d 24 mov 0x24(%ebp),%ebx
116fee: c6 43 01 5f movb $0x5f,0x1(%ebx)
msdos_short_name_hex(char* sfn, int num)
{
static const char* hex = "0123456789ABCDEF";
char* c = MSDOS_DIR_NAME(sfn);
int i;
for (i = 0; i < 2; i++, c++)
116ff2: 8b 45 24 mov 0x24(%ebp),%eax
116ff5: 83 c0 02 add $0x2,%eax
116ff8: b9 0c 00 00 00 mov $0xc,%ecx
if ((*c == ' ') || (*c == '.'))
*c = '_';
for (i = 0; i < 4; i++, c++)
*c = hex[(num >> ((3 - i) * 4)) & 0xf];
116ffd: 89 d3 mov %edx,%ebx
116fff: d3 fb sar %cl,%ebx
117001: 83 e3 0f and $0xf,%ebx
117004: 8a 9b d0 81 12 00 mov 0x1281d0(%ebx),%bl
11700a: 88 18 mov %bl,(%eax)
char* c = MSDOS_DIR_NAME(sfn);
int i;
for (i = 0; i < 2; i++, c++)
if ((*c == ' ') || (*c == '.'))
*c = '_';
for (i = 0; i < 4; i++, c++)
11700c: 40 inc %eax
11700d: 83 e9 04 sub $0x4,%ecx
117010: 83 f9 fc cmp $0xfffffffc,%ecx
117013: 75 e8 jne 116ffd <msdos_find_name_in_fat_file+0x3fa>
*c = hex[(num >> ((3 - i) * 4)) & 0xf];
*c++ = '~';
117015: 8b 5d 24 mov 0x24(%ebp),%ebx
117018: c6 43 06 7e movb $0x7e,0x6(%ebx)
*c++ = '1';
11701c: c6 43 07 31 movb $0x31,0x7(%ebx)
* If a long file name calculate the checksum of the short file name
* data to place in each long file name entry. First set the short
* file name to the slot of the SFN entry. This will mean no clashes
* in this directory.
*/
lfn_checksum = 0;
117020: c6 45 bf 00 movb $0x0,-0x41(%ebp)
int slot = (((empty_space_offset * bts2rd) + empty_space_entry) /
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE) + lfn_entries + 1;
msdos_short_name_hex(MSDOS_DIR_NAME(name_dir_entry), slot);
}
if (lfn_entries)
117024: 83 7d c0 00 cmpl $0x0,-0x40(%ebp)
117028: 74 23 je 11704d <msdos_find_name_in_fat_file+0x44a>
11702a: 31 d2 xor %edx,%edx
{
uint8_t* p = (uint8_t*) MSDOS_DIR_NAME(name_dir_entry);
int i;
for (i = 0; i < 11; i++, p++)
lfn_checksum =
((lfn_checksum & 1) ? 0x80 : 0) + (lfn_checksum >> 1) + *p;
11702c: 8a 45 bf mov -0x41(%ebp),%al
11702f: 83 e0 01 and $0x1,%eax
if (lfn_entries)
{
uint8_t* p = (uint8_t*) MSDOS_DIR_NAME(name_dir_entry);
int i;
for (i = 0; i < 11; i++, p++)
lfn_checksum =
117032: f7 d8 neg %eax
117034: 83 e0 80 and $0xffffff80,%eax
117037: 8a 4d bf mov -0x41(%ebp),%cl
11703a: d0 e9 shr %cl
11703c: 8b 5d 24 mov 0x24(%ebp),%ebx
11703f: 02 0c 13 add (%ebx,%edx,1),%cl
117042: 01 c1 add %eax,%ecx
117044: 88 4d bf mov %cl,-0x41(%ebp)
if (lfn_entries)
{
uint8_t* p = (uint8_t*) MSDOS_DIR_NAME(name_dir_entry);
int i;
for (i = 0; i < 11; i++, p++)
117047: 42 inc %edx
117048: 83 fa 0b cmp $0xb,%edx
11704b: 75 df jne 11702c <msdos_find_name_in_fat_file+0x429>
* empty_space_count is a count of empty entries in the currently
* read cluster so if 0 there is no space. Note, dir_offset will
* be at the next cluster so we can just make empty_space_offset
* that value.
*/
if (empty_space_count == 0)
11704d: 83 7d d4 00 cmpl $0x0,-0x2c(%ebp)
117051: 74 0b je 11705e <msdos_find_name_in_fat_file+0x45b><== NEVER TAKEN
uint32_t empty_space_offset = 0;
uint32_t empty_space_entry = 0;
uint32_t empty_space_count = 0;
bool empty_space_found = false;
uint32_t entries_per_block;
bool read_cluster = false;
117053: 8b 55 b8 mov -0x48(%ebp),%edx
117056: 39 55 c8 cmp %edx,-0x38(%ebp)
117059: 0f 95 c0 setne %al
11705c: eb 0f jmp 11706d <msdos_find_name_in_fat_file+0x46a>
* empty_space_count is a count of empty entries in the currently
* read cluster so if 0 there is no space. Note, dir_offset will
* be at the next cluster so we can just make empty_space_offset
* that value.
*/
if (empty_space_count == 0)
11705e: 8b 5d c8 mov -0x38(%ebp),%ebx <== NOT EXECUTED
117061: 89 5d b8 mov %ebx,-0x48(%ebp) <== NOT EXECUTED
{
read_cluster = true;
117064: b0 01 mov $0x1,%al <== NOT EXECUTED
empty_space_offset = dir_offset;
empty_space_entry = 0;
117066: c7 45 b4 00 00 00 00 movl $0x0,-0x4c(%ebp) <== NOT EXECUTED
read_cluster = true;
/*
* Handle the entry writes.
*/
lfn_start.cln = lfn_start.ofs = FAT_FILE_SHORT_NAME;
11706d: c7 45 e4 ff ff ff ff movl $0xffffffff,-0x1c(%ebp)
117074: c7 45 e0 ff ff ff ff movl $0xffffffff,-0x20(%ebp)
11707b: 8b 5d b8 mov -0x48(%ebp),%ebx
11707e: 0f af 5d d0 imul -0x30(%ebp),%ebx
* RC_OK on success, or error code if error occured (errno set
* appropriately)
*
*/
#define MSDOS_FIND_PRINT 0
int msdos_find_name_in_fat_file(
117082: 6b 55 c0 0d imul $0xd,-0x40(%ebp),%edx
117086: 03 55 14 add 0x14(%ebp),%edx
117089: 89 55 b0 mov %edx,-0x50(%ebp)
/*
* Handle the entry writes.
*/
lfn_start.cln = lfn_start.ofs = FAT_FILE_SHORT_NAME;
lfn_entry = 0;
11708c: c7 45 c8 00 00 00 00 movl $0x0,-0x38(%ebp)
length, lfn_entry);
#endif
/*
* Time to write the short file name entry.
*/
if (lfn_entry == (lfn_entries + 1))
117093: 8b 55 c0 mov -0x40(%ebp),%edx
117096: 42 inc %edx
117097: 89 55 ac mov %edx,-0x54(%ebp)
#endif
/*
* The one more is the short entry.
*/
while (lfn_entry < (lfn_entries + 1))
11709a: e9 3a 02 00 00 jmp 1172d9 <msdos_find_name_in_fat_file+0x6d6>
{
int length = 0;
if (read_cluster)
11709f: 84 c0 test %al,%al
1170a1: 0f 84 a0 00 00 00 je 117147 <msdos_find_name_in_fat_file+0x544><== ALWAYS TAKEN
{
uint32_t new_length;
#if MSDOS_FIND_PRINT
printf ("MSFS:[9.1] eso:%li\n", empty_space_offset);
#endif
ret = fat_file_read(&fs_info->fat, fat_fd,
1170a7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1170aa: 8b 4d cc mov -0x34(%ebp),%ecx <== NOT EXECUTED
1170ad: ff b1 94 00 00 00 pushl 0x94(%ecx) <== NOT EXECUTED
1170b3: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED
1170b6: 53 push %ebx <== NOT EXECUTED
1170b7: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
1170ba: 51 push %ecx <== NOT EXECUTED
1170bb: e8 2b a9 ff ff call 1119eb <fat_file_read> <== NOT EXECUTED
(empty_space_offset * bts2rd), bts2rd,
fs_info->cl_buf);
if (ret != bts2rd)
1170c0: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
1170c3: 3b 45 d0 cmp -0x30(%ebp),%eax <== NOT EXECUTED
1170c6: 74 7f je 117147 <msdos_find_name_in_fat_file+0x544><== NOT EXECUTED
{
if (ret != FAT_EOF)
1170c8: 85 c0 test %eax,%eax <== NOT EXECUTED
1170ca: 74 02 je 1170ce <msdos_find_name_in_fat_file+0x4cb><== NOT EXECUTED
1170cc: eb 66 jmp 117134 <msdos_find_name_in_fat_file+0x531><== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
#if MSDOS_FIND_PRINT
printf ("MSFS:[9.2] extending file:%li\n", empty_space_offset);
#endif
ret = fat_file_extend (&fs_info->fat, fat_fd, false,
1170ce: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1170d1: 8d 45 dc lea -0x24(%ebp),%eax <== NOT EXECUTED
1170d4: 50 push %eax <== NOT EXECUTED
1170d5: 53 push %ebx <== NOT EXECUTED
1170d6: 6a 00 push $0x0 <== NOT EXECUTED
1170d8: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
1170db: ff 75 cc pushl -0x34(%ebp) <== NOT EXECUTED
1170de: e8 81 ac ff ff call 111d64 <fat_file_extend> <== NOT EXECUTED
empty_space_offset * bts2rd, &new_length);
if (ret != RC_OK)
1170e3: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
1170e6: 85 c0 test %eax,%eax <== NOT EXECUTED
1170e8: 0f 85 fb 01 00 00 jne 1172e9 <msdos_find_name_in_fat_file+0x6e6><== NOT EXECUTED
return ret;
#if MSDOS_FIND_PRINT
printf ("MSFS:[9.3] extended: %d <-> %d\n", new_length, empty_space_offset * bts2rd);
#endif
if (new_length != (empty_space_offset * bts2rd))
1170ee: 39 5d dc cmp %ebx,-0x24(%ebp) <== NOT EXECUTED
1170f1: 74 02 je 1170f5 <msdos_find_name_in_fat_file+0x4f2><== NOT EXECUTED
1170f3: eb 3f jmp 117134 <msdos_find_name_in_fat_file+0x531><== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
memset(fs_info->cl_buf, 0, bts2rd);
1170f5: 8b 55 cc mov -0x34(%ebp),%edx <== NOT EXECUTED
1170f8: 8b 92 94 00 00 00 mov 0x94(%edx),%edx <== NOT EXECUTED
1170fe: 89 55 98 mov %edx,-0x68(%ebp) <== NOT EXECUTED
117101: 31 c0 xor %eax,%eax <== NOT EXECUTED
117103: 89 d7 mov %edx,%edi <== NOT EXECUTED
117105: 8b 4d d0 mov -0x30(%ebp),%ecx <== NOT EXECUTED
117108: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED
ret = fat_file_write(&fs_info->fat, fat_fd,
11710a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11710d: 8b 4d cc mov -0x34(%ebp),%ecx <== NOT EXECUTED
117110: ff b1 94 00 00 00 pushl 0x94(%ecx) <== NOT EXECUTED
117116: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED
117119: 53 push %ebx <== NOT EXECUTED
11711a: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
11711d: 51 push %ecx <== NOT EXECUTED
11711e: e8 5f ae ff ff call 111f82 <fat_file_write> <== NOT EXECUTED
empty_space_offset * bts2rd,
bts2rd, fs_info->cl_buf);
#if MSDOS_FIND_PRINT
printf ("MSFS:[9.4] clear write: %d\n", ret);
#endif
if (ret == -1)
117123: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
117126: 83 f8 ff cmp $0xffffffff,%eax <== NOT EXECUTED
117129: 0f 84 ba 01 00 00 je 1172e9 <msdos_find_name_in_fat_file+0x6e6><== NOT EXECUTED
return ret;
else if (ret != bts2rd)
11712f: 3b 45 d0 cmp -0x30(%ebp),%eax <== NOT EXECUTED
117132: 74 13 je 117147 <msdos_find_name_in_fat_file+0x544><== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
117134: e8 d7 26 00 00 call 119810 <__errno> <== NOT EXECUTED
117139: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
11713f: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
117142: e9 a2 01 00 00 jmp 1172e9 <msdos_find_name_in_fat_file+0x6e6><== NOT EXECUTED
* RC_OK on success, or error code if error occured (errno set
* appropriately)
*
*/
#define MSDOS_FIND_PRINT 0
int msdos_find_name_in_fat_file(
117147: 8b 55 c8 mov -0x38(%ebp),%edx
11714a: 42 inc %edx
11714b: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp)
117152: 8a 45 c0 mov -0x40(%ebp),%al
117155: 40 inc %eax
117156: 88 45 be mov %al,-0x42(%ebp)
117159: e9 1b 01 00 00 jmp 117279 <msdos_find_name_in_fat_file+0x676>
for (dir_entry = empty_space_entry;
dir_entry < bts2rd;
dir_entry += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
{
char* entry = (char*) fs_info->cl_buf + dir_entry;
11715e: 8b 4d cc mov -0x34(%ebp),%ecx
117161: 8b 81 94 00 00 00 mov 0x94(%ecx),%eax
117167: 01 f0 add %esi,%eax
117169: 89 45 d4 mov %eax,-0x2c(%ebp)
char* p;
const char* n;
int i;
char fill = 0;
length += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
11716c: 83 45 c4 20 addl $0x20,-0x3c(%ebp)
lfn_entry++;
117170: 89 55 c8 mov %edx,-0x38(%ebp)
length, lfn_entry);
#endif
/*
* Time to write the short file name entry.
*/
if (lfn_entry == (lfn_entries + 1))
117173: 3b 55 ac cmp -0x54(%ebp),%edx
117176: 75 71 jne 1171e9 <msdos_find_name_in_fat_file+0x5e6>
{
/* get current cluster number */
int rc = fat_file_ioctl(&fs_info->fat, fat_fd, F_CLU_NUM,
117178: 83 ec 0c sub $0xc,%esp
11717b: ff 75 20 pushl 0x20(%ebp)
11717e: 53 push %ebx
11717f: 6a 01 push $0x1
117181: ff 75 0c pushl 0xc(%ebp)
117184: 51 push %ecx
117185: e8 54 ab ff ff call 111cde <fat_file_ioctl>
empty_space_offset * bts2rd,
&dir_pos->sname.cln);
if (rc != RC_OK)
11718a: 83 c4 20 add $0x20,%esp
11718d: 85 c0 test %eax,%eax
11718f: 0f 85 54 01 00 00 jne 1172e9 <msdos_find_name_in_fat_file+0x6e6><== NEVER TAKEN
return rc;
dir_pos->sname.ofs = dir_entry;
117195: 8b 55 20 mov 0x20(%ebp),%edx
117198: 89 72 04 mov %esi,0x4(%edx)
if (lfn_start.cln != FAT_FILE_SHORT_NAME)
11719b: 8b 45 e0 mov -0x20(%ebp),%eax
11719e: 83 f8 ff cmp $0xffffffff,%eax
1171a1: 75 21 jne 1171c4 <msdos_find_name_in_fat_file+0x5c1>
&lfn_start.cln);
if (rc != RC_OK)
return rc;
}
dir_pos->lname.cln = lfn_start.cln;
1171a3: 8b 45 e0 mov -0x20(%ebp),%eax
1171a6: 8b 4d 20 mov 0x20(%ebp),%ecx
1171a9: 89 41 08 mov %eax,0x8(%ecx)
dir_pos->lname.ofs = lfn_start.ofs;
1171ac: 8b 45 e4 mov -0x1c(%ebp),%eax
1171af: 89 41 0c mov %eax,0xc(%ecx)
/* write new node entry */
memcpy (entry, (uint8_t *) name_dir_entry,
1171b2: b9 08 00 00 00 mov $0x8,%ecx
1171b7: 8b 7d d4 mov -0x2c(%ebp),%edi
1171ba: 8b 75 24 mov 0x24(%ebp),%esi
1171bd: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
break;
1171bf: e9 ca 00 00 00 jmp 11728e <msdos_find_name_in_fat_file+0x68b>
dir_pos->sname.ofs = dir_entry;
if (lfn_start.cln != FAT_FILE_SHORT_NAME)
{
rc = fat_file_ioctl(&fs_info->fat, fat_fd, F_CLU_NUM,
1171c4: 83 ec 0c sub $0xc,%esp
1171c7: 8d 55 e0 lea -0x20(%ebp),%edx
1171ca: 52 push %edx
1171cb: 0f af 45 d0 imul -0x30(%ebp),%eax
1171cf: 50 push %eax
1171d0: 6a 01 push $0x1
1171d2: ff 75 0c pushl 0xc(%ebp)
1171d5: ff 75 cc pushl -0x34(%ebp)
1171d8: e8 01 ab ff ff call 111cde <fat_file_ioctl>
lfn_start.cln * bts2rd,
&lfn_start.cln);
if (rc != RC_OK)
1171dd: 83 c4 20 add $0x20,%esp
1171e0: 85 c0 test %eax,%eax
1171e2: 74 bf je 1171a3 <msdos_find_name_in_fat_file+0x5a0><== ALWAYS TAKEN
1171e4: e9 00 01 00 00 jmp 1172e9 <msdos_find_name_in_fat_file+0x6e6><== NOT EXECUTED
* This is a long file name and we need to write
* a long file name entry. See if this is the
* first entry written and if so remember the
* the location of the long file name.
*/
if (lfn_start.cln == FAT_FILE_SHORT_NAME)
1171e9: 83 7d e0 ff cmpl $0xffffffff,-0x20(%ebp)
1171ed: 75 09 jne 1171f8 <msdos_find_name_in_fat_file+0x5f5>
{
lfn_start.cln = empty_space_offset;
1171ef: 8b 45 b8 mov -0x48(%ebp),%eax
1171f2: 89 45 e0 mov %eax,-0x20(%ebp)
lfn_start.ofs = dir_entry;
1171f5: 89 75 e4 mov %esi,-0x1c(%ebp)
}
/*
* Clear the entry before loading the data.
*/
memset (entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
1171f8: b9 08 00 00 00 mov $0x8,%ecx
1171fd: 31 c0 xor %eax,%eax
1171ff: 8b 7d d4 mov -0x2c(%ebp),%edi
117202: f3 ab rep stos %eax,%es:(%edi)
*MSDOS_DIR_LFN_CHECKSUM(entry) = lfn_checksum;
117204: 8a 4d bf mov -0x41(%ebp),%cl
117207: 8b 45 d4 mov -0x2c(%ebp),%eax
11720a: 88 48 0d mov %cl,0xd(%eax)
p = entry + 1;
11720d: 40 inc %eax
* RC_OK on success, or error code if error occured (errno set
* appropriately)
*
*/
#define MSDOS_FIND_PRINT 0
int msdos_find_name_in_fat_file(
11720e: 6b ca 0d imul $0xd,%edx,%ecx
117211: 8b 7d b0 mov -0x50(%ebp),%edi
117214: 29 cf sub %ecx,%edi
{
char* entry = (char*) fs_info->cl_buf + dir_entry;
char* p;
const char* n;
int i;
char fill = 0;
117216: 31 f6 xor %esi,%esi
*MSDOS_DIR_LFN_CHECKSUM(entry) = lfn_checksum;
p = entry + 1;
n = name + (lfn_entries - lfn_entry) * MSDOS_LFN_LEN_PER_ENTRY;
for (i = 0; i < MSDOS_LFN_LEN_PER_ENTRY; i++)
117218: c7 45 a8 00 00 00 00 movl $0x0,-0x58(%ebp)
{
if (*n != 0)
11721f: 8a 0f mov (%edi),%cl
117221: 88 4d c8 mov %cl,-0x38(%ebp)
117224: 84 c9 test %cl,%cl
117226: 74 05 je 11722d <msdos_find_name_in_fat_file+0x62a>
{
*p = *n;
117228: 88 08 mov %cl,(%eax)
n++;
11722a: 47 inc %edi
11722b: eb 0c jmp 117239 <msdos_find_name_in_fat_file+0x636>
}
else
{
p [0] = fill;
11722d: 89 f1 mov %esi,%ecx
11722f: 88 08 mov %cl,(%eax)
p [1] = fill;
117231: 88 48 01 mov %cl,0x1(%eax)
fill = 0xff;
117234: be ff ff ff ff mov $0xffffffff,%esi
}
switch (i)
117239: 83 7d a8 04 cmpl $0x4,-0x58(%ebp)
11723d: 74 08 je 117247 <msdos_find_name_in_fat_file+0x644>
11723f: 83 7d a8 0a cmpl $0xa,-0x58(%ebp)
117243: 75 0c jne 117251 <msdos_find_name_in_fat_file+0x64e>
117245: eb 05 jmp 11724c <msdos_find_name_in_fat_file+0x649>
{
case 4:
p += 5;
117247: 83 c0 05 add $0x5,%eax
break;
11724a: eb 08 jmp 117254 <msdos_find_name_in_fat_file+0x651>
case 10:
p += 4;
11724c: 83 c0 04 add $0x4,%eax
break;
11724f: eb 03 jmp 117254 <msdos_find_name_in_fat_file+0x651>
default:
p += 2;
117251: 83 c0 02 add $0x2,%eax
*MSDOS_DIR_LFN_CHECKSUM(entry) = lfn_checksum;
p = entry + 1;
n = name + (lfn_entries - lfn_entry) * MSDOS_LFN_LEN_PER_ENTRY;
for (i = 0; i < MSDOS_LFN_LEN_PER_ENTRY; i++)
117254: ff 45 a8 incl -0x58(%ebp)
117257: 83 7d a8 0d cmpl $0xd,-0x58(%ebp)
11725b: 75 c2 jne 11721f <msdos_find_name_in_fat_file+0x61c>
* RC_OK on success, or error code if error occured (errno set
* appropriately)
*
*/
#define MSDOS_FIND_PRINT 0
int msdos_find_name_in_fat_file(
11725d: 8a 45 be mov -0x42(%ebp),%al
117260: 29 d0 sub %edx,%eax
break;
}
}
*MSDOS_DIR_ENTRY_TYPE(entry) = (lfn_entries - lfn_entry) + 1;
if (lfn_entry == 1)
117262: 83 fa 01 cmp $0x1,%edx
117265: 74 02 je 117269 <msdos_find_name_in_fat_file+0x666>
117267: eb 03 jmp 11726c <msdos_find_name_in_fat_file+0x669>
*MSDOS_DIR_ENTRY_TYPE(entry) |= MSDOS_LAST_LONG_ENTRY;
117269: 83 c8 40 or $0x40,%eax
11726c: 8b 4d d4 mov -0x2c(%ebp),%ecx
11726f: 88 01 mov %al,(%ecx)
*MSDOS_DIR_ATTR(entry) |= MSDOS_ATTR_LFN;
117271: 8b 45 d4 mov -0x2c(%ebp),%eax
117274: 80 48 0b 0f orb $0xf,0xb(%eax)
117278: 42 inc %edx
* RC_OK on success, or error code if error occured (errno set
* appropriately)
*
*/
#define MSDOS_FIND_PRINT 0
int msdos_find_name_in_fat_file(
117279: 8b 75 c4 mov -0x3c(%ebp),%esi
11727c: 03 75 b4 add -0x4c(%ebp),%esi
11727f: 8d 4a ff lea -0x1(%edx),%ecx
117282: 89 4d c8 mov %ecx,-0x38(%ebp)
#if MSDOS_FIND_PRINT
printf ("MSFS:[10] eso:%li\n", empty_space_offset);
#endif
for (dir_entry = empty_space_entry;
117285: 3b 75 d0 cmp -0x30(%ebp),%esi
117288: 0f 82 d0 fe ff ff jb 11715e <msdos_find_name_in_fat_file+0x55b><== ALWAYS TAKEN
if (lfn_entry == 1)
*MSDOS_DIR_ENTRY_TYPE(entry) |= MSDOS_LAST_LONG_ENTRY;
*MSDOS_DIR_ATTR(entry) |= MSDOS_ATTR_LFN;
}
ret = fat_file_write(&fs_info->fat, fat_fd,
11728e: 83 ec 0c sub $0xc,%esp
117291: 8b 45 b4 mov -0x4c(%ebp),%eax
117294: 8b 55 cc mov -0x34(%ebp),%edx
117297: 03 82 94 00 00 00 add 0x94(%edx),%eax
11729d: 50 push %eax
11729e: ff 75 c4 pushl -0x3c(%ebp)
1172a1: 8b 45 b4 mov -0x4c(%ebp),%eax
1172a4: 01 d8 add %ebx,%eax
1172a6: 50 push %eax
1172a7: ff 75 0c pushl 0xc(%ebp)
1172aa: 52 push %edx
1172ab: e8 d2 ac ff ff call 111f82 <fat_file_write>
(empty_space_offset * bts2rd) + empty_space_entry,
length, fs_info->cl_buf + empty_space_entry);
if (ret == -1)
1172b0: 83 c4 20 add $0x20,%esp
1172b3: 83 f8 ff cmp $0xffffffff,%eax
1172b6: 74 35 je 1172ed <msdos_find_name_in_fat_file+0x6ea><== NEVER TAKEN
1172b8: 03 5d d0 add -0x30(%ebp),%ebx
return ret;
else if (ret != length)
1172bb: 3b 45 c4 cmp -0x3c(%ebp),%eax
1172be: 74 0d je 1172cd <msdos_find_name_in_fat_file+0x6ca><== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one(EIO);
1172c0: e8 4b 25 00 00 call 119810 <__errno> <== NOT EXECUTED
1172c5: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
1172cb: eb 20 jmp 1172ed <msdos_find_name_in_fat_file+0x6ea><== NOT EXECUTED
empty_space_offset++;
1172cd: ff 45 b8 incl -0x48(%ebp)
empty_space_entry = 0;
1172d0: c7 45 b4 00 00 00 00 movl $0x0,-0x4c(%ebp)
read_cluster = true;
1172d7: b0 01 mov $0x1,%al
#endif
/*
* The one more is the short entry.
*/
while (lfn_entry < (lfn_entries + 1))
1172d9: 8b 55 c8 mov -0x38(%ebp),%edx
1172dc: 39 55 c0 cmp %edx,-0x40(%ebp)
1172df: 0f 8d ba fd ff ff jge 11709f <msdos_find_name_in_fat_file+0x49c>
empty_space_offset++;
empty_space_entry = 0;
read_cluster = true;
}
return 0;
1172e5: 31 db xor %ebx,%ebx
1172e7: eb 18 jmp 117301 <msdos_find_name_in_fat_file+0x6fe>
dir_pos->sname.ofs = dir_entry;
if (lfn_start.cln != FAT_FILE_SHORT_NAME)
{
rc = fat_file_ioctl(&fs_info->fat, fat_fd, F_CLU_NUM,
1172e9: 89 c3 mov %eax,%ebx <== NOT EXECUTED
1172eb: eb 14 jmp 117301 <msdos_find_name_in_fat_file+0x6fe><== NOT EXECUTED
}
ret = fat_file_write(&fs_info->fat, fat_fd,
(empty_space_offset * bts2rd) + empty_space_entry,
length, fs_info->cl_buf + empty_space_entry);
if (ret == -1)
1172ed: 83 cb ff or $0xffffffff,%ebx <== NOT EXECUTED
1172f0: eb 0f jmp 117301 <msdos_find_name_in_fat_file+0x6fe><== NOT EXECUTED
* short and they match then we have the entry. We will not
* match a long file name against a short file name because
* a long file name that generates a matching short file
* name is not a long file name.
*/
if (lfn_matched ||
1172f2: 80 7d bc 00 cmpb $0x0,-0x44(%ebp)
1172f6: 0f 84 5c fc ff ff je 116f58 <msdos_find_name_in_fat_file+0x355>
1172fc: e9 e7 fb ff ff jmp 116ee8 <msdos_find_name_in_fat_file+0x2e5>
empty_space_entry = 0;
read_cluster = true;
}
return 0;
}
117301: 89 d8 mov %ebx,%eax
117303: 8d 65 f4 lea -0xc(%ebp),%esp
117306: 5b pop %ebx
117307: 5e pop %esi
117308: 5f pop %edi
117309: 5d pop %ebp
11730a: c3 ret
0011730b <msdos_find_node_by_cluster_num_in_fat_file>:
fat_file_fd_t *fat_fd,
uint32_t cl4find,
fat_dir_pos_t *dir_pos,
char *dir_entry
)
{
11730b: 55 push %ebp
11730c: 89 e5 mov %esp,%ebp
11730e: 57 push %edi
11730f: 56 push %esi
117310: 53 push %ebx
117311: 83 ec 2c sub $0x2c,%esp
117314: 8b 55 0c mov 0xc(%ebp),%edx
int rc = RC_OK;
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
117317: 8b 45 08 mov 0x8(%ebp),%eax
11731a: 8b 58 08 mov 0x8(%eax),%ebx
uint32_t bts2rd = 0;
uint32_t i = 0, j = 0;
if (FAT_FD_OF_ROOT_DIR(fat_fd) &&
11731d: 83 7a 20 01 cmpl $0x1,0x20(%edx)
117321: 75 16 jne 117339 <msdos_find_node_by_cluster_num_in_fat_file+0x2e><== ALWAYS TAKEN
117323: 83 7a 24 00 cmpl $0x0,0x24(%edx) <== NOT EXECUTED
117327: 75 10 jne 117339 <msdos_find_node_by_cluster_num_in_fat_file+0x2e><== NOT EXECUTED
117329: f6 43 0a 03 testb $0x3,0xa(%ebx) <== NOT EXECUTED
11732d: 74 0a je 117339 <msdos_find_node_by_cluster_num_in_fat_file+0x2e><== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
bts2rd = fat_fd->fat_file_size;
11732f: 8b 7a 18 mov 0x18(%edx),%edi <== NOT EXECUTED
assert(ret == bts2rd);
for (i = 0; i < bts2rd; i += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
{
char* entry = (char*) fs_info->cl_buf + i;
117332: 31 c9 xor %ecx,%ecx
117334: e9 b7 00 00 00 jmp 1173f0 <msdos_find_node_by_cluster_num_in_fat_file+0xe5>
if (FAT_FD_OF_ROOT_DIR(fat_fd) &&
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
bts2rd = fat_fd->fat_file_size;
else
bts2rd = fs_info->fat.vol.bpc;
117339: 0f b7 7b 06 movzwl 0x6(%ebx),%edi
11733d: eb f3 jmp 117332 <msdos_find_node_by_cluster_num_in_fat_file+0x27>
while ((ret = fat_file_read(&fs_info->fat, fat_fd, j * bts2rd, bts2rd,
fs_info->cl_buf)) != FAT_EOF)
{
if ( ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE )
11733f: 83 f8 1f cmp $0x1f,%eax
117342: 7f 13 jg 117357 <msdos_find_node_by_cluster_num_in_fat_file+0x4c><== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EIO );
117344: e8 c7 24 00 00 call 119810 <__errno> <== NOT EXECUTED
117349: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
11734f: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
117352: e9 cd 00 00 00 jmp 117424 <msdos_find_node_by_cluster_num_in_fat_file+0x119><== NOT EXECUTED
assert(ret == bts2rd);
117357: 39 f8 cmp %edi,%eax
117359: 74 19 je 117374 <msdos_find_node_by_cluster_num_in_fat_file+0x69><== ALWAYS TAKEN
11735b: 68 a0 8b 12 00 push $0x128ba0 <== NOT EXECUTED
117360: 68 e8 8b 12 00 push $0x128be8 <== NOT EXECUTED
117365: 68 49 06 00 00 push $0x649 <== NOT EXECUTED
11736a: 68 31 8b 12 00 push $0x128b31 <== NOT EXECUTED
11736f: e8 48 c3 ff ff call 1136bc <__assert_func> <== NOT EXECUTED
117374: 8b b3 94 00 00 00 mov 0x94(%ebx),%esi
for (i = 0; i < bts2rd; i += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
{
char* entry = (char*) fs_info->cl_buf + i;
11737a: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
/* if this and all rest entries are empty - return not-found */
if ((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
117381: 8a 06 mov (%esi),%al
117383: 84 c0 test %al,%al
117385: 0f 84 94 00 00 00 je 11741f <msdos_find_node_by_cluster_num_in_fat_file+0x114><== NEVER TAKEN
MSDOS_THIS_DIR_ENTRY_AND_REST_EMPTY)
return MSDOS_NAME_NOT_FOUND_ERR;
/* if this entry is empty - skip it */
if ((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
11738b: 3c e5 cmp $0xe5,%al
11738d: 74 53 je 1173e2 <msdos_find_node_by_cluster_num_in_fat_file+0xd7><== NEVER TAKEN
MSDOS_THIS_DIR_ENTRY_EMPTY)
continue;
/* if get a non-empty entry - compare clusters num */
if (MSDOS_EXTRACT_CLUSTER_NUM(entry) == cl4find)
11738f: 0f b7 46 14 movzwl 0x14(%esi),%eax
117393: c1 e0 10 shl $0x10,%eax
117396: 89 45 d4 mov %eax,-0x2c(%ebp)
117399: 0f b7 46 1a movzwl 0x1a(%esi),%eax
11739d: 09 45 d4 or %eax,-0x2c(%ebp)
1173a0: 8b 45 10 mov 0x10(%ebp),%eax
1173a3: 39 45 d4 cmp %eax,-0x2c(%ebp)
1173a6: 75 3a jne 1173e2 <msdos_find_node_by_cluster_num_in_fat_file+0xd7>
{
/* on success fill aux structure and copy all 32 bytes */
rc = fat_file_ioctl(&fs_info->fat, fat_fd, F_CLU_NUM, j * bts2rd,
1173a8: 83 ec 0c sub $0xc,%esp
1173ab: ff 75 14 pushl 0x14(%ebp)
1173ae: 51 push %ecx
1173af: 6a 01 push $0x1
1173b1: 52 push %edx
1173b2: 53 push %ebx
1173b3: e8 26 a9 ff ff call 111cde <fat_file_ioctl>
&dir_pos->sname.cln);
if (rc != RC_OK)
1173b8: 83 c4 20 add $0x20,%esp
1173bb: 85 c0 test %eax,%eax
1173bd: 75 65 jne 117424 <msdos_find_node_by_cluster_num_in_fat_file+0x119><== NEVER TAKEN
return rc;
dir_pos->sname.ofs = i;
1173bf: 8b 4d e4 mov -0x1c(%ebp),%ecx
1173c2: 8b 55 14 mov 0x14(%ebp),%edx
1173c5: 89 4a 04 mov %ecx,0x4(%edx)
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
1173c8: c7 42 08 ff ff ff ff movl $0xffffffff,0x8(%edx)
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
1173cf: c7 42 0c ff ff ff ff movl $0xffffffff,0xc(%edx)
memcpy(dir_entry, entry,
1173d6: b9 08 00 00 00 mov $0x8,%ecx
1173db: 8b 7d 18 mov 0x18(%ebp),%edi
1173de: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
return RC_OK;
1173e0: eb 42 jmp 117424 <msdos_find_node_by_cluster_num_in_fat_file+0x119>
if ( ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE )
rtems_set_errno_and_return_minus_one( EIO );
assert(ret == bts2rd);
for (i = 0; i < bts2rd; i += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
1173e2: 83 45 e4 20 addl $0x20,-0x1c(%ebp)
1173e6: 83 c6 20 add $0x20,%esi
1173e9: 39 7d e4 cmp %edi,-0x1c(%ebp)
1173ec: 72 93 jb 117381 <msdos_find_node_by_cluster_num_in_fat_file+0x76><== ALWAYS TAKEN
1173ee: 01 f9 add %edi,%ecx <== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
bts2rd = fat_fd->fat_file_size;
else
bts2rd = fs_info->fat.vol.bpc;
while ((ret = fat_file_read(&fs_info->fat, fat_fd, j * bts2rd, bts2rd,
1173f0: 83 ec 0c sub $0xc,%esp
1173f3: ff b3 94 00 00 00 pushl 0x94(%ebx)
1173f9: 57 push %edi
1173fa: 51 push %ecx
1173fb: 52 push %edx
1173fc: 53 push %ebx
1173fd: 89 55 d8 mov %edx,-0x28(%ebp)
117400: 89 4d dc mov %ecx,-0x24(%ebp)
117403: e8 e3 a5 ff ff call 1119eb <fat_file_read>
117408: 83 c4 20 add $0x20,%esp
11740b: 85 c0 test %eax,%eax
11740d: 8b 55 d8 mov -0x28(%ebp),%edx
117410: 8b 4d dc mov -0x24(%ebp),%ecx
117413: 0f 85 26 ff ff ff jne 11733f <msdos_find_node_by_cluster_num_in_fat_file+0x34><== ALWAYS TAKEN
char* entry = (char*) fs_info->cl_buf + i;
/* if this and all rest entries are empty - return not-found */
if ((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
MSDOS_THIS_DIR_ENTRY_AND_REST_EMPTY)
return MSDOS_NAME_NOT_FOUND_ERR;
117419: 66 b8 01 7d mov $0x7d01,%ax <== NOT EXECUTED
11741d: eb 05 jmp 117424 <msdos_find_node_by_cluster_num_in_fat_file+0x119><== NOT EXECUTED
11741f: b8 01 7d 00 00 mov $0x7d01,%eax <== NOT EXECUTED
}
}
j++;
}
return MSDOS_NAME_NOT_FOUND_ERR;
}
117424: 8d 65 f4 lea -0xc(%ebp),%esp
117427: 5b pop %ebx
117428: 5e pop %esi
117429: 5f pop %edi
11742a: 5d pop %ebp
11742b: c3 ret
0010e101 <msdos_format>:
)
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
10e101: 55 push %ebp
10e102: 89 e5 mov %esp,%ebp
10e104: 57 push %edi
10e105: 56 push %esi
10e106: 53 push %ebx
10e107: 81 ec d0 02 00 00 sub $0x2d0,%esp
10e10d: 8b 5d 08 mov 0x8(%ebp),%ebx
msdos_format_param_t fmt_params;
/*
* open device for writing
*/
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL, "open device\n");
10e110: 68 c4 84 12 00 push $0x1284c4
10e115: 6a 02 push $0x2
10e117: ff 75 0c pushl 0xc(%ebp)
10e11a: e8 5d fe ff ff call 10df7c <msdos_format_printf>
fd = open(devname, O_RDWR);
10e11f: 58 pop %eax
10e120: 5a pop %edx
10e121: 6a 02 push $0x2
10e123: 53 push %ebx
10e124: e8 c7 9e ff ff call 107ff0 <open>
10e129: 89 85 40 fd ff ff mov %eax,-0x2c0(%ebp)
if (fd == -1) {
10e12f: 83 c4 10 add $0x10,%esp
\*=========================================================================*/
{
char tmp_sec[FAT_TOTAL_MBR_SIZE];
int rc;
struct stat stat_buf;
int ret_val = 0;
10e132: 40 inc %eax
10e133: 0f 95 c0 setne %al
10e136: 0f b6 c0 movzbl %al,%eax
10e139: 89 c6 mov %eax,%esi
10e13b: 4e dec %esi
}
/*
* sanity check on device
*/
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
10e13c: 53 push %ebx
10e13d: 68 d1 84 12 00 push $0x1284d1
10e142: 6a 02 push $0x2
10e144: ff 75 0c pushl 0xc(%ebp)
10e147: e8 30 fe ff ff call 10df7c <msdos_format_printf>
"stat check: %s\n", devname);
if (ret_val == 0) {
10e14c: 83 c4 10 add $0x10,%esp
10e14f: c7 85 44 fd ff ff ff movl $0xffffffff,-0x2bc(%ebp)
10e156: ff ff ff
10e159: 85 f6 test %esi,%esi
10e15b: 75 1d jne 10e17a <msdos_format+0x79> <== NEVER TAKEN
rc = fstat(fd, &stat_buf);
10e15d: 50 push %eax
10e15e: 50 push %eax
10e15f: 8d 85 50 fd ff ff lea -0x2b0(%ebp),%eax
10e165: 50 push %eax
10e166: ff b5 40 fd ff ff pushl -0x2c0(%ebp)
10e16c: e8 2f 57 00 00 call 1138a0 <fstat>
10e171: 83 c4 10 add $0x10,%esp
ret_val = rc;
10e174: 89 85 44 fd ff ff mov %eax,-0x2bc(%ebp)
}
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_INFO,
10e17a: 53 push %ebx
10e17b: 68 e1 84 12 00 push $0x1284e1
10e180: 6a 01 push $0x1
10e182: ff 75 0c pushl 0xc(%ebp)
10e185: e8 f2 fd ff ff call 10df7c <msdos_format_printf>
"formating: %s\n", devname);
/* rtems feature: no block devices, all are character devices */
if ((ret_val == 0) && (!S_ISBLK(stat_buf.st_mode))) {
10e18a: 83 c4 10 add $0x10,%esp
10e18d: 83 bd 44 fd ff ff 00 cmpl $0x0,-0x2bc(%ebp)
10e194: 0f 85 28 05 00 00 jne 10e6c2 <msdos_format+0x5c1> <== NEVER TAKEN
10e19a: 8b 85 5c fd ff ff mov -0x2a4(%ebp),%eax
10e1a0: 25 00 f0 00 00 and $0xf000,%eax
10e1a5: 3d 00 60 00 00 cmp $0x6000,%eax
10e1aa: 0f 84 e6 0a 00 00 je 10ec96 <msdos_format+0xb95> <== ALWAYS TAKEN
errno = ENOTTY;
10e1b0: e8 5b b6 00 00 call 119810 <__errno> <== NOT EXECUTED
10e1b5: c7 00 19 00 00 00 movl $0x19,(%eax) <== NOT EXECUTED
10e1bb: e9 9a 0b 00 00 jmp 10ed5a <msdos_format+0xc59> <== NOT EXECUTED
static inline int rtems_disk_fd_get_block_count(
int fd,
rtems_blkdev_bnum *block_count
)
{
return ioctl(fd, RTEMS_BLKIO_GETSIZE, block_count);
10e1c0: 50 push %eax
*/
if (ret_val == 0) {
ret_val = rtems_disk_fd_get_block_size(fd, &fmt_params->bytes_per_sector);
}
if (ret_val == 0) {
ret_val = rtems_disk_fd_get_block_count(fd, &fmt_params->totl_sector_cnt);
10e1c1: 8d 85 9c fd ff ff lea -0x264(%ebp),%eax
10e1c7: 50 push %eax
10e1c8: 68 05 42 04 40 push $0x40044205
10e1cd: ff b5 40 fd ff ff pushl -0x2c0(%ebp)
10e1d3: e8 a0 91 ff ff call 107378 <ioctl>
10e1d8: 89 85 3c fd ff ff mov %eax,-0x2c4(%ebp)
}
if (ret_val == 0) {
10e1de: 83 c4 10 add $0x10,%esp
10e1e1: 85 c0 test %eax,%eax
10e1e3: 0f 85 c3 03 00 00 jne 10e5ac <msdos_format+0x4ab> <== NEVER TAKEN
total_size = fmt_params->bytes_per_sector * fmt_params->totl_sector_cnt;
10e1e9: 8b 95 98 fd ff ff mov -0x268(%ebp),%edx
10e1ef: 8b 8d 9c fd ff ff mov -0x264(%ebp),%ecx
10e1f5: 89 ce mov %ecx,%esi
10e1f7: 0f af f2 imul %edx,%esi
10e1fa: 31 ff xor %edi,%edi
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
10e1fc: 50 push %eax
10e1fd: 57 push %edi
10e1fe: 56 push %esi
10e1ff: 51 push %ecx
10e200: 52 push %edx
10e201: 68 f0 84 12 00 push $0x1284f0
10e206: 6a 02 push $0x2
10e208: ff 75 0c pushl 0xc(%ebp)
10e20b: e8 6c fd ff ff call 10df7c <msdos_format_printf>
/*
* determine number of FATs
*/
if (ret_val == 0) {
if ((rqdata == NULL) ||
10e210: 83 c4 20 add $0x20,%esp
10e213: 83 7d 0c 00 cmpl $0x0,0xc(%ebp)
10e217: 74 0a je 10e223 <msdos_format+0x122>
(rqdata->fat_num == 0)) {
10e219: 8b 55 0c mov 0xc(%ebp),%edx
10e21c: 8b 42 0c mov 0xc(%edx),%eax
/*
* determine number of FATs
*/
if (ret_val == 0) {
if ((rqdata == NULL) ||
10e21f: 85 c0 test %eax,%eax
10e221: 75 0c jne 10e22f <msdos_format+0x12e> <== NEVER TAKEN
(rqdata->fat_num == 0)) {
fmt_params->fat_num = 2;
10e223: c6 85 c8 fd ff ff 02 movb $0x2,-0x238(%ebp)
10e22a: e9 a4 0a 00 00 jmp 10ecd3 <msdos_format+0xbd2>
}
else if (rqdata->fat_num <= 6) {
10e22f: 83 f8 06 cmp $0x6,%eax <== NOT EXECUTED
10e232: 0f 87 d8 0a 00 00 ja 10ed10 <msdos_format+0xc0f> <== NOT EXECUTED
fmt_params->fat_num = rqdata->fat_num;
10e238: 88 85 c8 fd ff ff mov %al,-0x238(%ebp) <== NOT EXECUTED
10e23e: e9 90 0a 00 00 jmp 10ecd3 <msdos_format+0xbd2> <== NOT EXECUTED
* depends on
*/
if (ret_val == 0) {
fmt_params->sectors_per_cluster = 1;
if ((rqdata != NULL) &&
(rqdata->fattype == MSDOS_FMT_FAT12)) {
10e243: 8b 4d 0c mov 0xc(%ebp),%ecx
10e246: 8a 41 14 mov 0x14(%ecx),%al
* determine FAT type and sectors per cluster
* depends on
*/
if (ret_val == 0) {
fmt_params->sectors_per_cluster = 1;
if ((rqdata != NULL) &&
10e249: 3c 01 cmp $0x1,%al
10e24b: 75 0c jne 10e259 <msdos_format+0x158> <== ALWAYS TAKEN
(rqdata->fattype == MSDOS_FMT_FAT12)) {
fmt_params->fattype = FAT_FAT12;
10e24d: c6 85 ca fd ff ff 01 movb $0x1,-0x236(%ebp) <== NOT EXECUTED
10e254: e9 c9 00 00 00 jmp 10e322 <msdos_format+0x221> <== NOT EXECUTED
}
else if ((rqdata != NULL) &&
10e259: 3c 02 cmp $0x2,%al
10e25b: 75 0c jne 10e269 <msdos_format+0x168> <== ALWAYS TAKEN
(rqdata->fattype == MSDOS_FMT_FAT16)) {
fmt_params->fattype = FAT_FAT16;
10e25d: c6 85 ca fd ff ff 02 movb $0x2,-0x236(%ebp) <== NOT EXECUTED
10e264: e9 b9 00 00 00 jmp 10e322 <msdos_format+0x221> <== NOT EXECUTED
}
else if ((rqdata != NULL) &&
10e269: 3c 03 cmp $0x3,%al
10e26b: 75 0c jne 10e279 <msdos_format+0x178> <== ALWAYS TAKEN
(rqdata->fattype == MSDOS_FMT_FAT32)) {
fmt_params->fattype = FAT_FAT32;
10e26d: c6 85 ca fd ff ff 04 movb $0x4,-0x236(%ebp) <== NOT EXECUTED
10e274: e9 a9 00 00 00 jmp 10e322 <msdos_format+0x221> <== NOT EXECUTED
}
else if ((rqdata != NULL) &&
10e279: 84 c0 test %al,%al
10e27b: 74 1a je 10e297 <msdos_format+0x196> <== ALWAYS TAKEN
(rqdata->fattype != MSDOS_FMT_FATANY)) {
ret_val = -1;
errno = EINVAL;
10e27d: e8 8e b5 00 00 call 119810 <__errno> <== NOT EXECUTED
10e282: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
(rqdata->fattype == MSDOS_FMT_FAT32)) {
fmt_params->fattype = FAT_FAT32;
}
else if ((rqdata != NULL) &&
(rqdata->fattype != MSDOS_FMT_FATANY)) {
ret_val = -1;
10e288: c7 85 3c fd ff ff ff movl $0xffffffff,-0x2c4(%ebp) <== NOT EXECUTED
10e28f: ff ff ff
10e292: e9 8b 00 00 00 jmp 10e322 <msdos_format+0x221> <== NOT EXECUTED
* are a compromise concerning capacity and efficency
*/
uint32_t fat12_sect_per_clust = 8;
uint32_t fat16_sect_per_clust = 32;
if (rqdata != NULL && rqdata->sectors_per_cluster != 0) {
10e297: 8b 55 0c mov 0xc(%ebp),%edx
10e29a: 8b 42 08 mov 0x8(%edx),%eax
10e29d: 89 c2 mov %eax,%edx
10e29f: 85 c0 test %eax,%eax
10e2a1: 75 07 jne 10e2aa <msdos_format+0x1a9> <== NEVER TAKEN
* limiting values for disk size, fat type, sectors per cluster
* NOTE: maximum sect_per_clust is arbitrarily choosen with values that
* are a compromise concerning capacity and efficency
*/
uint32_t fat12_sect_per_clust = 8;
uint32_t fat16_sect_per_clust = 32;
10e2a3: ba 20 00 00 00 mov $0x20,%edx
/*
* limiting values for disk size, fat type, sectors per cluster
* NOTE: maximum sect_per_clust is arbitrarily choosen with values that
* are a compromise concerning capacity and efficency
*/
uint32_t fat12_sect_per_clust = 8;
10e2a8: b0 08 mov $0x8,%al
if (rqdata != NULL && rqdata->sectors_per_cluster != 0) {
fat12_sect_per_clust = rqdata->sectors_per_cluster;
fat16_sect_per_clust = rqdata->sectors_per_cluster;
}
if (fmt_params->totl_sector_cnt
10e2aa: 8b 8d 9c fd ff ff mov -0x264(%ebp),%ecx
< FAT_FAT12_MAX_CLN * fat12_sect_per_clust) {
10e2b0: 69 c0 f5 0f 00 00 imul $0xff5,%eax,%eax
if (rqdata != NULL && rqdata->sectors_per_cluster != 0) {
fat12_sect_per_clust = rqdata->sectors_per_cluster;
fat16_sect_per_clust = rqdata->sectors_per_cluster;
}
if (fmt_params->totl_sector_cnt
10e2b6: 39 c1 cmp %eax,%ecx
10e2b8: 73 09 jae 10e2c3 <msdos_format+0x1c2> <== NEVER TAKEN
< FAT_FAT12_MAX_CLN * fat12_sect_per_clust) {
fmt_params->fattype = FAT_FAT12;
10e2ba: c6 85 ca fd ff ff 01 movb $0x1,-0x236(%ebp)
10e2c1: eb 11 jmp 10e2d4 <msdos_format+0x1d3>
/* start trying with small clusters */
fmt_params->sectors_per_cluster = 2;
}
else if (fmt_params->totl_sector_cnt
< FAT_FAT16_MAX_CLN * fat16_sect_per_clust) {
10e2c3: 69 d2 f5 ff 00 00 imul $0xfff5,%edx,%edx <== NOT EXECUTED
< FAT_FAT12_MAX_CLN * fat12_sect_per_clust) {
fmt_params->fattype = FAT_FAT12;
/* start trying with small clusters */
fmt_params->sectors_per_cluster = 2;
}
else if (fmt_params->totl_sector_cnt
10e2c9: 39 d1 cmp %edx,%ecx <== NOT EXECUTED
10e2cb: 73 13 jae 10e2e0 <msdos_format+0x1df> <== NOT EXECUTED
< FAT_FAT16_MAX_CLN * fat16_sect_per_clust) {
fmt_params->fattype = FAT_FAT16;
10e2cd: c6 85 ca fd ff ff 02 movb $0x2,-0x236(%ebp) <== NOT EXECUTED
/* start trying with small clusters */
fmt_params->sectors_per_cluster = 2;
10e2d4: c7 85 a4 fd ff ff 02 movl $0x2,-0x25c(%ebp)
10e2db: 00 00 00
10e2de: eb 3c jmp 10e31c <msdos_format+0x21b>
}
else {
#define ONE_GB (1024L * 1024L * 1024L)
uint32_t gigs = (total_size + ONE_GB) / ONE_GB;
10e2e0: 89 f0 mov %esi,%eax <== NOT EXECUTED
10e2e2: 89 fa mov %edi,%edx <== NOT EXECUTED
10e2e4: 05 00 00 00 40 add $0x40000000,%eax <== NOT EXECUTED
10e2e9: 83 d2 00 adc $0x0,%edx <== NOT EXECUTED
10e2ec: 0f ac d0 1e shrd $0x1e,%edx,%eax <== NOT EXECUTED
10e2f0: c1 ea 1e shr $0x1e,%edx <== NOT EXECUTED
int b;
fmt_params->fattype = FAT_FAT32;
10e2f3: c6 85 ca fd ff ff 04 movb $0x4,-0x236(%ebp) <== NOT EXECUTED
/* scale with the size of disk... */
for (b = 31; b > 0; b--)
10e2fa: b9 1f 00 00 00 mov $0x1f,%ecx <== NOT EXECUTED
if ((gigs & (1 << b)) != 0)
10e2ff: ba 01 00 00 00 mov $0x1,%edx <== NOT EXECUTED
10e304: 89 d3 mov %edx,%ebx <== NOT EXECUTED
10e306: d3 e3 shl %cl,%ebx <== NOT EXECUTED
10e308: 85 c3 test %eax,%ebx <== NOT EXECUTED
10e30a: 75 03 jne 10e30f <msdos_format+0x20e> <== NOT EXECUTED
#define ONE_GB (1024L * 1024L * 1024L)
uint32_t gigs = (total_size + ONE_GB) / ONE_GB;
int b;
fmt_params->fattype = FAT_FAT32;
/* scale with the size of disk... */
for (b = 31; b > 0; b--)
10e30c: 49 dec %ecx <== NOT EXECUTED
10e30d: 75 f5 jne 10e304 <msdos_format+0x203> <== NOT EXECUTED
if ((gigs & (1 << b)) != 0)
break;
fmt_params->sectors_per_cluster = 1 << b;
10e30f: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
10e314: d3 e0 shl %cl,%eax <== NOT EXECUTED
10e316: 89 85 a4 fd ff ff mov %eax,-0x25c(%ebp) <== NOT EXECUTED
}
}
/*
* try to use user requested cluster size
*/
if ((rqdata != NULL) &&
10e31c: 83 7d 0c 00 cmpl $0x0,0xc(%ebp)
10e320: 74 10 je 10e332 <msdos_format+0x231>
(rqdata->sectors_per_cluster > 0)) {
10e322: 8b 4d 0c mov 0xc(%ebp),%ecx
10e325: 8b 41 08 mov 0x8(%ecx),%eax
}
}
/*
* try to use user requested cluster size
*/
if ((rqdata != NULL) &&
10e328: 85 c0 test %eax,%eax
10e32a: 74 06 je 10e332 <msdos_format+0x231> <== ALWAYS TAKEN
(rqdata->sectors_per_cluster > 0)) {
fmt_params->sectors_per_cluster =
10e32c: 89 85 a4 fd ff ff mov %eax,-0x25c(%ebp) <== NOT EXECUTED
*/
for (onebit = 128;onebit >= 1;onebit = onebit>>1) {
if (fmt_params->sectors_per_cluster >= onebit) {
fmt_params->sectors_per_cluster = onebit;
if (fmt_params->sectors_per_cluster
<= 32768L/fmt_params->bytes_per_sector) {
10e332: 8b b5 98 fd ff ff mov -0x268(%ebp),%esi
10e338: 8b 85 a4 fd ff ff mov -0x25c(%ebp),%eax
10e33e: b9 80 00 00 00 mov $0x80,%ecx
10e343: bb 00 80 00 00 mov $0x8000,%ebx
* must be power of 2
* must be smaller than or equal to 128
* sectors_per_cluster*bytes_per_sector must not be bigger than 32K
*/
for (onebit = 128;onebit >= 1;onebit = onebit>>1) {
if (fmt_params->sectors_per_cluster >= onebit) {
10e348: 39 c8 cmp %ecx,%eax
10e34a: 72 13 jb 10e35f <msdos_format+0x25e>
fmt_params->sectors_per_cluster = onebit;
if (fmt_params->sectors_per_cluster
<= 32768L/fmt_params->bytes_per_sector) {
10e34c: 89 d8 mov %ebx,%eax
10e34e: 31 d2 xor %edx,%edx
10e350: f7 f6 div %esi
* sectors_per_cluster*bytes_per_sector must not be bigger than 32K
*/
for (onebit = 128;onebit >= 1;onebit = onebit>>1) {
if (fmt_params->sectors_per_cluster >= onebit) {
fmt_params->sectors_per_cluster = onebit;
if (fmt_params->sectors_per_cluster
10e352: 39 c1 cmp %eax,%ecx
10e354: 89 c8 mov %ecx,%eax
10e356: 76 02 jbe 10e35a <msdos_format+0x259> <== ALWAYS TAKEN
10e358: eb 05 jmp 10e35f <msdos_format+0x25e> <== NOT EXECUTED
<= 32768L/fmt_params->bytes_per_sector) {
/* value is small enough so this value is ok */
onebit = 1;
10e35a: b9 01 00 00 00 mov $0x1,%ecx
* check sectors per cluster.
* must be power of 2
* must be smaller than or equal to 128
* sectors_per_cluster*bytes_per_sector must not be bigger than 32K
*/
for (onebit = 128;onebit >= 1;onebit = onebit>>1) {
10e35f: d1 e9 shr %ecx
10e361: 75 e5 jne 10e348 <msdos_format+0x247>
10e363: 89 85 a4 fd ff ff mov %eax,-0x25c(%ebp)
}
}
}
}
if (ret_val == 0) {
10e369: 83 bd 3c fd ff ff 00 cmpl $0x0,-0x2c4(%ebp)
10e370: 0f 85 2c 02 00 00 jne 10e5a2 <msdos_format+0x4a1> <== NEVER TAKEN
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
10e376: 50 push %eax
10e377: 68 2b 85 12 00 push $0x12852b
10e37c: 6a 02 push $0x2
10e37e: ff 75 0c pushl 0xc(%ebp)
10e381: e8 f6 fb ff ff call 10df7c <msdos_format_printf>
"sectors per cluster: %d\n", fmt_params->sectors_per_cluster);
if (fmt_params->fattype == FAT_FAT32) {
10e386: 0f b6 8d ca fd ff ff movzbl -0x236(%ebp),%ecx
10e38d: 83 c4 10 add $0x10,%esp
10e390: 80 f9 04 cmp $0x4,%cl
10e393: 75 2a jne 10e3bf <msdos_format+0x2be> <== ALWAYS TAKEN
/* recommended: for FAT32, always set reserved sector count to 32 */
fmt_params->rsvd_sector_cnt = 32;
10e395: c7 85 a0 fd ff ff 20 movl $0x20,-0x260(%ebp) <== NOT EXECUTED
10e39c: 00 00 00
/* for FAT32, always set files per root directory 0 */
fmt_params->files_per_root_dir = 0;
10e39f: c7 85 b0 fd ff ff 00 movl $0x0,-0x250(%ebp) <== NOT EXECUTED
10e3a6: 00 00 00
/* location of copy of MBR */
fmt_params->mbr_copy_sec = 6;
10e3a9: c7 85 c0 fd ff ff 06 movl $0x6,-0x240(%ebp) <== NOT EXECUTED
10e3b0: 00 00 00
/* location of fsinfo sector */
fmt_params->fsinfo_sec = 1;
10e3b3: c7 85 c4 fd ff ff 01 movl $0x1,-0x23c(%ebp) <== NOT EXECUTED
10e3ba: 00 00 00
10e3bd: eb 58 jmp 10e417 <msdos_format+0x316> <== NOT EXECUTED
}
else {
/* recommended: for FAT12/FAT16, always set reserved sector count to 1 */
fmt_params->rsvd_sector_cnt = 1;
10e3bf: c7 85 a0 fd ff ff 01 movl $0x1,-0x260(%ebp)
10e3c6: 00 00 00
/* recommended: for FAT16, set files per root directory to 512 */
/* for FAT12/FAT16, set files per root directory */
/* must fill up an even count of sectors */
if ((rqdata != NULL) &&
10e3c9: 83 7d 0c 00 cmpl $0x0,0xc(%ebp)
10e3cd: 74 0c je 10e3db <msdos_format+0x2da>
(rqdata->files_per_root_dir > 0)) {
10e3cf: 8b 55 0c mov 0xc(%ebp),%edx
10e3d2: 8b 42 10 mov 0x10(%edx),%eax
/* recommended: for FAT12/FAT16, always set reserved sector count to 1 */
fmt_params->rsvd_sector_cnt = 1;
/* recommended: for FAT16, set files per root directory to 512 */
/* for FAT12/FAT16, set files per root directory */
/* must fill up an even count of sectors */
if ((rqdata != NULL) &&
10e3d5: 85 c0 test %eax,%eax
10e3d7: 74 02 je 10e3db <msdos_format+0x2da> <== ALWAYS TAKEN
10e3d9: eb 13 jmp 10e3ee <msdos_format+0x2ed> <== NOT EXECUTED
(rqdata->files_per_root_dir > 0)) {
fmt_params->files_per_root_dir = rqdata->files_per_root_dir;
}
else {
if (fmt_params->fattype == FAT_FAT16) {
fmt_params->files_per_root_dir = 512;
10e3db: 31 c0 xor %eax,%eax
10e3dd: 80 f9 02 cmp $0x2,%cl
10e3e0: 0f 94 c0 sete %al
10e3e3: 48 dec %eax
10e3e4: 25 40 fe ff ff and $0xfffffe40,%eax
10e3e9: 05 00 02 00 00 add $0x200,%eax
10e3ee: 89 85 b0 fd ff ff mov %eax,-0x250(%ebp)
else {
fmt_params->files_per_root_dir = 64;
}
}
fmt_params->files_per_root_dir = (fmt_params->files_per_root_dir +
(2*fmt_params->bytes_per_sector/
10e3f4: 8b 9d 98 fd ff ff mov -0x268(%ebp),%ebx
10e3fa: d1 e3 shl %ebx
10e3fc: c1 eb 05 shr $0x5,%ebx
}
else {
fmt_params->files_per_root_dir = 64;
}
}
fmt_params->files_per_root_dir = (fmt_params->files_per_root_dir +
10e3ff: 8b 85 b0 fd ff ff mov -0x250(%ebp),%eax
10e405: 8d 74 03 ff lea -0x1(%ebx,%eax,1),%esi
(2*fmt_params->bytes_per_sector/
FAT_DIRENTRY_SIZE-1));
fmt_params->files_per_root_dir -= (fmt_params->files_per_root_dir %
10e409: 89 f0 mov %esi,%eax
10e40b: 31 d2 xor %edx,%edx
10e40d: f7 f3 div %ebx
10e40f: 29 d6 sub %edx,%esi
10e411: 89 b5 b0 fd ff ff mov %esi,-0x250(%ebp)
(2*fmt_params->bytes_per_sector
/FAT_DIRENTRY_SIZE));
}
fmt_params->root_dir_sectors =
(((fmt_params->files_per_root_dir * FAT_DIRENTRY_SIZE)
+ fmt_params->bytes_per_sector - 1)
10e417: 8b 85 98 fd ff ff mov -0x268(%ebp),%eax
10e41d: 89 85 38 fd ff ff mov %eax,-0x2c8(%ebp)
10e423: 48 dec %eax
10e424: 89 85 30 fd ff ff mov %eax,-0x2d0(%ebp)
fmt_params->files_per_root_dir -= (fmt_params->files_per_root_dir %
(2*fmt_params->bytes_per_sector
/FAT_DIRENTRY_SIZE));
}
fmt_params->root_dir_sectors =
(((fmt_params->files_per_root_dir * FAT_DIRENTRY_SIZE)
10e42a: 8b 85 b0 fd ff ff mov -0x250(%ebp),%eax
10e430: c1 e0 05 shl $0x5,%eax
+ fmt_params->bytes_per_sector - 1)
10e433: 03 85 30 fd ff ff add -0x2d0(%ebp),%eax
/ fmt_params->bytes_per_sector);
10e439: 31 d2 xor %edx,%edx
10e43b: f7 b5 38 fd ff ff divl -0x2c8(%ebp)
FAT_DIRENTRY_SIZE-1));
fmt_params->files_per_root_dir -= (fmt_params->files_per_root_dir %
(2*fmt_params->bytes_per_sector
/FAT_DIRENTRY_SIZE));
}
fmt_params->root_dir_sectors =
10e441: 89 85 b4 fd ff ff mov %eax,-0x24c(%ebp)
(((fmt_params->files_per_root_dir * FAT_DIRENTRY_SIZE)
+ fmt_params->bytes_per_sector - 1)
/ fmt_params->bytes_per_sector);
}
if (ret_val == 0) {
fatdata_sect_cnt = (fmt_params->totl_sector_cnt -
10e447: 8b bd 9c fd ff ff mov -0x264(%ebp),%edi
10e44d: 2b bd a0 fd ff ff sub -0x260(%ebp),%edi
10e453: 29 c7 sub %eax,%edi
/*
* check values to get legal arrangement of FAT type and cluster count
*/
ret_val = msdos_format_eval_sectors_per_cluster
(fmt_params->fattype,
10e455: 8b 9d a4 fd ff ff mov -0x25c(%ebp),%ebx
fmt_params->bytes_per_sector,
fatdata_sect_cnt,
fmt_params->fat_num,
10e45b: 8b b5 c8 fd ff ff mov -0x238(%ebp),%esi
/*
* check values to get legal arrangement of FAT type and cluster count
*/
ret_val = msdos_format_eval_sectors_per_cluster
(fmt_params->fattype,
10e461: 89 8d 34 fd ff ff mov %ecx,-0x2cc(%ebp)
uint32_t sectors_per_fat;
uint32_t data_cluster_cnt;
/*
* ensure, that maximum cluster size (32KByte) is not exceeded
*/
while (MS_BYTES_PER_CLUSTER_LIMIT / bytes_per_sector < sectors_per_cluster) {
10e467: b8 00 80 00 00 mov $0x8000,%eax
10e46c: 31 d2 xor %edx,%edx
10e46e: f7 b5 38 fd ff ff divl -0x2c8(%ebp)
10e474: eb 02 jmp 10e478 <msdos_format+0x377>
sectors_per_cluster /= 2;
10e476: d1 eb shr %ebx <== NOT EXECUTED
uint32_t sectors_per_fat;
uint32_t data_cluster_cnt;
/*
* ensure, that maximum cluster size (32KByte) is not exceeded
*/
while (MS_BYTES_PER_CLUSTER_LIMIT / bytes_per_sector < sectors_per_cluster) {
10e478: 39 d8 cmp %ebx,%eax
10e47a: 72 fa jb 10e476 <msdos_format+0x375> <== NEVER TAKEN
sectors_per_fat = ((fat_capacity
+ (bytes_per_sector - 1))
/ bytes_per_sector);
data_cluster_cnt = (fatdata_cluster_cnt -
(((sectors_per_fat * fat_num)
10e47c: 89 f2 mov %esi,%edx
10e47e: 0f b6 f2 movzbl %dl,%esi
10e481: 89 b5 2c fd ff ff mov %esi,-0x2d4(%ebp)
* compute number of data clusters for current data:
* - compute cluster count for data AND fat
* - compute storage size for FAT
* - subtract from total cluster count
*/
fatdata_cluster_cnt = fatdata_sec_cnt/sectors_per_cluster;
10e487: 89 f8 mov %edi,%eax
10e489: 31 d2 xor %edx,%edx
10e48b: f7 f3 div %ebx
10e48d: 89 c1 mov %eax,%ecx
if (fattype == FAT_FAT12) {
10e48f: 83 bd 34 fd ff ff 01 cmpl $0x1,-0x2cc(%ebp)
10e496: 75 07 jne 10e49f <msdos_format+0x39e> <== NEVER TAKEN
fat_capacity = fatdata_cluster_cnt * 3 / 2;
10e498: 8d 34 40 lea (%eax,%eax,2),%esi
10e49b: d1 ee shr %esi
10e49d: eb 13 jmp 10e4b2 <msdos_format+0x3b1>
}
else if (fattype == FAT_FAT16) {
fat_capacity = fatdata_cluster_cnt * 2;
}
else { /* FAT32 */
fat_capacity = fatdata_cluster_cnt * 4;
10e49f: 8d 34 85 00 00 00 00 lea 0x0(,%eax,4),%esi <== NOT EXECUTED
*/
fatdata_cluster_cnt = fatdata_sec_cnt/sectors_per_cluster;
if (fattype == FAT_FAT12) {
fat_capacity = fatdata_cluster_cnt * 3 / 2;
}
else if (fattype == FAT_FAT16) {
10e4a6: 83 bd 34 fd ff ff 02 cmpl $0x2,-0x2cc(%ebp) <== NOT EXECUTED
10e4ad: 75 03 jne 10e4b2 <msdos_format+0x3b1> <== NOT EXECUTED
fat_capacity = fatdata_cluster_cnt * 2;
10e4af: 8d 34 00 lea (%eax,%eax,1),%esi <== NOT EXECUTED
else { /* FAT32 */
fat_capacity = fatdata_cluster_cnt * 4;
}
sectors_per_fat = ((fat_capacity
+ (bytes_per_sector - 1))
10e4b2: 8b 85 30 fd ff ff mov -0x2d0(%ebp),%eax
10e4b8: 01 f0 add %esi,%eax
}
else { /* FAT32 */
fat_capacity = fatdata_cluster_cnt * 4;
}
sectors_per_fat = ((fat_capacity
10e4ba: 31 d2 xor %edx,%edx
10e4bc: f7 b5 38 fd ff ff divl -0x2c8(%ebp)
10e4c2: 89 c6 mov %eax,%esi
+ (bytes_per_sector - 1))
/ bytes_per_sector);
data_cluster_cnt = (fatdata_cluster_cnt -
(((sectors_per_fat * fat_num)
10e4c4: 8b 85 2c fd ff ff mov -0x2d4(%ebp),%eax
10e4ca: 0f af c6 imul %esi,%eax
+ (sectors_per_cluster - 1))
10e4cd: 8d 44 03 ff lea -0x1(%ebx,%eax,1),%eax
/ sectors_per_cluster));
10e4d1: 31 d2 xor %edx,%edx
10e4d3: f7 f3 div %ebx
sectors_per_fat = ((fat_capacity
+ (bytes_per_sector - 1))
/ bytes_per_sector);
data_cluster_cnt = (fatdata_cluster_cnt -
10e4d5: 29 c1 sub %eax,%ecx
+ (sectors_per_cluster - 1))
/ sectors_per_cluster));
/*
* data cluster count too big? then make sectors bigger
*/
if (((fattype == FAT_FAT12) && (data_cluster_cnt > FAT_FAT12_MAX_CLN)) ||
10e4d7: 81 f9 f5 0f 00 00 cmp $0xff5,%ecx
10e4dd: 76 09 jbe 10e4e8 <msdos_format+0x3e7> <== ALWAYS TAKEN
10e4df: 83 bd 34 fd ff ff 01 cmpl $0x1,-0x2cc(%ebp) <== NOT EXECUTED
10e4e6: 74 11 je 10e4f9 <msdos_format+0x3f8> <== NOT EXECUTED
10e4e8: 81 f9 f5 ff 00 00 cmp $0xfff5,%ecx
10e4ee: 76 0f jbe 10e4ff <msdos_format+0x3fe> <== ALWAYS TAKEN
10e4f0: 83 bd 34 fd ff ff 02 cmpl $0x2,-0x2cc(%ebp) <== NOT EXECUTED
10e4f7: 75 06 jne 10e4ff <msdos_format+0x3fe> <== NOT EXECUTED
((fattype == FAT_FAT16) && (data_cluster_cnt > FAT_FAT16_MAX_CLN))) {
sectors_per_cluster *= 2;
10e4f9: d1 e3 shl %ebx <== NOT EXECUTED
10e4fb: 31 c0 xor %eax,%eax <== NOT EXECUTED
10e4fd: eb 02 jmp 10e501 <msdos_format+0x400> <== NOT EXECUTED
}
else {
finished = true;
10e4ff: b0 01 mov $0x1,%al
}
/*
* when maximum cluster size is exceeded, we have invalid data, abort...
*/
if ((sectors_per_cluster * bytes_per_sector)
10e501: 8b 95 38 fd ff ff mov -0x2c8(%ebp),%edx
10e507: 0f af d3 imul %ebx,%edx
10e50a: 81 fa 00 80 00 00 cmp $0x8000,%edx
10e510: 77 10 ja 10e522 <msdos_format+0x421> <== NEVER TAKEN
> MS_BYTES_PER_CLUSTER_LIMIT) {
ret_val = EINVAL;
finished = true;
}
} while (!finished);
10e512: 84 c0 test %al,%al
10e514: 0f 84 6d ff ff ff je 10e487 <msdos_format+0x386> <== NEVER TAKEN
if (ret_val != 0) {
rtems_set_errno_and_return_minus_one(ret_val);
}
else {
*sectors_per_cluster_adj = sectors_per_cluster;
*sectors_per_fat_ptr = sectors_per_fat;
10e51a: 89 b5 a8 fd ff ff mov %esi,-0x258(%ebp)
10e520: eb 17 jmp 10e539 <msdos_format+0x438>
finished = true;
}
} while (!finished);
if (ret_val != 0) {
rtems_set_errno_and_return_minus_one(ret_val);
10e522: e8 e9 b2 00 00 call 119810 <__errno> <== NOT EXECUTED
10e527: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
\*=========================================================================*/
{
int ret_val = 0;
uint32_t fatdata_sect_cnt;
uint32_t onebit;
uint32_t sectors_per_cluster_adj = 0;
10e52d: 31 db xor %ebx,%ebx <== NOT EXECUTED
finished = true;
}
} while (!finished);
if (ret_val != 0) {
rtems_set_errno_and_return_minus_one(ret_val);
10e52f: c7 85 3c fd ff ff ff movl $0xffffffff,-0x2c4(%ebp) <== NOT EXECUTED
10e536: ff ff ff
fatdata_sect_cnt,
fmt_params->fat_num,
fmt_params->sectors_per_cluster,
§ors_per_cluster_adj,
&(fmt_params->sectors_per_fat));
fmt_params->sectors_per_cluster = sectors_per_cluster_adj;
10e539: 89 9d a4 fd ff ff mov %ebx,-0x25c(%ebp)
}
/*
* determine media code
*/
if (ret_val == 0) {
10e53f: 83 bd 3c fd ff ff 00 cmpl $0x0,-0x2c4(%ebp)
10e546: 75 5a jne 10e5a2 <msdos_format+0x4a1> <== NEVER TAKEN
if ((rqdata != NULL) &&
10e548: 83 7d 0c 00 cmpl $0x0,0xc(%ebp)
10e54c: 74 4b je 10e599 <msdos_format+0x498>
(rqdata->media != 0)) {
10e54e: 8b 45 0c mov 0xc(%ebp),%eax
10e551: 8a 58 15 mov 0x15(%eax),%bl
/*
* determine media code
*/
if (ret_val == 0) {
if ((rqdata != NULL) &&
10e554: 84 db test %bl,%bl
10e556: 74 41 je 10e599 <msdos_format+0x498> <== ALWAYS TAKEN
(rqdata->media != 0)) {
const char valid_media_codes[] =
10e558: 8d bd e8 fd ff ff lea -0x218(%ebp),%edi <== NOT EXECUTED
10e55e: be ac 85 12 00 mov $0x1285ac,%esi <== NOT EXECUTED
10e563: b9 09 00 00 00 mov $0x9,%ecx <== NOT EXECUTED
10e568: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED
{0xF0,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF};
if (NULL==memchr(valid_media_codes,
10e56a: 56 push %esi <== NOT EXECUTED
10e56b: 6a 09 push $0x9 <== NOT EXECUTED
10e56d: 0f b6 c3 movzbl %bl,%eax <== NOT EXECUTED
10e570: 50 push %eax <== NOT EXECUTED
10e571: 8d 85 e8 fd ff ff lea -0x218(%ebp),%eax <== NOT EXECUTED
10e577: 50 push %eax <== NOT EXECUTED
10e578: e8 c3 ba 00 00 call 11a040 <memchr> <== NOT EXECUTED
10e57d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10e580: 85 c0 test %eax,%eax <== NOT EXECUTED
10e582: 75 0d jne 10e591 <msdos_format+0x490> <== NOT EXECUTED
rqdata->media,
sizeof(valid_media_codes))) {
ret_val = -1;
errno = EINVAL;
10e584: e8 87 b2 00 00 call 119810 <__errno> <== NOT EXECUTED
10e589: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
10e58f: eb 11 jmp 10e5a2 <msdos_format+0x4a1> <== NOT EXECUTED
}
else {
fmt_params->media_code = rqdata->media;
10e591: 88 9d c9 fd ff ff mov %bl,-0x237(%ebp) <== NOT EXECUTED
10e597: eb 13 jmp 10e5ac <msdos_format+0x4ab> <== NOT EXECUTED
}
}
else {
fmt_params->media_code = FAT_BR_MEDIA_FIXED;
10e599: c6 85 c9 fd ff ff f8 movb $0xf8,-0x237(%ebp)
10e5a0: eb 0a jmp 10e5ac <msdos_format+0x4ab>
}
/*
* determine media code
*/
if (ret_val == 0) {
10e5a2: c7 85 3c fd ff ff ff movl $0xffffffff,-0x2c4(%ebp) <== NOT EXECUTED
10e5a9: ff ff ff
}
/*
* determine location and size of root directory
* for formatting
*/
if (fmt_params->root_dir_sectors > 0) {
10e5ac: 8b 9d b4 fd ff ff mov -0x24c(%ebp),%ebx
10e5b2: 85 db test %ebx,%ebx
10e5b4: 8b 8d a0 fd ff ff mov -0x260(%ebp),%ecx
10e5ba: 74 1e je 10e5da <msdos_format+0x4d9> <== NEVER TAKEN
fmt_params->root_dir_start_sec =
fmt_params->rsvd_sector_cnt
+ (fmt_params-> fat_num*fmt_params->sectors_per_fat);
10e5bc: 0f b6 95 c8 fd ff ff movzbl -0x238(%ebp),%edx
10e5c3: 0f af 95 a8 fd ff ff imul -0x258(%ebp),%edx
10e5ca: 01 ca add %ecx,%edx
10e5cc: 89 95 b8 fd ff ff mov %edx,-0x248(%ebp)
fmt_params->root_dir_fmt_sec_cnt = fmt_params->root_dir_sectors;
10e5d2: 89 9d bc fd ff ff mov %ebx,-0x244(%ebp)
10e5d8: eb 22 jmp 10e5fc <msdos_format+0x4fb>
/*
* for FAT32: root directory is in cluster 2
*/
fmt_params->root_dir_start_sec =
fmt_params->rsvd_sector_cnt
+ (fmt_params-> fat_num*fmt_params->sectors_per_fat);
10e5da: 0f b6 85 c8 fd ff ff movzbl -0x238(%ebp),%eax <== NOT EXECUTED
10e5e1: 0f af 85 a8 fd ff ff imul -0x258(%ebp),%eax <== NOT EXECUTED
10e5e8: 01 c8 add %ecx,%eax <== NOT EXECUTED
10e5ea: 89 85 b8 fd ff ff mov %eax,-0x248(%ebp) <== NOT EXECUTED
fmt_params->root_dir_fmt_sec_cnt = fmt_params->sectors_per_cluster;
10e5f0: 8b 85 a4 fd ff ff mov -0x25c(%ebp),%eax <== NOT EXECUTED
10e5f6: 89 85 bc fd ff ff mov %eax,-0x244(%ebp) <== NOT EXECUTED
}
/*
* determine usable OEMName
*/
if (ret_val == 0) {
10e5fc: 83 bd 3c fd ff ff 00 cmpl $0x0,-0x2c4(%ebp)
10e603: 0f 85 44 07 00 00 jne 10ed4d <msdos_format+0xc4c> <== NEVER TAKEN
const char *from;
char *to = fmt_params->OEMName;
int cnt;
from = "RTEMS"; /* default: make "from" point to OS Name */
if ((rqdata != NULL) &&
10e609: 83 7d 0c 00 cmpl $0x0,0xc(%ebp)
10e60d: 74 09 je 10e618 <msdos_format+0x517>
(rqdata->OEMName != NULL)) {
10e60f: 8b 55 0c mov 0xc(%ebp),%edx
10e612: 8b 02 mov (%edx),%eax
if (ret_val == 0) {
const char *from;
char *to = fmt_params->OEMName;
int cnt;
from = "RTEMS"; /* default: make "from" point to OS Name */
if ((rqdata != NULL) &&
10e614: 85 c0 test %eax,%eax
10e616: 75 05 jne 10e61d <msdos_format+0x51c> <== ALWAYS TAKEN
*/
if (ret_val == 0) {
const char *from;
char *to = fmt_params->OEMName;
int cnt;
from = "RTEMS"; /* default: make "from" point to OS Name */
10e618: b8 ac 84 12 00 mov $0x1284ac,%eax
from = rqdata->OEMName;
}
for (cnt = 0;
cnt < (sizeof(fmt_params->OEMName)-1);
cnt++) {
if (isprint((unsigned char)*from)) {
10e61d: 8b 35 d8 62 13 00 mov 0x1362d8,%esi
10e623: bf 09 00 00 00 mov $0x9,%edi
/*
* determine usable OEMName
*/
if (ret_val == 0) {
const char *from;
char *to = fmt_params->OEMName;
10e628: 8d 95 cb fd ff ff lea -0x235(%ebp),%edx
10e62e: eb 21 jmp 10e651 <msdos_format+0x550>
from = rqdata->OEMName;
}
for (cnt = 0;
cnt < (sizeof(fmt_params->OEMName)-1);
cnt++) {
if (isprint((unsigned char)*from)) {
10e630: 8a 08 mov (%eax),%cl
10e632: 0f b6 d9 movzbl %cl,%ebx
10e635: 0f be 5c 1e 01 movsbl 0x1(%esi,%ebx,1),%ebx
10e63a: 80 e3 97 and $0x97,%bl
10e63d: 8d 5a 01 lea 0x1(%edx),%ebx
10e640: 74 07 je 10e649 <msdos_format+0x548>
*to++ = *from++;
10e642: 88 0a mov %cl,(%edx)
10e644: 89 da mov %ebx,%edx
10e646: 40 inc %eax
10e647: eb 05 jmp 10e64e <msdos_format+0x54d>
/*
* non-printable character in given name, so keep stuck
* at that character and replace all following characters
* with a ' '
*/
*to++=' ';
10e649: c6 02 20 movb $0x20,(%edx)
10e64c: 89 da mov %ebx,%edx
}
*to = '\0';
10e64e: c6 03 00 movb $0x0,(%ebx)
from = "RTEMS"; /* default: make "from" point to OS Name */
if ((rqdata != NULL) &&
(rqdata->OEMName != NULL)) {
from = rqdata->OEMName;
}
for (cnt = 0;
10e651: 4f dec %edi
10e652: 75 dc jne 10e630 <msdos_format+0x52f>
10e654: e9 c6 06 00 00 jmp 10ed1f <msdos_format+0xc1e>
const char *from;
char *to = fmt_params->VolLabel;
int cnt;
from = ""; /* default: make "from" point to empty string */
if ((rqdata != NULL) &&
(rqdata->VolLabel != NULL)) {
10e659: 8b 4d 0c mov 0xc(%ebp),%ecx
10e65c: 8b 41 04 mov 0x4(%ecx),%eax
if (ret_val == 0) {
const char *from;
char *to = fmt_params->VolLabel;
int cnt;
from = ""; /* default: make "from" point to empty string */
if ((rqdata != NULL) &&
10e65f: 85 c0 test %eax,%eax
10e661: 74 09 je 10e66c <msdos_format+0x56b> <== NEVER TAKEN
(rqdata->VolLabel != NULL)) {
from = rqdata->VolLabel;
fmt_params->VolLabel_present = true;
10e663: c6 85 e0 fd ff ff 01 movb $0x1,-0x220(%ebp)
10e66a: eb 05 jmp 10e671 <msdos_format+0x570>
*/
if (ret_val == 0) {
const char *from;
char *to = fmt_params->VolLabel;
int cnt;
from = ""; /* default: make "from" point to empty string */
10e66c: b8 4d 81 12 00 mov $0x12814d,%eax
fmt_params->VolLabel_present = true;
}
for (cnt = 0;
cnt < (sizeof(fmt_params->VolLabel)-1);
cnt++) {
if (isprint((unsigned char)*from)) {
10e671: 8b 35 d8 62 13 00 mov 0x1362d8,%esi
10e677: bf 0c 00 00 00 mov $0xc,%edi
/*
* determine usable Volume Label
*/
if (ret_val == 0) {
const char *from;
char *to = fmt_params->VolLabel;
10e67c: 8d 95 d4 fd ff ff lea -0x22c(%ebp),%edx
10e682: eb 21 jmp 10e6a5 <msdos_format+0x5a4>
fmt_params->VolLabel_present = true;
}
for (cnt = 0;
cnt < (sizeof(fmt_params->VolLabel)-1);
cnt++) {
if (isprint((unsigned char)*from)) {
10e684: 8a 08 mov (%eax),%cl
10e686: 0f b6 d9 movzbl %cl,%ebx
10e689: 0f be 5c 1e 01 movsbl 0x1(%esi,%ebx,1),%ebx
10e68e: 80 e3 97 and $0x97,%bl
10e691: 8d 5a 01 lea 0x1(%edx),%ebx
10e694: 74 07 je 10e69d <msdos_format+0x59c>
*to++ = *from++;
10e696: 88 0a mov %cl,(%edx)
10e698: 89 da mov %ebx,%edx
10e69a: 40 inc %eax
10e69b: eb 05 jmp 10e6a2 <msdos_format+0x5a1>
/*
* non-printable character in given name, so keep stuck
* at that character and replace all following characters
* with a ' '
*/
*to++=' ';
10e69d: c6 02 20 movb $0x20,(%edx)
10e6a0: 89 da mov %ebx,%edx
}
*to = '\0';
10e6a2: c6 03 00 movb $0x0,(%ebx)
if ((rqdata != NULL) &&
(rqdata->VolLabel != NULL)) {
from = rqdata->VolLabel;
fmt_params->VolLabel_present = true;
}
for (cnt = 0;
10e6a5: 4f dec %edi
10e6a6: 75 dc jne 10e684 <msdos_format+0x583>
10e6a8: e9 81 06 00 00 jmp 10ed2e <msdos_format+0xc2d>
int rc;
struct timeval time_value;
rc = rtems_clock_get_tod_timeval(&time_value);
if (rc == RTEMS_SUCCESSFUL) {
*volid_ptr = time_value.tv_sec + time_value.tv_sec;
10e6ad: 8b 85 e8 fd ff ff mov -0x218(%ebp),%eax <== NOT EXECUTED
10e6b3: d1 e0 shl %eax <== NOT EXECUTED
10e6b5: eb 05 jmp 10e6bc <msdos_format+0x5bb> <== NOT EXECUTED
}
else {
*volid_ptr = rand();
10e6b7: e8 5c bb 00 00 call 11a218 <rand>
10e6bc: 89 85 e4 fd ff ff mov %eax,-0x21c(%ebp)
ret_val = msdos_format_determine_fmt_params(fd,rqdata,&fmt_params);
}
/*
* if requested, write whole disk/partition with 0xe5
*/
if ((ret_val == 0) &&
10e6c2: 83 bd 44 fd ff ff 00 cmpl $0x0,-0x2bc(%ebp)
10e6c9: 75 6e jne 10e739 <msdos_format+0x638> <== NEVER TAKEN
10e6cb: 83 7d 0c 00 cmpl $0x0,0xc(%ebp)
10e6cf: 74 68 je 10e739 <msdos_format+0x638>
(rqdata != NULL) &&
10e6d1: 8b 45 0c mov 0xc(%ebp),%eax
10e6d4: 80 78 16 00 cmpb $0x0,0x16(%eax)
10e6d8: 74 37 je 10e711 <msdos_format+0x610> <== ALWAYS TAKEN
*/
if (ret_val == 0) {
/*
* Read the current MBR to obtain the partition table.
*/
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
10e6da: 53 push %ebx
10e6db: 68 44 85 12 00 push $0x128544
10e6e0: 6a 02 push $0x2
10e6e2: ff 75 0c pushl 0xc(%ebp)
10e6e5: e8 92 f8 ff ff call 10df7c <msdos_format_printf>
"read MRB sector\n");
ret_val = msdos_format_read_sec(fd,
10e6ea: 8b 9d 98 fd ff ff mov -0x268(%ebp),%ebx
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
int ret_val = 0;
if (0 > lseek(fd,((off_t)start_sector)*sector_size,SEEK_SET)) {
10e6f0: 6a 00 push $0x0
10e6f2: 6a 00 push $0x0
10e6f4: 6a 00 push $0x0
10e6f6: ff b5 40 fd ff ff pushl -0x2c0(%ebp)
10e6fc: e8 63 8e ff ff call 107564 <lseek>
10e701: 83 c4 20 add $0x20,%esp
10e704: 85 d2 test %edx,%edx
10e706: 0f 89 5d 06 00 00 jns 10ed69 <msdos_format+0xc68> <== ALWAYS TAKEN
10e70c: e9 9f 06 00 00 jmp 10edb0 <msdos_format+0xcaf> <== NOT EXECUTED
* if requested, write whole disk/partition with 0xe5
*/
if ((ret_val == 0) &&
(rqdata != NULL) &&
!(rqdata->quick_format)) {
ret_val = msdos_format_fill_sectors
10e711: 51 push %ecx
10e712: 6a e5 push $0xffffffe5
10e714: ff b5 98 fd ff ff pushl -0x268(%ebp)
10e71a: ff b5 9c fd ff ff pushl -0x264(%ebp)
10e720: 31 c9 xor %ecx,%ecx
10e722: 8b 95 40 fd ff ff mov -0x2c0(%ebp),%edx
10e728: 8b 45 0c mov 0xc(%ebp),%eax
10e72b: e8 c7 f8 ff ff call 10dff7 <msdos_format_fill_sectors>
10e730: 89 85 44 fd ff ff mov %eax,-0x2bc(%ebp)
10e736: 83 c4 10 add $0x10,%esp
}
/*
* create master boot record
*/
if (ret_val == 0) {
10e739: 83 bd 44 fd ff ff 00 cmpl $0x0,-0x2bc(%ebp)
10e740: 0f 85 2d 05 00 00 jne 10ec73 <msdos_format+0xb72> <== NEVER TAKEN
10e746: eb 92 jmp 10e6da <msdos_format+0x5d9>
{
uint32_t total_sectors_num16 = 0;
uint32_t total_sectors_num32 = 0;
/* store total sector count in either 16 or 32 bit field in mbr */
if (fmt_params->totl_sector_cnt < 0x10000) {
10e748: 89 d3 mov %edx,%ebx
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
uint32_t total_sectors_num16 = 0;
uint32_t total_sectors_num32 = 0;
10e74a: 31 d2 xor %edx,%edx
fmt_params.bytes_per_sector,
tmp_sec);
if (ret_val == 0) {
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
"generate MRB sector\n");
ret_val = msdos_format_gen_mbr(tmp_sec,&fmt_params);
10e74c: 8d b5 e8 fd ff ff lea -0x218(%ebp),%esi
* finally we are there: let's fill in the values into the MBR
* but first clear the MRB leaving the partition table.
*/
#define RTEMS_IDE_PARTITION_TABLE_OFFSET 0x1be
#define RTEMS_IDE_PARTITION_TABLE_SIZE (4 * 16)
memset(mbr,0,RTEMS_IDE_PARTITION_TABLE_OFFSET);
10e752: 89 f7 mov %esi,%edi
10e754: b9 be 01 00 00 mov $0x1be,%ecx
10e759: 31 c0 xor %eax,%eax
10e75b: f3 aa rep stos %al,%es:(%edi)
10e75d: 89 8d 44 fd ff ff mov %ecx,-0x2bc(%ebp)
memset(mbr + RTEMS_IDE_PARTITION_TABLE_OFFSET + RTEMS_IDE_PARTITION_TABLE_SIZE,
10e763: 66 c7 45 e6 00 00 movw $0x0,-0x1a(%ebp)
* with 0xEB,....
*/
/*
* fill OEMName
*/
memcpy(FAT_GET_ADDR_BR_OEMNAME(mbr),
10e769: 8b 85 cb fd ff ff mov -0x235(%ebp),%eax
10e76f: 89 85 eb fd ff ff mov %eax,-0x215(%ebp)
10e775: 8b 85 cf fd ff ff mov -0x231(%ebp),%eax
10e77b: 89 85 ef fd ff ff mov %eax,-0x211(%ebp)
fmt_params->OEMName,
FAT_BR_OEMNAME_SIZE);
FAT_SET_BR_BYTES_PER_SECTOR(mbr , fmt_params->bytes_per_sector);
10e781: 8b 85 98 fd ff ff mov -0x268(%ebp),%eax
10e787: 88 85 f3 fd ff ff mov %al,-0x20d(%ebp)
10e78d: c1 e8 08 shr $0x8,%eax
10e790: 88 85 f4 fd ff ff mov %al,-0x20c(%ebp)
FAT_SET_BR_SECTORS_PER_CLUSTER(mbr , fmt_params->sectors_per_cluster);
10e796: 8b 85 a4 fd ff ff mov -0x25c(%ebp),%eax
10e79c: 88 85 f5 fd ff ff mov %al,-0x20b(%ebp)
FAT_SET_BR_RESERVED_SECTORS_NUM(mbr, fmt_params->rsvd_sector_cnt);
10e7a2: 8b 85 a0 fd ff ff mov -0x260(%ebp),%eax
10e7a8: 88 85 f6 fd ff ff mov %al,-0x20a(%ebp)
10e7ae: c1 e8 08 shr $0x8,%eax
10e7b1: 88 85 f7 fd ff ff mov %al,-0x209(%ebp)
/* number of FATs on medium */
FAT_SET_BR_FAT_NUM(mbr , 2); /* standard/recommended value */
10e7b7: c6 85 f8 fd ff ff 02 movb $0x2,-0x208(%ebp)
FAT_SET_BR_FILES_PER_ROOT_DIR(mbr , fmt_params->files_per_root_dir);
10e7be: 8b 85 b0 fd ff ff mov -0x250(%ebp),%eax
10e7c4: 88 85 f9 fd ff ff mov %al,-0x207(%ebp)
10e7ca: c1 e8 08 shr $0x8,%eax
10e7cd: 88 85 fa fd ff ff mov %al,-0x206(%ebp)
FAT_SET_BR_TOTAL_SECTORS_NUM16(mbr , total_sectors_num16);
10e7d3: 88 9d fb fd ff ff mov %bl,-0x205(%ebp)
10e7d9: c1 eb 08 shr $0x8,%ebx
10e7dc: 88 9d fc fd ff ff mov %bl,-0x204(%ebp)
FAT_SET_BR_MEDIA(mbr , fmt_params->media_code);
10e7e2: 8a 85 c9 fd ff ff mov -0x237(%ebp),%al
10e7e8: 88 85 fd fd ff ff mov %al,-0x203(%ebp)
FAT_SET_BR_SECTORS_PER_TRACK(mbr , 255); /* only needed for INT13... */
10e7ee: c6 85 00 fe ff ff ff movb $0xff,-0x200(%ebp)
FAT_SET_BR_NUMBER_OF_HEADS(mbr , 6); /* only needed for INT13... */
10e7f5: c6 85 02 fe ff ff 06 movb $0x6,-0x1fe(%ebp)
FAT_SET_BR_HIDDEN_SECTORS(mbr , 1); /* only needed for INT13... */
10e7fc: c6 85 04 fe ff ff 01 movb $0x1,-0x1fc(%ebp)
FAT_SET_BR_TOTAL_SECTORS_NUM32(mbr , total_sectors_num32);
10e803: 88 95 08 fe ff ff mov %dl,-0x1f8(%ebp)
10e809: 0f b6 c6 movzbl %dh,%eax
10e80c: 88 85 09 fe ff ff mov %al,-0x1f7(%ebp)
10e812: 89 d0 mov %edx,%eax
10e814: c1 e8 10 shr $0x10,%eax
10e817: 88 85 0a fe ff ff mov %al,-0x1f6(%ebp)
10e81d: c1 ea 18 shr $0x18,%edx
10e820: 88 95 0b fe ff ff mov %dl,-0x1f5(%ebp)
if (fmt_params->fattype != FAT_FAT32) {
10e826: 8a 95 ca fd ff ff mov -0x236(%ebp),%dl
10e82c: 80 fa 04 cmp $0x4,%dl
10e82f: 8b 85 a8 fd ff ff mov -0x258(%ebp),%eax
10e835: 74 78 je 10e8af <msdos_format+0x7ae> <== NEVER TAKEN
FAT_SET_BR_SECTORS_PER_FAT(mbr ,fmt_params->sectors_per_fat);
10e837: 88 85 fe fd ff ff mov %al,-0x202(%ebp)
10e83d: c1 e8 08 shr $0x8,%eax
10e840: 88 85 ff fd ff ff mov %al,-0x201(%ebp)
FAT_SET_BR_DRVNUM(mbr , 0); /* only needed for INT13... */
FAT_SET_BR_RSVD1(mbr , 0); /* fill with zero */
FAT_SET_BR_BOOTSIG(mbr , FAT_BR_BOOTSIG_VAL);
10e846: c6 85 0e fe ff ff 29 movb $0x29,-0x1f2(%ebp)
FAT_SET_BR_VOLID(mbr , fmt_params->vol_id); /* volume id */
10e84d: 8b 85 e4 fd ff ff mov -0x21c(%ebp),%eax
10e853: 88 85 0f fe ff ff mov %al,-0x1f1(%ebp)
10e859: 0f b6 cc movzbl %ah,%ecx
10e85c: 88 8d 10 fe ff ff mov %cl,-0x1f0(%ebp)
10e862: 89 c1 mov %eax,%ecx
10e864: c1 e9 10 shr $0x10,%ecx
10e867: 88 8d 11 fe ff ff mov %cl,-0x1ef(%ebp)
10e86d: c1 e8 18 shr $0x18,%eax
10e870: 88 85 12 fe ff ff mov %al,-0x1ee(%ebp)
memcpy(FAT_GET_ADDR_BR_VOLLAB(mbr),
10e876: 8d 85 13 fe ff ff lea -0x1ed(%ebp),%eax
fmt_params->VolLabel,
10e87c: 8d b5 d4 fd ff ff lea -0x22c(%ebp),%esi
FAT_SET_BR_SECTORS_PER_FAT(mbr ,fmt_params->sectors_per_fat);
FAT_SET_BR_DRVNUM(mbr , 0); /* only needed for INT13... */
FAT_SET_BR_RSVD1(mbr , 0); /* fill with zero */
FAT_SET_BR_BOOTSIG(mbr , FAT_BR_BOOTSIG_VAL);
FAT_SET_BR_VOLID(mbr , fmt_params->vol_id); /* volume id */
memcpy(FAT_GET_ADDR_BR_VOLLAB(mbr),
10e882: b9 0b 00 00 00 mov $0xb,%ecx
10e887: 89 c7 mov %eax,%edi
10e889: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
fmt_params->VolLabel,
FAT_BR_VOLLAB_SIZE);
memcpy(FAT_GET_ADDR_BR_FILSYSTYPE(mbr),
10e88b: b8 bb 84 12 00 mov $0x1284bb,%eax
10e890: fe ca dec %dl
10e892: 75 05 jne 10e899 <msdos_format+0x798> <== NEVER TAKEN
10e894: b8 b2 84 12 00 mov $0x1284b2,%eax
10e899: 8b 10 mov (%eax),%edx
10e89b: 89 95 1e fe ff ff mov %edx,-0x1e2(%ebp)
10e8a1: 8b 40 04 mov 0x4(%eax),%eax
10e8a4: 89 85 22 fe ff ff mov %eax,-0x1de(%ebp)
10e8aa: e9 84 00 00 00 jmp 10e933 <msdos_format+0x832>
? "FAT12 "
: "FAT16 ",
FAT_BR_FILSYSTYPE_SIZE);
}
else {
FAT_SET_BR_SECTORS_PER_FAT32(mbr ,fmt_params->sectors_per_fat);
10e8af: 88 85 0c fe ff ff mov %al,-0x1f4(%ebp) <== NOT EXECUTED
10e8b5: 0f b6 d4 movzbl %ah,%edx <== NOT EXECUTED
10e8b8: 88 95 0d fe ff ff mov %dl,-0x1f3(%ebp) <== NOT EXECUTED
10e8be: 89 c2 mov %eax,%edx <== NOT EXECUTED
10e8c0: c1 ea 10 shr $0x10,%edx <== NOT EXECUTED
10e8c3: 88 95 0e fe ff ff mov %dl,-0x1f2(%ebp) <== NOT EXECUTED
10e8c9: c1 e8 18 shr $0x18,%eax <== NOT EXECUTED
10e8cc: 88 85 0f fe ff ff mov %al,-0x1f1(%ebp) <== NOT EXECUTED
FAT_SET_BR_EXT_FLAGS(mbr , 0);
FAT_SET_BR_FSVER(mbr , 0); /* FAT32 Version:0.0 */
FAT_SET_BR_FAT32_ROOT_CLUSTER(mbr , 2); /* put root dir to cluster 2 */
10e8d2: c6 85 14 fe ff ff 02 movb $0x2,-0x1ec(%ebp) <== NOT EXECUTED
FAT_SET_BR_FAT32_FS_INFO_SECTOR(mbr, 1); /* Put fsinfo to rsrvd sec 1*/
10e8d9: c6 85 18 fe ff ff 01 movb $0x1,-0x1e8(%ebp) <== NOT EXECUTED
FAT_SET_BR_FAT32_BK_BOOT_SECTOR(mbr, fmt_params->mbr_copy_sec ); /* Put MBR copy to rsrvd sec */
10e8e0: 8b 85 c0 fd ff ff mov -0x240(%ebp),%eax <== NOT EXECUTED
10e8e6: 88 85 1a fe ff ff mov %al,-0x1e6(%ebp) <== NOT EXECUTED
10e8ec: c1 e8 08 shr $0x8,%eax <== NOT EXECUTED
10e8ef: 88 85 1b fe ff ff mov %al,-0x1e5(%ebp) <== NOT EXECUTED
memset(FAT_GET_ADDR_BR_FAT32_RESERVED(mbr),0,FAT_BR_FAT32_RESERVED_SIZE);
10e8f5: 8d 95 1c fe ff ff lea -0x1e4(%ebp),%edx <== NOT EXECUTED
10e8fb: b9 03 00 00 00 mov $0x3,%ecx <== NOT EXECUTED
10e900: 89 d7 mov %edx,%edi <== NOT EXECUTED
10e902: 8b 85 44 fd ff ff mov -0x2bc(%ebp),%eax <== NOT EXECUTED
10e908: f3 ab rep stos %eax,%es:(%edi) <== NOT EXECUTED
FAT_SET_BR_FAT32_DRVNUM(mbr , 0); /* only needed for INT13... */
FAT_SET_BR_FAT32_RSVD1(mbr , 0); /* fill with zero */
FAT_SET_BR_FAT32_BOOTSIG(mbr ,FAT_BR_FAT32_BOOTSIG_VAL);
10e90a: c6 85 2a fe ff ff 29 movb $0x29,-0x1d6(%ebp) <== NOT EXECUTED
FAT_SET_BR_FAT32_VOLID(mbr , 0); /* not set */
memset(FAT_GET_ADDR_BR_FAT32_VOLLAB(mbr) ,0,FAT_BR_VOLLAB_SIZE);
10e911: 8d 95 2f fe ff ff lea -0x1d1(%ebp),%edx <== NOT EXECUTED
10e917: b1 0b mov $0xb,%cl <== NOT EXECUTED
10e919: 89 d7 mov %edx,%edi <== NOT EXECUTED
10e91b: 31 c0 xor %eax,%eax <== NOT EXECUTED
10e91d: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED
memcpy(FAT_GET_ADDR_BR_FAT32_FILSYSTYPE(mbr),
10e91f: c7 85 3a fe ff ff 46 movl $0x33544146,-0x1c6(%ebp) <== NOT EXECUTED
10e926: 41 54 33
10e929: c7 85 3e fe ff ff 32 movl $0x20202032,-0x1c2(%ebp) <== NOT EXECUTED
10e930: 20 20 20
FAT_BR_FILSYSTYPE_SIZE);
}
/*
* add boot record signature
*/
FAT_SET_BR_SIGNATURE(mbr, FAT_BR_SIGNATURE_VAL);
10e933: c6 45 e6 55 movb $0x55,-0x1a(%ebp)
10e937: c6 45 e7 aa movb $0xaa,-0x19(%ebp)
/*
* add jump to boot loader at start of sector
*/
FAT_SET_VAL8(mbr,0,0xeb);
10e93b: c6 85 e8 fd ff ff eb movb $0xeb,-0x218(%ebp)
FAT_SET_VAL8(mbr,1,0x3c);
10e942: c6 85 e9 fd ff ff 3c movb $0x3c,-0x217(%ebp)
FAT_SET_VAL8(mbr,2,0x90);
10e949: c6 85 ea fd ff ff 90 movb $0x90,-0x216(%ebp)
/*
* write master boot record to disk
* also write copy of MBR to disk
*/
if (ret_val == 0) {
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
10e950: 52 push %edx
10e951: 68 55 85 12 00 push $0x128555
10e956: 6a 02 push $0x2
10e958: ff 75 0c pushl 0xc(%ebp)
10e95b: e8 1c f6 ff ff call 10df7c <msdos_format_printf>
"write MRB sector\n");
ret_val = msdos_format_write_sec(fd,
0,
fmt_params.bytes_per_sector,
tmp_sec);
10e960: 8d 9d e8 fd ff ff lea -0x218(%ebp),%ebx
* also write copy of MBR to disk
*/
if (ret_val == 0) {
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
"write MRB sector\n");
ret_val = msdos_format_write_sec(fd,
10e966: 89 1c 24 mov %ebx,(%esp)
10e969: 8b 8d 98 fd ff ff mov -0x268(%ebp),%ecx
10e96f: 31 d2 xor %edx,%edx
10e971: 8b 85 40 fd ff ff mov -0x2c0(%ebp),%eax
10e977: e8 3d f6 ff ff call 10dfb9 <msdos_format_write_sec>
10e97c: 89 85 44 fd ff ff mov %eax,-0x2bc(%ebp)
0,
fmt_params.bytes_per_sector,
tmp_sec);
}
if ((ret_val == 0) &&
10e982: 83 c4 10 add $0x10,%esp
10e985: 85 c0 test %eax,%eax
10e987: 0f 85 e6 02 00 00 jne 10ec73 <msdos_format+0xb72> <== NEVER TAKEN
10e98d: 83 bd c0 fd ff ff 00 cmpl $0x0,-0x240(%ebp)
10e994: 75 10 jne 10e9a6 <msdos_format+0x8a5> <== NEVER TAKEN
}
/*
* for FAT32: initialize info sector on disk
*/
if ((ret_val == 0) &&
(fmt_params.fsinfo_sec != 0)) {
10e996: 8b 95 c4 fd ff ff mov -0x23c(%ebp),%edx
}
}
/*
* for FAT32: initialize info sector on disk
*/
if ((ret_val == 0) &&
10e99c: 85 d2 test %edx,%edx
10e99e: 0f 84 c9 00 00 00 je 10ea6d <msdos_format+0x96c> <== ALWAYS TAKEN
10e9a4: eb 3c jmp 10e9e2 <msdos_format+0x8e1> <== NOT EXECUTED
if ((ret_val == 0) &&
(fmt_params.mbr_copy_sec != 0)) {
/*
* write copy of MBR
*/
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
10e9a6: 50 push %eax <== NOT EXECUTED
10e9a7: 68 67 85 12 00 push $0x128567 <== NOT EXECUTED
10e9ac: 6a 02 push $0x2 <== NOT EXECUTED
10e9ae: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
10e9b1: e8 c6 f5 ff ff call 10df7c <msdos_format_printf> <== NOT EXECUTED
"write back up MRB sector\n");
ret_val = msdos_format_write_sec(fd,
10e9b6: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED
10e9b9: 8b 8d 98 fd ff ff mov -0x268(%ebp),%ecx <== NOT EXECUTED
10e9bf: 8b 95 c0 fd ff ff mov -0x240(%ebp),%edx <== NOT EXECUTED
10e9c5: 8b 85 40 fd ff ff mov -0x2c0(%ebp),%eax <== NOT EXECUTED
10e9cb: e8 e9 f5 ff ff call 10dfb9 <msdos_format_write_sec><== NOT EXECUTED
10e9d0: 89 85 44 fd ff ff mov %eax,-0x2bc(%ebp) <== NOT EXECUTED
}
}
/*
* for FAT32: initialize info sector on disk
*/
if ((ret_val == 0) &&
10e9d6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10e9d9: 85 c0 test %eax,%eax <== NOT EXECUTED
10e9db: 74 b9 je 10e996 <msdos_format+0x895> <== NOT EXECUTED
10e9dd: e9 91 02 00 00 jmp 10ec73 <msdos_format+0xb72> <== NOT EXECUTED
(fmt_params.fsinfo_sec != 0)) {
ret_val = msdos_format_gen_fsinfo(tmp_sec);
10e9e2: 8d 9d e8 fd ff ff lea -0x218(%ebp),%ebx <== NOT EXECUTED
\*=========================================================================*/
{
/*
* clear fsinfo sector data
*/
memset(fsinfo,0,FAT_TOTAL_FSINFO_SIZE);
10e9e8: b9 80 00 00 00 mov $0x80,%ecx <== NOT EXECUTED
10e9ed: 31 c0 xor %eax,%eax <== NOT EXECUTED
10e9ef: 89 df mov %ebx,%edi <== NOT EXECUTED
10e9f1: f3 ab rep stos %eax,%es:(%edi) <== NOT EXECUTED
/*
* write LEADSIG, STRUCTSIG, TRAILSIG
*/
FAT_SET_FSINFO_LEAD_SIGNATURE (fsinfo,FAT_FSINFO_LEAD_SIGNATURE_VALUE );
10e9f3: c6 85 e8 fd ff ff 52 movb $0x52,-0x218(%ebp) <== NOT EXECUTED
10e9fa: c6 85 e9 fd ff ff 52 movb $0x52,-0x217(%ebp) <== NOT EXECUTED
10ea01: c6 85 ea fd ff ff 61 movb $0x61,-0x216(%ebp) <== NOT EXECUTED
10ea08: c6 85 eb fd ff ff 41 movb $0x41,-0x215(%ebp) <== NOT EXECUTED
FAT_SET_FSINFO_STRUC_SIGNATURE(fsinfo,FAT_FSINFO_STRUC_SIGNATURE_VALUE);
10ea0f: c6 45 cc 72 movb $0x72,-0x34(%ebp) <== NOT EXECUTED
10ea13: c6 45 cd 72 movb $0x72,-0x33(%ebp) <== NOT EXECUTED
10ea17: c6 45 ce 41 movb $0x41,-0x32(%ebp) <== NOT EXECUTED
10ea1b: c6 45 cf 61 movb $0x61,-0x31(%ebp) <== NOT EXECUTED
FAT_SET_FSINFO_TRAIL_SIGNATURE(fsinfo,FAT_FSINFO_TRAIL_SIGNATURE_VALUE);
10ea1f: c6 45 e6 55 movb $0x55,-0x1a(%ebp) <== NOT EXECUTED
10ea23: c6 45 e7 aa movb $0xaa,-0x19(%ebp) <== NOT EXECUTED
/*
* write "empty" values for free cluster count and next cluster number
*/
FAT_SET_FSINFO_FREE_CLUSTER_COUNT(fsinfo+FAT_FSI_INFO,
10ea27: c6 45 d0 ff movb $0xff,-0x30(%ebp) <== NOT EXECUTED
10ea2b: c6 45 d1 ff movb $0xff,-0x2f(%ebp) <== NOT EXECUTED
10ea2f: c6 45 d2 ff movb $0xff,-0x2e(%ebp) <== NOT EXECUTED
10ea33: c6 45 d3 ff movb $0xff,-0x2d(%ebp) <== NOT EXECUTED
0xffffffff);
FAT_SET_FSINFO_NEXT_FREE_CLUSTER (fsinfo+FAT_FSI_INFO,
10ea37: c6 45 d4 ff movb $0xff,-0x2c(%ebp) <== NOT EXECUTED
10ea3b: c6 45 d5 ff movb $0xff,-0x2b(%ebp) <== NOT EXECUTED
10ea3f: c6 45 d6 ff movb $0xff,-0x2a(%ebp) <== NOT EXECUTED
10ea43: c6 45 d7 ff movb $0xff,-0x29(%ebp) <== NOT EXECUTED
/*
* write fsinfo sector
*/
if ((ret_val == 0) &&
(fmt_params.fsinfo_sec != 0)) {
ret_val = msdos_format_write_sec(fd,
10ea47: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10ea4a: 53 push %ebx <== NOT EXECUTED
10ea4b: 8b 8d 98 fd ff ff mov -0x268(%ebp),%ecx <== NOT EXECUTED
10ea51: 8b 85 40 fd ff ff mov -0x2c0(%ebp),%eax <== NOT EXECUTED
10ea57: e8 5d f5 ff ff call 10dfb9 <msdos_format_write_sec><== NOT EXECUTED
10ea5c: 89 85 44 fd ff ff mov %eax,-0x2bc(%ebp) <== NOT EXECUTED
}
/*
* write FAT as all empty
* -> write all FAT sectors as zero
*/
if (ret_val == 0) {
10ea62: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10ea65: 85 c0 test %eax,%eax <== NOT EXECUTED
10ea67: 0f 85 06 02 00 00 jne 10ec73 <msdos_format+0xb72> <== NOT EXECUTED
ret_val = msdos_format_fill_sectors
10ea6d: 50 push %eax
10ea6e: 6a 00 push $0x0
10ea70: ff b5 98 fd ff ff pushl -0x268(%ebp)
(rqdata,
10ea76: 0f b6 85 c8 fd ff ff movzbl -0x238(%ebp),%eax
10ea7d: 0f af 85 a8 fd ff ff imul -0x258(%ebp),%eax
/*
* write FAT as all empty
* -> write all FAT sectors as zero
*/
if (ret_val == 0) {
ret_val = msdos_format_fill_sectors
10ea84: 50 push %eax
10ea85: 8b 8d a0 fd ff ff mov -0x260(%ebp),%ecx
10ea8b: 8b 95 40 fd ff ff mov -0x2c0(%ebp),%edx
10ea91: 8b 45 0c mov 0xc(%ebp),%eax
10ea94: e8 5e f5 ff ff call 10dff7 <msdos_format_fill_sectors>
10ea99: 89 85 44 fd ff ff mov %eax,-0x2bc(%ebp)
}
/*
* clear/init root directory
* -> write all directory sectors as 0x00
*/
if (ret_val == 0) {
10ea9f: 83 c4 10 add $0x10,%esp
10eaa2: 85 c0 test %eax,%eax
10eaa4: 0f 85 c9 01 00 00 jne 10ec73 <msdos_format+0xb72> <== NEVER TAKEN
ret_val = msdos_format_fill_sectors
10eaaa: 50 push %eax
10eaab: 6a 00 push $0x0
10eaad: ff b5 98 fd ff ff pushl -0x268(%ebp)
10eab3: ff b5 bc fd ff ff pushl -0x244(%ebp)
10eab9: 8b 8d b8 fd ff ff mov -0x248(%ebp),%ecx
10eabf: 8b 95 40 fd ff ff mov -0x2c0(%ebp),%edx
10eac5: 8b 45 0c mov 0xc(%ebp),%eax
10eac8: e8 2a f5 ff ff call 10dff7 <msdos_format_fill_sectors>
10eacd: 89 85 44 fd ff ff mov %eax,-0x2bc(%ebp)
0x00);
}
/*
* write volume label to first entry of directory
*/
if ((ret_val == 0) && fmt_params.VolLabel_present) {
10ead3: 83 c4 10 add $0x10,%esp
10ead6: 85 c0 test %eax,%eax
10ead8: 0f 85 95 01 00 00 jne 10ec73 <msdos_format+0xb72> <== NEVER TAKEN
10eade: 80 bd e0 fd ff ff 00 cmpb $0x0,-0x220(%ebp)
10eae5: 75 0f jne 10eaf6 <msdos_format+0x9f5>
/*
* write FAT entry 0 as (0xffffff00|Media_type)EOC,
* write FAT entry 1 as EOC
* allocate directory in a FAT32 FS
*/
if ((ret_val == 0) && fmt_params.VolLabel_present){
10eae7: 80 bd e0 fd ff ff 00 cmpb $0x0,-0x220(%ebp)
10eaee: 0f 84 7f 01 00 00 je 10ec73 <msdos_format+0xb72>
10eaf4: eb 55 jmp 10eb4b <msdos_format+0xa4a>
}
/*
* write volume label to first entry of directory
*/
if ((ret_val == 0) && fmt_params.VolLabel_present) {
memset(tmp_sec,0,sizeof(tmp_sec));
10eaf6: 8d 95 e8 fd ff ff lea -0x218(%ebp),%edx
10eafc: b9 80 00 00 00 mov $0x80,%ecx
10eb01: 89 d7 mov %edx,%edi
10eb03: 8b 85 44 fd ff ff mov -0x2bc(%ebp),%eax
10eb09: f3 ab rep stos %eax,%es:(%edi)
memcpy(MSDOS_DIR_NAME(tmp_sec),fmt_params.VolLabel,MSDOS_SHORT_NAME_LEN);
10eb0b: 8d b5 d4 fd ff ff lea -0x22c(%ebp),%esi
10eb11: b1 0b mov $0xb,%cl
10eb13: 89 d7 mov %edx,%edi
10eb15: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
*MSDOS_DIR_ATTR(tmp_sec) = MSDOS_ATTR_VOLUME_ID;
10eb17: c6 85 f3 fd ff ff 08 movb $0x8,-0x20d(%ebp)
ret_val = msdos_format_write_sec
10eb1e: 83 ec 0c sub $0xc,%esp
10eb21: 52 push %edx
10eb22: 8b 8d 98 fd ff ff mov -0x268(%ebp),%ecx
10eb28: 8b 95 b8 fd ff ff mov -0x248(%ebp),%edx
10eb2e: 8b 85 40 fd ff ff mov -0x2c0(%ebp),%eax
10eb34: e8 80 f4 ff ff call 10dfb9 <msdos_format_write_sec>
/*
* write FAT entry 0 as (0xffffff00|Media_type)EOC,
* write FAT entry 1 as EOC
* allocate directory in a FAT32 FS
*/
if ((ret_val == 0) && fmt_params.VolLabel_present){
10eb39: 83 c4 10 add $0x10,%esp
10eb3c: 85 c0 test %eax,%eax
10eb3e: 74 a7 je 10eae7 <msdos_format+0x9e6> <== ALWAYS TAKEN
10eb40: 89 85 44 fd ff ff mov %eax,-0x2bc(%ebp) <== NOT EXECUTED
10eb46: e9 28 01 00 00 jmp 10ec73 <msdos_format+0xb72> <== NOT EXECUTED
/*
* empty sector: all clusters are free/do not link further on
*/
memset(tmp_sec,0,sizeof(tmp_sec));
10eb4b: 8d 95 e8 fd ff ff lea -0x218(%ebp),%edx
10eb51: b9 80 00 00 00 mov $0x80,%ecx
10eb56: 31 c0 xor %eax,%eax
10eb58: 89 d7 mov %edx,%edi
10eb5a: f3 ab rep stos %eax,%es:(%edi)
switch(fmt_params.fattype) {
10eb5c: 8a 85 ca fd ff ff mov -0x236(%ebp),%al
10eb62: 3c 02 cmp $0x2,%al
10eb64: 74 24 je 10eb8a <msdos_format+0xa89> <== NEVER TAKEN
10eb66: 3c 04 cmp $0x4,%al
10eb68: 74 43 je 10ebad <msdos_format+0xaac> <== NEVER TAKEN
10eb6a: fe c8 dec %al
10eb6c: 75 7f jne 10ebed <msdos_format+0xaec> <== NEVER TAKEN
case FAT_FAT12:
/* LSBits of FAT entry 0: media_type */
FAT_SET_VAL8(tmp_sec,0,(fmt_params.media_code));
10eb6e: 8a 85 c9 fd ff ff mov -0x237(%ebp),%al
10eb74: 88 85 e8 fd ff ff mov %al,-0x218(%ebp)
/* MSBits of FAT entry 0:0xf, LSBits of FAT entry 1: LSB of EOC */
FAT_SET_VAL8(tmp_sec,1,(0x0f | (FAT_FAT12_EOC << 4)));
10eb7a: c6 85 e9 fd ff ff 8f movb $0x8f,-0x217(%ebp)
/* MSBits of FAT entry 1: MSBits of EOC */
FAT_SET_VAL8(tmp_sec,2,(FAT_FAT12_EOC >> 4));
10eb81: c6 85 ea fd ff ff ff movb $0xff,-0x216(%ebp)
break;
10eb88: eb 78 jmp 10ec02 <msdos_format+0xb01>
case FAT_FAT16:
/* FAT entry 0: 0xff00|media_type */
FAT_SET_VAL8(tmp_sec,0,fmt_params.media_code);
10eb8a: 8a 85 c9 fd ff ff mov -0x237(%ebp),%al <== NOT EXECUTED
10eb90: 88 85 e8 fd ff ff mov %al,-0x218(%ebp) <== NOT EXECUTED
FAT_SET_VAL8(tmp_sec,1,0xff);
10eb96: c6 85 e9 fd ff ff ff movb $0xff,-0x217(%ebp) <== NOT EXECUTED
/* FAT entry 1: EOC */
FAT_SET_VAL16(tmp_sec,2,FAT_FAT16_EOC);
10eb9d: c6 85 ea fd ff ff f8 movb $0xf8,-0x216(%ebp) <== NOT EXECUTED
10eba4: c6 85 eb fd ff ff ff movb $0xff,-0x215(%ebp) <== NOT EXECUTED
break;
10ebab: eb 55 jmp 10ec02 <msdos_format+0xb01> <== NOT EXECUTED
case FAT_FAT32:
/* FAT entry 0: 0xffffff00|media_type */
FAT_SET_VAL32(tmp_sec,0,0xffffff00|fmt_params.media_code);
10ebad: 0f b6 85 c9 fd ff ff movzbl -0x237(%ebp),%eax <== NOT EXECUTED
10ebb4: 88 85 e8 fd ff ff mov %al,-0x218(%ebp) <== NOT EXECUTED
10ebba: c6 85 e9 fd ff ff ff movb $0xff,-0x217(%ebp) <== NOT EXECUTED
10ebc1: c6 85 ea fd ff ff ff movb $0xff,-0x216(%ebp) <== NOT EXECUTED
10ebc8: c6 85 eb fd ff ff ff movb $0xff,-0x215(%ebp) <== NOT EXECUTED
/* FAT entry 1: EOC */
FAT_SET_VAL32(tmp_sec,4,FAT_FAT32_EOC);
10ebcf: c6 85 ec fd ff ff f8 movb $0xf8,-0x214(%ebp) <== NOT EXECUTED
10ebd6: c6 85 ed fd ff ff ff movb $0xff,-0x213(%ebp) <== NOT EXECUTED
10ebdd: c6 85 ee fd ff ff ff movb $0xff,-0x212(%ebp) <== NOT EXECUTED
10ebe4: c6 85 ef fd ff ff 0f movb $0xf,-0x211(%ebp) <== NOT EXECUTED
break;
10ebeb: eb 15 jmp 10ec02 <msdos_format+0xb01> <== NOT EXECUTED
default:
ret_val = -1;
errno = EINVAL;
10ebed: e8 1e ac 00 00 call 119810 <__errno> <== NOT EXECUTED
10ebf2: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
/* FAT entry 1: EOC */
FAT_SET_VAL32(tmp_sec,4,FAT_FAT32_EOC);
break;
default:
ret_val = -1;
10ebf8: c7 85 44 fd ff ff ff movl $0xffffffff,-0x2bc(%ebp) <== NOT EXECUTED
10ebff: ff ff ff
errno = EINVAL;
}
if (fmt_params.fattype == FAT_FAT32) {
10ec02: 80 bd ca fd ff ff 04 cmpb $0x4,-0x236(%ebp)
10ec09: 75 1c jne 10ec27 <msdos_format+0xb26> <== ALWAYS TAKEN
/*
* only first valid cluster (cluster number 2) belongs
* to root directory, and is end of chain
* mark this in every copy of the FAT
*/
FAT_SET_VAL32(tmp_sec,8,FAT_FAT32_EOC);
10ec0b: c6 85 f0 fd ff ff f8 movb $0xf8,-0x210(%ebp) <== NOT EXECUTED
10ec12: c6 85 f1 fd ff ff ff movb $0xff,-0x20f(%ebp) <== NOT EXECUTED
10ec19: c6 85 f2 fd ff ff ff movb $0xff,-0x20e(%ebp) <== NOT EXECUTED
10ec20: c6 85 f3 fd ff ff 0f movb $0xf,-0x20d(%ebp) <== NOT EXECUTED
/* FAT entry 1: EOC */
FAT_SET_VAL32(tmp_sec,4,FAT_FAT32_EOC);
break;
default:
ret_val = -1;
10ec27: 31 db xor %ebx,%ebx
ret_val = msdos_format_write_sec
(fd,
fmt_params.rsvd_sector_cnt
+ (i * fmt_params.sectors_per_fat),
fmt_params.bytes_per_sector,
tmp_sec);
10ec29: 8d b5 e8 fd ff ff lea -0x218(%ebp),%esi
10ec2f: eb 2e jmp 10ec5f <msdos_format+0xb5e>
FAT_SET_VAL32(tmp_sec,8,FAT_FAT32_EOC);
}
for (i = 0;
(i < fmt_params.fat_num) && (ret_val == 0);
i++) {
ret_val = msdos_format_write_sec
10ec31: 83 ec 0c sub $0xc,%esp
(fd,
fmt_params.rsvd_sector_cnt
+ (i * fmt_params.sectors_per_fat),
10ec34: 8b 95 a8 fd ff ff mov -0x258(%ebp),%edx
10ec3a: 0f af d3 imul %ebx,%edx
}
for (i = 0;
(i < fmt_params.fat_num) && (ret_val == 0);
i++) {
ret_val = msdos_format_write_sec
(fd,
10ec3d: 03 95 a0 fd ff ff add -0x260(%ebp),%edx
FAT_SET_VAL32(tmp_sec,8,FAT_FAT32_EOC);
}
for (i = 0;
(i < fmt_params.fat_num) && (ret_val == 0);
i++) {
ret_val = msdos_format_write_sec
10ec43: 56 push %esi
10ec44: 8b 8d 98 fd ff ff mov -0x268(%ebp),%ecx
10ec4a: 8b 85 40 fd ff ff mov -0x2c0(%ebp),%eax
10ec50: e8 64 f3 ff ff call 10dfb9 <msdos_format_write_sec>
10ec55: 89 85 44 fd ff ff mov %eax,-0x2bc(%ebp)
*/
FAT_SET_VAL32(tmp_sec,8,FAT_FAT32_EOC);
}
for (i = 0;
(i < fmt_params.fat_num) && (ret_val == 0);
i++) {
10ec5b: 43 inc %ebx
10ec5c: 83 c4 10 add $0x10,%esp
* mark this in every copy of the FAT
*/
FAT_SET_VAL32(tmp_sec,8,FAT_FAT32_EOC);
}
for (i = 0;
(i < fmt_params.fat_num) && (ret_val == 0);
10ec5f: 0f b6 85 c8 fd ff ff movzbl -0x238(%ebp),%eax
* to root directory, and is end of chain
* mark this in every copy of the FAT
*/
FAT_SET_VAL32(tmp_sec,8,FAT_FAT32_EOC);
}
for (i = 0;
10ec66: 39 c3 cmp %eax,%ebx
10ec68: 7d 09 jge 10ec73 <msdos_format+0xb72>
(i < fmt_params.fat_num) && (ret_val == 0);
10ec6a: 83 bd 44 fd ff ff 00 cmpl $0x0,-0x2bc(%ebp)
10ec71: 74 be je 10ec31 <msdos_format+0xb30> <== ALWAYS TAKEN
/*
* cleanup:
* sync and unlock disk
* free any data structures (not needed now)
*/
if (fd != -1) {
10ec73: 83 bd 40 fd ff ff ff cmpl $0xffffffff,-0x2c0(%ebp)
10ec7a: 0f 84 3f 01 00 00 je 10edbf <msdos_format+0xcbe> <== NEVER TAKEN
close(fd);
10ec80: 83 ec 0c sub $0xc,%esp
10ec83: ff b5 40 fd ff ff pushl -0x2c0(%ebp)
10ec89: e8 6e 83 ff ff call 106ffc <close>
10ec8e: 83 c4 10 add $0x10,%esp
10ec91: e9 29 01 00 00 jmp 10edbf <msdos_format+0xcbe>
/*
* compute formatting parameters
*/
if (ret_val == 0) {
ret_val = msdos_format_determine_fmt_params(fd,rqdata,&fmt_params);
10ec96: 8d 95 98 fd ff ff lea -0x268(%ebp),%edx
uint32_t fatdata_sect_cnt;
uint32_t onebit;
uint32_t sectors_per_cluster_adj = 0;
uint64_t total_size = 0;
memset(fmt_params,0,sizeof(*fmt_params));
10ec9c: b9 14 00 00 00 mov $0x14,%ecx
10eca1: 89 d7 mov %edx,%edi
10eca3: 8b 85 44 fd ff ff mov -0x2bc(%ebp),%eax
10eca9: f3 ab rep stos %eax,%es:(%edi)
return ioctl(fd, RTEMS_BLKIO_GETMEDIABLKSIZE, media_block_size);
}
static inline int rtems_disk_fd_get_block_size(int fd, uint32_t *block_size)
{
return ioctl(fd, RTEMS_BLKIO_GETBLKSIZE, block_size);
10ecab: 50 push %eax
10ecac: 52 push %edx
10ecad: 68 03 42 04 40 push $0x40044203
10ecb2: ff b5 40 fd ff ff pushl -0x2c0(%ebp)
10ecb8: e8 bb 86 ff ff call 107378 <ioctl>
10ecbd: 89 85 3c fd ff ff mov %eax,-0x2c4(%ebp)
* At least one thing we don't have to magically guess...
*/
if (ret_val == 0) {
ret_val = rtems_disk_fd_get_block_size(fd, &fmt_params->bytes_per_sector);
}
if (ret_val == 0) {
10ecc3: 83 c4 10 add $0x10,%esp
10ecc6: 85 c0 test %eax,%eax
10ecc8: 0f 85 de f8 ff ff jne 10e5ac <msdos_format+0x4ab> <== NEVER TAKEN
10ecce: e9 ed f4 ff ff jmp 10e1c0 <msdos_format+0xbf>
ret_val = EINVAL;
}
}
if (ret_val == 0)
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
10ecd3: 0f b6 85 c8 fd ff ff movzbl -0x238(%ebp),%eax
10ecda: 50 push %eax
10ecdb: 68 81 85 12 00 push $0x128581
10ece0: 6a 02 push $0x2
10ece2: ff 75 0c pushl 0xc(%ebp)
10ece5: e8 92 f2 ff ff call 10df7c <msdos_format_printf>
/*
* determine FAT type and sectors per cluster
* depends on
*/
if (ret_val == 0) {
fmt_params->sectors_per_cluster = 1;
10ecea: c7 85 a4 fd ff ff 01 movl $0x1,-0x25c(%ebp)
10ecf1: 00 00 00
if ((rqdata != NULL) &&
10ecf4: 83 c4 10 add $0x10,%esp
10ecf7: 83 7d 0c 00 cmpl $0x0,0xc(%ebp)
10ecfb: 0f 85 42 f5 ff ff jne 10e243 <msdos_format+0x142> <== NEVER TAKEN
* limiting values for disk size, fat type, sectors per cluster
* NOTE: maximum sect_per_clust is arbitrarily choosen with values that
* are a compromise concerning capacity and efficency
*/
uint32_t fat12_sect_per_clust = 8;
uint32_t fat16_sect_per_clust = 32;
10ed01: ba 20 00 00 00 mov $0x20,%edx
/*
* limiting values for disk size, fat type, sectors per cluster
* NOTE: maximum sect_per_clust is arbitrarily choosen with values that
* are a compromise concerning capacity and efficency
*/
uint32_t fat12_sect_per_clust = 8;
10ed06: b8 08 00 00 00 mov $0x8,%eax
10ed0b: e9 9a f5 ff ff jmp 10e2aa <msdos_format+0x1a9>
}
else if (rqdata->fat_num <= 6) {
fmt_params->fat_num = rqdata->fat_num;
}
else {
ret_val = EINVAL;
10ed10: c7 85 3c fd ff ff 16 movl $0x16,-0x2c4(%ebp) <== NOT EXECUTED
10ed17: 00 00 00
10ed1a: e9 8d f8 ff ff jmp 10e5ac <msdos_format+0x4ab> <== NOT EXECUTED
if (ret_val == 0) {
const char *from;
char *to = fmt_params->VolLabel;
int cnt;
from = ""; /* default: make "from" point to empty string */
if ((rqdata != NULL) &&
10ed1f: 83 7d 0c 00 cmpl $0x0,0xc(%ebp)
10ed23: 0f 85 30 f9 ff ff jne 10e659 <msdos_format+0x558>
10ed29: e9 3e f9 ff ff jmp 10e66c <msdos_format+0x56b>
{
int ret_val = 0;
int rc;
struct timeval time_value;
rc = rtems_clock_get_tod_timeval(&time_value);
10ed2e: 83 ec 0c sub $0xc,%esp
10ed31: 8d 85 e8 fd ff ff lea -0x218(%ebp),%eax
10ed37: 50 push %eax
10ed38: e8 c3 58 00 00 call 114600 <rtems_clock_get_tod_timeval>
if (rc == RTEMS_SUCCESSFUL) {
10ed3d: 83 c4 10 add $0x10,%esp
10ed40: 85 c0 test %eax,%eax
10ed42: 0f 84 65 f9 ff ff je 10e6ad <msdos_format+0x5ac> <== NEVER TAKEN
10ed48: e9 6a f9 ff ff jmp 10e6b7 <msdos_format+0x5b6>
}
/*
* Phuuu.... That's it.
*/
if (ret_val != 0) {
rtems_set_errno_and_return_minus_one(ret_val);
10ed4d: e8 be aa 00 00 call 119810 <__errno> <== NOT EXECUTED
10ed52: 8b 95 3c fd ff ff mov -0x2c4(%ebp),%edx <== NOT EXECUTED
10ed58: 89 10 mov %edx,(%eax) <== NOT EXECUTED
10ed5a: c7 85 44 fd ff ff ff movl $0xffffffff,-0x2bc(%ebp) <== NOT EXECUTED
10ed61: ff ff ff
10ed64: e9 59 f9 ff ff jmp 10e6c2 <msdos_format+0x5c1> <== NOT EXECUTED
if (0 > lseek(fd,((off_t)start_sector)*sector_size,SEEK_SET)) {
ret_val = -1;
}
if (ret_val == 0) {
if (0 > read(fd,buffer,sector_size)) {
10ed69: 50 push %eax
10ed6a: 53 push %ebx
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
"read MRB sector\n");
ret_val = msdos_format_read_sec(fd,
0,
fmt_params.bytes_per_sector,
tmp_sec);
10ed6b: 8d 85 e8 fd ff ff lea -0x218(%ebp),%eax
if (0 > lseek(fd,((off_t)start_sector)*sector_size,SEEK_SET)) {
ret_val = -1;
}
if (ret_val == 0) {
if (0 > read(fd,buffer,sector_size)) {
10ed71: 50 push %eax
10ed72: ff b5 40 fd ff ff pushl -0x2c0(%ebp)
10ed78: e8 4b 4e 00 00 call 113bc8 <read>
10ed7d: 83 c4 10 add $0x10,%esp
10ed80: 85 c0 test %eax,%eax
10ed82: 78 2c js 10edb0 <msdos_format+0xcaf> <== NEVER TAKEN
ret_val = msdos_format_read_sec(fd,
0,
fmt_params.bytes_per_sector,
tmp_sec);
if (ret_val == 0) {
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
10ed84: 50 push %eax
10ed85: 68 95 85 12 00 push $0x128595
10ed8a: 6a 02 push $0x2
10ed8c: ff 75 0c pushl 0xc(%ebp)
10ed8f: e8 e8 f1 ff ff call 10df7c <msdos_format_printf>
{
uint32_t total_sectors_num16 = 0;
uint32_t total_sectors_num32 = 0;
/* store total sector count in either 16 or 32 bit field in mbr */
if (fmt_params->totl_sector_cnt < 0x10000) {
10ed94: 8b 95 9c fd ff ff mov -0x264(%ebp),%edx
10ed9a: 83 c4 10 add $0x10,%esp
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
uint32_t total_sectors_num16 = 0;
10ed9d: 31 db xor %ebx,%ebx
uint32_t total_sectors_num32 = 0;
/* store total sector count in either 16 or 32 bit field in mbr */
if (fmt_params->totl_sector_cnt < 0x10000) {
10ed9f: 81 fa ff ff 00 00 cmp $0xffff,%edx
10eda5: 0f 87 a1 f9 ff ff ja 10e74c <msdos_format+0x64b> <== NEVER TAKEN
10edab: e9 98 f9 ff ff jmp 10e748 <msdos_format+0x647>
}
}
}
}
if (ret_val == 0) {
10edb0: c7 85 44 fd ff ff ff movl $0xffffffff,-0x2bc(%ebp) <== NOT EXECUTED
10edb7: ff ff ff
10edba: e9 b4 fe ff ff jmp 10ec73 <msdos_format+0xb72> <== NOT EXECUTED
if (fd != -1) {
close(fd);
}
return ret_val;
}
10edbf: 8b 85 44 fd ff ff mov -0x2bc(%ebp),%eax
10edc5: 8d 65 f4 lea -0xc(%ebp),%esp
10edc8: 5b pop %ebx
10edc9: 5e pop %esi
10edca: 5f pop %edi
10edcb: 5d pop %ebp
10edcc: c3 ret
0010dff7 <msdos_format_fill_sectors>:
)
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
10dff7: 55 push %ebp
10dff8: 89 e5 mov %esp,%ebp
10dffa: 57 push %edi
10dffb: 56 push %esi
10dffc: 53 push %ebx
10dffd: 83 ec 38 sub $0x38,%esp
10e000: 89 c6 mov %eax,%esi
10e002: 89 55 dc mov %edx,-0x24(%ebp)
10e005: 89 4d e0 mov %ecx,-0x20(%ebp)
10e008: 8a 45 10 mov 0x10(%ebp),%al
10e00b: 88 45 e4 mov %al,-0x1c(%ebp)
/*
* allocate and fill buffer
*/
if (ret_val == 0) {
fill_buffer = malloc(sector_size);
10e00e: ff 75 0c pushl 0xc(%ebp)
10e011: e8 f2 96 ff ff call 107708 <malloc>
10e016: 89 c3 mov %eax,%ebx
if (fill_buffer == NULL) {
10e018: 83 c4 10 add $0x10,%esp
10e01b: 85 c0 test %eax,%eax
10e01d: 75 10 jne 10e02f <msdos_format_fill_sectors+0x38><== ALWAYS TAKEN
errno = ENOMEM;
10e01f: e8 ec b7 00 00 call 119810 <__errno> <== NOT EXECUTED
10e024: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED
ret_val = -1;
10e02a: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
10e02d: eb 0c jmp 10e03b <msdos_format_fill_sectors+0x44><== NOT EXECUTED
}
else {
memset(fill_buffer,fill_byte,sector_size);
10e02f: 89 c7 mov %eax,%edi
10e031: 8b 4d 0c mov 0xc(%ebp),%ecx
10e034: 8a 45 e4 mov -0x1c(%ebp),%al
10e037: f3 aa rep stos %al,%es:(%edi)
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
int ret_val = 0;
10e039: 31 c0 xor %eax,%eax
else {
memset(fill_buffer,fill_byte,sector_size);
}
}
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
10e03b: 57 push %edi
10e03c: 68 84 84 12 00 push $0x128484
10e041: 6a 02 push $0x2
10e043: 56 push %esi
10e044: 89 45 d4 mov %eax,-0x2c(%ebp)
10e047: e8 30 ff ff ff call 10df7c <msdos_format_printf>
10e04c: 6b 55 08 64 imul $0x64,0x8(%ebp),%edx
10e050: 89 55 e4 mov %edx,-0x1c(%ebp)
"Filling : ");
/*
* write to consecutive sectors
*/
while ((ret_val == 0) &&
10e053: 83 c4 10 add $0x10,%esp
10e056: 8b 7d e0 mov -0x20(%ebp),%edi
\*=========================================================================*/
{
int ret_val = 0;
char *fill_buffer = NULL;
uint32_t total_sectors = sector_cnt;
int last_percent = -1;
10e059: c7 45 e0 ff ff ff ff movl $0xffffffff,-0x20(%ebp)
}
/*=========================================================================* \
| Function: |
\*-------------------------------------------------------------------------*/
static int msdos_format_fill_sectors
10e060: 8b 55 08 mov 0x8(%ebp),%edx
10e063: 01 fa add %edi,%edx
10e065: 89 55 d8 mov %edx,-0x28(%ebp)
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
"Filling : ");
/*
* write to consecutive sectors
*/
while ((ret_val == 0) &&
10e068: 8b 45 d4 mov -0x2c(%ebp),%eax
10e06b: eb 3e jmp 10e0ab <msdos_format_fill_sectors+0xb4>
(sector_cnt > 0)) {
int percent = (sector_cnt * 100) / total_sectors;
10e06d: 8b 45 e4 mov -0x1c(%ebp),%eax
10e070: 31 d2 xor %edx,%edx
10e072: f7 75 08 divl 0x8(%ebp)
if (percent != last_percent) {
10e075: 3b 45 e0 cmp -0x20(%ebp),%eax
10e078: 74 18 je 10e092 <msdos_format_fill_sectors+0x9b>
if ((percent & 1) == 0)
10e07a: 89 45 e0 mov %eax,-0x20(%ebp)
10e07d: a8 01 test $0x1,%al
10e07f: 75 11 jne 10e092 <msdos_format_fill_sectors+0x9b>
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL, ".");
10e081: 51 push %ecx
10e082: 68 d3 88 12 00 push $0x1288d3
10e087: 6a 02 push $0x2
10e089: 56 push %esi
10e08a: e8 ed fe ff ff call 10df7c <msdos_format_printf>
10e08f: 83 c4 10 add $0x10,%esp
last_percent = percent;
}
ret_val = msdos_format_write_sec(fd,start_sector,sector_size,fill_buffer);
10e092: 83 ec 0c sub $0xc,%esp
10e095: 53 push %ebx
10e096: 8b 4d 0c mov 0xc(%ebp),%ecx
10e099: 89 fa mov %edi,%edx
10e09b: 8b 45 dc mov -0x24(%ebp),%eax
10e09e: e8 16 ff ff ff call 10dfb9 <msdos_format_write_sec>
start_sector++;
10e0a3: 47 inc %edi
10e0a4: 83 6d e4 64 subl $0x64,-0x1c(%ebp)
10e0a8: 83 c4 10 add $0x10,%esp
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
"Filling : ");
/*
* write to consecutive sectors
*/
while ((ret_val == 0) &&
10e0ab: 39 7d d8 cmp %edi,-0x28(%ebp)
10e0ae: 74 04 je 10e0b4 <msdos_format_fill_sectors+0xbd>
10e0b0: 85 c0 test %eax,%eax
10e0b2: 74 b9 je 10e06d <msdos_format_fill_sectors+0x76><== ALWAYS TAKEN
ret_val = msdos_format_write_sec(fd,start_sector,sector_size,fill_buffer);
start_sector++;
sector_cnt--;
}
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL, "\n");
10e0b4: 52 push %edx
10e0b5: 68 e3 83 12 00 push $0x1283e3
10e0ba: 6a 02 push $0x2
10e0bc: 56 push %esi
10e0bd: 89 45 d4 mov %eax,-0x2c(%ebp)
10e0c0: e8 b7 fe ff ff call 10df7c <msdos_format_printf>
if (ret_val)
10e0c5: 83 c4 10 add $0x10,%esp
10e0c8: 8b 45 d4 mov -0x2c(%ebp),%eax
10e0cb: 85 c0 test %eax,%eax
10e0cd: 74 14 je 10e0e3 <msdos_format_fill_sectors+0xec><== ALWAYS TAKEN
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_INFO,
10e0cf: 57 push %edi <== NOT EXECUTED
10e0d0: 68 8f 84 12 00 push $0x12848f <== NOT EXECUTED
10e0d5: 6a 01 push $0x1 <== NOT EXECUTED
10e0d7: 56 push %esi <== NOT EXECUTED
10e0d8: e8 9f fe ff ff call 10df7c <msdos_format_printf> <== NOT EXECUTED
10e0dd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10e0e0: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED
"filling error on sector: %d\n", start_sector);
/*
* cleanup
*/
if (fill_buffer != NULL) {
10e0e3: 85 db test %ebx,%ebx
10e0e5: 74 12 je 10e0f9 <msdos_format_fill_sectors+0x102><== NEVER TAKEN
free(fill_buffer);
10e0e7: 83 ec 0c sub $0xc,%esp
10e0ea: 53 push %ebx
10e0eb: 89 45 d4 mov %eax,-0x2c(%ebp)
10e0ee: e8 39 91 ff ff call 10722c <free>
10e0f3: 83 c4 10 add $0x10,%esp
10e0f6: 8b 45 d4 mov -0x2c(%ebp),%eax
fill_buffer = NULL;
}
return ret_val;
}
10e0f9: 8d 65 f4 lea -0xc(%ebp),%esp
10e0fc: 5b pop %ebx
10e0fd: 5e pop %esi
10e0fe: 5f pop %edi
10e0ff: 5d pop %ebp
10e100: c3 ret
0010df7c <msdos_format_printf>:
*/
static void
msdos_format_printf (const msdos_format_request_param_t *rqdata,
int info_level,
const char *format, ...)
{
10df7c: 55 push %ebp
10df7d: 89 e5 mov %esp,%ebp
10df7f: 83 ec 08 sub $0x8,%esp
10df82: 8b 45 08 mov 0x8(%ebp),%eax
va_list args;
va_start (args, format);
10df85: 8d 55 14 lea 0x14(%ebp),%edx
if (rqdata != NULL && rqdata->info_level >= info_level)
10df88: 85 c0 test %eax,%eax
10df8a: 74 2b je 10dfb7 <msdos_format_printf+0x3b>
10df8c: 8b 4d 0c mov 0xc(%ebp),%ecx
10df8f: 39 48 1c cmp %ecx,0x1c(%eax)
10df92: 7c 23 jl 10dfb7 <msdos_format_printf+0x3b><== ALWAYS TAKEN
{
vfprintf (stdout, format, args);
10df94: 50 push %eax <== NOT EXECUTED
10df95: 52 push %edx <== NOT EXECUTED
10df96: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED
10df99: a1 e0 62 13 00 mov 0x1362e0,%eax <== NOT EXECUTED
10df9e: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED
10dfa1: e8 8a 37 01 00 call 121730 <vfprintf> <== NOT EXECUTED
fflush (stdout);
10dfa6: 5a pop %edx <== NOT EXECUTED
10dfa7: a1 e0 62 13 00 mov 0x1362e0,%eax <== NOT EXECUTED
10dfac: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED
10dfaf: e8 c4 bb 00 00 call 119b78 <fflush> <== NOT EXECUTED
10dfb4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
va_end (args);
}
10dfb7: c9 leave
10dfb8: c3 ret
0010dfb9 <msdos_format_write_sec>:
)
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
10dfb9: 55 push %ebp
10dfba: 89 e5 mov %esp,%ebp
10dfbc: 57 push %edi
10dfbd: 56 push %esi
10dfbe: 53 push %ebx
10dfbf: 83 ec 1c sub $0x1c,%esp
10dfc2: 89 c3 mov %eax,%ebx
10dfc4: 89 ce mov %ecx,%esi
int ret_val = 0;
if (0 > lseek(fd,((off_t)start_sector)*sector_size,SEEK_SET)) {
10dfc6: 6a 00 push $0x0
10dfc8: 89 d0 mov %edx,%eax
10dfca: f7 e1 mul %ecx
10dfcc: 52 push %edx
10dfcd: 50 push %eax
10dfce: 53 push %ebx
10dfcf: e8 90 95 ff ff call 107564 <lseek>
10dfd4: 83 c4 10 add $0x10,%esp
10dfd7: 83 c8 ff or $0xffffffff,%eax
10dfda: 85 d2 test %edx,%edx
10dfdc: 78 11 js 10dfef <msdos_format_write_sec+0x36><== NEVER TAKEN
ret_val = -1;
}
if (ret_val == 0) {
if (0 > write(fd,buffer,sector_size)) {
10dfde: 57 push %edi
10dfdf: 56 push %esi
10dfe0: ff 75 08 pushl 0x8(%ebp)
10dfe3: 53 push %ebx
10dfe4: e8 5f c8 ff ff call 10a848 <write>
10dfe9: 83 c4 10 add $0x10,%esp
10dfec: c1 f8 1f sar $0x1f,%eax
ret_val = -1;
}
}
return ret_val;
}
10dfef: 8d 65 f4 lea -0xc(%ebp),%esp
10dff2: 5b pop %ebx
10dff3: 5e pop %esi
10dff4: 5f pop %edi
10dff5: 5d pop %ebp
10dff6: c3 ret
0011742c <msdos_get_dotdot_dir_info_cluster_num_and_offset>:
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t cln,
fat_dir_pos_t *dir_pos,
char *dir_entry
)
{
11742c: 55 push %ebp
11742d: 89 e5 mov %esp,%ebp
11742f: 57 push %edi
117430: 56 push %esi
117431: 53 push %ebx
117432: 83 ec 70 sub $0x70,%esp
117435: 8b 7d 0c mov 0xc(%ebp),%edi
int rc = RC_OK;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
117438: 8b 45 08 mov 0x8(%ebp),%eax
11743b: 8b 70 08 mov 0x8(%eax),%esi
fat_file_fd_t *fat_fd = NULL;
11743e: c7 45 a4 00 00 00 00 movl $0x0,-0x5c(%ebp)
uint32_t cl4find = 0;
/*
* open fat-file corresponded to ".."
*/
rc = fat_file_open(&fs_info->fat, dir_pos, &fat_fd);
117445: 8d 45 a4 lea -0x5c(%ebp),%eax
117448: 50 push %eax
117449: ff 75 10 pushl 0x10(%ebp)
11744c: 56 push %esi
11744d: e8 44 a4 ff ff call 111896 <fat_file_open>
117452: 89 c3 mov %eax,%ebx
if (rc != RC_OK)
117454: 83 c4 10 add $0x10,%esp
117457: 85 c0 test %eax,%eax
117459: 0f 85 bd 01 00 00 jne 11761c <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x1f0><== NEVER TAKEN
return rc;
fat_fd->cln = cln;
11745f: 8b 45 a4 mov -0x5c(%ebp),%eax
117462: 89 78 1c mov %edi,0x1c(%eax)
fat_fd->fat_file_type = FAT_DIRECTORY;
117465: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax)
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
11746c: c7 40 14 00 00 20 00 movl $0x200000,0x14(%eax)
fat_fd->map.file_cln = 0;
117473: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax)
fat_fd->map.disk_cln = fat_fd->cln;
11747a: 89 78 38 mov %edi,0x38(%eax)
rc = fat_file_size(&fs_info->fat, fat_fd);
11747d: 57 push %edi
11747e: 57 push %edi
11747f: 50 push %eax
117480: 56 push %esi
117481: e8 06 ad ff ff call 11218c <fat_file_size>
117486: 89 c3 mov %eax,%ebx
if (rc != RC_OK)
117488: 83 c4 10 add $0x10,%esp
11748b: 85 c0 test %eax,%eax
11748d: 74 05 je 117494 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x68><== ALWAYS TAKEN
11748f: e9 6b 01 00 00 jmp 1175ff <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x1d3><== NOT EXECUTED
fat_file_close(&fs_info->fat, fat_fd);
return rc;
}
/* find "." node in opened directory */
memset(dot_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
117494: 8d 55 a8 lea -0x58(%ebp),%edx
117497: b9 08 00 00 00 mov $0x8,%ecx
11749c: 89 d7 mov %edx,%edi
11749e: f3 ab rep stos %eax,%es:(%edi)
msdos_long_to_short(".", 1, dot_node, MSDOS_SHORT_NAME_LEN);
1174a0: 6a 0b push $0xb
1174a2: 52 push %edx
1174a3: 6a 01 push $0x1
1174a5: 68 d3 88 12 00 push $0x1288d3
1174aa: 89 55 90 mov %edx,-0x70(%ebp)
1174ad: e8 5c f2 ff ff call 11670e <msdos_long_to_short>
rc = msdos_find_name_in_fat_file(mt_entry, fat_fd, false, ".", 1,
1174b2: 8b 55 90 mov -0x70(%ebp),%edx
1174b5: 52 push %edx
1174b6: ff 75 10 pushl 0x10(%ebp)
1174b9: 6a 01 push $0x1
1174bb: 6a 01 push $0x1
1174bd: 68 d3 88 12 00 push $0x1288d3
1174c2: 6a 00 push $0x0
1174c4: ff 75 a4 pushl -0x5c(%ebp)
1174c7: ff 75 08 pushl 0x8(%ebp)
1174ca: e8 34 f7 ff ff call 116c03 <msdos_find_name_in_fat_file>
1174cf: 89 c3 mov %eax,%ebx
MSDOS_NAME_SHORT, dir_pos, dot_node);
if (rc != RC_OK)
1174d1: 83 c4 30 add $0x30,%esp
1174d4: 85 c0 test %eax,%eax
1174d6: 74 05 je 1174dd <msdos_get_dotdot_dir_info_cluster_num_and_offset+0xb1><== ALWAYS TAKEN
1174d8: e9 22 01 00 00 jmp 1175ff <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x1d3><== NOT EXECUTED
fat_file_close(&fs_info->fat, fat_fd);
return rc;
}
/* find ".." node in opened directory */
memset(dotdot_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
1174dd: 8d 55 c8 lea -0x38(%ebp),%edx
1174e0: b9 08 00 00 00 mov $0x8,%ecx
1174e5: 89 d7 mov %edx,%edi
1174e7: f3 ab rep stos %eax,%es:(%edi)
msdos_long_to_short("..", 2, dotdot_node, MSDOS_SHORT_NAME_LEN);
1174e9: 6a 0b push $0xb
1174eb: 52 push %edx
1174ec: 6a 02 push $0x2
1174ee: 68 d2 88 12 00 push $0x1288d2
1174f3: 89 55 90 mov %edx,-0x70(%ebp)
1174f6: e8 13 f2 ff ff call 11670e <msdos_long_to_short>
rc = msdos_find_name_in_fat_file(mt_entry, fat_fd, false, "..", 2,
1174fb: 8b 55 90 mov -0x70(%ebp),%edx
1174fe: 52 push %edx
1174ff: ff 75 10 pushl 0x10(%ebp)
117502: 6a 01 push $0x1
117504: 6a 02 push $0x2
117506: 68 d2 88 12 00 push $0x1288d2
11750b: 6a 00 push $0x0
11750d: ff 75 a4 pushl -0x5c(%ebp)
117510: ff 75 08 pushl 0x8(%ebp)
117513: e8 eb f6 ff ff call 116c03 <msdos_find_name_in_fat_file>
117518: 89 c3 mov %eax,%ebx
MSDOS_NAME_SHORT, dir_pos,
dotdot_node);
if (rc != RC_OK)
11751a: 83 c4 30 add $0x30,%esp
11751d: 85 c0 test %eax,%eax
11751f: 74 05 je 117526 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0xfa><== ALWAYS TAKEN
117521: e9 d9 00 00 00 jmp 1175ff <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x1d3><== NOT EXECUTED
{
fat_file_close(&fs_info->fat, fat_fd);
return rc;
}
cl4find = MSDOS_EXTRACT_CLUSTER_NUM(dot_node);
117526: 66 8b 45 c2 mov -0x3e(%ebp),%ax
11752a: 66 89 45 96 mov %ax,-0x6a(%ebp)
11752e: 8b 7d bc mov -0x44(%ebp),%edi
/* close fat-file corresponded to ".." directory */
rc = fat_file_close(&fs_info->fat, fat_fd);
117531: 53 push %ebx
117532: 53 push %ebx
117533: ff 75 a4 pushl -0x5c(%ebp)
117536: 56 push %esi
117537: e8 fc a6 ff ff call 111c38 <fat_file_close>
11753c: 89 c3 mov %eax,%ebx
if ( rc != RC_OK )
11753e: 83 c4 10 add $0x10,%esp
117541: 85 c0 test %eax,%eax
117543: 0f 85 d3 00 00 00 jne 11761c <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x1f0><== NEVER TAKEN
return rc;
if ( (MSDOS_EXTRACT_CLUSTER_NUM(dotdot_node)) == 0)
117549: 0f b7 45 dc movzwl -0x24(%ebp),%eax
11754d: c1 e0 10 shl $0x10,%eax
117550: 0f b7 55 e2 movzwl -0x1e(%ebp),%edx
117554: 09 d0 or %edx,%eax
117556: 75 1e jne 117576 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x14a><== ALWAYS TAKEN
fat_dir_pos_init(
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
dir_pos->sname.ofs = 0;
117558: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
11755b: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) <== NOT EXECUTED
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
117562: c7 40 08 ff ff ff ff movl $0xffffffff,0x8(%eax) <== NOT EXECUTED
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
117569: c7 40 0c ff ff ff ff movl $0xffffffff,0xc(%eax) <== NOT EXECUTED
/*
* we handle root dir for all FAT types in the same way with the
* ordinary directories ( through fat_file_* calls )
*/
fat_dir_pos_init(dir_pos);
dir_pos->sname.cln = FAT_ROOTDIR_CLUSTER_NUM;
117570: c7 00 01 00 00 00 movl $0x1,(%eax) <== NOT EXECUTED
}
/* open fat-file corresponded to second ".." */
rc = fat_file_open(&fs_info->fat, dir_pos, &fat_fd);
117576: 51 push %ecx
117577: 8d 45 a4 lea -0x5c(%ebp),%eax
11757a: 50 push %eax
11757b: ff 75 10 pushl 0x10(%ebp)
11757e: 56 push %esi
11757f: e8 12 a3 ff ff call 111896 <fat_file_open>
117584: 89 c3 mov %eax,%ebx
if (rc != RC_OK)
117586: 83 c4 10 add $0x10,%esp
117589: 85 c0 test %eax,%eax
11758b: 0f 85 8b 00 00 00 jne 11761c <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x1f0><== NEVER TAKEN
return rc;
if ((MSDOS_EXTRACT_CLUSTER_NUM(dotdot_node)) == 0)
117591: 0f b7 45 dc movzwl -0x24(%ebp),%eax
117595: c1 e0 10 shl $0x10,%eax
117598: 0f b7 55 e2 movzwl -0x1e(%ebp),%edx
11759c: 09 c2 or %eax,%edx
11759e: 8b 45 a4 mov -0x5c(%ebp),%eax
1175a1: 75 03 jne 1175a6 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x17a><== ALWAYS TAKEN
fat_fd->cln = fs_info->fat.vol.rdir_cl;
1175a3: 8b 56 38 mov 0x38(%esi),%edx <== NOT EXECUTED
else
fat_fd->cln = MSDOS_EXTRACT_CLUSTER_NUM(dotdot_node);
1175a6: 89 50 1c mov %edx,0x1c(%eax)
fat_fd->fat_file_type = FAT_DIRECTORY;
1175a9: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax)
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
1175b0: c7 40 14 00 00 20 00 movl $0x200000,0x14(%eax)
fat_fd->map.file_cln = 0;
1175b7: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax)
fat_fd->map.disk_cln = fat_fd->cln;
1175be: 8b 50 1c mov 0x1c(%eax),%edx
1175c1: 89 50 38 mov %edx,0x38(%eax)
rc = fat_file_size(&fs_info->fat, fat_fd);
1175c4: 52 push %edx
1175c5: 52 push %edx
1175c6: 50 push %eax
1175c7: 56 push %esi
1175c8: e8 bf ab ff ff call 11218c <fat_file_size>
1175cd: 89 c3 mov %eax,%ebx
if (rc != RC_OK)
1175cf: 83 c4 10 add $0x10,%esp
1175d2: 85 c0 test %eax,%eax
1175d4: 74 02 je 1175d8 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x1ac><== ALWAYS TAKEN
1175d6: eb 27 jmp 1175ff <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x1d3><== NOT EXECUTED
fat_file_close(&fs_info->fat, fat_fd);
return rc;
}
/* in this directory find slot with specified cluster num */
rc = msdos_find_node_by_cluster_num_in_fat_file(mt_entry, fat_fd, cl4find,
1175d8: 83 ec 0c sub $0xc,%esp
1175db: ff 75 14 pushl 0x14(%ebp)
1175de: ff 75 10 pushl 0x10(%ebp)
{
fat_file_close(&fs_info->fat, fat_fd);
return rc;
}
cl4find = MSDOS_EXTRACT_CLUSTER_NUM(dot_node);
1175e1: c1 e7 10 shl $0x10,%edi
1175e4: 0f b7 45 96 movzwl -0x6a(%ebp),%eax
1175e8: 09 c7 or %eax,%edi
fat_file_close(&fs_info->fat, fat_fd);
return rc;
}
/* in this directory find slot with specified cluster num */
rc = msdos_find_node_by_cluster_num_in_fat_file(mt_entry, fat_fd, cl4find,
1175ea: 57 push %edi
1175eb: ff 75 a4 pushl -0x5c(%ebp)
1175ee: ff 75 08 pushl 0x8(%ebp)
1175f1: e8 15 fd ff ff call 11730b <msdos_find_node_by_cluster_num_in_fat_file>
1175f6: 89 c3 mov %eax,%ebx
dir_pos, dir_entry);
if (rc != RC_OK)
1175f8: 83 c4 20 add $0x20,%esp
1175fb: 85 c0 test %eax,%eax
1175fd: 74 0d je 11760c <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x1e0><== ALWAYS TAKEN
{
fat_file_close(&fs_info->fat, fat_fd);
1175ff: 50 push %eax <== NOT EXECUTED
117600: 50 push %eax <== NOT EXECUTED
117601: ff 75 a4 pushl -0x5c(%ebp) <== NOT EXECUTED
117604: 56 push %esi <== NOT EXECUTED
117605: e8 2e a6 ff ff call 111c38 <fat_file_close> <== NOT EXECUTED
11760a: eb 0d jmp 117619 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x1ed><== NOT EXECUTED
return rc;
}
rc = fat_file_close(&fs_info->fat, fat_fd);
11760c: 50 push %eax
11760d: 50 push %eax
11760e: ff 75 a4 pushl -0x5c(%ebp)
117611: 56 push %esi
117612: e8 21 a6 ff ff call 111c38 <fat_file_close>
117617: 89 c3 mov %eax,%ebx
117619: 83 c4 10 add $0x10,%esp
return rc;
}
11761c: 89 d8 mov %ebx,%eax
11761e: 8d 65 f4 lea -0xc(%ebp),%esp
117621: 5b pop %ebx
117622: 5e pop %esi
117623: 5f pop %edi
117624: 5d pop %ebp
117625: c3 ret
00117626 <msdos_get_name_node>:
int name_len,
msdos_name_type_t name_type,
fat_dir_pos_t *dir_pos,
char *name_dir_entry
)
{
117626: 55 push %ebp
117627: 89 e5 mov %esp,%ebp
117629: 57 push %edi
11762a: 56 push %esi
11762b: 53 push %ebx
11762c: 83 ec 1c sub $0x1c,%esp
11762f: 8b 55 08 mov 0x8(%ebp),%edx
117632: 8b 4d 10 mov 0x10(%ebp),%ecx
117635: 8b 5d 1c mov 0x1c(%ebp),%ebx
117638: 8b 7d 20 mov 0x20(%ebp),%edi
11763b: 0f b6 45 0c movzbl 0xc(%ebp),%eax
11763f: 88 45 e7 mov %al,-0x19(%ebp)
int rc = RC_OK;
fat_file_fd_t *fat_fd = parent_loc->node_access;
uint32_t dotdot_cln = 0;
/* find name in fat-file which corresponds to the directory */
rc = msdos_find_name_in_fat_file(parent_loc->mt_entry, fat_fd,
117642: 57 push %edi
117643: 53 push %ebx
117644: ff 75 18 pushl 0x18(%ebp)
117647: ff 75 14 pushl 0x14(%ebp)
11764a: 51 push %ecx
11764b: 50 push %eax
11764c: ff 72 08 pushl 0x8(%edx)
11764f: ff 72 14 pushl 0x14(%edx)
117652: 89 55 e0 mov %edx,-0x20(%ebp)
117655: 89 4d dc mov %ecx,-0x24(%ebp)
117658: e8 a6 f5 ff ff call 116c03 <msdos_find_name_in_fat_file>
11765d: 89 c6 mov %eax,%esi
create_node, name, name_len, name_type,
dir_pos, name_dir_entry);
if ((rc != RC_OK) && (rc != MSDOS_NAME_NOT_FOUND_ERR))
11765f: 83 c4 20 add $0x20,%esp
117662: 3d 01 7d 00 00 cmp $0x7d01,%eax
117667: 8b 55 e0 mov -0x20(%ebp),%edx
11766a: 8b 4d dc mov -0x24(%ebp),%ecx
11766d: 74 04 je 117673 <msdos_get_name_node+0x4d>
11766f: 85 c0 test %eax,%eax
117671: 75 74 jne 1176e7 <msdos_get_name_node+0xc1><== NEVER TAKEN
return rc;
if (!create_node)
117673: 80 7d e7 00 cmpb $0x0,-0x19(%ebp)
117677: 75 6e jne 1176e7 <msdos_get_name_node+0xc1>
{
/* if we search for valid name and name not found -> return */
if (rc == MSDOS_NAME_NOT_FOUND_ERR)
117679: 81 fe 01 7d 00 00 cmp $0x7d01,%esi
11767f: 74 66 je 1176e7 <msdos_get_name_node+0xc1>
* if we have deal with ".." - it is a special case :(((
*
* Really, we should return cluster num and offset not of ".." slot, but
* slot which correspondes to real directory name.
*/
if (rc == RC_OK)
117681: 85 f6 test %esi,%esi
117683: 75 62 jne 1176e7 <msdos_get_name_node+0xc1><== NEVER TAKEN
{
if (strncmp(name, "..", 2) == 0)
117685: 50 push %eax
117686: 6a 02 push $0x2
117688: 68 d2 88 12 00 push $0x1288d2
11768d: 51 push %ecx
11768e: 89 55 e0 mov %edx,-0x20(%ebp)
117691: e8 06 35 00 00 call 11ab9c <strncmp>
117696: 83 c4 10 add $0x10,%esp
117699: 85 c0 test %eax,%eax
11769b: 8b 55 e0 mov -0x20(%ebp),%edx
11769e: 75 47 jne 1176e7 <msdos_get_name_node+0xc1>
{
dotdot_cln = MSDOS_EXTRACT_CLUSTER_NUM((name_dir_entry));
1176a0: 0f b7 47 14 movzwl 0x14(%edi),%eax
1176a4: c1 e0 10 shl $0x10,%eax
1176a7: 0f b7 4f 1a movzwl 0x1a(%edi),%ecx
/* are we right under root dir ? */
if (dotdot_cln == 0)
1176ab: 09 c8 or %ecx,%eax
1176ad: 75 1d jne 1176cc <msdos_get_name_node+0xa6>
fat_dir_pos_init(
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
dir_pos->sname.ofs = 0;
1176af: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx)
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
1176b6: c7 43 08 ff ff ff ff movl $0xffffffff,0x8(%ebx)
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
1176bd: c7 43 0c ff ff ff ff movl $0xffffffff,0xc(%ebx)
/*
* we can relax about first_char field - it never should be
* used for root dir
*/
fat_dir_pos_init(dir_pos);
dir_pos->sname.cln = FAT_ROOTDIR_CLUSTER_NUM;
1176c4: c7 03 01 00 00 00 movl $0x1,(%ebx)
1176ca: eb 1b jmp 1176e7 <msdos_get_name_node+0xc1>
}
else
{
rc =
1176cc: 89 7d 14 mov %edi,0x14(%ebp)
1176cf: 89 5d 10 mov %ebx,0x10(%ebp)
1176d2: 89 45 0c mov %eax,0xc(%ebp)
1176d5: 8b 42 14 mov 0x14(%edx),%eax
1176d8: 89 45 08 mov %eax,0x8(%ebp)
}
}
}
}
return rc;
}
1176db: 8d 65 f4 lea -0xc(%ebp),%esp
1176de: 5b pop %ebx
1176df: 5e pop %esi
1176e0: 5f pop %edi
1176e1: 5d pop %ebp
fat_dir_pos_init(dir_pos);
dir_pos->sname.cln = FAT_ROOTDIR_CLUSTER_NUM;
}
else
{
rc =
1176e2: e9 45 fd ff ff jmp 11742c <msdos_get_dotdot_dir_info_cluster_num_and_offset>
}
}
}
}
return rc;
}
1176e7: 89 f0 mov %esi,%eax
1176e9: 8d 65 f4 lea -0xc(%ebp),%esp
1176ec: 5b pop %ebx
1176ed: 5e pop %esi
1176ee: 5f pop %edi
1176ef: 5d pop %ebp
1176f0: c3 ret
0010ee60 <msdos_initialize_support>:
rtems_filesystem_mount_table_entry_t *temp_mt_entry,
const rtems_filesystem_operations_table *op_table,
const rtems_filesystem_file_handlers_r *file_handlers,
const rtems_filesystem_file_handlers_r *directory_handlers
)
{
10ee60: 55 push %ebp
10ee61: 89 e5 mov %esp,%ebp
10ee63: 57 push %edi
10ee64: 56 push %esi
10ee65: 53 push %ebx
10ee66: 83 ec 44 sub $0x44,%esp
10ee69: 8b 75 08 mov 0x8(%ebp),%esi
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = NULL;
fat_file_fd_t *fat_fd = NULL;
10ee6c: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp)
fat_dir_pos_t root_pos;
uint32_t cl_buf_size;
fs_info = (msdos_fs_info_t *)calloc(1, sizeof(msdos_fs_info_t));
10ee73: 68 98 00 00 00 push $0x98
10ee78: 6a 01 push $0x1
10ee7a: e8 41 81 ff ff call 106fc0 <calloc>
10ee7f: 89 c7 mov %eax,%edi
if (!fs_info)
10ee81: 83 c4 10 add $0x10,%esp
10ee84: 85 c0 test %eax,%eax
10ee86: 75 10 jne 10ee98 <msdos_initialize_support+0x38><== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one(ENOMEM);
10ee88: e8 83 a9 00 00 call 119810 <__errno> <== NOT EXECUTED
10ee8d: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED
10ee93: e9 30 01 00 00 jmp 10efc8 <msdos_initialize_support+0x168><== NOT EXECUTED
temp_mt_entry->fs_info = fs_info;
10ee98: 89 46 08 mov %eax,0x8(%esi)
rc = fat_init_volume_info(&fs_info->fat, temp_mt_entry->dev);
10ee9b: 50 push %eax
10ee9c: 50 push %eax
10ee9d: ff 76 38 pushl 0x38(%esi)
10eea0: 57 push %edi
10eea1: e8 21 3b 00 00 call 1129c7 <fat_init_volume_info>
10eea6: 89 c3 mov %eax,%ebx
if (rc != RC_OK)
10eea8: 83 c4 10 add $0x10,%esp
10eeab: 85 c0 test %eax,%eax
10eead: 74 05 je 10eeb4 <msdos_initialize_support+0x54><== ALWAYS TAKEN
{
free(fs_info);
10eeaf: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10eeb2: eb 50 jmp 10ef04 <msdos_initialize_support+0xa4><== NOT EXECUTED
return rc;
}
fs_info->file_handlers = file_handlers;
10eeb4: 8b 45 10 mov 0x10(%ebp),%eax
10eeb7: 89 87 8c 00 00 00 mov %eax,0x8c(%edi)
fs_info->directory_handlers = directory_handlers;
10eebd: 8b 55 14 mov 0x14(%ebp),%edx
10eec0: 89 97 88 00 00 00 mov %edx,0x88(%edi)
fat_dir_pos_init(
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
dir_pos->sname.ofs = 0;
10eec6: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp)
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
10eecd: c7 45 e0 ff ff ff ff movl $0xffffffff,-0x20(%ebp)
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
10eed4: c7 45 e4 ff ff ff ff movl $0xffffffff,-0x1c(%ebp)
/*
* open fat-file which correspondes to root directory
* (so inode number 0x00000010 is always used for root directory)
*/
fat_dir_pos_init(&root_pos);
root_pos.sname.cln = FAT_ROOTDIR_CLUSTER_NUM;
10eedb: c7 45 d8 01 00 00 00 movl $0x1,-0x28(%ebp)
rc = fat_file_open(&fs_info->fat, &root_pos, &fat_fd);
10eee2: 53 push %ebx
10eee3: 8d 45 d4 lea -0x2c(%ebp),%eax
10eee6: 50 push %eax
10eee7: 8d 45 d8 lea -0x28(%ebp),%eax
10eeea: 50 push %eax
10eeeb: 57 push %edi
10eeec: e8 a5 29 00 00 call 111896 <fat_file_open>
10eef1: 89 c3 mov %eax,%ebx
if (rc != RC_OK)
10eef3: 83 c4 10 add $0x10,%esp
10eef6: 85 c0 test %eax,%eax
10eef8: 74 18 je 10ef12 <msdos_initialize_support+0xb2><== ALWAYS TAKEN
{
fat_shutdown_drive(&fs_info->fat);
10eefa: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10eefd: 57 push %edi <== NOT EXECUTED
10eefe: e8 c8 39 00 00 call 1128cb <fat_shutdown_drive> <== NOT EXECUTED
free(fs_info);
10ef03: 59 pop %ecx <== NOT EXECUTED
10ef04: 57 push %edi <== NOT EXECUTED
10ef05: e8 22 83 ff ff call 10722c <free> <== NOT EXECUTED
10ef0a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10ef0d: e9 22 01 00 00 jmp 10f034 <msdos_initialize_support+0x1d4><== NOT EXECUTED
return rc;
}
/* again: unfortunately "fat-file" is just almost fat file :( */
fat_fd->fat_file_type = FAT_DIRECTORY;
10ef12: 8b 45 d4 mov -0x2c(%ebp),%eax
10ef15: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax)
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
10ef1c: c7 40 14 00 00 20 00 movl $0x200000,0x14(%eax)
fat_fd->cln = fs_info->fat.vol.rdir_cl;
10ef23: 8b 4f 38 mov 0x38(%edi),%ecx
10ef26: 89 48 1c mov %ecx,0x1c(%eax)
fat_fd->map.file_cln = 0;
10ef29: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax)
fat_fd->map.disk_cln = fat_fd->cln;
10ef30: 89 48 38 mov %ecx,0x38(%eax)
/* if we have FAT12/16 */
if ( fat_fd->cln == 0 )
10ef33: 85 c9 test %ecx,%ecx
10ef35: 75 12 jne 10ef49 <msdos_initialize_support+0xe9><== NEVER TAKEN
{
fat_fd->fat_file_size = fs_info->fat.vol.rdir_size;
10ef37: 8b 4f 28 mov 0x28(%edi),%ecx
10ef3a: 89 48 18 mov %ecx,0x18(%eax)
cl_buf_size = (fs_info->fat.vol.bpc > fs_info->fat.vol.rdir_size) ?
fs_info->fat.vol.bpc :
10ef3d: 0f b7 47 06 movzwl 0x6(%edi),%eax
/* if we have FAT12/16 */
if ( fat_fd->cln == 0 )
{
fat_fd->fat_file_size = fs_info->fat.vol.rdir_size;
cl_buf_size = (fs_info->fat.vol.bpc > fs_info->fat.vol.rdir_size) ?
10ef41: 39 c8 cmp %ecx,%eax
10ef43: 73 43 jae 10ef88 <msdos_initialize_support+0x128><== NEVER TAKEN
10ef45: 89 c8 mov %ecx,%eax
10ef47: eb 3f jmp 10ef88 <msdos_initialize_support+0x128>
fs_info->fat.vol.bpc :
fs_info->fat.vol.rdir_size;
}
else
{
rc = fat_file_size(&fs_info->fat, fat_fd);
10ef49: 52 push %edx <== NOT EXECUTED
10ef4a: 52 push %edx <== NOT EXECUTED
10ef4b: 50 push %eax <== NOT EXECUTED
10ef4c: 57 push %edi <== NOT EXECUTED
10ef4d: e8 3a 32 00 00 call 11218c <fat_file_size> <== NOT EXECUTED
if ( rc != RC_OK )
10ef52: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10ef55: 85 c0 test %eax,%eax <== NOT EXECUTED
10ef57: 74 2b je 10ef84 <msdos_initialize_support+0x124><== NOT EXECUTED
{
fat_file_close(&fs_info->fat, fat_fd);
10ef59: 53 push %ebx <== NOT EXECUTED
10ef5a: 53 push %ebx <== NOT EXECUTED
10ef5b: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED
10ef5e: 57 push %edi <== NOT EXECUTED
10ef5f: 89 45 c4 mov %eax,-0x3c(%ebp) <== NOT EXECUTED
10ef62: e8 d1 2c 00 00 call 111c38 <fat_file_close> <== NOT EXECUTED
fat_shutdown_drive(&fs_info->fat);
10ef67: 89 3c 24 mov %edi,(%esp) <== NOT EXECUTED
10ef6a: e8 5c 39 00 00 call 1128cb <fat_shutdown_drive> <== NOT EXECUTED
free(fs_info);
10ef6f: 89 3c 24 mov %edi,(%esp) <== NOT EXECUTED
10ef72: e8 b5 82 ff ff call 10722c <free> <== NOT EXECUTED
10ef77: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10ef7a: 8b 4d c4 mov -0x3c(%ebp),%ecx <== NOT EXECUTED
10ef7d: 89 cb mov %ecx,%ebx <== NOT EXECUTED
10ef7f: e9 b0 00 00 00 jmp 10f034 <msdos_initialize_support+0x1d4><== NOT EXECUTED
return rc;
}
cl_buf_size = fs_info->fat.vol.bpc;
10ef84: 0f b7 47 06 movzwl 0x6(%edi),%eax <== NOT EXECUTED
}
fs_info->cl_buf = (uint8_t *)calloc(cl_buf_size, sizeof(char));
10ef88: 52 push %edx
10ef89: 52 push %edx
10ef8a: 6a 01 push $0x1
10ef8c: 50 push %eax
10ef8d: e8 2e 80 ff ff call 106fc0 <calloc>
10ef92: 89 87 94 00 00 00 mov %eax,0x94(%edi)
if (fs_info->cl_buf == NULL)
10ef98: 83 c4 10 add $0x10,%esp
10ef9b: 85 c0 test %eax,%eax
10ef9d: 75 2e jne 10efcd <msdos_initialize_support+0x16d><== ALWAYS TAKEN
{
fat_file_close(&fs_info->fat, fat_fd);
10ef9f: 51 push %ecx <== NOT EXECUTED
10efa0: 51 push %ecx <== NOT EXECUTED
10efa1: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED
10efa4: 57 push %edi <== NOT EXECUTED
10efa5: e8 8e 2c 00 00 call 111c38 <fat_file_close> <== NOT EXECUTED
fat_shutdown_drive(&fs_info->fat);
10efaa: 89 3c 24 mov %edi,(%esp) <== NOT EXECUTED
10efad: e8 19 39 00 00 call 1128cb <fat_shutdown_drive> <== NOT EXECUTED
free(fs_info);
10efb2: 89 3c 24 mov %edi,(%esp) <== NOT EXECUTED
10efb5: e8 72 82 ff ff call 10722c <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
10efba: e8 51 a8 00 00 call 119810 <__errno> <== NOT EXECUTED
10efbf: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED
10efc5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10efc8: 83 cb ff or $0xffffffff,%ebx <== NOT EXECUTED
10efcb: eb 67 jmp 10f034 <msdos_initialize_support+0x1d4><== NOT EXECUTED
}
sc = rtems_semaphore_create(3,
10efcd: 83 ec 0c sub $0xc,%esp
10efd0: 8d 87 90 00 00 00 lea 0x90(%edi),%eax
10efd6: 50 push %eax
10efd7: 6a 00 push $0x0
10efd9: 6a 10 push $0x10
10efdb: 6a 01 push $0x1
10efdd: 6a 03 push $0x3
10efdf: e8 50 bc ff ff call 10ac34 <rtems_semaphore_create>
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_FIFO,
0,
&fs_info->vol_sema);
if (sc != RTEMS_SUCCESSFUL)
10efe4: 83 c4 20 add $0x20,%esp
10efe7: 85 c0 test %eax,%eax
10efe9: 74 34 je 10f01f <msdos_initialize_support+0x1bf><== ALWAYS TAKEN
{
fat_file_close(&fs_info->fat, fat_fd);
10efeb: 50 push %eax <== NOT EXECUTED
10efec: 50 push %eax <== NOT EXECUTED
10efed: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED
10eff0: 57 push %edi <== NOT EXECUTED
10eff1: e8 42 2c 00 00 call 111c38 <fat_file_close> <== NOT EXECUTED
fat_shutdown_drive(&fs_info->fat);
10eff6: 89 3c 24 mov %edi,(%esp) <== NOT EXECUTED
10eff9: e8 cd 38 00 00 call 1128cb <fat_shutdown_drive> <== NOT EXECUTED
free(fs_info->cl_buf);
10effe: 5a pop %edx <== NOT EXECUTED
10efff: ff b7 94 00 00 00 pushl 0x94(%edi) <== NOT EXECUTED
10f005: e8 22 82 ff ff call 10722c <free> <== NOT EXECUTED
free(fs_info);
10f00a: 89 3c 24 mov %edi,(%esp) <== NOT EXECUTED
10f00d: e8 1a 82 ff ff call 10722c <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EIO );
10f012: e8 f9 a7 00 00 call 119810 <__errno> <== NOT EXECUTED
10f017: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
10f01d: eb a6 jmp 10efc5 <msdos_initialize_support+0x165><== NOT EXECUTED
}
temp_mt_entry->mt_fs_root->location.node_access = fat_fd;
10f01f: 8b 46 24 mov 0x24(%esi),%eax
10f022: 8b 55 d4 mov -0x2c(%ebp),%edx
10f025: 89 50 08 mov %edx,0x8(%eax)
temp_mt_entry->mt_fs_root->location.handlers = directory_handlers;
10f028: 8b 55 14 mov 0x14(%ebp),%edx
10f02b: 89 50 10 mov %edx,0x10(%eax)
temp_mt_entry->ops = op_table;
10f02e: 8b 45 0c mov 0xc(%ebp),%eax
10f031: 89 46 0c mov %eax,0xc(%esi)
return rc;
}
10f034: 89 d8 mov %ebx,%eax
10f036: 8d 65 f4 lea -0xc(%ebp),%esp
10f039: 5b pop %ebx
10f03a: 5e pop %esi
10f03b: 5f pop %edi
10f03c: 5d pop %ebp
10f03d: c3 ret
0010ee2e <msdos_lock>:
.rename_h = msdos_rename,
.statvfs_h = rtems_filesystem_default_statvfs
};
void msdos_lock(const rtems_filesystem_mount_table_entry_t *mt_entry)
{
10ee2e: 55 push %ebp
10ee2f: 89 e5 mov %esp,%ebp
10ee31: 83 ec 0c sub $0xc,%esp
msdos_fs_info_t *fs_info = mt_entry->fs_info;
rtems_status_code sc = rtems_semaphore_obtain(
10ee34: 6a 00 push $0x0
10ee36: 6a 00 push $0x0
fs_info->vol_sema,
10ee38: 8b 45 08 mov 0x8(%ebp),%eax
10ee3b: 8b 40 08 mov 0x8(%eax),%eax
};
void msdos_lock(const rtems_filesystem_mount_table_entry_t *mt_entry)
{
msdos_fs_info_t *fs_info = mt_entry->fs_info;
rtems_status_code sc = rtems_semaphore_obtain(
10ee3e: ff b0 90 00 00 00 pushl 0x90(%eax)
10ee44: e8 1b c0 ff ff call 10ae64 <rtems_semaphore_obtain>
fs_info->vol_sema,
RTEMS_WAIT,
RTEMS_NO_TIMEOUT
);
if (sc != RTEMS_SUCCESSFUL) {
10ee49: 83 c4 10 add $0x10,%esp
10ee4c: 85 c0 test %eax,%eax
10ee4e: 74 0d je 10ee5d <msdos_lock+0x2f> <== ALWAYS TAKEN
rtems_fatal_error_occurred(0xdeadbeef);
10ee50: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10ee53: 68 ef be ad de push $0xdeadbeef <== NOT EXECUTED
10ee58: e8 f3 c5 ff ff call 10b450 <rtems_fatal_error_occurred><== NOT EXECUTED
}
}
10ee5d: c9 leave
10ee5e: c3 ret
0011670e <msdos_long_to_short>:
*
*/
#define MSDOS_L2S_PRINT 0
msdos_name_type_t
msdos_long_to_short(const char *lfn, int lfn_len, char* sfn, int sfn_len)
{
11670e: 55 push %ebp
11670f: 89 e5 mov %esp,%ebp
116711: 57 push %edi
116712: 56 push %esi
116713: 53 push %ebx
116714: 83 ec 2c sub $0x2c,%esp
116717: 8b 4d 14 mov 0x14(%ebp),%ecx
int i;
/*
* Fill with spaces. This is how a short directory entry is padded.
*/
memset (sfn, ' ', sfn_len);
11671a: b0 20 mov $0x20,%al
11671c: 8b 7d 10 mov 0x10(%ebp),%edi
11671f: f3 aa rep stos %al,%es:(%edi)
/*
* Handle '.' and '..' specially.
*/
if ((lfn[0] == '.') && (lfn_len == 1))
116721: 31 c0 xor %eax,%eax
116723: 8b 55 08 mov 0x8(%ebp),%edx
116726: 80 3a 2e cmpb $0x2e,(%edx)
116729: 75 68 jne 116793 <msdos_long_to_short+0x85>
11672b: 83 7d 0c 01 cmpl $0x1,0xc(%ebp)
11672f: 75 0d jne 11673e <msdos_long_to_short+0x30>
{
sfn[0] = '.';
116731: 8b 7d 10 mov 0x10(%ebp),%edi
116734: c6 07 2e movb $0x2e,(%edi)
#if MSDOS_L2S_PRINT
printf ("MSDOS_L2S: SHORT[1]: lfn:'%s' SFN:'%s'\n", lfn, sfn);
#endif
return MSDOS_NAME_SHORT;
116737: b0 01 mov $0x1,%al
116739: e9 64 01 00 00 jmp 1168a2 <msdos_long_to_short+0x194>
}
if ((lfn[0] == '.') && (lfn[1] == '.') && (lfn_len == 2))
11673e: 89 c8 mov %ecx,%eax
116740: 8b 55 08 mov 0x8(%ebp),%edx
116743: 80 7a 01 2e cmpb $0x2e,0x1(%edx)
116747: 75 4a jne 116793 <msdos_long_to_short+0x85><== NEVER TAKEN
116749: 83 7d 0c 02 cmpl $0x2,0xc(%ebp)
11674d: 75 44 jne 116793 <msdos_long_to_short+0x85><== NEVER TAKEN
{
sfn[0] = sfn[1] = '.';
11674f: 8b 7d 10 mov 0x10(%ebp),%edi
116752: c6 47 01 2e movb $0x2e,0x1(%edi)
116756: c6 07 2e movb $0x2e,(%edi)
#if MSDOS_L2S_PRINT
printf ("MSDOS_L2S: SHORT[2]: lfn:'%s' SFN:'%s'\n", lfn, sfn);
#endif
return MSDOS_NAME_SHORT;
116759: b8 01 00 00 00 mov $0x1,%eax
11675e: e9 3f 01 00 00 jmp 1168a2 <msdos_long_to_short+0x194>
/*
* Filenames with only blanks and dots are not allowed!
*/
for (i = 0; i < lfn_len; i++)
if ((lfn[i] != ' ') && (lfn[i] != '.'))
116763: 8b 4d 08 mov 0x8(%ebp),%ecx
116766: 8a 14 01 mov (%ecx,%eax,1),%dl
116769: 80 fa 2e cmp $0x2e,%dl
11676c: 74 24 je 116792 <msdos_long_to_short+0x84><== NEVER TAKEN
11676e: 80 fa 20 cmp $0x20,%dl
116771: 74 1f je 116792 <msdos_long_to_short+0x84>
msdos_is_valid_name_char(const char ch)
{
if (strchr(" +,;=[]", ch) != NULL)
return MSDOS_NAME_LONG;
if ((ch == '.') || isalnum((unsigned char)ch) ||
116773: 8b 3d d8 62 13 00 mov 0x1362d8,%edi
116779: 89 7d dc mov %edi,-0x24(%ebp)
11677c: 31 f6 xor %esi,%esi
11677e: c7 45 e4 ff ff ff ff movl $0xffffffff,-0x1c(%ebp)
116785: c6 45 e2 00 movb $0x0,-0x1e(%ebp)
116789: c6 45 e3 00 movb $0x0,-0x1d(%ebp)
11678d: e9 c5 00 00 00 jmp 116857 <msdos_long_to_short+0x149>
}
/*
* Filenames with only blanks and dots are not allowed!
*/
for (i = 0; i < lfn_len; i++)
116792: 40 inc %eax
116793: 3b 45 0c cmp 0xc(%ebp),%eax
116796: 7c cb jl 116763 <msdos_long_to_short+0x55><== ALWAYS TAKEN
if (i == lfn_len)
{
#if MSDOS_L2S_PRINT
printf ("MSDOS_L2S: INVALID[1]: lfn:'%s' SFN:'%s'\n", lfn, sfn);
#endif
return MSDOS_NAME_INVALID;
116798: b8 00 00 00 00 mov $0x0,%eax <== NOT EXECUTED
*/
for (i = 0; i < lfn_len; i++)
if ((lfn[i] != ' ') && (lfn[i] != '.'))
break;
if (i == lfn_len)
11679d: 75 d4 jne 116773 <msdos_long_to_short+0x65><== NOT EXECUTED
11679f: e9 fe 00 00 00 jmp 1168a2 <msdos_long_to_short+0x194><== NOT EXECUTED
int dot_at = -1;
int count = 0;
while (*name && (count < name_len))
{
bool is_dot = *name == '.';
1167a4: 80 f9 2e cmp $0x2e,%cl
1167a7: 0f 94 c2 sete %dl
*
*/
static msdos_name_type_t
msdos_is_valid_name_char(const char ch)
{
if (strchr(" +,;=[]", ch) != NULL)
1167aa: 0f be f9 movsbl %cl,%edi
1167ad: 89 7d cc mov %edi,-0x34(%ebp)
1167b0: 53 push %ebx
1167b1: 53 push %ebx
1167b2: 57 push %edi
1167b3: 68 fc 8a 12 00 push $0x128afc
1167b8: 88 55 d4 mov %dl,-0x2c(%ebp)
1167bb: 88 4d d8 mov %cl,-0x28(%ebp)
1167be: e8 fd 3d 00 00 call 11a5c0 <strchr>
1167c3: 83 c4 10 add $0x10,%esp
return MSDOS_NAME_LONG;
1167c6: bb 02 00 00 00 mov $0x2,%ebx
*
*/
static msdos_name_type_t
msdos_is_valid_name_char(const char ch)
{
if (strchr(" +,;=[]", ch) != NULL)
1167cb: 85 c0 test %eax,%eax
1167cd: 8a 55 d4 mov -0x2c(%ebp),%dl
1167d0: 8a 4d d8 mov -0x28(%ebp),%cl
1167d3: 75 39 jne 11680e <msdos_long_to_short+0x100>
return MSDOS_NAME_LONG;
if ((ch == '.') || isalnum((unsigned char)ch) ||
1167d5: 84 d2 test %dl,%dl
1167d7: 75 30 jne 116809 <msdos_long_to_short+0xfb>
1167d9: 0f b6 c1 movzbl %cl,%eax
(strchr("$%'-_@~`!(){}^#&", ch) != NULL))
return MSDOS_NAME_SHORT;
1167dc: b3 01 mov $0x1,%bl
msdos_is_valid_name_char(const char ch)
{
if (strchr(" +,;=[]", ch) != NULL)
return MSDOS_NAME_LONG;
if ((ch == '.') || isalnum((unsigned char)ch) ||
1167de: 8b 7d dc mov -0x24(%ebp),%edi
1167e1: f6 44 07 01 07 testb $0x7,0x1(%edi,%eax,1)
1167e6: 75 26 jne 11680e <msdos_long_to_short+0x100>
(strchr("$%'-_@~`!(){}^#&", ch) != NULL))
1167e8: 52 push %edx
1167e9: 52 push %edx
1167ea: ff 75 cc pushl -0x34(%ebp)
1167ed: 68 04 8b 12 00 push $0x128b04
1167f2: e8 c9 3d 00 00 call 11a5c0 <strchr>
1167f7: 83 c4 10 add $0x10,%esp
*/
static msdos_name_type_t
msdos_is_valid_name_char(const char ch)
{
if (strchr(" +,;=[]", ch) != NULL)
return MSDOS_NAME_LONG;
1167fa: 31 db xor %ebx,%ebx
1167fc: 85 c0 test %eax,%eax
1167fe: 0f 95 c3 setne %bl
116801: 8a 55 d4 mov -0x2c(%ebp),%dl
116804: 8a 4d d8 mov -0x28(%ebp),%cl
116807: eb 05 jmp 11680e <msdos_long_to_short+0x100>
if ((ch == '.') || isalnum((unsigned char)ch) ||
(strchr("$%'-_@~`!(){}^#&", ch) != NULL))
return MSDOS_NAME_SHORT;
116809: bb 01 00 00 00 mov $0x1,%ebx
#if MSDOS_NAME_TYPE_PRINT
printf ("MSDOS_NAME_TYPE: c:%02x type:%d\n", *name, type);
#endif
if ((type == MSDOS_NAME_INVALID) || (type == MSDOS_NAME_LONG))
11680e: f6 c3 01 test $0x1,%bl
116811: 74 65 je 116878 <msdos_long_to_short+0x16a>
return type;
if (dot_at >= 0)
116813: 83 7d e4 ff cmpl $0xffffffff,-0x1c(%ebp)
116817: 74 10 je 116829 <msdos_long_to_short+0x11b>
{
if (is_dot || ((count - dot_at) > 3))
116819: 84 d2 test %dl,%dl
11681b: 75 77 jne 116894 <msdos_long_to_short+0x186><== ALWAYS TAKEN
11681d: 89 f0 mov %esi,%eax <== NOT EXECUTED
11681f: 2b 45 e4 sub -0x1c(%ebp),%eax <== NOT EXECUTED
116822: 83 f8 03 cmp $0x3,%eax <== NOT EXECUTED
116825: 7e 0f jle 116836 <msdos_long_to_short+0x128><== NOT EXECUTED
116827: eb 6b jmp 116894 <msdos_long_to_short+0x186><== NOT EXECUTED
return MSDOS_NAME_LONG;
}
}
else
{
if (count == 8 && !is_dot)
116829: 84 d2 test %dl,%dl
11682b: 75 05 jne 116832 <msdos_long_to_short+0x124>
11682d: 83 fe 08 cmp $0x8,%esi
116830: 74 62 je 116894 <msdos_long_to_short+0x186>
#endif
return MSDOS_NAME_LONG;
}
}
if (is_dot)
116832: 84 d2 test %dl,%dl
116834: 75 11 jne 116847 <msdos_long_to_short+0x139>
dot_at = count;
else if ((*name >= 'A') && (*name <= 'Z'))
116836: 8d 41 bf lea -0x41(%ecx),%eax
116839: 3c 19 cmp $0x19,%al
11683b: 76 0f jbe 11684c <msdos_long_to_short+0x13e>
uppercase = true;
else if ((*name >= 'a') && (*name <= 'z'))
11683d: 83 e9 61 sub $0x61,%ecx
116840: 80 f9 19 cmp $0x19,%cl
116843: 76 0d jbe 116852 <msdos_long_to_short+0x144>
116845: eb 0f jmp 116856 <msdos_long_to_short+0x148>
#endif
return MSDOS_NAME_LONG;
}
}
if (is_dot)
116847: 89 75 e4 mov %esi,-0x1c(%ebp)
11684a: eb 0a jmp 116856 <msdos_long_to_short+0x148>
dot_at = count;
else if ((*name >= 'A') && (*name <= 'Z'))
uppercase = true;
11684c: c6 45 e2 01 movb $0x1,-0x1e(%ebp)
116850: eb 04 jmp 116856 <msdos_long_to_short+0x148>
else if ((*name >= 'a') && (*name <= 'z'))
lowercase = true;
116852: c6 45 e3 01 movb $0x1,-0x1d(%ebp)
count++;
116856: 46 inc %esi
bool lowercase = false;
bool uppercase = false;
int dot_at = -1;
int count = 0;
while (*name && (count < name_len))
116857: 8b 55 08 mov 0x8(%ebp),%edx
11685a: 8a 0c 32 mov (%edx,%esi,1),%cl
11685d: 84 c9 test %cl,%cl
11685f: 74 09 je 11686a <msdos_long_to_short+0x15c>
116861: 3b 75 0c cmp 0xc(%ebp),%esi
116864: 0f 8c 3a ff ff ff jl 1167a4 <msdos_long_to_short+0x96>
count++;
name++;
}
if (lowercase && uppercase)
11686a: 80 7d e2 00 cmpb $0x0,-0x1e(%ebp)
11686e: 74 2b je 11689b <msdos_long_to_short+0x18d>
116870: 80 7d e3 00 cmpb $0x0,-0x1d(%ebp)
116874: 74 25 je 11689b <msdos_long_to_short+0x18d><== ALWAYS TAKEN
116876: eb 1c jmp 116894 <msdos_long_to_short+0x186><== NOT EXECUTED
#if MSDOS_NAME_TYPE_PRINT
printf ("MSDOS_NAME_TYPE: c:%02x type:%d\n", *name, type);
#endif
if ((type == MSDOS_NAME_INVALID) || (type == MSDOS_NAME_LONG))
116878: 89 d8 mov %ebx,%eax
* Is this a short name ?
*/
type = msdos_name_type (lfn, lfn_len);
if (type == MSDOS_NAME_INVALID)
11687a: 85 db test %ebx,%ebx
11687c: 74 24 je 1168a2 <msdos_long_to_short+0x194><== NEVER TAKEN
printf ("MSDOS_L2S: INVALID[2]: lfn:'%s' SFN:'%s'\n", lfn, sfn);
#endif
return MSDOS_NAME_INVALID;
}
msdos_filename_unix2dos (lfn, lfn_len, sfn);
11687e: 50 push %eax
11687f: ff 75 10 pushl 0x10(%ebp)
116882: ff 75 0c pushl 0xc(%ebp)
116885: ff 75 08 pushl 0x8(%ebp)
116888: e8 9a 23 00 00 call 118c27 <msdos_filename_unix2dos>
#if MSDOS_L2S_PRINT
printf ("MSDOS_L2S: TYPE:%d lfn:'%s' SFN:'%s'\n", type, lfn, sfn);
#endif
return type;
11688d: 83 c4 10 add $0x10,%esp
116890: 89 d8 mov %ebx,%eax
116892: eb 0e jmp 1168a2 <msdos_long_to_short+0x194>
{
#if MSDOS_NAME_TYPE_PRINT
printf ("MSDOS_NAME_TYPE: LONG[2]: is_dot:%d, at:%d cnt\n",
is_dot, dot_at, count);
#endif
return MSDOS_NAME_LONG;
116894: bb 02 00 00 00 mov $0x2,%ebx
116899: eb e3 jmp 11687e <msdos_long_to_short+0x170>
}
#if MSDOS_NAME_TYPE_PRINT
printf ("MSDOS_NAME_TYPE: SHORT[1]\n");
#endif
return MSDOS_NAME_SHORT;
11689b: bb 01 00 00 00 mov $0x1,%ebx
1168a0: eb dc jmp 11687e <msdos_long_to_short+0x170>
#if MSDOS_L2S_PRINT
printf ("MSDOS_L2S: TYPE:%d lfn:'%s' SFN:'%s'\n", type, lfn, sfn);
#endif
return type;
}
1168a2: 8d 65 f4 lea -0xc(%ebp),%esp
1168a5: 5b pop %ebx
1168a6: 5e pop %esi
1168a7: 5f pop %edi
1168a8: 5d pop %ebp
1168a9: c3 ret
0010f040 <msdos_mknod>:
const char *name,
size_t namelen,
mode_t mode,
dev_t dev
)
{
10f040: 55 push %ebp
10f041: 89 e5 mov %esp,%ebp
10f043: 57 push %edi
10f044: 56 push %esi
10f045: 53 push %ebx
10f046: 83 ec 0c sub $0xc,%esp
10f049: 8b 5d 08 mov 0x8(%ebp),%ebx
10f04c: 8b 75 0c mov 0xc(%ebp),%esi
10f04f: 8b 7d 10 mov 0x10(%ebp),%edi
10f052: 8b 55 14 mov 0x14(%ebp),%edx
msdos_node_type_t type = 0;
/*
* Figure out what type of msdos node this is.
*/
if (S_ISDIR(mode))
10f055: 89 d1 mov %edx,%ecx
10f057: 81 e1 00 f0 00 00 and $0xf000,%ecx
10f05d: 81 f9 00 40 00 00 cmp $0x4000,%ecx
10f063: 74 0f je 10f074 <msdos_mknod+0x34>
{
type = MSDOS_DIRECTORY;
}
else if (S_ISREG(mode))
{
type = MSDOS_REGULAR_FILE;
10f065: b8 04 00 00 00 mov $0x4,%eax
*/
if (S_ISDIR(mode))
{
type = MSDOS_DIRECTORY;
}
else if (S_ISREG(mode))
10f06a: 81 f9 00 80 00 00 cmp $0x8000,%ecx
10f070: 74 04 je 10f076 <msdos_mknod+0x36> <== ALWAYS TAKEN
10f072: eb 24 jmp 10f098 <msdos_mknod+0x58> <== NOT EXECUTED
/*
* Figure out what type of msdos node this is.
*/
if (S_ISDIR(mode))
{
type = MSDOS_DIRECTORY;
10f074: 31 c0 xor %eax,%eax
}
else
rtems_set_errno_and_return_minus_one(EINVAL);
/* Create an MSDOS node */
rc = msdos_creat_node(parentloc, type, name, namelen, mode, NULL);
10f076: c7 45 1c 00 00 00 00 movl $0x0,0x1c(%ebp)
10f07d: 89 55 18 mov %edx,0x18(%ebp)
10f080: 89 7d 14 mov %edi,0x14(%ebp)
10f083: 89 75 10 mov %esi,0x10(%ebp)
10f086: 89 45 0c mov %eax,0xc(%ebp)
10f089: 89 5d 08 mov %ebx,0x8(%ebp)
return rc;
}
10f08c: 83 c4 0c add $0xc,%esp
10f08f: 5b pop %ebx
10f090: 5e pop %esi
10f091: 5f pop %edi
10f092: 5d pop %ebp
}
else
rtems_set_errno_and_return_minus_one(EINVAL);
/* Create an MSDOS node */
rc = msdos_creat_node(parentloc, type, name, namelen, mode, NULL);
10f093: e9 a4 71 00 00 jmp 11623c <msdos_creat_node>
else if (S_ISREG(mode))
{
type = MSDOS_REGULAR_FILE;
}
else
rtems_set_errno_and_return_minus_one(EINVAL);
10f098: e8 73 a7 00 00 call 119810 <__errno> <== NOT EXECUTED
10f09d: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
/* Create an MSDOS node */
rc = msdos_creat_node(parentloc, type, name, namelen, mode, NULL);
return rc;
}
10f0a3: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
10f0a6: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
10f0a9: 5b pop %ebx <== NOT EXECUTED
10f0aa: 5e pop %esi <== NOT EXECUTED
10f0ab: 5f pop %edi <== NOT EXECUTED
10f0ac: 5d pop %ebp <== NOT EXECUTED
10f0ad: c3 ret <== NOT EXECUTED
0010f0c0 <msdos_rename>:
const rtems_filesystem_location_info_t *old_loc,
const rtems_filesystem_location_info_t *new_parent_loc,
const char *new_name,
size_t new_namelen
)
{
10f0c0: 55 push %ebp <== NOT EXECUTED
10f0c1: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10f0c3: 56 push %esi <== NOT EXECUTED
10f0c4: 53 push %ebx <== NOT EXECUTED
10f0c5: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED
int rc = RC_OK;
fat_file_fd_t *old_fat_fd = old_loc->node_access;
10f0c8: 8b 73 08 mov 0x8(%ebx),%esi <== NOT EXECUTED
/*
* create new directory entry as "hard link", copying relevant info from
* existing file
*/
rc = msdos_creat_node(new_parent_loc,
10f0cb: 50 push %eax <== NOT EXECUTED
10f0cc: 50 push %eax <== NOT EXECUTED
10f0cd: 56 push %esi <== NOT EXECUTED
10f0ce: 68 00 80 00 00 push $0x8000 <== NOT EXECUTED
10f0d3: ff 75 18 pushl 0x18(%ebp) <== NOT EXECUTED
10f0d6: ff 75 14 pushl 0x14(%ebp) <== NOT EXECUTED
10f0d9: 6a 02 push $0x2 <== NOT EXECUTED
10f0db: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED
10f0de: e8 59 71 00 00 call 11623c <msdos_creat_node> <== NOT EXECUTED
MSDOS_HARD_LINK,new_name,new_namelen,S_IFREG,
old_fat_fd);
if (rc != RC_OK)
10f0e3: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
10f0e6: 85 c0 test %eax,%eax <== NOT EXECUTED
10f0e8: 75 1e jne 10f108 <msdos_rename+0x48> <== NOT EXECUTED
}
/*
* mark file removed
*/
rc = msdos_set_first_char4file_name(old_loc->mt_entry,
10f0ea: c7 45 10 e5 00 00 00 movl $0xe5,0x10(%ebp) <== NOT EXECUTED
10f0f1: 83 c6 20 add $0x20,%esi <== NOT EXECUTED
10f0f4: 89 75 0c mov %esi,0xc(%ebp) <== NOT EXECUTED
10f0f7: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED
10f0fa: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED
&old_fat_fd->dir_pos,
MSDOS_THIS_DIR_ENTRY_EMPTY);
return rc;
}
10f0fd: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
10f100: 5b pop %ebx <== NOT EXECUTED
10f101: 5e pop %esi <== NOT EXECUTED
10f102: 5d pop %ebp <== NOT EXECUTED
}
/*
* mark file removed
*/
rc = msdos_set_first_char4file_name(old_loc->mt_entry,
10f103: e9 42 79 00 00 jmp 116a4a <msdos_set_first_char4file_name><== NOT EXECUTED
&old_fat_fd->dir_pos,
MSDOS_THIS_DIR_ENTRY_EMPTY);
return rc;
}
10f108: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
10f10b: 5b pop %ebx <== NOT EXECUTED
10f10c: 5e pop %esi <== NOT EXECUTED
10f10d: 5d pop %ebp <== NOT EXECUTED
10f10e: c3 ret <== NOT EXECUTED
0010f110 <msdos_rmnod>:
#include "msdos.h"
int
msdos_rmnod(const rtems_filesystem_location_info_t *parent_pathloc,
const rtems_filesystem_location_info_t *pathloc)
{
10f110: 55 push %ebp
10f111: 89 e5 mov %esp,%ebp
10f113: 57 push %edi
10f114: 56 push %esi
10f115: 53 push %ebx
10f116: 83 ec 2c sub $0x2c,%esp
10f119: 8b 7d 0c mov 0xc(%ebp),%edi
int rc = RC_OK;
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
10f11c: 8b 47 14 mov 0x14(%edi),%eax
10f11f: 8b 70 08 mov 0x8(%eax),%esi
fat_file_fd_t *fat_fd = pathloc->node_access;
10f122: 8b 5f 08 mov 0x8(%edi),%ebx
if (fat_fd->fat_file_type == MSDOS_DIRECTORY)
10f125: 83 7b 10 00 cmpl $0x0,0x10(%ebx)
10f129: 75 58 jne 10f183 <msdos_rmnod+0x73>
{
bool is_empty = false;
10f12b: c6 45 e7 00 movb $0x0,-0x19(%ebp)
/*
* You cannot remove a node that still has children
*/
rc = msdos_dir_is_empty(pathloc->mt_entry, fat_fd, &is_empty);
10f12f: 51 push %ecx
10f130: 8d 55 e7 lea -0x19(%ebp),%edx
10f133: 52 push %edx
10f134: 53 push %ebx
10f135: 50 push %eax
10f136: e8 e5 79 00 00 call 116b20 <msdos_dir_is_empty>
if (rc != RC_OK)
10f13b: 83 c4 10 add $0x10,%esp
10f13e: 85 c0 test %eax,%eax
10f140: 75 6c jne 10f1ae <msdos_rmnod+0x9e> <== NEVER TAKEN
{
return rc;
}
if (!is_empty)
10f142: 80 7d e7 00 cmpb $0x0,-0x19(%ebp)
10f146: 75 0d jne 10f155 <msdos_rmnod+0x45>
{
rtems_set_errno_and_return_minus_one(ENOTEMPTY);
10f148: e8 c3 a6 00 00 call 119810 <__errno>
10f14d: c7 00 5a 00 00 00 movl $0x5a,(%eax)
10f153: eb 29 jmp 10f17e <msdos_rmnod+0x6e>
/*
* We deny attempts to delete open directory (if directory is current
* directory we assume it is open one)
*/
if (fat_fd->links_num > 1)
10f155: 83 7b 08 01 cmpl $0x1,0x8(%ebx)
10f159: 76 02 jbe 10f15d <msdos_rmnod+0x4d> <== ALWAYS TAKEN
10f15b: eb 16 jmp 10f173 <msdos_rmnod+0x63> <== NOT EXECUTED
static inline bool rtems_filesystem_location_is_root(
const rtems_filesystem_location_info_t *loc
)
{
const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry;
10f15d: 8b 47 14 mov 0x14(%edi),%eax
return (*mt_entry->ops->are_nodes_equal_h)(
10f160: 52 push %edx
10f161: 52 push %edx
10f162: 8b 50 0c mov 0xc(%eax),%edx
10f165: ff 70 24 pushl 0x24(%eax)
10f168: 57 push %edi
10f169: ff 52 10 call *0x10(%edx)
}
/*
* You cannot remove the file system root node.
*/
if (rtems_filesystem_location_is_root(pathloc))
10f16c: 83 c4 10 add $0x10,%esp
10f16f: 84 c0 test %al,%al
10f171: 74 10 je 10f183 <msdos_rmnod+0x73> <== ALWAYS TAKEN
{
rtems_set_errno_and_return_minus_one(EBUSY);
10f173: e8 98 a6 00 00 call 119810 <__errno> <== NOT EXECUTED
10f178: c7 00 10 00 00 00 movl $0x10,(%eax) <== NOT EXECUTED
10f17e: 83 c8 ff or $0xffffffff,%eax
10f181: eb 2b jmp 10f1ae <msdos_rmnod+0x9e>
* not used - mount() not implemenetd yet.
*/
}
/* mark file removed */
rc = msdos_set_first_char4file_name(pathloc->mt_entry, &fat_fd->dir_pos,
10f183: 51 push %ecx
10f184: 68 e5 00 00 00 push $0xe5
10f189: 8d 43 20 lea 0x20(%ebx),%eax
10f18c: 50 push %eax
10f18d: ff 77 14 pushl 0x14(%edi)
10f190: e8 b5 78 00 00 call 116a4a <msdos_set_first_char4file_name>
MSDOS_THIS_DIR_ENTRY_EMPTY);
if (rc != RC_OK)
10f195: 83 c4 10 add $0x10,%esp
10f198: 85 c0 test %eax,%eax
10f19a: 75 12 jne 10f1ae <msdos_rmnod+0x9e> <== NEVER TAKEN
{
return rc;
}
fat_file_mark_removed(&fs_info->fat, fat_fd);
10f19c: 52 push %edx
10f19d: 52 push %edx
10f19e: 53 push %ebx
10f19f: 56 push %esi
10f1a0: 89 45 d4 mov %eax,-0x2c(%ebp)
10f1a3: e8 9d 2f 00 00 call 112145 <fat_file_mark_removed>
return rc;
10f1a8: 83 c4 10 add $0x10,%esp
10f1ab: 8b 45 d4 mov -0x2c(%ebp),%eax
}
10f1ae: 8d 65 f4 lea -0xc(%ebp),%esp
10f1b1: 5b pop %ebx
10f1b2: 5e pop %esi
10f1b3: 5f pop %edi
10f1b4: 5d pop %ebp
10f1b5: c3 ret
001168aa <msdos_set_dir_wrt_time_and_date>:
int
msdos_set_dir_wrt_time_and_date(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
1168aa: 55 push %ebp
1168ab: 89 e5 mov %esp,%ebp
1168ad: 57 push %edi
1168ae: 56 push %esi
1168af: 53 push %ebx
1168b0: 83 ec 30 sub $0x30,%esp
1168b3: 8b 75 0c mov 0xc(%ebp),%esi
ssize_t ret1 = 0, ret2 = 0, ret3 = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
1168b6: 8b 45 08 mov 0x8(%ebp),%eax
1168b9: 8b 58 08 mov 0x8(%eax),%ebx
uint16_t time_val;
uint16_t date;
uint32_t sec = 0;
uint32_t byte = 0;
msdos_date_unix2dos(fat_fd->mtime, &date, &time_val);
1168bc: 8d 45 e4 lea -0x1c(%ebp),%eax
1168bf: 50 push %eax
1168c0: 8d 7d e6 lea -0x1a(%ebp),%edi
1168c3: 57 push %edi
1168c4: ff 76 40 pushl 0x40(%esi)
1168c7: e8 a0 21 00 00 call 118a6c <msdos_date_unix2dos>
/*
* calculate input for _fat_block_write: convert (cluster num, offset) to
* (sector num, new offset)
*/
sec = fat_cluster_num_to_sector_num(&fs_info->fat, fat_fd->dir_pos.sname.cln);
1168cc: 8b 56 20 mov 0x20(%esi),%edx
1168cf: 89 d8 mov %ebx,%eax
1168d1: e8 16 fe ff ff call 1166ec <fat_cluster_num_to_sector_num>
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
1168d6: 8b 56 24 mov 0x24(%esi),%edx
1168d9: 0f b6 4b 02 movzbl 0x2(%ebx),%ecx
1168dd: 89 d6 mov %edx,%esi
1168df: d3 ee shr %cl,%esi
1168e1: 01 c6 add %eax,%esi
1168e3: 89 75 d4 mov %esi,-0x2c(%ebp)
/* byte points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
1168e6: 0f b7 03 movzwl (%ebx),%eax
1168e9: 8d 70 ff lea -0x1(%eax),%esi
1168ec: 21 d6 and %edx,%esi
time_val = CT_LE_W(time_val);
ret1 = _fat_block_write(&fs_info->fat, sec, byte + MSDOS_FILE_WTIME_OFFSET,
1168ee: 8d 55 e4 lea -0x1c(%ebp),%edx
1168f1: 89 14 24 mov %edx,(%esp)
1168f4: 6a 02 push $0x2
1168f6: 8d 46 16 lea 0x16(%esi),%eax
1168f9: 50 push %eax
1168fa: ff 75 d4 pushl -0x2c(%ebp)
1168fd: 53 push %ebx
1168fe: e8 51 bc ff ff call 112554 <_fat_block_write>
116903: 89 45 d0 mov %eax,-0x30(%ebp)
2, (char *)(&time_val));
date = CT_LE_W(date);
ret2 = _fat_block_write(&fs_info->fat, sec, byte + MSDOS_FILE_WDATE_OFFSET,
116906: 83 c4 14 add $0x14,%esp
116909: 57 push %edi
11690a: 6a 02 push $0x2
11690c: 8d 46 18 lea 0x18(%esi),%eax
11690f: 50 push %eax
116910: ff 75 d4 pushl -0x2c(%ebp)
116913: 53 push %ebx
116914: e8 3b bc ff ff call 112554 <_fat_block_write>
2, (char *)(&date));
ret3 = _fat_block_write(&fs_info->fat, sec, byte + MSDOS_FILE_ADATE_OFFSET,
116919: 83 c4 14 add $0x14,%esp
11691c: 57 push %edi
11691d: 6a 02 push $0x2
11691f: 8d 56 12 lea 0x12(%esi),%edx
116922: 52 push %edx
116923: ff 75 d4 pushl -0x2c(%ebp)
116926: 53 push %ebx
116927: 89 45 cc mov %eax,-0x34(%ebp)
11692a: e8 25 bc ff ff call 112554 <_fat_block_write>
2, (char *)(&date));
if ( (ret1 < 0) || (ret2 < 0) || (ret3 < 0) )
11692f: 83 c4 20 add $0x20,%esp
116932: 8b 4d cc mov -0x34(%ebp),%ecx
116935: c1 e9 1f shr $0x1f,%ecx
116938: 75 08 jne 116942 <msdos_set_dir_wrt_time_and_date+0x98><== NEVER TAKEN
11693a: 8b 55 d0 mov -0x30(%ebp),%edx
11693d: c1 ea 1f shr $0x1f,%edx
116940: 74 05 je 116947 <msdos_set_dir_wrt_time_and_date+0x9d><== ALWAYS TAKEN
return -1;
116942: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
116945: eb 06 jmp 11694d <msdos_set_dir_wrt_time_and_date+0xa3><== NOT EXECUTED
ret2 = _fat_block_write(&fs_info->fat, sec, byte + MSDOS_FILE_WDATE_OFFSET,
2, (char *)(&date));
ret3 = _fat_block_write(&fs_info->fat, sec, byte + MSDOS_FILE_ADATE_OFFSET,
2, (char *)(&date));
if ( (ret1 < 0) || (ret2 < 0) || (ret3 < 0) )
116947: 85 c0 test %eax,%eax
116949: 78 f7 js 116942 <msdos_set_dir_wrt_time_and_date+0x98><== NEVER TAKEN
return -1;
return RC_OK;
11694b: 31 c0 xor %eax,%eax
}
11694d: 8d 65 f4 lea -0xc(%ebp),%esp
116950: 5b pop %ebx
116951: 5e pop %esi
116952: 5f pop %edi
116953: 5d pop %ebp
116954: c3 ret
00116a4a <msdos_set_first_char4file_name>:
msdos_set_first_char4file_name(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_dir_pos_t *dir_pos,
unsigned char fchar
)
{
116a4a: 55 push %ebp
116a4b: 89 e5 mov %esp,%ebp
116a4d: 57 push %edi
116a4e: 56 push %esi
116a4f: 53 push %ebx
116a50: 83 ec 2c sub $0x2c,%esp
116a53: 8b 4d 0c mov 0xc(%ebp),%ecx
116a56: 8b 45 10 mov 0x10(%ebp),%eax
116a59: 88 45 d4 mov %al,-0x2c(%ebp)
ssize_t ret;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
116a5c: 8b 45 08 mov 0x8(%ebp),%eax
116a5f: 8b 78 08 mov 0x8(%eax),%edi
uint32_t dir_block_size;
fat_pos_t start = dir_pos->lname;
116a62: 8b 41 08 mov 0x8(%ecx),%eax
116a65: 8b 51 0c mov 0xc(%ecx),%edx
116a68: 89 45 e0 mov %eax,-0x20(%ebp)
116a6b: 89 55 e4 mov %edx,-0x1c(%ebp)
fat_pos_t end = dir_pos->sname;
116a6e: 8b 19 mov (%ecx),%ebx
116a70: 8b 41 04 mov 0x4(%ecx),%eax
116a73: 89 45 d0 mov %eax,-0x30(%ebp)
if ((end.cln == fs_info->fat.vol.rdir_cl) &&
116a76: 3b 5f 38 cmp 0x38(%edi),%ebx
116a79: 75 0b jne 116a86 <msdos_set_first_char4file_name+0x3c><== NEVER TAKEN
116a7b: f6 47 0a 03 testb $0x3,0xa(%edi)
116a7f: 74 05 je 116a86 <msdos_set_first_char4file_name+0x3c><== NEVER TAKEN
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
dir_block_size = fs_info->fat.vol.rdir_size;
116a81: 8b 77 28 mov 0x28(%edi),%esi
116a84: eb 04 jmp 116a8a <msdos_set_first_char4file_name+0x40>
else
dir_block_size = fs_info->fat.vol.bpc;
116a86: 0f b7 77 06 movzwl 0x6(%edi),%esi <== NOT EXECUTED
if (dir_pos->lname.cln == FAT_FILE_SHORT_NAME)
116a8a: 83 79 08 ff cmpl $0xffffffff,0x8(%ecx)
116a8e: 75 0b jne 116a9b <msdos_set_first_char4file_name+0x51>
start = dir_pos->sname;
116a90: 8b 01 mov (%ecx),%eax
116a92: 8b 51 04 mov 0x4(%ecx),%edx
116a95: 89 45 e0 mov %eax,-0x20(%ebp)
116a98: 89 55 e4 mov %edx,-0x1c(%ebp)
* name code was written rather than use the fat_file_write
* interface.
*/
while (true)
{
uint32_t sec = (fat_cluster_num_to_sector_num(&fs_info->fat, start.cln) +
116a9b: 8b 55 e0 mov -0x20(%ebp),%edx
116a9e: 89 f8 mov %edi,%eax
116aa0: e8 47 fc ff ff call 1166ec <fat_cluster_num_to_sector_num>
(start.ofs >> fs_info->fat.vol.sec_log2));
116aa5: 8b 55 e4 mov -0x1c(%ebp),%edx
uint32_t byte = (start.ofs & (fs_info->fat.vol.bps - 1));
ret = _fat_block_write(&fs_info->fat, sec, byte + MSDOS_FILE_NAME_OFFSET,
116aa8: 83 ec 0c sub $0xc,%esp
116aab: 8d 4d d4 lea -0x2c(%ebp),%ecx
116aae: 51 push %ecx
116aaf: 6a 01 push $0x1
*/
while (true)
{
uint32_t sec = (fat_cluster_num_to_sector_num(&fs_info->fat, start.cln) +
(start.ofs >> fs_info->fat.vol.sec_log2));
uint32_t byte = (start.ofs & (fs_info->fat.vol.bps - 1));
116ab1: 0f b7 0f movzwl (%edi),%ecx
116ab4: 49 dec %ecx
116ab5: 21 d1 and %edx,%ecx
ret = _fat_block_write(&fs_info->fat, sec, byte + MSDOS_FILE_NAME_OFFSET,
116ab7: 51 push %ecx
* interface.
*/
while (true)
{
uint32_t sec = (fat_cluster_num_to_sector_num(&fs_info->fat, start.cln) +
(start.ofs >> fs_info->fat.vol.sec_log2));
116ab8: 0f b6 4f 02 movzbl 0x2(%edi),%ecx
116abc: d3 ea shr %cl,%edx
* name code was written rather than use the fat_file_write
* interface.
*/
while (true)
{
uint32_t sec = (fat_cluster_num_to_sector_num(&fs_info->fat, start.cln) +
116abe: 01 d0 add %edx,%eax
(start.ofs >> fs_info->fat.vol.sec_log2));
uint32_t byte = (start.ofs & (fs_info->fat.vol.bps - 1));
ret = _fat_block_write(&fs_info->fat, sec, byte + MSDOS_FILE_NAME_OFFSET,
116ac0: 50 push %eax
116ac1: 57 push %edi
116ac2: e8 8d ba ff ff call 112554 <_fat_block_write>
1, &fchar);
if (ret < 0)
116ac7: 83 c4 20 add $0x20,%esp
116aca: 85 c0 test %eax,%eax
116acc: 78 47 js 116b15 <msdos_set_first_char4file_name+0xcb><== NEVER TAKEN
return -1;
if ((start.cln == end.cln) && (start.ofs == end.ofs))
116ace: 8b 45 e0 mov -0x20(%ebp),%eax
116ad1: 39 d8 cmp %ebx,%eax
116ad3: 75 0c jne 116ae1 <msdos_set_first_char4file_name+0x97><== NEVER TAKEN
116ad5: 8b 55 d0 mov -0x30(%ebp),%edx
116ad8: 39 55 e4 cmp %edx,-0x1c(%ebp)
116adb: 75 04 jne 116ae1 <msdos_set_first_char4file_name+0x97>
return rc;
start.ofs = 0;
}
}
return RC_OK;
116add: 31 c0 xor %eax,%eax
116adf: eb 37 jmp 116b18 <msdos_set_first_char4file_name+0xce>
return -1;
if ((start.cln == end.cln) && (start.ofs == end.ofs))
break;
start.ofs += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
116ae1: 8b 55 e4 mov -0x1c(%ebp),%edx
116ae4: 83 c2 20 add $0x20,%edx
116ae7: 89 55 e4 mov %edx,-0x1c(%ebp)
if (start.ofs >= dir_block_size)
116aea: 39 f2 cmp %esi,%edx
116aec: 72 ad jb 116a9b <msdos_set_first_char4file_name+0x51>
{
int rc;
if ((end.cln == fs_info->fat.vol.rdir_cl) &&
116aee: 3b 5f 38 cmp 0x38(%edi),%ebx <== NOT EXECUTED
116af1: 75 06 jne 116af9 <msdos_set_first_char4file_name+0xaf><== NOT EXECUTED
116af3: f6 47 0a 03 testb $0x3,0xa(%edi) <== NOT EXECUTED
116af7: 75 e4 jne 116add <msdos_set_first_char4file_name+0x93><== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
break;
rc = fat_get_fat_cluster(&fs_info->fat, start.cln, &start.cln);
116af9: 52 push %edx <== NOT EXECUTED
116afa: 8d 4d e0 lea -0x20(%ebp),%ecx <== NOT EXECUTED
116afd: 51 push %ecx <== NOT EXECUTED
116afe: 50 push %eax <== NOT EXECUTED
116aff: 57 push %edi <== NOT EXECUTED
116b00: e8 fb 0f 00 00 call 117b00 <fat_get_fat_cluster> <== NOT EXECUTED
if ( rc != RC_OK )
116b05: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
116b08: 85 c0 test %eax,%eax <== NOT EXECUTED
116b0a: 75 0c jne 116b18 <msdos_set_first_char4file_name+0xce><== NOT EXECUTED
return rc;
start.ofs = 0;
116b0c: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED
116b13: eb 86 jmp 116a9b <msdos_set_first_char4file_name+0x51><== NOT EXECUTED
uint32_t byte = (start.ofs & (fs_info->fat.vol.bps - 1));
ret = _fat_block_write(&fs_info->fat, sec, byte + MSDOS_FILE_NAME_OFFSET,
1, &fchar);
if (ret < 0)
return -1;
116b15: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
start.ofs = 0;
}
}
return RC_OK;
}
116b18: 8d 65 f4 lea -0xc(%ebp),%esp
116b1b: 5b pop %ebx
116b1c: 5e pop %esi
116b1d: 5f pop %edi
116b1e: 5d pop %ebp
116b1f: c3 ret
00116955 <msdos_set_first_cluster_num>:
int
msdos_set_first_cluster_num(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
116955: 55 push %ebp
116956: 89 e5 mov %esp,%ebp
116958: 57 push %edi
116959: 56 push %esi
11695a: 53 push %ebx
11695b: 83 ec 2c sub $0x2c,%esp
11695e: 8b 75 0c mov 0xc(%ebp),%esi
ssize_t ret1 = 0, ret2 = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
116961: 8b 45 08 mov 0x8(%ebp),%eax
116964: 8b 58 08 mov 0x8(%eax),%ebx
uint32_t new_cln = fat_fd->cln;
116967: 8b 7e 1c mov 0x1c(%esi),%edi
uint16_t le_cl_low = 0;
11696a: 66 c7 45 e4 00 00 movw $0x0,-0x1c(%ebp)
uint16_t le_cl_hi = 0;
116970: 66 c7 45 e6 00 00 movw $0x0,-0x1a(%ebp)
/*
* calculate input for _fat_block_write: convert (cluster num, offset) to
* (sector num, new offset)
*/
sec = fat_cluster_num_to_sector_num(&fs_info->fat, fat_fd->dir_pos.sname.cln);
116976: 8b 56 20 mov 0x20(%esi),%edx
116979: 89 d8 mov %ebx,%eax
11697b: e8 6c fd ff ff call 1166ec <fat_cluster_num_to_sector_num>
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
116980: 8b 56 24 mov 0x24(%esi),%edx
116983: 0f b6 4b 02 movzbl 0x2(%ebx),%ecx
116987: 89 d6 mov %edx,%esi
116989: d3 ee shr %cl,%esi
11698b: 89 f1 mov %esi,%ecx
11698d: 01 c1 add %eax,%ecx
11698f: 89 4d d4 mov %ecx,-0x2c(%ebp)
/* byte from points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
116992: 0f b7 33 movzwl (%ebx),%esi
116995: 4e dec %esi
116996: 21 d6 and %edx,%esi
le_cl_low = CT_LE_W((uint16_t )(new_cln & 0x0000FFFF));
116998: 66 89 7d e4 mov %di,-0x1c(%ebp)
ret1 = _fat_block_write(&fs_info->fat, sec,
11699c: 83 ec 0c sub $0xc,%esp
byte + MSDOS_FIRST_CLUSTER_LOW_OFFSET, 2,
(char *)(&le_cl_low));
11699f: 8d 45 e4 lea -0x1c(%ebp),%eax
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
/* byte from points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
le_cl_low = CT_LE_W((uint16_t )(new_cln & 0x0000FFFF));
ret1 = _fat_block_write(&fs_info->fat, sec,
1169a2: 50 push %eax
1169a3: 6a 02 push $0x2
1169a5: 8d 46 1a lea 0x1a(%esi),%eax
1169a8: 50 push %eax
1169a9: 51 push %ecx
1169aa: 53 push %ebx
1169ab: e8 a4 bb ff ff call 112554 <_fat_block_write>
1169b0: 89 c1 mov %eax,%ecx
byte + MSDOS_FIRST_CLUSTER_LOW_OFFSET, 2,
(char *)(&le_cl_low));
le_cl_hi = CT_LE_W((uint16_t )((new_cln & 0xFFFF0000) >> 16));
1169b2: c1 ef 10 shr $0x10,%edi
1169b5: 66 89 7d e6 mov %di,-0x1a(%ebp)
ret2 = _fat_block_write(&fs_info->fat, sec,
1169b9: 83 c4 14 add $0x14,%esp
byte + MSDOS_FIRST_CLUSTER_HI_OFFSET, 2,
(char *)(&le_cl_hi));
1169bc: 8d 45 e6 lea -0x1a(%ebp),%eax
le_cl_low = CT_LE_W((uint16_t )(new_cln & 0x0000FFFF));
ret1 = _fat_block_write(&fs_info->fat, sec,
byte + MSDOS_FIRST_CLUSTER_LOW_OFFSET, 2,
(char *)(&le_cl_low));
le_cl_hi = CT_LE_W((uint16_t )((new_cln & 0xFFFF0000) >> 16));
ret2 = _fat_block_write(&fs_info->fat, sec,
1169bf: 50 push %eax
1169c0: 6a 02 push $0x2
1169c2: 83 c6 14 add $0x14,%esi
1169c5: 56 push %esi
1169c6: ff 75 d4 pushl -0x2c(%ebp)
1169c9: 53 push %ebx
1169ca: 89 4d d0 mov %ecx,-0x30(%ebp)
1169cd: e8 82 bb ff ff call 112554 <_fat_block_write>
byte + MSDOS_FIRST_CLUSTER_HI_OFFSET, 2,
(char *)(&le_cl_hi));
if ( (ret1 < 0) || (ret2 < 0) )
1169d2: 83 c4 20 add $0x20,%esp
1169d5: c1 e8 1f shr $0x1f,%eax
1169d8: 8b 4d d0 mov -0x30(%ebp),%ecx
1169db: 75 07 jne 1169e4 <msdos_set_first_cluster_num+0x8f><== NEVER TAKEN
return -1;
return RC_OK;
1169dd: 31 c0 xor %eax,%eax
(char *)(&le_cl_low));
le_cl_hi = CT_LE_W((uint16_t )((new_cln & 0xFFFF0000) >> 16));
ret2 = _fat_block_write(&fs_info->fat, sec,
byte + MSDOS_FIRST_CLUSTER_HI_OFFSET, 2,
(char *)(&le_cl_hi));
if ( (ret1 < 0) || (ret2 < 0) )
1169df: c1 e9 1f shr $0x1f,%ecx
1169e2: 74 03 je 1169e7 <msdos_set_first_cluster_num+0x92><== ALWAYS TAKEN
return -1;
1169e4: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
return RC_OK;
}
1169e7: 8d 65 f4 lea -0xc(%ebp),%esp
1169ea: 5b pop %ebx
1169eb: 5e pop %esi
1169ec: 5f pop %edi
1169ed: 5d pop %ebp
1169ee: c3 ret
001178a8 <msdos_sync>:
int
msdos_sync(rtems_libio_t *iop)
{
1178a8: 55 push %ebp <== NOT EXECUTED
1178a9: 89 e5 mov %esp,%ebp <== NOT EXECUTED
1178ab: 56 push %esi <== NOT EXECUTED
1178ac: 53 push %ebx <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
1178ad: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
1178b0: 8b 40 24 mov 0x24(%eax),%eax <== NOT EXECUTED
1178b3: 8b 58 08 mov 0x8(%eax),%ebx <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
1178b6: 50 push %eax <== NOT EXECUTED
1178b7: 6a 00 push $0x0 <== NOT EXECUTED
1178b9: 6a 00 push $0x0 <== NOT EXECUTED
1178bb: ff b3 90 00 00 00 pushl 0x90(%ebx) <== NOT EXECUTED
1178c1: e8 9e 35 ff ff call 10ae64 <rtems_semaphore_obtain><== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
1178c6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1178c9: 85 c0 test %eax,%eax <== NOT EXECUTED
1178cb: 74 10 je 1178dd <msdos_sync+0x35> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
1178cd: e8 3e 1f 00 00 call 119810 <__errno> <== NOT EXECUTED
1178d2: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
1178d8: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED
1178db: eb 1a jmp 1178f7 <msdos_sync+0x4f> <== NOT EXECUTED
rc = msdos_sync_unprotected(fs_info);
1178dd: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1178e0: 53 push %ebx <== NOT EXECUTED
1178e1: e8 88 ff ff ff call 11786e <msdos_sync_unprotected><== NOT EXECUTED
1178e6: 89 c6 mov %eax,%esi <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
1178e8: 58 pop %eax <== NOT EXECUTED
1178e9: ff b3 90 00 00 00 pushl 0x90(%ebx) <== NOT EXECUTED
1178ef: e8 60 36 ff ff call 10af54 <rtems_semaphore_release><== NOT EXECUTED
return rc;
1178f4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
1178f7: 89 f0 mov %esi,%eax <== NOT EXECUTED
1178f9: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
1178fc: 5b pop %ebx <== NOT EXECUTED
1178fd: 5e pop %esi <== NOT EXECUTED
1178fe: 5d pop %ebp <== NOT EXECUTED
1178ff: c3 ret <== NOT EXECUTED
0011786e <msdos_sync_unprotected>:
return MSDOS_NAME_NOT_FOUND_ERR;
}
int
msdos_sync_unprotected(msdos_fs_info_t *fs_info)
{
11786e: 55 push %ebp
11786f: 89 e5 mov %esp,%ebp
117871: 56 push %esi
117872: 53 push %ebx
117873: 8b 5d 08 mov 0x8(%ebp),%ebx
int rc = fat_buf_release(&fs_info->fat);
117876: 83 ec 0c sub $0xc,%esp
117879: 53 push %ebx
11787a: e8 3a ab ff ff call 1123b9 <fat_buf_release>
11787f: 89 c6 mov %eax,%esi
rtems_status_code sc = rtems_bdbuf_syncdev(fs_info->fat.vol.dd);
117881: 58 pop %eax
117882: ff 73 58 pushl 0x58(%ebx)
117885: e8 a9 98 ff ff call 111133 <rtems_bdbuf_syncdev>
if (sc != RTEMS_SUCCESSFUL) {
11788a: 83 c4 10 add $0x10,%esp
11788d: 85 c0 test %eax,%eax
11788f: 74 0e je 11789f <msdos_sync_unprotected+0x31><== ALWAYS TAKEN
errno = EIO;
117891: e8 7a 1f 00 00 call 119810 <__errno> <== NOT EXECUTED
117896: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
rc = -1;
11789c: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED
}
return rc;
}
11789f: 89 f0 mov %esi,%eax
1178a1: 8d 65 f8 lea -0x8(%ebp),%esp
1178a4: 5b pop %ebx
1178a5: 5e pop %esi
1178a6: 5d pop %ebp
1178a7: c3 ret
0010ee01 <msdos_unlock>:
rtems_fatal_error_occurred(0xdeadbeef);
}
}
void msdos_unlock(const rtems_filesystem_mount_table_entry_t *mt_entry)
{
10ee01: 55 push %ebp
10ee02: 89 e5 mov %esp,%ebp
10ee04: 83 ec 14 sub $0x14,%esp
msdos_fs_info_t *fs_info = mt_entry->fs_info;
rtems_status_code sc = rtems_semaphore_release(fs_info->vol_sema);
10ee07: 8b 45 08 mov 0x8(%ebp),%eax
10ee0a: 8b 40 08 mov 0x8(%eax),%eax
10ee0d: ff b0 90 00 00 00 pushl 0x90(%eax)
10ee13: e8 3c c1 ff ff call 10af54 <rtems_semaphore_release>
if (sc != RTEMS_SUCCESSFUL) {
10ee18: 83 c4 10 add $0x10,%esp
10ee1b: 85 c0 test %eax,%eax
10ee1d: 74 0d je 10ee2c <msdos_unlock+0x2b> <== ALWAYS TAKEN
rtems_fatal_error_occurred(0xdeadbeef);
10ee1f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10ee22: 68 ef be ad de push $0xdeadbeef <== NOT EXECUTED
10ee27: e8 24 c6 ff ff call 10b450 <rtems_fatal_error_occurred><== NOT EXECUTED
}
}
10ee2c: c9 leave
10ee2d: c3 ret
00106f3d <newlib_create_hook>:
*/
bool newlib_create_hook(
rtems_tcb *current_task __attribute__((unused)),
rtems_tcb *creating_task
)
{
106f3d: 55 push %ebp
106f3e: 89 e5 mov %esp,%ebp
106f40: 57 push %edi
106f41: 56 push %esi
106f42: 53 push %ebx
106f43: 83 ec 1c sub $0x1c,%esp
struct _reent *ptr;
if (_Thread_libc_reent == 0)
106f46: 83 3d 5c e4 12 00 00 cmpl $0x0,0x12e45c
106f4d: 75 14 jne 106f63 <newlib_create_hook+0x26>
{
_REENT = _global_impure_ptr;
106f4f: a1 60 04 12 00 mov 0x120460,%eax
106f54: a3 a0 c2 12 00 mov %eax,0x12c2a0
RTEMS_INLINE_ROUTINE void _Thread_Set_libc_reent (
struct _reent **libc_reent
)
{
_Thread_libc_reent = libc_reent;
106f59: c7 05 5c e4 12 00 a0 movl $0x12c2a0,0x12e45c
106f60: c2 12 00
ptr = (struct _reent *) calloc(1, sizeof(struct _reent));
#else
/* It is OK to allocate from the workspace because these
* hooks run with thread dispatching disabled.
*/
ptr = (struct _reent *) _Workspace_Allocate(sizeof(struct _reent));
106f63: 83 ec 0c sub $0xc,%esp
106f66: 68 24 04 00 00 push $0x424
106f6b: e8 d4 5b 00 00 call 10cb44 <_Workspace_Allocate>
106f70: 89 c2 mov %eax,%edx
#endif
if (ptr) {
106f72: 83 c4 10 add $0x10,%esp
106f75: 85 c0 test %eax,%eax
106f77: 0f 84 28 02 00 00 je 1071a5 <newlib_create_hook+0x268><== NEVER TAKEN
_REENT_INIT_PTR((ptr)); /* GCC extension: structure constants */
106f7d: c7 00 00 00 00 00 movl $0x0,(%eax)
106f83: 8d 98 ec 02 00 00 lea 0x2ec(%eax),%ebx
106f89: 89 58 04 mov %ebx,0x4(%eax)
106f8c: 8d 80 54 03 00 00 lea 0x354(%eax),%eax
106f92: 89 42 08 mov %eax,0x8(%edx)
106f95: 8d 82 bc 03 00 00 lea 0x3bc(%edx),%eax
106f9b: 89 42 0c mov %eax,0xc(%edx)
106f9e: c7 42 10 00 00 00 00 movl $0x0,0x10(%edx)
106fa5: 8d 72 14 lea 0x14(%edx),%esi
106fa8: 31 c0 xor %eax,%eax
106faa: 89 f7 mov %esi,%edi
106fac: b9 19 00 00 00 mov $0x19,%ecx
106fb1: f3 aa rep stos %al,%es:(%edi)
106fb3: 89 4d e4 mov %ecx,-0x1c(%ebp)
106fb6: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx)
106fbd: c7 42 34 df ef 11 00 movl $0x11efdf,0x34(%edx)
106fc4: c7 42 38 00 00 00 00 movl $0x0,0x38(%edx)
106fcb: c7 42 3c 00 00 00 00 movl $0x0,0x3c(%edx)
106fd2: c7 42 40 00 00 00 00 movl $0x0,0x40(%edx)
106fd9: c7 42 44 00 00 00 00 movl $0x0,0x44(%edx)
106fe0: c7 42 48 00 00 00 00 movl $0x0,0x48(%edx)
106fe7: c7 42 4c 00 00 00 00 movl $0x0,0x4c(%edx)
106fee: c7 42 50 00 00 00 00 movl $0x0,0x50(%edx)
106ff5: c7 42 54 00 00 00 00 movl $0x0,0x54(%edx)
106ffc: c7 42 58 00 00 00 00 movl $0x0,0x58(%edx)
107003: c7 42 5c 00 00 00 00 movl $0x0,0x5c(%edx)
10700a: c6 42 60 00 movb $0x0,0x60(%edx)
10700e: 8d 72 7c lea 0x7c(%edx),%esi
107011: b1 09 mov $0x9,%cl
107013: 89 f7 mov %esi,%edi
107015: 31 c0 xor %eax,%eax
107017: f3 ab rep stos %eax,%es:(%edi)
107019: c7 82 a0 00 00 00 00 movl $0x0,0xa0(%edx)
107020: 00 00 00
107023: c7 82 a4 00 00 00 01 movl $0x1,0xa4(%edx)
10702a: 00 00 00
10702d: c7 82 a8 00 00 00 00 movl $0x0,0xa8(%edx)
107034: 00 00 00
107037: 66 c7 82 ac 00 00 00 movw $0x330e,0xac(%edx)
10703e: 0e 33
107040: 66 c7 82 ae 00 00 00 movw $0xabcd,0xae(%edx)
107047: cd ab
107049: 66 c7 82 b0 00 00 00 movw $0x1234,0xb0(%edx)
107050: 34 12
107052: 66 c7 82 b2 00 00 00 movw $0xe66d,0xb2(%edx)
107059: 6d e6
10705b: 66 c7 82 b4 00 00 00 movw $0xdeec,0xb4(%edx)
107062: ec de
107064: 66 c7 82 b6 00 00 00 movw $0x5,0xb6(%edx)
10706b: 05 00
10706d: 66 c7 82 b8 00 00 00 movw $0xb,0xb8(%edx)
107074: 0b 00
107076: c7 82 bc 00 00 00 00 movl $0x0,0xbc(%edx)
10707d: 00 00 00
107080: c7 82 c0 00 00 00 00 movl $0x0,0xc0(%edx)
107087: 00 00 00
10708a: c7 82 c4 00 00 00 00 movl $0x0,0xc4(%edx)
107091: 00 00 00
107094: c7 82 c8 00 00 00 00 movl $0x0,0xc8(%edx)
10709b: 00 00 00
10709e: c7 82 cc 00 00 00 00 movl $0x0,0xcc(%edx)
1070a5: 00 00 00
1070a8: c7 82 d0 00 00 00 00 movl $0x0,0xd0(%edx)
1070af: 00 00 00
1070b2: c7 82 f8 00 00 00 00 movl $0x0,0xf8(%edx)
1070b9: 00 00 00
1070bc: c7 82 fc 00 00 00 00 movl $0x0,0xfc(%edx)
1070c3: 00 00 00
1070c6: c7 82 00 01 00 00 00 movl $0x0,0x100(%edx)
1070cd: 00 00 00
1070d0: c7 82 04 01 00 00 00 movl $0x0,0x104(%edx)
1070d7: 00 00 00
1070da: c7 82 08 01 00 00 00 movl $0x0,0x108(%edx)
1070e1: 00 00 00
1070e4: c7 82 0c 01 00 00 00 movl $0x0,0x10c(%edx)
1070eb: 00 00 00
1070ee: c7 82 10 01 00 00 00 movl $0x0,0x110(%edx)
1070f5: 00 00 00
1070f8: c7 82 14 01 00 00 00 movl $0x0,0x114(%edx)
1070ff: 00 00 00
107102: c7 82 18 01 00 00 00 movl $0x0,0x118(%edx)
107109: 00 00 00
10710c: c7 82 1c 01 00 00 00 movl $0x0,0x11c(%edx)
107113: 00 00 00
107116: c6 82 d4 00 00 00 00 movb $0x0,0xd4(%edx)
10711d: c6 82 dc 00 00 00 00 movb $0x0,0xdc(%edx)
107124: c7 82 f4 00 00 00 00 movl $0x0,0xf4(%edx)
10712b: 00 00 00
10712e: c7 82 48 01 00 00 00 movl $0x0,0x148(%edx)
107135: 00 00 00
107138: c7 82 4c 01 00 00 00 movl $0x0,0x14c(%edx)
10713f: 00 00 00
107142: c7 82 50 01 00 00 00 movl $0x0,0x150(%edx)
107149: 00 00 00
10714c: c7 82 54 01 00 00 00 movl $0x0,0x154(%edx)
107153: 00 00 00
107156: c7 82 d4 02 00 00 00 movl $0x0,0x2d4(%edx)
10715d: 00 00 00
107160: c7 82 d4 01 00 00 00 movl $0x0,0x1d4(%edx)
107167: 00 00 00
10716a: c7 82 dc 02 00 00 00 movl $0x0,0x2dc(%edx)
107171: 00 00 00
107174: c7 82 e0 02 00 00 00 movl $0x0,0x2e0(%edx)
10717b: 00 00 00
10717e: c7 82 e4 02 00 00 00 movl $0x0,0x2e4(%edx)
107185: 00 00 00
107188: c7 82 e8 02 00 00 00 movl $0x0,0x2e8(%edx)
10718f: 00 00 00
107192: b1 4e mov $0x4e,%cl
107194: 89 df mov %ebx,%edi
107196: f3 ab rep stos %eax,%es:(%edi)
creating_task->libc_reent = ptr;
107198: 8b 45 0c mov 0xc(%ebp),%eax
10719b: 89 90 e0 00 00 00 mov %edx,0xe0(%eax)
return TRUE;
1071a1: b0 01 mov $0x1,%al
1071a3: eb 02 jmp 1071a7 <newlib_create_hook+0x26a>
}
return FALSE;
1071a5: 31 c0 xor %eax,%eax
}
1071a7: 8d 65 f4 lea -0xc(%ebp),%esp
1071aa: 5b pop %ebx
1071ab: 5e pop %esi
1071ac: 5f pop %edi
1071ad: 5d pop %ebp
1071ae: c3 ret
001071af <newlib_delete_hook>:
void newlib_delete_hook(
rtems_tcb *current_task,
rtems_tcb *deleted_task
)
{
1071af: 55 push %ebp
1071b0: 89 e5 mov %esp,%ebp
1071b2: 56 push %esi
1071b3: 53 push %ebx
1071b4: 8b 75 0c mov 0xc(%ebp),%esi
/*
* The reentrancy structure was allocated by newlib using malloc()
*/
if (current_task == deleted_task) {
ptr = _REENT;
1071b7: 8b 1d a0 c2 12 00 mov 0x12c2a0,%ebx
/*
* The reentrancy structure was allocated by newlib using malloc()
*/
if (current_task == deleted_task) {
1071bd: 39 75 08 cmp %esi,0x8(%ebp)
1071c0: 74 06 je 1071c8 <newlib_delete_hook+0x19>
ptr = _REENT;
} else {
ptr = deleted_task->libc_reent;
1071c2: 8b 9e e0 00 00 00 mov 0xe0(%esi),%ebx
}
if (ptr && ptr != _global_impure_ptr) {
1071c8: 85 db test %ebx,%ebx
1071ca: 74 20 je 1071ec <newlib_delete_hook+0x3d><== NEVER TAKEN
1071cc: 3b 1d 60 04 12 00 cmp 0x120460,%ebx
1071d2: 74 18 je 1071ec <newlib_delete_hook+0x3d>
_reclaim_reent(ptr);
*/
/*
* Just in case there are some buffers lying around.
*/
_fwalk(ptr, newlib_free_buffers);
1071d4: 50 push %eax
1071d5: 50 push %eax
1071d6: 68 ec 6e 10 00 push $0x106eec
1071db: 53 push %ebx
1071dc: e8 4f a4 00 00 call 111630 <_fwalk>
#if REENT_MALLOCED
free(ptr);
#else
_Workspace_Free(ptr);
1071e1: 89 1c 24 mov %ebx,(%esp)
1071e4: e8 74 59 00 00 call 10cb5d <_Workspace_Free>
1071e9: 83 c4 10 add $0x10,%esp
#endif
}
deleted_task->libc_reent = NULL;
1071ec: c7 86 e0 00 00 00 00 movl $0x0,0xe0(%esi)
1071f3: 00 00 00
/*
* Require the switch back to another task to install its own
*/
if ( current_task == deleted_task ) {
1071f6: 39 75 08 cmp %esi,0x8(%ebp)
1071f9: 75 0a jne 107205 <newlib_delete_hook+0x56>
_REENT = 0;
1071fb: c7 05 a0 c2 12 00 00 movl $0x0,0x12c2a0
107202: 00 00 00
}
}
107205: 8d 65 f8 lea -0x8(%ebp),%esp
107208: 5b pop %ebx
107209: 5e pop %esi
10720a: 5d pop %ebp
10720b: c3 ret
00106eec <newlib_free_buffers>:
*/
int newlib_free_buffers(
FILE *fp
)
{
106eec: 55 push %ebp
106eed: 89 e5 mov %esp,%ebp
106eef: 53 push %ebx
106ef0: 83 ec 10 sub $0x10,%esp
106ef3: 8b 5d 08 mov 0x8(%ebp),%ebx
switch ( fileno(fp) ) {
106ef6: 53 push %ebx
106ef7: e8 84 a3 00 00 call 111280 <fileno>
106efc: 83 c4 10 add $0x10,%esp
106eff: 83 f8 02 cmp $0x2,%eax
106f02: 77 26 ja 106f2a <newlib_free_buffers+0x3e><== NEVER TAKEN
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
106f04: f6 43 0c 80 testb $0x80,0xc(%ebx)
106f08: 74 2c je 106f36 <newlib_free_buffers+0x4a><== ALWAYS TAKEN
free( fp->_bf._base );
106f0a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
106f0d: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
106f10: e8 1f f8 ff ff call 106734 <free> <== NOT EXECUTED
fp->_flags &= ~__SMBF;
106f15: 66 81 63 0c 7f ff andw $0xff7f,0xc(%ebx) <== NOT EXECUTED
fp->_bf._base = fp->_p = (unsigned char *) NULL;
106f1b: c7 03 00 00 00 00 movl $0x0,(%ebx) <== NOT EXECUTED
106f21: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) <== NOT EXECUTED
106f28: eb 09 jmp 106f33 <newlib_free_buffers+0x47><== NOT EXECUTED
}
break;
default:
fclose(fp);
106f2a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
106f2d: 53 push %ebx <== NOT EXECUTED
106f2e: e8 c5 a0 00 00 call 110ff8 <fclose> <== NOT EXECUTED
106f33: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
return 0;
}
106f36: 31 c0 xor %eax,%eax
106f38: 8b 5d fc mov -0x4(%ebp),%ebx
106f3b: c9 leave
106f3c: c3 ret
001009ab <notify>:
void
notify (s)
char *s;
{
1009ab: 55 push %ebp <== NOT EXECUTED
1009ac: 89 e5 mov %esp,%ebp <== NOT EXECUTED
1009ae: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED
printf ("%s test appears to be inconsistent...\n", s);
1009b1: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
1009b4: 68 86 53 12 00 push $0x125386 <== NOT EXECUTED
1009b9: e8 e2 7d 01 00 call 1187a0 <printf> <== NOT EXECUTED
printf (" PLEASE NOTIFY KARPINKSI!\n");
1009be: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1009c1: c7 45 08 ad 53 12 00 movl $0x1253ad,0x8(%ebp) <== NOT EXECUTED
}
1009c8: c9 leave <== NOT EXECUTED
void
notify (s)
char *s;
{
printf ("%s test appears to be inconsistent...\n", s);
printf (" PLEASE NOTIFY KARPINKSI!\n");
1009c9: e9 ce 7e 01 00 jmp 11889c <puts> <== NOT EXECUTED
00109579 <null_op_fsmount_me>:
static int null_op_fsmount_me(
rtems_filesystem_mount_table_entry_t *mt_entry,
const void *data
)
{
109579: 55 push %ebp <== NOT EXECUTED
10957a: 89 e5 mov %esp,%ebp <== NOT EXECUTED
return -1;
}
10957c: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
10957f: 5d pop %ebp <== NOT EXECUTED
109580: c3 ret <== NOT EXECUTED
00109589 <null_op_fsunmount_me>:
static void null_op_fsunmount_me(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
109589: 55 push %ebp <== NOT EXECUTED
10958a: 89 e5 mov %esp,%ebp <== NOT EXECUTED
/* Do nothing */
}
10958c: 5d pop %ebp <== NOT EXECUTED
10958d: c3 ret <== NOT EXECUTED
00109551 <null_op_link>:
const rtems_filesystem_location_info_t *parentloc,
const rtems_filesystem_location_info_t *targetloc,
const char *name,
size_t namelen
)
{
109551: 55 push %ebp <== NOT EXECUTED
109552: 89 e5 mov %esp,%ebp <== NOT EXECUTED
return -1;
}
109554: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
109557: 5d pop %ebp <== NOT EXECUTED
109558: c3 ret <== NOT EXECUTED
00109571 <null_op_mount>:
static int null_op_mount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
109571: 55 push %ebp <== NOT EXECUTED
109572: 89 e5 mov %esp,%ebp <== NOT EXECUTED
return -1;
}
109574: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
109577: 5d pop %ebp <== NOT EXECUTED
109578: c3 ret <== NOT EXECUTED
0010959e <null_op_readlink>:
static ssize_t null_op_readlink(
const rtems_filesystem_location_info_t *loc,
char *buf,
size_t bufsize
)
{
10959e: 55 push %ebp <== NOT EXECUTED
10959f: 89 e5 mov %esp,%ebp <== NOT EXECUTED
return -1;
}
1095a1: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
1095a4: 5d pop %ebp <== NOT EXECUTED
1095a5: c3 ret <== NOT EXECUTED
001095a6 <null_op_rename>:
const rtems_filesystem_location_info_t *oldloc,
const rtems_filesystem_location_info_t *newparentloc,
const char *name,
size_t namelen
)
{
1095a6: 55 push %ebp <== NOT EXECUTED
1095a7: 89 e5 mov %esp,%ebp <== NOT EXECUTED
return -1;
}
1095a9: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
1095ac: 5d pop %ebp <== NOT EXECUTED
1095ad: c3 ret <== NOT EXECUTED
00106160 <null_write>:
rtems_device_driver null_write(
rtems_device_major_number major __attribute__((unused)),
rtems_device_minor_number minor __attribute__((unused)),
void *pargp
)
{
106160: 55 push %ebp
106161: 89 e5 mov %esp,%ebp
106163: 8b 45 10 mov 0x10(%ebp),%eax
rtems_libio_rw_args_t *rw_args = (rtems_libio_rw_args_t *) pargp;
if ( rw_args )
106166: 85 c0 test %eax,%eax
106168: 74 06 je 106170 <null_write+0x10> <== ALWAYS TAKEN
rw_args->bytes_moved = rw_args->count;
10616a: 8b 50 10 mov 0x10(%eax),%edx <== NOT EXECUTED
10616d: 89 50 18 mov %edx,0x18(%eax) <== NOT EXECUTED
return NULL_SUCCESSFUL;
}
106170: 31 c0 xor %eax,%eax
106172: 5d pop %ebp
106173: c3 ret
001089d1 <oproc>:
/*
* Handle output processing
*/
static void
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
1089d1: 55 push %ebp
1089d2: 89 e5 mov %esp,%ebp
1089d4: 56 push %esi
1089d5: 53 push %ebx
1089d6: 83 ec 10 sub $0x10,%esp
1089d9: 89 d3 mov %edx,%ebx
1089db: 88 45 f4 mov %al,-0xc(%ebp)
int i;
if (tty->termios.c_oflag & OPOST) {
1089de: 8b 52 34 mov 0x34(%edx),%edx
1089e1: f6 c2 01 test $0x1,%dl
1089e4: 0f 84 e7 00 00 00 je 108ad1 <oproc+0x100> <== NEVER TAKEN
switch (c) {
1089ea: 3c 09 cmp $0x9,%al
1089ec: 74 75 je 108a63 <oproc+0x92>
1089ee: 77 0d ja 1089fd <oproc+0x2c> <== ALWAYS TAKEN
1089f0: 3c 08 cmp $0x8,%al <== NOT EXECUTED
1089f2: 0f 85 a5 00 00 00 jne 108a9d <oproc+0xcc> <== NOT EXECUTED
1089f8: e9 93 00 00 00 jmp 108a90 <oproc+0xbf> <== NOT EXECUTED
1089fd: 3c 0a cmp $0xa,%al
1089ff: 74 0a je 108a0b <oproc+0x3a>
108a01: 3c 0d cmp $0xd,%al
108a03: 0f 85 94 00 00 00 jne 108a9d <oproc+0xcc> <== ALWAYS TAKEN
108a09: eb 32 jmp 108a3d <oproc+0x6c> <== NOT EXECUTED
case '\n':
if (tty->termios.c_oflag & ONLRET)
108a0b: f6 c2 20 test $0x20,%dl
108a0e: 74 07 je 108a17 <oproc+0x46> <== ALWAYS TAKEN
tty->column = 0;
108a10: c7 43 28 00 00 00 00 movl $0x0,0x28(%ebx) <== NOT EXECUTED
if (tty->termios.c_oflag & ONLCR) {
108a17: 80 e2 04 and $0x4,%dl
108a1a: 0f 84 b1 00 00 00 je 108ad1 <oproc+0x100> <== NEVER TAKEN
rtems_termios_puts ("\r", 1, tty);
108a20: 51 push %ecx
108a21: 53 push %ebx
108a22: 6a 01 push $0x1
108a24: 68 14 fa 11 00 push $0x11fa14
108a29: e8 97 fe ff ff call 1088c5 <rtems_termios_puts>
tty->column = 0;
108a2e: c7 43 28 00 00 00 00 movl $0x0,0x28(%ebx)
108a35: 83 c4 10 add $0x10,%esp
108a38: e9 94 00 00 00 jmp 108ad1 <oproc+0x100>
}
break;
case '\r':
if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0))
108a3d: f6 c2 10 test $0x10,%dl <== NOT EXECUTED
108a40: 74 0a je 108a4c <oproc+0x7b> <== NOT EXECUTED
108a42: 83 7b 28 00 cmpl $0x0,0x28(%ebx) <== NOT EXECUTED
108a46: 0f 84 95 00 00 00 je 108ae1 <oproc+0x110> <== NOT EXECUTED
return;
if (tty->termios.c_oflag & OCRNL) {
108a4c: f6 c2 08 test $0x8,%dl <== NOT EXECUTED
108a4f: 74 09 je 108a5a <oproc+0x89> <== NOT EXECUTED
c = '\n';
108a51: c6 45 f4 0a movb $0xa,-0xc(%ebp) <== NOT EXECUTED
if (tty->termios.c_oflag & ONLRET)
108a55: 80 e2 20 and $0x20,%dl <== NOT EXECUTED
108a58: 74 77 je 108ad1 <oproc+0x100> <== NOT EXECUTED
tty->column = 0;
break;
}
tty->column = 0;
108a5a: c7 43 28 00 00 00 00 movl $0x0,0x28(%ebx) <== NOT EXECUTED
break;
108a61: eb 6e jmp 108ad1 <oproc+0x100> <== NOT EXECUTED
case '\t':
i = 8 - (tty->column & 7);
108a63: 8b 4b 28 mov 0x28(%ebx),%ecx
108a66: 89 ce mov %ecx,%esi
108a68: 83 e6 07 and $0x7,%esi
108a6b: b8 08 00 00 00 mov $0x8,%eax
108a70: 29 f0 sub %esi,%eax
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
108a72: 81 e2 00 18 00 00 and $0x1800,%edx
108a78: 81 fa 00 18 00 00 cmp $0x1800,%edx
108a7e: 8d 14 01 lea (%ecx,%eax,1),%edx
tty->column += i;
108a81: 89 53 28 mov %edx,0x28(%ebx)
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
108a84: 75 4b jne 108ad1 <oproc+0x100> <== NEVER TAKEN
tty->column += i;
rtems_termios_puts ( " ", i, tty);
108a86: 52 push %edx
108a87: 53 push %ebx
108a88: 50 push %eax
108a89: 68 74 ee 11 00 push $0x11ee74
108a8e: eb 49 jmp 108ad9 <oproc+0x108>
}
tty->column += i;
break;
case '\b':
if (tty->column > 0)
108a90: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED
108a93: 85 c0 test %eax,%eax <== NOT EXECUTED
108a95: 7e 3a jle 108ad1 <oproc+0x100> <== NOT EXECUTED
tty->column--;
108a97: 48 dec %eax <== NOT EXECUTED
108a98: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED
108a9b: eb 34 jmp 108ad1 <oproc+0x100> <== NOT EXECUTED
break;
default:
if (tty->termios.c_oflag & OLCUC)
108a9d: 80 e2 02 and $0x2,%dl
108aa0: 74 1b je 108abd <oproc+0xec> <== ALWAYS TAKEN
c = toupper(c);
108aa2: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED
108aa5: 8b 15 88 c2 12 00 mov 0x12c288,%edx <== NOT EXECUTED
108aab: 8a 54 02 01 mov 0x1(%edx,%eax,1),%dl <== NOT EXECUTED
108aaf: 83 e2 03 and $0x3,%edx <== NOT EXECUTED
108ab2: 80 fa 02 cmp $0x2,%dl <== NOT EXECUTED
108ab5: 75 03 jne 108aba <oproc+0xe9> <== NOT EXECUTED
108ab7: 83 e8 20 sub $0x20,%eax <== NOT EXECUTED
108aba: 88 45 f4 mov %al,-0xc(%ebp) <== NOT EXECUTED
if (!iscntrl(c))
108abd: 0f b6 45 f4 movzbl -0xc(%ebp),%eax
108ac1: 8b 15 88 c2 12 00 mov 0x12c288,%edx
108ac7: f6 44 02 01 20 testb $0x20,0x1(%edx,%eax,1)
108acc: 75 03 jne 108ad1 <oproc+0x100> <== NEVER TAKEN
tty->column++;
108ace: ff 43 28 incl 0x28(%ebx)
break;
}
}
rtems_termios_puts (&c, 1, tty);
108ad1: 56 push %esi
108ad2: 53 push %ebx
108ad3: 6a 01 push $0x1
108ad5: 8d 45 f4 lea -0xc(%ebp),%eax
108ad8: 50 push %eax
108ad9: e8 e7 fd ff ff call 1088c5 <rtems_termios_puts>
108ade: 83 c4 10 add $0x10,%esp
}
108ae1: 8d 65 f8 lea -0x8(%ebp),%esp
108ae4: 5b pop %ebx
108ae5: 5e pop %esi
108ae6: 5d pop %ebp
108ae7: c3 ret
00107694 <partition_free>:
* RETURNS:
* N/A
*/
static void
partition_free(rtems_part_desc_t *part_desc)
{
107694: 55 push %ebp
107695: 89 e5 mov %esp,%ebp
107697: 56 push %esi
107698: 53 push %ebx
107699: 89 c3 mov %eax,%ebx
int part_num;
if (part_desc == NULL)
10769b: 85 c0 test %eax,%eax
10769d: 74 2b je 1076ca <partition_free+0x36>
* true if partition type is extended, false otherwise
*/
static bool
is_extended(uint8_t type)
{
return ((type == EXTENDED_PARTITION) || (type == LINUX_EXTENDED));
10769f: 8a 40 01 mov 0x1(%eax),%al
1076a2: 83 e0 7f and $0x7f,%eax
int part_num;
if (part_desc == NULL)
return;
if (is_extended(part_desc->sys_type))
1076a5: 3c 05 cmp $0x5,%al
1076a7: 74 0e je 1076b7 <partition_free+0x23> <== NEVER TAKEN
{
partition_free(part_desc->sub_part[part_num]);
}
}
free(part_desc);
1076a9: 83 ec 0c sub $0xc,%esp
1076ac: 53 push %ebx
1076ad: e8 76 0d 00 00 call 108428 <free>
1076b2: 83 c4 10 add $0x10,%esp
1076b5: eb 13 jmp 1076ca <partition_free+0x36>
int part_num;
if (part_desc == NULL)
return;
if (is_extended(part_desc->sys_type))
1076b7: 31 f6 xor %esi,%esi
{
for (part_num = 0;
part_num < RTEMS_IDE_PARTITION_MAX_SUB_PARTITION_NUMBER;
part_num++)
{
partition_free(part_desc->sub_part[part_num]);
1076b9: 8b 44 b3 18 mov 0x18(%ebx,%esi,4),%eax <== NOT EXECUTED
1076bd: e8 d2 ff ff ff call 107694 <partition_free> <== NOT EXECUTED
if (is_extended(part_desc->sys_type))
{
for (part_num = 0;
part_num < RTEMS_IDE_PARTITION_MAX_SUB_PARTITION_NUMBER;
part_num++)
1076c2: 46 inc %esi <== NOT EXECUTED
if (part_desc == NULL)
return;
if (is_extended(part_desc->sys_type))
{
for (part_num = 0;
1076c3: 83 fe 04 cmp $0x4,%esi <== NOT EXECUTED
1076c6: 75 f1 jne 1076b9 <partition_free+0x25> <== NOT EXECUTED
1076c8: eb df jmp 1076a9 <partition_free+0x15> <== NOT EXECUTED
partition_free(part_desc->sub_part[part_num]);
}
}
free(part_desc);
}
1076ca: 8d 65 f8 lea -0x8(%ebp),%esp
1076cd: 5b pop %ebx
1076ce: 5e pop %esi
1076cf: 5d pop %ebp
1076d0: c3 ret
0010793e <partition_table_get>:
* RTEMS_SUCCESSFUL if success,
* RTEMS_INTERNAL_ERROR otherwise
*/
static rtems_status_code
partition_table_get(const char *dev_name, rtems_disk_desc_t *disk_desc)
{
10793e: 55 push %ebp
10793f: 89 e5 mov %esp,%ebp
107941: 57 push %edi
107942: 56 push %esi
107943: 53 push %ebx
107944: 83 ec 74 sub $0x74,%esp
107947: 89 c6 mov %eax,%esi
107949: 89 d3 mov %edx,%ebx
struct stat dev_stat;
rtems_status_code rc;
int fd;
fd = open(dev_name, O_RDONLY);
10794b: 6a 00 push $0x0
10794d: 50 push %eax
10794e: e8 65 18 00 00 call 1091b8 <open>
107953: 89 45 94 mov %eax,-0x6c(%ebp)
if (fd < 0)
107956: 83 c4 10 add $0x10,%esp
107959: 85 c0 test %eax,%eax
10795b: 0f 88 95 01 00 00 js 107af6 <partition_table_get+0x1b8><== NEVER TAKEN
{
return RTEMS_INTERNAL_ERROR;
}
rc = fstat(fd, &dev_stat);
107961: 57 push %edi
107962: 57 push %edi
107963: 8d 45 a0 lea -0x60(%ebp),%eax
107966: 50 push %eax
107967: ff 75 94 pushl -0x6c(%ebp)
10796a: e8 31 0b 00 00 call 1084a0 <fstat>
if (rc != RTEMS_SUCCESSFUL)
10796f: 83 c4 10 add $0x10,%esp
107972: 85 c0 test %eax,%eax
107974: 74 13 je 107989 <partition_table_get+0x4b><== ALWAYS TAKEN
{
close(fd);
107976: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107979: ff 75 94 pushl -0x6c(%ebp) <== NOT EXECUTED
10797c: e8 77 08 00 00 call 1081f8 <close> <== NOT EXECUTED
107981: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
107984: e9 6d 01 00 00 jmp 107af6 <partition_table_get+0x1b8><== NOT EXECUTED
return RTEMS_INTERNAL_ERROR;
}
strncpy (disk_desc->dev_name, dev_name, 15);
107989: 51 push %ecx
10798a: 6a 0f push $0xf
10798c: 56 push %esi
10798d: 8d 43 08 lea 0x8(%ebx),%eax
107990: 50 push %eax
107991: e8 f6 ed 00 00 call 11678c <strncpy>
disk_desc->dev = dev_stat.st_rdev;
107996: 8b 45 b8 mov -0x48(%ebp),%eax
107999: 8b 55 bc mov -0x44(%ebp),%edx
10799c: 89 03 mov %eax,(%ebx)
10799e: 89 53 04 mov %edx,0x4(%ebx)
disk_desc->sector_size = (dev_stat.st_blksize) ? dev_stat.st_blksize :
1079a1: 8b 55 e0 mov -0x20(%ebp),%edx
1079a4: 83 c4 10 add $0x10,%esp
1079a7: b8 00 02 00 00 mov $0x200,%eax
1079ac: 85 d2 test %edx,%edx
1079ae: 74 02 je 1079b2 <partition_table_get+0x74><== ALWAYS TAKEN
1079b0: 89 d0 mov %edx,%eax <== NOT EXECUTED
1079b2: 89 43 18 mov %eax,0x18(%ebx)
*/
static rtems_status_code
read_mbr(int fd, rtems_disk_desc_t *disk_desc)
{
int part_num;
rtems_sector_data_t *sector = NULL;
1079b5: c7 45 98 00 00 00 00 movl $0x0,-0x68(%ebp)
{
return RTEMS_INTERNAL_ERROR;
}
off = sector_num * RTEMS_IDE_SECTOR_SIZE;
new_off = lseek(fd, off, SEEK_SET);
1079bc: 6a 00 push $0x0
1079be: 6a 00 push $0x0
1079c0: 6a 00 push $0x0
1079c2: ff 75 94 pushl -0x6c(%ebp)
1079c5: e8 d2 0d 00 00 call 10879c <lseek>
if (new_off != off) {
1079ca: 83 c4 10 add $0x10,%esp
return RTEMS_IO_ERROR;
1079cd: be 1b 00 00 00 mov $0x1b,%esi
return RTEMS_INTERNAL_ERROR;
}
off = sector_num * RTEMS_IDE_SECTOR_SIZE;
new_off = lseek(fd, off, SEEK_SET);
if (new_off != off) {
1079d2: 09 c2 or %eax,%edx
1079d4: 75 13 jne 1079e9 <partition_table_get+0xab><== NEVER TAKEN
1079d6: 8d 4d 98 lea -0x68(%ebp),%ecx
1079d9: 31 d2 xor %edx,%edx
1079db: 8b 45 94 mov -0x6c(%ebp),%eax
1079de: e8 19 fd ff ff call 1076fc <get_sector.part.0>
1079e3: 89 c6 mov %eax,%esi
uint8_t *data;
rtems_status_code rc;
/* get MBR sector */
rc = get_sector(fd, 0, §or);
if (rc != RTEMS_SUCCESSFUL)
1079e5: 85 c0 test %eax,%eax
1079e7: 74 11 je 1079fa <partition_table_get+0xbc><== ALWAYS TAKEN
{
if (sector)
1079e9: 8b 45 98 mov -0x68(%ebp),%eax <== NOT EXECUTED
1079ec: 85 c0 test %eax,%eax <== NOT EXECUTED
1079ee: 0f 84 f2 00 00 00 je 107ae6 <partition_table_get+0x1a8><== NOT EXECUTED
free(sector);
1079f4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1079f7: 50 push %eax <== NOT EXECUTED
1079f8: eb 5b jmp 107a55 <partition_table_get+0x117><== NOT EXECUTED
return rc;
}
/* check if the partition table structure is MS-DOS style */
if (!msdos_signature_check(sector))
1079fa: 8b 4d 98 mov -0x68(%ebp),%ecx
static bool
msdos_signature_check (rtems_sector_data_t *sector)
{
uint8_t *p = sector->data + RTEMS_IDE_PARTITION_MSDOS_SIGNATURE_OFFSET;
return ((p[0] == RTEMS_IDE_PARTITION_MSDOS_SIGNATURE_DATA1) &&
1079fd: 31 c0 xor %eax,%eax
1079ff: 80 b9 02 02 00 00 55 cmpb $0x55,0x202(%ecx)
107a06: 75 0c jne 107a14 <partition_table_get+0xd6><== NEVER TAKEN
107a08: 31 c0 xor %eax,%eax
107a0a: 80 b9 03 02 00 00 aa cmpb $0xaa,0x203(%ecx)
107a11: 0f 94 c0 sete %al
free(sector);
return rc;
}
/* check if the partition table structure is MS-DOS style */
if (!msdos_signature_check(sector))
107a14: 85 c0 test %eax,%eax
107a16: 75 16 jne 107a2e <partition_table_get+0xf0><== ALWAYS TAKEN
{
free(sector);
107a18: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107a1b: 51 push %ecx <== NOT EXECUTED
107a1c: e8 07 0a 00 00 call 108428 <free> <== NOT EXECUTED
107a21: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
return RTEMS_INTERNAL_ERROR;
107a24: be 19 00 00 00 mov $0x19,%esi <== NOT EXECUTED
107a29: e9 b8 00 00 00 jmp 107ae6 <partition_table_get+0x1a8><== NOT EXECUTED
}
/* read and process 4 primary partition descriptors */
data = sector->data + RTEMS_IDE_PARTITION_TABLE_OFFSET;
107a2e: 81 c1 c2 01 00 00 add $0x1c2,%ecx
107a34: bf 01 00 00 00 mov $0x1,%edi
107a39: 8d 55 9c lea -0x64(%ebp),%edx
107a3c: 89 c8 mov %ecx,%eax
107a3e: 89 4d 90 mov %ecx,-0x70(%ebp)
107a41: e8 20 fd ff ff call 107766 <data_to_part_desc.part.1>
107a46: 89 c6 mov %eax,%esi
for (part_num = 0;
part_num < RTEMS_IDE_PARTITION_MAX_SUB_PARTITION_NUMBER;
part_num++)
{
rc = data_to_part_desc(data, &part_desc);
if (rc != RTEMS_SUCCESSFUL)
107a48: 85 c0 test %eax,%eax
107a4a: 8b 4d 90 mov -0x70(%ebp),%ecx
107a4d: 74 13 je 107a62 <partition_table_get+0x124><== ALWAYS TAKEN
{
free(sector);
107a4f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107a52: ff 75 98 pushl -0x68(%ebp) <== NOT EXECUTED
107a55: e8 ce 09 00 00 call 108428 <free> <== NOT EXECUTED
107a5a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
107a5d: e9 84 00 00 00 jmp 107ae6 <partition_table_get+0x1a8><== NOT EXECUTED
return rc;
}
if (part_desc != NULL)
107a62: 8b 45 9c mov -0x64(%ebp),%eax
107a65: 85 c0 test %eax,%eax
107a67: 74 18 je 107a81 <partition_table_get+0x143><== NEVER TAKEN
{
part_desc->log_id = part_num + 1;
107a69: 89 fa mov %edi,%edx
107a6b: 88 50 02 mov %dl,0x2(%eax)
part_desc->disk_desc = disk_desc;
107a6e: 89 58 10 mov %ebx,0x10(%eax)
part_desc->end = part_desc->start + part_desc->size - 1;
107a71: 8b 50 04 mov 0x4(%eax),%edx
107a74: 03 50 08 add 0x8(%eax),%edx
107a77: 4a dec %edx
107a78: 89 50 0c mov %edx,0xc(%eax)
disk_desc->partitions[part_num] = part_desc;
107a7b: 89 44 bb 24 mov %eax,0x24(%ebx,%edi,4)
107a7f: eb 08 jmp 107a89 <partition_table_get+0x14b>
}
else
{
disk_desc->partitions[part_num] = NULL;
107a81: c7 44 bb 24 00 00 00 movl $0x0,0x24(%ebx,%edi,4) <== NOT EXECUTED
107a88: 00
}
data += RTEMS_IDE_PARTITION_DESCRIPTOR_SIZE;
107a89: 83 c1 10 add $0x10,%ecx
107a8c: 47 inc %edi
/* read and process 4 primary partition descriptors */
data = sector->data + RTEMS_IDE_PARTITION_TABLE_OFFSET;
for (part_num = 0;
107a8d: 83 ff 05 cmp $0x5,%edi
107a90: 75 a7 jne 107a39 <partition_table_get+0xfb>
}
data += RTEMS_IDE_PARTITION_DESCRIPTOR_SIZE;
}
free(sector);
107a92: 83 ec 0c sub $0xc,%esp
107a95: ff 75 98 pushl -0x68(%ebp)
107a98: e8 8b 09 00 00 call 108428 <free>
disk_desc->last_log_id = RTEMS_IDE_PARTITION_MAX_SUB_PARTITION_NUMBER;
107a9d: c7 43 24 04 00 00 00 movl $0x4,0x24(%ebx)
107aa4: 83 c4 10 add $0x10,%esp
/* There cannot be more than one extended partition,
but we are to process each primary partition */
for (part_num = 0;
107aa7: 66 31 ff xor %di,%di
part_num < RTEMS_IDE_PARTITION_MAX_SUB_PARTITION_NUMBER;
part_num++)
{
part_desc = disk_desc->partitions[part_num];
107aaa: 8b 4c bb 28 mov 0x28(%ebx,%edi,4),%ecx
107aae: 89 4d 9c mov %ecx,-0x64(%ebp)
if (part_desc != NULL && is_extended(part_desc->sys_type))
107ab1: 85 c9 test %ecx,%ecx
107ab3: 74 2b je 107ae0 <partition_table_get+0x1a2><== NEVER TAKEN
* true if partition type is extended, false otherwise
*/
static bool
is_extended(uint8_t type)
{
return ((type == EXTENDED_PARTITION) || (type == LINUX_EXTENDED));
107ab5: 8a 41 01 mov 0x1(%ecx),%al
107ab8: 83 e0 7f and $0x7f,%eax
for (part_num = 0;
part_num < RTEMS_IDE_PARTITION_MAX_SUB_PARTITION_NUMBER;
part_num++)
{
part_desc = disk_desc->partitions[part_num];
if (part_desc != NULL && is_extended(part_desc->sys_type))
107abb: 3c 05 cmp $0x5,%al
107abd: 75 21 jne 107ae0 <partition_table_get+0x1a2>
{
read_extended_partition(fd, part_desc->start, part_desc);
107abf: 8b 51 04 mov 0x4(%ecx),%edx
107ac2: 8b 45 94 mov -0x6c(%ebp),%eax
107ac5: e8 1c fd ff ff call 1077e6 <read_extended_partition>
free(part_desc);
107aca: 83 ec 0c sub $0xc,%esp
107acd: ff 75 9c pushl -0x64(%ebp)
107ad0: e8 53 09 00 00 call 108428 <free>
disk_desc->partitions[part_num] = NULL;
107ad5: c7 44 bb 28 00 00 00 movl $0x0,0x28(%ebx,%edi,4)
107adc: 00
107add: 83 c4 10 add $0x10,%esp
/* There cannot be more than one extended partition,
but we are to process each primary partition */
for (part_num = 0;
part_num < RTEMS_IDE_PARTITION_MAX_SUB_PARTITION_NUMBER;
part_num++)
107ae0: 47 inc %edi
disk_desc->last_log_id = RTEMS_IDE_PARTITION_MAX_SUB_PARTITION_NUMBER;
/* There cannot be more than one extended partition,
but we are to process each primary partition */
for (part_num = 0;
107ae1: 83 ff 04 cmp $0x4,%edi
107ae4: 75 c4 jne 107aaa <partition_table_get+0x16c>
disk_desc->sector_size = (dev_stat.st_blksize) ? dev_stat.st_blksize :
RTEMS_IDE_SECTOR_SIZE;
rc = read_mbr(fd, disk_desc);
close(fd);
107ae6: 83 ec 0c sub $0xc,%esp
107ae9: ff 75 94 pushl -0x6c(%ebp)
107aec: e8 07 07 00 00 call 1081f8 <close>
107af1: 83 c4 10 add $0x10,%esp
107af4: eb 05 jmp 107afb <partition_table_get+0x1bd>
int fd;
fd = open(dev_name, O_RDONLY);
if (fd < 0)
{
return RTEMS_INTERNAL_ERROR;
107af6: be 19 00 00 00 mov $0x19,%esi <== NOT EXECUTED
rc = read_mbr(fd, disk_desc);
close(fd);
return rc;
}
107afb: 89 f0 mov %esi,%eax
107afd: 8d 65 f4 lea -0xc(%ebp),%esp
107b00: 5b pop %ebx
107b01: 5e pop %esi
107b02: 5f pop %edi
107b03: 5d pop %ebp
107b04: c3 ret
00105140 <pathconf>:
long pathconf(
const char *path,
int name
)
{
105140: 55 push %ebp
105141: 89 e5 mov %esp,%ebp
105143: 56 push %esi
105144: 53 push %ebx
int status;
int fd;
fd = open( path, O_RDONLY );
105145: 52 push %edx
105146: 52 push %edx
105147: 6a 00 push $0x0
105149: ff 75 08 pushl 0x8(%ebp)
10514c: e8 1f fe ff ff call 104f70 <open>
105151: 89 c3 mov %eax,%ebx
if ( fd == -1 )
105153: 83 c4 10 add $0x10,%esp
105156: 83 f8 ff cmp $0xffffffff,%eax
105159: 74 1a je 105175 <pathconf+0x35> <== ALWAYS TAKEN
return -1;
status = fpathconf( fd, name );
10515b: 50 push %eax <== NOT EXECUTED
10515c: 50 push %eax <== NOT EXECUTED
10515d: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
105160: 53 push %ebx <== NOT EXECUTED
105161: e8 26 43 00 00 call 10948c <fpathconf> <== NOT EXECUTED
105166: 89 c6 mov %eax,%esi <== NOT EXECUTED
(void) close( fd );
105168: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED
10516b: e8 b8 42 00 00 call 109428 <close> <== NOT EXECUTED
return status;
105170: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
105173: eb 03 jmp 105178 <pathconf+0x38> <== NOT EXECUTED
int status;
int fd;
fd = open( path, O_RDONLY );
if ( fd == -1 )
return -1;
105175: 83 ce ff or $0xffffffff,%esi
status = fpathconf( fd, name );
(void) close( fd );
return status;
}
105178: 89 f0 mov %esi,%eax
10517a: 8d 65 f8 lea -0x8(%ebp),%esp
10517d: 5b pop %ebx
10517e: 5e pop %esi
10517f: 5d pop %ebp
105180: c3 ret
0010e5ac <pipe_create>:
* Called by pipe() to create an anonymous pipe.
*/
int pipe_create(
int filsdes[2]
)
{
10e5ac: 55 push %ebp
10e5ad: 89 e5 mov %esp,%ebp
10e5af: 57 push %edi
10e5b0: 56 push %esi
10e5b1: 53 push %ebx
10e5b2: 83 ec 24 sub $0x24,%esp
rtems_libio_t *iop;
int err = 0;
if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0)
10e5b5: 68 ff 01 00 00 push $0x1ff
10e5ba: 68 e0 0f 12 00 push $0x120fe0
10e5bf: e8 64 13 00 00 call 10f928 <rtems_mkdir>
10e5c4: 83 c4 10 add $0x10,%esp
10e5c7: 85 c0 test %eax,%eax
10e5c9: 0f 85 dc 00 00 00 jne 10e6ab <pipe_create+0xff>
return -1;
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
10e5cf: 8d 5d d9 lea -0x27(%ebp),%ebx
10e5d2: be e5 0f 12 00 mov $0x120fe5,%esi
10e5d7: b9 0a 00 00 00 mov $0xa,%ecx
10e5dc: 89 df mov %ebx,%edi
10e5de: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
10e5e0: 0f b7 05 d4 f0 12 00 movzwl 0x12f0d4,%eax
10e5e7: 8d 50 01 lea 0x1(%eax),%edx
10e5ea: 66 89 15 d4 f0 12 00 mov %dx,0x12f0d4
10e5f1: 51 push %ecx
10e5f2: 50 push %eax
10e5f3: 68 f0 0f 12 00 push $0x120ff0
10e5f8: 8d 45 e3 lea -0x1d(%ebp),%eax
10e5fb: 50 push %eax
10e5fc: e8 4b 49 00 00 call 112f4c <sprintf>
/* Try creating FIFO file until find an available file name */
while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) {
10e601: 5e pop %esi
10e602: 5f pop %edi
10e603: 68 80 01 00 00 push $0x180
10e608: 53 push %ebx
10e609: e8 da 10 00 00 call 10f6e8 <mkfifo>
10e60e: 83 c4 10 add $0x10,%esp
10e611: 85 c0 test %eax,%eax
10e613: 74 0a je 10e61f <pipe_create+0x73> <== ALWAYS TAKEN
if (errno != EEXIST){
10e615: e8 22 3e 00 00 call 11243c <__errno> <== NOT EXECUTED
10e61a: e9 8c 00 00 00 jmp 10e6ab <pipe_create+0xff> <== NOT EXECUTED
return -1;
/* sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); */
}
/* Non-blocking open to avoid waiting for writers */
filsdes[0] = open(fifopath, O_RDONLY | O_NONBLOCK);
10e61f: 52 push %edx
10e620: 52 push %edx
10e621: 68 00 40 00 00 push $0x4000
10e626: 53 push %ebx
10e627: e8 f4 94 ff ff call 107b20 <open>
10e62c: 8b 55 08 mov 0x8(%ebp),%edx
10e62f: 89 02 mov %eax,(%edx)
if (filsdes[0] < 0) {
10e631: 83 c4 10 add $0x10,%esp
10e634: 85 c0 test %eax,%eax
10e636: 79 0d jns 10e645 <pipe_create+0x99>
err = errno;
10e638: e8 ff 3d 00 00 call 11243c <__errno>
10e63d: 8b 30 mov (%eax),%esi
/* Delete file at errors, or else if pipe is successfully created
the file node will be deleted after it is closed by all. */
unlink(fifopath);
10e63f: 83 ec 0c sub $0xc,%esp
10e642: 53 push %ebx
10e643: eb 51 jmp 10e696 <pipe_create+0xea>
}
else {
/* Reset open file to blocking mode */
iop = rtems_libio_iop(filsdes[0]);
10e645: 31 d2 xor %edx,%edx
10e647: 3b 05 70 b2 12 00 cmp 0x12b270,%eax
10e64d: 73 09 jae 10e658 <pipe_create+0xac> <== NEVER TAKEN
10e64f: 6b d0 30 imul $0x30,%eax,%edx
10e652: 03 15 d8 f2 12 00 add 0x12f2d8,%edx
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
10e658: 83 62 0c fe andl $0xfffffffe,0xc(%edx)
filsdes[1] = open(fifopath, O_WRONLY);
10e65c: 50 push %eax
10e65d: 50 push %eax
10e65e: 6a 01 push $0x1
10e660: 8d 45 d9 lea -0x27(%ebp),%eax
10e663: 50 push %eax
10e664: e8 b7 94 ff ff call 107b20 <open>
10e669: 8b 55 08 mov 0x8(%ebp),%edx
10e66c: 89 42 04 mov %eax,0x4(%edx)
if (filsdes[1] < 0) {
10e66f: 83 c4 10 add $0x10,%esp
int pipe_create(
int filsdes[2]
)
{
rtems_libio_t *iop;
int err = 0;
10e672: 31 f6 xor %esi,%esi
iop = rtems_libio_iop(filsdes[0]);
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
filsdes[1] = open(fifopath, O_WRONLY);
if (filsdes[1] < 0) {
10e674: 85 c0 test %eax,%eax
10e676: 79 17 jns 10e68f <pipe_create+0xe3>
err = errno;
10e678: e8 bf 3d 00 00 call 11243c <__errno>
10e67d: 8b 30 mov (%eax),%esi
close(filsdes[0]);
10e67f: 83 ec 0c sub $0xc,%esp
10e682: 8b 55 08 mov 0x8(%ebp),%edx
10e685: ff 32 pushl (%edx)
10e687: e8 04 86 ff ff call 106c90 <close>
10e68c: 83 c4 10 add $0x10,%esp
}
unlink(fifopath);
10e68f: 83 ec 0c sub $0xc,%esp
10e692: 8d 45 d9 lea -0x27(%ebp),%eax
10e695: 50 push %eax
10e696: e8 39 ba ff ff call 10a0d4 <unlink>
10e69b: 83 c4 10 add $0x10,%esp
}
if(err != 0)
rtems_set_errno_and_return_minus_one(err);
return 0;
10e69e: 31 c0 xor %eax,%eax
err = errno;
close(filsdes[0]);
}
unlink(fifopath);
}
if(err != 0)
10e6a0: 85 f6 test %esi,%esi
10e6a2: 74 0a je 10e6ae <pipe_create+0x102>
rtems_set_errno_and_return_minus_one(err);
10e6a4: e8 93 3d 00 00 call 11243c <__errno>
10e6a9: 89 30 mov %esi,(%eax)
{
rtems_libio_t *iop;
int err = 0;
if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0)
return -1;
10e6ab: 83 c8 ff or $0xffffffff,%eax
unlink(fifopath);
}
if(err != 0)
rtems_set_errno_and_return_minus_one(err);
return 0;
}
10e6ae: 8d 65 f4 lea -0xc(%ebp),%esp
10e6b1: 5b pop %ebx
10e6b2: 5e pop %esi
10e6b3: 5f pop %edi
10e6b4: 5d pop %ebp
10e6b5: c3 ret
0010f877 <pipe_ioctl>:
pipe_control_t *pipe,
ioctl_command_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
10f877: 55 push %ebp
10f878: 89 e5 mov %esp,%ebp
10f87a: 56 push %esi
10f87b: 53 push %ebx
10f87c: 8b 5d 08 mov 0x8(%ebp),%ebx
10f87f: 8b 75 10 mov 0x10(%ebp),%esi
if (cmd == FIONREAD) {
10f882: 81 7d 0c 7f 66 04 40 cmpl $0x4004667f,0xc(%ebp)
10f889: 75 2f jne 10f8ba <pipe_ioctl+0x43>
if (buffer == NULL)
10f88b: 85 f6 test %esi,%esi
10f88d: 74 32 je 10f8c1 <pipe_ioctl+0x4a>
return -EFAULT;
if (! PIPE_LOCK(pipe))
10f88f: 50 push %eax
10f890: 6a 00 push $0x0
10f892: 6a 00 push $0x0
10f894: ff 73 28 pushl 0x28(%ebx)
10f897: e8 d0 b8 ff ff call 10b16c <rtems_semaphore_obtain>
10f89c: 83 c4 10 add $0x10,%esp
10f89f: 85 c0 test %eax,%eax
10f8a1: 75 25 jne 10f8c8 <pipe_ioctl+0x51> <== NEVER TAKEN
return -EINTR;
/* Return length of pipe */
*(unsigned int *)buffer = pipe->Length;
10f8a3: 8b 43 0c mov 0xc(%ebx),%eax
10f8a6: 89 06 mov %eax,(%esi)
PIPE_UNLOCK(pipe);
10f8a8: 83 ec 0c sub $0xc,%esp
10f8ab: ff 73 28 pushl 0x28(%ebx)
10f8ae: e8 a9 b9 ff ff call 10b25c <rtems_semaphore_release>
return 0;
10f8b3: 83 c4 10 add $0x10,%esp
10f8b6: 31 c0 xor %eax,%eax
10f8b8: eb 13 jmp 10f8cd <pipe_ioctl+0x56>
}
return -EINVAL;
10f8ba: b8 ea ff ff ff mov $0xffffffea,%eax
10f8bf: eb 0c jmp 10f8cd <pipe_ioctl+0x56>
rtems_libio_t *iop
)
{
if (cmd == FIONREAD) {
if (buffer == NULL)
return -EFAULT;
10f8c1: b8 f2 ff ff ff mov $0xfffffff2,%eax
10f8c6: eb 05 jmp 10f8cd <pipe_ioctl+0x56>
if (! PIPE_LOCK(pipe))
return -EINTR;
10f8c8: b8 fc ff ff ff mov $0xfffffffc,%eax <== NOT EXECUTED
PIPE_UNLOCK(pipe);
return 0;
}
return -EINVAL;
}
10f8cd: 8d 65 f8 lea -0x8(%ebp),%esp
10f8d0: 5b pop %ebx
10f8d1: 5e pop %esi
10f8d2: 5d pop %ebp
10f8d3: c3 ret
0010f55f <pipe_read>:
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
10f55f: 55 push %ebp
10f560: 89 e5 mov %esp,%ebp
10f562: 57 push %edi
10f563: 56 push %esi
10f564: 53 push %ebx
10f565: 83 ec 30 sub $0x30,%esp
10f568: 8b 5d 08 mov 0x8(%ebp),%ebx
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
10f56b: 6a 00 push $0x0
10f56d: 6a 00 push $0x0
10f56f: ff 73 28 pushl 0x28(%ebx)
10f572: e8 f5 bb ff ff call 10b16c <rtems_semaphore_obtain>
10f577: 83 c4 10 add $0x10,%esp
10f57a: 85 c0 test %eax,%eax
10f57c: 0f 85 34 01 00 00 jne 10f6b6 <pipe_read+0x157> <== NEVER TAKEN
10f582: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp)
10f589: e9 f5 00 00 00 jmp 10f683 <pipe_read+0x124>
return -EINTR;
while (read < count) {
while (PIPE_EMPTY(pipe)) {
/* Not an error */
if (pipe->Writers == 0)
10f58e: 83 7b 14 00 cmpl $0x0,0x14(%ebx)
10f592: 75 07 jne 10f59b <pipe_read+0x3c>
rtems_libio_t *iop
)
{
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
10f594: 31 f6 xor %esi,%esi
10f596: e9 fe 00 00 00 jmp 10f699 <pipe_read+0x13a>
while (PIPE_EMPTY(pipe)) {
/* Not an error */
if (pipe->Writers == 0)
goto out_locked;
if (LIBIO_NODELAY(iop)) {
10f59b: 8b 45 14 mov 0x14(%ebp),%eax
10f59e: f6 40 0c 01 testb $0x1,0xc(%eax)
10f5a2: 0f 85 ec 00 00 00 jne 10f694 <pipe_read+0x135>
ret = -EAGAIN;
goto out_locked;
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
10f5a8: ff 43 18 incl 0x18(%ebx)
PIPE_UNLOCK(pipe);
10f5ab: 83 ec 0c sub $0xc,%esp
10f5ae: ff 73 28 pushl 0x28(%ebx)
10f5b1: e8 a6 bc ff ff call 10b25c <rtems_semaphore_release>
if (! PIPE_READWAIT(pipe))
10f5b6: 58 pop %eax
10f5b7: 5a pop %edx
10f5b8: 6a 00 push $0x0
10f5ba: ff 73 2c pushl 0x2c(%ebx)
10f5bd: e8 da 14 00 00 call 110a9c <rtems_barrier_wait>
10f5c2: 83 c4 0c add $0xc,%esp
10f5c5: 83 f8 01 cmp $0x1,%eax
10f5c8: 19 f6 sbb %esi,%esi
10f5ca: f7 d6 not %esi
10f5cc: 83 e6 fc and $0xfffffffc,%esi
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
10f5cf: 6a 00 push $0x0
10f5d1: 6a 00 push $0x0
10f5d3: ff 73 28 pushl 0x28(%ebx)
10f5d6: e8 91 bb ff ff call 10b16c <rtems_semaphore_obtain>
10f5db: 83 c4 10 add $0x10,%esp
10f5de: 85 c0 test %eax,%eax
10f5e0: 0f 85 c3 00 00 00 jne 10f6a9 <pipe_read+0x14a> <== NEVER TAKEN
/* WARN waitingReaders not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingReaders --;
10f5e6: ff 4b 18 decl 0x18(%ebx)
if (ret != 0)
10f5e9: 85 f6 test %esi,%esi
10f5eb: 0f 85 a8 00 00 00 jne 10f699 <pipe_read+0x13a> <== NEVER TAKEN
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
while (PIPE_EMPTY(pipe)) {
10f5f1: 8b 53 0c mov 0xc(%ebx),%edx
10f5f4: 85 d2 test %edx,%edx
10f5f6: 74 96 je 10f58e <pipe_read+0x2f>
if (ret != 0)
goto out_locked;
}
/* Read chunk bytes */
chunk = MIN(count - read, pipe->Length);
10f5f8: 8b 45 10 mov 0x10(%ebp),%eax
10f5fb: 2b 45 d4 sub -0x2c(%ebp),%eax
10f5fe: 89 55 d0 mov %edx,-0x30(%ebp)
10f601: 39 c2 cmp %eax,%edx
10f603: 76 03 jbe 10f608 <pipe_read+0xa9>
10f605: 89 45 d0 mov %eax,-0x30(%ebp)
chunk1 = pipe->Size - pipe->Start;
10f608: 8b 4b 08 mov 0x8(%ebx),%ecx
10f60b: 8b 53 04 mov 0x4(%ebx),%edx
10f60e: 29 ca sub %ecx,%edx
if (chunk > chunk1) {
10f610: 39 55 d0 cmp %edx,-0x30(%ebp)
10f613: 8b 7d 0c mov 0xc(%ebp),%edi
10f616: 8b 75 d4 mov -0x2c(%ebp),%esi
10f619: 8d 04 37 lea (%edi,%esi,1),%eax
10f61c: 8b 33 mov (%ebx),%esi
10f61e: 7e 1b jle 10f63b <pipe_read+0xdc>
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1);
10f620: 01 ce add %ecx,%esi
10f622: 89 c7 mov %eax,%edi
10f624: 89 d1 mov %edx,%ecx
10f626: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1);
10f628: 8b 45 d4 mov -0x2c(%ebp),%eax
10f62b: 01 d0 add %edx,%eax
10f62d: 03 45 0c add 0xc(%ebp),%eax
10f630: 8b 4d d0 mov -0x30(%ebp),%ecx
10f633: 29 d1 sub %edx,%ecx
10f635: 8b 33 mov (%ebx),%esi
10f637: 89 c7 mov %eax,%edi
10f639: eb 07 jmp 10f642 <pipe_read+0xe3>
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
10f63b: 01 ce add %ecx,%esi
10f63d: 89 c7 mov %eax,%edi
10f63f: 8b 4d d0 mov -0x30(%ebp),%ecx
10f642: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
pipe->Start += chunk;
10f644: 8b 45 d0 mov -0x30(%ebp),%eax
10f647: 03 43 08 add 0x8(%ebx),%eax
pipe->Start %= pipe->Size;
10f64a: 31 d2 xor %edx,%edx
10f64c: f7 73 04 divl 0x4(%ebx)
10f64f: 89 53 08 mov %edx,0x8(%ebx)
pipe->Length -= chunk;
10f652: 8b 43 0c mov 0xc(%ebx),%eax
10f655: 2b 45 d0 sub -0x30(%ebp),%eax
10f658: 89 43 0c mov %eax,0xc(%ebx)
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
10f65b: 85 c0 test %eax,%eax
10f65d: 75 07 jne 10f666 <pipe_read+0x107>
pipe->Start = 0;
10f65f: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
if (pipe->waitingWriters > 0)
10f666: 83 7b 1c 00 cmpl $0x0,0x1c(%ebx)
10f66a: 74 11 je 10f67d <pipe_read+0x11e>
PIPE_WAKEUPWRITERS(pipe);
10f66c: 50 push %eax
10f66d: 50 push %eax
10f66e: 8d 45 e4 lea -0x1c(%ebp),%eax
10f671: 50 push %eax
10f672: ff 73 30 pushl 0x30(%ebx)
10f675: e8 ca 13 00 00 call 110a44 <rtems_barrier_release>
10f67a: 83 c4 10 add $0x10,%esp
read += chunk;
10f67d: 8b 75 d0 mov -0x30(%ebp),%esi
10f680: 01 75 d4 add %esi,-0x2c(%ebp)
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
10f683: 8b 7d 10 mov 0x10(%ebp),%edi
10f686: 39 7d d4 cmp %edi,-0x2c(%ebp)
10f689: 0f 82 62 ff ff ff jb 10f5f1 <pipe_read+0x92>
10f68f: e9 00 ff ff ff jmp 10f594 <pipe_read+0x35>
/* Not an error */
if (pipe->Writers == 0)
goto out_locked;
if (LIBIO_NODELAY(iop)) {
ret = -EAGAIN;
10f694: be f5 ff ff ff mov $0xfffffff5,%esi
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
}
out_locked:
PIPE_UNLOCK(pipe);
10f699: 83 ec 0c sub $0xc,%esp
10f69c: ff 73 28 pushl 0x28(%ebx)
10f69f: e8 b8 bb ff ff call 10b25c <rtems_semaphore_release>
10f6a4: 83 c4 10 add $0x10,%esp
10f6a7: eb 05 jmp 10f6ae <pipe_read+0x14f>
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
/* WARN waitingReaders not restored! */
ret = -EINTR;
10f6a9: be fc ff ff ff mov $0xfffffffc,%esi <== NOT EXECUTED
out_locked:
PIPE_UNLOCK(pipe);
out_nolock:
if (read > 0)
10f6ae: 83 7d d4 00 cmpl $0x0,-0x2c(%ebp)
10f6b2: 7f 0e jg 10f6c2 <pipe_read+0x163>
10f6b4: eb 09 jmp 10f6bf <pipe_read+0x160>
)
{
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
10f6b6: c7 45 d4 fc ff ff ff movl $0xfffffffc,-0x2c(%ebp) <== NOT EXECUTED
10f6bd: eb 03 jmp 10f6c2 <pipe_read+0x163> <== NOT EXECUTED
PIPE_UNLOCK(pipe);
out_nolock:
if (read > 0)
return read;
return ret;
10f6bf: 89 75 d4 mov %esi,-0x2c(%ebp)
}
10f6c2: 8b 45 d4 mov -0x2c(%ebp),%eax
10f6c5: 8d 65 f4 lea -0xc(%ebp),%esp
10f6c8: 5b pop %ebx
10f6c9: 5e pop %esi
10f6ca: 5f pop %edi
10f6cb: 5d pop %ebp
10f6cc: c3 ret
0010f0e3 <pipe_release>:
*/
void pipe_release(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
10f0e3: 55 push %ebp
10f0e4: 89 e5 mov %esp,%ebp
10f0e6: 57 push %edi
10f0e7: 56 push %esi
10f0e8: 53 push %ebx
10f0e9: 83 ec 1c sub $0x1c,%esp
10f0ec: 8b 7d 08 mov 0x8(%ebp),%edi
pipe_control_t *pipe = *pipep;
10f0ef: 8b 1f mov (%edi),%ebx
/* WARN pipe not released! */
if (!PIPE_LOCK(pipe))
rtems_fatal_error_occurred(0xdeadbeef);
#endif
mode = LIBIO_ACCMODE(iop);
10f0f1: 8b 45 0c mov 0xc(%ebp),%eax
10f0f4: 8b 40 0c mov 0xc(%eax),%eax
10f0f7: 89 c6 mov %eax,%esi
10f0f9: 83 e6 06 and $0x6,%esi
if (mode & LIBIO_FLAGS_READ)
10f0fc: a8 02 test $0x2,%al
10f0fe: 74 03 je 10f103 <pipe_release+0x20>
pipe->Readers --;
10f100: ff 4b 10 decl 0x10(%ebx)
if (mode & LIBIO_FLAGS_WRITE)
10f103: a8 04 test $0x4,%al
10f105: 74 03 je 10f10a <pipe_release+0x27>
pipe->Writers --;
10f107: ff 4b 14 decl 0x14(%ebx)
PIPE_UNLOCK(pipe);
10f10a: 83 ec 0c sub $0xc,%esp
10f10d: ff 73 28 pushl 0x28(%ebx)
10f110: e8 47 c1 ff ff call 10b25c <rtems_semaphore_release>
if (pipe->Readers == 0 && pipe->Writers == 0) {
10f115: 83 c4 10 add $0x10,%esp
10f118: 83 7b 10 00 cmpl $0x0,0x10(%ebx)
10f11c: 75 25 jne 10f143 <pipe_release+0x60>
10f11e: 83 7b 14 00 cmpl $0x0,0x14(%ebx)
10f122: 75 0f jne 10f133 <pipe_release+0x50>
#if 0
/* To delete an anonymous pipe file when all users closed it */
if (pipe->Anonymous)
delfile = TRUE;
#endif
pipe_free(pipe);
10f124: 89 d8 mov %ebx,%eax
10f126: e8 7d ff ff ff call 10f0a8 <pipe_free>
*pipep = NULL;
10f12b: c7 07 00 00 00 00 movl $0x0,(%edi)
10f131: eb 2c jmp 10f15f <pipe_release+0x7c>
}
else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE)
10f133: 83 fe 04 cmp $0x4,%esi
10f136: 74 0b je 10f143 <pipe_release+0x60> <== NEVER TAKEN
/* Notify waiting Writers that all their partners left */
PIPE_WAKEUPWRITERS(pipe);
10f138: 57 push %edi
10f139: 57 push %edi
10f13a: 8d 45 e4 lea -0x1c(%ebp),%eax
10f13d: 50 push %eax
10f13e: ff 73 30 pushl 0x30(%ebx)
10f141: eb 14 jmp 10f157 <pipe_release+0x74>
else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ)
10f143: 83 7b 14 00 cmpl $0x0,0x14(%ebx)
10f147: 75 16 jne 10f15f <pipe_release+0x7c> <== NEVER TAKEN
10f149: 83 fe 02 cmp $0x2,%esi
10f14c: 74 11 je 10f15f <pipe_release+0x7c> <== NEVER TAKEN
PIPE_WAKEUPREADERS(pipe);
10f14e: 56 push %esi
10f14f: 56 push %esi
10f150: 8d 45 e4 lea -0x1c(%ebp),%eax
10f153: 50 push %eax
10f154: ff 73 2c pushl 0x2c(%ebx)
10f157: e8 e8 18 00 00 call 110a44 <rtems_barrier_release>
10f15c: 83 c4 10 add $0x10,%esp
#ifdef RTEMS_DEBUG
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc =
#endif
rtems_semaphore_release(pipe_semaphore);
10f15f: 83 ec 0c sub $0xc,%esp
10f162: ff 35 d4 00 13 00 pushl 0x1300d4
10f168: e8 ef c0 ff ff call 10b25c <rtems_semaphore_release>
10f16d: 83 c4 10 add $0x10,%esp
iop->flags &= ~LIBIO_FLAGS_OPEN;
if(iop->pathinfo.ops->unlink_h(&iop->pathinfo))
return;
#endif
}
10f170: 8d 65 f4 lea -0xc(%ebp),%esp
10f173: 5b pop %ebx
10f174: 5e pop %esi
10f175: 5f pop %edi
10f176: 5d pop %ebp
10f177: c3 ret
0010f6cd <pipe_write>:
pipe_control_t *pipe,
const void *buffer,
size_t count,
rtems_libio_t *iop
)
{
10f6cd: 55 push %ebp
10f6ce: 89 e5 mov %esp,%ebp
10f6d0: 57 push %edi
10f6d1: 56 push %esi
10f6d2: 53 push %ebx
10f6d3: 83 ec 2c sub $0x2c,%esp
10f6d6: 8b 5d 08 mov 0x8(%ebp),%ebx
int chunk, chunk1, written = 0, ret = 0;
/* Write nothing */
if (count == 0)
return 0;
10f6d9: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp)
)
{
int chunk, chunk1, written = 0, ret = 0;
/* Write nothing */
if (count == 0)
10f6e0: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
10f6e4: 0f 84 82 01 00 00 je 10f86c <pipe_write+0x19f> <== NEVER TAKEN
return 0;
if (! PIPE_LOCK(pipe))
10f6ea: 50 push %eax
10f6eb: 6a 00 push $0x0
10f6ed: 6a 00 push $0x0
10f6ef: ff 73 28 pushl 0x28(%ebx)
10f6f2: e8 75 ba ff ff call 10b16c <rtems_semaphore_obtain>
10f6f7: 83 c4 10 add $0x10,%esp
10f6fa: 85 c0 test %eax,%eax
10f6fc: 0f 85 5e 01 00 00 jne 10f860 <pipe_write+0x193> <== NEVER TAKEN
return -EINTR;
if (pipe->Readers == 0) {
10f702: 83 7b 10 00 cmpl $0x0,0x10(%ebx)
10f706: 0f 84 1b 01 00 00 je 10f827 <pipe_write+0x15a>
ret = -EPIPE;
goto out_locked;
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
10f70c: be 01 00 00 00 mov $0x1,%esi
10f711: 8b 45 10 mov 0x10(%ebp),%eax
10f714: 3b 43 04 cmp 0x4(%ebx),%eax
10f717: 77 02 ja 10f71b <pipe_write+0x4e> <== NEVER TAKEN
10f719: 89 c6 mov %eax,%esi
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
ret = -EINTR;
10f71b: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp)
10f722: e9 e9 00 00 00 jmp 10f810 <pipe_write+0x143>
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
while (PIPE_SPACE(pipe) < chunk) {
if (LIBIO_NODELAY(iop)) {
10f727: 8b 4d 14 mov 0x14(%ebp),%ecx
10f72a: f6 41 0c 01 testb $0x1,0xc(%ecx)
10f72e: 0f 85 ec 00 00 00 jne 10f820 <pipe_write+0x153>
ret = -EAGAIN;
goto out_locked;
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
10f734: ff 43 1c incl 0x1c(%ebx)
PIPE_UNLOCK(pipe);
10f737: 83 ec 0c sub $0xc,%esp
10f73a: ff 73 28 pushl 0x28(%ebx)
10f73d: e8 1a bb ff ff call 10b25c <rtems_semaphore_release>
if (! PIPE_WRITEWAIT(pipe))
10f742: 5f pop %edi
10f743: 58 pop %eax
10f744: 6a 00 push $0x0
10f746: ff 73 30 pushl 0x30(%ebx)
10f749: e8 4e 13 00 00 call 110a9c <rtems_barrier_wait>
10f74e: 83 c4 0c add $0xc,%esp
10f751: 83 f8 01 cmp $0x1,%eax
10f754: 19 ff sbb %edi,%edi
10f756: f7 d7 not %edi
10f758: 83 e7 fc and $0xfffffffc,%edi
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
10f75b: 6a 00 push $0x0
10f75d: 6a 00 push $0x0
10f75f: ff 73 28 pushl 0x28(%ebx)
10f762: e8 05 ba ff ff call 10b16c <rtems_semaphore_obtain>
10f767: 83 c4 10 add $0x10,%esp
10f76a: 85 c0 test %eax,%eax
10f76c: 0f 85 e1 00 00 00 jne 10f853 <pipe_write+0x186> <== NEVER TAKEN
/* WARN waitingWriters not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingWriters --;
10f772: ff 4b 1c decl 0x1c(%ebx)
if (ret != 0)
10f775: 85 ff test %edi,%edi
10f777: 0f 85 af 00 00 00 jne 10f82c <pipe_write+0x15f> <== NEVER TAKEN
goto out_locked;
if (pipe->Readers == 0) {
10f77d: 83 7b 10 00 cmpl $0x0,0x10(%ebx)
10f781: 0f 84 a0 00 00 00 je 10f827 <pipe_write+0x15a> <== NEVER TAKEN
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
while (PIPE_SPACE(pipe) < chunk) {
10f787: 8b 7b 04 mov 0x4(%ebx),%edi
10f78a: 8b 43 0c mov 0xc(%ebx),%eax
10f78d: 89 f9 mov %edi,%ecx
10f78f: 29 c1 sub %eax,%ecx
10f791: 39 f1 cmp %esi,%ecx
10f793: 72 92 jb 10f727 <pipe_write+0x5a>
ret = -EPIPE;
goto out_locked;
}
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
10f795: 8b 55 10 mov 0x10(%ebp),%edx
10f798: 2b 55 d4 sub -0x2c(%ebp),%edx
10f79b: 89 4d d0 mov %ecx,-0x30(%ebp)
10f79e: 39 d1 cmp %edx,%ecx
10f7a0: 76 03 jbe 10f7a5 <pipe_write+0xd8>
10f7a2: 89 55 d0 mov %edx,-0x30(%ebp)
chunk1 = pipe->Size - PIPE_WSTART(pipe);
10f7a5: 03 43 08 add 0x8(%ebx),%eax
10f7a8: 31 d2 xor %edx,%edx
10f7aa: f7 f7 div %edi
10f7ac: 29 d7 sub %edx,%edi
10f7ae: 89 7d cc mov %edi,-0x34(%ebp)
if (chunk > chunk1) {
10f7b1: 39 7d d0 cmp %edi,-0x30(%ebp)
10f7b4: 8b 03 mov (%ebx),%eax
10f7b6: 8b 4d 0c mov 0xc(%ebp),%ecx
10f7b9: 8b 7d d4 mov -0x2c(%ebp),%edi
10f7bc: 8d 34 39 lea (%ecx,%edi,1),%esi
10f7bf: 7e 1e jle 10f7df <pipe_write+0x112>
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1);
10f7c1: 01 d0 add %edx,%eax
10f7c3: 89 c7 mov %eax,%edi
10f7c5: 8b 4d cc mov -0x34(%ebp),%ecx
10f7c8: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
10f7ca: 8b 4d d0 mov -0x30(%ebp),%ecx
10f7cd: 2b 4d cc sub -0x34(%ebp),%ecx
10f7d0: 8b 45 cc mov -0x34(%ebp),%eax
10f7d3: 03 45 d4 add -0x2c(%ebp),%eax
10f7d6: 8b 75 0c mov 0xc(%ebp),%esi
10f7d9: 01 c6 add %eax,%esi
10f7db: 8b 3b mov (%ebx),%edi
10f7dd: eb 07 jmp 10f7e6 <pipe_write+0x119>
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
10f7df: 01 d0 add %edx,%eax
10f7e1: 89 c7 mov %eax,%edi
10f7e3: 8b 4d d0 mov -0x30(%ebp),%ecx
10f7e6: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
pipe->Length += chunk;
10f7e8: 8b 4d d0 mov -0x30(%ebp),%ecx
10f7eb: 01 4b 0c add %ecx,0xc(%ebx)
if (pipe->waitingReaders > 0)
10f7ee: 83 7b 18 00 cmpl $0x0,0x18(%ebx)
10f7f2: 74 11 je 10f805 <pipe_write+0x138>
PIPE_WAKEUPREADERS(pipe);
10f7f4: 56 push %esi
10f7f5: 56 push %esi
10f7f6: 8d 7d e4 lea -0x1c(%ebp),%edi
10f7f9: 57 push %edi
10f7fa: ff 73 2c pushl 0x2c(%ebx)
10f7fd: e8 42 12 00 00 call 110a44 <rtems_barrier_release>
10f802: 83 c4 10 add $0x10,%esp
written += chunk;
10f805: 8b 4d d0 mov -0x30(%ebp),%ecx
10f808: 01 4d d4 add %ecx,-0x2c(%ebp)
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
10f80b: be 01 00 00 00 mov $0x1,%esi
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
10f810: 8b 7d 10 mov 0x10(%ebp),%edi
10f813: 39 7d d4 cmp %edi,-0x2c(%ebp)
10f816: 0f 82 6b ff ff ff jb 10f787 <pipe_write+0xba>
10f81c: 31 ff xor %edi,%edi
10f81e: eb 0c jmp 10f82c <pipe_write+0x15f>
while (PIPE_SPACE(pipe) < chunk) {
if (LIBIO_NODELAY(iop)) {
ret = -EAGAIN;
10f820: bf f5 ff ff ff mov $0xfffffff5,%edi
10f825: eb 05 jmp 10f82c <pipe_write+0x15f>
pipe->waitingWriters --;
if (ret != 0)
goto out_locked;
if (pipe->Readers == 0) {
ret = -EPIPE;
10f827: bf e0 ff ff ff mov $0xffffffe0,%edi
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
}
out_locked:
PIPE_UNLOCK(pipe);
10f82c: 83 ec 0c sub $0xc,%esp
10f82f: ff 73 28 pushl 0x28(%ebx)
10f832: e8 25 ba ff ff call 10b25c <rtems_semaphore_release>
out_nolock:
#ifdef RTEMS_POSIX_API
/* Signal SIGPIPE */
if (ret == -EPIPE)
10f837: 83 c4 10 add $0x10,%esp
10f83a: 83 ff e0 cmp $0xffffffe0,%edi
10f83d: 75 19 jne 10f858 <pipe_write+0x18b>
kill(getpid(), SIGPIPE);
10f83f: e8 e0 04 00 00 call 10fd24 <getpid>
10f844: 51 push %ecx
10f845: 51 push %ecx
10f846: 6a 0d push $0xd
10f848: 50 push %eax
10f849: e8 62 0a 00 00 call 1102b0 <kill>
10f84e: 83 c4 10 add $0x10,%esp
10f851: eb 05 jmp 10f858 <pipe_write+0x18b>
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
/* WARN waitingWriters not restored! */
ret = -EINTR;
10f853: bf fc ff ff ff mov $0xfffffffc,%edi <== NOT EXECUTED
/* Signal SIGPIPE */
if (ret == -EPIPE)
kill(getpid(), SIGPIPE);
#endif
if (written > 0)
10f858: 83 7d d4 00 cmpl $0x0,-0x2c(%ebp)
10f85c: 7f 0e jg 10f86c <pipe_write+0x19f>
10f85e: eb 09 jmp 10f869 <pipe_write+0x19c>
/* Write nothing */
if (count == 0)
return 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
10f860: c7 45 d4 fc ff ff ff movl $0xfffffffc,-0x2c(%ebp) <== NOT EXECUTED
10f867: eb 03 jmp 10f86c <pipe_write+0x19f> <== NOT EXECUTED
/* Signal SIGPIPE */
if (ret == -EPIPE)
kill(getpid(), SIGPIPE);
#endif
if (written > 0)
10f869: 89 7d d4 mov %edi,-0x2c(%ebp)
return written;
return ret;
}
10f86c: 8b 45 d4 mov -0x2c(%ebp),%eax
10f86f: 8d 65 f4 lea -0xc(%ebp),%esp
10f872: 5b pop %ebx
10f873: 5e pop %esi
10f874: 5f pop %edi
10f875: 5d pop %ebp
10f876: c3 ret
0010997c <posix_memalign>:
int posix_memalign(
void **pointer,
size_t alignment,
size_t size
)
{
10997c: 55 push %ebp
10997d: 89 e5 mov %esp,%ebp
10997f: 53 push %ebx
109980: 8b 45 0c mov 0xc(%ebp),%eax
/*
* Update call statistics
*/
MSBUMP(memalign_calls, 1);
109983: ff 05 c0 3b 13 00 incl 0x133bc0
if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *)))
109989: 8d 58 ff lea -0x1(%eax),%ebx
10998c: 85 c3 test %eax,%ebx
10998e: 75 0c jne 10999c <posix_memalign+0x20> <== NEVER TAKEN
109990: 83 f8 03 cmp $0x3,%eax
109993: 76 07 jbe 10999c <posix_memalign+0x20>
/*
* rtems_memalign does all of the error checking work EXCEPT
* for adding restrictionso on the alignment.
*/
return rtems_memalign( pointer, alignment, size );
}
109995: 5b pop %ebx
109996: 5d pop %ebp
/*
* rtems_memalign does all of the error checking work EXCEPT
* for adding restrictionso on the alignment.
*/
return rtems_memalign( pointer, alignment, size );
109997: e9 70 01 00 00 jmp 109b0c <rtems_memalign>
}
10999c: b8 16 00 00 00 mov $0x16,%eax
1099a1: 5b pop %ebx
1099a2: 5d pop %ebp
1099a3: c3 ret
0010e4d4 <pthread_attr_setschedpolicy>:
int pthread_attr_setschedpolicy(
pthread_attr_t *attr,
int policy
)
{
10e4d4: 55 push %ebp
10e4d5: 89 e5 mov %esp,%ebp
10e4d7: 8b 55 08 mov 0x8(%ebp),%edx
10e4da: 8b 4d 0c mov 0xc(%ebp),%ecx
if ( !attr || !attr->is_initialized )
return EINVAL;
10e4dd: b8 16 00 00 00 mov $0x16,%eax
int pthread_attr_setschedpolicy(
pthread_attr_t *attr,
int policy
)
{
if ( !attr || !attr->is_initialized )
10e4e2: 85 d2 test %edx,%edx
10e4e4: 74 1e je 10e504 <pthread_attr_setschedpolicy+0x30>
10e4e6: 83 3a 00 cmpl $0x0,(%edx)
10e4e9: 74 19 je 10e504 <pthread_attr_setschedpolicy+0x30>
return EINVAL;
switch ( policy ) {
10e4eb: 83 f9 04 cmp $0x4,%ecx
10e4ee: 77 0f ja 10e4ff <pthread_attr_setschedpolicy+0x2b>
10e4f0: b0 01 mov $0x1,%al
10e4f2: d3 e0 shl %cl,%eax
10e4f4: a8 17 test $0x17,%al
10e4f6: 74 07 je 10e4ff <pthread_attr_setschedpolicy+0x2b><== NEVER TAKEN
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
case SCHED_SPORADIC:
attr->schedpolicy = policy;
10e4f8: 89 4a 14 mov %ecx,0x14(%edx)
return 0;
10e4fb: 31 c0 xor %eax,%eax
10e4fd: eb 05 jmp 10e504 <pthread_attr_setschedpolicy+0x30>
default:
return ENOTSUP;
10e4ff: b8 86 00 00 00 mov $0x86,%eax
}
}
10e504: 5d pop %ebp
10e505: c3 ret
00109fd8 <pthread_barrier_init>:
int pthread_barrier_init(
pthread_barrier_t *barrier,
const pthread_barrierattr_t *attr,
unsigned int count
)
{
109fd8: 55 push %ebp
109fd9: 89 e5 mov %esp,%ebp
109fdb: 57 push %edi
109fdc: 56 push %esi
109fdd: 53 push %ebx
109fde: 83 ec 1c sub $0x1c,%esp
109fe1: 8b 75 08 mov 0x8(%ebp),%esi
109fe4: 8b 5d 10 mov 0x10(%ebp),%ebx
const pthread_barrierattr_t *the_attr;
/*
* Error check parameters
*/
if ( !barrier )
109fe7: 85 f6 test %esi,%esi
109fe9: 75 05 jne 109ff0 <pthread_barrier_init+0x18>
109feb: e9 9a 00 00 00 jmp 10a08a <pthread_barrier_init+0xb2>
return EINVAL;
if ( count == 0 )
109ff0: 85 db test %ebx,%ebx
109ff2: 0f 84 92 00 00 00 je 10a08a <pthread_barrier_init+0xb2><== NEVER TAKEN
return EINVAL;
/*
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
109ff8: 8b 45 0c mov 0xc(%ebp),%eax
109ffb: 85 c0 test %eax,%eax
109ffd: 75 11 jne 10a010 <pthread_barrier_init+0x38>
the_attr = attr;
} else {
(void) pthread_barrierattr_init( &my_attr );
109fff: 83 ec 0c sub $0xc,%esp
10a002: 8d 7d e0 lea -0x20(%ebp),%edi
10a005: 57 push %edi
10a006: e8 19 ff ff ff call 109f24 <pthread_barrierattr_init>
10a00b: 83 c4 10 add $0x10,%esp
the_attr = &my_attr;
10a00e: 89 f8 mov %edi,%eax
}
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
10a010: 83 38 00 cmpl $0x0,(%eax)
10a013: 74 75 je 10a08a <pthread_barrier_init+0xb2>
return EINVAL;
switch ( the_attr->process_shared ) {
10a015: 83 78 04 00 cmpl $0x0,0x4(%eax)
10a019: 75 6f jne 10a08a <pthread_barrier_init+0xb2><== NEVER TAKEN
}
/*
* Convert from POSIX attributes to Core Barrier attributes
*/
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
10a01b: c7 45 d8 00 00 00 00 movl $0x0,-0x28(%ebp)
the_attributes.maximum_count = count;
10a022: 89 5d dc mov %ebx,-0x24(%ebp)
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
10a025: a1 dc f3 12 00 mov 0x12f3dc,%eax
10a02a: 40 inc %eax
10a02b: a3 dc f3 12 00 mov %eax,0x12f3dc
return _Thread_Dispatch_disable_level;
10a030: a1 dc f3 12 00 mov 0x12f3dc,%eax
* This function allocates a barrier control block from
* the inactive chain of free barrier control blocks.
*/
RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Allocate( void )
{
return (POSIX_Barrier_Control *)
10a035: 83 ec 0c sub $0xc,%esp
10a038: 68 60 f7 12 00 push $0x12f760
10a03d: e8 ae 1c 00 00 call 10bcf0 <_Objects_Allocate>
10a042: 89 c3 mov %eax,%ebx
*/
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _POSIX_Barrier_Allocate();
if ( !the_barrier ) {
10a044: 83 c4 10 add $0x10,%esp
10a047: 85 c0 test %eax,%eax
10a049: 75 0c jne 10a057 <pthread_barrier_init+0x7f>
_Thread_Enable_dispatch();
10a04b: e8 e0 2b 00 00 call 10cc30 <_Thread_Enable_dispatch>
return EAGAIN;
10a050: b8 0b 00 00 00 mov $0xb,%eax
10a055: eb 38 jmp 10a08f <pthread_barrier_init+0xb7>
}
_CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes );
10a057: 50 push %eax
10a058: 50 push %eax
10a059: 8d 45 d8 lea -0x28(%ebp),%eax
10a05c: 50 push %eax
10a05d: 8d 43 10 lea 0x10(%ebx),%eax
10a060: 50 push %eax
10a061: e8 56 14 00 00 call 10b4bc <_CORE_barrier_Initialize>
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
10a066: 8b 43 08 mov 0x8(%ebx),%eax
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
10a069: 0f b7 c8 movzwl %ax,%ecx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10a06c: 8b 15 7c f7 12 00 mov 0x12f77c,%edx
10a072: 89 1c 8a mov %ebx,(%edx,%ecx,4)
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
10a075: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
);
/*
* Exit the critical section and return the user an operational barrier
*/
*barrier = the_barrier->Object.id;
10a07c: 89 06 mov %eax,(%esi)
_Thread_Enable_dispatch();
10a07e: e8 ad 2b 00 00 call 10cc30 <_Thread_Enable_dispatch>
10a083: 83 c4 10 add $0x10,%esp
return 0;
10a086: 31 c0 xor %eax,%eax
10a088: eb 05 jmp 10a08f <pthread_barrier_init+0xb7>
switch ( the_attr->process_shared ) {
case PTHREAD_PROCESS_PRIVATE: /* only supported values */
break;
case PTHREAD_PROCESS_SHARED:
default:
return EINVAL;
10a08a: b8 16 00 00 00 mov $0x16,%eax
* Exit the critical section and return the user an operational barrier
*/
*barrier = the_barrier->Object.id;
_Thread_Enable_dispatch();
return 0;
}
10a08f: 8d 65 f4 lea -0xc(%ebp),%esp
10a092: 5b pop %ebx
10a093: 5e pop %esi
10a094: 5f pop %edi
10a095: 5d pop %ebp
10a096: c3 ret
001099a4 <pthread_cleanup_push>:
void pthread_cleanup_push(
void (*routine)( void * ),
void *arg
)
{
1099a4: 55 push %ebp
1099a5: 89 e5 mov %esp,%ebp
1099a7: 56 push %esi
1099a8: 53 push %ebx
1099a9: 8b 5d 08 mov 0x8(%ebp),%ebx
1099ac: 8b 75 0c mov 0xc(%ebp),%esi
/*
* The POSIX standard does not address what to do when the routine
* is NULL. It also does not address what happens when we cannot
* allocate memory or anything else bad happens.
*/
if ( !routine )
1099af: 85 db test %ebx,%ebx
1099b1: 74 50 je 109a03 <pthread_cleanup_push+0x5f>
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
1099b3: a1 d4 f3 12 00 mov 0x12f3d4,%eax
1099b8: 40 inc %eax
1099b9: a3 d4 f3 12 00 mov %eax,0x12f3d4
return _Thread_Dispatch_disable_level;
1099be: a1 d4 f3 12 00 mov 0x12f3d4,%eax
return;
_Thread_Disable_dispatch();
handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) );
1099c3: 83 ec 0c sub $0xc,%esp
1099c6: 6a 10 push $0x10
1099c8: e8 6b 3a 00 00 call 10d438 <_Workspace_Allocate>
if ( handler ) {
1099cd: 83 c4 10 add $0x10,%esp
1099d0: 85 c0 test %eax,%eax
1099d2: 74 24 je 1099f8 <pthread_cleanup_push+0x54><== NEVER TAKEN
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
1099d4: 8b 15 dc f8 12 00 mov 0x12f8dc,%edx
handler_stack = &thread_support->Cancellation_Handlers;
1099da: 8b 92 e8 00 00 00 mov 0xe8(%edx),%edx
1099e0: 81 c2 e4 00 00 00 add $0xe4,%edx
handler->routine = routine;
1099e6: 89 58 08 mov %ebx,0x8(%eax)
handler->arg = arg;
1099e9: 89 70 0c mov %esi,0xc(%eax)
_Chain_Append( handler_stack, &handler->Node );
1099ec: 51 push %ecx
1099ed: 51 push %ecx
1099ee: 50 push %eax
1099ef: 52 push %edx
1099f0: e8 57 15 00 00 call 10af4c <_Chain_Append>
1099f5: 83 c4 10 add $0x10,%esp
}
_Thread_Enable_dispatch();
}
1099f8: 8d 65 f8 lea -0x8(%ebp),%esp
1099fb: 5b pop %ebx
1099fc: 5e pop %esi
1099fd: 5d pop %ebp
handler->routine = routine;
handler->arg = arg;
_Chain_Append( handler_stack, &handler->Node );
}
_Thread_Enable_dispatch();
1099fe: e9 89 2c 00 00 jmp 10c68c <_Thread_Enable_dispatch>
}
109a03: 8d 65 f8 lea -0x8(%ebp),%esp
109a06: 5b pop %ebx
109a07: 5e pop %esi
109a08: 5d pop %ebp
109a09: c3 ret
0010a7c4 <pthread_cond_init>:
int pthread_cond_init(
pthread_cond_t *cond,
const pthread_condattr_t *attr
)
{
10a7c4: 55 push %ebp
10a7c5: 89 e5 mov %esp,%ebp
10a7c7: 56 push %esi
10a7c8: 53 push %ebx
POSIX_Condition_variables_Control *the_cond;
const pthread_condattr_t *the_attr;
if ( attr ) the_attr = attr;
10a7c9: 8b 75 0c mov 0xc(%ebp),%esi
10a7cc: 85 f6 test %esi,%esi
10a7ce: 75 05 jne 10a7d5 <pthread_cond_init+0x11>
else the_attr = &_POSIX_Condition_variables_Default_attributes;
10a7d0: be f0 1d 12 00 mov $0x121df0,%esi
/*
* Be careful about attributes when global!!!
*/
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
return EINVAL;
10a7d5: b8 16 00 00 00 mov $0x16,%eax
else the_attr = &_POSIX_Condition_variables_Default_attributes;
/*
* Be careful about attributes when global!!!
*/
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
10a7da: 83 7e 04 01 cmpl $0x1,0x4(%esi)
10a7de: 74 7b je 10a85b <pthread_cond_init+0x97><== NEVER TAKEN
return EINVAL;
if ( !the_attr->is_initialized )
10a7e0: 83 3e 00 cmpl $0x0,(%esi)
10a7e3: 74 76 je 10a85b <pthread_cond_init+0x97>
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
10a7e5: a1 e4 03 13 00 mov 0x1303e4,%eax
10a7ea: 40 inc %eax
10a7eb: a3 e4 03 13 00 mov %eax,0x1303e4
return _Thread_Dispatch_disable_level;
10a7f0: a1 e4 03 13 00 mov 0x1303e4,%eax
*/
RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control
*_POSIX_Condition_variables_Allocate( void )
{
return (POSIX_Condition_variables_Control *)
10a7f5: 83 ec 0c sub $0xc,%esp
10a7f8: 68 00 08 13 00 push $0x130800
10a7fd: e8 6e 22 00 00 call 10ca70 <_Objects_Allocate>
10a802: 89 c3 mov %eax,%ebx
_Thread_Disable_dispatch();
the_cond = _POSIX_Condition_variables_Allocate();
if ( !the_cond ) {
10a804: 83 c4 10 add $0x10,%esp
10a807: 85 c0 test %eax,%eax
10a809: 75 0c jne 10a817 <pthread_cond_init+0x53>
_Thread_Enable_dispatch();
10a80b: e8 a0 31 00 00 call 10d9b0 <_Thread_Enable_dispatch>
return ENOMEM;
10a810: b8 0c 00 00 00 mov $0xc,%eax
10a815: eb 44 jmp 10a85b <pthread_cond_init+0x97>
}
the_cond->process_shared = the_attr->process_shared;
10a817: 8b 46 04 mov 0x4(%esi),%eax
10a81a: 89 43 10 mov %eax,0x10(%ebx)
the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
10a81d: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx)
_Thread_queue_Initialize(
10a824: 6a 74 push $0x74
10a826: 68 00 08 00 10 push $0x10000800
10a82b: 6a 00 push $0x0
10a82d: 8d 43 18 lea 0x18(%ebx),%eax
10a830: 50 push %eax
10a831: e8 26 38 00 00 call 10e05c <_Thread_queue_Initialize>
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
10a836: 8b 43 08 mov 0x8(%ebx),%eax
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
10a839: 0f b7 c8 movzwl %ax,%ecx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10a83c: 8b 15 1c 08 13 00 mov 0x13081c,%edx
10a842: 89 1c 8a mov %ebx,(%edx,%ecx,4)
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
10a845: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
&_POSIX_Condition_variables_Information,
&the_cond->Object,
0
);
*cond = the_cond->Object.id;
10a84c: 8b 55 08 mov 0x8(%ebp),%edx
10a84f: 89 02 mov %eax,(%edx)
_Thread_Enable_dispatch();
10a851: e8 5a 31 00 00 call 10d9b0 <_Thread_Enable_dispatch>
return 0;
10a856: 83 c4 10 add $0x10,%esp
10a859: 31 c0 xor %eax,%eax
}
10a85b: 8d 65 f8 lea -0x8(%ebp),%esp
10a85e: 5b pop %ebx
10a85f: 5e pop %esi
10a860: 5d pop %ebp
10a861: c3 ret
0010a66c <pthread_condattr_destroy>:
*/
int pthread_condattr_destroy(
pthread_condattr_t *attr
)
{
10a66c: 55 push %ebp
10a66d: 89 e5 mov %esp,%ebp
10a66f: 8b 55 08 mov 0x8(%ebp),%edx
if ( !attr || attr->is_initialized == false )
return EINVAL;
10a672: b8 16 00 00 00 mov $0x16,%eax
int pthread_condattr_destroy(
pthread_condattr_t *attr
)
{
if ( !attr || attr->is_initialized == false )
10a677: 85 d2 test %edx,%edx
10a679: 74 0d je 10a688 <pthread_condattr_destroy+0x1c>
10a67b: 83 3a 00 cmpl $0x0,(%edx)
10a67e: 74 08 je 10a688 <pthread_condattr_destroy+0x1c><== NEVER TAKEN
return EINVAL;
attr->is_initialized = false;
10a680: c7 02 00 00 00 00 movl $0x0,(%edx)
return 0;
10a686: 30 c0 xor %al,%al
}
10a688: 5d pop %ebp
10a689: c3 ret
00109cf0 <pthread_create>:
pthread_t *thread,
const pthread_attr_t *attr,
void *(*start_routine)( void * ),
void *arg
)
{
109cf0: 55 push %ebp
109cf1: 89 e5 mov %esp,%ebp
109cf3: 57 push %edi
109cf4: 56 push %esi
109cf5: 53 push %ebx
109cf6: 83 ec 4c sub $0x4c,%esp
int schedpolicy = SCHED_RR;
struct sched_param schedparam;
Objects_Name name;
int rc;
if ( !start_routine )
109cf9: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
109cfd: 0f 84 f8 01 00 00 je 109efb <pthread_create+0x20b>
return EFAULT;
the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes;
109d03: 8b 55 0c mov 0xc(%ebp),%edx
109d06: 85 d2 test %edx,%edx
109d08: 75 05 jne 109d0f <pthread_create+0x1f>
109d0a: ba 60 09 12 00 mov $0x120960,%edx
if ( !the_attr->is_initialized )
109d0f: 83 3a 00 cmpl $0x0,(%edx)
109d12: 75 05 jne 109d19 <pthread_create+0x29>
109d14: e9 eb 01 00 00 jmp 109f04 <pthread_create+0x214>
* stack space if it is allowed to allocate it itself.
*
* NOTE: If the user provides the stack we will let it drop below
* twice the minimum.
*/
if ( the_attr->stackaddr && !_Stack_Is_enough(the_attr->stacksize) )
109d19: 83 7a 04 00 cmpl $0x0,0x4(%edx)
109d1d: 74 0e je 109d2d <pthread_create+0x3d>
109d1f: a1 8c b1 12 00 mov 0x12b18c,%eax
109d24: 39 42 08 cmp %eax,0x8(%edx)
109d27: 0f 82 d7 01 00 00 jb 109f04 <pthread_create+0x214>
* If inheritsched is set to PTHREAD_INHERIT_SCHED, then this thread
* inherits scheduling attributes from the creating thread. If it is
* PTHREAD_EXPLICIT_SCHED, then scheduling parameters come from the
* attributes structure.
*/
switch ( the_attr->inheritsched ) {
109d2d: 8b 42 10 mov 0x10(%edx),%eax
109d30: 83 f8 01 cmp $0x1,%eax
109d33: 74 0b je 109d40 <pthread_create+0x50>
109d35: 83 f8 02 cmp $0x2,%eax
109d38: 0f 85 c6 01 00 00 jne 109f04 <pthread_create+0x214>
109d3e: eb 1f jmp 109d5f <pthread_create+0x6f>
case PTHREAD_INHERIT_SCHED:
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
109d40: a1 dc f8 12 00 mov 0x12f8dc,%eax
109d45: 8b b0 e8 00 00 00 mov 0xe8(%eax),%esi
schedpolicy = api->schedpolicy;
109d4b: 8b 86 84 00 00 00 mov 0x84(%esi),%eax
109d51: 89 45 ac mov %eax,-0x54(%ebp)
schedparam = api->schedparam;
109d54: 8d 7d cc lea -0x34(%ebp),%edi
109d57: 81 c6 88 00 00 00 add $0x88,%esi
109d5d: eb 0c jmp 109d6b <pthread_create+0x7b>
break;
case PTHREAD_EXPLICIT_SCHED:
schedpolicy = the_attr->schedpolicy;
109d5f: 8b 42 14 mov 0x14(%edx),%eax
109d62: 89 45 ac mov %eax,-0x54(%ebp)
schedparam = the_attr->schedparam;
109d65: 8d 7d cc lea -0x34(%ebp),%edi
109d68: 8d 72 18 lea 0x18(%edx),%esi
109d6b: b9 07 00 00 00 mov $0x7,%ecx
109d70: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/*
* Check the contentionscope since rtems only supports PROCESS wide
* contention (i.e. no system wide contention).
*/
if ( the_attr->contentionscope != PTHREAD_SCOPE_PROCESS )
return ENOTSUP;
109d72: c7 45 b4 86 00 00 00 movl $0x86,-0x4c(%ebp)
/*
* Check the contentionscope since rtems only supports PROCESS wide
* contention (i.e. no system wide contention).
*/
if ( the_attr->contentionscope != PTHREAD_SCOPE_PROCESS )
109d79: 83 7a 0c 00 cmpl $0x0,0xc(%edx)
109d7d: 0f 85 88 01 00 00 jne 109f0b <pthread_create+0x21b>
return ENOTSUP;
/*
* Interpret the scheduling parameters.
*/
if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) )
109d83: 83 ec 0c sub $0xc,%esp
109d86: ff 75 cc pushl -0x34(%ebp)
109d89: 89 55 a8 mov %edx,-0x58(%ebp)
109d8c: e8 5b 54 00 00 call 10f1ec <_POSIX_Priority_Is_valid>
109d91: 83 c4 10 add $0x10,%esp
109d94: 84 c0 test %al,%al
109d96: 0f 84 68 01 00 00 je 109f04 <pthread_create+0x214> <== NEVER TAKEN
return EINVAL;
core_priority = _POSIX_Priority_To_core( schedparam.sched_priority );
109d9c: 8b 5d cc mov -0x34(%ebp),%ebx
RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core(
int priority
)
{
return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1);
109d9f: 0f b6 35 88 b1 12 00 movzbl 0x12b188,%esi
/*
* Set the core scheduling policy information.
*/
rc = _POSIX_Thread_Translate_sched_param(
109da6: 8d 45 c8 lea -0x38(%ebp),%eax
109da9: 50 push %eax
109daa: 8d 45 c4 lea -0x3c(%ebp),%eax
109dad: 50 push %eax
109dae: 8d 45 cc lea -0x34(%ebp),%eax
109db1: 50 push %eax
109db2: ff 75 ac pushl -0x54(%ebp)
109db5: e8 52 54 00 00 call 10f20c <_POSIX_Thread_Translate_sched_param>
109dba: 89 45 b4 mov %eax,-0x4c(%ebp)
schedpolicy,
&schedparam,
&budget_algorithm,
&budget_callout
);
if ( rc )
109dbd: 83 c4 10 add $0x10,%esp
109dc0: 85 c0 test %eax,%eax
109dc2: 0f 85 43 01 00 00 jne 109f0b <pthread_create+0x21b>
#endif
/*
* Lock the allocator mutex for protection
*/
_RTEMS_Lock_allocator();
109dc8: 83 ec 0c sub $0xc,%esp
109dcb: ff 35 60 f4 12 00 pushl 0x12f460
109dd1: e8 66 15 00 00 call 10b33c <_API_Mutex_Lock>
* _POSIX_Threads_Allocate
*/
RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void )
{
return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information );
109dd6: c7 04 24 d8 f5 12 00 movl $0x12f5d8,(%esp)
109ddd: e8 d6 1d 00 00 call 10bbb8 <_Objects_Allocate>
109de2: 89 45 b0 mov %eax,-0x50(%ebp)
* Allocate the thread control block.
*
* NOTE: Global threads are not currently supported.
*/
the_thread = _POSIX_Threads_Allocate();
if ( !the_thread ) {
109de5: 83 c4 10 add $0x10,%esp
109de8: 85 c0 test %eax,%eax
109dea: 8b 55 a8 mov -0x58(%ebp),%edx
109ded: 75 05 jne 109df4 <pthread_create+0x104>
_RTEMS_Unlock_allocator();
109def: 83 ec 0c sub $0xc,%esp
109df2: eb 56 jmp 109e4a <pthread_create+0x15a>
/*
* Initialize the core thread for this task.
*/
name.name_p = NULL; /* posix threads don't have a name by default */
status = _Thread_Initialize(
109df4: 8b 4a 08 mov 0x8(%edx),%ecx
109df7: 57 push %edi
109df8: 6a 00 push $0x0
109dfa: 6a 00 push $0x0
109dfc: ff 75 c8 pushl -0x38(%ebp)
109dff: ff 75 c4 pushl -0x3c(%ebp)
109e02: 6a 01 push $0x1
109e04: 81 e6 ff 00 00 00 and $0xff,%esi
109e0a: 29 de sub %ebx,%esi
109e0c: 56 push %esi
109e0d: 6a 01 push $0x1
109e0f: a1 8c b1 12 00 mov 0x12b18c,%eax
109e14: d1 e0 shl %eax
109e16: 39 c8 cmp %ecx,%eax
109e18: 73 02 jae 109e1c <pthread_create+0x12c>
109e1a: 89 c8 mov %ecx,%eax
109e1c: 50 push %eax
109e1d: ff 72 04 pushl 0x4(%edx)
109e20: ff 75 b0 pushl -0x50(%ebp)
109e23: 68 d8 f5 12 00 push $0x12f5d8
109e28: 89 55 a8 mov %edx,-0x58(%ebp)
109e2b: e8 68 2d 00 00 call 10cb98 <_Thread_Initialize>
budget_callout,
0, /* isr level */
name /* posix threads don't have a name */
);
if ( !status ) {
109e30: 83 c4 30 add $0x30,%esp
109e33: 84 c0 test %al,%al
109e35: 8b 55 a8 mov -0x58(%ebp),%edx
109e38: 75 2a jne 109e64 <pthread_create+0x174>
RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free (
Thread_Control *the_pthread
)
{
_Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object );
109e3a: 51 push %ecx
109e3b: 51 push %ecx
109e3c: ff 75 b0 pushl -0x50(%ebp)
109e3f: 68 d8 f5 12 00 push $0x12f5d8
109e44: e8 4f 20 00 00 call 10be98 <_Objects_Free>
_POSIX_Threads_Free( the_thread );
_RTEMS_Unlock_allocator();
109e49: 5b pop %ebx
109e4a: ff 35 60 f4 12 00 pushl 0x12f460
109e50: e8 2f 15 00 00 call 10b384 <_API_Mutex_Unlock>
109e55: 83 c4 10 add $0x10,%esp
return EAGAIN;
109e58: c7 45 b4 0b 00 00 00 movl $0xb,-0x4c(%ebp)
109e5f: e9 a7 00 00 00 jmp 109f0b <pthread_create+0x21b>
}
/*
* finish initializing the per API structure
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
109e64: 8b 45 b0 mov -0x50(%ebp),%eax
109e67: 8b 98 e8 00 00 00 mov 0xe8(%eax),%ebx
api->Attributes = *the_attr;
109e6d: b9 10 00 00 00 mov $0x10,%ecx
109e72: 89 df mov %ebx,%edi
109e74: 89 d6 mov %edx,%esi
109e76: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
api->detachstate = the_attr->detachstate;
109e78: 8b 42 3c mov 0x3c(%edx),%eax
109e7b: 89 43 40 mov %eax,0x40(%ebx)
api->schedpolicy = schedpolicy;
109e7e: 8b 45 ac mov -0x54(%ebp),%eax
109e81: 89 83 84 00 00 00 mov %eax,0x84(%ebx)
api->schedparam = schedparam;
109e87: 8d bb 88 00 00 00 lea 0x88(%ebx),%edi
109e8d: 8d 75 cc lea -0x34(%ebp),%esi
109e90: b1 07 mov $0x7,%cl
109e92: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/*
* POSIX threads are allocated and started in one operation.
*/
status = _Thread_Start(
109e94: 83 ec 0c sub $0xc,%esp
109e97: 6a 00 push $0x0
109e99: ff 75 14 pushl 0x14(%ebp)
109e9c: ff 75 10 pushl 0x10(%ebp)
109e9f: 6a 01 push $0x1
109ea1: ff 75 b0 pushl -0x50(%ebp)
109ea4: e8 d7 34 00 00 call 10d380 <_Thread_Start>
_RTEMS_Unlock_allocator();
return EINVAL;
}
#endif
if ( schedpolicy == SCHED_SPORADIC ) {
109ea9: 83 c4 20 add $0x20,%esp
109eac: 83 7d ac 04 cmpl $0x4,-0x54(%ebp)
109eb0: 75 2b jne 109edd <pthread_create+0x1ed>
_Watchdog_Insert_ticks(
109eb2: 83 ec 0c sub $0xc,%esp
&api->Sporadic_timer,
_Timespec_To_ticks( &api->schedparam.sched_ss_repl_period )
109eb5: 8d 83 90 00 00 00 lea 0x90(%ebx),%eax
return EINVAL;
}
#endif
if ( schedpolicy == SCHED_SPORADIC ) {
_Watchdog_Insert_ticks(
109ebb: 50 push %eax
109ebc: e8 3f 35 00 00 call 10d400 <_Timespec_To_ticks>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
109ec1: 89 83 b4 00 00 00 mov %eax,0xb4(%ebx)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
109ec7: 58 pop %eax
109ec8: 5a pop %edx
109ec9: 81 c3 a8 00 00 00 add $0xa8,%ebx
109ecf: 53 push %ebx
109ed0: 68 78 f4 12 00 push $0x12f478
109ed5: e8 b2 37 00 00 call 10d68c <_Watchdog_Insert>
109eda: 83 c4 10 add $0x10,%esp
}
/*
* Return the id and indicate we successfully created the thread
*/
*thread = the_thread->Object.id;
109edd: 8b 45 b0 mov -0x50(%ebp),%eax
109ee0: 8b 50 08 mov 0x8(%eax),%edx
109ee3: 8b 45 08 mov 0x8(%ebp),%eax
109ee6: 89 10 mov %edx,(%eax)
_RTEMS_Unlock_allocator();
109ee8: 83 ec 0c sub $0xc,%esp
109eeb: ff 35 60 f4 12 00 pushl 0x12f460
109ef1: e8 8e 14 00 00 call 10b384 <_API_Mutex_Unlock>
109ef6: 83 c4 10 add $0x10,%esp
109ef9: eb 10 jmp 109f0b <pthread_create+0x21b>
struct sched_param schedparam;
Objects_Name name;
int rc;
if ( !start_routine )
return EFAULT;
109efb: c7 45 b4 0e 00 00 00 movl $0xe,-0x4c(%ebp)
109f02: eb 07 jmp 109f0b <pthread_create+0x21b>
schedpolicy = the_attr->schedpolicy;
schedparam = the_attr->schedparam;
break;
default:
return EINVAL;
109f04: c7 45 b4 16 00 00 00 movl $0x16,-0x4c(%ebp)
*/
*thread = the_thread->Object.id;
_RTEMS_Unlock_allocator();
return 0;
}
109f0b: 8b 45 b4 mov -0x4c(%ebp),%eax
109f0e: 8d 65 f4 lea -0xc(%ebp),%esp
109f11: 5b pop %ebx
109f12: 5e pop %esi
109f13: 5f pop %edi
109f14: 5d pop %ebp
109f15: c3 ret
001109fe <pthread_exit>:
}
void pthread_exit(
void *value_ptr
)
{
1109fe: 55 push %ebp
1109ff: 89 e5 mov %esp,%ebp
110a01: 83 ec 10 sub $0x10,%esp
_POSIX_Thread_Exit( _Thread_Executing, value_ptr );
110a04: ff 75 08 pushl 0x8(%ebp)
110a07: ff 35 ec e8 12 00 pushl 0x12e8ec
110a0d: e8 0a ff ff ff call 11091c <_POSIX_Thread_Exit>
110a12: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
110a15: c9 leave <== NOT EXECUTED
110a16: c3 ret <== NOT EXECUTED
0011dcf0 <pthread_kill>:
int pthread_kill(
pthread_t thread,
int sig
)
{
11dcf0: 55 push %ebp
11dcf1: 89 e5 mov %esp,%ebp
11dcf3: 57 push %edi
11dcf4: 56 push %esi
11dcf5: 53 push %ebx
11dcf6: 83 ec 1c sub $0x1c,%esp
11dcf9: 8b 5d 0c mov 0xc(%ebp),%ebx
POSIX_API_Control *api;
Thread_Control *the_thread;
Objects_Locations location;
if ( !sig )
11dcfc: 85 db test %ebx,%ebx
11dcfe: 75 02 jne 11dd02 <pthread_kill+0x12>
11dd00: eb 08 jmp 11dd0a <pthread_kill+0x1a>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
11dd02: 8d 7b ff lea -0x1(%ebx),%edi
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
11dd05: 83 ff 1f cmp $0x1f,%edi
11dd08: 76 0d jbe 11dd17 <pthread_kill+0x27>
rtems_set_errno_and_return_minus_one( EINVAL );
11dd0a: e8 cd 31 ff ff call 110edc <__errno>
11dd0f: c7 00 16 00 00 00 movl $0x16,(%eax)
11dd15: eb 75 jmp 11dd8c <pthread_kill+0x9c>
the_thread = _Thread_Get( thread, &location );
11dd17: 52 push %edx
11dd18: 52 push %edx
11dd19: 8d 45 e4 lea -0x1c(%ebp),%eax
11dd1c: 50 push %eax
11dd1d: ff 75 08 pushl 0x8(%ebp)
11dd20: e8 07 e1 fe ff call 10be2c <_Thread_Get>
11dd25: 89 c6 mov %eax,%esi
switch ( location ) {
11dd27: 83 c4 10 add $0x10,%esp
11dd2a: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp)
11dd2e: 75 51 jne 11dd81 <pthread_kill+0x91> <== NEVER TAKEN
case OBJECTS_LOCAL:
/*
* If sig == 0 then just validate arguments
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
11dd30: 8b 90 e8 00 00 00 mov 0xe8(%eax),%edx
if ( sig ) {
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) {
11dd36: 6b c3 0c imul $0xc,%ebx,%eax
11dd39: 83 b8 30 e9 12 00 01 cmpl $0x1,0x12e930(%eax)
11dd40: 75 09 jne 11dd4b <pthread_kill+0x5b>
_Thread_Enable_dispatch();
11dd42: e8 c5 e0 fe ff call 10be0c <_Thread_Enable_dispatch>
return 0;
11dd47: 31 c0 xor %eax,%eax
11dd49: eb 44 jmp 11dd8f <pthread_kill+0x9f>
static inline sigset_t signo_to_mask(
uint32_t sig
)
{
return 1u << (sig - 1);
11dd4b: b8 01 00 00 00 mov $0x1,%eax
11dd50: 89 f9 mov %edi,%ecx
11dd52: d3 e0 shl %cl,%eax
}
/* XXX critical section */
api->signals_pending |= signo_to_mask( sig );
11dd54: 09 82 d4 00 00 00 or %eax,0xd4(%edx)
(void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL );
11dd5a: 50 push %eax
11dd5b: 6a 00 push $0x0
11dd5d: 53 push %ebx
11dd5e: 56 push %esi
11dd5f: e8 8c fe ff ff call 11dbf0 <_POSIX_signals_Unblock_thread>
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
11dd64: 83 c4 10 add $0x10,%esp
11dd67: 83 3d e8 e8 12 00 00 cmpl $0x0,0x12e8e8
11dd6e: 74 d2 je 11dd42 <pthread_kill+0x52>
11dd70: 3b 35 ec e8 12 00 cmp 0x12e8ec,%esi
11dd76: 75 ca jne 11dd42 <pthread_kill+0x52>
_Thread_Dispatch_necessary = true;
11dd78: c6 05 f8 e8 12 00 01 movb $0x1,0x12e8f8
11dd7f: eb c1 jmp 11dd42 <pthread_kill+0x52>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( ESRCH );
11dd81: e8 56 31 ff ff call 110edc <__errno> <== NOT EXECUTED
11dd86: c7 00 03 00 00 00 movl $0x3,(%eax) <== NOT EXECUTED
11dd8c: 83 c8 ff or $0xffffffff,%eax
}
11dd8f: 8d 65 f4 lea -0xc(%ebp),%esp
11dd92: 5b pop %ebx
11dd93: 5e pop %esi
11dd94: 5f pop %edi
11dd95: 5d pop %ebp
11dd96: c3 ret
0010ba38 <pthread_mutex_timedlock>:
int pthread_mutex_timedlock(
pthread_mutex_t *mutex,
const struct timespec *abstime
)
{
10ba38: 55 push %ebp
10ba39: 89 e5 mov %esp,%ebp
10ba3b: 53 push %ebx
10ba3c: 83 ec 2c sub $0x2c,%esp
*
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
10ba3f: 8d 45 f4 lea -0xc(%ebp),%eax
10ba42: 50 push %eax
10ba43: ff 75 0c pushl 0xc(%ebp)
10ba46: e8 b5 00 00 00 call 10bb00 <_POSIX_Absolute_timeout_to_ticks>
10ba4b: 89 c3 mov %eax,%ebx
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
10ba4d: 83 c4 0c add $0xc,%esp
10ba50: 83 f8 03 cmp $0x3,%eax
10ba53: 0f 94 c1 sete %cl
do_wait = false;
lock_status = _POSIX_Mutex_Lock_support( mutex, do_wait, ticks );
10ba56: ff 75 f4 pushl -0xc(%ebp)
10ba59: 0f b6 c1 movzbl %cl,%eax
10ba5c: 50 push %eax
10ba5d: ff 75 08 pushl 0x8(%ebp)
10ba60: 88 4d e4 mov %cl,-0x1c(%ebp)
10ba63: e8 e8 fe ff ff call 10b950 <_POSIX_Mutex_Lock_support>
* This service only gives us the option to block. We used a polling
* attempt to lock if the abstime was not in the future. If we did
* not obtain the mutex, then not look at the status immediately,
* make sure the right reason is returned.
*/
if ( !do_wait && (lock_status == EBUSY) ) {
10ba68: 83 c4 10 add $0x10,%esp
10ba6b: 8a 4d e4 mov -0x1c(%ebp),%cl
10ba6e: 84 c9 test %cl,%cl
10ba70: 75 17 jne 10ba89 <pthread_mutex_timedlock+0x51>
10ba72: 83 f8 10 cmp $0x10,%eax
10ba75: 75 12 jne 10ba89 <pthread_mutex_timedlock+0x51>
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
return EINVAL;
10ba77: b0 16 mov $0x16,%al
* attempt to lock if the abstime was not in the future. If we did
* not obtain the mutex, then not look at the status immediately,
* make sure the right reason is returned.
*/
if ( !do_wait && (lock_status == EBUSY) ) {
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
10ba79: 85 db test %ebx,%ebx
10ba7b: 74 0c je 10ba89 <pthread_mutex_timedlock+0x51><== NEVER TAKEN
return EINVAL;
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
10ba7d: 4b dec %ebx
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
10ba7e: 83 fb 02 cmp $0x2,%ebx
10ba81: 19 c0 sbb %eax,%eax
10ba83: 83 e0 64 and $0x64,%eax
10ba86: 83 c0 10 add $0x10,%eax
}
return lock_status;
}
10ba89: 8b 5d fc mov -0x4(%ebp),%ebx
10ba8c: c9 leave
10ba8d: c3 ret
0010b6a4 <pthread_mutexattr_setpshared>:
int pthread_mutexattr_setpshared(
pthread_mutexattr_t *attr,
int pshared
)
{
10b6a4: 55 push %ebp
10b6a5: 89 e5 mov %esp,%ebp
10b6a7: 8b 55 08 mov 0x8(%ebp),%edx
10b6aa: 8b 4d 0c mov 0xc(%ebp),%ecx
if ( !attr || !attr->is_initialized )
return EINVAL;
10b6ad: b8 16 00 00 00 mov $0x16,%eax
int pthread_mutexattr_setpshared(
pthread_mutexattr_t *attr,
int pshared
)
{
if ( !attr || !attr->is_initialized )
10b6b2: 85 d2 test %edx,%edx
10b6b4: 74 0f je 10b6c5 <pthread_mutexattr_setpshared+0x21>
10b6b6: 83 3a 00 cmpl $0x0,(%edx)
10b6b9: 74 0a je 10b6c5 <pthread_mutexattr_setpshared+0x21>
return EINVAL;
switch ( pshared ) {
10b6bb: 83 f9 01 cmp $0x1,%ecx
10b6be: 77 05 ja 10b6c5 <pthread_mutexattr_setpshared+0x21><== NEVER TAKEN
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
10b6c0: 89 4a 04 mov %ecx,0x4(%edx)
return 0;
10b6c3: 30 c0 xor %al,%al
default:
return EINVAL;
}
}
10b6c5: 5d pop %ebp
10b6c6: c3 ret
00109870 <pthread_mutexattr_settype>:
#if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES)
int pthread_mutexattr_settype(
pthread_mutexattr_t *attr,
int type
)
{
109870: 55 push %ebp
109871: 89 e5 mov %esp,%ebp
109873: 8b 55 08 mov 0x8(%ebp),%edx
109876: 8b 4d 0c mov 0xc(%ebp),%ecx
if ( !attr || !attr->is_initialized )
return EINVAL;
109879: b8 16 00 00 00 mov $0x16,%eax
int pthread_mutexattr_settype(
pthread_mutexattr_t *attr,
int type
)
{
if ( !attr || !attr->is_initialized )
10987e: 85 d2 test %edx,%edx
109880: 74 0f je 109891 <pthread_mutexattr_settype+0x21>
109882: 83 3a 00 cmpl $0x0,(%edx)
109885: 74 0a je 109891 <pthread_mutexattr_settype+0x21><== NEVER TAKEN
return EINVAL;
switch ( type ) {
109887: 83 f9 03 cmp $0x3,%ecx
10988a: 77 05 ja 109891 <pthread_mutexattr_settype+0x21>
case PTHREAD_MUTEX_NORMAL:
case PTHREAD_MUTEX_RECURSIVE:
case PTHREAD_MUTEX_ERRORCHECK:
case PTHREAD_MUTEX_DEFAULT:
attr->type = type;
10988c: 89 4a 10 mov %ecx,0x10(%edx)
return 0;
10988f: 30 c0 xor %al,%al
default:
return EINVAL;
}
}
109891: 5d pop %ebp
109892: c3 ret
0010a380 <pthread_once>:
int pthread_once(
pthread_once_t *once_control,
void (*init_routine)(void)
)
{
10a380: 55 push %ebp
10a381: 89 e5 mov %esp,%ebp
10a383: 56 push %esi
10a384: 53 push %ebx
10a385: 83 ec 10 sub $0x10,%esp
10a388: 8b 5d 08 mov 0x8(%ebp),%ebx
10a38b: 8b 75 0c mov 0xc(%ebp),%esi
if ( !once_control || !init_routine )
10a38e: 85 f6 test %esi,%esi
10a390: 74 51 je 10a3e3 <pthread_once+0x63>
10a392: 85 db test %ebx,%ebx
10a394: 74 4d je 10a3e3 <pthread_once+0x63>
once_control->init_executed = true;
(*init_routine)();
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
}
return 0;
10a396: 31 c0 xor %eax,%eax
)
{
if ( !once_control || !init_routine )
return EINVAL;
if ( !once_control->init_executed ) {
10a398: 83 7b 04 00 cmpl $0x0,0x4(%ebx)
10a39c: 75 4a jne 10a3e8 <pthread_once+0x68>
rtems_mode saveMode;
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
10a39e: 52 push %edx
10a39f: 8d 45 f4 lea -0xc(%ebp),%eax
10a3a2: 50 push %eax
10a3a3: 68 00 01 00 00 push $0x100
10a3a8: 68 00 01 00 00 push $0x100
10a3ad: e8 16 0a 00 00 call 10adc8 <rtems_task_mode>
if ( !once_control->init_executed ) {
10a3b2: 83 c4 10 add $0x10,%esp
10a3b5: 83 7b 04 00 cmpl $0x0,0x4(%ebx)
10a3b9: 75 0f jne 10a3ca <pthread_once+0x4a> <== NEVER TAKEN
once_control->is_initialized = true;
10a3bb: c7 03 01 00 00 00 movl $0x1,(%ebx)
once_control->init_executed = true;
10a3c1: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx)
(*init_routine)();
10a3c8: ff d6 call *%esi
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
10a3ca: 50 push %eax
10a3cb: 8d 45 f4 lea -0xc(%ebp),%eax
10a3ce: 50 push %eax
10a3cf: 68 00 01 00 00 push $0x100
10a3d4: ff 75 f4 pushl -0xc(%ebp)
10a3d7: e8 ec 09 00 00 call 10adc8 <rtems_task_mode>
10a3dc: 83 c4 10 add $0x10,%esp
}
return 0;
10a3df: 31 c0 xor %eax,%eax
10a3e1: eb 05 jmp 10a3e8 <pthread_once+0x68>
pthread_once_t *once_control,
void (*init_routine)(void)
)
{
if ( !once_control || !init_routine )
return EINVAL;
10a3e3: b8 16 00 00 00 mov $0x16,%eax
(*init_routine)();
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
}
return 0;
}
10a3e8: 8d 65 f8 lea -0x8(%ebp),%esp
10a3eb: 5b pop %ebx
10a3ec: 5e pop %esi
10a3ed: 5d pop %ebp
10a3ee: c3 ret
0010a220 <pthread_rwlock_init>:
int pthread_rwlock_init(
pthread_rwlock_t *rwlock,
const pthread_rwlockattr_t *attr
)
{
10a220: 55 push %ebp
10a221: 89 e5 mov %esp,%ebp
10a223: 56 push %esi
10a224: 53 push %ebx
10a225: 83 ec 10 sub $0x10,%esp
10a228: 8b 75 08 mov 0x8(%ebp),%esi
const pthread_rwlockattr_t *the_attr;
/*
* Error check parameters
*/
if ( !rwlock )
10a22b: 85 f6 test %esi,%esi
10a22d: 75 05 jne 10a234 <pthread_rwlock_init+0x14>
10a22f: e9 8f 00 00 00 jmp 10a2c3 <pthread_rwlock_init+0xa3>
return EINVAL;
/*
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
10a234: 8b 45 0c mov 0xc(%ebp),%eax
10a237: 85 c0 test %eax,%eax
10a239: 75 11 jne 10a24c <pthread_rwlock_init+0x2c>
the_attr = attr;
} else {
(void) pthread_rwlockattr_init( &default_attr );
10a23b: 83 ec 0c sub $0xc,%esp
10a23e: 8d 5d f0 lea -0x10(%ebp),%ebx
10a241: 53 push %ebx
10a242: e8 a1 06 00 00 call 10a8e8 <pthread_rwlockattr_init>
10a247: 83 c4 10 add $0x10,%esp
the_attr = &default_attr;
10a24a: 89 d8 mov %ebx,%eax
}
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
10a24c: 83 38 00 cmpl $0x0,(%eax)
10a24f: 74 72 je 10a2c3 <pthread_rwlock_init+0xa3><== NEVER TAKEN
return EINVAL;
switch ( the_attr->process_shared ) {
10a251: 83 78 04 00 cmpl $0x0,0x4(%eax)
10a255: 75 6c jne 10a2c3 <pthread_rwlock_init+0xa3><== NEVER TAKEN
*/
RTEMS_INLINE_ROUTINE void _CORE_RWLock_Initialize_attributes(
CORE_RWLock_Attributes *the_attributes
)
{
the_attributes->XXX = 0;
10a257: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp)
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
10a25e: a1 b4 31 13 00 mov 0x1331b4,%eax
10a263: 40 inc %eax
10a264: a3 b4 31 13 00 mov %eax,0x1331b4
return _Thread_Dispatch_disable_level;
10a269: a1 b4 31 13 00 mov 0x1331b4,%eax
* This function allocates a RWLock control block from
* the inactive chain of free RWLock control blocks.
*/
RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Allocate( void )
{
return (POSIX_RWLock_Control *)
10a26e: 83 ec 0c sub $0xc,%esp
10a271: 68 b8 33 13 00 push $0x1333b8
10a276: e8 3d 24 00 00 call 10c6b8 <_Objects_Allocate>
10a27b: 89 c3 mov %eax,%ebx
*/
_Thread_Disable_dispatch(); /* prevents deletion */
the_rwlock = _POSIX_RWLock_Allocate();
if ( !the_rwlock ) {
10a27d: 83 c4 10 add $0x10,%esp
10a280: 85 c0 test %eax,%eax
10a282: 75 0c jne 10a290 <pthread_rwlock_init+0x70>
_Thread_Enable_dispatch();
10a284: e8 33 34 00 00 call 10d6bc <_Thread_Enable_dispatch>
return EAGAIN;
10a289: b8 0b 00 00 00 mov $0xb,%eax
10a28e: eb 38 jmp 10a2c8 <pthread_rwlock_init+0xa8>
}
_CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes );
10a290: 50 push %eax
10a291: 50 push %eax
10a292: 8d 45 ec lea -0x14(%ebp),%eax
10a295: 50 push %eax
10a296: 8d 43 10 lea 0x10(%ebx),%eax
10a299: 50 push %eax
10a29a: e8 c1 1e 00 00 call 10c160 <_CORE_RWLock_Initialize>
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
10a29f: 8b 43 08 mov 0x8(%ebx),%eax
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
10a2a2: 0f b7 c8 movzwl %ax,%ecx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10a2a5: 8b 15 d4 33 13 00 mov 0x1333d4,%edx
10a2ab: 89 1c 8a mov %ebx,(%edx,%ecx,4)
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
10a2ae: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
&_POSIX_RWLock_Information,
&the_rwlock->Object,
0
);
*rwlock = the_rwlock->Object.id;
10a2b5: 89 06 mov %eax,(%esi)
_Thread_Enable_dispatch();
10a2b7: e8 00 34 00 00 call 10d6bc <_Thread_Enable_dispatch>
10a2bc: 83 c4 10 add $0x10,%esp
return 0;
10a2bf: 31 c0 xor %eax,%eax
10a2c1: eb 05 jmp 10a2c8 <pthread_rwlock_init+0xa8>
switch ( the_attr->process_shared ) {
case PTHREAD_PROCESS_PRIVATE: /* only supported values */
break;
case PTHREAD_PROCESS_SHARED:
default:
return EINVAL;
10a2c3: b8 16 00 00 00 mov $0x16,%eax
*rwlock = the_rwlock->Object.id;
_Thread_Enable_dispatch();
return 0;
}
10a2c8: 8d 65 f8 lea -0x8(%ebp),%esp
10a2cb: 5b pop %ebx
10a2cc: 5e pop %esi
10a2cd: 5d pop %ebp
10a2ce: c3 ret
0010ac10 <pthread_rwlock_timedrdlock>:
int pthread_rwlock_timedrdlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
10ac10: 55 push %ebp
10ac11: 89 e5 mov %esp,%ebp
10ac13: 56 push %esi
10ac14: 53 push %ebx
10ac15: 83 ec 20 sub $0x20,%esp
10ac18: 8b 75 08 mov 0x8(%ebp),%esi
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
10ac1b: 85 f6 test %esi,%esi
10ac1d: 75 05 jne 10ac24 <pthread_rwlock_timedrdlock+0x14>
10ac1f: e9 8a 00 00 00 jmp 10acae <pthread_rwlock_timedrdlock+0x9e>
*
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
10ac24: 50 push %eax
10ac25: 50 push %eax
10ac26: 8d 45 f4 lea -0xc(%ebp),%eax
10ac29: 50 push %eax
10ac2a: ff 75 0c pushl 0xc(%ebp)
10ac2d: e8 ce 56 00 00 call 110300 <_POSIX_Absolute_timeout_to_ticks>
10ac32: 89 c3 mov %eax,%ebx
10ac34: 83 c4 0c add $0xc,%esp
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
10ac37: 8d 45 f0 lea -0x10(%ebp),%eax
10ac3a: 50 push %eax
10ac3b: ff 36 pushl (%esi)
10ac3d: 68 a0 15 13 00 push $0x1315a0
10ac42: e8 59 25 00 00 call 10d1a0 <_Objects_Get>
switch ( location ) {
10ac47: 83 c4 10 add $0x10,%esp
10ac4a: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
10ac4e: 75 5e jne 10acae <pthread_rwlock_timedrdlock+0x9e>
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
10ac50: 83 fb 03 cmp $0x3,%ebx
10ac53: 0f 94 c2 sete %dl
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_reading(
10ac56: 83 ec 0c sub $0xc,%esp
10ac59: 6a 00 push $0x0
10ac5b: ff 75 f4 pushl -0xc(%ebp)
10ac5e: 0f b6 ca movzbl %dl,%ecx
10ac61: 51 push %ecx
10ac62: ff 36 pushl (%esi)
10ac64: 83 c0 10 add $0x10,%eax
10ac67: 50 push %eax
10ac68: 88 55 e4 mov %dl,-0x1c(%ebp)
10ac6b: e8 d0 19 00 00 call 10c640 <_CORE_RWLock_Obtain_for_reading>
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
10ac70: 83 c4 20 add $0x20,%esp
10ac73: e8 5c 30 00 00 call 10dcd4 <_Thread_Enable_dispatch>
if ( !do_wait ) {
10ac78: 8a 55 e4 mov -0x1c(%ebp),%dl
10ac7b: 84 d2 test %dl,%dl
10ac7d: 75 1a jne 10ac99 <pthread_rwlock_timedrdlock+0x89>
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
10ac7f: a1 e4 18 13 00 mov 0x1318e4,%eax
10ac84: 83 78 34 02 cmpl $0x2,0x34(%eax)
10ac88: 75 0f jne 10ac99 <pthread_rwlock_timedrdlock+0x89>
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
10ac8a: 85 db test %ebx,%ebx
10ac8c: 74 20 je 10acae <pthread_rwlock_timedrdlock+0x9e><== NEVER TAKEN
return EINVAL;
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
10ac8e: 4b dec %ebx
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
10ac8f: b8 74 00 00 00 mov $0x74,%eax
_Thread_Enable_dispatch();
if ( !do_wait ) {
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
return EINVAL;
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
10ac94: 83 fb 01 cmp $0x1,%ebx
10ac97: 76 1a jbe 10acb3 <pthread_rwlock_timedrdlock+0xa3><== ALWAYS TAKEN
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
10ac99: 83 ec 0c sub $0xc,%esp
(CORE_RWLock_Status) _Thread_Executing->Wait.return_code
10ac9c: a1 e4 18 13 00 mov 0x1318e4,%eax
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
10aca1: ff 70 34 pushl 0x34(%eax)
10aca4: e8 bf 00 00 00 call 10ad68 <_POSIX_RWLock_Translate_core_RWLock_return_code>
10aca9: 83 c4 10 add $0x10,%esp
10acac: eb 05 jmp 10acb3 <pthread_rwlock_timedrdlock+0xa3>
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
10acae: b8 16 00 00 00 mov $0x16,%eax
}
10acb3: 8d 65 f8 lea -0x8(%ebp),%esp
10acb6: 5b pop %ebx
10acb7: 5e pop %esi
10acb8: 5d pop %ebp
10acb9: c3 ret
0010acbc <pthread_rwlock_timedwrlock>:
int pthread_rwlock_timedwrlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
10acbc: 55 push %ebp
10acbd: 89 e5 mov %esp,%ebp
10acbf: 56 push %esi
10acc0: 53 push %ebx
10acc1: 83 ec 20 sub $0x20,%esp
10acc4: 8b 75 08 mov 0x8(%ebp),%esi
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
10acc7: 85 f6 test %esi,%esi
10acc9: 75 05 jne 10acd0 <pthread_rwlock_timedwrlock+0x14>
10accb: e9 8a 00 00 00 jmp 10ad5a <pthread_rwlock_timedwrlock+0x9e>
*
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
10acd0: 50 push %eax
10acd1: 50 push %eax
10acd2: 8d 45 f4 lea -0xc(%ebp),%eax
10acd5: 50 push %eax
10acd6: ff 75 0c pushl 0xc(%ebp)
10acd9: e8 22 56 00 00 call 110300 <_POSIX_Absolute_timeout_to_ticks>
10acde: 89 c3 mov %eax,%ebx
10ace0: 83 c4 0c add $0xc,%esp
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
10ace3: 8d 45 f0 lea -0x10(%ebp),%eax
10ace6: 50 push %eax
10ace7: ff 36 pushl (%esi)
10ace9: 68 a0 15 13 00 push $0x1315a0
10acee: e8 ad 24 00 00 call 10d1a0 <_Objects_Get>
switch ( location ) {
10acf3: 83 c4 10 add $0x10,%esp
10acf6: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
10acfa: 75 5e jne 10ad5a <pthread_rwlock_timedwrlock+0x9e>
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
10acfc: 83 fb 03 cmp $0x3,%ebx
10acff: 0f 94 c2 sete %dl
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_writing(
10ad02: 83 ec 0c sub $0xc,%esp
10ad05: 6a 00 push $0x0
10ad07: ff 75 f4 pushl -0xc(%ebp)
10ad0a: 0f b6 ca movzbl %dl,%ecx
10ad0d: 51 push %ecx
10ad0e: ff 36 pushl (%esi)
10ad10: 83 c0 10 add $0x10,%eax
10ad13: 50 push %eax
10ad14: 88 55 e4 mov %dl,-0x1c(%ebp)
10ad17: e8 d4 19 00 00 call 10c6f0 <_CORE_RWLock_Obtain_for_writing>
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
10ad1c: 83 c4 20 add $0x20,%esp
10ad1f: e8 b0 2f 00 00 call 10dcd4 <_Thread_Enable_dispatch>
if ( !do_wait &&
10ad24: 8a 55 e4 mov -0x1c(%ebp),%dl
10ad27: 84 d2 test %dl,%dl
10ad29: 75 1a jne 10ad45 <pthread_rwlock_timedwrlock+0x89>
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
10ad2b: a1 e4 18 13 00 mov 0x1318e4,%eax
ticks,
NULL
);
_Thread_Enable_dispatch();
if ( !do_wait &&
10ad30: 83 78 34 02 cmpl $0x2,0x34(%eax)
10ad34: 75 0f jne 10ad45 <pthread_rwlock_timedwrlock+0x89>
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
10ad36: 85 db test %ebx,%ebx
10ad38: 74 20 je 10ad5a <pthread_rwlock_timedwrlock+0x9e><== NEVER TAKEN
return EINVAL;
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
10ad3a: 4b dec %ebx
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
10ad3b: b8 74 00 00 00 mov $0x74,%eax
_Thread_Enable_dispatch();
if ( !do_wait &&
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
return EINVAL;
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
10ad40: 83 fb 01 cmp $0x1,%ebx
10ad43: 76 1a jbe 10ad5f <pthread_rwlock_timedwrlock+0xa3><== ALWAYS TAKEN
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
10ad45: 83 ec 0c sub $0xc,%esp
(CORE_RWLock_Status) _Thread_Executing->Wait.return_code
10ad48: a1 e4 18 13 00 mov 0x1318e4,%eax
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
10ad4d: ff 70 34 pushl 0x34(%eax)
10ad50: e8 13 00 00 00 call 10ad68 <_POSIX_RWLock_Translate_core_RWLock_return_code>
10ad55: 83 c4 10 add $0x10,%esp
10ad58: eb 05 jmp 10ad5f <pthread_rwlock_timedwrlock+0xa3>
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
10ad5a: b8 16 00 00 00 mov $0x16,%eax
}
10ad5f: 8d 65 f8 lea -0x8(%ebp),%esp
10ad62: 5b pop %ebx
10ad63: 5e pop %esi
10ad64: 5d pop %ebp
10ad65: c3 ret
0010b4b8 <pthread_rwlockattr_setpshared>:
int pthread_rwlockattr_setpshared(
pthread_rwlockattr_t *attr,
int pshared
)
{
10b4b8: 55 push %ebp
10b4b9: 89 e5 mov %esp,%ebp
10b4bb: 8b 55 08 mov 0x8(%ebp),%edx
10b4be: 8b 4d 0c mov 0xc(%ebp),%ecx
if ( !attr )
return EINVAL;
10b4c1: b8 16 00 00 00 mov $0x16,%eax
int pthread_rwlockattr_setpshared(
pthread_rwlockattr_t *attr,
int pshared
)
{
if ( !attr )
10b4c6: 85 d2 test %edx,%edx
10b4c8: 74 0f je 10b4d9 <pthread_rwlockattr_setpshared+0x21>
return EINVAL;
if ( !attr->is_initialized )
10b4ca: 83 3a 00 cmpl $0x0,(%edx)
10b4cd: 74 0a je 10b4d9 <pthread_rwlockattr_setpshared+0x21>
return EINVAL;
switch ( pshared ) {
10b4cf: 83 f9 01 cmp $0x1,%ecx
10b4d2: 77 05 ja 10b4d9 <pthread_rwlockattr_setpshared+0x21><== NEVER TAKEN
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
10b4d4: 89 4a 04 mov %ecx,0x4(%edx)
return 0;
10b4d7: 30 c0 xor %al,%al
default:
return EINVAL;
}
}
10b4d9: 5d pop %ebp
10b4da: c3 ret
0010c2c4 <pthread_setschedparam>:
int pthread_setschedparam(
pthread_t thread,
int policy,
struct sched_param *param
)
{
10c2c4: 55 push %ebp
10c2c5: 89 e5 mov %esp,%ebp
10c2c7: 57 push %edi
10c2c8: 56 push %esi
10c2c9: 53 push %ebx
10c2ca: 83 ec 2c sub $0x2c,%esp
10c2cd: 8b 75 10 mov 0x10(%ebp),%esi
/*
* Check all the parameters
*/
if ( !param )
return EINVAL;
10c2d0: c7 45 d4 16 00 00 00 movl $0x16,-0x2c(%ebp)
int rc;
/*
* Check all the parameters
*/
if ( !param )
10c2d7: 85 f6 test %esi,%esi
10c2d9: 0f 84 f9 00 00 00 je 10c3d8 <pthread_setschedparam+0x114>
return EINVAL;
rc = _POSIX_Thread_Translate_sched_param(
10c2df: 8d 45 e0 lea -0x20(%ebp),%eax
10c2e2: 50 push %eax
10c2e3: 8d 45 dc lea -0x24(%ebp),%eax
10c2e6: 50 push %eax
10c2e7: 56 push %esi
10c2e8: ff 75 0c pushl 0xc(%ebp)
10c2eb: e8 8c 4e 00 00 call 11117c <_POSIX_Thread_Translate_sched_param>
10c2f0: 89 45 d4 mov %eax,-0x2c(%ebp)
policy,
param,
&budget_algorithm,
&budget_callout
);
if ( rc )
10c2f3: 83 c4 10 add $0x10,%esp
10c2f6: 85 c0 test %eax,%eax
10c2f8: 0f 85 da 00 00 00 jne 10c3d8 <pthread_setschedparam+0x114>
return rc;
/*
* Actually change the scheduling policy and parameters
*/
the_thread = _Thread_Get( thread, &location );
10c2fe: 53 push %ebx
10c2ff: 53 push %ebx
10c300: 8d 45 e4 lea -0x1c(%ebp),%eax
10c303: 50 push %eax
10c304: ff 75 08 pushl 0x8(%ebp)
10c307: e8 d4 26 00 00 call 10e9e0 <_Thread_Get>
10c30c: 89 c2 mov %eax,%edx
switch ( location ) {
10c30e: 83 c4 10 add $0x10,%esp
10c311: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp)
10c315: 0f 85 b6 00 00 00 jne 10c3d1 <pthread_setschedparam+0x10d>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
10c31b: 8b 98 e8 00 00 00 mov 0xe8(%eax),%ebx
if ( api->schedpolicy == SCHED_SPORADIC )
10c321: 83 bb 84 00 00 00 04 cmpl $0x4,0x84(%ebx)
10c328: 75 18 jne 10c342 <pthread_setschedparam+0x7e>
(void) _Watchdog_Remove( &api->Sporadic_timer );
10c32a: 83 ec 0c sub $0xc,%esp
10c32d: 8d 83 a8 00 00 00 lea 0xa8(%ebx),%eax
10c333: 50 push %eax
10c334: 89 55 d0 mov %edx,-0x30(%ebp)
10c337: e8 ec 33 00 00 call 10f728 <_Watchdog_Remove>
10c33c: 83 c4 10 add $0x10,%esp
10c33f: 8b 55 d0 mov -0x30(%ebp),%edx
api->schedpolicy = policy;
10c342: 8b 45 0c mov 0xc(%ebp),%eax
10c345: 89 83 84 00 00 00 mov %eax,0x84(%ebx)
api->schedparam = *param;
10c34b: 8d bb 88 00 00 00 lea 0x88(%ebx),%edi
10c351: b9 07 00 00 00 mov $0x7,%ecx
10c356: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
the_thread->budget_algorithm = budget_algorithm;
10c358: 8b 45 dc mov -0x24(%ebp),%eax
10c35b: 89 42 78 mov %eax,0x78(%edx)
the_thread->budget_callout = budget_callout;
10c35e: 8b 45 e0 mov -0x20(%ebp),%eax
10c361: 89 42 7c mov %eax,0x7c(%edx)
switch ( api->schedpolicy ) {
10c364: 83 7d 0c 00 cmpl $0x0,0xc(%ebp)
10c368: 78 60 js 10c3ca <pthread_setschedparam+0x106><== NEVER TAKEN
10c36a: 83 7d 0c 02 cmpl $0x2,0xc(%ebp)
10c36e: 7e 08 jle 10c378 <pthread_setschedparam+0xb4>
10c370: 83 7d 0c 04 cmpl $0x4,0xc(%ebp)
10c374: 75 54 jne 10c3ca <pthread_setschedparam+0x106><== NEVER TAKEN
10c376: eb 24 jmp 10c39c <pthread_setschedparam+0xd8>
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
10c378: a1 08 34 13 00 mov 0x133408,%eax
10c37d: 89 42 74 mov %eax,0x74(%edx)
10c380: 0f b6 05 88 f1 12 00 movzbl 0x12f188,%eax
10c387: 2b 83 88 00 00 00 sub 0x88(%ebx),%eax
the_thread->real_priority =
10c38d: 89 42 18 mov %eax,0x18(%edx)
_POSIX_Priority_To_core( api->schedparam.sched_priority );
_Thread_Change_priority(
10c390: 51 push %ecx
10c391: 6a 01 push $0x1
10c393: 50 push %eax
10c394: 52 push %edx
10c395: e8 36 22 00 00 call 10e5d0 <_Thread_Change_priority>
10c39a: eb 2b jmp 10c3c7 <pthread_setschedparam+0x103>
true
);
break;
case SCHED_SPORADIC:
api->ss_high_priority = api->schedparam.sched_priority;
10c39c: 8b 83 88 00 00 00 mov 0x88(%ebx),%eax
10c3a2: 89 83 a4 00 00 00 mov %eax,0xa4(%ebx)
_Watchdog_Remove( &api->Sporadic_timer );
10c3a8: 83 ec 0c sub $0xc,%esp
10c3ab: 81 c3 a8 00 00 00 add $0xa8,%ebx
10c3b1: 53 push %ebx
10c3b2: 89 55 d0 mov %edx,-0x30(%ebp)
10c3b5: e8 6e 33 00 00 call 10f728 <_Watchdog_Remove>
_POSIX_Threads_Sporadic_budget_TSR( 0, the_thread );
10c3ba: 58 pop %eax
10c3bb: 5a pop %edx
10c3bc: 8b 55 d0 mov -0x30(%ebp),%edx
10c3bf: 52 push %edx
10c3c0: 6a 00 push $0x0
10c3c2: e8 ea fd ff ff call 10c1b1 <_POSIX_Threads_Sporadic_budget_TSR>
break;
10c3c7: 83 c4 10 add $0x10,%esp
}
_Thread_Enable_dispatch();
10c3ca: e8 f1 25 00 00 call 10e9c0 <_Thread_Enable_dispatch>
10c3cf: eb 07 jmp 10c3d8 <pthread_setschedparam+0x114>
#endif
case OBJECTS_ERROR:
break;
}
return ESRCH;
10c3d1: c7 45 d4 03 00 00 00 movl $0x3,-0x2c(%ebp)
}
10c3d8: 8b 45 d4 mov -0x2c(%ebp),%eax
10c3db: 8d 65 f4 lea -0xc(%ebp),%esp
10c3de: 5b pop %ebx
10c3df: 5e pop %esi
10c3e0: 5f pop %edi
10c3e1: 5d pop %ebp
10c3e2: c3 ret
0010a130 <pthread_testcancel>:
* Don't even think about deleting a resource from an ISR.
* Besides this request is supposed to be for _Thread_Executing
* and the ISR context is not a thread.
*/
if ( _ISR_Is_in_progress() )
10a130: 83 3d d8 f8 12 00 00 cmpl $0x0,0x12f8d8
10a137: 75 57 jne 10a190 <pthread_testcancel+0x60><== NEVER TAKEN
/*
* 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183
*/
void pthread_testcancel( void )
{
10a139: 55 push %ebp
10a13a: 89 e5 mov %esp,%ebp
10a13c: 53 push %ebx
10a13d: 52 push %edx
*/
if ( _ISR_Is_in_progress() )
return;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
10a13e: a1 dc f8 12 00 mov 0x12f8dc,%eax
10a143: 8b 80 e8 00 00 00 mov 0xe8(%eax),%eax
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
10a149: 8b 15 d4 f3 12 00 mov 0x12f3d4,%edx
10a14f: 42 inc %edx
10a150: 89 15 d4 f3 12 00 mov %edx,0x12f3d4
return _Thread_Dispatch_disable_level;
10a156: 8b 15 d4 f3 12 00 mov 0x12f3d4,%edx
*/
void pthread_testcancel( void )
{
POSIX_API_Control *thread_support;
bool cancel = false;
10a15c: 31 db xor %ebx,%ebx
return;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
_Thread_Disable_dispatch();
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
10a15e: 83 b8 d8 00 00 00 00 cmpl $0x0,0xd8(%eax)
10a165: 75 0a jne 10a171 <pthread_testcancel+0x41><== NEVER TAKEN
10a167: 83 b8 e0 00 00 00 00 cmpl $0x0,0xe0(%eax)
10a16e: 0f 95 c3 setne %bl
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
10a171: e8 16 25 00 00 call 10c68c <_Thread_Enable_dispatch>
if ( cancel )
10a176: 84 db test %bl,%bl
10a178: 74 12 je 10a18c <pthread_testcancel+0x5c>
_POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED );
10a17a: 50 push %eax
10a17b: 50 push %eax
10a17c: 6a ff push $0xffffffff
10a17e: ff 35 dc f8 12 00 pushl 0x12f8dc
10a184: e8 8f 4d 00 00 call 10ef18 <_POSIX_Thread_Exit>
10a189: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
10a18c: 8b 5d fc mov -0x4(%ebp),%ebx
10a18f: c9 leave
10a190: c3 ret
0010e240 <ramdisk_allocate>:
void *area_begin,
uint32_t block_size,
rtems_blkdev_bnum block_count,
bool trace
)
{
10e240: 55 push %ebp
10e241: 89 e5 mov %esp,%ebp
10e243: 57 push %edi
10e244: 56 push %esi
10e245: 53 push %ebx
10e246: 83 ec 18 sub $0x18,%esp
10e249: 8b 75 08 mov 0x8(%ebp),%esi
10e24c: 8a 5d 14 mov 0x14(%ebp),%bl
struct ramdisk *rd = malloc(sizeof(struct ramdisk));
10e24f: 6a 10 push $0x10
10e251: e8 ee 96 ff ff call 107944 <malloc>
10e256: 89 c7 mov %eax,%edi
if (rd == NULL) {
10e258: 83 c4 10 add $0x10,%esp
10e25b: 85 c0 test %eax,%eax
10e25d: 74 49 je 10e2a8 <ramdisk_allocate+0x68> <== NEVER TAKEN
return NULL;
}
if (area_begin == NULL) {
10e25f: 85 f6 test %esi,%esi
10e261: 75 2c jne 10e28f <ramdisk_allocate+0x4f>
area_begin = calloc(block_count, block_size);
10e263: 50 push %eax
10e264: 50 push %eax
10e265: ff 75 0c pushl 0xc(%ebp)
10e268: ff 75 10 pushl 0x10(%ebp)
10e26b: e8 48 90 ff ff call 1072b8 <calloc>
10e270: 89 c6 mov %eax,%esi
if (area_begin == NULL) {
10e272: 83 c4 10 add $0x10,%esp
10e275: 85 c0 test %eax,%eax
10e277: 75 10 jne 10e289 <ramdisk_allocate+0x49> <== ALWAYS TAKEN
free(rd);
10e279: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10e27c: 57 push %edi <== NOT EXECUTED
10e27d: e8 a2 92 ff ff call 107524 <free> <== NOT EXECUTED
return NULL;
10e282: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10e285: 31 ff xor %edi,%edi <== NOT EXECUTED
10e287: eb 1f jmp 10e2a8 <ramdisk_allocate+0x68> <== NOT EXECUTED
}
rd->malloced = true;
10e289: c6 47 0d 01 movb $0x1,0xd(%edi)
10e28d: eb 04 jmp 10e293 <ramdisk_allocate+0x53>
} else {
rd->malloced = false;
10e28f: c6 40 0d 00 movb $0x0,0xd(%eax)
}
rd->block_size = block_size;
10e293: 8b 45 0c mov 0xc(%ebp),%eax
10e296: 89 07 mov %eax,(%edi)
rd->block_num = block_count;
10e298: 8b 45 10 mov 0x10(%ebp),%eax
10e29b: 89 47 04 mov %eax,0x4(%edi)
rd->area = area_begin;
10e29e: 89 77 08 mov %esi,0x8(%edi)
rd->trace = trace;
10e2a1: 88 5f 0e mov %bl,0xe(%edi)
rd->initialized = true;
10e2a4: c6 47 0c 01 movb $0x1,0xc(%edi)
return rd;
}
10e2a8: 89 f8 mov %edi,%eax
10e2aa: 8d 65 f4 lea -0xc(%ebp),%esp
10e2ad: 5b pop %ebx
10e2ae: 5e pop %esi
10e2af: 5f pop %edi
10e2b0: 5d pop %ebp
10e2b1: c3 ret
0010e2b2 <ramdisk_free>:
void ramdisk_free(ramdisk *rd)
{
10e2b2: 55 push %ebp
10e2b3: 89 e5 mov %esp,%ebp
10e2b5: 53 push %ebx
10e2b6: 52 push %edx
10e2b7: 8b 5d 08 mov 0x8(%ebp),%ebx
if (rd != NULL) {
10e2ba: 85 db test %ebx,%ebx
10e2bc: 74 20 je 10e2de <ramdisk_free+0x2c> <== NEVER TAKEN
if (rd->malloced) {
10e2be: 80 7b 0d 00 cmpb $0x0,0xd(%ebx)
10e2c2: 74 0e je 10e2d2 <ramdisk_free+0x20>
free(rd->area);
10e2c4: 83 ec 0c sub $0xc,%esp
10e2c7: ff 73 08 pushl 0x8(%ebx)
10e2ca: e8 55 92 ff ff call 107524 <free>
10e2cf: 83 c4 10 add $0x10,%esp
}
free(rd);
10e2d2: 89 5d 08 mov %ebx,0x8(%ebp)
}
}
10e2d5: 8b 5d fc mov -0x4(%ebp),%ebx
10e2d8: c9 leave
{
if (rd != NULL) {
if (rd->malloced) {
free(rd->area);
}
free(rd);
10e2d9: e9 46 92 ff ff jmp 107524 <free>
}
}
10e2de: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
10e2e1: c9 leave <== NOT EXECUTED
10e2e2: c3 ret <== NOT EXECUTED
0010f060 <ramdisk_initialize>:
rtems_device_driver
ramdisk_initialize(
rtems_device_major_number major,
rtems_device_minor_number minor __attribute__((unused)),
void *arg __attribute__((unused)))
{
10f060: 55 push %ebp
10f061: 89 e5 mov %esp,%ebp
10f063: 57 push %edi
10f064: 56 push %esi
10f065: 53 push %ebx
10f066: 83 ec 3c sub $0x3c,%esp
rtems_device_minor_number i;
rtems_ramdisk_config *c = rtems_ramdisk_configuration;
struct ramdisk *r;
rtems_status_code rc;
rc = rtems_disk_io_initialize();
10f069: e8 fa 84 ff ff call 107568 <rtems_disk_io_initialize>
if (rc != RTEMS_SUCCESSFUL)
10f06e: 85 c0 test %eax,%eax
10f070: 0f 85 e4 00 00 00 jne 10f15a <ramdisk_initialize+0xfa><== NEVER TAKEN
* This is allocating memory for a RAM disk which will persist for
* the life of the system. RTEMS has no "de-initialize" driver call
* so there is no corresponding free(r). Coverity is correct that
* it is never freed but this is not a problem.
*/
r = calloc(rtems_ramdisk_configuration_size, sizeof(struct ramdisk));
10f076: 52 push %edx
10f077: 52 push %edx
10f078: 6a 10 push $0x10
10f07a: ff 35 98 f2 12 00 pushl 0x12f298
10f080: e8 37 91 ff ff call 1081bc <calloc>
10f085: 89 c3 mov %eax,%ebx
r->trace = false;
10f087: c6 40 0e 00 movb $0x0,0xe(%eax)
for (i = 0; i < rtems_ramdisk_configuration_size; i++, c++, r++)
10f08b: 83 c4 10 add $0x10,%esp
rtems_device_major_number major,
rtems_device_minor_number minor __attribute__((unused)),
void *arg __attribute__((unused)))
{
rtems_device_minor_number i;
rtems_ramdisk_config *c = rtems_ramdisk_configuration;
10f08e: c7 45 cc 9c f2 12 00 movl $0x12f29c,-0x34(%ebp)
* so there is no corresponding free(r). Coverity is correct that
* it is never freed but this is not a problem.
*/
r = calloc(rtems_ramdisk_configuration_size, sizeof(struct ramdisk));
r->trace = false;
for (i = 0; i < rtems_ramdisk_configuration_size; i++, c++, r++)
10f095: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp)
{
dev_t dev = rtems_filesystem_make_dev_t(major, i);
char name [] = RAMDISK_DEVICE_BASE_NAME "a";
10f09c: 8d 45 df lea -0x21(%ebp),%eax
10f09f: 89 45 d4 mov %eax,-0x2c(%ebp)
* so there is no corresponding free(r). Coverity is correct that
* it is never freed but this is not a problem.
*/
r = calloc(rtems_ramdisk_configuration_size, sizeof(struct ramdisk));
r->trace = false;
for (i = 0; i < rtems_ramdisk_configuration_size; i++, c++, r++)
10f0a2: e9 a2 00 00 00 jmp 10f149 <ramdisk_initialize+0xe9>
10f0a7: 8b 55 08 mov 0x8(%ebp),%edx
10f0aa: 89 55 c0 mov %edx,-0x40(%ebp)
10f0ad: 8b 55 d0 mov -0x30(%ebp),%edx
10f0b0: 89 55 c4 mov %edx,-0x3c(%ebp)
{
dev_t dev = rtems_filesystem_make_dev_t(major, i);
char name [] = RAMDISK_DEVICE_BASE_NAME "a";
10f0b3: be 48 43 12 00 mov $0x124348,%esi
10f0b8: b9 09 00 00 00 mov $0x9,%ecx
10f0bd: 8b 7d d4 mov -0x2c(%ebp),%edi
10f0c0: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
name [sizeof(RAMDISK_DEVICE_BASE_NAME)] += i;
10f0c2: 88 55 e7 mov %dl,-0x19(%ebp)
r->block_size = c->block_size;
10f0c5: 8b 55 cc mov -0x34(%ebp),%edx
10f0c8: 8b 32 mov (%edx),%esi
10f0ca: 89 33 mov %esi,(%ebx)
r->block_num = c->block_num;
10f0cc: 8b 7a 04 mov 0x4(%edx),%edi
10f0cf: 89 7b 04 mov %edi,0x4(%ebx)
if (c->location == NULL)
10f0d2: 8b 42 08 mov 0x8(%edx),%eax
10f0d5: 85 c0 test %eax,%eax
10f0d7: 75 24 jne 10f0fd <ramdisk_initialize+0x9d><== NEVER TAKEN
{
r->malloced = true;
10f0d9: c6 43 0d 01 movb $0x1,0xd(%ebx)
r->area = malloc(r->block_size * r->block_num);
10f0dd: 83 ec 0c sub $0xc,%esp
10f0e0: 89 f8 mov %edi,%eax
10f0e2: 0f af c6 imul %esi,%eax
10f0e5: 50 push %eax
10f0e6: e8 55 98 ff ff call 108940 <malloc>
10f0eb: 89 43 08 mov %eax,0x8(%ebx)
if (r->area == NULL) /* No enough memory for this disk */
10f0ee: 83 c4 10 add $0x10,%esp
10f0f1: 85 c0 test %eax,%eax
10f0f3: 75 02 jne 10f0f7 <ramdisk_initialize+0x97><== ALWAYS TAKEN
10f0f5: eb 44 jmp 10f13b <ramdisk_initialize+0xdb><== NOT EXECUTED
r->initialized = false;
continue;
}
else
{
r->initialized = true;
10f0f7: c6 43 0c 01 movb $0x1,0xc(%ebx)
10f0fb: eb 0b jmp 10f108 <ramdisk_initialize+0xa8>
}
}
else
{
r->malloced = false;
10f0fd: c6 43 0d 00 movb $0x0,0xd(%ebx) <== NOT EXECUTED
r->initialized = true;
10f101: c6 43 0c 01 movb $0x1,0xc(%ebx) <== NOT EXECUTED
r->area = c->location;
10f105: 89 43 08 mov %eax,0x8(%ebx) <== NOT EXECUTED
}
rc = rtems_disk_create_phys(dev, c->block_size, c->block_num,
10f108: 50 push %eax
10f109: 8d 45 df lea -0x21(%ebp),%eax
10f10c: 50 push %eax
10f10d: 53 push %ebx
10f10e: 68 64 f1 10 00 push $0x10f164
10f113: 57 push %edi
10f114: 56 push %esi
10f115: ff 75 c4 pushl -0x3c(%ebp)
10f118: ff 75 c0 pushl -0x40(%ebp)
10f11b: e8 6f 82 ff ff call 10738f <rtems_disk_create_phys>
ramdisk_ioctl, r, name);
if (rc != RTEMS_SUCCESSFUL)
10f120: 83 c4 20 add $0x20,%esp
10f123: 85 c0 test %eax,%eax
10f125: 74 18 je 10f13f <ramdisk_initialize+0xdf><== ALWAYS TAKEN
{
if (r->malloced)
10f127: 80 7b 0d 00 cmpb $0x0,0xd(%ebx) <== NOT EXECUTED
10f12b: 74 0e je 10f13b <ramdisk_initialize+0xdb><== NOT EXECUTED
{
free(r->area);
10f12d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10f130: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED
10f133: e8 f0 92 ff ff call 108428 <free> <== NOT EXECUTED
10f138: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
r->initialized = false;
10f13b: c6 43 0c 00 movb $0x0,0xc(%ebx) <== NOT EXECUTED
* so there is no corresponding free(r). Coverity is correct that
* it is never freed but this is not a problem.
*/
r = calloc(rtems_ramdisk_configuration_size, sizeof(struct ramdisk));
r->trace = false;
for (i = 0; i < rtems_ramdisk_configuration_size; i++, c++, r++)
10f13f: ff 45 d0 incl -0x30(%ebp)
10f142: 83 45 cc 0c addl $0xc,-0x34(%ebp)
10f146: 83 c3 10 add $0x10,%ebx
10f149: 8b 55 d0 mov -0x30(%ebp),%edx
10f14c: 3b 15 98 f2 12 00 cmp 0x12f298,%edx
10f152: 0f 82 4f ff ff ff jb 10f0a7 <ramdisk_initialize+0x47>
free(r->area);
}
r->initialized = false;
}
}
return RTEMS_SUCCESSFUL;
10f158: 31 c0 xor %eax,%eax
}
10f15a: 8d 65 f4 lea -0xc(%ebp),%esp
10f15d: 5b pop %ebx
10f15e: 5e pop %esi
10f15f: 5f pop %edi
10f160: 5d pop %ebp
10f161: c3 ret
0010e140 <ramdisk_ioctl>:
return 0;
}
int
ramdisk_ioctl(rtems_disk_device *dd, uint32_t req, void *argp)
{
10e140: 55 push %ebp
10e141: 89 e5 mov %esp,%ebp
10e143: 57 push %edi
10e144: 56 push %esi
10e145: 53 push %ebx
10e146: 83 ec 1c sub $0x1c,%esp
10e149: 8b 55 08 mov 0x8(%ebp),%edx
10e14c: 8b 45 0c mov 0xc(%ebp),%eax
10e14f: 8b 5d 10 mov 0x10(%ebp),%ebx
break;
}
errno = EINVAL;
return -1;
}
10e152: 8b 4a 3c mov 0x3c(%edx),%ecx
10e155: 89 4d e4 mov %ecx,-0x1c(%ebp)
int
ramdisk_ioctl(rtems_disk_device *dd, uint32_t req, void *argp)
{
struct ramdisk *rd = rtems_disk_get_driver_data(dd);
switch (req)
10e158: 3d 07 42 00 20 cmp $0x20004207,%eax
10e15d: 0f 84 98 00 00 00 je 10e1fb <ramdisk_ioctl+0xbb>
10e163: 3d 01 42 18 c0 cmp $0xc0184201,%eax
10e168: 0f 85 a4 00 00 00 jne 10e212 <ramdisk_ioctl+0xd2>
{
case RTEMS_BLKIO_REQUEST:
{
rtems_blkdev_request *r = argp;
switch (r->req)
10e16e: 8b 03 mov (%ebx),%eax
10e170: 85 c0 test %eax,%eax
10e172: 74 09 je 10e17d <ramdisk_ioctl+0x3d>
10e174: 48 dec %eax
10e175: 0f 85 ac 00 00 00 jne 10e227 <ramdisk_ioctl+0xe7> <== NEVER TAKEN
10e17b: eb 2e jmp 10e1ab <ramdisk_ioctl+0x6b>
#endif
static int
ramdisk_read(struct ramdisk *rd, rtems_blkdev_request *req)
{
uint8_t *from = rd->area;
10e17d: 8b 45 e4 mov -0x1c(%ebp),%eax
10e180: 8b 40 08 mov 0x8(%eax),%eax
10e183: 89 45 dc mov %eax,-0x24(%ebp)
#if RTEMS_RAMDISK_TRACE
rtems_ramdisk_printf (rd, "ramdisk read: start=%d, blocks=%d",
req->bufs[0].block, req->bufnum);
#endif
for (i = 0, sg = req->bufs; i < req->bufnum; i++, sg++)
10e186: 8d 43 18 lea 0x18(%ebx),%eax
10e189: 31 d2 xor %edx,%edx
10e18b: eb 17 jmp 10e1a4 <ramdisk_ioctl+0x64>
#if RTEMS_RAMDISK_TRACE
rtems_ramdisk_printf (rd, "ramdisk read: buf=%d block=%d length=%d off=%d addr=%p",
i, sg->block, sg->length, sg->block * rd->block_size,
from + (sg->block * rd->block_size));
#endif
memcpy(sg->buffer, from + (sg->block * rd->block_size), sg->length);
10e18d: 8b 30 mov (%eax),%esi
10e18f: 8b 4d e4 mov -0x1c(%ebp),%ecx
10e192: 0f af 31 imul (%ecx),%esi
10e195: 03 75 dc add -0x24(%ebp),%esi
10e198: 8b 48 04 mov 0x4(%eax),%ecx
10e19b: 8b 78 08 mov 0x8(%eax),%edi
10e19e: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
#if RTEMS_RAMDISK_TRACE
rtems_ramdisk_printf (rd, "ramdisk read: start=%d, blocks=%d",
req->bufs[0].block, req->bufnum);
#endif
for (i = 0, sg = req->bufs; i < req->bufnum; i++, sg++)
10e1a0: 42 inc %edx
10e1a1: 83 c0 10 add $0x10,%eax
10e1a4: 3b 53 10 cmp 0x10(%ebx),%edx
10e1a7: 72 e4 jb 10e18d <ramdisk_ioctl+0x4d>
10e1a9: eb 38 jmp 10e1e3 <ramdisk_ioctl+0xa3>
}
static int
ramdisk_write(struct ramdisk *rd, rtems_blkdev_request *req)
{
uint8_t *to = rd->area;
10e1ab: 8b 45 e4 mov -0x1c(%ebp),%eax
10e1ae: 8b 40 08 mov 0x8(%eax),%eax
10e1b1: 89 45 dc mov %eax,-0x24(%ebp)
#if RTEMS_RAMDISK_TRACE
rtems_ramdisk_printf (rd, "ramdisk write: start=%d, blocks=%d",
req->bufs[0].block, req->bufnum);
#endif
for (i = 0, sg = req->bufs; i < req->bufnum; i++, sg++)
10e1b4: 8d 53 18 lea 0x18(%ebx),%edx
10e1b7: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
10e1be: eb 1b jmp 10e1db <ramdisk_ioctl+0x9b>
#if RTEMS_RAMDISK_TRACE
rtems_ramdisk_printf (rd, "ramdisk write: buf=%d block=%d length=%d off=%d addr=%p",
i, sg->block, sg->length, sg->block * rd->block_size,
to + (sg->block * rd->block_size));
#endif
memcpy(to + (sg->block * rd->block_size), sg->buffer, sg->length);
10e1c0: 8b 02 mov (%edx),%eax
10e1c2: 8b 4d e4 mov -0x1c(%ebp),%ecx
10e1c5: 0f af 01 imul (%ecx),%eax
10e1c8: 03 45 dc add -0x24(%ebp),%eax
10e1cb: 8b 72 08 mov 0x8(%edx),%esi
10e1ce: 8b 4a 04 mov 0x4(%edx),%ecx
10e1d1: 89 c7 mov %eax,%edi
10e1d3: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
#if RTEMS_RAMDISK_TRACE
rtems_ramdisk_printf (rd, "ramdisk write: start=%d, blocks=%d",
req->bufs[0].block, req->bufnum);
#endif
for (i = 0, sg = req->bufs; i < req->bufnum; i++, sg++)
10e1d5: ff 45 e0 incl -0x20(%ebp)
10e1d8: 83 c2 10 add $0x10,%edx
10e1db: 8b 45 e0 mov -0x20(%ebp),%eax
10e1de: 3b 43 10 cmp 0x10(%ebx),%eax
10e1e1: 72 dd jb 10e1c0 <ramdisk_ioctl+0x80>
i, sg->block, sg->length, sg->block * rd->block_size,
to + (sg->block * rd->block_size));
#endif
memcpy(to + (sg->block * rd->block_size), sg->buffer, sg->length);
}
req->status = RTEMS_SUCCESSFUL;
10e1e3: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
req->req_done(req->done_arg, RTEMS_SUCCESSFUL);
10e1ea: 50 push %eax
10e1eb: 50 push %eax
10e1ec: 6a 00 push $0x0
10e1ee: ff 73 08 pushl 0x8(%ebx)
10e1f1: ff 53 04 call *0x4(%ebx)
{
case RTEMS_BLKDEV_REQ_READ:
return ramdisk_read(rd, r);
case RTEMS_BLKDEV_REQ_WRITE:
return ramdisk_write(rd, r);
10e1f4: 83 c4 10 add $0x10,%esp
10e1f7: 31 c0 xor %eax,%eax
10e1f9: eb 3a jmp 10e235 <ramdisk_ioctl+0xf5>
}
break;
}
case RTEMS_BLKIO_DELETED:
if (rd->free_at_delete_request) {
10e1fb: 8b 45 e4 mov -0x1c(%ebp),%eax
10e1fe: 80 78 0f 00 cmpb $0x0,0xf(%eax)
10e202: 74 23 je 10e227 <ramdisk_ioctl+0xe7>
ramdisk_free(rd);
10e204: 83 ec 0c sub $0xc,%esp
10e207: 50 push %eax
10e208: e8 a5 00 00 00 call 10e2b2 <ramdisk_free>
10e20d: 83 c4 10 add $0x10,%esp
10e210: eb 15 jmp 10e227 <ramdisk_ioctl+0xe7>
}
break;
default:
return rtems_blkdev_ioctl (dd, req, argp);
10e212: 89 5d 10 mov %ebx,0x10(%ebp)
10e215: 89 45 0c mov %eax,0xc(%ebp)
10e218: 89 55 08 mov %edx,0x8(%ebp)
break;
}
errno = EINVAL;
return -1;
}
10e21b: 8d 65 f4 lea -0xc(%ebp),%esp
10e21e: 5b pop %ebx
10e21f: 5e pop %esi
10e220: 5f pop %edi
10e221: 5d pop %ebp
ramdisk_free(rd);
}
break;
default:
return rtems_blkdev_ioctl (dd, req, argp);
10e222: e9 61 1f 00 00 jmp 110188 <rtems_blkdev_ioctl>
break;
}
errno = EINVAL;
10e227: e8 f0 60 00 00 call 11431c <__errno>
10e22c: c7 00 16 00 00 00 movl $0x16,(%eax)
return -1;
10e232: 83 c8 ff or $0xffffffff,%eax
}
10e235: 8d 65 f4 lea -0xc(%ebp),%esp
10e238: 5b pop %ebx
10e239: 5e pop %esi
10e23a: 5f pop %edi
10e23b: 5d pop %ebp
10e23c: c3 ret
0010e2e4 <ramdisk_register>:
rtems_blkdev_bnum block_count,
bool trace,
const char *disk,
dev_t *dev_ptr
)
{
10e2e4: 55 push %ebp
10e2e5: 89 e5 mov %esp,%ebp
10e2e7: 57 push %edi
10e2e8: 56 push %esi
10e2e9: 53 push %ebx
10e2ea: 83 ec 30 sub $0x30,%esp
10e2ed: 8b 7d 10 mov 0x10(%ebp),%edi
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_device_major_number major = 0;
10e2f0: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
ramdisk *rd = NULL;
dev_t dev = 0;
sc = rtems_io_register_driver(0, &ramdisk_ops, &major);
10e2f7: 8d 45 e4 lea -0x1c(%ebp),%eax
10e2fa: 50 push %eax
10e2fb: 68 04 32 12 00 push $0x123204
10e300: 6a 00 push $0x0
10e302: e8 c1 d0 ff ff call 10b3c8 <rtems_io_register_driver>
if (sc != RTEMS_SUCCESSFUL) {
10e307: 83 c4 10 add $0x10,%esp
return RTEMS_UNSATISFIED;
10e30a: bb 0d 00 00 00 mov $0xd,%ebx
rtems_device_major_number major = 0;
ramdisk *rd = NULL;
dev_t dev = 0;
sc = rtems_io_register_driver(0, &ramdisk_ops, &major);
if (sc != RTEMS_SUCCESSFUL) {
10e30f: 85 c0 test %eax,%eax
10e311: 75 6a jne 10e37d <ramdisk_register+0x99> <== NEVER TAKEN
return RTEMS_UNSATISFIED;
}
rd = ramdisk_allocate(NULL, block_size, block_count, trace);
10e313: 81 e7 ff 00 00 00 and $0xff,%edi
10e319: 57 push %edi
10e31a: ff 75 0c pushl 0xc(%ebp)
10e31d: ff 75 08 pushl 0x8(%ebp)
10e320: 6a 00 push $0x0
10e322: e8 19 ff ff ff call 10e240 <ramdisk_allocate>
if (rd == NULL) {
10e327: 83 c4 10 add $0x10,%esp
10e32a: 85 c0 test %eax,%eax
10e32c: 75 05 jne 10e333 <ramdisk_register+0x4f> <== ALWAYS TAKEN
rtems_io_unregister_driver(major);
10e32e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10e331: eb 33 jmp 10e366 <ramdisk_register+0x82> <== NOT EXECUTED
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
temp.__overlay.minor = _minor;
return temp.device;
10e333: 8b 75 e4 mov -0x1c(%ebp),%esi
10e336: 31 ff xor %edi,%edi
return RTEMS_UNSATISFIED;
}
dev = rtems_filesystem_make_dev_t(major, 0);
sc = rtems_disk_create_phys(
10e338: 51 push %ecx
10e339: ff 75 14 pushl 0x14(%ebp)
10e33c: 50 push %eax
10e33d: 68 40 e1 10 00 push $0x10e140
10e342: ff 75 0c pushl 0xc(%ebp)
10e345: ff 75 08 pushl 0x8(%ebp)
10e348: 57 push %edi
10e349: 56 push %esi
10e34a: 89 45 d4 mov %eax,-0x2c(%ebp)
10e34d: e8 91 86 ff ff call 1069e3 <rtems_disk_create_phys>
block_count,
ramdisk_ioctl,
rd,
disk
);
if (sc != RTEMS_SUCCESSFUL) {
10e352: 83 c4 20 add $0x20,%esp
10e355: 85 c0 test %eax,%eax
10e357: 8b 55 d4 mov -0x2c(%ebp),%edx
10e35a: 74 17 je 10e373 <ramdisk_register+0x8f> <== ALWAYS TAKEN
ramdisk_free(rd);
10e35c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10e35f: 52 push %edx <== NOT EXECUTED
10e360: e8 4d ff ff ff call 10e2b2 <ramdisk_free> <== NOT EXECUTED
rtems_io_unregister_driver(major);
10e365: 58 pop %eax <== NOT EXECUTED
10e366: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
10e369: e8 72 d1 ff ff call 10b4e0 <rtems_io_unregister_driver><== NOT EXECUTED
10e36e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10e371: eb 0a jmp 10e37d <ramdisk_register+0x99> <== NOT EXECUTED
return RTEMS_UNSATISFIED;
}
*dev_ptr = dev;
10e373: 8b 45 18 mov 0x18(%ebp),%eax
10e376: 89 30 mov %esi,(%eax)
10e378: 89 78 04 mov %edi,0x4(%eax)
return RTEMS_SUCCESSFUL;
10e37b: 31 db xor %ebx,%ebx
}
10e37d: 89 d8 mov %ebx,%eax
10e37f: 8d 65 f4 lea -0xc(%ebp),%esp
10e382: 5b pop %ebx
10e383: 5e pop %esi
10e384: 5f pop %edi
10e385: 5d pop %ebp
10e386: c3 ret
0011d844 <read>:
ssize_t read(
int fd,
void *buffer,
size_t count
)
{
11d844: 55 push %ebp
11d845: 89 e5 mov %esp,%ebp
11d847: 53 push %ebx
11d848: 53 push %ebx
11d849: 8b 45 08 mov 0x8(%ebp),%eax
11d84c: 8b 55 0c mov 0xc(%ebp),%edx
11d84f: 8b 4d 10 mov 0x10(%ebp),%ecx
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
11d852: 3b 05 70 a2 12 00 cmp 0x12a270,%eax
11d858: 72 02 jb 11d85c <read+0x18>
11d85a: eb 2d jmp 11d889 <read+0x45>
iop = rtems_libio_iop( fd );
11d85c: 6b c0 30 imul $0x30,%eax,%eax
11d85f: 03 05 d0 e2 12 00 add 0x12e2d0,%eax
rtems_libio_check_is_open( iop );
11d865: 8b 58 0c mov 0xc(%eax),%ebx
11d868: f6 c7 01 test $0x1,%bh
11d86b: 75 02 jne 11d86f <read+0x2b>
11d86d: eb 1a jmp 11d889 <read+0x45>
rtems_libio_check_buffer( buffer );
11d86f: 85 d2 test %edx,%edx
11d871: 75 0d jne 11d880 <read+0x3c> <== ALWAYS TAKEN
11d873: e8 64 36 ff ff call 110edc <__errno> <== NOT EXECUTED
11d878: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
11d87e: eb 14 jmp 11d894 <read+0x50> <== NOT EXECUTED
rtems_libio_check_count( count );
11d880: 85 c9 test %ecx,%ecx
11d882: 74 29 je 11d8ad <read+0x69>
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_READ, EBADF );
11d884: 80 e3 02 and $0x2,%bl
11d887: 75 10 jne 11d899 <read+0x55>
11d889: e8 4e 36 ff ff call 110edc <__errno>
11d88e: c7 00 09 00 00 00 movl $0x9,(%eax)
11d894: 83 c8 ff or $0xffffffff,%eax
11d897: eb 16 jmp 11d8af <read+0x6b>
/*
* Now process the read().
*/
return (*iop->pathinfo.handlers->read_h)( iop, buffer, count );
11d899: 8b 58 20 mov 0x20(%eax),%ebx
11d89c: 89 4d 10 mov %ecx,0x10(%ebp)
11d89f: 89 55 0c mov %edx,0xc(%ebp)
11d8a2: 89 45 08 mov %eax,0x8(%ebp)
11d8a5: 8b 43 08 mov 0x8(%ebx),%eax
}
11d8a8: 59 pop %ecx
11d8a9: 5b pop %ebx
11d8aa: 5d pop %ebp
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_READ, EBADF );
/*
* Now process the read().
*/
return (*iop->pathinfo.handlers->read_h)( iop, buffer, count );
11d8ab: ff e0 jmp *%eax
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
rtems_libio_check_buffer( buffer );
rtems_libio_check_count( count );
11d8ad: 31 c0 xor %eax,%eax
/*
* Now process the read().
*/
return (*iop->pathinfo.handlers->read_h)( iop, buffer, count );
}
11d8af: 5a pop %edx
11d8b0: 5b pop %ebx
11d8b1: 5d pop %ebp
11d8b2: c3 ret
001077e6 <read_extended_partition>:
* RTEMS_NO_MEMOTY if cannot allocate memory for part_desc_t strucure,
* RTEMS_INTERNAL_ERROR if other error occurs.
*/
static rtems_status_code
read_extended_partition(int fd, uint32_t start, rtems_part_desc_t *ext_part)
{
1077e6: 55 push %ebp
1077e7: 89 e5 mov %esp,%ebp
1077e9: 57 push %edi
1077ea: 56 push %esi
1077eb: 53 push %ebx
1077ec: 83 ec 3c sub $0x3c,%esp
1077ef: 89 45 cc mov %eax,-0x34(%ebp)
1077f2: 89 55 c8 mov %edx,-0x38(%ebp)
1077f5: 89 ce mov %ecx,%esi
int i;
rtems_sector_data_t *sector = NULL;
1077f7: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
rtems_part_desc_t *new_part_desc;
rtems_status_code rc;
if ((ext_part == NULL) || (ext_part->disk_desc == NULL))
{
return RTEMS_INTERNAL_ERROR;
1077fe: bb 19 00 00 00 mov $0x19,%ebx
uint32_t here;
uint8_t *data;
rtems_part_desc_t *new_part_desc;
rtems_status_code rc;
if ((ext_part == NULL) || (ext_part->disk_desc == NULL))
107803: 85 c9 test %ecx,%ecx
107805: 0f 84 29 01 00 00 je 107934 <read_extended_partition+0x14e><== NEVER TAKEN
10780b: 83 79 10 00 cmpl $0x0,0x10(%ecx)
10780f: 0f 84 1f 01 00 00 je 107934 <read_extended_partition+0x14e><== NEVER TAKEN
{
return RTEMS_INTERNAL_ERROR;
}
/* get start sector of current extended partition */
here = ext_part->start;
107815: 8b 41 04 mov 0x4(%ecx),%eax
107818: 89 45 d4 mov %eax,-0x2c(%ebp)
if (sector == NULL)
{
return RTEMS_INTERNAL_ERROR;
}
off = sector_num * RTEMS_IDE_SECTOR_SIZE;
10781b: 89 c3 mov %eax,%ebx
10781d: c1 e3 09 shl $0x9,%ebx
107820: 31 d2 xor %edx,%edx
new_off = lseek(fd, off, SEEK_SET);
107822: 6a 00 push $0x0
107824: 52 push %edx
107825: 53 push %ebx
107826: ff 75 cc pushl -0x34(%ebp)
107829: e8 6e 0f 00 00 call 10879c <lseek>
if (new_off != off) {
10782e: 83 c4 10 add $0x10,%esp
107831: 85 d2 test %edx,%edx
107833: 75 1a jne 10784f <read_extended_partition+0x69><== NEVER TAKEN
107835: 39 d8 cmp %ebx,%eax
107837: 75 16 jne 10784f <read_extended_partition+0x69><== NEVER TAKEN
107839: 8d 4d e0 lea -0x20(%ebp),%ecx
10783c: 8b 55 d4 mov -0x2c(%ebp),%edx
10783f: 8b 45 cc mov -0x34(%ebp),%eax
107842: e8 b5 fe ff ff call 1076fc <get_sector.part.0>
107847: 89 c3 mov %eax,%ebx
here = ext_part->start;
/* get first extended partition sector */
rc = get_sector(fd, here, §or);
if (rc != RTEMS_SUCCESSFUL)
107849: 85 c0 test %eax,%eax
10784b: 74 18 je 107865 <read_extended_partition+0x7f><== ALWAYS TAKEN
10784d: eb 05 jmp 107854 <read_extended_partition+0x6e><== NOT EXECUTED
}
off = sector_num * RTEMS_IDE_SECTOR_SIZE;
new_off = lseek(fd, off, SEEK_SET);
if (new_off != off) {
return RTEMS_IO_ERROR;
10784f: bb 1b 00 00 00 mov $0x1b,%ebx <== NOT EXECUTED
/* get first extended partition sector */
rc = get_sector(fd, here, §or);
if (rc != RTEMS_SUCCESSFUL)
{
if (sector)
107854: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
107857: 85 c0 test %eax,%eax <== NOT EXECUTED
107859: 0f 84 d5 00 00 00 je 107934 <read_extended_partition+0x14e><== NOT EXECUTED
free(sector);
10785f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107862: 50 push %eax <== NOT EXECUTED
107863: eb 5e jmp 1078c3 <read_extended_partition+0xdd><== NOT EXECUTED
return rc;
}
if (!msdos_signature_check(sector))
107865: 8b 45 e0 mov -0x20(%ebp),%eax
static bool
msdos_signature_check (rtems_sector_data_t *sector)
{
uint8_t *p = sector->data + RTEMS_IDE_PARTITION_MSDOS_SIGNATURE_OFFSET;
return ((p[0] == RTEMS_IDE_PARTITION_MSDOS_SIGNATURE_DATA1) &&
107868: 31 d2 xor %edx,%edx
10786a: 80 b8 02 02 00 00 55 cmpb $0x55,0x202(%eax)
107871: 75 0c jne 10787f <read_extended_partition+0x99><== NEVER TAKEN
107873: 31 d2 xor %edx,%edx
107875: 80 b8 03 02 00 00 aa cmpb $0xaa,0x203(%eax)
10787c: 0f 94 c2 sete %dl
if (sector)
free(sector);
return rc;
}
if (!msdos_signature_check(sector))
10787f: 85 d2 test %edx,%edx
107881: 75 16 jne 107899 <read_extended_partition+0xb3><== ALWAYS TAKEN
{
free(sector);
107883: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107886: 50 push %eax <== NOT EXECUTED
107887: e8 9c 0b 00 00 call 108428 <free> <== NOT EXECUTED
10788c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
return RTEMS_INTERNAL_ERROR;
10788f: bb 19 00 00 00 mov $0x19,%ebx <== NOT EXECUTED
107894: e9 9b 00 00 00 jmp 107934 <read_extended_partition+0x14e><== NOT EXECUTED
* RTEMS_SUCCESSFUL if success,
* RTEMS_NO_MEMOTY if cannot allocate memory for part_desc_t strucure,
* RTEMS_INTERNAL_ERROR if other error occurs.
*/
static rtems_status_code
read_extended_partition(int fd, uint32_t start, rtems_part_desc_t *ext_part)
107899: 05 d2 01 00 00 add $0x1d2,%eax
10789e: 89 45 d0 mov %eax,-0x30(%ebp)
1078a1: 89 f7 mov %esi,%edi
1078a3: 8d 46 10 lea 0x10(%esi),%eax
1078a6: 89 45 c4 mov %eax,-0x3c(%ebp)
1078a9: 8b 45 d0 mov -0x30(%ebp),%eax
1078ac: 83 e8 10 sub $0x10,%eax
1078af: 8d 55 e4 lea -0x1c(%ebp),%edx
1078b2: e8 af fe ff ff call 107766 <data_to_part_desc.part.1>
1078b7: 89 c3 mov %eax,%ebx
{
/* if data_to_part_desc fails skip this partition
* and parse the next one
*/
rc = data_to_part_desc(data, &new_part_desc);
if (rc != RTEMS_SUCCESSFUL)
1078b9: 85 c0 test %eax,%eax
1078bb: 74 10 je 1078cd <read_extended_partition+0xe7><== ALWAYS TAKEN
{
free(sector);
1078bd: 83 ec 0c sub $0xc,%esp
1078c0: ff 75 e0 pushl -0x20(%ebp)
1078c3: e8 60 0b 00 00 call 108428 <free>
1078c8: 83 c4 10 add $0x10,%esp
1078cb: eb 67 jmp 107934 <read_extended_partition+0x14e>
return rc;
}
if (new_part_desc == NULL)
1078cd: 8b 4d e4 mov -0x1c(%ebp),%ecx
1078d0: 85 c9 test %ecx,%ecx
1078d2: 74 4e je 107922 <read_extended_partition+0x13c>
{
data += RTEMS_IDE_PARTITION_DESCRIPTOR_SIZE;
continue;
}
ext_part->sub_part[i] = new_part_desc;
1078d4: 89 4f 18 mov %ecx,0x18(%edi)
new_part_desc->ext_part = ext_part;
1078d7: 89 71 14 mov %esi,0x14(%ecx)
new_part_desc->disk_desc = ext_part->disk_desc;
1078da: 8b 46 10 mov 0x10(%esi),%eax
1078dd: 89 41 10 mov %eax,0x10(%ecx)
* true if partition type is extended, false otherwise
*/
static bool
is_extended(uint8_t type)
{
return ((type == EXTENDED_PARTITION) || (type == LINUX_EXTENDED));
1078e0: 8a 51 01 mov 0x1(%ecx),%dl
1078e3: 83 e2 7f and $0x7f,%edx
ext_part->sub_part[i] = new_part_desc;
new_part_desc->ext_part = ext_part;
new_part_desc->disk_desc = ext_part->disk_desc;
if (is_extended(new_part_desc->sys_type))
1078e6: 80 fa 05 cmp $0x5,%dl
1078e9: 75 16 jne 107901 <read_extended_partition+0x11b>
{
new_part_desc->log_id = EMPTY_PARTITION;
1078eb: c6 41 02 00 movb $0x0,0x2(%ecx)
new_part_desc->start += start;
1078ef: 8b 45 c8 mov -0x38(%ebp),%eax
1078f2: 01 41 04 add %eax,0x4(%ecx)
read_extended_partition(fd, start, new_part_desc);
1078f5: 89 c2 mov %eax,%edx
1078f7: 8b 45 cc mov -0x34(%ebp),%eax
1078fa: e8 e7 fe ff ff call 1077e6 <read_extended_partition>
1078ff: eb 21 jmp 107922 <read_extended_partition+0x13c>
}
else
{
rtems_disk_desc_t *disk_desc = new_part_desc->disk_desc;
disk_desc->partitions[disk_desc->last_log_id] = new_part_desc;
107901: 8b 50 24 mov 0x24(%eax),%edx
107904: 89 4c 90 28 mov %ecx,0x28(%eax,%edx,4)
new_part_desc->log_id = ++disk_desc->last_log_id;
107908: 42 inc %edx
107909: 89 50 24 mov %edx,0x24(%eax)
10790c: 88 51 02 mov %dl,0x2(%ecx)
new_part_desc->start += here;
10790f: 8b 45 d4 mov -0x2c(%ebp),%eax
107912: 03 41 04 add 0x4(%ecx),%eax
107915: 89 41 04 mov %eax,0x4(%ecx)
new_part_desc->end = new_part_desc->start + new_part_desc->size - 1;
107918: 8b 51 08 mov 0x8(%ecx),%edx
10791b: 8d 44 10 ff lea -0x1(%eax,%edx,1),%eax
10791f: 89 41 0c mov %eax,0xc(%ecx)
107922: 83 45 d0 10 addl $0x10,-0x30(%ebp)
107926: 83 c7 04 add $0x4,%edi
/* read and process up to 4 logical partition descriptors */
data = sector->data + RTEMS_IDE_PARTITION_TABLE_OFFSET;
for (i = 0; i < RTEMS_IDE_PARTITION_MAX_SUB_PARTITION_NUMBER; i++)
107929: 3b 7d c4 cmp -0x3c(%ebp),%edi
10792c: 0f 85 77 ff ff ff jne 1078a9 <read_extended_partition+0xc3>
107932: eb 89 jmp 1078bd <read_extended_partition+0xd7>
}
free(sector);
return RTEMS_SUCCESSFUL;
}
107934: 89 d8 mov %ebx,%eax
107936: 8d 65 f4 lea -0xc(%ebp),%esp
107939: 5b pop %ebx
10793a: 5e pop %esi
10793b: 5f pop %edi
10793c: 5d pop %ebp
10793d: c3 ret
00107d9c <readv>:
ssize_t readv(
int fd,
const struct iovec *iov,
int iovcnt
)
{
107d9c: 55 push %ebp
107d9d: 89 e5 mov %esp,%ebp
107d9f: 57 push %edi
107da0: 56 push %esi
107da1: 53 push %ebx
107da2: 83 ec 1c sub $0x1c,%esp
107da5: 8b 75 08 mov 0x8(%ebp),%esi
107da8: 8b 5d 0c mov 0xc(%ebp),%ebx
107dab: 8b 45 10 mov 0x10(%ebp),%eax
int v;
int bytes;
rtems_libio_t *iop;
bool all_zeros;
rtems_libio_check_fd( fd );
107dae: 3b 35 70 a2 12 00 cmp 0x12a270,%esi
107db4: 72 02 jb 107db8 <readv+0x1c>
107db6: eb 18 jmp 107dd0 <readv+0x34>
iop = rtems_libio_iop( fd );
107db8: 6b f6 30 imul $0x30,%esi,%esi
107dbb: 03 35 d0 e2 12 00 add 0x12e2d0,%esi
rtems_libio_check_is_open( iop );
107dc1: 8b 56 0c mov 0xc(%esi),%edx
107dc4: f6 c6 01 test $0x1,%dh
107dc7: 75 02 jne 107dcb <readv+0x2f>
107dc9: eb 05 jmp 107dd0 <readv+0x34>
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_READ, EBADF );
107dcb: 80 e2 02 and $0x2,%dl
107dce: 75 10 jne 107de0 <readv+0x44> <== ALWAYS TAKEN
107dd0: e8 ff 99 00 00 call 1117d4 <__errno>
107dd5: c7 00 09 00 00 00 movl $0x9,(%eax)
107ddb: e9 8b 00 00 00 jmp 107e6b <readv+0xcf>
/*
* Argument validation on IO vector
*/
if ( !iov )
107de0: 85 db test %ebx,%ebx
107de2: 75 02 jne 107de6 <readv+0x4a>
107de4: eb 36 jmp 107e1c <readv+0x80>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
107de6: 85 c0 test %eax,%eax
107de8: 7f 02 jg 107dec <readv+0x50>
107dea: eb 30 jmp 107e1c <readv+0x80>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
107dec: 3d 00 04 00 00 cmp $0x400,%eax
107df1: 7e 02 jle 107df5 <readv+0x59> <== ALWAYS TAKEN
107df3: eb 27 jmp 107e1c <readv+0x80> <== NOT EXECUTED
#include <sys/uio.h>
#include <rtems/libio_.h>
#include <rtems/seterr.h>
ssize_t readv(
107df5: 8d 04 c3 lea (%ebx,%eax,8),%eax
107df8: 89 45 e0 mov %eax,-0x20(%ebp)
107dfb: 89 d8 mov %ebx,%eax
107dfd: c6 45 df 01 movb $0x1,-0x21(%ebp)
107e01: 31 d2 xor %edx,%edx
107e03: eb 03 jmp 107e08 <readv+0x6c>
if ( iov[v].iov_base == 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
/* check for wrap */
old = total;
total += iov[v].iov_len;
107e05: 8b 55 e4 mov -0x1c(%ebp),%edx
/*
* iov[v].iov_len cannot be less than 0 because size_t is unsigned.
* So we only check for zero.
*/
if ( iov[v].iov_base == 0 )
107e08: 83 38 00 cmpl $0x0,(%eax)
107e0b: 75 02 jne 107e0f <readv+0x73>
107e0d: eb 0d jmp 107e1c <readv+0x80>
rtems_set_errno_and_return_minus_one( EINVAL );
/* check for wrap */
old = total;
total += iov[v].iov_len;
107e0f: 8b 78 04 mov 0x4(%eax),%edi
107e12: 8d 0c 17 lea (%edi,%edx,1),%ecx
107e15: 89 4d e4 mov %ecx,-0x1c(%ebp)
if ( total < old )
107e18: 39 d1 cmp %edx,%ecx
107e1a: 7d 0d jge 107e29 <readv+0x8d>
rtems_set_errno_and_return_minus_one( EINVAL );
107e1c: e8 b3 99 00 00 call 1117d4 <__errno>
107e21: c7 00 16 00 00 00 movl $0x16,(%eax)
107e27: eb 42 jmp 107e6b <readv+0xcf>
if ( iov[v].iov_len )
all_zeros = false;
107e29: 85 ff test %edi,%edi
107e2b: 0f 94 c2 sete %dl
107e2e: f7 da neg %edx
107e30: 20 55 df and %dl,-0x21(%ebp)
107e33: 83 c0 08 add $0x8,%eax
* are obvious errors in the iovec. So this extra loop ensures
* that we do not do anything if there is an argument error.
*/
all_zeros = true;
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
107e36: 3b 45 e0 cmp -0x20(%ebp),%eax
107e39: 75 ca jne 107e05 <readv+0x69>
* A readv with all zeros logically has no effect. Even though
* OpenGroup didn't address this case as they did with writev(),
* we will handle it the same way for symmetry.
*/
if ( all_zeros == true ) {
return 0;
107e3b: 31 ff xor %edi,%edi
/*
* A readv with all zeros logically has no effect. Even though
* OpenGroup didn't address this case as they did with writev(),
* we will handle it the same way for symmetry.
*/
if ( all_zeros == true ) {
107e3d: 80 7d df 00 cmpb $0x0,-0x21(%ebp)
107e41: 75 2b jne 107e6e <readv+0xd2>
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
bytes = (*iop->pathinfo.handlers->read_h)(
107e43: 50 push %eax
107e44: 8b 46 20 mov 0x20(%esi),%eax
107e47: ff 73 04 pushl 0x4(%ebx)
107e4a: ff 33 pushl (%ebx)
107e4c: 56 push %esi
107e4d: ff 50 08 call *0x8(%eax)
iop,
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
107e50: 83 c4 10 add $0x10,%esp
107e53: 83 f8 00 cmp $0x0,%eax
107e56: 7c 13 jl 107e6b <readv+0xcf> <== NEVER TAKEN
return -1;
if ( bytes > 0 ) {
107e58: 74 02 je 107e5c <readv+0xc0> <== NEVER TAKEN
total += bytes;
107e5a: 01 c7 add %eax,%edi
}
if (bytes != iov[ v ].iov_len)
107e5c: 3b 43 04 cmp 0x4(%ebx),%eax
107e5f: 75 0d jne 107e6e <readv+0xd2> <== NEVER TAKEN
107e61: 83 c3 08 add $0x8,%ebx
}
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
107e64: 3b 5d e0 cmp -0x20(%ebp),%ebx
107e67: 75 da jne 107e43 <readv+0xa7>
107e69: eb 03 jmp 107e6e <readv+0xd2>
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
return -1;
107e6b: 83 cf ff or $0xffffffff,%edi
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
107e6e: 89 f8 mov %edi,%eax
107e70: 8d 65 f4 lea -0xc(%ebp),%esp
107e73: 5b pop %ebx
107e74: 5e pop %esi
107e75: 5f pop %edi
107e76: 5d pop %ebp
107e77: c3 ret
00107454 <realloc>:
void *realloc(
void *ptr,
size_t size
)
{
107454: 55 push %ebp
107455: 89 e5 mov %esp,%ebp
107457: 57 push %edi
107458: 56 push %esi
107459: 53 push %ebx
10745a: 83 ec 2c sub $0x2c,%esp
10745d: 8b 5d 08 mov 0x8(%ebp),%ebx
107460: 8b 75 0c mov 0xc(%ebp),%esi
uintptr_t old_size;
char *new_area;
MSBUMP(realloc_calls, 1);
107463: ff 05 f8 e2 12 00 incl 0x12e2f8
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
107469: 83 3d 20 e5 12 00 03 cmpl $0x3,0x12e520
107470: 75 0f jne 107481 <realloc+0x2d>
* This routine returns true if thread dispatch indicates
* that we are in a critical section.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Dispatch_in_critical_section(void)
{
if ( _Thread_Dispatch_disable_level == 0 )
107472: a1 e4 e3 12 00 mov 0x12e3e4,%eax
107477: 85 c0 test %eax,%eax
107479: 0f 84 a0 00 00 00 je 10751f <realloc+0xcb> <== ALWAYS TAKEN
10747f: eb 48 jmp 1074c9 <realloc+0x75> <== NOT EXECUTED
}
/*
* Continue with realloc().
*/
if ( !ptr )
107481: 85 db test %ebx,%ebx
107483: 75 0f jne 107494 <realloc+0x40>
return malloc( size );
107485: 89 75 08 mov %esi,0x8(%ebp)
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
}
107488: 8d 65 f4 lea -0xc(%ebp),%esp
10748b: 5b pop %ebx
10748c: 5e pop %esi
10748d: 5f pop %edi
10748e: 5d pop %ebp
/*
* Continue with realloc().
*/
if ( !ptr )
return malloc( size );
10748f: e9 60 f5 ff ff jmp 1069f4 <malloc>
if ( !size ) {
107494: 85 f6 test %esi,%esi
107496: 75 0e jne 1074a6 <realloc+0x52> <== ALWAYS TAKEN
free( ptr );
107498: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10749b: 53 push %ebx <== NOT EXECUTED
10749c: e8 93 f2 ff ff call 106734 <free> <== NOT EXECUTED
1074a1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1074a4: eb 23 jmp 1074c9 <realloc+0x75> <== NOT EXECUTED
return (void *) 0;
}
if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) {
1074a6: 52 push %edx
1074a7: 8d 45 e4 lea -0x1c(%ebp),%eax
1074aa: 50 push %eax
1074ab: 53 push %ebx
1074ac: ff 35 2c a2 12 00 pushl 0x12a22c
1074b2: e8 89 40 00 00 call 10b540 <_Protected_heap_Get_block_size>
1074b7: 83 c4 10 add $0x10,%esp
1074ba: 84 c0 test %al,%al
1074bc: 75 0f jne 1074cd <realloc+0x79>
errno = EINVAL;
1074be: e8 19 9a 00 00 call 110edc <__errno>
1074c3: c7 00 16 00 00 00 movl $0x16,(%eax)
return (void *) 0;
1074c9: 31 db xor %ebx,%ebx
1074cb: eb 61 jmp 10752e <realloc+0xda>
}
/*
* Now resize it.
*/
if ( _Protected_heap_Resize_block( RTEMS_Malloc_Heap, ptr, size ) ) {
1074cd: 50 push %eax
1074ce: 56 push %esi
1074cf: 53 push %ebx
1074d0: ff 35 2c a2 12 00 pushl 0x12a22c
1074d6: e8 a9 40 00 00 call 10b584 <_Protected_heap_Resize_block>
1074db: 83 c4 10 add $0x10,%esp
1074de: 84 c0 test %al,%al
1074e0: 75 4c jne 10752e <realloc+0xda>
* There used to be a free on this error case but it is wrong to
* free the memory per OpenGroup Single UNIX Specification V2
* and the C Standard.
*/
new_area = malloc( size );
1074e2: 83 ec 0c sub $0xc,%esp
1074e5: 56 push %esi
1074e6: e8 09 f5 ff ff call 1069f4 <malloc>
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
1074eb: ff 0d ec e2 12 00 decl 0x12e2ec
if ( !new_area ) {
1074f1: 83 c4 10 add $0x10,%esp
1074f4: 85 c0 test %eax,%eax
1074f6: 74 d1 je 1074c9 <realloc+0x75>
return (void *) 0;
}
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
1074f8: 8b 55 e4 mov -0x1c(%ebp),%edx
1074fb: 89 f1 mov %esi,%ecx
1074fd: 39 d6 cmp %edx,%esi
1074ff: 76 02 jbe 107503 <realloc+0xaf> <== NEVER TAKEN
107501: 89 d1 mov %edx,%ecx
107503: 89 c7 mov %eax,%edi
107505: 89 de mov %ebx,%esi
107507: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
free( ptr );
107509: 83 ec 0c sub $0xc,%esp
10750c: 53 push %ebx
10750d: 89 45 d4 mov %eax,-0x2c(%ebp)
107510: e8 1f f2 ff ff call 106734 <free>
107515: 83 c4 10 add $0x10,%esp
107518: 8b 45 d4 mov -0x2c(%ebp),%eax
10751b: 89 c3 mov %eax,%ebx
10751d: eb 0f jmp 10752e <realloc+0xda>
if (_System_state_Is_up(_System_state_Get())) {
if (_Thread_Dispatch_in_critical_section())
return (void *) 0;
if (_ISR_Nest_level > 0)
10751f: 83 3d e8 e8 12 00 00 cmpl $0x0,0x12e8e8
107526: 0f 84 55 ff ff ff je 107481 <realloc+0x2d> <== ALWAYS TAKEN
10752c: eb 9b jmp 1074c9 <realloc+0x75> <== NOT EXECUTED
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
}
10752e: 89 d8 mov %ebx,%eax
107530: 8d 65 f4 lea -0xc(%ebp),%esp
107533: 5b pop %ebx
107534: 5e pop %esi
107535: 5f pop %edi
107536: 5d pop %ebp
107537: c3 ret
0010a4fa <rtems_aio_enqueue>:
* errno - otherwise
*/
int
rtems_aio_enqueue (rtems_aio_request *req)
{
10a4fa: 55 push %ebp
10a4fb: 89 e5 mov %esp,%ebp
10a4fd: 57 push %edi
10a4fe: 56 push %esi
10a4ff: 53 push %ebx
10a500: 83 ec 58 sub $0x58,%esp
10a503: 8b 5d 08 mov 0x8(%ebp),%ebx
struct sched_param param;
/* The queue should be initialized */
AIO_assert (aio_request_queue.initialized == AIO_QUEUE_INITIALIZED);
result = pthread_mutex_lock (&aio_request_queue.mutex);
10a506: 68 08 03 13 00 push $0x130308
10a50b: e8 f8 08 00 00 call 10ae08 <pthread_mutex_lock>
10a510: 89 c7 mov %eax,%edi
if (result != 0) {
10a512: 83 c4 10 add $0x10,%esp
10a515: 85 c0 test %eax,%eax
10a517: 74 0e je 10a527 <rtems_aio_enqueue+0x2d><== ALWAYS TAKEN
free (req);
10a519: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10a51c: 53 push %ebx <== NOT EXECUTED
10a51d: e8 36 c6 ff ff call 106b58 <free> <== NOT EXECUTED
10a522: e9 a8 01 00 00 jmp 10a6cf <rtems_aio_enqueue+0x1d5><== NOT EXECUTED
return result;
}
/* _POSIX_PRIORITIZED_IO and _POSIX_PRIORITY_SCHEDULING are defined,
we can use aio_reqprio to lower the priority of the request */
pthread_getschedparam (pthread_self(), &policy, ¶m);
10a527: e8 cc 10 00 00 call 10b5f8 <pthread_self>
10a52c: 52 push %edx
10a52d: 8d 55 cc lea -0x34(%ebp),%edx
10a530: 52 push %edx
10a531: 8d 55 c8 lea -0x38(%ebp),%edx
10a534: 52 push %edx
10a535: 50 push %eax
10a536: e8 f1 0c 00 00 call 10b22c <pthread_getschedparam>
req->caller_thread = pthread_self ();
10a53b: e8 b8 10 00 00 call 10b5f8 <pthread_self>
10a540: 89 43 10 mov %eax,0x10(%ebx)
req->priority = param.sched_priority - req->aiocbp->aio_reqprio;
10a543: 8b 43 14 mov 0x14(%ebx),%eax
10a546: 8b 55 cc mov -0x34(%ebp),%edx
10a549: 2b 50 14 sub 0x14(%eax),%edx
10a54c: 89 53 0c mov %edx,0xc(%ebx)
req->policy = policy;
10a54f: 8b 55 c8 mov -0x38(%ebp),%edx
10a552: 89 53 08 mov %edx,0x8(%ebx)
req->aiocbp->error_code = EINPROGRESS;
10a555: c7 40 30 77 00 00 00 movl $0x77,0x30(%eax)
req->aiocbp->return_value = 0;
10a55c: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax)
if ((aio_request_queue.idle_threads == 0) &&
10a563: 83 c4 10 add $0x10,%esp
10a566: 83 3d 70 03 13 00 00 cmpl $0x0,0x130370
10a56d: 0f 85 97 00 00 00 jne 10a60a <rtems_aio_enqueue+0x110><== NEVER TAKEN
10a573: 83 3d 6c 03 13 00 04 cmpl $0x4,0x13036c
10a57a: 0f 8f 8a 00 00 00 jg 10a60a <rtems_aio_enqueue+0x110>
aio_request_queue.active_threads < AIO_MAX_THREADS)
/* we still have empty places on the active_threads chain */
{
chain = &aio_request_queue.work_req;
r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1);
10a580: 56 push %esi
10a581: 6a 01 push $0x1
10a583: ff 30 pushl (%eax)
10a585: 68 50 03 13 00 push $0x130350
10a58a: e8 30 fe ff ff call 10a3bf <rtems_aio_search_fd>
10a58f: 89 c6 mov %eax,%esi
if (r_chain->new_fd == 1) {
10a591: 83 c4 10 add $0x10,%esp
10a594: 83 78 18 01 cmpl $0x1,0x18(%eax)
10a598: 0f 85 84 00 00 00 jne 10a622 <rtems_aio_enqueue+0x128>
RTEMS_INLINE_ROUTINE void _Chain_Prepend(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
_Chain_Insert(_Chain_Head(the_chain), the_node);
10a59e: 50 push %eax
10a59f: 50 push %eax
10a5a0: 53 push %ebx
10a5a1: 8d 46 08 lea 0x8(%esi),%eax
10a5a4: 50 push %eax
10a5a5: e8 96 1f 00 00 call 10c540 <_Chain_Insert>
rtems_chain_prepend (&r_chain->perfd, &req->next_prio);
r_chain->new_fd = 0;
10a5aa: c7 46 18 00 00 00 00 movl $0x0,0x18(%esi)
pthread_mutex_init (&r_chain->mutex, NULL);
10a5b1: 58 pop %eax
10a5b2: 5a pop %edx
10a5b3: 6a 00 push $0x0
10a5b5: 8d 46 1c lea 0x1c(%esi),%eax
10a5b8: 50 push %eax
10a5b9: e8 22 07 00 00 call 10ace0 <pthread_mutex_init>
pthread_cond_init (&r_chain->cond, NULL);
10a5be: 59 pop %ecx
10a5bf: 5b pop %ebx
10a5c0: 6a 00 push $0x0
10a5c2: 8d 46 20 lea 0x20(%esi),%eax
10a5c5: 50 push %eax
10a5c6: e8 c9 03 00 00 call 10a994 <pthread_cond_init>
AIO_printf ("New thread \n");
result = pthread_create (&thid, &aio_request_queue.attr,
10a5cb: 56 push %esi
10a5cc: 68 34 a0 10 00 push $0x10a034
10a5d1: 68 10 03 13 00 push $0x130310
10a5d6: 8d 45 c4 lea -0x3c(%ebp),%eax
10a5d9: 50 push %eax
10a5da: e8 25 0a 00 00 call 10b004 <pthread_create>
10a5df: 89 c3 mov %eax,%ebx
rtems_aio_handle, (void *) r_chain);
if (result != 0) {
10a5e1: 83 c4 20 add $0x20,%esp
10a5e4: 85 c0 test %eax,%eax
10a5e6: 74 17 je 10a5ff <rtems_aio_enqueue+0x105><== ALWAYS TAKEN
pthread_mutex_unlock (&aio_request_queue.mutex);
10a5e8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10a5eb: 68 08 03 13 00 push $0x130308 <== NOT EXECUTED
10a5f0: e8 93 08 00 00 call 10ae88 <pthread_mutex_unlock> <== NOT EXECUTED
10a5f5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10a5f8: 89 df mov %ebx,%edi <== NOT EXECUTED
10a5fa: e9 d3 00 00 00 jmp 10a6d2 <rtems_aio_enqueue+0x1d8><== NOT EXECUTED
return result;
}
++aio_request_queue.active_threads;
10a5ff: ff 05 6c 03 13 00 incl 0x13036c
10a605: e9 b8 00 00 00 jmp 10a6c2 <rtems_aio_enqueue+0x1c8>
else
{
/* the maximum number of threads has been already created
even though some of them might be idle.
The request belongs to one of the active fd chain */
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req,
10a60a: 56 push %esi
10a60b: 6a 00 push $0x0
10a60d: ff 30 pushl (%eax)
10a60f: 68 50 03 13 00 push $0x130350
10a614: e8 a6 fd ff ff call 10a3bf <rtems_aio_search_fd>
10a619: 89 c6 mov %eax,%esi
req->aiocbp->aio_fildes, 0);
if (r_chain != NULL)
10a61b: 83 c4 10 add $0x10,%esp
10a61e: 85 c0 test %eax,%eax
10a620: 74 31 je 10a653 <rtems_aio_enqueue+0x159>
{
pthread_mutex_lock (&r_chain->mutex);
10a622: 8d 4e 1c lea 0x1c(%esi),%ecx
10a625: 83 ec 0c sub $0xc,%esp
10a628: 51 push %ecx
10a629: 89 4d b4 mov %ecx,-0x4c(%ebp)
10a62c: e8 d7 07 00 00 call 10ae08 <pthread_mutex_lock>
rtems_aio_insert_prio (&r_chain->perfd, req);
10a631: 8d 46 08 lea 0x8(%esi),%eax
10a634: 89 da mov %ebx,%edx
10a636: e8 3d fc ff ff call 10a278 <rtems_aio_insert_prio>
pthread_cond_signal (&r_chain->cond);
10a63b: 83 c6 20 add $0x20,%esi
10a63e: 89 34 24 mov %esi,(%esp)
10a641: e8 ee 03 00 00 call 10aa34 <pthread_cond_signal>
pthread_mutex_unlock (&r_chain->mutex);
10a646: 8b 4d b4 mov -0x4c(%ebp),%ecx
10a649: 89 0c 24 mov %ecx,(%esp)
10a64c: e8 37 08 00 00 call 10ae88 <pthread_mutex_unlock>
10a651: eb 6c jmp 10a6bf <rtems_aio_enqueue+0x1c5>
} else {
/* or to the idle chain */
chain = &aio_request_queue.idle_req;
r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1);
10a653: 51 push %ecx
10a654: 6a 01 push $0x1
10a656: 8b 43 14 mov 0x14(%ebx),%eax
10a659: ff 30 pushl (%eax)
10a65b: 68 5c 03 13 00 push $0x13035c
10a660: e8 5a fd ff ff call 10a3bf <rtems_aio_search_fd>
10a665: 89 c6 mov %eax,%esi
if (r_chain->new_fd == 1) {
10a667: 83 c4 10 add $0x10,%esp
10a66a: 83 78 18 01 cmpl $0x1,0x18(%eax)
10a66e: 8d 40 08 lea 0x8(%eax),%eax
10a671: 75 2f jne 10a6a2 <rtems_aio_enqueue+0x1a8>
10a673: 52 push %edx
10a674: 52 push %edx
10a675: 53 push %ebx
10a676: 50 push %eax
10a677: e8 c4 1e 00 00 call 10c540 <_Chain_Insert>
/* If this is a new fd chain we signal the idle threads that
might be waiting for requests */
AIO_printf (" New chain on waiting queue \n ");
rtems_chain_prepend (&r_chain->perfd, &req->next_prio);
r_chain->new_fd = 0;
10a67c: c7 46 18 00 00 00 00 movl $0x0,0x18(%esi)
pthread_mutex_init (&r_chain->mutex, NULL);
10a683: 59 pop %ecx
10a684: 5b pop %ebx
10a685: 6a 00 push $0x0
10a687: 8d 46 1c lea 0x1c(%esi),%eax
10a68a: 50 push %eax
10a68b: e8 50 06 00 00 call 10ace0 <pthread_mutex_init>
pthread_cond_init (&r_chain->cond, NULL);
10a690: 58 pop %eax
10a691: 5a pop %edx
10a692: 6a 00 push $0x0
10a694: 83 c6 20 add $0x20,%esi
10a697: 56 push %esi
10a698: e8 f7 02 00 00 call 10a994 <pthread_cond_init>
10a69d: 83 c4 10 add $0x10,%esp
10a6a0: eb 07 jmp 10a6a9 <rtems_aio_enqueue+0x1af>
} else
/* just insert the request in the existing fd chain */
rtems_aio_insert_prio (&r_chain->perfd, req);
10a6a2: 89 da mov %ebx,%edx
10a6a4: e8 cf fb ff ff call 10a278 <rtems_aio_insert_prio>
if (aio_request_queue.idle_threads > 0)
10a6a9: 83 3d 70 03 13 00 00 cmpl $0x0,0x130370
10a6b0: 7e 10 jle 10a6c2 <rtems_aio_enqueue+0x1c8><== ALWAYS TAKEN
pthread_cond_signal (&aio_request_queue.new_req);
10a6b2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10a6b5: 68 0c 03 13 00 push $0x13030c <== NOT EXECUTED
10a6ba: e8 75 03 00 00 call 10aa34 <pthread_cond_signal> <== NOT EXECUTED
10a6bf: 83 c4 10 add $0x10,%esp
}
}
pthread_mutex_unlock (&aio_request_queue.mutex);
10a6c2: 83 ec 0c sub $0xc,%esp
10a6c5: 68 08 03 13 00 push $0x130308
10a6ca: e8 b9 07 00 00 call 10ae88 <pthread_mutex_unlock>
10a6cf: 83 c4 10 add $0x10,%esp
return 0;
}
10a6d2: 89 f8 mov %edi,%eax
10a6d4: 8d 65 f4 lea -0xc(%ebp),%esp
10a6d7: 5b pop %ebx
10a6d8: 5e pop %esi
10a6d9: 5f pop %edi
10a6da: 5d pop %ebp
10a6db: c3 ret
0010a034 <rtems_aio_handle>:
* NULL - if error
*/
static void *
rtems_aio_handle (void *arg)
{
10a034: 55 push %ebp
10a035: 89 e5 mov %esp,%ebp
10a037: 57 push %edi
10a038: 56 push %esi
10a039: 53 push %ebx
10a03a: 83 ec 4c sub $0x4c,%esp
rtems_aio_request_chain *r_chain = arg;
10a03d: 8b 5d 08 mov 0x8(%ebp),%ebx
/* acquire the mutex of the current fd chain.
we don't need to lock the queue mutex since we can
add requests to idle fd chains or even active ones
if the working request has been extracted from the
chain */
result = pthread_mutex_lock (&r_chain->mutex);
10a040: 8d 7b 1c lea 0x1c(%ebx),%edi
10a043: 83 ec 0c sub $0xc,%esp
10a046: 57 push %edi
10a047: e8 bc 0d 00 00 call 10ae08 <pthread_mutex_lock>
if (result != 0)
10a04c: 83 c4 10 add $0x10,%esp
10a04f: 85 c0 test %eax,%eax
10a051: 0f 85 17 02 00 00 jne 10a26e <rtems_aio_handle+0x23a><== NEVER TAKEN
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
10a057: 8b 73 08 mov 0x8(%ebx),%esi
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
10a05a: 8d 43 0c lea 0xc(%ebx),%eax
/* If the locked chain is not empty, take the first
request extract it, unlock the chain and process
the request, in this way the user can supply more
requests to this fd chain */
if (!rtems_chain_is_empty (chain)) {
10a05d: 39 c6 cmp %eax,%esi
10a05f: 0f 84 cc 00 00 00 je 10a131 <rtems_aio_handle+0xfd>
node = rtems_chain_first (chain);
req = (rtems_aio_request *) node;
/* See _POSIX_PRIORITIZE_IO and _POSIX_PRIORITY_SCHEDULING
discussion in rtems_aio_enqueue () */
pthread_getschedparam (pthread_self(), &policy, ¶m);
10a065: e8 8e 15 00 00 call 10b5f8 <pthread_self>
10a06a: 52 push %edx
10a06b: 8d 55 cc lea -0x34(%ebp),%edx
10a06e: 52 push %edx
10a06f: 8d 55 c0 lea -0x40(%ebp),%edx
10a072: 52 push %edx
10a073: 50 push %eax
10a074: e8 b3 11 00 00 call 10b22c <pthread_getschedparam>
param.sched_priority = req->priority;
10a079: 8b 46 0c mov 0xc(%esi),%eax
10a07c: 89 45 cc mov %eax,-0x34(%ebp)
pthread_setschedparam (pthread_self(), req->policy, ¶m);
10a07f: 8b 56 08 mov 0x8(%esi),%edx
10a082: 89 55 b4 mov %edx,-0x4c(%ebp)
10a085: e8 6e 15 00 00 call 10b5f8 <pthread_self>
10a08a: 83 c4 0c add $0xc,%esp
10a08d: 8d 4d cc lea -0x34(%ebp),%ecx
10a090: 51 push %ecx
10a091: 8b 55 b4 mov -0x4c(%ebp),%edx
10a094: 52 push %edx
10a095: 50 push %eax
10a096: e8 6d 15 00 00 call 10b608 <pthread_setschedparam>
10a09b: 89 34 24 mov %esi,(%esp)
10a09e: e8 61 24 00 00 call 10c504 <_Chain_Extract>
rtems_chain_extract (node);
pthread_mutex_unlock (&r_chain->mutex);
10a0a3: 89 3c 24 mov %edi,(%esp)
10a0a6: e8 dd 0d 00 00 call 10ae88 <pthread_mutex_unlock>
switch (req->aiocbp->aio_lio_opcode) {
10a0ab: 8b 46 14 mov 0x14(%esi),%eax
10a0ae: 83 c4 10 add $0x10,%esp
10a0b1: 8b 50 2c mov 0x2c(%eax),%edx
10a0b4: 83 fa 02 cmp $0x2,%edx
10a0b7: 74 20 je 10a0d9 <rtems_aio_handle+0xa5>
10a0b9: 83 fa 03 cmp $0x3,%edx
10a0bc: 74 36 je 10a0f4 <rtems_aio_handle+0xc0> <== NEVER TAKEN
10a0be: 4a dec %edx
10a0bf: 75 45 jne 10a106 <rtems_aio_handle+0xd2> <== NEVER TAKEN
case LIO_READ:
AIO_printf ("read\n");
result = pread (req->aiocbp->aio_fildes,
10a0c1: 83 ec 0c sub $0xc,%esp
10a0c4: ff 70 08 pushl 0x8(%eax)
10a0c7: ff 70 04 pushl 0x4(%eax)
10a0ca: ff 70 10 pushl 0x10(%eax)
10a0cd: ff 70 0c pushl 0xc(%eax)
10a0d0: ff 30 pushl (%eax)
10a0d2: e8 09 96 00 00 call 1136e0 <pread>
10a0d7: eb 16 jmp 10a0ef <rtems_aio_handle+0xbb>
req->aiocbp->aio_nbytes, req->aiocbp->aio_offset);
break;
case LIO_WRITE:
AIO_printf ("write\n");
result = pwrite (req->aiocbp->aio_fildes,
10a0d9: 83 ec 0c sub $0xc,%esp
10a0dc: ff 70 08 pushl 0x8(%eax)
10a0df: ff 70 04 pushl 0x4(%eax)
10a0e2: ff 70 10 pushl 0x10(%eax)
10a0e5: ff 70 0c pushl 0xc(%eax)
10a0e8: ff 30 pushl (%eax)
10a0ea: e8 f1 96 00 00 call 1137e0 <pwrite>
(void *) req->aiocbp->aio_buf,
req->aiocbp->aio_nbytes, req->aiocbp->aio_offset);
break;
10a0ef: 83 c4 20 add $0x20,%esp
10a0f2: eb 0d jmp 10a101 <rtems_aio_handle+0xcd>
case LIO_SYNC:
AIO_printf ("sync\n");
result = fsync (req->aiocbp->aio_fildes);
10a0f4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10a0f7: ff 30 pushl (%eax) <== NOT EXECUTED
10a0f9: e8 56 5a 00 00 call 10fb54 <fsync> <== NOT EXECUTED
break;
10a0fe: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
default:
result = -1;
}
if (result == -1) {
10a101: 83 f8 ff cmp $0xffffffff,%eax
10a104: 75 19 jne 10a11f <rtems_aio_handle+0xeb> <== ALWAYS TAKEN
req->aiocbp->return_value = -1;
10a106: 8b 76 14 mov 0x14(%esi),%esi <== NOT EXECUTED
10a109: c7 46 34 ff ff ff ff movl $0xffffffff,0x34(%esi) <== NOT EXECUTED
req->aiocbp->error_code = errno;
10a110: e8 07 8c 00 00 call 112d1c <__errno> <== NOT EXECUTED
10a115: 8b 00 mov (%eax),%eax <== NOT EXECUTED
10a117: 89 46 30 mov %eax,0x30(%esi) <== NOT EXECUTED
10a11a: e9 21 ff ff ff jmp 10a040 <rtems_aio_handle+0xc> <== NOT EXECUTED
} else {
req->aiocbp->return_value = result;
10a11f: 8b 56 14 mov 0x14(%esi),%edx
10a122: 89 42 34 mov %eax,0x34(%edx)
req->aiocbp->error_code = 0;
10a125: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx)
10a12c: e9 0f ff ff ff jmp 10a040 <rtems_aio_handle+0xc>
struct timespec timeout;
AIO_printf ("Chain is empty [WQ], wait for work\n");
pthread_mutex_unlock (&r_chain->mutex);
10a131: 83 ec 0c sub $0xc,%esp
10a134: 57 push %edi
10a135: e8 4e 0d 00 00 call 10ae88 <pthread_mutex_unlock>
pthread_mutex_lock (&aio_request_queue.mutex);
10a13a: c7 04 24 08 03 13 00 movl $0x130308,(%esp)
10a141: e8 c2 0c 00 00 call 10ae08 <pthread_mutex_lock>
if (rtems_chain_is_empty (chain))
10a146: 83 c4 10 add $0x10,%esp
10a149: 39 73 08 cmp %esi,0x8(%ebx)
10a14c: 0f 85 07 01 00 00 jne 10a259 <rtems_aio_handle+0x225><== NEVER TAKEN
{
clock_gettime (CLOCK_REALTIME, &timeout);
10a152: 56 push %esi
10a153: 56 push %esi
10a154: 8d 45 c4 lea -0x3c(%ebp),%eax
10a157: 50 push %eax
10a158: 6a 01 push $0x1
10a15a: e8 e1 06 00 00 call 10a840 <clock_gettime>
timeout.tv_sec += 3;
10a15f: 83 45 c4 03 addl $0x3,-0x3c(%ebp)
timeout.tv_nsec = 0;
10a163: c7 45 c8 00 00 00 00 movl $0x0,-0x38(%ebp)
result = pthread_cond_timedwait (&r_chain->cond,
10a16a: 8d 73 20 lea 0x20(%ebx),%esi
10a16d: 83 c4 0c add $0xc,%esp
10a170: 8d 55 c4 lea -0x3c(%ebp),%edx
10a173: 52 push %edx
10a174: 68 08 03 13 00 push $0x130308
10a179: 56 push %esi
10a17a: e8 29 09 00 00 call 10aaa8 <pthread_cond_timedwait>
&aio_request_queue.mutex,
&timeout);
/* If no requests were added to the chain we delete the fd chain from
the queue and start working with idle fd chains */
if (result == ETIMEDOUT) {
10a17f: 83 c4 10 add $0x10,%esp
10a182: 83 f8 74 cmp $0x74,%eax
10a185: 0f 85 ce 00 00 00 jne 10a259 <rtems_aio_handle+0x225><== NEVER TAKEN
10a18b: 83 ec 0c sub $0xc,%esp
10a18e: 53 push %ebx
10a18f: e8 70 23 00 00 call 10c504 <_Chain_Extract>
rtems_chain_extract (&r_chain->next_fd);
pthread_mutex_destroy (&r_chain->mutex);
10a194: 89 3c 24 mov %edi,(%esp)
10a197: e8 40 0a 00 00 call 10abdc <pthread_mutex_destroy>
pthread_cond_destroy (&r_chain->cond);
10a19c: 89 34 24 mov %esi,(%esp)
10a19f: e8 34 07 00 00 call 10a8d8 <pthread_cond_destroy>
free (r_chain);
10a1a4: 89 1c 24 mov %ebx,(%esp)
10a1a7: e8 ac c9 ff ff call 106b58 <free>
/* If the idle chain is empty sleep for 3 seconds and wait for a
signal. The thread now becomes idle. */
if (rtems_chain_is_empty (&aio_request_queue.idle_req)) {
10a1ac: 83 c4 10 add $0x10,%esp
10a1af: 81 3d 5c 03 13 00 60 cmpl $0x130360,0x13035c
10a1b6: 03 13 00
10a1b9: 75 5a jne 10a215 <rtems_aio_handle+0x1e1>
AIO_printf ("Chain is empty [IQ], wait for work\n");
++aio_request_queue.idle_threads;
10a1bb: ff 05 70 03 13 00 incl 0x130370
--aio_request_queue.active_threads;
10a1c1: ff 0d 6c 03 13 00 decl 0x13036c
clock_gettime (CLOCK_REALTIME, &timeout);
10a1c7: 51 push %ecx
10a1c8: 51 push %ecx
10a1c9: 8d 4d c4 lea -0x3c(%ebp),%ecx
10a1cc: 51 push %ecx
10a1cd: 6a 01 push $0x1
10a1cf: e8 6c 06 00 00 call 10a840 <clock_gettime>
timeout.tv_sec += 3;
10a1d4: 83 45 c4 03 addl $0x3,-0x3c(%ebp)
timeout.tv_nsec = 0;
10a1d8: c7 45 c8 00 00 00 00 movl $0x0,-0x38(%ebp)
result = pthread_cond_timedwait (&aio_request_queue.new_req,
10a1df: 83 c4 0c add $0xc,%esp
10a1e2: 8d 45 c4 lea -0x3c(%ebp),%eax
10a1e5: 50 push %eax
10a1e6: 68 08 03 13 00 push $0x130308
10a1eb: 68 0c 03 13 00 push $0x13030c
10a1f0: e8 b3 08 00 00 call 10aaa8 <pthread_cond_timedwait>
&aio_request_queue.mutex,
&timeout);
/* If no new fd chain was added in the idle requests
then this thread is finished */
if (result == ETIMEDOUT) {
10a1f5: 83 c4 10 add $0x10,%esp
10a1f8: 83 f8 74 cmp $0x74,%eax
10a1fb: 75 18 jne 10a215 <rtems_aio_handle+0x1e1><== NEVER TAKEN
AIO_printf ("Etimeout\n");
--aio_request_queue.idle_threads;
10a1fd: ff 0d 70 03 13 00 decl 0x130370
pthread_mutex_unlock (&aio_request_queue.mutex);
10a203: 83 ec 0c sub $0xc,%esp
10a206: 68 08 03 13 00 push $0x130308
10a20b: e8 78 0c 00 00 call 10ae88 <pthread_mutex_unlock>
10a210: 83 c4 10 add $0x10,%esp
10a213: eb 59 jmp 10a26e <rtems_aio_handle+0x23a>
}
}
/* Otherwise move this chain to the working chain and
start the loop all over again */
AIO_printf ("Work on idle\n");
--aio_request_queue.idle_threads;
10a215: ff 0d 70 03 13 00 decl 0x130370
++aio_request_queue.active_threads;
10a21b: ff 05 6c 03 13 00 incl 0x13036c
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
10a221: 8b 1d 5c 03 13 00 mov 0x13035c,%ebx
10a227: 83 ec 0c sub $0xc,%esp
10a22a: 53 push %ebx
10a22b: e8 d4 22 00 00 call 10c504 <_Chain_Extract>
10a230: a1 50 03 13 00 mov 0x130350,%eax
rtems_chain_node *node;
node = rtems_chain_first (&aio_request_queue.work_req);
temp = (rtems_aio_request_chain *) node;
while (temp->fildes < r_chain->fildes &&
10a235: 8b 53 14 mov 0x14(%ebx),%edx
10a238: 83 c4 10 add $0x10,%esp
10a23b: eb 02 jmp 10a23f <rtems_aio_handle+0x20b>
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
10a23d: 8b 00 mov (%eax),%eax
rtems_chain_node *node;
node = rtems_chain_first (&aio_request_queue.work_req);
temp = (rtems_aio_request_chain *) node;
while (temp->fildes < r_chain->fildes &&
10a23f: 39 50 14 cmp %edx,0x14(%eax)
10a242: 7d 07 jge 10a24b <rtems_aio_handle+0x217>
10a244: 3d 54 03 13 00 cmp $0x130354,%eax
10a249: 75 f2 jne 10a23d <rtems_aio_handle+0x209><== ALWAYS TAKEN
RTEMS_INLINE_ROUTINE void rtems_chain_insert(
rtems_chain_node *after_node,
rtems_chain_node *the_node
)
{
_Chain_Insert( after_node, the_node );
10a24b: 52 push %edx
10a24c: 52 push %edx
10a24d: 53 push %ebx
10a24e: ff 70 04 pushl 0x4(%eax)
10a251: e8 ea 22 00 00 call 10c540 <_Chain_Insert>
10a256: 83 c4 10 add $0x10,%esp
}
}
/* If there was a request added in the initial fd chain then release
the mutex and process it */
pthread_mutex_unlock (&aio_request_queue.mutex);
10a259: 83 ec 0c sub $0xc,%esp
10a25c: 68 08 03 13 00 push $0x130308
10a261: e8 22 0c 00 00 call 10ae88 <pthread_mutex_unlock>
10a266: 83 c4 10 add $0x10,%esp
10a269: e9 d2 fd ff ff jmp 10a040 <rtems_aio_handle+0xc>
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
10a26e: 31 c0 xor %eax,%eax
10a270: 8d 65 f4 lea -0xc(%ebp),%esp
10a273: 5b pop %ebx
10a274: 5e pop %esi
10a275: 5f pop %edi
10a276: 5d pop %ebp
10a277: c3 ret
0010a2c3 <rtems_aio_init>:
* 0 - if initialization succeeded
*/
int
rtems_aio_init (void)
{
10a2c3: 55 push %ebp
10a2c4: 89 e5 mov %esp,%ebp
10a2c6: 53 push %ebx
10a2c7: 83 ec 10 sub $0x10,%esp
int result = 0;
result = pthread_attr_init (&aio_request_queue.attr);
10a2ca: 68 10 03 13 00 push $0x130310
10a2cf: e8 e4 0c 00 00 call 10afb8 <pthread_attr_init>
10a2d4: 89 c3 mov %eax,%ebx
if (result != 0)
10a2d6: 83 c4 10 add $0x10,%esp
10a2d9: 85 c0 test %eax,%eax
10a2db: 0f 85 d7 00 00 00 jne 10a3b8 <rtems_aio_init+0xf5> <== NEVER TAKEN
return result;
result =
10a2e1: 50 push %eax
10a2e2: 50 push %eax
10a2e3: 6a 00 push $0x0
10a2e5: 68 10 03 13 00 push $0x130310
10a2ea: e8 f1 0c 00 00 call 10afe0 <pthread_attr_setdetachstate>
pthread_attr_setdetachstate (&aio_request_queue.attr,
PTHREAD_CREATE_DETACHED);
if (result != 0)
10a2ef: 83 c4 10 add $0x10,%esp
10a2f2: 85 c0 test %eax,%eax
10a2f4: 74 10 je 10a306 <rtems_aio_init+0x43> <== ALWAYS TAKEN
pthread_attr_destroy (&aio_request_queue.attr);
10a2f6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10a2f9: 68 10 03 13 00 push $0x130310 <== NOT EXECUTED
10a2fe: e8 95 0c 00 00 call 10af98 <pthread_attr_destroy> <== NOT EXECUTED
10a303: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
result = pthread_mutex_init (&aio_request_queue.mutex, NULL);
10a306: 50 push %eax
10a307: 50 push %eax
10a308: 6a 00 push $0x0
10a30a: 68 08 03 13 00 push $0x130308
10a30f: e8 cc 09 00 00 call 10ace0 <pthread_mutex_init>
if (result != 0)
10a314: 83 c4 10 add $0x10,%esp
10a317: 85 c0 test %eax,%eax
10a319: 74 10 je 10a32b <rtems_aio_init+0x68> <== ALWAYS TAKEN
pthread_attr_destroy (&aio_request_queue.attr);
10a31b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10a31e: 68 10 03 13 00 push $0x130310 <== NOT EXECUTED
10a323: e8 70 0c 00 00 call 10af98 <pthread_attr_destroy> <== NOT EXECUTED
10a328: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
result = pthread_cond_init (&aio_request_queue.new_req, NULL);
10a32b: 50 push %eax
10a32c: 50 push %eax
10a32d: 6a 00 push $0x0
10a32f: 68 0c 03 13 00 push $0x13030c
10a334: e8 5b 06 00 00 call 10a994 <pthread_cond_init>
10a339: 89 c3 mov %eax,%ebx
if (result != 0) {
10a33b: 83 c4 10 add $0x10,%esp
10a33e: 85 c0 test %eax,%eax
10a340: 74 1c je 10a35e <rtems_aio_init+0x9b> <== ALWAYS TAKEN
pthread_mutex_destroy (&aio_request_queue.mutex);
10a342: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10a345: 68 08 03 13 00 push $0x130308 <== NOT EXECUTED
10a34a: e8 8d 08 00 00 call 10abdc <pthread_mutex_destroy> <== NOT EXECUTED
pthread_attr_destroy (&aio_request_queue.attr);
10a34f: c7 04 24 10 03 13 00 movl $0x130310,(%esp) <== NOT EXECUTED
10a356: e8 3d 0c 00 00 call 10af98 <pthread_attr_destroy> <== NOT EXECUTED
10a35b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
10a35e: c7 05 50 03 13 00 54 movl $0x130354,0x130350
10a365: 03 13 00
head->previous = NULL;
10a368: c7 05 54 03 13 00 00 movl $0x0,0x130354
10a36f: 00 00 00
tail->previous = head;
10a372: c7 05 58 03 13 00 50 movl $0x130350,0x130358
10a379: 03 13 00
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
10a37c: c7 05 5c 03 13 00 60 movl $0x130360,0x13035c
10a383: 03 13 00
head->previous = NULL;
10a386: c7 05 60 03 13 00 00 movl $0x0,0x130360
10a38d: 00 00 00
tail->previous = head;
10a390: c7 05 64 03 13 00 5c movl $0x13035c,0x130364
10a397: 03 13 00
}
rtems_chain_initialize_empty (&aio_request_queue.work_req);
rtems_chain_initialize_empty (&aio_request_queue.idle_req);
aio_request_queue.active_threads = 0;
10a39a: c7 05 6c 03 13 00 00 movl $0x0,0x13036c
10a3a1: 00 00 00
aio_request_queue.idle_threads = 0;
10a3a4: c7 05 70 03 13 00 00 movl $0x0,0x130370
10a3ab: 00 00 00
aio_request_queue.initialized = AIO_QUEUE_INITIALIZED;
10a3ae: c7 05 68 03 13 00 0b movl $0xb00b,0x130368
10a3b5: b0 00 00
return result;
}
10a3b8: 89 d8 mov %ebx,%eax
10a3ba: 8b 5d fc mov -0x4(%ebp),%ebx
10a3bd: c9 leave
10a3be: c3 ret
0010a278 <rtems_aio_insert_prio>:
* NONE
*/
static void
rtems_aio_insert_prio (rtems_chain_control *chain, rtems_aio_request *req)
{
10a278: 55 push %ebp
10a279: 89 e5 mov %esp,%ebp
10a27b: 56 push %esi
10a27c: 53 push %ebx
10a27d: 8b 08 mov (%eax),%ecx
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
10a27f: 8d 58 04 lea 0x4(%eax),%ebx
rtems_chain_node *node;
AIO_printf ("FD exists \n");
node = rtems_chain_first (chain);
if (rtems_chain_is_empty (chain)) {
10a282: 39 d9 cmp %ebx,%ecx
10a284: 75 06 jne 10a28c <rtems_aio_insert_prio+0x14><== ALWAYS TAKEN
RTEMS_INLINE_ROUTINE void _Chain_Prepend(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
_Chain_Insert(_Chain_Head(the_chain), the_node);
10a286: 56 push %esi <== NOT EXECUTED
10a287: 56 push %esi <== NOT EXECUTED
10a288: 52 push %edx <== NOT EXECUTED
10a289: 50 push %eax <== NOT EXECUTED
10a28a: eb 20 jmp 10a2ac <rtems_aio_insert_prio+0x34><== NOT EXECUTED
AIO_printf ("First in chain \n");
rtems_chain_prepend (chain, &req->next_prio);
} else {
AIO_printf ("Add by priority \n");
int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio;
10a28c: 8b 41 14 mov 0x14(%ecx),%eax
10a28f: 8b 40 14 mov 0x14(%eax),%eax
while (req->aiocbp->aio_reqprio > prio &&
10a292: 8b 72 14 mov 0x14(%edx),%esi
10a295: 8b 76 14 mov 0x14(%esi),%esi
10a298: eb 08 jmp 10a2a2 <rtems_aio_insert_prio+0x2a>
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
10a29a: 8b 09 mov (%ecx),%ecx <== NOT EXECUTED
int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio;
while (req->aiocbp->aio_reqprio > prio &&
!rtems_chain_is_tail (chain, node)) {
node = rtems_chain_next (node);
prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio;
10a29c: 8b 41 14 mov 0x14(%ecx),%eax <== NOT EXECUTED
10a29f: 8b 40 14 mov 0x14(%eax),%eax <== NOT EXECUTED
rtems_chain_prepend (chain, &req->next_prio);
} else {
AIO_printf ("Add by priority \n");
int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio;
while (req->aiocbp->aio_reqprio > prio &&
10a2a2: 39 c6 cmp %eax,%esi
10a2a4: 7f 10 jg 10a2b6 <rtems_aio_insert_prio+0x3e><== NEVER TAKEN
10a2a6: 53 push %ebx
10a2a7: 53 push %ebx
10a2a8: 52 push %edx
10a2a9: ff 71 04 pushl 0x4(%ecx)
10a2ac: e8 8f 22 00 00 call 10c540 <_Chain_Insert>
10a2b1: 83 c4 10 add $0x10,%esp
10a2b4: eb 06 jmp 10a2bc <rtems_aio_insert_prio+0x44>
10a2b6: 39 d9 cmp %ebx,%ecx <== NOT EXECUTED
10a2b8: 75 e0 jne 10a29a <rtems_aio_insert_prio+0x22><== NOT EXECUTED
10a2ba: eb ea jmp 10a2a6 <rtems_aio_insert_prio+0x2e><== NOT EXECUTED
}
rtems_chain_insert (node->previous, &req->next_prio);
}
}
10a2bc: 8d 65 f8 lea -0x8(%ebp),%esp
10a2bf: 5b pop %ebx
10a2c0: 5e pop %esi
10a2c1: 5d pop %ebp
10a2c2: c3 ret
0010a496 <rtems_aio_remove_req>:
* AIO_NOTCANCELED - if request was not canceled
* AIO_CANCELED - if request was canceled
*/
int rtems_aio_remove_req (rtems_chain_control *chain, struct aiocb *aiocbp)
{
10a496: 55 push %ebp
10a497: 89 e5 mov %esp,%ebp
10a499: 53 push %ebx
10a49a: 50 push %eax
10a49b: 8b 55 08 mov 0x8(%ebp),%edx
10a49e: 8b 45 0c mov 0xc(%ebp),%eax
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
10a4a1: 8b 1a mov (%edx),%ebx
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
10a4a3: 83 c2 04 add $0x4,%edx
if (rtems_chain_is_empty (chain))
10a4a6: 39 d3 cmp %edx,%ebx
10a4a8: 75 0f jne 10a4b9 <rtems_aio_remove_req+0x23>
10a4aa: eb 44 jmp 10a4f0 <rtems_aio_remove_req+0x5a>
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
10a4ac: 8b 1b mov (%ebx),%ebx <== NOT EXECUTED
rtems_chain_node *node = rtems_chain_first (chain);
rtems_aio_request *current;
current = (rtems_aio_request *) node;
while (!rtems_chain_is_tail (chain, node) && current->aiocbp != aiocbp) {
10a4ae: 39 d3 cmp %edx,%ebx <== NOT EXECUTED
10a4b0: 75 07 jne 10a4b9 <rtems_aio_remove_req+0x23><== NOT EXECUTED
node = rtems_chain_next (node);
current = (rtems_aio_request *) node;
}
if (rtems_chain_is_tail (chain, node))
return AIO_NOTCANCELED;
10a4b2: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
10a4b7: eb 3c jmp 10a4f5 <rtems_aio_remove_req+0x5f><== NOT EXECUTED
rtems_chain_node *node = rtems_chain_first (chain);
rtems_aio_request *current;
current = (rtems_aio_request *) node;
while (!rtems_chain_is_tail (chain, node) && current->aiocbp != aiocbp) {
10a4b9: 39 43 14 cmp %eax,0x14(%ebx)
10a4bc: 75 ee jne 10a4ac <rtems_aio_remove_req+0x16><== NEVER TAKEN
node = rtems_chain_next (node);
current = (rtems_aio_request *) node;
}
if (rtems_chain_is_tail (chain, node))
return AIO_NOTCANCELED;
10a4be: b8 01 00 00 00 mov $0x1,%eax
while (!rtems_chain_is_tail (chain, node) && current->aiocbp != aiocbp) {
node = rtems_chain_next (node);
current = (rtems_aio_request *) node;
}
if (rtems_chain_is_tail (chain, node))
10a4c3: 39 d3 cmp %edx,%ebx
10a4c5: 74 2e je 10a4f5 <rtems_aio_remove_req+0x5f><== NEVER TAKEN
10a4c7: 83 ec 0c sub $0xc,%esp
10a4ca: 53 push %ebx
10a4cb: e8 34 20 00 00 call 10c504 <_Chain_Extract>
return AIO_NOTCANCELED;
else
{
rtems_chain_extract (node);
current->aiocbp->error_code = ECANCELED;
10a4d0: 8b 43 14 mov 0x14(%ebx),%eax
10a4d3: c7 40 30 8c 00 00 00 movl $0x8c,0x30(%eax)
current->aiocbp->return_value = -1;
10a4da: c7 40 34 ff ff ff ff movl $0xffffffff,0x34(%eax)
free (current);
10a4e1: 89 1c 24 mov %ebx,(%esp)
10a4e4: e8 6f c6 ff ff call 106b58 <free>
}
return AIO_CANCELED;
10a4e9: 83 c4 10 add $0x10,%esp
10a4ec: 31 c0 xor %eax,%eax
10a4ee: eb 05 jmp 10a4f5 <rtems_aio_remove_req+0x5f>
*/
int rtems_aio_remove_req (rtems_chain_control *chain, struct aiocb *aiocbp)
{
if (rtems_chain_is_empty (chain))
return AIO_ALLDONE;
10a4f0: b8 02 00 00 00 mov $0x2,%eax
current->aiocbp->return_value = -1;
free (current);
}
return AIO_CANCELED;
}
10a4f5: 8b 5d fc mov -0x4(%ebp),%ebx
10a4f8: c9 leave
10a4f9: c3 ret
0010e934 <rtems_bdbuf_add_to_modified_list_after_access>:
}
}
static void
rtems_bdbuf_add_to_modified_list_after_access (rtems_bdbuf_buffer *bd)
{
10e934: 55 push %ebp
10e935: 89 e5 mov %esp,%ebp
10e937: 53 push %ebx
10e938: 53 push %ebx
10e939: 89 c3 mov %eax,%ebx
if (bdbuf_cache.sync_active && bdbuf_cache.sync_device == bd->dd)
10e93b: 80 3d f0 20 13 00 00 cmpb $0x0,0x1320f0
10e942: 74 33 je 10e977 <rtems_bdbuf_add_to_modified_list_after_access+0x43><== ALWAYS TAKEN
10e944: 8b 40 14 mov 0x14(%eax),%eax <== NOT EXECUTED
10e947: 39 05 f8 20 13 00 cmp %eax,0x1320f8 <== NOT EXECUTED
10e94d: 75 28 jne 10e977 <rtems_bdbuf_add_to_modified_list_after_access+0x43><== NOT EXECUTED
{
rtems_bdbuf_unlock_cache ();
10e94f: e8 bc fa ff ff call 10e410 <rtems_bdbuf_unlock_cache><== NOT EXECUTED
* Lock the cache's sync. A single task can nest calls.
*/
static void
rtems_bdbuf_lock_sync (void)
{
rtems_bdbuf_lock (bdbuf_cache.sync_lock, RTEMS_BLKDEV_FATAL_BDBUF_SYNC_LOCK);
10e954: ba 0b 00 00 42 mov $0x4200000b,%edx <== NOT EXECUTED
10e959: a1 ec 20 13 00 mov 0x1320ec,%eax <== NOT EXECUTED
10e95e: e8 40 fa ff ff call 10e3a3 <rtems_bdbuf_lock> <== NOT EXECUTED
* Unlock the cache's sync lock. Any blocked writers are woken.
*/
static void
rtems_bdbuf_unlock_sync (void)
{
rtems_bdbuf_unlock (bdbuf_cache.sync_lock,
10e963: ba 0c 00 00 42 mov $0x4200000c,%edx <== NOT EXECUTED
10e968: a1 ec 20 13 00 mov 0x1320ec,%eax <== NOT EXECUTED
10e96d: e8 7a fa ff ff call 10e3ec <rtems_bdbuf_unlock> <== NOT EXECUTED
* Wait for the sync lock.
*/
rtems_bdbuf_lock_sync ();
rtems_bdbuf_unlock_sync ();
rtems_bdbuf_lock_cache ();
10e972: e8 54 fa ff ff call 10e3cb <rtems_bdbuf_lock_cache><== NOT EXECUTED
* difficult question. Is a snapshot of a block that is changing better than
* nothing being written? We have tended to think we should hold changes for
* only a specific period of time even if still changing and get onto disk
* and letting the file system try and recover this position if it can.
*/
if (bd->state == RTEMS_BDBUF_STATE_ACCESS_CACHED
10e977: 8b 43 20 mov 0x20(%ebx),%eax
10e97a: 83 f8 05 cmp $0x5,%eax
10e97d: 74 05 je 10e984 <rtems_bdbuf_add_to_modified_list_after_access+0x50>
10e97f: 83 f8 03 cmp $0x3,%eax
10e982: 75 08 jne 10e98c <rtems_bdbuf_add_to_modified_list_after_access+0x58>
|| bd->state == RTEMS_BDBUF_STATE_ACCESS_EMPTY)
bd->hold_timer = bdbuf_config.swap_block_hold;
10e984: a1 5c 14 12 00 mov 0x12145c,%eax
10e989: 89 43 2c mov %eax,0x2c(%ebx)
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
10e98c: c7 43 20 07 00 00 00 movl $0x7,0x20(%ebx)
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
10e993: a1 14 21 13 00 mov 0x132114,%eax
the_node->next = tail;
10e998: c7 03 10 21 13 00 movl $0x132110,(%ebx)
tail->previous = the_node;
10e99e: 89 1d 14 21 13 00 mov %ebx,0x132114
old_last->next = the_node;
10e9a4: 89 18 mov %ebx,(%eax)
the_node->previous = old_last;
10e9a6: 89 43 04 mov %eax,0x4(%ebx)
bd->hold_timer = bdbuf_config.swap_block_hold;
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_MODIFIED);
rtems_chain_append_unprotected (&bdbuf_cache.modified, &bd->link);
if (bd->waiters)
10e9a9: 83 7b 24 00 cmpl $0x0,0x24(%ebx)
10e9ad: 74 0d je 10e9bc <rtems_bdbuf_add_to_modified_list_after_access+0x88>
rtems_bdbuf_wake (&bdbuf_cache.access_waiters);
10e9af: b8 24 21 13 00 mov $0x132124,%eax
else if (rtems_bdbuf_has_buffer_waiters ())
rtems_bdbuf_wake_swapper ();
}
10e9b4: 59 pop %ecx
10e9b5: 5b pop %ebx
10e9b6: 5d pop %ebp
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_MODIFIED);
rtems_chain_append_unprotected (&bdbuf_cache.modified, &bd->link);
if (bd->waiters)
rtems_bdbuf_wake (&bdbuf_cache.access_waiters);
10e9b7: e9 49 fc ff ff jmp 10e605 <rtems_bdbuf_wake>
else if (rtems_bdbuf_has_buffer_waiters ())
10e9bc: 83 3d 34 21 13 00 00 cmpl $0x0,0x132134
10e9c3: 74 08 je 10e9cd <rtems_bdbuf_add_to_modified_list_after_access+0x99>
rtems_bdbuf_wake_swapper ();
}
10e9c5: 5a pop %edx
10e9c6: 5b pop %ebx
10e9c7: 5d pop %ebp
rtems_chain_append_unprotected (&bdbuf_cache.modified, &bd->link);
if (bd->waiters)
rtems_bdbuf_wake (&bdbuf_cache.access_waiters);
else if (rtems_bdbuf_has_buffer_waiters ())
rtems_bdbuf_wake_swapper ();
10e9c8: e9 53 fa ff ff jmp 10e420 <rtems_bdbuf_wake_swapper>
}
10e9cd: 58 pop %eax
10e9ce: 5b pop %ebx
10e9cf: 5d pop %ebp
10e9d0: c3 ret
0010e50d <rtems_bdbuf_anonymous_wait>:
* The function assumes the cache is locked on entry and it will be locked on
* exit.
*/
static void
rtems_bdbuf_anonymous_wait (rtems_bdbuf_waiters *waiters)
{
10e50d: 55 push %ebp
10e50e: 89 e5 mov %esp,%ebp
10e510: 56 push %esi
10e511: 53 push %ebx
10e512: 89 c3 mov %eax,%ebx
rtems_mode prev_mode;
/*
* Indicate we are waiting.
*/
++waiters->count;
10e514: ff 00 incl (%eax)
* blocking or just hits that window, and before this task has blocked on the
* semaphore. If the preempting task flushes the queue this task will not see
* the flush and may block for ever or until another transaction flushes this
* semaphore.
*/
prev_mode = rtems_bdbuf_disable_preemption ();
10e516: e8 89 ff ff ff call 10e4a4 <rtems_bdbuf_disable_preemption>
10e51b: 89 c6 mov %eax,%esi
/*
* Unlock the cache, wait, and lock the cache when we return.
*/
rtems_bdbuf_unlock_cache ();
10e51d: e8 ee fe ff ff call 10e410 <rtems_bdbuf_unlock_cache>
sc = rtems_semaphore_obtain (waiters->sema, RTEMS_WAIT, RTEMS_BDBUF_WAIT_TIMEOUT);
10e522: 50 push %eax
10e523: 6a 00 push $0x0
10e525: 6a 00 push $0x0
10e527: ff 73 04 pushl 0x4(%ebx)
10e52a: e8 05 c8 ff ff call 10ad34 <rtems_semaphore_obtain>
if (sc == RTEMS_TIMEOUT)
10e52f: 83 c4 10 add $0x10,%esp
10e532: 83 f8 06 cmp $0x6,%eax
10e535: 75 0a jne 10e541 <rtems_bdbuf_anonymous_wait+0x34><== ALWAYS TAKEN
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_CACHE_WAIT_TO);
10e537: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10e53a: 68 12 00 00 42 push $0x42000012 <== NOT EXECUTED
10e53f: eb 0d jmp 10e54e <rtems_bdbuf_anonymous_wait+0x41><== NOT EXECUTED
if (sc != RTEMS_UNSATISFIED)
10e541: 83 f8 0d cmp $0xd,%eax
10e544: 74 0d je 10e553 <rtems_bdbuf_anonymous_wait+0x46><== ALWAYS TAKEN
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_CACHE_WAIT_2);
10e546: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10e549: 68 10 00 00 42 push $0x42000010 <== NOT EXECUTED
10e54e: e8 bd cd ff ff call 10b310 <rtems_fatal_error_occurred><== NOT EXECUTED
rtems_bdbuf_lock_cache ();
10e553: e8 73 fe ff ff call 10e3cb <rtems_bdbuf_lock_cache>
rtems_bdbuf_restore_preemption (prev_mode);
10e558: 89 f0 mov %esi,%eax
10e55a: e8 7e ff ff ff call 10e4dd <rtems_bdbuf_restore_preemption>
--waiters->count;
10e55f: ff 0b decl (%ebx)
}
10e561: 8d 65 f8 lea -0x8(%ebp),%esp
10e564: 5b pop %ebx
10e565: 5e pop %esi
10e566: 5d pop %ebp
10e567: c3 ret
0010e62e <rtems_bdbuf_create_task.constprop.14>:
return NULL;
}
static rtems_status_code
rtems_bdbuf_create_task(
10e62e: 55 push %ebp
10e62f: 89 e5 mov %esp,%ebp
10e631: 56 push %esi
10e632: 53 push %ebx
10e633: 89 ce mov %ecx,%esi
10e635: 8b 5d 0c mov 0xc(%ebp),%ebx
rtems_task_argument arg,
rtems_id *id
)
{
rtems_status_code sc;
size_t stack_size = bdbuf_config.task_stack_size ?
10e638: 8b 0d 68 14 12 00 mov 0x121468,%ecx
bdbuf_config.task_stack_size : RTEMS_BDBUF_TASK_STACK_SIZE_DEFAULT;
10e63e: 85 c9 test %ecx,%ecx
10e640: 75 04 jne 10e646 <rtems_bdbuf_create_task.constprop.14+0x18><== ALWAYS TAKEN
10e642: 66 b9 00 10 mov $0x1000,%cx <== NOT EXECUTED
priority = priority != 0 ? priority : default_priority;
10e646: 85 d2 test %edx,%edx
10e648: 75 02 jne 10e64c <rtems_bdbuf_create_task.constprop.14+0x1e><== ALWAYS TAKEN
10e64a: b2 0f mov $0xf,%dl <== NOT EXECUTED
sc = rtems_task_create (name,
10e64c: 83 ec 08 sub $0x8,%esp
10e64f: 53 push %ebx
10e650: 6a 00 push $0x0
10e652: 68 00 04 00 00 push $0x400
10e657: 51 push %ecx
10e658: 52 push %edx
10e659: 50 push %eax
10e65a: e8 55 c8 ff ff call 10aeb4 <rtems_task_create>
stack_size,
RTEMS_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR,
RTEMS_LOCAL | RTEMS_NO_FLOATING_POINT,
id);
if (sc == RTEMS_SUCCESSFUL)
10e65f: 83 c4 20 add $0x20,%esp
10e662: 85 c0 test %eax,%eax
10e664: 75 0f jne 10e675 <rtems_bdbuf_create_task.constprop.14+0x47><== NEVER TAKEN
sc = rtems_task_start (*id, entry, arg);
10e666: 50 push %eax
10e667: ff 75 08 pushl 0x8(%ebp)
10e66a: 56 push %esi
10e66b: ff 33 pushl (%ebx)
10e66d: e8 76 ca ff ff call 10b0e8 <rtems_task_start>
10e672: 83 c4 10 add $0x10,%esp
return sc;
}
10e675: 8d 65 f8 lea -0x8(%ebp),%esp
10e678: 5b pop %ebx
10e679: 5e pop %esi
10e67a: 5d pop %ebp
10e67b: c3 ret
0010e4a4 <rtems_bdbuf_disable_preemption>:
--bd->group->users;
}
static rtems_mode
rtems_bdbuf_disable_preemption (void)
{
10e4a4: 55 push %ebp
10e4a5: 89 e5 mov %esp,%ebp
10e4a7: 83 ec 1c sub $0x1c,%esp
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_mode prev_mode = 0;
10e4aa: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
sc = rtems_task_mode (RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &prev_mode);
10e4b1: 8d 45 f4 lea -0xc(%ebp),%eax
10e4b4: 50 push %eax
10e4b5: 68 00 01 00 00 push $0x100
10e4ba: 68 00 01 00 00 push $0x100
10e4bf: e8 28 3a 00 00 call 111eec <rtems_task_mode>
if (sc != RTEMS_SUCCESSFUL)
10e4c4: 83 c4 10 add $0x10,%esp
10e4c7: 85 c0 test %eax,%eax
10e4c9: 74 0d je 10e4d8 <rtems_bdbuf_disable_preemption+0x34><== ALWAYS TAKEN
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_PREEMPT_DIS);
10e4cb: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10e4ce: 68 0f 00 00 42 push $0x4200000f <== NOT EXECUTED
10e4d3: e8 38 ce ff ff call 10b310 <rtems_fatal_error_occurred><== NOT EXECUTED
return prev_mode;
}
10e4d8: 8b 45 f4 mov -0xc(%ebp),%eax
10e4db: c9 leave
10e4dc: c3 ret
0010f4ab <rtems_bdbuf_execute_read_request>:
static rtems_status_code
rtems_bdbuf_execute_read_request (rtems_disk_device *dd,
rtems_bdbuf_buffer *bd,
uint32_t transfer_count)
{
10f4ab: 55 push %ebp
10f4ac: 89 e5 mov %esp,%ebp
10f4ae: 57 push %edi
10f4af: 56 push %esi
10f4b0: 53 push %ebx
10f4b1: 83 ec 2c sub $0x2c,%esp
10f4b4: 89 45 e4 mov %eax,-0x1c(%ebp)
10f4b7: 89 d6 mov %edx,%esi
10f4b9: 89 4d dc mov %ecx,-0x24(%ebp)
rtems_blkdev_request *req = NULL;
rtems_blkdev_bnum media_block = bd->block;
10f4bc: 8b 7a 18 mov 0x18(%edx),%edi
uint32_t media_blocks_per_block = dd->media_blocks_per_block;
10f4bf: 8b 40 2c mov 0x2c(%eax),%eax
10f4c2: 89 45 d8 mov %eax,-0x28(%ebp)
uint32_t block_size = dd->block_size;
10f4c5: 8b 45 e4 mov -0x1c(%ebp),%eax
10f4c8: 8b 40 24 mov 0x24(%eax),%eax
10f4cb: 89 45 e0 mov %eax,-0x20(%ebp)
/*
* TODO: This type of request structure is wrong and should be removed.
*/
#define bdbuf_alloc(size) __builtin_alloca (size)
req = bdbuf_alloc (sizeof (rtems_blkdev_request) +
10f4ce: 89 c8 mov %ecx,%eax
10f4d0: c1 e0 04 shl $0x4,%eax
10f4d3: 83 c0 30 add $0x30,%eax
10f4d6: 29 c4 sub %eax,%esp
10f4d8: 8d 5c 24 0f lea 0xf(%esp),%ebx
10f4dc: 83 e3 f0 and $0xfffffff0,%ebx
sizeof (rtems_blkdev_sg_buffer) * transfer_count);
req->req = RTEMS_BLKDEV_REQ_READ;
10f4df: c7 03 00 00 00 00 movl $0x0,(%ebx)
req->req_done = rtems_bdbuf_transfer_done;
10f4e5: c7 43 04 49 e4 10 00 movl $0x10e449,0x4(%ebx)
req->done_arg = req;
10f4ec: 89 5b 08 mov %ebx,0x8(%ebx)
req->io_task = rtems_task_self ();
10f4ef: e8 18 2b 00 00 call 11200c <rtems_task_self>
10f4f4: 89 43 14 mov %eax,0x14(%ebx)
req->status = RTEMS_RESOURCE_IN_USE;
10f4f7: c7 43 0c 0c 00 00 00 movl $0xc,0xc(%ebx)
req->bufnum = 0;
10f4fe: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx)
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
10f505: c7 46 20 09 00 00 00 movl $0x9,0x20(%esi)
req->status = RTEMS_RESOURCE_IN_USE;
req->bufnum = 0;
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_TRANSFER);
req->bufs [0].user = bd;
10f50c: 89 73 24 mov %esi,0x24(%ebx)
req->bufs [0].block = media_block;
10f50f: 89 7b 18 mov %edi,0x18(%ebx)
req->bufs [0].length = block_size;
10f512: 8b 55 e0 mov -0x20(%ebp),%edx
10f515: 89 53 1c mov %edx,0x1c(%ebx)
req->bufs [0].buffer = bd->buffer;
10f518: 8b 46 1c mov 0x1c(%esi),%eax
10f51b: 89 43 20 mov %eax,0x20(%ebx)
10f51e: 89 de mov %ebx,%esi
{
rtems_blkdev_request *req = NULL;
rtems_blkdev_bnum media_block = bd->block;
uint32_t media_blocks_per_block = dd->media_blocks_per_block;
uint32_t block_size = dd->block_size;
uint32_t transfer_index = 1;
10f520: b9 01 00 00 00 mov $0x1,%ecx
req->bufs [0].buffer = bd->buffer;
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_users ("read", bd);
while (transfer_index < transfer_count)
10f525: eb 48 jmp 10f56f <rtems_bdbuf_execute_read_request+0xc4>
{
media_block += media_blocks_per_block;
10f527: 03 7d d8 add -0x28(%ebp),%edi
bd = rtems_bdbuf_get_buffer_for_read_ahead (dd, media_block);
10f52a: 89 fa mov %edi,%edx
10f52c: 8b 45 e4 mov -0x1c(%ebp),%eax
10f52f: 89 4d d4 mov %ecx,-0x2c(%ebp)
10f532: e8 cf f7 ff ff call 10ed06 <rtems_bdbuf_get_buffer_for_read_ahead>
10f537: 83 c6 10 add $0x10,%esi
if (bd == NULL)
10f53a: 85 c0 test %eax,%eax
10f53c: 8b 4d d4 mov -0x2c(%ebp),%ecx
10f53f: 75 14 jne 10f555 <rtems_bdbuf_execute_read_request+0xaa><== ALWAYS TAKEN
rtems_bdbuf_show_users ("read", bd);
++transfer_index;
}
req->bufnum = transfer_index;
10f541: 89 4b 10 mov %ecx,0x10(%ebx)
return rtems_bdbuf_execute_transfer_request (dd, req, true);
10f544: b9 01 00 00 00 mov $0x1,%ecx
10f549: 89 da mov %ebx,%edx
10f54b: 8b 45 e4 mov -0x1c(%ebp),%eax
10f54e: e8 0d fa ff ff call 10ef60 <rtems_bdbuf_execute_transfer_request>
10f553: eb 21 jmp 10f576 <rtems_bdbuf_execute_read_request+0xcb>
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
10f555: c7 40 20 09 00 00 00 movl $0x9,0x20(%eax)
if (bd == NULL)
break;
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_TRANSFER);
req->bufs [transfer_index].user = bd;
10f55c: 89 46 24 mov %eax,0x24(%esi)
req->bufs [transfer_index].block = media_block;
10f55f: 89 7e 18 mov %edi,0x18(%esi)
req->bufs [transfer_index].length = block_size;
10f562: 8b 55 e0 mov -0x20(%ebp),%edx
10f565: 89 56 1c mov %edx,0x1c(%esi)
req->bufs [transfer_index].buffer = bd->buffer;
10f568: 8b 40 1c mov 0x1c(%eax),%eax
10f56b: 89 46 20 mov %eax,0x20(%esi)
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_users ("read", bd);
++transfer_index;
10f56e: 41 inc %ecx
req->bufs [0].buffer = bd->buffer;
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_users ("read", bd);
while (transfer_index < transfer_count)
10f56f: 3b 4d dc cmp -0x24(%ebp),%ecx
10f572: 72 b3 jb 10f527 <rtems_bdbuf_execute_read_request+0x7c>
10f574: eb cb jmp 10f541 <rtems_bdbuf_execute_read_request+0x96>
}
req->bufnum = transfer_index;
return rtems_bdbuf_execute_transfer_request (dd, req, true);
}
10f576: 8d 65 f4 lea -0xc(%ebp),%esp
10f579: 5b pop %ebx
10f57a: 5e pop %esi
10f57b: 5f pop %edi
10f57c: 5d pop %ebp
10f57d: c3 ret
0010fb09 <rtems_bdbuf_get>:
rtems_status_code
rtems_bdbuf_get (rtems_disk_device *dd,
rtems_blkdev_bnum block,
rtems_bdbuf_buffer **bd_ptr)
{
10fb09: 55 push %ebp
10fb0a: 89 e5 mov %esp,%ebp
10fb0c: 56 push %esi
10fb0d: 53 push %ebx
10fb0e: 83 ec 10 sub $0x10,%esp
10fb11: 8b 75 08 mov 0x8(%ebp),%esi
10fb14: 8b 5d 0c mov 0xc(%ebp),%ebx
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_bdbuf_buffer *bd = NULL;
rtems_blkdev_bnum media_block;
rtems_bdbuf_lock_cache ();
10fb17: e8 af e8 ff ff call 10e3cb <rtems_bdbuf_lock_cache>
rtems_blkdev_bnum block,
rtems_blkdev_bnum *media_block_ptr)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (block < dd->block_count)
10fb1c: 3b 5e 28 cmp 0x28(%esi),%ebx
10fb1f: 73 6a jae 10fb8b <rtems_bdbuf_get+0x82> <== NEVER TAKEN
}
static rtems_blkdev_bnum
rtems_bdbuf_media_block (const rtems_disk_device *dd, rtems_blkdev_bnum block)
{
if (dd->block_to_media_block_shift >= 0)
10fb21: 8b 4e 30 mov 0x30(%esi),%ecx
return block << dd->block_to_media_block_shift;
10fb24: 89 d8 mov %ebx,%eax
}
static rtems_blkdev_bnum
rtems_bdbuf_media_block (const rtems_disk_device *dd, rtems_blkdev_bnum block)
{
if (dd->block_to_media_block_shift >= 0)
10fb26: 85 c9 test %ecx,%ecx
10fb28: 78 04 js 10fb2e <rtems_bdbuf_get+0x25> <== NEVER TAKEN
return block << dd->block_to_media_block_shift;
10fb2a: d3 e0 shl %cl,%eax
10fb2c: eb 14 jmp 10fb42 <rtems_bdbuf_get+0x39>
/*
* Change the block number for the block size to the block number for the media
* block size. We have to use 64bit maths. There is no short cut here.
*/
return (rtems_blkdev_bnum)
((((uint64_t) block) * dd->block_size) / dd->media_block_size);
10fb2e: f7 66 24 mull 0x24(%esi) <== NOT EXECUTED
10fb31: 8b 4e 20 mov 0x20(%esi),%ecx <== NOT EXECUTED
10fb34: 31 db xor %ebx,%ebx <== NOT EXECUTED
10fb36: 53 push %ebx <== NOT EXECUTED
10fb37: 51 push %ecx <== NOT EXECUTED
10fb38: 52 push %edx <== NOT EXECUTED
10fb39: 50 push %eax <== NOT EXECUTED
10fb3a: e8 69 0d 01 00 call 1208a8 <__udivdi3> <== NOT EXECUTED
10fb3f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
/*
* Compute the media block number. Drivers work with media block number not
* the block number a BD may have as this depends on the block size set by
* the user.
*/
*media_block_ptr = rtems_bdbuf_media_block (dd, block) + dd->start;
10fb42: 8b 56 18 mov 0x18(%esi),%edx
10fb45: 01 c2 add %eax,%edx
*/
if (rtems_bdbuf_tracer)
printf ("bdbuf:get: %" PRIu32 " (%" PRIu32 ") (dev = %08x)\n",
media_block, block, (unsigned) dd->dev);
bd = rtems_bdbuf_get_buffer_for_access (dd, media_block);
10fb47: 89 f0 mov %esi,%eax
10fb49: e8 ee f1 ff ff call 10ed3c <rtems_bdbuf_get_buffer_for_access>
10fb4e: 89 c3 mov %eax,%ebx
switch (bd->state)
10fb50: 8b 40 20 mov 0x20(%eax),%eax
10fb53: 83 f8 02 cmp $0x2,%eax
10fb56: 74 0c je 10fb64 <rtems_bdbuf_get+0x5b>
10fb58: 83 f8 07 cmp $0x7,%eax
10fb5b: 74 1b je 10fb78 <rtems_bdbuf_get+0x6f>
10fb5d: 83 f8 01 cmp $0x1,%eax
10fb60: 75 1f jne 10fb81 <rtems_bdbuf_get+0x78> <== NEVER TAKEN
10fb62: eb 09 jmp 10fb6d <rtems_bdbuf_get+0x64>
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
10fb64: c7 43 20 03 00 00 00 movl $0x3,0x20(%ebx)
10fb6b: eb 07 jmp 10fb74 <rtems_bdbuf_get+0x6b>
10fb6d: c7 43 20 05 00 00 00 movl $0x5,0x20(%ebx)
10fb74: 31 f6 xor %esi,%esi
10fb76: eb 1a jmp 10fb92 <rtems_bdbuf_get+0x89>
10fb78: c7 43 20 04 00 00 00 movl $0x4,0x20(%ebx)
10fb7f: eb f3 jmp 10fb74 <rtems_bdbuf_get+0x6b>
* record of this so just gets the block to fill.
*/
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_ACCESS_MODIFIED);
break;
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_2);
10fb81: ba 1e 00 00 42 mov $0x4200001e,%edx <== NOT EXECUTED
10fb86: e8 50 e8 ff ff call 10e3db <rtems_bdbuf_fatal> <== NOT EXECUTED
*/
*media_block_ptr = rtems_bdbuf_media_block (dd, block) + dd->start;
}
else
{
sc = RTEMS_INVALID_ID;
10fb8b: be 04 00 00 00 mov $0x4,%esi <== NOT EXECUTED
rtems_bdbuf_get (rtems_disk_device *dd,
rtems_blkdev_bnum block,
rtems_bdbuf_buffer **bd_ptr)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_bdbuf_buffer *bd = NULL;
10fb90: 31 db xor %ebx,%ebx <== NOT EXECUTED
rtems_bdbuf_show_users ("get", bd);
rtems_bdbuf_show_usage ();
}
}
rtems_bdbuf_unlock_cache ();
10fb92: e8 79 e8 ff ff call 10e410 <rtems_bdbuf_unlock_cache>
*bd_ptr = bd;
10fb97: 8b 45 10 mov 0x10(%ebp),%eax
10fb9a: 89 18 mov %ebx,(%eax)
return sc;
}
10fb9c: 89 f0 mov %esi,%eax
10fb9e: 8d 65 f8 lea -0x8(%ebp),%esp
10fba1: 5b pop %ebx
10fba2: 5e pop %esi
10fba3: 5d pop %ebp
10fba4: c3 ret
0010ed3c <rtems_bdbuf_get_buffer_for_access>:
static rtems_bdbuf_buffer *
rtems_bdbuf_get_buffer_for_access (rtems_disk_device *dd,
rtems_blkdev_bnum block)
{
10ed3c: 55 push %ebp
10ed3d: 89 e5 mov %esp,%ebp
10ed3f: 57 push %edi
10ed40: 56 push %esi
10ed41: 53 push %ebx
10ed42: 83 ec 0c sub $0xc,%esp
10ed45: 89 c6 mov %eax,%esi
10ed47: 89 d7 mov %edx,%edi
rtems_bdbuf_buffer *bd = NULL;
do
{
bd = rtems_bdbuf_avl_search (&bdbuf_cache.tree, dd, block);
10ed49: 89 f9 mov %edi,%ecx
10ed4b: 89 f2 mov %esi,%edx
10ed4d: a1 fc 20 13 00 mov 0x1320fc,%eax
10ed52: e8 82 f8 ff ff call 10e5d9 <rtems_bdbuf_avl_search.isra.1>
10ed57: 89 c3 mov %eax,%ebx
if (bd != NULL)
10ed59: 85 c0 test %eax,%eax
10ed5b: 74 7e je 10eddb <rtems_bdbuf_get_buffer_for_access+0x9f>
{
if (bd->group->bds_per_group != dd->bds_per_group)
10ed5d: 8b 40 28 mov 0x28(%eax),%eax
10ed60: 8b 56 34 mov 0x34(%esi),%edx
10ed63: 39 50 08 cmp %edx,0x8(%eax)
10ed66: 0f 84 91 00 00 00 je 10edfd <rtems_bdbuf_get_buffer_for_access+0xc1>
static bool
rtems_bdbuf_wait_for_recycle (rtems_bdbuf_buffer *bd)
{
while (true)
{
switch (bd->state)
10ed6c: 8b 43 20 mov 0x20(%ebx),%eax
10ed6f: 83 f8 0a cmp $0xa,%eax
10ed72: 77 60 ja 10edd4 <rtems_bdbuf_get_buffer_for_access+0x98><== NEVER TAKEN
10ed74: ff 24 85 1c 32 12 00 jmp *0x12321c(,%eax,4)
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
10ed7b: c7 43 20 08 00 00 00 movl $0x8,0x20(%ebx) <== NOT EXECUTED
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
10ed82: 8b 13 mov (%ebx),%edx <== NOT EXECUTED
previous = the_node->previous;
10ed84: 8b 43 04 mov 0x4(%ebx),%eax <== NOT EXECUTED
next->previous = previous;
10ed87: 89 42 04 mov %eax,0x4(%edx) <== NOT EXECUTED
previous->next = next;
10ed8a: 89 10 mov %edx,(%eax) <== NOT EXECUTED
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
10ed8c: a1 20 21 13 00 mov 0x132120,%eax <== NOT EXECUTED
the_node->next = tail;
10ed91: c7 03 1c 21 13 00 movl $0x13211c,(%ebx) <== NOT EXECUTED
tail->previous = the_node;
10ed97: 89 1d 20 21 13 00 mov %ebx,0x132120 <== NOT EXECUTED
old_last->next = the_node;
10ed9d: 89 18 mov %ebx,(%eax) <== NOT EXECUTED
the_node->previous = old_last;
10ed9f: 89 43 04 mov %eax,0x4(%ebx) <== NOT EXECUTED
rtems_bdbuf_request_sync_for_modified_buffer (rtems_bdbuf_buffer *bd)
{
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_SYNC);
rtems_chain_extract_unprotected (&bd->link);
rtems_chain_append_unprotected (&bdbuf_cache.sync, &bd->link);
rtems_bdbuf_wake_swapper ();
10eda2: e8 79 f6 ff ff call 10e420 <rtems_bdbuf_wake_swapper><== NOT EXECUTED
10eda7: eb c3 jmp 10ed6c <rtems_bdbuf_get_buffer_for_access+0x30><== NOT EXECUTED
case RTEMS_BDBUF_STATE_MODIFIED:
rtems_bdbuf_request_sync_for_modified_buffer (bd);
break;
case RTEMS_BDBUF_STATE_CACHED:
case RTEMS_BDBUF_STATE_EMPTY:
if (bd->waiters == 0)
10eda9: 83 7b 24 00 cmpl $0x0,0x24(%ebx)
10edad: 0f 84 8d 00 00 00 je 10ee40 <rtems_bdbuf_get_buffer_for_access+0x104><== NEVER TAKEN
* It is essential that we wait here without a special wait count and
* without the group in use. Otherwise we could trigger a wait ping
* pong with another recycle waiter. The state of the buffer is
* arbitrary afterwards.
*/
rtems_bdbuf_anonymous_wait (&bdbuf_cache.buffer_waiters);
10edb3: b8 34 21 13 00 mov $0x132134,%eax
10edb8: e8 50 f7 ff ff call 10e50d <rtems_bdbuf_anonymous_wait>
10edbd: eb 8a jmp 10ed49 <rtems_bdbuf_get_buffer_for_access+0xd>
}
case RTEMS_BDBUF_STATE_ACCESS_CACHED:
case RTEMS_BDBUF_STATE_ACCESS_EMPTY:
case RTEMS_BDBUF_STATE_ACCESS_MODIFIED:
case RTEMS_BDBUF_STATE_ACCESS_PURGED:
rtems_bdbuf_wait (bd, &bdbuf_cache.access_waiters);
10edbf: ba 24 21 13 00 mov $0x132124,%edx
10edc4: eb 05 jmp 10edcb <rtems_bdbuf_get_buffer_for_access+0x8f>
break;
case RTEMS_BDBUF_STATE_SYNC:
case RTEMS_BDBUF_STATE_TRANSFER:
case RTEMS_BDBUF_STATE_TRANSFER_PURGED:
rtems_bdbuf_wait (bd, &bdbuf_cache.transfer_waiters);
10edc6: ba 2c 21 13 00 mov $0x13212c,%edx <== NOT EXECUTED
10edcb: 89 d8 mov %ebx,%eax
10edcd: e8 96 f7 ff ff call 10e568 <rtems_bdbuf_wait>
10edd2: eb 98 jmp 10ed6c <rtems_bdbuf_get_buffer_for_access+0x30>
break;
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_8);
10edd4: ba 06 00 00 42 mov $0x42000006,%edx <== NOT EXECUTED
10edd9: eb 60 jmp 10ee3b <rtems_bdbuf_get_buffer_for_access+0xff><== NOT EXECUTED
bd = NULL;
}
}
else
{
bd = rtems_bdbuf_get_buffer_from_lru_list (dd, block);
10eddb: 89 fa mov %edi,%edx
10eddd: 89 f0 mov %esi,%eax
10eddf: e8 21 fc ff ff call 10ea05 <rtems_bdbuf_get_buffer_from_lru_list>
10ede4: 89 c3 mov %eax,%ebx
if (bd == NULL)
10ede6: 85 c0 test %eax,%eax
10ede8: 75 13 jne 10edfd <rtems_bdbuf_get_buffer_for_access+0xc1>
}
static void
rtems_bdbuf_wait_for_buffer (void)
{
if (!rtems_chain_is_empty (&bdbuf_cache.modified))
10edea: 81 3d 0c 21 13 00 10 cmpl $0x132110,0x13210c
10edf1: 21 13 00
10edf4: 74 bd je 10edb3 <rtems_bdbuf_get_buffer_for_access+0x77>
rtems_bdbuf_wake_swapper ();
10edf6: e8 25 f6 ff ff call 10e420 <rtems_bdbuf_wake_swapper>
10edfb: eb b6 jmp 10edb3 <rtems_bdbuf_get_buffer_for_access+0x77>
static void
rtems_bdbuf_wait_for_access (rtems_bdbuf_buffer *bd)
{
while (true)
{
switch (bd->state)
10edfd: 8b 43 20 mov 0x20(%ebx),%eax
10ee00: 8d 50 ff lea -0x1(%eax),%edx
10ee03: 83 fa 09 cmp $0x9,%edx
10ee06: 77 2e ja 10ee36 <rtems_bdbuf_get_buffer_for_access+0xfa><== NEVER TAKEN
10ee08: ff 24 95 48 32 12 00 jmp *0x123248(,%edx,4)
void rtems_bdbuf_reset_device_stats (rtems_disk_device *dd)
{
rtems_bdbuf_lock_cache ();
memset (&dd->stats, 0, sizeof(dd->stats));
rtems_bdbuf_unlock_cache ();
}
10ee0f: 8b 43 28 mov 0x28(%ebx),%eax
}
static void
rtems_bdbuf_group_release (rtems_bdbuf_buffer *bd)
{
--bd->group->users;
10ee12: ff 48 0c decl 0xc(%eax)
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
10ee15: 8b 13 mov (%ebx),%edx
previous = the_node->previous;
10ee17: 8b 43 04 mov 0x4(%ebx),%eax
next->previous = previous;
10ee1a: 89 42 04 mov %eax,0x4(%edx)
previous->next = next;
10ee1d: 89 10 mov %edx,(%eax)
10ee1f: eb 3c jmp 10ee5d <rtems_bdbuf_get_buffer_for_access+0x121>
return;
case RTEMS_BDBUF_STATE_ACCESS_CACHED:
case RTEMS_BDBUF_STATE_ACCESS_EMPTY:
case RTEMS_BDBUF_STATE_ACCESS_MODIFIED:
case RTEMS_BDBUF_STATE_ACCESS_PURGED:
rtems_bdbuf_wait (bd, &bdbuf_cache.access_waiters);
10ee21: ba 24 21 13 00 mov $0x132124,%edx
10ee26: eb 05 jmp 10ee2d <rtems_bdbuf_get_buffer_for_access+0xf1>
break;
case RTEMS_BDBUF_STATE_SYNC:
case RTEMS_BDBUF_STATE_TRANSFER:
case RTEMS_BDBUF_STATE_TRANSFER_PURGED:
rtems_bdbuf_wait (bd, &bdbuf_cache.transfer_waiters);
10ee28: ba 2c 21 13 00 mov $0x13212c,%edx
10ee2d: 89 d8 mov %ebx,%eax
10ee2f: e8 34 f7 ff ff call 10e568 <rtems_bdbuf_wait>
10ee34: eb c7 jmp 10edfd <rtems_bdbuf_get_buffer_for_access+0xc1>
break;
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_7);
10ee36: ba 05 00 00 42 mov $0x42000005,%edx <== NOT EXECUTED
10ee3b: e8 9b f5 ff ff call 10e3db <rtems_bdbuf_fatal> <== NOT EXECUTED
{
if (bd->group->bds_per_group != dd->bds_per_group)
{
if (rtems_bdbuf_wait_for_recycle (bd))
{
rtems_bdbuf_remove_from_tree_and_lru_list (bd);
10ee40: 89 d8 mov %ebx,%eax <== NOT EXECUTED
10ee42: e8 8a fb ff ff call 10e9d1 <rtems_bdbuf_remove_from_tree_and_lru_list><== NOT EXECUTED
rtems_bdbuf_make_free_and_add_to_lru_list (bd);
10ee47: 89 d8 mov %ebx,%eax <== NOT EXECUTED
10ee49: e8 c3 fa ff ff call 10e911 <rtems_bdbuf_make_free_and_add_to_lru_list><== NOT EXECUTED
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
10ee4e: b8 34 21 13 00 mov $0x132134,%eax <== NOT EXECUTED
10ee53: e8 ad f7 ff ff call 10e605 <rtems_bdbuf_wake> <== NOT EXECUTED
10ee58: e9 ec fe ff ff jmp 10ed49 <rtems_bdbuf_get_buffer_for_access+0xd><== NOT EXECUTED
void rtems_bdbuf_reset_device_stats (rtems_disk_device *dd)
{
rtems_bdbuf_lock_cache ();
memset (&dd->stats, 0, sizeof(dd->stats));
rtems_bdbuf_unlock_cache ();
}
10ee5d: 8b 43 28 mov 0x28(%ebx),%eax
}
static void
rtems_bdbuf_group_obtain (rtems_bdbuf_buffer *bd)
{
++bd->group->users;
10ee60: ff 40 0c incl 0xc(%eax)
rtems_bdbuf_wait_for_access (bd);
rtems_bdbuf_group_obtain (bd);
return bd;
}
10ee63: 89 d8 mov %ebx,%eax
10ee65: 83 c4 0c add $0xc,%esp
10ee68: 5b pop %ebx
10ee69: 5e pop %esi
10ee6a: 5f pop %edi
10ee6b: 5d pop %ebp
10ee6c: c3 ret
0010ed06 <rtems_bdbuf_get_buffer_for_read_ahead>:
}
static rtems_bdbuf_buffer *
rtems_bdbuf_get_buffer_for_read_ahead (rtems_disk_device *dd,
rtems_blkdev_bnum block)
{
10ed06: 55 push %ebp
10ed07: 89 e5 mov %esp,%ebp
10ed09: 56 push %esi
10ed0a: 53 push %ebx
10ed0b: 89 c3 mov %eax,%ebx
10ed0d: 89 d6 mov %edx,%esi
rtems_bdbuf_buffer *bd = NULL;
bd = rtems_bdbuf_avl_search (&bdbuf_cache.tree, dd, block);
10ed0f: 89 d1 mov %edx,%ecx
10ed11: 89 c2 mov %eax,%edx
10ed13: a1 fc 20 13 00 mov 0x1320fc,%eax
10ed18: e8 bc f8 ff ff call 10e5d9 <rtems_bdbuf_avl_search.isra.1>
if (bd == NULL)
10ed1d: 85 c0 test %eax,%eax
10ed1f: 75 15 jne 10ed36 <rtems_bdbuf_get_buffer_for_read_ahead+0x30><== NEVER TAKEN
{
bd = rtems_bdbuf_get_buffer_from_lru_list (dd, block);
10ed21: 89 f2 mov %esi,%edx
10ed23: 89 d8 mov %ebx,%eax
10ed25: e8 db fc ff ff call 10ea05 <rtems_bdbuf_get_buffer_from_lru_list>
if (bd != NULL)
10ed2a: 85 c0 test %eax,%eax
10ed2c: 74 0a je 10ed38 <rtems_bdbuf_get_buffer_for_read_ahead+0x32><== NEVER TAKEN
void rtems_bdbuf_reset_device_stats (rtems_disk_device *dd)
{
rtems_bdbuf_lock_cache ();
memset (&dd->stats, 0, sizeof(dd->stats));
rtems_bdbuf_unlock_cache ();
}
10ed2e: 8b 50 28 mov 0x28(%eax),%edx
}
static void
rtems_bdbuf_group_obtain (rtems_bdbuf_buffer *bd)
{
++bd->group->users;
10ed31: ff 42 0c incl 0xc(%edx)
10ed34: eb 02 jmp 10ed38 <rtems_bdbuf_get_buffer_for_read_ahead+0x32>
else
/*
* The buffer is in the cache. So it is already available or in use, and
* thus no need for a read ahead.
*/
bd = NULL;
10ed36: 31 c0 xor %eax,%eax
return bd;
}
10ed38: 5b pop %ebx
10ed39: 5e pop %esi
10ed3a: 5d pop %ebp
10ed3b: c3 ret
0010ea05 <rtems_bdbuf_get_buffer_from_lru_list>:
}
static rtems_bdbuf_buffer *
rtems_bdbuf_get_buffer_from_lru_list (rtems_disk_device *dd,
rtems_blkdev_bnum block)
{
10ea05: 55 push %ebp
10ea06: 89 e5 mov %esp,%ebp
10ea08: 57 push %edi
10ea09: 56 push %esi
10ea0a: 53 push %ebx
10ea0b: 81 ec ac 00 00 00 sub $0xac,%esp
10ea11: 89 85 60 ff ff ff mov %eax,-0xa0(%ebp)
10ea17: 89 95 5c ff ff ff mov %edx,-0xa4(%ebp)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
10ea1d: 8b 35 00 21 13 00 mov 0x132100,%esi
rtems_chain_node *node = rtems_chain_first (&bdbuf_cache.lru);
while (!rtems_chain_is_tail (&bdbuf_cache.lru, node))
10ea23: e9 c8 02 00 00 jmp 10ecf0 <rtems_bdbuf_get_buffer_from_lru_list+0x2eb>
bd->group->bds_per_group, dd->bds_per_group);
/*
* If nobody waits for this BD, we may recycle it.
*/
if (bd->waiters == 0)
10ea28: 83 7e 24 00 cmpl $0x0,0x24(%esi)
10ea2c: 0f 85 bc 02 00 00 jne 10ecee <rtems_bdbuf_get_buffer_from_lru_list+0x2e9>
{
if (bd->group->bds_per_group == dd->bds_per_group)
10ea32: 8b 5e 28 mov 0x28(%esi),%ebx
10ea35: 8b 7b 08 mov 0x8(%ebx),%edi
10ea38: 8b 85 60 ff ff ff mov -0xa0(%ebp),%eax
10ea3e: 8b 48 34 mov 0x34(%eax),%ecx
10ea41: 39 cf cmp %ecx,%edi
10ea43: 75 0e jne 10ea53 <rtems_bdbuf_get_buffer_from_lru_list+0x4e>
{
rtems_bdbuf_remove_from_tree_and_lru_list (bd);
10ea45: 89 f0 mov %esi,%eax
10ea47: e8 85 ff ff ff call 10e9d1 <rtems_bdbuf_remove_from_tree_and_lru_list>
10ea4c: 89 f0 mov %esi,%eax
10ea4e: e9 ae 00 00 00 jmp 10eb01 <rtems_bdbuf_get_buffer_from_lru_list+0xfc>
empty_bd = bd;
}
else if (bd->group->users == 0)
10ea53: 83 7b 0c 00 cmpl $0x0,0xc(%ebx)
10ea57: 0f 85 91 02 00 00 jne 10ecee <rtems_bdbuf_get_buffer_from_lru_list+0x2e9>
group - bdbuf_cache.groups, group->bds_per_group,
new_bds_per_group);
bufs_per_bd = bdbuf_cache.max_bds_per_group / group->bds_per_group;
for (b = 0, bd = group->bdbuf;
10ea5d: 8b 53 10 mov 0x10(%ebx),%edx
10ea60: 89 95 64 ff ff ff mov %edx,-0x9c(%ebp)
if (rtems_bdbuf_tracer)
printf ("bdbuf:realloc: %tu: %zd -> %zd\n",
group - bdbuf_cache.groups, group->bds_per_group,
new_bds_per_group);
bufs_per_bd = bdbuf_cache.max_bds_per_group / group->bds_per_group;
10ea66: a1 e0 20 13 00 mov 0x1320e0,%eax
10ea6b: 31 d2 xor %edx,%edx
10ea6d: f7 f7 div %edi
for (b = 0, bd = group->bdbuf;
b < group->bds_per_group;
b++, bd += bufs_per_bd)
10ea6f: 6b c0 38 imul $0x38,%eax,%eax
10ea72: 89 85 58 ff ff ff mov %eax,-0xa8(%ebp)
group - bdbuf_cache.groups, group->bds_per_group,
new_bds_per_group);
bufs_per_bd = bdbuf_cache.max_bds_per_group / group->bds_per_group;
for (b = 0, bd = group->bdbuf;
10ea78: 31 ff xor %edi,%edi
10ea7a: eb 24 jmp 10eaa0 <rtems_bdbuf_get_buffer_from_lru_list+0x9b>
b < group->bds_per_group;
b++, bd += bufs_per_bd)
rtems_bdbuf_remove_from_tree_and_lru_list (bd);
10ea7c: 8b 85 64 ff ff ff mov -0x9c(%ebp),%eax
10ea82: 89 8d 54 ff ff ff mov %ecx,-0xac(%ebp)
10ea88: e8 44 ff ff ff call 10e9d1 <rtems_bdbuf_remove_from_tree_and_lru_list>
bufs_per_bd = bdbuf_cache.max_bds_per_group / group->bds_per_group;
for (b = 0, bd = group->bdbuf;
b < group->bds_per_group;
b++, bd += bufs_per_bd)
10ea8d: 47 inc %edi
10ea8e: 8b 95 58 ff ff ff mov -0xa8(%ebp),%edx
10ea94: 01 95 64 ff ff ff add %edx,-0x9c(%ebp)
10ea9a: 8b 8d 54 ff ff ff mov -0xac(%ebp),%ecx
group - bdbuf_cache.groups, group->bds_per_group,
new_bds_per_group);
bufs_per_bd = bdbuf_cache.max_bds_per_group / group->bds_per_group;
for (b = 0, bd = group->bdbuf;
10eaa0: 3b 7b 08 cmp 0x8(%ebx),%edi
10eaa3: 72 d7 jb 10ea7c <rtems_bdbuf_get_buffer_from_lru_list+0x77>
b < group->bds_per_group;
b++, bd += bufs_per_bd)
rtems_bdbuf_remove_from_tree_and_lru_list (bd);
group->bds_per_group = new_bds_per_group;
10eaa5: 89 4b 08 mov %ecx,0x8(%ebx)
bufs_per_bd = bdbuf_cache.max_bds_per_group / new_bds_per_group;
10eaa8: a1 e0 20 13 00 mov 0x1320e0,%eax
10eaad: 31 d2 xor %edx,%edx
10eaaf: f7 f1 div %ecx
for (b = 1, bd = group->bdbuf + bufs_per_bd;
10eab1: 6b d0 38 imul $0x38,%eax,%edx
10eab4: 8b 4b 10 mov 0x10(%ebx),%ecx
10eab7: 01 d1 add %edx,%ecx
10eab9: bf 01 00 00 00 mov $0x1,%edi
10eabe: eb 22 jmp 10eae2 <rtems_bdbuf_get_buffer_from_lru_list+0xdd>
b < group->bds_per_group;
b++, bd += bufs_per_bd)
rtems_bdbuf_make_free_and_add_to_lru_list (bd);
10eac0: 89 c8 mov %ecx,%eax
10eac2: 89 95 50 ff ff ff mov %edx,-0xb0(%ebp)
10eac8: 89 8d 54 ff ff ff mov %ecx,-0xac(%ebp)
10eace: e8 3e fe ff ff call 10e911 <rtems_bdbuf_make_free_and_add_to_lru_list>
group->bds_per_group = new_bds_per_group;
bufs_per_bd = bdbuf_cache.max_bds_per_group / new_bds_per_group;
for (b = 1, bd = group->bdbuf + bufs_per_bd;
b < group->bds_per_group;
b++, bd += bufs_per_bd)
10ead3: 47 inc %edi
10ead4: 8b 95 50 ff ff ff mov -0xb0(%ebp),%edx
10eada: 8b 8d 54 ff ff ff mov -0xac(%ebp),%ecx
10eae0: 01 d1 add %edx,%ecx
rtems_bdbuf_remove_from_tree_and_lru_list (bd);
group->bds_per_group = new_bds_per_group;
bufs_per_bd = bdbuf_cache.max_bds_per_group / new_bds_per_group;
for (b = 1, bd = group->bdbuf + bufs_per_bd;
10eae2: 3b 7b 08 cmp 0x8(%ebx),%edi
10eae5: 72 d9 jb 10eac0 <rtems_bdbuf_get_buffer_from_lru_list+0xbb>
b < group->bds_per_group;
b++, bd += bufs_per_bd)
rtems_bdbuf_make_free_and_add_to_lru_list (bd);
if (b > 1)
10eae7: 83 ff 01 cmp $0x1,%edi
10eaea: 76 0a jbe 10eaf6 <rtems_bdbuf_get_buffer_from_lru_list+0xf1>
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
10eaec: b8 34 21 13 00 mov $0x132134,%eax
10eaf1: e8 0f fb ff ff call 10e605 <rtems_bdbuf_wake>
return group->bdbuf;
10eaf6: 8b 43 10 mov 0x10(%ebx),%eax
}
else if (bd->group->users == 0)
empty_bd = rtems_bdbuf_group_realloc (bd->group, dd->bds_per_group);
}
if (empty_bd != NULL)
10eaf9: 85 c0 test %eax,%eax
10eafb: 0f 84 ed 01 00 00 je 10ecee <rtems_bdbuf_get_buffer_from_lru_list+0x2e9><== NEVER TAKEN
static void
rtems_bdbuf_setup_empty_buffer (rtems_bdbuf_buffer *bd,
rtems_disk_device *dd,
rtems_blkdev_bnum block)
{
bd->dd = dd ;
10eb01: 8b 8d 60 ff ff ff mov -0xa0(%ebp),%ecx
10eb07: 89 48 14 mov %ecx,0x14(%eax)
bd->block = block;
10eb0a: 8b 95 5c ff ff ff mov -0xa4(%ebp),%edx
10eb10: 89 50 18 mov %edx,0x18(%eax)
bd->avl.left = NULL;
10eb13: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax)
bd->avl.right = NULL;
10eb1a: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
bd->waiters = 0;
10eb21: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax)
rtems_bdbuf_buffer* node)
{
const rtems_disk_device *dd = node->dd;
rtems_blkdev_bnum block = node->block;
rtems_bdbuf_buffer* p = *root;
10eb28: 8b 15 fc 20 13 00 mov 0x1320fc,%edx
rtems_bdbuf_buffer* q;
rtems_bdbuf_buffer* p1;
rtems_bdbuf_buffer* p2;
rtems_bdbuf_buffer* buf_stack[RTEMS_BDBUF_AVL_MAX_HEIGHT];
rtems_bdbuf_buffer** buf_prev = buf_stack;
10eb2e: 8d 8d 68 ff ff ff lea -0x98(%ebp),%ecx
10eb34: 89 8d 58 ff ff ff mov %ecx,-0xa8(%ebp)
bool modified = false;
if (p == NULL)
10eb3a: 85 d2 test %edx,%edx
10eb3c: 75 57 jne 10eb95 <rtems_bdbuf_get_buffer_from_lru_list+0x190>
{
*root = node;
10eb3e: a3 fc 20 13 00 mov %eax,0x1320fc
node->avl.left = NULL;
10eb43: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax)
node->avl.right = NULL;
10eb4a: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
node->avl.bal = 0;
10eb51: c6 40 11 00 movb $0x0,0x11(%eax)
10eb55: e9 8b 01 00 00 jmp 10ece5 <rtems_bdbuf_get_buffer_from_lru_list+0x2e0>
while (p != NULL)
{
*buf_prev++ = p;
if (((uintptr_t) p->dd < (uintptr_t) dd)
|| ((p->dd == dd) && (p->block < block)))
10eb5a: 75 21 jne 10eb7d <rtems_bdbuf_get_buffer_from_lru_list+0x178><== NEVER TAKEN
10eb5c: 8b 9d 5c ff ff ff mov -0xa4(%ebp),%ebx
10eb62: 39 5a 18 cmp %ebx,0x18(%edx)
10eb65: 73 10 jae 10eb77 <rtems_bdbuf_get_buffer_from_lru_list+0x172>
{
p->avl.cache = 1;
10eb67: c6 42 10 01 movb $0x1,0x10(%edx)
q = p->avl.right;
10eb6b: 8b 4a 0c mov 0xc(%edx),%ecx
if (q == NULL)
10eb6e: 85 c9 test %ecx,%ecx
10eb70: 75 1b jne 10eb8d <rtems_bdbuf_get_buffer_from_lru_list+0x188>
{
q = node;
p->avl.right = q = node;
10eb72: 89 42 0c mov %eax,0xc(%edx)
10eb75: eb 38 jmp 10ebaf <rtems_bdbuf_get_buffer_from_lru_list+0x1aa>
break;
}
}
else if ((p->dd != dd) || (p->block != block))
10eb77: 0f 84 5b 01 00 00 je 10ecd8 <rtems_bdbuf_get_buffer_from_lru_list+0x2d3><== NEVER TAKEN
{
p->avl.cache = -1;
10eb7d: c6 42 10 ff movb $0xff,0x10(%edx)
q = p->avl.left;
10eb81: 8b 4a 08 mov 0x8(%edx),%ecx
if (q == NULL)
10eb84: 85 c9 test %ecx,%ecx
10eb86: 75 05 jne 10eb8d <rtems_bdbuf_get_buffer_from_lru_list+0x188>
{
q = node;
p->avl.left = q;
10eb88: 89 42 08 mov %eax,0x8(%edx)
10eb8b: eb 22 jmp 10ebaf <rtems_bdbuf_get_buffer_from_lru_list+0x1aa>
rtems_bdbuf_buffer* buf_stack[RTEMS_BDBUF_AVL_MAX_HEIGHT];
rtems_bdbuf_buffer** buf_prev = buf_stack;
bool modified = false;
if (p == NULL)
10eb8d: 89 b5 58 ff ff ff mov %esi,-0xa8(%ebp)
10eb93: 89 ca mov %ecx,%edx
return 0;
}
while (p != NULL)
{
*buf_prev++ = p;
10eb95: 8b bd 58 ff ff ff mov -0xa8(%ebp),%edi
10eb9b: 89 17 mov %edx,(%edi)
10eb9d: 89 fe mov %edi,%esi
10eb9f: 83 c6 04 add $0x4,%esi
if (((uintptr_t) p->dd < (uintptr_t) dd)
10eba2: 8b 8d 60 ff ff ff mov -0xa0(%ebp),%ecx
10eba8: 39 4a 14 cmp %ecx,0x14(%edx)
10ebab: 72 ba jb 10eb67 <rtems_bdbuf_get_buffer_from_lru_list+0x162><== NEVER TAKEN
10ebad: eb ab jmp 10eb5a <rtems_bdbuf_get_buffer_from_lru_list+0x155>
}
p = q;
}
q->avl.left = q->avl.right = NULL;
10ebaf: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
10ebb6: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax)
q->avl.bal = 0;
10ebbd: c6 40 11 00 movb $0x0,0x11(%eax)
default:
break;
}
}
q = p;
if (buf_prev > buf_stack)
10ebc1: 8d 9d 68 ff ff ff lea -0x98(%ebp),%ebx
10ebc7: 89 9d 60 ff ff ff mov %ebx,-0xa0(%ebp)
10ebcd: eb 02 jmp 10ebd1 <rtems_bdbuf_get_buffer_from_lru_list+0x1cc>
q->avl.left = q->avl.right = NULL;
q->avl.bal = 0;
modified = true;
buf_prev--;
while (modified)
10ebcf: 89 f2 mov %esi,%edx
{
if (p->avl.cache == -1)
10ebd1: 80 7a 10 ff cmpb $0xff,0x10(%edx)
10ebd5: 8a 4a 11 mov 0x11(%edx),%cl
10ebd8: 75 57 jne 10ec31 <rtems_bdbuf_get_buffer_from_lru_list+0x22c>
{
switch (p->avl.bal)
10ebda: 84 c9 test %cl,%cl
10ebdc: 74 0f je 10ebed <rtems_bdbuf_get_buffer_from_lru_list+0x1e8>
10ebde: 80 f9 01 cmp $0x1,%cl
10ebe1: 74 5b je 10ec3e <rtems_bdbuf_get_buffer_from_lru_list+0x239>
10ebe3: fe c1 inc %cl
10ebe5: 0f 85 ac 00 00 00 jne 10ec97 <rtems_bdbuf_get_buffer_from_lru_list+0x292><== NEVER TAKEN
10ebeb: eb 09 jmp 10ebf6 <rtems_bdbuf_get_buffer_from_lru_list+0x1f1>
p->avl.bal = 0;
modified = false;
break;
case 0:
p->avl.bal = -1;
10ebed: c6 42 11 ff movb $0xff,0x11(%edx)
10ebf1: e9 a1 00 00 00 jmp 10ec97 <rtems_bdbuf_get_buffer_from_lru_list+0x292>
break;
case -1:
p1 = p->avl.left;
10ebf6: 8b 72 08 mov 0x8(%edx),%esi
if (p1->avl.bal == -1) /* simple LL-turn */
10ebf9: 80 7e 11 ff cmpb $0xff,0x11(%esi)
10ebfd: 8b 4e 0c mov 0xc(%esi),%ecx
10ec00: 75 08 jne 10ec0a <rtems_bdbuf_get_buffer_from_lru_list+0x205>
{
p->avl.left = p1->avl.right;
10ec02: 89 4a 08 mov %ecx,0x8(%edx)
p1->avl.right = p;
10ec05: 89 56 0c mov %edx,0xc(%esi)
10ec08: eb 52 jmp 10ec5c <rtems_bdbuf_get_buffer_from_lru_list+0x257>
p = p1;
}
else /* double LR-turn */
{
p2 = p1->avl.right;
p1->avl.right = p2->avl.left;
10ec0a: 8b 59 08 mov 0x8(%ecx),%ebx
10ec0d: 89 5e 0c mov %ebx,0xc(%esi)
p2->avl.left = p1;
10ec10: 89 71 08 mov %esi,0x8(%ecx)
p->avl.left = p2->avl.right;
10ec13: 8b 59 0c mov 0xc(%ecx),%ebx
10ec16: 89 5a 08 mov %ebx,0x8(%edx)
p2->avl.right = p;
10ec19: 89 51 0c mov %edx,0xc(%ecx)
if (p2->avl.bal == -1) p->avl.bal = +1; else p->avl.bal = 0;
10ec1c: 80 79 11 ff cmpb $0xff,0x11(%ecx)
10ec20: 0f 94 42 11 sete 0x11(%edx)
if (p2->avl.bal == +1) p1->avl.bal = -1; else p1->avl.bal = 0;
10ec24: 80 79 11 01 cmpb $0x1,0x11(%ecx)
10ec28: 0f 95 c2 setne %dl
10ec2b: 4a dec %edx
10ec2c: 88 56 11 mov %dl,0x11(%esi)
10ec2f: eb 5c jmp 10ec8d <rtems_bdbuf_get_buffer_from_lru_list+0x288>
break;
}
}
else
{
switch (p->avl.bal)
10ec31: 84 c9 test %cl,%cl
10ec33: 74 0f je 10ec44 <rtems_bdbuf_get_buffer_from_lru_list+0x23f>
10ec35: 80 f9 01 cmp $0x1,%cl
10ec38: 74 10 je 10ec4a <rtems_bdbuf_get_buffer_from_lru_list+0x245>
10ec3a: fe c1 inc %cl
10ec3c: 75 59 jne 10ec97 <rtems_bdbuf_get_buffer_from_lru_list+0x292><== NEVER TAKEN
{
case -1:
p->avl.bal = 0;
10ec3e: c6 42 11 00 movb $0x0,0x11(%edx)
10ec42: eb 4f jmp 10ec93 <rtems_bdbuf_get_buffer_from_lru_list+0x28e>
modified = false;
break;
case 0:
p->avl.bal = 1;
10ec44: c6 42 11 01 movb $0x1,0x11(%edx)
10ec48: eb 4d jmp 10ec97 <rtems_bdbuf_get_buffer_from_lru_list+0x292>
break;
case 1:
p1 = p->avl.right;
10ec4a: 8b 72 0c mov 0xc(%edx),%esi
if (p1->avl.bal == 1) /* simple RR-turn */
10ec4d: 80 7e 11 01 cmpb $0x1,0x11(%esi)
10ec51: 8b 4e 08 mov 0x8(%esi),%ecx
10ec54: 75 0e jne 10ec64 <rtems_bdbuf_get_buffer_from_lru_list+0x25f>
{
p->avl.right = p1->avl.left;
10ec56: 89 4a 0c mov %ecx,0xc(%edx)
p1->avl.left = p;
10ec59: 89 56 08 mov %edx,0x8(%esi)
p->avl.bal = 0;
10ec5c: c6 42 11 00 movb $0x0,0x11(%edx)
10ec60: 89 f1 mov %esi,%ecx
10ec62: eb 29 jmp 10ec8d <rtems_bdbuf_get_buffer_from_lru_list+0x288>
p = p1;
}
else /* double RL-turn */
{
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
10ec64: 8b 59 0c mov 0xc(%ecx),%ebx
10ec67: 89 5e 08 mov %ebx,0x8(%esi)
p2->avl.right = p1;
10ec6a: 89 71 0c mov %esi,0xc(%ecx)
p->avl.right = p2->avl.left;
10ec6d: 8b 59 08 mov 0x8(%ecx),%ebx
10ec70: 89 5a 0c mov %ebx,0xc(%edx)
p2->avl.left = p;
10ec73: 89 51 08 mov %edx,0x8(%ecx)
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
10ec76: 80 79 11 01 cmpb $0x1,0x11(%ecx)
10ec7a: 0f 95 c3 setne %bl
10ec7d: 89 df mov %ebx,%edi
10ec7f: 4f dec %edi
10ec80: 89 fb mov %edi,%ebx
10ec82: 88 5a 11 mov %bl,0x11(%edx)
if (p2->avl.bal == -1) p1->avl.bal = +1; else p1->avl.bal = 0;
10ec85: 80 79 11 ff cmpb $0xff,0x11(%ecx)
10ec89: 0f 94 46 11 sete 0x11(%esi)
p = p2;
}
p->avl.bal = 0;
10ec8d: c6 41 11 00 movb $0x0,0x11(%ecx)
10ec91: 89 ca mov %ecx,%edx
modified = false;
10ec93: 31 c9 xor %ecx,%ecx
10ec95: eb 02 jmp 10ec99 <rtems_bdbuf_get_buffer_from_lru_list+0x294>
break;
}
}
else
{
switch (p->avl.bal)
10ec97: b1 01 mov $0x1,%cl
default:
break;
}
}
q = p;
if (buf_prev > buf_stack)
10ec99: 8b bd 60 ff ff ff mov -0xa0(%ebp),%edi
10ec9f: 39 bd 58 ff ff ff cmp %edi,-0xa8(%ebp)
10eca5: 76 1f jbe 10ecc6 <rtems_bdbuf_get_buffer_from_lru_list+0x2c1>
{
p = *--buf_prev;
10eca7: 83 ad 58 ff ff ff 04 subl $0x4,-0xa8(%ebp)
10ecae: 8b 9d 58 ff ff ff mov -0xa8(%ebp),%ebx
10ecb4: 8b 33 mov (%ebx),%esi
if (p->avl.cache == -1)
10ecb6: 80 7e 10 ff cmpb $0xff,0x10(%esi)
10ecba: 75 05 jne 10ecc1 <rtems_bdbuf_get_buffer_from_lru_list+0x2bc>
{
p->avl.left = q;
10ecbc: 89 56 08 mov %edx,0x8(%esi)
10ecbf: eb 0d jmp 10ecce <rtems_bdbuf_get_buffer_from_lru_list+0x2c9>
}
else
{
p->avl.right = q;
10ecc1: 89 56 0c mov %edx,0xc(%esi)
10ecc4: eb 08 jmp 10ecce <rtems_bdbuf_get_buffer_from_lru_list+0x2c9>
}
}
else
{
*root = p;
10ecc6: 89 15 fc 20 13 00 mov %edx,0x1320fc
10eccc: eb 17 jmp 10ece5 <rtems_bdbuf_get_buffer_from_lru_list+0x2e0>
q->avl.left = q->avl.right = NULL;
q->avl.bal = 0;
modified = true;
buf_prev--;
while (modified)
10ecce: 84 c9 test %cl,%cl
10ecd0: 0f 85 f9 fe ff ff jne 10ebcf <rtems_bdbuf_get_buffer_from_lru_list+0x1ca>
10ecd6: eb 0d jmp 10ece5 <rtems_bdbuf_get_buffer_from_lru_list+0x2e0>
bd->avl.left = NULL;
bd->avl.right = NULL;
bd->waiters = 0;
if (rtems_bdbuf_avl_insert (&bdbuf_cache.tree, bd) != 0)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_RECYCLE);
10ecd8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10ecdb: 68 1b 00 00 42 push $0x4200001b <== NOT EXECUTED
10ece0: e8 2b c6 ff ff call 10b310 <rtems_fatal_error_occurred><== NOT EXECUTED
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
10ece5: c7 40 20 01 00 00 00 movl $0x1,0x20(%eax)
10ecec: eb 10 jmp 10ecfe <rtems_bdbuf_get_buffer_from_lru_list+0x2f9>
void rtems_bdbuf_reset_device_stats (rtems_disk_device *dd)
{
rtems_bdbuf_lock_cache ();
memset (&dd->stats, 0, sizeof(dd->stats));
rtems_bdbuf_unlock_cache ();
}
10ecee: 8b 36 mov (%esi),%esi
rtems_bdbuf_get_buffer_from_lru_list (rtems_disk_device *dd,
rtems_blkdev_bnum block)
{
rtems_chain_node *node = rtems_chain_first (&bdbuf_cache.lru);
while (!rtems_chain_is_tail (&bdbuf_cache.lru, node))
10ecf0: 81 fe 04 21 13 00 cmp $0x132104,%esi
10ecf6: 0f 85 2c fd ff ff jne 10ea28 <rtems_bdbuf_get_buffer_from_lru_list+0x23>
}
node = rtems_chain_next (node);
}
return NULL;
10ecfc: 31 c0 xor %eax,%eax
}
10ecfe: 8d 65 f4 lea -0xc(%ebp),%esp
10ed01: 5b pop %ebx
10ed02: 5e pop %esi
10ed03: 5f pop %edi
10ed04: 5d pop %ebp
10ed05: c3 ret
0010f6fa <rtems_bdbuf_init>:
if (rtems_bdbuf_tracer)
printf ("bdbuf:init\n");
if (rtems_interrupt_is_in_progress())
return RTEMS_CALLED_FROM_ISR;
10f6fa: b8 12 00 00 00 mov $0x12,%eax
rtems_mode prev_mode;
if (rtems_bdbuf_tracer)
printf ("bdbuf:init\n");
if (rtems_interrupt_is_in_progress())
10f6ff: 83 3d 70 29 13 00 00 cmpl $0x0,0x132970
10f706: 0f 85 fc 03 00 00 jne 10fb08 <rtems_bdbuf_init+0x40e><== NEVER TAKEN
*
* @return rtems_status_code The initialisation status.
*/
rtems_status_code
rtems_bdbuf_init (void)
{
10f70c: 55 push %ebp
10f70d: 89 e5 mov %esp,%ebp
10f70f: 57 push %edi
10f710: 56 push %esi
10f711: 53 push %ebx
10f712: 83 ec 2c sub $0x2c,%esp
return RTEMS_CALLED_FROM_ISR;
/*
* Check the configuration table values.
*/
if ((bdbuf_config.buffer_max % bdbuf_config.buffer_min) != 0)
10f715: a1 74 14 12 00 mov 0x121474,%eax
10f71a: 31 d2 xor %edx,%edx
10f71c: f7 35 70 14 12 00 divl 0x121470
10f722: 89 55 e4 mov %edx,-0x1c(%ebp)
10f725: 89 c3 mov %eax,%ebx
return RTEMS_INVALID_NUMBER;
10f727: b8 0a 00 00 00 mov $0xa,%eax
return RTEMS_CALLED_FROM_ISR;
/*
* Check the configuration table values.
*/
if ((bdbuf_config.buffer_max % bdbuf_config.buffer_min) != 0)
10f72c: 85 d2 test %edx,%edx
10f72e: 0f 85 cd 03 00 00 jne 10fb01 <rtems_bdbuf_init+0x407><== NEVER TAKEN
/*
* We use a special variable to manage the initialisation incase we have
* completing threads doing this. You may get errors if the another thread
* makes a call and we have not finished initialisation.
*/
prev_mode = rtems_bdbuf_disable_preemption ();
10f734: e8 6b ed ff ff call 10e4a4 <rtems_bdbuf_disable_preemption>
10f739: 89 c2 mov %eax,%edx
if (bdbuf_cache.initialised)
10f73b: 80 3d 55 21 13 00 00 cmpb $0x0,0x132155
10f742: 74 0f je 10f753 <rtems_bdbuf_init+0x59> <== ALWAYS TAKEN
{
rtems_bdbuf_restore_preemption (prev_mode);
10f744: e8 94 ed ff ff call 10e4dd <rtems_bdbuf_restore_preemption><== NOT EXECUTED
return RTEMS_RESOURCE_IN_USE;
10f749: b8 0c 00 00 00 mov $0xc,%eax <== NOT EXECUTED
10f74e: e9 ae 03 00 00 jmp 10fb01 <rtems_bdbuf_init+0x407><== NOT EXECUTED
}
memset(&bdbuf_cache, 0, sizeof(bdbuf_cache));
10f753: be c0 20 13 00 mov $0x1320c0,%esi
10f758: b9 26 00 00 00 mov $0x26,%ecx
10f75d: 89 f7 mov %esi,%edi
10f75f: 8b 45 e4 mov -0x1c(%ebp),%eax
10f762: f3 ab rep stos %eax,%es:(%edi)
bdbuf_cache.initialised = true;
10f764: c6 05 55 21 13 00 01 movb $0x1,0x132155
rtems_bdbuf_restore_preemption (prev_mode);
10f76b: 89 d0 mov %edx,%eax
10f76d: e8 6b ed ff ff call 10e4dd <rtems_bdbuf_restore_preemption>
*/
cache_aligment = 32; /* FIXME rtems_cache_get_data_line_size() */
if (cache_aligment <= 0)
cache_aligment = CPU_ALIGNMENT;
bdbuf_cache.sync_device = BDBUF_INVALID_DEV;
10f772: c7 05 f8 20 13 00 00 movl $0x0,0x1320f8
10f779: 00 00 00
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
10f77c: c7 05 c8 20 13 00 cc movl $0x1320cc,0x1320c8
10f783: 20 13 00
head->previous = NULL;
10f786: c7 05 cc 20 13 00 00 movl $0x0,0x1320cc
10f78d: 00 00 00
tail->previous = head;
10f790: c7 05 d0 20 13 00 c8 movl $0x1320c8,0x1320d0
10f797: 20 13 00
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
10f79a: c7 05 00 21 13 00 04 movl $0x132104,0x132100
10f7a1: 21 13 00
head->previous = NULL;
10f7a4: c7 05 04 21 13 00 00 movl $0x0,0x132104
10f7ab: 00 00 00
tail->previous = head;
10f7ae: c7 05 08 21 13 00 00 movl $0x132100,0x132108
10f7b5: 21 13 00
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
10f7b8: c7 05 0c 21 13 00 10 movl $0x132110,0x13210c
10f7bf: 21 13 00
head->previous = NULL;
10f7c2: c7 05 10 21 13 00 00 movl $0x0,0x132110
10f7c9: 00 00 00
tail->previous = head;
10f7cc: c7 05 14 21 13 00 0c movl $0x13210c,0x132114
10f7d3: 21 13 00
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
10f7d6: c7 05 18 21 13 00 1c movl $0x13211c,0x132118
10f7dd: 21 13 00
head->previous = NULL;
10f7e0: c7 05 1c 21 13 00 00 movl $0x0,0x13211c
10f7e7: 00 00 00
tail->previous = head;
10f7ea: c7 05 20 21 13 00 18 movl $0x132118,0x132120
10f7f1: 21 13 00
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
10f7f4: c7 05 48 21 13 00 4c movl $0x13214c,0x132148
10f7fb: 21 13 00
head->previous = NULL;
10f7fe: c7 05 4c 21 13 00 00 movl $0x0,0x13214c
10f805: 00 00 00
tail->previous = head;
10f808: c7 05 50 21 13 00 48 movl $0x132148,0x132150
10f80f: 21 13 00
rtems_chain_initialize_empty (&bdbuf_cache.read_ahead_chain);
/*
* Create the locks for the cache.
*/
sc = rtems_semaphore_create (rtems_build_name ('B', 'D', 'C', 'l'),
10f812: 83 ec 0c sub $0xc,%esp
10f815: 68 e8 20 13 00 push $0x1320e8
10f81a: 6a 00 push $0x0
10f81c: 6a 54 push $0x54
10f81e: 6a 01 push $0x1
10f820: 68 6c 43 44 42 push $0x4244436c
10f825: e8 da b2 ff ff call 10ab04 <rtems_semaphore_create>
1, RTEMS_BDBUF_CACHE_LOCK_ATTRIBS, 0,
&bdbuf_cache.lock);
if (sc != RTEMS_SUCCESSFUL)
10f82a: 83 c4 20 add $0x20,%esp
10f82d: 85 c0 test %eax,%eax
10f82f: 0f 85 1e 02 00 00 jne 10fa53 <rtems_bdbuf_init+0x359><== NEVER TAKEN
goto error;
rtems_bdbuf_lock_cache ();
10f835: e8 91 eb ff ff call 10e3cb <rtems_bdbuf_lock_cache>
sc = rtems_semaphore_create (rtems_build_name ('B', 'D', 'C', 's'),
10f83a: 83 ec 0c sub $0xc,%esp
10f83d: 68 ec 20 13 00 push $0x1320ec
10f842: 6a 00 push $0x0
10f844: 6a 54 push $0x54
10f846: 6a 01 push $0x1
10f848: 68 73 43 44 42 push $0x42444373
10f84d: e8 b2 b2 ff ff call 10ab04 <rtems_semaphore_create>
1, RTEMS_BDBUF_CACHE_LOCK_ATTRIBS, 0,
&bdbuf_cache.sync_lock);
if (sc != RTEMS_SUCCESSFUL)
10f852: 83 c4 20 add $0x20,%esp
10f855: 85 c0 test %eax,%eax
10f857: 0f 85 f6 01 00 00 jne 10fa53 <rtems_bdbuf_init+0x359><== NEVER TAKEN
goto error;
sc = rtems_semaphore_create (rtems_build_name ('B', 'D', 'C', 'a'),
10f85d: 83 ec 0c sub $0xc,%esp
10f860: 68 28 21 13 00 push $0x132128
10f865: 6a 00 push $0x0
10f867: 6a 24 push $0x24
10f869: 6a 00 push $0x0
10f86b: 68 61 43 44 42 push $0x42444361
10f870: e8 8f b2 ff ff call 10ab04 <rtems_semaphore_create>
0, RTEMS_BDBUF_CACHE_WAITER_ATTRIBS, 0,
&bdbuf_cache.access_waiters.sema);
if (sc != RTEMS_SUCCESSFUL)
10f875: 83 c4 20 add $0x20,%esp
10f878: 85 c0 test %eax,%eax
10f87a: 0f 85 d3 01 00 00 jne 10fa53 <rtems_bdbuf_init+0x359><== NEVER TAKEN
goto error;
sc = rtems_semaphore_create (rtems_build_name ('B', 'D', 'C', 't'),
10f880: 83 ec 0c sub $0xc,%esp
10f883: 68 30 21 13 00 push $0x132130
10f888: 6a 00 push $0x0
10f88a: 6a 24 push $0x24
10f88c: 6a 00 push $0x0
10f88e: 68 74 43 44 42 push $0x42444374
10f893: e8 6c b2 ff ff call 10ab04 <rtems_semaphore_create>
0, RTEMS_BDBUF_CACHE_WAITER_ATTRIBS, 0,
&bdbuf_cache.transfer_waiters.sema);
if (sc != RTEMS_SUCCESSFUL)
10f898: 83 c4 20 add $0x20,%esp
10f89b: 85 c0 test %eax,%eax
10f89d: 0f 85 b0 01 00 00 jne 10fa53 <rtems_bdbuf_init+0x359><== NEVER TAKEN
goto error;
sc = rtems_semaphore_create (rtems_build_name ('B', 'D', 'C', 'b'),
10f8a3: 83 ec 0c sub $0xc,%esp
10f8a6: 68 38 21 13 00 push $0x132138
10f8ab: 6a 00 push $0x0
10f8ad: 6a 24 push $0x24
10f8af: 6a 00 push $0x0
10f8b1: 68 62 43 44 42 push $0x42444362
10f8b6: e8 49 b2 ff ff call 10ab04 <rtems_semaphore_create>
0, RTEMS_BDBUF_CACHE_WAITER_ATTRIBS, 0,
&bdbuf_cache.buffer_waiters.sema);
if (sc != RTEMS_SUCCESSFUL)
10f8bb: 83 c4 20 add $0x20,%esp
10f8be: 85 c0 test %eax,%eax
10f8c0: 0f 85 8d 01 00 00 jne 10fa53 <rtems_bdbuf_init+0x359><== NEVER TAKEN
/*
* Compute the various number of elements in the cache.
*/
bdbuf_cache.buffer_min_count =
bdbuf_config.size / bdbuf_config.buffer_min;
10f8c6: a1 6c 14 12 00 mov 0x12146c,%eax
10f8cb: 31 d2 xor %edx,%edx
10f8cd: f7 35 70 14 12 00 divl 0x121470
10f8d3: 89 c6 mov %eax,%esi
goto error;
/*
* Compute the various number of elements in the cache.
*/
bdbuf_cache.buffer_min_count =
10f8d5: a3 dc 20 13 00 mov %eax,0x1320dc
bdbuf_config.size / bdbuf_config.buffer_min;
bdbuf_cache.max_bds_per_group =
10f8da: 89 1d e0 20 13 00 mov %ebx,0x1320e0
bdbuf_config.buffer_max / bdbuf_config.buffer_min;
bdbuf_cache.group_count =
bdbuf_cache.buffer_min_count / bdbuf_cache.max_bds_per_group;
10f8e0: 31 d2 xor %edx,%edx
10f8e2: f7 f3 div %ebx
10f8e4: 89 c3 mov %eax,%ebx
*/
bdbuf_cache.buffer_min_count =
bdbuf_config.size / bdbuf_config.buffer_min;
bdbuf_cache.max_bds_per_group =
bdbuf_config.buffer_max / bdbuf_config.buffer_min;
bdbuf_cache.group_count =
10f8e6: a3 3c 21 13 00 mov %eax,0x13213c
bdbuf_cache.buffer_min_count / bdbuf_cache.max_bds_per_group;
/*
* Allocate the memory for the buffer descriptors.
*/
bdbuf_cache.bds = calloc (sizeof (rtems_bdbuf_buffer),
10f8eb: 52 push %edx
10f8ec: 52 push %edx
10f8ed: 56 push %esi
10f8ee: 6a 38 push $0x38
10f8f0: e8 c3 79 ff ff call 1072b8 <calloc>
10f8f5: a3 d4 20 13 00 mov %eax,0x1320d4
bdbuf_cache.buffer_min_count);
if (!bdbuf_cache.bds)
10f8fa: 83 c4 10 add $0x10,%esp
10f8fd: 85 c0 test %eax,%eax
10f8ff: 0f 84 4e 01 00 00 je 10fa53 <rtems_bdbuf_init+0x359><== NEVER TAKEN
goto error;
/*
* Allocate the memory for the buffer descriptors.
*/
bdbuf_cache.groups = calloc (sizeof (rtems_bdbuf_group),
10f905: 50 push %eax
10f906: 50 push %eax
10f907: 53 push %ebx
10f908: 6a 14 push $0x14
10f90a: e8 a9 79 ff ff call 1072b8 <calloc>
10f90f: a3 40 21 13 00 mov %eax,0x132140
bdbuf_cache.group_count);
if (!bdbuf_cache.groups)
10f914: 83 c4 10 add $0x10,%esp
10f917: 85 c0 test %eax,%eax
10f919: 0f 84 34 01 00 00 je 10fa53 <rtems_bdbuf_init+0x359><== NEVER TAKEN
* aligned. It is possible to free the memory allocated by rtems_memalign()
* with free(). Return 0 if allocated.
*
* The memory allocate allows a
*/
if (rtems_memalign ((void **) &bdbuf_cache.buffers,
10f91f: 50 push %eax
10f920: 0f af 35 70 14 12 00 imul 0x121470,%esi
10f927: 56 push %esi
10f928: 6a 20 push $0x20
10f92a: 68 d8 20 13 00 push $0x1320d8
10f92f: e8 48 18 00 00 call 11117c <rtems_memalign>
10f934: 83 c4 10 add $0x10,%esp
10f937: 85 c0 test %eax,%eax
10f939: 0f 85 14 01 00 00 jne 10fa53 <rtems_bdbuf_init+0x359><== NEVER TAKEN
/*
* The cache is empty after opening so we need to add all the buffers to it
* and initialise the groups.
*/
for (b = 0, group = bdbuf_cache.groups,
10f93f: 8b 1d 40 21 13 00 mov 0x132140,%ebx
bd = bdbuf_cache.bds, buffer = bdbuf_cache.buffers;
10f945: 8b 3d d4 20 13 00 mov 0x1320d4,%edi
10f94b: 8b 15 d8 20 13 00 mov 0x1320d8,%edx
10f951: 89 55 e0 mov %edx,-0x20(%ebp)
b < bdbuf_cache.buffer_min_count;
10f954: a1 dc 20 13 00 mov 0x1320dc,%eax
10f959: 89 45 d8 mov %eax,-0x28(%ebp)
bd->group = group;
bd->buffer = buffer;
rtems_chain_append_unprotected (&bdbuf_cache.lru, &bd->link);
if ((b % bdbuf_cache.max_bds_per_group) ==
10f95c: 8b 15 e0 20 13 00 mov 0x1320e0,%edx
10f962: 89 55 dc mov %edx,-0x24(%ebp)
(bdbuf_cache.max_bds_per_group - 1))
10f965: 4a dec %edx
10f966: 89 55 d4 mov %edx,-0x2c(%ebp)
/*
* The cache is empty after opening so we need to add all the buffers to it
* and initialise the groups.
*/
for (b = 0, group = bdbuf_cache.groups,
bd = bdbuf_cache.bds, buffer = bdbuf_cache.buffers;
10f969: 89 f9 mov %edi,%ecx
/*
* The cache is empty after opening so we need to add all the buffers to it
* and initialise the groups.
*/
for (b = 0, group = bdbuf_cache.groups,
10f96b: 89 de mov %ebx,%esi
10f96d: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
10f974: eb 45 jmp 10f9bb <rtems_bdbuf_init+0x2c1>
bd = bdbuf_cache.bds, buffer = bdbuf_cache.buffers;
b < bdbuf_cache.buffer_min_count;
b++, bd++, buffer += bdbuf_config.buffer_min)
{
bd->dd = BDBUF_INVALID_DEV;
10f976: c7 41 14 00 00 00 00 movl $0x0,0x14(%ecx)
bd->group = group;
10f97d: 89 71 28 mov %esi,0x28(%ecx)
bd->buffer = buffer;
10f980: 8b 45 e0 mov -0x20(%ebp),%eax
10f983: 89 41 1c mov %eax,0x1c(%ecx)
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
10f986: a1 08 21 13 00 mov 0x132108,%eax
the_node->next = tail;
10f98b: c7 01 04 21 13 00 movl $0x132104,(%ecx)
tail->previous = the_node;
10f991: 89 0d 08 21 13 00 mov %ecx,0x132108
old_last->next = the_node;
10f997: 89 08 mov %ecx,(%eax)
the_node->previous = old_last;
10f999: 89 41 04 mov %eax,0x4(%ecx)
rtems_chain_append_unprotected (&bdbuf_cache.lru, &bd->link);
if ((b % bdbuf_cache.max_bds_per_group) ==
10f99c: 8b 45 e4 mov -0x1c(%ebp),%eax
10f99f: 31 d2 xor %edx,%edx
10f9a1: f7 75 dc divl -0x24(%ebp)
10f9a4: 3b 55 d4 cmp -0x2c(%ebp),%edx
10f9a7: 75 03 jne 10f9ac <rtems_bdbuf_init+0x2b2>
(bdbuf_cache.max_bds_per_group - 1))
group++;
10f9a9: 83 c6 14 add $0x14,%esi
* and initialise the groups.
*/
for (b = 0, group = bdbuf_cache.groups,
bd = bdbuf_cache.bds, buffer = bdbuf_cache.buffers;
b < bdbuf_cache.buffer_min_count;
b++, bd++, buffer += bdbuf_config.buffer_min)
10f9ac: ff 45 e4 incl -0x1c(%ebp)
10f9af: 83 c1 38 add $0x38,%ecx
10f9b2: 8b 15 70 14 12 00 mov 0x121470,%edx
10f9b8: 01 55 e0 add %edx,-0x20(%ebp)
/*
* The cache is empty after opening so we need to add all the buffers to it
* and initialise the groups.
*/
for (b = 0, group = bdbuf_cache.groups,
10f9bb: 8b 45 d8 mov -0x28(%ebp),%eax
10f9be: 39 45 e4 cmp %eax,-0x1c(%ebp)
10f9c1: 75 b3 jne 10f976 <rtems_bdbuf_init+0x27c>
}
for (b = 0,
group = bdbuf_cache.groups,
bd = bdbuf_cache.bds;
b < bdbuf_cache.group_count;
10f9c3: 8b 0d 3c 21 13 00 mov 0x13213c,%ecx
b++,
group++,
bd += bdbuf_cache.max_bds_per_group)
{
group->bds_per_group = bdbuf_cache.max_bds_per_group;
10f9c9: 8b 15 e0 20 13 00 mov 0x1320e0,%edx
group = bdbuf_cache.groups,
bd = bdbuf_cache.bds;
b < bdbuf_cache.group_count;
b++,
group++,
bd += bdbuf_cache.max_bds_per_group)
10f9cf: 6b f2 38 imul $0x38,%edx,%esi
10f9d2: 31 c0 xor %eax,%eax
10f9d4: eb 0c jmp 10f9e2 <rtems_bdbuf_init+0x2e8>
{
group->bds_per_group = bdbuf_cache.max_bds_per_group;
10f9d6: 89 53 08 mov %edx,0x8(%ebx)
group->bdbuf = bd;
10f9d9: 89 7b 10 mov %edi,0x10(%ebx)
for (b = 0,
group = bdbuf_cache.groups,
bd = bdbuf_cache.bds;
b < bdbuf_cache.group_count;
b++,
10f9dc: 40 inc %eax
group++,
10f9dd: 83 c3 14 add $0x14,%ebx
bd += bdbuf_cache.max_bds_per_group)
10f9e0: 01 f7 add %esi,%edi
if ((b % bdbuf_cache.max_bds_per_group) ==
(bdbuf_cache.max_bds_per_group - 1))
group++;
}
for (b = 0,
10f9e2: 39 c8 cmp %ecx,%eax
10f9e4: 75 f0 jne 10f9d6 <rtems_bdbuf_init+0x2dc>
/*
* Create and start swapout task. This task will create and manage the worker
* threads.
*/
bdbuf_cache.swapout_enabled = true;
10f9e6: c6 05 c4 20 13 00 01 movb $0x1,0x1320c4
sc = rtems_bdbuf_create_task (rtems_build_name('B', 'S', 'W', 'P'),
10f9ed: 50 push %eax
10f9ee: 50 push %eax
10f9ef: 68 c0 20 13 00 push $0x1320c0
10f9f4: 6a 00 push $0x0
10f9f6: b9 7b f1 10 00 mov $0x10f17b,%ecx
10f9fb: 8b 15 54 14 12 00 mov 0x121454,%edx
10fa01: b8 50 57 53 42 mov $0x42535750,%eax
10fa06: e8 23 ec ff ff call 10e62e <rtems_bdbuf_create_task.constprop.14>
bdbuf_config.swapout_priority,
RTEMS_BDBUF_SWAPOUT_TASK_PRIORITY_DEFAULT,
rtems_bdbuf_swapout_task,
0,
&bdbuf_cache.swapout);
if (sc != RTEMS_SUCCESSFUL)
10fa0b: 83 c4 10 add $0x10,%esp
10fa0e: 85 c0 test %eax,%eax
10fa10: 75 41 jne 10fa53 <rtems_bdbuf_init+0x359><== NEVER TAKEN
goto error;
if (bdbuf_config.max_read_ahead_blocks > 0)
10fa12: 83 3d 4c 14 12 00 00 cmpl $0x0,0x12144c
10fa19: 75 0c jne 10fa27 <rtems_bdbuf_init+0x32d>
&bdbuf_cache.read_ahead_task);
if (sc != RTEMS_SUCCESSFUL)
goto error;
}
rtems_bdbuf_unlock_cache ();
10fa1b: e8 f0 e9 ff ff call 10e410 <rtems_bdbuf_unlock_cache>
return RTEMS_SUCCESSFUL;
10fa20: 31 c0 xor %eax,%eax
10fa22: e9 da 00 00 00 jmp 10fb01 <rtems_bdbuf_init+0x407>
if (sc != RTEMS_SUCCESSFUL)
goto error;
if (bdbuf_config.max_read_ahead_blocks > 0)
{
bdbuf_cache.read_ahead_enabled = true;
10fa27: c6 05 54 21 13 00 01 movb $0x1,0x132154
sc = rtems_bdbuf_create_task (rtems_build_name('B', 'R', 'D', 'A'),
10fa2e: 50 push %eax
10fa2f: 50 push %eax
10fa30: 68 44 21 13 00 push $0x132144
10fa35: 6a 00 push $0x0
10fa37: b9 7e f5 10 00 mov $0x10f57e,%ecx
10fa3c: 8b 15 78 14 12 00 mov 0x121478,%edx
10fa42: b8 41 44 52 42 mov $0x42524441,%eax
10fa47: e8 e2 eb ff ff call 10e62e <rtems_bdbuf_create_task.constprop.14>
bdbuf_config.read_ahead_priority,
RTEMS_BDBUF_READ_AHEAD_TASK_PRIORITY_DEFAULT,
rtems_bdbuf_read_ahead_task,
0,
&bdbuf_cache.read_ahead_task);
if (sc != RTEMS_SUCCESSFUL)
10fa4c: 83 c4 10 add $0x10,%esp
10fa4f: 85 c0 test %eax,%eax
10fa51: 74 c8 je 10fa1b <rtems_bdbuf_init+0x321><== ALWAYS TAKEN
return RTEMS_SUCCESSFUL;
error:
if (bdbuf_cache.read_ahead_task != 0)
10fa53: a1 44 21 13 00 mov 0x132144,%eax <== NOT EXECUTED
10fa58: 85 c0 test %eax,%eax <== NOT EXECUTED
10fa5a: 74 0c je 10fa68 <rtems_bdbuf_init+0x36e><== NOT EXECUTED
rtems_task_delete (bdbuf_cache.read_ahead_task);
10fa5c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10fa5f: 50 push %eax <== NOT EXECUTED
10fa60: e8 87 b5 ff ff call 10afec <rtems_task_delete> <== NOT EXECUTED
10fa65: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
if (bdbuf_cache.swapout != 0)
10fa68: a1 c0 20 13 00 mov 0x1320c0,%eax <== NOT EXECUTED
10fa6d: 85 c0 test %eax,%eax <== NOT EXECUTED
10fa6f: 74 0c je 10fa7d <rtems_bdbuf_init+0x383><== NOT EXECUTED
rtems_task_delete (bdbuf_cache.swapout);
10fa71: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10fa74: 50 push %eax <== NOT EXECUTED
10fa75: e8 72 b5 ff ff call 10afec <rtems_task_delete> <== NOT EXECUTED
10fa7a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
free (bdbuf_cache.buffers);
10fa7d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10fa80: ff 35 d8 20 13 00 pushl 0x1320d8 <== NOT EXECUTED
10fa86: e8 99 7a ff ff call 107524 <free> <== NOT EXECUTED
free (bdbuf_cache.groups);
10fa8b: 59 pop %ecx <== NOT EXECUTED
10fa8c: ff 35 40 21 13 00 pushl 0x132140 <== NOT EXECUTED
10fa92: e8 8d 7a ff ff call 107524 <free> <== NOT EXECUTED
free (bdbuf_cache.bds);
10fa97: 5b pop %ebx <== NOT EXECUTED
10fa98: ff 35 d4 20 13 00 pushl 0x1320d4 <== NOT EXECUTED
10fa9e: e8 81 7a ff ff call 107524 <free> <== NOT EXECUTED
rtems_semaphore_delete (bdbuf_cache.buffer_waiters.sema);
10faa3: 5e pop %esi <== NOT EXECUTED
10faa4: ff 35 38 21 13 00 pushl 0x132138 <== NOT EXECUTED
10faaa: e8 f5 b1 ff ff call 10aca4 <rtems_semaphore_delete><== NOT EXECUTED
rtems_semaphore_delete (bdbuf_cache.access_waiters.sema);
10faaf: 5f pop %edi <== NOT EXECUTED
10fab0: ff 35 28 21 13 00 pushl 0x132128 <== NOT EXECUTED
10fab6: e8 e9 b1 ff ff call 10aca4 <rtems_semaphore_delete><== NOT EXECUTED
rtems_semaphore_delete (bdbuf_cache.transfer_waiters.sema);
10fabb: 58 pop %eax <== NOT EXECUTED
10fabc: ff 35 30 21 13 00 pushl 0x132130 <== NOT EXECUTED
10fac2: e8 dd b1 ff ff call 10aca4 <rtems_semaphore_delete><== NOT EXECUTED
rtems_semaphore_delete (bdbuf_cache.sync_lock);
10fac7: 58 pop %eax <== NOT EXECUTED
10fac8: ff 35 ec 20 13 00 pushl 0x1320ec <== NOT EXECUTED
10face: e8 d1 b1 ff ff call 10aca4 <rtems_semaphore_delete><== NOT EXECUTED
if (bdbuf_cache.lock != 0)
10fad3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10fad6: 83 3d e8 20 13 00 00 cmpl $0x0,0x1320e8 <== NOT EXECUTED
10fadd: 74 16 je 10faf5 <rtems_bdbuf_init+0x3fb><== NOT EXECUTED
{
rtems_bdbuf_unlock_cache ();
10fadf: e8 2c e9 ff ff call 10e410 <rtems_bdbuf_unlock_cache><== NOT EXECUTED
rtems_semaphore_delete (bdbuf_cache.lock);
10fae4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10fae7: ff 35 e8 20 13 00 pushl 0x1320e8 <== NOT EXECUTED
10faed: e8 b2 b1 ff ff call 10aca4 <rtems_semaphore_delete><== NOT EXECUTED
10faf2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
bdbuf_cache.initialised = false;
10faf5: c6 05 55 21 13 00 00 movb $0x0,0x132155 <== NOT EXECUTED
return RTEMS_UNSATISFIED;
10fafc: b8 0d 00 00 00 mov $0xd,%eax <== NOT EXECUTED
}
10fb01: 8d 65 f4 lea -0xc(%ebp),%esp
10fb04: 5b pop %ebx
10fb05: 5e pop %esi
10fb06: 5f pop %edi
10fb07: 5d pop %ebp
10fb08: c3 ret
0010e3a3 <rtems_bdbuf_lock>:
* @param lock The mutex to lock.
* @param fatal_error_code The error code if the call fails.
*/
static void
rtems_bdbuf_lock (rtems_id lock, uint32_t fatal_error_code)
{
10e3a3: 55 push %ebp
10e3a4: 89 e5 mov %esp,%ebp
10e3a6: 53 push %ebx
10e3a7: 83 ec 08 sub $0x8,%esp
10e3aa: 89 d3 mov %edx,%ebx
rtems_status_code sc = rtems_semaphore_obtain (lock,
10e3ac: 6a 00 push $0x0
10e3ae: 6a 00 push $0x0
10e3b0: 50 push %eax
10e3b1: e8 7e c9 ff ff call 10ad34 <rtems_semaphore_obtain>
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
10e3b6: 83 c4 10 add $0x10,%esp
10e3b9: 85 c0 test %eax,%eax
10e3bb: 74 09 je 10e3c6 <rtems_bdbuf_lock+0x23> <== ALWAYS TAKEN
rtems_fatal_error_occurred (fatal_error_code);
10e3bd: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10e3c0: 53 push %ebx <== NOT EXECUTED
10e3c1: e8 4a cf ff ff call 10b310 <rtems_fatal_error_occurred><== NOT EXECUTED
}
10e3c6: 8b 5d fc mov -0x4(%ebp),%ebx
10e3c9: c9 leave
10e3ca: c3 ret
0010ff21 <rtems_bdbuf_purge_dev>:
}
}
void
rtems_bdbuf_purge_dev (rtems_disk_device *dd)
{
10ff21: 55 push %ebp
10ff22: 89 e5 mov %esp,%ebp
10ff24: 57 push %edi
10ff25: 56 push %esi
10ff26: 53 push %ebx
10ff27: 81 ec 9c 00 00 00 sub $0x9c,%esp
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
10ff2d: 8d 85 5c ff ff ff lea -0xa4(%ebp),%eax
10ff33: 8d bd 60 ff ff ff lea -0xa0(%ebp),%edi
10ff39: 89 bd 5c ff ff ff mov %edi,-0xa4(%ebp)
head->previous = NULL;
10ff3f: c7 85 60 ff ff ff 00 movl $0x0,-0xa0(%ebp)
10ff46: 00 00 00
tail->previous = head;
10ff49: 89 85 64 ff ff ff mov %eax,-0x9c(%ebp)
rtems_chain_control purge_list;
rtems_chain_initialize_empty (&purge_list);
rtems_bdbuf_lock_cache ();
10ff4f: e8 77 e4 ff ff call 10e3cb <rtems_bdbuf_lock_cache>
}
static void
rtems_bdbuf_read_ahead_reset (rtems_disk_device *dd)
{
rtems_bdbuf_read_ahead_cancel (dd);
10ff54: 8b 45 08 mov 0x8(%ebp),%eax
10ff57: e8 2d f7 ff ff call 10f689 <rtems_bdbuf_read_ahead_cancel>
dd->read_ahead.trigger = RTEMS_DISK_READ_AHEAD_NO_TRIGGER;
10ff5c: 8b 45 08 mov 0x8(%ebp),%eax
10ff5f: c7 40 6c ff ff ff ff movl $0xffffffff,0x6c(%eax)
rtems_bdbuf_gather_for_purge (rtems_chain_control *purge_list,
const rtems_disk_device *dd)
{
rtems_bdbuf_buffer *stack [RTEMS_BDBUF_AVL_MAX_HEIGHT];
rtems_bdbuf_buffer **prev = stack;
rtems_bdbuf_buffer *cur = bdbuf_cache.tree;
10ff66: 8b 1d fc 20 13 00 mov 0x1320fc,%ebx
*prev = NULL;
10ff6c: c7 85 68 ff ff ff 00 movl $0x0,-0x98(%ebp)
10ff73: 00 00 00
static void
rtems_bdbuf_gather_for_purge (rtems_chain_control *purge_list,
const rtems_disk_device *dd)
{
rtems_bdbuf_buffer *stack [RTEMS_BDBUF_AVL_MAX_HEIGHT];
rtems_bdbuf_buffer **prev = stack;
10ff76: 8d b5 68 ff ff ff lea -0x98(%ebp),%esi
10ff7c: e9 98 00 00 00 jmp 110019 <rtems_bdbuf_purge_dev+0xf8>
*prev = NULL;
while (cur != NULL)
{
if (cur->dd == dd)
10ff81: 8b 45 08 mov 0x8(%ebp),%eax
10ff84: 39 43 14 cmp %eax,0x14(%ebx)
10ff87: 75 5e jne 10ffe7 <rtems_bdbuf_purge_dev+0xc6><== NEVER TAKEN
{
switch (cur->state)
10ff89: 83 7b 20 0a cmpl $0xa,0x20(%ebx)
10ff8d: 77 4b ja 10ffda <rtems_bdbuf_purge_dev+0xb9><== NEVER TAKEN
10ff8f: 8b 43 20 mov 0x20(%ebx),%eax
10ff92: ff 24 85 70 32 12 00 jmp *0x123270(,%eax,4)
case RTEMS_BDBUF_STATE_EMPTY:
case RTEMS_BDBUF_STATE_ACCESS_PURGED:
case RTEMS_BDBUF_STATE_TRANSFER_PURGED:
break;
case RTEMS_BDBUF_STATE_SYNC:
rtems_bdbuf_wake (&bdbuf_cache.transfer_waiters);
10ff99: b8 2c 21 13 00 mov $0x13212c,%eax
10ff9e: e8 62 e6 ff ff call 10e605 <rtems_bdbuf_wake>
void rtems_bdbuf_reset_device_stats (rtems_disk_device *dd)
{
rtems_bdbuf_lock_cache ();
memset (&dd->stats, 0, sizeof(dd->stats));
rtems_bdbuf_unlock_cache ();
}
10ffa3: 8b 43 28 mov 0x28(%ebx),%eax
}
static void
rtems_bdbuf_group_release (rtems_bdbuf_buffer *bd)
{
--bd->group->users;
10ffa6: ff 48 0c decl 0xc(%eax)
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
10ffa9: 8b 0b mov (%ebx),%ecx
previous = the_node->previous;
10ffab: 8b 43 04 mov 0x4(%ebx),%eax
next->previous = previous;
10ffae: 89 41 04 mov %eax,0x4(%ecx)
previous->next = next;
10ffb1: 89 08 mov %ecx,(%eax)
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
10ffb3: 8b 85 64 ff ff ff mov -0x9c(%ebp),%eax
the_node->next = tail;
10ffb9: 89 3b mov %edi,(%ebx)
tail->previous = the_node;
10ffbb: 89 9d 64 ff ff ff mov %ebx,-0x9c(%ebp)
old_last->next = the_node;
10ffc1: 89 18 mov %ebx,(%eax)
the_node->previous = old_last;
10ffc3: 89 43 04 mov %eax,0x4(%ebx)
10ffc6: eb 1f jmp 10ffe7 <rtems_bdbuf_purge_dev+0xc6>
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
10ffc8: c7 43 20 0a 00 00 00 movl $0xa,0x20(%ebx)
10ffcf: eb 16 jmp 10ffe7 <rtems_bdbuf_purge_dev+0xc6>
10ffd1: c7 43 20 06 00 00 00 movl $0x6,0x20(%ebx)
10ffd8: eb 0d jmp 10ffe7 <rtems_bdbuf_purge_dev+0xc6>
case RTEMS_BDBUF_STATE_ACCESS_EMPTY:
case RTEMS_BDBUF_STATE_ACCESS_MODIFIED:
rtems_bdbuf_set_state (cur, RTEMS_BDBUF_STATE_ACCESS_PURGED);
break;
default:
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_STATE_11);
10ffda: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10ffdd: 68 01 00 00 42 push $0x42000001 <== NOT EXECUTED
10ffe2: e8 29 b3 ff ff call 10b310 <rtems_fatal_error_occurred><== NOT EXECUTED
}
}
if (cur->avl.left != NULL)
10ffe7: 8b 43 08 mov 0x8(%ebx),%eax
10ffea: 85 c0 test %eax,%eax
10ffec: 74 02 je 10fff0 <rtems_bdbuf_purge_dev+0xcf>
10ffee: eb 07 jmp 10fff7 <rtems_bdbuf_purge_dev+0xd6>
/* Left */
++prev;
*prev = cur;
cur = cur->avl.left;
}
else if (cur->avl.right != NULL)
10fff0: 8b 43 0c mov 0xc(%ebx),%eax
10fff3: 85 c0 test %eax,%eax
10fff5: 74 0d je 110004 <rtems_bdbuf_purge_dev+0xe3>
{
/* Right */
++prev;
*prev = cur;
10fff7: 89 5e 04 mov %ebx,0x4(%esi)
cur = cur->avl.left;
}
else if (cur->avl.right != NULL)
{
/* Right */
++prev;
10fffa: 83 c6 04 add $0x4,%esi
10fffd: eb 18 jmp 110017 <rtems_bdbuf_purge_dev+0xf6>
while (*prev != NULL
&& (cur == (*prev)->avl.right || (*prev)->avl.right == NULL))
{
/* Up */
cur = *prev;
--prev;
10ffff: 83 ee 04 sub $0x4,%esi
110002: 89 c3 mov %eax,%ebx
*prev = cur;
cur = cur->avl.right;
}
else
{
while (*prev != NULL
110004: 8b 06 mov (%esi),%eax
110006: 85 c0 test %eax,%eax
110008: 74 0d je 110017 <rtems_bdbuf_purge_dev+0xf6>
&& (cur == (*prev)->avl.right || (*prev)->avl.right == NULL))
11000a: 8b 48 0c mov 0xc(%eax),%ecx
11000d: 39 cb cmp %ecx,%ebx
11000f: 74 ee je 10ffff <rtems_bdbuf_purge_dev+0xde>
110011: 85 c9 test %ecx,%ecx
110013: 74 ea je 10ffff <rtems_bdbuf_purge_dev+0xde>
cur = *prev;
--prev;
}
if (*prev != NULL)
/* Right */
cur = (*prev)->avl.right;
110015: 89 c8 mov %ecx,%eax
110017: 89 c3 mov %eax,%ebx
rtems_bdbuf_buffer **prev = stack;
rtems_bdbuf_buffer *cur = bdbuf_cache.tree;
*prev = NULL;
while (cur != NULL)
110019: 85 db test %ebx,%ebx
11001b: 0f 85 60 ff ff ff jne 10ff81 <rtems_bdbuf_purge_dev+0x60>
}
static void
rtems_bdbuf_purge_list (rtems_chain_control *purge_list)
{
bool wake_buffer_waiters = false;
110021: 31 f6 xor %esi,%esi
110023: eb 25 jmp 11004a <rtems_bdbuf_purge_dev+0x129>
while ((node = rtems_chain_get_unprotected (purge_list)) != NULL)
{
rtems_bdbuf_buffer *bd = (rtems_bdbuf_buffer *) node;
if (bd->waiters == 0)
110025: 8b 43 24 mov 0x24(%ebx),%eax
110028: 85 c0 test %eax,%eax
11002a: 75 05 jne 110031 <rtems_bdbuf_purge_dev+0x110>
wake_buffer_waiters = true;
11002c: be 01 00 00 00 mov $0x1,%esi
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
110031: c7 43 20 01 00 00 00 movl $0x1,0x20(%ebx)
static void
rtems_bdbuf_discard_buffer (rtems_bdbuf_buffer *bd)
{
rtems_bdbuf_make_empty (bd);
if (bd->waiters == 0)
110038: 85 c0 test %eax,%eax
11003a: 75 0e jne 11004a <rtems_bdbuf_purge_dev+0x129>
{
rtems_bdbuf_remove_from_tree (bd);
11003c: 89 d8 mov %ebx,%eax
11003e: e8 39 e6 ff ff call 10e67c <rtems_bdbuf_remove_from_tree>
rtems_bdbuf_make_free_and_add_to_lru_list (bd);
110043: 89 d8 mov %ebx,%eax
110045: e8 c7 e8 ff ff call 10e911 <rtems_bdbuf_make_free_and_add_to_lru_list>
11004a: 8d 85 5c ff ff ff lea -0xa4(%ebp),%eax
110050: e8 33 e3 ff ff call 10e388 <_Chain_Get_unprotected>
110055: 89 c3 mov %eax,%ebx
rtems_bdbuf_purge_list (rtems_chain_control *purge_list)
{
bool wake_buffer_waiters = false;
rtems_chain_node *node = NULL;
while ((node = rtems_chain_get_unprotected (purge_list)) != NULL)
110057: 85 c0 test %eax,%eax
110059: 75 ca jne 110025 <rtems_bdbuf_purge_dev+0x104>
wake_buffer_waiters = true;
rtems_bdbuf_discard_buffer (bd);
}
if (wake_buffer_waiters)
11005b: 89 f0 mov %esi,%eax
11005d: 84 c0 test %al,%al
11005f: 74 0a je 11006b <rtems_bdbuf_purge_dev+0x14a>
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
110061: b8 34 21 13 00 mov $0x132134,%eax
110066: e8 9a e5 ff ff call 10e605 <rtems_bdbuf_wake>
rtems_chain_initialize_empty (&purge_list);
rtems_bdbuf_lock_cache ();
rtems_bdbuf_read_ahead_reset (dd);
rtems_bdbuf_gather_for_purge (&purge_list, dd);
rtems_bdbuf_purge_list (&purge_list);
rtems_bdbuf_unlock_cache ();
11006b: e8 a0 e3 ff ff call 10e410 <rtems_bdbuf_unlock_cache>
}
110070: 8d 65 f4 lea -0xc(%ebp),%esp
110073: 5b pop %ebx
110074: 5e pop %esi
110075: 5f pop %edi
110076: 5d pop %ebp
110077: c3 ret
0010fba5 <rtems_bdbuf_read>:
rtems_status_code
rtems_bdbuf_read (rtems_disk_device *dd,
rtems_blkdev_bnum block,
rtems_bdbuf_buffer **bd_ptr)
{
10fba5: 55 push %ebp
10fba6: 89 e5 mov %esp,%ebp
10fba8: 57 push %edi
10fba9: 56 push %esi
10fbaa: 53 push %ebx
10fbab: 83 ec 1c sub $0x1c,%esp
10fbae: 8b 75 08 mov 0x8(%ebp),%esi
10fbb1: 8b 7d 0c mov 0xc(%ebp),%edi
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_bdbuf_buffer *bd = NULL;
rtems_blkdev_bnum media_block;
rtems_bdbuf_lock_cache ();
10fbb4: e8 12 e8 ff ff call 10e3cb <rtems_bdbuf_lock_cache>
rtems_blkdev_bnum block,
rtems_blkdev_bnum *media_block_ptr)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (block < dd->block_count)
10fbb9: 3b 7e 28 cmp 0x28(%esi),%edi
10fbbc: 0f 83 20 01 00 00 jae 10fce2 <rtems_bdbuf_read+0x13d><== NEVER TAKEN
}
static rtems_blkdev_bnum
rtems_bdbuf_media_block (const rtems_disk_device *dd, rtems_blkdev_bnum block)
{
if (dd->block_to_media_block_shift >= 0)
10fbc2: 8b 4e 30 mov 0x30(%esi),%ecx
return block << dd->block_to_media_block_shift;
10fbc5: 89 f8 mov %edi,%eax
}
static rtems_blkdev_bnum
rtems_bdbuf_media_block (const rtems_disk_device *dd, rtems_blkdev_bnum block)
{
if (dd->block_to_media_block_shift >= 0)
10fbc7: 85 c9 test %ecx,%ecx
10fbc9: 78 04 js 10fbcf <rtems_bdbuf_read+0x2a> <== NEVER TAKEN
return block << dd->block_to_media_block_shift;
10fbcb: d3 e0 shl %cl,%eax
10fbcd: eb 14 jmp 10fbe3 <rtems_bdbuf_read+0x3e>
/*
* Change the block number for the block size to the block number for the media
* block size. We have to use 64bit maths. There is no short cut here.
*/
return (rtems_blkdev_bnum)
((((uint64_t) block) * dd->block_size) / dd->media_block_size);
10fbcf: f7 66 24 mull 0x24(%esi) <== NOT EXECUTED
10fbd2: 8b 4e 20 mov 0x20(%esi),%ecx <== NOT EXECUTED
10fbd5: 31 db xor %ebx,%ebx <== NOT EXECUTED
10fbd7: 53 push %ebx <== NOT EXECUTED
10fbd8: 51 push %ecx <== NOT EXECUTED
10fbd9: 52 push %edx <== NOT EXECUTED
10fbda: 50 push %eax <== NOT EXECUTED
10fbdb: e8 c8 0c 01 00 call 1208a8 <__udivdi3> <== NOT EXECUTED
10fbe0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
/*
* Compute the media block number. Drivers work with media block number not
* the block number a BD may have as this depends on the block size set by
* the user.
*/
*media_block_ptr = rtems_bdbuf_media_block (dd, block) + dd->start;
10fbe3: 8b 56 18 mov 0x18(%esi),%edx
10fbe6: 01 c2 add %eax,%edx
{
if (rtems_bdbuf_tracer)
printf ("bdbuf:read: %" PRIu32 " (%" PRIu32 ") (dev = %08x)\n",
media_block + dd->start, block, (unsigned) dd->dev);
bd = rtems_bdbuf_get_buffer_for_access (dd, media_block);
10fbe8: 89 f0 mov %esi,%eax
10fbea: e8 4d f1 ff ff call 10ed3c <rtems_bdbuf_get_buffer_for_access>
10fbef: 89 c3 mov %eax,%ebx
switch (bd->state)
10fbf1: 8b 40 20 mov 0x20(%eax),%eax
10fbf4: 83 f8 02 cmp $0x2,%eax
10fbf7: 74 0c je 10fc05 <rtems_bdbuf_read+0x60>
10fbf9: 83 f8 07 cmp $0x7,%eax
10fbfc: 74 13 je 10fc11 <rtems_bdbuf_read+0x6c>
10fbfe: 83 f8 01 cmp $0x1,%eax
10fc01: 75 64 jne 10fc67 <rtems_bdbuf_read+0xc2> <== NEVER TAKEN
10fc03: eb 1a jmp 10fc1f <rtems_bdbuf_read+0x7a>
{
case RTEMS_BDBUF_STATE_CACHED:
++dd->stats.read_hits;
10fc05: ff 46 44 incl 0x44(%esi)
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
10fc08: c7 43 20 03 00 00 00 movl $0x3,0x20(%ebx)
10fc0f: eb 0a jmp 10fc1b <rtems_bdbuf_read+0x76>
case RTEMS_BDBUF_STATE_CACHED:
++dd->stats.read_hits;
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_ACCESS_CACHED);
break;
case RTEMS_BDBUF_STATE_MODIFIED:
++dd->stats.read_hits;
10fc11: ff 46 44 incl 0x44(%esi)
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
10fc14: c7 43 20 04 00 00 00 movl $0x4,0x20(%ebx)
10fc1b: 31 d2 xor %edx,%edx
10fc1d: eb 54 jmp 10fc73 <rtems_bdbuf_read+0xce>
case RTEMS_BDBUF_STATE_MODIFIED:
++dd->stats.read_hits;
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_ACCESS_MODIFIED);
break;
case RTEMS_BDBUF_STATE_EMPTY:
++dd->stats.read_misses;
10fc1f: ff 46 48 incl 0x48(%esi)
static void
rtems_bdbuf_set_read_ahead_trigger (rtems_disk_device *dd,
rtems_blkdev_bnum block)
{
if (dd->read_ahead.trigger != block)
10fc22: 39 7e 6c cmp %edi,0x6c(%esi)
10fc25: 74 13 je 10fc3a <rtems_bdbuf_read+0x95>
{
rtems_bdbuf_read_ahead_cancel (dd);
10fc27: 89 f0 mov %esi,%eax
10fc29: e8 5b fa ff ff call 10f689 <rtems_bdbuf_read_ahead_cancel>
dd->read_ahead.trigger = block + 1;
10fc2e: 8d 47 01 lea 0x1(%edi),%eax
10fc31: 89 46 6c mov %eax,0x6c(%esi)
dd->read_ahead.next = block + 2;
10fc34: 8d 47 02 lea 0x2(%edi),%eax
10fc37: 89 46 70 mov %eax,0x70(%esi)
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_ACCESS_MODIFIED);
break;
case RTEMS_BDBUF_STATE_EMPTY:
++dd->stats.read_misses;
rtems_bdbuf_set_read_ahead_trigger (dd, block);
sc = rtems_bdbuf_execute_read_request (dd, bd, 1);
10fc3a: b9 01 00 00 00 mov $0x1,%ecx
10fc3f: 89 da mov %ebx,%edx
10fc41: 89 f0 mov %esi,%eax
10fc43: e8 63 f8 ff ff call 10f4ab <rtems_bdbuf_execute_read_request>
10fc48: 89 c2 mov %eax,%edx
if (sc == RTEMS_SUCCESSFUL)
10fc4a: 85 c0 test %eax,%eax
10fc4c: 75 23 jne 10fc71 <rtems_bdbuf_read+0xcc>
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
10fc4e: c7 43 20 03 00 00 00 movl $0x3,0x20(%ebx)
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
10fc55: 8b 0b mov (%ebx),%ecx
previous = the_node->previous;
10fc57: 8b 43 04 mov 0x4(%ebx),%eax
next->previous = previous;
10fc5a: 89 41 04 mov %eax,0x4(%ecx)
previous->next = next;
10fc5d: 89 08 mov %ecx,(%eax)
void rtems_bdbuf_reset_device_stats (rtems_disk_device *dd)
{
rtems_bdbuf_lock_cache ();
memset (&dd->stats, 0, sizeof(dd->stats));
rtems_bdbuf_unlock_cache ();
}
10fc5f: 8b 43 28 mov 0x28(%ebx),%eax
}
static void
rtems_bdbuf_group_obtain (rtems_bdbuf_buffer *bd)
{
++bd->group->users;
10fc62: ff 40 0c incl 0xc(%eax)
10fc65: eb 0c jmp 10fc73 <rtems_bdbuf_read+0xce>
{
bd = NULL;
}
break;
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_4);
10fc67: ba 02 00 00 42 mov $0x42000002,%edx <== NOT EXECUTED
10fc6c: e8 6a e7 ff ff call 10e3db <rtems_bdbuf_fatal> <== NOT EXECUTED
rtems_chain_extract_unprotected (&bd->link);
rtems_bdbuf_group_obtain (bd);
}
else
{
bd = NULL;
10fc71: 31 db xor %ebx,%ebx
static void
rtems_bdbuf_check_read_ahead_trigger (rtems_disk_device *dd,
rtems_blkdev_bnum block)
{
if (bdbuf_cache.read_ahead_task != 0
10fc73: a1 44 21 13 00 mov 0x132144,%eax
10fc78: 85 c0 test %eax,%eax
10fc7a: 74 6d je 10fce9 <rtems_bdbuf_read+0x144>
&& dd->read_ahead.trigger == block
10fc7c: 39 7e 6c cmp %edi,0x6c(%esi)
10fc7f: 75 68 jne 10fce9 <rtems_bdbuf_read+0x144>
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_node_off_chain(
const Chain_Node *node
)
{
return (node->next == NULL) && (node->previous == NULL);
10fc81: 31 c9 xor %ecx,%ecx
10fc83: 83 7e 64 00 cmpl $0x0,0x64(%esi)
10fc87: 75 09 jne 10fc92 <rtems_bdbuf_read+0xed> <== NEVER TAKEN
10fc89: 31 c9 xor %ecx,%ecx
10fc8b: 83 7e 68 00 cmpl $0x0,0x68(%esi)
10fc8f: 0f 94 c1 sete %cl
&& !rtems_bdbuf_is_read_ahead_active (dd))
10fc92: 85 c9 test %ecx,%ecx
10fc94: 74 53 je 10fce9 <rtems_bdbuf_read+0x144><== NEVER TAKEN
{
rtems_status_code sc;
rtems_chain_control *chain = &bdbuf_cache.read_ahead_chain;
if (rtems_chain_is_empty (chain))
10fc96: 81 3d 48 21 13 00 4c cmpl $0x13214c,0x132148
10fc9d: 21 13 00
10fca0: 75 24 jne 10fcc6 <rtems_bdbuf_read+0x121><== NEVER TAKEN
{
sc = rtems_event_send (bdbuf_cache.read_ahead_task,
10fca2: 51 push %ecx
10fca3: 51 push %ecx
10fca4: 6a 02 push $0x2
10fca6: 50 push %eax
10fca7: 89 55 e4 mov %edx,-0x1c(%ebp)
10fcaa: e8 b9 ac ff ff call 10a968 <rtems_event_send>
RTEMS_BDBUF_READ_AHEAD_WAKE_UP);
if (sc != RTEMS_SUCCESSFUL)
10fcaf: 83 c4 10 add $0x10,%esp
10fcb2: 85 c0 test %eax,%eax
10fcb4: 8b 55 e4 mov -0x1c(%ebp),%edx
10fcb7: 74 0d je 10fcc6 <rtems_bdbuf_read+0x121><== ALWAYS TAKEN
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_RA_WAKE_UP);
10fcb9: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10fcbc: 68 1f 00 00 42 push $0x4200001f <== NOT EXECUTED
10fcc1: e8 4a b6 ff ff call 10b310 <rtems_fatal_error_occurred><== NOT EXECUTED
}
rtems_chain_append_unprotected (chain, &dd->read_ahead.node);
10fcc6: 8d 4e 64 lea 0x64(%esi),%ecx
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
10fcc9: a1 50 21 13 00 mov 0x132150,%eax
the_node->next = tail;
10fcce: c7 46 64 4c 21 13 00 movl $0x13214c,0x64(%esi)
tail->previous = the_node;
10fcd5: 89 0d 50 21 13 00 mov %ecx,0x132150
old_last->next = the_node;
10fcdb: 89 08 mov %ecx,(%eax)
the_node->previous = old_last;
10fcdd: 89 46 68 mov %eax,0x68(%esi)
10fce0: eb 07 jmp 10fce9 <rtems_bdbuf_read+0x144>
rtems_bdbuf_read (rtems_disk_device *dd,
rtems_blkdev_bnum block,
rtems_bdbuf_buffer **bd_ptr)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_bdbuf_buffer *bd = NULL;
10fce2: 31 db xor %ebx,%ebx
*/
*media_block_ptr = rtems_bdbuf_media_block (dd, block) + dd->start;
}
else
{
sc = RTEMS_INVALID_ID;
10fce4: ba 04 00 00 00 mov $0x4,%edx <== NOT EXECUTED
}
rtems_bdbuf_check_read_ahead_trigger (dd, block);
}
rtems_bdbuf_unlock_cache ();
10fce9: 89 55 e4 mov %edx,-0x1c(%ebp)
10fcec: e8 1f e7 ff ff call 10e410 <rtems_bdbuf_unlock_cache>
*bd_ptr = bd;
10fcf1: 8b 45 10 mov 0x10(%ebp),%eax
10fcf4: 89 18 mov %ebx,(%eax)
return sc;
}
10fcf6: 8b 55 e4 mov -0x1c(%ebp),%edx
10fcf9: 89 d0 mov %edx,%eax
10fcfb: 8d 65 f4 lea -0xc(%ebp),%esp
10fcfe: 5b pop %ebx
10fcff: 5e pop %esi
10fd00: 5f pop %edi
10fd01: 5d pop %ebp
10fd02: c3 ret
0010f689 <rtems_bdbuf_read_ahead_cancel>:
return !rtems_chain_is_node_off_chain (&dd->read_ahead.node);
}
static void
rtems_bdbuf_read_ahead_cancel (rtems_disk_device *dd)
{
10f689: 55 push %ebp
10f68a: 89 e5 mov %esp,%ebp
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_node_off_chain(
const Chain_Node *node
)
{
return (node->next == NULL) && (node->previous == NULL);
10f68c: 8b 50 64 mov 0x64(%eax),%edx
10f68f: 31 c9 xor %ecx,%ecx
10f691: 85 d2 test %edx,%edx
10f693: 75 09 jne 10f69e <rtems_bdbuf_read_ahead_cancel+0x15><== NEVER TAKEN
10f695: 31 c9 xor %ecx,%ecx
10f697: 83 78 68 00 cmpl $0x0,0x68(%eax)
10f69b: 0f 94 c1 sete %cl
if (rtems_bdbuf_is_read_ahead_active (dd))
10f69e: 85 c9 test %ecx,%ecx
10f6a0: 75 16 jne 10f6b8 <rtems_bdbuf_read_ahead_cancel+0x2f><== ALWAYS TAKEN
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
10f6a2: 8b 48 68 mov 0x68(%eax),%ecx <== NOT EXECUTED
next->previous = previous;
10f6a5: 89 4a 04 mov %ecx,0x4(%edx) <== NOT EXECUTED
previous->next = next;
10f6a8: 89 11 mov %edx,(%ecx) <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Set_off_chain(
Chain_Node *node
)
{
node->next = node->previous = NULL;
10f6aa: c7 40 68 00 00 00 00 movl $0x0,0x68(%eax) <== NOT EXECUTED
10f6b1: c7 40 64 00 00 00 00 movl $0x0,0x64(%eax) <== NOT EXECUTED
{
rtems_chain_extract_unprotected (&dd->read_ahead.node);
rtems_chain_set_off_chain (&dd->read_ahead.node);
}
}
10f6b8: 5d pop %ebp
10f6b9: c3 ret
0010f57e <rtems_bdbuf_read_ahead_task>:
return sc;
}
static rtems_task
rtems_bdbuf_read_ahead_task (rtems_task_argument arg)
{
10f57e: 55 push %ebp
10f57f: 89 e5 mov %esp,%ebp
10f581: 57 push %edi
10f582: 56 push %esi
10f583: 53 push %ebx
10f584: 83 ec 2c sub $0x2c,%esp
uint32_t max_transfer_count = bdbuf_config.max_read_ahead_blocks;
if (transfer_count >= max_transfer_count)
{
transfer_count = max_transfer_count;
dd->read_ahead.trigger = block + transfer_count / 2;
10f587: a1 4c 14 12 00 mov 0x12144c,%eax
10f58c: d1 e8 shr %eax
10f58e: 89 45 dc mov %eax,-0x24(%ebp)
static rtems_task
rtems_bdbuf_read_ahead_task (rtems_task_argument arg)
{
rtems_chain_control *chain = &bdbuf_cache.read_ahead_chain;
while (bdbuf_cache.read_ahead_enabled)
10f591: e9 d3 00 00 00 jmp 10f669 <rtems_bdbuf_read_ahead_task+0xeb>
{
rtems_chain_node *node;
rtems_bdbuf_wait_for_event (RTEMS_BDBUF_READ_AHEAD_WAKE_UP);
10f596: b8 02 00 00 00 mov $0x2,%eax
10f59b: e8 c8 ee ff ff call 10e468 <rtems_bdbuf_wait_for_event>
rtems_bdbuf_lock_cache ();
10f5a0: e8 26 ee ff ff call 10e3cb <rtems_bdbuf_lock_cache>
while ((node = rtems_chain_get_unprotected (chain)) != NULL)
10f5a5: e9 a6 00 00 00 jmp 10f650 <rtems_bdbuf_read_ahead_task+0xd2>
{
rtems_disk_device *dd = (rtems_disk_device *)
((char *) node - offsetof (rtems_disk_device, read_ahead.node));
rtems_blkdev_bnum block = dd->read_ahead.next;
10f5aa: 8b 73 0c mov 0xc(%ebx),%esi
rtems_blkdev_bnum block,
rtems_blkdev_bnum *media_block_ptr)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (block < dd->block_count)
10f5ad: 3b 73 c4 cmp -0x3c(%ebx),%esi
10f5b0: 73 36 jae 10f5e8 <rtems_bdbuf_read_ahead_task+0x6a>
}
static rtems_blkdev_bnum
rtems_bdbuf_media_block (const rtems_disk_device *dd, rtems_blkdev_bnum block)
{
if (dd->block_to_media_block_shift >= 0)
10f5b2: 8b 4b cc mov -0x34(%ebx),%ecx
10f5b5: 85 c9 test %ecx,%ecx
10f5b7: 78 06 js 10f5bf <rtems_bdbuf_read_ahead_task+0x41><== NEVER TAKEN
return block << dd->block_to_media_block_shift;
10f5b9: 89 f0 mov %esi,%eax
10f5bb: d3 e0 shl %cl,%eax
10f5bd: eb 20 jmp 10f5df <rtems_bdbuf_read_ahead_task+0x61>
/*
* Change the block number for the block size to the block number for the media
* block size. We have to use 64bit maths. There is no short cut here.
*/
return (rtems_blkdev_bnum)
((((uint64_t) block) * dd->block_size) / dd->media_block_size);
10f5bf: 8b 43 c0 mov -0x40(%ebx),%eax <== NOT EXECUTED
10f5c2: f7 e6 mul %esi <== NOT EXECUTED
10f5c4: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED
10f5c7: 89 55 d4 mov %edx,-0x2c(%ebp) <== NOT EXECUTED
10f5ca: 8b 43 bc mov -0x44(%ebx),%eax <== NOT EXECUTED
10f5cd: 31 d2 xor %edx,%edx <== NOT EXECUTED
10f5cf: 52 push %edx <== NOT EXECUTED
10f5d0: 50 push %eax <== NOT EXECUTED
10f5d1: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED
10f5d4: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED
10f5d7: e8 cc 12 01 00 call 1208a8 <__udivdi3> <== NOT EXECUTED
10f5dc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
/*
* Compute the media block number. Drivers work with media block number not
* the block number a BD may have as this depends on the block size set by
* the user.
*/
*media_block_ptr = rtems_bdbuf_media_block (dd, block) + dd->start;
10f5df: 8b 53 b4 mov -0x4c(%ebx),%edx
10f5e2: 01 c2 add %eax,%edx
10f5e4: 31 c0 xor %eax,%eax
10f5e6: eb 07 jmp 10f5ef <rtems_bdbuf_read_ahead_task+0x71>
while ((node = rtems_chain_get_unprotected (chain)) != NULL)
{
rtems_disk_device *dd = (rtems_disk_device *)
((char *) node - offsetof (rtems_disk_device, read_ahead.node));
rtems_blkdev_bnum block = dd->read_ahead.next;
rtems_blkdev_bnum media_block = 0;
10f5e8: 31 d2 xor %edx,%edx
*/
*media_block_ptr = rtems_bdbuf_media_block (dd, block) + dd->start;
}
else
{
sc = RTEMS_INVALID_ID;
10f5ea: b8 04 00 00 00 mov $0x4,%eax
*/
RTEMS_INLINE_ROUTINE void _Chain_Set_off_chain(
Chain_Node *node
)
{
node->next = node->previous = NULL;
10f5ef: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx)
10f5f6: c7 03 00 00 00 00 movl $0x0,(%ebx)
rtems_status_code sc =
rtems_bdbuf_get_media_block (dd, block, &media_block);
rtems_chain_set_off_chain (&dd->read_ahead.node);
if (sc == RTEMS_SUCCESSFUL)
10f5fc: 85 c0 test %eax,%eax
10f5fe: 75 49 jne 10f649 <rtems_bdbuf_read_ahead_task+0xcb>
rtems_bdbuf_wait_for_event (RTEMS_BDBUF_READ_AHEAD_WAKE_UP);
rtems_bdbuf_lock_cache ();
while ((node = rtems_chain_get_unprotected (chain)) != NULL)
{
rtems_disk_device *dd = (rtems_disk_device *)
10f600: 8d 7b 9c lea -0x64(%ebx),%edi
rtems_chain_set_off_chain (&dd->read_ahead.node);
if (sc == RTEMS_SUCCESSFUL)
{
rtems_bdbuf_buffer *bd =
10f603: 89 f8 mov %edi,%eax
10f605: e8 fc f6 ff ff call 10ed06 <rtems_bdbuf_get_buffer_for_read_ahead>
rtems_bdbuf_get_buffer_for_read_ahead (dd, media_block);
if (bd != NULL)
10f60a: 85 c0 test %eax,%eax
10f60c: 74 42 je 10f650 <rtems_bdbuf_read_ahead_task+0xd2><== NEVER TAKEN
{
uint32_t transfer_count = dd->block_count - block;
10f60e: 8b 4b c4 mov -0x3c(%ebx),%ecx
10f611: 29 f1 sub %esi,%ecx
uint32_t max_transfer_count = bdbuf_config.max_read_ahead_blocks;
if (transfer_count >= max_transfer_count)
10f613: 3b 0d 4c 14 12 00 cmp 0x12144c,%ecx
10f619: 72 19 jb 10f634 <rtems_bdbuf_read_ahead_task+0xb6>
{
transfer_count = max_transfer_count;
dd->read_ahead.trigger = block + transfer_count / 2;
10f61b: 8b 55 dc mov -0x24(%ebp),%edx
10f61e: 01 f2 add %esi,%edx
10f620: 89 53 08 mov %edx,0x8(%ebx)
dd->read_ahead.next = block + transfer_count;
10f623: 03 35 4c 14 12 00 add 0x12144c,%esi
10f629: 89 73 0c mov %esi,0xc(%ebx)
10f62c: 8b 0d 4c 14 12 00 mov 0x12144c,%ecx
10f632: eb 07 jmp 10f63b <rtems_bdbuf_read_ahead_task+0xbd>
}
else
{
dd->read_ahead.trigger = RTEMS_DISK_READ_AHEAD_NO_TRIGGER;
10f634: c7 43 08 ff ff ff ff movl $0xffffffff,0x8(%ebx)
}
++dd->stats.read_ahead_transfers;
10f63b: ff 43 e8 incl -0x18(%ebx)
rtems_bdbuf_execute_read_request (dd, bd, transfer_count);
10f63e: 89 c2 mov %eax,%edx
10f640: 89 f8 mov %edi,%eax
10f642: e8 64 fe ff ff call 10f4ab <rtems_bdbuf_execute_read_request>
10f647: eb 07 jmp 10f650 <rtems_bdbuf_read_ahead_task+0xd2>
}
}
else
{
dd->read_ahead.trigger = RTEMS_DISK_READ_AHEAD_NO_TRIGGER;
10f649: c7 43 08 ff ff ff ff movl $0xffffffff,0x8(%ebx)
10f650: b8 48 21 13 00 mov $0x132148,%eax
10f655: e8 2e ed ff ff call 10e388 <_Chain_Get_unprotected>
10f65a: 89 c3 mov %eax,%ebx
rtems_chain_node *node;
rtems_bdbuf_wait_for_event (RTEMS_BDBUF_READ_AHEAD_WAKE_UP);
rtems_bdbuf_lock_cache ();
while ((node = rtems_chain_get_unprotected (chain)) != NULL)
10f65c: 85 c0 test %eax,%eax
10f65e: 0f 85 46 ff ff ff jne 10f5aa <rtems_bdbuf_read_ahead_task+0x2c>
{
dd->read_ahead.trigger = RTEMS_DISK_READ_AHEAD_NO_TRIGGER;
}
}
rtems_bdbuf_unlock_cache ();
10f664: e8 a7 ed ff ff call 10e410 <rtems_bdbuf_unlock_cache>
static rtems_task
rtems_bdbuf_read_ahead_task (rtems_task_argument arg)
{
rtems_chain_control *chain = &bdbuf_cache.read_ahead_chain;
while (bdbuf_cache.read_ahead_enabled)
10f669: 80 3d 54 21 13 00 00 cmpb $0x0,0x132154
10f670: 0f 85 20 ff ff ff jne 10f596 <rtems_bdbuf_read_ahead_task+0x18><== ALWAYS TAKEN
}
rtems_bdbuf_unlock_cache ();
}
rtems_task_delete (RTEMS_SELF);
10f676: c7 45 08 00 00 00 00 movl $0x0,0x8(%ebp) <== NOT EXECUTED
}
10f67d: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10f680: 5b pop %ebx <== NOT EXECUTED
10f681: 5e pop %esi <== NOT EXECUTED
10f682: 5f pop %edi <== NOT EXECUTED
10f683: 5d pop %ebp <== NOT EXECUTED
}
rtems_bdbuf_unlock_cache ();
}
rtems_task_delete (RTEMS_SELF);
10f684: e9 63 b9 ff ff jmp 10afec <rtems_task_delete> <== NOT EXECUTED
0010fd03 <rtems_bdbuf_release>:
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_bdbuf_release (rtems_bdbuf_buffer *bd)
{
10fd03: 55 push %ebp
10fd04: 89 e5 mov %esp,%ebp
10fd06: 53 push %ebx
10fd07: 50 push %eax
10fd08: 8b 5d 08 mov 0x8(%ebp),%ebx
}
static rtems_status_code
rtems_bdbuf_check_bd_and_lock_cache (rtems_bdbuf_buffer *bd, const char *kind)
{
if (bd == NULL)
10fd0b: 85 db test %ebx,%ebx
10fd0d: 74 7c je 10fd8b <rtems_bdbuf_release+0x88><== NEVER TAKEN
if (rtems_bdbuf_tracer)
{
printf ("bdbuf:%s: %" PRIu32 "\n", kind, bd->block);
rtems_bdbuf_show_users (kind, bd);
}
rtems_bdbuf_lock_cache();
10fd0f: e8 b7 e6 ff ff call 10e3cb <rtems_bdbuf_lock_cache>
sc = rtems_bdbuf_check_bd_and_lock_cache (bd, "release");
if (sc != RTEMS_SUCCESSFUL)
return sc;
switch (bd->state)
10fd14: 8b 43 20 mov 0x20(%ebx),%eax
10fd17: 83 f8 04 cmp $0x4,%eax
10fd1a: 74 53 je 10fd6f <rtems_bdbuf_release+0x6c>
10fd1c: 77 07 ja 10fd25 <rtems_bdbuf_release+0x22>
10fd1e: 83 f8 03 cmp $0x3,%eax
10fd21: 75 55 jne 10fd78 <rtems_bdbuf_release+0x75><== NEVER TAKEN
10fd23: eb 07 jmp 10fd2c <rtems_bdbuf_release+0x29>
10fd25: 83 f8 06 cmp $0x6,%eax
10fd28: 77 4e ja 10fd78 <rtems_bdbuf_release+0x75><== NEVER TAKEN
10fd2a: eb 3a jmp 10fd66 <rtems_bdbuf_release+0x63>
void rtems_bdbuf_reset_device_stats (rtems_disk_device *dd)
{
rtems_bdbuf_lock_cache ();
memset (&dd->stats, 0, sizeof(dd->stats));
rtems_bdbuf_unlock_cache ();
}
10fd2c: 8b 43 28 mov 0x28(%ebx),%eax
}
static void
rtems_bdbuf_group_release (rtems_bdbuf_buffer *bd)
{
--bd->group->users;
10fd2f: ff 48 0c decl 0xc(%eax)
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
10fd32: c7 43 20 02 00 00 00 movl $0x2,0x20(%ebx)
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
10fd39: a1 08 21 13 00 mov 0x132108,%eax
the_node->next = tail;
10fd3e: c7 03 04 21 13 00 movl $0x132104,(%ebx)
tail->previous = the_node;
10fd44: 89 1d 08 21 13 00 mov %ebx,0x132108
old_last->next = the_node;
10fd4a: 89 18 mov %ebx,(%eax)
the_node->previous = old_last;
10fd4c: 89 43 04 mov %eax,0x4(%ebx)
{
rtems_bdbuf_group_release (bd);
rtems_bdbuf_make_cached_and_add_to_lru_list (bd);
if (bd->waiters)
rtems_bdbuf_wake (&bdbuf_cache.access_waiters);
10fd4f: b8 24 21 13 00 mov $0x132124,%eax
rtems_bdbuf_add_to_lru_list_after_access (rtems_bdbuf_buffer *bd)
{
rtems_bdbuf_group_release (bd);
rtems_bdbuf_make_cached_and_add_to_lru_list (bd);
if (bd->waiters)
10fd54: 83 7b 24 00 cmpl $0x0,0x24(%ebx)
10fd58: 75 05 jne 10fd5f <rtems_bdbuf_release+0x5c>
rtems_bdbuf_wake (&bdbuf_cache.access_waiters);
else
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
10fd5a: b8 34 21 13 00 mov $0x132134,%eax
10fd5f: e8 a1 e8 ff ff call 10e605 <rtems_bdbuf_wake>
10fd64: eb 1c jmp 10fd82 <rtems_bdbuf_release+0x7f>
case RTEMS_BDBUF_STATE_ACCESS_CACHED:
rtems_bdbuf_add_to_lru_list_after_access (bd);
break;
case RTEMS_BDBUF_STATE_ACCESS_EMPTY:
case RTEMS_BDBUF_STATE_ACCESS_PURGED:
rtems_bdbuf_discard_buffer_after_access (bd);
10fd66: 89 d8 mov %ebx,%eax
10fd68: e8 4d f9 ff ff call 10f6ba <rtems_bdbuf_discard_buffer_after_access>
break;
10fd6d: eb 13 jmp 10fd82 <rtems_bdbuf_release+0x7f>
case RTEMS_BDBUF_STATE_ACCESS_MODIFIED:
rtems_bdbuf_add_to_modified_list_after_access (bd);
10fd6f: 89 d8 mov %ebx,%eax
10fd71: e8 be eb ff ff call 10e934 <rtems_bdbuf_add_to_modified_list_after_access>
break;
10fd76: eb 0a jmp 10fd82 <rtems_bdbuf_release+0x7f>
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_0);
10fd78: ba 1c 00 00 42 mov $0x4200001c,%edx <== NOT EXECUTED
10fd7d: e8 59 e6 ff ff call 10e3db <rtems_bdbuf_fatal> <== NOT EXECUTED
}
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_usage ();
rtems_bdbuf_unlock_cache ();
10fd82: e8 89 e6 ff ff call 10e410 <rtems_bdbuf_unlock_cache>
return RTEMS_SUCCESSFUL;
10fd87: 31 c0 xor %eax,%eax
10fd89: eb 05 jmp 10fd90 <rtems_bdbuf_release+0x8d>
static rtems_status_code
rtems_bdbuf_check_bd_and_lock_cache (rtems_bdbuf_buffer *bd, const char *kind)
{
if (bd == NULL)
return RTEMS_INVALID_ADDRESS;
10fd8b: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
rtems_bdbuf_show_usage ();
rtems_bdbuf_unlock_cache ();
return RTEMS_SUCCESSFUL;
}
10fd90: 5b pop %ebx
10fd91: 5b pop %ebx
10fd92: 5d pop %ebp
10fd93: c3 ret
0010fd94 <rtems_bdbuf_release_modified>:
rtems_status_code
rtems_bdbuf_release_modified (rtems_bdbuf_buffer *bd)
{
10fd94: 55 push %ebp
10fd95: 89 e5 mov %esp,%ebp
10fd97: 83 ec 18 sub $0x18,%esp
10fd9a: 8b 45 08 mov 0x8(%ebp),%eax
}
static rtems_status_code
rtems_bdbuf_check_bd_and_lock_cache (rtems_bdbuf_buffer *bd, const char *kind)
{
if (bd == NULL)
10fd9d: 85 c0 test %eax,%eax
10fd9f: 74 42 je 10fde3 <rtems_bdbuf_release_modified+0x4f><== NEVER TAKEN
if (rtems_bdbuf_tracer)
{
printf ("bdbuf:%s: %" PRIu32 "\n", kind, bd->block);
rtems_bdbuf_show_users (kind, bd);
}
rtems_bdbuf_lock_cache();
10fda1: 89 45 f4 mov %eax,-0xc(%ebp)
10fda4: e8 22 e6 ff ff call 10e3cb <rtems_bdbuf_lock_cache>
sc = rtems_bdbuf_check_bd_and_lock_cache (bd, "release modified");
if (sc != RTEMS_SUCCESSFUL)
return sc;
switch (bd->state)
10fda9: 8b 45 f4 mov -0xc(%ebp),%eax
10fdac: 8b 48 20 mov 0x20(%eax),%ecx
10fdaf: 83 f9 03 cmp $0x3,%ecx
10fdb2: 72 1a jb 10fdce <rtems_bdbuf_release_modified+0x3a>
10fdb4: 83 f9 05 cmp $0x5,%ecx
10fdb7: 76 07 jbe 10fdc0 <rtems_bdbuf_release_modified+0x2c>
10fdb9: 83 f9 06 cmp $0x6,%ecx
10fdbc: 75 10 jne 10fdce <rtems_bdbuf_release_modified+0x3a><== NEVER TAKEN
10fdbe: eb 07 jmp 10fdc7 <rtems_bdbuf_release_modified+0x33>
{
case RTEMS_BDBUF_STATE_ACCESS_CACHED:
case RTEMS_BDBUF_STATE_ACCESS_EMPTY:
case RTEMS_BDBUF_STATE_ACCESS_MODIFIED:
rtems_bdbuf_add_to_modified_list_after_access (bd);
10fdc0: e8 6f eb ff ff call 10e934 <rtems_bdbuf_add_to_modified_list_after_access>
break;
10fdc5: eb 13 jmp 10fdda <rtems_bdbuf_release_modified+0x46>
case RTEMS_BDBUF_STATE_ACCESS_PURGED:
rtems_bdbuf_discard_buffer_after_access (bd);
10fdc7: e8 ee f8 ff ff call 10f6ba <rtems_bdbuf_discard_buffer_after_access>
break;
10fdcc: eb 0c jmp 10fdda <rtems_bdbuf_release_modified+0x46>
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_6);
10fdce: ba 04 00 00 42 mov $0x42000004,%edx
10fdd3: 89 c8 mov %ecx,%eax
10fdd5: e8 01 e6 ff ff call 10e3db <rtems_bdbuf_fatal>
}
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_usage ();
rtems_bdbuf_unlock_cache ();
10fdda: e8 31 e6 ff ff call 10e410 <rtems_bdbuf_unlock_cache>
return RTEMS_SUCCESSFUL;
10fddf: 31 c0 xor %eax,%eax
10fde1: eb 05 jmp 10fde8 <rtems_bdbuf_release_modified+0x54>
static rtems_status_code
rtems_bdbuf_check_bd_and_lock_cache (rtems_bdbuf_buffer *bd, const char *kind)
{
if (bd == NULL)
return RTEMS_INVALID_ADDRESS;
10fde3: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
rtems_bdbuf_show_usage ();
rtems_bdbuf_unlock_cache ();
return RTEMS_SUCCESSFUL;
}
10fde8: c9 leave
10fde9: c3 ret
0010e67c <rtems_bdbuf_remove_from_tree>:
return bdbuf_cache.buffer_waiters.count;
}
static void
rtems_bdbuf_remove_from_tree (rtems_bdbuf_buffer *bd)
{
10e67c: 55 push %ebp
10e67d: 89 e5 mov %esp,%ebp
10e67f: 57 push %edi
10e680: 56 push %esi
10e681: 53 push %ebx
10e682: 81 ec 9c 00 00 00 sub $0x9c,%esp
10e688: 89 c3 mov %eax,%ebx
*/
static int
rtems_bdbuf_avl_remove(rtems_bdbuf_buffer** root,
const rtems_bdbuf_buffer* node)
{
const rtems_disk_device *dd = node->dd;
10e68a: 8b 50 14 mov 0x14(%eax),%edx
10e68d: 89 95 64 ff ff ff mov %edx,-0x9c(%ebp)
rtems_blkdev_bnum block = node->block;
10e693: 8b 50 18 mov 0x18(%eax),%edx
10e696: 89 95 60 ff ff ff mov %edx,-0xa0(%ebp)
rtems_bdbuf_buffer* p = *root;
10e69c: 8b 15 fc 20 13 00 mov 0x1320fc,%edx
rtems_bdbuf_buffer* buf_stack[RTEMS_BDBUF_AVL_MAX_HEIGHT];
rtems_bdbuf_buffer** buf_prev = buf_stack;
bool modified = false;
memset (buf_stack, 0, sizeof(buf_stack));
10e6a2: 8d b5 68 ff ff ff lea -0x98(%ebp),%esi
10e6a8: b9 20 00 00 00 mov $0x20,%ecx
10e6ad: 31 c0 xor %eax,%eax
10e6af: 89 f7 mov %esi,%edi
10e6b1: f3 ab rep stos %eax,%es:(%edi)
10e6b3: eb 3f jmp 10e6f4 <rtems_bdbuf_remove_from_tree+0x78>
while (p != NULL)
{
*buf_prev++ = p;
10e6b5: 89 16 mov %edx,(%esi)
10e6b7: 8d 4e 04 lea 0x4(%esi),%ecx
10e6ba: 89 8d 5c ff ff ff mov %ecx,-0xa4(%ebp)
if (((uintptr_t) p->dd < (uintptr_t) dd)
10e6c0: 8b bd 64 ff ff ff mov -0x9c(%ebp),%edi
10e6c6: 39 7a 14 cmp %edi,0x14(%edx)
10e6c9: 72 0d jb 10e6d8 <rtems_bdbuf_remove_from_tree+0x5c><== NEVER TAKEN
|| ((p->dd == dd) && (p->block < block)))
10e6cb: 75 1a jne 10e6e7 <rtems_bdbuf_remove_from_tree+0x6b><== NEVER TAKEN
10e6cd: 8b 85 60 ff ff ff mov -0xa0(%ebp),%eax
10e6d3: 39 42 18 cmp %eax,0x18(%edx)
10e6d6: 73 09 jae 10e6e1 <rtems_bdbuf_remove_from_tree+0x65>
{
p->avl.cache = 1;
10e6d8: c6 42 10 01 movb $0x1,0x10(%edx)
p = p->avl.right;
10e6dc: 8b 52 0c mov 0xc(%edx),%edx
10e6df: eb 0d jmp 10e6ee <rtems_bdbuf_remove_from_tree+0x72>
}
else if ((p->dd != dd) || (p->block != block))
10e6e1: 0f 84 02 02 00 00 je 10e8e9 <rtems_bdbuf_remove_from_tree+0x26d>
{
p->avl.cache = -1;
10e6e7: c6 42 10 ff movb $0xff,0x10(%edx)
p = p->avl.left;
10e6eb: 8b 52 08 mov 0x8(%edx),%edx
memset (buf_stack, 0, sizeof(buf_stack));
while (p != NULL)
{
*buf_prev++ = p;
10e6ee: 8b b5 5c ff ff ff mov -0xa4(%ebp),%esi
bool modified = false;
memset (buf_stack, 0, sizeof(buf_stack));
while (p != NULL)
10e6f4: 85 d2 test %edx,%edx
10e6f6: 75 bd jne 10e6b5 <rtems_bdbuf_remove_from_tree+0x39><== ALWAYS TAKEN
static void
rtems_bdbuf_remove_from_tree (rtems_bdbuf_buffer *bd)
{
if (rtems_bdbuf_avl_remove (&bdbuf_cache.tree, bd) != 0)
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_TREE_RM);
10e6f8: 8b 43 20 mov 0x20(%ebx),%eax <== NOT EXECUTED
10e6fb: ba 09 00 00 42 mov $0x42000009,%edx <== NOT EXECUTED
10e700: e8 d6 fc ff ff call 10e3db <rtems_bdbuf_fatal> <== NOT EXECUTED
q = p;
buf_prev--;
if (buf_prev > buf_stack)
{
p = *(buf_prev - 1);
10e705: 8b 8d 5c ff ff ff mov -0xa4(%ebp),%ecx
10e70b: 8b 49 f8 mov -0x8(%ecx),%ecx
10e70e: 89 8d 58 ff ff ff mov %ecx,-0xa8(%ebp)
{
p = NULL;
}
/* at this moment q - is a node to delete, p is q's parent */
if (q->avl.right == NULL)
10e714: 8b 42 0c mov 0xc(%edx),%eax
10e717: 85 c0 test %eax,%eax
10e719: 75 0d jne 10e728 <rtems_bdbuf_remove_from_tree+0xac>
{
r = q->avl.left;
10e71b: 8b 42 08 mov 0x8(%edx),%eax
if (r != NULL)
10e71e: 85 c0 test %eax,%eax
10e720: 74 7b je 10e79d <rtems_bdbuf_remove_from_tree+0x121>
{
r->avl.bal = 0;
10e722: c6 40 11 00 movb $0x0,0x11(%eax)
10e726: eb 75 jmp 10e79d <rtems_bdbuf_remove_from_tree+0x121>
{
rtems_bdbuf_buffer **t;
r = q->avl.right;
if (r->avl.left == NULL)
10e728: 83 78 08 00 cmpl $0x0,0x8(%eax)
10e72c: 74 10 je 10e73e <rtems_bdbuf_remove_from_tree+0xc2>
10e72e: 89 c3 mov %eax,%ebx
10e730: 89 85 60 ff ff ff mov %eax,-0xa0(%ebp)
10e736: 8b b5 5c ff ff ff mov -0xa4(%ebp),%esi
10e73c: eb 2e jmp 10e76c <rtems_bdbuf_remove_from_tree+0xf0>
{
r->avl.left = q->avl.left;
10e73e: 8b 5a 08 mov 0x8(%edx),%ebx
10e741: 89 58 08 mov %ebx,0x8(%eax)
r->avl.bal = q->avl.bal;
10e744: 8a 52 11 mov 0x11(%edx),%dl
10e747: 88 50 11 mov %dl,0x11(%eax)
r->avl.cache = 1;
10e74a: c6 40 10 01 movb $0x1,0x10(%eax)
*buf_prev++ = q = r;
10e74e: 8b bd 5c ff ff ff mov -0xa4(%ebp),%edi
10e754: 89 47 fc mov %eax,-0x4(%edi)
10e757: 89 fe mov %edi,%esi
10e759: eb 42 jmp 10e79d <rtems_bdbuf_remove_from_tree+0x121>
t = buf_prev++;
s = r;
while (s->avl.left != NULL)
{
*buf_prev++ = r = s;
10e75b: 89 1e mov %ebx,(%esi)
10e75d: 83 c6 04 add $0x4,%esi
s = r->avl.left;
r->avl.cache = -1;
10e760: c6 43 10 ff movb $0xff,0x10(%ebx)
s = r;
while (s->avl.left != NULL)
{
*buf_prev++ = r = s;
s = r->avl.left;
10e764: 89 9d 60 ff ff ff mov %ebx,-0xa0(%ebp)
10e76a: 89 fb mov %edi,%ebx
else
{
t = buf_prev++;
s = r;
while (s->avl.left != NULL)
10e76c: 8b 7b 08 mov 0x8(%ebx),%edi
10e76f: 85 ff test %edi,%edi
10e771: 75 e8 jne 10e75b <rtems_bdbuf_remove_from_tree+0xdf>
*buf_prev++ = r = s;
s = r->avl.left;
r->avl.cache = -1;
}
s->avl.left = q->avl.left;
10e773: 8b 7a 08 mov 0x8(%edx),%edi
10e776: 89 7b 08 mov %edi,0x8(%ebx)
r->avl.left = s->avl.right;
10e779: 8b 7b 0c mov 0xc(%ebx),%edi
10e77c: 8b 8d 60 ff ff ff mov -0xa0(%ebp),%ecx
10e782: 89 79 08 mov %edi,0x8(%ecx)
s->avl.right = q->avl.right;
10e785: 89 43 0c mov %eax,0xc(%ebx)
s->avl.bal = q->avl.bal;
10e788: 8a 42 11 mov 0x11(%edx),%al
10e78b: 88 43 11 mov %al,0x11(%ebx)
s->avl.cache = 1;
10e78e: c6 43 10 01 movb $0x1,0x10(%ebx)
*t = q = s;
10e792: 8b 85 5c ff ff ff mov -0xa4(%ebp),%eax
10e798: 89 58 fc mov %ebx,-0x4(%eax)
10e79b: 89 d8 mov %ebx,%eax
}
}
if (p != NULL)
10e79d: 83 bd 58 ff ff ff 00 cmpl $0x0,-0xa8(%ebp)
10e7a4: 74 2f je 10e7d5 <rtems_bdbuf_remove_from_tree+0x159>
{
if (p->avl.cache == -1)
10e7a6: 8b 95 58 ff ff ff mov -0xa8(%ebp),%edx
10e7ac: 80 7a 10 ff cmpb $0xff,0x10(%edx)
10e7b0: 75 18 jne 10e7ca <rtems_bdbuf_remove_from_tree+0x14e>
{
p->avl.left = q;
10e7b2: 89 42 08 mov %eax,0x8(%edx)
default:
break;
}
}
if (buf_prev > buf_stack)
10e7b5: 8d 8d 68 ff ff ff lea -0x98(%ebp),%ecx
10e7bb: 89 8d 64 ff ff ff mov %ecx,-0x9c(%ebp)
modified = true;
while (modified)
{
if (buf_prev > buf_stack)
10e7c1: 39 ce cmp %ecx,%esi
10e7c3: 77 17 ja 10e7dc <rtems_bdbuf_remove_from_tree+0x160>
10e7c5: e9 3c 01 00 00 jmp 10e906 <rtems_bdbuf_remove_from_tree+0x28a>
{
p->avl.left = q;
}
else
{
p->avl.right = q;
10e7ca: 8b bd 58 ff ff ff mov -0xa8(%ebp),%edi
10e7d0: 89 47 0c mov %eax,0xc(%edi)
10e7d3: eb e0 jmp 10e7b5 <rtems_bdbuf_remove_from_tree+0x139>
}
}
else
{
*root = q;
10e7d5: a3 fc 20 13 00 mov %eax,0x1320fc
10e7da: eb d9 jmp 10e7b5 <rtems_bdbuf_remove_from_tree+0x139>
while (modified)
{
if (buf_prev > buf_stack)
{
p = *--buf_prev;
10e7dc: 83 ee 04 sub $0x4,%esi
10e7df: 8b 06 mov (%esi),%eax
else
{
break;
}
if (p->avl.cache == -1)
10e7e1: 80 78 10 ff cmpb $0xff,0x10(%eax)
10e7e5: 8a 50 11 mov 0x11(%eax),%dl
10e7e8: 75 65 jne 10e84f <rtems_bdbuf_remove_from_tree+0x1d3>
{
/* rebalance left branch */
switch (p->avl.bal)
10e7ea: 84 d2 test %dl,%dl
10e7ec: 74 0f je 10e7fd <rtems_bdbuf_remove_from_tree+0x181>
10e7ee: 80 fa 01 cmp $0x1,%dl
10e7f1: 74 10 je 10e803 <rtems_bdbuf_remove_from_tree+0x187>
10e7f3: fe c2 inc %dl
10e7f5: 0f 85 c0 00 00 00 jne 10e8bb <rtems_bdbuf_remove_from_tree+0x23f><== NEVER TAKEN
10e7fb: eb 61 jmp 10e85e <rtems_bdbuf_remove_from_tree+0x1e2>
{
case -1:
p->avl.bal = 0;
break;
case 0:
p->avl.bal = 1;
10e7fd: c6 40 11 01 movb $0x1,0x11(%eax)
10e801: eb 1a jmp 10e81d <rtems_bdbuf_remove_from_tree+0x1a1>
modified = false;
break;
case +1:
p1 = p->avl.right;
10e803: 8b 50 0c mov 0xc(%eax),%edx
if (p1->avl.bal >= 0) /* simple RR-turn */
10e806: 80 7a 11 00 cmpb $0x0,0x11(%edx)
10e80a: 8b 5a 08 mov 0x8(%edx),%ebx
10e80d: 7c 15 jl 10e824 <rtems_bdbuf_remove_from_tree+0x1a8>
{
p->avl.right = p1->avl.left;
10e80f: 89 58 0c mov %ebx,0xc(%eax)
p1->avl.left = p;
10e812: 89 42 08 mov %eax,0x8(%edx)
if (p1->avl.bal == 0)
10e815: 75 6d jne 10e884 <rtems_bdbuf_remove_from_tree+0x208>
{
p1->avl.bal = -1;
10e817: c6 42 11 ff movb $0xff,0x11(%edx)
10e81b: 89 d0 mov %edx,%eax
modified = false;
10e81d: 31 d2 xor %edx,%edx
10e81f: e9 99 00 00 00 jmp 10e8bd <rtems_bdbuf_remove_from_tree+0x241>
}
else /* double RL-turn */
{
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
10e824: 8b 7b 0c mov 0xc(%ebx),%edi
10e827: 89 7a 08 mov %edi,0x8(%edx)
p2->avl.right = p1;
10e82a: 89 53 0c mov %edx,0xc(%ebx)
p->avl.right = p2->avl.left;
10e82d: 8b 7b 08 mov 0x8(%ebx),%edi
10e830: 89 78 0c mov %edi,0xc(%eax)
p2->avl.left = p;
10e833: 89 43 08 mov %eax,0x8(%ebx)
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
10e836: 80 7b 11 01 cmpb $0x1,0x11(%ebx)
10e83a: 0f 95 c1 setne %cl
10e83d: 89 cf mov %ecx,%edi
10e83f: 4f dec %edi
10e840: 89 f9 mov %edi,%ecx
10e842: 88 48 11 mov %cl,0x11(%eax)
if (p2->avl.bal == -1) p1->avl.bal = 1; else p1->avl.bal = 0;
10e845: 80 7b 11 ff cmpb $0xff,0x11(%ebx)
10e849: 0f 94 42 11 sete 0x11(%edx)
10e84d: eb 66 jmp 10e8b5 <rtems_bdbuf_remove_from_tree+0x239>
}
}
else
{
/* rebalance right branch */
switch (p->avl.bal)
10e84f: 84 d2 test %dl,%dl
10e851: 74 11 je 10e864 <rtems_bdbuf_remove_from_tree+0x1e8>
10e853: 80 fa 01 cmp $0x1,%dl
10e856: 74 06 je 10e85e <rtems_bdbuf_remove_from_tree+0x1e2>
10e858: fe c2 inc %dl
10e85a: 75 5f jne 10e8bb <rtems_bdbuf_remove_from_tree+0x23f><== NEVER TAKEN
10e85c: eb 0c jmp 10e86a <rtems_bdbuf_remove_from_tree+0x1ee>
{
case +1:
p->avl.bal = 0;
10e85e: c6 40 11 00 movb $0x0,0x11(%eax)
10e862: eb 57 jmp 10e8bb <rtems_bdbuf_remove_from_tree+0x23f>
break;
case 0:
p->avl.bal = -1;
10e864: c6 40 11 ff movb $0xff,0x11(%eax)
10e868: eb b3 jmp 10e81d <rtems_bdbuf_remove_from_tree+0x1a1>
modified = false;
break;
case -1:
p1 = p->avl.left;
10e86a: 8b 50 08 mov 0x8(%eax),%edx
if (p1->avl.bal <= 0) /* simple LL-turn */
10e86d: 80 7a 11 00 cmpb $0x0,0x11(%edx)
10e871: 8b 5a 0c mov 0xc(%edx),%ebx
10e874: 7f 1a jg 10e890 <rtems_bdbuf_remove_from_tree+0x214>
{
p->avl.left = p1->avl.right;
10e876: 89 58 08 mov %ebx,0x8(%eax)
p1->avl.right = p;
10e879: 89 42 0c mov %eax,0xc(%edx)
if (p1->avl.bal == 0)
10e87c: 75 06 jne 10e884 <rtems_bdbuf_remove_from_tree+0x208><== NEVER TAKEN
{
p1->avl.bal = 1;
10e87e: c6 42 11 01 movb $0x1,0x11(%edx)
10e882: eb 97 jmp 10e81b <rtems_bdbuf_remove_from_tree+0x19f>
modified = false;
}
else
{
p->avl.bal = 0;
10e884: c6 40 11 00 movb $0x0,0x11(%eax)
p1->avl.bal = 0;
10e888: c6 42 11 00 movb $0x0,0x11(%edx)
10e88c: 89 d0 mov %edx,%eax
10e88e: eb 2b jmp 10e8bb <rtems_bdbuf_remove_from_tree+0x23f>
}
else /* double LR-turn */
{
p2 = p1->avl.right;
p1->avl.right = p2->avl.left;
10e890: 8b 7b 08 mov 0x8(%ebx),%edi
10e893: 89 7a 0c mov %edi,0xc(%edx)
p2->avl.left = p1;
10e896: 89 53 08 mov %edx,0x8(%ebx)
p->avl.left = p2->avl.right;
10e899: 8b 7b 0c mov 0xc(%ebx),%edi
10e89c: 89 78 08 mov %edi,0x8(%eax)
p2->avl.right = p;
10e89f: 89 43 0c mov %eax,0xc(%ebx)
if (p2->avl.bal == -1) p->avl.bal = 1; else p->avl.bal = 0;
10e8a2: 80 7b 11 ff cmpb $0xff,0x11(%ebx)
10e8a6: 0f 94 40 11 sete 0x11(%eax)
if (p2->avl.bal == +1) p1->avl.bal = -1; else p1->avl.bal = 0;
10e8aa: 80 7b 11 01 cmpb $0x1,0x11(%ebx)
10e8ae: 0f 95 c0 setne %al
10e8b1: 48 dec %eax
10e8b2: 88 42 11 mov %al,0x11(%edx)
p = p2;
p2->avl.bal = 0;
10e8b5: c6 43 11 00 movb $0x0,0x11(%ebx)
10e8b9: 89 d8 mov %ebx,%eax
}
}
else
{
/* rebalance right branch */
switch (p->avl.bal)
10e8bb: b2 01 mov $0x1,%dl
default:
break;
}
}
if (buf_prev > buf_stack)
10e8bd: 3b b5 64 ff ff ff cmp -0x9c(%ebp),%esi
10e8c3: 76 13 jbe 10e8d8 <rtems_bdbuf_remove_from_tree+0x25c>
{
q = *(buf_prev - 1);
10e8c5: 8b 5e fc mov -0x4(%esi),%ebx
if (q->avl.cache == -1)
10e8c8: 80 7b 10 ff cmpb $0xff,0x10(%ebx)
10e8cc: 75 05 jne 10e8d3 <rtems_bdbuf_remove_from_tree+0x257>
{
q->avl.left = p;
10e8ce: 89 43 08 mov %eax,0x8(%ebx)
10e8d1: eb 0c jmp 10e8df <rtems_bdbuf_remove_from_tree+0x263>
}
else
{
q->avl.right = p;
10e8d3: 89 43 0c mov %eax,0xc(%ebx)
10e8d6: eb 07 jmp 10e8df <rtems_bdbuf_remove_from_tree+0x263>
}
}
else
{
*root = p;
10e8d8: a3 fc 20 13 00 mov %eax,0x1320fc
10e8dd: eb 27 jmp 10e906 <rtems_bdbuf_remove_from_tree+0x28a>
*root = q;
}
modified = true;
while (modified)
10e8df: 84 d2 test %dl,%dl
10e8e1: 0f 85 f5 fe ff ff jne 10e7dc <rtems_bdbuf_remove_from_tree+0x160>
10e8e7: eb 1d jmp 10e906 <rtems_bdbuf_remove_from_tree+0x28a>
}
q = p;
buf_prev--;
if (buf_prev > buf_stack)
10e8e9: 8d 85 68 ff ff ff lea -0x98(%ebp),%eax
10e8ef: 39 c6 cmp %eax,%esi
10e8f1: 0f 87 0e fe ff ff ja 10e705 <rtems_bdbuf_remove_from_tree+0x89>
{
p = *(buf_prev - 1);
}
else
{
p = NULL;
10e8f7: c7 85 58 ff ff ff 00 movl $0x0,-0xa8(%ebp)
10e8fe: 00 00 00
10e901: e9 0e fe ff ff jmp 10e714 <rtems_bdbuf_remove_from_tree+0x98>
static void
rtems_bdbuf_remove_from_tree (rtems_bdbuf_buffer *bd)
{
if (rtems_bdbuf_avl_remove (&bdbuf_cache.tree, bd) != 0)
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_TREE_RM);
}
10e906: 81 c4 9c 00 00 00 add $0x9c,%esp
10e90c: 5b pop %ebx
10e90d: 5e pop %esi
10e90e: 5f pop %edi
10e90f: 5d pop %ebp
10e910: c3 ret
0010e9d1 <rtems_bdbuf_remove_from_tree_and_lru_list>:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_TREE_RM);
}
static void
rtems_bdbuf_remove_from_tree_and_lru_list (rtems_bdbuf_buffer *bd)
{
10e9d1: 55 push %ebp
10e9d2: 89 e5 mov %esp,%ebp
10e9d4: 53 push %ebx
10e9d5: 52 push %edx
10e9d6: 89 c3 mov %eax,%ebx
switch (bd->state)
10e9d8: 8b 40 20 mov 0x20(%eax),%eax
10e9db: 85 c0 test %eax,%eax
10e9dd: 74 18 je 10e9f7 <rtems_bdbuf_remove_from_tree_and_lru_list+0x26>
10e9df: 83 f8 02 cmp $0x2,%eax
10e9e2: 75 09 jne 10e9ed <rtems_bdbuf_remove_from_tree_and_lru_list+0x1c><== NEVER TAKEN
{
case RTEMS_BDBUF_STATE_FREE:
break;
case RTEMS_BDBUF_STATE_CACHED:
rtems_bdbuf_remove_from_tree (bd);
10e9e4: 89 d8 mov %ebx,%eax
10e9e6: e8 91 fc ff ff call 10e67c <rtems_bdbuf_remove_from_tree>
break;
10e9eb: eb 0a jmp 10e9f7 <rtems_bdbuf_remove_from_tree_and_lru_list+0x26>
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_10);
10e9ed: ba 08 00 00 42 mov $0x42000008,%edx <== NOT EXECUTED
10e9f2: e8 e4 f9 ff ff call 10e3db <rtems_bdbuf_fatal> <== NOT EXECUTED
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
10e9f7: 8b 13 mov (%ebx),%edx
previous = the_node->previous;
10e9f9: 8b 43 04 mov 0x4(%ebx),%eax
next->previous = previous;
10e9fc: 89 42 04 mov %eax,0x4(%edx)
previous->next = next;
10e9ff: 89 10 mov %edx,(%eax)
}
rtems_chain_extract_unprotected (&bd->link);
}
10ea01: 58 pop %eax
10ea02: 5b pop %ebx
10ea03: 5d pop %ebp
10ea04: c3 ret
00110164 <rtems_bdbuf_reset_device_stats>:
}
void rtems_bdbuf_reset_device_stats (rtems_disk_device *dd)
{
110164: 55 push %ebp <== NOT EXECUTED
110165: 89 e5 mov %esp,%ebp <== NOT EXECUTED
110167: 57 push %edi <== NOT EXECUTED
110168: 53 push %ebx <== NOT EXECUTED
110169: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
rtems_bdbuf_lock_cache ();
11016c: e8 5a e2 ff ff call 10e3cb <rtems_bdbuf_lock_cache><== NOT EXECUTED
memset (&dd->stats, 0, sizeof(dd->stats));
110171: 8d 53 44 lea 0x44(%ebx),%edx <== NOT EXECUTED
110174: b9 08 00 00 00 mov $0x8,%ecx <== NOT EXECUTED
110179: 31 c0 xor %eax,%eax <== NOT EXECUTED
11017b: 89 d7 mov %edx,%edi <== NOT EXECUTED
11017d: f3 ab rep stos %eax,%es:(%edi) <== NOT EXECUTED
rtems_bdbuf_unlock_cache ();
}
11017f: 5b pop %ebx <== NOT EXECUTED
110180: 5f pop %edi <== NOT EXECUTED
110181: 5d pop %ebp <== NOT EXECUTED
void rtems_bdbuf_reset_device_stats (rtems_disk_device *dd)
{
rtems_bdbuf_lock_cache ();
memset (&dd->stats, 0, sizeof(dd->stats));
rtems_bdbuf_unlock_cache ();
110182: e9 89 e2 ff ff jmp 10e410 <rtems_bdbuf_unlock_cache><== NOT EXECUTED
0010e4dd <rtems_bdbuf_restore_preemption>:
static void
rtems_bdbuf_restore_preemption (rtems_mode prev_mode)
{
10e4dd: 55 push %ebp
10e4de: 89 e5 mov %esp,%ebp
10e4e0: 83 ec 1c sub $0x1c,%esp
10e4e3: 89 c2 mov %eax,%edx
10e4e5: 89 45 f4 mov %eax,-0xc(%ebp)
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_task_mode (prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode);
10e4e8: 8d 45 f4 lea -0xc(%ebp),%eax
10e4eb: 50 push %eax
10e4ec: 68 ff ff 00 00 push $0xffff
10e4f1: 52 push %edx
10e4f2: e8 f5 39 00 00 call 111eec <rtems_task_mode>
if (sc != RTEMS_SUCCESSFUL)
10e4f7: 83 c4 10 add $0x10,%esp
10e4fa: 85 c0 test %eax,%eax
10e4fc: 74 0d je 10e50b <rtems_bdbuf_restore_preemption+0x2e><== ALWAYS TAKEN
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_PREEMPT_RST);
10e4fe: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10e501: 68 11 00 00 42 push $0x42000011 <== NOT EXECUTED
10e506: e8 05 ce ff ff call 10b310 <rtems_fatal_error_occurred><== NOT EXECUTED
}
10e50b: c9 leave
10e50c: c3 ret
00110078 <rtems_bdbuf_set_block_size>:
rtems_status_code
rtems_bdbuf_set_block_size (rtems_disk_device *dd, uint32_t block_size)
{
110078: 55 push %ebp
110079: 89 e5 mov %esp,%ebp
11007b: 57 push %edi
11007c: 56 push %esi
11007d: 53 push %ebx
11007e: 83 ec 1c sub $0x1c,%esp
110081: 8b 5d 08 mov 0x8(%ebp),%ebx
110084: 8b 75 0c mov 0xc(%ebp),%esi
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_bdbuf_lock_cache ();
110087: e8 3f e3 ff ff call 10e3cb <rtems_bdbuf_lock_cache>
sc = RTEMS_INVALID_NUMBER;
}
}
else
{
sc = RTEMS_INVALID_NUMBER;
11008c: bf 0a 00 00 00 mov $0xa,%edi
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_bdbuf_lock_cache ();
if (block_size > 0)
110091: 85 f6 test %esi,%esi
110093: 0f 84 90 00 00 00 je 110129 <rtems_bdbuf_set_block_size+0xb1>
rtems_bdbuf_bds_per_group (size_t size)
{
size_t bufs_per_size;
size_t bds_per_size;
if (size > bdbuf_config.buffer_max)
110099: 3b 35 74 14 12 00 cmp 0x121474,%esi
11009f: 0f 87 84 00 00 00 ja 110129 <rtems_bdbuf_set_block_size+0xb1><== NEVER TAKEN
return 0;
bufs_per_size = ((size - 1) / bdbuf_config.buffer_min) + 1;
1100a5: 8d 46 ff lea -0x1(%esi),%eax
1100a8: 31 d2 xor %edx,%edx
1100aa: f7 35 70 14 12 00 divl 0x121470
1100b0: 40 inc %eax
for (bds_per_size = 1;
1100b1: b9 01 00 00 00 mov $0x1,%ecx
1100b6: eb 02 jmp 1100ba <rtems_bdbuf_set_block_size+0x42>
bds_per_size < bufs_per_size;
bds_per_size <<= 1)
1100b8: d1 e1 shl %ecx
if (size > bdbuf_config.buffer_max)
return 0;
bufs_per_size = ((size - 1) / bdbuf_config.buffer_min) + 1;
for (bds_per_size = 1;
1100ba: 39 c1 cmp %eax,%ecx
1100bc: 72 fa jb 1100b8 <rtems_bdbuf_set_block_size+0x40>
bds_per_size < bufs_per_size;
bds_per_size <<= 1)
;
return bdbuf_cache.max_bds_per_group / bds_per_size;
1100be: a1 e0 20 13 00 mov 0x1320e0,%eax
1100c3: 31 d2 xor %edx,%edx
1100c5: f7 f1 div %ecx
1100c7: 89 45 e0 mov %eax,-0x20(%ebp)
sc = RTEMS_INVALID_NUMBER;
}
}
else
{
sc = RTEMS_INVALID_NUMBER;
1100ca: bf 0a 00 00 00 mov $0xa,%edi
if (block_size > 0)
{
size_t bds_per_group = rtems_bdbuf_bds_per_group (block_size);
if (bds_per_group != 0)
1100cf: 85 c0 test %eax,%eax
1100d1: 74 56 je 110129 <rtems_bdbuf_set_block_size+0xb1><== NEVER TAKEN
{
int block_to_media_block_shift = 0;
uint32_t media_blocks_per_block = block_size / dd->media_block_size;
1100d3: 8b 43 20 mov 0x20(%ebx),%eax
1100d6: 89 45 e4 mov %eax,-0x1c(%ebp)
1100d9: 89 f0 mov %esi,%eax
1100db: 31 d2 xor %edx,%edx
1100dd: f7 75 e4 divl -0x1c(%ebp)
1100e0: 89 c7 mov %eax,%edi
{
size_t bds_per_group = rtems_bdbuf_bds_per_group (block_size);
if (bds_per_group != 0)
{
int block_to_media_block_shift = 0;
1100e2: 31 c9 xor %ecx,%ecx
uint32_t media_blocks_per_block = block_size / dd->media_block_size;
uint32_t one = 1;
while ((one << block_to_media_block_shift) < media_blocks_per_block)
1100e4: b8 01 00 00 00 mov $0x1,%eax
1100e9: eb 01 jmp 1100ec <rtems_bdbuf_set_block_size+0x74>
{
++block_to_media_block_shift;
1100eb: 41 inc %ecx
{
int block_to_media_block_shift = 0;
uint32_t media_blocks_per_block = block_size / dd->media_block_size;
uint32_t one = 1;
while ((one << block_to_media_block_shift) < media_blocks_per_block)
1100ec: 89 c2 mov %eax,%edx
1100ee: d3 e2 shl %cl,%edx
1100f0: 39 fa cmp %edi,%edx
1100f2: 72 f7 jb 1100eb <rtems_bdbuf_set_block_size+0x73>
{
++block_to_media_block_shift;
}
if ((dd->media_block_size << block_to_media_block_shift) != block_size)
1100f4: 8b 45 e4 mov -0x1c(%ebp),%eax
1100f7: d3 e0 shl %cl,%eax
1100f9: 39 f0 cmp %esi,%eax
1100fb: 74 03 je 110100 <rtems_bdbuf_set_block_size+0x88><== ALWAYS TAKEN
block_to_media_block_shift = -1;
1100fd: 83 c9 ff or $0xffffffff,%ecx <== NOT EXECUTED
dd->block_size = block_size;
110100: 89 73 24 mov %esi,0x24(%ebx)
dd->block_count = dd->size / media_blocks_per_block;
110103: 8b 43 1c mov 0x1c(%ebx),%eax
110106: 31 d2 xor %edx,%edx
110108: f7 f7 div %edi
11010a: 89 43 28 mov %eax,0x28(%ebx)
dd->media_blocks_per_block = media_blocks_per_block;
11010d: 89 7b 2c mov %edi,0x2c(%ebx)
dd->block_to_media_block_shift = block_to_media_block_shift;
110110: 89 4b 30 mov %ecx,0x30(%ebx)
dd->bds_per_group = bds_per_group;
110113: 8b 45 e0 mov -0x20(%ebp),%eax
110116: 89 43 34 mov %eax,0x34(%ebx)
}
static void
rtems_bdbuf_read_ahead_reset (rtems_disk_device *dd)
{
rtems_bdbuf_read_ahead_cancel (dd);
110119: 89 d8 mov %ebx,%eax
11011b: e8 69 f5 ff ff call 10f689 <rtems_bdbuf_read_ahead_cancel>
dd->read_ahead.trigger = RTEMS_DISK_READ_AHEAD_NO_TRIGGER;
110120: c7 43 6c ff ff ff ff movl $0xffffffff,0x6c(%ebx)
}
rtems_status_code
rtems_bdbuf_set_block_size (rtems_disk_device *dd, uint32_t block_size)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
110127: 31 ff xor %edi,%edi
else
{
sc = RTEMS_INVALID_NUMBER;
}
rtems_bdbuf_unlock_cache ();
110129: e8 e2 e2 ff ff call 10e410 <rtems_bdbuf_unlock_cache>
return sc;
}
11012e: 89 f8 mov %edi,%eax
110130: 83 c4 1c add $0x1c,%esp
110133: 5b pop %ebx
110134: 5e pop %esi
110135: 5f pop %edi
110136: 5d pop %ebp
110137: c3 ret
0010ee6d <rtems_bdbuf_swapout_modified_processing>:
rtems_chain_control* chain,
rtems_chain_control* transfer,
bool sync_active,
bool update_timers,
uint32_t timer_delta)
{
10ee6d: 55 push %ebp
10ee6e: 89 e5 mov %esp,%ebp
10ee70: 57 push %edi
10ee71: 56 push %esi
10ee72: 53 push %ebx
10ee73: 83 ec 0c sub $0xc,%esp
10ee76: 8a 5d 08 mov 0x8(%ebp),%bl
10ee79: 88 5d f2 mov %bl,-0xe(%ebp)
10ee7c: 8a 5d 0c mov 0xc(%ebp),%bl
10ee7f: 88 5d f1 mov %bl,-0xf(%ebp)
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
10ee82: 8b 1a mov (%edx),%ebx
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
10ee84: 83 c2 04 add $0x4,%edx
10ee87: 89 55 ec mov %edx,-0x14(%ebp)
if (!rtems_chain_is_empty (chain))
10ee8a: 39 d3 cmp %edx,%ebx
10ee8c: 0f 84 c6 00 00 00 je 10ef58 <rtems_bdbuf_swapout_modified_processing+0xeb>
* A sync active with no valid dev means sync all.
*/
if (sync_active && (*dd_ptr == BDBUF_INVALID_DEV))
sync_all = true;
else
sync_all = false;
10ee92: c6 45 f3 00 movb $0x0,-0xd(%ebp)
node = node->next;
/*
* A sync active with no valid dev means sync all.
*/
if (sync_active && (*dd_ptr == BDBUF_INVALID_DEV))
10ee96: 80 7d f2 00 cmpb $0x0,-0xe(%ebp)
10ee9a: 74 07 je 10eea3 <rtems_bdbuf_swapout_modified_processing+0x36>
10ee9c: 83 38 00 cmpl $0x0,(%eax)
10ee9f: 0f 94 45 f3 sete -0xd(%ebp)
}
static bool
rtems_bdbuf_has_buffer_waiters (void)
{
return bdbuf_cache.buffer_waiters.count;
10eea3: 8b 3d 34 21 13 00 mov 0x132134,%edi
10eea9: 89 7d e8 mov %edi,-0x18(%ebp)
* or someone waits for a buffer written force all the timers to 0.
*
* @note Lots of sync requests will skew this timer. It should be based
* on TOD to be accurate. Does it matter ?
*/
if (sync_all || (sync_active && (*dd_ptr == bd->dd))
10eeac: 80 7d f3 00 cmpb $0x0,-0xd(%ebp)
10eeb0: 75 13 jne 10eec5 <rtems_bdbuf_swapout_modified_processing+0x58>
10eeb2: 80 7d f2 00 cmpb $0x0,-0xe(%ebp)
10eeb6: 74 07 je 10eebf <rtems_bdbuf_swapout_modified_processing+0x52>
10eeb8: 8b 53 14 mov 0x14(%ebx),%edx
10eebb: 39 10 cmp %edx,(%eax)
10eebd: 74 06 je 10eec5 <rtems_bdbuf_swapout_modified_processing+0x58>
|| rtems_bdbuf_has_buffer_waiters ())
10eebf: 83 7d e8 00 cmpl $0x0,-0x18(%ebp)
10eec3: 74 07 je 10eecc <rtems_bdbuf_swapout_modified_processing+0x5f>
bd->hold_timer = 0;
10eec5: c7 43 2c 00 00 00 00 movl $0x0,0x2c(%ebx)
if (bd->hold_timer)
10eecc: 8b 53 2c mov 0x2c(%ebx),%edx
10eecf: 85 d2 test %edx,%edx
10eed1: 74 24 je 10eef7 <rtems_bdbuf_swapout_modified_processing+0x8a>
{
if (update_timers)
10eed3: 80 7d f1 00 cmpb $0x0,-0xf(%ebp)
10eed7: 74 14 je 10eeed <rtems_bdbuf_swapout_modified_processing+0x80>
{
if (bd->hold_timer > timer_delta)
10eed9: 3b 55 10 cmp 0x10(%ebp),%edx
10eedc: 76 08 jbe 10eee6 <rtems_bdbuf_swapout_modified_processing+0x79>
bd->hold_timer -= timer_delta;
10eede: 2b 55 10 sub 0x10(%ebp),%edx
10eee1: 89 53 2c mov %edx,0x2c(%ebx)
10eee4: eb 07 jmp 10eeed <rtems_bdbuf_swapout_modified_processing+0x80>
else
bd->hold_timer = 0;
10eee6: c7 43 2c 00 00 00 00 movl $0x0,0x2c(%ebx)
}
if (bd->hold_timer)
10eeed: 83 7b 2c 00 cmpl $0x0,0x2c(%ebx)
10eef1: 74 04 je 10eef7 <rtems_bdbuf_swapout_modified_processing+0x8a>
{
node = node->next;
10eef3: 8b 1b mov (%ebx),%ebx
continue;
10eef5: eb 48 jmp 10ef3f <rtems_bdbuf_swapout_modified_processing+0xd2>
/*
* This assumes we can set it to BDBUF_INVALID_DEV which is just an
* assumption. Cannot use the transfer list being empty the sync dev
* calls sets the dev to use.
*/
if (*dd_ptr == BDBUF_INVALID_DEV)
10eef7: 83 38 00 cmpl $0x0,(%eax)
10eefa: 75 05 jne 10ef01 <rtems_bdbuf_swapout_modified_processing+0x94>
*dd_ptr = bd->dd;
10eefc: 8b 53 14 mov 0x14(%ebx),%edx
10eeff: 89 10 mov %edx,(%eax)
if (bd->dd == *dd_ptr)
10ef01: 8b 38 mov (%eax),%edi
10ef03: 39 7b 14 cmp %edi,0x14(%ebx)
10ef06: 8b 33 mov (%ebx),%esi
10ef08: 75 33 jne 10ef3d <rtems_bdbuf_swapout_modified_processing+0xd0><== NEVER TAKEN
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
10ef0a: c7 43 20 09 00 00 00 movl $0x9,0x20(%ebx)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
10ef11: 8b 53 04 mov 0x4(%ebx),%edx
next->previous = previous;
10ef14: 89 56 04 mov %edx,0x4(%esi)
previous->next = next;
10ef17: 89 32 mov %esi,(%edx)
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_TRANSFER);
rtems_chain_extract_unprotected (node);
tnode = tnode->previous;
10ef19: 8b 51 08 mov 0x8(%ecx),%edx
10ef1c: eb 19 jmp 10ef37 <rtems_bdbuf_swapout_modified_processing+0xca>
while (node && !rtems_chain_is_head (transfer, tnode))
{
rtems_bdbuf_buffer* tbd = (rtems_bdbuf_buffer*) tnode;
if (bd->block > tbd->block)
10ef1e: 8b 7a 18 mov 0x18(%edx),%edi
10ef21: 39 7b 18 cmp %edi,0x18(%ebx)
10ef24: 76 0e jbe 10ef34 <rtems_bdbuf_swapout_modified_processing+0xc7>
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
10ef26: 89 53 04 mov %edx,0x4(%ebx)
before_node = after_node->next;
10ef29: 8b 3a mov (%edx),%edi
after_node->next = the_node;
10ef2b: 89 1a mov %ebx,(%edx)
the_node->next = before_node;
10ef2d: 89 3b mov %edi,(%ebx)
before_node->previous = the_node;
10ef2f: 89 5f 04 mov %ebx,0x4(%edi)
10ef32: eb 09 jmp 10ef3d <rtems_bdbuf_swapout_modified_processing+0xd0>
{
rtems_chain_insert_unprotected (tnode, node);
node = NULL;
}
else
tnode = tnode->previous;
10ef34: 8b 52 04 mov 0x4(%edx),%edx
rtems_chain_extract_unprotected (node);
tnode = tnode->previous;
while (node && !rtems_chain_is_head (transfer, tnode))
10ef37: 39 ca cmp %ecx,%edx
10ef39: 75 e3 jne 10ef1e <rtems_bdbuf_swapout_modified_processing+0xb1>
10ef3b: eb 0d jmp 10ef4a <rtems_bdbuf_swapout_modified_processing+0xdd>
node = next_node;
}
else
{
node = node->next;
10ef3d: 89 f3 mov %esi,%ebx
if (sync_active && (*dd_ptr == BDBUF_INVALID_DEV))
sync_all = true;
else
sync_all = false;
while (!rtems_chain_is_tail (chain, node))
10ef3f: 3b 5d ec cmp -0x14(%ebp),%ebx
10ef42: 0f 85 64 ff ff ff jne 10eeac <rtems_bdbuf_swapout_modified_processing+0x3f>
10ef48: eb 0e jmp 10ef58 <rtems_bdbuf_swapout_modified_processing+0xeb>
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
10ef4a: 89 4b 04 mov %ecx,0x4(%ebx)
before_node = after_node->next;
10ef4d: 8b 11 mov (%ecx),%edx
after_node->next = the_node;
10ef4f: 89 19 mov %ebx,(%ecx)
the_node->next = before_node;
10ef51: 89 13 mov %edx,(%ebx)
before_node->previous = the_node;
10ef53: 89 5a 04 mov %ebx,0x4(%edx)
10ef56: eb e5 jmp 10ef3d <rtems_bdbuf_swapout_modified_processing+0xd0>
{
node = node->next;
}
}
}
}
10ef58: 83 c4 0c add $0xc,%esp
10ef5b: 5b pop %ebx
10ef5c: 5e pop %esi
10ef5d: 5f pop %edi
10ef5e: 5d pop %ebp
10ef5f: c3 ret
0010f17b <rtems_bdbuf_swapout_task>:
* not this.
* @return rtems_task Not used.
*/
static rtems_task
rtems_bdbuf_swapout_task (rtems_task_argument arg)
{
10f17b: 55 push %ebp
10f17c: 89 e5 mov %esp,%ebp
10f17e: 57 push %edi
10f17f: 56 push %esi
10f180: 53 push %ebx
10f181: 83 ec 3c sub $0x3c,%esp
rtems_bdbuf_swapout_transfer transfer;
uint32_t period_in_ticks;
const uint32_t period_in_msecs = bdbuf_config.swapout_period;
uint32_t timer_delta;
transfer.write_req = rtems_bdbuf_swapout_writereq_alloc ();
10f184: e8 03 f4 ff ff call 10e58c <rtems_bdbuf_swapout_writereq_alloc>
10f189: 89 45 e4 mov %eax,-0x1c(%ebp)
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
10f18c: 8d 45 d0 lea -0x30(%ebp),%eax
10f18f: 8d 55 d4 lea -0x2c(%ebp),%edx
10f192: 89 55 d0 mov %edx,-0x30(%ebp)
head->previous = NULL;
10f195: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp)
tail->previous = head;
10f19c: 89 45 d8 mov %eax,-0x28(%ebp)
rtems_chain_initialize_empty (&transfer.bds);
transfer.dd = BDBUF_INVALID_DEV;
10f19f: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp)
transfer.syncing = false;
10f1a6: c6 45 e0 00 movb $0x0,-0x20(%ebp)
/*
* Localise the period.
*/
period_in_ticks = RTEMS_MICROSECONDS_TO_TICKS (period_in_msecs * 1000);
10f1aa: 69 05 58 14 12 00 e8 imul $0x3e8,0x121458,%eax
10f1b1: 03 00 00
10f1b4: 31 d2 xor %edx,%edx
10f1b6: f7 35 4c e1 12 00 divl 0x12e14c
10f1bc: 89 45 c0 mov %eax,-0x40(%ebp)
rtems_bdbuf_swapout_workers_open (void)
{
rtems_status_code sc;
size_t w;
rtems_bdbuf_lock_cache ();
10f1bf: e8 07 f2 ff ff call 10e3cb <rtems_bdbuf_lock_cache>
for (w = 0; w < bdbuf_config.swapout_workers; w++)
10f1c4: 31 db xor %ebx,%ebx
10f1c6: e9 8d 00 00 00 jmp 10f258 <rtems_bdbuf_swapout_task+0xdd>
{
rtems_bdbuf_swapout_worker* worker;
worker = malloc (sizeof (rtems_bdbuf_swapout_worker));
10f1cb: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10f1ce: 6a 28 push $0x28 <== NOT EXECUTED
10f1d0: e8 6f 87 ff ff call 107944 <malloc> <== NOT EXECUTED
10f1d5: 89 c6 mov %eax,%esi <== NOT EXECUTED
if (!worker)
10f1d7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10f1da: 85 c0 test %eax,%eax <== NOT EXECUTED
10f1dc: 75 0a jne 10f1e8 <rtems_bdbuf_swapout_task+0x6d><== NOT EXECUTED
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_NOMEM);
10f1de: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10f1e1: 68 15 00 00 42 push $0x42000015 <== NOT EXECUTED
10f1e6: eb 6a jmp 10f252 <rtems_bdbuf_swapout_task+0xd7><== NOT EXECUTED
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
10f1e8: a1 d0 20 13 00 mov 0x1320d0,%eax <== NOT EXECUTED
the_node->next = tail;
10f1ed: c7 06 cc 20 13 00 movl $0x1320cc,(%esi) <== NOT EXECUTED
tail->previous = the_node;
10f1f3: 89 35 d0 20 13 00 mov %esi,0x1320d0 <== NOT EXECUTED
old_last->next = the_node;
10f1f9: 89 30 mov %esi,(%eax) <== NOT EXECUTED
the_node->previous = old_last;
10f1fb: 89 46 04 mov %eax,0x4(%esi) <== NOT EXECUTED
rtems_chain_append_unprotected (&bdbuf_cache.swapout_workers, &worker->link);
worker->enabled = true;
10f1fe: c6 46 0c 01 movb $0x1,0xc(%esi) <== NOT EXECUTED
worker->transfer.write_req = rtems_bdbuf_swapout_writereq_alloc ();
10f202: e8 85 f3 ff ff call 10e58c <rtems_bdbuf_swapout_writereq_alloc><== NOT EXECUTED
10f207: 89 46 24 mov %eax,0x24(%esi) <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
10f20a: 8d 46 10 lea 0x10(%esi),%eax <== NOT EXECUTED
10f20d: 8d 56 14 lea 0x14(%esi),%edx <== NOT EXECUTED
10f210: 89 56 10 mov %edx,0x10(%esi) <== NOT EXECUTED
head->next = tail;
head->previous = NULL;
10f213: c7 46 14 00 00 00 00 movl $0x0,0x14(%esi) <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
10f21a: 89 46 18 mov %eax,0x18(%esi) <== NOT EXECUTED
rtems_chain_initialize_empty (&worker->transfer.bds);
worker->transfer.dd = BDBUF_INVALID_DEV;
10f21d: c7 46 1c 00 00 00 00 movl $0x0,0x1c(%esi) <== NOT EXECUTED
sc = rtems_bdbuf_create_task (rtems_build_name('B', 'D', 'o', 'a' + w),
10f224: 51 push %ecx <== NOT EXECUTED
10f225: 51 push %ecx <== NOT EXECUTED
* @param arg A pointer to the global cache data. Use the global variable and
* not this.
* @return rtems_task Not used.
*/
static rtems_task
rtems_bdbuf_swapout_task (rtems_task_argument arg)
10f226: 8d 43 61 lea 0x61(%ebx),%eax <== NOT EXECUTED
worker->transfer.write_req = rtems_bdbuf_swapout_writereq_alloc ();
rtems_chain_initialize_empty (&worker->transfer.bds);
worker->transfer.dd = BDBUF_INVALID_DEV;
sc = rtems_bdbuf_create_task (rtems_build_name('B', 'D', 'o', 'a' + w),
10f229: 0d 00 6f 44 42 or $0x42446f00,%eax <== NOT EXECUTED
10f22e: 8d 56 08 lea 0x8(%esi),%edx <== NOT EXECUTED
10f231: 52 push %edx <== NOT EXECUTED
10f232: 56 push %esi <== NOT EXECUTED
10f233: b9 23 f4 10 00 mov $0x10f423,%ecx <== NOT EXECUTED
10f238: 8b 15 64 14 12 00 mov 0x121464,%edx <== NOT EXECUTED
10f23e: e8 eb f3 ff ff call 10e62e <rtems_bdbuf_create_task.constprop.14><== NOT EXECUTED
bdbuf_config.swapout_worker_priority,
RTEMS_BDBUF_SWAPOUT_WORKER_TASK_PRIORITY_DEFAULT,
rtems_bdbuf_swapout_worker_task,
(rtems_task_argument) worker,
&worker->id);
if (sc != RTEMS_SUCCESSFUL)
10f243: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10f246: 85 c0 test %eax,%eax <== NOT EXECUTED
10f248: 74 0d je 10f257 <rtems_bdbuf_swapout_task+0xdc><== NOT EXECUTED
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_WK_CREATE);
10f24a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10f24d: 68 16 00 00 42 push $0x42000016 <== NOT EXECUTED
10f252: e8 b9 c0 ff ff call 10b310 <rtems_fatal_error_occurred><== NOT EXECUTED
rtems_status_code sc;
size_t w;
rtems_bdbuf_lock_cache ();
for (w = 0; w < bdbuf_config.swapout_workers; w++)
10f257: 43 inc %ebx <== NOT EXECUTED
10f258: 3b 1d 60 14 12 00 cmp 0x121460,%ebx
10f25e: 0f 82 67 ff ff ff jb 10f1cb <rtems_bdbuf_swapout_task+0x50><== NEVER TAKEN
&worker->id);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_WK_CREATE);
}
rtems_bdbuf_unlock_cache ();
10f264: e8 a7 f1 ff ff call 10e410 <rtems_bdbuf_unlock_cache>
10f269: e9 3a 01 00 00 jmp 10f3a8 <rtems_bdbuf_swapout_task+0x22d>
/*
* Create the worker threads.
*/
rtems_bdbuf_swapout_workers_open ();
while (bdbuf_cache.swapout_enabled)
10f26e: bf 01 00 00 00 mov $0x1,%edi
rtems_bdbuf_swapout_transfer* transfer)
{
rtems_bdbuf_swapout_worker* worker;
bool transfered_buffers = false;
rtems_bdbuf_lock_cache ();
10f273: e8 53 f1 ff ff call 10e3cb <rtems_bdbuf_lock_cache>
* here. We do not know the worker is the last in a sequence of sync writes
* until after we have it running so we do not know to tell it to release the
* lock. The simplest solution is to get the main swap out task perform all
* sync operations.
*/
if (bdbuf_cache.sync_active)
10f278: 80 3d f0 20 13 00 00 cmpb $0x0,0x1320f0
10f27f: 74 07 je 10f288 <rtems_bdbuf_swapout_task+0x10d>
worker = NULL;
10f281: 31 f6 xor %esi,%esi
/*
* Extact all the buffers we find for a specific device. The device is
* the first one we find on a modified list. Process the sync queue of
* buffers first.
*/
if (rtems_bdbuf_swapout_processing (timer_delta,
10f283: 8d 5d d0 lea -0x30(%ebp),%ebx
10f286: eb 13 jmp 10f29b <rtems_bdbuf_swapout_task+0x120>
10f288: b8 c8 20 13 00 mov $0x1320c8,%eax
10f28d: e8 f6 f0 ff ff call 10e388 <_Chain_Get_unprotected>
10f292: 89 c6 mov %eax,%esi
worker = NULL;
else
{
worker = (rtems_bdbuf_swapout_worker*)
rtems_chain_get_unprotected (&bdbuf_cache.swapout_workers);
if (worker)
10f294: 85 c0 test %eax,%eax
10f296: 74 e9 je 10f281 <rtems_bdbuf_swapout_task+0x106><== ALWAYS TAKEN
transfer = &worker->transfer;
10f298: 8d 58 10 lea 0x10(%eax),%ebx <== NOT EXECUTED
Chain_Node *tail = _Chain_Tail( the_chain );
10f29b: 8d 43 04 lea 0x4(%ebx),%eax
10f29e: 89 03 mov %eax,(%ebx)
head->next = tail;
head->previous = NULL;
10f2a0: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx)
tail->previous = head;
10f2a7: 89 5b 08 mov %ebx,0x8(%ebx)
}
rtems_chain_initialize_empty (&transfer->bds);
transfer->dd = BDBUF_INVALID_DEV;
10f2aa: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
transfer->syncing = bdbuf_cache.sync_active;
10f2b1: a0 f0 20 13 00 mov 0x1320f0,%al
10f2b6: 88 43 10 mov %al,0x10(%ebx)
/*
* When the sync is for a device limit the sync to that device. If the sync
* is for a buffer handle process the devices in the order on the sync
* list. This means the dev is BDBUF_INVALID_DEV.
*/
if (bdbuf_cache.sync_active)
10f2b9: 84 c0 test %al,%al
10f2bb: 74 08 je 10f2c5 <rtems_bdbuf_swapout_task+0x14a>
transfer->dd = bdbuf_cache.sync_device;
10f2bd: a1 f8 20 13 00 mov 0x1320f8,%eax
10f2c2: 89 43 0c mov %eax,0xc(%ebx)
/*
* If we have any buffers in the sync queue move them to the modified
* list. The first sync buffer will select the device we use.
*/
rtems_bdbuf_swapout_modified_processing (&transfer->dd,
10f2c5: 8d 43 0c lea 0xc(%ebx),%eax
10f2c8: 89 45 c4 mov %eax,-0x3c(%ebp)
10f2cb: 52 push %edx
10f2cc: ff 35 58 14 12 00 pushl 0x121458
10f2d2: 6a 00 push $0x0
10f2d4: 6a 01 push $0x1
10f2d6: 89 d9 mov %ebx,%ecx
10f2d8: ba 18 21 13 00 mov $0x132118,%edx
10f2dd: e8 8b fb ff ff call 10ee6d <rtems_bdbuf_swapout_modified_processing>
timer_delta);
/*
* Process the cache's modified list.
*/
rtems_bdbuf_swapout_modified_processing (&transfer->dd,
10f2e2: 83 c4 0c add $0xc,%esp
10f2e5: ff 35 58 14 12 00 pushl 0x121458
10f2eb: 81 e7 ff 00 00 00 and $0xff,%edi
10f2f1: 57 push %edi
10f2f2: 0f b6 05 f0 20 13 00 movzbl 0x1320f0,%eax
10f2f9: 50 push %eax
10f2fa: 89 d9 mov %ebx,%ecx
10f2fc: ba 0c 21 13 00 mov $0x13210c,%edx
10f301: 8b 45 c4 mov -0x3c(%ebp),%eax
10f304: e8 64 fb ff ff call 10ee6d <rtems_bdbuf_swapout_modified_processing>
/*
* We have all the buffers that have been modified for this device so the
* cache can be unlocked because the state of each buffer has been set to
* TRANSFER.
*/
rtems_bdbuf_unlock_cache ();
10f309: e8 02 f1 ff ff call 10e410 <rtems_bdbuf_unlock_cache>
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
10f30e: 8d 43 04 lea 0x4(%ebx),%eax
/*
* If there are buffers to transfer to the media transfer them.
*/
if (!rtems_chain_is_empty (&transfer->bds))
10f311: 83 c4 10 add $0x10,%esp
10f314: 39 03 cmp %eax,(%ebx)
10f316: 74 2d je 10f345 <rtems_bdbuf_swapout_task+0x1ca>
{
if (worker)
10f318: 85 f6 test %esi,%esi
10f31a: 74 20 je 10f33c <rtems_bdbuf_swapout_task+0x1c1><== ALWAYS TAKEN
{
rtems_status_code sc = rtems_event_send (worker->id,
10f31c: 50 push %eax <== NOT EXECUTED
10f31d: 50 push %eax <== NOT EXECUTED
10f31e: 6a 04 push $0x4 <== NOT EXECUTED
10f320: ff 76 08 pushl 0x8(%esi) <== NOT EXECUTED
10f323: e8 40 b6 ff ff call 10a968 <rtems_event_send> <== NOT EXECUTED
RTEMS_BDBUF_SWAPOUT_SYNC);
if (sc != RTEMS_SUCCESSFUL)
10f328: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10f32b: 85 c0 test %eax,%eax <== NOT EXECUTED
10f32d: 74 1a je 10f349 <rtems_bdbuf_swapout_task+0x1ce><== NOT EXECUTED
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_WAKE);
10f32f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10f332: 68 14 00 00 42 push $0x42000014 <== NOT EXECUTED
10f337: e9 16 ff ff ff jmp 10f252 <rtems_bdbuf_swapout_task+0xd7><== NOT EXECUTED
}
else
{
rtems_bdbuf_swapout_write (transfer);
10f33c: 89 d8 mov %ebx,%eax
10f33e: e8 3c fd ff ff call 10f07f <rtems_bdbuf_swapout_write>
10f343: eb 04 jmp 10f349 <rtems_bdbuf_swapout_task+0x1ce>
rtems_bdbuf_swapout_processing (unsigned long timer_delta,
bool update_timers,
rtems_bdbuf_swapout_transfer* transfer)
{
rtems_bdbuf_swapout_worker* worker;
bool transfered_buffers = false;
10f345: 31 c0 xor %eax,%eax
10f347: eb 02 jmp 10f34b <rtems_bdbuf_swapout_task+0x1d0>
else
{
rtems_bdbuf_swapout_write (transfer);
}
transfered_buffers = true;
10f349: b0 01 mov $0x1,%al
10f34b: 31 ff xor %edi,%edi
}
if (bdbuf_cache.sync_active && !transfered_buffers)
10f34d: 80 3d f0 20 13 00 00 cmpb $0x0,0x1320f0
10f354: 74 3c je 10f392 <rtems_bdbuf_swapout_task+0x217>
10f356: 84 c0 test %al,%al
10f358: 0f 85 15 ff ff ff jne 10f273 <rtems_bdbuf_swapout_task+0xf8>
{
rtems_id sync_requester;
rtems_bdbuf_lock_cache ();
10f35e: e8 68 f0 ff ff call 10e3cb <rtems_bdbuf_lock_cache>
sync_requester = bdbuf_cache.sync_requester;
10f363: 8b 1d f4 20 13 00 mov 0x1320f4,%ebx
bdbuf_cache.sync_active = false;
10f369: c6 05 f0 20 13 00 00 movb $0x0,0x1320f0
bdbuf_cache.sync_requester = 0;
10f370: c7 05 f4 20 13 00 00 movl $0x0,0x1320f4
10f377: 00 00 00
rtems_bdbuf_unlock_cache ();
10f37a: e8 91 f0 ff ff call 10e410 <rtems_bdbuf_unlock_cache>
if (sync_requester)
10f37f: 85 db test %ebx,%ebx
10f381: 74 7a je 10f3fd <rtems_bdbuf_swapout_task+0x282><== NEVER TAKEN
rtems_event_send (sync_requester, RTEMS_BDBUF_TRANSFER_SYNC);
10f383: 57 push %edi
10f384: 57 push %edi
10f385: 6a 02 push $0x2
10f387: 53 push %ebx
10f388: e8 db b5 ff ff call 10a968 <rtems_event_send>
10f38d: 83 c4 10 add $0x10,%esp
10f390: eb 6b jmp 10f3fd <rtems_bdbuf_swapout_task+0x282>
/*
* Extact all the buffers we find for a specific device. The device is
* the first one we find on a modified list. Process the sync queue of
* buffers first.
*/
if (rtems_bdbuf_swapout_processing (timer_delta,
10f392: 84 c0 test %al,%al
10f394: 74 67 je 10f3fd <rtems_bdbuf_swapout_task+0x282>
10f396: e9 d8 fe ff ff jmp 10f273 <rtems_bdbuf_swapout_task+0xf8>
RTEMS_EVENT_ALL | RTEMS_WAIT,
period_in_ticks,
&out);
if ((sc != RTEMS_SUCCESSFUL) && (sc != RTEMS_TIMEOUT))
rtems_fatal_error_occurred (BLKDEV_FATAL_BDBUF_SWAPOUT_RE);
10f39b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10f39e: 68 18 00 00 42 push $0x42000018 <== NOT EXECUTED
10f3a3: e9 aa fe ff ff jmp 10f252 <rtems_bdbuf_swapout_task+0xd7><== NOT EXECUTED
/*
* Create the worker threads.
*/
rtems_bdbuf_swapout_workers_open ();
while (bdbuf_cache.swapout_enabled)
10f3a8: 80 3d c4 20 13 00 00 cmpb $0x0,0x1320c4
10f3af: 0f 85 b9 fe ff ff jne 10f26e <rtems_bdbuf_swapout_task+0xf3><== ALWAYS TAKEN
static void
rtems_bdbuf_swapout_workers_close (void)
{
rtems_chain_node* node;
rtems_bdbuf_lock_cache ();
10f3b5: e8 11 f0 ff ff call 10e3cb <rtems_bdbuf_lock_cache><== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
10f3ba: 8b 1d c8 20 13 00 mov 0x1320c8,%ebx <== NOT EXECUTED
10f3c0: eb 15 jmp 10f3d7 <rtems_bdbuf_swapout_task+0x25c><== NOT EXECUTED
node = rtems_chain_first (&bdbuf_cache.swapout_workers);
while (!rtems_chain_is_tail (&bdbuf_cache.swapout_workers, node))
{
rtems_bdbuf_swapout_worker* worker = (rtems_bdbuf_swapout_worker*) node;
worker->enabled = false;
10f3c2: c6 43 0c 00 movb $0x0,0xc(%ebx) <== NOT EXECUTED
rtems_event_send (worker->id, RTEMS_BDBUF_SWAPOUT_SYNC);
10f3c6: 56 push %esi <== NOT EXECUTED
10f3c7: 56 push %esi <== NOT EXECUTED
10f3c8: 6a 04 push $0x4 <== NOT EXECUTED
10f3ca: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED
10f3cd: e8 96 b5 ff ff call 10a968 <rtems_event_send> <== NOT EXECUTED
void rtems_bdbuf_reset_device_stats (rtems_disk_device *dd)
{
rtems_bdbuf_lock_cache ();
memset (&dd->stats, 0, sizeof(dd->stats));
rtems_bdbuf_unlock_cache ();
}
10f3d2: 8b 1b mov (%ebx),%ebx <== NOT EXECUTED
10f3d4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_chain_node* node;
rtems_bdbuf_lock_cache ();
node = rtems_chain_first (&bdbuf_cache.swapout_workers);
while (!rtems_chain_is_tail (&bdbuf_cache.swapout_workers, node))
10f3d7: 81 fb cc 20 13 00 cmp $0x1320cc,%ebx <== NOT EXECUTED
10f3dd: 75 e3 jne 10f3c2 <rtems_bdbuf_swapout_task+0x247><== NOT EXECUTED
worker->enabled = false;
rtems_event_send (worker->id, RTEMS_BDBUF_SWAPOUT_SYNC);
node = rtems_chain_next (node);
}
rtems_bdbuf_unlock_cache ();
10f3df: e8 2c f0 ff ff call 10e410 <rtems_bdbuf_unlock_cache><== NOT EXECUTED
rtems_fatal_error_occurred (BLKDEV_FATAL_BDBUF_SWAPOUT_RE);
}
rtems_bdbuf_swapout_workers_close ();
free (transfer.write_req);
10f3e4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10f3e7: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
10f3ea: e8 35 81 ff ff call 107524 <free> <== NOT EXECUTED
rtems_task_delete (RTEMS_SELF);
10f3ef: c7 04 24 00 00 00 00 movl $0x0,(%esp) <== NOT EXECUTED
10f3f6: e8 f1 bb ff ff call 10afec <rtems_task_delete> <== NOT EXECUTED
10f3fb: eb 1e jmp 10f41b <rtems_bdbuf_swapout_task+0x2a0><== NOT EXECUTED
*/
update_timers = false;
}
while (transfered_buffers);
sc = rtems_event_receive (RTEMS_BDBUF_SWAPOUT_SYNC,
10f3fd: 8d 45 cc lea -0x34(%ebp),%eax
10f400: 50 push %eax
10f401: ff 75 c0 pushl -0x40(%ebp)
10f404: 6a 00 push $0x0
10f406: 6a 04 push $0x4
10f408: e8 f3 b3 ff ff call 10a800 <rtems_event_receive>
RTEMS_EVENT_ALL | RTEMS_WAIT,
period_in_ticks,
&out);
if ((sc != RTEMS_SUCCESSFUL) && (sc != RTEMS_TIMEOUT))
10f40d: 83 c4 10 add $0x10,%esp
10f410: 83 f8 06 cmp $0x6,%eax
10f413: 74 93 je 10f3a8 <rtems_bdbuf_swapout_task+0x22d>
10f415: 85 c0 test %eax,%eax
10f417: 74 8f je 10f3a8 <rtems_bdbuf_swapout_task+0x22d><== ALWAYS TAKEN
10f419: eb 80 jmp 10f39b <rtems_bdbuf_swapout_task+0x220><== NOT EXECUTED
rtems_bdbuf_swapout_workers_close ();
free (transfer.write_req);
rtems_task_delete (RTEMS_SELF);
}
10f41b: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10f41e: 5b pop %ebx <== NOT EXECUTED
10f41f: 5e pop %esi <== NOT EXECUTED
10f420: 5f pop %edi <== NOT EXECUTED
10f421: 5d pop %ebp <== NOT EXECUTED
10f422: c3 ret <== NOT EXECUTED
0010f423 <rtems_bdbuf_swapout_worker_task>:
* @param arg A pointer to the worker thread's private data.
* @return rtems_task Not used.
*/
static rtems_task
rtems_bdbuf_swapout_worker_task (rtems_task_argument arg)
{
10f423: 55 push %ebp <== NOT EXECUTED
10f424: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10f426: 57 push %edi <== NOT EXECUTED
10f427: 56 push %esi <== NOT EXECUTED
10f428: 53 push %ebx <== NOT EXECUTED
10f429: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10f42c: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
while (worker->enabled)
{
rtems_bdbuf_wait_for_event (RTEMS_BDBUF_SWAPOUT_SYNC);
rtems_bdbuf_swapout_write (&worker->transfer);
10f42f: 8d 73 10 lea 0x10(%ebx),%esi <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
10f432: 8d 7b 14 lea 0x14(%ebx),%edi <== NOT EXECUTED
static rtems_task
rtems_bdbuf_swapout_worker_task (rtems_task_argument arg)
{
rtems_bdbuf_swapout_worker* worker = (rtems_bdbuf_swapout_worker*) arg;
while (worker->enabled)
10f435: eb 45 jmp 10f47c <rtems_bdbuf_swapout_worker_task+0x59><== NOT EXECUTED
{
rtems_bdbuf_wait_for_event (RTEMS_BDBUF_SWAPOUT_SYNC);
10f437: b8 04 00 00 00 mov $0x4,%eax <== NOT EXECUTED
10f43c: e8 27 f0 ff ff call 10e468 <rtems_bdbuf_wait_for_event><== NOT EXECUTED
rtems_bdbuf_swapout_write (&worker->transfer);
10f441: 89 f0 mov %esi,%eax <== NOT EXECUTED
10f443: e8 37 fc ff ff call 10f07f <rtems_bdbuf_swapout_write><== NOT EXECUTED
rtems_bdbuf_lock_cache ();
10f448: e8 7e ef ff ff call 10e3cb <rtems_bdbuf_lock_cache><== NOT EXECUTED
10f44d: 89 7b 10 mov %edi,0x10(%ebx) <== NOT EXECUTED
head->next = tail;
head->previous = NULL;
10f450: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
10f457: 89 73 18 mov %esi,0x18(%ebx) <== NOT EXECUTED
rtems_chain_initialize_empty (&worker->transfer.bds);
worker->transfer.dd = BDBUF_INVALID_DEV;
10f45a: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx) <== NOT EXECUTED
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
10f461: a1 d0 20 13 00 mov 0x1320d0,%eax <== NOT EXECUTED
the_node->next = tail;
10f466: c7 03 cc 20 13 00 movl $0x1320cc,(%ebx) <== NOT EXECUTED
tail->previous = the_node;
10f46c: 89 1d d0 20 13 00 mov %ebx,0x1320d0 <== NOT EXECUTED
old_last->next = the_node;
10f472: 89 18 mov %ebx,(%eax) <== NOT EXECUTED
the_node->previous = old_last;
10f474: 89 43 04 mov %eax,0x4(%ebx) <== NOT EXECUTED
rtems_chain_append_unprotected (&bdbuf_cache.swapout_workers, &worker->link);
rtems_bdbuf_unlock_cache ();
10f477: e8 94 ef ff ff call 10e410 <rtems_bdbuf_unlock_cache><== NOT EXECUTED
static rtems_task
rtems_bdbuf_swapout_worker_task (rtems_task_argument arg)
{
rtems_bdbuf_swapout_worker* worker = (rtems_bdbuf_swapout_worker*) arg;
while (worker->enabled)
10f47c: 80 7b 0c 00 cmpb $0x0,0xc(%ebx) <== NOT EXECUTED
10f480: 75 b5 jne 10f437 <rtems_bdbuf_swapout_worker_task+0x14><== NOT EXECUTED
rtems_chain_append_unprotected (&bdbuf_cache.swapout_workers, &worker->link);
rtems_bdbuf_unlock_cache ();
}
free (worker->transfer.write_req);
10f482: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10f485: ff 73 24 pushl 0x24(%ebx) <== NOT EXECUTED
10f488: e8 97 80 ff ff call 107524 <free> <== NOT EXECUTED
free (worker);
10f48d: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED
10f490: e8 8f 80 ff ff call 107524 <free> <== NOT EXECUTED
rtems_task_delete (RTEMS_SELF);
10f495: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10f498: c7 45 08 00 00 00 00 movl $0x0,0x8(%ebp) <== NOT EXECUTED
}
10f49f: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10f4a2: 5b pop %ebx <== NOT EXECUTED
10f4a3: 5e pop %esi <== NOT EXECUTED
10f4a4: 5f pop %edi <== NOT EXECUTED
10f4a5: 5d pop %ebp <== NOT EXECUTED
}
free (worker->transfer.write_req);
free (worker);
rtems_task_delete (RTEMS_SELF);
10f4a6: e9 41 bb ff ff jmp 10afec <rtems_task_delete> <== NOT EXECUTED
0010f07f <rtems_bdbuf_swapout_write>:
*
* @param transfer The transfer transaction.
*/
static void
rtems_bdbuf_swapout_write (rtems_bdbuf_swapout_transfer* transfer)
{
10f07f: 55 push %ebp
10f080: 89 e5 mov %esp,%ebp
10f082: 57 push %edi
10f083: 56 push %esi
10f084: 53 push %ebx
10f085: 83 ec 1c sub $0x1c,%esp
10f088: 89 c3 mov %eax,%ebx
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
10f08a: 8d 40 04 lea 0x4(%eax),%eax
10f08d: 89 45 dc mov %eax,-0x24(%ebp)
printf ("bdbuf:swapout transfer: %08x\n", (unsigned) transfer->dd->dev);
/*
* If there are buffers to transfer to the media transfer them.
*/
if (!rtems_chain_is_empty (&transfer->bds))
10f090: 39 03 cmp %eax,(%ebx)
10f092: 0f 84 db 00 00 00 je 10f173 <rtems_bdbuf_swapout_write+0xf4><== NEVER TAKEN
* The last block number used when the driver only supports
* continuous blocks in a single request.
*/
uint32_t last_block = 0;
rtems_disk_device *dd = transfer->dd;
10f098: 8b 73 0c mov 0xc(%ebx),%esi
uint32_t media_blocks_per_block = dd->media_blocks_per_block;
10f09b: 8b 56 2c mov 0x2c(%esi),%edx
10f09e: 89 55 d8 mov %edx,-0x28(%ebp)
bool need_continuous_blocks =
(dd->phys_dev->capabilities & RTEMS_BLKDEV_CAP_MULTISECTOR_CONT) != 0;
10f0a1: 8b 46 08 mov 0x8(%esi),%eax
10f0a4: 8b 40 0c mov 0xc(%eax),%eax
10f0a7: 83 e0 01 and $0x1,%eax
10f0aa: 89 45 e0 mov %eax,-0x20(%ebp)
* should be possible to make this change with little effect in this
* code. The array that is passed is broken in design and should be
* removed. Merging members of a struct into the first member is
* trouble waiting to happen.
*/
transfer->write_req->status = RTEMS_RESOURCE_IN_USE;
10f0ad: 8b 43 14 mov 0x14(%ebx),%eax
10f0b0: c7 40 0c 0c 00 00 00 movl $0xc,0xc(%eax)
transfer->write_req->bufnum = 0;
10f0b7: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax)
{
/*
* The last block number used when the driver only supports
* continuous blocks in a single request.
*/
uint32_t last_block = 0;
10f0be: 31 ff xor %edi,%edi
* trouble waiting to happen.
*/
transfer->write_req->status = RTEMS_RESOURCE_IN_USE;
transfer->write_req->bufnum = 0;
while ((node = rtems_chain_get_unprotected(&transfer->bds)) != NULL)
10f0c0: e9 84 00 00 00 jmp 10f149 <rtems_bdbuf_swapout_write+0xca>
if (rtems_bdbuf_tracer)
printf ("bdbuf:swapout write: bd:%" PRIu32 ", bufnum:%" PRIu32 " mode:%s\n",
bd->block, transfer->write_req->bufnum,
need_continuous_blocks ? "MULTI" : "SCAT");
if (need_continuous_blocks && transfer->write_req->bufnum &&
10f0c5: 83 7d e0 00 cmpl $0x0,-0x20(%ebp)
10f0c9: 8b 53 14 mov 0x14(%ebx),%edx
10f0cc: 74 20 je 10f0ee <rtems_bdbuf_swapout_write+0x6f>
10f0ce: 83 7a 10 00 cmpl $0x0,0x10(%edx)
10f0d2: 74 1a je 10f0ee <rtems_bdbuf_swapout_write+0x6f>
bd->block != last_block + media_blocks_per_block)
10f0d4: 8b 4d d8 mov -0x28(%ebp),%ecx
10f0d7: 01 f9 add %edi,%ecx
if (rtems_bdbuf_tracer)
printf ("bdbuf:swapout write: bd:%" PRIu32 ", bufnum:%" PRIu32 " mode:%s\n",
bd->block, transfer->write_req->bufnum,
need_continuous_blocks ? "MULTI" : "SCAT");
if (need_continuous_blocks && transfer->write_req->bufnum &&
10f0d9: 39 48 18 cmp %ecx,0x18(%eax)
10f0dc: 74 10 je 10f0ee <rtems_bdbuf_swapout_write+0x6f>
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
10f0de: 89 58 04 mov %ebx,0x4(%eax)
before_node = after_node->next;
10f0e1: 8b 13 mov (%ebx),%edx
after_node->next = the_node;
10f0e3: 89 03 mov %eax,(%ebx)
the_node->next = before_node;
10f0e5: 89 10 mov %edx,(%eax)
before_node->previous = the_node;
10f0e7: 89 42 04 mov %eax,0x4(%edx)
bd->block != last_block + media_blocks_per_block)
{
rtems_chain_prepend_unprotected (&transfer->bds, &bd->link);
write = true;
10f0ea: b0 01 mov $0x1,%al
10f0ec: eb 28 jmp 10f116 <rtems_bdbuf_swapout_write+0x97>
}
else
{
rtems_blkdev_sg_buffer* buf;
buf = &transfer->write_req->bufs[transfer->write_req->bufnum];
10f0ee: 8b 7a 10 mov 0x10(%edx),%edi
10f0f1: 47 inc %edi
10f0f2: 89 f9 mov %edi,%ecx
10f0f4: c1 e1 04 shl $0x4,%ecx
10f0f7: 01 d1 add %edx,%ecx
10f0f9: 89 4d e4 mov %ecx,-0x1c(%ebp)
transfer->write_req->bufnum++;
10f0fc: 89 7a 10 mov %edi,0x10(%edx)
buf->user = bd;
10f0ff: 89 41 14 mov %eax,0x14(%ecx)
buf->block = bd->block;
10f102: 8b 78 18 mov 0x18(%eax),%edi
10f105: 89 79 08 mov %edi,0x8(%ecx)
buf->length = dd->block_size;
10f108: 8b 56 24 mov 0x24(%esi),%edx
10f10b: 89 51 0c mov %edx,0xc(%ecx)
buf->buffer = bd->buffer;
10f10e: 8b 40 1c mov 0x1c(%eax),%eax
10f111: 89 41 10 mov %eax,0x10(%ecx)
transfer->write_req->bufnum = 0;
while ((node = rtems_chain_get_unprotected(&transfer->bds)) != NULL)
{
rtems_bdbuf_buffer* bd = (rtems_bdbuf_buffer*) node;
bool write = false;
10f114: 31 c0 xor %eax,%eax
/*
* Perform the transfer if there are no more buffers, or the transfer
* size has reached the configured max. value.
*/
if (rtems_chain_is_empty (&transfer->bds) ||
10f116: 8b 4d dc mov -0x24(%ebp),%ecx
10f119: 39 0b cmp %ecx,(%ebx)
10f11b: 8b 53 14 mov 0x14(%ebx),%edx
10f11e: 74 0f je 10f12f <rtems_bdbuf_swapout_write+0xb0>
10f120: 8b 0d 50 14 12 00 mov 0x121450,%ecx
10f126: 39 4a 10 cmp %ecx,0x10(%edx)
10f129: 73 04 jae 10f12f <rtems_bdbuf_swapout_write+0xb0>
(transfer->write_req->bufnum >= bdbuf_config.max_write_blocks))
write = true;
if (write)
10f12b: 84 c0 test %al,%al
10f12d: 74 1a je 10f149 <rtems_bdbuf_swapout_write+0xca>
{
rtems_bdbuf_execute_transfer_request (dd, transfer->write_req, false);
10f12f: 31 c9 xor %ecx,%ecx
10f131: 89 f0 mov %esi,%eax
10f133: e8 28 fe ff ff call 10ef60 <rtems_bdbuf_execute_transfer_request>
transfer->write_req->status = RTEMS_RESOURCE_IN_USE;
10f138: 8b 43 14 mov 0x14(%ebx),%eax
10f13b: c7 40 0c 0c 00 00 00 movl $0xc,0xc(%eax)
transfer->write_req->bufnum = 0;
10f142: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax)
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get_unprotected(
rtems_chain_control *the_chain
)
{
return _Chain_Get_unprotected( the_chain );
10f149: 89 d8 mov %ebx,%eax
10f14b: e8 38 f2 ff ff call 10e388 <_Chain_Get_unprotected>
* trouble waiting to happen.
*/
transfer->write_req->status = RTEMS_RESOURCE_IN_USE;
transfer->write_req->bufnum = 0;
while ((node = rtems_chain_get_unprotected(&transfer->bds)) != NULL)
10f150: 85 c0 test %eax,%eax
10f152: 0f 85 6d ff ff ff jne 10f0c5 <rtems_bdbuf_swapout_write+0x46>
/*
* If sync'ing and the deivce is capability of handling a sync IO control
* call perform the call.
*/
if (transfer->syncing &&
10f158: 80 7b 10 00 cmpb $0x0,0x10(%ebx)
10f15c: 74 15 je 10f173 <rtems_bdbuf_swapout_write+0xf4>
(dd->phys_dev->capabilities & RTEMS_BLKDEV_CAP_SYNC))
10f15e: 8b 46 08 mov 0x8(%esi),%eax
/*
* If sync'ing and the deivce is capability of handling a sync IO control
* call perform the call.
*/
if (transfer->syncing &&
10f161: f6 40 0c 02 testb $0x2,0xc(%eax)
10f165: 74 0c je 10f173 <rtems_bdbuf_swapout_write+0xf4><== ALWAYS TAKEN
(dd->phys_dev->capabilities & RTEMS_BLKDEV_CAP_SYNC))
{
/* int result = */ dd->ioctl (dd->phys_dev, RTEMS_BLKDEV_REQ_SYNC, NULL);
10f167: 53 push %ebx <== NOT EXECUTED
10f168: 6a 00 push $0x0 <== NOT EXECUTED
10f16a: 6a 02 push $0x2 <== NOT EXECUTED
10f16c: 50 push %eax <== NOT EXECUTED
10f16d: ff 56 38 call *0x38(%esi) <== NOT EXECUTED
10f170: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
/* How should the error be handled ? */
}
}
}
10f173: 8d 65 f4 lea -0xc(%ebp),%esp
10f176: 5b pop %ebx
10f177: 5e pop %esi
10f178: 5f pop %edi
10f179: 5d pop %ebp
10f17a: c3 ret
0010e58c <rtems_bdbuf_swapout_writereq_alloc>:
*
* @return rtems_blkdev_request* The write reference memory.
*/
static rtems_blkdev_request*
rtems_bdbuf_swapout_writereq_alloc (void)
{
10e58c: 55 push %ebp
10e58d: 89 e5 mov %esp,%ebp
10e58f: 53 push %ebx
10e590: 83 ec 10 sub $0x10,%esp
* have been a rtems_chain_control. Simple, fast and less storage as the node
* is already part of the buffer structure.
*/
rtems_blkdev_request* write_req =
malloc (sizeof (rtems_blkdev_request) +
(bdbuf_config.max_write_blocks * sizeof (rtems_blkdev_sg_buffer)));
10e593: a1 50 14 12 00 mov 0x121450,%eax
10e598: c1 e0 04 shl $0x4,%eax
* I am disappointment at finding code like this in RTEMS. The request should
* have been a rtems_chain_control. Simple, fast and less storage as the node
* is already part of the buffer structure.
*/
rtems_blkdev_request* write_req =
malloc (sizeof (rtems_blkdev_request) +
10e59b: 83 c0 18 add $0x18,%eax
* @note chrisj The rtems_blkdev_request and the array at the end is a hack.
* I am disappointment at finding code like this in RTEMS. The request should
* have been a rtems_chain_control. Simple, fast and less storage as the node
* is already part of the buffer structure.
*/
rtems_blkdev_request* write_req =
10e59e: 50 push %eax
10e59f: e8 a0 93 ff ff call 107944 <malloc>
10e5a4: 89 c3 mov %eax,%ebx
malloc (sizeof (rtems_blkdev_request) +
(bdbuf_config.max_write_blocks * sizeof (rtems_blkdev_sg_buffer)));
if (!write_req)
10e5a6: 83 c4 10 add $0x10,%esp
10e5a9: 85 c0 test %eax,%eax
10e5ab: 75 0d jne 10e5ba <rtems_bdbuf_swapout_writereq_alloc+0x2e><== ALWAYS TAKEN
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_NOMEM);
10e5ad: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10e5b0: 68 15 00 00 42 push $0x42000015 <== NOT EXECUTED
10e5b5: e8 56 cd ff ff call 10b310 <rtems_fatal_error_occurred><== NOT EXECUTED
write_req->req = RTEMS_BLKDEV_REQ_WRITE;
10e5ba: c7 00 01 00 00 00 movl $0x1,(%eax)
write_req->req_done = rtems_bdbuf_transfer_done;
10e5c0: c7 40 04 49 e4 10 00 movl $0x10e449,0x4(%eax)
write_req->done_arg = write_req;
10e5c7: 89 43 08 mov %eax,0x8(%ebx)
write_req->io_task = rtems_task_self ();
10e5ca: e8 3d 3a 00 00 call 11200c <rtems_task_self>
10e5cf: 89 43 14 mov %eax,0x14(%ebx)
return write_req;
}
10e5d2: 89 d8 mov %ebx,%eax
10e5d4: 8b 5d fc mov -0x4(%ebp),%ebx
10e5d7: c9 leave
10e5d8: c3 ret
0010fdea <rtems_bdbuf_sync>:
rtems_status_code
rtems_bdbuf_sync (rtems_bdbuf_buffer *bd)
{
10fdea: 55 push %ebp
10fdeb: 89 e5 mov %esp,%ebp
10fded: 53 push %ebx
10fdee: 51 push %ecx
10fdef: 8b 5d 08 mov 0x8(%ebp),%ebx
}
static rtems_status_code
rtems_bdbuf_check_bd_and_lock_cache (rtems_bdbuf_buffer *bd, const char *kind)
{
if (bd == NULL)
10fdf2: 85 db test %ebx,%ebx
10fdf4: 0f 84 c4 00 00 00 je 10febe <rtems_bdbuf_sync+0xd4> <== NEVER TAKEN
if (rtems_bdbuf_tracer)
{
printf ("bdbuf:%s: %" PRIu32 "\n", kind, bd->block);
rtems_bdbuf_show_users (kind, bd);
}
rtems_bdbuf_lock_cache();
10fdfa: e8 cc e5 ff ff call 10e3cb <rtems_bdbuf_lock_cache>
sc = rtems_bdbuf_check_bd_and_lock_cache (bd, "sync");
if (sc != RTEMS_SUCCESSFUL)
return sc;
switch (bd->state)
10fdff: 8b 43 20 mov 0x20(%ebx),%eax
10fe02: 83 f8 03 cmp $0x3,%eax
10fe05: 0f 82 a0 00 00 00 jb 10feab <rtems_bdbuf_sync+0xc1> <== NEVER TAKEN
10fe0b: 83 f8 05 cmp $0x5,%eax
10fe0e: 76 0e jbe 10fe1e <rtems_bdbuf_sync+0x34>
10fe10: 83 f8 06 cmp $0x6,%eax
10fe13: 0f 85 92 00 00 00 jne 10feab <rtems_bdbuf_sync+0xc1> <== NEVER TAKEN
10fe19: e9 84 00 00 00 jmp 10fea2 <rtems_bdbuf_sync+0xb8>
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
10fe1e: c7 43 20 08 00 00 00 movl $0x8,0x20(%ebx)
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
10fe25: a1 20 21 13 00 mov 0x132120,%eax
the_node->next = tail;
10fe2a: c7 03 1c 21 13 00 movl $0x13211c,(%ebx)
tail->previous = the_node;
10fe30: 89 1d 20 21 13 00 mov %ebx,0x132120
old_last->next = the_node;
10fe36: 89 18 mov %ebx,(%eax)
the_node->previous = old_last;
10fe38: 89 43 04 mov %eax,0x4(%ebx)
{
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_SYNC);
rtems_chain_append_unprotected (&bdbuf_cache.sync, &bd->link);
if (bd->waiters)
10fe3b: 83 7b 24 00 cmpl $0x0,0x24(%ebx)
10fe3f: 74 0a je 10fe4b <rtems_bdbuf_sync+0x61>
rtems_bdbuf_wake (&bdbuf_cache.access_waiters);
10fe41: b8 24 21 13 00 mov $0x132124,%eax
10fe46: e8 ba e7 ff ff call 10e605 <rtems_bdbuf_wake>
rtems_bdbuf_wake_swapper ();
10fe4b: e8 d0 e5 ff ff call 10e420 <rtems_bdbuf_wake_swapper>
static void
rtems_bdbuf_wait_for_sync_done (rtems_bdbuf_buffer *bd)
{
while (true)
{
switch (bd->state)
10fe50: 8b 43 20 mov 0x20(%ebx),%eax
10fe53: 83 f8 01 cmp $0x1,%eax
10fe56: 72 18 jb 10fe70 <rtems_bdbuf_sync+0x86> <== NEVER TAKEN
10fe58: 83 f8 07 cmp $0x7,%eax
10fe5b: 76 1a jbe 10fe77 <rtems_bdbuf_sync+0x8d>
10fe5d: 83 f8 0a cmp $0xa,%eax
10fe60: 77 0e ja 10fe70 <rtems_bdbuf_sync+0x86> <== NEVER TAKEN
case RTEMS_BDBUF_STATE_ACCESS_PURGED:
return;
case RTEMS_BDBUF_STATE_SYNC:
case RTEMS_BDBUF_STATE_TRANSFER:
case RTEMS_BDBUF_STATE_TRANSFER_PURGED:
rtems_bdbuf_wait (bd, &bdbuf_cache.transfer_waiters);
10fe62: ba 2c 21 13 00 mov $0x13212c,%edx
10fe67: 89 d8 mov %ebx,%eax
10fe69: e8 fa e6 ff ff call 10e568 <rtems_bdbuf_wait>
10fe6e: eb e0 jmp 10fe50 <rtems_bdbuf_sync+0x66>
break;
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_9);
10fe70: ba 07 00 00 42 mov $0x42000007,%edx <== NOT EXECUTED
10fe75: eb 39 jmp 10feb0 <rtems_bdbuf_sync+0xc6> <== NOT EXECUTED
rtems_bdbuf_wait_for_sync_done (bd);
/*
* We may have created a cached or empty buffer which may be recycled.
*/
if (bd->waiters == 0
10fe77: 83 7b 24 00 cmpl $0x0,0x24(%ebx)
10fe7b: 75 38 jne 10feb5 <rtems_bdbuf_sync+0xcb>
&& (bd->state == RTEMS_BDBUF_STATE_CACHED
|| bd->state == RTEMS_BDBUF_STATE_EMPTY))
10fe7d: 8d 50 ff lea -0x1(%eax),%edx
/*
* We may have created a cached or empty buffer which may be recycled.
*/
if (bd->waiters == 0
&& (bd->state == RTEMS_BDBUF_STATE_CACHED
10fe80: 83 fa 01 cmp $0x1,%edx
10fe83: 77 30 ja 10feb5 <rtems_bdbuf_sync+0xcb> <== NEVER TAKEN
|| bd->state == RTEMS_BDBUF_STATE_EMPTY))
{
if (bd->state == RTEMS_BDBUF_STATE_EMPTY)
10fe85: 48 dec %eax
10fe86: 75 0e jne 10fe96 <rtems_bdbuf_sync+0xac>
{
rtems_bdbuf_remove_from_tree (bd);
10fe88: 89 d8 mov %ebx,%eax
10fe8a: e8 ed e7 ff ff call 10e67c <rtems_bdbuf_remove_from_tree>
rtems_bdbuf_make_free_and_add_to_lru_list (bd);
10fe8f: 89 d8 mov %ebx,%eax
10fe91: e8 7b ea ff ff call 10e911 <rtems_bdbuf_make_free_and_add_to_lru_list>
}
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
10fe96: b8 34 21 13 00 mov $0x132134,%eax
10fe9b: e8 65 e7 ff ff call 10e605 <rtems_bdbuf_wake>
10fea0: eb 13 jmp 10feb5 <rtems_bdbuf_sync+0xcb>
case RTEMS_BDBUF_STATE_ACCESS_EMPTY:
case RTEMS_BDBUF_STATE_ACCESS_MODIFIED:
rtems_bdbuf_sync_after_access (bd);
break;
case RTEMS_BDBUF_STATE_ACCESS_PURGED:
rtems_bdbuf_discard_buffer_after_access (bd);
10fea2: 89 d8 mov %ebx,%eax
10fea4: e8 11 f8 ff ff call 10f6ba <rtems_bdbuf_discard_buffer_after_access>
break;
10fea9: eb 0a jmp 10feb5 <rtems_bdbuf_sync+0xcb>
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_5);
10feab: ba 03 00 00 42 mov $0x42000003,%edx <== NOT EXECUTED
10feb0: e8 26 e5 ff ff call 10e3db <rtems_bdbuf_fatal> <== NOT EXECUTED
}
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_usage ();
rtems_bdbuf_unlock_cache ();
10feb5: e8 56 e5 ff ff call 10e410 <rtems_bdbuf_unlock_cache>
return RTEMS_SUCCESSFUL;
10feba: 31 c0 xor %eax,%eax
10febc: eb 05 jmp 10fec3 <rtems_bdbuf_sync+0xd9>
static rtems_status_code
rtems_bdbuf_check_bd_and_lock_cache (rtems_bdbuf_buffer *bd, const char *kind)
{
if (bd == NULL)
return RTEMS_INVALID_ADDRESS;
10febe: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
rtems_bdbuf_show_usage ();
rtems_bdbuf_unlock_cache ();
return RTEMS_SUCCESSFUL;
}
10fec3: 5a pop %edx
10fec4: 5b pop %ebx
10fec5: 5d pop %ebp
10fec6: c3 ret
0010e3ec <rtems_bdbuf_unlock>:
* @param lock The mutex to unlock.
* @param fatal_error_code The error code if the call fails.
*/
static void
rtems_bdbuf_unlock (rtems_id lock, uint32_t fatal_error_code)
{
10e3ec: 55 push %ebp
10e3ed: 89 e5 mov %esp,%ebp
10e3ef: 53 push %ebx
10e3f0: 83 ec 10 sub $0x10,%esp
10e3f3: 89 d3 mov %edx,%ebx
rtems_status_code sc = rtems_semaphore_release (lock);
10e3f5: 50 push %eax
10e3f6: e8 29 ca ff ff call 10ae24 <rtems_semaphore_release>
if (sc != RTEMS_SUCCESSFUL)
10e3fb: 83 c4 10 add $0x10,%esp
10e3fe: 85 c0 test %eax,%eax
10e400: 74 09 je 10e40b <rtems_bdbuf_unlock+0x1f><== ALWAYS TAKEN
rtems_fatal_error_occurred (fatal_error_code);
10e402: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10e405: 53 push %ebx <== NOT EXECUTED
10e406: e8 05 cf ff ff call 10b310 <rtems_fatal_error_occurred><== NOT EXECUTED
}
10e40b: 8b 5d fc mov -0x4(%ebp),%ebx
10e40e: c9 leave
10e40f: c3 ret
0010e468 <rtems_bdbuf_wait_for_event>:
return RTEMS_UNSATISFIED;
}
static void
rtems_bdbuf_wait_for_event (rtems_event_set event)
{
10e468: 55 push %ebp
10e469: 89 e5 mov %esp,%ebp
10e46b: 53 push %ebx
10e46c: 83 ec 14 sub $0x14,%esp
10e46f: 89 c3 mov %eax,%ebx
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_event_set out = 0;
10e471: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
sc = rtems_event_receive (event,
10e478: 8d 45 f4 lea -0xc(%ebp),%eax
10e47b: 50 push %eax
10e47c: 6a 00 push $0x0
10e47e: 6a 00 push $0x0
10e480: 53 push %ebx
10e481: e8 7a c3 ff ff call 10a800 <rtems_event_receive>
RTEMS_EVENT_ALL | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&out);
if (sc != RTEMS_SUCCESSFUL || out != event)
10e486: 83 c4 10 add $0x10,%esp
10e489: 85 c0 test %eax,%eax
10e48b: 75 05 jne 10e492 <rtems_bdbuf_wait_for_event+0x2a><== NEVER TAKEN
10e48d: 39 5d f4 cmp %ebx,-0xc(%ebp)
10e490: 74 0d je 10e49f <rtems_bdbuf_wait_for_event+0x37><== ALWAYS TAKEN
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_WAIT_EVNT);
10e492: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10e495: 68 1a 00 00 42 push $0x4200001a <== NOT EXECUTED
10e49a: e8 71 ce ff ff call 10b310 <rtems_fatal_error_occurred><== NOT EXECUTED
}
10e49f: 8b 5d fc mov -0x4(%ebp),%ebx
10e4a2: c9 leave
10e4a3: c3 ret
0010e605 <rtems_bdbuf_wake>:
static void
rtems_bdbuf_wake (const rtems_bdbuf_waiters *waiters)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (waiters->count > 0)
10e605: 83 38 00 cmpl $0x0,(%eax)
10e608: 74 23 je 10e62d <rtems_bdbuf_wake+0x28>
* Wake a blocked resource. The resource has a counter that lets us know if
* there are any waiters.
*/
static void
rtems_bdbuf_wake (const rtems_bdbuf_waiters *waiters)
{
10e60a: 55 push %ebp
10e60b: 89 e5 mov %esp,%ebp
10e60d: 83 ec 14 sub $0x14,%esp
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (waiters->count > 0)
{
sc = rtems_semaphore_flush (waiters->sema);
10e610: ff 70 04 pushl 0x4(%eax)
10e613: e8 50 38 00 00 call 111e68 <rtems_semaphore_flush>
if (sc != RTEMS_SUCCESSFUL)
10e618: 83 c4 10 add $0x10,%esp
10e61b: 85 c0 test %eax,%eax
10e61d: 74 0d je 10e62c <rtems_bdbuf_wake+0x27> <== ALWAYS TAKEN
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_CACHE_WAKE);
10e61f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10e622: 68 13 00 00 42 push $0x42000013 <== NOT EXECUTED
10e627: e8 e4 cc ff ff call 10b310 <rtems_fatal_error_occurred><== NOT EXECUTED
}
}
10e62c: c9 leave
10e62d: c3 ret
0010e420 <rtems_bdbuf_wake_swapper>:
}
}
static void
rtems_bdbuf_wake_swapper (void)
{
10e420: 55 push %ebp
10e421: 89 e5 mov %esp,%ebp
10e423: 83 ec 10 sub $0x10,%esp
rtems_status_code sc = rtems_event_send (bdbuf_cache.swapout,
10e426: 6a 04 push $0x4
10e428: ff 35 c0 20 13 00 pushl 0x1320c0
10e42e: e8 35 c5 ff ff call 10a968 <rtems_event_send>
RTEMS_BDBUF_SWAPOUT_SYNC);
if (sc != RTEMS_SUCCESSFUL)
10e433: 83 c4 10 add $0x10,%esp
10e436: 85 c0 test %eax,%eax
10e438: 74 0d je 10e447 <rtems_bdbuf_wake_swapper+0x27><== ALWAYS TAKEN
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_WAKE);
10e43a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10e43d: 68 14 00 00 42 push $0x42000014 <== NOT EXECUTED
10e442: e8 c9 ce ff ff call 10b310 <rtems_fatal_error_occurred><== NOT EXECUTED
}
10e447: c9 leave
10e448: c3 ret
0010607c <rtems_bdpart_create>:
const rtems_bdpart_format *format,
rtems_bdpart_partition *pt,
const unsigned *dist,
size_t count
)
{
10607c: 55 push %ebp
10607d: 89 e5 mov %esp,%ebp
10607f: 57 push %edi
106080: 56 push %esi
106081: 53 push %ebx
106082: 83 ec 3c sub $0x3c,%esp
106085: 8b 5d 0c mov 0xc(%ebp),%ebx
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool dos_compatibility = format != NULL
&& format->type == RTEMS_BDPART_FORMAT_MBR
&& format->mbr.dos_compatibility;
106088: 31 ff xor %edi,%edi
10608a: 85 db test %ebx,%ebx
10608c: 74 09 je 106097 <rtems_bdpart_create+0x1b><== NEVER TAKEN
size_t count
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool dos_compatibility = format != NULL
&& format->type == RTEMS_BDPART_FORMAT_MBR
10608e: 83 3b 00 cmpl $0x0,(%ebx)
106091: 75 04 jne 106097 <rtems_bdpart_create+0x1b><== NEVER TAKEN
&& format->mbr.dos_compatibility;
106093: 0f b6 7b 08 movzbl 0x8(%ebx),%edi
const unsigned *dist,
size_t count
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool dos_compatibility = format != NULL
106097: 89 f8 mov %edi,%eax
106099: 83 e0 01 and $0x1,%eax
10609c: 88 45 d4 mov %al,-0x2c(%ebp)
&& format->type == RTEMS_BDPART_FORMAT_MBR
&& format->mbr.dos_compatibility;
rtems_blkdev_bnum disk_end = 0;
10609f: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
rtems_blkdev_bnum pos = 0;
rtems_blkdev_bnum dist_sum = 0;
rtems_blkdev_bnum record_space =
1060a6: 3c 01 cmp $0x1,%al
1060a8: 19 ff sbb %edi,%edi
1060aa: 83 e7 c2 and $0xffffffc2,%edi
1060ad: 83 c7 3f add $0x3f,%edi
size_t i = 0;
/* Check if we have something to do */
if (count == 0) {
/* Nothing to do */
return RTEMS_SUCCESSFUL;
1060b0: 31 c9 xor %ecx,%ecx
rtems_blkdev_bnum overhead = 0;
rtems_blkdev_bnum free_space = 0;
size_t i = 0;
/* Check if we have something to do */
if (count == 0) {
1060b2: 83 7d 18 00 cmpl $0x0,0x18(%ebp)
1060b6: 0f 84 56 01 00 00 je 106212 <rtems_bdpart_create+0x196><== NEVER TAKEN
/* Nothing to do */
return RTEMS_SUCCESSFUL;
}
/* Check parameter */
if (format == NULL || pt == NULL || dist == NULL) {
1060bc: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
1060c0: 0f 84 39 01 00 00 je 1061ff <rtems_bdpart_create+0x183><== NEVER TAKEN
1060c6: 85 db test %ebx,%ebx
1060c8: 0f 84 31 01 00 00 je 1061ff <rtems_bdpart_create+0x183><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
1060ce: b1 09 mov $0x9,%cl
/* Nothing to do */
return RTEMS_SUCCESSFUL;
}
/* Check parameter */
if (format == NULL || pt == NULL || dist == NULL) {
1060d0: 83 7d 14 00 cmpl $0x0,0x14(%ebp)
1060d4: 0f 84 38 01 00 00 je 106212 <rtems_bdpart_create+0x196><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
}
/* Get disk data */
sc = rtems_bdpart_get_disk_data( disk_name, NULL, NULL, &disk_end);
1060da: 8d 45 e4 lea -0x1c(%ebp),%eax
1060dd: 50 push %eax
1060de: 6a 00 push $0x0
1060e0: 6a 00 push $0x0
1060e2: ff 75 08 pushl 0x8(%ebp)
1060e5: e8 9c 03 00 00 call 106486 <rtems_bdpart_get_disk_data>
1060ea: 89 c1 mov %eax,%ecx
if (sc != RTEMS_SUCCESSFUL) {
1060ec: 83 c4 10 add $0x10,%esp
1060ef: 85 c0 test %eax,%eax
1060f1: 0f 85 1b 01 00 00 jne 106212 <rtems_bdpart_create+0x196><== NEVER TAKEN
1060f7: 31 c0 xor %eax,%eax
1060f9: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp)
/* Get distribution sum and check for overflow */
for (i = 0; i < count; ++i) {
unsigned prev_sum = dist_sum;
dist_sum += dist [i];
106100: 8b 75 14 mov 0x14(%ebp),%esi
106103: 8b 14 86 mov (%esi,%eax,4),%edx
if (dist_sum < prev_sum) {
106106: 8b 75 d0 mov -0x30(%ebp),%esi
106109: 01 d6 add %edx,%esi
10610b: 89 75 cc mov %esi,-0x34(%ebp)
10610e: 73 0a jae 10611a <rtems_bdpart_create+0x9e><== ALWAYS TAKEN
return RTEMS_INVALID_NUMBER;
106110: b9 0a 00 00 00 mov $0xa,%ecx <== NOT EXECUTED
106115: e9 f8 00 00 00 jmp 106212 <rtems_bdpart_create+0x196><== NOT EXECUTED
}
if (dist [i] == 0) {
10611a: 85 d2 test %edx,%edx
10611c: 74 f2 je 106110 <rtems_bdpart_create+0x94><== NEVER TAKEN
if (sc != RTEMS_SUCCESSFUL) {
return sc;
}
/* Get distribution sum and check for overflow */
for (i = 0; i < count; ++i) {
10611e: 40 inc %eax
unsigned prev_sum = dist_sum;
dist_sum += dist [i];
10611f: 8b 75 cc mov -0x34(%ebp),%esi
106122: 89 75 d0 mov %esi,-0x30(%ebp)
if (sc != RTEMS_SUCCESSFUL) {
return sc;
}
/* Get distribution sum and check for overflow */
for (i = 0; i < count; ++i) {
106125: 3b 45 18 cmp 0x18(%ebp),%eax
106128: 75 d6 jne 106100 <rtems_bdpart_create+0x84>
return RTEMS_INVALID_NUMBER;
}
}
/* Check format */
if (format->type != RTEMS_BDPART_FORMAT_MBR) {
10612a: 83 3b 00 cmpl $0x0,(%ebx)
10612d: 0f 85 d3 00 00 00 jne 106206 <rtems_bdpart_create+0x18a><== NEVER TAKEN
return RTEMS_NOT_IMPLEMENTED;
}
/* Align end of disk on cylinder boundary if necessary */
if (dos_compatibility) {
106133: 80 7d d4 00 cmpb $0x0,-0x2c(%ebp)
106137: 74 0f je 106148 <rtems_bdpart_create+0xcc><== NEVER TAKEN
disk_end -= (disk_end % record_space);
106139: 8b 45 e4 mov -0x1c(%ebp),%eax
10613c: 31 d2 xor %edx,%edx
10613e: f7 f7 div %edi
106140: 8b 45 e4 mov -0x1c(%ebp),%eax
106143: 29 d0 sub %edx,%eax
106145: 89 45 e4 mov %eax,-0x1c(%ebp)
/*
* We need at least space for the MBR and the compatibility space for the
* first primary partition.
*/
overhead += record_space;
106148: 89 f8 mov %edi,%eax
/*
* In case we need an extended partition and logical partitions we have to
* account for the space of each EBR.
*/
if (count > 4) {
10614a: 83 7d 18 04 cmpl $0x4,0x18(%ebp)
10614e: 76 0b jbe 10615b <rtems_bdpart_create+0xdf><== NEVER TAKEN
overhead += (count - 3) * record_space;
106150: 8b 45 18 mov 0x18(%ebp),%eax
106153: 83 e8 03 sub $0x3,%eax
106156: 0f af c7 imul %edi,%eax
106159: 01 f8 add %edi,%eax
/*
* Account space to align every partition on cylinder boundaries if
* necessary.
*/
if (dos_compatibility) {
10615b: 80 7d d4 00 cmpb $0x0,-0x2c(%ebp)
10615f: 74 09 je 10616a <rtems_bdpart_create+0xee><== NEVER TAKEN
overhead += (count - 1) * record_space;
106161: 8b 55 18 mov 0x18(%ebp),%edx
106164: 4a dec %edx
106165: 0f af d7 imul %edi,%edx
106168: 01 d0 add %edx,%eax
}
/* Check disk space */
if ((overhead + count) > disk_end) {
10616a: 8b 75 e4 mov -0x1c(%ebp),%esi
10616d: 89 75 c8 mov %esi,-0x38(%ebp)
106170: 8b 55 18 mov 0x18(%ebp),%edx
106173: 01 c2 add %eax,%edx
106175: 39 f2 cmp %esi,%edx
106177: 0f 87 90 00 00 00 ja 10620d <rtems_bdpart_create+0x191><== NEVER TAKEN
/* Begin of first primary partition */
pos = record_space;
/* Space for partitions */
free_space = disk_end - overhead;
10617d: 29 c6 sub %eax,%esi
10617f: 89 75 c4 mov %esi,-0x3c(%ebp)
106182: 8b 75 10 mov 0x10(%ebp),%esi
106185: 89 75 d0 mov %esi,-0x30(%ebp)
if ((overhead + count) > disk_end) {
return RTEMS_IO_ERROR;
}
/* Begin of first primary partition */
pos = record_space;
106188: 89 fe mov %edi,%esi
/* Space for partitions */
free_space = disk_end - overhead;
for (i = 0; i < count; ++i) {
10618a: 31 db xor %ebx,%ebx
rtems_bdpart_partition *p = pt + i;
/* Partition size */
rtems_blkdev_bnum s = free_space * dist [i];
10618c: 8b 55 14 mov 0x14(%ebp),%edx
10618f: 8b 04 9a mov (%edx,%ebx,4),%eax
106192: 8b 55 c4 mov -0x3c(%ebp),%edx
106195: 0f af d0 imul %eax,%edx
if (s < free_space || s < dist [i]) {
106198: 3b 55 c4 cmp -0x3c(%ebp),%edx
10619b: 0f 82 6f ff ff ff jb 106110 <rtems_bdpart_create+0x94><== NEVER TAKEN
1061a1: 39 c2 cmp %eax,%edx
1061a3: 0f 82 67 ff ff ff jb 106110 <rtems_bdpart_create+0x94><== NEVER TAKEN
/* TODO: Calculate without overflow */
return RTEMS_INVALID_NUMBER;
}
s /= dist_sum;
1061a9: 89 d0 mov %edx,%eax
1061ab: 31 d2 xor %edx,%edx
1061ad: f7 75 cc divl -0x34(%ebp)
1061b0: 89 45 d4 mov %eax,-0x2c(%ebp)
/* Ensure that the partition is not empty */
if (s == 0) {
1061b3: 85 c0 test %eax,%eax
1061b5: 75 07 jne 1061be <rtems_bdpart_create+0x142><== ALWAYS TAKEN
s = 1;
1061b7: c7 45 d4 01 00 00 00 movl $0x1,-0x2c(%ebp) <== NOT EXECUTED
}
/* Align partition upwards */
s += record_space - (s % record_space);
1061be: 8b 45 d4 mov -0x2c(%ebp),%eax
1061c1: 31 d2 xor %edx,%edx
1061c3: f7 f7 div %edi
1061c5: 8b 45 d4 mov -0x2c(%ebp),%eax
1061c8: 01 f8 add %edi,%eax
1061ca: 29 d0 sub %edx,%eax
/* Reserve space for the EBR if necessary */
if (count > 4 && i > 2) {
1061cc: 83 fb 02 cmp $0x2,%ebx
1061cf: 76 08 jbe 1061d9 <rtems_bdpart_create+0x15d>
1061d1: 83 7d 18 04 cmpl $0x4,0x18(%ebp)
1061d5: 76 02 jbe 1061d9 <rtems_bdpart_create+0x15d><== NEVER TAKEN
pos += record_space;
1061d7: 01 fe add %edi,%esi
}
/* Partition begin and end */
p->begin = pos;
1061d9: 8b 55 d0 mov -0x30(%ebp),%edx
1061dc: 89 32 mov %esi,(%edx)
pos += s;
1061de: 01 c6 add %eax,%esi
p->end = pos;
1061e0: 89 72 04 mov %esi,0x4(%edx)
pos = record_space;
/* Space for partitions */
free_space = disk_end - overhead;
for (i = 0; i < count; ++i) {
1061e3: 43 inc %ebx
1061e4: 83 c2 30 add $0x30,%edx
1061e7: 89 55 d0 mov %edx,-0x30(%ebp)
1061ea: 3b 5d 18 cmp 0x18(%ebp),%ebx
1061ed: 75 9d jne 10618c <rtems_bdpart_create+0x110>
pos += s;
p->end = pos;
}
/* Expand the last partition to the disk end */
pt [count - 1].end = disk_end;
1061ef: 4b dec %ebx
1061f0: 6b db 30 imul $0x30,%ebx,%ebx
1061f3: 8b 45 c8 mov -0x38(%ebp),%eax
1061f6: 8b 75 10 mov 0x10(%ebp),%esi
1061f9: 89 44 1e 04 mov %eax,0x4(%esi,%ebx,1)
1061fd: eb 13 jmp 106212 <rtems_bdpart_create+0x196>
return RTEMS_SUCCESSFUL;
}
/* Check parameter */
if (format == NULL || pt == NULL || dist == NULL) {
return RTEMS_INVALID_ADDRESS;
1061ff: b9 09 00 00 00 mov $0x9,%ecx <== NOT EXECUTED
106204: eb 0c jmp 106212 <rtems_bdpart_create+0x196><== NOT EXECUTED
}
}
/* Check format */
if (format->type != RTEMS_BDPART_FORMAT_MBR) {
return RTEMS_NOT_IMPLEMENTED;
106206: b9 18 00 00 00 mov $0x18,%ecx <== NOT EXECUTED
10620b: eb 05 jmp 106212 <rtems_bdpart_create+0x196><== NOT EXECUTED
overhead += (count - 1) * record_space;
}
/* Check disk space */
if ((overhead + count) > disk_end) {
return RTEMS_IO_ERROR;
10620d: b9 1b 00 00 00 mov $0x1b,%ecx <== NOT EXECUTED
/* Expand the last partition to the disk end */
pt [count - 1].end = disk_end;
return RTEMS_SUCCESSFUL;
}
106212: 89 c8 mov %ecx,%eax
106214: 8d 65 f4 lea -0xc(%ebp),%esp
106217: 5b pop %ebx
106218: 5e pop %esi
106219: 5f pop %edi
10621a: 5d pop %ebp
10621b: c3 ret
0010621c <rtems_bdpart_dump>:
{
uuid_unparse_lower( type, str);
}
void rtems_bdpart_dump( const rtems_bdpart_partition *pt, size_t count)
{
10621c: 55 push %ebp
10621d: 89 e5 mov %esp,%ebp
10621f: 57 push %edi
106220: 56 push %esi
106221: 53 push %ebx
106222: 83 ec 68 sub $0x68,%esp
size_t i = 0;
printf(
106225: 68 ed 36 12 00 push $0x1236ed
10622a: e8 b5 f9 00 00 call 115be4 <puts>
10622f: 8b 5d 08 mov 0x8(%ebp),%ebx
"------------+------------+-----------------------------------------------------\n"
" BEGIN | END | TYPE\n"
"------------+------------+-----------------------------------------------------\n"
);
for (i = 0; i < count; ++i) {
106232: 83 c4 10 add $0x10,%esp
106235: 31 ff xor %edi,%edi
snprintf( type_buffer, sizeof( type_buffer), "0x%02" PRIx8, type_mbr);
type = type_buffer;
break;
}
} else {
rtems_bdpart_type_to_string( p->type, type_buffer);
106237: 8d 75 b4 lea -0x4c(%ebp),%esi
"------------+------------+-----------------------------------------------------\n"
" BEGIN | END | TYPE\n"
"------------+------------+-----------------------------------------------------\n"
);
for (i = 0; i < count; ++i) {
10623a: e9 a1 00 00 00 jmp 1062e0 <rtems_bdpart_dump+0xc4>
const rtems_bdpart_partition *p = pt + i;
const char *type = NULL;
char type_buffer [52];
uint8_t type_mbr = 0;
10623f: c6 45 b3 00 movb $0x0,-0x4d(%ebp)
if (rtems_bdpart_to_mbr_partition_type( p->type, &type_mbr)) {
106243: 8d 53 08 lea 0x8(%ebx),%edx
106246: 51 push %ecx
106247: 51 push %ecx
106248: 8d 45 b3 lea -0x4d(%ebp),%eax
10624b: 50 push %eax
10624c: 52 push %edx
10624d: 89 55 a4 mov %edx,-0x5c(%ebp)
106250: e8 09 02 00 00 call 10645e <rtems_bdpart_to_mbr_partition_type>
106255: 83 c4 10 add $0x10,%esp
106258: 84 c0 test %al,%al
10625a: 8b 55 a4 mov -0x5c(%ebp),%edx
10625d: 74 55 je 1062b4 <rtems_bdpart_dump+0x98><== NEVER TAKEN
switch (type_mbr) {
10625f: 0f b6 45 b3 movzbl -0x4d(%ebp),%eax
106263: 3c 0b cmp $0xb,%al
106265: 74 28 je 10628f <rtems_bdpart_dump+0x73><== ALWAYS TAKEN
106267: 77 0a ja 106273 <rtems_bdpart_dump+0x57><== NOT EXECUTED
106269: 3c 01 cmp $0x1,%al <== NOT EXECUTED
10626b: 74 14 je 106281 <rtems_bdpart_dump+0x65><== NOT EXECUTED
10626d: 3c 04 cmp $0x4,%al <== NOT EXECUTED
10626f: 75 33 jne 1062a4 <rtems_bdpart_dump+0x88><== NOT EXECUTED
106271: eb 51 jmp 1062c4 <rtems_bdpart_dump+0xa8><== NOT EXECUTED
106273: 3c 0e cmp $0xe,%al <== NOT EXECUTED
106275: 74 11 je 106288 <rtems_bdpart_dump+0x6c><== NOT EXECUTED
106277: 3c da cmp $0xda,%al <== NOT EXECUTED
106279: 74 22 je 10629d <rtems_bdpart_dump+0x81><== NOT EXECUTED
10627b: 3c 0c cmp $0xc,%al <== NOT EXECUTED
10627d: 75 25 jne 1062a4 <rtems_bdpart_dump+0x88><== NOT EXECUTED
10627f: eb 15 jmp 106296 <rtems_bdpart_dump+0x7a><== NOT EXECUTED
case RTEMS_BDPART_MBR_FAT_12:
type = "FAT 12";
106281: b8 c4 36 12 00 mov $0x1236c4,%eax <== NOT EXECUTED
106286: eb 41 jmp 1062c9 <rtems_bdpart_dump+0xad><== NOT EXECUTED
break;
case RTEMS_BDPART_MBR_FAT_16:
type = "FAT 16";
break;
case RTEMS_BDPART_MBR_FAT_16_LBA:
type = "FAT 16 LBA";
106288: b8 e2 36 12 00 mov $0x1236e2,%eax <== NOT EXECUTED
break;
10628d: eb 3a jmp 1062c9 <rtems_bdpart_dump+0xad><== NOT EXECUTED
case RTEMS_BDPART_MBR_FAT_32:
type = "FAT 32";
10628f: b8 db 36 12 00 mov $0x1236db,%eax
break;
106294: eb 33 jmp 1062c9 <rtems_bdpart_dump+0xad>
case RTEMS_BDPART_MBR_FAT_32_LBA:
type = "FAT 32 LBA";
106296: b8 d0 36 12 00 mov $0x1236d0,%eax <== NOT EXECUTED
break;
10629b: eb 2c jmp 1062c9 <rtems_bdpart_dump+0xad><== NOT EXECUTED
case RTEMS_BDPART_MBR_DATA:
type = "DATA";
10629d: b8 cb 36 12 00 mov $0x1236cb,%eax <== NOT EXECUTED
break;
1062a2: eb 25 jmp 1062c9 <rtems_bdpart_dump+0xad><== NOT EXECUTED
default:
snprintf( type_buffer, sizeof( type_buffer), "0x%02" PRIx8, type_mbr);
1062a4: 50 push %eax <== NOT EXECUTED
1062a5: 68 2d 38 12 00 push $0x12382d <== NOT EXECUTED
1062aa: 6a 34 push $0x34 <== NOT EXECUTED
1062ac: 56 push %esi <== NOT EXECUTED
1062ad: e8 92 fb 00 00 call 115e44 <snprintf> <== NOT EXECUTED
1062b2: eb 09 jmp 1062bd <rtems_bdpart_dump+0xa1><== NOT EXECUTED
static void rtems_bdpart_type_to_string(
const uuid_t type,
char str [37]
)
{
uuid_unparse_lower( type, str);
1062b4: 50 push %eax <== NOT EXECUTED
1062b5: 50 push %eax <== NOT EXECUTED
1062b6: 56 push %esi <== NOT EXECUTED
1062b7: 52 push %edx <== NOT EXECUTED
1062b8: e8 aa 90 00 00 call 10f367 <uuid_unparse_lower> <== NOT EXECUTED
1062bd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
type = type_buffer;
break;
}
} else {
rtems_bdpart_type_to_string( p->type, type_buffer);
type = type_buffer;
1062c0: 89 f0 mov %esi,%eax <== NOT EXECUTED
1062c2: eb 05 jmp 1062c9 <rtems_bdpart_dump+0xad><== NOT EXECUTED
switch (type_mbr) {
case RTEMS_BDPART_MBR_FAT_12:
type = "FAT 12";
break;
case RTEMS_BDPART_MBR_FAT_16:
type = "FAT 16";
1062c4: b8 bd 36 12 00 mov $0x1236bd,%eax <== NOT EXECUTED
} else {
rtems_bdpart_type_to_string( p->type, type_buffer);
type = type_buffer;
}
printf(
1062c9: 50 push %eax
1062ca: ff 73 04 pushl 0x4(%ebx)
1062cd: ff 33 pushl (%ebx)
1062cf: 68 34 38 12 00 push $0x123834
1062d4: e8 57 f8 00 00 call 115b30 <printf>
"------------+------------+-----------------------------------------------------\n"
" BEGIN | END | TYPE\n"
"------------+------------+-----------------------------------------------------\n"
);
for (i = 0; i < count; ++i) {
1062d9: 47 inc %edi
1062da: 83 c3 30 add $0x30,%ebx
1062dd: 83 c4 10 add $0x10,%esp
1062e0: 3b 7d 0c cmp 0xc(%ebp),%edi
1062e3: 0f 85 56 ff ff ff jne 10623f <rtems_bdpart_dump+0x23>
p->end,
type
);
}
puts( "------------+------------+-----------------------------------------------------");
1062e9: 83 ec 0c sub $0xc,%esp
1062ec: 68 dd 37 12 00 push $0x1237dd
1062f1: e8 ee f8 00 00 call 115be4 <puts>
1062f6: 83 c4 10 add $0x10,%esp
}
1062f9: 8d 65 f4 lea -0xc(%ebp),%esp
1062fc: 5b pop %ebx
1062fd: 5e pop %esi
1062fe: 5f pop %edi
1062ff: 5d pop %ebp
106300: c3 ret
00106486 <rtems_bdpart_get_disk_data>:
const char *disk_name,
int *fd_ptr,
rtems_disk_device **dd_ptr,
rtems_blkdev_bnum *disk_end
)
{
106486: 55 push %ebp
106487: 89 e5 mov %esp,%ebp
106489: 57 push %edi
10648a: 56 push %esi
10648b: 53 push %ebx
10648c: 83 ec 24 sub $0x24,%esp
10648f: 8b 7d 0c mov 0xc(%ebp),%edi
rtems_status_code sc = RTEMS_SUCCESSFUL;
int rv = 0;
int fd = -1;
rtems_disk_device *dd = NULL;
106492: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
rtems_blkdev_bnum disk_begin = 0;
rtems_blkdev_bnum block_size = 0;
/* Open device file */
fd = open( disk_name, O_RDWR);
106499: 6a 02 push $0x2
10649b: ff 75 08 pushl 0x8(%ebp)
10649e: e8 15 2d 00 00 call 1091b8 <open>
1064a3: 89 c6 mov %eax,%esi
if (fd < 0) {
1064a5: 83 c4 10 add $0x10,%esp
1064a8: 85 c0 test %eax,%eax
1064aa: 79 07 jns 1064b3 <rtems_bdpart_get_disk_data+0x2d><== ALWAYS TAKEN
sc = RTEMS_INVALID_NAME;
1064ac: bb 03 00 00 00 mov $0x3,%ebx <== NOT EXECUTED
1064b1: eb 3d jmp 1064f0 <rtems_bdpart_get_disk_data+0x6a><== NOT EXECUTED
static inline int rtems_disk_fd_get_disk_device(
int fd,
rtems_disk_device **dd_ptr
)
{
return ioctl(fd, RTEMS_BLKIO_GETDISKDEV, dd_ptr);
1064b3: 53 push %ebx
goto error;
}
/* Get disk handle */
rv = rtems_disk_fd_get_disk_device( fd, &dd);
1064b4: 8d 45 e4 lea -0x1c(%ebp),%eax
1064b7: 50 push %eax
1064b8: 68 09 42 04 40 push $0x40044209
1064bd: 56 push %esi
1064be: e8 ed 20 00 00 call 1085b0 <ioctl>
if (rv != 0) {
1064c3: 83 c4 10 add $0x10,%esp
1064c6: 85 c0 test %eax,%eax
1064c8: 75 e2 jne 1064ac <rtems_bdpart_get_disk_data+0x26><== NEVER TAKEN
sc = RTEMS_INVALID_NAME;
goto error;
}
/* Get disk begin, end and block size */
disk_begin = dd->start;
1064ca: 8b 45 e4 mov -0x1c(%ebp),%eax
1064cd: 8b 48 18 mov 0x18(%eax),%ecx
*disk_end = dd->size;
1064d0: 8b 5d 14 mov 0x14(%ebp),%ebx
1064d3: 8b 50 1c mov 0x1c(%eax),%edx
1064d6: 89 13 mov %edx,(%ebx)
block_size = dd->block_size;
/* Check block size */
if (block_size < RTEMS_BDPART_BLOCK_SIZE) {
sc = RTEMS_IO_ERROR;
1064d8: bb 1b 00 00 00 mov $0x1b,%ebx
disk_begin = dd->start;
*disk_end = dd->size;
block_size = dd->block_size;
/* Check block size */
if (block_size < RTEMS_BDPART_BLOCK_SIZE) {
1064dd: 81 78 24 ff 01 00 00 cmpl $0x1ff,0x24(%eax)
1064e4: 76 0a jbe 1064f0 <rtems_bdpart_get_disk_data+0x6a><== NEVER TAKEN
int *fd_ptr,
rtems_disk_device **dd_ptr,
rtems_blkdev_bnum *disk_end
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
1064e6: 83 f9 01 cmp $0x1,%ecx
1064e9: 19 db sbb %ebx,%ebx
1064eb: f7 d3 not %ebx
1064ed: 83 e3 1b and $0x1b,%ebx
goto error;
}
error:
if (sc == RTEMS_SUCCESSFUL && fd_ptr != NULL && dd_ptr != NULL) {
1064f0: 85 db test %ebx,%ebx
1064f2: 75 16 jne 10650a <rtems_bdpart_get_disk_data+0x84><== NEVER TAKEN
1064f4: 85 ff test %edi,%edi
1064f6: 74 12 je 10650a <rtems_bdpart_get_disk_data+0x84>
1064f8: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
1064fc: 74 0c je 10650a <rtems_bdpart_get_disk_data+0x84><== NEVER TAKEN
*fd_ptr = fd;
1064fe: 89 37 mov %esi,(%edi)
*dd_ptr = dd;
106500: 8b 45 e4 mov -0x1c(%ebp),%eax
106503: 8b 55 10 mov 0x10(%ebp),%edx
106506: 89 02 mov %eax,(%edx)
106508: eb 0c jmp 106516 <rtems_bdpart_get_disk_data+0x90>
} else {
close( fd);
10650a: 83 ec 0c sub $0xc,%esp
10650d: 56 push %esi
10650e: e8 e5 1c 00 00 call 1081f8 <close>
106513: 83 c4 10 add $0x10,%esp
}
return sc;
}
106516: 89 d8 mov %ebx,%eax
106518: 8d 65 f4 lea -0xc(%ebp),%esp
10651b: 5b pop %ebx
10651c: 5e pop %esi
10651d: 5f pop %edi
10651e: 5d pop %ebp
10651f: c3 ret
0011fae8 <rtems_bdpart_mount>:
const char *disk_name,
const rtems_bdpart_partition *pt __attribute__((unused)),
size_t count,
const char *mount_base
)
{
11fae8: 55 push %ebp <== NOT EXECUTED
11fae9: 89 e5 mov %esp,%ebp <== NOT EXECUTED
11faeb: 57 push %edi <== NOT EXECUTED
11faec: 56 push %esi <== NOT EXECUTED
11faed: 53 push %ebx <== NOT EXECUTED
11faee: 83 ec 34 sub $0x34,%esp <== NOT EXECUTED
11faf1: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED
rtems_status_code esc = RTEMS_SUCCESSFUL;
const char *disk_file_name = strrchr( disk_name, '/');
11faf4: 6a 2f push $0x2f <== NOT EXECUTED
11faf6: 56 push %esi <== NOT EXECUTED
11faf7: e8 d4 80 01 00 call 137bd0 <strrchr> <== NOT EXECUTED
11fafc: 89 c3 mov %eax,%ebx <== NOT EXECUTED
char *logical_disk_name = NULL;
char *logical_disk_marker = NULL;
char *mount_point = NULL;
char *mount_marker = NULL;
size_t disk_file_name_size = 0;
size_t disk_name_size = strlen( disk_name);
11fafe: 83 c9 ff or $0xffffffff,%ecx <== NOT EXECUTED
11fb01: 89 f7 mov %esi,%edi <== NOT EXECUTED
11fb03: 31 c0 xor %eax,%eax <== NOT EXECUTED
11fb05: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED
11fb07: 89 ca mov %ecx,%edx <== NOT EXECUTED
11fb09: f7 d2 not %edx <== NOT EXECUTED
11fb0b: 8d 42 ff lea -0x1(%edx),%eax <== NOT EXECUTED
11fb0e: 89 45 d8 mov %eax,-0x28(%ebp) <== NOT EXECUTED
size_t mount_base_size = strlen( mount_base);
11fb11: 83 c9 ff or $0xffffffff,%ecx <== NOT EXECUTED
11fb14: 8b 7d 14 mov 0x14(%ebp),%edi <== NOT EXECUTED
11fb17: 31 c0 xor %eax,%eax <== NOT EXECUTED
11fb19: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED
11fb1b: f7 d1 not %ecx <== NOT EXECUTED
11fb1d: 89 4d e4 mov %ecx,-0x1c(%ebp) <== NOT EXECUTED
11fb20: 49 dec %ecx <== NOT EXECUTED
11fb21: 89 4d d4 mov %ecx,-0x2c(%ebp) <== NOT EXECUTED
size_t i = 0;
/* Create logical disk name base */
logical_disk_name = malloc( disk_name_size + RTEMS_BDPART_NUMBER_SIZE);
11fb24: 83 c2 03 add $0x3,%edx <== NOT EXECUTED
11fb27: 89 14 24 mov %edx,(%esp) <== NOT EXECUTED
11fb2a: e8 e5 6c fe ff call 106814 <malloc> <== NOT EXECUTED
11fb2f: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED
if (logical_disk_name == NULL) {
11fb32: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
return RTEMS_NO_MEMORY;
11fb35: bf 1a 00 00 00 mov $0x1a,%edi <== NOT EXECUTED
size_t mount_base_size = strlen( mount_base);
size_t i = 0;
/* Create logical disk name base */
logical_disk_name = malloc( disk_name_size + RTEMS_BDPART_NUMBER_SIZE);
if (logical_disk_name == NULL) {
11fb3a: 85 c0 test %eax,%eax <== NOT EXECUTED
11fb3c: 0f 84 18 01 00 00 je 11fc5a <rtems_bdpart_mount+0x172><== NOT EXECUTED
return RTEMS_NO_MEMORY;
}
strncpy( logical_disk_name, disk_name, disk_name_size);
11fb42: 52 push %edx <== NOT EXECUTED
11fb43: ff 75 d8 pushl -0x28(%ebp) <== NOT EXECUTED
11fb46: 56 push %esi <== NOT EXECUTED
11fb47: 50 push %eax <== NOT EXECUTED
11fb48: e8 6b 76 01 00 call 1371b8 <strncpy> <== NOT EXECUTED
/* Get disk file name */
if (disk_file_name != NULL) {
11fb4d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11fb50: 85 db test %ebx,%ebx <== NOT EXECUTED
11fb52: 74 14 je 11fb68 <rtems_bdpart_mount+0x80><== NOT EXECUTED
disk_file_name += 1;
11fb54: 43 inc %ebx <== NOT EXECUTED
11fb55: 89 5d dc mov %ebx,-0x24(%ebp) <== NOT EXECUTED
disk_file_name_size = strlen( disk_file_name);
11fb58: 83 c9 ff or $0xffffffff,%ecx <== NOT EXECUTED
11fb5b: 89 df mov %ebx,%edi <== NOT EXECUTED
11fb5d: 31 c0 xor %eax,%eax <== NOT EXECUTED
11fb5f: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED
11fb61: f7 d1 not %ecx <== NOT EXECUTED
11fb63: 8d 79 ff lea -0x1(%ecx),%edi <== NOT EXECUTED
11fb66: eb 06 jmp 11fb6e <rtems_bdpart_mount+0x86><== NOT EXECUTED
} else {
disk_file_name = disk_name;
disk_file_name_size = disk_name_size;
11fb68: 8b 7d d8 mov -0x28(%ebp),%edi <== NOT EXECUTED
/* Get disk file name */
if (disk_file_name != NULL) {
disk_file_name += 1;
disk_file_name_size = strlen( disk_file_name);
} else {
disk_file_name = disk_name;
11fb6b: 89 75 dc mov %esi,-0x24(%ebp) <== NOT EXECUTED
disk_file_name_size = disk_name_size;
}
/* Create mount point base */
mount_point = malloc( mount_base_size + 1 + disk_file_name_size + RTEMS_BDPART_NUMBER_SIZE);
11fb6e: 8b 5d d4 mov -0x2c(%ebp),%ebx <== NOT EXECUTED
11fb71: 01 fb add %edi,%ebx <== NOT EXECUTED
11fb73: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11fb76: 8d 43 05 lea 0x5(%ebx),%eax <== NOT EXECUTED
11fb79: 50 push %eax <== NOT EXECUTED
11fb7a: e8 95 6c fe ff call 106814 <malloc> <== NOT EXECUTED
11fb7f: 89 c6 mov %eax,%esi <== NOT EXECUTED
if (mount_point == NULL) {
11fb81: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11fb84: 85 c0 test %eax,%eax <== NOT EXECUTED
11fb86: 0f 84 a5 00 00 00 je 11fc31 <rtems_bdpart_mount+0x149><== NOT EXECUTED
esc = RTEMS_NO_MEMORY;
goto cleanup;
}
strncpy( mount_point, mount_base, mount_base_size);
11fb8c: 50 push %eax <== NOT EXECUTED
11fb8d: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED
11fb90: ff 75 14 pushl 0x14(%ebp) <== NOT EXECUTED
11fb93: 56 push %esi <== NOT EXECUTED
11fb94: e8 1f 76 01 00 call 1371b8 <strncpy> <== NOT EXECUTED
mount_point [mount_base_size] = '/';
11fb99: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED
11fb9c: c6 44 0e ff 2f movb $0x2f,-0x1(%esi,%ecx,1) <== NOT EXECUTED
strncpy( mount_point + mount_base_size + 1, disk_file_name, disk_file_name_size);
11fba1: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
11fba4: 57 push %edi <== NOT EXECUTED
11fba5: ff 75 dc pushl -0x24(%ebp) <== NOT EXECUTED
11fba8: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED
11fbab: 8d 44 16 01 lea 0x1(%esi,%edx,1),%eax <== NOT EXECUTED
11fbaf: 50 push %eax <== NOT EXECUTED
11fbb0: e8 03 76 01 00 call 1371b8 <strncpy> <== NOT EXECUTED
/* Markers */
logical_disk_marker = logical_disk_name + disk_name_size;
11fbb5: 8b 7d e0 mov -0x20(%ebp),%edi <== NOT EXECUTED
11fbb8: 03 7d d8 add -0x28(%ebp),%edi <== NOT EXECUTED
mount_marker = mount_point + mount_base_size + 1 + disk_file_name_size;
11fbbb: 8d 5c 1e 01 lea 0x1(%esi,%ebx,1),%ebx <== NOT EXECUTED
11fbbf: 89 5d e4 mov %ebx,-0x1c(%ebp) <== NOT EXECUTED
/* Mount supported file systems for each partition */
for (i = 0; i < count; ++i) {
11fbc2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11fbc5: 31 db xor %ebx,%ebx <== NOT EXECUTED
11fbc7: eb 5f jmp 11fc28 <rtems_bdpart_mount+0x140><== NOT EXECUTED
/* Create logical disk name */
int rv = snprintf( logical_disk_marker, RTEMS_BDPART_NUMBER_SIZE, "%zu", i + 1);
11fbc9: 43 inc %ebx <== NOT EXECUTED
11fbca: 53 push %ebx <== NOT EXECUTED
11fbcb: 68 bc 14 15 00 push $0x1514bc <== NOT EXECUTED
11fbd0: 6a 04 push $0x4 <== NOT EXECUTED
11fbd2: 57 push %edi <== NOT EXECUTED
11fbd3: e8 28 6a 01 00 call 136600 <snprintf> <== NOT EXECUTED
if (rv >= RTEMS_BDPART_NUMBER_SIZE) {
11fbd8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11fbdb: 83 f8 03 cmp $0x3,%eax <== NOT EXECUTED
11fbde: 7f 58 jg 11fc38 <rtems_bdpart_mount+0x150><== NOT EXECUTED
esc = RTEMS_INVALID_NAME;
goto cleanup;
}
/* Create mount point */
strncpy( mount_marker, logical_disk_marker, RTEMS_BDPART_NUMBER_SIZE);
11fbe0: 50 push %eax <== NOT EXECUTED
11fbe1: 6a 04 push $0x4 <== NOT EXECUTED
11fbe3: 57 push %edi <== NOT EXECUTED
11fbe4: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
11fbe7: e8 cc 75 01 00 call 1371b8 <strncpy> <== NOT EXECUTED
rv = rtems_mkdir( mount_point, S_IRWXU | S_IRWXG | S_IRWXO);
11fbec: 5a pop %edx <== NOT EXECUTED
11fbed: 59 pop %ecx <== NOT EXECUTED
11fbee: 68 ff 01 00 00 push $0x1ff <== NOT EXECUTED
11fbf3: 56 push %esi <== NOT EXECUTED
11fbf4: e8 7b 30 00 00 call 122c74 <rtems_mkdir> <== NOT EXECUTED
if (rv != 0) {
11fbf9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11fbfc: 85 c0 test %eax,%eax <== NOT EXECUTED
11fbfe: 75 3f jne 11fc3f <rtems_bdpart_mount+0x157><== NOT EXECUTED
esc = RTEMS_IO_ERROR;
goto cleanup;
}
/* Mount */
rv = mount(
11fc00: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11fc03: 6a 00 push $0x0 <== NOT EXECUTED
11fc05: 6a 00 push $0x0 <== NOT EXECUTED
11fc07: 68 8d fc 14 00 push $0x14fc8d <== NOT EXECUTED
11fc0c: 56 push %esi <== NOT EXECUTED
11fc0d: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED
11fc10: e8 b7 6d fe ff call 1069cc <mount> <== NOT EXECUTED
mount_point,
"msdos",
0,
NULL
);
if (rv != 0) {
11fc15: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
11fc18: 85 c0 test %eax,%eax <== NOT EXECUTED
11fc1a: 74 0c je 11fc28 <rtems_bdpart_mount+0x140><== NOT EXECUTED
rmdir( mount_point);
11fc1c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11fc1f: 56 push %esi <== NOT EXECUTED
11fc20: e8 d7 2f 00 00 call 122bfc <rmdir> <== NOT EXECUTED
11fc25: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
/* Markers */
logical_disk_marker = logical_disk_name + disk_name_size;
mount_marker = mount_point + mount_base_size + 1 + disk_file_name_size;
/* Mount supported file systems for each partition */
for (i = 0; i < count; ++i) {
11fc28: 3b 5d 10 cmp 0x10(%ebp),%ebx <== NOT EXECUTED
11fc2b: 75 9c jne 11fbc9 <rtems_bdpart_mount+0xe1><== NOT EXECUTED
const rtems_bdpart_partition *pt __attribute__((unused)),
size_t count,
const char *mount_base
)
{
rtems_status_code esc = RTEMS_SUCCESSFUL;
11fc2d: 31 ff xor %edi,%edi <== NOT EXECUTED
11fc2f: eb 13 jmp 11fc44 <rtems_bdpart_mount+0x15c><== NOT EXECUTED
}
/* Create mount point base */
mount_point = malloc( mount_base_size + 1 + disk_file_name_size + RTEMS_BDPART_NUMBER_SIZE);
if (mount_point == NULL) {
esc = RTEMS_NO_MEMORY;
11fc31: bf 1a 00 00 00 mov $0x1a,%edi <== NOT EXECUTED
11fc36: eb 0c jmp 11fc44 <rtems_bdpart_mount+0x15c><== NOT EXECUTED
/* Mount supported file systems for each partition */
for (i = 0; i < count; ++i) {
/* Create logical disk name */
int rv = snprintf( logical_disk_marker, RTEMS_BDPART_NUMBER_SIZE, "%zu", i + 1);
if (rv >= RTEMS_BDPART_NUMBER_SIZE) {
esc = RTEMS_INVALID_NAME;
11fc38: bf 03 00 00 00 mov $0x3,%edi <== NOT EXECUTED
11fc3d: eb 05 jmp 11fc44 <rtems_bdpart_mount+0x15c><== NOT EXECUTED
/* Create mount point */
strncpy( mount_marker, logical_disk_marker, RTEMS_BDPART_NUMBER_SIZE);
rv = rtems_mkdir( mount_point, S_IRWXU | S_IRWXG | S_IRWXO);
if (rv != 0) {
esc = RTEMS_IO_ERROR;
11fc3f: bf 1b 00 00 00 mov $0x1b,%edi <== NOT EXECUTED
}
}
cleanup:
free( logical_disk_name);
11fc44: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11fc47: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED
11fc4a: e8 05 69 fe ff call 106554 <free> <== NOT EXECUTED
free( mount_point);
11fc4f: 89 34 24 mov %esi,(%esp) <== NOT EXECUTED
11fc52: e8 fd 68 fe ff call 106554 <free> <== NOT EXECUTED
return esc;
11fc57: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
11fc5a: 89 f8 mov %edi,%eax <== NOT EXECUTED
11fc5c: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
11fc5f: 5b pop %ebx <== NOT EXECUTED
11fc60: 5e pop %esi <== NOT EXECUTED
11fc61: 5f pop %edi <== NOT EXECUTED
11fc62: 5d pop %ebp <== NOT EXECUTED
11fc63: c3 ret <== NOT EXECUTED
00106940 <rtems_bdpart_new_record>:
static rtems_status_code rtems_bdpart_new_record(
rtems_disk_device *dd,
rtems_blkdev_bnum index,
rtems_bdbuf_buffer **block
)
{
106940: 55 push %ebp
106941: 89 e5 mov %esp,%ebp
106943: 57 push %edi
106944: 56 push %esi
106945: 53 push %ebx
106946: 83 ec 0c sub $0xc,%esp
106949: 89 c6 mov %eax,%esi
10694b: 89 d7 mov %edx,%edi
10694d: 89 cb mov %ecx,%ebx
rtems_status_code sc = RTEMS_SUCCESSFUL;
/* Synchronize previous block if necessary */
if (*block != NULL) {
10694f: 8b 01 mov (%ecx),%eax
106951: 85 c0 test %eax,%eax
106953: 75 12 jne 106967 <rtems_bdpart_new_record+0x27>
return sc;
}
}
/* Read the new record block (this accounts for disk block sizes > 512) */
sc = rtems_bdbuf_read( dd, index, block);
106955: 50 push %eax
106956: 53 push %ebx
106957: 57 push %edi
106958: 56 push %esi
106959: e8 5f a2 00 00 call 110bbd <rtems_bdbuf_read>
if (sc != RTEMS_SUCCESSFUL) {
10695e: 83 c4 10 add $0x10,%esp
106961: 85 c0 test %eax,%eax
106963: 74 14 je 106979 <rtems_bdpart_new_record+0x39><== ALWAYS TAKEN
106965: eb 43 jmp 1069aa <rtems_bdpart_new_record+0x6a><== NOT EXECUTED
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
/* Synchronize previous block if necessary */
if (*block != NULL) {
sc = rtems_bdbuf_sync( *block);
106967: 83 ec 0c sub $0xc,%esp
10696a: 50 push %eax
10696b: e8 92 a4 00 00 call 110e02 <rtems_bdbuf_sync>
if (sc != RTEMS_SUCCESSFUL) {
106970: 83 c4 10 add $0x10,%esp
106973: 85 c0 test %eax,%eax
106975: 74 de je 106955 <rtems_bdpart_new_record+0x15><== ALWAYS TAKEN
106977: eb 31 jmp 1069aa <rtems_bdpart_new_record+0x6a><== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
return sc;
}
/* just in case block did not get filled in */
if ( *block == NULL ) {
106979: 8b 13 mov (%ebx),%edx
10697b: 85 d2 test %edx,%edx
10697d: 74 26 je 1069a5 <rtems_bdpart_new_record+0x65><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
}
/* Clear record */
memset( (*block)->buffer, 0, RTEMS_BDPART_BLOCK_SIZE);
10697f: 8b 52 1c mov 0x1c(%edx),%edx
106982: b9 80 00 00 00 mov $0x80,%ecx
106987: 89 d7 mov %edx,%edi
106989: f3 ab rep stos %eax,%es:(%edi)
/* Write signature */
(*block)->buffer [RTEMS_BDPART_MBR_OFFSET_SIGNATURE_0] =
10698b: 8b 13 mov (%ebx),%edx
10698d: 8b 52 1c mov 0x1c(%edx),%edx
106990: c6 82 fe 01 00 00 55 movb $0x55,0x1fe(%edx)
RTEMS_BDPART_MBR_SIGNATURE_0;
(*block)->buffer [RTEMS_BDPART_MBR_OFFSET_SIGNATURE_1] =
106997: 8b 13 mov (%ebx),%edx
106999: 8b 52 1c mov 0x1c(%edx),%edx
10699c: c6 82 ff 01 00 00 aa movb $0xaa,0x1ff(%edx)
1069a3: eb 05 jmp 1069aa <rtems_bdpart_new_record+0x6a>
return sc;
}
/* just in case block did not get filled in */
if ( *block == NULL ) {
return RTEMS_INVALID_ADDRESS;
1069a5: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
RTEMS_BDPART_MBR_SIGNATURE_0;
(*block)->buffer [RTEMS_BDPART_MBR_OFFSET_SIGNATURE_1] =
RTEMS_BDPART_MBR_SIGNATURE_1;
return RTEMS_SUCCESSFUL;
}
1069aa: 8d 65 f4 lea -0xc(%ebp),%esp
1069ad: 5b pop %ebx
1069ae: 5e pop %esi
1069af: 5f pop %edi
1069b0: 5d pop %ebp
1069b1: c3 ret
00106520 <rtems_bdpart_read>:
const char *disk_name,
rtems_bdpart_format *format,
rtems_bdpart_partition *pt,
size_t *count
)
{
106520: 55 push %ebp
106521: 89 e5 mov %esp,%ebp
106523: 57 push %edi
106524: 56 push %esi
106525: 53 push %ebx
106526: 83 ec 3c sub $0x3c,%esp
106529: 8b 5d 0c mov 0xc(%ebp),%ebx
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_status_code esc = RTEMS_SUCCESSFUL;
rtems_bdbuf_buffer *block = NULL;
10652c: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp)
rtems_bdpart_partition *p = pt - 1;
106533: 8b 45 10 mov 0x10(%ebp),%eax
106536: 83 e8 30 sub $0x30,%eax
106539: 89 45 d4 mov %eax,-0x2c(%ebp)
const rtems_bdpart_partition *p_end = pt + (count != NULL ? *count : 0);
10653c: 83 7d 14 00 cmpl $0x0,0x14(%ebp)
106540: 74 08 je 10654a <rtems_bdpart_read+0x2a><== NEVER TAKEN
106542: 8b 45 14 mov 0x14(%ebp),%eax
106545: 6b 30 30 imul $0x30,(%eax),%esi
106548: eb 02 jmp 10654c <rtems_bdpart_read+0x2c>
10654a: 31 f6 xor %esi,%esi
rtems_blkdev_bnum ep_begin = 0; /* Extended partition begin */
10654c: c7 45 d8 00 00 00 00 movl $0x0,-0x28(%ebp)
rtems_blkdev_bnum ebr = 0; /* Extended boot record block index */
rtems_blkdev_bnum disk_end = 0;
106553: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp)
size_t i = 0;
const uint8_t *data = NULL;
int fd = -1;
10655a: c7 45 e0 ff ff ff ff movl $0xffffffff,-0x20(%ebp)
rtems_disk_device *dd = NULL;
106561: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
/* Check parameter */
if (format == NULL || pt == NULL || count == NULL) {
return RTEMS_INVALID_ADDRESS;
106568: b8 09 00 00 00 mov $0x9,%eax
const uint8_t *data = NULL;
int fd = -1;
rtems_disk_device *dd = NULL;
/* Check parameter */
if (format == NULL || pt == NULL || count == NULL) {
10656d: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
106571: 0f 84 c7 01 00 00 je 10673e <rtems_bdpart_read+0x21e><== NEVER TAKEN
106577: 85 db test %ebx,%ebx
106579: 0f 84 bf 01 00 00 je 10673e <rtems_bdpart_read+0x21e><== NEVER TAKEN
10657f: 83 7d 14 00 cmpl $0x0,0x14(%ebp)
106583: 0f 84 b5 01 00 00 je 10673e <rtems_bdpart_read+0x21e><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
}
/* Set count to a save value */
*count = 0;
106589: 8b 55 14 mov 0x14(%ebp),%edx
10658c: c7 02 00 00 00 00 movl $0x0,(%edx)
/* Get disk data */
sc = rtems_bdpart_get_disk_data( disk_name, &fd, &dd, &disk_end);
106592: 8d 45 dc lea -0x24(%ebp),%eax
106595: 50 push %eax
106596: 8d 45 e4 lea -0x1c(%ebp),%eax
106599: 50 push %eax
10659a: 8d 45 e0 lea -0x20(%ebp),%eax
10659d: 50 push %eax
10659e: ff 75 08 pushl 0x8(%ebp)
1065a1: e8 e0 fe ff ff call 106486 <rtems_bdpart_get_disk_data>
if (sc != RTEMS_SUCCESSFUL) {
1065a6: 83 c4 10 add $0x10,%esp
1065a9: 85 c0 test %eax,%eax
1065ab: 0f 85 8d 01 00 00 jne 10673e <rtems_bdpart_read+0x21e><== NEVER TAKEN
return sc;
}
/* Read MBR */
sc = rtems_bdpart_read_record( dd, 0, &block);
1065b1: 8d 4d d0 lea -0x30(%ebp),%ecx
1065b4: 31 d2 xor %edx,%edx
1065b6: 8b 45 e4 mov -0x1c(%ebp),%eax
1065b9: e8 65 fd ff ff call 106323 <rtems_bdpart_read_record>
1065be: 89 c7 mov %eax,%edi
if (sc != RTEMS_SUCCESSFUL) {
1065c0: 85 c0 test %eax,%eax
1065c2: 0f 85 4e 01 00 00 jne 106716 <rtems_bdpart_read+0x1f6><== NEVER TAKEN
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_status_code esc = RTEMS_SUCCESSFUL;
rtems_bdbuf_buffer *block = NULL;
rtems_bdpart_partition *p = pt - 1;
const rtems_bdpart_partition *p_end = pt + (count != NULL ? *count : 0);
1065c8: 03 75 10 add 0x10(%ebp),%esi
1065cb: 89 75 bc mov %esi,-0x44(%ebp)
esc = sc;
goto cleanup;
}
/* Read the first partition entry */
data = block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0;
1065ce: 8b 45 d0 mov -0x30(%ebp),%eax
1065d1: 8b 40 1c mov 0x1c(%eax),%eax
1065d4: 89 45 b8 mov %eax,-0x48(%ebp)
1065d7: 05 be 01 00 00 add $0x1be,%eax
1065dc: 89 45 c0 mov %eax,-0x40(%ebp)
sc = rtems_bdpart_read_mbr_partition( data, &p, p_end, &ep_begin);
1065df: 83 ec 0c sub $0xc,%esp
1065e2: 8d 45 d4 lea -0x2c(%ebp),%eax
1065e5: 89 45 c4 mov %eax,-0x3c(%ebp)
1065e8: 8d 75 d8 lea -0x28(%ebp),%esi
1065eb: 56 push %esi
1065ec: 8b 4d bc mov -0x44(%ebp),%ecx
1065ef: 89 c2 mov %eax,%edx
1065f1: 8b 45 c0 mov -0x40(%ebp),%eax
1065f4: e8 bb fd ff ff call 1063b4 <rtems_bdpart_read_mbr_partition>
if (sc != RTEMS_SUCCESSFUL) {
1065f9: 83 c4 10 add $0x10,%esp
1065fc: 89 c7 mov %eax,%edi
1065fe: 85 c0 test %eax,%eax
106600: 0f 85 10 01 00 00 jne 106716 <rtems_bdpart_read+0x1f6><== NEVER TAKEN
if (block != NULL) {
rtems_bdbuf_release( block);
}
return esc;
}
106606: 8b 45 d4 mov -0x2c(%ebp),%eax
esc = sc;
goto cleanup;
}
/* Determine if we have a MBR or GPT format */
if (rtems_bdpart_mbr_partition_type( p->type) == RTEMS_BDPART_MBR_GPT) {
106609: 80 78 08 ee cmpb $0xee,0x8(%eax)
10660d: 0f 84 fa 00 00 00 je 10670d <rtems_bdpart_read+0x1ed><== NEVER TAKEN
esc = RTEMS_NOT_IMPLEMENTED;
goto cleanup;
}
/* Set format */
format->type = RTEMS_BDPART_FORMAT_MBR;
106613: c7 03 00 00 00 00 movl $0x0,(%ebx)
format->mbr.disk_id = rtems_uint32_from_little_endian(
block->buffer + RTEMS_BDPART_MBR_OFFSET_DISK_ID
106619: 8b 45 d0 mov -0x30(%ebp),%eax
goto cleanup;
}
/* Set format */
format->type = RTEMS_BDPART_FORMAT_MBR;
format->mbr.disk_id = rtems_uint32_from_little_endian(
10661c: 8b 40 1c mov 0x1c(%eax),%eax
10661f: 05 b8 01 00 00 add $0x1b8,%eax
106624: e8 db fc ff ff call 106304 <rtems_uint32_from_little_endian>
106629: 89 43 04 mov %eax,0x4(%ebx)
block->buffer + RTEMS_BDPART_MBR_OFFSET_DISK_ID
);
format->mbr.dos_compatibility = true;
10662c: c6 43 08 01 movb $0x1,0x8(%ebx)
}
return RTEMS_SUCCESSFUL;
}
rtems_status_code rtems_bdpart_read(
106630: 8b 7d b8 mov -0x48(%ebp),%edi
106633: 81 c7 ee 01 00 00 add $0x1ee,%edi
/* Iterate through the rest of the primary partition table */
for (i = 1; i < 4; ++i) {
data += RTEMS_BDPART_MBR_TABLE_ENTRY_SIZE;
sc = rtems_bdpart_read_mbr_partition( data, &p, p_end, &ep_begin);
106639: 8d 5d d4 lea -0x2c(%ebp),%ebx
);
format->mbr.dos_compatibility = true;
/* Iterate through the rest of the primary partition table */
for (i = 1; i < 4; ++i) {
data += RTEMS_BDPART_MBR_TABLE_ENTRY_SIZE;
10663c: 83 45 c0 10 addl $0x10,-0x40(%ebp)
sc = rtems_bdpart_read_mbr_partition( data, &p, p_end, &ep_begin);
106640: 83 ec 0c sub $0xc,%esp
106643: 56 push %esi
106644: 8b 4d bc mov -0x44(%ebp),%ecx
106647: 89 da mov %ebx,%edx
106649: 8b 45 c0 mov -0x40(%ebp),%eax
10664c: e8 63 fd ff ff call 1063b4 <rtems_bdpart_read_mbr_partition>
if (sc != RTEMS_SUCCESSFUL) {
106651: 83 c4 10 add $0x10,%esp
106654: 85 c0 test %eax,%eax
106656: 0f 85 b8 00 00 00 jne 106714 <rtems_bdpart_read+0x1f4><== NEVER TAKEN
block->buffer + RTEMS_BDPART_MBR_OFFSET_DISK_ID
);
format->mbr.dos_compatibility = true;
/* Iterate through the rest of the primary partition table */
for (i = 1; i < 4; ++i) {
10665c: 39 7d c0 cmp %edi,-0x40(%ebp)
10665f: 75 db jne 10663c <rtems_bdpart_read+0x11c>
goto cleanup;
}
}
/* Iterate through the logical partitions within the extended partition */
ebr = ep_begin;
106661: 8b 5d d8 mov -0x28(%ebp),%ebx
while (ebr != 0) {
106664: e9 83 00 00 00 jmp 1066ec <rtems_bdpart_read+0x1cc>
rtems_blkdev_bnum tmp = 0;
/* Read EBR */
sc = rtems_bdpart_read_record( dd, ebr, &block);
106669: 8d 4d d0 lea -0x30(%ebp),%ecx
10666c: 89 da mov %ebx,%edx
10666e: 8b 45 e4 mov -0x1c(%ebp),%eax
106671: e8 ad fc ff ff call 106323 <rtems_bdpart_read_record>
if (sc != RTEMS_SUCCESSFUL) {
106676: 85 c0 test %eax,%eax
106678: 0f 85 96 00 00 00 jne 106714 <rtems_bdpart_read+0x1f4><== NEVER TAKEN
esc = sc;
goto cleanup;
}
/* Read first partition entry */
sc = rtems_bdpart_read_mbr_partition(
10667e: 83 ec 0c sub $0xc,%esp
block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0,
106681: 8b 45 d0 mov -0x30(%ebp),%eax
esc = sc;
goto cleanup;
}
/* Read first partition entry */
sc = rtems_bdpart_read_mbr_partition(
106684: 8b 40 1c mov 0x1c(%eax),%eax
106687: 05 be 01 00 00 add $0x1be,%eax
10668c: 6a 00 push $0x0
10668e: 8b 4d bc mov -0x44(%ebp),%ecx
106691: 8d 55 d4 lea -0x2c(%ebp),%edx
106694: e8 1b fd ff ff call 1063b4 <rtems_bdpart_read_mbr_partition>
block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0,
&p,
p_end,
NULL
);
if (sc != RTEMS_SUCCESSFUL) {
106699: 83 c4 10 add $0x10,%esp
10669c: 85 c0 test %eax,%eax
10669e: 75 74 jne 106714 <rtems_bdpart_read+0x1f4><== NEVER TAKEN
esc = sc;
goto cleanup;
}
/* Adjust partition begin */
tmp = p->begin + ebr;
1066a0: 8b 45 d4 mov -0x2c(%ebp),%eax
1066a3: 8b 08 mov (%eax),%ecx
1066a5: 8d 14 0b lea (%ebx,%ecx,1),%edx
if (tmp > p->begin) {
1066a8: 39 ca cmp %ecx,%edx
1066aa: 77 07 ja 1066b3 <rtems_bdpart_read+0x193><== ALWAYS TAKEN
p->begin = tmp;
} else {
esc = RTEMS_IO_ERROR;
1066ac: bf 1b 00 00 00 mov $0x1b,%edi <== NOT EXECUTED
1066b1: eb 63 jmp 106716 <rtems_bdpart_read+0x1f6><== NOT EXECUTED
}
/* Adjust partition begin */
tmp = p->begin + ebr;
if (tmp > p->begin) {
p->begin = tmp;
1066b3: 89 10 mov %edx,(%eax)
esc = RTEMS_IO_ERROR;
goto cleanup;
}
/* Adjust partition end */
tmp = p->end + ebr;
1066b5: 8b 50 04 mov 0x4(%eax),%edx
1066b8: 01 d3 add %edx,%ebx
if (tmp > p->end) {
1066ba: 39 d3 cmp %edx,%ebx
1066bc: 76 ee jbe 1066ac <rtems_bdpart_read+0x18c><== NEVER TAKEN
p->end = tmp;
1066be: 89 58 04 mov %ebx,0x4(%eax)
goto cleanup;
}
/* Read second partition entry for next EBR block */
ebr = rtems_bdpart_next_ebr(
block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_1
1066c1: 8b 45 d0 mov -0x30(%ebp),%eax
1066c4: 8b 70 1c mov 0x1c(%eax),%esi
}
static rtems_blkdev_bnum rtems_bdpart_next_ebr( const uint8_t *data)
{
rtems_blkdev_bnum begin =
rtems_uint32_from_little_endian( data + RTEMS_BDPART_MBR_OFFSET_BEGIN);
1066c7: 8d 86 d6 01 00 00 lea 0x1d6(%esi),%eax
== RTEMS_BDPART_MBR_SIGNATURE_1;
}
static rtems_blkdev_bnum rtems_bdpart_next_ebr( const uint8_t *data)
{
rtems_blkdev_bnum begin =
1066cd: e8 32 fc ff ff call 106304 <rtems_uint32_from_little_endian>
1066d2: 89 c3 mov %eax,%ebx
rtems_uint32_from_little_endian( data + RTEMS_BDPART_MBR_OFFSET_BEGIN);
uint8_t type = data [RTEMS_BDPART_MBR_OFFSET_TYPE];
if (type == RTEMS_BDPART_MBR_EXTENDED) {
1066d4: 80 be d2 01 00 00 05 cmpb $0x5,0x1d2(%esi)
1066db: 75 17 jne 1066f4 <rtems_bdpart_read+0x1d4>
/* Read second partition entry for next EBR block */
ebr = rtems_bdpart_next_ebr(
block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_1
);
if (ebr != 0) {
1066dd: 85 c0 test %eax,%eax
1066df: 74 13 je 1066f4 <rtems_bdpart_read+0x1d4><== NEVER TAKEN
/* Adjust partition EBR block index */
tmp = ebr + ep_begin;
1066e1: 8b 45 d8 mov -0x28(%ebp),%eax
1066e4: 01 d8 add %ebx,%eax
if (tmp > ebr) {
1066e6: 39 d8 cmp %ebx,%eax
1066e8: 76 c2 jbe 1066ac <rtems_bdpart_read+0x18c><== NEVER TAKEN
1066ea: 89 c3 mov %eax,%ebx
}
}
/* Iterate through the logical partitions within the extended partition */
ebr = ep_begin;
while (ebr != 0) {
1066ec: 85 db test %ebx,%ebx
1066ee: 0f 85 75 ff ff ff jne 106669 <rtems_bdpart_read+0x149><== ALWAYS TAKEN
}
}
}
/* Return partition count */
*count = (size_t) (p - pt + 1);
1066f4: 8b 45 d4 mov -0x2c(%ebp),%eax
1066f7: 2b 45 10 sub 0x10(%ebp),%eax
1066fa: c1 f8 04 sar $0x4,%eax
1066fd: 69 c0 ab aa aa aa imul $0xaaaaaaab,%eax,%eax
106703: 40 inc %eax
106704: 8b 55 14 mov 0x14(%ebp),%edx
106707: 89 02 mov %eax,(%edx)
rtems_bdpart_partition *pt,
size_t *count
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_status_code esc = RTEMS_SUCCESSFUL;
106709: 31 ff xor %edi,%edi
10670b: eb 09 jmp 106716 <rtems_bdpart_read+0x1f6>
goto cleanup;
}
/* Determine if we have a MBR or GPT format */
if (rtems_bdpart_mbr_partition_type( p->type) == RTEMS_BDPART_MBR_GPT) {
esc = RTEMS_NOT_IMPLEMENTED;
10670d: bf 18 00 00 00 mov $0x18,%edi <== NOT EXECUTED
106712: eb 02 jmp 106716 <rtems_bdpart_read+0x1f6><== NOT EXECUTED
esc = sc;
goto cleanup;
}
/* Read first partition entry */
sc = rtems_bdpart_read_mbr_partition(
106714: 89 c7 mov %eax,%edi <== NOT EXECUTED
/* Return partition count */
*count = (size_t) (p - pt + 1);
cleanup:
if (fd >= 0) {
106716: 8b 45 e0 mov -0x20(%ebp),%eax
106719: 85 c0 test %eax,%eax
10671b: 78 0c js 106729 <rtems_bdpart_read+0x209><== NEVER TAKEN
close( fd);
10671d: 83 ec 0c sub $0xc,%esp
106720: 50 push %eax
106721: e8 d2 1a 00 00 call 1081f8 <close>
106726: 83 c4 10 add $0x10,%esp
}
if (block != NULL) {
106729: 8b 45 d0 mov -0x30(%ebp),%eax
10672c: 85 c0 test %eax,%eax
10672e: 74 0c je 10673c <rtems_bdpart_read+0x21c><== NEVER TAKEN
rtems_bdbuf_release( block);
106730: 83 ec 0c sub $0xc,%esp
106733: 50 push %eax
106734: e8 e2 a5 00 00 call 110d1b <rtems_bdbuf_release>
106739: 83 c4 10 add $0x10,%esp
}
return esc;
10673c: 89 f8 mov %edi,%eax
}
10673e: 8d 65 f4 lea -0xc(%ebp),%esp
106741: 5b pop %ebx
106742: 5e pop %esi
106743: 5f pop %edi
106744: 5d pop %ebp
106745: c3 ret
001063b4 <rtems_bdpart_read_mbr_partition>:
const uint8_t *data,
rtems_bdpart_partition **p,
const rtems_bdpart_partition *p_end,
rtems_blkdev_bnum *ep_begin
)
{
1063b4: 55 push %ebp
1063b5: 89 e5 mov %esp,%ebp
1063b7: 57 push %edi
1063b8: 56 push %esi
1063b9: 53 push %ebx
1063ba: 83 ec 14 sub $0x14,%esp
1063bd: 89 c3 mov %eax,%ebx
1063bf: 89 d6 mov %edx,%esi
1063c1: 89 cf mov %ecx,%edi
rtems_blkdev_bnum begin =
rtems_uint32_from_little_endian( data + RTEMS_BDPART_MBR_OFFSET_BEGIN);
1063c3: 8d 40 08 lea 0x8(%eax),%eax
rtems_bdpart_partition **p,
const rtems_bdpart_partition *p_end,
rtems_blkdev_bnum *ep_begin
)
{
rtems_blkdev_bnum begin =
1063c6: e8 39 ff ff ff call 106304 <rtems_uint32_from_little_endian>
1063cb: 89 45 ec mov %eax,-0x14(%ebp)
rtems_uint32_from_little_endian( data + RTEMS_BDPART_MBR_OFFSET_BEGIN);
rtems_blkdev_bnum size =
rtems_uint32_from_little_endian( data + RTEMS_BDPART_MBR_OFFSET_SIZE);
1063ce: 8d 43 0c lea 0xc(%ebx),%eax
rtems_blkdev_bnum *ep_begin
)
{
rtems_blkdev_bnum begin =
rtems_uint32_from_little_endian( data + RTEMS_BDPART_MBR_OFFSET_BEGIN);
rtems_blkdev_bnum size =
1063d1: e8 2e ff ff ff call 106304 <rtems_uint32_from_little_endian>
rtems_uint32_from_little_endian( data + RTEMS_BDPART_MBR_OFFSET_SIZE);
rtems_blkdev_bnum end = begin + size;
uint8_t type = data [RTEMS_BDPART_MBR_OFFSET_TYPE];
1063d6: 8a 53 04 mov 0x4(%ebx),%dl
1063d9: 88 55 eb mov %dl,-0x15(%ebp)
if (type == RTEMS_BDPART_MBR_EMPTY) {
1063dc: 84 d2 test %dl,%dl
1063de: 74 74 je 106454 <rtems_bdpart_read_mbr_partition+0xa0><== NEVER TAKEN
return RTEMS_SUCCESSFUL;
} else if (*p == p_end) {
1063e0: 8b 16 mov (%esi),%edx
1063e2: 39 fa cmp %edi,%edx
1063e4: 74 67 je 10644d <rtems_bdpart_read_mbr_partition+0x99><== NEVER TAKEN
{
rtems_blkdev_bnum begin =
rtems_uint32_from_little_endian( data + RTEMS_BDPART_MBR_OFFSET_BEGIN);
rtems_blkdev_bnum size =
rtems_uint32_from_little_endian( data + RTEMS_BDPART_MBR_OFFSET_SIZE);
rtems_blkdev_bnum end = begin + size;
1063e6: 03 45 ec add -0x14(%ebp),%eax
1063e9: 89 45 e4 mov %eax,-0x1c(%ebp)
if (type == RTEMS_BDPART_MBR_EMPTY) {
return RTEMS_SUCCESSFUL;
} else if (*p == p_end) {
return RTEMS_TOO_MANY;
} else if (begin >= end) {
return RTEMS_IO_ERROR;
1063ec: b8 1b 00 00 00 mov $0x1b,%eax
if (type == RTEMS_BDPART_MBR_EMPTY) {
return RTEMS_SUCCESSFUL;
} else if (*p == p_end) {
return RTEMS_TOO_MANY;
} else if (begin >= end) {
1063f1: 8b 4d e4 mov -0x1c(%ebp),%ecx
1063f4: 39 4d ec cmp %ecx,-0x14(%ebp)
1063f7: 73 5d jae 106456 <rtems_bdpart_read_mbr_partition+0xa2><== NEVER TAKEN
return RTEMS_IO_ERROR;
} else if (type == RTEMS_BDPART_MBR_EXTENDED) {
1063f9: 80 7d eb 05 cmpb $0x5,-0x15(%ebp)
1063fd: 75 10 jne 10640f <rtems_bdpart_read_mbr_partition+0x5b>
if (ep_begin != NULL) {
1063ff: 83 7d 08 00 cmpl $0x0,0x8(%ebp)
106403: 74 4f je 106454 <rtems_bdpart_read_mbr_partition+0xa0><== NEVER TAKEN
*ep_begin = begin;
106405: 8b 45 ec mov -0x14(%ebp),%eax
106408: 8b 55 08 mov 0x8(%ebp),%edx
10640b: 89 02 mov %eax,(%edx)
10640d: eb 45 jmp 106454 <rtems_bdpart_read_mbr_partition+0xa0>
}
} else {
/* Increment partition index */
++(*p);
10640f: 83 c2 30 add $0x30,%edx
106412: 89 16 mov %edx,(%esi)
/* Clear partition */
memset( *p, 0, sizeof( rtems_bdpart_partition));
106414: b9 0c 00 00 00 mov $0xc,%ecx
106419: 31 c0 xor %eax,%eax
10641b: 89 d7 mov %edx,%edi
10641d: f3 ab rep stos %eax,%es:(%edi)
/* Set values */
(*p)->begin = begin;
10641f: 8b 06 mov (%esi),%eax
106421: 8b 55 ec mov -0x14(%ebp),%edx
106424: 89 10 mov %edx,(%eax)
(*p)->end = end;
106426: 8b 55 e4 mov -0x1c(%ebp),%edx
106429: 89 50 04 mov %edx,0x4(%eax)
rtems_bdpart_to_partition_type( type, (*p)->type);
10642c: 83 c0 08 add $0x8,%eax
10642f: 50 push %eax
106430: 0f b6 45 eb movzbl -0x15(%ebp),%eax
106434: 50 push %eax
106435: e8 5a ff ff ff call 106394 <rtems_bdpart_to_partition_type>
(*p)->flags = data [RTEMS_BDPART_MBR_OFFSET_FLAGS];
10643a: 8b 06 mov (%esi),%eax
10643c: 0f b6 13 movzbl (%ebx),%edx
10643f: 89 50 28 mov %edx,0x28(%eax)
106442: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax)
106449: 5a pop %edx
10644a: 59 pop %ecx
10644b: eb 07 jmp 106454 <rtems_bdpart_read_mbr_partition+0xa0>
uint8_t type = data [RTEMS_BDPART_MBR_OFFSET_TYPE];
if (type == RTEMS_BDPART_MBR_EMPTY) {
return RTEMS_SUCCESSFUL;
} else if (*p == p_end) {
return RTEMS_TOO_MANY;
10644d: b8 05 00 00 00 mov $0x5,%eax <== NOT EXECUTED
106452: eb 02 jmp 106456 <rtems_bdpart_read_mbr_partition+0xa2><== NOT EXECUTED
rtems_uint32_from_little_endian( data + RTEMS_BDPART_MBR_OFFSET_SIZE);
rtems_blkdev_bnum end = begin + size;
uint8_t type = data [RTEMS_BDPART_MBR_OFFSET_TYPE];
if (type == RTEMS_BDPART_MBR_EMPTY) {
return RTEMS_SUCCESSFUL;
106454: 31 c0 xor %eax,%eax
rtems_bdpart_to_partition_type( type, (*p)->type);
(*p)->flags = data [RTEMS_BDPART_MBR_OFFSET_FLAGS];
}
return RTEMS_SUCCESSFUL;
}
106456: 8d 65 f4 lea -0xc(%ebp),%esp
106459: 5b pop %ebx
10645a: 5e pop %esi
10645b: 5f pop %edi
10645c: 5d pop %ebp
10645d: c3 ret
00106323 <rtems_bdpart_read_record>:
static rtems_status_code rtems_bdpart_read_record(
rtems_disk_device *dd,
rtems_blkdev_bnum index,
rtems_bdbuf_buffer **block
)
{
106323: 55 push %ebp
106324: 89 e5 mov %esp,%ebp
106326: 57 push %edi
106327: 56 push %esi
106328: 53 push %ebx
106329: 83 ec 0c sub $0xc,%esp
10632c: 89 c6 mov %eax,%esi
10632e: 89 d7 mov %edx,%edi
106330: 89 cb mov %ecx,%ebx
rtems_status_code sc = RTEMS_SUCCESSFUL;
/* Release previous block if necessary */
if (*block != NULL) {
106332: 8b 01 mov (%ecx),%eax
106334: 85 c0 test %eax,%eax
106336: 75 12 jne 10634a <rtems_bdpart_read_record+0x27>
return sc;
}
}
/* Read the record block */
sc = rtems_bdbuf_read( dd, index, block);
106338: 50 push %eax
106339: 53 push %ebx
10633a: 57 push %edi
10633b: 56 push %esi
10633c: e8 7c a8 00 00 call 110bbd <rtems_bdbuf_read>
if (sc != RTEMS_SUCCESSFUL) {
106341: 83 c4 10 add $0x10,%esp
106344: 85 c0 test %eax,%eax
106346: 74 14 je 10635c <rtems_bdpart_read_record+0x39><== ALWAYS TAKEN
106348: eb 42 jmp 10638c <rtems_bdpart_read_record+0x69><== NOT EXECUTED
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
/* Release previous block if necessary */
if (*block != NULL) {
sc = rtems_bdbuf_release( *block);
10634a: 83 ec 0c sub $0xc,%esp
10634d: 50 push %eax
10634e: e8 c8 a9 00 00 call 110d1b <rtems_bdbuf_release>
if (sc != RTEMS_SUCCESSFUL) {
106353: 83 c4 10 add $0x10,%esp
106356: 85 c0 test %eax,%eax
106358: 74 de je 106338 <rtems_bdpart_read_record+0x15><== ALWAYS TAKEN
10635a: eb 30 jmp 10638c <rtems_bdpart_read_record+0x69><== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
return sc;
}
/* just in case block did not get filled in */
if ( *block == NULL ) {
10635c: 8b 13 mov (%ebx),%edx
10635e: 85 d2 test %edx,%edx
106360: 74 25 je 106387 <rtems_bdpart_read_record+0x64><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
}
/* Check MBR signature */
if (!rtems_bdpart_is_valid_record( (*block)->buffer)) {
106362: 8b 4a 1c mov 0x1c(%edx),%ecx
static bool rtems_bdpart_is_valid_record( const uint8_t *data)
{
return data [RTEMS_BDPART_MBR_OFFSET_SIGNATURE_0]
== RTEMS_BDPART_MBR_SIGNATURE_0
&& data [RTEMS_BDPART_MBR_OFFSET_SIGNATURE_1]
106365: 31 d2 xor %edx,%edx
106367: 80 b9 fe 01 00 00 55 cmpb $0x55,0x1fe(%ecx)
10636e: 75 0c jne 10637c <rtems_bdpart_read_record+0x59><== NEVER TAKEN
106370: 31 d2 xor %edx,%edx
106372: 80 b9 ff 01 00 00 aa cmpb $0xaa,0x1ff(%ecx)
106379: 0f 94 c2 sete %dl
if ( *block == NULL ) {
return RTEMS_INVALID_ADDRESS;
}
/* Check MBR signature */
if (!rtems_bdpart_is_valid_record( (*block)->buffer)) {
10637c: 85 d2 test %edx,%edx
10637e: 75 0c jne 10638c <rtems_bdpart_read_record+0x69><== ALWAYS TAKEN
return RTEMS_IO_ERROR;
106380: b8 1b 00 00 00 mov $0x1b,%eax <== NOT EXECUTED
106385: eb 05 jmp 10638c <rtems_bdpart_read_record+0x69><== NOT EXECUTED
return sc;
}
/* just in case block did not get filled in */
if ( *block == NULL ) {
return RTEMS_INVALID_ADDRESS;
106387: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
if (!rtems_bdpart_is_valid_record( (*block)->buffer)) {
return RTEMS_IO_ERROR;
}
return RTEMS_SUCCESSFUL;
}
10638c: 8d 65 f4 lea -0xc(%ebp),%esp
10638f: 5b pop %ebx
106390: 5e pop %esi
106391: 5f pop %edi
106392: 5d pop %ebp
106393: c3 ret
00106748 <rtems_bdpart_register>:
rtems_status_code rtems_bdpart_register(
const char *disk_name,
const rtems_bdpart_partition *pt,
size_t count
)
{
106748: 55 push %ebp
106749: 89 e5 mov %esp,%ebp
10674b: 57 push %edi
10674c: 56 push %esi
10674d: 53 push %ebx
10674e: 83 ec 3c sub $0x3c,%esp
106751: 8b 75 08 mov 0x8(%ebp),%esi
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_status_code esc = RTEMS_SUCCESSFUL;
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
rtems_blkdev_bnum disk_end = 0;
106754: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp)
dev_t disk = 0;
dev_t logical_disk = 0;
char *logical_disk_name = NULL;
char *logical_disk_marker = NULL;
size_t disk_name_size = strlen( disk_name);
10675b: 31 c0 xor %eax,%eax
10675d: 83 c9 ff or $0xffffffff,%ecx
106760: 89 f7 mov %esi,%edi
106762: f2 ae repnz scas %es:(%edi),%al
106764: 89 cb mov %ecx,%ebx
106766: f7 d3 not %ebx
106768: 8d 7b ff lea -0x1(%ebx),%edi
size_t i = 0;
int fd = -1;
10676b: c7 45 e0 ff ff ff ff movl $0xffffffff,-0x20(%ebp)
rtems_disk_device *dd = NULL;
106772: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
/* Get disk data */
sc = rtems_bdpart_get_disk_data( disk_name, &fd, &dd, &disk_end);
106779: 8d 45 dc lea -0x24(%ebp),%eax
10677c: 50 push %eax
10677d: 8d 45 e4 lea -0x1c(%ebp),%eax
106780: 50 push %eax
106781: 8d 45 e0 lea -0x20(%ebp),%eax
106784: 50 push %eax
106785: 56 push %esi
106786: e8 fb fc ff ff call 106486 <rtems_bdpart_get_disk_data>
if (sc != RTEMS_SUCCESSFUL) {
10678b: 83 c4 10 add $0x10,%esp
10678e: 85 c0 test %eax,%eax
106790: 0f 85 d1 00 00 00 jne 106867 <rtems_bdpart_register+0x11f><== NEVER TAKEN
static inline dev_t rtems_disk_get_device_identifier(
const rtems_disk_device *dd
)
{
return dd->dev;
106796: 8b 45 e4 mov -0x1c(%ebp),%eax
106799: 8b 10 mov (%eax),%edx
10679b: 8b 48 04 mov 0x4(%eax),%ecx
10679e: 89 55 d0 mov %edx,-0x30(%ebp)
1067a1: 89 4d d4 mov %ecx,-0x2c(%ebp)
return sc;
}
disk = rtems_disk_get_device_identifier( dd);
close( fd);
1067a4: 83 ec 0c sub $0xc,%esp
1067a7: ff 75 e0 pushl -0x20(%ebp)
1067aa: e8 49 1a 00 00 call 1081f8 <close>
)
{
union __rtems_dev_t temp;
temp.device = device;
return temp.__overlay.major;
1067af: 8b 4d d0 mov -0x30(%ebp),%ecx
1067b2: 89 4d bc mov %ecx,-0x44(%ebp)
dev_t device
)
{
union __rtems_dev_t temp;
temp.device = device;
1067b5: 8b 45 d4 mov -0x2c(%ebp),%eax
1067b8: 89 45 cc mov %eax,-0x34(%ebp)
/* Get the disk device identifier */
rtems_filesystem_split_dev_t( disk, major, minor);
/* Create logical disk name */
logical_disk_name = malloc( disk_name_size + RTEMS_BDPART_NUMBER_SIZE);
1067bb: 83 c3 03 add $0x3,%ebx
1067be: 89 1c 24 mov %ebx,(%esp)
1067c1: e8 7a 21 00 00 call 108940 <malloc>
1067c6: 89 c3 mov %eax,%ebx
if (logical_disk_name == NULL) {
1067c8: 83 c4 10 add $0x10,%esp
return RTEMS_NO_MEMORY;
1067cb: b8 1a 00 00 00 mov $0x1a,%eax
/* Get the disk device identifier */
rtems_filesystem_split_dev_t( disk, major, minor);
/* Create logical disk name */
logical_disk_name = malloc( disk_name_size + RTEMS_BDPART_NUMBER_SIZE);
if (logical_disk_name == NULL) {
1067d0: 85 db test %ebx,%ebx
1067d2: 0f 84 8f 00 00 00 je 106867 <rtems_bdpart_register+0x11f><== NEVER TAKEN
return RTEMS_NO_MEMORY;
}
strncpy( logical_disk_name, disk_name, disk_name_size);
1067d8: 52 push %edx
1067d9: 57 push %edi
1067da: 56 push %esi
1067db: 53 push %ebx
1067dc: e8 ab ff 00 00 call 11678c <strncpy>
logical_disk_marker = logical_disk_name + disk_name_size;
1067e1: 01 df add %ebx,%edi
1067e3: 89 7d c8 mov %edi,-0x38(%ebp)
1067e6: 8b 7d 0c mov 0xc(%ebp),%edi
#include <string.h>
#include <rtems.h>
#include <rtems/bdpart.h>
rtems_status_code rtems_bdpart_register(
1067e9: 8b 55 cc mov -0x34(%ebp),%edx
1067ec: 03 55 10 add 0x10(%ebp),%edx
1067ef: 89 55 b8 mov %edx,-0x48(%ebp)
}
strncpy( logical_disk_name, disk_name, disk_name_size);
logical_disk_marker = logical_disk_name + disk_name_size;
/* Create a logical disk for each partition */
for (i = 0; i < count; ++i) {
1067f2: 83 c4 10 add $0x10,%esp
}
disk = rtems_disk_get_device_identifier( dd);
close( fd);
/* Get the disk device identifier */
rtems_filesystem_split_dev_t( disk, major, minor);
1067f5: 8b 75 cc mov -0x34(%ebp),%esi
}
strncpy( logical_disk_name, disk_name, disk_name_size);
logical_disk_marker = logical_disk_name + disk_name_size;
/* Create a logical disk for each partition */
for (i = 0; i < count; ++i) {
1067f8: eb 4d jmp 106847 <rtems_bdpart_register+0xff>
const rtems_bdpart_partition *p = pt + i;
int rv = 0;
/* New minor number */
++minor;
1067fa: 46 inc %esi
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
temp.__overlay.minor = _minor;
return temp.device;
1067fb: 8b 4d bc mov -0x44(%ebp),%ecx
1067fe: 89 4d c0 mov %ecx,-0x40(%ebp)
106801: 89 75 c4 mov %esi,-0x3c(%ebp)
#include <string.h>
#include <rtems.h>
#include <rtems/bdpart.h>
rtems_status_code rtems_bdpart_register(
106804: 89 f0 mov %esi,%eax
106806: 2b 45 cc sub -0x34(%ebp),%eax
/* Create a new device identifier */
logical_disk = rtems_filesystem_make_dev_t( major, minor);
/* Set partition number for logical disk name */
rv = snprintf( logical_disk_marker, RTEMS_BDPART_NUMBER_SIZE, "%zu", i + 1);
106809: 50 push %eax
10680a: 68 5c 38 12 00 push $0x12385c
10680f: 6a 04 push $0x4
106811: ff 75 c8 pushl -0x38(%ebp)
106814: e8 2b f6 00 00 call 115e44 <snprintf>
if (rv >= RTEMS_BDPART_NUMBER_SIZE) {
106819: 83 c4 10 add $0x10,%esp
10681c: 83 f8 03 cmp $0x3,%eax
10681f: 7f 2f jg 106850 <rtems_bdpart_register+0x108><== NEVER TAKEN
/* Create logical disk */
sc = rtems_disk_create_log(
logical_disk,
disk,
p->begin,
p->end - p->begin,
106821: 8b 17 mov (%edi),%edx
esc = RTEMS_INVALID_NAME;
goto cleanup;
}
/* Create logical disk */
sc = rtems_disk_create_log(
106823: 50 push %eax
106824: 53 push %ebx
106825: 8b 47 04 mov 0x4(%edi),%eax
106828: 29 d0 sub %edx,%eax
10682a: 50 push %eax
10682b: 52 push %edx
10682c: ff 75 d4 pushl -0x2c(%ebp)
10682f: ff 75 d0 pushl -0x30(%ebp)
106832: ff 75 c4 pushl -0x3c(%ebp)
106835: ff 75 c0 pushl -0x40(%ebp)
106838: e8 82 0a 00 00 call 1072bf <rtems_disk_create_log>
10683d: 83 c7 30 add $0x30,%edi
disk,
p->begin,
p->end - p->begin,
logical_disk_name
);
if (sc != RTEMS_SUCCESSFUL) {
106840: 83 c4 20 add $0x20,%esp
106843: 85 c0 test %eax,%eax
106845: 75 10 jne 106857 <rtems_bdpart_register+0x10f><== NEVER TAKEN
}
strncpy( logical_disk_name, disk_name, disk_name_size);
logical_disk_marker = logical_disk_name + disk_name_size;
/* Create a logical disk for each partition */
for (i = 0; i < count; ++i) {
106847: 3b 75 b8 cmp -0x48(%ebp),%esi
10684a: 75 ae jne 1067fa <rtems_bdpart_register+0xb2>
const rtems_bdpart_partition *pt,
size_t count
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_status_code esc = RTEMS_SUCCESSFUL;
10684c: 31 f6 xor %esi,%esi
10684e: eb 09 jmp 106859 <rtems_bdpart_register+0x111>
logical_disk = rtems_filesystem_make_dev_t( major, minor);
/* Set partition number for logical disk name */
rv = snprintf( logical_disk_marker, RTEMS_BDPART_NUMBER_SIZE, "%zu", i + 1);
if (rv >= RTEMS_BDPART_NUMBER_SIZE) {
esc = RTEMS_INVALID_NAME;
106850: be 03 00 00 00 mov $0x3,%esi <== NOT EXECUTED
106855: eb 02 jmp 106859 <rtems_bdpart_register+0x111><== NOT EXECUTED
goto cleanup;
}
/* Create logical disk */
sc = rtems_disk_create_log(
106857: 89 c6 mov %eax,%esi <== NOT EXECUTED
}
}
cleanup:
free( logical_disk_name);
106859: 83 ec 0c sub $0xc,%esp
10685c: 53 push %ebx
10685d: e8 c6 1b 00 00 call 108428 <free>
106862: 83 c4 10 add $0x10,%esp
return esc;
106865: 89 f0 mov %esi,%eax
}
106867: 8d 65 f4 lea -0xc(%ebp),%esp
10686a: 5b pop %ebx
10686b: 5e pop %esi
10686c: 5f pop %edi
10686d: 5d pop %ebp
10686e: c3 ret
0010686f <rtems_bdpart_register_from_disk>:
rtems_status_code rtems_bdpart_register_from_disk( const char *disk_name)
{
10686f: 55 push %ebp
106870: 89 e5 mov %esp,%ebp
106872: 56 push %esi
106873: 53 push %ebx
106874: 81 ec 20 03 00 00 sub $0x320,%esp
10687a: 8b 5d 08 mov 0x8(%ebp),%ebx
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_bdpart_format format;
rtems_bdpart_partition pt [RTEMS_BDPART_PARTITION_NUMBER_HINT];
size_t count = RTEMS_BDPART_PARTITION_NUMBER_HINT;
10687d: c7 85 e0 fc ff ff 10 movl $0x10,-0x320(%ebp)
106884: 00 00 00
/* Read partitions */
sc = rtems_bdpart_read( disk_name, &format, pt, &count);
106887: 8d 85 e0 fc ff ff lea -0x320(%ebp),%eax
10688d: 50 push %eax
10688e: 8d b5 f8 fc ff ff lea -0x308(%ebp),%esi
106894: 56 push %esi
106895: 8d 85 e4 fc ff ff lea -0x31c(%ebp),%eax
10689b: 50 push %eax
10689c: 53 push %ebx
10689d: e8 7e fc ff ff call 106520 <rtems_bdpart_read>
if (sc != RTEMS_SUCCESSFUL) {
1068a2: 83 c4 10 add $0x10,%esp
1068a5: 85 c0 test %eax,%eax
1068a7: 75 11 jne 1068ba <rtems_bdpart_register_from_disk+0x4b><== NEVER TAKEN
return sc;
}
/* Register partitions */
return rtems_bdpart_register( disk_name, pt, count);
1068a9: 51 push %ecx
1068aa: ff b5 e0 fc ff ff pushl -0x320(%ebp)
1068b0: 56 push %esi
1068b1: 53 push %ebx
1068b2: e8 91 fe ff ff call 106748 <rtems_bdpart_register>
1068b7: 83 c4 10 add $0x10,%esp
}
1068ba: 8d 65 f8 lea -0x8(%ebp),%esp
1068bd: 5b pop %ebx
1068be: 5e pop %esi
1068bf: 5d pop %ebp
1068c0: c3 ret
0011fc64 <rtems_bdpart_unmount>:
const char *disk_name,
const rtems_bdpart_partition *pt __attribute__((unused)),
size_t count,
const char *mount_base
)
{
11fc64: 55 push %ebp <== NOT EXECUTED
11fc65: 89 e5 mov %esp,%ebp <== NOT EXECUTED
11fc67: 57 push %edi <== NOT EXECUTED
11fc68: 56 push %esi <== NOT EXECUTED
11fc69: 53 push %ebx <== NOT EXECUTED
11fc6a: 83 ec 24 sub $0x24,%esp <== NOT EXECUTED
rtems_status_code esc = RTEMS_SUCCESSFUL;
const char *disk_file_name = strrchr( disk_name, '/');
11fc6d: 6a 2f push $0x2f <== NOT EXECUTED
11fc6f: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
11fc72: e8 59 7f 01 00 call 137bd0 <strrchr> <== NOT EXECUTED
11fc77: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11fc7a: 89 c3 mov %eax,%ebx <== NOT EXECUTED
char *mount_point = NULL;
char *mount_marker = NULL;
size_t disk_file_name_size = 0;
size_t disk_name_size = strlen( disk_name);
11fc7c: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED
11fc7f: 31 c0 xor %eax,%eax <== NOT EXECUTED
11fc81: 89 f1 mov %esi,%ecx <== NOT EXECUTED
11fc83: 8b 7d 08 mov 0x8(%ebp),%edi <== NOT EXECUTED
11fc86: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED
11fc88: f7 d1 not %ecx <== NOT EXECUTED
11fc8a: 8d 51 ff lea -0x1(%ecx),%edx <== NOT EXECUTED
size_t mount_base_size = strlen( mount_base);
11fc8d: 89 f1 mov %esi,%ecx <== NOT EXECUTED
11fc8f: 8b 7d 14 mov 0x14(%ebp),%edi <== NOT EXECUTED
11fc92: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED
11fc94: f7 d1 not %ecx <== NOT EXECUTED
11fc96: 89 4d e0 mov %ecx,-0x20(%ebp) <== NOT EXECUTED
11fc99: 49 dec %ecx <== NOT EXECUTED
11fc9a: 89 4d dc mov %ecx,-0x24(%ebp) <== NOT EXECUTED
size_t i = 0;
/* Get disk file name */
if (disk_file_name != NULL) {
11fc9d: 85 db test %ebx,%ebx <== NOT EXECUTED
11fc9f: 74 11 je 11fcb2 <rtems_bdpart_unmount+0x4e><== NOT EXECUTED
disk_file_name += 1;
11fca1: 43 inc %ebx <== NOT EXECUTED
11fca2: 89 5d e4 mov %ebx,-0x1c(%ebp) <== NOT EXECUTED
disk_file_name_size = strlen( disk_file_name);
11fca5: 89 f1 mov %esi,%ecx <== NOT EXECUTED
11fca7: 89 df mov %ebx,%edi <== NOT EXECUTED
11fca9: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED
11fcab: f7 d1 not %ecx <== NOT EXECUTED
11fcad: 8d 71 ff lea -0x1(%ecx),%esi <== NOT EXECUTED
11fcb0: eb 08 jmp 11fcba <rtems_bdpart_unmount+0x56><== NOT EXECUTED
} else {
disk_file_name = disk_name;
disk_file_name_size = disk_name_size;
11fcb2: 89 d6 mov %edx,%esi <== NOT EXECUTED
/* Get disk file name */
if (disk_file_name != NULL) {
disk_file_name += 1;
disk_file_name_size = strlen( disk_file_name);
} else {
disk_file_name = disk_name;
11fcb4: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
11fcb7: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED
disk_file_name_size = disk_name_size;
}
/* Create mount point base */
mount_point = malloc( mount_base_size + 1 + disk_file_name_size + RTEMS_BDPART_NUMBER_SIZE);
11fcba: 8b 7d dc mov -0x24(%ebp),%edi <== NOT EXECUTED
11fcbd: 01 f7 add %esi,%edi <== NOT EXECUTED
11fcbf: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11fcc2: 8d 47 05 lea 0x5(%edi),%eax <== NOT EXECUTED
11fcc5: 50 push %eax <== NOT EXECUTED
11fcc6: e8 49 6b fe ff call 106814 <malloc> <== NOT EXECUTED
11fccb: 89 c3 mov %eax,%ebx <== NOT EXECUTED
if (mount_point == NULL) {
11fccd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
esc = RTEMS_NO_MEMORY;
11fcd0: b8 1a 00 00 00 mov $0x1a,%eax <== NOT EXECUTED
disk_file_name_size = disk_name_size;
}
/* Create mount point base */
mount_point = malloc( mount_base_size + 1 + disk_file_name_size + RTEMS_BDPART_NUMBER_SIZE);
if (mount_point == NULL) {
11fcd5: 85 db test %ebx,%ebx <== NOT EXECUTED
11fcd7: 0f 84 80 00 00 00 je 11fd5d <rtems_bdpart_unmount+0xf9><== NOT EXECUTED
esc = RTEMS_NO_MEMORY;
goto cleanup;
}
strncpy( mount_point, mount_base, mount_base_size);
11fcdd: 51 push %ecx <== NOT EXECUTED
11fcde: ff 75 dc pushl -0x24(%ebp) <== NOT EXECUTED
11fce1: ff 75 14 pushl 0x14(%ebp) <== NOT EXECUTED
11fce4: 53 push %ebx <== NOT EXECUTED
11fce5: e8 ce 74 01 00 call 1371b8 <strncpy> <== NOT EXECUTED
mount_point [mount_base_size] = '/';
11fcea: 8b 4d e0 mov -0x20(%ebp),%ecx <== NOT EXECUTED
11fced: c6 44 0b ff 2f movb $0x2f,-0x1(%ebx,%ecx,1) <== NOT EXECUTED
strncpy( mount_point + mount_base_size + 1, disk_file_name, disk_file_name_size);
11fcf2: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
11fcf5: 56 push %esi <== NOT EXECUTED
11fcf6: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
11fcf9: 8b 55 dc mov -0x24(%ebp),%edx <== NOT EXECUTED
11fcfc: 8d 44 13 01 lea 0x1(%ebx,%edx,1),%eax <== NOT EXECUTED
11fd00: 50 push %eax <== NOT EXECUTED
11fd01: e8 b2 74 01 00 call 1371b8 <strncpy> <== NOT EXECUTED
/* Marker */
mount_marker = mount_point + mount_base_size + 1 + disk_file_name_size;
11fd06: 8d 7c 3b 01 lea 0x1(%ebx,%edi,1),%edi <== NOT EXECUTED
/* Mount supported file systems for each partition */
for (i = 0; i < count; ++i) {
11fd0a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11fd0d: 31 f6 xor %esi,%esi <== NOT EXECUTED
11fd0f: eb 37 jmp 11fd48 <rtems_bdpart_unmount+0xe4><== NOT EXECUTED
/* Create mount point */
int rv = snprintf( mount_marker, RTEMS_BDPART_NUMBER_SIZE, "%zu", i + 1);
11fd11: 46 inc %esi <== NOT EXECUTED
11fd12: 56 push %esi <== NOT EXECUTED
11fd13: 68 bc 14 15 00 push $0x1514bc <== NOT EXECUTED
11fd18: 6a 04 push $0x4 <== NOT EXECUTED
11fd1a: 57 push %edi <== NOT EXECUTED
11fd1b: e8 e0 68 01 00 call 136600 <snprintf> <== NOT EXECUTED
if (rv >= RTEMS_BDPART_NUMBER_SIZE) {
11fd20: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11fd23: 83 f8 03 cmp $0x3,%eax <== NOT EXECUTED
11fd26: 7f 29 jg 11fd51 <rtems_bdpart_unmount+0xed><== NOT EXECUTED
esc = RTEMS_INVALID_NAME;
goto cleanup;
}
/* Unmount */
rv = unmount( mount_point);
11fd28: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11fd2b: 53 push %ebx <== NOT EXECUTED
11fd2c: e8 6b 34 00 00 call 12319c <unmount> <== NOT EXECUTED
if (rv == 0) {
11fd31: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11fd34: 85 c0 test %eax,%eax <== NOT EXECUTED
11fd36: 75 10 jne 11fd48 <rtems_bdpart_unmount+0xe4><== NOT EXECUTED
/* Remove mount point */
rv = rmdir( mount_point);
11fd38: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11fd3b: 53 push %ebx <== NOT EXECUTED
11fd3c: e8 bb 2e 00 00 call 122bfc <rmdir> <== NOT EXECUTED
if (rv != 0) {
11fd41: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11fd44: 85 c0 test %eax,%eax <== NOT EXECUTED
11fd46: 75 10 jne 11fd58 <rtems_bdpart_unmount+0xf4><== NOT EXECUTED
/* Marker */
mount_marker = mount_point + mount_base_size + 1 + disk_file_name_size;
/* Mount supported file systems for each partition */
for (i = 0; i < count; ++i) {
11fd48: 3b 75 10 cmp 0x10(%ebp),%esi <== NOT EXECUTED
11fd4b: 75 c4 jne 11fd11 <rtems_bdpart_unmount+0xad><== NOT EXECUTED
const rtems_bdpart_partition *pt __attribute__((unused)),
size_t count,
const char *mount_base
)
{
rtems_status_code esc = RTEMS_SUCCESSFUL;
11fd4d: 31 c0 xor %eax,%eax <== NOT EXECUTED
11fd4f: eb 0c jmp 11fd5d <rtems_bdpart_unmount+0xf9><== NOT EXECUTED
/* Mount supported file systems for each partition */
for (i = 0; i < count; ++i) {
/* Create mount point */
int rv = snprintf( mount_marker, RTEMS_BDPART_NUMBER_SIZE, "%zu", i + 1);
if (rv >= RTEMS_BDPART_NUMBER_SIZE) {
esc = RTEMS_INVALID_NAME;
11fd51: b8 03 00 00 00 mov $0x3,%eax <== NOT EXECUTED
11fd56: eb 05 jmp 11fd5d <rtems_bdpart_unmount+0xf9><== NOT EXECUTED
rv = unmount( mount_point);
if (rv == 0) {
/* Remove mount point */
rv = rmdir( mount_point);
if (rv != 0) {
esc = RTEMS_IO_ERROR;
11fd58: b8 1b 00 00 00 mov $0x1b,%eax <== NOT EXECUTED
}
}
cleanup:
free( mount_point);
11fd5d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11fd60: 53 push %ebx <== NOT EXECUTED
11fd61: 89 45 d8 mov %eax,-0x28(%ebp) <== NOT EXECUTED
11fd64: e8 eb 67 fe ff call 106554 <free> <== NOT EXECUTED
return esc;
}
11fd69: 8b 45 d8 mov -0x28(%ebp),%eax <== NOT EXECUTED
11fd6c: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
11fd6f: 5b pop %ebx <== NOT EXECUTED
11fd70: 5e pop %esi <== NOT EXECUTED
11fd71: 5f pop %edi <== NOT EXECUTED
11fd72: 5d pop %ebp <== NOT EXECUTED
11fd73: c3 ret <== NOT EXECUTED
001068c1 <rtems_bdpart_unregister>:
rtems_status_code rtems_bdpart_unregister(
const char *disk_name,
const rtems_bdpart_partition *pt __attribute__((unused)),
size_t count
)
{
1068c1: 55 push %ebp
1068c2: 89 e5 mov %esp,%ebp
1068c4: 57 push %edi
1068c5: 56 push %esi
1068c6: 53 push %ebx
1068c7: 83 ec 2c sub $0x2c,%esp
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
rtems_blkdev_bnum disk_end = 0;
1068ca: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp)
dev_t disk = 0;
dev_t logical_disk = 0;
size_t i = 0;
int fd = -1;
1068d1: c7 45 e0 ff ff ff ff movl $0xffffffff,-0x20(%ebp)
rtems_disk_device *dd = NULL;
1068d8: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
/* Get disk data */
sc = rtems_bdpart_get_disk_data( disk_name, &fd, &dd, &disk_end);
1068df: 8d 45 dc lea -0x24(%ebp),%eax
1068e2: 50 push %eax
1068e3: 8d 45 e4 lea -0x1c(%ebp),%eax
1068e6: 50 push %eax
1068e7: 8d 45 e0 lea -0x20(%ebp),%eax
1068ea: 50 push %eax
1068eb: ff 75 08 pushl 0x8(%ebp)
1068ee: e8 93 fb ff ff call 106486 <rtems_bdpart_get_disk_data>
1068f3: 89 c3 mov %eax,%ebx
if (sc != RTEMS_SUCCESSFUL) {
1068f5: 83 c4 10 add $0x10,%esp
1068f8: 85 c0 test %eax,%eax
1068fa: 75 3a jne 106936 <rtems_bdpart_unregister+0x75><== NEVER TAKEN
1068fc: 8b 45 e4 mov -0x1c(%ebp),%eax
1068ff: 8b 38 mov (%eax),%edi
106901: 8b 70 04 mov 0x4(%eax),%esi
return sc;
}
disk = rtems_disk_get_device_identifier( dd);
close( fd);
106904: 83 ec 0c sub $0xc,%esp
106907: ff 75 e0 pushl -0x20(%ebp)
10690a: e8 e9 18 00 00 call 1081f8 <close>
/* Register partitions */
return rtems_bdpart_register( disk_name, pt, count);
}
rtems_status_code rtems_bdpart_unregister(
10690f: 8b 45 10 mov 0x10(%ebp),%eax
106912: 01 f0 add %esi,%eax
106914: 89 45 d4 mov %eax,-0x2c(%ebp)
/* Get the disk device identifier */
rtems_filesystem_split_dev_t( disk, major, minor);
/* Create a logical disk for each partition */
for (i = 0; i < count; ++i) {
106917: 83 c4 10 add $0x10,%esp
10691a: eb 11 jmp 10692d <rtems_bdpart_unregister+0x6c>
/* New minor number */
++minor;
10691c: 46 inc %esi
/* Get the device identifier */
logical_disk = rtems_filesystem_make_dev_t( major, minor);
/* Delete logical disk */
sc = rtems_disk_delete( logical_disk);
10691d: 51 push %ecx
10691e: 51 push %ecx
10691f: 56 push %esi
106920: 57 push %edi
106921: e8 6f 08 00 00 call 107195 <rtems_disk_delete>
if (sc != RTEMS_SUCCESSFUL) {
106926: 83 c4 10 add $0x10,%esp
106929: 85 c0 test %eax,%eax
10692b: 75 07 jne 106934 <rtems_bdpart_unregister+0x73><== NEVER TAKEN
/* Get the disk device identifier */
rtems_filesystem_split_dev_t( disk, major, minor);
/* Create a logical disk for each partition */
for (i = 0; i < count; ++i) {
10692d: 3b 75 d4 cmp -0x2c(%ebp),%esi
106930: 75 ea jne 10691c <rtems_bdpart_unregister+0x5b>
106932: eb 02 jmp 106936 <rtems_bdpart_unregister+0x75>
/* Get the device identifier */
logical_disk = rtems_filesystem_make_dev_t( major, minor);
/* Delete logical disk */
sc = rtems_disk_delete( logical_disk);
106934: 89 c3 mov %eax,%ebx <== NOT EXECUTED
return sc;
}
}
return RTEMS_SUCCESSFUL;
}
106936: 89 d8 mov %ebx,%eax
106938: 8d 65 f4 lea -0xc(%ebp),%esp
10693b: 5b pop %ebx
10693c: 5e pop %esi
10693d: 5f pop %edi
10693e: 5d pop %ebp
10693f: c3 ret
001069ec <rtems_bdpart_write>:
const char *disk_name,
const rtems_bdpart_format *format,
const rtems_bdpart_partition *pt,
size_t count
)
{
1069ec: 55 push %ebp
1069ed: 89 e5 mov %esp,%ebp
1069ef: 57 push %edi
1069f0: 56 push %esi
1069f1: 53 push %ebx
1069f2: 83 ec 4c sub $0x4c,%esp
1069f5: 8b 7d 0c mov 0xc(%ebp),%edi
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_status_code esc = RTEMS_SUCCESSFUL;
bool dos_compatibility = format != NULL
&& format->type == RTEMS_BDPART_FORMAT_MBR
&& format->mbr.dos_compatibility;
1069f8: 31 db xor %ebx,%ebx
1069fa: 85 ff test %edi,%edi
1069fc: 74 09 je 106a07 <rtems_bdpart_write+0x1b><== NEVER TAKEN
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_status_code esc = RTEMS_SUCCESSFUL;
bool dos_compatibility = format != NULL
&& format->type == RTEMS_BDPART_FORMAT_MBR
1069fe: 83 3f 00 cmpl $0x0,(%edi)
106a01: 75 04 jne 106a07 <rtems_bdpart_write+0x1b><== NEVER TAKEN
&& format->mbr.dos_compatibility;
106a03: 0f b6 5f 08 movzbl 0x8(%edi),%ebx
size_t count
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_status_code esc = RTEMS_SUCCESSFUL;
bool dos_compatibility = format != NULL
106a07: 83 e3 01 and $0x1,%ebx
&& format->type == RTEMS_BDPART_FORMAT_MBR
&& format->mbr.dos_compatibility;
rtems_bdbuf_buffer *block = NULL;
106a0a: c7 45 d8 00 00 00 00 movl $0x0,-0x28(%ebp)
rtems_blkdev_bnum disk_end = 0;
106a11: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp)
rtems_blkdev_bnum record_space =
106a18: 80 fb 01 cmp $0x1,%bl
106a1b: 19 f6 sbb %esi,%esi
106a1d: 83 e6 c2 and $0xffffffc2,%esi
106a20: 83 c6 3f add $0x3f,%esi
106a23: 89 75 c0 mov %esi,-0x40(%ebp)
dos_compatibility ? RTEMS_BDPART_MBR_CYLINDER_SIZE : 1;
size_t ppc = 0; /* Primary partition count */
size_t i = 0;
uint8_t *data = NULL;
int fd = -1;
106a26: c7 45 e0 ff ff ff ff movl $0xffffffff,-0x20(%ebp)
rtems_disk_device *dd = NULL;
106a2d: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
/* Check if we have something to do */
if (count == 0) {
/* Nothing to do */
return RTEMS_SUCCESSFUL;
106a34: 31 c0 xor %eax,%eax
uint8_t *data = NULL;
int fd = -1;
rtems_disk_device *dd = NULL;
/* Check if we have something to do */
if (count == 0) {
106a36: 83 7d 14 00 cmpl $0x0,0x14(%ebp)
106a3a: 0f 84 a6 02 00 00 je 106ce6 <rtems_bdpart_write+0x2fa><== NEVER TAKEN
/* Nothing to do */
return RTEMS_SUCCESSFUL;
}
/* Check parameter */
if (format == NULL || pt == NULL) {
106a40: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
106a44: 0f 84 93 02 00 00 je 106cdd <rtems_bdpart_write+0x2f1><== NEVER TAKEN
106a4a: 85 ff test %edi,%edi
106a4c: 0f 84 8b 02 00 00 je 106cdd <rtems_bdpart_write+0x2f1><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
}
/* Get disk data */
sc = rtems_bdpart_get_disk_data( disk_name, &fd, &dd, &disk_end);
106a52: 8d 45 dc lea -0x24(%ebp),%eax
106a55: 50 push %eax
106a56: 8d 45 e4 lea -0x1c(%ebp),%eax
106a59: 50 push %eax
106a5a: 8d 45 e0 lea -0x20(%ebp),%eax
106a5d: 50 push %eax
106a5e: ff 75 08 pushl 0x8(%ebp)
106a61: e8 20 fa ff ff call 106486 <rtems_bdpart_get_disk_data>
if (sc != RTEMS_SUCCESSFUL) {
106a66: 83 c4 10 add $0x10,%esp
106a69: 85 c0 test %eax,%eax
106a6b: 0f 85 75 02 00 00 jne 106ce6 <rtems_bdpart_write+0x2fa><== NEVER TAKEN
return sc;
}
/* Align end of disk on cylinder boundary if necessary */
if (dos_compatibility) {
106a71: 84 db test %bl,%bl
106a73: 74 0f je 106a84 <rtems_bdpart_write+0x98><== NEVER TAKEN
disk_end -= (disk_end % record_space);
106a75: 8b 45 dc mov -0x24(%ebp),%eax
106a78: 31 d2 xor %edx,%edx
106a7a: f7 f6 div %esi
106a7c: 8b 45 dc mov -0x24(%ebp),%eax
106a7f: 29 d0 sub %edx,%eax
106a81: 89 45 dc mov %eax,-0x24(%ebp)
/* Check that we have a consistent partition table */
for (i = 0; i < count; ++i) {
const rtems_bdpart_partition *p = pt + i;
/* Check that begin and end are proper within the disk */
if (p->begin >= disk_end || p->end > disk_end) {
106a84: 8b 45 dc mov -0x24(%ebp),%eax
106a87: 89 45 bc mov %eax,-0x44(%ebp)
106a8a: 8b 75 10 mov 0x10(%ebp),%esi
106a8d: 89 75 b8 mov %esi,-0x48(%ebp)
106a90: 89 f0 mov %esi,%eax
if (dos_compatibility) {
disk_end -= (disk_end % record_space);
}
/* Check that we have a consistent partition table */
for (i = 0; i < count; ++i) {
106a92: 31 d2 xor %edx,%edx
const rtems_bdpart_partition *p = pt + i;
/* Check that begin and end are proper within the disk */
if (p->begin >= disk_end || p->end > disk_end) {
106a94: 8b 08 mov (%eax),%ecx
106a96: 3b 4d bc cmp -0x44(%ebp),%ecx
106a99: 0f 83 0d 02 00 00 jae 106cac <rtems_bdpart_write+0x2c0><== NEVER TAKEN
106a9f: 8b 70 04 mov 0x4(%eax),%esi
106aa2: 89 75 c4 mov %esi,-0x3c(%ebp)
106aa5: 8b 75 bc mov -0x44(%ebp),%esi
106aa8: 39 75 c4 cmp %esi,-0x3c(%ebp)
106aab: 0f 87 fb 01 00 00 ja 106cac <rtems_bdpart_write+0x2c0><== NEVER TAKEN
esc = RTEMS_INVALID_NUMBER;
goto cleanup;
}
/* Check that begin and end are valid */
if (p->begin >= p->end) {
106ab1: 3b 4d c4 cmp -0x3c(%ebp),%ecx
106ab4: 0f 83 f2 01 00 00 jae 106cac <rtems_bdpart_write+0x2c0><== NEVER TAKEN
esc = RTEMS_INVALID_NUMBER;
goto cleanup;
}
/* Check that partitions do not overlap */
if (i > 0 && pt [i - 1].end > p->begin) {
106aba: 85 d2 test %edx,%edx
106abc: 74 09 je 106ac7 <rtems_bdpart_write+0xdb>
106abe: 39 48 d4 cmp %ecx,-0x2c(%eax)
106ac1: 0f 87 e5 01 00 00 ja 106cac <rtems_bdpart_write+0x2c0><== NEVER TAKEN
if (dos_compatibility) {
disk_end -= (disk_end % record_space);
}
/* Check that we have a consistent partition table */
for (i = 0; i < count; ++i) {
106ac7: 42 inc %edx
106ac8: 83 c0 30 add $0x30,%eax
106acb: 3b 55 14 cmp 0x14(%ebp),%edx
106ace: 75 c4 jne 106a94 <rtems_bdpart_write+0xa8>
}
}
/* Check format */
if (format->type != RTEMS_BDPART_FORMAT_MBR) {
esc = RTEMS_NOT_IMPLEMENTED;
106ad0: be 18 00 00 00 mov $0x18,%esi
goto cleanup;
}
}
/* Check format */
if (format->type != RTEMS_BDPART_FORMAT_MBR) {
106ad5: 83 3f 00 cmpl $0x0,(%edi)
106ad8: 0f 85 d7 01 00 00 jne 106cb5 <rtems_bdpart_write+0x2c9><== NEVER TAKEN
* Set primary partition count. If we have more than four partitions we need
* an extended partition which will contain the partitions of number four and
* above as logical partitions. If we have four or less partitions we can
* use the primary partition table.
*/
ppc = count <= 4 ? count : 3;
106ade: 8b 75 14 mov 0x14(%ebp),%esi
106ae1: 89 75 c4 mov %esi,-0x3c(%ebp)
106ae4: 83 fe 04 cmp $0x4,%esi
106ae7: 76 07 jbe 106af0 <rtems_bdpart_write+0x104><== NEVER TAKEN
106ae9: c7 45 c4 03 00 00 00 movl $0x3,-0x3c(%ebp)
/*
* Check that the first primary partition starts at head one and sector one
* under the virtual one head and 63 sectors geometry if necessary.
*/
if (dos_compatibility && pt [0].begin != RTEMS_BDPART_MBR_CYLINDER_SIZE) {
106af0: 84 db test %bl,%bl
106af2: 75 13 jne 106b07 <rtems_bdpart_write+0x11b><== ALWAYS TAKEN
RTEMS_BDPART_MBR_SIGNATURE_1;
return RTEMS_SUCCESSFUL;
}
rtems_status_code rtems_bdpart_write(
106af4: 6b 45 c4 30 imul $0x30,-0x3c(%ebp),%eax
106af8: 03 45 10 add 0x10(%ebp),%eax
106afb: 89 45 b4 mov %eax,-0x4c(%ebp)
106afe: 89 c3 mov %eax,%ebx
106b00: 89 c2 mov %eax,%edx
106b02: 8b 45 c4 mov -0x3c(%ebp),%eax
106b05: eb 27 jmp 106b2e <rtems_bdpart_write+0x142>
/*
* Check that the first primary partition starts at head one and sector one
* under the virtual one head and 63 sectors geometry if necessary.
*/
if (dos_compatibility && pt [0].begin != RTEMS_BDPART_MBR_CYLINDER_SIZE) {
esc = RTEMS_INVALID_NUMBER;
106b07: be 0a 00 00 00 mov $0xa,%esi
/*
* Check that the first primary partition starts at head one and sector one
* under the virtual one head and 63 sectors geometry if necessary.
*/
if (dos_compatibility && pt [0].begin != RTEMS_BDPART_MBR_CYLINDER_SIZE) {
106b0c: 8b 45 10 mov 0x10(%ebp),%eax
106b0f: 83 38 3f cmpl $0x3f,(%eax)
106b12: 0f 85 9d 01 00 00 jne 106cb5 <rtems_bdpart_write+0x2c9><== NEVER TAKEN
106b18: eb da jmp 106af4 <rtems_bdpart_write+0x108>
RTEMS_BDPART_MBR_SIGNATURE_1;
return RTEMS_SUCCESSFUL;
}
rtems_status_code rtems_bdpart_write(
106b1a: 89 d6 mov %edx,%esi
106b1c: 83 c2 30 add $0x30,%edx
* The space for the EBR and maybe some space which is needed for DOS
* compatibility resides between the partitions. So there have to be gaps of
* the appropriate size between the partitions.
*/
for (i = ppc; i < count; ++i) {
if ((pt [i].begin - pt [i - 1].end) < record_space) {
106b1f: 8b 0e mov (%esi),%ecx
106b21: 2b 4e d4 sub -0x2c(%esi),%ecx
106b24: 3b 4d c0 cmp -0x40(%ebp),%ecx
106b27: 0f 82 7f 01 00 00 jb 106cac <rtems_bdpart_write+0x2c0><== NEVER TAKEN
* Each logical partition is described via one EBR preceding the partition.
* The space for the EBR and maybe some space which is needed for DOS
* compatibility resides between the partitions. So there have to be gaps of
* the appropriate size between the partitions.
*/
for (i = ppc; i < count; ++i) {
106b2d: 40 inc %eax
106b2e: 3b 45 14 cmp 0x14(%ebp),%eax
106b31: 72 e7 jb 106b1a <rtems_bdpart_write+0x12e>
106b33: 8b 75 10 mov 0x10(%ebp),%esi
106b36: 31 d2 xor %edx,%edx
uint8_t type = 0;
const rtems_bdpart_partition *p = pt + i;
/* Check type */
if (!rtems_bdpart_to_mbr_partition_type( p->type, &type)) {
106b38: 8d 4d d7 lea -0x29(%ebp),%ecx
}
}
/* Check that we can convert the parition descriptions to the MBR format */
for (i = 0; i < count; ++i) {
uint8_t type = 0;
106b3b: c6 45 d7 00 movb $0x0,-0x29(%ebp)
const rtems_bdpart_partition *p = pt + i;
/* Check type */
if (!rtems_bdpart_to_mbr_partition_type( p->type, &type)) {
106b3f: 50 push %eax
106b40: 50 push %eax
106b41: 51 push %ecx
106b42: 8d 46 08 lea 0x8(%esi),%eax
106b45: 50 push %eax
106b46: 89 55 b0 mov %edx,-0x50(%ebp)
106b49: 89 4d ac mov %ecx,-0x54(%ebp)
106b4c: e8 0d f9 ff ff call 10645e <rtems_bdpart_to_mbr_partition_type>
106b51: 83 c4 10 add $0x10,%esp
106b54: 84 c0 test %al,%al
106b56: 8b 55 b0 mov -0x50(%ebp),%edx
106b59: 8b 4d ac mov -0x54(%ebp),%ecx
106b5c: 74 1a je 106b78 <rtems_bdpart_write+0x18c><== NEVER TAKEN
106b5e: 83 c6 30 add $0x30,%esi
esc = RTEMS_INVALID_ID;
goto cleanup;
}
/* Check flags */
if (p->flags > 0xffU) {
106b61: 83 7e fc 00 cmpl $0x0,-0x4(%esi)
106b65: 77 11 ja 106b78 <rtems_bdpart_write+0x18c><== NEVER TAKEN
106b67: 81 7e f8 ff 00 00 00 cmpl $0xff,-0x8(%esi)
106b6e: 77 08 ja 106b78 <rtems_bdpart_write+0x18c><== NEVER TAKEN
goto cleanup;
}
}
/* Check that we can convert the parition descriptions to the MBR format */
for (i = 0; i < count; ++i) {
106b70: 42 inc %edx
106b71: 3b 55 14 cmp 0x14(%ebp),%edx
106b74: 75 c5 jne 106b3b <rtems_bdpart_write+0x14f>
106b76: eb 0a jmp 106b82 <rtems_bdpart_write+0x196>
106b78: be 04 00 00 00 mov $0x4,%esi <== NOT EXECUTED
106b7d: e9 33 01 00 00 jmp 106cb5 <rtems_bdpart_write+0x2c9><== NOT EXECUTED
/* Check ID */
/* TODO */
}
/* New MBR */
sc = rtems_bdpart_new_record( dd, 0, &block);
106b82: 8d 4d d8 lea -0x28(%ebp),%ecx
106b85: 31 d2 xor %edx,%edx
106b87: 8b 45 e4 mov -0x1c(%ebp),%eax
106b8a: e8 b1 fd ff ff call 106940 <rtems_bdpart_new_record>
if (sc != RTEMS_SUCCESSFUL) {
106b8f: 89 c6 mov %eax,%esi
106b91: 85 c0 test %eax,%eax
106b93: 0f 85 1c 01 00 00 jne 106cb5 <rtems_bdpart_write+0x2c9><== NEVER TAKEN
}
/* Write disk ID */
rtems_uint32_to_little_endian(
format->mbr.disk_id,
block->buffer + RTEMS_BDPART_MBR_OFFSET_DISK_ID
106b99: 8b 45 d8 mov -0x28(%ebp),%eax
106b9c: 8b 48 1c mov 0x1c(%eax),%ecx
esc = sc;
goto cleanup;
}
/* Write disk ID */
rtems_uint32_to_little_endian(
106b9f: 8b 57 04 mov 0x4(%edi),%edx
106ba2: 31 c0 xor %eax,%eax
data [i] = (uint8_t) value;
106ba4: 88 94 01 b8 01 00 00 mov %dl,0x1b8(%ecx,%eax,1)
value >>= 8;
106bab: c1 ea 08 shr $0x8,%edx
static inline void rtems_uint32_to_little_endian( uint32_t value, uint8_t *data)
{
size_t i = 0;
for (i = 0; i < 4; ++i) {
106bae: 40 inc %eax
106baf: 83 f8 04 cmp $0x4,%eax
106bb2: 75 f0 jne 106ba4 <rtems_bdpart_write+0x1b8>
format->mbr.disk_id,
block->buffer + RTEMS_BDPART_MBR_OFFSET_DISK_ID
);
/* Write primary partition table */
data = block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0;
106bb4: 8b 45 d8 mov -0x28(%ebp),%eax
106bb7: 8b 40 1c mov 0x1c(%eax),%eax
106bba: 05 be 01 00 00 add $0x1be,%eax
106bbf: 89 45 bc mov %eax,-0x44(%ebp)
106bc2: 89 c7 mov %eax,%edi
for (i = 0; i < ppc; ++i) {
106bc4: 31 f6 xor %esi,%esi
106bc6: eb 34 jmp 106bfc <rtems_bdpart_write+0x210>
/* Write partition entry */
rtems_bdpart_write_mbr_partition(
data,
p->begin,
p->end - p->begin,
106bc8: 8b 55 b8 mov -0x48(%ebp),%edx
106bcb: 8b 12 mov (%edx),%edx
106bcd: 89 55 a8 mov %edx,-0x58(%ebp)
data = block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0;
for (i = 0; i < ppc; ++i) {
const rtems_bdpart_partition *p = pt + i;
/* Write partition entry */
rtems_bdpart_write_mbr_partition(
106bd0: 51 push %ecx
106bd1: 51 push %ecx
106bd2: 8b 45 b8 mov -0x48(%ebp),%eax
106bd5: 8b 48 04 mov 0x4(%eax),%ecx
106bd8: 29 d1 sub %edx,%ecx
106bda: 0f b6 40 28 movzbl 0x28(%eax),%eax
106bde: 50 push %eax
106bdf: 8b 55 b8 mov -0x48(%ebp),%edx
106be2: 0f b6 42 08 movzbl 0x8(%edx),%eax
106be6: 50 push %eax
106be7: 8b 55 a8 mov -0x58(%ebp),%edx
106bea: 89 f8 mov %edi,%eax
106bec: e8 c1 fd ff ff call 1069b2 <rtems_bdpart_write_mbr_partition>
p->end - p->begin,
rtems_bdpart_mbr_partition_type( p->type),
(uint8_t) p->flags
);
data += RTEMS_BDPART_MBR_TABLE_ENTRY_SIZE;
106bf1: 83 c7 10 add $0x10,%edi
block->buffer + RTEMS_BDPART_MBR_OFFSET_DISK_ID
);
/* Write primary partition table */
data = block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0;
for (i = 0; i < ppc; ++i) {
106bf4: 46 inc %esi
106bf5: 83 45 b8 30 addl $0x30,-0x48(%ebp)
106bf9: 83 c4 10 add $0x10,%esp
106bfc: 3b 75 c4 cmp -0x3c(%ebp),%esi
106bff: 75 c7 jne 106bc8 <rtems_bdpart_write+0x1dc>
RTEMS_BDPART_MBR_SIGNATURE_1;
return RTEMS_SUCCESSFUL;
}
rtems_status_code rtems_bdpart_write(
106c01: 8b 45 c4 mov -0x3c(%ebp),%eax
106c04: c1 e0 04 shl $0x4,%eax
106c07: 03 45 bc add -0x44(%ebp),%eax
const rtems_bdpart_partition *pt,
size_t count
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_status_code esc = RTEMS_SUCCESSFUL;
106c0a: 31 f6 xor %esi,%esi
data += RTEMS_BDPART_MBR_TABLE_ENTRY_SIZE;
}
/* Write extended partition with logical partitions if necessary */
if (ppc != count) {
106c0c: 8b 55 14 mov 0x14(%ebp),%edx
106c0f: 39 55 c4 cmp %edx,-0x3c(%ebp)
106c12: 0f 84 9d 00 00 00 je 106cb5 <rtems_bdpart_write+0x2c9><== NEVER TAKEN
rtems_blkdev_bnum ebr = 0; /* Extended boot record block index */
/* Begin of extended partition */
rtems_blkdev_bnum ep_begin = pt [ppc].begin - record_space;
106c18: 8b 75 b4 mov -0x4c(%ebp),%esi
106c1b: 8b 3e mov (%esi),%edi
106c1d: 2b 7d c0 sub -0x40(%ebp),%edi
/* Write extended partition */
rtems_bdpart_write_mbr_partition(
106c20: 52 push %edx
106c21: 52 push %edx
106c22: 8b 4d dc mov -0x24(%ebp),%ecx
106c25: 29 f9 sub %edi,%ecx
106c27: 6a 00 push $0x0
106c29: 6a 05 push $0x5
106c2b: 89 fa mov %edi,%edx
106c2d: e8 80 fd ff ff call 1069b2 <rtems_bdpart_write_mbr_partition>
RTEMS_BDPART_MBR_EXTENDED,
0
);
/* Write logical partitions */
for (i = ppc; i < count; ++i) {
106c32: 83 c4 10 add $0x10,%esp
106c35: 8b 75 c4 mov -0x3c(%ebp),%esi
106c38: eb 69 jmp 106ca3 <rtems_bdpart_write+0x2b7>
const rtems_bdpart_partition *p = pt + i;
/* Write second partition entry */
if (i > ppc) {
106c3a: 3b 75 c4 cmp -0x3c(%ebp),%esi
106c3d: 76 25 jbe 106c64 <rtems_bdpart_write+0x278>
rtems_blkdev_bnum begin = p->begin - record_space;
106c3f: 8b 13 mov (%ebx),%edx
106c41: 2b 55 c0 sub -0x40(%ebp),%edx
rtems_bdpart_write_mbr_partition(
106c44: 50 push %eax
106c45: 50 push %eax
106c46: 8b 4d dc mov -0x24(%ebp),%ecx
106c49: 29 d1 sub %edx,%ecx
106c4b: 29 fa sub %edi,%edx
block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_1,
106c4d: 8b 45 d8 mov -0x28(%ebp),%eax
/* Write second partition entry */
if (i > ppc) {
rtems_blkdev_bnum begin = p->begin - record_space;
rtems_bdpart_write_mbr_partition(
106c50: 8b 40 1c mov 0x1c(%eax),%eax
106c53: 05 ce 01 00 00 add $0x1ce,%eax
106c58: 6a 00 push $0x0
106c5a: 6a 05 push $0x5
106c5c: e8 51 fd ff ff call 1069b2 <rtems_bdpart_write_mbr_partition>
106c61: 83 c4 10 add $0x10,%esp
0
);
}
/* New EBR */
ebr = p->begin - record_space;
106c64: 8b 13 mov (%ebx),%edx
106c66: 2b 55 c0 sub -0x40(%ebp),%edx
sc = rtems_bdpart_new_record( dd, ebr, &block);
106c69: 8d 4d d8 lea -0x28(%ebp),%ecx
106c6c: 8b 45 e4 mov -0x1c(%ebp),%eax
106c6f: e8 cc fc ff ff call 106940 <rtems_bdpart_new_record>
if (sc != RTEMS_SUCCESSFUL) {
106c74: 85 c0 test %eax,%eax
106c76: 75 3b jne 106cb3 <rtems_bdpart_write+0x2c7><== NEVER TAKEN
esc = sc;
goto cleanup;
}
/* Write first partition entry */
rtems_bdpart_write_mbr_partition(
106c78: 50 push %eax
106c79: 50 push %eax
106c7a: 8b 4b 04 mov 0x4(%ebx),%ecx
106c7d: 2b 0b sub (%ebx),%ecx
block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0,
106c7f: 8b 45 d8 mov -0x28(%ebp),%eax
esc = sc;
goto cleanup;
}
/* Write first partition entry */
rtems_bdpart_write_mbr_partition(
106c82: 8b 40 1c mov 0x1c(%eax),%eax
106c85: 05 be 01 00 00 add $0x1be,%eax
106c8a: 0f b6 53 28 movzbl 0x28(%ebx),%edx
106c8e: 52 push %edx
106c8f: 0f b6 53 08 movzbl 0x8(%ebx),%edx
106c93: 52 push %edx
106c94: 8b 55 c0 mov -0x40(%ebp),%edx
106c97: e8 16 fd ff ff call 1069b2 <rtems_bdpart_write_mbr_partition>
RTEMS_BDPART_MBR_EXTENDED,
0
);
/* Write logical partitions */
for (i = ppc; i < count; ++i) {
106c9c: 46 inc %esi
106c9d: 83 c3 30 add $0x30,%ebx
106ca0: 83 c4 10 add $0x10,%esp
106ca3: 3b 75 14 cmp 0x14(%ebp),%esi
106ca6: 72 92 jb 106c3a <rtems_bdpart_write+0x24e>
const rtems_bdpart_partition *pt,
size_t count
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_status_code esc = RTEMS_SUCCESSFUL;
106ca8: 31 f6 xor %esi,%esi
106caa: eb 09 jmp 106cb5 <rtems_bdpart_write+0x2c9>
* compatibility resides between the partitions. So there have to be gaps of
* the appropriate size between the partitions.
*/
for (i = ppc; i < count; ++i) {
if ((pt [i].begin - pt [i - 1].end) < record_space) {
esc = RTEMS_INVALID_NUMBER;
106cac: be 0a 00 00 00 mov $0xa,%esi <== NOT EXECUTED
106cb1: eb 02 jmp 106cb5 <rtems_bdpart_write+0x2c9><== NOT EXECUTED
}
/* New EBR */
ebr = p->begin - record_space;
sc = rtems_bdpart_new_record( dd, ebr, &block);
if (sc != RTEMS_SUCCESSFUL) {
106cb3: 89 c6 mov %eax,%esi <== NOT EXECUTED
}
}
cleanup:
if (fd >= 0) {
106cb5: 8b 45 e0 mov -0x20(%ebp),%eax
106cb8: 85 c0 test %eax,%eax
106cba: 78 0c js 106cc8 <rtems_bdpart_write+0x2dc><== NEVER TAKEN
close( fd);
106cbc: 83 ec 0c sub $0xc,%esp
106cbf: 50 push %eax
106cc0: e8 33 15 00 00 call 1081f8 <close>
106cc5: 83 c4 10 add $0x10,%esp
}
if (block != NULL) {
106cc8: 8b 45 d8 mov -0x28(%ebp),%eax
106ccb: 85 c0 test %eax,%eax
106ccd: 74 15 je 106ce4 <rtems_bdpart_write+0x2f8><== NEVER TAKEN
rtems_bdbuf_sync( block);
106ccf: 83 ec 0c sub $0xc,%esp
106cd2: 50 push %eax
106cd3: e8 2a a1 00 00 call 110e02 <rtems_bdbuf_sync>
106cd8: 83 c4 10 add $0x10,%esp
106cdb: eb 07 jmp 106ce4 <rtems_bdpart_write+0x2f8>
return RTEMS_SUCCESSFUL;
}
/* Check parameter */
if (format == NULL || pt == NULL) {
return RTEMS_INVALID_ADDRESS;
106cdd: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
106ce2: eb 02 jmp 106ce6 <rtems_bdpart_write+0x2fa><== NOT EXECUTED
if (block != NULL) {
rtems_bdbuf_sync( block);
}
return esc;
106ce4: 89 f0 mov %esi,%eax
}
106ce6: 8d 65 f4 lea -0xc(%ebp),%esp
106ce9: 5b pop %ebx
106cea: 5e pop %esi
106ceb: 5f pop %edi
106cec: 5d pop %ebp
106ced: c3 ret
0010694b <rtems_blkdev_create_partition>:
const char *partition,
const char *device,
rtems_blkdev_bnum block_begin,
rtems_blkdev_bnum block_count
)
{
10694b: 55 push %ebp
10694c: 89 e5 mov %esp,%ebp
10694e: 57 push %edi
10694f: 56 push %esi
106950: 53 push %ebx
106951: 83 ec 64 sub $0x64,%esp
rtems_status_code sc = RTEMS_SUCCESSFUL;
int fd = open(device, O_RDWR);
106954: 6a 02 push $0x2
106956: ff 75 0c pushl 0xc(%ebp)
106959: e8 f6 21 00 00 call 108b54 <open>
10695e: 89 c7 mov %eax,%edi
if (fd >= 0) {
106960: 83 c4 10 add $0x10,%esp
if (sc != RTEMS_SUCCESSFUL) {
close(fd);
}
} else {
sc = RTEMS_INVALID_ID;
106963: bb 04 00 00 00 mov $0x4,%ebx
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
int fd = open(device, O_RDWR);
if (fd >= 0) {
106968: 85 c0 test %eax,%eax
10696a: 0f 88 c3 00 00 00 js 106a33 <rtems_blkdev_create_partition+0xe8>
int rv;
struct stat st;
rv = fstat(fd, &st);
106970: 50 push %eax
106971: 50 push %eax
106972: 8d 45 a0 lea -0x60(%ebp),%eax
106975: 50 push %eax
106976: 57 push %edi
106977: e8 c0 14 00 00 call 107e3c <fstat>
if (rv == 0 && S_ISBLK(st.st_mode)) {
10697c: 83 c4 10 add $0x10,%esp
10697f: 85 c0 test %eax,%eax
106981: 0f 85 9b 00 00 00 jne 106a22 <rtems_blkdev_create_partition+0xd7><== NEVER TAKEN
106987: 8b 45 ac mov -0x54(%ebp),%eax
10698a: 25 00 f0 00 00 and $0xf000,%eax
10698f: b3 15 mov $0x15,%bl
106991: 3d 00 60 00 00 cmp $0x6000,%eax
106996: 0f 85 8b 00 00 00 jne 106a27 <rtems_blkdev_create_partition+0xdc>
static inline int rtems_disk_fd_get_disk_device(
int fd,
rtems_disk_device **dd_ptr
)
{
return ioctl(fd, RTEMS_BLKIO_GETDISKDEV, dd_ptr);
10699c: 50 push %eax
rtems_disk_device *phys_dd;
rv = rtems_disk_fd_get_disk_device(fd, &phys_dd);
10699d: 8d 45 9c lea -0x64(%ebp),%eax
1069a0: 50 push %eax
1069a1: 68 09 42 04 40 push $0x40044209
1069a6: 57 push %edi
1069a7: e8 a0 15 00 00 call 107f4c <ioctl>
if (rv == 0) {
1069ac: 83 c4 10 add $0x10,%esp
}
} else {
sc = RTEMS_NO_MEMORY;
}
} else {
sc = RTEMS_NOT_IMPLEMENTED;
1069af: b3 18 mov $0x18,%bl
rv = fstat(fd, &st);
if (rv == 0 && S_ISBLK(st.st_mode)) {
rtems_disk_device *phys_dd;
rv = rtems_disk_fd_get_disk_device(fd, &phys_dd);
if (rv == 0) {
1069b1: 85 c0 test %eax,%eax
1069b3: 75 72 jne 106a27 <rtems_blkdev_create_partition+0xdc><== NEVER TAKEN
rtems_blkdev_imfs_context *ctx = malloc(sizeof(*ctx));
1069b5: 83 ec 0c sub $0xc,%esp
1069b8: 6a 78 push $0x78
1069ba: e8 1d 19 00 00 call 1082dc <malloc>
1069bf: 89 c6 mov %eax,%esi
if (ctx != NULL) {
1069c1: 83 c4 10 add $0x10,%esp
1069c4: 85 c0 test %eax,%eax
1069c6: 74 53 je 106a1b <rtems_blkdev_create_partition+0xd0><== NEVER TAKEN
sc = rtems_disk_init_log(
1069c8: ff 75 14 pushl 0x14(%ebp)
1069cb: ff 75 10 pushl 0x10(%ebp)
1069ce: ff 75 9c pushl -0x64(%ebp)
1069d1: 50 push %eax
1069d2: e8 fa 01 00 00 call 106bd1 <rtems_disk_init_log>
1069d7: 89 c3 mov %eax,%ebx
phys_dd,
block_begin,
block_count
);
if (sc == RTEMS_SUCCESSFUL) {
1069d9: 83 c4 10 add $0x10,%esp
1069dc: 85 c0 test %eax,%eax
1069de: 75 2d jne 106a0d <rtems_blkdev_create_partition+0xc2><== NEVER TAKEN
ctx->fd = fd;
1069e0: 89 7e 74 mov %edi,0x74(%esi)
rv = IMFS_make_generic_node(
1069e3: 56 push %esi
1069e4: 68 48 2c 12 00 push $0x122c48
1069e9: 68 ff 61 00 00 push $0x61ff
1069ee: ff 75 08 pushl 0x8(%ebp)
1069f1: e8 f7 0b 00 00 call 1075ed <IMFS_make_generic_node>
S_IFBLK | S_IRWXU | S_IRWXG | S_IRWXO,
&rtems_blkdev_imfs_control,
ctx
);
if (rv != 0) {
1069f6: 83 c4 10 add $0x10,%esp
1069f9: 85 c0 test %eax,%eax
1069fb: 74 36 je 106a33 <rtems_blkdev_create_partition+0xe8><== ALWAYS TAKEN
free(ctx);
1069fd: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
106a00: 56 push %esi <== NOT EXECUTED
106a01: e8 be 13 00 00 call 107dc4 <free> <== NOT EXECUTED
106a06: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
sc = RTEMS_UNSATISFIED;
106a09: b3 0d mov $0xd,%bl <== NOT EXECUTED
106a0b: eb 1a jmp 106a27 <rtems_blkdev_create_partition+0xdc><== NOT EXECUTED
}
} else {
free(ctx);
106a0d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
106a10: 56 push %esi <== NOT EXECUTED
106a11: e8 ae 13 00 00 call 107dc4 <free> <== NOT EXECUTED
106a16: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
106a19: eb 0c jmp 106a27 <rtems_blkdev_create_partition+0xdc><== NOT EXECUTED
}
} else {
sc = RTEMS_NO_MEMORY;
106a1b: bb 1a 00 00 00 mov $0x1a,%ebx <== NOT EXECUTED
106a20: eb 05 jmp 106a27 <rtems_blkdev_create_partition+0xdc><== NOT EXECUTED
if (fd >= 0) {
int rv;
struct stat st;
rv = fstat(fd, &st);
if (rv == 0 && S_ISBLK(st.st_mode)) {
106a22: bb 15 00 00 00 mov $0x15,%ebx <== NOT EXECUTED
} else {
sc = RTEMS_INVALID_NODE;
}
if (sc != RTEMS_SUCCESSFUL) {
close(fd);
106a27: 83 ec 0c sub $0xc,%esp
106a2a: 57 push %edi
106a2b: e8 64 11 00 00 call 107b94 <close>
106a30: 83 c4 10 add $0x10,%esp
} else {
sc = RTEMS_INVALID_ID;
}
return sc;
}
106a33: 89 d8 mov %ebx,%eax
106a35: 8d 65 f4 lea -0xc(%ebp),%esp
106a38: 5b pop %ebx
106a39: 5e pop %esi
106a3a: 5f pop %edi
106a3b: 5d pop %ebp
106a3c: c3 ret
00110471 <rtems_blkdev_generic_ioctl>:
rtems_device_driver
rtems_blkdev_generic_ioctl(
rtems_device_major_number major __attribute__((unused)),
rtems_device_minor_number minor __attribute__((unused)),
void * arg)
{
110471: 55 push %ebp
110472: 89 e5 mov %esp,%ebp
110474: 53 push %ebx
110475: 53 push %ebx
110476: 8b 5d 10 mov 0x10(%ebp),%ebx
rtems_libio_ioctl_args_t *args = arg;
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
110479: 8b 03 mov (%ebx),%eax
11047b: 8b 40 2c mov 0x2c(%eax),%eax
if (args->command != RTEMS_BLKIO_REQUEST)
11047e: 8b 53 04 mov 0x4(%ebx),%edx
110481: 81 fa 01 42 18 c0 cmp $0xc0184201,%edx
110487: 74 11 je 11049a <rtems_blkdev_generic_ioctl+0x29><== NEVER TAKEN
{
args->ioctl_return = dd->ioctl(dd,
110489: 51 push %ecx
11048a: ff 73 08 pushl 0x8(%ebx)
11048d: 52 push %edx
11048e: 50 push %eax
11048f: ff 50 38 call *0x38(%eax)
110492: 89 43 0c mov %eax,0xc(%ebx)
110495: 83 c4 10 add $0x10,%esp
110498: eb 07 jmp 1104a1 <rtems_blkdev_generic_ioctl+0x30>
{
/*
* It is not allowed to directly access the driver circumventing the
* cache.
*/
args->ioctl_return = -1;
11049a: c7 43 0c ff ff ff ff movl $0xffffffff,0xc(%ebx) <== NOT EXECUTED
}
return RTEMS_SUCCESSFUL;
}
1104a1: 31 c0 xor %eax,%eax
1104a3: 8b 5d fc mov -0x4(%ebp),%ebx
1104a6: c9 leave
1104a7: c3 ret
00110270 <rtems_blkdev_generic_read>:
rtems_device_driver
rtems_blkdev_generic_read(
rtems_device_major_number major __attribute__((unused)),
rtems_device_minor_number minor __attribute__((unused)),
void * arg)
{
110270: 55 push %ebp
110271: 89 e5 mov %esp,%ebp
110273: 57 push %edi
110274: 56 push %esi
110275: 53 push %ebx
110276: 83 ec 4c sub $0x4c,%esp
110279: 8b 5d 10 mov 0x10(%ebp),%ebx
rtems_status_code rc = RTEMS_SUCCESSFUL;
rtems_libio_rw_args_t *args = arg;
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
11027c: 8b 03 mov (%ebx),%eax
11027e: 8b 40 2c mov 0x2c(%eax),%eax
110281: 89 45 c8 mov %eax,-0x38(%ebp)
uint32_t block_size = dd->block_size;
110284: 8b 40 24 mov 0x24(%eax),%eax
110287: 89 45 c4 mov %eax,-0x3c(%ebp)
char *buf = args->buffer;
11028a: 8b 43 0c mov 0xc(%ebx),%eax
11028d: 89 45 d0 mov %eax,-0x30(%ebp)
uint32_t count = args->count;
110290: 8b 43 10 mov 0x10(%ebx),%eax
110293: 89 45 d4 mov %eax,-0x2c(%ebp)
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);
110296: 8b 73 04 mov 0x4(%ebx),%esi
110299: 8b 7b 08 mov 0x8(%ebx),%edi
11029c: 8b 45 c4 mov -0x3c(%ebp),%eax
11029f: 89 45 b8 mov %eax,-0x48(%ebp)
1102a2: c7 45 bc 00 00 00 00 movl $0x0,-0x44(%ebp)
1102a9: ff 75 bc pushl -0x44(%ebp)
1102ac: ff 75 b8 pushl -0x48(%ebp)
1102af: 57 push %edi
1102b0: 56 push %esi
1102b1: e8 12 03 01 00 call 1205c8 <__divdi3>
1102b6: 83 c4 10 add $0x10,%esp
1102b9: 89 45 cc mov %eax,-0x34(%ebp)
uint32_t blkofs = (uint32_t) (args->offset % block_size);
1102bc: ff 75 bc pushl -0x44(%ebp)
1102bf: ff 75 b8 pushl -0x48(%ebp)
1102c2: 57 push %edi
1102c3: 56 push %esi
1102c4: e8 53 04 01 00 call 12071c <__moddi3>
1102c9: 83 c4 10 add $0x10,%esp
1102cc: 89 c6 mov %eax,%esi
args->bytes_moved = 0;
1102ce: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx)
while (count > 0)
1102d5: eb 57 jmp 11032e <rtems_blkdev_generic_read+0xbe>
{
rtems_bdbuf_buffer *diskbuf;
uint32_t copy;
rc = rtems_bdbuf_read(dd, block, &diskbuf);
1102d7: 50 push %eax
1102d8: 8d 45 e4 lea -0x1c(%ebp),%eax
1102db: 50 push %eax
1102dc: ff 75 cc pushl -0x34(%ebp)
1102df: ff 75 c8 pushl -0x38(%ebp)
1102e2: e8 be f8 ff ff call 10fba5 <rtems_bdbuf_read>
if (rc != RTEMS_SUCCESSFUL)
1102e7: 83 c4 10 add $0x10,%esp
1102ea: 85 c0 test %eax,%eax
1102ec: 75 48 jne 110336 <rtems_blkdev_generic_read+0xc6><== NEVER TAKEN
1102ee: 8b 55 c4 mov -0x3c(%ebp),%edx
1102f1: 29 f2 sub %esi,%edx
1102f3: 3b 55 d4 cmp -0x2c(%ebp),%edx
1102f6: 76 03 jbe 1102fb <rtems_blkdev_generic_read+0x8b><== ALWAYS TAKEN
1102f8: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED
break;
copy = block_size - blkofs;
if (copy > count)
copy = count;
memcpy(buf, (char *)diskbuf->buffer + blkofs, copy);
1102fb: 8b 45 e4 mov -0x1c(%ebp),%eax
1102fe: 03 70 1c add 0x1c(%eax),%esi
110301: 8b 7d d0 mov -0x30(%ebp),%edi
110304: 89 d1 mov %edx,%ecx
110306: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
rc = rtems_bdbuf_release(diskbuf);
110308: 83 ec 0c sub $0xc,%esp
11030b: ff 75 e4 pushl -0x1c(%ebp)
11030e: 89 55 b4 mov %edx,-0x4c(%ebp)
110311: e8 ed f9 ff ff call 10fd03 <rtems_bdbuf_release>
args->bytes_moved += copy;
110316: 8b 55 b4 mov -0x4c(%ebp),%edx
110319: 01 53 18 add %edx,0x18(%ebx)
if (rc != RTEMS_SUCCESSFUL)
11031c: 83 c4 10 add $0x10,%esp
11031f: 85 c0 test %eax,%eax
110321: 75 13 jne 110336 <rtems_blkdev_generic_read+0xc6><== NEVER TAKEN
break;
count -= copy;
110323: 29 55 d4 sub %edx,-0x2c(%ebp)
buf += copy;
110326: 89 7d d0 mov %edi,-0x30(%ebp)
blkofs = 0;
block++;
110329: ff 45 cc incl -0x34(%ebp)
args->bytes_moved += copy;
if (rc != RTEMS_SUCCESSFUL)
break;
count -= copy;
buf += copy;
blkofs = 0;
11032c: 31 f6 xor %esi,%esi
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);
uint32_t blkofs = (uint32_t) (args->offset % block_size);
args->bytes_moved = 0;
while (count > 0)
11032e: 83 7d d4 00 cmpl $0x0,-0x2c(%ebp)
110332: 75 a3 jne 1102d7 <rtems_blkdev_generic_read+0x67>
110334: 31 c0 xor %eax,%eax
blkofs = 0;
block++;
}
return rc;
}
110336: 8d 65 f4 lea -0xc(%ebp),%esp
110339: 5b pop %ebx
11033a: 5e pop %esi
11033b: 5f pop %edi
11033c: 5d pop %ebp
11033d: c3 ret
0011033e <rtems_blkdev_generic_write>:
rtems_device_driver
rtems_blkdev_generic_write(
rtems_device_major_number major __attribute__((unused)),
rtems_device_minor_number minor __attribute__((unused)),
void * arg)
{
11033e: 55 push %ebp
11033f: 89 e5 mov %esp,%ebp
110341: 57 push %edi
110342: 56 push %esi
110343: 53 push %ebx
110344: 83 ec 4c sub $0x4c,%esp
110347: 8b 5d 10 mov 0x10(%ebp),%ebx
rtems_status_code rc = RTEMS_SUCCESSFUL;
rtems_libio_rw_args_t *args = arg;
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
11034a: 8b 03 mov (%ebx),%eax
11034c: 8b 40 2c mov 0x2c(%eax),%eax
11034f: 89 45 c8 mov %eax,-0x38(%ebp)
uint32_t block_size = dd->block_size;
110352: 8b 40 24 mov 0x24(%eax),%eax
110355: 89 45 c4 mov %eax,-0x3c(%ebp)
char *buf = args->buffer;
110358: 8b 43 0c mov 0xc(%ebx),%eax
11035b: 89 45 cc mov %eax,-0x34(%ebp)
uint32_t count = args->count;
11035e: 8b 43 10 mov 0x10(%ebx),%eax
110361: 89 45 d4 mov %eax,-0x2c(%ebp)
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);
110364: 8b 73 04 mov 0x4(%ebx),%esi
110367: 8b 7b 08 mov 0x8(%ebx),%edi
11036a: 8b 45 c4 mov -0x3c(%ebp),%eax
11036d: 89 45 b8 mov %eax,-0x48(%ebp)
110370: c7 45 bc 00 00 00 00 movl $0x0,-0x44(%ebp)
110377: ff 75 bc pushl -0x44(%ebp)
11037a: ff 75 b8 pushl -0x48(%ebp)
11037d: 57 push %edi
11037e: 56 push %esi
11037f: e8 44 02 01 00 call 1205c8 <__divdi3>
110384: 83 c4 10 add $0x10,%esp
110387: 89 45 d0 mov %eax,-0x30(%ebp)
uint32_t blkofs = (uint32_t) (args->offset % block_size);
11038a: ff 75 bc pushl -0x44(%ebp)
11038d: ff 75 b8 pushl -0x48(%ebp)
110390: 57 push %edi
110391: 56 push %esi
110392: e8 85 03 01 00 call 12071c <__moddi3>
110397: 83 c4 10 add $0x10,%esp
11039a: 89 c6 mov %eax,%esi
args->bytes_moved = 0;
11039c: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx)
while (count > 0)
1103a3: eb 79 jmp 11041e <rtems_blkdev_generic_write+0xe0>
{
rtems_bdbuf_buffer *diskbuf;
uint32_t copy;
if ((blkofs == 0) && (count >= block_size))
1103a5: 8b 45 c4 mov -0x3c(%ebp),%eax
1103a8: 39 45 d4 cmp %eax,-0x2c(%ebp)
1103ab: 72 16 jb 1103c3 <rtems_blkdev_generic_write+0x85><== NEVER TAKEN
1103ad: 85 f6 test %esi,%esi
1103af: 75 12 jne 1103c3 <rtems_blkdev_generic_write+0x85><== NEVER TAKEN
rc = rtems_bdbuf_get(dd, block, &diskbuf);
1103b1: 51 push %ecx
1103b2: 8d 45 e4 lea -0x1c(%ebp),%eax
1103b5: 50 push %eax
1103b6: ff 75 d0 pushl -0x30(%ebp)
1103b9: ff 75 c8 pushl -0x38(%ebp)
1103bc: e8 48 f7 ff ff call 10fb09 <rtems_bdbuf_get>
1103c1: eb 10 jmp 1103d3 <rtems_blkdev_generic_write+0x95>
else
rc = rtems_bdbuf_read(dd, block, &diskbuf);
1103c3: 52 push %edx <== NOT EXECUTED
1103c4: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED
1103c7: 50 push %eax <== NOT EXECUTED
1103c8: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED
1103cb: ff 75 c8 pushl -0x38(%ebp) <== NOT EXECUTED
1103ce: e8 d2 f7 ff ff call 10fba5 <rtems_bdbuf_read> <== NOT EXECUTED
1103d3: 83 c4 10 add $0x10,%esp
if (rc != RTEMS_SUCCESSFUL)
1103d6: 85 c0 test %eax,%eax
1103d8: 75 4c jne 110426 <rtems_blkdev_generic_write+0xe8><== NEVER TAKEN
1103da: 8b 55 c4 mov -0x3c(%ebp),%edx
1103dd: 29 f2 sub %esi,%edx
1103df: 3b 55 d4 cmp -0x2c(%ebp),%edx
1103e2: 76 03 jbe 1103e7 <rtems_blkdev_generic_write+0xa9><== ALWAYS TAKEN
1103e4: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED
break;
copy = block_size - blkofs;
if (copy > count)
copy = count;
memcpy((char *)diskbuf->buffer + blkofs, buf, copy);
1103e7: 8b 45 e4 mov -0x1c(%ebp),%eax
1103ea: 8b 40 1c mov 0x1c(%eax),%eax
1103ed: 01 f0 add %esi,%eax
1103ef: 89 c7 mov %eax,%edi
1103f1: 8b 75 cc mov -0x34(%ebp),%esi
1103f4: 89 d1 mov %edx,%ecx
1103f6: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
args->bytes_moved += copy;
1103f8: 01 53 18 add %edx,0x18(%ebx)
rc = rtems_bdbuf_release_modified(diskbuf);
1103fb: 83 ec 0c sub $0xc,%esp
1103fe: ff 75 e4 pushl -0x1c(%ebp)
110401: 89 55 b4 mov %edx,-0x4c(%ebp)
110404: e8 8b f9 ff ff call 10fd94 <rtems_bdbuf_release_modified>
if (rc != RTEMS_SUCCESSFUL)
110409: 83 c4 10 add $0x10,%esp
11040c: 85 c0 test %eax,%eax
11040e: 8b 55 b4 mov -0x4c(%ebp),%edx
110411: 75 13 jne 110426 <rtems_blkdev_generic_write+0xe8><== NEVER TAKEN
break;
count -= copy;
110413: 29 55 d4 sub %edx,-0x2c(%ebp)
buf += copy;
110416: 89 75 cc mov %esi,-0x34(%ebp)
blkofs = 0;
block++;
110419: ff 45 d0 incl -0x30(%ebp)
if (rc != RTEMS_SUCCESSFUL)
break;
count -= copy;
buf += copy;
blkofs = 0;
11041c: 31 f6 xor %esi,%esi
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);
uint32_t blkofs = (uint32_t) (args->offset % block_size);
args->bytes_moved = 0;
while (count > 0)
11041e: 83 7d d4 00 cmpl $0x0,-0x2c(%ebp)
110422: 75 81 jne 1103a5 <rtems_blkdev_generic_write+0x67>
110424: 31 c0 xor %eax,%eax
blkofs = 0;
block++;
}
return rc;
}
110426: 8d 65 f4 lea -0xc(%ebp),%esp
110429: 5b pop %ebx
11042a: 5e pop %esi
11042b: 5f pop %edi
11042c: 5d pop %ebp
11042d: c3 ret
00106866 <rtems_blkdev_imfs_fsync_or_fdatasync>:
}
static int rtems_blkdev_imfs_fsync_or_fdatasync(
rtems_libio_t *iop
)
{
106866: 55 push %ebp <== NOT EXECUTED
106867: 89 e5 mov %esp,%ebp <== NOT EXECUTED
106869: 83 ec 14 sub $0x14,%esp <== NOT EXECUTED
} else {
sc = RTEMS_INVALID_ID;
}
return sc;
}
10686c: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
10686f: 8b 40 18 mov 0x18(%eax),%eax <== NOT EXECUTED
)
{
int rv = 0;
rtems_blkdev_imfs_context *ctx = IMFS_generic_get_context_by_iop(iop);
rtems_disk_device *dd = &ctx->dd;
rtems_status_code sc = rtems_bdbuf_syncdev(dd);
106872: ff 70 50 pushl 0x50(%eax) <== NOT EXECUTED
106875: e8 09 a0 00 00 call 110883 <rtems_bdbuf_syncdev> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
10687a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
static int rtems_blkdev_imfs_fsync_or_fdatasync(
rtems_libio_t *iop
)
{
int rv = 0;
10687d: 31 d2 xor %edx,%edx <== NOT EXECUTED
rtems_blkdev_imfs_context *ctx = IMFS_generic_get_context_by_iop(iop);
rtems_disk_device *dd = &ctx->dd;
rtems_status_code sc = rtems_bdbuf_syncdev(dd);
if (sc != RTEMS_SUCCESSFUL) {
10687f: 85 c0 test %eax,%eax <== NOT EXECUTED
106881: 74 0e je 106891 <rtems_blkdev_imfs_fsync_or_fdatasync+0x2b><== NOT EXECUTED
errno = EIO;
106883: e8 9c df 00 00 call 114824 <__errno> <== NOT EXECUTED
106888: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
10688e: 83 ca ff or $0xffffffff,%edx <== NOT EXECUTED
rv = -1;
}
return rv;
}
106891: 89 d0 mov %edx,%eax <== NOT EXECUTED
106893: c9 leave <== NOT EXECUTED
106894: c3 ret <== NOT EXECUTED
00106895 <rtems_blkdev_imfs_ioctl>:
static int rtems_blkdev_imfs_ioctl(
rtems_libio_t *iop,
uint32_t request,
void *buffer
)
{
106895: 55 push %ebp
106896: 89 e5 mov %esp,%ebp
106898: 83 ec 08 sub $0x8,%esp
10689b: 8b 45 08 mov 0x8(%ebp),%eax
10689e: 8b 55 0c mov 0xc(%ebp),%edx
int rv = 0;
if (request != RTEMS_BLKIO_REQUEST) {
1068a1: 81 fa 01 42 18 c0 cmp $0xc0184201,%edx
1068a7: 74 0f je 1068b8 <rtems_blkdev_imfs_ioctl+0x23><== NEVER TAKEN
} else {
sc = RTEMS_INVALID_ID;
}
return sc;
}
1068a9: 8b 40 18 mov 0x18(%eax),%eax
1068ac: 8b 40 50 mov 0x50(%eax),%eax
if (request != RTEMS_BLKIO_REQUEST) {
rtems_blkdev_imfs_context *ctx = IMFS_generic_get_context_by_iop(iop);
rtems_disk_device *dd = &ctx->dd;
rv = (*dd->ioctl)(dd, request, buffer);
1068af: 89 45 08 mov %eax,0x8(%ebp)
1068b2: 8b 40 38 mov 0x38(%eax),%eax
errno = EINVAL;
rv = -1;
}
return rv;
}
1068b5: c9 leave
if (request != RTEMS_BLKIO_REQUEST) {
rtems_blkdev_imfs_context *ctx = IMFS_generic_get_context_by_iop(iop);
rtems_disk_device *dd = &ctx->dd;
rv = (*dd->ioctl)(dd, request, buffer);
1068b6: ff e0 jmp *%eax
} else {
/*
* It is not allowed to directly access the driver circumventing the cache.
*/
errno = EINVAL;
1068b8: e8 67 df 00 00 call 114824 <__errno> <== NOT EXECUTED
1068bd: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
rv = -1;
}
return rv;
}
1068c3: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
1068c6: c9 leave <== NOT EXECUTED
1068c7: c3 ret <== NOT EXECUTED
00106725 <rtems_blkdev_imfs_read>:
static ssize_t rtems_blkdev_imfs_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
106725: 55 push %ebp
106726: 89 e5 mov %esp,%ebp
106728: 57 push %edi
106729: 56 push %esi
10672a: 53 push %ebx
10672b: 83 ec 3c sub $0x3c,%esp
} else {
sc = RTEMS_INVALID_ID;
}
return sc;
}
10672e: 8b 55 08 mov 0x8(%ebp),%edx
106731: 8b 42 18 mov 0x18(%edx),%eax
106734: 8b 40 50 mov 0x50(%eax),%eax
106737: 89 45 c8 mov %eax,-0x38(%ebp)
{
int rv;
rtems_blkdev_imfs_context *ctx = IMFS_generic_get_context_by_iop(iop);
rtems_disk_device *dd = &ctx->dd;
ssize_t remaining = (ssize_t) count;
off_t offset = iop->offset;
10673a: 8b 72 04 mov 0x4(%edx),%esi
10673d: 8b 7a 08 mov 0x8(%edx),%edi
ssize_t block_size = (ssize_t) rtems_disk_get_block_size(dd);
106740: 8b 40 24 mov 0x24(%eax),%eax
106743: 89 45 c4 mov %eax,-0x3c(%ebp)
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (offset / block_size);
106746: 99 cltd
106747: 89 d3 mov %edx,%ebx
106749: 52 push %edx
10674a: 50 push %eax
10674b: 57 push %edi
10674c: 56 push %esi
10674d: 89 45 c0 mov %eax,-0x40(%ebp)
106750: e8 53 a4 01 00 call 120ba8 <__divdi3>
106755: 83 c4 10 add $0x10,%esp
106758: 89 45 d0 mov %eax,-0x30(%ebp)
ssize_t block_offset = (ssize_t) (offset % block_size);
10675b: 8b 4d c0 mov -0x40(%ebp),%ecx
10675e: 53 push %ebx
10675f: 51 push %ecx
106760: 57 push %edi
106761: 56 push %esi
106762: e8 95 a5 01 00 call 120cfc <__moddi3>
106767: 83 c4 10 add $0x10,%esp
10676a: 89 c6 mov %eax,%esi
char *dst = buffer;
10676c: 8b 55 0c mov 0xc(%ebp),%edx
10676f: 89 55 cc mov %edx,-0x34(%ebp)
)
{
int rv;
rtems_blkdev_imfs_context *ctx = IMFS_generic_get_context_by_iop(iop);
rtems_disk_device *dd = &ctx->dd;
ssize_t remaining = (ssize_t) count;
106772: 8b 5d 10 mov 0x10(%ebp),%ebx
ssize_t block_size = (ssize_t) rtems_disk_get_block_size(dd);
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (offset / block_size);
ssize_t block_offset = (ssize_t) (offset % block_size);
char *dst = buffer;
while (remaining > 0) {
106775: eb 4f jmp 1067c6 <rtems_blkdev_imfs_read+0xa1>
rtems_bdbuf_buffer *bd;
rtems_status_code sc = rtems_bdbuf_read(dd, block, &bd);
106777: 51 push %ecx
106778: 8d 4d e4 lea -0x1c(%ebp),%ecx
10677b: 51 push %ecx
10677c: ff 75 d0 pushl -0x30(%ebp)
10677f: ff 75 c8 pushl -0x38(%ebp)
106782: e8 da 9d 00 00 call 110561 <rtems_bdbuf_read>
if (sc == RTEMS_SUCCESSFUL) {
106787: 83 c4 10 add $0x10,%esp
10678a: 85 c0 test %eax,%eax
10678c: 75 52 jne 1067e0 <rtems_blkdev_imfs_read+0xbb><== NEVER TAKEN
10678e: 8b 45 c4 mov -0x3c(%ebp),%eax
106791: 29 f0 sub %esi,%eax
106793: 89 45 d4 mov %eax,-0x2c(%ebp)
106796: 39 d8 cmp %ebx,%eax
106798: 7e 03 jle 10679d <rtems_blkdev_imfs_read+0x78>
10679a: 89 5d d4 mov %ebx,-0x2c(%ebp)
if (copy > remaining) {
copy = remaining;
}
memcpy(dst, (char *) bd->buffer + block_offset, (size_t) copy);
10679d: 8b 55 e4 mov -0x1c(%ebp),%edx
1067a0: 03 72 1c add 0x1c(%edx),%esi
1067a3: 8b 7d cc mov -0x34(%ebp),%edi
1067a6: 8b 4d d4 mov -0x2c(%ebp),%ecx
1067a9: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
sc = rtems_bdbuf_release(bd);
1067ab: 83 ec 0c sub $0xc,%esp
1067ae: 52 push %edx
1067af: e8 0b 9f 00 00 call 1106bf <rtems_bdbuf_release>
if (sc == RTEMS_SUCCESSFUL) {
1067b4: 83 c4 10 add $0x10,%esp
1067b7: 85 c0 test %eax,%eax
1067b9: 75 25 jne 1067e0 <rtems_blkdev_imfs_read+0xbb><== NEVER TAKEN
block_offset = 0;
remaining -= copy;
1067bb: 2b 5d d4 sub -0x2c(%ebp),%ebx
dst += copy;
1067be: 89 7d cc mov %edi,-0x34(%ebp)
++block;
1067c1: ff 45 d0 incl -0x30(%ebp)
memcpy(dst, (char *) bd->buffer + block_offset, (size_t) copy);
sc = rtems_bdbuf_release(bd);
if (sc == RTEMS_SUCCESSFUL) {
block_offset = 0;
1067c4: 31 f6 xor %esi,%esi
ssize_t block_size = (ssize_t) rtems_disk_get_block_size(dd);
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (offset / block_size);
ssize_t block_offset = (ssize_t) (offset % block_size);
char *dst = buffer;
while (remaining > 0) {
1067c6: 83 fb 00 cmp $0x0,%ebx
1067c9: 7f ac jg 106777 <rtems_blkdev_imfs_read+0x52>
} else {
remaining = -1;
}
}
if (remaining >= 0) {
1067cb: 75 13 jne 1067e0 <rtems_blkdev_imfs_read+0xbb><== NEVER TAKEN
iop->offset += count;
1067cd: 8b 45 10 mov 0x10(%ebp),%eax
1067d0: 31 d2 xor %edx,%edx
1067d2: 8b 4d 08 mov 0x8(%ebp),%ecx
1067d5: 01 41 04 add %eax,0x4(%ecx)
1067d8: 11 51 08 adc %edx,0x8(%ecx)
rv = (ssize_t) count;
1067db: 8b 45 10 mov 0x10(%ebp),%eax
1067de: eb 0e jmp 1067ee <rtems_blkdev_imfs_read+0xc9>
} else {
errno = EIO;
1067e0: e8 3f e0 00 00 call 114824 <__errno> <== NOT EXECUTED
1067e5: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
rv = -1;
1067eb: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
}
return rv;
}
1067ee: 8d 65 f4 lea -0xc(%ebp),%esp
1067f1: 5b pop %ebx
1067f2: 5e pop %esi
1067f3: 5f pop %edi
1067f4: 5d pop %ebp
1067f5: c3 ret
0010663c <rtems_blkdev_imfs_write>:
static ssize_t rtems_blkdev_imfs_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
10663c: 55 push %ebp
10663d: 89 e5 mov %esp,%ebp
10663f: 57 push %edi
106640: 56 push %esi
106641: 53 push %ebx
106642: 83 ec 2c sub $0x2c,%esp
} else {
sc = RTEMS_INVALID_ID;
}
return sc;
}
106645: 8b 55 08 mov 0x8(%ebp),%edx
106648: 8b 42 18 mov 0x18(%edx),%eax
10664b: 8b 40 50 mov 0x50(%eax),%eax
10664e: 89 45 d0 mov %eax,-0x30(%ebp)
{
int rv;
rtems_blkdev_imfs_context *ctx = IMFS_generic_get_context_by_iop(iop);
rtems_disk_device *dd = &ctx->dd;
ssize_t remaining = (ssize_t) count;
off_t offset = iop->offset;
106651: 8b 72 04 mov 0x4(%edx),%esi
106654: 8b 7a 08 mov 0x8(%edx),%edi
ssize_t block_size = (ssize_t) rtems_disk_get_block_size(dd);
106657: 8b 40 24 mov 0x24(%eax),%eax
10665a: 89 45 cc mov %eax,-0x34(%ebp)
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (offset / block_size);
10665d: 99 cltd
10665e: 89 d3 mov %edx,%ebx
106660: 52 push %edx
106661: 50 push %eax
106662: 57 push %edi
106663: 56 push %esi
106664: 89 45 c8 mov %eax,-0x38(%ebp)
106667: e8 3c a5 01 00 call 120ba8 <__divdi3>
10666c: 83 c4 10 add $0x10,%esp
10666f: 89 45 d4 mov %eax,-0x2c(%ebp)
ssize_t block_offset = (ssize_t) (offset % block_size);
106672: 8b 4d c8 mov -0x38(%ebp),%ecx
106675: 53 push %ebx
106676: 51 push %ecx
106677: 57 push %edi
106678: 56 push %esi
106679: e8 7e a6 01 00 call 120cfc <__moddi3>
10667e: 83 c4 10 add $0x10,%esp
106681: 89 c7 mov %eax,%edi
const char *src = buffer;
106683: 8b 75 0c mov 0xc(%ebp),%esi
)
{
int rv;
rtems_blkdev_imfs_context *ctx = IMFS_generic_get_context_by_iop(iop);
rtems_disk_device *dd = &ctx->dd;
ssize_t remaining = (ssize_t) count;
106686: 8b 5d 10 mov 0x10(%ebp),%ebx
ssize_t block_size = (ssize_t) rtems_disk_get_block_size(dd);
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (offset / block_size);
ssize_t block_offset = (ssize_t) (offset % block_size);
const char *src = buffer;
while (remaining > 0) {
106689: eb 6a jmp 1066f5 <rtems_blkdev_imfs_write+0xb9>
rtems_status_code sc;
rtems_bdbuf_buffer *bd;
if (block_offset == 0 && remaining >= block_size) {
10668b: 3b 5d cc cmp -0x34(%ebp),%ebx
10668e: 7c 16 jl 1066a6 <rtems_blkdev_imfs_write+0x6a>
106690: 85 ff test %edi,%edi
106692: 75 12 jne 1066a6 <rtems_blkdev_imfs_write+0x6a>
sc = rtems_bdbuf_get(dd, block, &bd);
106694: 52 push %edx
106695: 8d 55 e4 lea -0x1c(%ebp),%edx
106698: 52 push %edx
106699: ff 75 d4 pushl -0x2c(%ebp)
10669c: ff 75 d0 pushl -0x30(%ebp)
10669f: e8 21 9e 00 00 call 1104c5 <rtems_bdbuf_get>
1066a4: eb 10 jmp 1066b6 <rtems_blkdev_imfs_write+0x7a>
} else {
sc = rtems_bdbuf_read(dd, block, &bd);
1066a6: 50 push %eax
1066a7: 8d 4d e4 lea -0x1c(%ebp),%ecx
1066aa: 51 push %ecx
1066ab: ff 75 d4 pushl -0x2c(%ebp)
1066ae: ff 75 d0 pushl -0x30(%ebp)
1066b1: e8 ab 9e 00 00 call 110561 <rtems_bdbuf_read>
1066b6: 83 c4 10 add $0x10,%esp
}
if (sc == RTEMS_SUCCESSFUL) {
1066b9: 85 c0 test %eax,%eax
1066bb: 75 52 jne 10670f <rtems_blkdev_imfs_write+0xd3><== NEVER TAKEN
1066bd: 8b 55 cc mov -0x34(%ebp),%edx
1066c0: 29 fa sub %edi,%edx
1066c2: 39 da cmp %ebx,%edx
1066c4: 7e 02 jle 1066c8 <rtems_blkdev_imfs_write+0x8c>
1066c6: 89 da mov %ebx,%edx
if (copy > remaining) {
copy = remaining;
}
memcpy((char *) bd->buffer + block_offset, src, (size_t) copy);
1066c8: 8b 45 e4 mov -0x1c(%ebp),%eax
1066cb: 8b 40 1c mov 0x1c(%eax),%eax
1066ce: 01 f8 add %edi,%eax
1066d0: 89 c7 mov %eax,%edi
1066d2: 89 d1 mov %edx,%ecx
1066d4: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
sc = rtems_bdbuf_release_modified(bd);
1066d6: 83 ec 0c sub $0xc,%esp
1066d9: ff 75 e4 pushl -0x1c(%ebp)
1066dc: 89 55 c8 mov %edx,-0x38(%ebp)
1066df: e8 6c a0 00 00 call 110750 <rtems_bdbuf_release_modified>
if (sc == RTEMS_SUCCESSFUL) {
1066e4: 83 c4 10 add $0x10,%esp
1066e7: 85 c0 test %eax,%eax
1066e9: 8b 55 c8 mov -0x38(%ebp),%edx
1066ec: 75 21 jne 10670f <rtems_blkdev_imfs_write+0xd3><== NEVER TAKEN
block_offset = 0;
remaining -= copy;
1066ee: 29 d3 sub %edx,%ebx
src += copy;
++block;
1066f0: ff 45 d4 incl -0x2c(%ebp)
memcpy((char *) bd->buffer + block_offset, src, (size_t) copy);
sc = rtems_bdbuf_release_modified(bd);
if (sc == RTEMS_SUCCESSFUL) {
block_offset = 0;
1066f3: 31 ff xor %edi,%edi
ssize_t block_size = (ssize_t) rtems_disk_get_block_size(dd);
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (offset / block_size);
ssize_t block_offset = (ssize_t) (offset % block_size);
const char *src = buffer;
while (remaining > 0) {
1066f5: 83 fb 00 cmp $0x0,%ebx
1066f8: 7f 91 jg 10668b <rtems_blkdev_imfs_write+0x4f>
} else {
remaining = -1;
}
}
if (remaining >= 0) {
1066fa: 75 13 jne 10670f <rtems_blkdev_imfs_write+0xd3><== NEVER TAKEN
iop->offset += count;
1066fc: 8b 45 10 mov 0x10(%ebp),%eax
1066ff: 31 d2 xor %edx,%edx
106701: 8b 4d 08 mov 0x8(%ebp),%ecx
106704: 01 41 04 add %eax,0x4(%ecx)
106707: 11 51 08 adc %edx,0x8(%ecx)
rv = (ssize_t) count;
10670a: 8b 45 10 mov 0x10(%ebp),%eax
10670d: eb 0e jmp 10671d <rtems_blkdev_imfs_write+0xe1>
} else {
errno = EIO;
10670f: e8 10 e1 00 00 call 114824 <__errno> <== NOT EXECUTED
106714: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
rv = -1;
10671a: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
}
return rv;
}
10671d: 8d 65 f4 lea -0xc(%ebp),%esp
106720: 5b pop %ebx
106721: 5e pop %esi
106722: 5f pop %edi
106723: 5d pop %ebp
106724: c3 ret
00110188 <rtems_blkdev_ioctl>:
#include <rtems/blkdev.h>
#include <rtems/bdbuf.h>
int
rtems_blkdev_ioctl(rtems_disk_device *dd, uint32_t req, void *argp)
{
110188: 55 push %ebp
110189: 89 e5 mov %esp,%ebp
11018b: 83 ec 08 sub $0x8,%esp
11018e: 8b 45 08 mov 0x8(%ebp),%eax
110191: 8b 55 0c mov 0xc(%ebp),%edx
110194: 8b 4d 10 mov 0x10(%ebp),%ecx
rtems_status_code sc;
int rc = 0;
switch (req)
110197: 81 fa 03 42 04 40 cmp $0x40044203,%edx
11019d: 74 63 je 110202 <rtems_blkdev_ioctl+0x7a>
11019f: 77 36 ja 1101d7 <rtems_blkdev_ioctl+0x4f>
1101a1: 81 fa 0a 42 00 20 cmp $0x2000420a,%edx
1101a7: 0f 84 8c 00 00 00 je 110239 <rtems_blkdev_ioctl+0xb1>
1101ad: 77 0e ja 1101bd <rtems_blkdev_ioctl+0x35>
1101af: 81 fa 06 42 00 20 cmp $0x20004206,%edx
1101b5: 0f 85 a4 00 00 00 jne 11025f <rtems_blkdev_ioctl+0xd7>
1101bb: eb 5b jmp 110218 <rtems_blkdev_ioctl+0x90>
1101bd: 81 fa 0c 42 00 20 cmp $0x2000420c,%edx
1101c3: 0f 84 86 00 00 00 je 11024f <rtems_blkdev_ioctl+0xc7><== NEVER TAKEN
1101c9: 81 fa 02 42 04 40 cmp $0x40044202,%edx
1101cf: 0f 85 8a 00 00 00 jne 11025f <rtems_blkdev_ioctl+0xd7><== NEVER TAKEN
1101d5: eb 26 jmp 1101fd <rtems_blkdev_ioctl+0x75>
1101d7: 81 fa 09 42 04 40 cmp $0x40044209,%edx
1101dd: 74 56 je 110235 <rtems_blkdev_ioctl+0xad>
1101df: 77 0a ja 1101eb <rtems_blkdev_ioctl+0x63>
1101e1: 81 fa 05 42 04 40 cmp $0x40044205,%edx
1101e7: 75 76 jne 11025f <rtems_blkdev_ioctl+0xd7><== NEVER TAKEN
1101e9: eb 28 jmp 110213 <rtems_blkdev_ioctl+0x8b>
1101eb: 81 fa 0b 42 04 40 cmp $0x4004420b,%edx
1101f1: 74 51 je 110244 <rtems_blkdev_ioctl+0xbc><== NEVER TAKEN
1101f3: 81 fa 04 42 04 80 cmp $0x80044204,%edx
1101f9: 75 64 jne 11025f <rtems_blkdev_ioctl+0xd7><== NEVER TAKEN
1101fb: eb 0a jmp 110207 <rtems_blkdev_ioctl+0x7f>
{
case RTEMS_BLKIO_GETMEDIABLKSIZE:
*(uint32_t *) argp = dd->media_block_size;
1101fd: 8b 40 20 mov 0x20(%eax),%eax
110200: eb 33 jmp 110235 <rtems_blkdev_ioctl+0xad>
break;
case RTEMS_BLKIO_GETBLKSIZE:
*(uint32_t *) argp = dd->block_size;
110202: 8b 40 24 mov 0x24(%eax),%eax
110205: eb 2e jmp 110235 <rtems_blkdev_ioctl+0xad>
break;
case RTEMS_BLKIO_SETBLKSIZE:
sc = rtems_bdbuf_set_block_size(dd, *(uint32_t *) argp);
110207: 52 push %edx
110208: 52 push %edx
110209: ff 31 pushl (%ecx)
11020b: 50 push %eax
11020c: e8 67 fe ff ff call 110078 <rtems_bdbuf_set_block_size>
110211: eb 0e jmp 110221 <rtems_blkdev_ioctl+0x99>
rc = -1;
}
break;
case RTEMS_BLKIO_GETSIZE:
*(rtems_blkdev_bnum *) argp = dd->size;
110213: 8b 40 1c mov 0x1c(%eax),%eax
110216: eb 1d jmp 110235 <rtems_blkdev_ioctl+0xad>
break;
case RTEMS_BLKIO_SYNCDEV:
sc = rtems_bdbuf_syncdev(dd);
110218: 83 ec 0c sub $0xc,%esp
11021b: 50 push %eax
11021c: e8 a6 fc ff ff call 10fec7 <rtems_bdbuf_syncdev>
if (sc != RTEMS_SUCCESSFUL) {
110221: 83 c4 10 add $0x10,%esp
110224: 85 c0 test %eax,%eax
110226: 74 33 je 11025b <rtems_blkdev_ioctl+0xd3><== ALWAYS TAKEN
errno = EIO;
110228: e8 ef 40 00 00 call 11431c <__errno> <== NOT EXECUTED
11022d: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
110233: eb 35 jmp 11026a <rtems_blkdev_ioctl+0xe2><== NOT EXECUTED
rc = -1;
}
break;
case RTEMS_BLKIO_GETDISKDEV:
*(rtems_disk_device **) argp = dd;
110235: 89 01 mov %eax,(%ecx)
110237: eb 22 jmp 11025b <rtems_blkdev_ioctl+0xd3>
break;
case RTEMS_BLKIO_PURGEDEV:
rtems_bdbuf_purge_dev(dd);
110239: 83 ec 0c sub $0xc,%esp
11023c: 50 push %eax
11023d: e8 df fc ff ff call 10ff21 <rtems_bdbuf_purge_dev>
110242: eb 14 jmp 110258 <rtems_blkdev_ioctl+0xd0>
break;
case RTEMS_BLKIO_GETDEVSTATS:
rtems_bdbuf_get_device_stats(dd, (rtems_blkdev_stats *) argp);
110244: 52 push %edx <== NOT EXECUTED
110245: 52 push %edx <== NOT EXECUTED
110246: 51 push %ecx <== NOT EXECUTED
110247: 50 push %eax <== NOT EXECUTED
110248: e8 eb fe ff ff call 110138 <rtems_bdbuf_get_device_stats><== NOT EXECUTED
11024d: eb 09 jmp 110258 <rtems_blkdev_ioctl+0xd0><== NOT EXECUTED
break;
case RTEMS_BLKIO_RESETDEVSTATS:
rtems_bdbuf_reset_device_stats(dd);
11024f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
110252: 50 push %eax <== NOT EXECUTED
110253: e8 0c ff ff ff call 110164 <rtems_bdbuf_reset_device_stats><== NOT EXECUTED
break;
110258: 83 c4 10 add $0x10,%esp
int
rtems_blkdev_ioctl(rtems_disk_device *dd, uint32_t req, void *argp)
{
rtems_status_code sc;
int rc = 0;
11025b: 31 c0 xor %eax,%eax
rtems_bdbuf_get_device_stats(dd, (rtems_blkdev_stats *) argp);
break;
case RTEMS_BLKIO_RESETDEVSTATS:
rtems_bdbuf_reset_device_stats(dd);
break;
11025d: eb 0e jmp 11026d <rtems_blkdev_ioctl+0xe5>
default:
errno = EINVAL;
11025f: e8 b8 40 00 00 call 11431c <__errno>
110264: c7 00 16 00 00 00 movl $0x16,(%eax)
rc = -1;
11026a: 83 c8 ff or $0xffffffff,%eax
break;
}
return rc;
}
11026d: c9 leave
11026e: c3 ret
00120760 <rtems_blkstats>:
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
void rtems_blkstats(FILE *output, const char *device, bool reset)
{
120760: 55 push %ebp <== NOT EXECUTED
120761: 89 e5 mov %esp,%ebp <== NOT EXECUTED
120763: 57 push %edi <== NOT EXECUTED
120764: 56 push %esi <== NOT EXECUTED
120765: 53 push %ebx <== NOT EXECUTED
120766: 81 ec 94 00 00 00 sub $0x94,%esp <== NOT EXECUTED
12076c: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
12076f: 8a 45 10 mov 0x10(%ebp),%al <== NOT EXECUTED
120772: 88 85 77 ff ff ff mov %al,-0x89(%ebp) <== NOT EXECUTED
int fd = open(device, O_RDONLY);
120778: 6a 00 push $0x0 <== NOT EXECUTED
12077a: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
12077d: e8 0a 69 fe ff call 10708c <open> <== NOT EXECUTED
120782: 89 c6 mov %eax,%esi <== NOT EXECUTED
if (fd >= 0) {
120784: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
120787: 85 c0 test %eax,%eax <== NOT EXECUTED
120789: 0f 88 fb 00 00 00 js 12088a <rtems_blkstats+0x12a> <== NOT EXECUTED
struct stat st;
int rv;
rv = fstat(fd, &st);
12078f: 50 push %eax <== NOT EXECUTED
120790: 50 push %eax <== NOT EXECUTED
120791: 8d 45 a0 lea -0x60(%ebp),%eax <== NOT EXECUTED
120794: 50 push %eax <== NOT EXECUTED
120795: 56 push %esi <== NOT EXECUTED
120796: e8 35 16 00 00 call 121dd0 <fstat> <== NOT EXECUTED
if (rv == 0) {
12079b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12079e: 85 c0 test %eax,%eax <== NOT EXECUTED
1207a0: 0f 85 99 00 00 00 jne 12083f <rtems_blkstats+0xdf> <== NOT EXECUTED
if (S_ISBLK(st.st_mode)) {
1207a6: 8b 45 ac mov -0x54(%ebp),%eax <== NOT EXECUTED
1207a9: 25 00 f0 00 00 and $0xf000,%eax <== NOT EXECUTED
1207ae: 3d 00 60 00 00 cmp $0x6000,%eax <== NOT EXECUTED
1207b3: 75 7b jne 120830 <rtems_blkstats+0xd0> <== NOT EXECUTED
if (reset) {
1207b5: 80 bd 77 ff ff ff 00 cmpb $0x0,-0x89(%ebp) <== NOT EXECUTED
1207bc: 74 32 je 1207f0 <rtems_blkstats+0x90> <== NOT EXECUTED
return ioctl(fd, RTEMS_BLKIO_GETDEVSTATS, stats);
}
static inline int rtems_disk_fd_reset_device_stats(int fd)
{
return ioctl(fd, RTEMS_BLKIO_RESETDEVSTATS);
1207be: 57 push %edi <== NOT EXECUTED
1207bf: 57 push %edi <== NOT EXECUTED
1207c0: 68 0c 42 00 20 push $0x2000420c <== NOT EXECUTED
1207c5: 56 push %esi <== NOT EXECUTED
1207c6: e8 f1 ed fe ff call 10f5bc <ioctl> <== NOT EXECUTED
rv = rtems_disk_fd_reset_device_stats(fd);
if (rv != 0) {
1207cb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1207ce: 85 c0 test %eax,%eax <== NOT EXECUTED
1207d0: 0f 84 8a 00 00 00 je 120860 <rtems_blkstats+0x100> <== NOT EXECUTED
fprintf(output, "error: reset stats: %s\n", strerror(errno));
1207d6: e8 ad 06 01 00 call 130e88 <__errno> <== NOT EXECUTED
1207db: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1207de: ff 30 pushl (%eax) <== NOT EXECUTED
1207e0: e8 af 67 01 00 call 136f94 <strerror> <== NOT EXECUTED
1207e5: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
1207e8: 50 push %eax <== NOT EXECUTED
1207e9: 68 a4 fc 14 00 push $0x14fca4 <== NOT EXECUTED
1207ee: eb 67 jmp 120857 <rtems_blkstats+0xf7> <== NOT EXECUTED
static inline int rtems_disk_fd_get_device_stats(
int fd,
rtems_blkdev_stats *stats
)
{
return ioctl(fd, RTEMS_BLKIO_GETDEVSTATS, stats);
1207f0: 51 push %ecx <== NOT EXECUTED
}
} else {
rtems_blkdev_stats stats;
rv = rtems_disk_fd_get_device_stats(fd, &stats);
1207f1: 8d 7d 80 lea -0x80(%ebp),%edi <== NOT EXECUTED
1207f4: 57 push %edi <== NOT EXECUTED
1207f5: 68 0b 42 04 40 push $0x4004420b <== NOT EXECUTED
1207fa: 56 push %esi <== NOT EXECUTED
1207fb: e8 bc ed fe ff call 10f5bc <ioctl> <== NOT EXECUTED
if (rv == 0) {
120800: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
120803: 85 c0 test %eax,%eax <== NOT EXECUTED
120805: 75 0f jne 120816 <rtems_blkstats+0xb6> <== NOT EXECUTED
rtems_blkdev_print_stats(
120807: 52 push %edx <== NOT EXECUTED
120808: 53 push %ebx <== NOT EXECUTED
120809: 68 6c 18 13 00 push $0x13186c <== NOT EXECUTED
12080e: 57 push %edi <== NOT EXECUTED
12080f: e8 a0 00 00 00 call 1208b4 <rtems_blkdev_print_stats><== NOT EXECUTED
120814: eb 47 jmp 12085d <rtems_blkstats+0xfd> <== NOT EXECUTED
&stats,
(rtems_printk_plugin_t) fprintf,
output
);
} else {
fprintf(output, "error: get stats: %s\n", strerror(errno));
120816: e8 6d 06 01 00 call 130e88 <__errno> <== NOT EXECUTED
12081b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
12081e: ff 30 pushl (%eax) <== NOT EXECUTED
120820: e8 6f 67 01 00 call 136f94 <strerror> <== NOT EXECUTED
120825: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
120828: 50 push %eax <== NOT EXECUTED
120829: 68 bc fc 14 00 push $0x14fcbc <== NOT EXECUTED
12082e: eb 27 jmp 120857 <rtems_blkstats+0xf7> <== NOT EXECUTED
}
}
} else {
fprintf(output, "error: not a block device\n");
120830: 50 push %eax <== NOT EXECUTED
120831: 50 push %eax <== NOT EXECUTED
120832: 53 push %ebx <== NOT EXECUTED
120833: 68 d2 fc 14 00 push $0x14fcd2 <== NOT EXECUTED
120838: e8 4f 11 01 00 call 13198c <fputs> <== NOT EXECUTED
12083d: eb 1e jmp 12085d <rtems_blkstats+0xfd> <== NOT EXECUTED
}
} else {
fprintf(output, "error: get file stats: %s\n", strerror(errno));
12083f: e8 44 06 01 00 call 130e88 <__errno> <== NOT EXECUTED
120844: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
120847: ff 30 pushl (%eax) <== NOT EXECUTED
120849: e8 46 67 01 00 call 136f94 <strerror> <== NOT EXECUTED
12084e: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
120851: 50 push %eax <== NOT EXECUTED
120852: 68 ed fc 14 00 push $0x14fced <== NOT EXECUTED
120857: 53 push %ebx <== NOT EXECUTED
120858: e8 0f 10 01 00 call 13186c <fprintf> <== NOT EXECUTED
12085d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
rv = close(fd);
120860: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
120863: 56 push %esi <== NOT EXECUTED
120864: e8 f7 13 00 00 call 121c60 <close> <== NOT EXECUTED
if (rv != 0) {
120869: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
12086c: 85 c0 test %eax,%eax <== NOT EXECUTED
12086e: 74 3b je 1208ab <rtems_blkstats+0x14b> <== NOT EXECUTED
fprintf(output, "error: close device: %s\n", strerror(errno));
120870: e8 13 06 01 00 call 130e88 <__errno> <== NOT EXECUTED
120875: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
120878: ff 30 pushl (%eax) <== NOT EXECUTED
12087a: e8 15 67 01 00 call 136f94 <strerror> <== NOT EXECUTED
12087f: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
120882: 50 push %eax <== NOT EXECUTED
120883: 68 08 fd 14 00 push $0x14fd08 <== NOT EXECUTED
120888: eb 18 jmp 1208a2 <rtems_blkstats+0x142> <== NOT EXECUTED
}
} else {
fprintf(output, "error: open device: %s\n", strerror(errno));
12088a: e8 f9 05 01 00 call 130e88 <__errno> <== NOT EXECUTED
12088f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
120892: ff 30 pushl (%eax) <== NOT EXECUTED
120894: e8 fb 66 01 00 call 136f94 <strerror> <== NOT EXECUTED
120899: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
12089c: 50 push %eax <== NOT EXECUTED
12089d: 68 21 fd 14 00 push $0x14fd21 <== NOT EXECUTED
1208a2: 53 push %ebx <== NOT EXECUTED
1208a3: e8 c4 0f 01 00 call 13186c <fprintf> <== NOT EXECUTED
1208a8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
}
1208ab: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1208ae: 5b pop %ebx <== NOT EXECUTED
1208af: 5e pop %esi <== NOT EXECUTED
1208b0: 5f pop %edi <== NOT EXECUTED
1208b1: 5d pop %ebp <== NOT EXECUTED
1208b2: c3 ret <== NOT EXECUTED
0010a718 <rtems_chain_get_with_wait>:
rtems_chain_control *chain,
rtems_event_set events,
rtems_interval timeout,
rtems_chain_node **node_ptr
)
{
10a718: 55 push %ebp
10a719: 89 e5 mov %esp,%ebp
10a71b: 56 push %esi
10a71c: 53 push %ebx
10a71d: 83 ec 10 sub $0x10,%esp
while (
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
) {
rtems_event_set out;
sc = rtems_event_receive(
10a720: 8d 5d f4 lea -0xc(%ebp),%ebx
10a723: eb 15 jmp 10a73a <rtems_chain_get_with_wait+0x22>
10a725: 53 push %ebx
10a726: ff 75 10 pushl 0x10(%ebp)
10a729: 6a 00 push $0x0
10a72b: ff 75 0c pushl 0xc(%ebp)
10a72e: e8 99 f5 ff ff call 109ccc <rtems_event_receive>
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_node *node = NULL;
while (
10a733: 83 c4 10 add $0x10,%esp
10a736: 85 c0 test %eax,%eax
10a738: 75 16 jne 10a750 <rtems_chain_get_with_wait+0x38><== ALWAYS TAKEN
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
10a73a: 83 ec 0c sub $0xc,%esp
10a73d: ff 75 08 pushl 0x8(%ebp)
10a740: e8 cf 04 00 00 call 10ac14 <_Chain_Get>
10a745: 89 c6 mov %eax,%esi
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
10a747: 83 c4 10 add $0x10,%esp
10a74a: 85 c0 test %eax,%eax
10a74c: 74 d7 je 10a725 <rtems_chain_get_with_wait+0xd>
10a74e: 31 c0 xor %eax,%eax
timeout,
&out
);
}
*node_ptr = node;
10a750: 8b 55 14 mov 0x14(%ebp),%edx
10a753: 89 32 mov %esi,(%edx)
return sc;
}
10a755: 8d 65 f8 lea -0x8(%ebp),%esp
10a758: 5b pop %ebx
10a759: 5e pop %esi
10a75a: 5d pop %ebp
10a75b: c3 ret
0010694c <rtems_cpu_usage_report_with_plugin>:
*/
void rtems_cpu_usage_report_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
10694c: 55 push %ebp
10694d: 89 e5 mov %esp,%ebp
10694f: 57 push %edi
106950: 56 push %esi
106951: 53 push %ebx
106952: 83 ec 4c sub $0x4c,%esp
uint32_t seconds, nanoseconds;
#else
uint32_t total_units = 0;
#endif
if ( !print )
106955: 83 7d 0c 00 cmpl $0x0,0xc(%ebp)
106959: 0f 84 ca 01 00 00 je 106b29 <rtems_cpu_usage_report_with_plugin+0x1dd><== NEVER TAKEN
static inline void _Timestamp64_implementation_Set_to_zero(
Timestamp64_Control *_time
)
{
*_time = 0;
10695f: c7 45 c8 00 00 00 00 movl $0x0,-0x38(%ebp)
106966: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp)
* the number of "ticks" we gave credit for to give the user a rough
* guideline as to what each number means proportionally.
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Set_to_zero( &total );
uptime_at_last_reset = CPU_usage_Uptime_at_last_reset;
10696d: a1 e8 13 13 00 mov 0x1313e8,%eax
106972: 8b 15 ec 13 13 00 mov 0x1313ec,%edx
106978: 89 45 a8 mov %eax,-0x58(%ebp)
10697b: 89 55 ac mov %edx,-0x54(%ebp)
}
}
}
#endif
(*print)(
10697e: 53 push %ebx
10697f: 53 push %ebx
106980: 68 35 0e 12 00 push $0x120e35
106985: ff 75 08 pushl 0x8(%ebp)
106988: 8b 55 0c mov 0xc(%ebp),%edx
10698b: ff d2 call *%edx
10698d: 83 c4 10 add $0x10,%esp
" ID | NAME | TICKS | PERCENT\n"
#endif
"------------+----------------------------------------+---------------+---------\n"
);
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
106990: c7 45 b0 01 00 00 00 movl $0x1,-0x50(%ebp)
#if !defined(RTEMS_POSIX_API) || defined(RTEMS_DEBUG)
if ( !_Objects_Information_table[ api_index ] )
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
106997: 8b 55 b0 mov -0x50(%ebp),%edx
10699a: 8b 04 95 3c 0e 13 00 mov 0x130e3c(,%edx,4),%eax
1069a1: 8b 58 04 mov 0x4(%eax),%ebx
if ( information ) {
1069a4: c7 45 b4 01 00 00 00 movl $0x1,-0x4c(%ebp)
1069ab: 85 db test %ebx,%ebx
1069ad: 0f 85 0b 01 00 00 jne 106abe <rtems_cpu_usage_report_with_plugin+0x172><== ALWAYS TAKEN
" ID | NAME | TICKS | PERCENT\n"
#endif
"------------+----------------------------------------+---------------+---------\n"
);
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
1069b3: ff 45 b0 incl -0x50(%ebp)
1069b6: 83 7d b0 04 cmpl $0x4,-0x50(%ebp)
1069ba: 75 db jne 106997 <rtems_cpu_usage_report_with_plugin+0x4b>
1069bc: e9 0f 01 00 00 jmp 106ad0 <rtems_cpu_usage_report_with_plugin+0x184>
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
if ( information ) {
for ( i=1 ; i <= information->maximum ; i++ ) {
the_thread = (Thread_Control *)information->local_table[ i ];
1069c1: 8b 43 1c mov 0x1c(%ebx),%eax
1069c4: 8b 55 b4 mov -0x4c(%ebp),%edx
1069c7: 8b 34 90 mov (%eax,%edx,4),%esi
if ( !the_thread )
1069ca: 85 f6 test %esi,%esi
1069cc: 0f 84 e9 00 00 00 je 106abb <rtems_cpu_usage_report_with_plugin+0x16f><== NEVER TAKEN
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
1069d2: 51 push %ecx
1069d3: 8d 45 db lea -0x25(%ebp),%eax
1069d6: 50 push %eax
1069d7: 6a 0d push $0xd
1069d9: ff 76 08 pushl 0x8(%esi)
1069dc: e8 47 40 00 00 call 10aa28 <rtems_object_get_name>
(*print)(
1069e1: 8d 55 db lea -0x25(%ebp),%edx
1069e4: 52 push %edx
1069e5: ff 76 08 pushl 0x8(%esi)
1069e8: 68 a7 0f 12 00 push $0x120fa7
1069ed: ff 75 08 pushl 0x8(%ebp)
1069f0: 8b 55 0c mov 0xc(%ebp),%edx
1069f3: ff d2 call *%edx
/*
* If this is the currently executing thread, account for time
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
1069f5: 8b 86 80 00 00 00 mov 0x80(%esi),%eax
1069fb: 8b 96 84 00 00 00 mov 0x84(%esi),%edx
106a01: 89 45 d0 mov %eax,-0x30(%ebp)
106a04: 89 55 d4 mov %edx,-0x2c(%ebp)
Thread_Control *the_thread,
Timestamp_Control *time_of_context_switch
)
{
#ifndef RTEMS_SMP
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
106a07: 83 c4 20 add $0x20,%esp
106a0a: a1 ac 13 13 00 mov 0x1313ac,%eax
106a0f: 8b 56 08 mov 0x8(%esi),%edx
106a12: 39 50 08 cmp %edx,0x8(%eax)
106a15: 0f 85 fd 00 00 00 jne 106b18 <rtems_cpu_usage_report_with_plugin+0x1cc>
*time_of_context_switch = _Thread_Time_of_last_context_switch;
106a1b: 8b 35 bc 13 13 00 mov 0x1313bc,%esi
106a21: 8b 3d c0 13 13 00 mov 0x1313c0,%edi
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
if ( is_executing_on_a_core( the_thread, &last ) ) {
Timestamp_Control used;
_TOD_Get_uptime( &uptime );
106a27: 83 ec 0c sub $0xc,%esp
106a2a: 8d 45 c0 lea -0x40(%ebp),%eax
106a2d: 50 push %eax
106a2e: e8 bd 50 00 00 call 10baf0 <_TOD_Get_uptime>
const Timestamp64_Control *_start,
const Timestamp64_Control *_end,
Timestamp64_Control *_result
)
{
*_result = *_end - *_start;
106a33: 8b 45 c0 mov -0x40(%ebp),%eax
106a36: 8b 55 c4 mov -0x3c(%ebp),%edx
106a39: 29 f0 sub %esi,%eax
106a3b: 19 fa sbb %edi,%edx
static inline void _Timestamp64_implementation_Add_to(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
*_time += *_add;
106a3d: 01 45 d0 add %eax,-0x30(%ebp)
106a40: 11 55 d4 adc %edx,-0x2c(%ebp)
106a43: 83 c4 10 add $0x10,%esp
const Timestamp64_Control *_start,
const Timestamp64_Control *_end,
Timestamp64_Control *_result
)
{
*_result = *_end - *_start;
106a46: 8b 45 c0 mov -0x40(%ebp),%eax
106a49: 8b 55 c4 mov -0x3c(%ebp),%edx
106a4c: 2b 45 a8 sub -0x58(%ebp),%eax
106a4f: 1b 55 ac sbb -0x54(%ebp),%edx
106a52: 89 45 c8 mov %eax,-0x38(%ebp)
106a55: 89 55 cc mov %edx,-0x34(%ebp)
_Timestamp_Add_to( &ran, &used );
} else {
_TOD_Get_uptime( &uptime );
}
_Timestamp_Subtract( &uptime_at_last_reset, &uptime, &total );
_Timestamp_Divide( &ran, &total, &ival, &fval );
106a58: 8d 45 bc lea -0x44(%ebp),%eax
106a5b: 50 push %eax
106a5c: 8d 45 b8 lea -0x48(%ebp),%eax
106a5f: 50 push %eax
106a60: 8d 45 c8 lea -0x38(%ebp),%eax
106a63: 50 push %eax
106a64: 8d 45 d0 lea -0x30(%ebp),%eax
106a67: 50 push %eax
106a68: e8 07 6f 00 00 call 10d974 <_Timestamp64_Divide>
/*
* Print the information
*/
seconds = _Timestamp_Get_seconds( &ran );
106a6d: 8b 75 d0 mov -0x30(%ebp),%esi
106a70: 8b 7d d4 mov -0x2c(%ebp),%edi
nanoseconds = _Timestamp_Get_nanoseconds( &ran ) /
TOD_NANOSECONDS_PER_MICROSECOND;
(*print)( context,
106a73: 58 pop %eax
106a74: 5a pop %edx
106a75: ff 75 bc pushl -0x44(%ebp)
106a78: ff 75 b8 pushl -0x48(%ebp)
static inline uint32_t _Timestamp64_implementation_Get_nanoseconds(
const Timestamp64_Control *_time
)
{
return (uint32_t) (*_time % 1000000000L);
106a7b: 6a 00 push $0x0
106a7d: 68 00 ca 9a 3b push $0x3b9aca00
106a82: 57 push %edi
106a83: 56 push %esi
106a84: e8 e3 80 01 00 call 11eb6c <__moddi3>
106a89: 83 c4 10 add $0x10,%esp
/*
* Print the information
*/
seconds = _Timestamp_Get_seconds( &ran );
nanoseconds = _Timestamp_Get_nanoseconds( &ran ) /
106a8c: b9 e8 03 00 00 mov $0x3e8,%ecx
106a91: 31 d2 xor %edx,%edx
106a93: f7 f1 div %ecx
TOD_NANOSECONDS_PER_MICROSECOND;
(*print)( context,
106a95: 50 push %eax
static inline uint32_t _Timestamp64_implementation_Get_seconds(
const Timestamp64_Control *_time
)
{
return (uint32_t) (*_time / 1000000000L);
106a96: 83 ec 0c sub $0xc,%esp
106a99: 6a 00 push $0x0
106a9b: 68 00 ca 9a 3b push $0x3b9aca00
106aa0: 57 push %edi
106aa1: 56 push %esi
106aa2: e8 71 7f 01 00 call 11ea18 <__divdi3>
106aa7: 83 c4 1c add $0x1c,%esp
106aaa: 50 push %eax
106aab: 68 ba 0f 12 00 push $0x120fba
106ab0: ff 75 08 pushl 0x8(%ebp)
106ab3: 8b 55 0c mov 0xc(%ebp),%edx
106ab6: ff d2 call *%edx
106ab8: 83 c4 20 add $0x20,%esp
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
if ( information ) {
for ( i=1 ; i <= information->maximum ; i++ ) {
106abb: ff 45 b4 incl -0x4c(%ebp)
106abe: 0f b7 43 10 movzwl 0x10(%ebx),%eax
106ac2: 39 45 b4 cmp %eax,-0x4c(%ebp)
106ac5: 0f 86 f6 fe ff ff jbe 1069c1 <rtems_cpu_usage_report_with_plugin+0x75>
106acb: e9 e3 fe ff ff jmp 1069b3 <rtems_cpu_usage_report_with_plugin+0x67>
}
}
}
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
seconds = _Timestamp_Get_seconds( &total );
106ad0: 8b 75 c8 mov -0x38(%ebp),%esi
106ad3: 8b 7d cc mov -0x34(%ebp),%edi
static inline uint32_t _Timestamp64_implementation_Get_nanoseconds(
const Timestamp64_Control *_time
)
{
return (uint32_t) (*_time % 1000000000L);
106ad6: 6a 00 push $0x0
106ad8: 68 00 ca 9a 3b push $0x3b9aca00
106add: 57 push %edi
106ade: 56 push %esi
106adf: e8 88 80 01 00 call 11eb6c <__moddi3>
106ae4: 83 c4 10 add $0x10,%esp
nanoseconds = _Timestamp_Get_nanoseconds( &total ) /
106ae7: b9 e8 03 00 00 mov $0x3e8,%ecx
106aec: 31 d2 xor %edx,%edx
106aee: f7 f1 div %ecx
TOD_NANOSECONDS_PER_MICROSECOND;
(*print)(
106af0: 50 push %eax
static inline uint32_t _Timestamp64_implementation_Get_seconds(
const Timestamp64_Control *_time
)
{
return (uint32_t) (*_time / 1000000000L);
106af1: 83 ec 0c sub $0xc,%esp
106af4: 6a 00 push $0x0
106af6: 68 00 ca 9a 3b push $0x3b9aca00
106afb: 57 push %edi
106afc: 56 push %esi
106afd: e8 16 7f 01 00 call 11ea18 <__divdi3>
106b02: 83 c4 1c add $0x1c,%esp
106b05: 50 push %eax
106b06: 68 d2 0f 12 00 push $0x120fd2
106b0b: ff 75 08 pushl 0x8(%ebp)
106b0e: 8b 55 0c mov 0xc(%ebp),%edx
106b11: ff d2 call *%edx
106b13: 83 c4 10 add $0x10,%esp
106b16: eb 11 jmp 106b29 <rtems_cpu_usage_report_with_plugin+0x1dd>
Timestamp_Control used;
_TOD_Get_uptime( &uptime );
_Timestamp_Subtract( &last, &uptime, &used );
_Timestamp_Add_to( &ran, &used );
} else {
_TOD_Get_uptime( &uptime );
106b18: 83 ec 0c sub $0xc,%esp
106b1b: 8d 45 c0 lea -0x40(%ebp),%eax
106b1e: 50 push %eax
106b1f: e8 cc 4f 00 00 call 10baf0 <_TOD_Get_uptime>
106b24: e9 1a ff ff ff jmp 106a43 <rtems_cpu_usage_report_with_plugin+0xf7>
"-------------------------------------------------------------------------------\n",
_Watchdog_Ticks_since_boot - CPU_usage_Ticks_at_last_reset,
total_units
);
#endif
}
106b29: 8d 65 f4 lea -0xc(%ebp),%esp
106b2c: 5b pop %ebx
106b2d: 5e pop %esi
106b2e: 5f pop %edi
106b2f: 5d pop %ebp
106b30: c3 ret
00110e24 <rtems_deviceio_errno>:
[RTEMS_IO_ERROR] = EIO,
[RTEMS_PROXY_BLOCKING] = EIO
};
int rtems_deviceio_errno(rtems_status_code sc)
{
110e24: 55 push %ebp
110e25: 89 e5 mov %esp,%ebp
110e27: 53 push %ebx
110e28: 51 push %ecx
110e29: 8b 55 08 mov 0x8(%ebp),%edx
if (sc == RTEMS_SUCCESSFUL) {
return 0;
110e2c: 31 c0 xor %eax,%eax
[RTEMS_PROXY_BLOCKING] = EIO
};
int rtems_deviceio_errno(rtems_status_code sc)
{
if (sc == RTEMS_SUCCESSFUL) {
110e2e: 85 d2 test %edx,%edx
110e30: 74 1b je 110e4d <rtems_deviceio_errno+0x29>
return 0;
} else {
int eno = EINVAL;
110e32: bb 16 00 00 00 mov $0x16,%ebx
if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) {
110e37: 83 fa 1c cmp $0x1c,%edx
110e3a: 77 07 ja 110e43 <rtems_deviceio_errno+0x1f><== NEVER TAKEN
eno = status_code_to_errno [sc];
110e3c: 8b 1c 95 4c 01 12 00 mov 0x12014c(,%edx,4),%ebx
}
errno = eno;
110e43: e8 94 00 00 00 call 110edc <__errno>
110e48: 89 18 mov %ebx,(%eax)
return -1;
110e4a: 83 c8 ff or $0xffffffff,%eax
}
}
110e4d: 5a pop %edx
110e4e: 5b pop %ebx
110e4f: 5d pop %ebp
110e50: c3 ret
00106913 <rtems_disk_create_log>:
dev_t phys,
rtems_blkdev_bnum block_begin,
rtems_blkdev_bnum block_count,
const char *name
)
{
106913: 55 push %ebp
106914: 89 e5 mov %esp,%ebp
106916: 57 push %edi
106917: 56 push %esi
106918: 53 push %ebx
106919: 83 ec 2c sub $0x2c,%esp
10691c: 8b 75 08 mov 0x8(%ebp),%esi
10691f: 8b 7d 0c mov 0xc(%ebp),%edi
106922: 8b 45 10 mov 0x10(%ebp),%eax
106925: 8b 55 14 mov 0x14(%ebp),%edx
106928: 89 45 d0 mov %eax,-0x30(%ebp)
10692b: 89 55 d4 mov %edx,-0x2c(%ebp)
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_disk_device *phys_dd = NULL;
rtems_disk_device *dd = NULL;
10692e: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
char *alloc_name = NULL;
106935: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
sc = disk_lock();
10693c: e8 cd fc ff ff call 10660e <disk_lock>
106941: 89 c3 mov %eax,%ebx
if (sc != RTEMS_SUCCESSFUL) {
106943: 85 c0 test %eax,%eax
106945: 0f 85 8e 00 00 00 jne 1069d9 <rtems_disk_create_log+0xc6><== NEVER TAKEN
return sc;
}
phys_dd = get_disk_entry(phys, true);
10694b: b9 01 00 00 00 mov $0x1,%ecx
106950: 8b 45 d0 mov -0x30(%ebp),%eax
106953: 8b 55 d4 mov -0x2c(%ebp),%edx
106956: e8 21 fc ff ff call 10657c <get_disk_entry>
10695b: 89 45 d0 mov %eax,-0x30(%ebp)
if (phys_dd == NULL) {
10695e: 85 c0 test %eax,%eax
106960: 75 09 jne 10696b <rtems_disk_create_log+0x58>
disk_unlock();
106962: e8 d5 fc ff ff call 10663c <disk_unlock>
return RTEMS_INVALID_ID;
106967: b3 04 mov $0x4,%bl
106969: eb 6e jmp 1069d9 <rtems_disk_create_log+0xc6>
}
sc = create_disk(dev, name, &dd, &alloc_name);
10696b: 50 push %eax
10696c: 50 push %eax
10696d: 8d 45 e4 lea -0x1c(%ebp),%eax
106970: 50 push %eax
106971: 8d 45 e0 lea -0x20(%ebp),%eax
106974: 50 push %eax
106975: 8b 4d 20 mov 0x20(%ebp),%ecx
106978: 89 f0 mov %esi,%eax
10697a: 89 fa mov %edi,%edx
10697c: e8 e9 fc ff ff call 10666a <create_disk>
106981: 89 c3 mov %eax,%ebx
if (sc != RTEMS_SUCCESSFUL) {
106983: 83 c4 10 add $0x10,%esp
106986: 85 c0 test %eax,%eax
106988: 74 02 je 10698c <rtems_disk_create_log+0x79>
10698a: eb 48 jmp 1069d4 <rtems_disk_create_log+0xc1>
disk_unlock();
return sc;
}
sc = rtems_disk_init_log(
10698c: ff 75 1c pushl 0x1c(%ebp)
10698f: ff 75 18 pushl 0x18(%ebp)
106992: ff 75 d0 pushl -0x30(%ebp)
106995: ff 75 e0 pushl -0x20(%ebp)
106998: e8 b4 9c 00 00 call 110651 <rtems_disk_init_log>
10699d: 89 c3 mov %eax,%ebx
phys_dd,
block_begin,
block_count
);
dd->dev = dev;
10699f: 8b 45 e0 mov -0x20(%ebp),%eax
1069a2: 89 30 mov %esi,(%eax)
1069a4: 89 78 04 mov %edi,0x4(%eax)
dd->name = alloc_name;
1069a7: 8b 55 e4 mov -0x1c(%ebp),%edx
1069aa: 89 50 10 mov %edx,0x10(%eax)
++phys_dd->uses;
1069ad: 8b 55 d0 mov -0x30(%ebp),%edx
1069b0: ff 42 14 incl 0x14(%edx)
if (sc != RTEMS_SUCCESSFUL) {
1069b3: 83 c4 10 add $0x10,%esp
1069b6: 85 db test %ebx,%ebx
1069b8: 74 1a je 1069d4 <rtems_disk_create_log+0xc1>
dd->ioctl = null_handler;
1069ba: c7 40 38 be 65 10 00 movl $0x1065be,0x38(%eax)
rtems_disk_delete(dev);
1069c1: 50 push %eax
1069c2: 50 push %eax
1069c3: 57 push %edi
1069c4: 56 push %esi
1069c5: e8 1f fe ff ff call 1067e9 <rtems_disk_delete>
disk_unlock();
1069ca: e8 6d fc ff ff call 10663c <disk_unlock>
1069cf: 83 c4 10 add $0x10,%esp
1069d2: eb 05 jmp 1069d9 <rtems_disk_create_log+0xc6>
return sc;
}
disk_unlock();
1069d4: e8 63 fc ff ff call 10663c <disk_unlock>
return RTEMS_SUCCESSFUL;
}
1069d9: 89 d8 mov %ebx,%eax
1069db: 8d 65 f4 lea -0xc(%ebp),%esp
1069de: 5b pop %ebx
1069df: 5e pop %esi
1069e0: 5f pop %edi
1069e1: 5d pop %ebp
1069e2: c3 ret
001069e3 <rtems_disk_create_phys>:
rtems_blkdev_bnum block_count,
rtems_block_device_ioctl handler,
void *driver_data,
const char *name
)
{
1069e3: 55 push %ebp
1069e4: 89 e5 mov %esp,%ebp
1069e6: 57 push %edi
1069e7: 56 push %esi
1069e8: 53 push %ebx
1069e9: 83 ec 1c sub $0x1c,%esp
1069ec: 8b 75 08 mov 0x8(%ebp),%esi
1069ef: 8b 7d 0c mov 0xc(%ebp),%edi
rtems_disk_device *dd = NULL;
1069f2: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
rtems_status_code sc = RTEMS_SUCCESSFUL;
char *alloc_name = NULL;
1069f9: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
if (handler == NULL) {
return RTEMS_INVALID_ADDRESS;
106a00: bb 09 00 00 00 mov $0x9,%ebx
{
rtems_disk_device *dd = NULL;
rtems_status_code sc = RTEMS_SUCCESSFUL;
char *alloc_name = NULL;
if (handler == NULL) {
106a05: 83 7d 18 00 cmpl $0x0,0x18(%ebp)
106a09: 74 79 je 106a84 <rtems_disk_create_phys+0xa1>
return RTEMS_INVALID_ADDRESS;
}
sc = disk_lock();
106a0b: e8 fe fb ff ff call 10660e <disk_lock>
106a10: 89 c3 mov %eax,%ebx
if (sc != RTEMS_SUCCESSFUL) {
106a12: 85 c0 test %eax,%eax
106a14: 75 6e jne 106a84 <rtems_disk_create_phys+0xa1><== NEVER TAKEN
return sc;
}
sc = create_disk(dev, name, &dd, &alloc_name);
106a16: 50 push %eax
106a17: 50 push %eax
106a18: 8d 45 e4 lea -0x1c(%ebp),%eax
106a1b: 50 push %eax
106a1c: 8d 45 e0 lea -0x20(%ebp),%eax
106a1f: 50 push %eax
106a20: 8b 4d 20 mov 0x20(%ebp),%ecx
106a23: 89 f0 mov %esi,%eax
106a25: 89 fa mov %edi,%edx
106a27: e8 3e fc ff ff call 10666a <create_disk>
106a2c: 89 c3 mov %eax,%ebx
if (sc != RTEMS_SUCCESSFUL) {
106a2e: 83 c4 10 add $0x10,%esp
106a31: 85 c0 test %eax,%eax
106a33: 74 02 je 106a37 <rtems_disk_create_phys+0x54>
106a35: eb 48 jmp 106a7f <rtems_disk_create_phys+0x9c>
disk_unlock();
return sc;
}
sc = rtems_disk_init_phys(
106a37: 83 ec 0c sub $0xc,%esp
106a3a: ff 75 1c pushl 0x1c(%ebp)
106a3d: ff 75 18 pushl 0x18(%ebp)
106a40: ff 75 14 pushl 0x14(%ebp)
106a43: ff 75 10 pushl 0x10(%ebp)
106a46: ff 75 e0 pushl -0x20(%ebp)
106a49: e8 8a 9b 00 00 call 1105d8 <rtems_disk_init_phys>
106a4e: 89 c3 mov %eax,%ebx
block_count,
handler,
driver_data
);
dd->dev = dev;
106a50: 8b 45 e0 mov -0x20(%ebp),%eax
106a53: 89 30 mov %esi,(%eax)
106a55: 89 78 04 mov %edi,0x4(%eax)
dd->name = alloc_name;
106a58: 8b 55 e4 mov -0x1c(%ebp),%edx
106a5b: 89 50 10 mov %edx,0x10(%eax)
if (sc != RTEMS_SUCCESSFUL) {
106a5e: 83 c4 20 add $0x20,%esp
106a61: 85 db test %ebx,%ebx
106a63: 74 1a je 106a7f <rtems_disk_create_phys+0x9c>
dd->ioctl = null_handler;
106a65: c7 40 38 be 65 10 00 movl $0x1065be,0x38(%eax)
rtems_disk_delete(dev);
106a6c: 50 push %eax
106a6d: 50 push %eax
106a6e: 57 push %edi
106a6f: 56 push %esi
106a70: e8 74 fd ff ff call 1067e9 <rtems_disk_delete>
disk_unlock();
106a75: e8 c2 fb ff ff call 10663c <disk_unlock>
106a7a: 83 c4 10 add $0x10,%esp
106a7d: eb 05 jmp 106a84 <rtems_disk_create_phys+0xa1>
return sc;
}
disk_unlock();
106a7f: e8 b8 fb ff ff call 10663c <disk_unlock>
return RTEMS_SUCCESSFUL;
}
106a84: 89 d8 mov %ebx,%eax
106a86: 8d 65 f4 lea -0xc(%ebp),%esp
106a89: 5b pop %ebx
106a8a: 5e pop %esi
106a8b: 5f pop %edi
106a8c: 5d pop %ebp
106a8d: c3 ret
001067e9 <rtems_disk_delete>:
}
}
rtems_status_code
rtems_disk_delete(dev_t dev)
{
1067e9: 55 push %ebp
1067ea: 89 e5 mov %esp,%ebp
1067ec: 57 push %edi
1067ed: 56 push %esi
1067ee: 53 push %ebx
1067ef: 83 ec 2c sub $0x2c,%esp
1067f2: 8b 75 08 mov 0x8(%ebp),%esi
1067f5: 8b 7d 0c mov 0xc(%ebp),%edi
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_disk_device *dd = NULL;
sc = disk_lock();
1067f8: e8 11 fe ff ff call 10660e <disk_lock>
1067fd: 89 45 dc mov %eax,-0x24(%ebp)
if (sc != RTEMS_SUCCESSFUL) {
106800: 85 c0 test %eax,%eax
106802: 0f 85 00 01 00 00 jne 106908 <rtems_disk_delete+0x11f><== NEVER TAKEN
return sc;
}
dd = get_disk_entry(dev, true);
106808: b9 01 00 00 00 mov $0x1,%ecx
10680d: 89 f0 mov %esi,%eax
10680f: 89 fa mov %edi,%edx
106811: e8 66 fd ff ff call 10657c <get_disk_entry>
if (dd == NULL) {
106816: 85 c0 test %eax,%eax
106818: 75 11 jne 10682b <rtems_disk_delete+0x42><== ALWAYS TAKEN
disk_unlock();
10681a: e8 1d fe ff ff call 10663c <disk_unlock> <== NOT EXECUTED
return RTEMS_INVALID_ID;
10681f: c7 45 dc 04 00 00 00 movl $0x4,-0x24(%ebp) <== NOT EXECUTED
106826: e9 dd 00 00 00 jmp 106908 <rtems_disk_delete+0x11f><== NOT EXECUTED
}
dd->deleted = true;
10682b: c6 40 40 01 movb $0x1,0x40(%eax)
}
static void
rtems_disk_cleanup(rtems_disk_device *disk_to_remove)
{
rtems_disk_device *const physical_disk = disk_to_remove->phys_dev;
10682f: 8b 58 08 mov 0x8(%eax),%ebx
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
if (physical_disk->deleted) {
106832: 80 7b 40 00 cmpb $0x0,0x40(%ebx)
106836: 0f 84 a4 00 00 00 je 1068e0 <rtems_disk_delete+0xf7>
dev_t dev = physical_disk->dev;
10683c: 8b 13 mov (%ebx),%edx
10683e: 89 55 d8 mov %edx,-0x28(%ebp)
106841: 8b 53 04 mov 0x4(%ebx),%edx
106844: 89 55 d4 mov %edx,-0x2c(%ebp)
unsigned deleted_count = 0;
106847: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
for (major = 0; major < disktab_size; ++major) {
10684e: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
106855: eb 59 jmp 1068b0 <rtems_disk_delete+0xc7>
rtems_disk_device_table *dtab = disktab + major;
106857: a1 a0 1f 13 00 mov 0x131fa0,%eax
10685c: 8b 55 e4 mov -0x1c(%ebp),%edx
10685f: 8d 3c d0 lea (%eax,%edx,8),%edi
for (minor = 0; minor < dtab->size; ++minor) {
106862: 31 f6 xor %esi,%esi
106864: eb 42 jmp 1068a8 <rtems_disk_delete+0xbf>
rtems_disk_device *dd = dtab->minor [minor];
106866: 8b 07 mov (%edi),%eax
106868: 8d 04 b0 lea (%eax,%esi,4),%eax
10686b: 89 45 d0 mov %eax,-0x30(%ebp)
10686e: 8b 00 mov (%eax),%eax
if (dd != NULL && dd->phys_dev->dev == dev && dd != physical_disk) {
106870: 85 c0 test %eax,%eax
106872: 74 33 je 1068a7 <rtems_disk_delete+0xbe>
106874: 8b 48 08 mov 0x8(%eax),%ecx
106877: 8b 55 d4 mov -0x2c(%ebp),%edx
10687a: 39 51 04 cmp %edx,0x4(%ecx)
10687d: 75 28 jne 1068a7 <rtems_disk_delete+0xbe><== NEVER TAKEN
10687f: 8b 55 d8 mov -0x28(%ebp),%edx
106882: 39 11 cmp %edx,(%ecx)
106884: 75 21 jne 1068a7 <rtems_disk_delete+0xbe><== NEVER TAKEN
106886: 39 d8 cmp %ebx,%eax
106888: 74 1d je 1068a7 <rtems_disk_delete+0xbe>
if (dd->uses == 0) {
10688a: 83 78 14 00 cmpl $0x0,0x14(%eax)
10688e: 75 13 jne 1068a3 <rtems_disk_delete+0xba>
++deleted_count;
106890: ff 45 e0 incl -0x20(%ebp)
dtab->minor [minor] = NULL;
106893: 8b 55 d0 mov -0x30(%ebp),%edx
106896: c7 02 00 00 00 00 movl $0x0,(%edx)
free_disk_device(dd);
10689c: e8 25 fd ff ff call 1065c6 <free_disk_device>
1068a1: eb 04 jmp 1068a7 <rtems_disk_delete+0xbe>
} else {
dd->deleted = true;
1068a3: c6 40 40 01 movb $0x1,0x40(%eax)
unsigned deleted_count = 0;
for (major = 0; major < disktab_size; ++major) {
rtems_disk_device_table *dtab = disktab + major;
for (minor = 0; minor < dtab->size; ++minor) {
1068a7: 46 inc %esi
1068a8: 3b 77 04 cmp 0x4(%edi),%esi
1068ab: 72 b9 jb 106866 <rtems_disk_delete+0x7d>
if (physical_disk->deleted) {
dev_t dev = physical_disk->dev;
unsigned deleted_count = 0;
for (major = 0; major < disktab_size; ++major) {
1068ad: ff 45 e4 incl -0x1c(%ebp)
1068b0: 8b 55 e4 mov -0x1c(%ebp),%edx
1068b3: 3b 15 9c 1f 13 00 cmp 0x131f9c,%edx
1068b9: 72 9c jb 106857 <rtems_disk_delete+0x6e>
}
}
}
}
physical_disk->uses -= deleted_count;
1068bb: 8b 43 14 mov 0x14(%ebx),%eax
1068be: 2b 45 e0 sub -0x20(%ebp),%eax
1068c1: 89 43 14 mov %eax,0x14(%ebx)
if (physical_disk->uses == 0) {
1068c4: 85 c0 test %eax,%eax
1068c6: 75 3b jne 106903 <rtems_disk_delete+0x11a>
dev_t device
)
{
union __rtems_dev_t temp;
temp.device = device;
1068c8: 8b 0b mov (%ebx),%ecx
dev_t device
)
{
union __rtems_dev_t temp;
temp.device = device;
1068ca: 8b 53 04 mov 0x4(%ebx),%edx
rtems_filesystem_split_dev_t(physical_disk->dev, major, minor);
disktab [major].minor [minor] = NULL;
1068cd: a1 a0 1f 13 00 mov 0x131fa0,%eax
1068d2: 8b 04 c8 mov (%eax,%ecx,8),%eax
1068d5: c7 04 90 00 00 00 00 movl $0x0,(%eax,%edx,4)
free_disk_device(physical_disk);
1068dc: 89 d8 mov %ebx,%eax
1068de: eb 1e jmp 1068fe <rtems_disk_delete+0x115>
}
} else {
if (disk_to_remove->uses == 0) {
1068e0: 83 78 14 00 cmpl $0x0,0x14(%eax)
1068e4: 75 1d jne 106903 <rtems_disk_delete+0x11a><== NEVER TAKEN
--physical_disk->uses;
1068e6: ff 4b 14 decl 0x14(%ebx)
dev_t device
)
{
union __rtems_dev_t temp;
temp.device = device;
1068e9: 8b 18 mov (%eax),%ebx
dev_t device
)
{
union __rtems_dev_t temp;
temp.device = device;
1068eb: 8b 48 04 mov 0x4(%eax),%ecx
rtems_filesystem_split_dev_t(disk_to_remove->dev, major, minor);
disktab [major].minor [minor] = NULL;
1068ee: 8b 15 a0 1f 13 00 mov 0x131fa0,%edx
1068f4: 8b 14 da mov (%edx,%ebx,8),%edx
1068f7: c7 04 8a 00 00 00 00 movl $0x0,(%edx,%ecx,4)
free_disk_device(disk_to_remove);
1068fe: e8 c3 fc ff ff call 1065c6 <free_disk_device>
}
dd->deleted = true;
rtems_disk_cleanup(dd);
disk_unlock();
106903: e8 34 fd ff ff call 10663c <disk_unlock>
return RTEMS_SUCCESSFUL;
}
106908: 8b 45 dc mov -0x24(%ebp),%eax
10690b: 83 c4 2c add $0x2c,%esp
10690e: 5b pop %ebx
10690f: 5e pop %esi
106910: 5f pop %edi
106911: 5d pop %ebp
106912: c3 ret
00110651 <rtems_disk_init_log>:
rtems_disk_device *dd,
rtems_disk_device *phys_dd,
rtems_blkdev_bnum block_begin,
rtems_blkdev_bnum block_count
)
{
110651: 55 push %ebp
110652: 89 e5 mov %esp,%ebp
110654: 57 push %edi
110655: 56 push %esi
110656: 53 push %ebx
110657: 83 ec 1c sub $0x1c,%esp
11065a: 8b 55 08 mov 0x8(%ebp),%edx
11065d: 8b 5d 0c mov 0xc(%ebp),%ebx
110660: 8b 45 10 mov 0x10(%ebp),%eax
110663: 89 45 e4 mov %eax,-0x1c(%ebp)
110666: 8b 75 14 mov 0x14(%ebp),%esi
rtems_status_code sc;
dd = memset(dd, 0, sizeof(*dd));
110669: b9 1d 00 00 00 mov $0x1d,%ecx
11066e: 31 c0 xor %eax,%eax
110670: 89 d7 mov %edx,%edi
110672: f3 ab rep stos %eax,%es:(%edi)
dd->phys_dev = phys_dd;
110674: 89 5a 08 mov %ebx,0x8(%edx)
dd->start = block_begin;
110677: 8b 45 e4 mov -0x1c(%ebp),%eax
11067a: 89 42 18 mov %eax,0x18(%edx)
dd->size = block_count;
11067d: 89 72 1c mov %esi,0x1c(%edx)
dd->media_block_size = phys_dd->media_block_size;
110680: 8b 43 20 mov 0x20(%ebx),%eax
110683: 89 42 20 mov %eax,0x20(%edx)
dd->ioctl = phys_dd->ioctl;
110686: 8b 43 38 mov 0x38(%ebx),%eax
110689: 89 42 38 mov %eax,0x38(%edx)
dd->driver_data = phys_dd->driver_data;
11068c: 8b 43 3c mov 0x3c(%ebx),%eax
11068f: 89 42 3c mov %eax,0x3c(%edx)
dd->read_ahead.trigger = RTEMS_DISK_READ_AHEAD_NO_TRIGGER;
110692: c7 42 6c ff ff ff ff movl $0xffffffff,0x6c(%edx)
if (phys_dd->phys_dev == phys_dd) {
110699: 8b 4b 08 mov 0x8(%ebx),%ecx
sc = rtems_bdbuf_set_block_size(dd, phys_dd->media_block_size);
} else {
sc = RTEMS_INVALID_NUMBER;
}
} else {
sc = RTEMS_INVALID_ID;
11069c: b8 04 00 00 00 mov $0x4,%eax
dd->media_block_size = phys_dd->media_block_size;
dd->ioctl = phys_dd->ioctl;
dd->driver_data = phys_dd->driver_data;
dd->read_ahead.trigger = RTEMS_DISK_READ_AHEAD_NO_TRIGGER;
if (phys_dd->phys_dev == phys_dd) {
1106a1: 39 d9 cmp %ebx,%ecx
1106a3: 75 34 jne 1106d9 <rtems_disk_init_log+0x88>
rtems_blkdev_bnum phys_block_count = phys_dd->size;
1106a5: 8b 41 1c mov 0x1c(%ecx),%eax
if (
1106a8: 85 f6 test %esi,%esi
1106aa: 74 28 je 1106d4 <rtems_disk_init_log+0x83>
1106ac: 39 45 e4 cmp %eax,-0x1c(%ebp)
1106af: 73 23 jae 1106d4 <rtems_disk_init_log+0x83><== NEVER TAKEN
block_begin < phys_block_count
&& block_count > 0
&& block_count <= phys_block_count - block_begin
1106b1: 89 c3 mov %eax,%ebx
1106b3: 2b 5d e4 sub -0x1c(%ebp),%ebx
) {
sc = rtems_bdbuf_set_block_size(dd, phys_dd->media_block_size);
} else {
sc = RTEMS_INVALID_NUMBER;
1106b6: b8 0a 00 00 00 mov $0xa,%eax
rtems_blkdev_bnum phys_block_count = phys_dd->size;
if (
block_begin < phys_block_count
&& block_count > 0
&& block_count <= phys_block_count - block_begin
1106bb: 39 de cmp %ebx,%esi
1106bd: 77 1a ja 1106d9 <rtems_disk_init_log+0x88>
) {
sc = rtems_bdbuf_set_block_size(dd, phys_dd->media_block_size);
1106bf: 8b 41 20 mov 0x20(%ecx),%eax
1106c2: 89 45 0c mov %eax,0xc(%ebp)
1106c5: 89 55 08 mov %edx,0x8(%ebp)
} else {
sc = RTEMS_INVALID_ID;
}
return sc;
}
1106c8: 83 c4 1c add $0x1c,%esp
1106cb: 5b pop %ebx
1106cc: 5e pop %esi
1106cd: 5f pop %edi
1106ce: 5d pop %ebp
if (
block_begin < phys_block_count
&& block_count > 0
&& block_count <= phys_block_count - block_begin
) {
sc = rtems_bdbuf_set_block_size(dd, phys_dd->media_block_size);
1106cf: e9 a4 f9 ff ff jmp 110078 <rtems_bdbuf_set_block_size>
} else {
sc = RTEMS_INVALID_NUMBER;
1106d4: b8 0a 00 00 00 mov $0xa,%eax
} else {
sc = RTEMS_INVALID_ID;
}
return sc;
}
1106d9: 83 c4 1c add $0x1c,%esp
1106dc: 5b pop %ebx
1106dd: 5e pop %esi
1106de: 5f pop %edi
1106df: 5d pop %ebp
1106e0: c3 ret
00106bbc <rtems_disk_io_initialize>:
rtems_status_code
rtems_disk_io_initialize(void)
{
106bbc: 55 push %ebp
106bbd: 89 e5 mov %esp,%ebp
106bbf: 53 push %ebx
106bc0: 50 push %eax
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_device_major_number size = DISKTAB_INITIAL_SIZE;
if (disktab_size > 0) {
return RTEMS_SUCCESSFUL;
106bc1: 31 db xor %ebx,%ebx
rtems_disk_io_initialize(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_device_major_number size = DISKTAB_INITIAL_SIZE;
if (disktab_size > 0) {
106bc3: 83 3d 9c 1f 13 00 00 cmpl $0x0,0x131f9c
106bca: 0f 85 8b 00 00 00 jne 106c5b <rtems_disk_io_initialize+0x9f>
return RTEMS_SUCCESSFUL;
}
disktab = calloc(size, sizeof(rtems_disk_device_table));
106bd0: 50 push %eax
106bd1: 50 push %eax
106bd2: 6a 08 push $0x8
106bd4: 6a 08 push $0x8
106bd6: e8 dd 06 00 00 call 1072b8 <calloc>
106bdb: a3 a0 1f 13 00 mov %eax,0x131fa0
if (disktab == NULL) {
106be0: 83 c4 10 add $0x10,%esp
return RTEMS_NO_MEMORY;
106be3: b3 1a mov $0x1a,%bl
if (disktab_size > 0) {
return RTEMS_SUCCESSFUL;
}
disktab = calloc(size, sizeof(rtems_disk_device_table));
if (disktab == NULL) {
106be5: 85 c0 test %eax,%eax
106be7: 74 72 je 106c5b <rtems_disk_io_initialize+0x9f><== NEVER TAKEN
return RTEMS_NO_MEMORY;
}
diskdevs_protected = false;
106be9: c6 05 94 1f 13 00 00 movb $0x0,0x131f94
sc = rtems_semaphore_create(
106bf0: 83 ec 0c sub $0xc,%esp
106bf3: 68 98 1f 13 00 push $0x131f98
106bf8: 6a 00 push $0x0
106bfa: 6a 10 push $0x10
106bfc: 6a 01 push $0x1
106bfe: 68 56 45 44 44 push $0x44444556
106c03: e8 fc 3e 00 00 call 10ab04 <rtems_semaphore_create>
RTEMS_FIFO | RTEMS_BINARY_SEMAPHORE | RTEMS_NO_INHERIT_PRIORITY
| RTEMS_NO_PRIORITY_CEILING | RTEMS_LOCAL,
0,
&diskdevs_mutex
);
if (sc != RTEMS_SUCCESSFUL) {
106c08: 83 c4 20 add $0x20,%esp
106c0b: 85 c0 test %eax,%eax
106c0d: 74 13 je 106c22 <rtems_disk_io_initialize+0x66><== ALWAYS TAKEN
free(disktab);
106c0f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
106c12: ff 35 a0 1f 13 00 pushl 0x131fa0 <== NOT EXECUTED
106c18: e8 07 09 00 00 call 107524 <free> <== NOT EXECUTED
return RTEMS_NO_MEMORY;
106c1d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
106c20: eb 39 jmp 106c5b <rtems_disk_io_initialize+0x9f><== NOT EXECUTED
}
sc = rtems_bdbuf_init();
106c22: e8 d3 8a 00 00 call 10f6fa <rtems_bdbuf_init>
if (sc != RTEMS_SUCCESSFUL) {
106c27: 85 c0 test %eax,%eax
106c29: 74 24 je 106c4f <rtems_disk_io_initialize+0x93><== ALWAYS TAKEN
rtems_semaphore_delete(diskdevs_mutex);
106c2b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
106c2e: ff 35 98 1f 13 00 pushl 0x131f98 <== NOT EXECUTED
106c34: e8 6b 40 00 00 call 10aca4 <rtems_semaphore_delete><== NOT EXECUTED
free(disktab);
106c39: 5b pop %ebx <== NOT EXECUTED
106c3a: ff 35 a0 1f 13 00 pushl 0x131fa0 <== NOT EXECUTED
106c40: e8 df 08 00 00 call 107524 <free> <== NOT EXECUTED
return RTEMS_UNSATISFIED;
106c45: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
106c48: bb 0d 00 00 00 mov $0xd,%ebx <== NOT EXECUTED
106c4d: eb 0c jmp 106c5b <rtems_disk_io_initialize+0x9f><== NOT EXECUTED
}
disktab_size = size;
106c4f: c7 05 9c 1f 13 00 08 movl $0x8,0x131f9c
106c56: 00 00 00
return RTEMS_SUCCESSFUL;
106c59: 31 db xor %ebx,%ebx
}
106c5b: 89 d8 mov %ebx,%eax
106c5d: 8b 5d fc mov -0x4(%ebp),%ebx
106c60: c9 leave
106c61: c3 ret
00106b1e <rtems_disk_next>:
rtems_disk_device *
rtems_disk_next(dev_t dev)
{
106b1e: 55 push %ebp
106b1f: 89 e5 mov %esp,%ebp
106b21: 57 push %edi
106b22: 56 push %esi
106b23: 53 push %ebx
106b24: 83 ec 1c sub $0x1c,%esp
106b27: 8b 45 08 mov 0x8(%ebp),%eax
106b2a: 8b 55 0c mov 0xc(%ebp),%edx
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_disk_device_table *dtab = NULL;
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
if (dev != (dev_t) -1) {
106b2d: 83 fa ff cmp $0xffffffff,%edx
106b30: 75 05 jne 106b37 <rtems_disk_next+0x19>
106b32: 83 f8 ff cmp $0xffffffff,%eax
106b35: 74 12 je 106b49 <rtems_disk_next+0x2b> <== ALWAYS TAKEN
rtems_filesystem_split_dev_t(dev, major, minor);
/* If minor wraps around */
if ((minor + 1) < minor) {
106b37: 8d 5a 01 lea 0x1(%edx),%ebx
106b3a: 39 d3 cmp %edx,%ebx
106b3c: 73 11 jae 106b4f <rtems_disk_next+0x31> <== ALWAYS TAKEN
/* If major wraps around */
if ((major + 1) < major) {
106b3e: 8d 70 01 lea 0x1(%eax),%esi <== NOT EXECUTED
return NULL;
}
++major;
minor = 0;
106b41: 31 db xor %ebx,%ebx <== NOT EXECUTED
rtems_filesystem_split_dev_t(dev, major, minor);
/* If minor wraps around */
if ((minor + 1) < minor) {
/* If major wraps around */
if ((major + 1) < major) {
106b43: 39 c6 cmp %eax,%esi <== NOT EXECUTED
106b45: 73 0a jae 106b51 <rtems_disk_next+0x33> <== NOT EXECUTED
106b47: eb 22 jmp 106b6b <rtems_disk_next+0x4d> <== NOT EXECUTED
rtems_disk_next(dev_t dev)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_disk_device_table *dtab = NULL;
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
106b49: 31 db xor %ebx,%ebx
rtems_disk_device *
rtems_disk_next(dev_t dev)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_disk_device_table *dtab = NULL;
rtems_device_major_number major = 0;
106b4b: 31 f6 xor %esi,%esi
106b4d: eb 02 jmp 106b51 <rtems_disk_next+0x33>
)
{
union __rtems_dev_t temp;
temp.device = device;
return temp.__overlay.major;
106b4f: 89 c6 mov %eax,%esi
} else {
++minor;
}
}
sc = disk_lock();
106b51: e8 b8 fa ff ff call 10660e <disk_lock>
if (sc != RTEMS_SUCCESSFUL) {
106b56: 85 c0 test %eax,%eax
106b58: 75 11 jne 106b6b <rtems_disk_next+0x4d> <== NEVER TAKEN
return NULL;
}
if (major >= disktab_size) {
106b5a: a1 9c 1f 13 00 mov 0x131f9c,%eax
106b5f: 89 45 e0 mov %eax,-0x20(%ebp)
106b62: 39 c6 cmp %eax,%esi
106b64: 72 09 jb 106b6f <rtems_disk_next+0x51> <== ALWAYS TAKEN
disk_unlock();
106b66: e8 d1 fa ff ff call 10663c <disk_unlock>
return NULL;
106b6b: 31 c0 xor %eax,%eax
106b6d: eb 45 jmp 106bb4 <rtems_disk_next+0x96>
}
dtab = disktab + major;
106b6f: 8b 0d a0 1f 13 00 mov 0x131fa0,%ecx
106b75: 8d 3c f1 lea (%ecx,%esi,8),%edi
while (true) {
if (dtab->minor == NULL || minor >= dtab->size) {
106b78: 8b 07 mov (%edi),%eax
106b7a: 85 c0 test %eax,%eax
106b7c: 74 05 je 106b83 <rtems_disk_next+0x65>
106b7e: 3b 5f 04 cmp 0x4(%edi),%ebx
106b81: 72 0d jb 106b90 <rtems_disk_next+0x72>
minor = 0;
++major;
106b83: 46 inc %esi
if (major >= disktab_size) {
106b84: 3b 75 e0 cmp -0x20(%ebp),%esi
106b87: 73 dd jae 106b66 <rtems_disk_next+0x48>
disk_unlock();
return NULL;
}
dtab = disktab + major;
106b89: 8d 3c f1 lea (%ecx,%esi,8),%edi
}
dtab = disktab + major;
while (true) {
if (dtab->minor == NULL || minor >= dtab->size) {
minor = 0;
106b8c: 31 db xor %ebx,%ebx
if (major >= disktab_size) {
disk_unlock();
return NULL;
}
dtab = disktab + major;
106b8e: eb e8 jmp 106b78 <rtems_disk_next+0x5a>
} else if (dtab->minor [minor] == NULL) {
106b90: 8d 14 9d 00 00 00 00 lea 0x0(,%ebx,4),%edx
106b97: 89 55 e4 mov %edx,-0x1c(%ebp)
106b9a: 8b 04 98 mov (%eax,%ebx,4),%eax
106b9d: 85 c0 test %eax,%eax
106b9f: 75 03 jne 106ba4 <rtems_disk_next+0x86>
++minor;
106ba1: 43 inc %ebx
106ba2: eb d4 jmp 106b78 <rtems_disk_next+0x5a>
} else {
++dtab->minor [minor]->uses;
106ba4: ff 40 14 incl 0x14(%eax)
disk_unlock();
106ba7: e8 90 fa ff ff call 10663c <disk_unlock>
return dtab->minor [minor];
106bac: 8b 07 mov (%edi),%eax
106bae: 8b 55 e4 mov -0x1c(%ebp),%edx
106bb1: 8b 04 10 mov (%eax,%edx,1),%eax
}
}
}
106bb4: 83 c4 1c add $0x1c,%esp
106bb7: 5b pop %ebx
106bb8: 5e pop %esi
106bb9: 5f pop %edi
106bba: 5d pop %ebp
106bbb: c3 ret
00106a8e <rtems_disk_obtain>:
return RTEMS_SUCCESSFUL;
}
rtems_disk_device *
rtems_disk_obtain(dev_t dev)
{
106a8e: 55 push %ebp
106a8f: 89 e5 mov %esp,%ebp
106a91: 57 push %edi
106a92: 56 push %esi
106a93: 53 push %ebx
106a94: 83 ec 1c sub $0x1c,%esp
106a97: 8b 75 08 mov 0x8(%ebp),%esi
106a9a: 8b 7d 0c mov 0xc(%ebp),%edi
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_disk_device *dd = NULL;
rtems_interrupt_level level;
rtems_interrupt_disable(level);
106a9d: 9c pushf
106a9e: fa cli
106a9f: 5b pop %ebx
if (!diskdevs_protected) {
106aa0: a0 94 1f 13 00 mov 0x131f94,%al
106aa5: 84 c0 test %al,%al
106aa7: 75 0f jne 106ab8 <rtems_disk_obtain+0x2a><== NEVER TAKEN
/* Frequent and quickest case */
dd = get_disk_entry(dev, false);
106aa9: 31 c9 xor %ecx,%ecx
106aab: 89 f0 mov %esi,%eax
106aad: 89 fa mov %edi,%edx
106aaf: e8 c8 fa ff ff call 10657c <get_disk_entry>
rtems_interrupt_enable(level);
106ab4: 53 push %ebx
106ab5: 9d popf
106ab6: eb 25 jmp 106add <rtems_disk_obtain+0x4f>
} else {
rtems_interrupt_enable(level);
106ab8: 53 push %ebx <== NOT EXECUTED
106ab9: 9d popf <== NOT EXECUTED
sc = disk_lock();
106aba: e8 4f fb ff ff call 10660e <disk_lock> <== NOT EXECUTED
if (sc == RTEMS_SUCCESSFUL) {
106abf: 85 c0 test %eax,%eax <== NOT EXECUTED
106ac1: 75 18 jne 106adb <rtems_disk_obtain+0x4d><== NOT EXECUTED
dd = get_disk_entry(dev, false);
106ac3: 31 c9 xor %ecx,%ecx <== NOT EXECUTED
106ac5: 89 f0 mov %esi,%eax <== NOT EXECUTED
106ac7: 89 fa mov %edi,%edx <== NOT EXECUTED
106ac9: e8 ae fa ff ff call 10657c <get_disk_entry> <== NOT EXECUTED
disk_unlock();
106ace: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED
106ad1: e8 66 fb ff ff call 10663c <disk_unlock> <== NOT EXECUTED
106ad6: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
106ad9: eb 02 jmp 106add <rtems_disk_obtain+0x4f><== NOT EXECUTED
rtems_disk_device *
rtems_disk_obtain(dev_t dev)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_disk_device *dd = NULL;
106adb: 31 c0 xor %eax,%eax <== NOT EXECUTED
disk_unlock();
}
}
return dd;
}
106add: 83 c4 1c add $0x1c,%esp
106ae0: 5b pop %ebx
106ae1: 5e pop %esi
106ae2: 5f pop %edi
106ae3: 5d pop %ebp
106ae4: c3 ret
00109579 <rtems_fdisk_abort.constprop.9>:
*
* @param format The format string. See printf for details.
* @param ... The arguments for the format text.
*/
static void
rtems_fdisk_abort (const char *format, ...)
109579: 55 push %ebp <== NOT EXECUTED
10957a: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10957c: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED
{
va_list args;
va_start (args, format);
fprintf (stderr, "fdisk:abort:");
10957f: a1 40 17 14 00 mov 0x141740,%eax <== NOT EXECUTED
109584: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED
109587: 68 c8 e3 12 00 push $0x12e3c8 <== NOT EXECUTED
10958c: e8 83 64 01 00 call 11fa14 <fputs> <== NOT EXECUTED
vfprintf (stderr, format, args);
109591: 58 pop %eax <== NOT EXECUTED
109592: 5a pop %edx <== NOT EXECUTED
109593: a1 40 17 14 00 mov 0x141740,%eax <== NOT EXECUTED
109598: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED
10959b: 68 d5 e3 12 00 push $0x12e3d5 <== NOT EXECUTED
1095a0: e8 6f 64 01 00 call 11fa14 <fputs> <== NOT EXECUTED
fprintf (stderr, "\n");
1095a5: 59 pop %ecx <== NOT EXECUTED
1095a6: 58 pop %eax <== NOT EXECUTED
1095a7: a1 40 17 14 00 mov 0x141740,%eax <== NOT EXECUTED
1095ac: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED
1095af: 6a 0a push $0xa <== NOT EXECUTED
1095b1: e8 a6 63 01 00 call 11f95c <fputc> <== NOT EXECUTED
fflush (stderr);
1095b6: 58 pop %eax <== NOT EXECUTED
1095b7: a1 40 17 14 00 mov 0x141740,%eax <== NOT EXECUTED
1095bc: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED
1095bf: e8 70 5f 01 00 call 11f534 <fflush> <== NOT EXECUTED
va_end (args);
exit (1);
1095c4: c7 04 24 01 00 00 00 movl $0x1,(%esp) <== NOT EXECUTED
1095cb: e8 04 5c 01 00 call 11f1d4 <exit> <== NOT EXECUTED
00108224 <rtems_fdisk_compact>:
* used segments that will fit. The used queue is sorted on the least
* number of active pages.
*/
static int
rtems_fdisk_compact (rtems_flashdisk* fd)
{
108224: 55 push %ebp
108225: 89 e5 mov %esp,%ebp
108227: 57 push %edi
108228: 56 push %esi
108229: 53 push %ebx
10822a: 83 ec 3c sub $0x3c,%esp
10822d: 89 c3 mov %eax,%ebx
static bool
rtems_fdisk_is_erased_blocks_starvation (rtems_flashdisk* fd)
{
bool starvation = fd->erased_blocks < fd->starvation_threshold;
if (starvation)
10822f: 8b 40 24 mov 0x24(%eax),%eax
108232: 39 43 28 cmp %eax,0x28(%ebx)
108235: 0f 83 72 01 00 00 jae 1083ad <rtems_fdisk_compact+0x189>
fd->starvations++;
10823b: ff 43 70 incl 0x70(%ebx)
uint32_t pages;
if (rtems_fdisk_is_erased_blocks_starvation (fd))
{
#if RTEMS_FDISK_TRACE
rtems_fdisk_printf (fd, " resolve starvation");
10823e: 50 push %eax
10823f: 50 push %eax
108240: 68 42 e7 12 00 push $0x12e742
108245: 53 push %ebx
108246: e8 d7 f4 ff ff call 107722 <rtems_fdisk_printf>
#endif
ssc = rtems_fdisk_segment_queue_pop_head (&fd->used);
10824b: 8d 43 40 lea 0x40(%ebx),%eax
10824e: e8 78 f3 ff ff call 1075cb <rtems_fdisk_segment_queue_pop_head>
108253: 89 c6 mov %eax,%esi
if (!ssc)
108255: 83 c4 10 add $0x10,%esp
108258: 85 c0 test %eax,%eax
10825a: 75 0e jne 10826a <rtems_fdisk_compact+0x46><== ALWAYS TAKEN
ssc = rtems_fdisk_segment_queue_pop_head (&fd->available);
10825c: 8d 43 34 lea 0x34(%ebx),%eax <== NOT EXECUTED
10825f: e8 67 f3 ff ff call 1075cb <rtems_fdisk_segment_queue_pop_head><== NOT EXECUTED
108264: 89 c6 mov %eax,%esi <== NOT EXECUTED
if (ssc)
108266: 85 c0 test %eax,%eax <== NOT EXECUTED
108268: 74 38 je 1082a2 <rtems_fdisk_compact+0x7e><== NOT EXECUTED
{
dsc = rtems_fdisk_seg_most_available (&fd->available);
10826a: 8b 43 34 mov 0x34(%ebx),%eax
10826d: e8 e6 f5 ff ff call 107858 <rtems_fdisk_seg_most_available.isra.8>
if (dsc)
108272: 85 c0 test %eax,%eax
108274: 74 22 je 108298 <rtems_fdisk_compact+0x74><== NEVER TAKEN
{
ret = rtems_fdisk_recycle_segment (fd, ssc, dsc, &pages);
108276: 83 ec 0c sub $0xc,%esp
108279: 8d 55 e4 lea -0x1c(%ebp),%edx
10827c: 52 push %edx
10827d: 89 c1 mov %eax,%ecx
10827f: 89 f2 mov %esi,%edx
108281: 89 d8 mov %ebx,%eax
108283: e8 c7 fc ff ff call 107f4f <rtems_fdisk_recycle_segment>
if (ret)
108288: 83 c4 10 add $0x10,%esp
10828b: 85 c0 test %eax,%eax
10828d: 0f 84 1a 01 00 00 je 1083ad <rtems_fdisk_compact+0x189><== ALWAYS TAKEN
108293: e9 46 01 00 00 jmp 1083de <rtems_fdisk_compact+0x1ba><== NOT EXECUTED
return ret;
}
else
{
rtems_fdisk_error ("compacting: starvation");
108298: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10829b: 68 56 e7 12 00 push $0x12e756 <== NOT EXECUTED
1082a0: eb 08 jmp 1082aa <rtems_fdisk_compact+0x86><== NOT EXECUTED
return EIO;
}
}
else
{
rtems_fdisk_error ("compacting: nothing to recycle");
1082a2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1082a5: 68 6d e7 12 00 push $0x12e76d <== NOT EXECUTED
1082aa: e8 3f f5 ff ff call 1077ee <rtems_fdisk_error> <== NOT EXECUTED
1082af: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
return EIO;
1082b2: b8 05 00 00 00 mov $0x5,%eax <== NOT EXECUTED
1082b7: e9 22 01 00 00 jmp 1083de <rtems_fdisk_compact+0x1ba><== NOT EXECUTED
{
uint32_t dst_pages;
uint32_t segments;
#if RTEMS_FDISK_TRACE
rtems_fdisk_printf (fd, " compacting");
1082bc: 57 push %edi
1082bd: 57 push %edi
1082be: 68 8c e7 12 00 push $0x12e78c
1082c3: 53 push %ebx
1082c4: e8 59 f4 ff ff call 107722 <rtems_fdisk_printf>
#endif
dsc = rtems_fdisk_seg_most_available (&fd->available);
1082c9: 8b 43 34 mov 0x34(%ebx),%eax
1082cc: e8 87 f5 ff ff call 107858 <rtems_fdisk_seg_most_available.isra.8>
1082d1: 89 c7 mov %eax,%edi
if (dsc == 0)
1082d3: 83 c4 10 add $0x10,%esp
1082d6: 85 c0 test %eax,%eax
1082d8: 75 0a jne 1082e4 <rtems_fdisk_compact+0xc0><== ALWAYS TAKEN
{
rtems_fdisk_error ("compacting: no available segments to compact too");
1082da: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1082dd: 68 98 e7 12 00 push $0x12e798 <== NOT EXECUTED
1082e2: eb c6 jmp 1082aa <rtems_fdisk_compact+0x86><== NOT EXECUTED
return EIO;
}
ssc = fd->used.head;
1082e4: 8b 73 40 mov 0x40(%ebx),%esi
dst_pages = rtems_fdisk_seg_pages_available (dsc);
1082e7: e8 b9 f3 ff ff call 1076a5 <rtems_fdisk_seg_pages_available>
1082ec: 89 45 cc mov %eax,-0x34(%ebp)
segments = 0;
pages = 0;
1082ef: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
#if RTEMS_FDISK_TRACE
rtems_fdisk_printf (fd, " dsc:%02d-%03d: most available",
1082f6: ff 77 0c pushl 0xc(%edi)
1082f9: ff 77 08 pushl 0x8(%edi)
1082fc: 68 c9 e7 12 00 push $0x12e7c9
108301: 53 push %ebx
108302: e8 1b f4 ff ff call 107722 <rtems_fdisk_printf>
108307: 8b 45 e4 mov -0x1c(%ebp),%eax
* we handle during one compaction. A lower number means less aggressive
* compaction or less delay when compacting but it may mean the disk
* will fill.
*/
while (ssc &&
10830a: 83 c4 10 add $0x10,%esp
return EIO;
}
ssc = fd->used.head;
dst_pages = rtems_fdisk_seg_pages_available (dsc);
segments = 0;
10830d: 31 d2 xor %edx,%edx
* we handle during one compaction. A lower number means less aggressive
* compaction or less delay when compacting but it may mean the disk
* will fill.
*/
while (ssc &&
10830f: eb 06 jmp 108317 <rtems_fdisk_compact+0xf3>
((pages + ssc->pages_active) < dst_pages) &&
((compacted_segs + segments) < fd->compact_segs))
{
pages += ssc->pages_active;
segments++;
108311: 42 inc %edx
ssc = ssc->next;
108312: 8b 36 mov (%esi),%esi
while (ssc &&
((pages + ssc->pages_active) < dst_pages) &&
((compacted_segs + segments) < fd->compact_segs))
{
pages += ssc->pages_active;
108314: 8b 45 d0 mov -0x30(%ebp),%eax
* we handle during one compaction. A lower number means less aggressive
* compaction or less delay when compacting but it may mean the disk
* will fill.
*/
while (ssc &&
108317: 85 f6 test %esi,%esi
108319: 75 18 jne 108333 <rtems_fdisk_compact+0x10f>
10831b: 89 45 e4 mov %eax,-0x1c(%ebp)
*/
if (!ssc || (pages == 0) || ((compacted_segs + segments) == 1))
{
#if RTEMS_FDISK_TRACE
rtems_fdisk_printf (fd, " nothing to compact");
10831e: 56 push %esi
10831f: 56 push %esi
108320: 68 e8 e7 12 00 push $0x12e7e8
108325: 53 push %ebx
108326: e8 f7 f3 ff ff call 107722 <rtems_fdisk_printf>
#endif
break;
10832b: 83 c4 10 add $0x10,%esp
10832e: e9 97 00 00 00 jmp 1083ca <rtems_fdisk_compact+0x1a6>
* compaction or less delay when compacting but it may mean the disk
* will fill.
*/
while (ssc &&
((pages + ssc->pages_active) < dst_pages) &&
108333: 8b 4e 1c mov 0x1c(%esi),%ecx
108336: 01 c1 add %eax,%ecx
108338: 89 4d d0 mov %ecx,-0x30(%ebp)
* we handle during one compaction. A lower number means less aggressive
* compaction or less delay when compacting but it may mean the disk
* will fill.
*/
while (ssc &&
10833b: 8b 4d cc mov -0x34(%ebp),%ecx
10833e: 39 4d d0 cmp %ecx,-0x30(%ebp)
108341: 0f 83 87 00 00 00 jae 1083ce <rtems_fdisk_compact+0x1aa>
* with the most available number of pages and see if we have
* used segments that will fit. The used queue is sorted on the least
* number of active pages.
*/
static int
rtems_fdisk_compact (rtems_flashdisk* fd)
108347: 8b 4d d4 mov -0x2c(%ebp),%ecx
10834a: 01 d1 add %edx,%ecx
* compaction or less delay when compacting but it may mean the disk
* will fill.
*/
while (ssc &&
((pages + ssc->pages_active) < dst_pages) &&
10834c: 3b 4b 0c cmp 0xc(%ebx),%ecx
10834f: 72 c0 jb 108311 <rtems_fdisk_compact+0xed><== ALWAYS TAKEN
108351: eb 7b jmp 1083ce <rtems_fdisk_compact+0x1aa><== NOT EXECUTED
* We need a source segment and have pages to copy and
* compacting one segment to another is silly. Compaction needs
* to free at least one more segment.
*/
if (!ssc || (pages == 0) || ((compacted_segs + segments) == 1))
108353: 01 55 d4 add %edx,-0x2c(%ebp)
108356: 83 7d d4 01 cmpl $0x1,-0x2c(%ebp)
10835a: 74 c2 je 10831e <rtems_fdisk_compact+0xfa>
#endif
break;
}
#if RTEMS_FDISK_TRACE
rtems_fdisk_printf (fd, " ssc scan: %d-%d: p=%ld, seg=%ld",
10835c: 51 push %ecx
10835d: 51 push %ecx
10835e: 52 push %edx
10835f: 50 push %eax
108360: ff 76 0c pushl 0xc(%esi)
108363: ff 76 08 pushl 0x8(%esi)
108366: 68 fc e7 12 00 push $0x12e7fc
10836b: 53 push %ebx
10836c: e8 b1 f3 ff ff call 107722 <rtems_fdisk_printf>
ssc->device, ssc->segment,
pages, segments);
#endif
rtems_fdisk_segment_queue_remove (&fd->available, dsc);
108371: 83 c4 20 add $0x20,%esp
108374: 89 fa mov %edi,%edx
108376: 8b 45 c8 mov -0x38(%ebp),%eax
108379: e8 98 f2 ff ff call 107616 <rtems_fdisk_segment_queue_remove>
{
ssc = rtems_fdisk_segment_queue_pop_head (&fd->used);
if (ssc)
{
ret = rtems_fdisk_recycle_segment (fd, ssc, dsc, &pages);
10837e: 8d 75 e4 lea -0x1c(%ebp),%esi
/*
* We now copy the pages to the new segment.
*/
while (pages)
108381: eb 22 jmp 1083a5 <rtems_fdisk_compact+0x181>
{
ssc = rtems_fdisk_segment_queue_pop_head (&fd->used);
108383: 8b 45 c4 mov -0x3c(%ebp),%eax
108386: e8 40 f2 ff ff call 1075cb <rtems_fdisk_segment_queue_pop_head>
if (ssc)
10838b: 85 c0 test %eax,%eax
10838d: 74 16 je 1083a5 <rtems_fdisk_compact+0x181><== NEVER TAKEN
{
ret = rtems_fdisk_recycle_segment (fd, ssc, dsc, &pages);
10838f: 83 ec 0c sub $0xc,%esp
108392: 56 push %esi
108393: 89 f9 mov %edi,%ecx
108395: 89 c2 mov %eax,%edx
108397: 89 d8 mov %ebx,%eax
108399: e8 b1 fb ff ff call 107f4f <rtems_fdisk_recycle_segment>
if (ret)
10839e: 83 c4 10 add $0x10,%esp
1083a1: 85 c0 test %eax,%eax
1083a3: 75 39 jne 1083de <rtems_fdisk_compact+0x1ba><== NEVER TAKEN
/*
* We now copy the pages to the new segment.
*/
while (pages)
1083a5: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp)
1083a9: 74 15 je 1083c0 <rtems_fdisk_compact+0x19c>
1083ab: eb d6 jmp 108383 <rtems_fdisk_compact+0x15f>
* compaction or less delay when compacting but it may mean the disk
* will fill.
*/
while (ssc &&
((pages + ssc->pages_active) < dst_pages) &&
1083ad: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp)
rtems_fdisk_printf (fd, " ssc scan: %d-%d: p=%ld, seg=%ld",
ssc->device, ssc->segment,
pages, segments);
#endif
rtems_fdisk_segment_queue_remove (&fd->available, dsc);
1083b4: 8d 43 34 lea 0x34(%ebx),%eax
1083b7: 89 45 c8 mov %eax,-0x38(%ebp)
* We now copy the pages to the new segment.
*/
while (pages)
{
ssc = rtems_fdisk_segment_queue_pop_head (&fd->used);
1083ba: 8d 4b 40 lea 0x40(%ebx),%ecx
1083bd: 89 4d c4 mov %ecx,-0x3c(%ebp)
rtems_fdisk_error ("compacting: nothing to recycle");
return EIO;
}
}
while (fd->used.head)
1083c0: 83 7b 40 00 cmpl $0x0,0x40(%ebx)
1083c4: 0f 85 f2 fe ff ff jne 1082bc <rtems_fdisk_compact+0x98>
}
compacted_segs += segments;
}
return 0;
1083ca: 31 c0 xor %eax,%eax
1083cc: eb 10 jmp 1083de <rtems_fdisk_compact+0x1ba>
1083ce: 89 45 e4 mov %eax,-0x1c(%ebp)
* We need a source segment and have pages to copy and
* compacting one segment to another is silly. Compaction needs
* to free at least one more segment.
*/
if (!ssc || (pages == 0) || ((compacted_segs + segments) == 1))
1083d1: 85 c0 test %eax,%eax
1083d3: 0f 85 7a ff ff ff jne 108353 <rtems_fdisk_compact+0x12f>
1083d9: e9 40 ff ff ff jmp 10831e <rtems_fdisk_compact+0xfa>
compacted_segs += segments;
}
return 0;
}
1083de: 8d 65 f4 lea -0xc(%ebp),%esp
1083e1: 5b pop %ebx
1083e2: 5e pop %esi
1083e3: 5f pop %edi
1083e4: 5d pop %ebp
1083e5: c3 ret
00107aaf <rtems_fdisk_erase_segment>:
/**
* Erase the segment.
*/
static int
rtems_fdisk_erase_segment (rtems_flashdisk* fd, rtems_fdisk_segment_ctl* sc)
{
107aaf: 55 push %ebp
107ab0: 89 e5 mov %esp,%ebp
107ab2: 57 push %edi
107ab3: 56 push %esi
107ab4: 53 push %ebx
107ab5: 83 ec 20 sub $0x20,%esp
107ab8: 89 c6 mov %eax,%esi
107aba: 89 d3 mov %edx,%ebx
int ret;
uint32_t device;
uint32_t segment;
const rtems_fdisk_segment_desc* sd;
const rtems_fdisk_driver_handlers* ops;
device = sc->device;
107abc: 8b 7a 08 mov 0x8(%edx),%edi
segment = sc->segment;
107abf: 8b 52 0c mov 0xc(%edx),%edx
static const rtems_fdisk_segment_desc*
rtems_fdisk_seg_descriptor (const rtems_flashdisk* fd,
uint32_t device,
uint32_t segment)
{
return fd->devices[device].segments[segment].descriptor;
107ac2: 6b c7 0c imul $0xc,%edi,%eax
107ac5: 03 46 2c add 0x2c(%esi),%eax
const rtems_fdisk_segment_desc* sd;
const rtems_fdisk_driver_handlers* ops;
device = sc->device;
segment = sc->segment;
sd = rtems_fdisk_seg_descriptor (fd, device, segment);
ops = fd->devices[device].descriptor->flash_ops;
107ac8: 8b 48 08 mov 0x8(%eax),%ecx
ret = ops->erase (sd, device, segment);
107acb: 8b 49 08 mov 0x8(%ecx),%ecx
107ace: 52 push %edx
107acf: 57 push %edi
static const rtems_fdisk_segment_desc*
rtems_fdisk_seg_descriptor (const rtems_flashdisk* fd,
uint32_t device,
uint32_t segment)
{
return fd->devices[device].segments[segment].descriptor;
107ad0: 6b d2 30 imul $0x30,%edx,%edx
107ad3: 03 10 add (%eax),%edx
const rtems_fdisk_driver_handlers* ops;
device = sc->device;
segment = sc->segment;
sd = rtems_fdisk_seg_descriptor (fd, device, segment);
ops = fd->devices[device].descriptor->flash_ops;
ret = ops->erase (sd, device, segment);
107ad5: ff 72 04 pushl 0x4(%edx)
107ad8: ff 51 10 call *0x10(%ecx)
107adb: 89 45 e4 mov %eax,-0x1c(%ebp)
if (ret)
107ade: 83 c4 10 add $0x10,%esp
107ae1: 85 c0 test %eax,%eax
107ae3: 74 39 je 107b1e <rtems_fdisk_erase_segment+0x6f><== ALWAYS TAKEN
{
rtems_fdisk_error (" erase-segment:%02d-%03d: " \
107ae5: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107ae8: 50 push %eax <== NOT EXECUTED
107ae9: e8 d6 95 01 00 call 1210c4 <strerror> <== NOT EXECUTED
107aee: 59 pop %ecx <== NOT EXECUTED
107aef: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
107af2: 50 push %eax <== NOT EXECUTED
107af3: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED
107af6: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED
107af9: 68 5f e4 12 00 push $0x12e45f <== NOT EXECUTED
107afe: e8 eb fc ff ff call 1077ee <rtems_fdisk_error> <== NOT EXECUTED
"segment erase failed: %s (%d)",
sc->device, sc->segment, strerror (ret), ret);
sc->failed = true;
107b03: c7 43 28 01 00 00 00 movl $0x1,0x28(%ebx) <== NOT EXECUTED
}
rtems_flashdisk_count = rtems_flashdisk_configuration_size;
return RTEMS_SUCCESSFUL;
}
107b0a: 8b 46 58 mov 0x58(%esi),%eax <== NOT EXECUTED
107b0d: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
107b10: eb 06 jmp 107b18 <rtems_fdisk_erase_segment+0x69><== NOT EXECUTED
{
rtems_fdisk_segment_ctl* it = queue->head;
while (it)
{
if (it == sc)
107b12: 39 d8 cmp %ebx,%eax <== NOT EXECUTED
107b14: 74 4a je 107b60 <rtems_fdisk_erase_segment+0xb1><== NOT EXECUTED
return true;
it = it->next;
107b16: 8b 00 mov (%eax),%eax <== NOT EXECUTED
rtems_fdisk_segment_queue_present (rtems_fdisk_segment_ctl_queue* queue,
rtems_fdisk_segment_ctl* sc)
{
rtems_fdisk_segment_ctl* it = queue->head;
while (it)
107b18: 85 c0 test %eax,%eax <== NOT EXECUTED
107b1a: 75 f6 jne 107b12 <rtems_fdisk_erase_segment+0x63><== NOT EXECUTED
107b1c: eb 38 jmp 107b56 <rtems_fdisk_erase_segment+0xa7><== NOT EXECUTED
if (!rtems_fdisk_segment_queue_present (&fd->failed, sc))
rtems_fdisk_segment_queue_push_tail (&fd->failed, sc);
return ret;
}
fd->erased_blocks += sc->pages;
107b1e: 8b 43 14 mov 0x14(%ebx),%eax
107b21: 01 46 28 add %eax,0x28(%esi)
sc->erased++;
107b24: ff 43 2c incl 0x2c(%ebx)
memset (sc->page_descriptors, 0xff, sc->pages_desc * fd->block_size);
107b27: 8b 4e 14 mov 0x14(%esi),%ecx
107b2a: 0f af 4b 18 imul 0x18(%ebx),%ecx
107b2e: b0 ff mov $0xff,%al
107b30: 8b 7b 10 mov 0x10(%ebx),%edi
107b33: f3 aa rep stos %al,%es:(%edi)
sc->pages_active = 0;
107b35: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx)
sc->pages_used = 0;
107b3c: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx)
sc->pages_bad = 0;
107b43: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx)
sc->failed = false;
107b4a: c7 43 28 00 00 00 00 movl $0x0,0x28(%ebx)
/*
* Push to the tail of the available queue. It is a very
* simple type of wear reduction. Every other available
* segment will now get a go.
*/
rtems_fdisk_segment_queue_push_tail (&fd->available, sc);
107b51: 8d 46 34 lea 0x34(%esi),%eax
107b54: eb 03 jmp 107b59 <rtems_fdisk_erase_segment+0xaa>
rtems_fdisk_error (" erase-segment:%02d-%03d: " \
"segment erase failed: %s (%d)",
sc->device, sc->segment, strerror (ret), ret);
sc->failed = true;
if (!rtems_fdisk_segment_queue_present (&fd->failed, sc))
rtems_fdisk_segment_queue_push_tail (&fd->failed, sc);
107b56: 8d 46 58 lea 0x58(%esi),%eax <== NOT EXECUTED
107b59: 89 da mov %ebx,%edx
107b5b: e8 90 fa ff ff call 1075f0 <rtems_fdisk_segment_queue_push_tail>
* segment will now get a go.
*/
rtems_fdisk_segment_queue_push_tail (&fd->available, sc);
return 0;
}
107b60: 8b 45 e4 mov -0x1c(%ebp),%eax
107b63: 8d 65 f4 lea -0xc(%ebp),%esp
107b66: 5b pop %ebx
107b67: 5e pop %esi
107b68: 5f pop %edi
107b69: 5d pop %ebp
107b6a: c3 ret
001077ee <rtems_fdisk_error>:
* @param ... The arguments for the format text.
* @return int The number of bytes written to the output.
*/
static int
rtems_fdisk_error (const char *format, ...)
{
1077ee: 55 push %ebp <== NOT EXECUTED
1077ef: 89 e5 mov %esp,%ebp <== NOT EXECUTED
1077f1: 53 push %ebx <== NOT EXECUTED
1077f2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
int ret;
va_list args;
va_start (args, format);
1077f5: 8d 5d 0c lea 0xc(%ebp),%ebx <== NOT EXECUTED
fprintf (stderr, "fdisk:error:");
1077f8: a1 40 17 14 00 mov 0x141740,%eax <== NOT EXECUTED
1077fd: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED
107800: 68 bb e3 12 00 push $0x12e3bb <== NOT EXECUTED
107805: e8 0a 82 01 00 call 11fa14 <fputs> <== NOT EXECUTED
ret = vfprintf (stderr, format, args);
10780a: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
10780d: 53 push %ebx <== NOT EXECUTED
10780e: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
107811: a1 40 17 14 00 mov 0x141740,%eax <== NOT EXECUTED
107816: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED
107819: e8 fa 08 02 00 call 128118 <vfprintf> <== NOT EXECUTED
10781e: 89 c3 mov %eax,%ebx <== NOT EXECUTED
fprintf (stderr, "\n");
107820: 58 pop %eax <== NOT EXECUTED
107821: 5a pop %edx <== NOT EXECUTED
107822: a1 40 17 14 00 mov 0x141740,%eax <== NOT EXECUTED
107827: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED
10782a: 6a 0a push $0xa <== NOT EXECUTED
10782c: e8 2b 81 01 00 call 11f95c <fputc> <== NOT EXECUTED
fflush (stderr);
107831: 59 pop %ecx <== NOT EXECUTED
107832: a1 40 17 14 00 mov 0x141740,%eax <== NOT EXECUTED
107837: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED
10783a: e8 f5 7c 01 00 call 11f534 <fflush> <== NOT EXECUTED
va_end (args);
return ret;
}
10783f: 89 d8 mov %ebx,%eax <== NOT EXECUTED
107841: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
107844: c9 leave <== NOT EXECUTED
107845: c3 ret <== NOT EXECUTED
001076ba <rtems_fdisk_info>:
* @param ... The arguments for the format text.
* @return int The number of bytes written to the output.
*/
static int
rtems_fdisk_info (const rtems_flashdisk* fd, const char *format, ...)
{
1076ba: 55 push %ebp
1076bb: 89 e5 mov %esp,%ebp
1076bd: 53 push %ebx
1076be: 50 push %eax
int ret = 0;
if (fd->info_level >= 2)
1076bf: 8b 45 08 mov 0x8(%ebp),%eax
1076c2: 83 78 6c 01 cmpl $0x1,0x6c(%eax)
1076c6: 76 51 jbe 107719 <rtems_fdisk_info+0x5f> <== ALWAYS TAKEN
{
va_list args;
va_start (args, format);
1076c8: 8d 5d 10 lea 0x10(%ebp),%ebx <== NOT EXECUTED
fprintf (stdout, "fdisk:");
1076cb: 50 push %eax <== NOT EXECUTED
1076cc: 50 push %eax <== NOT EXECUTED
1076cd: a1 40 17 14 00 mov 0x141740,%eax <== NOT EXECUTED
1076d2: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED
1076d5: 68 a5 e3 12 00 push $0x12e3a5 <== NOT EXECUTED
1076da: e8 35 83 01 00 call 11fa14 <fputs> <== NOT EXECUTED
ret = vfprintf (stdout, format, args);
1076df: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
1076e2: 53 push %ebx <== NOT EXECUTED
1076e3: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
1076e6: a1 40 17 14 00 mov 0x141740,%eax <== NOT EXECUTED
1076eb: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED
1076ee: e8 25 0a 02 00 call 128118 <vfprintf> <== NOT EXECUTED
1076f3: 89 c3 mov %eax,%ebx <== NOT EXECUTED
fprintf (stdout, "\n");
1076f5: 5a pop %edx <== NOT EXECUTED
1076f6: 59 pop %ecx <== NOT EXECUTED
1076f7: a1 40 17 14 00 mov 0x141740,%eax <== NOT EXECUTED
1076fc: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED
1076ff: 6a 0a push $0xa <== NOT EXECUTED
107701: e8 56 82 01 00 call 11f95c <fputc> <== NOT EXECUTED
fflush (stdout);
107706: 58 pop %eax <== NOT EXECUTED
107707: a1 40 17 14 00 mov 0x141740,%eax <== NOT EXECUTED
10770c: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED
10770f: e8 20 7e 01 00 call 11f534 <fflush> <== NOT EXECUTED
va_end (args);
107714: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
107717: eb 02 jmp 10771b <rtems_fdisk_info+0x61> <== NOT EXECUTED
* @return int The number of bytes written to the output.
*/
static int
rtems_fdisk_info (const rtems_flashdisk* fd, const char *format, ...)
{
int ret = 0;
107719: 31 db xor %ebx,%ebx
fprintf (stdout, "\n");
fflush (stdout);
va_end (args);
}
return ret;
}
10771b: 89 d8 mov %ebx,%eax
10771d: 8b 5d fc mov -0x4(%ebp),%ebx
107720: c9 leave
107721: c3 ret
0010911f <rtems_fdisk_initialize>:
*/
rtems_device_driver
rtems_fdisk_initialize (rtems_device_major_number major,
rtems_device_minor_number minor,
void* arg __attribute__((unused)))
{
10911f: 55 push %ebp
109120: 89 e5 mov %esp,%ebp
109122: 57 push %edi
109123: 56 push %esi
109124: 53 push %ebx
109125: 83 ec 4c sub $0x4c,%esp
const rtems_flashdisk_config* c = rtems_flashdisk_configuration;
rtems_flashdisk* fd;
rtems_status_code sc;
sc = rtems_disk_io_initialize ();
109128: e8 57 e3 ff ff call 107484 <rtems_disk_io_initialize>
if (sc != RTEMS_SUCCESSFUL)
10912d: 85 c0 test %eax,%eax
10912f: 0f 85 3c 04 00 00 jne 109571 <rtems_fdisk_initialize+0x452><== NEVER TAKEN
static rtems_status_code
rtems_fdisk_crc16_gen_factors (uint16_t pattern)
{
uint32_t b;
rtems_fdisk_crc16_factor = malloc (sizeof (uint16_t) * 256);
109135: 83 ec 0c sub $0xc,%esp
109138: 68 00 02 00 00 push $0x200
10913d: e8 be 12 00 00 call 10a400 <malloc>
109142: a3 84 34 15 00 mov %eax,0x153484
if (!rtems_fdisk_crc16_factor)
109147: 83 c4 10 add $0x10,%esp
10914a: 31 c9 xor %ecx,%ecx
10914c: 85 c0 test %eax,%eax
10914e: 75 05 jne 109155 <rtems_fdisk_initialize+0x36><== ALWAYS TAKEN
109150: e9 cd 03 00 00 jmp 109522 <rtems_fdisk_initialize+0x403><== NOT EXECUTED
return RTEMS_NO_MEMORY;
for (b = 0; b < 256; b++)
{
uint32_t i;
uint16_t v = b;
109155: 89 ca mov %ecx,%edx
109157: bb 09 00 00 00 mov $0x9,%ebx
10915c: eb 12 jmp 109170 <rtems_fdisk_initialize+0x51>
for (i = 8; i--;)
v = v & 1 ? (v >> 1) ^ pattern : v >> 1;
10915e: f6 c2 01 test $0x1,%dl
109161: 74 0a je 10916d <rtems_fdisk_initialize+0x4e>
109163: 66 d1 ea shr %dx
109166: 66 81 f2 08 84 xor $0x8408,%dx
10916b: eb 03 jmp 109170 <rtems_fdisk_initialize+0x51>
10916d: 66 d1 ea shr %dx
for (b = 0; b < 256; b++)
{
uint32_t i;
uint16_t v = b;
for (i = 8; i--;)
109170: 4b dec %ebx
109171: 75 eb jne 10915e <rtems_fdisk_initialize+0x3f>
v = v & 1 ? (v >> 1) ^ pattern : v >> 1;
rtems_fdisk_crc16_factor[b] = v & 0xffff;
109173: 66 89 14 48 mov %dx,(%eax,%ecx,2)
rtems_fdisk_crc16_factor = malloc (sizeof (uint16_t) * 256);
if (!rtems_fdisk_crc16_factor)
return RTEMS_NO_MEMORY;
for (b = 0; b < 256; b++)
109177: 41 inc %ecx
109178: 81 f9 00 01 00 00 cmp $0x100,%ecx
10917e: 75 d5 jne 109155 <rtems_fdisk_initialize+0x36>
109180: e9 bb 03 00 00 jmp 109540 <rtems_fdisk_initialize+0x421>
if (!rtems_flashdisks)
return RTEMS_NO_MEMORY;
for (minor = 0; minor < rtems_flashdisk_configuration_size; minor++, c++)
{
char name[] = RTEMS_FLASHDISK_DEVICE_BASE_NAME "a";
109185: be 38 ee 12 00 mov $0x12ee38,%esi
10918a: b9 0a 00 00 00 mov $0xa,%ecx
10918f: 8b 7d d4 mov -0x2c(%ebp),%edi
109192: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
temp.__overlay.minor = _minor;
return temp.device;
109194: 8b 45 08 mov 0x8(%ebp),%eax
109197: 89 45 b0 mov %eax,-0x50(%ebp)
10919a: 8b 55 bc mov -0x44(%ebp),%edx
10919d: 89 55 b4 mov %edx,-0x4c(%ebp)
* @param major Flash disk major device number.
* @param minor Minor device number, not applicable.
* @param arg Initialization argument, not applicable.
*/
rtems_device_driver
rtems_fdisk_initialize (rtems_device_major_number major,
1091a0: 6b da 74 imul $0x74,%edx,%ebx
dev_t dev = rtems_filesystem_make_dev_t (major, minor);
uint32_t device;
uint32_t blocks = 0;
int ret;
fd = &rtems_flashdisks[minor];
1091a3: 03 1d 7c 34 15 00 add 0x15347c,%ebx
name [sizeof(RTEMS_FLASHDISK_DEVICE_BASE_NAME)] += minor;
1091a9: 88 55 e7 mov %dl,-0x19(%ebp)
fd->major = major;
1091ac: 89 03 mov %eax,(%ebx)
fd->minor = minor;
1091ae: 89 53 04 mov %edx,0x4(%ebx)
fd->flags = c->flags;
1091b1: 8b 55 d0 mov -0x30(%ebp),%edx
1091b4: 8b 42 0c mov 0xc(%edx),%eax
1091b7: 89 43 08 mov %eax,0x8(%ebx)
fd->compact_segs = c->compact_segs;
1091ba: 8b 42 14 mov 0x14(%edx),%eax
1091bd: 89 43 0c mov %eax,0xc(%ebx)
fd->avail_compact_segs = c->avail_compact_segs;
1091c0: 8b 42 18 mov 0x18(%edx),%eax
1091c3: 89 43 10 mov %eax,0x10(%ebx)
fd->block_size = c->block_size;
1091c6: 8b 0a mov (%edx),%ecx
1091c8: 89 4d cc mov %ecx,-0x34(%ebp)
1091cb: 89 4b 14 mov %ecx,0x14(%ebx)
fd->unavail_blocks = c->unavail_blocks;
1091ce: 8b 42 10 mov 0x10(%edx),%eax
1091d1: 89 43 20 mov %eax,0x20(%ebx)
fd->info_level = c->info_level;
1091d4: 8b 42 1c mov 0x1c(%edx),%eax
1091d7: 89 43 6c mov %eax,0x6c(%ebx)
for (device = 0; device < c->device_count; device++)
1091da: 8b 4a 04 mov 0x4(%edx),%ecx
1091dd: 89 4d ac mov %ecx,-0x54(%ebp)
for (minor = 0; minor < rtems_flashdisk_configuration_size; minor++, c++)
{
char name[] = RTEMS_FLASHDISK_DEVICE_BASE_NAME "a";
dev_t dev = rtems_filesystem_make_dev_t (major, minor);
uint32_t device;
uint32_t blocks = 0;
1091e0: c7 45 c8 00 00 00 00 movl $0x0,-0x38(%ebp)
fd->avail_compact_segs = c->avail_compact_segs;
fd->block_size = c->block_size;
fd->unavail_blocks = c->unavail_blocks;
fd->info_level = c->info_level;
for (device = 0; device < c->device_count; device++)
1091e7: 31 f6 xor %esi,%esi
1091e9: eb 5e jmp 109249 <rtems_fdisk_initialize+0x12a>
* @param major Flash disk major device number.
* @param minor Minor device number, not applicable.
* @param arg Initialization argument, not applicable.
*/
rtems_device_driver
rtems_fdisk_initialize (rtems_device_major_number major,
1091eb: 6b fe 0c imul $0xc,%esi,%edi
fd->block_size = c->block_size;
fd->unavail_blocks = c->unavail_blocks;
fd->info_level = c->info_level;
for (device = 0; device < c->device_count; device++)
blocks += rtems_fdisk_blocks_in_device (&c->devices[device],
1091ee: 8b 45 d0 mov -0x30(%ebp),%eax
1091f1: 03 78 08 add 0x8(%eax),%edi
rtems_fdisk_blocks_in_device (const rtems_fdisk_device_desc* dd,
uint32_t page_size)
{
uint32_t count = 0;
uint32_t s;
for (s = 0; s < dd->segment_count; s++)
1091f4: 8b 0f mov (%edi),%ecx
1091f6: 89 4d a8 mov %ecx,-0x58(%ebp)
1091f9: c7 45 c0 00 00 00 00 movl $0x0,-0x40(%ebp)
*/
static uint32_t
rtems_fdisk_blocks_in_device (const rtems_fdisk_device_desc* dd,
uint32_t page_size)
{
uint32_t count = 0;
109200: c7 45 b8 00 00 00 00 movl $0x0,-0x48(%ebp)
109207: eb 31 jmp 10923a <rtems_fdisk_initialize+0x11b>
* @param major Flash disk major device number.
* @param minor Minor device number, not applicable.
* @param arg Initialization argument, not applicable.
*/
rtems_device_driver
rtems_fdisk_initialize (rtems_device_major_number major,
109209: 6b 4d c0 0c imul $0xc,-0x40(%ebp),%ecx
{
uint32_t count = 0;
uint32_t s;
for (s = 0; s < dd->segment_count; s++)
{
const rtems_fdisk_segment_desc* sd = &dd->segments[s];
10920d: 03 4f 04 add 0x4(%edi),%ecx
*/
static uint32_t
rtems_fdisk_pages_in_segment (const rtems_fdisk_segment_desc* sd,
uint32_t page_size)
{
return sd->size / page_size;
109210: 8b 41 08 mov 0x8(%ecx),%eax
109213: 31 d2 xor %edx,%edx
109215: f7 75 cc divl -0x34(%ebp)
rtems_fdisk_page_desc_pages (const rtems_fdisk_segment_desc* sd,
uint32_t page_size)
{
uint32_t pages = rtems_fdisk_pages_in_segment (sd, page_size);
uint32_t bytes = pages * sizeof (rtems_fdisk_page_desc);
return ((bytes - 1) / page_size) + 1;
109218: 8d 50 ff lea -0x1(%eax),%edx
10921b: 89 55 c4 mov %edx,-0x3c(%ebp)
10921e: 8d 04 c5 ff ff ff ff lea -0x1(,%eax,8),%eax
109225: 31 d2 xor %edx,%edx
109227: f7 75 cc divl -0x34(%ebp)
uint32_t s;
for (s = 0; s < dd->segment_count; s++)
{
const rtems_fdisk_segment_desc* sd = &dd->segments[s];
count +=
(rtems_fdisk_pages_in_segment (sd, page_size) -
10922a: 29 45 c4 sub %eax,-0x3c(%ebp)
rtems_fdisk_page_desc_pages (sd, page_size)) * sd->count;
10922d: 0f b7 01 movzwl (%ecx),%eax
109230: 0f af 45 c4 imul -0x3c(%ebp),%eax
uint32_t count = 0;
uint32_t s;
for (s = 0; s < dd->segment_count; s++)
{
const rtems_fdisk_segment_desc* sd = &dd->segments[s];
count +=
109234: 01 45 b8 add %eax,-0x48(%ebp)
rtems_fdisk_blocks_in_device (const rtems_fdisk_device_desc* dd,
uint32_t page_size)
{
uint32_t count = 0;
uint32_t s;
for (s = 0; s < dd->segment_count; s++)
109237: ff 45 c0 incl -0x40(%ebp)
10923a: 8b 4d a8 mov -0x58(%ebp),%ecx
10923d: 39 4d c0 cmp %ecx,-0x40(%ebp)
109240: 75 c7 jne 109209 <rtems_fdisk_initialize+0xea>
fd->block_size = c->block_size;
fd->unavail_blocks = c->unavail_blocks;
fd->info_level = c->info_level;
for (device = 0; device < c->device_count; device++)
blocks += rtems_fdisk_blocks_in_device (&c->devices[device],
109242: 8b 4d b8 mov -0x48(%ebp),%ecx
109245: 01 4d c8 add %ecx,-0x38(%ebp)
fd->avail_compact_segs = c->avail_compact_segs;
fd->block_size = c->block_size;
fd->unavail_blocks = c->unavail_blocks;
fd->info_level = c->info_level;
for (device = 0; device < c->device_count; device++)
109248: 46 inc %esi
109249: 3b 75 ac cmp -0x54(%ebp),%esi
10924c: 75 9d jne 1091eb <rtems_fdisk_initialize+0xcc>
c->block_size);
/*
* One copy buffer of a page size.
*/
fd->copy_buffer = malloc (c->block_size);
10924e: 83 ec 0c sub $0xc,%esp
109251: ff 75 cc pushl -0x34(%ebp)
109254: e8 a7 11 00 00 call 10a400 <malloc>
109259: 89 43 68 mov %eax,0x68(%ebx)
if (!fd->copy_buffer)
10925c: 83 c4 10 add $0x10,%esp
10925f: 85 c0 test %eax,%eax
109261: 0f 84 bb 02 00 00 je 109522 <rtems_fdisk_initialize+0x403><== NEVER TAKEN
return RTEMS_NO_MEMORY;
fd->blocks = calloc (blocks, sizeof (rtems_fdisk_block_ctl));
109267: 52 push %edx
109268: 52 push %edx
109269: 6a 08 push $0x8
10926b: ff 75 c8 pushl -0x38(%ebp)
10926e: e8 69 09 00 00 call 109bdc <calloc>
109273: 89 43 18 mov %eax,0x18(%ebx)
if (!fd->blocks)
109276: 83 c4 10 add $0x10,%esp
109279: 85 c0 test %eax,%eax
10927b: 0f 84 a1 02 00 00 je 109522 <rtems_fdisk_initialize+0x403><== NEVER TAKEN
return RTEMS_NO_MEMORY;
fd->block_count = blocks;
109281: 8b 4d c8 mov -0x38(%ebp),%ecx
109284: 89 4b 1c mov %ecx,0x1c(%ebx)
fd->devices = calloc (c->device_count, sizeof (rtems_fdisk_device_ctl));
109287: 50 push %eax
109288: 50 push %eax
109289: 6a 0c push $0xc
10928b: 56 push %esi
10928c: e8 4b 09 00 00 call 109bdc <calloc>
109291: 89 43 2c mov %eax,0x2c(%ebx)
if (!fd->devices)
109294: 83 c4 10 add $0x10,%esp
109297: 85 c0 test %eax,%eax
109299: 0f 84 83 02 00 00 je 109522 <rtems_fdisk_initialize+0x403><== NEVER TAKEN
return RTEMS_NO_MEMORY;
sc = rtems_semaphore_create (rtems_build_name ('F', 'D', 'S', 'K'), 1,
10929f: 83 ec 0c sub $0xc,%esp
1092a2: 8d 43 64 lea 0x64(%ebx),%eax
1092a5: 50 push %eax
1092a6: 6a 00 push $0x0
1092a8: 6a 54 push $0x54
1092aa: 6a 01 push $0x1
1092ac: 68 4b 53 44 46 push $0x4644534b
1092b1: e8 b2 47 00 00 call 10da68 <rtems_semaphore_create>
1092b6: 89 c6 mov %eax,%esi
RTEMS_PRIORITY | RTEMS_BINARY_SEMAPHORE |
RTEMS_INHERIT_PRIORITY, 0, &fd->lock);
if (sc != RTEMS_SUCCESSFUL)
1092b8: 83 c4 20 add $0x20,%esp
1092bb: 85 c0 test %eax,%eax
1092bd: 74 2a je 1092e9 <rtems_fdisk_initialize+0x1ca><== ALWAYS TAKEN
{
rtems_fdisk_error ("disk lock create failed");
1092bf: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1092c2: 68 c5 ed 12 00 push $0x12edc5 <== NOT EXECUTED
1092c7: e8 22 e5 ff ff call 1077ee <rtems_fdisk_error> <== NOT EXECUTED
free (fd->copy_buffer);
1092cc: 58 pop %eax <== NOT EXECUTED
1092cd: ff 73 68 pushl 0x68(%ebx) <== NOT EXECUTED
1092d0: e8 13 0c 00 00 call 109ee8 <free> <== NOT EXECUTED
free (fd->blocks);
1092d5: 58 pop %eax <== NOT EXECUTED
1092d6: ff 73 18 pushl 0x18(%ebx) <== NOT EXECUTED
1092d9: e8 0a 0c 00 00 call 109ee8 <free> <== NOT EXECUTED
free (fd->devices);
1092de: 58 pop %eax <== NOT EXECUTED
1092df: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED
1092e2: e8 01 0c 00 00 call 109ee8 <free> <== NOT EXECUTED
1092e7: eb 6f jmp 109358 <rtems_fdisk_initialize+0x239><== NOT EXECUTED
return sc;
}
sc = rtems_disk_create_phys(dev, c->block_size,
1092e9: 50 push %eax
1092ea: 8d 45 de lea -0x22(%ebp),%eax
1092ed: 50 push %eax
1092ee: 6a 00 push $0x0
1092f0: 68 e6 83 10 00 push $0x1083e6
1092f5: 8b 45 c8 mov -0x38(%ebp),%eax
1092f8: 2b 43 20 sub 0x20(%ebx),%eax
1092fb: 50 push %eax
1092fc: 8b 55 d0 mov -0x30(%ebp),%edx
1092ff: ff 32 pushl (%edx)
109301: ff 75 b4 pushl -0x4c(%ebp)
109304: ff 75 b0 pushl -0x50(%ebp)
109307: e8 9f df ff ff call 1072ab <rtems_disk_create_phys>
10930c: 89 c6 mov %eax,%esi
blocks - fd->unavail_blocks,
rtems_fdisk_ioctl, NULL, name);
if (sc != RTEMS_SUCCESSFUL)
10930e: 83 c4 20 add $0x20,%esp
109311: 85 c0 test %eax,%eax
109313: 0f 84 39 01 00 00 je 109452 <rtems_fdisk_initialize+0x333><== ALWAYS TAKEN
{
rtems_semaphore_delete (fd->lock);
109319: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10931c: ff 73 64 pushl 0x64(%ebx) <== NOT EXECUTED
10931f: e8 e4 48 00 00 call 10dc08 <rtems_semaphore_delete><== NOT EXECUTED
rtems_disk_delete (dev);
109324: 58 pop %eax <== NOT EXECUTED
109325: 5a pop %edx <== NOT EXECUTED
109326: ff 75 b4 pushl -0x4c(%ebp) <== NOT EXECUTED
109329: ff 75 b0 pushl -0x50(%ebp) <== NOT EXECUTED
10932c: e8 80 dd ff ff call 1070b1 <rtems_disk_delete> <== NOT EXECUTED
free (fd->copy_buffer);
109331: 59 pop %ecx <== NOT EXECUTED
109332: ff 73 68 pushl 0x68(%ebx) <== NOT EXECUTED
109335: e8 ae 0b 00 00 call 109ee8 <free> <== NOT EXECUTED
free (fd->blocks);
10933a: 5f pop %edi <== NOT EXECUTED
10933b: ff 73 18 pushl 0x18(%ebx) <== NOT EXECUTED
10933e: e8 a5 0b 00 00 call 109ee8 <free> <== NOT EXECUTED
free (fd->devices);
109343: 58 pop %eax <== NOT EXECUTED
109344: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED
109347: e8 9c 0b 00 00 call 109ee8 <free> <== NOT EXECUTED
rtems_fdisk_error ("disk create phy failed");
10934c: c7 04 24 dd ed 12 00 movl $0x12eddd,(%esp) <== NOT EXECUTED
109353: e8 96 e4 ff ff call 1077ee <rtems_fdisk_error> <== NOT EXECUTED
109358: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
free (fd->blocks);
free (fd->devices);
return sc;
}
sc = rtems_disk_create_phys(dev, c->block_size,
10935b: 89 f0 mov %esi,%eax <== NOT EXECUTED
10935d: e9 0f 02 00 00 jmp 109571 <rtems_fdisk_initialize+0x452><== NOT EXECUTED
* @param major Flash disk major device number.
* @param minor Minor device number, not applicable.
* @param arg Initialization argument, not applicable.
*/
rtems_device_driver
rtems_fdisk_initialize (rtems_device_major_number major,
109362: 6b 4d cc 0c imul $0xc,-0x34(%ebp),%ecx
{
rtems_fdisk_segment_ctl* sc;
uint32_t segment_count;
uint32_t segment;
segment_count = rtems_fdisk_count_segments (&c->devices[device]);
109366: 8b 45 d0 mov -0x30(%ebp),%eax
109369: 8b 70 08 mov 0x8(%eax),%esi
10936c: 01 ce add %ecx,%esi
static uint32_t
rtems_fdisk_count_segments (const rtems_fdisk_device_desc* dd)
{
uint32_t count = 0;
uint32_t segment;
for (segment = 0; segment < dd->segment_count; segment++)
10936e: 8b 16 mov (%esi),%edx
109370: 89 55 ac mov %edx,-0x54(%ebp)
109373: 31 c0 xor %eax,%eax
* Count the segments for a device.
*/
static uint32_t
rtems_fdisk_count_segments (const rtems_fdisk_device_desc* dd)
{
uint32_t count = 0;
109375: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp)
10937c: eb 0d jmp 10938b <rtems_fdisk_initialize+0x26c>
uint32_t segment;
for (segment = 0; segment < dd->segment_count; segment++)
count += dd->segments[segment].count;
10937e: 6b d0 0c imul $0xc,%eax,%edx
109381: 03 56 04 add 0x4(%esi),%edx
109384: 0f b7 12 movzwl (%edx),%edx
109387: 01 55 c4 add %edx,-0x3c(%ebp)
static uint32_t
rtems_fdisk_count_segments (const rtems_fdisk_device_desc* dd)
{
uint32_t count = 0;
uint32_t segment;
for (segment = 0; segment < dd->segment_count; segment++)
10938a: 40 inc %eax
10938b: 3b 45 ac cmp -0x54(%ebp),%eax
10938e: 75 ee jne 10937e <rtems_fdisk_initialize+0x25f>
uint32_t segment_count;
uint32_t segment;
segment_count = rtems_fdisk_count_segments (&c->devices[device]);
fd->devices[device].segments = calloc (segment_count,
109390: 03 4b 2c add 0x2c(%ebx),%ecx
109393: 89 4d c0 mov %ecx,-0x40(%ebp)
109396: 57 push %edi
109397: 57 push %edi
109398: 6a 30 push $0x30
10939a: ff 75 c4 pushl -0x3c(%ebp)
10939d: e8 3a 08 00 00 call 109bdc <calloc>
1093a2: 8b 4d c0 mov -0x40(%ebp),%ecx
1093a5: 89 01 mov %eax,(%ecx)
sizeof (rtems_fdisk_segment_ctl));
if (!fd->devices[device].segments)
1093a7: 83 c4 10 add $0x10,%esp
1093aa: 85 c0 test %eax,%eax
1093ac: 0f 85 80 00 00 00 jne 109432 <rtems_fdisk_initialize+0x313><== ALWAYS TAKEN
{
rtems_disk_delete (dev);
1093b2: 50 push %eax <== NOT EXECUTED
1093b3: 50 push %eax <== NOT EXECUTED
1093b4: ff 75 b4 pushl -0x4c(%ebp) <== NOT EXECUTED
1093b7: ff 75 b0 pushl -0x50(%ebp) <== NOT EXECUTED
1093ba: e8 f2 dc ff ff call 1070b1 <rtems_disk_delete> <== NOT EXECUTED
rtems_semaphore_delete (fd->lock);
1093bf: 58 pop %eax <== NOT EXECUTED
1093c0: ff 73 64 pushl 0x64(%ebx) <== NOT EXECUTED
1093c3: e8 40 48 00 00 call 10dc08 <rtems_semaphore_delete><== NOT EXECUTED
free (fd->copy_buffer);
1093c8: 58 pop %eax <== NOT EXECUTED
1093c9: ff 73 68 pushl 0x68(%ebx) <== NOT EXECUTED
1093cc: e8 17 0b 00 00 call 109ee8 <free> <== NOT EXECUTED
free (fd->blocks);
1093d1: 5a pop %edx <== NOT EXECUTED
1093d2: ff 73 18 pushl 0x18(%ebx) <== NOT EXECUTED
1093d5: e8 0e 0b 00 00 call 109ee8 <free> <== NOT EXECUTED
free (fd->devices);
1093da: 59 pop %ecx <== NOT EXECUTED
1093db: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED
1093de: e8 05 0b 00 00 call 109ee8 <free> <== NOT EXECUTED
1093e3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1093e6: e9 37 01 00 00 jmp 109522 <rtems_fdisk_initialize+0x403><== NOT EXECUTED
* @param major Flash disk major device number.
* @param minor Minor device number, not applicable.
* @param arg Initialization argument, not applicable.
*/
rtems_device_driver
rtems_fdisk_initialize (rtems_device_major_number major,
1093eb: 6b 7d c8 0c imul $0xc,-0x38(%ebp),%edi
for (segment = 0; segment < c->devices[device].segment_count; segment++)
{
const rtems_fdisk_segment_desc* sd;
uint32_t seg_segment;
sd = &c->devices[device].segments[segment];
1093ef: 03 7e 04 add 0x4(%esi),%edi
for (seg_segment = 0; seg_segment < sd->count; seg_segment++, sc++)
1093f2: 0f b7 17 movzwl (%edi),%edx
1093f5: 89 55 b8 mov %edx,-0x48(%ebp)
1093f8: 89 c2 mov %eax,%edx
1093fa: c7 45 a8 00 00 00 00 movl $0x0,-0x58(%ebp)
109401: eb 1d jmp 109420 <rtems_fdisk_initialize+0x301>
{
sc->descriptor = sd;
109403: 89 7a 04 mov %edi,0x4(%edx)
sc->device = device;
109406: 8b 4d cc mov -0x34(%ebp),%ecx
109409: 89 4a 08 mov %ecx,0x8(%edx)
sc->segment = seg_segment;
10940c: 8b 4d a8 mov -0x58(%ebp),%ecx
10940f: 89 4a 0c mov %ecx,0xc(%edx)
sc->erased = 0;
109412: c7 42 2c 00 00 00 00 movl $0x0,0x2c(%edx)
const rtems_fdisk_segment_desc* sd;
uint32_t seg_segment;
sd = &c->devices[device].segments[segment];
for (seg_segment = 0; seg_segment < sd->count; seg_segment++, sc++)
109419: 41 inc %ecx
10941a: 89 4d a8 mov %ecx,-0x58(%ebp)
10941d: 83 c2 30 add $0x30,%edx
109420: 8b 4d b8 mov -0x48(%ebp),%ecx
109423: 39 4d a8 cmp %ecx,-0x58(%ebp)
109426: 72 db jb 109403 <rtems_fdisk_initialize+0x2e4>
* @param major Flash disk major device number.
* @param minor Minor device number, not applicable.
* @param arg Initialization argument, not applicable.
*/
rtems_device_driver
rtems_fdisk_initialize (rtems_device_major_number major,
109428: 6b d1 30 imul $0x30,%ecx,%edx
10942b: 01 d0 add %edx,%eax
return RTEMS_NO_MEMORY;
}
sc = fd->devices[device].segments;
for (segment = 0; segment < c->devices[device].segment_count; segment++)
10942d: ff 45 c8 incl -0x38(%ebp)
109430: eb 07 jmp 109439 <rtems_fdisk_initialize+0x31a>
segment_count = rtems_fdisk_count_segments (&c->devices[device]);
fd->devices[device].segments = calloc (segment_count,
sizeof (rtems_fdisk_segment_ctl));
if (!fd->devices[device].segments)
109432: c7 45 c8 00 00 00 00 movl $0x0,-0x38(%ebp)
return RTEMS_NO_MEMORY;
}
sc = fd->devices[device].segments;
for (segment = 0; segment < c->devices[device].segment_count; segment++)
109439: 8b 55 ac mov -0x54(%ebp),%edx
10943c: 39 55 c8 cmp %edx,-0x38(%ebp)
10943f: 75 aa jne 1093eb <rtems_fdisk_initialize+0x2cc>
sc->segment = seg_segment;
sc->erased = 0;
}
}
fd->devices[device].segment_count = segment_count;
109441: 8b 55 c4 mov -0x3c(%ebp),%edx
109444: 8b 4d c0 mov -0x40(%ebp),%ecx
109447: 89 51 04 mov %edx,0x4(%ecx)
fd->devices[device].descriptor = &c->devices[device];
10944a: 89 71 08 mov %esi,0x8(%ecx)
free (fd->devices);
rtems_fdisk_error ("disk create phy failed");
return sc;
}
for (device = 0; device < c->device_count; device++)
10944d: ff 45 cc incl -0x34(%ebp)
109450: eb 07 jmp 109459 <rtems_fdisk_initialize+0x33a>
}
sc = rtems_disk_create_phys(dev, c->block_size,
blocks - fd->unavail_blocks,
rtems_fdisk_ioctl, NULL, name);
if (sc != RTEMS_SUCCESSFUL)
109452: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp)
free (fd->devices);
rtems_fdisk_error ("disk create phy failed");
return sc;
}
for (device = 0; device < c->device_count; device++)
109459: 8b 4d d0 mov -0x30(%ebp),%ecx
10945c: 8b 41 04 mov 0x4(%ecx),%eax
10945f: 39 45 cc cmp %eax,-0x34(%ebp)
109462: 0f 82 fa fe ff ff jb 109362 <rtems_fdisk_initialize+0x243>
fd->devices[device].segment_count = segment_count;
fd->devices[device].descriptor = &c->devices[device];
}
fd->device_count = c->device_count;
109468: 89 43 30 mov %eax,0x30(%ebx)
ret = rtems_fdisk_recover_block_mappings (fd);
10946b: 89 d8 mov %ebx,%eax
10946d: e8 1d e8 ff ff call 107c8f <rtems_fdisk_recover_block_mappings>
109472: 89 c6 mov %eax,%esi
if (ret)
109474: 85 c0 test %eax,%eax
109476: 74 45 je 1094bd <rtems_fdisk_initialize+0x39e><== ALWAYS TAKEN
{
rtems_disk_delete (dev);
109478: 51 push %ecx <== NOT EXECUTED
109479: 51 push %ecx <== NOT EXECUTED
10947a: ff 75 b4 pushl -0x4c(%ebp) <== NOT EXECUTED
10947d: ff 75 b0 pushl -0x50(%ebp) <== NOT EXECUTED
109480: e8 2c dc ff ff call 1070b1 <rtems_disk_delete> <== NOT EXECUTED
rtems_semaphore_delete (fd->lock);
109485: 5f pop %edi <== NOT EXECUTED
109486: ff 73 64 pushl 0x64(%ebx) <== NOT EXECUTED
109489: e8 7a 47 00 00 call 10dc08 <rtems_semaphore_delete><== NOT EXECUTED
free (fd->copy_buffer);
10948e: 58 pop %eax <== NOT EXECUTED
10948f: ff 73 68 pushl 0x68(%ebx) <== NOT EXECUTED
109492: e8 51 0a 00 00 call 109ee8 <free> <== NOT EXECUTED
free (fd->blocks);
109497: 58 pop %eax <== NOT EXECUTED
109498: ff 73 18 pushl 0x18(%ebx) <== NOT EXECUTED
10949b: e8 48 0a 00 00 call 109ee8 <free> <== NOT EXECUTED
free (fd->devices);
1094a0: 58 pop %eax <== NOT EXECUTED
1094a1: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED
1094a4: e8 3f 0a 00 00 call 109ee8 <free> <== NOT EXECUTED
rtems_fdisk_error ("recovery of disk failed: %s (%d)",
1094a9: 89 34 24 mov %esi,(%esp) <== NOT EXECUTED
1094ac: e8 13 7c 01 00 call 1210c4 <strerror> <== NOT EXECUTED
1094b1: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
1094b4: 56 push %esi <== NOT EXECUTED
1094b5: 50 push %eax <== NOT EXECUTED
1094b6: 68 f4 ed 12 00 push $0x12edf4 <== NOT EXECUTED
1094bb: eb 50 jmp 10950d <rtems_fdisk_initialize+0x3ee><== NOT EXECUTED
strerror (ret), ret);
return ret;
}
ret = rtems_fdisk_compact (fd);
1094bd: 89 d8 mov %ebx,%eax
1094bf: e8 60 ed ff ff call 108224 <rtems_fdisk_compact>
1094c4: 89 c6 mov %eax,%esi
if (ret)
1094c6: 85 c0 test %eax,%eax
1094c8: 74 4f je 109519 <rtems_fdisk_initialize+0x3fa><== ALWAYS TAKEN
{
rtems_disk_delete (dev);
1094ca: 50 push %eax <== NOT EXECUTED
1094cb: 50 push %eax <== NOT EXECUTED
1094cc: ff 75 b4 pushl -0x4c(%ebp) <== NOT EXECUTED
1094cf: ff 75 b0 pushl -0x50(%ebp) <== NOT EXECUTED
1094d2: e8 da db ff ff call 1070b1 <rtems_disk_delete> <== NOT EXECUTED
rtems_semaphore_delete (fd->lock);
1094d7: 58 pop %eax <== NOT EXECUTED
1094d8: ff 73 64 pushl 0x64(%ebx) <== NOT EXECUTED
1094db: e8 28 47 00 00 call 10dc08 <rtems_semaphore_delete><== NOT EXECUTED
free (fd->copy_buffer);
1094e0: 58 pop %eax <== NOT EXECUTED
1094e1: ff 73 68 pushl 0x68(%ebx) <== NOT EXECUTED
1094e4: e8 ff 09 00 00 call 109ee8 <free> <== NOT EXECUTED
free (fd->blocks);
1094e9: 58 pop %eax <== NOT EXECUTED
1094ea: ff 73 18 pushl 0x18(%ebx) <== NOT EXECUTED
1094ed: e8 f6 09 00 00 call 109ee8 <free> <== NOT EXECUTED
free (fd->devices);
1094f2: 5a pop %edx <== NOT EXECUTED
1094f3: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED
1094f6: e8 ed 09 00 00 call 109ee8 <free> <== NOT EXECUTED
rtems_fdisk_error ("compacting of disk failed: %s (%d)",
1094fb: 89 34 24 mov %esi,(%esp) <== NOT EXECUTED
1094fe: e8 c1 7b 01 00 call 1210c4 <strerror> <== NOT EXECUTED
109503: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
109506: 56 push %esi <== NOT EXECUTED
109507: 50 push %eax <== NOT EXECUTED
109508: 68 15 ee 12 00 push $0x12ee15 <== NOT EXECUTED
10950d: e8 dc e2 ff ff call 1077ee <rtems_fdisk_error> <== NOT EXECUTED
strerror (ret), ret);
return ret;
109512: 89 f0 mov %esi,%eax <== NOT EXECUTED
109514: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
109517: eb 58 jmp 109571 <rtems_fdisk_initialize+0x452><== NOT EXECUTED
sizeof (rtems_flashdisk));
if (!rtems_flashdisks)
return RTEMS_NO_MEMORY;
for (minor = 0; minor < rtems_flashdisk_configuration_size; minor++, c++)
109519: ff 45 bc incl -0x44(%ebp)
10951c: 83 45 d0 20 addl $0x20,-0x30(%ebp)
109520: eb 07 jmp 109529 <rtems_fdisk_initialize+0x40a>
/*
* One copy buffer of a page size.
*/
fd->copy_buffer = malloc (c->block_size);
if (!fd->copy_buffer)
return RTEMS_NO_MEMORY;
109522: b8 1a 00 00 00 mov $0x1a,%eax <== NOT EXECUTED
109527: eb 48 jmp 109571 <rtems_fdisk_initialize+0x452><== NOT EXECUTED
sizeof (rtems_flashdisk));
if (!rtems_flashdisks)
return RTEMS_NO_MEMORY;
for (minor = 0; minor < rtems_flashdisk_configuration_size; minor++, c++)
109529: a1 18 f7 13 00 mov 0x13f718,%eax
10952e: 39 45 bc cmp %eax,-0x44(%ebp)
109531: 0f 82 4e fc ff ff jb 109185 <rtems_fdisk_initialize+0x66>
strerror (ret), ret);
return ret;
}
}
rtems_flashdisk_count = rtems_flashdisk_configuration_size;
109537: a3 80 34 15 00 mov %eax,0x153480
return RTEMS_SUCCESSFUL;
10953c: 31 c0 xor %eax,%eax
10953e: eb 31 jmp 109571 <rtems_fdisk_initialize+0x452>
sc = rtems_fdisk_crc16_gen_factors (0x8408);
if (sc != RTEMS_SUCCESSFUL)
return sc;
rtems_flashdisks = calloc (rtems_flashdisk_configuration_size,
109540: 50 push %eax
109541: 50 push %eax
109542: 6a 74 push $0x74
109544: ff 35 18 f7 13 00 pushl 0x13f718
10954a: e8 8d 06 00 00 call 109bdc <calloc>
10954f: a3 7c 34 15 00 mov %eax,0x15347c
sizeof (rtems_flashdisk));
if (!rtems_flashdisks)
109554: 83 c4 10 add $0x10,%esp
109557: 85 c0 test %eax,%eax
109559: 74 c7 je 109522 <rtems_fdisk_initialize+0x403><== NEVER TAKEN
10955b: c7 45 d0 e8 cc 12 00 movl $0x12cce8,-0x30(%ebp)
109562: c7 45 bc 00 00 00 00 movl $0x0,-0x44(%ebp)
return RTEMS_NO_MEMORY;
for (minor = 0; minor < rtems_flashdisk_configuration_size; minor++, c++)
{
char name[] = RTEMS_FLASHDISK_DEVICE_BASE_NAME "a";
109569: 8d 45 de lea -0x22(%ebp),%eax
10956c: 89 45 d4 mov %eax,-0x2c(%ebp)
10956f: eb b8 jmp 109529 <rtems_fdisk_initialize+0x40a>
}
rtems_flashdisk_count = rtems_flashdisk_configuration_size;
return RTEMS_SUCCESSFUL;
}
109571: 8d 65 f4 lea -0xc(%ebp),%esp
109574: 5b pop %ebx
109575: 5e pop %esi
109576: 5f pop %edi
109577: 5d pop %ebp
109578: c3 ret
001083e6 <rtems_fdisk_ioctl>:
* @param argp IOCTL argument.
* @retval The IOCTL return value
*/
static int
rtems_fdisk_ioctl (rtems_disk_device *dd, uint32_t req, void* argp)
{
1083e6: 55 push %ebp
1083e7: 89 e5 mov %esp,%ebp
1083e9: 57 push %edi
1083ea: 56 push %esi
1083eb: 53 push %ebx
1083ec: 83 ec 6c sub $0x6c,%esp
1083ef: 8b 5d 0c mov 0xc(%ebp),%ebx
1083f2: 8b 75 10 mov 0x10(%ebp),%esi
dev_t device
)
{
union __rtems_dev_t temp;
temp.device = device;
1083f5: 8b 55 08 mov 0x8(%ebp),%edx
1083f8: 8b 7a 04 mov 0x4(%edx),%edi
dev_t dev = rtems_disk_get_device_identifier (dd);
rtems_device_minor_number minor = rtems_filesystem_dev_minor_t (dev);
rtems_blkdev_request* r = argp;
rtems_status_code sc;
errno = 0;
1083fb: e8 cc 6d 01 00 call 11f1cc <__errno>
108400: c7 00 00 00 00 00 movl $0x0,(%eax)
sc = rtems_semaphore_obtain (rtems_flashdisks[minor].lock, RTEMS_WAIT, 0);
108406: 6b cf 74 imul $0x74,%edi,%ecx
108409: 89 4d b8 mov %ecx,-0x48(%ebp)
10840c: 50 push %eax
10840d: 6a 00 push $0x0
10840f: 6a 00 push $0x0
108411: a1 7c 34 15 00 mov 0x15347c,%eax
108416: ff 74 08 64 pushl 0x64(%eax,%ecx,1)
10841a: e8 79 58 00 00 call 10dc98 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
10841f: 83 c4 10 add $0x10,%esp
108422: 85 c0 test %eax,%eax
108424: 74 05 je 10842b <rtems_fdisk_ioctl+0x45><== ALWAYS TAKEN
108426: e9 b8 0c 00 00 jmp 1090e3 <rtems_fdisk_ioctl+0xcfd><== NOT EXECUTED
errno = EIO;
else
{
errno = 0;
10842b: e8 9c 6d 01 00 call 11f1cc <__errno>
108430: c7 00 00 00 00 00 movl $0x0,(%eax)
switch (req)
108436: 81 fb 83 42 00 20 cmp $0x20004283,%ebx
10843c: 0f 84 95 08 00 00 je 108cd7 <rtems_fdisk_ioctl+0x8f1><== NEVER TAKEN
108442: 77 23 ja 108467 <rtems_fdisk_ioctl+0x81>
108444: 81 fb 81 42 00 20 cmp $0x20004281,%ebx
10844a: 0f 84 2b 08 00 00 je 108c7b <rtems_fdisk_ioctl+0x895><== NEVER TAKEN
108450: 0f 87 41 08 00 00 ja 108c97 <rtems_fdisk_ioctl+0x8b1><== NEVER TAKEN
108456: 81 fb 80 42 00 20 cmp $0x20004280,%ebx
10845c: 0f 85 58 0c 00 00 jne 1090ba <rtems_fdisk_ioctl+0xcd4>
108462: e9 71 07 00 00 jmp 108bd8 <rtems_fdisk_ioctl+0x7f2><== NOT EXECUTED
108467: 81 fb 85 42 00 20 cmp $0x20004285,%ebx
10846d: 0f 84 73 09 00 00 je 108de6 <rtems_fdisk_ioctl+0xa00>
108473: 0f 82 5c 09 00 00 jb 108dd5 <rtems_fdisk_ioctl+0x9ef><== NEVER TAKEN
108479: 81 fb 01 42 18 c0 cmp $0xc0184201,%ebx
10847f: 0f 85 35 0c 00 00 jne 1090ba <rtems_fdisk_ioctl+0xcd4><== NEVER TAKEN
{
case RTEMS_BLKIO_REQUEST:
if ((minor >= rtems_flashdisk_count) ||
108485: 3b 3d 80 34 15 00 cmp 0x153480,%edi
10848b: 73 0f jae 10849c <rtems_fdisk_ioctl+0xb6><== NEVER TAKEN
(rtems_flashdisks[minor].device_count == 0))
10848d: a1 7c 34 15 00 mov 0x15347c,%eax
{
errno = 0;
switch (req)
{
case RTEMS_BLKIO_REQUEST:
if ((minor >= rtems_flashdisk_count) ||
108492: 8b 55 b8 mov -0x48(%ebp),%edx
108495: 83 7c 10 30 00 cmpl $0x0,0x30(%eax,%edx,1)
10849a: 75 10 jne 1084ac <rtems_fdisk_ioctl+0xc6><== ALWAYS TAKEN
(rtems_flashdisks[minor].device_count == 0))
{
errno = ENODEV;
10849c: e8 2b 6d 01 00 call 11f1cc <__errno> <== NOT EXECUTED
1084a1: c7 00 13 00 00 00 movl $0x13,(%eax) <== NOT EXECUTED
1084a7: e9 1c 0c 00 00 jmp 1090c8 <rtems_fdisk_ioctl+0xce2><== NOT EXECUTED
}
else
{
switch (r->req)
1084ac: 8b 06 mov (%esi),%eax
1084ae: 85 c0 test %eax,%eax
1084b0: 74 0c je 1084be <rtems_fdisk_ioctl+0xd8>
1084b2: 48 dec %eax
1084b3: 0f 85 0f 07 00 00 jne 108bc8 <rtems_fdisk_ioctl+0x7e2><== NEVER TAKEN
1084b9: e9 4b 02 00 00 jmp 108709 <rtems_fdisk_ioctl+0x323>
{
case RTEMS_BLKDEV_REQ_READ:
errno = rtems_fdisk_read (&rtems_flashdisks[minor], r);
1084be: e8 09 6d 01 00 call 11f1cc <__errno>
1084c3: 89 45 b0 mov %eax,-0x50(%ebp)
1084c6: 8b 4d b8 mov -0x48(%ebp),%ecx
1084c9: 03 0d 7c 34 15 00 add 0x15347c,%ecx
1084cf: 89 4d d4 mov %ecx,-0x2c(%ebp)
* @retval 0 Always. The request done callback contains the status.
*/
static int
rtems_fdisk_read (rtems_flashdisk* fd, rtems_blkdev_request* req)
{
rtems_blkdev_sg_buffer* sg = req->bufs;
1084d2: 8d 46 18 lea 0x18(%esi),%eax
1084d5: 89 45 d0 mov %eax,-0x30(%ebp)
uint32_t buf;
int ret = 0;
for (buf = 0; (ret == 0) && (buf < req->bufnum); buf++, sg++)
1084d8: c7 45 b4 00 00 00 00 movl $0x0,-0x4c(%ebp)
1084df: e9 fc 01 00 00 jmp 1086e0 <rtems_fdisk_ioctl+0x2fa>
{
uint8_t* data;
uint32_t fb;
uint32_t b;
fb = sg->length / fd->block_size;
1084e4: 8b 55 d0 mov -0x30(%ebp),%edx
1084e7: 8b 42 04 mov 0x4(%edx),%eax
1084ea: 8b 4d d4 mov -0x2c(%ebp),%ecx
1084ed: 31 d2 xor %edx,%edx
1084ef: f7 71 14 divl 0x14(%ecx)
1084f2: 89 45 a8 mov %eax,-0x58(%ebp)
data = sg->buffer;
1084f5: 8b 45 d0 mov -0x30(%ebp),%eax
1084f8: 8b 40 08 mov 0x8(%eax),%eax
1084fb: 89 45 c8 mov %eax,-0x38(%ebp)
for (b = 0; b < fb; b++, data += fd->block_size)
1084fe: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp)
108505: e9 bd 01 00 00 jmp 1086c7 <rtems_fdisk_ioctl+0x2e1>
{
ret = rtems_fdisk_read_block (fd, sg->block + b, data);
10850a: 8b 7d c4 mov -0x3c(%ebp),%edi
10850d: 8b 55 d0 mov -0x30(%ebp),%edx
108510: 03 3a add (%edx),%edi
rtems_fdisk_block_ctl* bc;
rtems_fdisk_segment_ctl* sc;
rtems_fdisk_page_desc* pd;
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd, "read-block:%d", block);
108512: 51 push %ecx
108513: 57 push %edi
108514: 68 28 e8 12 00 push $0x12e828
108519: ff 75 d4 pushl -0x2c(%ebp)
10851c: e8 99 f1 ff ff call 1076ba <rtems_fdisk_info>
/*
* Broken out to allow info messages when testing.
*/
if (block >= (fd->block_count - fd->unavail_blocks))
108521: 8b 4d d4 mov -0x2c(%ebp),%ecx
108524: 8b 41 1c mov 0x1c(%ecx),%eax
108527: 2b 41 20 sub 0x20(%ecx),%eax
10852a: 83 c4 10 add $0x10,%esp
10852d: 39 c7 cmp %eax,%edi
10852f: 72 0d jb 10853e <rtems_fdisk_ioctl+0x158><== ALWAYS TAKEN
{
rtems_fdisk_error ("read-block: block out of range: %d", block);
108531: 52 push %edx <== NOT EXECUTED
108532: 52 push %edx <== NOT EXECUTED
108533: 57 push %edi <== NOT EXECUTED
108534: 68 36 e8 12 00 push $0x12e836 <== NOT EXECUTED
108539: e9 43 01 00 00 jmp 108681 <rtems_fdisk_ioctl+0x29b><== NOT EXECUTED
return EIO;
}
bc = &fd->blocks[block];
10853e: 8b 55 d4 mov -0x2c(%ebp),%edx
108541: 8b 42 18 mov 0x18(%edx),%eax
108544: 8d 04 f8 lea (%eax,%edi,8),%eax
108547: 89 45 cc mov %eax,-0x34(%ebp)
if (!bc->segment)
10854a: 8b 18 mov (%eax),%ebx
10854c: 85 db test %ebx,%ebx
10854e: 75 22 jne 108572 <rtems_fdisk_ioctl+0x18c>
{
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd, "read-block: no segment mapping: %d", block);
108550: 50 push %eax
108551: 57 push %edi
108552: 68 59 e8 12 00 push $0x12e859
108557: 52 push %edx
108558: e8 5d f1 ff ff call 1076ba <rtems_fdisk_info>
#endif
memset (buffer, 0xff, fd->block_size);
10855d: 8b 45 d4 mov -0x2c(%ebp),%eax
108560: 8b 48 14 mov 0x14(%eax),%ecx
108563: b0 ff mov $0xff,%al
108565: 8b 7d c8 mov -0x38(%ebp),%edi
108568: f3 aa rep stos %al,%es:(%edi)
10856a: 83 c4 10 add $0x10,%esp
10856d: e9 8a 0b 00 00 jmp 1090fc <rtems_fdisk_ioctl+0xd16>
return 0;
}
sc = fd->blocks[block].segment;
pd = &sc->page_descriptors[bc->page];
108572: 8b 55 cc mov -0x34(%ebp),%edx
108575: 8b 42 04 mov 0x4(%edx),%eax
108578: 8b 53 10 mov 0x10(%ebx),%edx
10857b: 8d 14 c2 lea (%edx,%eax,8),%edx
10857e: 89 55 c0 mov %edx,-0x40(%ebp)
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd,
108581: 8b 4a 04 mov 0x4(%edx),%ecx
108584: 89 4d bc mov %ecx,-0x44(%ebp)
108587: 0f b7 12 movzwl (%edx),%edx
10858a: 89 55 ac mov %edx,-0x54(%ebp)
10858d: 8b 55 c0 mov -0x40(%ebp),%edx
108590: 0f b7 4a 02 movzwl 0x2(%edx),%ecx
108594: 83 3b 00 cmpl $0x0,(%ebx)
108597: 74 07 je 1085a0 <rtems_fdisk_ioctl+0x1ba>
108599: ba 22 08 13 00 mov $0x130822,%edx
10859e: eb 05 jmp 1085a5 <rtems_fdisk_ioctl+0x1bf>
1085a0: ba 97 e4 12 00 mov $0x12e497,%edx
1085a5: 83 ec 08 sub $0x8,%esp
1085a8: ff 75 bc pushl -0x44(%ebp)
1085ab: ff 75 ac pushl -0x54(%ebp)
1085ae: 51 push %ecx
1085af: 52 push %edx
1085b0: ff 73 24 pushl 0x24(%ebx)
1085b3: ff 73 20 pushl 0x20(%ebx)
1085b6: ff 73 1c pushl 0x1c(%ebx)
1085b9: ff 73 14 pushl 0x14(%ebx)
1085bc: 50 push %eax
1085bd: ff 73 0c pushl 0xc(%ebx)
1085c0: ff 73 08 pushl 0x8(%ebx)
1085c3: 57 push %edi
1085c4: 68 7c e8 12 00 push $0x12e87c
1085c9: ff 75 d4 pushl -0x2c(%ebp)
1085cc: e8 e9 f0 ff ff call 1076ba <rtems_fdisk_info>
}
rtems_flashdisk_count = rtems_flashdisk_configuration_size;
return RTEMS_SUCCESSFUL;
}
1085d1: 8b 4d c0 mov -0x40(%ebp),%ecx
1085d4: 66 8b 41 02 mov 0x2(%ecx),%ax
sc->pages, sc->pages_active, sc->pages_used, sc->pages_bad,
sc->next ? "set" : "null",
pd->flags, pd->crc, pd->block);
#endif
if (rtems_fdisk_page_desc_flags_set (pd, RTEMS_FDISK_PAGE_ACTIVE))
1085d8: 83 c4 40 add $0x40,%esp
1085db: a8 01 test $0x1,%al
1085dd: 0f 85 c2 00 00 00 jne 1086a5 <rtems_fdisk_ioctl+0x2bf><== NEVER TAKEN
{
if (rtems_fdisk_page_desc_flags_clear (pd, RTEMS_FDISK_PAGE_USED))
1085e3: a8 02 test $0x2,%al
1085e5: 0f 84 a3 00 00 00 je 10868e <rtems_fdisk_ioctl+0x2a8><== NEVER TAKEN
rtems_fdisk_segment_ctl* sc,
uint32_t page,
void* buffer)
{
return rtems_fdisk_seg_read (fd, sc,
page * fd->block_size, buffer, fd->block_size);
1085eb: 8b 55 d4 mov -0x2c(%ebp),%edx
1085ee: 8b 42 14 mov 0x14(%edx),%eax
rtems_fdisk_seg_read_page (const rtems_flashdisk* fd,
rtems_fdisk_segment_ctl* sc,
uint32_t page,
void* buffer)
{
return rtems_fdisk_seg_read (fd, sc,
1085f1: 51 push %ecx
1085f2: 51 push %ecx
/*
* We use the segment page offset not the page number used in the
* driver. This skips the page descriptors.
*/
int ret = rtems_fdisk_seg_read_page (fd, sc,
1085f3: 8b 4b 18 mov 0x18(%ebx),%ecx
1085f6: 8b 55 cc mov -0x34(%ebp),%edx
1085f9: 03 4a 04 add 0x4(%edx),%ecx
rtems_fdisk_seg_read_page (const rtems_flashdisk* fd,
rtems_fdisk_segment_ctl* sc,
uint32_t page,
void* buffer)
{
return rtems_fdisk_seg_read (fd, sc,
1085fc: 0f af c8 imul %eax,%ecx
1085ff: 50 push %eax
108600: ff 75 c8 pushl -0x38(%ebp)
108603: 89 da mov %ebx,%edx
108605: 8b 45 d4 mov -0x2c(%ebp),%eax
108608: e8 7a f2 ff ff call 107887 <rtems_fdisk_seg_read>
* driver. This skips the page descriptors.
*/
int ret = rtems_fdisk_seg_read_page (fd, sc,
bc->page + sc->pages_desc, buffer);
if (ret)
10860d: 83 c4 10 add $0x10,%esp
108610: 85 c0 test %eax,%eax
108612: 74 2f je 108643 <rtems_fdisk_ioctl+0x25d><== ALWAYS TAKEN
{
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd,
108614: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
108617: 50 push %eax <== NOT EXECUTED
108618: 89 45 90 mov %eax,-0x70(%ebp) <== NOT EXECUTED
10861b: e8 a4 8a 01 00 call 1210c4 <strerror> <== NOT EXECUTED
108620: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
108623: 8b 55 90 mov -0x70(%ebp),%edx <== NOT EXECUTED
108626: 52 push %edx <== NOT EXECUTED
108627: 50 push %eax <== NOT EXECUTED
108628: 8b 4d cc mov -0x34(%ebp),%ecx <== NOT EXECUTED
10862b: ff 71 04 pushl 0x4(%ecx) <== NOT EXECUTED
10862e: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED
108631: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED
108634: 68 c3 e8 12 00 push $0x12e8c3 <== NOT EXECUTED
108639: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED
10863c: e8 79 f0 ff ff call 1076ba <rtems_fdisk_info> <== NOT EXECUTED
108641: eb 7c jmp 1086bf <rtems_fdisk_ioctl+0x2d9><== NOT EXECUTED
{
uint16_t cs = 0xffff;
uint32_t i;
for (i = 0; i < page_size; i++, buffer++)
cs = rtems_fdisk_calc_crc16 (cs, *buffer);
108643: 8b 1d 84 34 15 00 mov 0x153484,%ebx
* @param req IOCTL request code.
* @param argp IOCTL argument.
* @retval The IOCTL return value
*/
static int
rtems_fdisk_ioctl (rtems_disk_device *dd, uint32_t req, void* argp)
108649: 8b 4d c8 mov -0x38(%ebp),%ecx
10864c: 8b 45 d4 mov -0x2c(%ebp),%eax
10864f: 03 48 14 add 0x14(%eax),%ecx
108652: 8b 55 c8 mov -0x38(%ebp),%edx
* Calculate the checksum of a page in a segment.
*/
static uint16_t
rtems_fdisk_page_checksum (const uint8_t* buffer, uint32_t page_size)
{
uint16_t cs = 0xffff;
108655: b8 ff ff 00 00 mov $0xffff,%eax
10865a: eb 0a jmp 108666 <rtems_fdisk_ioctl+0x280>
uint32_t i;
for (i = 0; i < page_size; i++, buffer++)
cs = rtems_fdisk_calc_crc16 (cs, *buffer);
10865c: 32 02 xor (%edx),%al
10865e: 0f b6 c0 movzbl %al,%eax
108661: 0f b7 04 43 movzwl (%ebx,%eax,2),%eax
rtems_fdisk_page_checksum (const uint8_t* buffer, uint32_t page_size)
{
uint16_t cs = 0xffff;
uint32_t i;
for (i = 0; i < page_size; i++, buffer++)
108665: 42 inc %edx
108666: 39 ca cmp %ecx,%edx
108668: 75 f2 jne 10865c <rtems_fdisk_ioctl+0x276>
return ret;
}
cs = rtems_fdisk_page_checksum (buffer, fd->block_size);
if (cs == pd->crc)
10866a: 8b 4d c0 mov -0x40(%ebp),%ecx
10866d: 0f b7 11 movzwl (%ecx),%edx
108670: 66 39 d0 cmp %dx,%ax
108673: 0f 84 83 0a 00 00 je 1090fc <rtems_fdisk_ioctl+0xd16>
return 0;
rtems_fdisk_error ("read-block: crc failure: %d: buffer:%04x page:%04x",
108679: 52 push %edx <== NOT EXECUTED
10867a: 50 push %eax <== NOT EXECUTED
10867b: 57 push %edi <== NOT EXECUTED
10867c: 68 f8 e8 12 00 push $0x12e8f8 <== NOT EXECUTED
108681: e8 68 f1 ff ff call 1077ee <rtems_fdisk_error> <== NOT EXECUTED
108686: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
108689: e9 7f 0a 00 00 jmp 10910d <rtems_fdisk_ioctl+0xd27><== NOT EXECUTED
block, cs, pd->crc);
}
else
{
rtems_fdisk_error ("read-block: block points to used page: %d: %d-%d-%d",
10868e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
108691: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED
108694: ff 70 04 pushl 0x4(%eax) <== NOT EXECUTED
108697: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED
10869a: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED
10869d: 57 push %edi <== NOT EXECUTED
10869e: 68 2b e9 12 00 push $0x12e92b <== NOT EXECUTED
1086a3: eb 15 jmp 1086ba <rtems_fdisk_ioctl+0x2d4><== NOT EXECUTED
block, sc->device, sc->segment, bc->page);
}
}
else
{
rtems_fdisk_error ("read-block: block page not active: %d: %d-%d-%d",
1086a5: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1086a8: 8b 55 cc mov -0x34(%ebp),%edx <== NOT EXECUTED
1086ab: ff 72 04 pushl 0x4(%edx) <== NOT EXECUTED
1086ae: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED
1086b1: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED
1086b4: 57 push %edi <== NOT EXECUTED
1086b5: 68 5f e9 12 00 push $0x12e95f <== NOT EXECUTED
1086ba: e8 2f f1 ff ff call 1077ee <rtems_fdisk_error> <== NOT EXECUTED
1086bf: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
1086c2: e9 46 0a 00 00 jmp 10910d <rtems_fdisk_ioctl+0xd27><== NOT EXECUTED
uint8_t* data;
uint32_t fb;
uint32_t b;
fb = sg->length / fd->block_size;
data = sg->buffer;
for (b = 0; b < fb; b++, data += fd->block_size)
1086c7: 8b 45 a8 mov -0x58(%ebp),%eax
1086ca: 39 45 c4 cmp %eax,-0x3c(%ebp)
1086cd: 0f 85 37 fe ff ff jne 10850a <rtems_fdisk_ioctl+0x124>
1086d3: 31 c0 xor %eax,%eax
{
rtems_blkdev_sg_buffer* sg = req->bufs;
uint32_t buf;
int ret = 0;
for (buf = 0; (ret == 0) && (buf < req->bufnum); buf++, sg++)
1086d5: ff 45 b4 incl -0x4c(%ebp)
1086d8: 83 45 d0 10 addl $0x10,-0x30(%ebp)
1086dc: 85 c0 test %eax,%eax
1086de: 75 10 jne 1086f0 <rtems_fdisk_ioctl+0x30a><== NEVER TAKEN
1086e0: 8b 55 b4 mov -0x4c(%ebp),%edx
1086e3: 3b 56 10 cmp 0x10(%esi),%edx
1086e6: 0f 82 f8 fd ff ff jb 1084e4 <rtems_fdisk_ioctl+0xfe>
if (ret)
break;
}
}
req->status = ret ? RTEMS_IO_ERROR : RTEMS_SUCCESSFUL;
1086ec: 31 c0 xor %eax,%eax
1086ee: eb 05 jmp 1086f5 <rtems_fdisk_ioctl+0x30f>
1086f0: b8 1b 00 00 00 mov $0x1b,%eax <== NOT EXECUTED
1086f5: 89 46 0c mov %eax,0xc(%esi)
req->req_done (req->done_arg, req->status);
1086f8: 52 push %edx
1086f9: 52 push %edx
1086fa: 50 push %eax
1086fb: ff 76 08 pushl 0x8(%esi)
1086fe: ff 56 04 call *0x4(%esi)
else
{
switch (r->req)
{
case RTEMS_BLKDEV_REQ_READ:
errno = rtems_fdisk_read (&rtems_flashdisks[minor], r);
108701: 8b 45 b0 mov -0x50(%ebp),%eax
108704: e9 b4 04 00 00 jmp 108bbd <rtems_fdisk_ioctl+0x7d7>
break;
case RTEMS_BLKDEV_REQ_WRITE:
errno = rtems_fdisk_write (&rtems_flashdisks[minor], r);
108709: e8 be 6a 01 00 call 11f1cc <__errno>
10870e: 89 45 a4 mov %eax,-0x5c(%ebp)
108711: 8b 7d b8 mov -0x48(%ebp),%edi
108714: 03 3d 7c 34 15 00 add 0x15347c,%edi
* @retval 0 Always. The request done callback contains the status.
*/
static int
rtems_fdisk_write (rtems_flashdisk* fd, rtems_blkdev_request* req)
{
rtems_blkdev_sg_buffer* sg = req->bufs;
10871a: 8d 56 18 lea 0x18(%esi),%edx
10871d: 89 55 c4 mov %edx,-0x3c(%ebp)
uint32_t buf;
int ret = 0;
for (buf = 0; (ret == 0) && (buf < req->bufnum); buf++, sg++)
108720: c7 45 b0 00 00 00 00 movl $0x0,-0x50(%ebp)
rtems_fdisk_compact (fd);
/*
* Get the next avaliable segment.
*/
sc = rtems_fdisk_segment_queue_pop_head (&fd->available);
108727: 8d 4f 34 lea 0x34(%edi),%ecx
10872a: 89 4d a8 mov %ecx,-0x58(%ebp)
10872d: e9 67 04 00 00 jmp 108b99 <rtems_fdisk_ioctl+0x7b3>
for (buf = 0; (ret == 0) && (buf < req->bufnum); buf++, sg++)
{
uint8_t* data;
uint32_t fb;
uint32_t b;
fb = sg->length / fd->block_size;
108732: 8b 55 c4 mov -0x3c(%ebp),%edx
108735: 8b 42 04 mov 0x4(%edx),%eax
108738: 31 d2 xor %edx,%edx
10873a: f7 77 14 divl 0x14(%edi)
10873d: 89 45 98 mov %eax,-0x68(%ebp)
data = sg->buffer;
108740: 8b 4d c4 mov -0x3c(%ebp),%ecx
108743: 8b 49 08 mov 0x8(%ecx),%ecx
108746: 89 4d c0 mov %ecx,-0x40(%ebp)
for (b = 0; b < fb; b++, data += fd->block_size)
108749: c7 45 b4 00 00 00 00 movl $0x0,-0x4c(%ebp)
108750: e9 2b 04 00 00 jmp 108b80 <rtems_fdisk_ioctl+0x79a>
{
ret = rtems_fdisk_write_block (fd, sg->block + b, data);
108755: 8b 55 b4 mov -0x4c(%ebp),%edx
108758: 8b 45 c4 mov -0x3c(%ebp),%eax
10875b: 03 10 add (%eax),%edx
10875d: 89 55 d4 mov %edx,-0x2c(%ebp)
rtems_fdisk_page_desc* pd;
uint32_t page;
int ret;
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd, "write-block:%d", block);
108760: 50 push %eax
108761: 52 push %edx
108762: 68 8f e9 12 00 push $0x12e98f
108767: 57 push %edi
108768: e8 4d ef ff ff call 1076ba <rtems_fdisk_info>
/*
* Broken out to allow info messages when testing.
*/
if (block >= (fd->block_count - fd->unavail_blocks))
10876d: 8b 47 1c mov 0x1c(%edi),%eax
108770: 2b 47 20 sub 0x20(%edi),%eax
108773: 83 c4 10 add $0x10,%esp
108776: 39 45 d4 cmp %eax,-0x2c(%ebp)
108779: 72 14 jb 10878f <rtems_fdisk_ioctl+0x3a9><== ALWAYS TAKEN
{
rtems_fdisk_error ("write-block: block out of range: %d", block);
10877b: 50 push %eax <== NOT EXECUTED
10877c: 50 push %eax <== NOT EXECUTED
10877d: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED
108780: 68 9e e9 12 00 push $0x12e99e <== NOT EXECUTED
108785: e8 64 f0 ff ff call 1077ee <rtems_fdisk_error> <== NOT EXECUTED
10878a: e9 da 03 00 00 jmp 108b69 <rtems_fdisk_ioctl+0x783><== NOT EXECUTED
return EIO;
}
bc = &fd->blocks[block];
10878f: 8b 47 18 mov 0x18(%edi),%eax
108792: 8b 4d d4 mov -0x2c(%ebp),%ecx
108795: 8d 04 c8 lea (%eax,%ecx,8),%eax
108798: 89 45 c8 mov %eax,-0x38(%ebp)
/*
* Does the page exist in flash ?
*/
if (bc->segment)
10879b: 8b 18 mov (%eax),%ebx
10879d: 85 db test %ebx,%ebx
10879f: 0f 84 9e 01 00 00 je 108943 <rtems_fdisk_ioctl+0x55d>
{
sc = bc->segment;
pd = &sc->page_descriptors[bc->page];
1087a5: 8b 53 10 mov 0x10(%ebx),%edx
1087a8: 89 55 a0 mov %edx,-0x60(%ebp)
1087ab: 8b 48 04 mov 0x4(%eax),%ecx
1087ae: 89 4d ac mov %ecx,-0x54(%ebp)
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd, " write:%02d-%03d-%03d: flag used",
1087b1: 83 ec 0c sub $0xc,%esp
1087b4: 51 push %ecx
1087b5: ff 73 0c pushl 0xc(%ebx)
1087b8: ff 73 08 pushl 0x8(%ebx)
1087bb: 68 c2 e9 12 00 push $0x12e9c2
1087c0: 57 push %edi
1087c1: e8 f4 ee ff ff call 1076ba <rtems_fdisk_info>
#endif
/*
* The page exists in flash so see if the page has been changed.
*/
if (rtems_fdisk_seg_verify_page (fd, sc->device, sc->segment,
1087c6: 8b 53 0c mov 0xc(%ebx),%edx
1087c9: 89 55 cc mov %edx,-0x34(%ebp)
1087cc: 8b 4b 08 mov 0x8(%ebx),%ecx
1087cf: 89 4d d0 mov %ecx,-0x30(%ebp)
uint32_t segment,
uint32_t page,
const void* buffer)
{
return rtems_fdisk_seg_verify (fd, device, segment,
page * fd->block_size, buffer, fd->block_size);
1087d2: 8b 57 14 mov 0x14(%edi),%edx
1087d5: 89 55 bc mov %edx,-0x44(%ebp)
#endif
/*
* The page exists in flash so see if the page has been changed.
*/
if (rtems_fdisk_seg_verify_page (fd, sc->device, sc->segment,
1087d8: 8b 53 18 mov 0x18(%ebx),%edx
1087db: 8b 4d c8 mov -0x38(%ebp),%ecx
1087de: 03 51 04 add 0x4(%ecx),%edx
uint32_t device,
uint32_t segment,
uint32_t page,
const void* buffer)
{
return rtems_fdisk_seg_verify (fd, device, segment,
1087e1: 0f af 55 bc imul -0x44(%ebp),%edx
static const rtems_fdisk_segment_desc*
rtems_fdisk_seg_descriptor (const rtems_flashdisk* fd,
uint32_t device,
uint32_t segment)
{
return fd->devices[device].segments[segment].descriptor;
1087e5: 6b 45 d0 0c imul $0xc,-0x30(%ebp),%eax
1087e9: 03 47 2c add 0x2c(%edi),%eax
1087ec: 6b 4d cc 30 imul $0x30,-0x34(%ebp),%ecx
1087f0: 03 08 add (%eax),%ecx
1087f2: 8b 49 04 mov 0x4(%ecx),%ecx
1087f5: 89 4d 9c mov %ecx,-0x64(%ebp)
uint32_t size)
{
const rtems_fdisk_segment_desc* sd;
const rtems_fdisk_driver_handlers* ops;
sd = rtems_fdisk_seg_descriptor (fd, device, segment);
ops = fd->devices[device].descriptor->flash_ops;
1087f8: 8b 40 08 mov 0x8(%eax),%eax
1087fb: 8b 48 08 mov 0x8(%eax),%ecx
#if RTEMS_FDISK_TRACE
rtems_fdisk_printf (fd, " seg-verify: %02d-%03d: o=%08x s=%d",
1087fe: 83 c4 18 add $0x18,%esp
108801: ff 75 bc pushl -0x44(%ebp)
108804: 52 push %edx
108805: ff 75 cc pushl -0x34(%ebp)
108808: ff 75 d0 pushl -0x30(%ebp)
10880b: 68 e3 e9 12 00 push $0x12e9e3
108810: 57 push %edi
108811: 89 55 90 mov %edx,-0x70(%ebp)
108814: 89 4d 94 mov %ecx,-0x6c(%ebp)
108817: e8 06 ef ff ff call 107722 <rtems_fdisk_printf>
device, segment, offset, size);
#endif
return ops->verify (sd, device, segment, offset, buffer, size);
10881c: 83 c4 18 add $0x18,%esp
10881f: ff 75 bc pushl -0x44(%ebp)
108822: ff 75 c0 pushl -0x40(%ebp)
108825: 8b 55 90 mov -0x70(%ebp),%edx
108828: 52 push %edx
108829: ff 75 cc pushl -0x34(%ebp)
10882c: ff 75 d0 pushl -0x30(%ebp)
10882f: ff 75 9c pushl -0x64(%ebp)
108832: 8b 4d 94 mov -0x6c(%ebp),%ecx
108835: ff 51 0c call *0xc(%ecx)
#endif
/*
* The page exists in flash so see if the page has been changed.
*/
if (rtems_fdisk_seg_verify_page (fd, sc->device, sc->segment,
108838: 83 c4 20 add $0x20,%esp
10883b: 85 c0 test %eax,%eax
10883d: 75 24 jne 108863 <rtems_fdisk_ioctl+0x47d>
bc->page + sc->pages_desc, buffer) == 0)
{
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd, "write-block:%d=>%02d-%03d-%03d: page verified",
10883f: 50 push %eax
108840: 50 push %eax
108841: 8b 45 c8 mov -0x38(%ebp),%eax
108844: ff 70 04 pushl 0x4(%eax)
108847: ff 73 0c pushl 0xc(%ebx)
10884a: ff 73 08 pushl 0x8(%ebx)
10884d: ff 75 d4 pushl -0x2c(%ebp)
108850: 68 08 ea 12 00 push $0x12ea08
108855: 57 push %edi
108856: e8 5f ee ff ff call 1076ba <rtems_fdisk_info>
10885b: 83 c4 20 add $0x20,%esp
10885e: e9 14 03 00 00 jmp 108b77 <rtems_fdisk_ioctl+0x791>
* Does the page exist in flash ?
*/
if (bc->segment)
{
sc = bc->segment;
pd = &sc->page_descriptors[bc->page];
108863: 8b 55 ac mov -0x54(%ebp),%edx
108866: 8b 4d a0 mov -0x60(%ebp),%ecx
108869: 8d 14 d1 lea (%ecx,%edx,8),%edx
10886c: 89 55 cc mov %edx,-0x34(%ebp)
* Set the flags. Setting means clear the bit to 0.
*/
static void
rtems_fdisk_page_desc_set_flags (rtems_fdisk_page_desc* pd, uint16_t flags)
{
pd->flags &= ~flags;
10886f: 66 83 62 02 fd andw $0xfffd,0x2(%edx)
* matches the flash device.
*/
rtems_fdisk_page_desc_set_flags (pd, RTEMS_FDISK_PAGE_USED);
ret = rtems_fdisk_seg_write_page_desc_flags (fd, sc, bc->page, pd);
108874: 8b 4d c8 mov -0x38(%ebp),%ecx
108877: 8b 49 04 mov 0x4(%ecx),%ecx
10887a: 89 4d d0 mov %ecx,-0x30(%ebp)
rtems_fdisk_segment_ctl* sc,
uint32_t page,
const rtems_fdisk_page_desc* page_desc)
{
uint32_t offset = ((page * sizeof (rtems_fdisk_page_desc)) +
((uint8_t*) &page_desc->flags) - ((uint8_t*) page_desc));
10887d: 8d 0c cd 02 00 00 00 lea 0x2(,%ecx,8),%ecx
108884: 89 4d bc mov %ecx,-0x44(%ebp)
if ((fd->flags & RTEMS_FDISK_BLANK_CHECK_BEFORE_WRITE))
108887: f6 47 08 08 testb $0x8,0x8(%edi)
10888b: 74 4a je 1088d7 <rtems_fdisk_ioctl+0x4f1><== NEVER TAKEN
{
uint16_t flash_flags;
int ret;
ret = rtems_fdisk_seg_read (fd, sc, offset,
10888d: 50 push %eax
10888e: 50 push %eax
10888f: 6a 02 push $0x2
&flash_flags, sizeof (flash_flags));
108891: 8d 45 e0 lea -0x20(%ebp),%eax
((uint8_t*) &page_desc->flags) - ((uint8_t*) page_desc));
if ((fd->flags & RTEMS_FDISK_BLANK_CHECK_BEFORE_WRITE))
{
uint16_t flash_flags;
int ret;
ret = rtems_fdisk_seg_read (fd, sc, offset,
108894: 50 push %eax
108895: 89 da mov %ebx,%edx
108897: 89 f8 mov %edi,%eax
108899: e8 e9 ef ff ff call 107887 <rtems_fdisk_seg_read>
10889e: 89 c2 mov %eax,%edx
&flash_flags, sizeof (flash_flags));
if (ret)
1088a0: 83 c4 10 add $0x10,%esp
1088a3: 85 c0 test %eax,%eax
1088a5: 75 50 jne 1088f7 <rtems_fdisk_ioctl+0x511><== NEVER TAKEN
return ret;
if ((flash_flags & page_desc->flags) != page_desc->flags)
1088a7: 0f b7 55 e0 movzwl -0x20(%ebp),%edx
1088ab: 8b 4d cc mov -0x34(%ebp),%ecx
1088ae: 0f b7 41 02 movzwl 0x2(%ecx),%eax
1088b2: 89 c1 mov %eax,%ecx
1088b4: 21 d1 and %edx,%ecx
1088b6: 66 39 c1 cmp %ax,%cx
1088b9: 74 1c je 1088d7 <rtems_fdisk_ioctl+0x4f1><== ALWAYS TAKEN
{
rtems_fdisk_error (" seg-write-page-flags: %02d-%03d-%03d: "
1088bb: 51 push %ecx <== NOT EXECUTED
1088bc: 51 push %ecx <== NOT EXECUTED
1088bd: 50 push %eax <== NOT EXECUTED
1088be: 52 push %edx <== NOT EXECUTED
1088bf: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED
1088c2: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED
1088c5: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED
1088c8: 68 36 ea 12 00 push $0x12ea36 <== NOT EXECUTED
1088cd: e8 1c ef ff ff call 1077ee <rtems_fdisk_error> <== NOT EXECUTED
1088d2: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
1088d5: eb 50 jmp 108927 <rtems_fdisk_ioctl+0x541><== NOT EXECUTED
sc->device, sc->segment, page,
flash_flags, page_desc->flags);
return ret;
}
}
return rtems_fdisk_seg_write (fd, sc, offset,
1088d7: 52 push %edx
1088d8: 52 push %edx
1088d9: 6a 02 push $0x2
&page_desc->flags, sizeof (page_desc->flags));
1088db: 8b 45 cc mov -0x34(%ebp),%eax
1088de: 83 c0 02 add $0x2,%eax
sc->device, sc->segment, page,
flash_flags, page_desc->flags);
return ret;
}
}
return rtems_fdisk_seg_write (fd, sc, offset,
1088e1: 50 push %eax
1088e2: 8b 4d bc mov -0x44(%ebp),%ecx
1088e5: 89 da mov %ebx,%edx
1088e7: 89 f8 mov %edi,%eax
1088e9: e8 49 f0 ff ff call 107937 <rtems_fdisk_seg_write>
1088ee: 89 c2 mov %eax,%edx
1088f0: 83 c4 10 add $0x10,%esp
rtems_fdisk_page_desc_set_flags (pd, RTEMS_FDISK_PAGE_USED);
ret = rtems_fdisk_seg_write_page_desc_flags (fd, sc, bc->page, pd);
if (ret)
1088f3: 85 c0 test %eax,%eax
1088f5: 74 30 je 108927 <rtems_fdisk_ioctl+0x541><== ALWAYS TAKEN
{
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd, " write:%02d-%03d-%03d: " \
1088f7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1088fa: 52 push %edx <== NOT EXECUTED
1088fb: 89 55 90 mov %edx,-0x70(%ebp) <== NOT EXECUTED
1088fe: e8 c1 87 01 00 call 1210c4 <strerror> <== NOT EXECUTED
108903: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
108906: 8b 55 90 mov -0x70(%ebp),%edx <== NOT EXECUTED
108909: 52 push %edx <== NOT EXECUTED
10890a: 50 push %eax <== NOT EXECUTED
10890b: 8b 45 c8 mov -0x38(%ebp),%eax <== NOT EXECUTED
10890e: ff 70 04 pushl 0x4(%eax) <== NOT EXECUTED
108911: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED
108914: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED
108917: 68 80 ea 12 00 push $0x12ea80 <== NOT EXECUTED
10891c: 57 push %edi <== NOT EXECUTED
10891d: e8 98 ed ff ff call 1076ba <rtems_fdisk_info> <== NOT EXECUTED
108922: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
108925: eb 06 jmp 10892d <rtems_fdisk_ioctl+0x547><== NOT EXECUTED
strerror (ret), ret);
#endif
}
else
{
sc->pages_active--;
108927: ff 4b 1c decl 0x1c(%ebx)
sc->pages_used++;
10892a: ff 43 20 incl 0x20(%ebx)
/*
* If possible reuse this segment. This will mean the segment
* needs to be removed from the available list and placed
* back if space is still available.
*/
rtems_fdisk_queue_segment (fd, sc);
10892d: 89 da mov %ebx,%edx
10892f: 89 f8 mov %edi,%eax
108931: e8 35 f2 ff ff call 107b6b <rtems_fdisk_queue_segment>
/*
* If no background compacting then compact in the forground.
* If we compact we ignore the error as there is little we
* can do from here. The write may will work.
*/
if ((fd->flags & RTEMS_FDISK_BACKGROUND_COMPACT) == 0)
108936: f6 47 08 02 testb $0x2,0x8(%edi)
10893a: 75 07 jne 108943 <rtems_fdisk_ioctl+0x55d><== NEVER TAKEN
rtems_fdisk_compact (fd);
10893c: 89 f8 mov %edi,%eax
10893e: e8 e1 f8 ff ff call 108224 <rtems_fdisk_compact>
/*
* Is it time to compact the disk ?
*
* We override the background compaction configruation.
*/
if (rtems_fdisk_segment_count_queue (&fd->available) <=
108943: 8b 47 34 mov 0x34(%edi),%eax
108946: e8 fb ee ff ff call 107846 <rtems_fdisk_segment_count_queue.isra.1>
10894b: 3b 47 10 cmp 0x10(%edi),%eax
10894e: 77 07 ja 108957 <rtems_fdisk_ioctl+0x571>
fd->avail_compact_segs)
rtems_fdisk_compact (fd);
108950: 89 f8 mov %edi,%eax
108952: e8 cd f8 ff ff call 108224 <rtems_fdisk_compact>
/*
* Get the next avaliable segment.
*/
sc = rtems_fdisk_segment_queue_pop_head (&fd->available);
108957: 8b 45 a8 mov -0x58(%ebp),%eax
10895a: e8 6c ec ff ff call 1075cb <rtems_fdisk_segment_queue_pop_head>
10895f: 89 c3 mov %eax,%ebx
/*
* Is the flash disk full ?
*/
if (!sc)
108961: 85 c0 test %eax,%eax
108963: 75 35 jne 10899a <rtems_fdisk_ioctl+0x5b4><== ALWAYS TAKEN
{
/*
* If compacting is configured for the background do it now
* to see if we can get some space back.
*/
if ((fd->flags & RTEMS_FDISK_BACKGROUND_COMPACT))
108965: f6 47 08 02 testb $0x2,0x8(%edi) <== NOT EXECUTED
108969: 74 07 je 108972 <rtems_fdisk_ioctl+0x58c><== NOT EXECUTED
rtems_fdisk_compact (fd);
10896b: 89 f8 mov %edi,%eax <== NOT EXECUTED
10896d: e8 b2 f8 ff ff call 108224 <rtems_fdisk_compact> <== NOT EXECUTED
/*
* Try again for some free space.
*/
sc = rtems_fdisk_segment_queue_pop_head (&fd->available);
108972: 8b 45 a8 mov -0x58(%ebp),%eax <== NOT EXECUTED
108975: e8 51 ec ff ff call 1075cb <rtems_fdisk_segment_queue_pop_head><== NOT EXECUTED
10897a: 89 c3 mov %eax,%ebx <== NOT EXECUTED
if (!sc)
10897c: 85 c0 test %eax,%eax <== NOT EXECUTED
10897e: 75 1a jne 10899a <rtems_fdisk_ioctl+0x5b4><== NOT EXECUTED
{
rtems_fdisk_error ("write-block: no available pages");
108980: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
108983: 68 bc ea 12 00 push $0x12eabc <== NOT EXECUTED
108988: e8 61 ee ff ff call 1077ee <rtems_fdisk_error> <== NOT EXECUTED
10898d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
return ENOSPC;
108990: b9 1c 00 00 00 mov $0x1c,%ecx <== NOT EXECUTED
108995: e9 f4 01 00 00 jmp 108b8e <rtems_fdisk_ioctl+0x7a8><== NOT EXECUTED
}
}
#if RTEMS_FDISK_TRACE
if (fd->info_level >= 3)
10899a: 83 7f 6c 02 cmpl $0x2,0x6c(%edi)
10899e: 76 29 jbe 1089c9 <rtems_fdisk_ioctl+0x5e3><== ALWAYS TAKEN
{
char queues[5];
rtems_fdisk_queue_status (fd, sc, queues);
1089a0: 8d 4d e3 lea -0x1d(%ebp),%ecx <== NOT EXECUTED
1089a3: 89 da mov %ebx,%edx <== NOT EXECUTED
1089a5: 89 f8 mov %edi,%eax <== NOT EXECUTED
1089a7: e8 99 f0 ff ff call 107a45 <rtems_fdisk_queue_status><== NOT EXECUTED
rtems_fdisk_info (fd, " write:%d=>%02d-%03d: queue check: %s",
1089ac: 50 push %eax <== NOT EXECUTED
1089ad: 50 push %eax <== NOT EXECUTED
1089ae: 8d 55 e3 lea -0x1d(%ebp),%edx <== NOT EXECUTED
1089b1: 52 push %edx <== NOT EXECUTED
1089b2: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED
1089b5: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED
1089b8: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED
1089bb: 68 dc ea 12 00 push $0x12eadc <== NOT EXECUTED
1089c0: 57 push %edi <== NOT EXECUTED
1089c1: e8 f4 ec ff ff call 1076ba <rtems_fdisk_info> <== NOT EXECUTED
1089c6: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
/*
* Find the next avaliable page in the segment.
*/
pd = sc->page_descriptors;
1089c9: 8b 4b 10 mov 0x10(%ebx),%ecx
1089cc: 89 4d cc mov %ecx,-0x34(%ebp)
for (page = 0; page < sc->pages; page++, pd++)
1089cf: 8b 53 14 mov 0x14(%ebx),%edx
1089d2: 89 55 bc mov %edx,-0x44(%ebp)
1089d5: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp)
1089dc: e9 5b 01 00 00 jmp 108b3c <rtems_fdisk_ioctl+0x756>
{
if (rtems_fdisk_page_desc_erased (pd))
1089e1: 8b 45 cc mov -0x34(%ebp),%eax
1089e4: e8 a4 ec ff ff call 10768d <rtems_fdisk_page_desc_erased>
1089e9: 84 c0 test %al,%al
1089eb: 0f 84 44 01 00 00 je 108b35 <rtems_fdisk_ioctl+0x74f>
{
uint16_t cs = 0xffff;
uint32_t i;
for (i = 0; i < page_size; i++, buffer++)
cs = rtems_fdisk_calc_crc16 (cs, *buffer);
1089f1: 8b 0d 84 34 15 00 mov 0x153484,%ecx
* @param req IOCTL request code.
* @param argp IOCTL argument.
* @retval The IOCTL return value
*/
static int
rtems_fdisk_ioctl (rtems_disk_device *dd, uint32_t req, void* argp)
1089f7: 8b 45 c0 mov -0x40(%ebp),%eax
1089fa: 03 47 14 add 0x14(%edi),%eax
1089fd: 89 45 ac mov %eax,-0x54(%ebp)
108a00: 8b 55 c0 mov -0x40(%ebp),%edx
* Calculate the checksum of a page in a segment.
*/
static uint16_t
rtems_fdisk_page_checksum (const uint8_t* buffer, uint32_t page_size)
{
uint16_t cs = 0xffff;
108a03: b8 ff ff 00 00 mov $0xffff,%eax
108a08: eb 0a jmp 108a14 <rtems_fdisk_ioctl+0x62e>
uint32_t i;
for (i = 0; i < page_size; i++, buffer++)
cs = rtems_fdisk_calc_crc16 (cs, *buffer);
108a0a: 32 02 xor (%edx),%al
108a0c: 0f b6 c0 movzbl %al,%eax
108a0f: 0f b7 04 41 movzwl (%ecx,%eax,2),%eax
rtems_fdisk_page_checksum (const uint8_t* buffer, uint32_t page_size)
{
uint16_t cs = 0xffff;
uint32_t i;
for (i = 0; i < page_size; i++, buffer++)
108a13: 42 inc %edx
108a14: 3b 55 ac cmp -0x54(%ebp),%edx
108a17: 75 f1 jne 108a0a <rtems_fdisk_ioctl+0x624>
for (page = 0; page < sc->pages; page++, pd++)
{
if (rtems_fdisk_page_desc_erased (pd))
{
pd->crc = rtems_fdisk_page_checksum (buffer, fd->block_size);
108a19: 8b 55 cc mov -0x34(%ebp),%edx
108a1c: 66 89 02 mov %ax,(%edx)
pd->block = block;
108a1f: 8b 4d d4 mov -0x2c(%ebp),%ecx
108a22: 89 4a 04 mov %ecx,0x4(%edx)
bc->segment = sc;
108a25: 8b 55 c8 mov -0x38(%ebp),%edx
108a28: 89 1a mov %ebx,(%edx)
bc->page = page;
108a2a: 8b 4d d0 mov -0x30(%ebp),%ecx
108a2d: 89 4a 04 mov %ecx,0x4(%edx)
* Set the flags. Setting means clear the bit to 0.
*/
static void
rtems_fdisk_page_desc_set_flags (rtems_fdisk_page_desc* pd, uint16_t flags)
{
pd->flags &= ~flags;
108a30: 8b 4d cc mov -0x34(%ebp),%ecx
108a33: 66 8b 51 02 mov 0x2(%ecx),%dx
108a37: 83 e2 fe and $0xfffffffe,%edx
108a3a: 66 89 51 02 mov %dx,0x2(%ecx)
bc->page = page;
rtems_fdisk_page_desc_set_flags (pd, RTEMS_FDISK_PAGE_ACTIVE);
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd, " write:%d=>%02d-%03d-%03d: write: " \
108a3e: 0f b7 d2 movzwl %dx,%edx
108a41: 83 3b 00 cmpl $0x0,(%ebx)
108a44: 74 07 je 108a4d <rtems_fdisk_ioctl+0x667><== ALWAYS TAKEN
108a46: b9 22 08 13 00 mov $0x130822,%ecx <== NOT EXECUTED
108a4b: eb 05 jmp 108a52 <rtems_fdisk_ioctl+0x66c><== NOT EXECUTED
108a4d: b9 97 e4 12 00 mov $0x12e497,%ecx
108a52: 83 ec 08 sub $0x8,%esp
108a55: ff 75 d4 pushl -0x2c(%ebp)
108a58: 50 push %eax
108a59: 52 push %edx
108a5a: 51 push %ecx
108a5b: ff 73 24 pushl 0x24(%ebx)
108a5e: ff 73 20 pushl 0x20(%ebx)
108a61: ff 73 1c pushl 0x1c(%ebx)
108a64: ff 75 bc pushl -0x44(%ebp)
108a67: ff 75 d0 pushl -0x30(%ebp)
108a6a: ff 73 0c pushl 0xc(%ebx)
108a6d: ff 73 08 pushl 0x8(%ebx)
108a70: ff 75 d4 pushl -0x2c(%ebp)
108a73: 68 02 eb 12 00 push $0x12eb02
108a78: 57 push %edi
108a79: e8 3c ec ff ff call 1076ba <rtems_fdisk_info>
/*
* We use the segment page offset not the page number used in the
* driver. This skips the page descriptors.
*/
ret = rtems_fdisk_seg_write_page (fd, sc, page + sc->pages_desc, buffer);
108a7e: 83 c4 34 add $0x34,%esp
108a81: 8b 4d d0 mov -0x30(%ebp),%ecx
108a84: 03 4b 18 add 0x18(%ebx),%ecx
108a87: ff 75 c0 pushl -0x40(%ebp)
108a8a: 89 da mov %ebx,%edx
108a8c: 89 f8 mov %edi,%eax
108a8e: e8 5e ef ff ff call 1079f1 <rtems_fdisk_seg_write_page>
if (ret)
108a93: 83 c4 10 add $0x10,%esp
108a96: 85 c0 test %eax,%eax
108a98: 74 24 je 108abe <rtems_fdisk_ioctl+0x6d8><== ALWAYS TAKEN
{
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd, "write-block:%02d-%03d-%03d: write page failed: " \
108a9a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
108a9d: 50 push %eax <== NOT EXECUTED
108a9e: 89 45 94 mov %eax,-0x6c(%ebp) <== NOT EXECUTED
108aa1: e8 1e 86 01 00 call 1210c4 <strerror> <== NOT EXECUTED
108aa6: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
108aa9: 8b 4d 94 mov -0x6c(%ebp),%ecx <== NOT EXECUTED
108aac: 51 push %ecx <== NOT EXECUTED
108aad: 50 push %eax <== NOT EXECUTED
108aae: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED
108ab1: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED
108ab4: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED
108ab7: 68 51 eb 12 00 push $0x12eb51 <== NOT EXECUTED
108abc: eb 40 jmp 108afe <rtems_fdisk_ioctl+0x718><== NOT EXECUTED
strerror (ret), ret);
#endif
}
else
{
ret = rtems_fdisk_seg_write_page_desc (fd, sc, page, pd);
108abe: 83 ec 0c sub $0xc,%esp
108ac1: ff 75 cc pushl -0x34(%ebp)
108ac4: 8b 4d d0 mov -0x30(%ebp),%ecx
108ac7: 89 da mov %ebx,%edx
108ac9: 89 f8 mov %edi,%eax
108acb: e8 d5 ee ff ff call 1079a5 <rtems_fdisk_seg_write_page_desc>
108ad0: 89 c1 mov %eax,%ecx
if (ret)
108ad2: 83 c4 10 add $0x10,%esp
108ad5: 85 c0 test %eax,%eax
108ad7: 74 33 je 108b0c <rtems_fdisk_ioctl+0x726><== ALWAYS TAKEN
{
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd, "write-block:%02d-%03d-%03d: " \
108ad9: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
108adc: 50 push %eax <== NOT EXECUTED
108add: 89 45 94 mov %eax,-0x6c(%ebp) <== NOT EXECUTED
108ae0: e8 df 85 01 00 call 1210c4 <strerror> <== NOT EXECUTED
108ae5: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
108ae8: 8b 4d 94 mov -0x6c(%ebp),%ecx <== NOT EXECUTED
108aeb: 51 push %ecx <== NOT EXECUTED
108aec: 50 push %eax <== NOT EXECUTED
108aed: 8b 45 c8 mov -0x38(%ebp),%eax <== NOT EXECUTED
108af0: ff 70 04 pushl 0x4(%eax) <== NOT EXECUTED
108af3: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED
108af6: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED
108af9: 68 88 eb 12 00 push $0x12eb88 <== NOT EXECUTED
108afe: 57 push %edi <== NOT EXECUTED
108aff: e8 b6 eb ff ff call 1076ba <rtems_fdisk_info> <== NOT EXECUTED
108b04: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
108b07: 8b 4d 94 mov -0x6c(%ebp),%ecx <== NOT EXECUTED
108b0a: eb 03 jmp 108b0f <rtems_fdisk_ioctl+0x729><== NOT EXECUTED
strerror (ret), ret);
#endif
}
else
{
sc->pages_active++;
108b0c: ff 43 1c incl 0x1c(%ebx)
}
}
rtems_fdisk_queue_segment (fd, sc);
108b0f: 89 da mov %ebx,%edx
108b11: 89 f8 mov %edi,%eax
108b13: 89 4d 94 mov %ecx,-0x6c(%ebp)
108b16: e8 50 f0 ff ff call 107b6b <rtems_fdisk_queue_segment>
static bool
rtems_fdisk_is_erased_blocks_starvation (rtems_flashdisk* fd)
{
bool starvation = fd->erased_blocks < fd->starvation_threshold;
if (starvation)
108b1b: 8b 57 24 mov 0x24(%edi),%edx
108b1e: 39 57 28 cmp %edx,0x28(%edi)
108b21: 8b 4d 94 mov -0x6c(%ebp),%ecx
108b24: 73 4d jae 108b73 <rtems_fdisk_ioctl+0x78d>
fd->starvations++;
108b26: ff 47 70 incl 0x70(%edi)
}
rtems_fdisk_queue_segment (fd, sc);
if (rtems_fdisk_is_erased_blocks_starvation (fd))
rtems_fdisk_compact (fd);
108b29: 89 f8 mov %edi,%eax
108b2b: e8 f4 f6 ff ff call 108224 <rtems_fdisk_compact>
108b30: 8b 4d 94 mov -0x6c(%ebp),%ecx
108b33: eb 3e jmp 108b73 <rtems_fdisk_ioctl+0x78d>
* Find the next avaliable page in the segment.
*/
pd = sc->page_descriptors;
for (page = 0; page < sc->pages; page++, pd++)
108b35: ff 45 d0 incl -0x30(%ebp)
108b38: 83 45 cc 08 addl $0x8,-0x34(%ebp)
108b3c: 8b 4d bc mov -0x44(%ebp),%ecx
108b3f: 39 4d d0 cmp %ecx,-0x30(%ebp)
108b42: 0f 85 99 fe ff ff jne 1089e1 <rtems_fdisk_ioctl+0x5fb><== ALWAYS TAKEN
return ret;
}
}
rtems_fdisk_error ("write-block: no erased page descs in segment: %d-%d",
108b48: 50 push %eax <== NOT EXECUTED
108b49: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED
108b4c: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED
108b4f: 68 c4 eb 12 00 push $0x12ebc4 <== NOT EXECUTED
108b54: e8 95 ec ff ff call 1077ee <rtems_fdisk_error> <== NOT EXECUTED
sc->device, sc->segment);
sc->failed = true;
108b59: c7 43 28 01 00 00 00 movl $0x1,0x28(%ebx) <== NOT EXECUTED
rtems_fdisk_queue_segment (fd, sc);
108b60: 89 da mov %ebx,%edx <== NOT EXECUTED
108b62: 89 f8 mov %edi,%eax <== NOT EXECUTED
108b64: e8 02 f0 ff ff call 107b6b <rtems_fdisk_queue_segment><== NOT EXECUTED
108b69: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
return EIO;
108b6c: b9 05 00 00 00 mov $0x5,%ecx <== NOT EXECUTED
108b71: eb 1b jmp 108b8e <rtems_fdisk_ioctl+0x7a8><== NOT EXECUTED
fb = sg->length / fd->block_size;
data = sg->buffer;
for (b = 0; b < fb; b++, data += fd->block_size)
{
ret = rtems_fdisk_write_block (fd, sg->block + b, data);
if (ret)
108b73: 85 c9 test %ecx,%ecx
108b75: 75 17 jne 108b8e <rtems_fdisk_ioctl+0x7a8><== NEVER TAKEN
uint8_t* data;
uint32_t fb;
uint32_t b;
fb = sg->length / fd->block_size;
data = sg->buffer;
for (b = 0; b < fb; b++, data += fd->block_size)
108b77: ff 45 b4 incl -0x4c(%ebp)
108b7a: 8b 47 14 mov 0x14(%edi),%eax
108b7d: 01 45 c0 add %eax,-0x40(%ebp)
108b80: 8b 45 98 mov -0x68(%ebp),%eax
108b83: 39 45 b4 cmp %eax,-0x4c(%ebp)
108b86: 0f 85 c9 fb ff ff jne 108755 <rtems_fdisk_ioctl+0x36f>
108b8c: 31 c9 xor %ecx,%ecx
{
rtems_blkdev_sg_buffer* sg = req->bufs;
uint32_t buf;
int ret = 0;
for (buf = 0; (ret == 0) && (buf < req->bufnum); buf++, sg++)
108b8e: ff 45 b0 incl -0x50(%ebp)
108b91: 83 45 c4 10 addl $0x10,-0x3c(%ebp)
108b95: 85 c9 test %ecx,%ecx
108b97: 75 10 jne 108ba9 <rtems_fdisk_ioctl+0x7c3><== NEVER TAKEN
108b99: 8b 55 b0 mov -0x50(%ebp),%edx
108b9c: 3b 56 10 cmp 0x10(%esi),%edx
108b9f: 0f 82 8d fb ff ff jb 108732 <rtems_fdisk_ioctl+0x34c>
if (ret)
break;
}
}
req->status = ret ? RTEMS_IO_ERROR : RTEMS_SUCCESSFUL;
108ba5: 31 c0 xor %eax,%eax
108ba7: eb 05 jmp 108bae <rtems_fdisk_ioctl+0x7c8>
108ba9: b8 1b 00 00 00 mov $0x1b,%eax <== NOT EXECUTED
108bae: 89 46 0c mov %eax,0xc(%esi)
req->req_done (req->done_arg, req->status);
108bb1: 57 push %edi
108bb2: 57 push %edi
108bb3: 50 push %eax
108bb4: ff 76 08 pushl 0x8(%esi)
108bb7: ff 56 04 call *0x4(%esi)
case RTEMS_BLKDEV_REQ_READ:
errno = rtems_fdisk_read (&rtems_flashdisks[minor], r);
break;
case RTEMS_BLKDEV_REQ_WRITE:
errno = rtems_fdisk_write (&rtems_flashdisks[minor], r);
108bba: 8b 45 a4 mov -0x5c(%ebp),%eax
108bbd: c7 00 00 00 00 00 movl $0x0,(%eax)
108bc3: e9 fd 04 00 00 jmp 1090c5 <rtems_fdisk_ioctl+0xcdf>
break;
default:
errno = EINVAL;
108bc8: e8 ff 65 01 00 call 11f1cc <__errno> <== NOT EXECUTED
108bcd: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
break;
108bd3: e9 f0 04 00 00 jmp 1090c8 <rtems_fdisk_ioctl+0xce2><== NOT EXECUTED
}
}
break;
case RTEMS_FDISK_IOCTL_ERASE_DISK:
errno = rtems_fdisk_erase_disk (&rtems_flashdisks[minor]);
108bd8: e8 ef 65 01 00 call 11f1cc <__errno> <== NOT EXECUTED
108bdd: 89 c7 mov %eax,%edi <== NOT EXECUTED
108bdf: 8b 5d b8 mov -0x48(%ebp),%ebx <== NOT EXECUTED
108be2: 03 1d 7c 34 15 00 add 0x15347c,%ebx <== NOT EXECUTED
{
uint32_t device;
int ret;
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd, "erase-disk");
108be8: 56 push %esi <== NOT EXECUTED
108be9: 56 push %esi <== NOT EXECUTED
108bea: 68 f8 eb 12 00 push $0x12ebf8 <== NOT EXECUTED
108bef: 53 push %ebx <== NOT EXECUTED
108bf0: e8 c5 ea ff ff call 1076ba <rtems_fdisk_info> <== NOT EXECUTED
108bf5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
*/
static int
rtems_fdisk_erase_flash (const rtems_flashdisk* fd)
{
uint32_t device;
for (device = 0; device < fd->device_count; device++)
108bf8: 31 f6 xor %esi,%esi <== NOT EXECUTED
108bfa: eb 4a jmp 108c46 <rtems_fdisk_ioctl+0x860><== NOT EXECUTED
{
int ret;
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd, " erase-flash:%02d", device);
108bfc: 50 push %eax <== NOT EXECUTED
108bfd: 56 push %esi <== NOT EXECUTED
108bfe: 68 03 ec 12 00 push $0x12ec03 <== NOT EXECUTED
108c03: 53 push %ebx <== NOT EXECUTED
108c04: e8 b1 ea ff ff call 1076ba <rtems_fdisk_info> <== NOT EXECUTED
* @param req IOCTL request code.
* @param argp IOCTL argument.
* @retval The IOCTL return value
*/
static int
rtems_fdisk_ioctl (rtems_disk_device *dd, uint32_t req, void* argp)
108c09: 6b d6 0c imul $0xc,%esi,%edx <== NOT EXECUTED
*/
static int
rtems_fdisk_device_erase (const rtems_flashdisk* fd, uint32_t device)
{
const rtems_fdisk_driver_handlers* ops;
ops = fd->devices[device].descriptor->flash_ops;
108c0c: 8b 43 2c mov 0x2c(%ebx),%eax <== NOT EXECUTED
108c0f: 8b 44 10 08 mov 0x8(%eax,%edx,1),%eax <== NOT EXECUTED
108c13: 8b 48 08 mov 0x8(%eax),%ecx <== NOT EXECUTED
#if RTEMS_FDISK_TRACE
rtems_fdisk_printf (fd, " device-erase: %02d", device);
108c16: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
108c19: 56 push %esi <== NOT EXECUTED
108c1a: 68 15 ec 12 00 push $0x12ec15 <== NOT EXECUTED
108c1f: 53 push %ebx <== NOT EXECUTED
108c20: 89 55 90 mov %edx,-0x70(%ebp) <== NOT EXECUTED
108c23: 89 4d 94 mov %ecx,-0x6c(%ebp) <== NOT EXECUTED
108c26: e8 f7 ea ff ff call 107722 <rtems_fdisk_printf> <== NOT EXECUTED
#endif
return ops->erase_device (fd->devices[device].descriptor, device);
108c2b: 5a pop %edx <== NOT EXECUTED
108c2c: 59 pop %ecx <== NOT EXECUTED
108c2d: 56 push %esi <== NOT EXECUTED
108c2e: 8b 43 2c mov 0x2c(%ebx),%eax <== NOT EXECUTED
108c31: 8b 55 90 mov -0x70(%ebp),%edx <== NOT EXECUTED
108c34: ff 74 10 08 pushl 0x8(%eax,%edx,1) <== NOT EXECUTED
108c38: 8b 4d 94 mov -0x6c(%ebp),%ecx <== NOT EXECUTED
108c3b: ff 51 14 call *0x14(%ecx) <== NOT EXECUTED
rtems_fdisk_info (fd, " erase-flash:%02d", device);
#endif
ret = rtems_fdisk_device_erase (fd, device);
if (ret != 0)
108c3e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
108c41: 85 c0 test %eax,%eax <== NOT EXECUTED
108c43: 75 2f jne 108c74 <rtems_fdisk_ioctl+0x88e><== NOT EXECUTED
*/
static int
rtems_fdisk_erase_flash (const rtems_flashdisk* fd)
{
uint32_t device;
for (device = 0; device < fd->device_count; device++)
108c45: 46 inc %esi <== NOT EXECUTED
108c46: 3b 73 30 cmp 0x30(%ebx),%esi <== NOT EXECUTED
108c49: 72 b1 jb 108bfc <rtems_fdisk_ioctl+0x816><== NOT EXECUTED
108c4b: 31 f6 xor %esi,%esi <== NOT EXECUTED
108c4d: eb 17 jmp 108c66 <rtems_fdisk_ioctl+0x880><== NOT EXECUTED
if (ret == 0)
{
for (device = 0; device < fd->device_count; device++)
{
if (!fd->devices[device].segments)
108c4f: 6b c6 0c imul $0xc,%esi,%eax <== NOT EXECUTED
108c52: 03 43 2c add 0x2c(%ebx),%eax <== NOT EXECUTED
108c55: 83 38 00 cmpl $0x0,(%eax) <== NOT EXECUTED
108c58: 74 15 je 108c6f <rtems_fdisk_ioctl+0x889><== NOT EXECUTED
return ENOMEM;
ret = rtems_fdisk_recover_block_mappings (fd);
108c5a: 89 d8 mov %ebx,%eax <== NOT EXECUTED
108c5c: e8 2e f0 ff ff call 107c8f <rtems_fdisk_recover_block_mappings><== NOT EXECUTED
if (ret)
108c61: 85 c0 test %eax,%eax <== NOT EXECUTED
108c63: 75 0f jne 108c74 <rtems_fdisk_ioctl+0x88e><== NOT EXECUTED
ret = rtems_fdisk_erase_flash (fd);
if (ret == 0)
{
for (device = 0; device < fd->device_count; device++)
108c65: 46 inc %esi <== NOT EXECUTED
108c66: 3b 73 30 cmp 0x30(%ebx),%esi <== NOT EXECUTED
108c69: 72 e4 jb 108c4f <rtems_fdisk_ioctl+0x869><== NOT EXECUTED
108c6b: 31 c0 xor %eax,%eax <== NOT EXECUTED
108c6d: eb 05 jmp 108c74 <rtems_fdisk_ioctl+0x88e><== NOT EXECUTED
{
if (!fd->devices[device].segments)
return ENOMEM;
108c6f: b8 0c 00 00 00 mov $0xc,%eax <== NOT EXECUTED
}
}
break;
case RTEMS_FDISK_IOCTL_ERASE_DISK:
errno = rtems_fdisk_erase_disk (&rtems_flashdisks[minor]);
108c74: 89 07 mov %eax,(%edi) <== NOT EXECUTED
break;
108c76: e9 4d 04 00 00 jmp 1090c8 <rtems_fdisk_ioctl+0xce2><== NOT EXECUTED
case RTEMS_FDISK_IOCTL_COMPACT:
errno = rtems_fdisk_compact (&rtems_flashdisks[minor]);
108c7b: e8 4c 65 01 00 call 11f1cc <__errno> <== NOT EXECUTED
108c80: 89 c3 mov %eax,%ebx <== NOT EXECUTED
108c82: 8b 45 b8 mov -0x48(%ebp),%eax <== NOT EXECUTED
108c85: 03 05 7c 34 15 00 add 0x15347c,%eax <== NOT EXECUTED
108c8b: e8 94 f5 ff ff call 108224 <rtems_fdisk_compact> <== NOT EXECUTED
108c90: 89 03 mov %eax,(%ebx) <== NOT EXECUTED
break;
108c92: e9 31 04 00 00 jmp 1090c8 <rtems_fdisk_ioctl+0xce2><== NOT EXECUTED
case RTEMS_FDISK_IOCTL_ERASE_USED:
errno = rtems_fdisk_erase_used (&rtems_flashdisks[minor]);
108c97: e8 30 65 01 00 call 11f1cc <__errno> <== NOT EXECUTED
108c9c: 89 c6 mov %eax,%esi <== NOT EXECUTED
108c9e: 8b 5d b8 mov -0x48(%ebp),%ebx <== NOT EXECUTED
108ca1: 03 1d 7c 34 15 00 add 0x15347c,%ebx <== NOT EXECUTED
*/
static int
rtems_fdisk_erase_used (rtems_flashdisk* fd)
{
rtems_fdisk_segment_ctl* sc;
int latched_ret = 0;
108ca7: 31 ff xor %edi,%edi <== NOT EXECUTED
while ((sc = rtems_fdisk_segment_queue_pop_head (&fd->erase)))
108ca9: 8d 4b 4c lea 0x4c(%ebx),%ecx <== NOT EXECUTED
108cac: 89 4d d4 mov %ecx,-0x2c(%ebp) <== NOT EXECUTED
108caf: eb 13 jmp 108cc4 <rtems_fdisk_ioctl+0x8de><== NOT EXECUTED
{
/*
* The segment will either end up on the available queue or
* the failed queue.
*/
int ret = rtems_fdisk_erase_segment (fd, sc);
108cb1: 89 c2 mov %eax,%edx <== NOT EXECUTED
108cb3: 89 d8 mov %ebx,%eax <== NOT EXECUTED
108cb5: e8 f5 ed ff ff call 107aaf <rtems_fdisk_erase_segment><== NOT EXECUTED
if (ret && !latched_ret)
108cba: 85 c0 test %eax,%eax <== NOT EXECUTED
108cbc: 74 06 je 108cc4 <rtems_fdisk_ioctl+0x8de><== NOT EXECUTED
108cbe: 85 ff test %edi,%edi <== NOT EXECUTED
108cc0: 75 02 jne 108cc4 <rtems_fdisk_ioctl+0x8de><== NOT EXECUTED
108cc2: 89 c7 mov %eax,%edi <== NOT EXECUTED
rtems_fdisk_erase_used (rtems_flashdisk* fd)
{
rtems_fdisk_segment_ctl* sc;
int latched_ret = 0;
while ((sc = rtems_fdisk_segment_queue_pop_head (&fd->erase)))
108cc4: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED
108cc7: e8 ff e8 ff ff call 1075cb <rtems_fdisk_segment_queue_pop_head><== NOT EXECUTED
108ccc: 85 c0 test %eax,%eax <== NOT EXECUTED
108cce: 75 e1 jne 108cb1 <rtems_fdisk_ioctl+0x8cb><== NOT EXECUTED
case RTEMS_FDISK_IOCTL_COMPACT:
errno = rtems_fdisk_compact (&rtems_flashdisks[minor]);
break;
case RTEMS_FDISK_IOCTL_ERASE_USED:
errno = rtems_fdisk_erase_used (&rtems_flashdisks[minor]);
108cd0: 89 3e mov %edi,(%esi) <== NOT EXECUTED
break;
108cd2: e9 f1 03 00 00 jmp 1090c8 <rtems_fdisk_ioctl+0xce2><== NOT EXECUTED
case RTEMS_FDISK_IOCTL_MONITORING:
errno = rtems_fdisk_monitoring_data (&rtems_flashdisks[minor],
108cd7: e8 f0 64 01 00 call 11f1cc <__errno> <== NOT EXECUTED
108cdc: 89 45 cc mov %eax,-0x34(%ebp) <== NOT EXECUTED
108cdf: 8b 5d b8 mov -0x48(%ebp),%ebx <== NOT EXECUTED
108ce2: 03 1d 7c 34 15 00 add 0x15347c,%ebx <== NOT EXECUTED
rtems_fdisk_monitor_data* data)
{
uint32_t i;
uint32_t j;
data->block_size = fd->block_size;
108ce8: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED
108ceb: 89 06 mov %eax,(%esi) <== NOT EXECUTED
data->block_count = fd->block_count;
108ced: 8b 53 1c mov 0x1c(%ebx),%edx <== NOT EXECUTED
108cf0: 89 56 04 mov %edx,0x4(%esi) <== NOT EXECUTED
data->unavail_blocks = fd->unavail_blocks;
108cf3: 8b 43 20 mov 0x20(%ebx),%eax <== NOT EXECUTED
108cf6: 89 46 08 mov %eax,0x8(%esi) <== NOT EXECUTED
data->device_count = fd->device_count;
108cf9: 8b 4b 30 mov 0x30(%ebx),%ecx <== NOT EXECUTED
108cfc: 89 4d d4 mov %ecx,-0x2c(%ebp) <== NOT EXECUTED
108cff: 89 4e 0c mov %ecx,0xc(%esi) <== NOT EXECUTED
data->blocks_used = 0;
108d02: c7 46 18 00 00 00 00 movl $0x0,0x18(%esi) <== NOT EXECUTED
for (i = 0; i < fd->block_count; i++)
108d09: 31 c0 xor %eax,%eax <== NOT EXECUTED
108d0b: eb 0d jmp 108d1a <rtems_fdisk_ioctl+0x934><== NOT EXECUTED
if (fd->blocks[i].segment)
108d0d: 8b 4b 18 mov 0x18(%ebx),%ecx <== NOT EXECUTED
108d10: 83 3c c1 00 cmpl $0x0,(%ecx,%eax,8) <== NOT EXECUTED
108d14: 74 03 je 108d19 <rtems_fdisk_ioctl+0x933><== NOT EXECUTED
data->blocks_used++;
108d16: ff 46 18 incl 0x18(%esi) <== NOT EXECUTED
data->block_count = fd->block_count;
data->unavail_blocks = fd->unavail_blocks;
data->device_count = fd->device_count;
data->blocks_used = 0;
for (i = 0; i < fd->block_count; i++)
108d19: 40 inc %eax <== NOT EXECUTED
108d1a: 39 d0 cmp %edx,%eax <== NOT EXECUTED
108d1c: 75 ef jne 108d0d <rtems_fdisk_ioctl+0x927><== NOT EXECUTED
if (fd->blocks[i].segment)
data->blocks_used++;
data->segs_available = rtems_fdisk_segment_count_queue (&fd->available);
108d1e: 8b 43 34 mov 0x34(%ebx),%eax <== NOT EXECUTED
108d21: e8 20 eb ff ff call 107846 <rtems_fdisk_segment_count_queue.isra.1><== NOT EXECUTED
108d26: 89 46 1c mov %eax,0x1c(%esi) <== NOT EXECUTED
data->segs_used = rtems_fdisk_segment_count_queue (&fd->used);
108d29: 8b 43 40 mov 0x40(%ebx),%eax <== NOT EXECUTED
108d2c: e8 15 eb ff ff call 107846 <rtems_fdisk_segment_count_queue.isra.1><== NOT EXECUTED
108d31: 89 46 20 mov %eax,0x20(%esi) <== NOT EXECUTED
data->segs_failed = rtems_fdisk_segment_count_queue (&fd->failed);
108d34: 8b 43 58 mov 0x58(%ebx),%eax <== NOT EXECUTED
108d37: e8 0a eb ff ff call 107846 <rtems_fdisk_segment_count_queue.isra.1><== NOT EXECUTED
108d3c: 89 46 24 mov %eax,0x24(%esi) <== NOT EXECUTED
data->segment_count = 0;
108d3f: c7 46 10 00 00 00 00 movl $0x0,0x10(%esi) <== NOT EXECUTED
data->page_count = 0;
108d46: c7 46 14 00 00 00 00 movl $0x0,0x14(%esi) <== NOT EXECUTED
data->pages_desc = 0;
108d4d: c7 46 2c 00 00 00 00 movl $0x0,0x2c(%esi) <== NOT EXECUTED
data->pages_active = 0;
108d54: c7 46 30 00 00 00 00 movl $0x0,0x30(%esi) <== NOT EXECUTED
data->pages_used = 0;
108d5b: c7 46 34 00 00 00 00 movl $0x0,0x34(%esi) <== NOT EXECUTED
data->pages_bad = 0;
108d62: c7 46 38 00 00 00 00 movl $0x0,0x38(%esi) <== NOT EXECUTED
data->seg_erases = 0;
108d69: c7 46 28 00 00 00 00 movl $0x0,0x28(%esi) <== NOT EXECUTED
for (i = 0; i < fd->device_count; i++)
108d70: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) <== NOT EXECUTED
108d77: eb 46 jmp 108dbf <rtems_fdisk_ioctl+0x9d9><== NOT EXECUTED
* @param req IOCTL request code.
* @param argp IOCTL argument.
* @retval The IOCTL return value
*/
static int
rtems_fdisk_ioctl (rtems_disk_device *dd, uint32_t req, void* argp)
108d79: 6b 7d d0 0c imul $0xc,-0x30(%ebp),%edi <== NOT EXECUTED
data->pages_bad = 0;
data->seg_erases = 0;
for (i = 0; i < fd->device_count; i++)
{
data->segment_count += fd->devices[i].segment_count;
108d7d: 03 7b 2c add 0x2c(%ebx),%edi <== NOT EXECUTED
108d80: 8b 47 04 mov 0x4(%edi),%eax <== NOT EXECUTED
108d83: 89 45 c8 mov %eax,-0x38(%ebp) <== NOT EXECUTED
108d86: 01 46 10 add %eax,0x10(%esi) <== NOT EXECUTED
for (j = 0; j < fd->devices[i].segment_count; j++)
108d89: 31 c9 xor %ecx,%ecx <== NOT EXECUTED
108d8b: eb 2a jmp 108db7 <rtems_fdisk_ioctl+0x9d1><== NOT EXECUTED
* @param req IOCTL request code.
* @param argp IOCTL argument.
* @retval The IOCTL return value
*/
static int
rtems_fdisk_ioctl (rtems_disk_device *dd, uint32_t req, void* argp)
108d8d: 6b c1 30 imul $0x30,%ecx,%eax <== NOT EXECUTED
{
data->segment_count += fd->devices[i].segment_count;
for (j = 0; j < fd->devices[i].segment_count; j++)
{
rtems_fdisk_segment_ctl* sc = &fd->devices[i].segments[j];
108d90: 03 07 add (%edi),%eax <== NOT EXECUTED
data->page_count += sc->pages;
108d92: 8b 50 14 mov 0x14(%eax),%edx <== NOT EXECUTED
108d95: 01 56 14 add %edx,0x14(%esi) <== NOT EXECUTED
data->pages_desc += sc->pages_desc;
108d98: 8b 50 18 mov 0x18(%eax),%edx <== NOT EXECUTED
108d9b: 01 56 2c add %edx,0x2c(%esi) <== NOT EXECUTED
data->pages_active += sc->pages_active;
108d9e: 8b 50 1c mov 0x1c(%eax),%edx <== NOT EXECUTED
108da1: 01 56 30 add %edx,0x30(%esi) <== NOT EXECUTED
data->pages_used += sc->pages_used;
108da4: 8b 50 20 mov 0x20(%eax),%edx <== NOT EXECUTED
108da7: 01 56 34 add %edx,0x34(%esi) <== NOT EXECUTED
data->pages_bad += sc->pages_bad;
108daa: 8b 50 24 mov 0x24(%eax),%edx <== NOT EXECUTED
108dad: 01 56 38 add %edx,0x38(%esi) <== NOT EXECUTED
data->seg_erases += sc->erased;
108db0: 8b 40 2c mov 0x2c(%eax),%eax <== NOT EXECUTED
108db3: 01 46 28 add %eax,0x28(%esi) <== NOT EXECUTED
for (i = 0; i < fd->device_count; i++)
{
data->segment_count += fd->devices[i].segment_count;
for (j = 0; j < fd->devices[i].segment_count; j++)
108db6: 41 inc %ecx <== NOT EXECUTED
108db7: 3b 4d c8 cmp -0x38(%ebp),%ecx <== NOT EXECUTED
108dba: 75 d1 jne 108d8d <rtems_fdisk_ioctl+0x9a7><== NOT EXECUTED
data->pages_active = 0;
data->pages_used = 0;
data->pages_bad = 0;
data->seg_erases = 0;
for (i = 0; i < fd->device_count; i++)
108dbc: ff 45 d0 incl -0x30(%ebp) <== NOT EXECUTED
108dbf: 8b 4d d4 mov -0x2c(%ebp),%ecx <== NOT EXECUTED
108dc2: 39 4d d0 cmp %ecx,-0x30(%ebp) <== NOT EXECUTED
108dc5: 75 b2 jne 108d79 <rtems_fdisk_ioctl+0x993><== NOT EXECUTED
data->pages_bad += sc->pages_bad;
data->seg_erases += sc->erased;
}
}
data->info_level = fd->info_level;
108dc7: 8b 43 6c mov 0x6c(%ebx),%eax <== NOT EXECUTED
108dca: 89 46 3c mov %eax,0x3c(%esi) <== NOT EXECUTED
case RTEMS_FDISK_IOCTL_ERASE_USED:
errno = rtems_fdisk_erase_used (&rtems_flashdisks[minor]);
break;
case RTEMS_FDISK_IOCTL_MONITORING:
errno = rtems_fdisk_monitoring_data (&rtems_flashdisks[minor],
108dcd: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED
108dd0: e9 dd 02 00 00 jmp 1090b2 <rtems_fdisk_ioctl+0xccc><== NOT EXECUTED
(rtems_fdisk_monitor_data*) argp);
break;
case RTEMS_FDISK_IOCTL_INFO_LEVEL:
rtems_flashdisks[minor].info_level = (uintptr_t) argp;
108dd5: a1 7c 34 15 00 mov 0x15347c,%eax <== NOT EXECUTED
108dda: 8b 55 b8 mov -0x48(%ebp),%edx <== NOT EXECUTED
108ddd: 89 74 10 6c mov %esi,0x6c(%eax,%edx,1) <== NOT EXECUTED
break;
108de1: e9 e2 02 00 00 jmp 1090c8 <rtems_fdisk_ioctl+0xce2><== NOT EXECUTED
case RTEMS_FDISK_IOCTL_PRINT_STATUS:
errno = rtems_fdisk_print_status (&rtems_flashdisks[minor]);
108de6: e8 e1 63 01 00 call 11f1cc <__errno>
108deb: 89 45 b0 mov %eax,-0x50(%ebp)
108dee: 8b 5d b8 mov -0x48(%ebp),%ebx
108df1: 03 1d 7c 34 15 00 add 0x15347c,%ebx
*/
static int
rtems_fdisk_print_status (rtems_flashdisk* fd)
{
#if RTEMS_FDISK_TRACE
uint32_t current_info_level = fd->info_level;
108df7: 8b 73 6c mov 0x6c(%ebx),%esi
108dfa: 89 75 bc mov %esi,-0x44(%ebp)
uint32_t total;
uint32_t count;
uint32_t device;
fd->info_level = 3;
108dfd: c7 43 6c 03 00 00 00 movl $0x3,0x6c(%ebx)
rtems_fdisk_printf (fd,
108e04: ff 73 04 pushl 0x4(%ebx)
108e07: ff 33 pushl (%ebx)
108e09: 68 29 ec 12 00 push $0x12ec29
108e0e: 53 push %ebx
108e0f: e8 0e e9 ff ff call 107722 <rtems_fdisk_printf>
"Flash Disk Driver Status : %d.%d", fd->major, fd->minor);
rtems_fdisk_printf (fd, "Block count\t%d", fd->block_count);
108e14: 83 c4 0c add $0xc,%esp
108e17: ff 73 1c pushl 0x1c(%ebx)
108e1a: 68 4a ec 12 00 push $0x12ec4a
108e1f: 53 push %ebx
108e20: e8 fd e8 ff ff call 107722 <rtems_fdisk_printf>
rtems_fdisk_printf (fd, "Unavail blocks\t%d", fd->unavail_blocks);
108e25: 83 c4 0c add $0xc,%esp
108e28: ff 73 20 pushl 0x20(%ebx)
108e2b: 68 59 ec 12 00 push $0x12ec59
108e30: 53 push %ebx
108e31: e8 ec e8 ff ff call 107722 <rtems_fdisk_printf>
rtems_fdisk_printf (fd, "Starvation threshold\t%d", fd->starvation_threshold);
108e36: 83 c4 0c add $0xc,%esp
108e39: ff 73 24 pushl 0x24(%ebx)
108e3c: 68 6b ec 12 00 push $0x12ec6b
108e41: 53 push %ebx
108e42: e8 db e8 ff ff call 107722 <rtems_fdisk_printf>
rtems_fdisk_printf (fd, "Starvations\t%d", fd->starvations);
108e47: 83 c4 0c add $0xc,%esp
108e4a: ff 73 70 pushl 0x70(%ebx)
108e4d: 68 83 ec 12 00 push $0x12ec83
108e52: 53 push %ebx
108e53: e8 ca e8 ff ff call 107722 <rtems_fdisk_printf>
count = rtems_fdisk_segment_count_queue (&fd->available);
108e58: 8b 43 34 mov 0x34(%ebx),%eax
108e5b: e8 e6 e9 ff ff call 107846 <rtems_fdisk_segment_count_queue.isra.1>
108e60: 89 c7 mov %eax,%edi
total = count;
rtems_fdisk_printf (fd, "Available queue\t%ld (%ld)",
108e62: ff 73 3c pushl 0x3c(%ebx)
108e65: 50 push %eax
108e66: 68 92 ec 12 00 push $0x12ec92
108e6b: 53 push %ebx
108e6c: e8 b1 e8 ff ff call 107722 <rtems_fdisk_printf>
count, rtems_fdisk_segment_queue_count (&fd->available));
count = rtems_fdisk_segment_count_queue (&fd->used);
108e71: 83 c4 20 add $0x20,%esp
108e74: 8b 43 40 mov 0x40(%ebx),%eax
108e77: e8 ca e9 ff ff call 107846 <rtems_fdisk_segment_count_queue.isra.1>
total += count;
108e7c: 01 c7 add %eax,%edi
rtems_fdisk_printf (fd, "Used queue\t%ld (%ld)",
108e7e: ff 73 48 pushl 0x48(%ebx)
108e81: 50 push %eax
108e82: 68 ac ec 12 00 push $0x12ecac
108e87: 53 push %ebx
108e88: e8 95 e8 ff ff call 107722 <rtems_fdisk_printf>
count, rtems_fdisk_segment_queue_count (&fd->used));
count = rtems_fdisk_segment_count_queue (&fd->erase);
108e8d: 8b 43 4c mov 0x4c(%ebx),%eax
108e90: e8 b1 e9 ff ff call 107846 <rtems_fdisk_segment_count_queue.isra.1>
total += count;
108e95: 01 c7 add %eax,%edi
rtems_fdisk_printf (fd, "Erase queue\t%ld (%ld)",
108e97: ff 73 54 pushl 0x54(%ebx)
108e9a: 50 push %eax
108e9b: 68 c1 ec 12 00 push $0x12ecc1
108ea0: 53 push %ebx
108ea1: e8 7c e8 ff ff call 107722 <rtems_fdisk_printf>
count, rtems_fdisk_segment_queue_count (&fd->erase));
count = rtems_fdisk_segment_count_queue (&fd->failed);
108ea6: 83 c4 20 add $0x20,%esp
108ea9: 8b 43 58 mov 0x58(%ebx),%eax
108eac: e8 95 e9 ff ff call 107846 <rtems_fdisk_segment_count_queue.isra.1>
total += count;
108eb1: 01 c7 add %eax,%edi
rtems_fdisk_printf (fd, "Failed queue\t%ld (%ld)",
108eb3: ff 73 60 pushl 0x60(%ebx)
108eb6: 50 push %eax
108eb7: 68 d7 ec 12 00 push $0x12ecd7
108ebc: 53 push %ebx
108ebd: e8 60 e8 ff ff call 107722 <rtems_fdisk_printf>
count, rtems_fdisk_segment_queue_count (&fd->failed));
count = 0;
for (device = 0; device < fd->device_count; device++)
108ec2: 8b 43 30 mov 0x30(%ebx),%eax
108ec5: 83 c4 10 add $0x10,%esp
108ec8: 31 c9 xor %ecx,%ecx
count = rtems_fdisk_segment_count_queue (&fd->failed);
total += count;
rtems_fdisk_printf (fd, "Failed queue\t%ld (%ld)",
count, rtems_fdisk_segment_queue_count (&fd->failed));
count = 0;
108eca: 31 d2 xor %edx,%edx
108ecc: eb 0a jmp 108ed8 <rtems_fdisk_ioctl+0xaf2>
for (device = 0; device < fd->device_count; device++)
count += fd->devices[device].segment_count;
108ece: 6b f1 0c imul $0xc,%ecx,%esi
108ed1: 03 73 2c add 0x2c(%ebx),%esi
108ed4: 03 56 04 add 0x4(%esi),%edx
total += count;
rtems_fdisk_printf (fd, "Failed queue\t%ld (%ld)",
count, rtems_fdisk_segment_queue_count (&fd->failed));
count = 0;
for (device = 0; device < fd->device_count; device++)
108ed7: 41 inc %ecx
108ed8: 39 c1 cmp %eax,%ecx
108eda: 75 f2 jne 108ece <rtems_fdisk_ioctl+0xae8>
count += fd->devices[device].segment_count;
rtems_fdisk_printf (fd, "Queue total\t%ld of %ld, %s", total, count,
108edc: b8 20 e8 12 00 mov $0x12e820,%eax
108ee1: 39 d7 cmp %edx,%edi
108ee3: 75 05 jne 108eea <rtems_fdisk_ioctl+0xb04><== NEVER TAKEN
108ee5: b8 1d e8 12 00 mov $0x12e81d,%eax
108eea: 83 ec 0c sub $0xc,%esp
108eed: 50 push %eax
108eee: 52 push %edx
108eef: 57 push %edi
108ef0: 68 ee ec 12 00 push $0x12ecee
108ef5: 53 push %ebx
108ef6: e8 27 e8 ff ff call 107722 <rtems_fdisk_printf>
total == count ? "ok" : "MISSING");
rtems_fdisk_printf (fd, "Device count\t%d", fd->device_count);
108efb: 83 c4 1c add $0x1c,%esp
108efe: ff 73 30 pushl 0x30(%ebx)
108f01: 68 09 ed 12 00 push $0x12ed09
108f06: 53 push %ebx
108f07: e8 16 e8 ff ff call 107722 <rtems_fdisk_printf>
108f0c: 83 c4 10 add $0x10,%esp
for (device = 0; device < fd->device_count; device++)
108f0f: 31 ff xor %edi,%edi
108f11: e9 52 01 00 00 jmp 109068 <rtems_fdisk_ioctl+0xc82>
{
uint32_t block;
uint32_t seg;
rtems_fdisk_printf (fd, " Device\t\t%ld", device);
108f16: 50 push %eax
108f17: 57 push %edi
108f18: 68 19 ed 12 00 push $0x12ed19
108f1d: 53 push %ebx
108f1e: e8 ff e7 ff ff call 107722 <rtems_fdisk_printf>
* @param req IOCTL request code.
* @param argp IOCTL argument.
* @retval The IOCTL return value
*/
static int
rtems_fdisk_ioctl (rtems_disk_device *dd, uint32_t req, void* argp)
108f23: 6b f7 0c imul $0xc,%edi,%esi
108f26: 89 75 b4 mov %esi,-0x4c(%ebp)
{
uint32_t block;
uint32_t seg;
rtems_fdisk_printf (fd, " Device\t\t%ld", device);
rtems_fdisk_printf (fd, " Segment count\t%ld",
108f29: 83 c4 0c add $0xc,%esp
108f2c: 8b 43 2c mov 0x2c(%ebx),%eax
108f2f: ff 74 30 04 pushl 0x4(%eax,%esi,1)
108f33: 68 26 ed 12 00 push $0x12ed26
108f38: 53 push %ebx
108f39: e8 e4 e7 ff ff call 107722 <rtems_fdisk_printf>
108f3e: 83 c4 10 add $0x10,%esp
fd->devices[device].segment_count);
for (seg = 0; seg < fd->devices[device].segment_count; seg++)
108f41: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp)
108f48: e9 08 01 00 00 jmp 109055 <rtems_fdisk_ioctl+0xc6f>
* @param req IOCTL request code.
* @param argp IOCTL argument.
* @retval The IOCTL return value
*/
static int
rtems_fdisk_ioctl (rtems_disk_device *dd, uint32_t req, void* argp)
108f4d: 6b 75 d4 30 imul $0x30,-0x2c(%ebp),%esi
rtems_fdisk_printf (fd, " Segment count\t%ld",
fd->devices[device].segment_count);
for (seg = 0; seg < fd->devices[device].segment_count; seg++)
{
rtems_fdisk_segment_ctl* sc = &fd->devices[device].segments[seg];
108f51: 03 30 add (%eax),%esi
uint32_t active = 0;
uint32_t used = 0;
bool is_active = false;
char queues[5];
rtems_fdisk_queue_status (fd, sc, queues);
108f53: 8d 4d e3 lea -0x1d(%ebp),%ecx
108f56: 89 f2 mov %esi,%edx
108f58: 89 d8 mov %ebx,%eax
108f5a: e8 e6 ea ff ff call 107a45 <rtems_fdisk_queue_status>
rtems_fdisk_segment_ctl* sc = &fd->devices[device].segments[seg];
uint32_t page;
uint32_t erased = 0;
uint32_t active = 0;
uint32_t used = 0;
bool is_active = false;
108f5f: c6 45 c4 00 movb $0x0,-0x3c(%ebp)
{
rtems_fdisk_segment_ctl* sc = &fd->devices[device].segments[seg];
uint32_t page;
uint32_t erased = 0;
uint32_t active = 0;
uint32_t used = 0;
108f63: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp)
for (seg = 0; seg < fd->devices[device].segment_count; seg++)
{
rtems_fdisk_segment_ctl* sc = &fd->devices[device].segments[seg];
uint32_t page;
uint32_t erased = 0;
uint32_t active = 0;
108f6a: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp)
for (seg = 0; seg < fd->devices[device].segment_count; seg++)
{
rtems_fdisk_segment_ctl* sc = &fd->devices[device].segments[seg];
uint32_t page;
uint32_t erased = 0;
108f71: c7 45 c8 00 00 00 00 movl $0x0,-0x38(%ebp)
bool is_active = false;
char queues[5];
rtems_fdisk_queue_status (fd, sc, queues);
for (page = 0; page < sc->pages; page++)
108f78: 31 d2 xor %edx,%edx
108f7a: eb 76 jmp 108ff2 <rtems_fdisk_ioctl+0xc0c>
{
if (rtems_fdisk_page_desc_erased (&sc->page_descriptors[page]))
108f7c: 8b 46 10 mov 0x10(%esi),%eax
108f7f: 8d 0c d0 lea (%eax,%edx,8),%ecx
108f82: 89 c8 mov %ecx,%eax
108f84: 89 55 90 mov %edx,-0x70(%ebp)
108f87: 89 4d 94 mov %ecx,-0x6c(%ebp)
108f8a: e8 fe e6 ff ff call 10768d <rtems_fdisk_page_desc_erased>
108f8f: 84 c0 test %al,%al
108f91: 8b 55 90 mov -0x70(%ebp),%edx
108f94: 8b 4d 94 mov -0x6c(%ebp),%ecx
108f97: 74 05 je 108f9e <rtems_fdisk_ioctl+0xbb8>
erased++;
108f99: ff 45 c8 incl -0x38(%ebp)
108f9c: eb 18 jmp 108fb6 <rtems_fdisk_ioctl+0xbd0>
}
rtems_flashdisk_count = rtems_flashdisk_configuration_size;
return RTEMS_SUCCESSFUL;
}
108f9e: 66 8b 41 02 mov 0x2(%ecx),%ax
for (page = 0; page < sc->pages; page++)
{
if (rtems_fdisk_page_desc_erased (&sc->page_descriptors[page]))
erased++;
else if (rtems_fdisk_page_desc_flags_set (&sc->page_descriptors[page],
108fa2: a8 01 test $0x1,%al
108fa4: 75 10 jne 108fb6 <rtems_fdisk_ioctl+0xbd0><== NEVER TAKEN
RTEMS_FDISK_PAGE_ACTIVE))
{
if (rtems_fdisk_page_desc_flags_set (&sc->page_descriptors[page],
108fa6: a8 02 test $0x2,%al
108fa8: 75 05 jne 108faf <rtems_fdisk_ioctl+0xbc9>
RTEMS_FDISK_PAGE_USED))
used++;
108faa: ff 45 cc incl -0x34(%ebp)
108fad: eb 07 jmp 108fb6 <rtems_fdisk_ioctl+0xbd0>
else
{
active++;
108faf: ff 45 d0 incl -0x30(%ebp)
is_active = true;
108fb2: c6 45 c4 01 movb $0x1,-0x3c(%ebp)
}
}
for (block = 0; block < fd->block_count; block++)
108fb6: 31 c9 xor %ecx,%ecx
108fb8: eb 32 jmp 108fec <rtems_fdisk_ioctl+0xc06>
{
if ((fd->blocks[block].segment == sc) &&
108fba: 8b 43 18 mov 0x18(%ebx),%eax
108fbd: 8d 04 c8 lea (%eax,%ecx,8),%eax
108fc0: 39 30 cmp %esi,(%eax)
108fc2: 75 27 jne 108feb <rtems_fdisk_ioctl+0xc05>
108fc4: 39 50 04 cmp %edx,0x4(%eax)
108fc7: 75 22 jne 108feb <rtems_fdisk_ioctl+0xc05>
(fd->blocks[block].page == page) && !is_active)
108fc9: 80 7d c4 00 cmpb $0x0,-0x3c(%ebp)
108fcd: 75 1c jne 108feb <rtems_fdisk_ioctl+0xc05><== ALWAYS TAKEN
rtems_fdisk_printf (fd,
108fcf: 51 push %ecx <== NOT EXECUTED
108fd0: 52 push %edx <== NOT EXECUTED
108fd1: 68 3a ed 12 00 push $0x12ed3a <== NOT EXECUTED
108fd6: 53 push %ebx <== NOT EXECUTED
108fd7: 89 55 90 mov %edx,-0x70(%ebp) <== NOT EXECUTED
108fda: 89 4d 94 mov %ecx,-0x6c(%ebp) <== NOT EXECUTED
108fdd: e8 40 e7 ff ff call 107722 <rtems_fdisk_printf> <== NOT EXECUTED
108fe2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
108fe5: 8b 4d 94 mov -0x6c(%ebp),%ecx <== NOT EXECUTED
108fe8: 8b 55 90 mov -0x70(%ebp),%edx <== NOT EXECUTED
active++;
is_active = true;
}
}
for (block = 0; block < fd->block_count; block++)
108feb: 41 inc %ecx
108fec: 3b 4b 1c cmp 0x1c(%ebx),%ecx
108fef: 72 c9 jb 108fba <rtems_fdisk_ioctl+0xbd4>
bool is_active = false;
char queues[5];
rtems_fdisk_queue_status (fd, sc, queues);
for (page = 0; page < sc->pages; page++)
108ff1: 42 inc %edx
108ff2: 8b 46 14 mov 0x14(%esi),%eax
108ff5: 89 45 c0 mov %eax,-0x40(%ebp)
108ff8: 39 c2 cmp %eax,%edx
108ffa: 72 80 jb 108f7c <rtems_fdisk_ioctl+0xb96>
page, block);
}
}
count = 0;
for (block = 0; block < fd->block_count; block++)
108ffc: 8b 53 1c mov 0x1c(%ebx),%edx
108fff: 89 55 ac mov %edx,-0x54(%ebp)
109002: 31 c0 xor %eax,%eax
109004: 31 d2 xor %edx,%edx
109006: eb 0f jmp 109017 <rtems_fdisk_ioctl+0xc31>
{
if (fd->blocks[block].segment == sc)
count++;
109008: 8b 4b 18 mov 0x18(%ebx),%ecx
10900b: 39 34 c1 cmp %esi,(%ecx,%eax,8)
10900e: 0f 94 c1 sete %cl
109011: 0f b6 c9 movzbl %cl,%ecx
109014: 01 ca add %ecx,%edx
page, block);
}
}
count = 0;
for (block = 0; block < fd->block_count; block++)
109016: 40 inc %eax
109017: 3b 45 ac cmp -0x54(%ebp),%eax
10901a: 75 ec jne 109008 <rtems_fdisk_ioctl+0xc22>
rtems_fdisk_printf (fd, " %3ld %s p:%3ld a:%3ld/%3ld" \
" u:%3ld/%3ld e:%3ld/%3ld br:%ld",
seg, queues,
sc->pages, sc->pages_active, active,
sc->pages_used, used, erased,
sc->pages - (sc->pages_active +
10901c: 8b 46 1c mov 0x1c(%esi),%eax
sc->pages_used + sc->pages_bad),
10901f: 8b 4e 20 mov 0x20(%esi),%ecx
{
if (fd->blocks[block].segment == sc)
count++;
}
rtems_fdisk_printf (fd, " %3ld %s p:%3ld a:%3ld/%3ld" \
109022: 52 push %edx
* @param req IOCTL request code.
* @param argp IOCTL argument.
* @retval The IOCTL return value
*/
static int
rtems_fdisk_ioctl (rtems_disk_device *dd, uint32_t req, void* argp)
109023: 8d 14 01 lea (%ecx,%eax,1),%edx
109026: 03 56 24 add 0x24(%esi),%edx
{
if (fd->blocks[block].segment == sc)
count++;
}
rtems_fdisk_printf (fd, " %3ld %s p:%3ld a:%3ld/%3ld" \
109029: 8b 75 c0 mov -0x40(%ebp),%esi
10902c: 29 d6 sub %edx,%esi
10902e: 56 push %esi
10902f: ff 75 c8 pushl -0x38(%ebp)
109032: ff 75 cc pushl -0x34(%ebp)
109035: 51 push %ecx
109036: ff 75 d0 pushl -0x30(%ebp)
109039: 50 push %eax
10903a: ff 75 c0 pushl -0x40(%ebp)
10903d: 8d 45 e3 lea -0x1d(%ebp),%eax
109040: 50 push %eax
109041: ff 75 d4 pushl -0x2c(%ebp)
109044: 68 67 ed 12 00 push $0x12ed67
109049: 53 push %ebx
10904a: e8 d3 e6 ff ff call 107722 <rtems_fdisk_printf>
rtems_fdisk_printf (fd, " Device\t\t%ld", device);
rtems_fdisk_printf (fd, " Segment count\t%ld",
fd->devices[device].segment_count);
for (seg = 0; seg < fd->devices[device].segment_count; seg++)
10904f: ff 45 d4 incl -0x2c(%ebp)
109052: 83 c4 30 add $0x30,%esp
109055: 8b 45 b4 mov -0x4c(%ebp),%eax
109058: 03 43 2c add 0x2c(%ebx),%eax
10905b: 8b 75 d4 mov -0x2c(%ebp),%esi
10905e: 3b 70 04 cmp 0x4(%eax),%esi
109061: 0f 82 e6 fe ff ff jb 108f4d <rtems_fdisk_ioctl+0xb67><== NEVER TAKEN
rtems_fdisk_printf (fd, "Queue total\t%ld of %ld, %s", total, count,
total == count ? "ok" : "MISSING");
rtems_fdisk_printf (fd, "Device count\t%d", fd->device_count);
for (device = 0; device < fd->device_count; device++)
109067: 47 inc %edi
109068: 3b 7b 30 cmp 0x30(%ebx),%edi
10906b: 0f 82 a5 fe ff ff jb 108f16 <rtems_fdisk_ioctl+0xb30><== NEVER TAKEN
count);
}
}
{
rtems_fdisk_segment_ctl* sc = fd->used.head;
109071: 8b 73 40 mov 0x40(%ebx),%esi
int count = 0;
rtems_fdisk_printf (fd, "Used List:");
109074: 50 push %eax
109075: 50 push %eax
109076: 68 a3 ed 12 00 push $0x12eda3
10907b: 53 push %ebx
10907c: e8 a1 e6 ff ff call 107722 <rtems_fdisk_printf>
109081: 83 c4 10 add $0x10,%esp
}
}
{
rtems_fdisk_segment_ctl* sc = fd->used.head;
int count = 0;
109084: 31 ff xor %edi,%edi
109086: eb 1d jmp 1090a5 <rtems_fdisk_ioctl+0xcbf>
rtems_fdisk_printf (fd, "Used List:");
while (sc)
{
rtems_fdisk_printf (fd, " %3d %02d:%03d u:%3ld",
109088: 50 push %eax
109089: 50 push %eax
10908a: ff 76 20 pushl 0x20(%esi)
10908d: ff 76 0c pushl 0xc(%esi)
109090: ff 76 08 pushl 0x8(%esi)
109093: 57 push %edi
109094: 68 ae ed 12 00 push $0x12edae
109099: 53 push %ebx
10909a: e8 83 e6 ff ff call 107722 <rtems_fdisk_printf>
count, sc->device, sc->segment, sc->pages_used);
sc = sc->next;
10909f: 8b 36 mov (%esi),%esi
count++;
1090a1: 47 inc %edi
1090a2: 83 c4 20 add $0x20,%esp
{
rtems_fdisk_segment_ctl* sc = fd->used.head;
int count = 0;
rtems_fdisk_printf (fd, "Used List:");
while (sc)
1090a5: 85 f6 test %esi,%esi
1090a7: 75 df jne 109088 <rtems_fdisk_ioctl+0xca2>
count, sc->device, sc->segment, sc->pages_used);
sc = sc->next;
count++;
}
}
fd->info_level = current_info_level;
1090a9: 8b 75 bc mov -0x44(%ebp),%esi
1090ac: 89 73 6c mov %esi,0x6c(%ebx)
case RTEMS_FDISK_IOCTL_INFO_LEVEL:
rtems_flashdisks[minor].info_level = (uintptr_t) argp;
break;
case RTEMS_FDISK_IOCTL_PRINT_STATUS:
errno = rtems_fdisk_print_status (&rtems_flashdisks[minor]);
1090af: 8b 45 b0 mov -0x50(%ebp),%eax
1090b2: c7 00 00 00 00 00 movl $0x0,(%eax)
break;
1090b8: eb 0e jmp 1090c8 <rtems_fdisk_ioctl+0xce2>
default:
rtems_blkdev_ioctl (dd, req, argp);
1090ba: 50 push %eax
1090bb: 56 push %esi
1090bc: 53 push %ebx
1090bd: ff 75 08 pushl 0x8(%ebp)
1090c0: e8 4b c8 00 00 call 115910 <rtems_blkdev_ioctl>
break;
1090c5: 83 c4 10 add $0x10,%esp
}
sc = rtems_semaphore_release (rtems_flashdisks[minor].lock);
1090c8: 83 ec 0c sub $0xc,%esp
1090cb: a1 7c 34 15 00 mov 0x15347c,%eax
1090d0: 8b 75 b8 mov -0x48(%ebp),%esi
1090d3: ff 74 30 64 pushl 0x64(%eax,%esi,1)
1090d7: e8 ac 4c 00 00 call 10dd88 <rtems_semaphore_release>
if (sc != RTEMS_SUCCESSFUL)
1090dc: 83 c4 10 add $0x10,%esp
1090df: 85 c0 test %eax,%eax
1090e1: 74 0b je 1090ee <rtems_fdisk_ioctl+0xd08><== ALWAYS TAKEN
errno = EIO;
1090e3: e8 e4 60 01 00 call 11f1cc <__errno> <== NOT EXECUTED
1090e8: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
}
return errno == 0 ? 0 : -1;
1090ee: e8 d9 60 01 00 call 11f1cc <__errno>
1090f3: 83 38 01 cmpl $0x1,(%eax)
1090f6: 19 c0 sbb %eax,%eax
1090f8: f7 d0 not %eax
1090fa: eb 1b jmp 109117 <rtems_fdisk_ioctl+0xd31>
uint8_t* data;
uint32_t fb;
uint32_t b;
fb = sg->length / fd->block_size;
data = sg->buffer;
for (b = 0; b < fb; b++, data += fd->block_size)
1090fc: ff 45 c4 incl -0x3c(%ebp)
1090ff: 8b 45 d4 mov -0x2c(%ebp),%eax
109102: 8b 40 14 mov 0x14(%eax),%eax
109105: 01 45 c8 add %eax,-0x38(%ebp)
109108: e9 ba f5 ff ff jmp 1086c7 <rtems_fdisk_ioctl+0x2e1>
10910d: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
109112: e9 be f5 ff ff jmp 1086d5 <rtems_fdisk_ioctl+0x2ef><== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
errno = EIO;
}
return errno == 0 ? 0 : -1;
}
109117: 8d 65 f4 lea -0xc(%ebp),%esp
10911a: 5b pop %ebx
10911b: 5e pop %esi
10911c: 5f pop %edi
10911d: 5d pop %ebp
10911e: c3 ret
00107b6b <rtems_fdisk_queue_segment>:
* @param fd The flash disk control table.
* @param sc The segment control table to be reallocated
*/
static void
rtems_fdisk_queue_segment (rtems_flashdisk* fd, rtems_fdisk_segment_ctl* sc)
{
107b6b: 55 push %ebp
107b6c: 89 e5 mov %esp,%ebp
107b6e: 57 push %edi
107b6f: 56 push %esi
107b70: 53 push %ebx
107b71: 83 ec 1c sub $0x1c,%esp
107b74: 89 c6 mov %eax,%esi
107b76: 89 d3 mov %edx,%ebx
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd, " queue-seg:%02d-%03d: p=%d a=%d u=%d b=%d f=%s n=%s",
107b78: 83 3a 00 cmpl $0x0,(%edx)
107b7b: 74 07 je 107b84 <rtems_fdisk_queue_segment+0x19>
107b7d: ba 22 08 13 00 mov $0x130822,%edx
107b82: eb 05 jmp 107b89 <rtems_fdisk_queue_segment+0x1e>
107b84: ba 97 e4 12 00 mov $0x12e497,%edx
107b89: b8 8f 07 13 00 mov $0x13078f,%eax
107b8e: 83 7b 28 00 cmpl $0x0,0x28(%ebx)
107b92: 74 05 je 107b99 <rtems_fdisk_queue_segment+0x2e><== ALWAYS TAKEN
107b94: b8 9c e4 12 00 mov $0x12e49c,%eax <== NOT EXECUTED
107b99: 57 push %edi
107b9a: 57 push %edi
107b9b: 52 push %edx
107b9c: 50 push %eax
107b9d: ff 73 24 pushl 0x24(%ebx)
107ba0: ff 73 20 pushl 0x20(%ebx)
107ba3: ff 73 1c pushl 0x1c(%ebx)
107ba6: ff 73 14 pushl 0x14(%ebx)
107ba9: ff 73 0c pushl 0xc(%ebx)
107bac: ff 73 08 pushl 0x8(%ebx)
107baf: 68 a3 e4 12 00 push $0x12e4a3
107bb4: 56 push %esi
107bb5: e8 00 fb ff ff call 1076ba <rtems_fdisk_info>
/*
* If the segment has failed then check the failed queue and append
* if not failed.
*/
if (sc->failed)
107bba: 83 c4 30 add $0x30,%esp
107bbd: 83 7b 28 00 cmpl $0x0,0x28(%ebx)
107bc1: 74 15 je 107bd8 <rtems_fdisk_queue_segment+0x6d><== ALWAYS TAKEN
}
rtems_flashdisk_count = rtems_flashdisk_configuration_size;
return RTEMS_SUCCESSFUL;
}
107bc3: 8b 46 58 mov 0x58(%esi),%eax <== NOT EXECUTED
107bc6: eb 0a jmp 107bd2 <rtems_fdisk_queue_segment+0x67><== NOT EXECUTED
{
rtems_fdisk_segment_ctl* it = queue->head;
while (it)
{
if (it == sc)
107bc8: 39 d8 cmp %ebx,%eax <== NOT EXECUTED
107bca: 0f 84 b7 00 00 00 je 107c87 <rtems_fdisk_queue_segment+0x11c><== NOT EXECUTED
return true;
it = it->next;
107bd0: 8b 00 mov (%eax),%eax <== NOT EXECUTED
rtems_fdisk_segment_queue_present (rtems_fdisk_segment_ctl_queue* queue,
rtems_fdisk_segment_ctl* sc)
{
rtems_fdisk_segment_ctl* it = queue->head;
while (it)
107bd2: 85 c0 test %eax,%eax <== NOT EXECUTED
107bd4: 75 f2 jne 107bc8 <rtems_fdisk_queue_segment+0x5d><== NOT EXECUTED
107bd6: eb 78 jmp 107c50 <rtems_fdisk_queue_segment+0xe5><== NOT EXECUTED
}
/*
* Remove the queue from the available or used queue.
*/
rtems_fdisk_segment_queue_remove (&fd->available, sc);
107bd8: 8d 46 34 lea 0x34(%esi),%eax
107bdb: 89 45 e4 mov %eax,-0x1c(%ebp)
107bde: 89 da mov %ebx,%edx
107be0: e8 31 fa ff ff call 107616 <rtems_fdisk_segment_queue_remove>
rtems_fdisk_segment_queue_remove (&fd->used, sc);
107be5: 8d 7e 40 lea 0x40(%esi),%edi
107be8: 89 da mov %ebx,%edx
107bea: 89 f8 mov %edi,%eax
107bec: e8 25 fa ff ff call 107616 <rtems_fdisk_segment_queue_remove>
* If they are and the driver has been configured to background
* erase place the segment on the used queue. If not configured
* to background erase perform the erase now.
*
*/
if (rtems_fdisk_seg_pages_available (sc) == 0)
107bf1: 89 d8 mov %ebx,%eax
107bf3: e8 ad fa ff ff call 1076a5 <rtems_fdisk_seg_pages_available>
107bf8: 89 c2 mov %eax,%edx
107bfa: 85 c0 test %eax,%eax
107bfc: 75 34 jne 107c32 <rtems_fdisk_queue_segment+0xc7>
{
if (sc->pages_active)
107bfe: 83 7b 1c 00 cmpl $0x0,0x1c(%ebx)
107c02: 74 15 je 107c19 <rtems_fdisk_queue_segment+0xae><== NEVER TAKEN
/*
* Keep the used queue sorted by the most number of used
* pages. When we compact we want to move the pages into
* a new segment and cover more than one segment.
*/
rtems_fdisk_segment_ctl* seg = fd->used.head;
107c04: 8b 56 40 mov 0x40(%esi),%edx
while (seg)
107c07: eb 0a jmp 107c13 <rtems_fdisk_queue_segment+0xa8>
{
if (sc->pages_used > seg->pages_used)
107c09: 8b 42 20 mov 0x20(%edx),%eax
107c0c: 39 43 20 cmp %eax,0x20(%ebx)
107c0f: 77 4c ja 107c5d <rtems_fdisk_queue_segment+0xf2>
break;
seg = seg->next;
107c11: 8b 12 mov (%edx),%edx
* pages. When we compact we want to move the pages into
* a new segment and cover more than one segment.
*/
rtems_fdisk_segment_ctl* seg = fd->used.head;
while (seg)
107c13: 85 d2 test %edx,%edx
107c15: 75 f2 jne 107c09 <rtems_fdisk_queue_segment+0x9e>
107c17: eb 3e jmp 107c57 <rtems_fdisk_queue_segment+0xec>
rtems_fdisk_segment_queue_push_tail (&fd->used, sc);
}
else
{
if ((fd->flags & RTEMS_FDISK_BACKGROUND_ERASE))
rtems_fdisk_segment_queue_push_tail (&fd->erase, sc);
107c19: 8d 46 4c lea 0x4c(%esi),%eax <== NOT EXECUTED
else
rtems_fdisk_segment_queue_push_tail (&fd->used, sc);
}
else
{
if ((fd->flags & RTEMS_FDISK_BACKGROUND_ERASE))
107c1c: f6 46 08 01 testb $0x1,0x8(%esi) <== NOT EXECUTED
107c20: 75 31 jne 107c53 <rtems_fdisk_queue_segment+0xe8><== NOT EXECUTED
rtems_fdisk_segment_queue_push_tail (&fd->erase, sc);
else
rtems_fdisk_erase_segment (fd, sc);
107c22: 89 da mov %ebx,%edx <== NOT EXECUTED
107c24: 89 f0 mov %esi,%eax <== NOT EXECUTED
if (seg)
rtems_fdisk_segment_queue_insert_before (&fd->available, seg, sc);
else
rtems_fdisk_segment_queue_push_tail (&fd->available, sc);
}
}
107c26: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
107c29: 5b pop %ebx <== NOT EXECUTED
107c2a: 5e pop %esi <== NOT EXECUTED
107c2b: 5f pop %edi <== NOT EXECUTED
107c2c: 5d pop %ebp <== NOT EXECUTED
else
{
if ((fd->flags & RTEMS_FDISK_BACKGROUND_ERASE))
rtems_fdisk_segment_queue_push_tail (&fd->erase, sc);
else
rtems_fdisk_erase_segment (fd, sc);
107c2d: e9 7d fe ff ff jmp 107aaf <rtems_fdisk_erase_segment><== NOT EXECUTED
* bit is cleared for that segment. When 32 erasers
* has occurred the page is re-written to the flash
* with all the counters updated with the number of
* bits cleared and all bits set back to 1.
*/
rtems_fdisk_segment_ctl* seg = fd->available.head;
107c32: 8b 7e 34 mov 0x34(%esi),%edi
while (seg)
107c35: eb 13 jmp 107c4a <rtems_fdisk_queue_segment+0xdf>
{
if (rtems_fdisk_seg_pages_available (sc) <
rtems_fdisk_seg_pages_available (seg))
107c37: 89 f8 mov %edi,%eax
107c39: 89 55 e0 mov %edx,-0x20(%ebp)
107c3c: e8 64 fa ff ff call 1076a5 <rtems_fdisk_seg_pages_available>
*/
rtems_fdisk_segment_ctl* seg = fd->available.head;
while (seg)
{
if (rtems_fdisk_seg_pages_available (sc) <
107c41: 8b 55 e0 mov -0x20(%ebp),%edx
107c44: 39 c2 cmp %eax,%edx
107c46: 72 1b jb 107c63 <rtems_fdisk_queue_segment+0xf8>
rtems_fdisk_seg_pages_available (seg))
break;
seg = seg->next;
107c48: 8b 3f mov (%edi),%edi
* with all the counters updated with the number of
* bits cleared and all bits set back to 1.
*/
rtems_fdisk_segment_ctl* seg = fd->available.head;
while (seg)
107c4a: 85 ff test %edi,%edi
107c4c: 75 e9 jne 107c37 <rtems_fdisk_queue_segment+0xcc>
107c4e: eb 26 jmp 107c76 <rtems_fdisk_queue_segment+0x10b>
* if not failed.
*/
if (sc->failed)
{
if (!rtems_fdisk_segment_queue_present (&fd->failed, sc))
rtems_fdisk_segment_queue_push_tail (&fd->failed, sc);
107c50: 8d 46 58 lea 0x58(%esi),%eax <== NOT EXECUTED
107c53: 89 da mov %ebx,%edx <== NOT EXECUTED
107c55: eb 24 jmp 107c7b <rtems_fdisk_queue_segment+0x110><== NOT EXECUTED
}
if (seg)
rtems_fdisk_segment_queue_insert_before (&fd->used, seg, sc);
else
rtems_fdisk_segment_queue_push_tail (&fd->used, sc);
107c57: 89 da mov %ebx,%edx
107c59: 89 f8 mov %edi,%eax
107c5b: eb 1e jmp 107c7b <rtems_fdisk_queue_segment+0x110>
break;
seg = seg->next;
}
if (seg)
rtems_fdisk_segment_queue_insert_before (&fd->used, seg, sc);
107c5d: 89 d9 mov %ebx,%ecx
107c5f: 89 f8 mov %edi,%eax
107c61: eb 07 jmp 107c6a <rtems_fdisk_queue_segment+0xff>
break;
seg = seg->next;
}
if (seg)
rtems_fdisk_segment_queue_insert_before (&fd->available, seg, sc);
107c63: 89 d9 mov %ebx,%ecx
107c65: 89 fa mov %edi,%edx
107c67: 8b 45 e4 mov -0x1c(%ebp),%eax
else
rtems_fdisk_segment_queue_push_tail (&fd->available, sc);
}
}
107c6a: 8d 65 f4 lea -0xc(%ebp),%esp
107c6d: 5b pop %ebx
107c6e: 5e pop %esi
107c6f: 5f pop %edi
107c70: 5d pop %ebp
break;
seg = seg->next;
}
if (seg)
rtems_fdisk_segment_queue_insert_before (&fd->available, seg, sc);
107c71: e9 e3 f9 ff ff jmp 107659 <rtems_fdisk_segment_queue_insert_before>
else
rtems_fdisk_segment_queue_push_tail (&fd->available, sc);
107c76: 89 da mov %ebx,%edx
107c78: 8b 45 e4 mov -0x1c(%ebp),%eax
}
}
107c7b: 8d 65 f4 lea -0xc(%ebp),%esp
107c7e: 5b pop %ebx
107c7f: 5e pop %esi
107c80: 5f pop %edi
107c81: 5d pop %ebp
}
if (seg)
rtems_fdisk_segment_queue_insert_before (&fd->available, seg, sc);
else
rtems_fdisk_segment_queue_push_tail (&fd->available, sc);
107c82: e9 69 f9 ff ff jmp 1075f0 <rtems_fdisk_segment_queue_push_tail>
}
}
107c87: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
107c8a: 5b pop %ebx <== NOT EXECUTED
107c8b: 5e pop %esi <== NOT EXECUTED
107c8c: 5f pop %edi <== NOT EXECUTED
107c8d: 5d pop %ebp <== NOT EXECUTED
107c8e: c3 ret <== NOT EXECUTED
00107a45 <rtems_fdisk_queue_status>:
*/
static void
rtems_fdisk_queue_status (rtems_flashdisk* fd,
rtems_fdisk_segment_ctl* sc,
char queues[5])
{
107a45: 55 push %ebp
107a46: 89 e5 mov %esp,%ebp
107a48: 53 push %ebx
}
rtems_flashdisk_count = rtems_flashdisk_configuration_size;
return RTEMS_SUCCESSFUL;
}
107a49: 8b 58 34 mov 0x34(%eax),%ebx
107a4c: eb 06 jmp 107a54 <rtems_fdisk_queue_status+0xf>
{
rtems_fdisk_segment_ctl* it = queue->head;
while (it)
{
if (it == sc)
107a4e: 39 d3 cmp %edx,%ebx
107a50: 74 0a je 107a5c <rtems_fdisk_queue_status+0x17>
return true;
it = it->next;
107a52: 8b 1b mov (%ebx),%ebx
rtems_fdisk_segment_queue_present (rtems_fdisk_segment_ctl_queue* queue,
rtems_fdisk_segment_ctl* sc)
{
rtems_fdisk_segment_ctl* it = queue->head;
while (it)
107a54: 85 db test %ebx,%ebx
107a56: 75 f6 jne 107a4e <rtems_fdisk_queue_status+0x9>
static void
rtems_fdisk_queue_status (rtems_flashdisk* fd,
rtems_fdisk_segment_ctl* sc,
char queues[5])
{
queues[0] = rtems_fdisk_segment_queue_present (&fd->available, sc) ? 'A' : '-';
107a58: b3 2d mov $0x2d,%bl
107a5a: eb 02 jmp 107a5e <rtems_fdisk_queue_status+0x19>
107a5c: b3 41 mov $0x41,%bl
107a5e: 88 19 mov %bl,(%ecx)
}
rtems_flashdisk_count = rtems_flashdisk_configuration_size;
return RTEMS_SUCCESSFUL;
}
107a60: 8b 58 40 mov 0x40(%eax),%ebx
107a63: eb 06 jmp 107a6b <rtems_fdisk_queue_status+0x26>
{
rtems_fdisk_segment_ctl* it = queue->head;
while (it)
{
if (it == sc)
107a65: 39 d3 cmp %edx,%ebx
107a67: 74 0a je 107a73 <rtems_fdisk_queue_status+0x2e>
return true;
it = it->next;
107a69: 8b 1b mov (%ebx),%ebx
rtems_fdisk_segment_queue_present (rtems_fdisk_segment_ctl_queue* queue,
rtems_fdisk_segment_ctl* sc)
{
rtems_fdisk_segment_ctl* it = queue->head;
while (it)
107a6b: 85 db test %ebx,%ebx
107a6d: 75 f6 jne 107a65 <rtems_fdisk_queue_status+0x20>
rtems_fdisk_queue_status (rtems_flashdisk* fd,
rtems_fdisk_segment_ctl* sc,
char queues[5])
{
queues[0] = rtems_fdisk_segment_queue_present (&fd->available, sc) ? 'A' : '-';
queues[1] = rtems_fdisk_segment_queue_present (&fd->used, sc) ? 'U' : '-';
107a6f: b3 2d mov $0x2d,%bl
107a71: eb 02 jmp 107a75 <rtems_fdisk_queue_status+0x30>
107a73: b3 55 mov $0x55,%bl
107a75: 88 59 01 mov %bl,0x1(%ecx)
}
rtems_flashdisk_count = rtems_flashdisk_configuration_size;
return RTEMS_SUCCESSFUL;
}
107a78: 8b 58 4c mov 0x4c(%eax),%ebx
107a7b: eb 06 jmp 107a83 <rtems_fdisk_queue_status+0x3e>
{
rtems_fdisk_segment_ctl* it = queue->head;
while (it)
{
if (it == sc)
107a7d: 39 d3 cmp %edx,%ebx <== NOT EXECUTED
107a7f: 74 0a je 107a8b <rtems_fdisk_queue_status+0x46><== NOT EXECUTED
return true;
it = it->next;
107a81: 8b 1b mov (%ebx),%ebx <== NOT EXECUTED
rtems_fdisk_segment_queue_present (rtems_fdisk_segment_ctl_queue* queue,
rtems_fdisk_segment_ctl* sc)
{
rtems_fdisk_segment_ctl* it = queue->head;
while (it)
107a83: 85 db test %ebx,%ebx
107a85: 75 f6 jne 107a7d <rtems_fdisk_queue_status+0x38><== NEVER TAKEN
rtems_fdisk_segment_ctl* sc,
char queues[5])
{
queues[0] = rtems_fdisk_segment_queue_present (&fd->available, sc) ? 'A' : '-';
queues[1] = rtems_fdisk_segment_queue_present (&fd->used, sc) ? 'U' : '-';
queues[2] = rtems_fdisk_segment_queue_present (&fd->erase, sc) ? 'E' : '-';
107a87: b3 2d mov $0x2d,%bl
107a89: eb 02 jmp 107a8d <rtems_fdisk_queue_status+0x48>
107a8b: b3 45 mov $0x45,%bl <== NOT EXECUTED
107a8d: 88 59 02 mov %bl,0x2(%ecx)
}
rtems_flashdisk_count = rtems_flashdisk_configuration_size;
return RTEMS_SUCCESSFUL;
}
107a90: 8b 40 58 mov 0x58(%eax),%eax
107a93: eb 06 jmp 107a9b <rtems_fdisk_queue_status+0x56>
{
rtems_fdisk_segment_ctl* it = queue->head;
while (it)
{
if (it == sc)
107a95: 39 d0 cmp %edx,%eax <== NOT EXECUTED
107a97: 74 0a je 107aa3 <rtems_fdisk_queue_status+0x5e><== NOT EXECUTED
return true;
it = it->next;
107a99: 8b 00 mov (%eax),%eax <== NOT EXECUTED
rtems_fdisk_segment_queue_present (rtems_fdisk_segment_ctl_queue* queue,
rtems_fdisk_segment_ctl* sc)
{
rtems_fdisk_segment_ctl* it = queue->head;
while (it)
107a9b: 85 c0 test %eax,%eax
107a9d: 75 f6 jne 107a95 <rtems_fdisk_queue_status+0x50><== NEVER TAKEN
char queues[5])
{
queues[0] = rtems_fdisk_segment_queue_present (&fd->available, sc) ? 'A' : '-';
queues[1] = rtems_fdisk_segment_queue_present (&fd->used, sc) ? 'U' : '-';
queues[2] = rtems_fdisk_segment_queue_present (&fd->erase, sc) ? 'E' : '-';
queues[3] = rtems_fdisk_segment_queue_present (&fd->failed, sc) ? 'F' : '-';
107a9f: b0 2d mov $0x2d,%al
107aa1: eb 02 jmp 107aa5 <rtems_fdisk_queue_status+0x60>
107aa3: b0 46 mov $0x46,%al <== NOT EXECUTED
107aa5: 88 41 03 mov %al,0x3(%ecx)
queues[4] = '\0';
107aa8: c6 41 04 00 movb $0x0,0x4(%ecx)
}
107aac: 5b pop %ebx
107aad: 5d pop %ebp
107aae: c3 ret
00107c8f <rtems_fdisk_recover_block_mappings>:
/**
* Recover the block mappings from the devices.
*/
static int
rtems_fdisk_recover_block_mappings (rtems_flashdisk* fd)
{
107c8f: 55 push %ebp
107c90: 89 e5 mov %esp,%ebp
107c92: 57 push %edi
107c93: 56 push %esi
107c94: 53 push %ebx
107c95: 83 ec 2c sub $0x2c,%esp
107c98: 89 c3 mov %eax,%ebx
* Initialise the segment control queue.
*/
static void
rtems_fdisk_segment_queue_init (rtems_fdisk_segment_ctl_queue* queue)
{
queue->head = queue->tail = 0;
107c9a: c7 40 38 00 00 00 00 movl $0x0,0x38(%eax)
107ca1: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax)
queue->count = 0;
107ca8: c7 40 3c 00 00 00 00 movl $0x0,0x3c(%eax)
* Initialise the segment control queue.
*/
static void
rtems_fdisk_segment_queue_init (rtems_fdisk_segment_ctl_queue* queue)
{
queue->head = queue->tail = 0;
107caf: c7 40 44 00 00 00 00 movl $0x0,0x44(%eax)
107cb6: c7 40 40 00 00 00 00 movl $0x0,0x40(%eax)
queue->count = 0;
107cbd: c7 40 48 00 00 00 00 movl $0x0,0x48(%eax)
* Initialise the segment control queue.
*/
static void
rtems_fdisk_segment_queue_init (rtems_fdisk_segment_ctl_queue* queue)
{
queue->head = queue->tail = 0;
107cc4: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax)
107ccb: c7 40 4c 00 00 00 00 movl $0x0,0x4c(%eax)
queue->count = 0;
107cd2: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax)
* Initialise the segment control queue.
*/
static void
rtems_fdisk_segment_queue_init (rtems_fdisk_segment_ctl_queue* queue)
{
queue->head = queue->tail = 0;
107cd9: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax)
107ce0: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax)
queue->count = 0;
107ce7: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax)
rtems_fdisk_segment_queue_init (&fd->failed);
/*
* Clear the lock mappings.
*/
memset (fd->blocks, 0, fd->block_count * sizeof (rtems_fdisk_block_ctl));
107cee: 8b 48 1c mov 0x1c(%eax),%ecx
107cf1: c1 e1 03 shl $0x3,%ecx
107cf4: 31 c0 xor %eax,%eax
107cf6: 8b 7b 18 mov 0x18(%ebx),%edi
107cf9: f3 aa rep stos %al,%es:(%edi)
/*
* Scan each segment or each device recovering the valid pages.
*/
fd->erased_blocks = 0;
107cfb: c7 43 28 00 00 00 00 movl $0x0,0x28(%ebx)
fd->starvation_threshold = 0;
107d02: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx)
for (device = 0; device < fd->device_count; device++)
107d09: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
107d10: e9 17 02 00 00 jmp 107f2c <rtems_fdisk_recover_block_mappings+0x29d>
/**
* Recover the block mappings from the devices.
*/
static int
rtems_fdisk_recover_block_mappings (rtems_flashdisk* fd)
107d15: 6b 75 e0 30 imul $0x30,-0x20(%ebp),%esi
for (device = 0; device < fd->device_count; device++)
{
uint32_t segment;
for (segment = 0; segment < fd->devices[device].segment_count; segment++)
{
rtems_fdisk_segment_ctl* sc = &fd->devices[device].segments[segment];
107d19: 03 30 add (%eax),%esi
const rtems_fdisk_segment_desc* sd = sc->descriptor;
107d1b: 8b 7e 04 mov 0x4(%esi),%edi
rtems_fdisk_page_desc* pd;
uint32_t page;
int ret;
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd, "recover-block-mappings:%02d-%03d", device, segment);
107d1e: ff 75 e0 pushl -0x20(%ebp)
107d21: ff 75 e4 pushl -0x1c(%ebp)
107d24: 68 d7 e4 12 00 push $0x12e4d7
107d29: 53 push %ebx
107d2a: e8 8b f9 ff ff call 1076ba <rtems_fdisk_info>
#endif
sc->pages_desc = rtems_fdisk_page_desc_pages (sd, fd->block_size);
107d2f: 8b 4b 14 mov 0x14(%ebx),%ecx
*/
static uint32_t
rtems_fdisk_pages_in_segment (const rtems_fdisk_segment_desc* sd,
uint32_t page_size)
{
return sd->size / page_size;
107d32: 8b 47 08 mov 0x8(%edi),%eax
107d35: 31 d2 xor %edx,%edx
107d37: f7 f1 div %ecx
107d39: 89 c7 mov %eax,%edi
rtems_fdisk_page_desc_pages (const rtems_fdisk_segment_desc* sd,
uint32_t page_size)
{
uint32_t pages = rtems_fdisk_pages_in_segment (sd, page_size);
uint32_t bytes = pages * sizeof (rtems_fdisk_page_desc);
return ((bytes - 1) / page_size) + 1;
107d3b: 8d 04 c5 ff ff ff ff lea -0x1(,%eax,8),%eax
107d42: 31 d2 xor %edx,%edx
107d44: f7 f1 div %ecx
107d46: 8d 50 01 lea 0x1(%eax),%edx
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd, "recover-block-mappings:%02d-%03d", device, segment);
#endif
sc->pages_desc = rtems_fdisk_page_desc_pages (sd, fd->block_size);
107d49: 89 56 18 mov %edx,0x18(%esi)
sc->pages =
rtems_fdisk_pages_in_segment (sd, fd->block_size) - sc->pages_desc;
107d4c: 29 d7 sub %edx,%edi
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd, "recover-block-mappings:%02d-%03d", device, segment);
#endif
sc->pages_desc = rtems_fdisk_page_desc_pages (sd, fd->block_size);
sc->pages =
107d4e: 89 7e 14 mov %edi,0x14(%esi)
rtems_fdisk_pages_in_segment (sd, fd->block_size) - sc->pages_desc;
if (sc->pages > fd->starvation_threshold)
107d51: 83 c4 10 add $0x10,%esp
107d54: 3b 7b 24 cmp 0x24(%ebx),%edi
107d57: 76 03 jbe 107d5c <rtems_fdisk_recover_block_mappings+0xcd>
fd->starvation_threshold = sc->pages;
107d59: 89 7b 24 mov %edi,0x24(%ebx)
sc->pages_active = 0;
107d5c: c7 46 1c 00 00 00 00 movl $0x0,0x1c(%esi)
sc->pages_used = 0;
107d63: c7 46 20 00 00 00 00 movl $0x0,0x20(%esi)
sc->pages_bad = 0;
107d6a: c7 46 24 00 00 00 00 movl $0x0,0x24(%esi)
sc->failed = false;
107d71: c7 46 28 00 00 00 00 movl $0x0,0x28(%esi)
if (!sc->page_descriptors)
107d78: 83 7e 10 00 cmpl $0x0,0x10(%esi)
107d7c: 75 20 jne 107d9e <rtems_fdisk_recover_block_mappings+0x10f><== NEVER TAKEN
sc->page_descriptors = malloc (sc->pages_desc * fd->block_size);
107d7e: 83 ec 0c sub $0xc,%esp
107d81: 89 d0 mov %edx,%eax
107d83: 0f af c1 imul %ecx,%eax
107d86: 50 push %eax
107d87: 89 55 d4 mov %edx,-0x2c(%ebp)
107d8a: 89 4d d0 mov %ecx,-0x30(%ebp)
107d8d: e8 6e 26 00 00 call 10a400 <malloc>
107d92: 89 46 10 mov %eax,0x10(%esi)
107d95: 83 c4 10 add $0x10,%esp
107d98: 8b 4d d0 mov -0x30(%ebp),%ecx
107d9b: 8b 55 d4 mov -0x2c(%ebp),%edx
if (!sc->page_descriptors)
107d9e: 8b 7e 10 mov 0x10(%esi),%edi
107da1: 85 ff test %edi,%edi
107da3: 75 0d jne 107db2 <rtems_fdisk_recover_block_mappings+0x123><== ALWAYS TAKEN
rtems_fdisk_abort ("no memory for page descriptors");
107da5: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107da8: 68 d5 e3 12 00 push $0x12e3d5 <== NOT EXECUTED
107dad: e8 c7 17 00 00 call 109579 <rtems_fdisk_abort.constprop.9><== NOT EXECUTED
* descriptors.
*
* @todo It may be better to ask the driver to get these value
* so NAND flash could be better supported.
*/
ret = rtems_fdisk_seg_read (fd, sc, 0, (void*) pd,
107db2: 50 push %eax
107db3: 50 push %eax
107db4: 0f af ca imul %edx,%ecx
107db7: 51 push %ecx
107db8: 57 push %edi
107db9: 31 c9 xor %ecx,%ecx
107dbb: 89 f2 mov %esi,%edx
107dbd: 89 d8 mov %ebx,%eax
107dbf: e8 c3 fa ff ff call 107887 <rtems_fdisk_seg_read>
sc->pages_desc * fd->block_size);
if (ret)
107dc4: 83 c4 10 add $0x10,%esp
107dc7: 85 c0 test %eax,%eax
107dc9: 0f 84 29 01 00 00 je 107ef8 <rtems_fdisk_recover_block_mappings+0x269><== ALWAYS TAKEN
{
rtems_fdisk_error ("recover-block-mappings:%02d-%03d: " \
107dcf: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107dd2: 50 push %eax <== NOT EXECUTED
107dd3: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED
107dd6: e8 e9 92 01 00 call 1210c4 <strerror> <== NOT EXECUTED
107ddb: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED
107dde: 89 14 24 mov %edx,(%esp) <== NOT EXECUTED
107de1: 50 push %eax <== NOT EXECUTED
107de2: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED
107de5: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
107de8: 68 f8 e4 12 00 push $0x12e4f8 <== NOT EXECUTED
107ded: e8 fc f9 ff ff call 1077ee <rtems_fdisk_error> <== NOT EXECUTED
"read page desc failed: %s (%d)",
device, segment, strerror (ret), ret);
return ret;
107df2: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
107df5: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED
107df8: e9 48 01 00 00 jmp 107f45 <rtems_fdisk_recover_block_mappings+0x2b6><== NOT EXECUTED
* If the page is active see if the block is with-in range and
* if the block is a duplicate.
*/
for (page = 0; page < sc->pages; page++, pd++)
{
if (rtems_fdisk_page_desc_erased (pd))
107dfd: 89 f8 mov %edi,%eax
107dff: e8 89 f8 ff ff call 10768d <rtems_fdisk_page_desc_erased>
107e04: 84 c0 test %al,%al
107e06: 74 75 je 107e7d <rtems_fdisk_recover_block_mappings+0x1ee><== NEVER TAKEN
rtems_fdisk_seg_blank_check_page (const rtems_flashdisk* fd,
rtems_fdisk_segment_ctl* sc,
uint32_t page)
{
return rtems_fdisk_seg_blank_check (fd, sc,
page * fd->block_size, fd->block_size);
107e08: 8b 43 14 mov 0x14(%ebx),%eax
static int
rtems_fdisk_seg_blank_check_page (const rtems_flashdisk* fd,
rtems_fdisk_segment_ctl* sc,
uint32_t page)
{
return rtems_fdisk_seg_blank_check (fd, sc,
107e0b: 83 ec 0c sub $0xc,%esp
if (rtems_fdisk_page_desc_erased (pd))
{
/*
* Is the page erased ?
*/
ret = rtems_fdisk_seg_blank_check_page (fd, sc,
107e0e: 8b 4d dc mov -0x24(%ebp),%ecx
107e11: 03 4e 18 add 0x18(%esi),%ecx
static int
rtems_fdisk_seg_blank_check_page (const rtems_flashdisk* fd,
rtems_fdisk_segment_ctl* sc,
uint32_t page)
{
return rtems_fdisk_seg_blank_check (fd, sc,
107e14: 0f af c8 imul %eax,%ecx
107e17: 50 push %eax
107e18: 89 f2 mov %esi,%edx
107e1a: 89 d8 mov %ebx,%eax
107e1c: e8 bf fa ff ff call 1078e0 <rtems_fdisk_seg_blank_check>
* Is the page erased ?
*/
ret = rtems_fdisk_seg_blank_check_page (fd, sc,
page + sc->pages_desc);
if (ret == 0)
107e21: 83 c4 10 add $0x10,%esp
107e24: 85 c0 test %eax,%eax
107e26: 75 08 jne 107e30 <rtems_fdisk_recover_block_mappings+0x1a1><== NEVER TAKEN
{
++fd->erased_blocks;
107e28: ff 43 28 incl 0x28(%ebx)
107e2b: e9 c0 00 00 00 jmp 107ef0 <rtems_fdisk_recover_block_mappings+0x261>
}
else
{
#if RTEMS_FDISK_TRACE
rtems_fdisk_warning (fd, "page not blank: %d-%d-%d",
107e30: 51 push %ecx <== NOT EXECUTED
107e31: 51 push %ecx <== NOT EXECUTED
107e32: ff 77 04 pushl 0x4(%edi) <== NOT EXECUTED
107e35: ff 75 dc pushl -0x24(%ebp) <== NOT EXECUTED
107e38: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED
107e3b: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
107e3e: 68 39 e5 12 00 push $0x12e539 <== NOT EXECUTED
107e43: 53 push %ebx <== NOT EXECUTED
107e44: e8 3f f9 ff ff call 107788 <rtems_fdisk_warning> <== NOT EXECUTED
* Set the flags. Setting means clear the bit to 0.
*/
static void
rtems_fdisk_page_desc_set_flags (rtems_fdisk_page_desc* pd, uint16_t flags)
{
pd->flags &= ~flags;
107e49: 66 83 67 02 fd andw $0xfffd,0x2(%edi) <== NOT EXECUTED
rtems_fdisk_warning (fd, "page not blank: %d-%d-%d",
device, segment, page, pd->block);
#endif
rtems_fdisk_page_desc_set_flags (pd, RTEMS_FDISK_PAGE_USED);
ret = rtems_fdisk_seg_write_page_desc (fd, sc,
107e4e: 83 c4 14 add $0x14,%esp <== NOT EXECUTED
107e51: 57 push %edi <== NOT EXECUTED
107e52: 8b 4d dc mov -0x24(%ebp),%ecx <== NOT EXECUTED
107e55: 89 f2 mov %esi,%edx <== NOT EXECUTED
107e57: 89 d8 mov %ebx,%eax <== NOT EXECUTED
107e59: e8 47 fb ff ff call 1079a5 <rtems_fdisk_seg_write_page_desc><== NOT EXECUTED
page, pd);
if (ret)
107e5e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
107e61: 85 c0 test %eax,%eax <== NOT EXECUTED
107e63: 74 20 je 107e85 <rtems_fdisk_recover_block_mappings+0x1f6><== NOT EXECUTED
{
rtems_fdisk_error ("forcing page to used failed: %d-%d-%d",
107e65: ff 75 dc pushl -0x24(%ebp) <== NOT EXECUTED
107e68: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED
107e6b: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
107e6e: 68 52 e5 12 00 push $0x12e552 <== NOT EXECUTED
107e73: e8 76 f9 ff ff call 1077ee <rtems_fdisk_error> <== NOT EXECUTED
107e78: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
107e7b: eb 08 jmp 107e85 <rtems_fdisk_recover_block_mappings+0x1f6><== NOT EXECUTED
}
rtems_flashdisk_count = rtems_flashdisk_configuration_size;
return RTEMS_SUCCESSFUL;
}
107e7d: 66 8b 47 02 mov 0x2(%edi),%ax <== NOT EXECUTED
sc->pages_used++;
}
}
else
{
if (rtems_fdisk_page_desc_flags_set (pd, RTEMS_FDISK_PAGE_USED))
107e81: a8 02 test $0x2,%al <== NOT EXECUTED
107e83: 75 05 jne 107e8a <rtems_fdisk_recover_block_mappings+0x1fb><== NOT EXECUTED
{
sc->pages_used++;
107e85: ff 46 20 incl 0x20(%esi) <== NOT EXECUTED
107e88: eb 66 jmp 107ef0 <rtems_fdisk_recover_block_mappings+0x261><== NOT EXECUTED
}
else if (rtems_fdisk_page_desc_flags_set (pd, RTEMS_FDISK_PAGE_ACTIVE))
107e8a: a8 01 test $0x1,%al <== NOT EXECUTED
107e8c: 75 5f jne 107eed <rtems_fdisk_recover_block_mappings+0x25e><== NOT EXECUTED
{
if (pd->block >= fd->block_count)
107e8e: 8b 47 04 mov 0x4(%edi),%eax <== NOT EXECUTED
107e91: 3b 43 1c cmp 0x1c(%ebx),%eax <== NOT EXECUTED
107e94: 72 19 jb 107eaf <rtems_fdisk_recover_block_mappings+0x220><== NOT EXECUTED
{
#if RTEMS_FDISK_TRACE
rtems_fdisk_warning (fd,
107e96: 52 push %edx <== NOT EXECUTED
107e97: 52 push %edx <== NOT EXECUTED
107e98: 50 push %eax <== NOT EXECUTED
107e99: ff 75 dc pushl -0x24(%ebp) <== NOT EXECUTED
107e9c: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED
107e9f: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
107ea2: 68 78 e5 12 00 push $0x12e578 <== NOT EXECUTED
107ea7: 53 push %ebx <== NOT EXECUTED
107ea8: e8 db f8 ff ff call 107788 <rtems_fdisk_warning> <== NOT EXECUTED
107ead: eb 29 jmp 107ed8 <rtems_fdisk_recover_block_mappings+0x249><== NOT EXECUTED
"invalid block number: %d-%d-%d: block: %d",
device, segment, page, pd->block);
#endif
sc->pages_bad++;
}
else if (fd->blocks[pd->block].segment)
107eaf: 8b 53 18 mov 0x18(%ebx),%edx <== NOT EXECUTED
107eb2: 8d 04 c2 lea (%edx,%eax,8),%eax <== NOT EXECUTED
107eb5: 8b 10 mov (%eax),%edx <== NOT EXECUTED
107eb7: 85 d2 test %edx,%edx <== NOT EXECUTED
107eb9: 74 25 je 107ee0 <rtems_fdisk_recover_block_mappings+0x251><== NOT EXECUTED
* each block so we can tell which is the later block when
* duplicates appear. A power down with a failed wirte could cause
* a duplicate.
*/
const rtems_fdisk_segment_ctl* bsc = fd->blocks[pd->block].segment;
rtems_fdisk_error ("duplicate block: %d-%d-%d: " \
107ebb: 51 push %ecx <== NOT EXECUTED
107ebc: ff 75 dc pushl -0x24(%ebp) <== NOT EXECUTED
107ebf: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED
107ec2: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
107ec5: ff 70 04 pushl 0x4(%eax) <== NOT EXECUTED
107ec8: ff 72 0c pushl 0xc(%edx) <== NOT EXECUTED
107ecb: ff 72 08 pushl 0x8(%edx) <== NOT EXECUTED
107ece: 68 a2 e5 12 00 push $0x12e5a2 <== NOT EXECUTED
107ed3: e8 16 f9 ff ff call 1077ee <rtems_fdisk_error> <== NOT EXECUTED
"duplicate: %d-%d-%d",
bsc->device, bsc->segment,
fd->blocks[pd->block].page,
device, segment, page);
sc->pages_bad++;
107ed8: ff 46 24 incl 0x24(%esi) <== NOT EXECUTED
107edb: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
107ede: eb 10 jmp 107ef0 <rtems_fdisk_recover_block_mappings+0x261><== NOT EXECUTED
{
/**
* @todo
* Add start up crc checks here.
*/
fd->blocks[pd->block].segment = sc;
107ee0: 89 30 mov %esi,(%eax) <== NOT EXECUTED
fd->blocks[pd->block].page = page;
107ee2: 8b 55 dc mov -0x24(%ebp),%edx <== NOT EXECUTED
107ee5: 89 50 04 mov %edx,0x4(%eax) <== NOT EXECUTED
/*
* The page is active.
*/
sc->pages_active++;
107ee8: ff 46 1c incl 0x1c(%esi) <== NOT EXECUTED
107eeb: eb 03 jmp 107ef0 <rtems_fdisk_recover_block_mappings+0x261><== NOT EXECUTED
}
}
else
sc->pages_bad++;
107eed: ff 46 24 incl 0x24(%esi) <== NOT EXECUTED
* are active and how many are used.
*
* If the page is active see if the block is with-in range and
* if the block is a duplicate.
*/
for (page = 0; page < sc->pages; page++, pd++)
107ef0: ff 45 dc incl -0x24(%ebp)
107ef3: 83 c7 08 add $0x8,%edi
107ef6: eb 07 jmp 107eff <rtems_fdisk_recover_block_mappings+0x270>
* so NAND flash could be better supported.
*/
ret = rtems_fdisk_seg_read (fd, sc, 0, (void*) pd,
sc->pages_desc * fd->block_size);
if (ret)
107ef8: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp)
* are active and how many are used.
*
* If the page is active see if the block is with-in range and
* if the block is a duplicate.
*/
for (page = 0; page < sc->pages; page++, pd++)
107eff: 8b 45 dc mov -0x24(%ebp),%eax
107f02: 3b 46 14 cmp 0x14(%esi),%eax
107f05: 0f 82 f2 fe ff ff jb 107dfd <rtems_fdisk_recover_block_mappings+0x16e>
}
/*
* Place the segment on to the correct queue.
*/
rtems_fdisk_queue_segment (fd, sc);
107f0b: 89 f2 mov %esi,%edx
107f0d: 89 d8 mov %ebx,%eax
107f0f: e8 57 fc ff ff call 107b6b <rtems_fdisk_queue_segment>
fd->erased_blocks = 0;
fd->starvation_threshold = 0;
for (device = 0; device < fd->device_count; device++)
{
uint32_t segment;
for (segment = 0; segment < fd->devices[device].segment_count; segment++)
107f14: ff 45 e0 incl -0x20(%ebp)
107f17: 8b 45 d8 mov -0x28(%ebp),%eax
107f1a: 03 43 2c add 0x2c(%ebx),%eax
107f1d: 8b 55 e0 mov -0x20(%ebp),%edx
107f20: 3b 50 04 cmp 0x4(%eax),%edx
107f23: 0f 82 ec fd ff ff jb 107d15 <rtems_fdisk_recover_block_mappings+0x86>
/*
* Scan each segment or each device recovering the valid pages.
*/
fd->erased_blocks = 0;
fd->starvation_threshold = 0;
for (device = 0; device < fd->device_count; device++)
107f29: ff 45 e4 incl -0x1c(%ebp)
107f2c: 8b 45 e4 mov -0x1c(%ebp),%eax
107f2f: 3b 43 30 cmp 0x30(%ebx),%eax
107f32: 73 0f jae 107f43 <rtems_fdisk_recover_block_mappings+0x2b4>
/**
* Recover the block mappings from the devices.
*/
static int
rtems_fdisk_recover_block_mappings (rtems_flashdisk* fd)
107f34: 6b d0 0c imul $0xc,%eax,%edx
107f37: 89 55 d8 mov %edx,-0x28(%ebp)
107f3a: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
107f41: eb d4 jmp 107f17 <rtems_fdisk_recover_block_mappings+0x288>
*/
rtems_fdisk_queue_segment (fd, sc);
}
}
return 0;
107f43: 31 d2 xor %edx,%edx
}
107f45: 89 d0 mov %edx,%eax
107f47: 8d 65 f4 lea -0xc(%ebp),%esp
107f4a: 5b pop %ebx
107f4b: 5e pop %esi
107f4c: 5f pop %edi
107f4d: 5d pop %ebp
107f4e: c3 ret
00107f4f <rtems_fdisk_recycle_segment>:
static int
rtems_fdisk_recycle_segment (rtems_flashdisk* fd,
rtems_fdisk_segment_ctl* ssc,
rtems_fdisk_segment_ctl* dsc,
uint32_t *pages)
{
107f4f: 55 push %ebp
107f50: 89 e5 mov %esp,%ebp
107f52: 57 push %edi
107f53: 56 push %esi
107f54: 53 push %ebx
107f55: 83 ec 3c sub $0x3c,%esp
107f58: 89 c7 mov %eax,%edi
107f5a: 89 d6 mov %edx,%esi
107f5c: 89 cb mov %ecx,%ebx
107f5e: 8b 45 08 mov 0x8(%ebp),%eax
107f61: 89 45 cc mov %eax,-0x34(%ebp)
int ret;
uint32_t spage;
uint32_t used = 0;
uint32_t active = 0;
107f64: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp)
rtems_fdisk_segment_ctl* dsc,
uint32_t *pages)
{
int ret;
uint32_t spage;
uint32_t used = 0;
107f6b: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp)
uint32_t active = 0;
for (spage = 0; spage < ssc->pages; spage++)
107f72: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
107f79: e9 4b 02 00 00 jmp 1081c9 <rtems_fdisk_recycle_segment+0x27a>
{
rtems_fdisk_page_desc* spd = &ssc->page_descriptors[spage];
107f7e: 8b 46 10 mov 0x10(%esi),%eax
107f81: 8b 55 e0 mov -0x20(%ebp),%edx
107f84: 8d 04 d0 lea (%eax,%edx,8),%eax
107f87: 89 45 d8 mov %eax,-0x28(%ebp)
if (!dsc && ssc->pages_active > 0)
107f8a: 85 db test %ebx,%ebx
107f8c: 75 18 jne 107fa6 <rtems_fdisk_recycle_segment+0x57>
107f8e: 83 7e 1c 00 cmpl $0x0,0x1c(%esi)
107f92: 74 12 je 107fa6 <rtems_fdisk_recycle_segment+0x57><== ALWAYS TAKEN
{
rtems_fdisk_error ("recycle: no available dst segment");
107f94: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107f97: 68 d1 e5 12 00 push $0x12e5d1 <== NOT EXECUTED
107f9c: e8 4d f8 ff ff call 1077ee <rtems_fdisk_error> <== NOT EXECUTED
107fa1: e9 95 00 00 00 jmp 10803b <rtems_fdisk_recycle_segment+0xec><== NOT EXECUTED
}
rtems_flashdisk_count = rtems_flashdisk_configuration_size;
return RTEMS_SUCCESSFUL;
}
107fa6: 8b 4d d8 mov -0x28(%ebp),%ecx
107fa9: 66 8b 41 02 mov 0x2(%ecx),%ax
{
rtems_fdisk_error ("recycle: no available dst segment");
return EIO;
}
if (rtems_fdisk_page_desc_flags_set (spd, RTEMS_FDISK_PAGE_ACTIVE) &&
107fad: a8 01 test $0x1,%al
107faf: 0f 85 fd 01 00 00 jne 1081b2 <rtems_fdisk_recycle_segment+0x263><== NEVER TAKEN
107fb5: a8 02 test $0x2,%al
107fb7: 0f 84 f5 01 00 00 je 1081b2 <rtems_fdisk_recycle_segment+0x263><== NEVER TAKEN
* Find the next available page in a segment.
*/
static uint32_t
rtems_fdisk_seg_next_available_page (rtems_fdisk_segment_ctl* sc)
{
rtems_fdisk_page_desc* pd = &sc->page_descriptors[0];
107fbd: 8b 4b 10 mov 0x10(%ebx),%ecx
uint32_t page;
for (page = 0; page < sc->pages; page++, pd++)
107fc0: 8b 53 14 mov 0x14(%ebx),%edx
107fc3: 89 55 dc mov %edx,-0x24(%ebp)
* Find the next available page in a segment.
*/
static uint32_t
rtems_fdisk_seg_next_available_page (rtems_fdisk_segment_ctl* sc)
{
rtems_fdisk_page_desc* pd = &sc->page_descriptors[0];
107fc6: 89 ca mov %ecx,%edx
uint32_t page;
for (page = 0; page < sc->pages; page++, pd++)
107fc8: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
107fcf: eb 1d jmp 107fee <rtems_fdisk_recycle_segment+0x9f>
if (rtems_fdisk_page_desc_erased (pd))
107fd1: 89 d0 mov %edx,%eax
107fd3: 89 55 c0 mov %edx,-0x40(%ebp)
107fd6: 89 4d c4 mov %ecx,-0x3c(%ebp)
107fd9: e8 af f6 ff ff call 10768d <rtems_fdisk_page_desc_erased>
107fde: 84 c0 test %al,%al
107fe0: 8b 55 c0 mov -0x40(%ebp),%edx
107fe3: 8b 4d c4 mov -0x3c(%ebp),%ecx
107fe6: 75 0e jne 107ff6 <rtems_fdisk_recycle_segment+0xa7>
rtems_fdisk_seg_next_available_page (rtems_fdisk_segment_ctl* sc)
{
rtems_fdisk_page_desc* pd = &sc->page_descriptors[0];
uint32_t page;
for (page = 0; page < sc->pages; page++, pd++)
107fe8: ff 45 e4 incl -0x1c(%ebp)
107feb: 83 c2 08 add $0x8,%edx
107fee: 8b 45 dc mov -0x24(%ebp),%eax
107ff1: 39 45 e4 cmp %eax,-0x1c(%ebp)
107ff4: 75 db jne 107fd1 <rtems_fdisk_recycle_segment+0x82><== ALWAYS TAKEN
uint32_t dst_pages;
rtems_fdisk_page_desc* dpd;
uint32_t dpage;
dpage = rtems_fdisk_seg_next_available_page (dsc);
dpd = &dsc->page_descriptors[dpage];
107ff6: 8b 55 e4 mov -0x1c(%ebp),%edx
107ff9: 8d 0c d1 lea (%ecx,%edx,8),%ecx
107ffc: 89 4d c8 mov %ecx,-0x38(%ebp)
active++;
107fff: ff 45 d0 incl -0x30(%ebp)
if (dpage >= dsc->pages)
108002: 8b 4d dc mov -0x24(%ebp),%ecx
108005: 39 ca cmp %ecx,%edx
108007: 72 3f jb 108048 <rtems_fdisk_recycle_segment+0xf9><== ALWAYS TAKEN
{
rtems_fdisk_error ("recycle: %02d-%03d: " \
108009: 89 d8 mov %ebx,%eax <== NOT EXECUTED
10800b: e8 95 f6 ff ff call 1076a5 <rtems_fdisk_seg_pages_available><== NOT EXECUTED
108010: 50 push %eax <== NOT EXECUTED
108011: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED
108014: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED
108017: 68 f3 e5 12 00 push $0x12e5f3 <== NOT EXECUTED
10801c: e8 cd f7 ff ff call 1077ee <rtems_fdisk_error> <== NOT EXECUTED
"no page desc available: %d",
dsc->device, dsc->segment,
rtems_fdisk_seg_pages_available (dsc));
dsc->failed = true;
108021: c7 43 28 01 00 00 00 movl $0x1,0x28(%ebx) <== NOT EXECUTED
rtems_fdisk_queue_segment (fd, dsc);
108028: 89 da mov %ebx,%edx <== NOT EXECUTED
10802a: 89 f8 mov %edi,%eax <== NOT EXECUTED
10802c: e8 3a fb ff ff call 107b6b <rtems_fdisk_queue_segment><== NOT EXECUTED
rtems_fdisk_segment_queue_push_head (&fd->used, ssc);
108031: 8d 47 40 lea 0x40(%edi),%eax <== NOT EXECUTED
108034: 89 f2 mov %esi,%edx <== NOT EXECUTED
108036: e8 75 f5 ff ff call 1075b0 <rtems_fdisk_segment_queue_push_head><== NOT EXECUTED
return EIO;
10803b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10803e: b9 05 00 00 00 mov $0x5,%ecx <== NOT EXECUTED
108043: e9 d2 01 00 00 jmp 10821a <rtems_fdisk_recycle_segment+0x2cb><== NOT EXECUTED
}
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd, "recycle: %02d-%03d-%03d=>%02d-%03d-%03d",
108048: ff 75 e4 pushl -0x1c(%ebp)
10804b: ff 73 0c pushl 0xc(%ebx)
10804e: ff 73 08 pushl 0x8(%ebx)
108051: ff 75 e0 pushl -0x20(%ebp)
108054: ff 76 0c pushl 0xc(%esi)
108057: ff 76 08 pushl 0x8(%esi)
10805a: 68 22 e6 12 00 push $0x12e622
10805f: 57 push %edi
108060: e8 55 f6 ff ff call 1076ba <rtems_fdisk_info>
ssc->device, ssc->segment, spage,
dsc->device, dsc->segment, dpage);
#endif
ret = rtems_fdisk_seg_copy_page (fd, ssc,
108065: 8b 45 e4 mov -0x1c(%ebp),%eax
108068: 03 43 18 add 0x18(%ebx),%eax
10806b: 89 45 dc mov %eax,-0x24(%ebp)
10806e: 8b 4d e0 mov -0x20(%ebp),%ecx
108071: 03 4e 18 add 0x18(%esi),%ecx
rtems_fdisk_segment_ctl* dst_sc,
uint32_t dst_page)
{
int ret;
#if RTEMS_FDISK_TRACE
rtems_fdisk_printf (fd, " seg-copy-page: %02d-%03d~%03d=>%02d-%03d~%03d",
108074: 83 c4 20 add $0x20,%esp
108077: 50 push %eax
108078: ff 73 0c pushl 0xc(%ebx)
10807b: ff 73 08 pushl 0x8(%ebx)
10807e: 51 push %ecx
10807f: ff 76 0c pushl 0xc(%esi)
108082: ff 76 08 pushl 0x8(%esi)
108085: 68 4a e6 12 00 push $0x12e64a
10808a: 57 push %edi
10808b: 89 4d c4 mov %ecx,-0x3c(%ebp)
10808e: e8 8f f6 ff ff call 107722 <rtems_fdisk_printf>
rtems_fdisk_segment_ctl* sc,
uint32_t page,
void* buffer)
{
return rtems_fdisk_seg_read (fd, sc,
page * fd->block_size, buffer, fd->block_size);
108093: 8b 47 14 mov 0x14(%edi),%eax
rtems_fdisk_seg_read_page (const rtems_flashdisk* fd,
rtems_fdisk_segment_ctl* sc,
uint32_t page,
void* buffer)
{
return rtems_fdisk_seg_read (fd, sc,
108096: 83 c4 18 add $0x18,%esp
108099: 8b 4d c4 mov -0x3c(%ebp),%ecx
10809c: 0f af c8 imul %eax,%ecx
10809f: 50 push %eax
1080a0: ff 77 68 pushl 0x68(%edi)
1080a3: 89 f2 mov %esi,%edx
1080a5: 89 f8 mov %edi,%eax
1080a7: e8 db f7 ff ff call 107887 <rtems_fdisk_seg_read>
1080ac: 89 c1 mov %eax,%ecx
src_sc->device, src_sc->segment, src_page,
dst_sc->device, dst_sc->segment, dst_page);
#endif
ret = rtems_fdisk_seg_read_page (fd, src_sc, src_page,
fd->copy_buffer);
if (ret)
1080ae: 83 c4 10 add $0x10,%esp
1080b1: 85 c0 test %eax,%eax
1080b3: 75 1b jne 1080d0 <rtems_fdisk_recycle_segment+0x181><== NEVER TAKEN
return ret;
return rtems_fdisk_seg_write_page (fd, dst_sc, dst_page,
1080b5: 83 ec 0c sub $0xc,%esp
1080b8: ff 77 68 pushl 0x68(%edi)
1080bb: 8b 4d dc mov -0x24(%ebp),%ecx
1080be: 89 da mov %ebx,%edx
1080c0: 89 f8 mov %edi,%eax
1080c2: e8 2a f9 ff ff call 1079f1 <rtems_fdisk_seg_write_page>
1080c7: 89 c1 mov %eax,%ecx
#endif
ret = rtems_fdisk_seg_copy_page (fd, ssc,
spage + ssc->pages_desc,
dsc,
dpage + dsc->pages_desc);
if (ret)
1080c9: 83 c4 10 add $0x10,%esp
1080cc: 85 c0 test %eax,%eax
1080ce: 74 2c je 1080fc <rtems_fdisk_recycle_segment+0x1ad><== ALWAYS TAKEN
{
rtems_fdisk_error ("recycle: %02d-%03d-%03d=>" \
1080d0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1080d3: 51 push %ecx <== NOT EXECUTED
1080d4: 89 4d c4 mov %ecx,-0x3c(%ebp) <== NOT EXECUTED
1080d7: e8 e8 8f 01 00 call 1210c4 <strerror> <== NOT EXECUTED
1080dc: 8b 4d c4 mov -0x3c(%ebp),%ecx <== NOT EXECUTED
1080df: 89 0c 24 mov %ecx,(%esp) <== NOT EXECUTED
1080e2: 50 push %eax <== NOT EXECUTED
1080e3: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
1080e6: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED
1080e9: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED
1080ec: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED
1080ef: ff 76 0c pushl 0xc(%esi) <== NOT EXECUTED
1080f2: ff 76 08 pushl 0x8(%esi) <== NOT EXECUTED
1080f5: 68 7a e6 12 00 push $0x12e67a <== NOT EXECUTED
1080fa: eb 51 jmp 10814d <rtems_fdisk_recycle_segment+0x1fe><== NOT EXECUTED
rtems_fdisk_queue_segment (fd, dsc);
rtems_fdisk_segment_queue_push_head (&fd->used, ssc);
return ret;
}
*dpd = *spd;
1080fc: 8b 4d d8 mov -0x28(%ebp),%ecx
1080ff: 8b 01 mov (%ecx),%eax
108101: 8b 51 04 mov 0x4(%ecx),%edx
108104: 8b 4d c8 mov -0x38(%ebp),%ecx
108107: 89 01 mov %eax,(%ecx)
108109: 89 51 04 mov %edx,0x4(%ecx)
ret = rtems_fdisk_seg_write_page_desc (fd,
10810c: 83 ec 0c sub $0xc,%esp
10810f: 51 push %ecx
108110: 8b 4d e4 mov -0x1c(%ebp),%ecx
108113: 89 da mov %ebx,%edx
108115: 89 f8 mov %edi,%eax
108117: e8 89 f8 ff ff call 1079a5 <rtems_fdisk_seg_write_page_desc>
dsc,
dpage, dpd);
if (ret)
10811c: 83 c4 10 add $0x10,%esp
10811f: 85 c0 test %eax,%eax
108121: 74 4d je 108170 <rtems_fdisk_recycle_segment+0x221><== ALWAYS TAKEN
{
rtems_fdisk_error ("recycle: %02d-%03d-%03d=>" \
108123: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
108126: 50 push %eax <== NOT EXECUTED
108127: 89 45 c4 mov %eax,-0x3c(%ebp) <== NOT EXECUTED
10812a: e8 95 8f 01 00 call 1210c4 <strerror> <== NOT EXECUTED
10812f: 8b 4d c4 mov -0x3c(%ebp),%ecx <== NOT EXECUTED
108132: 89 0c 24 mov %ecx,(%esp) <== NOT EXECUTED
108135: 50 push %eax <== NOT EXECUTED
108136: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
108139: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED
10813c: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED
10813f: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED
108142: ff 76 0c pushl 0xc(%esi) <== NOT EXECUTED
108145: ff 76 08 pushl 0x8(%esi) <== NOT EXECUTED
108148: 68 bd e6 12 00 push $0x12e6bd <== NOT EXECUTED
10814d: e8 9c f6 ff ff call 1077ee <rtems_fdisk_error> <== NOT EXECUTED
"%02d-%03d-%03d: copy pd failed: %s (%d)",
ssc->device, ssc->segment, spage,
dsc->device, dsc->segment, dpage,
strerror (ret), ret);
rtems_fdisk_queue_segment (fd, dsc);
108152: 83 c4 30 add $0x30,%esp <== NOT EXECUTED
108155: 89 da mov %ebx,%edx <== NOT EXECUTED
108157: 89 f8 mov %edi,%eax <== NOT EXECUTED
108159: e8 0d fa ff ff call 107b6b <rtems_fdisk_queue_segment><== NOT EXECUTED
rtems_fdisk_segment_queue_push_head (&fd->used, ssc);
10815e: 8d 47 40 lea 0x40(%edi),%eax <== NOT EXECUTED
108161: 89 f2 mov %esi,%edx <== NOT EXECUTED
108163: e8 48 f4 ff ff call 1075b0 <rtems_fdisk_segment_queue_push_head><== NOT EXECUTED
return ret;
108168: 8b 4d c4 mov -0x3c(%ebp),%ecx <== NOT EXECUTED
10816b: e9 aa 00 00 00 jmp 10821a <rtems_fdisk_recycle_segment+0x2cb><== NOT EXECUTED
}
dsc->pages_active++;
108170: ff 43 1c incl 0x1c(%ebx)
* segment will be erased. Power down could be a problem.
* We do the stats to make sure everything is as it should
* be.
*/
ssc->pages_active--;
108173: ff 4e 1c decl 0x1c(%esi)
ssc->pages_used++;
108176: ff 46 20 incl 0x20(%esi)
fd->blocks[spd->block].segment = dsc;
108179: 8b 45 d8 mov -0x28(%ebp),%eax
10817c: 8b 50 04 mov 0x4(%eax),%edx
10817f: 8b 47 18 mov 0x18(%edi),%eax
108182: 8d 04 d0 lea (%eax,%edx,8),%eax
108185: 89 18 mov %ebx,(%eax)
fd->blocks[spd->block].page = dpage;
108187: 8b 55 e4 mov -0x1c(%ebp),%edx
10818a: 89 50 04 mov %edx,0x4(%eax)
/*
* Place the segment on to the correct queue.
*/
rtems_fdisk_queue_segment (fd, dsc);
10818d: 89 da mov %ebx,%edx
10818f: 89 f8 mov %edi,%eax
108191: e8 d5 f9 ff ff call 107b6b <rtems_fdisk_queue_segment>
/*
* Get new destination segment if necessary.
*/
dst_pages = rtems_fdisk_seg_pages_available (dsc);
108196: 89 d8 mov %ebx,%eax
108198: e8 08 f5 ff ff call 1076a5 <rtems_fdisk_seg_pages_available>
if (dst_pages == 0)
10819d: 85 c0 test %eax,%eax
10819f: 75 0a jne 1081ab <rtems_fdisk_recycle_segment+0x25c>
dsc = rtems_fdisk_seg_most_available (&fd->available);
1081a1: 8b 47 34 mov 0x34(%edi),%eax
1081a4: e8 af f6 ff ff call 107858 <rtems_fdisk_seg_most_available.isra.8>
1081a9: 89 c3 mov %eax,%ebx
(*pages)--;
1081ab: 8b 4d cc mov -0x34(%ebp),%ecx
1081ae: ff 09 decl (%ecx)
return EIO;
}
if (rtems_fdisk_page_desc_flags_set (spd, RTEMS_FDISK_PAGE_ACTIVE) &&
!rtems_fdisk_page_desc_flags_set (spd, RTEMS_FDISK_PAGE_USED))
{
1081b0: eb 14 jmp 1081c6 <rtems_fdisk_recycle_segment+0x277>
if (dst_pages == 0)
dsc = rtems_fdisk_seg_most_available (&fd->available);
(*pages)--;
}
else if (rtems_fdisk_page_desc_erased (spd))
1081b2: 8b 45 d8 mov -0x28(%ebp),%eax
1081b5: e8 d3 f4 ff ff call 10768d <rtems_fdisk_page_desc_erased>
1081ba: 84 c0 test %al,%al
1081bc: 74 05 je 1081c3 <rtems_fdisk_recycle_segment+0x274><== ALWAYS TAKEN
{
--fd->erased_blocks;
1081be: ff 4f 28 decl 0x28(%edi) <== NOT EXECUTED
1081c1: eb 03 jmp 1081c6 <rtems_fdisk_recycle_segment+0x277><== NOT EXECUTED
}
else
{
used++;
1081c3: ff 45 d4 incl -0x2c(%ebp)
int ret;
uint32_t spage;
uint32_t used = 0;
uint32_t active = 0;
for (spage = 0; spage < ssc->pages; spage++)
1081c6: ff 45 e0 incl -0x20(%ebp)
1081c9: 8b 45 e0 mov -0x20(%ebp),%eax
1081cc: 3b 46 14 cmp 0x14(%esi),%eax
1081cf: 0f 82 a9 fd ff ff jb 107f7e <rtems_fdisk_recycle_segment+0x2f><== NEVER TAKEN
used++;
}
}
#if RTEMS_FDISK_TRACE
rtems_fdisk_printf (fd, "ssc end: %d-%d: p=%ld, a=%ld, u=%ld",
1081d5: 51 push %ecx
1081d6: ff 75 d4 pushl -0x2c(%ebp)
1081d9: ff 75 d0 pushl -0x30(%ebp)
1081dc: ff 75 cc pushl -0x34(%ebp)
1081df: ff 76 0c pushl 0xc(%esi)
1081e2: ff 76 08 pushl 0x8(%esi)
1081e5: 68 fe e6 12 00 push $0x12e6fe
1081ea: 57 push %edi
1081eb: e8 32 f5 ff ff call 107722 <rtems_fdisk_printf>
ssc->device, ssc->segment,
pages, active, used);
#endif
if (ssc->pages_active != 0)
1081f0: 8b 46 1c mov 0x1c(%esi),%eax
1081f3: 83 c4 20 add $0x20,%esp
1081f6: 85 c0 test %eax,%eax
1081f8: 74 10 je 10820a <rtems_fdisk_recycle_segment+0x2bb><== ALWAYS TAKEN
{
rtems_fdisk_error ("compacting: ssc pages not 0: %d",
1081fa: 52 push %edx <== NOT EXECUTED
1081fb: 52 push %edx <== NOT EXECUTED
1081fc: 50 push %eax <== NOT EXECUTED
1081fd: 68 22 e7 12 00 push $0x12e722 <== NOT EXECUTED
108202: e8 e7 f5 ff ff call 1077ee <rtems_fdisk_error> <== NOT EXECUTED
108207: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
ssc->pages_active);
}
ret = rtems_fdisk_erase_segment (fd, ssc);
10820a: 89 f2 mov %esi,%edx
10820c: 89 f8 mov %edi,%eax
return ret;
}
10820e: 8d 65 f4 lea -0xc(%ebp),%esp
108211: 5b pop %ebx
108212: 5e pop %esi
108213: 5f pop %edi
108214: 5d pop %ebp
{
rtems_fdisk_error ("compacting: ssc pages not 0: %d",
ssc->pages_active);
}
ret = rtems_fdisk_erase_segment (fd, ssc);
108215: e9 95 f8 ff ff jmp 107aaf <rtems_fdisk_erase_segment>
return ret;
}
10821a: 89 c8 mov %ecx,%eax <== NOT EXECUTED
10821c: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10821f: 5b pop %ebx <== NOT EXECUTED
108220: 5e pop %esi <== NOT EXECUTED
108221: 5f pop %edi <== NOT EXECUTED
108222: 5d pop %ebp <== NOT EXECUTED
108223: c3 ret <== NOT EXECUTED
00107937 <rtems_fdisk_seg_write>:
rtems_fdisk_seg_write (const rtems_flashdisk* fd,
rtems_fdisk_segment_ctl* sc,
uint32_t offset,
const void* buffer,
uint32_t size)
{
107937: 55 push %ebp
107938: 89 e5 mov %esp,%ebp
10793a: 57 push %edi
10793b: 56 push %esi
10793c: 53 push %ebx
10793d: 83 ec 24 sub $0x24,%esp
107940: 89 d3 mov %edx,%ebx
107942: 89 4d e4 mov %ecx,-0x1c(%ebp)
int ret;
uint32_t device;
uint32_t segment;
const rtems_fdisk_segment_desc* sd;
const rtems_fdisk_driver_handlers* ops;
device = sc->device;
107945: 8b 72 08 mov 0x8(%edx),%esi
segment = sc->segment;
107948: 8b 7a 0c mov 0xc(%edx),%edi
static const rtems_fdisk_segment_desc*
rtems_fdisk_seg_descriptor (const rtems_flashdisk* fd,
uint32_t device,
uint32_t segment)
{
return fd->devices[device].segments[segment].descriptor;
10794b: 6b ce 0c imul $0xc,%esi,%ecx
10794e: 03 48 2c add 0x2c(%eax),%ecx
107951: 6b d7 30 imul $0x30,%edi,%edx
107954: 03 11 add (%ecx),%edx
107956: 8b 52 04 mov 0x4(%edx),%edx
107959: 89 55 e0 mov %edx,-0x20(%ebp)
const rtems_fdisk_segment_desc* sd;
const rtems_fdisk_driver_handlers* ops;
device = sc->device;
segment = sc->segment;
sd = rtems_fdisk_seg_descriptor (fd, device, segment);
ops = fd->devices[device].descriptor->flash_ops;
10795c: 8b 51 08 mov 0x8(%ecx),%edx
10795f: 8b 52 08 mov 0x8(%edx),%edx
#if RTEMS_FDISK_TRACE
rtems_fdisk_printf (fd, " seg-write: %02d-%03d: o=%08x s=%d",
107962: ff 75 0c pushl 0xc(%ebp)
107965: ff 75 e4 pushl -0x1c(%ebp)
107968: 57 push %edi
107969: 56 push %esi
10796a: 68 3b e4 12 00 push $0x12e43b
10796f: 50 push %eax
107970: 89 55 dc mov %edx,-0x24(%ebp)
107973: e8 aa fd ff ff call 107722 <rtems_fdisk_printf>
device, segment, offset, size);
#endif
ret = ops->write (sd, device, segment, offset, buffer, size);
107978: 83 c4 18 add $0x18,%esp
10797b: ff 75 0c pushl 0xc(%ebp)
10797e: ff 75 08 pushl 0x8(%ebp)
107981: ff 75 e4 pushl -0x1c(%ebp)
107984: 57 push %edi
107985: 56 push %esi
107986: ff 75 e0 pushl -0x20(%ebp)
107989: 8b 55 dc mov -0x24(%ebp),%edx
10798c: ff 52 04 call *0x4(%edx)
if (ret)
10798f: 83 c4 20 add $0x20,%esp
107992: 85 c0 test %eax,%eax
107994: 74 07 je 10799d <rtems_fdisk_seg_write+0x66><== ALWAYS TAKEN
sc->failed = true;
107996: c7 43 28 01 00 00 00 movl $0x1,0x28(%ebx) <== NOT EXECUTED
return ret;
}
10799d: 8d 65 f4 lea -0xc(%ebp),%esp
1079a0: 5b pop %ebx
1079a1: 5e pop %esi
1079a2: 5f pop %edi
1079a3: 5d pop %ebp
1079a4: c3 ret
001079f1 <rtems_fdisk_seg_write_page>:
static int
rtems_fdisk_seg_write_page (rtems_flashdisk* fd,
rtems_fdisk_segment_ctl* sc,
uint32_t page,
const void* buffer)
{
1079f1: 55 push %ebp
1079f2: 89 e5 mov %esp,%ebp
1079f4: 57 push %edi
1079f5: 56 push %esi
1079f6: 53 push %ebx
1079f7: 83 ec 0c sub $0xc,%esp
1079fa: 89 c3 mov %eax,%ebx
1079fc: 89 d6 mov %edx,%esi
1079fe: 89 cf mov %ecx,%edi
if ((fd->flags & RTEMS_FDISK_BLANK_CHECK_BEFORE_WRITE))
107a00: f6 40 08 08 testb $0x8,0x8(%eax)
107a04: 75 1f jne 107a25 <rtems_fdisk_seg_write_page+0x34><== ALWAYS TAKEN
{
int ret = rtems_fdisk_seg_blank_check_page (fd, sc, page);
if (ret)
return ret;
}
--fd->erased_blocks;
107a06: ff 4b 28 decl 0x28(%ebx)
return rtems_fdisk_seg_write (fd, sc,
page * fd->block_size, buffer, fd->block_size);
107a09: 8b 43 14 mov 0x14(%ebx),%eax
int ret = rtems_fdisk_seg_blank_check_page (fd, sc, page);
if (ret)
return ret;
}
--fd->erased_blocks;
return rtems_fdisk_seg_write (fd, sc,
107a0c: 52 push %edx
107a0d: 52 push %edx
107a0e: 89 f9 mov %edi,%ecx
107a10: 0f af c8 imul %eax,%ecx
107a13: 50 push %eax
107a14: ff 75 08 pushl 0x8(%ebp)
107a17: 89 f2 mov %esi,%edx
107a19: 89 d8 mov %ebx,%eax
107a1b: e8 17 ff ff ff call 107937 <rtems_fdisk_seg_write>
107a20: 83 c4 10 add $0x10,%esp
107a23: eb 18 jmp 107a3d <rtems_fdisk_seg_write_page+0x4c>
rtems_fdisk_seg_blank_check_page (const rtems_flashdisk* fd,
rtems_fdisk_segment_ctl* sc,
uint32_t page)
{
return rtems_fdisk_seg_blank_check (fd, sc,
page * fd->block_size, fd->block_size);
107a25: 8b 40 14 mov 0x14(%eax),%eax
static int
rtems_fdisk_seg_blank_check_page (const rtems_flashdisk* fd,
rtems_fdisk_segment_ctl* sc,
uint32_t page)
{
return rtems_fdisk_seg_blank_check (fd, sc,
107a28: 83 ec 0c sub $0xc,%esp
107a2b: 0f af c8 imul %eax,%ecx
107a2e: 50 push %eax
107a2f: 89 d8 mov %ebx,%eax
107a31: e8 aa fe ff ff call 1078e0 <rtems_fdisk_seg_blank_check>
const void* buffer)
{
if ((fd->flags & RTEMS_FDISK_BLANK_CHECK_BEFORE_WRITE))
{
int ret = rtems_fdisk_seg_blank_check_page (fd, sc, page);
if (ret)
107a36: 83 c4 10 add $0x10,%esp
107a39: 85 c0 test %eax,%eax
107a3b: 74 c9 je 107a06 <rtems_fdisk_seg_write_page+0x15><== ALWAYS TAKEN
return ret;
}
--fd->erased_blocks;
return rtems_fdisk_seg_write (fd, sc,
page * fd->block_size, buffer, fd->block_size);
}
107a3d: 8d 65 f4 lea -0xc(%ebp),%esp
107a40: 5b pop %ebx
107a41: 5e pop %esi
107a42: 5f pop %edi
107a43: 5d pop %ebp
107a44: c3 ret
001079a5 <rtems_fdisk_seg_write_page_desc>:
static int
rtems_fdisk_seg_write_page_desc (const rtems_flashdisk* fd,
rtems_fdisk_segment_ctl* sc,
uint32_t page,
const rtems_fdisk_page_desc* page_desc)
{
1079a5: 55 push %ebp
1079a6: 89 e5 mov %esp,%ebp
1079a8: 57 push %edi
1079a9: 56 push %esi
1079aa: 53 push %ebx
1079ab: 83 ec 0c sub $0xc,%esp
1079ae: 89 c3 mov %eax,%ebx
1079b0: 89 d6 mov %edx,%esi
uint32_t offset = page * sizeof (rtems_fdisk_page_desc);
1079b2: 8d 3c cd 00 00 00 00 lea 0x0(,%ecx,8),%edi
if ((fd->flags & RTEMS_FDISK_BLANK_CHECK_BEFORE_WRITE))
1079b9: f6 40 08 08 testb $0x8,0x8(%eax)
1079bd: 75 17 jne 1079d6 <rtems_fdisk_seg_write_page_desc+0x31><== ALWAYS TAKEN
offset,
sizeof (rtems_fdisk_page_desc));
if (ret)
return ret;
}
return rtems_fdisk_seg_write (fd, sc, offset,
1079bf: 50 push %eax
1079c0: 50 push %eax
1079c1: 6a 08 push $0x8
1079c3: ff 75 08 pushl 0x8(%ebp)
1079c6: 89 f9 mov %edi,%ecx
1079c8: 89 f2 mov %esi,%edx
1079ca: 89 d8 mov %ebx,%eax
1079cc: e8 66 ff ff ff call 107937 <rtems_fdisk_seg_write>
1079d1: 83 c4 10 add $0x10,%esp
1079d4: eb 13 jmp 1079e9 <rtems_fdisk_seg_write_page_desc+0x44>
const rtems_fdisk_page_desc* page_desc)
{
uint32_t offset = page * sizeof (rtems_fdisk_page_desc);
if ((fd->flags & RTEMS_FDISK_BLANK_CHECK_BEFORE_WRITE))
{
int ret = rtems_fdisk_seg_blank_check (fd, sc,
1079d6: 83 ec 0c sub $0xc,%esp
1079d9: 6a 08 push $0x8
1079db: 89 f9 mov %edi,%ecx
1079dd: e8 fe fe ff ff call 1078e0 <rtems_fdisk_seg_blank_check>
offset,
sizeof (rtems_fdisk_page_desc));
if (ret)
1079e2: 83 c4 10 add $0x10,%esp
1079e5: 85 c0 test %eax,%eax
1079e7: 74 d6 je 1079bf <rtems_fdisk_seg_write_page_desc+0x1a><== ALWAYS TAKEN
return ret;
}
return rtems_fdisk_seg_write (fd, sc, offset,
page_desc, sizeof (rtems_fdisk_page_desc));
}
1079e9: 8d 65 f4 lea -0xc(%ebp),%esp
1079ec: 5b pop %ebx
1079ed: 5e pop %esi
1079ee: 5f pop %edi
1079ef: 5d pop %ebp
1079f0: c3 ret
00107659 <rtems_fdisk_segment_queue_insert_before>:
*/
static void
rtems_fdisk_segment_queue_insert_before (rtems_fdisk_segment_ctl_queue* queue,
rtems_fdisk_segment_ctl* item,
rtems_fdisk_segment_ctl* sc)
{
107659: 55 push %ebp
10765a: 89 e5 mov %esp,%ebp
10765c: 56 push %esi
10765d: 53 push %ebx
10765e: 89 d6 mov %edx,%esi
107660: 89 ca mov %ecx,%edx
if (item)
107662: 85 f6 test %esi,%esi
107664: 74 1b je 107681 <rtems_fdisk_segment_queue_insert_before+0x28><== NEVER TAKEN
{
rtems_fdisk_segment_ctl** prev = &queue->head;
107666: 89 c1 mov %eax,%ecx
rtems_fdisk_segment_ctl* it = queue->head;
107668: 8b 18 mov (%eax),%ebx
while (it)
10766a: eb 11 jmp 10767d <rtems_fdisk_segment_queue_insert_before+0x24>
{
if (item == it)
10766c: 39 de cmp %ebx,%esi
10766e: 75 09 jne 107679 <rtems_fdisk_segment_queue_insert_before+0x20>
{
sc->next = item;
107670: 89 32 mov %esi,(%edx)
*prev = sc;
107672: 89 11 mov %edx,(%ecx)
queue->count++;
107674: ff 40 08 incl 0x8(%eax)
return;
107677: eb 10 jmp 107689 <rtems_fdisk_segment_queue_insert_before+0x30>
}
prev = &it->next;
107679: 89 d9 mov %ebx,%ecx
it = it->next;
10767b: 8b 1b mov (%ebx),%ebx
if (item)
{
rtems_fdisk_segment_ctl** prev = &queue->head;
rtems_fdisk_segment_ctl* it = queue->head;
while (it)
10767d: 85 db test %ebx,%ebx
10767f: 75 eb jne 10766c <rtems_fdisk_segment_queue_insert_before+0x13><== ALWAYS TAKEN
it = it->next;
}
}
rtems_fdisk_segment_queue_push_tail (queue, sc);
}
107681: 5b pop %ebx <== NOT EXECUTED
107682: 5e pop %esi <== NOT EXECUTED
107683: 5d pop %ebp <== NOT EXECUTED
prev = &it->next;
it = it->next;
}
}
rtems_fdisk_segment_queue_push_tail (queue, sc);
107684: e9 67 ff ff ff jmp 1075f0 <rtems_fdisk_segment_queue_push_tail><== NOT EXECUTED
}
107689: 5b pop %ebx
10768a: 5e pop %esi
10768b: 5d pop %ebp
10768c: c3 ret
001075cb <rtems_fdisk_segment_queue_pop_head>:
/**
* Pop the head of the segment control queue.
*/
static rtems_fdisk_segment_ctl*
rtems_fdisk_segment_queue_pop_head (rtems_fdisk_segment_ctl_queue* queue)
{
1075cb: 55 push %ebp
1075cc: 89 e5 mov %esp,%ebp
1075ce: 89 c2 mov %eax,%edx
if (queue->head)
1075d0: 8b 00 mov (%eax),%eax
1075d2: 85 c0 test %eax,%eax
1075d4: 74 18 je 1075ee <rtems_fdisk_segment_queue_pop_head+0x23><== NEVER TAKEN
{
rtems_fdisk_segment_ctl* sc = queue->head;
queue->head = sc->next;
1075d6: 8b 08 mov (%eax),%ecx
1075d8: 89 0a mov %ecx,(%edx)
if (!queue->head)
1075da: 85 c9 test %ecx,%ecx
1075dc: 75 07 jne 1075e5 <rtems_fdisk_segment_queue_pop_head+0x1a>
queue->tail = 0;
1075de: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx)
queue->count--;
1075e5: ff 4a 08 decl 0x8(%edx)
sc->next = 0;
1075e8: c7 00 00 00 00 00 movl $0x0,(%eax)
return sc;
}
return 0;
}
1075ee: 5d pop %ebp
1075ef: c3 ret
001075b0 <rtems_fdisk_segment_queue_push_head>:
* Push to the head of the segment control queue.
*/
static void
rtems_fdisk_segment_queue_push_head (rtems_fdisk_segment_ctl_queue* queue,
rtems_fdisk_segment_ctl* sc)
{
1075b0: 55 push %ebp <== NOT EXECUTED
1075b1: 89 e5 mov %esp,%ebp <== NOT EXECUTED
if (sc)
1075b3: 85 d2 test %edx,%edx <== NOT EXECUTED
1075b5: 74 12 je 1075c9 <rtems_fdisk_segment_queue_push_head+0x19><== NOT EXECUTED
{
sc->next = queue->head;
1075b7: 8b 08 mov (%eax),%ecx <== NOT EXECUTED
1075b9: 89 0a mov %ecx,(%edx) <== NOT EXECUTED
queue->head = sc;
1075bb: 89 10 mov %edx,(%eax) <== NOT EXECUTED
if (queue->tail == 0)
1075bd: 83 78 04 00 cmpl $0x0,0x4(%eax) <== NOT EXECUTED
1075c1: 75 03 jne 1075c6 <rtems_fdisk_segment_queue_push_head+0x16><== NOT EXECUTED
queue->tail = sc;
1075c3: 89 50 04 mov %edx,0x4(%eax) <== NOT EXECUTED
queue->count++;
1075c6: ff 40 08 incl 0x8(%eax) <== NOT EXECUTED
}
}
1075c9: 5d pop %ebp <== NOT EXECUTED
1075ca: c3 ret <== NOT EXECUTED
001075f0 <rtems_fdisk_segment_queue_push_tail>:
* Push to the tail of the segment control queue.
*/
static void
rtems_fdisk_segment_queue_push_tail (rtems_fdisk_segment_ctl_queue* queue,
rtems_fdisk_segment_ctl* sc)
{
1075f0: 55 push %ebp
1075f1: 89 e5 mov %esp,%ebp
if (sc)
1075f3: 85 d2 test %edx,%edx
1075f5: 74 1d je 107614 <rtems_fdisk_segment_queue_push_tail+0x24><== NEVER TAKEN
{
sc->next = 0;
1075f7: c7 02 00 00 00 00 movl $0x0,(%edx)
if (queue->head)
1075fd: 83 38 00 cmpl $0x0,(%eax)
107600: 74 0a je 10760c <rtems_fdisk_segment_queue_push_tail+0x1c>
{
queue->tail->next = sc;
107602: 8b 48 04 mov 0x4(%eax),%ecx
107605: 89 11 mov %edx,(%ecx)
queue->tail = sc;
107607: 89 50 04 mov %edx,0x4(%eax)
10760a: eb 05 jmp 107611 <rtems_fdisk_segment_queue_push_tail+0x21>
}
else
{
queue->head = queue->tail = sc;
10760c: 89 50 04 mov %edx,0x4(%eax)
10760f: 89 10 mov %edx,(%eax)
}
queue->count++;
107611: ff 40 08 incl 0x8(%eax)
}
}
107614: 5d pop %ebp
107615: c3 ret
00107616 <rtems_fdisk_segment_queue_remove>:
* Remove from the segment control queue.
*/
static void
rtems_fdisk_segment_queue_remove (rtems_fdisk_segment_ctl_queue* queue,
rtems_fdisk_segment_ctl* sc)
{
107616: 55 push %ebp
107617: 89 e5 mov %esp,%ebp
107619: 53 push %ebx
rtems_fdisk_segment_ctl* prev = 0;
rtems_fdisk_segment_ctl* it = queue->head;
10761a: 8b 08 mov (%eax),%ecx
*/
static void
rtems_fdisk_segment_queue_remove (rtems_fdisk_segment_ctl_queue* queue,
rtems_fdisk_segment_ctl* sc)
{
rtems_fdisk_segment_ctl* prev = 0;
10761c: 31 db xor %ebx,%ebx
/*
* Do not change sc->next as sc could be on another queue.
*/
while (it)
10761e: eb 32 jmp 107652 <rtems_fdisk_segment_queue_remove+0x3c>
{
if (sc == it)
107620: 39 ca cmp %ecx,%edx
107622: 75 2a jne 10764e <rtems_fdisk_segment_queue_remove+0x38>
{
if (prev == 0)
107624: 85 db test %ebx,%ebx
107626: 8b 0a mov (%edx),%ecx
107628: 75 0f jne 107639 <rtems_fdisk_segment_queue_remove+0x23>
{
queue->head = sc->next;
10762a: 89 08 mov %ecx,(%eax)
if (queue->head == 0)
10762c: 85 c9 test %ecx,%ecx
10762e: 75 13 jne 107643 <rtems_fdisk_segment_queue_remove+0x2d>
queue->tail = 0;
107630: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax)
107637: eb 0a jmp 107643 <rtems_fdisk_segment_queue_remove+0x2d>
}
else
{
prev->next = sc->next;
107639: 89 0b mov %ecx,(%ebx)
if (queue->tail == sc)
10763b: 39 50 04 cmp %edx,0x4(%eax)
10763e: 75 03 jne 107643 <rtems_fdisk_segment_queue_remove+0x2d><== NEVER TAKEN
queue->tail = prev;
107640: 89 58 04 mov %ebx,0x4(%eax)
}
sc->next = 0;
107643: c7 02 00 00 00 00 movl $0x0,(%edx)
queue->count--;
107649: ff 48 08 decl 0x8(%eax)
break;
10764c: eb 08 jmp 107656 <rtems_fdisk_segment_queue_remove+0x40>
10764e: 89 cb mov %ecx,%ebx
}
prev = it;
it = it->next;
107650: 8b 09 mov (%ecx),%ecx
/*
* Do not change sc->next as sc could be on another queue.
*/
while (it)
107652: 85 c9 test %ecx,%ecx
107654: 75 ca jne 107620 <rtems_fdisk_segment_queue_remove+0xa>
}
prev = it;
it = it->next;
}
}
107656: 5b pop %ebx
107657: 5d pop %ebp
107658: c3 ret
00107788 <rtems_fdisk_warning>:
* @param ... The arguments for the format text.
* @return int The number of bytes written to the output.
*/
static int
rtems_fdisk_warning (const rtems_flashdisk* fd, const char *format, ...)
{
107788: 55 push %ebp <== NOT EXECUTED
107789: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10778b: 53 push %ebx <== NOT EXECUTED
10778c: 53 push %ebx <== NOT EXECUTED
int ret = 0;
10778d: 31 db xor %ebx,%ebx <== NOT EXECUTED
if (fd->info_level >= 1)
10778f: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
107792: 83 78 6c 00 cmpl $0x0,0x6c(%eax) <== NOT EXECUTED
107796: 74 4f je 1077e7 <rtems_fdisk_warning+0x5f><== NOT EXECUTED
{
va_list args;
va_start (args, format);
107798: 8d 5d 10 lea 0x10(%ebp),%ebx <== NOT EXECUTED
fprintf (stdout, "fdisk:warning:");
10779b: 50 push %eax <== NOT EXECUTED
10779c: 50 push %eax <== NOT EXECUTED
10779d: a1 40 17 14 00 mov 0x141740,%eax <== NOT EXECUTED
1077a2: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED
1077a5: 68 ac e3 12 00 push $0x12e3ac <== NOT EXECUTED
1077aa: e8 65 82 01 00 call 11fa14 <fputs> <== NOT EXECUTED
ret = vfprintf (stdout, format, args);
1077af: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
1077b2: 53 push %ebx <== NOT EXECUTED
1077b3: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
1077b6: a1 40 17 14 00 mov 0x141740,%eax <== NOT EXECUTED
1077bb: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED
1077be: e8 55 09 02 00 call 128118 <vfprintf> <== NOT EXECUTED
1077c3: 89 c3 mov %eax,%ebx <== NOT EXECUTED
fprintf (stdout, "\n");
1077c5: 58 pop %eax <== NOT EXECUTED
1077c6: 5a pop %edx <== NOT EXECUTED
1077c7: a1 40 17 14 00 mov 0x141740,%eax <== NOT EXECUTED
1077cc: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED
1077cf: 6a 0a push $0xa <== NOT EXECUTED
1077d1: e8 86 81 01 00 call 11f95c <fputc> <== NOT EXECUTED
fflush (stdout);
1077d6: 59 pop %ecx <== NOT EXECUTED
1077d7: a1 40 17 14 00 mov 0x141740,%eax <== NOT EXECUTED
1077dc: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED
1077df: e8 50 7d 01 00 call 11f534 <fflush> <== NOT EXECUTED
va_end (args);
1077e4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
return ret;
}
1077e7: 89 d8 mov %ebx,%eax <== NOT EXECUTED
1077e9: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
1077ec: c9 leave <== NOT EXECUTED
1077ed: c3 ret <== NOT EXECUTED
0010ddf0 <rtems_filesystem_check_access>:
int eval_flags,
mode_t node_mode,
uid_t node_uid,
gid_t node_gid
)
{
10ddf0: 55 push %ebp
10ddf1: 89 e5 mov %esp,%ebp
10ddf3: 57 push %edi
10ddf4: 56 push %esi
10ddf5: 53 push %ebx
10ddf6: 83 ec 0c sub $0xc,%esp
10ddf9: 8b 5d 08 mov 0x8(%ebp),%ebx
10ddfc: 8b 7d 10 mov 0x10(%ebp),%edi
10ddff: 8b 75 14 mov 0x14(%ebp),%esi
mode_t perm_flags = eval_flags & RTEMS_FS_PERMS_RWX;
10de02: 83 e3 07 and $0x7,%ebx
uid_t task_uid = geteuid();
10de05: e8 3e fc ff ff call 10da48 <geteuid>
if (task_uid == 0 || task_uid == node_uid) {
10de0a: 66 39 f8 cmp %di,%ax
10de0d: 74 05 je 10de14 <rtems_filesystem_check_access+0x24>
10de0f: 66 85 c0 test %ax,%ax
10de12: 75 05 jne 10de19 <rtems_filesystem_check_access+0x29>
perm_flags <<= RTEMS_FS_USR_SHIFT;
10de14: c1 e3 06 shl $0x6,%ebx
10de17: eb 12 jmp 10de2b <rtems_filesystem_check_access+0x3b>
} else {
gid_t task_gid = getegid();
10de19: e8 1a fc ff ff call 10da38 <getegid>
if (task_gid == 0 || task_gid == node_gid) {
10de1e: 66 39 f0 cmp %si,%ax
10de21: 74 05 je 10de28 <rtems_filesystem_check_access+0x38>
10de23: 66 85 c0 test %ax,%ax
10de26: 75 03 jne 10de2b <rtems_filesystem_check_access+0x3b><== ALWAYS TAKEN
perm_flags <<= RTEMS_FS_GRP_SHIFT;
10de28: c1 e3 03 shl $0x3,%ebx
} else {
perm_flags <<= RTEMS_FS_OTH_SHIFT;
}
}
return (perm_flags & node_mode) == perm_flags;
10de2b: 8b 45 0c mov 0xc(%ebp),%eax
10de2e: 21 d8 and %ebx,%eax
10de30: 39 d8 cmp %ebx,%eax
10de32: 0f 94 c0 sete %al
}
10de35: 83 c4 0c add $0xc,%esp
10de38: 5b pop %ebx
10de39: 5e pop %esi
10de3a: 5f pop %edi
10de3b: 5d pop %ebp
10de3c: c3 ret
00107a95 <rtems_filesystem_do_unmount>:
}
void rtems_filesystem_do_unmount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
107a95: 55 push %ebp
107a96: 89 e5 mov %esp,%ebp
107a98: 53 push %ebx
107a99: 83 ec 08 sub $0x8,%esp
107a9c: 8b 5d 08 mov 0x8(%ebp),%ebx
*/
#include <rtems/userenv.h>
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
107a9f: 6a 00 push $0x0
107aa1: 6a 00 push $0x0
107aa3: ff 35 d8 e2 12 00 pushl 0x12e2d8
107aa9: e8 e2 22 00 00 call 109d90 <rtems_semaphore_obtain>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
107aae: 8b 13 mov (%ebx),%edx
previous = the_node->previous;
107ab0: 8b 43 04 mov 0x4(%ebx),%eax
next->previous = previous;
107ab3: 89 42 04 mov %eax,0x4(%edx)
previous->next = next;
107ab6: 89 10 mov %edx,(%eax)
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
107ab8: 58 pop %eax
107ab9: ff 35 d8 e2 12 00 pushl 0x12e2d8
107abf: e8 bc 23 00 00 call 109e80 <rtems_semaphore_release>
rtems_filesystem_mt_lock();
rtems_chain_extract_unprotected(&mt_entry->mt_node);
rtems_filesystem_mt_unlock();
rtems_filesystem_global_location_release(mt_entry->mt_point_node);
107ac4: 58 pop %eax
107ac5: ff 73 20 pushl 0x20(%ebx)
107ac8: e8 fc 00 00 00 call 107bc9 <rtems_filesystem_global_location_release>
(*mt_entry->ops->fsunmount_me_h)(mt_entry);
107acd: 8b 43 0c mov 0xc(%ebx),%eax
107ad0: 89 1c 24 mov %ebx,(%esp)
107ad3: ff 50 3c call *0x3c(%eax)
if (mt_entry->unmount_task != 0) {
107ad6: 8b 43 3c mov 0x3c(%ebx),%eax
107ad9: 83 c4 10 add $0x10,%esp
107adc: 85 c0 test %eax,%eax
107ade: 74 1e je 107afe <rtems_filesystem_do_unmount+0x69><== NEVER TAKEN
rtems_status_code sc =
107ae0: 51 push %ecx
107ae1: 51 push %ecx
107ae2: 6a 02 push $0x2
107ae4: 50 push %eax
107ae5: e8 da 1e 00 00 call 1099c4 <rtems_event_send>
rtems_event_send(mt_entry->unmount_task, RTEMS_FILESYSTEM_UNMOUNT_EVENT);
if (sc != RTEMS_SUCCESSFUL) {
107aea: 83 c4 10 add $0x10,%esp
107aed: 85 c0 test %eax,%eax
107aef: 74 0d je 107afe <rtems_filesystem_do_unmount+0x69><== ALWAYS TAKEN
rtems_fatal_error_occurred(0xdeadbeef);
107af1: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107af4: 68 ef be ad de push $0xdeadbeef <== NOT EXECUTED
107af9: e8 b6 28 00 00 call 10a3b4 <rtems_fatal_error_occurred><== NOT EXECUTED
}
}
free(mt_entry);
107afe: 89 5d 08 mov %ebx,0x8(%ebp)
}
107b01: 8b 5d fc mov -0x4(%ebp),%ebx
107b04: c9 leave
if (sc != RTEMS_SUCCESSFUL) {
rtems_fatal_error_occurred(0xdeadbeef);
}
}
free(mt_entry);
107b05: e9 2a ec ff ff jmp 106734 <free>
0010de78 <rtems_filesystem_eval_path_generic>:
void rtems_filesystem_eval_path_generic(
rtems_filesystem_eval_path_context_t *ctx,
void *arg,
const rtems_filesystem_eval_path_generic_config *config
)
{
10de78: 55 push %ebp
10de79: 89 e5 mov %esp,%ebp
10de7b: 57 push %edi
10de7c: 56 push %esi
10de7d: 53 push %ebx
10de7e: 83 ec 1c sub $0x1c,%esp
10de81: 8b 5d 08 mov 0x8(%ebp),%ebx
10de84: 8b 75 0c mov 0xc(%ebp),%esi
10de87: 8b 7d 10 mov 0x10(%ebp),%edi
rtems_filesystem_eval_path_error(ctx, EINVAL);
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_DONE;
}
}
} else if (rtems_filesystem_is_parent_directory(token, tokenlen)) {
rtems_filesystem_location_info_t *currentloc =
10de8a: 8d 43 18 lea 0x18(%ebx),%eax
10de8d: 89 45 e4 mov %eax,-0x1c(%ebp)
rtems_filesystem_eval_path_context_t *ctx,
const char **token,
size_t *tokenlen
)
{
rtems_filesystem_eval_path_next_token(ctx);
10de90: 83 ec 0c sub $0xc,%esp
10de93: 53 push %ebx
10de94: e8 72 01 00 00 call 10e00b <rtems_filesystem_eval_path_next_token>
*token = ctx->token;
10de99: 8b 53 08 mov 0x8(%ebx),%edx
*tokenlen = ctx->tokenlen;
10de9c: 8b 4b 0c mov 0xc(%ebx),%ecx
const char *token;
size_t tokenlen;
rtems_filesystem_eval_path_get_next_token(ctx, &token, &tokenlen);
if (tokenlen > 0) {
10de9f: 83 c4 10 add $0x10,%esp
10dea2: 85 c9 test %ecx,%ecx
10dea4: 0f 84 27 01 00 00 je 10dfd1 <rtems_filesystem_eval_path_generic+0x159>
if ((*config->is_directory)(ctx, arg)) {
10deaa: 50 push %eax
10deab: 50 push %eax
10deac: 56 push %esi
10dead: 53 push %ebx
10deae: 89 55 e0 mov %edx,-0x20(%ebp)
10deb1: 89 4d dc mov %ecx,-0x24(%ebp)
10deb4: ff 17 call *(%edi)
10deb6: 83 c4 10 add $0x10,%esp
10deb9: 84 c0 test %al,%al
10debb: 8b 55 e0 mov -0x20(%ebp),%edx
10debe: 8b 4d dc mov -0x24(%ebp),%ecx
10dec1: 0f 84 f6 00 00 00 je 10dfbd <rtems_filesystem_eval_path_generic+0x145>
static inline bool rtems_filesystem_is_current_directory(
const char *token,
size_t tokenlen
)
{
return tokenlen == 1 && token [0] == '.';
10dec7: 31 c0 xor %eax,%eax
10dec9: 83 f9 01 cmp $0x1,%ecx
10decc: 75 08 jne 10ded6 <rtems_filesystem_eval_path_generic+0x5e>
10dece: 31 c0 xor %eax,%eax
10ded0: 80 3a 2e cmpb $0x2e,(%edx)
10ded3: 0f 94 c0 sete %al
if (rtems_filesystem_is_current_directory(token, tokenlen)) {
10ded6: 85 c0 test %eax,%eax
10ded8: 74 1f je 10def9 <rtems_filesystem_eval_path_generic+0x81>
if (rtems_filesystem_eval_path_has_path(ctx)) {
10deda: 83 7b 04 00 cmpl $0x0,0x4(%ebx)
10dede: 74 05 je 10dee5 <rtems_filesystem_eval_path_generic+0x6d>
10dee0: e9 93 00 00 00 jmp 10df78 <rtems_filesystem_eval_path_generic+0x100>
status = (*config->eval_token)(ctx, arg, ".", 1);
} else {
int eval_flags = rtems_filesystem_eval_path_get_flags(ctx);
if ((eval_flags & RTEMS_FS_REJECT_TERMINAL_DOT) == 0) {
10dee5: f6 43 11 01 testb $0x1,0x11(%ebx)
10dee9: 75 05 jne 10def0 <rtems_filesystem_eval_path_generic+0x78>
10deeb: e9 88 00 00 00 jmp 10df78 <rtems_filesystem_eval_path_generic+0x100>
status = (*config->eval_token)(ctx, arg, ".", 1);
} else {
rtems_filesystem_eval_path_error(ctx, EINVAL);
10def0: 50 push %eax
10def1: 50 push %eax
10def2: 6a 16 push $0x16
10def4: e9 c8 00 00 00 jmp 10dfc1 <rtems_filesystem_eval_path_generic+0x149>
static inline bool rtems_filesystem_is_parent_directory(
const char *token,
size_t tokenlen
)
{
return tokenlen == 2 && token [0] == '.' && token [1] == '.';
10def9: 31 c0 xor %eax,%eax
10defb: 83 f9 02 cmp $0x2,%ecx
10defe: 75 0e jne 10df0e <rtems_filesystem_eval_path_generic+0x96>
10df00: 80 3a 2e cmpb $0x2e,(%edx)
10df03: 75 09 jne 10df0e <rtems_filesystem_eval_path_generic+0x96>
10df05: 31 c0 xor %eax,%eax
10df07: 80 7a 01 2e cmpb $0x2e,0x1(%edx)
10df0b: 0f 94 c0 sete %al
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_DONE;
}
}
} else if (rtems_filesystem_is_parent_directory(token, tokenlen)) {
10df0e: 85 c0 test %eax,%eax
10df10: 74 78 je 10df8a <rtems_filesystem_eval_path_generic+0x112>
}
} else {
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_DONE;
}
}
}
10df12: 8b 53 30 mov 0x30(%ebx),%edx
static bool is_eval_path_root(
const rtems_filesystem_eval_path_context_t *ctx,
const rtems_filesystem_location_info_t *loc
)
{
const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry;
10df15: 8b 4b 2c mov 0x2c(%ebx),%ecx
const rtems_filesystem_location_info_t *rootloc = &ctx->rootloc->location;
return mt_entry == rootloc->mt_entry
&& (*mt_entry->ops->are_nodes_equal_h)( loc, rootloc );
10df18: 31 c0 xor %eax,%eax
10df1a: 3b 4a 14 cmp 0x14(%edx),%ecx
10df1d: 75 12 jne 10df31 <rtems_filesystem_eval_path_generic+0xb9>
10df1f: 50 push %eax
10df20: 50 push %eax
10df21: 8b 41 0c mov 0xc(%ecx),%eax
10df24: 52 push %edx
10df25: ff 75 e4 pushl -0x1c(%ebp)
10df28: ff 50 10 call *0x10(%eax)
10df2b: 0f b6 c0 movzbl %al,%eax
10df2e: 83 c4 10 add $0x10,%esp
}
} else if (rtems_filesystem_is_parent_directory(token, tokenlen)) {
rtems_filesystem_location_info_t *currentloc =
rtems_filesystem_eval_path_get_currentloc( ctx );
if (is_eval_path_root(ctx, currentloc)) {
10df31: a8 01 test $0x1,%al
10df33: 74 02 je 10df37 <rtems_filesystem_eval_path_generic+0xbf>
10df35: eb 41 jmp 10df78 <rtems_filesystem_eval_path_generic+0x100>
#include <rtems/libio_.h>
static bool is_fs_root( const rtems_filesystem_location_info_t *loc )
{
const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry;
10df37: 8b 43 2c mov 0x2c(%ebx),%eax
const rtems_filesystem_location_info_t *mt_fs_root =
&mt_entry->mt_fs_root->location;
return (*mt_entry->ops->are_nodes_equal_h)( loc, mt_fs_root );
10df3a: 52 push %edx
10df3b: 52 push %edx
10df3c: 8b 50 0c mov 0xc(%eax),%edx
10df3f: ff 70 24 pushl 0x24(%eax)
10df42: ff 75 e4 pushl -0x1c(%ebp)
10df45: ff 52 10 call *0x10(%edx)
rtems_filesystem_eval_path_get_currentloc( ctx );
if (is_eval_path_root(ctx, currentloc)) {
/* This prevents the escape from a chroot() environment */
status = (*config->eval_token)(ctx, arg, ".", 1);
} else if (is_fs_root(currentloc)) {
10df48: 83 c4 10 add $0x10,%esp
10df4b: 84 c0 test %al,%al
10df4d: 74 32 je 10df81 <rtems_filesystem_eval_path_generic+0x109>
if (currentloc->mt_entry->mt_point_node != NULL) {
10df4f: 8b 43 2c mov 0x2c(%ebx),%eax
10df52: 83 78 20 00 cmpl $0x0,0x20(%eax)
10df56: 74 20 je 10df78 <rtems_filesystem_eval_path_generic+0x100><== NEVER TAKEN
static inline void rtems_filesystem_eval_path_put_back_token(
rtems_filesystem_eval_path_context_t *ctx
)
{
size_t tokenlen = ctx->tokenlen;
10df58: 8b 53 0c mov 0xc(%ebx),%edx
ctx->path -= tokenlen;
10df5b: 29 13 sub %edx,(%ebx)
ctx->pathlen += tokenlen;
10df5d: 01 53 04 add %edx,0x4(%ebx)
ctx->tokenlen = 0;
10df60: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
rtems_filesystem_eval_path_put_back_token(ctx);
rtems_filesystem_eval_path_restart(
10df67: 51 push %ecx
10df68: 51 push %ecx
10df69: 83 c0 20 add $0x20,%eax
10df6c: 50 push %eax
10df6d: 53 push %ebx
10df6e: e8 84 99 ff ff call 1078f7 <rtems_filesystem_eval_path_restart>
10df73: 83 c4 10 add $0x10,%esp
10df76: eb 59 jmp 10dfd1 <rtems_filesystem_eval_path_generic+0x159>
¤tloc->mt_entry->mt_point_node
);
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_DONE;
} else {
/* This is the root file system */
status = (*config->eval_token)(ctx, arg, ".", 1);
10df78: 6a 01 push $0x1
10df7a: 68 71 ff 11 00 push $0x11ff71
10df7f: eb 0b jmp 10df8c <rtems_filesystem_eval_path_generic+0x114>
}
} else {
status = (*config->eval_token)(ctx, arg, "..", 2);
10df81: 6a 02 push $0x2
10df83: 68 70 ff 11 00 push $0x11ff70
10df88: eb 02 jmp 10df8c <rtems_filesystem_eval_path_generic+0x114>
}
} else {
status = (*config->eval_token)(ctx, arg, token, tokenlen);
10df8a: 51 push %ecx
10df8b: 52 push %edx
10df8c: 56 push %esi
10df8d: 53 push %ebx
10df8e: ff 57 04 call *0x4(%edi)
10df91: 83 c4 10 add $0x10,%esp
}
if (status == RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY) {
10df94: 83 f8 02 cmp $0x2,%eax
10df97: 75 30 jne 10dfc9 <rtems_filesystem_eval_path_generic+0x151>
if (rtems_filesystem_eval_path_has_path(ctx)) {
10df99: 83 7b 04 00 cmpl $0x0,0x4(%ebx)
10df9d: 74 32 je 10dfd1 <rtems_filesystem_eval_path_generic+0x159>
int eval_flags;
rtems_filesystem_eval_path_eat_delimiter(ctx);
10df9f: 83 ec 0c sub $0xc,%esp
10dfa2: 53 push %ebx
10dfa3: e8 34 00 00 00 call 10dfdc <rtems_filesystem_eval_path_eat_delimiter>
eval_flags = rtems_filesystem_eval_path_get_flags(ctx);
if (
10dfa8: 83 c4 10 add $0x10,%esp
10dfab: f6 43 10 80 testb $0x80,0x10(%ebx)
10dfaf: 74 06 je 10dfb7 <rtems_filesystem_eval_path_generic+0x13f>
(eval_flags & RTEMS_FS_ACCEPT_RESIDUAL_DELIMITERS) == 0
|| rtems_filesystem_eval_path_has_path(ctx)
10dfb1: 83 7b 04 00 cmpl $0x0,0x4(%ebx)
10dfb5: 74 1a je 10dfd1 <rtems_filesystem_eval_path_generic+0x159>
) {
rtems_filesystem_eval_path_error(ctx, ENOENT);
10dfb7: 52 push %edx
10dfb8: 52 push %edx
10dfb9: 6a 02 push $0x2
10dfbb: eb 04 jmp 10dfc1 <rtems_filesystem_eval_path_generic+0x149>
}
}
}
} else {
rtems_filesystem_eval_path_error(ctx, ENOTDIR);
10dfbd: 50 push %eax
10dfbe: 50 push %eax
10dfbf: 6a 14 push $0x14
10dfc1: 53 push %ebx
10dfc2: e8 f7 95 ff ff call 1075be <rtems_filesystem_eval_path_error>
10dfc7: eb aa jmp 10df73 <rtems_filesystem_eval_path_generic+0xfb>
)
{
rtems_filesystem_eval_path_generic_status status =
RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_CONTINUE;
while (status == RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_CONTINUE) {
10dfc9: 85 c0 test %eax,%eax
10dfcb: 0f 84 bf fe ff ff je 10de90 <rtems_filesystem_eval_path_generic+0x18>
}
} else {
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_DONE;
}
}
}
10dfd1: 8d 65 f4 lea -0xc(%ebp),%esp
10dfd4: 5b pop %ebx
10dfd5: 5e pop %esi
10dfd6: 5f pop %edi
10dfd7: 5d pop %ebp
10dfd8: c3 ret
0010e00b <rtems_filesystem_eval_path_next_token>:
}
void rtems_filesystem_eval_path_next_token(
rtems_filesystem_eval_path_context_t *ctx
)
{
10e00b: 55 push %ebp
10e00c: 89 e5 mov %esp,%ebp
10e00e: 56 push %esi
10e00f: 53 push %ebx
10e010: 8b 5d 08 mov 0x8(%ebp),%ebx
rtems_filesystem_eval_path_eat_delimiter(ctx);
10e013: 53 push %ebx
10e014: e8 c3 ff ff ff call 10dfdc <rtems_filesystem_eval_path_eat_delimiter>
ctx->pathlen = (size_t) (end - current);
}
static void next_token(rtems_filesystem_eval_path_context_t *ctx)
{
const char *begin = ctx->path;
10e019: 8b 13 mov (%ebx),%edx
const char *end = begin + ctx->pathlen;
10e01b: 8b 73 04 mov 0x4(%ebx),%esi
10e01e: 01 d6 add %edx,%esi
10e020: 58 pop %eax
const char *current = begin;
10e021: 89 d0 mov %edx,%eax
10e023: eb 01 jmp 10e026 <rtems_filesystem_eval_path_next_token+0x1b>
while (current != end && !rtems_filesystem_is_delimiter(*current)) {
++current;
10e025: 40 inc %eax
{
const char *begin = ctx->path;
const char *end = begin + ctx->pathlen;
const char *current = begin;
while (current != end && !rtems_filesystem_is_delimiter(*current)) {
10e026: 39 f0 cmp %esi,%eax
10e028: 75 11 jne 10e03b <rtems_filesystem_eval_path_next_token+0x30>
++current;
}
ctx->path = current;
10e02a: 89 03 mov %eax,(%ebx)
ctx->pathlen = (size_t) (end - current);
10e02c: 29 c6 sub %eax,%esi
10e02e: 89 73 04 mov %esi,0x4(%ebx)
ctx->token = begin;
10e031: 89 53 08 mov %edx,0x8(%ebx)
ctx->tokenlen = (size_t) (current - begin);
10e034: 29 d0 sub %edx,%eax
10e036: 89 43 0c mov %eax,0xc(%ebx)
10e039: eb 0e jmp 10e049 <rtems_filesystem_eval_path_next_token+0x3e>
{
const char *begin = ctx->path;
const char *end = begin + ctx->pathlen;
const char *current = begin;
while (current != end && !rtems_filesystem_is_delimiter(*current)) {
10e03b: 8a 08 mov (%eax),%cl
10e03d: 80 f9 5c cmp $0x5c,%cl
10e040: 74 e8 je 10e02a <rtems_filesystem_eval_path_next_token+0x1f><== NEVER TAKEN
10e042: 80 f9 2f cmp $0x2f,%cl
10e045: 75 de jne 10e025 <rtems_filesystem_eval_path_next_token+0x1a>
10e047: eb e1 jmp 10e02a <rtems_filesystem_eval_path_next_token+0x1f>
rtems_filesystem_eval_path_context_t *ctx
)
{
rtems_filesystem_eval_path_eat_delimiter(ctx);
next_token(ctx);
}
10e049: 8d 65 f8 lea -0x8(%ebp),%esp
10e04c: 5b pop %ebx
10e04d: 5e pop %esi
10e04e: 5d pop %ebp
10e04f: c3 ret
0010795a <rtems_filesystem_eval_path_recursive>:
void rtems_filesystem_eval_path_recursive(
rtems_filesystem_eval_path_context_t *ctx,
const char *path,
size_t pathlen
)
{
10795a: 55 push %ebp
10795b: 89 e5 mov %esp,%ebp
10795d: 57 push %edi
10795e: 56 push %esi
10795f: 53 push %ebx
107960: 83 ec 1c sub $0x1c,%esp
107963: 8b 5d 08 mov 0x8(%ebp),%ebx
107966: 8b 4d 0c mov 0xc(%ebp),%ecx
107969: 8b 55 10 mov 0x10(%ebp),%edx
if (pathlen > 0) {
10796c: 85 d2 test %edx,%edx
10796e: 74 63 je 1079d3 <rtems_filesystem_eval_path_recursive+0x79><== NEVER TAKEN
if (ctx->recursionlevel < RTEMS_FILESYSTEM_SYMLOOP_MAX) {
107970: 83 7b 14 1f cmpl $0x1f,0x14(%ebx)
107974: 7f 54 jg 1079ca <rtems_filesystem_eval_path_recursive+0x70>
const char *saved_path = ctx->path;
107976: 8b 3b mov (%ebx),%edi
size_t saved_pathlen = ctx->pathlen;
107978: 8b 73 04 mov 0x4(%ebx),%esi
if (rtems_filesystem_is_delimiter(path [0])) {
10797b: 8a 01 mov (%ecx),%al
10797d: 3c 5c cmp $0x5c,%al
10797f: 74 04 je 107985 <rtems_filesystem_eval_path_recursive+0x2b><== NEVER TAKEN
107981: 3c 2f cmp $0x2f,%al
107983: 75 1b jne 1079a0 <rtems_filesystem_eval_path_recursive+0x46>
rtems_filesystem_eval_path_restart(ctx, &ctx->rootloc);
107985: 50 push %eax
107986: 50 push %eax
107987: 8d 43 30 lea 0x30(%ebx),%eax
10798a: 50 push %eax
10798b: 53 push %ebx
10798c: 89 55 e0 mov %edx,-0x20(%ebp)
10798f: 89 4d e4 mov %ecx,-0x1c(%ebp)
107992: e8 60 ff ff ff call 1078f7 <rtems_filesystem_eval_path_restart>
107997: 83 c4 10 add $0x10,%esp
10799a: 8b 4d e4 mov -0x1c(%ebp),%ecx
10799d: 8b 55 e0 mov -0x20(%ebp),%edx
}
ctx->path = path;
1079a0: 89 0b mov %ecx,(%ebx)
ctx->pathlen = pathlen;
1079a2: 89 53 04 mov %edx,0x4(%ebx)
++ctx->recursionlevel;
1079a5: ff 43 14 incl 0x14(%ebx)
while (ctx->pathlen > 0) {
1079a8: eb 10 jmp 1079ba <rtems_filesystem_eval_path_recursive+0x60>
(*ctx->currentloc.mt_entry->ops->eval_path_h)(ctx);
1079aa: 83 ec 0c sub $0xc,%esp
1079ad: 8b 43 2c mov 0x2c(%ebx),%eax
1079b0: 8b 40 0c mov 0xc(%eax),%eax
1079b3: 53 push %ebx
1079b4: ff 50 08 call *0x8(%eax)
1079b7: 83 c4 10 add $0x10,%esp
ctx->path = path;
ctx->pathlen = pathlen;
++ctx->recursionlevel;
while (ctx->pathlen > 0) {
1079ba: 83 7b 04 00 cmpl $0x0,0x4(%ebx)
1079be: 75 ea jne 1079aa <rtems_filesystem_eval_path_recursive+0x50>
(*ctx->currentloc.mt_entry->ops->eval_path_h)(ctx);
}
--ctx->recursionlevel;
1079c0: ff 4b 14 decl 0x14(%ebx)
ctx->path = saved_path;
1079c3: 89 3b mov %edi,(%ebx)
ctx->pathlen = saved_pathlen;
1079c5: 89 73 04 mov %esi,0x4(%ebx)
1079c8: eb 1f jmp 1079e9 <rtems_filesystem_eval_path_recursive+0x8f>
} else {
rtems_filesystem_eval_path_error(ctx, ELOOP);
1079ca: c7 45 0c 5c 00 00 00 movl $0x5c,0xc(%ebp)
1079d1: eb 07 jmp 1079da <rtems_filesystem_eval_path_recursive+0x80>
}
} else {
rtems_filesystem_eval_path_error(ctx, ENOENT);
1079d3: c7 45 0c 02 00 00 00 movl $0x2,0xc(%ebp) <== NOT EXECUTED
1079da: 89 5d 08 mov %ebx,0x8(%ebp)
}
}
1079dd: 8d 65 f4 lea -0xc(%ebp),%esp
1079e0: 5b pop %ebx
1079e1: 5e pop %esi
1079e2: 5f pop %edi
1079e3: 5d pop %ebp
ctx->pathlen = saved_pathlen;
} else {
rtems_filesystem_eval_path_error(ctx, ELOOP);
}
} else {
rtems_filesystem_eval_path_error(ctx, ENOENT);
1079e4: e9 d5 fb ff ff jmp 1075be <rtems_filesystem_eval_path_error>
}
}
1079e9: 8d 65 f4 lea -0xc(%ebp),%esp
1079ec: 5b pop %ebx
1079ed: 5e pop %esi
1079ee: 5f pop %edi
1079ef: 5d pop %ebp
1079f0: c3 ret
00107805 <rtems_filesystem_eval_path_start_with_parent>:
const char *path,
int eval_flags,
rtems_filesystem_location_info_t *parentloc,
int parent_eval_flags
)
{
107805: 55 push %ebp
107806: 89 e5 mov %esp,%ebp
107808: 57 push %edi
107809: 56 push %esi
10780a: 53 push %ebx
10780b: 83 ec 0c sub $0xc,%esp
10780e: 8b 5d 08 mov 0x8(%ebp),%ebx
107811: 8b 55 0c mov 0xc(%ebp),%edx
size_t pathlen = strlen(path);
107814: 31 c0 xor %eax,%eax
107816: 83 c9 ff or $0xffffffff,%ecx
107819: 89 d7 mov %edx,%edi
10781b: f2 ae repnz scas %es:(%edi),%al
10781d: f7 d1 not %ecx
10781f: 8d 79 ff lea -0x1(%ecx),%edi
107822: 89 f9 mov %edi,%ecx
107824: eb 11 jmp 107837 <rtems_filesystem_eval_path_start_with_parent+0x32>
#include <rtems/libio_.h>
static size_t get_parentpathlen(const char *path, size_t pathlen)
{
while (pathlen > 0) {
size_t i = pathlen - 1;
107826: 8d 71 ff lea -0x1(%ecx),%esi
if (rtems_filesystem_is_delimiter(path [i])) {
107829: 8a 44 0a ff mov -0x1(%edx,%ecx,1),%al
10782d: 3c 5c cmp $0x5c,%al
10782f: 74 60 je 107891 <rtems_filesystem_eval_path_start_with_parent+0x8c><== NEVER TAKEN
107831: 3c 2f cmp $0x2f,%al
107833: 74 5c je 107891 <rtems_filesystem_eval_path_start_with_parent+0x8c>
return pathlen;
}
pathlen = i;
107835: 89 f1 mov %esi,%ecx
#include <rtems/libio_.h>
static size_t get_parentpathlen(const char *path, size_t pathlen)
{
while (pathlen > 0) {
107837: 85 c9 test %ecx,%ecx
107839: 75 eb jne 107826 <rtems_filesystem_eval_path_start_with_parent+0x21>
size_t parentpathlen = get_parentpathlen(path, pathlen);
const char *name = NULL;
size_t namelen = 0;
const rtems_filesystem_location_info_t *currentloc = NULL;
if (pathlen > 0) {
10783b: 85 ff test %edi,%edi
10783d: 74 12 je 107851 <rtems_filesystem_eval_path_start_with_parent+0x4c>
if (parentpathlen == 0) {
parentpath = ".";
parentpathlen = 1;
name = path;
10783f: 89 d6 mov %edx,%esi
const rtems_filesystem_location_info_t *currentloc = NULL;
if (pathlen > 0) {
if (parentpathlen == 0) {
parentpath = ".";
parentpathlen = 1;
107841: b1 01 mov $0x1,%cl
size_t namelen = 0;
const rtems_filesystem_location_info_t *currentloc = NULL;
if (pathlen > 0) {
if (parentpathlen == 0) {
parentpath = ".";
107843: ba 71 ff 11 00 mov $0x11ff71,%edx
107848: eb 0d jmp 107857 <rtems_filesystem_eval_path_start_with_parent+0x52>
parentpathlen = 1;
name = path;
namelen = pathlen;
} else {
name = path + parentpathlen;
10784a: 8d 34 0a lea (%edx,%ecx,1),%esi
namelen = pathlen - parentpathlen;
10784d: 29 cf sub %ecx,%edi
10784f: eb 06 jmp 107857 <rtems_filesystem_eval_path_start_with_parent+0x52>
{
size_t pathlen = strlen(path);
const char *parentpath = path;
size_t parentpathlen = get_parentpathlen(path, pathlen);
const char *name = NULL;
size_t namelen = 0;
107851: 31 ff xor %edi,%edi
)
{
size_t pathlen = strlen(path);
const char *parentpath = path;
size_t parentpathlen = get_parentpathlen(path, pathlen);
const char *name = NULL;
107853: 31 f6 xor %esi,%esi
}
pathlen = i;
}
return 0;
107855: 31 c9 xor %ecx,%ecx
ctx,
parentpath,
parentpathlen,
parent_eval_flags,
&rtems_filesystem_root,
&rtems_filesystem_current
107857: a1 14 c1 12 00 mov 0x12c114,%eax
name = path + parentpathlen;
namelen = pathlen - parentpathlen;
}
}
currentloc = eval_path_start(
10785c: 83 ec 04 sub $0x4,%esp
10785f: 50 push %eax
ctx,
parentpath,
parentpathlen,
parent_eval_flags,
&rtems_filesystem_root,
107860: 83 c0 04 add $0x4,%eax
name = path + parentpathlen;
namelen = pathlen - parentpathlen;
}
}
currentloc = eval_path_start(
107863: 50 push %eax
107864: ff 75 18 pushl 0x18(%ebp)
107867: 89 d8 mov %ebx,%eax
107869: e8 79 fe ff ff call 1076e7 <eval_path_start>
parent_eval_flags,
&rtems_filesystem_root,
&rtems_filesystem_current
);
rtems_filesystem_location_clone(parentloc, currentloc);
10786e: 5a pop %edx
10786f: 59 pop %ecx
107870: 50 push %eax
107871: ff 75 14 pushl 0x14(%ebp)
107874: e8 cf 60 00 00 call 10d948 <rtems_filesystem_location_clone>
ctx->path = name;
107879: 89 33 mov %esi,(%ebx)
ctx->pathlen = namelen;
10787b: 89 7b 04 mov %edi,0x4(%ebx)
ctx->flags = eval_flags;
10787e: 8b 45 10 mov 0x10(%ebp),%eax
107881: 89 43 10 mov %eax,0x10(%ebx)
rtems_filesystem_eval_path_continue(ctx);
107884: 89 1c 24 mov %ebx,(%esp)
107887: e8 ff fd ff ff call 10768b <rtems_filesystem_eval_path_continue>
return &ctx->currentloc;
10788c: 8d 43 18 lea 0x18(%ebx),%eax
10788f: eb 08 jmp 107899 <rtems_filesystem_eval_path_start_with_parent+0x94>
)
{
size_t pathlen = strlen(path);
const char *parentpath = path;
size_t parentpathlen = get_parentpathlen(path, pathlen);
const char *name = NULL;
107891: 31 f6 xor %esi,%esi
size_t namelen = 0;
const rtems_filesystem_location_info_t *currentloc = NULL;
if (pathlen > 0) {
107893: 85 ff test %edi,%edi
107895: 74 c0 je 107857 <rtems_filesystem_eval_path_start_with_parent+0x52><== NEVER TAKEN
107897: eb b1 jmp 10784a <rtems_filesystem_eval_path_start_with_parent+0x45>
ctx->flags = eval_flags;
rtems_filesystem_eval_path_continue(ctx);
return &ctx->currentloc;
}
107899: 8d 65 f4 lea -0xc(%ebp),%esp
10789c: 5b pop %ebx
10789d: 5e pop %esi
10789e: 5f pop %edi
10789f: 5d pop %ebp
1078a0: c3 ret
0010dc8f <rtems_filesystem_get_mount_handler>:
rtems_filesystem_fsmount_me_t
rtems_filesystem_get_mount_handler(
const char *type
)
{
10dc8f: 55 push %ebp
10dc90: 89 e5 mov %esp,%ebp
10dc92: 83 ec 18 sub $0x18,%esp
10dc95: 8b 45 08 mov 0x8(%ebp),%eax
find_arg fa = {
10dc98: 89 45 f0 mov %eax,-0x10(%ebp)
10dc9b: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
.type = type,
.mount_h = NULL
};
if ( type != NULL ) {
10dca2: 85 c0 test %eax,%eax
10dca4: 74 13 je 10dcb9 <rtems_filesystem_get_mount_handler+0x2a><== NEVER TAKEN
rtems_filesystem_iterate( find_handler, &fa );
10dca6: 50 push %eax
10dca7: 50 push %eax
10dca8: 8d 45 f0 lea -0x10(%ebp),%eax
10dcab: 50 push %eax
10dcac: 68 b8 db 10 00 push $0x10dbb8
10dcb1: e8 62 ff ff ff call 10dc18 <rtems_filesystem_iterate>
10dcb6: 83 c4 10 add $0x10,%esp
}
return fa.mount_h;
}
10dcb9: 8b 45 f4 mov -0xc(%ebp),%eax
10dcbc: c9 leave
10dcbd: c3 ret
001064c8 <rtems_filesystem_initialize>:
* configuration is a single instantiation of the IMFS or miniIMFS with
* a single "/dev" directory in it.
*/
void rtems_filesystem_initialize( void )
{
1064c8: 55 push %ebp
1064c9: 89 e5 mov %esp,%ebp
1064cb: 83 ec 14 sub $0x14,%esp
int rv = 0;
const rtems_filesystem_mount_configuration *root_config =
&rtems_filesystem_root_configuration;
rv = mount(
1064ce: ff 35 94 df 11 00 pushl 0x11df94
1064d4: ff 35 90 df 11 00 pushl 0x11df90
1064da: ff 35 8c df 11 00 pushl 0x11df8c
1064e0: ff 35 88 df 11 00 pushl 0x11df88
1064e6: ff 35 84 df 11 00 pushl 0x11df84
1064ec: e8 bb 06 00 00 call 106bac <mount>
root_config->target,
root_config->filesystemtype,
root_config->options,
root_config->data
);
if ( rv != 0 )
1064f1: 83 c4 20 add $0x20,%esp
1064f4: 85 c0 test %eax,%eax
1064f6: 74 0a je 106502 <rtems_filesystem_initialize+0x3a><== ALWAYS TAKEN
rtems_fatal_error_occurred( 0xABCD0002 );
1064f8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1064fb: 68 02 00 cd ab push $0xabcd0002 <== NOT EXECUTED
106500: eb 20 jmp 106522 <rtems_filesystem_initialize+0x5a><== NOT EXECUTED
*
* NOTE: UNIX root is 755 and owned by root/root (0/0). It is actually
* created that way by the IMFS.
*/
rv = mkdir( "/dev", 0777);
106502: 50 push %eax
106503: 50 push %eax
106504: 68 ff 01 00 00 push $0x1ff
106509: 68 ac f3 11 00 push $0x11f3ac
10650e: e8 81 05 00 00 call 106a94 <mkdir>
if ( rv != 0 )
106513: 83 c4 10 add $0x10,%esp
106516: 85 c0 test %eax,%eax
106518: 74 0d je 106527 <rtems_filesystem_initialize+0x5f><== ALWAYS TAKEN
rtems_fatal_error_occurred( 0xABCD0003 );
10651a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10651d: 68 03 00 cd ab push $0xabcd0003 <== NOT EXECUTED
106522: e8 8d 3e 00 00 call 10a3b4 <rtems_fatal_error_occurred><== NOT EXECUTED
* it will be mounted onto is created. Moreover, if it is going to
* use a device, then it is REALLY unfair to attempt this
* before device drivers are initialized. So we return via a base
* filesystem image and nothing auto-mounted at this point.
*/
}
106527: c9 leave
106528: c3 ret
0010dc18 <rtems_filesystem_iterate>:
bool rtems_filesystem_iterate(
rtems_per_filesystem_routine routine,
void *routine_arg
)
{
10dc18: 55 push %ebp
10dc19: 89 e5 mov %esp,%ebp
10dc1b: 57 push %edi
10dc1c: 56 push %esi
10dc1d: 53 push %ebx
10dc1e: 83 ec 1c sub $0x1c,%esp
10dc21: 8b 5d 08 mov 0x8(%ebp),%ebx
10dc24: 8b 75 0c mov 0xc(%ebp),%esi
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
10dc27: 31 c0 xor %eax,%eax
bool rtems_filesystem_iterate(
rtems_per_filesystem_routine routine,
void *routine_arg
)
{
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
10dc29: bf 98 df 11 00 mov $0x11df98,%edi
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
10dc2e: eb 0c jmp 10dc3c <rtems_filesystem_iterate+0x24>
stop = (*routine)( table_entry, routine_arg );
10dc30: 51 push %ecx
10dc31: 51 push %ecx
10dc32: 56 push %esi
10dc33: 57 push %edi
10dc34: ff d3 call *%ebx
++table_entry;
10dc36: 83 c7 08 add $0x8,%edi
10dc39: 83 c4 10 add $0x10,%esp
{
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
10dc3c: 83 3f 00 cmpl $0x0,(%edi)
10dc3f: 74 06 je 10dc47 <rtems_filesystem_iterate+0x2f>
10dc41: 84 c0 test %al,%al
10dc43: 74 eb je 10dc30 <rtems_filesystem_iterate+0x18>
10dc45: eb 40 jmp 10dc87 <rtems_filesystem_iterate+0x6f>
stop = (*routine)( table_entry, routine_arg );
++table_entry;
}
if ( !stop ) {
10dc47: 84 c0 test %al,%al
10dc49: 75 3c jne 10dc87 <rtems_filesystem_iterate+0x6f>
rtems_libio_lock();
10dc4b: 88 45 e4 mov %al,-0x1c(%ebp)
10dc4e: e8 95 ff ff ff call 10dbe8 <rtems_libio_lock>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
10dc53: 8b 3d b0 c1 12 00 mov 0x12c1b0,%edi
for (
10dc59: 8a 45 e4 mov -0x1c(%ebp),%al
10dc5c: eb 0e jmp 10dc6c <rtems_filesystem_iterate+0x54>
!rtems_chain_is_tail( &filesystem_chain, node ) && !stop;
node = rtems_chain_next( node )
) {
const filesystem_node *fsn = (filesystem_node *) node;
stop = (*routine)( &fsn->entry, routine_arg );
10dc5e: 52 push %edx
10dc5f: 52 push %edx
10dc60: 56 push %esi
10dc61: 8d 47 08 lea 0x8(%edi),%eax
10dc64: 50 push %eax
10dc65: ff d3 call *%ebx
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
}
10dc67: 8b 3f mov (%edi),%edi
10dc69: 83 c4 10 add $0x10,%esp
++table_entry;
}
if ( !stop ) {
rtems_libio_lock();
for (
10dc6c: 81 ff b4 c1 12 00 cmp $0x12c1b4,%edi
10dc72: 75 0d jne 10dc81 <rtems_filesystem_iterate+0x69>
) {
const filesystem_node *fsn = (filesystem_node *) node;
stop = (*routine)( &fsn->entry, routine_arg );
}
rtems_libio_unlock();
10dc74: 88 45 e4 mov %al,-0x1c(%ebp)
10dc77: e8 86 ff ff ff call 10dc02 <rtems_libio_unlock>
10dc7c: 8a 45 e4 mov -0x1c(%ebp),%al
10dc7f: eb 06 jmp 10dc87 <rtems_filesystem_iterate+0x6f>
if ( !stop ) {
rtems_libio_lock();
for (
node = rtems_chain_first( &filesystem_chain );
!rtems_chain_is_tail( &filesystem_chain, node ) && !stop;
10dc81: 84 c0 test %al,%al
10dc83: 74 d9 je 10dc5e <rtems_filesystem_iterate+0x46><== ALWAYS TAKEN
10dc85: eb ed jmp 10dc74 <rtems_filesystem_iterate+0x5c><== NOT EXECUTED
}
rtems_libio_unlock();
}
return stop;
}
10dc87: 8d 65 f4 lea -0xc(%ebp),%esp
10dc8a: 5b pop %ebx
10dc8b: 5e pop %esi
10dc8c: 5f pop %edi
10dc8d: 5d pop %ebp
10dc8e: c3 ret
00107b0a <rtems_filesystem_location_remove_from_mt_entry>:
}
void rtems_filesystem_location_remove_from_mt_entry(
rtems_filesystem_location_info_t *loc
)
{
107b0a: 55 push %ebp
107b0b: 89 e5 mov %esp,%ebp
107b0d: 56 push %esi
107b0e: 53 push %ebx
107b0f: 8b 5d 08 mov 0x8(%ebp),%ebx
rtems_filesystem_mt_entry_declare_lock_context(lock_context);
bool do_unmount;
rtems_filesystem_mt_entry_lock(lock_context);
107b12: 9c pushf
107b13: fa cli
107b14: 5e pop %esi
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
107b15: 8b 13 mov (%ebx),%edx
previous = the_node->previous;
107b17: 8b 43 04 mov 0x4(%ebx),%eax
next->previous = previous;
107b1a: 89 42 04 mov %eax,0x4(%edx)
previous->next = next;
107b1d: 89 10 mov %edx,(%eax)
rtems_chain_extract_unprotected(&loc->mt_entry_node);
do_unmount = rtems_filesystem_is_ready_for_unmount(loc->mt_entry);
107b1f: 8b 43 14 mov 0x14(%ebx),%eax
107b22: e8 cd fe ff ff call 1079f4 <rtems_filesystem_is_ready_for_unmount>
rtems_filesystem_mt_entry_unlock(lock_context);
107b27: 56 push %esi
107b28: 9d popf
if (do_unmount) {
107b29: 84 c0 test %al,%al
107b2b: 74 0e je 107b3b <rtems_filesystem_location_remove_from_mt_entry+0x31><== ALWAYS TAKEN
rtems_filesystem_do_unmount(loc->mt_entry);
107b2d: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED
107b30: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED
}
}
107b33: 5b pop %ebx <== NOT EXECUTED
107b34: 5e pop %esi <== NOT EXECUTED
107b35: 5d pop %ebp <== NOT EXECUTED
rtems_chain_extract_unprotected(&loc->mt_entry_node);
do_unmount = rtems_filesystem_is_ready_for_unmount(loc->mt_entry);
rtems_filesystem_mt_entry_unlock(lock_context);
if (do_unmount) {
rtems_filesystem_do_unmount(loc->mt_entry);
107b36: e9 5a ff ff ff jmp 107a95 <rtems_filesystem_do_unmount><== NOT EXECUTED
}
}
107b3b: 5b pop %ebx
107b3c: 5e pop %esi
107b3d: 5d pop %ebp
107b3e: c3 ret
00107cb2 <rtems_filesystem_location_transform_to_global>:
}
rtems_filesystem_global_location_t *rtems_filesystem_location_transform_to_global(
rtems_filesystem_location_info_t *loc
)
{
107cb2: 55 push %ebp
107cb3: 89 e5 mov %esp,%ebp
107cb5: 56 push %esi
107cb6: 53 push %ebx
107cb7: 83 ec 1c sub $0x1c,%esp
107cba: 8b 75 08 mov 0x8(%ebp),%esi
rtems_filesystem_global_location_t *global_loc = malloc(sizeof(*global_loc));
107cbd: 6a 24 push $0x24
107cbf: e8 30 ed ff ff call 1069f4 <malloc>
107cc4: 89 c3 mov %eax,%ebx
if (global_loc != NULL) {
107cc6: 83 c4 10 add $0x10,%esp
107cc9: 85 c0 test %eax,%eax
107ccb: 74 28 je 107cf5 <rtems_filesystem_location_transform_to_global+0x43><== NEVER TAKEN
global_loc->reference_count = 1;
107ccd: c7 40 18 01 00 00 00 movl $0x1,0x18(%eax)
global_loc->deferred_released_next = NULL;
107cd4: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax)
global_loc->deferred_released_count = 0;
107cdb: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax)
rtems_filesystem_location_copy(&global_loc->location, loc);
107ce2: 50 push %eax
107ce3: 50 push %eax
107ce4: 56 push %esi
107ce5: 53 push %ebx
107ce6: e8 46 fd ff ff call 107a31 <rtems_filesystem_location_copy>
rtems_filesystem_location_remove_from_mt_entry(loc);
107ceb: 89 34 24 mov %esi,(%esp)
107cee: e8 17 fe ff ff call 107b0a <rtems_filesystem_location_remove_from_mt_entry>
107cf3: eb 28 jmp 107d1d <rtems_filesystem_location_transform_to_global+0x6b>
} else {
rtems_filesystem_location_free(loc);
107cf5: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107cf8: 56 push %esi <== NOT EXECUTED
107cf9: e8 96 5c 00 00 call 10d994 <rtems_filesystem_location_free><== NOT EXECUTED
);
static inline rtems_filesystem_global_location_t *
rtems_filesystem_global_location_obtain_null(void)
{
rtems_filesystem_global_location_t *global_loc = NULL;
107cfe: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) <== NOT EXECUTED
return rtems_filesystem_global_location_obtain( &global_loc );
107d05: 8d 45 f4 lea -0xc(%ebp),%eax <== NOT EXECUTED
107d08: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
107d0b: e8 1b ff ff ff call 107c2b <rtems_filesystem_global_location_obtain><== NOT EXECUTED
107d10: 89 c3 mov %eax,%ebx <== NOT EXECUTED
global_loc = rtems_filesystem_global_location_obtain_null();
errno = ENOMEM;
107d12: e8 c5 91 00 00 call 110edc <__errno> <== NOT EXECUTED
107d17: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED
107d1d: 83 c4 10 add $0x10,%esp
}
return global_loc;
}
107d20: 89 d8 mov %ebx,%eax
107d22: 8d 65 f8 lea -0x8(%ebp),%esp
107d25: 5b pop %ebx
107d26: 5e pop %esi
107d27: 5d pop %ebp
107d28: c3 ret
00106db8 <rtems_gxx_key_create>:
int rtems_gxx_key_create (__gthread_key_t *key, void (*dtor) (void *))
{
106db8: 55 push %ebp
106db9: 89 e5 mov %esp,%ebp
106dbb: 56 push %esi
106dbc: 53 push %ebx
106dbd: 8b 75 0c mov 0xc(%ebp),%esi
* pointer to the buffer that will hold the value of the key itself.
* We have to to this, because the others functions on this interface
* deal with the value of the key, as used with the POSIX API.
*/
/* Do not pull your hair, trust me this works. :-) */
__gthread_key_t new_key = (__gthread_key_t) malloc( sizeof( *new_key ) );
106dc0: 83 ec 0c sub $0xc,%esp
106dc3: 6a 08 push $0x8
106dc5: e8 82 03 00 00 call 10714c <malloc>
106dca: 89 c3 mov %eax,%ebx
*key = new_key;
106dcc: 8b 45 08 mov 0x8(%ebp),%eax
106dcf: 89 18 mov %ebx,(%eax)
new_key->val = NULL;
106dd1: c7 03 00 00 00 00 movl $0x0,(%ebx)
new_key->dtor = dtor;
106dd7: 89 73 04 mov %esi,0x4(%ebx)
"gxx_wrappers: create key=%x, dtor=%x, new_key=%x\n", key, dtor, new_key
);
#endif
/* register with RTEMS the buffer that will hold the key values */
status = rtems_task_variable_add( RTEMS_SELF, (void **)new_key, dtor );
106dda: 83 c4 0c add $0xc,%esp
106ddd: 56 push %esi
106dde: 53 push %ebx
106ddf: 6a 00 push $0x0
106de1: e8 3a 3c 00 00 call 10aa20 <rtems_task_variable_add>
if ( status == RTEMS_SUCCESSFUL )
106de6: 83 c4 10 add $0x10,%esp
return 0;
106de9: 31 d2 xor %edx,%edx
);
#endif
/* register with RTEMS the buffer that will hold the key values */
status = rtems_task_variable_add( RTEMS_SELF, (void **)new_key, dtor );
if ( status == RTEMS_SUCCESSFUL )
106deb: 85 c0 test %eax,%eax
106ded: 74 0f je 106dfe <rtems_gxx_key_create+0x46><== ALWAYS TAKEN
return 0;
free( new_key );
106def: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
106df2: 53 push %ebx <== NOT EXECUTED
106df3: e8 5c fe ff ff call 106c54 <free> <== NOT EXECUTED
return -1;
106df8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
106dfb: 83 ca ff or $0xffffffff,%edx <== NOT EXECUTED
}
106dfe: 89 d0 mov %edx,%eax
106e00: 8d 65 f8 lea -0x8(%ebp),%esp
106e03: 5b pop %ebx
106e04: 5e pop %esi
106e05: 5d pop %ebp
106e06: c3 ret
00106e17 <rtems_gxx_key_delete>:
int rtems_gxx_key_delete (__gthread_key_t key)
{
106e17: 55 push %ebp
106e18: 89 e5 mov %esp,%ebp
106e1a: 53 push %ebx
106e1b: 83 ec 0c sub $0xc,%esp
106e1e: 8b 5d 08 mov 0x8(%ebp),%ebx
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: delete key=%x\n", key );
#endif
/* register with RTEMS the buffer that will hold the key values */
status = rtems_task_variable_delete( RTEMS_SELF, (void **)key );
106e21: 53 push %ebx
106e22: 6a 00 push $0x0
106e24: e8 8f 3c 00 00 call 10aab8 <rtems_task_variable_delete>
if ( status == RTEMS_SUCCESSFUL ) {
106e29: 83 c4 10 add $0x10,%esp
106e2c: 85 c0 test %eax,%eax
106e2e: 75 11 jne 106e41 <rtems_gxx_key_delete+0x2a><== NEVER TAKEN
/* Hmm - hopefully all tasks using this key have gone away... */
if ( key ) free( *(void **)key );
106e30: 85 db test %ebx,%ebx
106e32: 74 0d je 106e41 <rtems_gxx_key_delete+0x2a><== NEVER TAKEN
106e34: 83 ec 0c sub $0xc,%esp
106e37: ff 33 pushl (%ebx)
106e39: e8 16 fe ff ff call 106c54 <free>
106e3e: 83 c4 10 add $0x10,%esp
return 0;
}
key = NULL;
return 0;
}
106e41: 31 c0 xor %eax,%eax
106e43: 8b 5d fc mov -0x4(%ebp),%ebx
106e46: c9 leave
106e47: c3 ret
00106d60 <rtems_gxx_once>:
/* uncomment this if you need to debug this interface */
/*#define DEBUG_GXX_WRAPPERS 1*/
int rtems_gxx_once(__gthread_once_t *once, void (*func) (void))
{
106d60: 55 push %ebp
106d61: 89 e5 mov %esp,%ebp
106d63: 57 push %edi
106d64: 56 push %esi
106d65: 53 push %ebx
106d66: 83 ec 1c sub $0x1c,%esp
106d69: 8b 5d 08 mov 0x8(%ebp),%ebx
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: once=%x, func=%x\n", *once, func );
#endif
if ( *(volatile __gthread_once_t *)once == 0 ) {
106d6c: 8b 03 mov (%ebx),%eax
106d6e: 85 c0 test %eax,%eax
106d70: 75 3c jne 106dae <rtems_gxx_once+0x4e>
rtems_mode saveMode;
__gthread_once_t o;
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
106d72: 52 push %edx
106d73: 8d 7d e4 lea -0x1c(%ebp),%edi
106d76: 57 push %edi
106d77: 68 00 01 00 00 push $0x100
106d7c: 68 00 01 00 00 push $0x100
106d81: e8 16 3b 00 00 call 10a89c <rtems_task_mode>
if ( (o = *(volatile __gthread_once_t *)once) == 0 ) {
106d86: 8b 33 mov (%ebx),%esi
106d88: 83 c4 10 add $0x10,%esp
106d8b: 85 f6 test %esi,%esi
106d8d: 75 06 jne 106d95 <rtems_gxx_once+0x35> <== NEVER TAKEN
*(volatile __gthread_once_t *)once = 1;
106d8f: c7 03 01 00 00 00 movl $0x1,(%ebx)
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
106d95: 50 push %eax
106d96: 57 push %edi
106d97: 68 00 01 00 00 push $0x100
106d9c: ff 75 e4 pushl -0x1c(%ebp)
106d9f: e8 f8 3a 00 00 call 10a89c <rtems_task_mode>
if ( o == 0 )
106da4: 83 c4 10 add $0x10,%esp
106da7: 85 f6 test %esi,%esi
106da9: 75 03 jne 106dae <rtems_gxx_once+0x4e> <== NEVER TAKEN
(*func)();
106dab: ff 55 0c call *0xc(%ebp)
}
return 0;
}
106dae: 31 c0 xor %eax,%eax
106db0: 8d 65 f4 lea -0xc(%ebp),%esp
106db3: 5b pop %ebx
106db4: 5e pop %esi
106db5: 5f pop %edi
106db6: 5d pop %ebp
106db7: c3 ret
00106ea0 <rtems_gxx_setspecific>:
int rtems_gxx_setspecific(__gthread_key_t key, const void *ptr)
{
106ea0: 55 push %ebp
106ea1: 89 e5 mov %esp,%ebp
106ea3: 53 push %ebx
106ea4: 83 ec 08 sub $0x8,%esp
106ea7: 8b 5d 08 mov 0x8(%ebp),%ebx
rtems_task_self()
);
#endif
/* register with RTEMS the buffer that will hold the key values */
status = rtems_task_variable_add( RTEMS_SELF, (void **)key, key->dtor );
106eaa: ff 73 04 pushl 0x4(%ebx)
106ead: 53 push %ebx
106eae: 6a 00 push $0x0
106eb0: e8 6b 3b 00 00 call 10aa20 <rtems_task_variable_add>
if ( status == RTEMS_SUCCESSFUL ) {
106eb5: 83 c4 10 add $0x10,%esp
106eb8: 85 c0 test %eax,%eax
106eba: 75 09 jne 106ec5 <rtems_gxx_setspecific+0x25><== NEVER TAKEN
/* now let's set the proper value */
key->val = (void *)ptr;
106ebc: 8b 45 0c mov 0xc(%ebp),%eax
106ebf: 89 03 mov %eax,(%ebx)
return 0;
106ec1: 31 c0 xor %eax,%eax
106ec3: eb 03 jmp 106ec8 <rtems_gxx_setspecific+0x28>
}
return -1;
106ec5: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
}
106ec8: 8b 5d fc mov -0x4(%ebp),%ebx
106ecb: c9 leave
106ecc: c3 ret
00109ad0 <rtems_heap_allocate_aligned_with_boundary>:
void *rtems_heap_allocate_aligned_with_boundary(
size_t size,
uintptr_t alignment,
uintptr_t boundary
)
{
109ad0: 55 push %ebp
109ad1: 89 e5 mov %esp,%ebp
109ad3: 83 ec 08 sub $0x8,%esp
if (
109ad6: 83 3d f0 3d 13 00 03 cmpl $0x3,0x133df0
109add: 74 1e je 109afd <rtems_heap_allocate_aligned_with_boundary+0x2d><== ALWAYS TAKEN
&& !malloc_is_system_state_OK()
) {
return NULL;
}
malloc_deferred_frees_process();
109adf: e8 97 f1 ff ff call 108c7b <malloc_deferred_frees_process>
/* FIXME: Statistics, boundary checks */
return _Protected_heap_Allocate_aligned_with_boundary(
109ae4: ff 75 10 pushl 0x10(%ebp)
109ae7: ff 75 0c pushl 0xc(%ebp)
109aea: ff 75 08 pushl 0x8(%ebp)
109aed: ff 35 30 f2 12 00 pushl 0x12f230
109af3: e8 34 4a 00 00 call 10e52c <_Protected_heap_Allocate_aligned_with_boundary>
109af8: 83 c4 10 add $0x10,%esp
109afb: eb 0b jmp 109b08 <rtems_heap_allocate_aligned_with_boundary+0x38>
uintptr_t boundary
)
{
if (
_System_state_Is_up( _System_state_Get() )
&& !malloc_is_system_state_OK()
109afd: e8 3a f1 ff ff call 108c3c <malloc_is_system_state_OK>
109b02: 84 c0 test %al,%al
109b04: 75 d9 jne 109adf <rtems_heap_allocate_aligned_with_boundary+0xf>
) {
return NULL;
109b06: 31 c0 xor %eax,%eax
RTEMS_Malloc_Heap,
size,
alignment,
boundary
);
}
109b08: c9 leave
109b09: c3 ret
00107b05 <rtems_ide_part_table_free>:
* RETURNS:
* N/A
*/
void
rtems_ide_part_table_free(rtems_disk_desc_t *disk_desc)
{
107b05: 55 push %ebp <== NOT EXECUTED
107b06: 89 e5 mov %esp,%ebp <== NOT EXECUTED
partition_table_free( disk_desc );
107b08: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
}
107b0b: 5d pop %ebp <== NOT EXECUTED
* N/A
*/
void
rtems_ide_part_table_free(rtems_disk_desc_t *disk_desc)
{
partition_table_free( disk_desc );
107b0c: e9 c0 fb ff ff jmp 1076d1 <partition_table_free> <== NOT EXECUTED
00107b11 <rtems_ide_part_table_get>:
* RTEMS_SUCCESSFUL if success,
* RTEMS_INTERNAL_ERROR otherwise
*/
rtems_status_code
rtems_ide_part_table_get(const char *dev_name, rtems_disk_desc_t *disk_desc)
{
107b11: 55 push %ebp <== NOT EXECUTED
107b12: 89 e5 mov %esp,%ebp <== NOT EXECUTED
return partition_table_get( dev_name, disk_desc );
107b14: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
107b17: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
}
107b1a: 5d pop %ebp <== NOT EXECUTED
* RTEMS_INTERNAL_ERROR otherwise
*/
rtems_status_code
rtems_ide_part_table_get(const char *dev_name, rtems_disk_desc_t *disk_desc)
{
return partition_table_get( dev_name, disk_desc );
107b1b: e9 1e fe ff ff jmp 10793e <partition_table_get> <== NOT EXECUTED
00107b20 <rtems_ide_part_table_initialize>:
* RTEMS_NO_MEMOTY if cannot have not enough memory,
* RTEMS_INTERNAL_ERROR if other error occurs.
*/
rtems_status_code
rtems_ide_part_table_initialize(const char *dev_name)
{
107b20: 55 push %ebp
107b21: 89 e5 mov %esp,%ebp
107b23: 57 push %edi
107b24: 56 push %esi
107b25: 53 push %ebx
107b26: 83 ec 34 sub $0x34,%esp
rtems_part_desc_t *part_desc;
/* logical device name /dev/hdxyy */
char name[RTEMS_IDE_PARTITION_DEV_NAME_LENGTH_MAX];
disk_desc = (rtems_disk_desc_t *) calloc(1, sizeof(rtems_disk_desc_t));
107b29: 68 24 01 00 00 push $0x124
107b2e: 6a 01 push $0x1
107b30: e8 87 06 00 00 call 1081bc <calloc>
107b35: 89 c3 mov %eax,%ebx
if (disk_desc == NULL)
107b37: 83 c4 10 add $0x10,%esp
{
return RTEMS_NO_MEMORY;
107b3a: c7 45 d4 1a 00 00 00 movl $0x1a,-0x2c(%ebp)
/* logical device name /dev/hdxyy */
char name[RTEMS_IDE_PARTITION_DEV_NAME_LENGTH_MAX];
disk_desc = (rtems_disk_desc_t *) calloc(1, sizeof(rtems_disk_desc_t));
if (disk_desc == NULL)
107b41: 85 c0 test %eax,%eax
107b43: 0f 84 95 00 00 00 je 107bde <rtems_ide_part_table_initialize+0xbe><== NEVER TAKEN
{
return RTEMS_NO_MEMORY;
}
/* get partition table */
rc = partition_table_get(dev_name, disk_desc);
107b49: 89 c2 mov %eax,%edx
107b4b: 8b 45 08 mov 0x8(%ebp),%eax
107b4e: e8 eb fd ff ff call 10793e <partition_table_get>
107b53: 89 45 d4 mov %eax,-0x2c(%ebp)
if (rc != RTEMS_SUCCESSFUL)
107b56: 85 c0 test %eax,%eax
107b58: 74 0e je 107b68 <rtems_ide_part_table_initialize+0x48><== ALWAYS TAKEN
{
free(disk_desc);
107b5a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107b5d: 53 push %ebx <== NOT EXECUTED
107b5e: e8 c5 08 00 00 call 108428 <free> <== NOT EXECUTED
107b63: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
107b66: eb 76 jmp 107bde <rtems_ide_part_table_initialize+0xbe><== NOT EXECUTED
107b68: 8b 03 mov (%ebx),%eax
107b6a: 89 45 d0 mov %eax,-0x30(%ebp)
dev_t device
)
{
union __rtems_dev_t temp;
temp.device = device;
107b6d: 8b 43 04 mov 0x4(%ebx),%eax
107b70: 89 45 cc mov %eax,-0x34(%ebp)
*/
rtems_filesystem_split_dev_t (disk_desc->dev, major, minor);
/* create logical disks on the physical one */
for (part_num = 0; part_num < disk_desc->last_log_id; part_num++)
107b73: 31 f6 xor %esi,%esi
{
sprintf(name, "%s%d", dev_name, part_num + 1);
107b75: 8d 7d d8 lea -0x28(%ebp),%edi
*/
rtems_filesystem_split_dev_t (disk_desc->dev, major, minor);
/* create logical disks on the physical one */
for (part_num = 0; part_num < disk_desc->last_log_id; part_num++)
107b78: eb 58 jmp 107bd2 <rtems_ide_part_table_initialize+0xb2>
{
sprintf(name, "%s%d", dev_name, part_num + 1);
107b7a: 46 inc %esi
107b7b: 56 push %esi
107b7c: ff 75 08 pushl 0x8(%ebp)
107b7f: 68 60 38 12 00 push $0x123860
107b84: 57 push %edi
107b85: e8 ce e3 00 00 call 115f58 <sprintf>
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
temp.__overlay.minor = _minor;
return temp.device;
107b8a: 8b 55 d0 mov -0x30(%ebp),%edx
107b8d: 8b 45 cc mov -0x34(%ebp),%eax
107b90: 8d 0c 06 lea (%esi,%eax,1),%ecx
dev = rtems_filesystem_make_dev_t(major, ++minor);
part_desc = disk_desc->partitions[part_num];
107b93: 8b 44 b3 24 mov 0x24(%ebx,%esi,4),%eax
if (part_desc == NULL)
107b97: 83 c4 10 add $0x10,%esp
107b9a: 85 c0 test %eax,%eax
107b9c: 74 34 je 107bd2 <rtems_ide_part_table_initialize+0xb2>
{
continue;
}
rc = rtems_disk_create_log(dev, disk_desc->dev, part_desc->start,
107b9e: 83 ec 04 sub $0x4,%esp
107ba1: 57 push %edi
107ba2: ff 70 08 pushl 0x8(%eax)
107ba5: ff 70 04 pushl 0x4(%eax)
107ba8: ff 73 04 pushl 0x4(%ebx)
107bab: ff 33 pushl (%ebx)
107bad: 51 push %ecx
107bae: 52 push %edx
107baf: e8 0b f7 ff ff call 1072bf <rtems_disk_create_log>
part_desc->size, name);
if (rc != RTEMS_SUCCESSFUL)
107bb4: 83 c4 20 add $0x20,%esp
107bb7: 85 c0 test %eax,%eax
107bb9: 74 17 je 107bd2 <rtems_ide_part_table_initialize+0xb2><== ALWAYS TAKEN
{
fprintf(stdout,"Cannot create device %s, error code %d\n", name, rc);
107bbb: 50 push %eax <== NOT EXECUTED
107bbc: 57 push %edi <== NOT EXECUTED
107bbd: 68 65 38 12 00 push $0x123865 <== NOT EXECUTED
107bc2: a1 c0 12 13 00 mov 0x1312c0,%eax <== NOT EXECUTED
107bc7: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED
107bca: e8 c5 dc 00 00 call 115894 <fprintf> <== NOT EXECUTED
continue;
107bcf: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
*/
rtems_filesystem_split_dev_t (disk_desc->dev, major, minor);
/* create logical disks on the physical one */
for (part_num = 0; part_num < disk_desc->last_log_id; part_num++)
107bd2: 3b 73 24 cmp 0x24(%ebx),%esi
107bd5: 7c a3 jl 107b7a <rtems_ide_part_table_initialize+0x5a>
fprintf(stdout,"Cannot create device %s, error code %d\n", name, rc);
continue;
}
}
partition_table_free(disk_desc);
107bd7: 89 d8 mov %ebx,%eax
107bd9: e8 f3 fa ff ff call 1076d1 <partition_table_free>
return RTEMS_SUCCESSFUL;
}
107bde: 8b 45 d4 mov -0x2c(%ebp),%eax
107be1: 8d 65 f4 lea -0xc(%ebp),%esp
107be4: 5b pop %ebx
107be5: 5e pop %esi
107be6: 5f pop %edi
107be7: 5d pop %ebp
107be8: c3 ret
0010c020 <rtems_iterate_over_all_threads>:
#include <rtems/system.h>
#include <rtems/score/thread.h>
void rtems_iterate_over_all_threads(rtems_per_thread_routine routine)
{
10c020: 55 push %ebp
10c021: 89 e5 mov %esp,%ebp
10c023: 57 push %edi
10c024: 56 push %esi
10c025: 53 push %ebx
10c026: 83 ec 0c sub $0xc,%esp
uint32_t i;
uint32_t api_index;
Thread_Control *the_thread;
Objects_Information *information;
if ( !routine )
10c029: bb 01 00 00 00 mov $0x1,%ebx
10c02e: 83 7d 08 00 cmpl $0x0,0x8(%ebp)
10c032: 74 3a je 10c06e <rtems_iterate_over_all_threads+0x4e>
#if !defined(RTEMS_POSIX_API) || defined(RTEMS_DEBUG)
if ( !_Objects_Information_table[ api_index ] )
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
10c034: 8b 04 9d 3c 0e 13 00 mov 0x130e3c(,%ebx,4),%eax
10c03b: 8b 78 04 mov 0x4(%eax),%edi
if ( !information )
10c03e: be 01 00 00 00 mov $0x1,%esi
10c043: 85 ff test %edi,%edi
10c045: 75 1d jne 10c064 <rtems_iterate_over_all_threads+0x44>
Objects_Information *information;
if ( !routine )
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
10c047: 43 inc %ebx
10c048: 83 fb 04 cmp $0x4,%ebx
10c04b: eb e5 jmp 10c032 <rtems_iterate_over_all_threads+0x12>
information = _Objects_Information_table[ api_index ][ 1 ];
if ( !information )
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
the_thread = (Thread_Control *)information->local_table[ i ];
10c04d: 8b 57 1c mov 0x1c(%edi),%edx
10c050: 8b 14 b2 mov (%edx,%esi,4),%edx
if ( !the_thread )
10c053: 85 d2 test %edx,%edx
10c055: 74 0c je 10c063 <rtems_iterate_over_all_threads+0x43><== NEVER TAKEN
continue;
(*routine)(the_thread);
10c057: 83 ec 0c sub $0xc,%esp
10c05a: 52 push %edx
10c05b: 8b 45 08 mov 0x8(%ebp),%eax
10c05e: ff d0 call *%eax
10c060: 83 c4 10 add $0x10,%esp
information = _Objects_Information_table[ api_index ][ 1 ];
if ( !information )
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
10c063: 46 inc %esi
10c064: 0f b7 57 10 movzwl 0x10(%edi),%edx
10c068: 39 d6 cmp %edx,%esi
10c06a: 76 e1 jbe 10c04d <rtems_iterate_over_all_threads+0x2d>
10c06c: eb d9 jmp 10c047 <rtems_iterate_over_all_threads+0x27>
(*routine)(the_thread);
}
}
}
10c06e: 8d 65 f4 lea -0xc(%ebp),%esp
10c071: 5b pop %ebx
10c072: 5e pop %esi
10c073: 5f pop %edi
10c074: 5d pop %ebp
10c075: c3 ret
00106840 <rtems_libio_init>:
*
* Called by BSP startup code to initialize the libio subsystem.
*/
void rtems_libio_init( void )
{
106840: 55 push %ebp
106841: 89 e5 mov %esp,%ebp
106843: 53 push %ebx
106844: 52 push %edx
rtems_status_code rc;
uint32_t i;
rtems_libio_t *iop;
if (rtems_libio_number_iops > 0)
106845: 8b 1d 70 a2 12 00 mov 0x12a270,%ebx
10684b: 85 db test %ebx,%ebx
10684d: 74 3e je 10688d <rtems_libio_init+0x4d> <== NEVER TAKEN
{
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
10684f: 50 push %eax
106850: 50 push %eax
106851: 6a 30 push $0x30
106853: 53 push %ebx
106854: e8 d3 fc ff ff call 10652c <calloc>
106859: a3 d0 e2 12 00 mov %eax,0x12e2d0
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
10685e: 83 c4 10 add $0x10,%esp
106861: 85 c0 test %eax,%eax
106863: 75 07 jne 10686c <rtems_libio_init+0x2c>
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
106865: 83 ec 0c sub $0xc,%esp
106868: 6a 1a push $0x1a
10686a: eb 44 jmp 1068b0 <rtems_libio_init+0x70>
iop = rtems_libio_iop_freelist = rtems_libio_iops;
10686c: a3 d4 e2 12 00 mov %eax,0x12e2d4
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
106871: 89 c1 mov %eax,%ecx
106873: 31 d2 xor %edx,%edx
106875: eb 06 jmp 10687d <rtems_libio_init+0x3d>
iop->data1 = iop + 1;
106877: 83 c1 30 add $0x30,%ecx
10687a: 89 49 fc mov %ecx,-0x4(%ecx)
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
iop = rtems_libio_iop_freelist = rtems_libio_iops;
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
10687d: 42 inc %edx
10687e: 39 da cmp %ebx,%edx
106880: 75 f5 jne 106877 <rtems_libio_init+0x37>
iop->data1 = iop + 1;
iop->data1 = NULL;
106882: 6b d2 30 imul $0x30,%edx,%edx
106885: c7 44 10 fc 00 00 00 movl $0x0,-0x4(%eax,%edx,1)
10688c: 00
/*
* Create the binary semaphore used to provide mutual exclusion
* on the IOP Table.
*/
rc = rtems_semaphore_create(
10688d: 83 ec 0c sub $0xc,%esp
106890: 68 d8 e2 12 00 push $0x12e2d8
106895: 6a 00 push $0x0
106897: 6a 54 push $0x54
106899: 6a 01 push $0x1
10689b: 68 4f 49 42 4c push $0x4c42494f
1068a0: e8 bb 32 00 00 call 109b60 <rtems_semaphore_create>
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&rtems_libio_semaphore
);
if ( rc != RTEMS_SUCCESSFUL )
1068a5: 83 c4 20 add $0x20,%esp
1068a8: 85 c0 test %eax,%eax
1068aa: 74 09 je 1068b5 <rtems_libio_init+0x75> <== ALWAYS TAKEN
rtems_fatal_error_occurred( rc );
1068ac: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1068af: 50 push %eax <== NOT EXECUTED
1068b0: e8 ff 3a 00 00 call 10a3b4 <rtems_fatal_error_occurred>
/*
* Initialize the base file system infrastructure.
*/
if (rtems_fs_init_helper)
1068b5: a1 74 a2 12 00 mov 0x12a274,%eax
1068ba: 85 c0 test %eax,%eax
1068bc: 74 06 je 1068c4 <rtems_libio_init+0x84>
(* rtems_fs_init_helper)();
}
1068be: 8b 5d fc mov -0x4(%ebp),%ebx
1068c1: c9 leave
/*
* Initialize the base file system infrastructure.
*/
if (rtems_fs_init_helper)
(* rtems_fs_init_helper)();
1068c2: ff e0 jmp *%eax
}
1068c4: 8b 5d fc mov -0x4(%ebp),%ebx
1068c7: c9 leave
1068c8: c3 ret
00105207 <rtems_libio_set_private_env>:
}
rtems_status_code rtems_libio_set_private_env(void)
{
105207: 55 push %ebp
105208: 89 e5 mov %esp,%ebp
10520a: 57 push %edi
10520b: 56 push %esi
10520c: 53 push %ebx
10520d: 83 ec 1c sub $0x1c,%esp
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_id self_task_id = rtems_task_self();
105210: e8 fb 14 00 00 call 106710 <rtems_task_self>
105215: 89 c2 mov %eax,%edx
rtems_user_env_t *old_env = rtems_current_user_env;
105217: a1 5c 7b 12 00 mov 0x127b5c,%eax
10521c: 89 45 e4 mov %eax,-0x1c(%ebp)
bool uses_global_env = old_env == &rtems_global_user_env;
bool uses_shared_env = old_env->task_id != self_task_id;
if (uses_global_env || uses_shared_env) {
10521f: 39 50 24 cmp %edx,0x24(%eax)
105222: 75 0d jne 105231 <rtems_libio_set_private_env+0x2a>
_Thread_Enable_dispatch();
}
rtems_status_code rtems_libio_set_private_env(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
105224: 31 f6 xor %esi,%esi
rtems_id self_task_id = rtems_task_self();
rtems_user_env_t *old_env = rtems_current_user_env;
bool uses_global_env = old_env == &rtems_global_user_env;
bool uses_shared_env = old_env->task_id != self_task_id;
if (uses_global_env || uses_shared_env) {
105226: 3d 60 7b 12 00 cmp $0x127b60,%eax
10522b: 0f 85 b1 00 00 00 jne 1052e2 <rtems_libio_set_private_env+0xdb><== ALWAYS TAKEN
rtems_user_env_t *new_env = calloc(1, sizeof(*new_env));
105231: 57 push %edi
105232: 57 push %edi
105233: 6a 2c push $0x2c
105235: 6a 01 push $0x1
105237: 89 55 e0 mov %edx,-0x20(%ebp)
10523a: e8 61 41 00 00 call 1093a0 <calloc>
10523f: 89 c3 mov %eax,%ebx
if (new_env != NULL) {
105241: 83 c4 10 add $0x10,%esp
if (sc != RTEMS_SUCCESSFUL) {
free_user_env(new_env);
}
} else {
sc = RTEMS_NO_MEMORY;
105244: be 1a 00 00 00 mov $0x1a,%esi
bool uses_shared_env = old_env->task_id != self_task_id;
if (uses_global_env || uses_shared_env) {
rtems_user_env_t *new_env = calloc(1, sizeof(*new_env));
if (new_env != NULL) {
105249: 85 c0 test %eax,%eax
10524b: 8b 55 e0 mov -0x20(%ebp),%edx
10524e: 0f 84 8e 00 00 00 je 1052e2 <rtems_libio_set_private_env+0xdb>
*new_env = *old_env;
105254: b9 0b 00 00 00 mov $0xb,%ecx
105259: 89 c7 mov %eax,%edi
10525b: 8b 75 e4 mov -0x1c(%ebp),%esi
10525e: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
new_env->reference_count = 1;
105260: c7 40 28 01 00 00 00 movl $0x1,0x28(%eax)
new_env->task_id = self_task_id;
105267: 89 50 24 mov %edx,0x24(%eax)
new_env->root_directory =
rtems_filesystem_global_location_obtain(&old_env->root_directory);
10526a: 83 ec 0c sub $0xc,%esp
10526d: 8b 45 e4 mov -0x1c(%ebp),%eax
105270: 83 c0 04 add $0x4,%eax
105273: 50 push %eax
105274: e8 aa 09 00 00 call 105c23 <rtems_filesystem_global_location_obtain>
if (new_env != NULL) {
*new_env = *old_env;
new_env->reference_count = 1;
new_env->task_id = self_task_id;
new_env->root_directory =
105279: 89 43 04 mov %eax,0x4(%ebx)
rtems_filesystem_global_location_obtain(&old_env->root_directory);
new_env->current_directory =
rtems_filesystem_global_location_obtain(&old_env->current_directory);
10527c: 5e pop %esi
10527d: ff 75 e4 pushl -0x1c(%ebp)
105280: e8 9e 09 00 00 call 105c23 <rtems_filesystem_global_location_obtain>
*new_env = *old_env;
new_env->reference_count = 1;
new_env->task_id = self_task_id;
new_env->root_directory =
rtems_filesystem_global_location_obtain(&old_env->root_directory);
new_env->current_directory =
105285: 89 03 mov %eax,(%ebx)
rtems_fatal_error_occurred(0xdeadbeef);
}
rtems_current_user_env = &rtems_global_user_env;
}
}
105287: 8b 53 04 mov 0x4(%ebx),%edx
new_env->root_directory =
rtems_filesystem_global_location_obtain(&old_env->root_directory);
new_env->current_directory =
rtems_filesystem_global_location_obtain(&old_env->current_directory);
if (
10528a: 83 c4 10 add $0x10,%esp
10528d: 81 7a 10 24 d6 11 00 cmpl $0x11d624,0x10(%edx)
105294: 74 34 je 1052ca <rtems_libio_set_private_env+0xc3>
!rtems_filesystem_global_location_is_null(new_env->root_directory)
&& !rtems_filesystem_global_location_is_null(new_env->current_directory)
105296: 81 78 10 24 d6 11 00 cmpl $0x11d624,0x10(%eax)
10529d: 74 2b je 1052ca <rtems_libio_set_private_env+0xc3><== NEVER TAKEN
) {
sc = rtems_task_variable_add(
10529f: 51 push %ecx
1052a0: 68 9c 51 10 00 push $0x10519c
1052a5: 68 5c 7b 12 00 push $0x127b5c
1052aa: 6a 00 push $0x0
1052ac: e8 d3 14 00 00 call 106784 <rtems_task_variable_add>
1052b1: 89 c6 mov %eax,%esi
RTEMS_SELF,
(void **) &rtems_current_user_env,
free_user_env
);
if (sc == RTEMS_SUCCESSFUL) {
1052b3: 83 c4 10 add $0x10,%esp
1052b6: 85 c0 test %eax,%eax
1052b8: 75 17 jne 1052d1 <rtems_libio_set_private_env+0xca>
free_user_env_protected(old_env);
1052ba: 8b 45 e4 mov -0x1c(%ebp),%eax
1052bd: e8 1d ff ff ff call 1051df <free_user_env_protected>
rtems_current_user_env = new_env;
1052c2: 89 1d 5c 7b 12 00 mov %ebx,0x127b5c
1052c8: eb 18 jmp 1052e2 <rtems_libio_set_private_env+0xdb>
} else {
sc = RTEMS_TOO_MANY;
}
} else {
sc = RTEMS_UNSATISFIED;
1052ca: be 0d 00 00 00 mov $0xd,%esi
1052cf: eb 05 jmp 1052d6 <rtems_libio_set_private_env+0xcf>
);
if (sc == RTEMS_SUCCESSFUL) {
free_user_env_protected(old_env);
rtems_current_user_env = new_env;
} else {
sc = RTEMS_TOO_MANY;
1052d1: be 05 00 00 00 mov $0x5,%esi
} else {
sc = RTEMS_UNSATISFIED;
}
if (sc != RTEMS_SUCCESSFUL) {
free_user_env(new_env);
1052d6: 83 ec 0c sub $0xc,%esp
1052d9: 53 push %ebx
1052da: e8 bd fe ff ff call 10519c <free_user_env>
1052df: 83 c4 10 add $0x10,%esp
sc = RTEMS_NO_MEMORY;
}
}
return sc;
}
1052e2: 89 f0 mov %esi,%eax
1052e4: 8d 65 f4 lea -0xc(%ebp),%esp
1052e7: 5b pop %ebx
1052e8: 5e pop %esi
1052e9: 5f pop %edi
1052ea: 5d pop %ebp
1052eb: c3 ret
001052ec <rtems_libio_share_private_env>:
rtems_status_code rtems_libio_share_private_env(rtems_id task_id)
{
1052ec: 55 push %ebp
1052ed: 89 e5 mov %esp,%ebp
1052ef: 53 push %ebx
1052f0: 83 ec 14 sub $0x14,%esp
1052f3: 8b 5d 08 mov 0x8(%ebp),%ebx
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_id self_task_id = rtems_task_self();
1052f6: e8 15 14 00 00 call 106710 <rtems_task_self>
if (task_id != RTEMS_SELF && self_task_id != task_id) {
1052fb: 39 d8 cmp %ebx,%eax
1052fd: 0f 84 81 00 00 00 je 105384 <rtems_libio_share_private_env+0x98>
105303: 85 db test %ebx,%ebx
105305: 74 7d je 105384 <rtems_libio_share_private_env+0x98>
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
105307: a1 fc b2 12 00 mov 0x12b2fc,%eax
10530c: 40 inc %eax
10530d: a3 fc b2 12 00 mov %eax,0x12b2fc
return _Thread_Dispatch_disable_level;
105312: a1 fc b2 12 00 mov 0x12b2fc,%eax
/*
* We have to disable the thread dispatching to prevent deletion of the
* environment in the meantime.
*/
_Thread_Disable_dispatch();
sc = rtems_task_variable_get(
105317: 50 push %eax
task_id,
(void *) &rtems_current_user_env,
(void *) &env
105318: 8d 45 f4 lea -0xc(%ebp),%eax
/*
* We have to disable the thread dispatching to prevent deletion of the
* environment in the meantime.
*/
_Thread_Disable_dispatch();
sc = rtems_task_variable_get(
10531b: 50 push %eax
10531c: 68 5c 7b 12 00 push $0x127b5c
105321: 53 push %ebx
105322: e8 71 15 00 00 call 106898 <rtems_task_variable_get>
105327: 89 c3 mov %eax,%ebx
task_id,
(void *) &rtems_current_user_env,
(void *) &env
);
if (sc == RTEMS_SUCCESSFUL) {
105329: 83 c4 10 add $0x10,%esp
10532c: 85 c0 test %eax,%eax
10532e: 75 08 jne 105338 <rtems_libio_share_private_env+0x4c>
++env->reference_count;
105330: 8b 45 f4 mov -0xc(%ebp),%eax
105333: ff 40 28 incl 0x28(%eax)
105336: eb 05 jmp 10533d <rtems_libio_share_private_env+0x51>
} else {
sc = RTEMS_UNSATISFIED;
105338: bb 0d 00 00 00 mov $0xd,%ebx
}
_Thread_Enable_dispatch();
10533d: e8 8a 2e 00 00 call 1081cc <_Thread_Enable_dispatch>
if (sc == RTEMS_SUCCESSFUL) {
105342: 85 db test %ebx,%ebx
105344: 75 40 jne 105386 <rtems_libio_share_private_env+0x9a>
sc = rtems_task_variable_add(
105346: 50 push %eax
105347: 68 9c 51 10 00 push $0x10519c
10534c: 68 5c 7b 12 00 push $0x127b5c
105351: 6a 00 push $0x0
105353: e8 2c 14 00 00 call 106784 <rtems_task_variable_add>
105358: 89 c3 mov %eax,%ebx
RTEMS_SELF,
(void **) &rtems_current_user_env,
free_user_env
);
if (sc == RTEMS_SUCCESSFUL) {
10535a: 83 c4 10 add $0x10,%esp
10535d: 85 c0 test %eax,%eax
10535f: 75 14 jne 105375 <rtems_libio_share_private_env+0x89><== NEVER TAKEN
free_user_env_protected(rtems_current_user_env);
105361: a1 5c 7b 12 00 mov 0x127b5c,%eax
105366: e8 74 fe ff ff call 1051df <free_user_env_protected>
rtems_current_user_env = env;
10536b: 8b 45 f4 mov -0xc(%ebp),%eax
10536e: a3 5c 7b 12 00 mov %eax,0x127b5c
105373: eb 11 jmp 105386 <rtems_libio_share_private_env+0x9a>
} else {
free_user_env_protected(env);
105375: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED
105378: e8 62 fe ff ff call 1051df <free_user_env_protected><== NOT EXECUTED
sc = RTEMS_TOO_MANY;
10537d: bb 05 00 00 00 mov $0x5,%ebx <== NOT EXECUTED
105382: eb 02 jmp 105386 <rtems_libio_share_private_env+0x9a><== NOT EXECUTED
return sc;
}
rtems_status_code rtems_libio_share_private_env(rtems_id task_id)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
105384: 31 db xor %ebx,%ebx
}
}
}
return sc;
}
105386: 89 d8 mov %ebx,%eax
105388: 8b 5d fc mov -0x4(%ebp),%ebx
10538b: c9 leave
10538c: c3 ret
0010dad4 <rtems_libio_to_fcntl_flags>:
*
* Convert RTEMS internal flags to UNIX fnctl(2) flags
*/
int rtems_libio_to_fcntl_flags( uint32_t flags )
{
10dad4: 55 push %ebp
10dad5: 89 e5 mov %esp,%ebp
10dad7: 8b 55 08 mov 0x8(%ebp),%edx
int fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
10dada: 89 d0 mov %edx,%eax
10dadc: 83 e0 06 and $0x6,%eax
10dadf: 83 f8 06 cmp $0x6,%eax
10dae2: 74 11 je 10daf5 <rtems_libio_to_fcntl_flags+0x21>
fcntl_flags |= O_RDWR;
} else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) {
fcntl_flags |= O_RDONLY;
10dae4: 31 c0 xor %eax,%eax
{
int fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
fcntl_flags |= O_RDWR;
} else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) {
10dae6: f6 c2 02 test $0x2,%dl
10dae9: 75 0f jne 10dafa <rtems_libio_to_fcntl_flags+0x26><== ALWAYS TAKEN
fcntl_flags |= O_RDONLY;
} else if ( (flags & LIBIO_FLAGS_WRITE) == LIBIO_FLAGS_WRITE) {
10daeb: 89 d0 mov %edx,%eax <== NOT EXECUTED
10daed: c1 e8 02 shr $0x2,%eax <== NOT EXECUTED
int rtems_libio_to_fcntl_flags( uint32_t flags )
{
int fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
fcntl_flags |= O_RDWR;
10daf0: 83 e0 01 and $0x1,%eax <== NOT EXECUTED
10daf3: eb 05 jmp 10dafa <rtems_libio_to_fcntl_flags+0x26><== NOT EXECUTED
10daf5: b8 02 00 00 00 mov $0x2,%eax
fcntl_flags |= O_RDONLY;
} else if ( (flags & LIBIO_FLAGS_WRITE) == LIBIO_FLAGS_WRITE) {
fcntl_flags |= O_WRONLY;
}
if ( (flags & LIBIO_FLAGS_NO_DELAY) == LIBIO_FLAGS_NO_DELAY ) {
10dafa: f6 c2 01 test $0x1,%dl
10dafd: 74 03 je 10db02 <rtems_libio_to_fcntl_flags+0x2e>
fcntl_flags |= O_NONBLOCK;
10daff: 80 cc 40 or $0x40,%ah
}
if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) {
10db02: f6 c6 02 test $0x2,%dh
10db05: 74 03 je 10db0a <rtems_libio_to_fcntl_flags+0x36>
fcntl_flags |= O_APPEND;
10db07: 83 c8 08 or $0x8,%eax
}
if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) {
10db0a: 80 e6 04 and $0x4,%dh
10db0d: 74 03 je 10db12 <rtems_libio_to_fcntl_flags+0x3e>
fcntl_flags |= O_CREAT;
10db0f: 80 cc 02 or $0x2,%ah
}
return fcntl_flags;
}
10db12: 5d pop %ebp
10db13: c3 ret
0010538d <rtems_libio_use_global_env>:
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_user_env_t *env = rtems_current_user_env;
bool uses_private_env = env != &rtems_global_user_env;
if (uses_private_env) {
10538d: 81 3d 5c 7b 12 00 60 cmpl $0x127b60,0x127b5c
105394: 7b 12 00
105397: 74 31 je 1053ca <rtems_libio_use_global_env+0x3d>
return sc;
}
void rtems_libio_use_global_env(void)
{
105399: 55 push %ebp
10539a: 89 e5 mov %esp,%ebp
10539c: 83 ec 10 sub $0x10,%esp
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_user_env_t *env = rtems_current_user_env;
bool uses_private_env = env != &rtems_global_user_env;
if (uses_private_env) {
sc = rtems_task_variable_delete(
10539f: 68 5c 7b 12 00 push $0x127b5c
1053a4: 6a 00 push $0x0
1053a6: e8 71 14 00 00 call 10681c <rtems_task_variable_delete>
RTEMS_SELF,
(void **) &rtems_current_user_env
);
if (sc != RTEMS_SUCCESSFUL) {
1053ab: 83 c4 10 add $0x10,%esp
1053ae: 85 c0 test %eax,%eax
1053b0: 74 0d je 1053bf <rtems_libio_use_global_env+0x32><== ALWAYS TAKEN
rtems_fatal_error_occurred(0xdeadbeef);
1053b2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1053b5: 68 ef be ad de push $0xdeadbeef <== NOT EXECUTED
1053ba: e8 09 17 00 00 call 106ac8 <rtems_fatal_error_occurred><== NOT EXECUTED
}
rtems_current_user_env = &rtems_global_user_env;
1053bf: c7 05 5c 7b 12 00 60 movl $0x127b60,0x127b5c
1053c6: 7b 12 00
}
}
1053c9: c9 leave
1053ca: c3 ret
00108f14 <rtems_malloc_statistics_at_free>:
* size and thus we skip updating the statistics.
*/
static void rtems_malloc_statistics_at_free(
void *pointer
)
{
108f14: 55 push %ebp
108f15: 89 e5 mov %esp,%ebp
108f17: 83 ec 1c sub $0x1c,%esp
uintptr_t size;
if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) {
108f1a: 8d 45 f4 lea -0xc(%ebp),%eax
108f1d: 50 push %eax
108f1e: ff 75 08 pushl 0x8(%ebp)
108f21: ff 35 30 f2 12 00 pushl 0x12f230
108f27: e8 a8 56 00 00 call 10e5d4 <_Protected_heap_Get_block_size>
108f2c: 83 c4 10 add $0x10,%esp
108f2f: 84 c0 test %al,%al
108f31: 74 11 je 108f44 <rtems_malloc_statistics_at_free+0x30><== NEVER TAKEN
MSBUMP(lifetime_freed, size);
108f33: 8b 45 f4 mov -0xc(%ebp),%eax
108f36: 31 d2 xor %edx,%edx
108f38: 01 05 dc 3b 13 00 add %eax,0x133bdc
108f3e: 11 15 e0 3b 13 00 adc %edx,0x133be0
}
}
108f44: c9 leave
108f45: c3 ret
00108f46 <rtems_malloc_statistics_at_malloc>:
}
static void rtems_malloc_statistics_at_malloc(
void *pointer
)
{
108f46: 55 push %ebp
108f47: 89 e5 mov %esp,%ebp
108f49: 83 ec 18 sub $0x18,%esp
108f4c: 8b 45 08 mov 0x8(%ebp),%eax
uintptr_t actual_size = 0;
108f4f: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
uint32_t current_depth;
rtems_malloc_statistics_t *s = &rtems_malloc_statistics;
if ( !pointer )
108f56: 85 c0 test %eax,%eax
108f58: 74 43 je 108f9d <rtems_malloc_statistics_at_malloc+0x57><== NEVER TAKEN
return;
_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size);
108f5a: 52 push %edx
108f5b: 8d 55 f4 lea -0xc(%ebp),%edx
108f5e: 52 push %edx
108f5f: 50 push %eax
108f60: ff 35 30 f2 12 00 pushl 0x12f230
108f66: e8 69 56 00 00 call 10e5d4 <_Protected_heap_Get_block_size>
MSBUMP(lifetime_allocated, actual_size);
108f6b: 8b 45 f4 mov -0xc(%ebp),%eax
108f6e: 31 d2 xor %edx,%edx
108f70: 03 05 d4 3b 13 00 add 0x133bd4,%eax
108f76: 13 15 d8 3b 13 00 adc 0x133bd8,%edx
108f7c: a3 d4 3b 13 00 mov %eax,0x133bd4
108f81: 89 15 d8 3b 13 00 mov %edx,0x133bd8
current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed);
108f87: 2b 05 dc 3b 13 00 sub 0x133bdc,%eax
if (current_depth > s->max_depth)
108f8d: 83 c4 10 add $0x10,%esp
108f90: 3b 05 d0 3b 13 00 cmp 0x133bd0,%eax
108f96: 76 05 jbe 108f9d <rtems_malloc_statistics_at_malloc+0x57>
s->max_depth = current_depth;
108f98: a3 d0 3b 13 00 mov %eax,0x133bd0
}
108f9d: c9 leave
108f9e: c3 ret
0011117c <rtems_memalign>:
int rtems_memalign(
void **pointer,
size_t alignment,
size_t size
)
{
11117c: 55 push %ebp
11117d: 89 e5 mov %esp,%ebp
11117f: 56 push %esi
111180: 53 push %ebx
111181: 8b 5d 08 mov 0x8(%ebp),%ebx
void *return_this;
/*
* Parameter error checks
*/
if ( !pointer )
111184: 85 db test %ebx,%ebx
111186: 75 07 jne 11118f <rtems_memalign+0x13>
return EINVAL;
111188: b8 16 00 00 00 mov $0x16,%eax
11118d: eb 5b jmp 1111ea <rtems_memalign+0x6e>
*pointer = NULL;
11118f: c7 03 00 00 00 00 movl $0x0,(%ebx)
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
111195: 83 3d a8 25 13 00 03 cmpl $0x3,0x1325a8
11119c: 74 23 je 1111c1 <rtems_memalign+0x45>
return EINVAL;
/*
* If some free's have been deferred, then do them now.
*/
malloc_deferred_frees_process();
11119e: e8 b8 66 ff ff call 10785b <malloc_deferred_frees_process>
Heap_Control *heap,
uintptr_t size,
uintptr_t alignment
)
{
return
1111a3: 6a 00 push $0x0
1111a5: ff 75 0c pushl 0xc(%ebp)
1111a8: ff 75 10 pushl 0x10(%ebp)
1111ab: ff 35 14 e2 12 00 pushl 0x12e214
1111b1: e8 72 b3 ff ff call 10c528 <_Protected_heap_Allocate_aligned_with_boundary>
1111b6: 89 c6 mov %eax,%esi
return_this = _Protected_heap_Allocate_aligned(
RTEMS_Malloc_Heap,
size,
alignment
);
if ( !return_this )
1111b8: 83 c4 10 add $0x10,%esp
1111bb: 85 c0 test %eax,%eax
1111bd: 75 0d jne 1111cc <rtems_memalign+0x50>
1111bf: eb 24 jmp 1111e5 <rtems_memalign+0x69>
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
!malloc_is_system_state_OK() )
1111c1: e8 56 66 ff ff call 10781c <malloc_is_system_state_OK>
*pointer = NULL;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
1111c6: 84 c0 test %al,%al
1111c8: 74 be je 111188 <rtems_memalign+0xc> <== NEVER TAKEN
1111ca: eb d2 jmp 11119e <rtems_memalign+0x22>
return ENOMEM;
/*
* If configured, update the more involved statistics
*/
if ( rtems_malloc_statistics_helpers )
1111cc: a1 e4 07 13 00 mov 0x1307e4,%eax
1111d1: 85 c0 test %eax,%eax
1111d3: 74 0a je 1111df <rtems_memalign+0x63>
(*rtems_malloc_statistics_helpers->at_malloc)(pointer);
1111d5: 83 ec 0c sub $0xc,%esp
1111d8: 53 push %ebx
1111d9: ff 50 04 call *0x4(%eax)
1111dc: 83 c4 10 add $0x10,%esp
*pointer = return_this;
1111df: 89 33 mov %esi,(%ebx)
return 0;
1111e1: 31 c0 xor %eax,%eax
1111e3: eb 05 jmp 1111ea <rtems_memalign+0x6e>
RTEMS_Malloc_Heap,
size,
alignment
);
if ( !return_this )
return ENOMEM;
1111e5: b8 0c 00 00 00 mov $0xc,%eax
if ( rtems_malloc_statistics_helpers )
(*rtems_malloc_statistics_helpers->at_malloc)(pointer);
*pointer = return_this;
return 0;
}
1111ea: 8d 65 f8 lea -0x8(%ebp),%esp
1111ed: 5b pop %ebx
1111ee: 5e pop %esi
1111ef: 5d pop %ebp
1111f0: c3 ret
0010e848 <rtems_message_queue_delete>:
*/
rtems_status_code rtems_message_queue_delete(
rtems_id id
)
{
10e848: 55 push %ebp
10e849: 89 e5 mov %esp,%ebp
10e84b: 53 push %ebx
10e84c: 83 ec 18 sub $0x18,%esp
register Message_queue_Control *the_message_queue;
Objects_Locations location;
the_message_queue = _Message_queue_Get( id, &location );
10e84f: 8d 45 f4 lea -0xc(%ebp),%eax
RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Message_queue_Control *)
10e852: 50 push %eax
10e853: ff 75 08 pushl 0x8(%ebp)
10e856: 68 94 ed 12 00 push $0x12ed94
10e85b: e8 08 ca ff ff call 10b268 <_Objects_Get>
switch ( location ) {
10e860: 83 c4 10 add $0x10,%esp
10e863: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
10e867: 75 38 jne 10e8a1 <rtems_message_queue_delete+0x59><== NEVER TAKEN
10e869: 89 c3 mov %eax,%ebx
case OBJECTS_LOCAL:
_Objects_Close( &_Message_queue_Information,
10e86b: 50 push %eax
10e86c: 50 push %eax
10e86d: 53 push %ebx
10e86e: 68 94 ed 12 00 push $0x12ed94
10e873: e8 50 c6 ff ff call 10aec8 <_Objects_Close>
&the_message_queue->Object );
_CORE_message_queue_Close(
10e878: 83 c4 0c add $0xc,%esp
10e87b: 6a 05 push $0x5
10e87d: 6a 00 push $0x0
10e87f: 8d 43 14 lea 0x14(%ebx),%eax
10e882: 50 push %eax
10e883: e8 a0 04 00 00 call 10ed28 <_CORE_message_queue_Close>
*/
RTEMS_INLINE_ROUTINE void _Message_queue_Free (
Message_queue_Control *the_message_queue
)
{
_Objects_Free( &_Message_queue_Information, &the_message_queue->Object );
10e888: 5a pop %edx
10e889: 59 pop %ecx
10e88a: 53 push %ebx
10e88b: 68 94 ed 12 00 push $0x12ed94
10e890: e8 a7 c8 ff ff call 10b13c <_Objects_Free>
0, /* Not used */
0
);
}
#endif
_Thread_Enable_dispatch();
10e895: e8 72 d5 ff ff call 10be0c <_Thread_Enable_dispatch>
10e89a: 83 c4 10 add $0x10,%esp
return RTEMS_SUCCESSFUL;
10e89d: 31 c0 xor %eax,%eax
10e89f: eb 05 jmp 10e8a6 <rtems_message_queue_delete+0x5e>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10e8a1: b8 04 00 00 00 mov $0x4,%eax
}
10e8a6: 8b 5d fc mov -0x4(%ebp),%ebx
10e8a9: c9 leave
10e8aa: c3 ret
0010b0b8 <rtems_mkdir>:
return (retval);
}
int
rtems_mkdir(const char *path, mode_t mode)
{
10b0b8: 55 push %ebp
10b0b9: 89 e5 mov %esp,%ebp
10b0bb: 57 push %edi
10b0bc: 56 push %esi
10b0bd: 53 push %ebx
10b0be: 83 ec 78 sub $0x78,%esp
int success = 0;
char *dup_path = strdup(path);
10b0c1: ff 75 08 pushl 0x8(%ebp)
10b0c4: e8 87 5c 01 00 call 120d50 <strdup>
10b0c9: 89 c7 mov %eax,%edi
if (dup_path != NULL) {
10b0cb: 83 c4 10 add $0x10,%esp
10b0ce: 85 c0 test %eax,%eax
10b0d0: 75 08 jne 10b0da <rtems_mkdir+0x22>
success = build(dup_path, mode);
free(dup_path);
}
return success != 0 ? 0 : -1;
10b0d2: 83 c8 ff or $0xffffffff,%eax
10b0d5: e9 56 01 00 00 jmp 10b230 <rtems_mkdir+0x178>
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
++p;
10b0da: 31 c0 xor %eax,%eax
10b0dc: 80 3f 2f cmpb $0x2f,(%edi)
10b0df: 0f 94 c0 sete %al
10b0e2: 01 f8 add %edi,%eax
10b0e4: 89 45 94 mov %eax,-0x6c(%ebp)
char *p;
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
10b0e7: be 01 00 00 00 mov $0x1,%esi
10b0ec: c7 45 90 00 00 00 00 movl $0x0,-0x70(%ebp)
10b0f3: b8 01 00 00 00 mov $0x1,%eax
++p;
for (first = 1, last = 0; !last ; ++p) {
if (p[0] == '\0')
10b0f8: 8b 55 94 mov -0x6c(%ebp),%edx
10b0fb: 8a 0a mov (%edx),%cl
10b0fd: 84 c9 test %cl,%cl
10b0ff: 74 0d je 10b10e <rtems_mkdir+0x56>
last = 1;
else if (p[0] != '/')
10b101: 31 d2 xor %edx,%edx
10b103: 80 f9 2f cmp $0x2f,%cl
10b106: 0f 85 e6 00 00 00 jne 10b1f2 <rtems_mkdir+0x13a>
10b10c: eb 05 jmp 10b113 <rtems_mkdir+0x5b>
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
++p;
for (first = 1, last = 0; !last ; ++p) {
if (p[0] == '\0')
last = 1;
10b10e: ba 01 00 00 00 mov $0x1,%edx
else if (p[0] != '/')
continue;
*p = '\0';
10b113: 8b 4d 94 mov -0x6c(%ebp),%ecx
10b116: c6 01 00 movb $0x0,(%ecx)
if (!last && p[1] == '\0')
10b119: bb 01 00 00 00 mov $0x1,%ebx
10b11e: 85 d2 test %edx,%edx
10b120: 75 09 jne 10b12b <rtems_mkdir+0x73>
10b122: 31 db xor %ebx,%ebx
10b124: 80 79 01 00 cmpb $0x0,0x1(%ecx)
10b128: 0f 94 c3 sete %bl
last = 1;
if (first) {
10b12b: 85 c0 test %eax,%eax
10b12d: 74 1a je 10b149 <rtems_mkdir+0x91>
* mkdir [-m mode] dir
*
* We change the user's umask and then restore it,
* instead of doing chmod's.
*/
oumask = umask(0);
10b12f: 83 ec 0c sub $0xc,%esp
10b132: 6a 00 push $0x0
10b134: e8 2b 21 00 00 call 10d264 <umask>
10b139: 89 45 90 mov %eax,-0x70(%ebp)
numask = oumask & ~(S_IWUSR | S_IXUSR);
10b13c: 24 3f and $0x3f,%al
(void)umask(numask);
10b13e: 89 04 24 mov %eax,(%esp)
10b141: e8 1e 21 00 00 call 10d264 <umask>
10b146: 83 c4 10 add $0x10,%esp
first = 0;
}
if (last)
(void)umask(oumask);
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
10b149: b8 ff 01 00 00 mov $0x1ff,%eax
oumask = umask(0);
numask = oumask & ~(S_IWUSR | S_IXUSR);
(void)umask(numask);
first = 0;
}
if (last)
10b14e: 85 db test %ebx,%ebx
10b150: 74 11 je 10b163 <rtems_mkdir+0xab>
(void)umask(oumask);
10b152: 83 ec 0c sub $0xc,%esp
10b155: ff 75 90 pushl -0x70(%ebp)
10b158: e8 07 21 00 00 call 10d264 <umask>
10b15d: 83 c4 10 add $0x10,%esp
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
10b160: 8b 45 0c mov 0xc(%ebp),%eax
10b163: 52 push %edx
10b164: 52 push %edx
10b165: 50 push %eax
10b166: 57 push %edi
10b167: e8 34 f3 ff ff call 10a4a0 <mkdir>
10b16c: 83 c4 10 add $0x10,%esp
10b16f: 85 c0 test %eax,%eax
10b171: 79 6d jns 10b1e0 <rtems_mkdir+0x128>
if (errno == EEXIST || errno == EISDIR) {
10b173: e8 54 40 01 00 call 11f1cc <__errno>
10b178: 83 38 11 cmpl $0x11,(%eax)
10b17b: 75 15 jne 10b192 <rtems_mkdir+0xda>
if (stat(path, &sb) < 0) {
10b17d: 50 push %eax
10b17e: 50 push %eax
10b17f: 8d 45 a0 lea -0x60(%ebp),%eax
10b182: 50 push %eax
10b183: 57 push %edi
10b184: e8 af 00 00 00 call 10b238 <stat>
10b189: 83 c4 10 add $0x10,%esp
10b18c: 85 c0 test %eax,%eax
10b18e: 79 0e jns 10b19e <rtems_mkdir+0xe6> <== ALWAYS TAKEN
10b190: eb 72 jmp 10b204 <rtems_mkdir+0x14c> <== NOT EXECUTED
first = 0;
}
if (last)
(void)umask(oumask);
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
if (errno == EEXIST || errno == EISDIR) {
10b192: e8 35 40 01 00 call 11f1cc <__errno>
10b197: 83 38 15 cmpl $0x15,(%eax)
10b19a: 74 e1 je 10b17d <rtems_mkdir+0xc5> <== NEVER TAKEN
10b19c: eb 66 jmp 10b204 <rtems_mkdir+0x14c>
if (stat(path, &sb) < 0) {
retval = 0;
break;
} else if (!S_ISDIR(sb.st_mode)) {
10b19e: 8b 45 ac mov -0x54(%ebp),%eax
10b1a1: 25 00 f0 00 00 and $0xf000,%eax
10b1a6: 3d 00 40 00 00 cmp $0x4000,%eax
10b1ab: 74 25 je 10b1d2 <rtems_mkdir+0x11a>
if (last)
10b1ad: 85 db test %ebx,%ebx
10b1af: 74 14 je 10b1c5 <rtems_mkdir+0x10d>
errno = EEXIST;
10b1b1: e8 16 40 01 00 call 11f1cc <__errno>
10b1b6: c7 00 11 00 00 00 movl $0x11,(%eax)
else
errno = ENOTDIR;
retval = 0;
10b1bc: 31 f6 xor %esi,%esi
if (stat(path, &sb) < 0) {
retval = 0;
break;
} else if (!S_ISDIR(sb.st_mode)) {
if (last)
errno = EEXIST;
10b1be: bb 01 00 00 00 mov $0x1,%ebx
10b1c3: eb 41 jmp 10b206 <rtems_mkdir+0x14e>
else
errno = ENOTDIR;
10b1c5: e8 02 40 01 00 call 11f1cc <__errno>
10b1ca: c7 00 14 00 00 00 movl $0x14,(%eax)
10b1d0: eb 32 jmp 10b204 <rtems_mkdir+0x14c>
retval = 0;
break;
}
if (last)
10b1d2: 85 db test %ebx,%ebx
10b1d4: 75 10 jne 10b1e6 <rtems_mkdir+0x12e>
retval = 0;
break;
}
}
if (!last)
*p = '/';
10b1d6: 8b 55 94 mov -0x6c(%ebp),%edx
10b1d9: c6 02 2f movb $0x2f,(%edx)
10b1dc: 31 d2 xor %edx,%edx
10b1de: eb 10 jmp 10b1f0 <rtems_mkdir+0x138>
} else {
retval = 0;
break;
}
}
if (!last)
10b1e0: 85 db test %ebx,%ebx
10b1e2: 74 f2 je 10b1d6 <rtems_mkdir+0x11e>
10b1e4: eb 05 jmp 10b1eb <rtems_mkdir+0x133>
errno = ENOTDIR;
retval = 0;
break;
}
if (last)
retval = 2;
10b1e6: be 02 00 00 00 mov $0x2,%esi
else
errno = ENOTDIR;
retval = 0;
break;
}
if (last)
10b1eb: ba 01 00 00 00 mov $0x1,%edx
10b1f0: 31 c0 xor %eax,%eax
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
++p;
for (first = 1, last = 0; !last ; ++p) {
10b1f2: ff 45 94 incl -0x6c(%ebp)
10b1f5: 85 d2 test %edx,%edx
10b1f7: 0f 84 fb fe ff ff je 10b0f8 <rtems_mkdir+0x40>
10b1fd: bb 01 00 00 00 mov $0x1,%ebx
10b202: eb 04 jmp 10b208 <rtems_mkdir+0x150>
if (last)
(void)umask(oumask);
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
if (errno == EEXIST || errno == EISDIR) {
if (stat(path, &sb) < 0) {
retval = 0;
10b204: 31 f6 xor %esi,%esi
}
if (last)
(void)umask(oumask);
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
if (errno == EEXIST || errno == EISDIR) {
if (stat(path, &sb) < 0) {
10b206: 31 c0 xor %eax,%eax
}
}
if (!last)
*p = '/';
}
if (!first && !last)
10b208: 09 c3 or %eax,%ebx
10b20a: 75 0e jne 10b21a <rtems_mkdir+0x162>
(void)umask(oumask);
10b20c: 83 ec 0c sub $0xc,%esp
10b20f: ff 75 90 pushl -0x70(%ebp)
10b212: e8 4d 20 00 00 call 10d264 <umask>
10b217: 83 c4 10 add $0x10,%esp
int success = 0;
char *dup_path = strdup(path);
if (dup_path != NULL) {
success = build(dup_path, mode);
free(dup_path);
10b21a: 83 ec 0c sub $0xc,%esp
10b21d: 57 push %edi
10b21e: e8 c5 ec ff ff call 109ee8 <free>
}
return success != 0 ? 0 : -1;
10b223: 83 c4 10 add $0x10,%esp
10b226: 85 f6 test %esi,%esi
10b228: 0f 84 a4 fe ff ff je 10b0d2 <rtems_mkdir+0x1a>
10b22e: 31 c0 xor %eax,%eax
}
10b230: 8d 65 f4 lea -0xc(%ebp),%esp
10b233: 5b pop %ebx
10b234: 5e pop %esi
10b235: 5f pop %edi
10b236: 5d pop %ebp
10b237: c3 ret
0010ae70 <rtems_partition_create>:
uint32_t length,
uint32_t buffer_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
10ae70: 55 push %ebp
10ae71: 89 e5 mov %esp,%ebp
10ae73: 57 push %edi
10ae74: 56 push %esi
10ae75: 53 push %ebx
10ae76: 83 ec 0c sub $0xc,%esp
10ae79: 8b 7d 0c mov 0xc(%ebp),%edi
10ae7c: 8b 75 14 mov 0x14(%ebp),%esi
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
10ae7f: b8 03 00 00 00 mov $0x3,%eax
rtems_id *id
)
{
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
10ae84: 83 7d 08 00 cmpl $0x0,0x8(%ebp)
10ae88: 0f 84 d9 00 00 00 je 10af67 <rtems_partition_create+0xf7>
return RTEMS_INVALID_NAME;
if ( !starting_address )
10ae8e: 85 ff test %edi,%edi
10ae90: 0f 84 c5 00 00 00 je 10af5b <rtems_partition_create+0xeb>
return RTEMS_INVALID_ADDRESS;
if ( !id )
10ae96: 83 7d 1c 00 cmpl $0x0,0x1c(%ebp)
10ae9a: 0f 84 bb 00 00 00 je 10af5b <rtems_partition_create+0xeb><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
10aea0: 85 f6 test %esi,%esi
10aea2: 0f 84 ba 00 00 00 je 10af62 <rtems_partition_create+0xf2>
10aea8: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
10aeac: 0f 84 b0 00 00 00 je 10af62 <rtems_partition_create+0xf2>
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
10aeb2: b0 08 mov $0x8,%al
return RTEMS_INVALID_ADDRESS;
if ( !id )
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
10aeb4: 39 75 10 cmp %esi,0x10(%ebp)
10aeb7: 0f 82 aa 00 00 00 jb 10af67 <rtems_partition_create+0xf7>
10aebd: f7 c6 03 00 00 00 test $0x3,%esi
10aec3: 0f 85 9e 00 00 00 jne 10af67 <rtems_partition_create+0xf7>
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !starting_address )
return RTEMS_INVALID_ADDRESS;
10aec9: b0 09 mov $0x9,%al
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
if ( !_Addresses_Is_aligned( starting_address ) )
10aecb: f7 c7 03 00 00 00 test $0x3,%edi
10aed1: 0f 85 90 00 00 00 jne 10af67 <rtems_partition_create+0xf7>
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
10aed7: a1 b4 31 13 00 mov 0x1331b4,%eax
10aedc: 40 inc %eax
10aedd: a3 b4 31 13 00 mov %eax,0x1331b4
return _Thread_Dispatch_disable_level;
10aee2: a1 b4 31 13 00 mov 0x1331b4,%eax
* This function allocates a partition control block from
* the inactive chain of free partition control blocks.
*/
RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Allocate ( void )
{
return (Partition_Control *) _Objects_Allocate( &_Partition_Information );
10aee7: 83 ec 0c sub $0xc,%esp
10aeea: 68 30 30 13 00 push $0x133030
10aeef: e8 c4 17 00 00 call 10c6b8 <_Objects_Allocate>
10aef4: 89 c3 mov %eax,%ebx
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
10aef6: 83 c4 10 add $0x10,%esp
10aef9: 85 c0 test %eax,%eax
10aefb: 75 0c jne 10af09 <rtems_partition_create+0x99>
_Thread_Enable_dispatch();
10aefd: e8 ba 27 00 00 call 10d6bc <_Thread_Enable_dispatch>
return RTEMS_TOO_MANY;
10af02: b8 05 00 00 00 mov $0x5,%eax
10af07: eb 5e jmp 10af67 <rtems_partition_create+0xf7>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
10af09: 89 78 10 mov %edi,0x10(%eax)
the_partition->length = length;
10af0c: 8b 45 10 mov 0x10(%ebp),%eax
10af0f: 89 43 14 mov %eax,0x14(%ebx)
the_partition->buffer_size = buffer_size;
10af12: 89 73 18 mov %esi,0x18(%ebx)
the_partition->attribute_set = attribute_set;
10af15: 8b 45 18 mov 0x18(%ebp),%eax
10af18: 89 43 1c mov %eax,0x1c(%ebx)
the_partition->number_of_used_blocks = 0;
10af1b: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx)
_Chain_Initialize( &the_partition->Memory, starting_address,
10af22: 56 push %esi
10af23: 8b 45 10 mov 0x10(%ebp),%eax
10af26: 31 d2 xor %edx,%edx
10af28: f7 f6 div %esi
10af2a: 50 push %eax
10af2b: 57 push %edi
10af2c: 8d 43 24 lea 0x24(%ebx),%eax
10af2f: 50 push %eax
10af30: e8 3f 0f 00 00 call 10be74 <_Chain_Initialize>
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
10af35: 8b 43 08 mov 0x8(%ebx),%eax
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
10af38: 0f b7 c8 movzwl %ax,%ecx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10af3b: 8b 15 4c 30 13 00 mov 0x13304c,%edx
10af41: 89 1c 8a mov %ebx,(%edx,%ecx,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
10af44: 8b 55 08 mov 0x8(%ebp),%edx
10af47: 89 53 0c mov %edx,0xc(%ebx)
&_Partition_Information,
&the_partition->Object,
(Objects_Name) name
);
*id = the_partition->Object.id;
10af4a: 8b 55 1c mov 0x1c(%ebp),%edx
10af4d: 89 02 mov %eax,(%edx)
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
10af4f: e8 68 27 00 00 call 10d6bc <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10af54: 83 c4 10 add $0x10,%esp
10af57: 31 c0 xor %eax,%eax
10af59: eb 0c jmp 10af67 <rtems_partition_create+0xf7>
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !starting_address )
return RTEMS_INVALID_ADDRESS;
10af5b: b8 09 00 00 00 mov $0x9,%eax
10af60: eb 05 jmp 10af67 <rtems_partition_create+0xf7>
if ( !id )
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
10af62: b8 08 00 00 00 mov $0x8,%eax
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10af67: 8d 65 f4 lea -0xc(%ebp),%esp
10af6a: 5b pop %ebx
10af6b: 5e pop %esi
10af6c: 5f pop %edi
10af6d: 5d pop %ebp
10af6e: c3 ret
0011445c <rtems_partition_return_buffer>:
rtems_status_code rtems_partition_return_buffer(
rtems_id id,
void *buffer
)
{
11445c: 55 push %ebp
11445d: 89 e5 mov %esp,%ebp
11445f: 56 push %esi
114460: 53 push %ebx
114461: 83 ec 14 sub $0x14,%esp
114464: 8b 75 0c mov 0xc(%ebp),%esi
register Partition_Control *the_partition;
Objects_Locations location;
the_partition = _Partition_Get( id, &location );
114467: 8d 45 f4 lea -0xc(%ebp),%eax
RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Partition_Control *)
11446a: 50 push %eax
11446b: ff 75 08 pushl 0x8(%ebp)
11446e: 68 d0 7c 14 00 push $0x147cd0
114473: e8 78 43 00 00 call 1187f0 <_Objects_Get>
switch ( location ) {
114478: 83 c4 10 add $0x10,%esp
11447b: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
11447f: 75 53 jne 1144d4 <rtems_partition_return_buffer+0x78>
114481: 89 c3 mov %eax,%ebx
)
{
void *starting;
void *ending;
starting = the_partition->starting_address;
114483: 8b 40 10 mov 0x10(%eax),%eax
114486: 8b 53 14 mov 0x14(%ebx),%edx
114489: 01 c2 add %eax,%edx
ending = _Addresses_Add_offset( starting, the_partition->length );
return (
_Addresses_Is_in_range( the_buffer, starting, ending ) &&
11448b: 39 d6 cmp %edx,%esi
11448d: 77 18 ja 1144a7 <rtems_partition_return_buffer+0x4b><== NEVER TAKEN
11448f: 39 c6 cmp %eax,%esi
114491: 72 14 jb 1144a7 <rtems_partition_return_buffer+0x4b>
RTEMS_INLINE_ROUTINE int32_t _Addresses_Subtract (
const void *left,
const void *right
)
{
return (int32_t) ((const char *) left - (const char *) right);
114493: 89 f2 mov %esi,%edx
114495: 29 c2 sub %eax,%edx
114497: 89 d0 mov %edx,%eax
offset = (uint32_t) _Addresses_Subtract(
the_buffer,
the_partition->starting_address
);
return ((offset % the_partition->buffer_size) == 0);
114499: 31 d2 xor %edx,%edx
11449b: f7 73 18 divl 0x18(%ebx)
starting = the_partition->starting_address;
ending = _Addresses_Add_offset( starting, the_partition->length );
return (
_Addresses_Is_in_range( the_buffer, starting, ending ) &&
11449e: 31 c0 xor %eax,%eax
1144a0: 85 d2 test %edx,%edx
1144a2: 0f 94 c0 sete %al
1144a5: eb 02 jmp 1144a9 <rtems_partition_return_buffer+0x4d>
1144a7: 31 c0 xor %eax,%eax
case OBJECTS_LOCAL:
if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) {
1144a9: 85 c0 test %eax,%eax
1144ab: 74 1b je 1144c8 <rtems_partition_return_buffer+0x6c>
RTEMS_INLINE_ROUTINE void _Partition_Free_buffer (
Partition_Control *the_partition,
Chain_Node *the_buffer
)
{
_Chain_Append( &the_partition->Memory, the_buffer );
1144ad: 50 push %eax
1144ae: 50 push %eax
1144af: 56 push %esi
1144b0: 8d 43 24 lea 0x24(%ebx),%eax
1144b3: 50 push %eax
1144b4: e8 db 2a 00 00 call 116f94 <_Chain_Append>
_Partition_Free_buffer( the_partition, buffer );
the_partition->number_of_used_blocks -= 1;
1144b9: ff 4b 20 decl 0x20(%ebx)
_Thread_Enable_dispatch();
1144bc: e8 d3 4e 00 00 call 119394 <_Thread_Enable_dispatch>
1144c1: 83 c4 10 add $0x10,%esp
return RTEMS_SUCCESSFUL;
1144c4: 31 c0 xor %eax,%eax
1144c6: eb 11 jmp 1144d9 <rtems_partition_return_buffer+0x7d>
}
_Thread_Enable_dispatch();
1144c8: e8 c7 4e 00 00 call 119394 <_Thread_Enable_dispatch>
return RTEMS_INVALID_ADDRESS;
1144cd: b8 09 00 00 00 mov $0x9,%eax
1144d2: eb 05 jmp 1144d9 <rtems_partition_return_buffer+0x7d>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
1144d4: b8 04 00 00 00 mov $0x4,%eax
}
1144d9: 8d 65 f8 lea -0x8(%ebp),%esp
1144dc: 5b pop %ebx
1144dd: 5e pop %esi
1144de: 5d pop %ebp
1144df: c3 ret
0012dd58 <rtems_rate_monotonic_period>:
rtems_status_code rtems_rate_monotonic_period(
rtems_id id,
rtems_interval length
)
{
12dd58: 55 push %ebp
12dd59: 89 e5 mov %esp,%ebp
12dd5b: 57 push %edi
12dd5c: 56 push %esi
12dd5d: 53 push %ebx
12dd5e: 83 ec 30 sub $0x30,%esp
12dd61: 8b 7d 08 mov 0x8(%ebp),%edi
12dd64: 8b 5d 0c mov 0xc(%ebp),%ebx
Objects_Locations location;
rtems_status_code return_value;
rtems_rate_monotonic_period_states local_state;
ISR_Level level;
the_period = _Rate_monotonic_Get( id, &location );
12dd67: 8d 45 e4 lea -0x1c(%ebp),%eax
12dd6a: 50 push %eax
12dd6b: 57 push %edi
12dd6c: 68 a0 ec 16 00 push $0x16eca0
12dd71: e8 ca d2 fd ff call 10b040 <_Objects_Get>
switch ( location ) {
12dd76: 83 c4 10 add $0x10,%esp
12dd79: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp)
12dd7d: 0f 85 47 01 00 00 jne 12deca <rtems_rate_monotonic_period+0x172>
12dd83: 89 c6 mov %eax,%esi
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
12dd85: a1 04 e7 16 00 mov 0x16e704,%eax
12dd8a: 39 46 40 cmp %eax,0x40(%esi)
12dd8d: 74 0f je 12dd9e <rtems_rate_monotonic_period+0x46>
_Thread_Enable_dispatch();
12dd8f: e8 e0 dd fd ff call 10bb74 <_Thread_Enable_dispatch>
return RTEMS_NOT_OWNER_OF_RESOURCE;
12dd94: bf 17 00 00 00 mov $0x17,%edi
12dd99: e9 31 01 00 00 jmp 12decf <rtems_rate_monotonic_period+0x177>
}
if ( length == RTEMS_PERIOD_STATUS ) {
12dd9e: 85 db test %ebx,%ebx
12dda0: 75 1b jne 12ddbd <rtems_rate_monotonic_period+0x65>
switch ( the_period->state ) {
12dda2: 8b 46 38 mov 0x38(%esi),%eax
12dda5: 31 ff xor %edi,%edi
12dda7: 83 f8 04 cmp $0x4,%eax
12ddaa: 77 07 ja 12ddb3 <rtems_rate_monotonic_period+0x5b><== NEVER TAKEN
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
12ddac: 0f b6 b8 08 31 15 00 movzbl 0x153108(%eax),%edi
case RATE_MONOTONIC_ACTIVE:
default: /* unreached -- only to remove warnings */
return_value = RTEMS_SUCCESSFUL;
break;
}
_Thread_Enable_dispatch();
12ddb3: e8 bc dd fd ff call 10bb74 <_Thread_Enable_dispatch>
12ddb8: e9 12 01 00 00 jmp 12decf <rtems_rate_monotonic_period+0x177>
return( return_value );
}
_ISR_Disable( level );
12ddbd: 9c pushf
12ddbe: fa cli
12ddbf: 8f 45 d4 popl -0x2c(%ebp)
if ( the_period->state == RATE_MONOTONIC_INACTIVE ) {
12ddc2: 8b 46 38 mov 0x38(%esi),%eax
12ddc5: 85 c0 test %eax,%eax
12ddc7: 75 4c jne 12de15 <rtems_rate_monotonic_period+0xbd>
_ISR_Enable( level );
12ddc9: ff 75 d4 pushl -0x2c(%ebp)
12ddcc: 9d popf
the_period->next_length = length;
12ddcd: 89 5e 3c mov %ebx,0x3c(%esi)
/*
* Baseline statistics information for the beginning of a period.
*/
_Rate_monotonic_Initiate_statistics( the_period );
12ddd0: 83 ec 0c sub $0xc,%esp
12ddd3: 56 push %esi
12ddd4: e8 0f ff ff ff call 12dce8 <_Rate_monotonic_Initiate_statistics>
the_period->state = RATE_MONOTONIC_ACTIVE;
12ddd9: c7 46 38 02 00 00 00 movl $0x2,0x38(%esi)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
12dde0: c7 46 18 00 00 00 00 movl $0x0,0x18(%esi)
the_watchdog->routine = routine;
12dde7: c7 46 2c dc de 12 00 movl $0x12dedc,0x2c(%esi)
the_watchdog->id = id;
12ddee: 89 7e 30 mov %edi,0x30(%esi)
the_watchdog->user_data = user_data;
12ddf1: c7 46 34 00 00 00 00 movl $0x0,0x34(%esi)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
12ddf8: 89 5e 1c mov %ebx,0x1c(%esi)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
12ddfb: 59 pop %ecx
12ddfc: 5b pop %ebx
_Rate_monotonic_Timeout,
id,
NULL
);
_Watchdog_Insert_ticks( &the_period->Timer, length );
12ddfd: 8d 56 10 lea 0x10(%esi),%edx
12de00: 52 push %edx
12de01: 68 a0 e2 16 00 push $0x16e2a0
12de06: e8 61 e8 fd ff call 10c66c <_Watchdog_Insert>
_Thread_Enable_dispatch();
12de0b: e8 64 dd fd ff call 10bb74 <_Thread_Enable_dispatch>
12de10: 83 c4 10 add $0x10,%esp
12de13: eb 63 jmp 12de78 <rtems_rate_monotonic_period+0x120>
return RTEMS_SUCCESSFUL;
}
if ( the_period->state == RATE_MONOTONIC_ACTIVE ) {
12de15: 83 f8 02 cmp $0x2,%eax
12de18: 75 62 jne 12de7c <rtems_rate_monotonic_period+0x124>
/*
* Update statistics from the concluding period.
*/
_Rate_monotonic_Update_statistics( the_period );
12de1a: 89 f0 mov %esi,%eax
12de1c: e8 28 fe ff ff call 12dc49 <_Rate_monotonic_Update_statistics>
/*
* This tells the _Rate_monotonic_Timeout that this task is
* in the process of blocking on the period and that we
* may be changing the length of the next period.
*/
the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING;
12de21: c7 46 38 01 00 00 00 movl $0x1,0x38(%esi)
the_period->next_length = length;
12de28: 89 5e 3c mov %ebx,0x3c(%esi)
_ISR_Enable( level );
12de2b: ff 75 d4 pushl -0x2c(%ebp)
12de2e: 9d popf
_Thread_Executing->Wait.id = the_period->Object.id;
12de2f: a1 04 e7 16 00 mov 0x16e704,%eax
12de34: 8b 4e 08 mov 0x8(%esi),%ecx
12de37: 89 48 20 mov %ecx,0x20(%eax)
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
12de3a: 52 push %edx
12de3b: 52 push %edx
12de3c: 68 00 40 00 00 push $0x4000
12de41: 50 push %eax
12de42: e8 95 e4 fd ff call 10c2dc <_Thread_Set_state>
/*
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
12de47: 9c pushf
12de48: fa cli
12de49: 59 pop %ecx
local_state = the_period->state;
12de4a: 8b 46 38 mov 0x38(%esi),%eax
the_period->state = RATE_MONOTONIC_ACTIVE;
12de4d: c7 46 38 02 00 00 00 movl $0x2,0x38(%esi)
_ISR_Enable( level );
12de54: 51 push %ecx
12de55: 9d popf
/*
* If it did, then we want to unblock ourself and continue as
* if nothing happen. The period was reset in the timeout routine.
*/
if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING )
12de56: 83 c4 10 add $0x10,%esp
12de59: 83 f8 03 cmp $0x3,%eax
12de5c: 75 15 jne 12de73 <rtems_rate_monotonic_period+0x11b>
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
12de5e: 50 push %eax
12de5f: 50 push %eax
12de60: 68 00 40 00 00 push $0x4000
12de65: ff 35 04 e7 16 00 pushl 0x16e704
12de6b: e8 d4 d9 fd ff call 10b844 <_Thread_Clear_state>
12de70: 83 c4 10 add $0x10,%esp
_Thread_Enable_dispatch();
12de73: e8 fc dc fd ff call 10bb74 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
12de78: 31 ff xor %edi,%edi
12de7a: eb 53 jmp 12decf <rtems_rate_monotonic_period+0x177>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
12de7c: bf 04 00 00 00 mov $0x4,%edi
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
if ( the_period->state == RATE_MONOTONIC_EXPIRED ) {
12de81: 83 f8 04 cmp $0x4,%eax
12de84: 75 49 jne 12decf <rtems_rate_monotonic_period+0x177><== NEVER TAKEN
/*
* Update statistics from the concluding period
*/
_Rate_monotonic_Update_statistics( the_period );
12de86: 89 f0 mov %esi,%eax
12de88: e8 bc fd ff ff call 12dc49 <_Rate_monotonic_Update_statistics>
_ISR_Enable( level );
12de8d: ff 75 d4 pushl -0x2c(%ebp)
12de90: 9d popf
the_period->state = RATE_MONOTONIC_ACTIVE;
12de91: c7 46 38 02 00 00 00 movl $0x2,0x38(%esi)
the_period->next_length = length;
12de98: 89 5e 3c mov %ebx,0x3c(%esi)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
12de9b: 89 5e 1c mov %ebx,0x1c(%esi)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
12de9e: 51 push %ecx
12de9f: 51 push %ecx
_Watchdog_Insert_ticks( &the_period->Timer, length );
12dea0: 8d 46 10 lea 0x10(%esi),%eax
12dea3: 50 push %eax
12dea4: 68 a0 e2 16 00 push $0x16e2a0
12dea9: e8 be e7 fd ff call 10c66c <_Watchdog_Insert>
12deae: 5b pop %ebx
12deaf: 58 pop %eax
12deb0: ff 76 3c pushl 0x3c(%esi)
12deb3: ff 76 40 pushl 0x40(%esi)
12deb6: ff 15 10 69 16 00 call *0x166910
_Scheduler_Release_job(the_period->owner, the_period->next_length);
_Thread_Enable_dispatch();
12debc: e8 b3 dc fd ff call 10bb74 <_Thread_Enable_dispatch>
12dec1: 83 c4 10 add $0x10,%esp
return RTEMS_TIMEOUT;
12dec4: 66 bf 06 00 mov $0x6,%di
12dec8: eb 05 jmp 12decf <rtems_rate_monotonic_period+0x177>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
12deca: bf 04 00 00 00 mov $0x4,%edi
}
12decf: 89 f8 mov %edi,%eax
12ded1: 8d 65 f4 lea -0xc(%ebp),%esp
12ded4: 5b pop %ebx
12ded5: 5e pop %esi
12ded6: 5f pop %edi
12ded7: 5d pop %ebp
12ded8: c3 ret
00123b14 <rtems_rate_monotonic_report_statistics_with_plugin>:
*/
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
123b14: 55 push %ebp
123b15: 89 e5 mov %esp,%ebp
123b17: 57 push %edi
123b18: 56 push %esi
123b19: 53 push %ebx
123b1a: 83 ec 7c sub $0x7c,%esp
123b1d: 8b 75 08 mov 0x8(%ebp),%esi
123b20: 8b 5d 0c mov 0xc(%ebp),%ebx
rtems_id id;
rtems_rate_monotonic_period_statistics the_stats;
rtems_rate_monotonic_period_status the_status;
char name[5];
if ( !print )
123b23: 85 db test %ebx,%ebx
123b25: 0f 84 2e 01 00 00 je 123c59 <rtems_rate_monotonic_report_statistics_with_plugin+0x145><== NEVER TAKEN
return;
(*print)( context, "Period information by period\n" );
123b2b: 57 push %edi
123b2c: 57 push %edi
123b2d: 68 4c 05 15 00 push $0x15054c
123b32: 56 push %esi
123b33: ff d3 call *%ebx
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)( context, "--- CPU times are in seconds ---\n" );
123b35: 58 pop %eax
123b36: 5a pop %edx
123b37: 68 6a 05 15 00 push $0x15056a
123b3c: 56 push %esi
123b3d: ff d3 call *%ebx
(*print)( context, "--- Wall times are in seconds ---\n" );
123b3f: 59 pop %ecx
123b40: 5f pop %edi
123b41: 68 8c 05 15 00 push $0x15058c
123b46: 56 push %esi
123b47: ff d3 call *%ebx
Be sure to test the various cases.
(*print)( context,"\
1234567890123456789012345678901234567890123456789012345678901234567890123456789\
\n");
*/
(*print)( context, " ID OWNER COUNT MISSED "
123b49: 58 pop %eax
123b4a: 5a pop %edx
123b4b: 68 af 05 15 00 push $0x1505af
123b50: 56 push %esi
123b51: ff d3 call *%ebx
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
" "
#endif
" WALL TIME\n"
);
(*print)( context, " "
123b53: 59 pop %ecx
123b54: 5f pop %edi
123b55: 68 fa 05 15 00 push $0x1505fa
123b5a: 56 push %esi
123b5b: ff d3 call *%ebx
/*
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
123b5d: 8b 3d a8 ec 16 00 mov 0x16eca8,%edi
123b63: 83 c4 10 add $0x10,%esp
123b66: e9 e2 00 00 00 jmp 123c4d <rtems_rate_monotonic_report_statistics_with_plugin+0x139>
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
123b6b: 51 push %ecx
123b6c: 51 push %ecx
123b6d: 8d 45 b0 lea -0x50(%ebp),%eax
123b70: 50 push %eax
123b71: 57 push %edi
123b72: e8 b9 9d 00 00 call 12d930 <rtems_rate_monotonic_get_statistics>
if ( status != RTEMS_SUCCESSFUL )
123b77: 83 c4 10 add $0x10,%esp
123b7a: 85 c0 test %eax,%eax
123b7c: 0f 85 ca 00 00 00 jne 123c4c <rtems_rate_monotonic_report_statistics_with_plugin+0x138>
#if defined(RTEMS_DEBUG)
status = rtems_rate_monotonic_get_status( id, &the_status );
if ( status != RTEMS_SUCCESSFUL )
continue;
#else
(void) rtems_rate_monotonic_get_status( id, &the_status );
123b82: 50 push %eax
123b83: 50 push %eax
123b84: 8d 55 98 lea -0x68(%ebp),%edx
123b87: 52 push %edx
123b88: 57 push %edi
123b89: e8 2e 9f 00 00 call 12dabc <rtems_rate_monotonic_get_status>
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
123b8e: 83 c4 0c add $0xc,%esp
123b91: 8d 55 8b lea -0x75(%ebp),%edx
123b94: 52 push %edx
123b95: 6a 05 push $0x5
123b97: ff 75 98 pushl -0x68(%ebp)
123b9a: 89 55 84 mov %edx,-0x7c(%ebp)
123b9d: e8 e2 c9 fe ff call 110584 <rtems_object_get_name>
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
123ba2: 58 pop %eax
123ba3: 5a pop %edx
123ba4: ff 75 b4 pushl -0x4c(%ebp)
123ba7: ff 75 b0 pushl -0x50(%ebp)
123baa: 8b 55 84 mov -0x7c(%ebp),%edx
123bad: 52 push %edx
123bae: 57 push %edi
123baf: 68 46 06 15 00 push $0x150646
123bb4: 56 push %esi
123bb5: ff d3 call *%ebx
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
123bb7: 8b 45 b0 mov -0x50(%ebp),%eax
123bba: 83 c4 20 add $0x20,%esp
123bbd: 85 c0 test %eax,%eax
123bbf: 75 0f jne 123bd0 <rtems_rate_monotonic_report_statistics_with_plugin+0xbc>
(*print)( context, "\n" );
123bc1: 51 push %ecx
123bc2: 51 push %ecx
123bc3: 68 29 b1 14 00 push $0x14b129
123bc8: 56 push %esi
123bc9: ff d3 call *%ebx
continue;
123bcb: 83 c4 10 add $0x10,%esp
123bce: eb 7c jmp 123c4c <rtems_rate_monotonic_report_statistics_with_plugin+0x138>
struct timespec cpu_average;
struct timespec *min_cpu = &the_stats.min_cpu_time;
struct timespec *max_cpu = &the_stats.max_cpu_time;
struct timespec *total_cpu = &the_stats.total_cpu_time;
_Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average );
123bd0: 52 push %edx
123bd1: 8d 55 90 lea -0x70(%ebp),%edx
123bd4: 52 push %edx
123bd5: 50 push %eax
{
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
struct timespec cpu_average;
struct timespec *min_cpu = &the_stats.min_cpu_time;
struct timespec *max_cpu = &the_stats.max_cpu_time;
struct timespec *total_cpu = &the_stats.total_cpu_time;
123bd6: 8d 45 c8 lea -0x38(%ebp),%eax
_Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average );
123bd9: 50 push %eax
123bda: e8 79 09 00 00 call 124558 <_Timespec_Divide_by_integer>
(*print)( context,
123bdf: 8b 45 94 mov -0x6c(%ebp),%eax
123be2: b9 e8 03 00 00 mov $0x3e8,%ecx
123be7: 99 cltd
123be8: f7 f9 idiv %ecx
123bea: 50 push %eax
123beb: ff 75 90 pushl -0x70(%ebp)
123bee: 8b 45 c4 mov -0x3c(%ebp),%eax
123bf1: 99 cltd
123bf2: f7 f9 idiv %ecx
123bf4: 50 push %eax
123bf5: ff 75 c0 pushl -0x40(%ebp)
123bf8: 8b 45 bc mov -0x44(%ebp),%eax
123bfb: 99 cltd
123bfc: f7 f9 idiv %ecx
123bfe: 50 push %eax
123bff: ff 75 b8 pushl -0x48(%ebp)
123c02: 68 5d 06 15 00 push $0x15065d
123c07: 56 push %esi
123c08: 89 4d 84 mov %ecx,-0x7c(%ebp)
123c0b: ff d3 call *%ebx
struct timespec wall_average;
struct timespec *min_wall = &the_stats.min_wall_time;
struct timespec *max_wall = &the_stats.max_wall_time;
struct timespec *total_wall = &the_stats.total_wall_time;
_Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average);
123c0d: 83 c4 2c add $0x2c,%esp
123c10: 8d 45 90 lea -0x70(%ebp),%eax
123c13: 50 push %eax
123c14: ff 75 b0 pushl -0x50(%ebp)
{
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
struct timespec wall_average;
struct timespec *min_wall = &the_stats.min_wall_time;
struct timespec *max_wall = &the_stats.max_wall_time;
struct timespec *total_wall = &the_stats.total_wall_time;
123c17: 8d 45 e0 lea -0x20(%ebp),%eax
_Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average);
123c1a: 50 push %eax
123c1b: e8 38 09 00 00 call 124558 <_Timespec_Divide_by_integer>
(*print)( context,
123c20: 8b 45 94 mov -0x6c(%ebp),%eax
123c23: 8b 4d 84 mov -0x7c(%ebp),%ecx
123c26: 99 cltd
123c27: f7 f9 idiv %ecx
123c29: 50 push %eax
123c2a: ff 75 90 pushl -0x70(%ebp)
123c2d: 8b 45 dc mov -0x24(%ebp),%eax
123c30: 99 cltd
123c31: f7 f9 idiv %ecx
123c33: 50 push %eax
123c34: ff 75 d8 pushl -0x28(%ebp)
123c37: 8b 45 d4 mov -0x2c(%ebp),%eax
123c3a: 99 cltd
123c3b: f7 f9 idiv %ecx
123c3d: 50 push %eax
123c3e: ff 75 d0 pushl -0x30(%ebp)
123c41: 68 7c 06 15 00 push $0x15067c
123c46: 56 push %esi
123c47: ff d3 call *%ebx
123c49: 83 c4 30 add $0x30,%esp
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
123c4c: 47 inc %edi
/*
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
123c4d: 3b 3d ac ec 16 00 cmp 0x16ecac,%edi
123c53: 0f 86 12 ff ff ff jbe 123b6b <rtems_rate_monotonic_report_statistics_with_plugin+0x57>
the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall
);
#endif
}
}
}
123c59: 8d 65 f4 lea -0xc(%ebp),%esp
123c5c: 5b pop %ebx
123c5d: 5e pop %esi
123c5e: 5f pop %edi
123c5f: 5d pop %ebp
123c60: c3 ret
0010abb5 <rtems_rbheap_allocate>:
return big_enough;
}
void *rtems_rbheap_allocate(rtems_rbheap_control *control, size_t size)
{
10abb5: 55 push %ebp
10abb6: 89 e5 mov %esp,%ebp
10abb8: 57 push %edi
10abb9: 56 push %esi
10abba: 53 push %ebx
10abbb: 83 ec 1c sub $0x1c,%esp
10abbe: 8b 4d 08 mov 0x8(%ebp),%ecx
10abc1: 8b 5d 0c mov 0xc(%ebp),%ebx
void *ptr = NULL;
rtems_chain_control *free_chain = &control->free_chunk_chain;
rtems_rbtree_control *chunk_tree = &control->chunk_tree;
uintptr_t alignment = control->alignment;
10abc4: 8b 79 30 mov 0x30(%ecx),%edi
#include <stdlib.h>
static uintptr_t align_up(uintptr_t alignment, uintptr_t value)
{
uintptr_t excess = value % alignment;
10abc7: 89 d8 mov %ebx,%eax
10abc9: 31 d2 xor %edx,%edx
10abcb: f7 f7 div %edi
if (excess > 0) {
10abcd: 89 de mov %ebx,%esi
10abcf: 85 d2 test %edx,%edx
10abd1: 74 05 je 10abd8 <rtems_rbheap_allocate+0x23><== ALWAYS TAKEN
value += alignment - excess;
10abd3: 8d 34 3b lea (%ebx,%edi,1),%esi <== NOT EXECUTED
10abd6: 29 d6 sub %edx,%esi <== NOT EXECUTED
rtems_chain_control *free_chain = &control->free_chunk_chain;
rtems_rbtree_control *chunk_tree = &control->chunk_tree;
uintptr_t alignment = control->alignment;
uintptr_t aligned_size = align_up(alignment, size);
if (size > 0 && size <= aligned_size) {
10abd8: 39 f3 cmp %esi,%ebx
10abda: 77 04 ja 10abe0 <rtems_rbheap_allocate+0x2b><== NEVER TAKEN
10abdc: 85 db test %ebx,%ebx
10abde: 75 07 jne 10abe7 <rtems_rbheap_allocate+0x32>
return big_enough;
}
void *rtems_rbheap_allocate(rtems_rbheap_control *control, size_t size)
{
void *ptr = NULL;
10abe0: 31 c0 xor %eax,%eax
10abe2: e9 8f 00 00 00 jmp 10ac76 <rtems_rbheap_allocate+0xc1>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
10abe7: 8b 01 mov (%ecx),%eax
rtems_chain_control *free_chain,
size_t size
)
{
rtems_chain_node *current = rtems_chain_first(free_chain);
const rtems_chain_node *tail = rtems_chain_tail(free_chain);
10abe9: 8d 51 04 lea 0x4(%ecx),%edx
rtems_rbheap_chunk *big_enough = NULL;
10abec: 31 db xor %ebx,%ebx
10abee: eb 0e jmp 10abfe <rtems_rbheap_allocate+0x49>
while (current != tail && big_enough == NULL) {
rtems_rbheap_chunk *free_chunk = (rtems_rbheap_chunk *) current;
if (free_chunk->size >= size) {
10abf0: 31 db xor %ebx,%ebx
10abf2: 39 70 1c cmp %esi,0x1c(%eax)
10abf5: 0f 93 c3 setae %bl
10abf8: f7 db neg %ebx
10abfa: 21 c3 and %eax,%ebx
rtems_rbheap_chunk *chunk = malloc(sizeof(*chunk));
if (chunk != NULL) {
rtems_rbheap_add_to_spare_descriptor_chain(control, chunk);
}
}
10abfc: 8b 00 mov (%eax),%eax
{
rtems_chain_node *current = rtems_chain_first(free_chain);
const rtems_chain_node *tail = rtems_chain_tail(free_chain);
rtems_rbheap_chunk *big_enough = NULL;
while (current != tail && big_enough == NULL) {
10abfe: 85 db test %ebx,%ebx
10ac00: 75 04 jne 10ac06 <rtems_rbheap_allocate+0x51>
10ac02: 39 d0 cmp %edx,%eax
10ac04: 75 ea jne 10abf0 <rtems_rbheap_allocate+0x3b>
uintptr_t aligned_size = align_up(alignment, size);
if (size > 0 && size <= aligned_size) {
rtems_rbheap_chunk *free_chunk = search_free_chunk(free_chain, aligned_size);
if (free_chunk != NULL) {
10ac06: 85 db test %ebx,%ebx
10ac08: 74 d6 je 10abe0 <rtems_rbheap_allocate+0x2b>
uintptr_t free_size = free_chunk->size;
10ac0a: 8b 53 1c mov 0x1c(%ebx),%edx
if (free_size > aligned_size) {
10ac0d: 39 f2 cmp %esi,%edx
10ac0f: 76 4b jbe 10ac5c <rtems_rbheap_allocate+0xa7>
rtems_rbheap_chunk *new_chunk = get_chunk(control);
10ac11: 89 c8 mov %ecx,%eax
10ac13: 89 55 e4 mov %edx,-0x1c(%ebp)
10ac16: 89 4d e0 mov %ecx,-0x20(%ebp)
10ac19: e8 49 fe ff ff call 10aa67 <get_chunk>
10ac1e: 89 c7 mov %eax,%edi
if (new_chunk != NULL) {
10ac20: 85 c0 test %eax,%eax
10ac22: 8b 55 e4 mov -0x1c(%ebp),%edx
10ac25: 8b 4d e0 mov -0x20(%ebp),%ecx
10ac28: 74 b6 je 10abe0 <rtems_rbheap_allocate+0x2b><== NEVER TAKEN
uintptr_t new_free_size = free_size - aligned_size;
10ac2a: 29 f2 sub %esi,%edx
free_chunk->size = new_free_size;
10ac2c: 89 53 1c mov %edx,0x1c(%ebx)
new_chunk->begin = free_chunk->begin + new_free_size;
10ac2f: 03 53 18 add 0x18(%ebx),%edx
10ac32: 89 50 18 mov %edx,0x18(%eax)
new_chunk->size = aligned_size;
10ac35: 89 70 1c mov %esi,0x1c(%eax)
*/
RTEMS_INLINE_ROUTINE void _Chain_Set_off_chain(
Chain_Node *node
)
{
node->next = node->previous = NULL;
10ac38: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax)
10ac3f: c7 00 00 00 00 00 movl $0x0,(%eax)
static void insert_into_tree(
rtems_rbtree_control *tree,
rtems_rbheap_chunk *chunk
)
{
_RBTree_Insert_unprotected(tree, &chunk->tree_node);
10ac45: 53 push %ebx
10ac46: 53 push %ebx
10ac47: 8d 40 08 lea 0x8(%eax),%eax
10ac4a: 50 push %eax
void *rtems_rbheap_allocate(rtems_rbheap_control *control, size_t size)
{
void *ptr = NULL;
rtems_chain_control *free_chain = &control->free_chunk_chain;
rtems_rbtree_control *chunk_tree = &control->chunk_tree;
10ac4b: 83 c1 18 add $0x18,%ecx
static void insert_into_tree(
rtems_rbtree_control *tree,
rtems_rbheap_chunk *chunk
)
{
_RBTree_Insert_unprotected(tree, &chunk->tree_node);
10ac4e: 51 push %ecx
10ac4f: e8 40 15 00 00 call 10c194 <_RBTree_Insert_unprotected>
free_chunk->size = new_free_size;
new_chunk->begin = free_chunk->begin + new_free_size;
new_chunk->size = aligned_size;
rtems_chain_set_off_chain(&new_chunk->chain_node);
insert_into_tree(chunk_tree, new_chunk);
ptr = (void *) new_chunk->begin;
10ac54: 8b 47 18 mov 0x18(%edi),%eax
10ac57: 83 c4 10 add $0x10,%esp
10ac5a: eb 1a jmp 10ac76 <rtems_rbheap_allocate+0xc1>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
10ac5c: 8b 13 mov (%ebx),%edx
previous = the_node->previous;
10ac5e: 8b 43 04 mov 0x4(%ebx),%eax
next->previous = previous;
10ac61: 89 42 04 mov %eax,0x4(%edx)
previous->next = next;
10ac64: 89 10 mov %edx,(%eax)
*/
RTEMS_INLINE_ROUTINE void _Chain_Set_off_chain(
Chain_Node *node
)
{
node->next = node->previous = NULL;
10ac66: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx)
10ac6d: c7 03 00 00 00 00 movl $0x0,(%ebx)
}
} else {
rtems_chain_extract_unprotected(&free_chunk->chain_node);
rtems_chain_set_off_chain(&free_chunk->chain_node);
ptr = (void *) free_chunk->begin;
10ac73: 8b 43 18 mov 0x18(%ebx),%eax
}
}
}
return ptr;
}
10ac76: 8d 65 f4 lea -0xc(%ebp),%esp
10ac79: 5b pop %ebx
10ac7a: 5e pop %esi
10ac7b: 5f pop %edi
10ac7c: 5d pop %ebp
10ac7d: c3 ret
0010ad71 <rtems_rbheap_extend_descriptors_with_malloc>:
void rtems_rbheap_extend_descriptors_with_malloc(rtems_rbheap_control *control)
{
10ad71: 55 push %ebp <== NOT EXECUTED
10ad72: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10ad74: 53 push %ebx <== NOT EXECUTED
10ad75: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED
10ad78: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
rtems_rbheap_chunk *chunk = malloc(sizeof(*chunk));
10ad7b: 6a 20 push $0x20 <== NOT EXECUTED
10ad7d: e8 f2 c1 ff ff call 106f74 <malloc> <== NOT EXECUTED
if (chunk != NULL) {
10ad82: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10ad85: 85 c0 test %eax,%eax <== NOT EXECUTED
10ad87: 74 11 je 10ad9a <rtems_rbheap_extend_descriptors_with_malloc+0x29><== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Chain_Prepend_unprotected(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
_Chain_Insert_unprotected(_Chain_Head(the_chain), the_node);
10ad89: 8d 53 0c lea 0xc(%ebx),%edx <== NOT EXECUTED
10ad8c: 89 50 04 mov %edx,0x4(%eax) <== NOT EXECUTED
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
10ad8f: 8b 53 0c mov 0xc(%ebx),%edx <== NOT EXECUTED
after_node->next = the_node;
10ad92: 89 43 0c mov %eax,0xc(%ebx) <== NOT EXECUTED
the_node->next = before_node;
10ad95: 89 10 mov %edx,(%eax) <== NOT EXECUTED
before_node->previous = the_node;
10ad97: 89 42 04 mov %eax,0x4(%edx) <== NOT EXECUTED
rtems_rbheap_add_to_spare_descriptor_chain(control, chunk);
}
}
10ad9a: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
10ad9d: c9 leave <== NOT EXECUTED
10ad9e: c3 ret <== NOT EXECUTED
0010ac7e <rtems_rbheap_free>:
_RBTree_Extract_unprotected(chunk_tree, &b->tree_node);
}
}
rtems_status_code rtems_rbheap_free(rtems_rbheap_control *control, void *ptr)
{
10ac7e: 55 push %ebp
10ac7f: 89 e5 mov %esp,%ebp
10ac81: 57 push %edi
10ac82: 56 push %esi
10ac83: 53 push %ebx
10ac84: 83 ec 3c sub $0x3c,%esp
10ac87: 8b 5d 08 mov 0x8(%ebp),%ebx
10ac8a: 8b 55 0c mov 0xc(%ebp),%edx
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (ptr != NULL) {
10ac8d: 85 d2 test %edx,%edx
10ac8f: 0f 84 c6 00 00 00 je 10ad5b <rtems_rbheap_free+0xdd>
rtems_chain_control *free_chain = &control->free_chunk_chain;
rtems_rbtree_control *chunk_tree = &control->chunk_tree;
10ac95: 8d 73 18 lea 0x18(%ebx),%esi
#define NULL_PAGE rtems_rbheap_chunk_of_node(NULL)
static rtems_rbheap_chunk *find(rtems_rbtree_control *chunk_tree, uintptr_t key)
{
rtems_rbheap_chunk chunk = { .begin = key };
10ac98: 8d 7d c8 lea -0x38(%ebp),%edi
10ac9b: b9 08 00 00 00 mov $0x8,%ecx
10aca0: 31 c0 xor %eax,%eax
10aca2: f3 ab rep stos %eax,%es:(%edi)
10aca4: 89 55 e0 mov %edx,-0x20(%ebp)
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Find_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
RBTree_Node* iter_node = the_rbtree->root;
10aca7: 8b 53 1c mov 0x1c(%ebx),%edx
RBTree_Node* found = NULL;
10acaa: 31 ff xor %edi,%edi
return rtems_rbheap_chunk_of_node(
10acac: 8d 4d d0 lea -0x30(%ebp),%ecx
10acaf: eb 2e jmp 10acdf <rtems_rbheap_free+0x61>
int compare_result;
while (iter_node) {
compare_result = the_rbtree->compare_function(the_node, iter_node);
10acb1: 50 push %eax
10acb2: 50 push %eax
10acb3: 52 push %edx
10acb4: 51 push %ecx
10acb5: 89 55 c0 mov %edx,-0x40(%ebp)
10acb8: 89 4d bc mov %ecx,-0x44(%ebp)
10acbb: ff 56 10 call *0x10(%esi)
if ( _RBTree_Is_equal( compare_result ) ) {
10acbe: 83 c4 10 add $0x10,%esp
10acc1: 85 c0 test %eax,%eax
10acc3: 8b 55 c0 mov -0x40(%ebp),%edx
10acc6: 8b 4d bc mov -0x44(%ebp),%ecx
10acc9: 75 08 jne 10acd3 <rtems_rbheap_free+0x55>
found = iter_node;
if ( the_rbtree->is_unique )
10accb: 80 7e 14 00 cmpb $0x0,0x14(%esi)
10accf: 75 14 jne 10ace5 <rtems_rbheap_free+0x67><== ALWAYS TAKEN
10acd1: 89 d7 mov %edx,%edi <== NOT EXECUTED
RTEMS_INLINE_ROUTINE bool _RBTree_Is_greater(
int compare_result
)
{
return compare_result > 0;
10acd3: 85 c0 test %eax,%eax
10acd5: 0f 9f c0 setg %al
10acd8: 0f b6 c0 movzbl %al,%eax
break;
}
RBTree_Direction dir =
(RBTree_Direction) _RBTree_Is_greater( compare_result );
iter_node = iter_node->child[dir];
10acdb: 8b 54 82 04 mov 0x4(%edx,%eax,4),%edx
)
{
RBTree_Node* iter_node = the_rbtree->root;
RBTree_Node* found = NULL;
int compare_result;
while (iter_node) {
10acdf: 85 d2 test %edx,%edx
10ace1: 75 ce jne 10acb1 <rtems_rbheap_free+0x33>
10ace3: 89 fa mov %edi,%edx
10ace5: 8d 7a f8 lea -0x8(%edx),%edi
if (ptr != NULL) {
rtems_chain_control *free_chain = &control->free_chunk_chain;
rtems_rbtree_control *chunk_tree = &control->chunk_tree;
rtems_rbheap_chunk *chunk = find(chunk_tree, (uintptr_t) ptr);
if (chunk != NULL_PAGE) {
10ace8: 83 ff f8 cmp $0xfffffff8,%edi
10aceb: 74 72 je 10ad5f <rtems_rbheap_free+0xe1>
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_node_off_chain(
const Chain_Node *node
)
{
return (node->next == NULL) && (node->previous == NULL);
10aced: 31 c9 xor %ecx,%ecx
10acef: 83 7a f8 00 cmpl $0x0,-0x8(%edx)
10acf3: 75 09 jne 10acfe <rtems_rbheap_free+0x80>
10acf5: 31 c9 xor %ecx,%ecx
10acf7: 83 7f 04 00 cmpl $0x0,0x4(%edi)
10acfb: 0f 94 c1 sete %cl
check_and_merge(free_chain, chunk_tree, chunk, succ);
add_to_chain(free_chain, chunk);
check_and_merge(free_chain, chunk_tree, chunk, pred);
} else {
sc = RTEMS_INCORRECT_STATE;
10acfe: b8 0e 00 00 00 mov $0xe,%eax
rtems_chain_control *free_chain = &control->free_chunk_chain;
rtems_rbtree_control *chunk_tree = &control->chunk_tree;
rtems_rbheap_chunk *chunk = find(chunk_tree, (uintptr_t) ptr);
if (chunk != NULL_PAGE) {
if (!rtems_rbheap_is_chunk_free(chunk)) {
10ad03: 85 c9 test %ecx,%ecx
10ad05: 74 5d je 10ad64 <rtems_rbheap_free+0xe6>
static rtems_rbheap_chunk *get_next(
const rtems_rbheap_chunk *chunk,
RBTree_Direction dir
)
{
return rtems_rbheap_chunk_of_node(
10ad07: 8d 57 08 lea 0x8(%edi),%edx
10ad0a: 50 push %eax
10ad0b: 50 push %eax
10ad0c: 6a 00 push $0x0
10ad0e: 52 push %edx
10ad0f: 89 55 c0 mov %edx,-0x40(%ebp)
10ad12: e8 6d 16 00 00 call 10c384 <_RBTree_Next_unprotected>
10ad17: 89 45 c4 mov %eax,-0x3c(%ebp)
10ad1a: 58 pop %eax
10ad1b: 5a pop %edx
10ad1c: 6a 01 push $0x1
10ad1e: 8b 55 c0 mov -0x40(%ebp),%edx
10ad21: 52 push %edx
10ad22: e8 5d 16 00 00 call 10c384 <_RBTree_Next_unprotected>
10ad27: 83 e8 08 sub $0x8,%eax
if (chunk != NULL_PAGE) {
if (!rtems_rbheap_is_chunk_free(chunk)) {
rtems_rbheap_chunk *pred = get_next(chunk, RBT_LEFT);
rtems_rbheap_chunk *succ = get_next(chunk, RBT_RIGHT);
check_and_merge(free_chain, chunk_tree, chunk, succ);
10ad2a: 89 04 24 mov %eax,(%esp)
10ad2d: 89 f9 mov %edi,%ecx
10ad2f: 89 f2 mov %esi,%edx
10ad31: 89 d8 mov %ebx,%eax
10ad33: e8 c5 fc ff ff call 10a9fd <check_and_merge>
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
10ad38: 89 5f 04 mov %ebx,0x4(%edi)
before_node = after_node->next;
10ad3b: 8b 03 mov (%ebx),%eax
after_node->next = the_node;
10ad3d: 89 3b mov %edi,(%ebx)
the_node->next = before_node;
10ad3f: 89 07 mov %eax,(%edi)
before_node->previous = the_node;
10ad41: 89 78 04 mov %edi,0x4(%eax)
static rtems_rbheap_chunk *get_next(
const rtems_rbheap_chunk *chunk,
RBTree_Direction dir
)
{
return rtems_rbheap_chunk_of_node(
10ad44: 8b 45 c4 mov -0x3c(%ebp),%eax
10ad47: 83 e8 08 sub $0x8,%eax
rtems_rbheap_chunk *pred = get_next(chunk, RBT_LEFT);
rtems_rbheap_chunk *succ = get_next(chunk, RBT_RIGHT);
check_and_merge(free_chain, chunk_tree, chunk, succ);
add_to_chain(free_chain, chunk);
check_and_merge(free_chain, chunk_tree, chunk, pred);
10ad4a: 89 04 24 mov %eax,(%esp)
10ad4d: 89 f9 mov %edi,%ecx
10ad4f: 89 f2 mov %esi,%edx
10ad51: 89 d8 mov %ebx,%eax
10ad53: e8 a5 fc ff ff call 10a9fd <check_and_merge>
10ad58: 83 c4 10 add $0x10,%esp
}
}
rtems_status_code rtems_rbheap_free(rtems_rbheap_control *control, void *ptr)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
10ad5b: 31 c0 xor %eax,%eax
10ad5d: eb 05 jmp 10ad64 <rtems_rbheap_free+0xe6>
check_and_merge(free_chain, chunk_tree, chunk, pred);
} else {
sc = RTEMS_INCORRECT_STATE;
}
} else {
sc = RTEMS_INVALID_ID;
10ad5f: b8 04 00 00 00 mov $0x4,%eax
}
}
return sc;
}
10ad64: 8d 65 f4 lea -0xc(%ebp),%esp
10ad67: 5b pop %ebx
10ad68: 5e pop %esi
10ad69: 5f pop %edi
10ad6a: 5d pop %ebp
10ad6b: c3 ret
00119154 <rtems_rfs_bitmap_create_search>:
int
rtems_rfs_bitmap_create_search (rtems_rfs_bitmap_control* control)
{
119154: 55 push %ebp
119155: 89 e5 mov %esp,%ebp
119157: 57 push %edi
119158: 56 push %esi
119159: 53 push %ebx
11915a: 83 ec 2c sub $0x2c,%esp
11915d: 8b 5d 08 mov 0x8(%ebp),%ebx
rtems_rfs_bitmap_map map;
size_t size;
rtems_rfs_bitmap_bit bit;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
119160: 8d 55 e4 lea -0x1c(%ebp),%edx
119163: 89 d8 mov %ebx,%eax
119165: e8 e6 fa ff ff call 118c50 <rtems_rfs_bitmap_load_map>
if (rc > 0)
11916a: 85 c0 test %eax,%eax
11916c: 0f 8f 91 00 00 00 jg 119203 <rtems_rfs_bitmap_create_search+0xaf><== NEVER TAKEN
return rc;
control->free = 0;
119172: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx)
search_map = control->search_bits;
119179: 8b 7b 14 mov 0x14(%ebx),%edi
size = control->size;
11917c: 8b 73 0c mov 0xc(%ebx),%esi
bit = 0;
*search_map = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
11917f: c7 07 ff ff ff ff movl $0xffffffff,(%edi)
119185: 8b 55 e4 mov -0x1c(%ebp),%edx
119188: 89 55 d0 mov %edx,-0x30(%ebp)
return rc;
control->free = 0;
search_map = control->search_bits;
size = control->size;
bit = 0;
11918b: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp)
*search_map = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
while (size)
119192: eb 69 jmp 1191fd <rtems_rfs_bitmap_create_search+0xa9>
{
rtems_rfs_bitmap_element bits;
int available;
if (size < rtems_rfs_bitmap_element_bits ())
119194: 83 fe 1f cmp $0x1f,%esi
119197: 77 17 ja 1191b0 <rtems_rfs_bitmap_create_search+0x5c>
{
bits = rtems_rfs_bitmap_merge (*map,
119199: 50 push %eax
11919a: 50 push %eax
11919b: 56 push %esi
11919c: 6a 00 push $0x0
11919e: e8 f7 fc ff ff call 118e9a <rtems_rfs_bitmap_mask_section>
1191a3: 83 c4 10 add $0x10,%esp
{
/*
* Use the normal bit operators because we do not change the bits just merge
* the 2 separate parts.
*/
bits1 &= mask;
1191a6: 8b 55 d0 mov -0x30(%ebp),%edx
1191a9: 23 02 and (%edx),%eax
if (size < rtems_rfs_bitmap_element_bits ())
{
bits = rtems_rfs_bitmap_merge (*map,
RTEMS_RFS_BITMAP_ELEMENT_SET,
rtems_rfs_bitmap_mask_section (0, size));
available = size;
1191ab: 89 75 c8 mov %esi,-0x38(%ebp)
1191ae: eb 0c jmp 1191bc <rtems_rfs_bitmap_create_search+0x68>
}
else
{
bits = *map;
1191b0: 8b 55 d0 mov -0x30(%ebp),%edx
1191b3: 8b 02 mov (%edx),%eax
available = rtems_rfs_bitmap_element_bits ();
1191b5: c7 45 c8 20 00 00 00 movl $0x20,-0x38(%ebp)
}
if (rtems_rfs_bitmap_match (bits, RTEMS_RFS_BITMAP_ELEMENT_SET))
1191bc: 85 c0 test %eax,%eax
1191be: 75 0b jne 1191cb <rtems_rfs_bitmap_create_search+0x77>
for (b = 0; b < available; b++)
if (!rtems_rfs_bitmap_test (bits, b))
control->free++;
}
size -= available;
1191c0: 2b 75 c8 sub -0x38(%ebp),%esi
if (bit == rtems_rfs_bitmap_element_bits ())
1191c3: 83 7d d4 20 cmpl $0x20,-0x2c(%ebp)
1191c7: 75 2d jne 1191f6 <rtems_rfs_bitmap_create_search+0xa2>
1191c9: eb 18 jmp 1191e3 <rtems_rfs_bitmap_create_search+0x8f>
{
bits = *map;
available = rtems_rfs_bitmap_element_bits ();
}
if (rtems_rfs_bitmap_match (bits, RTEMS_RFS_BITMAP_ELEMENT_SET))
1191cb: 31 c9 xor %ecx,%ecx
*/
static bool
rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_bit bit)
{
return RTEMS_RFS_BITMAP_TEST_BIT (target, bit);
1191cd: ba 01 00 00 00 mov $0x1,%edx
1191d2: d3 e2 shl %cl,%edx
rtems_rfs_bitmap_set (*search_map, bit);
else
{
int b;
for (b = 0; b < available; b++)
if (!rtems_rfs_bitmap_test (bits, b))
1191d4: 85 c2 test %eax,%edx
1191d6: 74 03 je 1191db <rtems_rfs_bitmap_create_search+0x87>
control->free++;
1191d8: ff 43 10 incl 0x10(%ebx)
if (rtems_rfs_bitmap_match (bits, RTEMS_RFS_BITMAP_ELEMENT_SET))
rtems_rfs_bitmap_set (*search_map, bit);
else
{
int b;
for (b = 0; b < available; b++)
1191db: 41 inc %ecx
1191dc: 3b 4d c8 cmp -0x38(%ebp),%ecx
1191df: 7c ec jl 1191cd <rtems_rfs_bitmap_create_search+0x79>
1191e1: eb dd jmp 1191c0 <rtems_rfs_bitmap_create_search+0x6c>
if (bit == rtems_rfs_bitmap_element_bits ())
{
bit = 0;
search_map++;
*search_map = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
1191e3: c7 47 04 ff ff ff ff movl $0xffffffff,0x4(%edi)
size -= available;
if (bit == rtems_rfs_bitmap_element_bits ())
{
bit = 0;
search_map++;
1191ea: 83 c7 04 add $0x4,%edi
size -= available;
if (bit == rtems_rfs_bitmap_element_bits ())
{
bit = 0;
1191ed: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp)
1191f4: eb 03 jmp 1191f9 <rtems_rfs_bitmap_create_search+0xa5>
search_map++;
*search_map = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
}
else
bit++;
1191f6: ff 45 d4 incl -0x2c(%ebp)
1191f9: 83 45 d0 04 addl $0x4,-0x30(%ebp)
search_map = control->search_bits;
size = control->size;
bit = 0;
*search_map = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
while (size)
1191fd: 85 f6 test %esi,%esi
1191ff: 75 93 jne 119194 <rtems_rfs_bitmap_create_search+0x40>
else
bit++;
map++;
}
return 0;
119201: 31 c0 xor %eax,%eax
}
119203: 8d 65 f4 lea -0xc(%ebp),%esp
119206: 5b pop %ebx
119207: 5e pop %esi
119208: 5f pop %edi
119209: 5d pop %ebp
11920a: c3 ret
00118c50 <rtems_rfs_bitmap_load_map>:
* @return int The error number (errno). No error if 0.
*/
static int
rtems_rfs_bitmap_load_map (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_map* map)
{
118c50: 55 push %ebp
118c51: 89 e5 mov %esp,%ebp
118c53: 56 push %esi
118c54: 53 push %ebx
118c55: 89 c3 mov %eax,%ebx
int rc;
if (!control->buffer)
return ENXIO;
118c57: b8 06 00 00 00 mov $0x6,%eax
rtems_rfs_bitmap_load_map (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_map* map)
{
int rc;
if (!control->buffer)
118c5c: 83 3b 00 cmpl $0x0,(%ebx)
118c5f: 74 2a je 118c8b <rtems_rfs_bitmap_load_map+0x3b><== NEVER TAKEN
118c61: 89 d6 mov %edx,%esi
return ENXIO;
*map = NULL;
118c63: c7 02 00 00 00 00 movl $0x0,(%edx)
rc = rtems_rfs_buffer_handle_request (control->fs,
118c69: 6a 01 push $0x1
118c6b: ff 73 08 pushl 0x8(%ebx)
118c6e: ff 33 pushl (%ebx)
118c70: ff 73 04 pushl 0x4(%ebx)
118c73: e8 32 16 00 00 call 11a2aa <rtems_rfs_buffer_handle_request>
control->buffer,
control->block,
true);
if (rc)
118c78: 83 c4 10 add $0x10,%esp
118c7b: 85 c0 test %eax,%eax
118c7d: 75 0c jne 118c8b <rtems_rfs_bitmap_load_map+0x3b><== NEVER TAKEN
return rc;
*map = rtems_rfs_buffer_data (control->buffer);
118c7f: 8b 13 mov (%ebx),%edx
118c81: 8b 52 08 mov 0x8(%edx),%edx
118c84: 8b 52 1c mov 0x1c(%edx),%edx
118c87: 89 16 mov %edx,(%esi)
118c89: eb 00 jmp 118c8b <rtems_rfs_bitmap_load_map+0x3b>
return 0;
}
118c8b: 8d 65 f8 lea -0x8(%ebp),%esp
118c8e: 5b pop %ebx
118c8f: 5e pop %esi
118c90: 5d pop %ebp
118c91: c3 ret
001190ab <rtems_rfs_bitmap_map_alloc>:
int
rtems_rfs_bitmap_map_alloc (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_bit seed,
bool* allocated,
rtems_rfs_bitmap_bit* bit)
{
1190ab: 55 push %ebp
1190ac: 89 e5 mov %esp,%ebp
1190ae: 57 push %edi
1190af: 56 push %esi
1190b0: 53 push %ebx
1190b1: 83 ec 0c sub $0xc,%esp
1190b4: 8b 5d 08 mov 0x8(%ebp),%ebx
int rc = 0;
/*
* By default we assume the allocation failed.
*/
*allocated = false;
1190b7: 8b 45 10 mov 0x10(%ebp),%eax
1190ba: c6 00 00 movb $0x0,(%eax)
* seed up then from the seed down a window number of bits, then repeat the
* process from the window distance from the seed, again above then
* below. Keep moving out until all bits have been searched.
*/
upper_seed = seed;
lower_seed = seed;
1190bd: 8b 7d 0c mov 0xc(%ebp),%edi
* of bits from the original seed above then below. That is search from the
* seed up then from the seed down a window number of bits, then repeat the
* process from the window distance from the seed, again above then
* below. Keep moving out until all bits have been searched.
*/
upper_seed = seed;
1190c0: 89 fe mov %edi,%esi
* we have searched all of the map. The seed may not be aligned to a window
* boundary so we may need to search a partial window and this may also not
* be balanced for the upper or lower seeds. We move to the limits, search
* then return false if no clear bits are found.
*/
while (((upper_seed >= 0) && (upper_seed < control->size))
1190c2: eb 70 jmp 119134 <rtems_rfs_bitmap_map_alloc+0x89>
|| ((lower_seed >= 0) && (lower_seed < control->size)))
{
/*
* Search up first so bits allocated in succession are grouped together.
*/
if (upper_seed < control->size)
1190c4: 3b 73 0c cmp 0xc(%ebx),%esi
1190c7: 72 06 jb 1190cf <rtems_rfs_bitmap_map_alloc+0x24>
window, 1);
if ((rc > 0) || *allocated)
break;
}
if (lower_seed >= 0)
1190c9: 85 ff test %edi,%edi
1190cb: 79 30 jns 1190fd <rtems_rfs_bitmap_map_alloc+0x52>
1190cd: eb 27 jmp 1190f6 <rtems_rfs_bitmap_map_alloc+0x4b>
/*
* Search up first so bits allocated in succession are grouped together.
*/
if (upper_seed < control->size)
{
*bit = upper_seed;
1190cf: 8b 45 14 mov 0x14(%ebp),%eax
1190d2: 89 30 mov %esi,(%eax)
rc = rtems_rfs_search_map_for_clear_bit (control, bit, allocated,
1190d4: 83 ec 0c sub $0xc,%esp
1190d7: 6a 01 push $0x1
1190d9: 8b 4d 10 mov 0x10(%ebp),%ecx
1190dc: 89 c2 mov %eax,%edx
1190de: 89 d8 mov %ebx,%eax
1190e0: e8 ad fb ff ff call 118c92 <rtems_rfs_search_map_for_clear_bit.constprop.1>
window, 1);
if ((rc > 0) || *allocated)
1190e5: 83 c4 10 add $0x10,%esp
1190e8: 85 c0 test %eax,%eax
1190ea: 7f 5e jg 11914a <rtems_rfs_bitmap_map_alloc+0x9f><== NEVER TAKEN
1190ec: 8b 45 10 mov 0x10(%ebp),%eax
1190ef: 80 38 00 cmpb $0x0,(%eax)
1190f2: 74 d5 je 1190c9 <rtems_rfs_bitmap_map_alloc+0x1e>
1190f4: eb 54 jmp 11914a <rtems_rfs_bitmap_map_alloc+0x9f>
/*
* Do not bound the limits at the edges of the map. Do not update if an
* edge has been passed.
*/
if (upper_seed < control->size)
1190f6: 3b 73 0c cmp 0xc(%ebx),%esi
1190f9: 72 29 jb 119124 <rtems_rfs_bitmap_map_alloc+0x79>
1190fb: eb 2d jmp 11912a <rtems_rfs_bitmap_map_alloc+0x7f>
break;
}
if (lower_seed >= 0)
{
*bit = lower_seed;
1190fd: 8b 45 14 mov 0x14(%ebp),%eax
119100: 89 38 mov %edi,(%eax)
rc = rtems_rfs_search_map_for_clear_bit (control, bit, allocated,
119102: 83 ec 0c sub $0xc,%esp
119105: 6a ff push $0xffffffff
119107: 8b 4d 10 mov 0x10(%ebp),%ecx
11910a: 89 c2 mov %eax,%edx
11910c: 89 d8 mov %ebx,%eax
11910e: e8 7f fb ff ff call 118c92 <rtems_rfs_search_map_for_clear_bit.constprop.1>
window, -1);
if ((rc > 0) || *allocated)
119113: 83 c4 10 add $0x10,%esp
119116: 85 c0 test %eax,%eax
119118: 7f 30 jg 11914a <rtems_rfs_bitmap_map_alloc+0x9f><== NEVER TAKEN
11911a: 8b 45 10 mov 0x10(%ebp),%eax
11911d: 80 38 00 cmpb $0x0,(%eax)
119120: 74 d4 je 1190f6 <rtems_rfs_bitmap_map_alloc+0x4b>
119122: eb 26 jmp 11914a <rtems_rfs_bitmap_map_alloc+0x9f>
/*
* Do not bound the limits at the edges of the map. Do not update if an
* edge has been passed.
*/
if (upper_seed < control->size)
upper_seed += window;
119124: 81 c6 00 08 00 00 add $0x800,%esi
if (lower_seed >= 0)
11912a: 85 ff test %edi,%edi
11912c: 78 06 js 119134 <rtems_rfs_bitmap_map_alloc+0x89>
lower_seed -= window;
11912e: 81 ef 00 08 00 00 sub $0x800,%edi
* we have searched all of the map. The seed may not be aligned to a window
* boundary so we may need to search a partial window and this may also not
* be balanced for the upper or lower seeds. We move to the limits, search
* then return false if no clear bits are found.
*/
while (((upper_seed >= 0) && (upper_seed < control->size))
119134: 85 f6 test %esi,%esi
119136: 78 05 js 11913d <rtems_rfs_bitmap_map_alloc+0x92>
119138: 3b 73 0c cmp 0xc(%ebx),%esi
11913b: 72 87 jb 1190c4 <rtems_rfs_bitmap_map_alloc+0x19>
|| ((lower_seed >= 0) && (lower_seed < control->size)))
11913d: 85 ff test %edi,%edi
11913f: 78 09 js 11914a <rtems_rfs_bitmap_map_alloc+0x9f>
119141: 3b 7b 0c cmp 0xc(%ebx),%edi
119144: 0f 82 7a ff ff ff jb 1190c4 <rtems_rfs_bitmap_map_alloc+0x19>
if (lower_seed >= 0)
lower_seed -= window;
}
return 0;
}
11914a: 31 c0 xor %eax,%eax
11914c: 8d 65 f4 lea -0xc(%ebp),%esp
11914f: 5b pop %ebx
119150: 5e pop %esi
119151: 5f pop %edi
119152: 5d pop %ebp
119153: c3 ret
00118f2b <rtems_rfs_bitmap_map_clear>:
int
rtems_rfs_bitmap_map_clear (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_bit bit)
{
118f2b: 55 push %ebp
118f2c: 89 e5 mov %esp,%ebp
118f2e: 57 push %edi
118f2f: 56 push %esi
118f30: 53 push %ebx
118f31: 83 ec 2c sub $0x2c,%esp
118f34: 8b 5d 08 mov 0x8(%ebp),%ebx
rtems_rfs_bitmap_map map;
rtems_rfs_bitmap_map search_map;
int index;
int offset;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
118f37: 8d 55 e4 lea -0x1c(%ebp),%edx
118f3a: 89 d8 mov %ebx,%eax
118f3c: e8 0f fd ff ff call 118c50 <rtems_rfs_bitmap_load_map>
if (rc > 0)
118f41: 85 c0 test %eax,%eax
118f43: 7f 3c jg 118f81 <rtems_rfs_bitmap_map_clear+0x56><== NEVER TAKEN
return rc;
if (bit >= control->size)
return EINVAL;
118f45: b8 16 00 00 00 mov $0x16,%eax
int offset;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
if (bit >= control->size)
118f4a: 8b 4d 0c mov 0xc(%ebp),%ecx
118f4d: 3b 4b 0c cmp 0xc(%ebx),%ecx
118f50: 73 2f jae 118f81 <rtems_rfs_bitmap_map_clear+0x56>
return EINVAL;
search_map = control->search_bits;
index = rtems_rfs_bitmap_map_index (bit);
118f52: 89 c8 mov %ecx,%eax
118f54: c1 f8 05 sar $0x5,%eax
offset = rtems_rfs_bitmap_map_offset (bit);
map[index] = rtems_rfs_bitmap_clear (map[index], 1 << offset);
118f57: 8b 7d e4 mov -0x1c(%ebp),%edi
118f5a: ba 01 00 00 00 mov $0x1,%edx
118f5f: 89 d6 mov %edx,%esi
118f61: d3 e6 shl %cl,%esi
*/
static rtems_rfs_bitmap_element
rtems_rfs_bitmap_clear (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_element bits)
{
return RTEMS_RFS_BITMAP_CLEAR_BITS (target, bits);
118f63: 09 34 87 or %esi,(%edi,%eax,4)
search_map = control->search_bits;
index = rtems_rfs_bitmap_map_index (bit);
offset = rtems_rfs_bitmap_map_offset (bit);
map[index] = rtems_rfs_bitmap_clear (map[index], 1 << offset);
bit = index;
index = rtems_rfs_bitmap_map_index (bit);
118f66: 89 ce mov %ecx,%esi
118f68: c1 fe 0a sar $0xa,%esi
offset = rtems_rfs_bitmap_map_offset(bit);
search_map[index] = rtems_rfs_bitmap_clear (search_map[index], 1 << offset);
118f6b: 88 c1 mov %al,%cl
118f6d: d3 e2 shl %cl,%edx
118f6f: 89 d0 mov %edx,%eax
*/
static rtems_rfs_bitmap_element
rtems_rfs_bitmap_clear (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_element bits)
{
return RTEMS_RFS_BITMAP_CLEAR_BITS (target, bits);
118f71: 8b 53 14 mov 0x14(%ebx),%edx
118f74: 09 04 b2 or %eax,(%edx,%esi,4)
map[index] = rtems_rfs_bitmap_clear (map[index], 1 << offset);
bit = index;
index = rtems_rfs_bitmap_map_index (bit);
offset = rtems_rfs_bitmap_map_offset(bit);
search_map[index] = rtems_rfs_bitmap_clear (search_map[index], 1 << offset);
rtems_rfs_buffer_mark_dirty (control->buffer);
118f77: 8b 03 mov (%ebx),%eax
118f79: c6 00 01 movb $0x1,(%eax)
control->free++;
118f7c: ff 43 10 incl 0x10(%ebx)
return 0;
118f7f: 31 c0 xor %eax,%eax
}
118f81: 83 c4 2c add $0x2c,%esp
118f84: 5b pop %ebx
118f85: 5e pop %esi
118f86: 5f pop %edi
118f87: 5d pop %ebp
118f88: c3 ret
00119033 <rtems_rfs_bitmap_map_clear_all>:
int
rtems_rfs_bitmap_map_clear_all (rtems_rfs_bitmap_control* control)
{
119033: 55 push %ebp
119034: 89 e5 mov %esp,%ebp
119036: 56 push %esi
119037: 53 push %ebx
119038: 83 ec 10 sub $0x10,%esp
11903b: 8b 5d 08 mov 0x8(%ebp),%ebx
rtems_rfs_bitmap_bit last_search_bit;
size_t elements;
int e;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
11903e: 8d 55 f4 lea -0xc(%ebp),%edx
119041: 89 d8 mov %ebx,%eax
119043: e8 08 fc ff ff call 118c50 <rtems_rfs_bitmap_load_map>
if (rc > 0)
119048: 85 c0 test %eax,%eax
11904a: 7f 58 jg 1190a4 <rtems_rfs_bitmap_map_clear_all+0x71><== NEVER TAKEN
return rc;
elements = rtems_rfs_bitmap_elements (control->size);
11904c: 8b 43 0c mov 0xc(%ebx),%eax
11904f: 48 dec %eax
119050: c1 e8 05 shr $0x5,%eax
119053: 8d 50 01 lea 0x1(%eax),%edx
control->free = elements;
119056: 89 53 10 mov %edx,0x10(%ebx)
for (e = 0; e < elements; e++)
map[e] = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
119059: 8b 75 f4 mov -0xc(%ebp),%esi
elements = rtems_rfs_bitmap_elements (control->size);
control->free = elements;
for (e = 0; e < elements; e++)
11905c: 31 c9 xor %ecx,%ecx
11905e: eb 08 jmp 119068 <rtems_rfs_bitmap_map_clear_all+0x35>
map[e] = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
119060: c7 04 8e ff ff ff ff movl $0xffffffff,(%esi,%ecx,4)
elements = rtems_rfs_bitmap_elements (control->size);
control->free = elements;
for (e = 0; e < elements; e++)
119067: 41 inc %ecx
119068: 39 d1 cmp %edx,%ecx
11906a: 72 f4 jb 119060 <rtems_rfs_bitmap_map_clear_all+0x2d>
* Set the un-mapped bits in the last search element so the available logic
* works.
*/
last_search_bit = rtems_rfs_bitmap_map_offset (elements);
if (last_search_bit == 0)
11906c: 83 e2 1f and $0x1f,%edx
11906f: 75 05 jne 119076 <rtems_rfs_bitmap_map_clear_all+0x43>
last_search_bit = rtems_rfs_bitmap_element_bits ();
119071: ba 20 00 00 00 mov $0x20,%edx
elements = rtems_rfs_bitmap_elements (elements);
119076: 89 c1 mov %eax,%ecx
119078: c1 e9 05 shr $0x5,%ecx
for (e = 0; e < (elements - 1); e++)
11907b: 31 c0 xor %eax,%eax
11907d: eb 08 jmp 119087 <rtems_rfs_bitmap_map_clear_all+0x54>
control->search_bits[e] = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
11907f: c7 04 86 ff ff ff ff movl $0xffffffff,(%esi,%eax,4)
if (last_search_bit == 0)
last_search_bit = rtems_rfs_bitmap_element_bits ();
elements = rtems_rfs_bitmap_elements (elements);
for (e = 0; e < (elements - 1); e++)
119086: 40 inc %eax
119087: 39 c8 cmp %ecx,%eax
119089: 8b 73 14 mov 0x14(%ebx),%esi
11908c: 75 f1 jne 11907f <rtems_rfs_bitmap_map_clear_all+0x4c>
rtems_rfs_bitmap_element
rtems_rfs_bitmap_mask (unsigned int size)
{
rtems_rfs_bitmap_element mask = RTEMS_RFS_BITMAP_ELEMENT_FULL_MASK;
mask >>= (rtems_rfs_bitmap_element_bits () - size);
11908e: b9 20 00 00 00 mov $0x20,%ecx
119093: 29 d1 sub %edx,%ecx
119095: 83 ca ff or $0xffffffff,%edx
119098: d3 ea shr %cl,%edx
11909a: 89 14 86 mov %edx,(%esi,%eax,4)
control->search_bits[elements - 1] =
rtems_rfs_bitmap_merge (RTEMS_RFS_BITMAP_ELEMENT_CLEAR,
RTEMS_RFS_BITMAP_ELEMENT_SET,
rtems_rfs_bitmap_mask (last_search_bit));
rtems_rfs_buffer_mark_dirty (control->buffer);
11909d: 8b 03 mov (%ebx),%eax
11909f: c6 00 01 movb $0x1,(%eax)
return 0;
1190a2: 31 c0 xor %eax,%eax
}
1190a4: 83 c4 10 add $0x10,%esp
1190a7: 5b pop %ebx
1190a8: 5e pop %esi
1190a9: 5d pop %ebp
1190aa: c3 ret
00118ebb <rtems_rfs_bitmap_map_set>:
int
rtems_rfs_bitmap_map_set (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_bit bit)
{
118ebb: 55 push %ebp
118ebc: 89 e5 mov %esp,%ebp
118ebe: 57 push %edi
118ebf: 56 push %esi
118ec0: 53 push %ebx
118ec1: 83 ec 2c sub $0x2c,%esp
118ec4: 8b 5d 08 mov 0x8(%ebp),%ebx
rtems_rfs_bitmap_map map;
rtems_rfs_bitmap_map search_map;
int index;
int offset;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
118ec7: 8d 55 e4 lea -0x1c(%ebp),%edx
118eca: 89 d8 mov %ebx,%eax
118ecc: e8 7f fd ff ff call 118c50 <rtems_rfs_bitmap_load_map>
if (rc > 0)
118ed1: 85 c0 test %eax,%eax
118ed3: 7f 4e jg 118f23 <rtems_rfs_bitmap_map_set+0x68><== NEVER TAKEN
return rc;
if (bit >= control->size)
return EINVAL;
118ed5: b8 16 00 00 00 mov $0x16,%eax
int offset;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
if (bit >= control->size)
118eda: 8b 4d 0c mov 0xc(%ebp),%ecx
118edd: 3b 4b 0c cmp 0xc(%ebx),%ecx
118ee0: 73 41 jae 118f23 <rtems_rfs_bitmap_map_set+0x68>
return EINVAL;
search_map = control->search_bits;
118ee2: 8b 53 14 mov 0x14(%ebx),%edx
index = rtems_rfs_bitmap_map_index (bit);
118ee5: c1 f9 05 sar $0x5,%ecx
118ee8: 89 4d d4 mov %ecx,-0x2c(%ebp)
offset = rtems_rfs_bitmap_map_offset (bit);
map[index] = rtems_rfs_bitmap_set (map[index], 1 << offset);
118eeb: 8b 45 e4 mov -0x1c(%ebp),%eax
118eee: 8d 04 88 lea (%eax,%ecx,4),%eax
118ef1: bf 01 00 00 00 mov $0x1,%edi
118ef6: 89 fe mov %edi,%esi
118ef8: 8a 4d 0c mov 0xc(%ebp),%cl
118efb: d3 e6 shl %cl,%esi
*/
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);
118efd: f7 d6 not %esi
118eff: 8b 08 mov (%eax),%ecx
118f01: 21 ce and %ecx,%esi
if (bit >= control->size)
return EINVAL;
search_map = control->search_bits;
index = rtems_rfs_bitmap_map_index (bit);
offset = rtems_rfs_bitmap_map_offset (bit);
map[index] = rtems_rfs_bitmap_set (map[index], 1 << offset);
118f03: 89 30 mov %esi,(%eax)
offset = rtems_rfs_bitmap_map_offset (bit);
search_map[index] = rtems_rfs_bitmap_set (search_map[index], 1 << offset);
control->free--;
rtems_rfs_buffer_mark_dirty (control->buffer);
}
return 0;
118f05: 31 c0 xor %eax,%eax
return EINVAL;
search_map = control->search_bits;
index = rtems_rfs_bitmap_map_index (bit);
offset = rtems_rfs_bitmap_map_offset (bit);
map[index] = rtems_rfs_bitmap_set (map[index], 1 << offset);
if (rtems_rfs_bitmap_match(map[index], RTEMS_RFS_BITMAP_ELEMENT_SET))
118f07: 85 f6 test %esi,%esi
118f09: 75 18 jne 118f23 <rtems_rfs_bitmap_map_set+0x68>
{
bit = index;
index = rtems_rfs_bitmap_map_index (bit);
118f0b: 8b 75 0c mov 0xc(%ebp),%esi
118f0e: c1 fe 0a sar $0xa,%esi
offset = rtems_rfs_bitmap_map_offset (bit);
search_map[index] = rtems_rfs_bitmap_set (search_map[index], 1 << offset);
118f11: 8a 4d d4 mov -0x2c(%ebp),%cl
118f14: d3 e7 shl %cl,%edi
*/
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);
118f16: f7 d7 not %edi
118f18: 21 3c b2 and %edi,(%edx,%esi,4)
{
bit = index;
index = rtems_rfs_bitmap_map_index (bit);
offset = rtems_rfs_bitmap_map_offset (bit);
search_map[index] = rtems_rfs_bitmap_set (search_map[index], 1 << offset);
control->free--;
118f1b: ff 4b 10 decl 0x10(%ebx)
rtems_rfs_buffer_mark_dirty (control->buffer);
118f1e: 8b 13 mov (%ebx),%edx
118f20: c6 02 01 movb $0x1,(%edx)
}
return 0;
}
118f23: 83 c4 2c add $0x2c,%esp
118f26: 5b pop %ebx
118f27: 5e pop %esi
118f28: 5f pop %edi
118f29: 5d pop %ebp
118f2a: c3 ret
00118fcf <rtems_rfs_bitmap_map_set_all>:
int
rtems_rfs_bitmap_map_set_all (rtems_rfs_bitmap_control* control)
{
118fcf: 55 push %ebp
118fd0: 89 e5 mov %esp,%ebp
118fd2: 56 push %esi
118fd3: 53 push %ebx
118fd4: 83 ec 10 sub $0x10,%esp
118fd7: 8b 5d 08 mov 0x8(%ebp),%ebx
rtems_rfs_bitmap_map map;
size_t elements;
int e;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
118fda: 8d 55 f4 lea -0xc(%ebp),%edx
118fdd: 89 d8 mov %ebx,%eax
118fdf: e8 6c fc ff ff call 118c50 <rtems_rfs_bitmap_load_map>
if (rc > 0)
118fe4: 85 c0 test %eax,%eax
118fe6: 7f 44 jg 11902c <rtems_rfs_bitmap_map_set_all+0x5d><== NEVER TAKEN
return rc;
elements = rtems_rfs_bitmap_elements (control->size);
118fe8: 8b 43 0c mov 0xc(%ebx),%eax
118feb: 48 dec %eax
118fec: c1 e8 05 shr $0x5,%eax
118fef: 8d 48 01 lea 0x1(%eax),%ecx
control->free = 0;
118ff2: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx)
for (e = 0; e < elements; e++)
map[e] = RTEMS_RFS_BITMAP_ELEMENT_SET;
118ff9: 8b 75 f4 mov -0xc(%ebp),%esi
elements = rtems_rfs_bitmap_elements (control->size);
control->free = 0;
for (e = 0; e < elements; e++)
118ffc: 31 d2 xor %edx,%edx
118ffe: eb 08 jmp 119008 <rtems_rfs_bitmap_map_set_all+0x39>
map[e] = RTEMS_RFS_BITMAP_ELEMENT_SET;
119000: c7 04 96 00 00 00 00 movl $0x0,(%esi,%edx,4)
elements = rtems_rfs_bitmap_elements (control->size);
control->free = 0;
for (e = 0; e < elements; e++)
119007: 42 inc %edx
119008: 39 ca cmp %ecx,%edx
11900a: 72 f4 jb 119000 <rtems_rfs_bitmap_map_set_all+0x31>
map[e] = RTEMS_RFS_BITMAP_ELEMENT_SET;
elements = rtems_rfs_bitmap_elements (elements);
11900c: c1 e8 05 shr $0x5,%eax
11900f: 8d 50 01 lea 0x1(%eax),%edx
for (e = 0; e < elements; e++)
119012: 31 c0 xor %eax,%eax
119014: eb 0b jmp 119021 <rtems_rfs_bitmap_map_set_all+0x52>
control->search_bits[e] = RTEMS_RFS_BITMAP_ELEMENT_SET;
119016: 8b 4b 14 mov 0x14(%ebx),%ecx
119019: c7 04 81 00 00 00 00 movl $0x0,(%ecx,%eax,4)
for (e = 0; e < elements; e++)
map[e] = RTEMS_RFS_BITMAP_ELEMENT_SET;
elements = rtems_rfs_bitmap_elements (elements);
for (e = 0; e < elements; e++)
119020: 40 inc %eax
119021: 39 d0 cmp %edx,%eax
119023: 72 f1 jb 119016 <rtems_rfs_bitmap_map_set_all+0x47>
control->search_bits[e] = RTEMS_RFS_BITMAP_ELEMENT_SET;
rtems_rfs_buffer_mark_dirty (control->buffer);
119025: 8b 03 mov (%ebx),%eax
119027: c6 00 01 movb $0x1,(%eax)
return 0;
11902a: 31 c0 xor %eax,%eax
}
11902c: 83 c4 10 add $0x10,%esp
11902f: 5b pop %ebx
119030: 5e pop %esi
119031: 5d pop %ebp
119032: c3 ret
00118f89 <rtems_rfs_bitmap_map_test>:
int
rtems_rfs_bitmap_map_test (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_bit bit,
bool* state)
{
118f89: 55 push %ebp
118f8a: 89 e5 mov %esp,%ebp
118f8c: 56 push %esi
118f8d: 53 push %ebx
118f8e: 83 ec 10 sub $0x10,%esp
118f91: 8b 75 08 mov 0x8(%ebp),%esi
118f94: 8b 5d 0c mov 0xc(%ebp),%ebx
rtems_rfs_bitmap_map map;
int index;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
118f97: 8d 55 f4 lea -0xc(%ebp),%edx
118f9a: 89 f0 mov %esi,%eax
118f9c: e8 af fc ff ff call 118c50 <rtems_rfs_bitmap_load_map>
if (rc > 0)
118fa1: 85 c0 test %eax,%eax
118fa3: 7f 23 jg 118fc8 <rtems_rfs_bitmap_map_test+0x3f><== NEVER TAKEN
return rc;
if (bit >= control->size)
return EINVAL;
118fa5: b8 16 00 00 00 mov $0x16,%eax
int index;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
if (bit >= control->size)
118faa: 3b 5e 0c cmp 0xc(%esi),%ebx
118fad: 73 19 jae 118fc8 <rtems_rfs_bitmap_map_test+0x3f>
return EINVAL;
index = rtems_rfs_bitmap_map_index (bit);
118faf: 89 da mov %ebx,%edx
118fb1: c1 fa 05 sar $0x5,%edx
*/
static bool
rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_bit bit)
{
return RTEMS_RFS_BITMAP_TEST_BIT (target, bit);
118fb4: b0 01 mov $0x1,%al
118fb6: 88 d9 mov %bl,%cl
118fb8: d3 e0 shl %cl,%eax
118fba: 8b 4d f4 mov -0xc(%ebp),%ecx
118fbd: 85 04 91 test %eax,(%ecx,%edx,4)
if (rc > 0)
return rc;
if (bit >= control->size)
return EINVAL;
index = rtems_rfs_bitmap_map_index (bit);
*state = rtems_rfs_bitmap_test (map[index], bit);
118fc0: 8b 45 10 mov 0x10(%ebp),%eax
118fc3: 0f 94 00 sete (%eax)
return 0;
118fc6: 31 c0 xor %eax,%eax
}
118fc8: 83 c4 10 add $0x10,%esp
118fcb: 5b pop %ebx
118fcc: 5e pop %esi
118fcd: 5d pop %ebp
118fce: c3 ret
00118e88 <rtems_rfs_bitmap_mask>:
return 0;
}
rtems_rfs_bitmap_element
rtems_rfs_bitmap_mask (unsigned int size)
{
118e88: 55 push %ebp <== NOT EXECUTED
118e89: 89 e5 mov %esp,%ebp <== NOT EXECUTED
rtems_rfs_bitmap_element mask = RTEMS_RFS_BITMAP_ELEMENT_FULL_MASK;
mask >>= (rtems_rfs_bitmap_element_bits () - size);
118e8b: b9 20 00 00 00 mov $0x20,%ecx <== NOT EXECUTED
118e90: 2b 4d 08 sub 0x8(%ebp),%ecx <== NOT EXECUTED
118e93: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
118e96: d3 e8 shr %cl,%eax <== NOT EXECUTED
return mask;
}
118e98: 5d pop %ebp <== NOT EXECUTED
118e99: c3 ret <== NOT EXECUTED
00118e9a <rtems_rfs_bitmap_mask_section>:
rtems_rfs_bitmap_element
rtems_rfs_bitmap_mask_section (unsigned int start, unsigned int end)
{
118e9a: 55 push %ebp
118e9b: 89 e5 mov %esp,%ebp
118e9d: 8b 55 08 mov 0x8(%ebp),%edx
118ea0: 8b 4d 0c mov 0xc(%ebp),%ecx
rtems_rfs_bitmap_element mask = 0;
118ea3: 31 c0 xor %eax,%eax
if (end > start)
118ea5: 39 d1 cmp %edx,%ecx
118ea7: 76 10 jbe 118eb9 <rtems_rfs_bitmap_mask_section+0x1f><== NEVER TAKEN
rtems_rfs_bitmap_element
rtems_rfs_bitmap_mask (unsigned int size)
{
rtems_rfs_bitmap_element mask = RTEMS_RFS_BITMAP_ELEMENT_FULL_MASK;
mask >>= (rtems_rfs_bitmap_element_bits () - size);
118ea9: 89 d0 mov %edx,%eax
118eab: 29 c8 sub %ecx,%eax
118ead: 8d 48 20 lea 0x20(%eax),%ecx
118eb0: 83 c8 ff or $0xffffffff,%eax
118eb3: d3 e8 shr %cl,%eax
rtems_rfs_bitmap_element
rtems_rfs_bitmap_mask_section (unsigned int start, unsigned int end)
{
rtems_rfs_bitmap_element mask = 0;
if (end > start)
mask = rtems_rfs_bitmap_mask (end - start) << start;
118eb5: 88 d1 mov %dl,%cl
118eb7: d3 e0 shl %cl,%eax
return mask;
}
118eb9: 5d pop %ebp
118eba: c3 ret
0011920b <rtems_rfs_bitmap_open>:
rtems_rfs_bitmap_open (rtems_rfs_bitmap_control* control,
rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* buffer,
size_t size,
rtems_rfs_buffer_block block)
{
11920b: 55 push %ebp
11920c: 89 e5 mov %esp,%ebp
11920e: 53 push %ebx
11920f: 83 ec 10 sub $0x10,%esp
119212: 8b 5d 08 mov 0x8(%ebp),%ebx
119215: 8b 45 14 mov 0x14(%ebp),%eax
size_t elements = rtems_rfs_bitmap_elements (size);
control->buffer = buffer;
119218: 8b 55 10 mov 0x10(%ebp),%edx
11921b: 89 13 mov %edx,(%ebx)
control->fs = fs;
11921d: 8b 55 0c mov 0xc(%ebp),%edx
119220: 89 53 04 mov %edx,0x4(%ebx)
control->block = block;
119223: 8b 55 18 mov 0x18(%ebp),%edx
119226: 89 53 08 mov %edx,0x8(%ebx)
control->size = size;
119229: 89 43 0c mov %eax,0xc(%ebx)
rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* buffer,
size_t size,
rtems_rfs_buffer_block block)
{
size_t elements = rtems_rfs_bitmap_elements (size);
11922c: 48 dec %eax
control->buffer = buffer;
control->fs = fs;
control->block = block;
control->size = size;
elements = rtems_rfs_bitmap_elements (elements);
11922d: c1 e8 0a shr $0xa,%eax
control->search_bits = malloc (elements * sizeof (rtems_rfs_bitmap_element));
119230: 8d 04 85 04 00 00 00 lea 0x4(,%eax,4),%eax
119237: 50 push %eax
119238: e8 c3 11 ff ff call 10a400 <malloc>
11923d: 89 43 14 mov %eax,0x14(%ebx)
if (!control->search_bits)
119240: 83 c4 10 add $0x10,%esp
119243: 85 c0 test %eax,%eax
119245: 74 0c je 119253 <rtems_rfs_bitmap_open+0x48><== NEVER TAKEN
return ENOMEM;
return rtems_rfs_bitmap_create_search (control);
119247: 89 5d 08 mov %ebx,0x8(%ebp)
}
11924a: 8b 5d fc mov -0x4(%ebp),%ebx
11924d: c9 leave
control->search_bits = malloc (elements * sizeof (rtems_rfs_bitmap_element));
if (!control->search_bits)
return ENOMEM;
return rtems_rfs_bitmap_create_search (control);
11924e: e9 01 ff ff ff jmp 119154 <rtems_rfs_bitmap_create_search>
}
119253: b8 0c 00 00 00 mov $0xc,%eax <== NOT EXECUTED
119258: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
11925b: c9 leave <== NOT EXECUTED
11925c: c3 ret <== NOT EXECUTED
001002ea <rtems_rfs_bitmap_ut_alloc_seq_test>:
bool
rtems_rfs_bitmap_ut_alloc_seq_test (rtems_rfs_bitmap_control* control,
int test,
rtems_rfs_bitmap_bit bit,
size_t size)
{
1002ea: 55 push %ebp
1002eb: 89 e5 mov %esp,%ebp
1002ed: 57 push %edi
1002ee: 56 push %esi
1002ef: 53 push %ebx
1002f0: 83 ec 30 sub $0x30,%esp
1002f3: 8b 5d 0c mov 0xc(%ebp),%ebx
bool state;
int i;
int rc;
printf (" %2d. Set all bits\n", test);
1002f6: 53 push %ebx
1002f7: 68 8b b4 12 00 push $0x12b48b
1002fc: a1 a0 f2 13 00 mov 0x13f2a0,%eax
100301: ff 70 0c pushl 0xc(%eax)
100304: e8 53 e4 01 00 call 11e75c <fiprintf>
rc = rtems_rfs_bitmap_map_set_all (control);
100309: 5e pop %esi
10030a: ff 75 08 pushl 0x8(%ebp)
10030d: e8 e1 f7 00 00 call 10faf3 <rtems_rfs_bitmap_map_set_all>
if (rc > 0)
100312: 83 c4 10 add $0x10,%esp
return true;
}
bool
rtems_rfs_bitmap_ut_alloc_seq_test (rtems_rfs_bitmap_control* control,
100315: 31 f6 xor %esi,%esi
int i;
int rc;
printf (" %2d. Set all bits\n", test);
rc = rtems_rfs_bitmap_map_set_all (control);
if (rc > 0)
100317: 85 c0 test %eax,%eax
100319: 7e 23 jle 10033e <rtems_rfs_bitmap_ut_alloc_seq_test+0x54><== ALWAYS TAKEN
{
printf (" %2d. set all bits: FAIL (%s)\n", test, strerror (rc));
10031b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10031e: 50 push %eax <== NOT EXECUTED
10031f: e8 90 f1 01 00 call 11f4b4 <strerror> <== NOT EXECUTED
100324: 50 push %eax <== NOT EXECUTED
100325: 53 push %ebx <== NOT EXECUTED
100326: 68 9f b4 12 00 push $0x12b49f <== NOT EXECUTED
10032b: eb 69 jmp 100396 <rtems_rfs_bitmap_ut_alloc_seq_test+0xac><== NOT EXECUTED
return false;
}
for (i = 0; i < size; i++)
rtems_rfs_bitmap_map_clear (control, bit + i);
10032d: 51 push %ecx
10032e: 51 push %ecx
10032f: 01 f0 add %esi,%eax
100331: 50 push %eax
100332: ff 75 08 pushl 0x8(%ebp)
100335: e8 15 f7 00 00 call 10fa4f <rtems_rfs_bitmap_map_clear>
{
printf (" %2d. set all bits: FAIL (%s)\n", test, strerror (rc));
return false;
}
for (i = 0; i < size; i++)
10033a: 46 inc %esi
10033b: 83 c4 10 add $0x10,%esp
10033e: 3b 75 14 cmp 0x14(%ebp),%esi
100341: 8b 45 10 mov 0x10(%ebp),%eax
100344: 75 e7 jne 10032d <rtems_rfs_bitmap_ut_alloc_seq_test+0x43>
rtems_rfs_bitmap_map_clear (control, bit + i);
printf (" %2d. Cleared bits (%" PRId32 ", %ld] (%zd)\n",
100346: 52 push %edx
100347: 52 push %edx
100348: ff 75 14 pushl 0x14(%ebp)
10034b: 8b 4d 14 mov 0x14(%ebp),%ecx
10034e: 8d 54 01 ff lea -0x1(%ecx,%eax,1),%edx
100352: 52 push %edx
100353: 50 push %eax
100354: 53 push %ebx
100355: 68 be b4 12 00 push $0x12b4be
10035a: a1 a0 f2 13 00 mov 0x13f2a0,%eax
10035f: ff 70 0c pushl 0xc(%eax)
100362: e8 f5 e3 01 00 call 11e75c <fiprintf>
100367: 83 c4 20 add $0x20,%esp
test, bit, bit + size - 1, size);
for (i = 0; i < rtems_rfs_bitmap_element_bits (); i++)
10036a: 31 f6 xor %esi,%esi
{
rc = rtems_rfs_bitmap_map_test (control, bit + i, &state);
10036c: 8d 7d e6 lea -0x1a(%ebp),%edi
10036f: 50 push %eax
100370: 57 push %edi
100371: 8b 45 10 mov 0x10(%ebp),%eax
100374: 01 f0 add %esi,%eax
100376: 50 push %eax
100377: ff 75 08 pushl 0x8(%ebp)
10037a: e8 2e f7 00 00 call 10faad <rtems_rfs_bitmap_map_test>
if (rc > 0)
10037f: 83 c4 10 add $0x10,%esp
100382: 85 c0 test %eax,%eax
100384: 7e 27 jle 1003ad <rtems_rfs_bitmap_ut_alloc_seq_test+0xc3><== ALWAYS TAKEN
{
printf (" %2d. test bit: FAIL (%s)\n", test, strerror (rc));
100386: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
100389: 50 push %eax <== NOT EXECUTED
10038a: e8 25 f1 01 00 call 11f4b4 <strerror> <== NOT EXECUTED
10038f: 50 push %eax <== NOT EXECUTED
100390: 53 push %ebx <== NOT EXECUTED
100391: 68 e3 b4 12 00 push $0x12b4e3 <== NOT EXECUTED
100396: a1 a0 f2 13 00 mov 0x13f2a0,%eax <== NOT EXECUTED
10039b: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED
10039e: e8 b9 e3 01 00 call 11e75c <fiprintf> <== NOT EXECUTED
1003a3: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
return false;
1003a6: 31 c0 xor %eax,%eax <== NOT EXECUTED
1003a8: e9 c0 00 00 00 jmp 10046d <rtems_rfs_bitmap_ut_alloc_seq_test+0x183><== NOT EXECUTED
}
if (state)
1003ad: 80 7d e6 00 cmpb $0x0,-0x1a(%ebp)
1003b1: 74 1c je 1003cf <rtems_rfs_bitmap_ut_alloc_seq_test+0xe5><== ALWAYS TAKEN
{
printf (" %2d. Cleared bit still set: bit = %" PRId32 "\n", test, bit + i);
1003b3: 03 75 10 add 0x10(%ebp),%esi <== NOT EXECUTED
1003b6: 56 push %esi <== NOT EXECUTED
1003b7: 53 push %ebx <== NOT EXECUTED
1003b8: 68 fe b4 12 00 push $0x12b4fe <== NOT EXECUTED
1003bd: a1 a0 f2 13 00 mov 0x13f2a0,%eax <== NOT EXECUTED
1003c2: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED
1003c5: e8 92 e3 01 00 call 11e75c <fiprintf> <== NOT EXECUTED
1003ca: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1003cd: eb d7 jmp 1003a6 <rtems_rfs_bitmap_ut_alloc_seq_test+0xbc><== NOT EXECUTED
rtems_rfs_bitmap_map_clear (control, bit + i);
printf (" %2d. Cleared bits (%" PRId32 ", %ld] (%zd)\n",
test, bit, bit + size - 1, size);
for (i = 0; i < rtems_rfs_bitmap_element_bits (); i++)
1003cf: 46 inc %esi
1003d0: 83 fe 20 cmp $0x20,%esi
1003d3: 75 9a jne 10036f <rtems_rfs_bitmap_ut_alloc_seq_test+0x85>
printf (" %2d. Cleared bit still set: bit = %" PRId32 "\n", test, bit + i);
return false;
}
}
for (i = 0, bit = 0; i < size; i++)
1003d5: c7 45 10 00 00 00 00 movl $0x0,0x10(%ebp)
1003dc: 66 31 f6 xor %si,%si
{
rtems_rfs_bitmap_bit seed = bit;
bool result;
int rc;
rc = rtems_rfs_bitmap_map_alloc (control, seed, &result, &bit);
1003df: 8d 55 10 lea 0x10(%ebp),%edx
1003e2: 8d 4d e7 lea -0x19(%ebp),%ecx
printf (" %2d. Cleared bit still set: bit = %" PRId32 "\n", test, bit + i);
return false;
}
}
for (i = 0, bit = 0; i < size; i++)
1003e5: eb 5d jmp 100444 <rtems_rfs_bitmap_ut_alloc_seq_test+0x15a>
{
rtems_rfs_bitmap_bit seed = bit;
bool result;
int rc;
rc = rtems_rfs_bitmap_map_alloc (control, seed, &result, &bit);
1003e7: 52 push %edx
1003e8: 51 push %ecx
1003e9: 57 push %edi
1003ea: ff 75 08 pushl 0x8(%ebp)
1003ed: 89 55 d4 mov %edx,-0x2c(%ebp)
1003f0: 89 4d d0 mov %ecx,-0x30(%ebp)
1003f3: e8 d7 f7 00 00 call 10fbcf <rtems_rfs_bitmap_map_alloc>
if (rc > 0)
1003f8: 83 c4 10 add $0x10,%esp
1003fb: 85 c0 test %eax,%eax
1003fd: 8b 55 d4 mov -0x2c(%ebp),%edx
100400: 8b 4d d0 mov -0x30(%ebp),%ecx
100403: 7e 15 jle 10041a <rtems_rfs_bitmap_ut_alloc_seq_test+0x130><== ALWAYS TAKEN
{
printf (" %2d. map all: FAIL (%s)\n", test, strerror (rc));
100405: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
100408: 50 push %eax <== NOT EXECUTED
100409: e8 a6 f0 01 00 call 11f4b4 <strerror> <== NOT EXECUTED
10040e: 50 push %eax <== NOT EXECUTED
10040f: 53 push %ebx <== NOT EXECUTED
100410: 68 26 b5 12 00 push $0x12b526 <== NOT EXECUTED
100415: e9 7c ff ff ff jmp 100396 <rtems_rfs_bitmap_ut_alloc_seq_test+0xac><== NOT EXECUTED
return false;
}
if (!result)
10041a: 80 7d e7 00 cmpb $0x0,-0x19(%ebp)
10041e: 75 23 jne 100443 <rtems_rfs_bitmap_ut_alloc_seq_test+0x159><== ALWAYS TAKEN
{
printf (" %2d. Find bit with seed = %" PRId32 ": %s: bit = %" PRId32 "\n",
100420: 50 push %eax <== NOT EXECUTED
100421: 50 push %eax <== NOT EXECUTED
100422: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED
100425: 68 2b b4 12 00 push $0x12b42b <== NOT EXECUTED
10042a: 57 push %edi <== NOT EXECUTED
10042b: 53 push %ebx <== NOT EXECUTED
10042c: 68 40 b5 12 00 push $0x12b540 <== NOT EXECUTED
100431: a1 a0 f2 13 00 mov 0x13f2a0,%eax <== NOT EXECUTED
100436: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED
100439: e8 1e e3 01 00 call 11e75c <fiprintf> <== NOT EXECUTED
10043e: e9 60 ff ff ff jmp 1003a3 <rtems_rfs_bitmap_ut_alloc_seq_test+0xb9><== NOT EXECUTED
printf (" %2d. Cleared bit still set: bit = %" PRId32 "\n", test, bit + i);
return false;
}
}
for (i = 0, bit = 0; i < size; i++)
100443: 46 inc %esi
100444: 3b 75 14 cmp 0x14(%ebp),%esi
100447: 8b 7d 10 mov 0x10(%ebp),%edi
10044a: 75 9b jne 1003e7 <rtems_rfs_bitmap_ut_alloc_seq_test+0xfd>
test, seed, result ? "pass" : "FAIL", bit);
return false;
}
}
printf (" %2d. Alloc'ed all bits (%" PRId32 ", %ld] (%zd)\n",
10044c: 50 push %eax
10044d: 50 push %eax
10044e: 56 push %esi
10044f: 8d 44 3e ff lea -0x1(%esi,%edi,1),%eax
100453: 50 push %eax
100454: 57 push %edi
100455: 53 push %ebx
100456: 68 6f b5 12 00 push $0x12b56f
10045b: a1 a0 f2 13 00 mov 0x13f2a0,%eax
100460: ff 70 0c pushl 0xc(%eax)
100463: e8 f4 e2 01 00 call 11e75c <fiprintf>
100468: 83 c4 20 add $0x20,%esp
test, bit, bit + size - 1, size);
return true;
10046b: b0 01 mov $0x1,%al
}
10046d: 8d 65 f4 lea -0xc(%ebp),%esp
100470: 5b pop %ebx
100471: 5e pop %esi
100472: 5f pop %edi
100473: 5d pop %ebp
100474: c3 ret
00100475 <rtems_rfs_bitmap_ut_test_bitmap>:
void
rtems_rfs_bitmap_ut_test_bitmap (size_t size)
{
100475: 55 push %ebp
100476: 89 e5 mov %esp,%ebp
100478: 57 push %edi
100479: 56 push %esi
10047a: 53 push %ebx
10047b: 81 ec 18 01 00 00 sub $0x118,%esp
rtems_rfs_file_system fs;
rtems_rfs_bitmap_control control;
rtems_rfs_buffer_handle handle;
rtems_rfs_buffer buffer;
rtems_rfs_bitmap_bit bit = 0;
100481: c7 85 04 ff ff ff 00 movl $0x0,-0xfc(%ebp)
100488: 00 00 00
bool result;
size_t bytes;
size_t clear;
int rc;
bytes = (rtems_rfs_bitmap_elements (size) *
10048b: 8b 45 08 mov 0x8(%ebp),%eax
10048e: 48 dec %eax
10048f: 89 85 ec fe ff ff mov %eax,-0x114(%ebp)
100495: 89 c3 mov %eax,%ebx
100497: c1 eb 05 shr $0x5,%ebx
10049a: 43 inc %ebx
10049b: 8d 04 9d 00 00 00 00 lea 0x0(,%ebx,4),%eax
1004a2: 89 85 e8 fe ff ff mov %eax,-0x118(%ebp)
sizeof (rtems_rfs_bitmap_element));
memset (&fs, 0, sizeof (fs));
1004a8: 8d 85 64 ff ff ff lea -0x9c(%ebp),%eax
1004ae: 89 85 f4 fe ff ff mov %eax,-0x10c(%ebp)
1004b4: 31 c0 xor %eax,%eax
1004b6: b9 21 00 00 00 mov $0x21,%ecx
1004bb: 8b bd f4 fe ff ff mov -0x10c(%ebp),%edi
1004c1: f3 ab rep stos %eax,%es:(%edi)
memset (&buffer, 0, sizeof (buffer));
1004c3: 8d b5 2c ff ff ff lea -0xd4(%ebp),%esi
1004c9: b1 0e mov $0xe,%cl
1004cb: 89 f7 mov %esi,%edi
1004cd: f3 ab rep stos %eax,%es:(%edi)
buffer.buffer = malloc (bytes);
1004cf: ff b5 e8 fe ff ff pushl -0x118(%ebp)
1004d5: e8 12 85 00 00 call 1089ec <malloc>
1004da: 89 c2 mov %eax,%edx
1004dc: 89 85 48 ff ff ff mov %eax,-0xb8(%ebp)
buffer.block = 1;
1004e2: c7 85 44 ff ff ff 01 movl $0x1,-0xbc(%ebp)
1004e9: 00 00 00
if (!buffer.buffer)
1004ec: 83 c4 10 add $0x10,%esp
1004ef: 85 c0 test %eax,%eax
1004f1: 75 19 jne 10050c <rtems_rfs_bitmap_ut_test_bitmap+0x97><== ALWAYS TAKEN
{
printf (" Cannot allocate bitmap memory\n");
1004f3: 53 push %ebx <== NOT EXECUTED
1004f4: 53 push %ebx <== NOT EXECUTED
1004f5: 68 9e b5 12 00 push $0x12b59e <== NOT EXECUTED
1004fa: a1 a0 f2 13 00 mov 0x13f2a0,%eax <== NOT EXECUTED
1004ff: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED
100502: e8 55 e2 01 00 call 11e75c <fiprintf> <== NOT EXECUTED
100507: e9 c9 10 00 00 jmp 1015d5 <rtems_rfs_bitmap_ut_test_bitmap+0x1160><== NOT EXECUTED
}
#if RTEMS_RFS_BITMAP_CLEAR_ZERO
memset (buffer.buffer, 0, bytes);
#else
memset (buffer.buffer, 0xff, bytes);
10050c: b0 ff mov $0xff,%al
10050e: 89 d7 mov %edx,%edi
100510: 8b 8d e8 fe ff ff mov -0x118(%ebp),%ecx
100516: f3 aa rep stos %al,%es:(%edi)
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
100518: c6 85 08 ff ff ff 00 movb $0x0,-0xf8(%ebp)
printf (" Cannot open the handle: %d: %s\n", rc, strerror (rc));
free (buffer.buffer);
return;
}
handle.buffer = &buffer;
10051f: 89 b5 10 ff ff ff mov %esi,-0xf0(%ebp)
handle.bnum = 1;
100525: c7 85 0c ff ff ff 01 movl $0x1,-0xf4(%ebp)
10052c: 00 00 00
printf ("\nRFS Bitmap Test : size = %zd (%zd)\n",
10052f: 53 push %ebx
100530: ff 75 08 pushl 0x8(%ebp)
100533: 68 be b5 12 00 push $0x12b5be
100538: a1 a0 f2 13 00 mov 0x13f2a0,%eax
10053d: ff 70 0c pushl 0xc(%eax)
100540: e8 17 e2 01 00 call 11e75c <fiprintf>
size, rtems_rfs_bitmap_elements (size));
rc = rtems_rfs_bitmap_open (&control, &fs, &handle, size, 1);
100545: c7 04 24 01 00 00 00 movl $0x1,(%esp)
10054c: ff 75 08 pushl 0x8(%ebp)
10054f: 8d 85 08 ff ff ff lea -0xf8(%ebp),%eax
100555: 50 push %eax
100556: 8d 85 64 ff ff ff lea -0x9c(%ebp),%eax
10055c: 50 push %eax
10055d: 8d 9d 14 ff ff ff lea -0xec(%ebp),%ebx
100563: 53 push %ebx
100564: e8 c6 f7 00 00 call 10fd2f <rtems_rfs_bitmap_open>
if (rc > 0)
100569: 83 c4 20 add $0x20,%esp
10056c: 85 c0 test %eax,%eax
10056e: 7e 24 jle 100594 <rtems_rfs_bitmap_ut_test_bitmap+0x11f><== ALWAYS TAKEN
{
printf (" Cannot open the bitmap: %s\n", strerror (rc));
100570: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
100573: 50 push %eax <== NOT EXECUTED
100574: e8 3b ef 01 00 call 11f4b4 <strerror> <== NOT EXECUTED
100579: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
10057c: 50 push %eax <== NOT EXECUTED
10057d: 68 e3 b5 12 00 push $0x12b5e3 <== NOT EXECUTED
100582: a1 a0 f2 13 00 mov 0x13f2a0,%eax <== NOT EXECUTED
100587: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED
10058a: e8 cd e1 01 00 call 11e75c <fiprintf> <== NOT EXECUTED
10058f: e9 35 10 00 00 jmp 1015c9 <rtems_rfs_bitmap_ut_test_bitmap+0x1154><== NOT EXECUTED
/*
* This is a new bitmap with no bits set. Try and find a bit with a few
* seeds.
*/
rc = rtems_rfs_bitmap_map_alloc (&control, size * 2, &result, &bit);
100594: 8d 85 04 ff ff ff lea -0xfc(%ebp),%eax
10059a: 50 push %eax
10059b: 8d 85 03 ff ff ff lea -0xfd(%ebp),%eax
1005a1: 50 push %eax
1005a2: 8b 45 08 mov 0x8(%ebp),%eax
1005a5: d1 e0 shl %eax
1005a7: 50 push %eax
1005a8: 53 push %ebx
1005a9: e8 21 f6 00 00 call 10fbcf <rtems_rfs_bitmap_map_alloc>
1005ae: 89 c3 mov %eax,%ebx
printf (" 1. Find bit with seed > size: %s (%s)\n",
1005b0: 89 04 24 mov %eax,(%esp)
1005b3: e8 fc ee 01 00 call 11f4b4 <strerror>
1005b8: 83 c4 10 add $0x10,%esp
1005bb: ba 26 b4 12 00 mov $0x12b426,%edx
1005c0: 80 bd 03 ff ff ff 00 cmpb $0x0,-0xfd(%ebp)
1005c7: 74 05 je 1005ce <rtems_rfs_bitmap_ut_test_bitmap+0x159><== ALWAYS TAKEN
1005c9: ba 2b b4 12 00 mov $0x12b42b,%edx <== NOT EXECUTED
1005ce: 50 push %eax
1005cf: 52 push %edx
1005d0: 68 00 b6 12 00 push $0x12b600
1005d5: a1 a0 f2 13 00 mov 0x13f2a0,%eax
1005da: ff 70 0c pushl 0xc(%eax)
1005dd: e8 7a e1 01 00 call 11e75c <fiprintf>
result ? "FAIL" : "pass", strerror (rc));
rtems_rfs_exit_on_error (rc, result, &control, buffer.buffer);
1005e2: 83 c4 10 add $0x10,%esp
1005e5: 85 db test %ebx,%ebx
1005e7: 0f 8f 84 0c 00 00 jg 101271 <rtems_rfs_bitmap_ut_test_bitmap+0xdfc><== NEVER TAKEN
1005ed: 80 bd 03 ff ff ff 00 cmpb $0x0,-0xfd(%ebp)
1005f4: 74 05 je 1005fb <rtems_rfs_bitmap_ut_test_bitmap+0x186><== ALWAYS TAKEN
1005f6: e9 76 0c 00 00 jmp 101271 <rtems_rfs_bitmap_ut_test_bitmap+0xdfc><== NOT EXECUTED
rc = rtems_rfs_bitmap_map_alloc (&control, size, &result, &bit);
1005fb: 8d 85 04 ff ff ff lea -0xfc(%ebp),%eax
100601: 50 push %eax
100602: 8d 85 03 ff ff ff lea -0xfd(%ebp),%eax
100608: 50 push %eax
100609: ff 75 08 pushl 0x8(%ebp)
10060c: 8d 85 14 ff ff ff lea -0xec(%ebp),%eax
100612: 50 push %eax
100613: e8 b7 f5 00 00 call 10fbcf <rtems_rfs_bitmap_map_alloc>
100618: 89 c3 mov %eax,%ebx
printf (" 2. Find bit with seed = size: %s (%s)\n",
10061a: 89 04 24 mov %eax,(%esp)
10061d: e8 92 ee 01 00 call 11f4b4 <strerror>
100622: 83 c4 10 add $0x10,%esp
100625: ba 26 b4 12 00 mov $0x12b426,%edx
10062a: 80 bd 03 ff ff ff 00 cmpb $0x0,-0xfd(%ebp)
100631: 74 05 je 100638 <rtems_rfs_bitmap_ut_test_bitmap+0x1c3><== ALWAYS TAKEN
100633: ba 2b b4 12 00 mov $0x12b42b,%edx <== NOT EXECUTED
100638: 50 push %eax
100639: 52 push %edx
10063a: 68 29 b6 12 00 push $0x12b629
10063f: a1 a0 f2 13 00 mov 0x13f2a0,%eax
100644: ff 70 0c pushl 0xc(%eax)
100647: e8 10 e1 01 00 call 11e75c <fiprintf>
result ? "FAIL" : "pass", strerror (rc));
rtems_rfs_exit_on_error (rc, result, &control, buffer.buffer);
10064c: 83 c4 10 add $0x10,%esp
10064f: 85 db test %ebx,%ebx
100651: 0f 8f 1a 0c 00 00 jg 101271 <rtems_rfs_bitmap_ut_test_bitmap+0xdfc><== NEVER TAKEN
100657: 80 bd 03 ff ff ff 00 cmpb $0x0,-0xfd(%ebp)
10065e: 74 05 je 100665 <rtems_rfs_bitmap_ut_test_bitmap+0x1f0><== ALWAYS TAKEN
100660: e9 0c 0c 00 00 jmp 101271 <rtems_rfs_bitmap_ut_test_bitmap+0xdfc><== NOT EXECUTED
rc = rtems_rfs_bitmap_map_alloc (&control, 0, &result, &bit);
100665: 8d 85 04 ff ff ff lea -0xfc(%ebp),%eax
10066b: 50 push %eax
10066c: 8d 85 03 ff ff ff lea -0xfd(%ebp),%eax
100672: 50 push %eax
100673: 6a 00 push $0x0
100675: 8d 85 14 ff ff ff lea -0xec(%ebp),%eax
10067b: 50 push %eax
10067c: e8 4e f5 00 00 call 10fbcf <rtems_rfs_bitmap_map_alloc>
100681: 89 c3 mov %eax,%ebx
result = result && (bit == 0);
100683: 83 c4 10 add $0x10,%esp
100686: 31 c0 xor %eax,%eax
100688: 80 bd 03 ff ff ff 00 cmpb $0x0,-0xfd(%ebp)
10068f: 74 0c je 10069d <rtems_rfs_bitmap_ut_test_bitmap+0x228><== NEVER TAKEN
100691: 31 c0 xor %eax,%eax
100693: 83 bd 04 ff ff ff 00 cmpl $0x0,-0xfc(%ebp)
10069a: 0f 94 c0 sete %al
10069d: 88 85 03 ff ff ff mov %al,-0xfd(%ebp)
1006a3: 80 a5 03 ff ff ff 01 andb $0x1,-0xfd(%ebp)
printf (" 3. Find bit 0 with seed = 0: %s (%s): bit = %" PRId32 "\n",
1006aa: 8b b5 04 ff ff ff mov -0xfc(%ebp),%esi
1006b0: 83 ec 0c sub $0xc,%esp
1006b3: 53 push %ebx
1006b4: e8 fb ed 01 00 call 11f4b4 <strerror>
1006b9: 83 c4 10 add $0x10,%esp
1006bc: ba 2b b4 12 00 mov $0x12b42b,%edx
1006c1: 80 bd 03 ff ff ff 00 cmpb $0x0,-0xfd(%ebp)
1006c8: 74 05 je 1006cf <rtems_rfs_bitmap_ut_test_bitmap+0x25a><== NEVER TAKEN
1006ca: ba 26 b4 12 00 mov $0x12b426,%edx
1006cf: 83 ec 0c sub $0xc,%esp
1006d2: 56 push %esi
1006d3: 50 push %eax
1006d4: 52 push %edx
1006d5: 68 52 b6 12 00 push $0x12b652
1006da: a1 a0 f2 13 00 mov 0x13f2a0,%eax
1006df: ff 70 0c pushl 0xc(%eax)
1006e2: e8 75 e0 01 00 call 11e75c <fiprintf>
result ? "pass" : "FAIL", strerror (rc), bit);
rtems_rfs_exit_on_error (rc, !result, &control, buffer.buffer);
1006e7: 83 c4 20 add $0x20,%esp
1006ea: 85 db test %ebx,%ebx
1006ec: 0f 8f 7f 0b 00 00 jg 101271 <rtems_rfs_bitmap_ut_test_bitmap+0xdfc><== NEVER TAKEN
1006f2: 80 bd 03 ff ff ff 00 cmpb $0x0,-0xfd(%ebp)
1006f9: 75 05 jne 100700 <rtems_rfs_bitmap_ut_test_bitmap+0x28b><== ALWAYS TAKEN
1006fb: e9 71 0b 00 00 jmp 101271 <rtems_rfs_bitmap_ut_test_bitmap+0xdfc><== NOT EXECUTED
rc = rtems_rfs_bitmap_map_alloc (&control, size - 1, &result, &bit);
100700: 8d 85 04 ff ff ff lea -0xfc(%ebp),%eax
100706: 50 push %eax
100707: 8d 85 03 ff ff ff lea -0xfd(%ebp),%eax
10070d: 50 push %eax
10070e: ff b5 ec fe ff ff pushl -0x114(%ebp)
100714: 8d 85 14 ff ff ff lea -0xec(%ebp),%eax
10071a: 50 push %eax
10071b: e8 af f4 00 00 call 10fbcf <rtems_rfs_bitmap_map_alloc>
100720: 89 c3 mov %eax,%ebx
result = result && (bit == (size - 1));
100722: 83 c4 10 add $0x10,%esp
100725: 31 c0 xor %eax,%eax
100727: 80 bd 03 ff ff ff 00 cmpb $0x0,-0xfd(%ebp)
10072e: 74 12 je 100742 <rtems_rfs_bitmap_ut_test_bitmap+0x2cd><== NEVER TAKEN
100730: 8b 85 ec fe ff ff mov -0x114(%ebp),%eax
100736: 39 85 04 ff ff ff cmp %eax,-0xfc(%ebp)
10073c: 0f 94 c0 sete %al
10073f: 0f b6 c0 movzbl %al,%eax
100742: 88 85 03 ff ff ff mov %al,-0xfd(%ebp)
100748: 80 a5 03 ff ff ff 01 andb $0x1,-0xfd(%ebp)
printf (" 4. Find bit (size - 1) with seed = (size - 1) (%zd): %s (%s): bit = %" PRId32 "\n",
10074f: 8b b5 04 ff ff ff mov -0xfc(%ebp),%esi
100755: 83 ec 0c sub $0xc,%esp
100758: 53 push %ebx
100759: e8 56 ed 01 00 call 11f4b4 <strerror>
10075e: 83 c4 10 add $0x10,%esp
100761: ba 2b b4 12 00 mov $0x12b42b,%edx
100766: 80 bd 03 ff ff ff 00 cmpb $0x0,-0xfd(%ebp)
10076d: 74 05 je 100774 <rtems_rfs_bitmap_ut_test_bitmap+0x2ff><== NEVER TAKEN
10076f: ba 26 b4 12 00 mov $0x12b426,%edx
100774: 51 push %ecx
100775: 51 push %ecx
100776: 56 push %esi
100777: 50 push %eax
100778: 52 push %edx
100779: ff b5 ec fe ff ff pushl -0x114(%ebp)
10077f: 68 85 b6 12 00 push $0x12b685
100784: a1 a0 f2 13 00 mov 0x13f2a0,%eax
100789: ff 70 0c pushl 0xc(%eax)
10078c: e8 cb df 01 00 call 11e75c <fiprintf>
size - 1, result ? "pass" : "FAIL", strerror (rc), bit);
rtems_rfs_exit_on_error (rc, !result, &control, buffer.buffer);
100791: 83 c4 20 add $0x20,%esp
100794: 85 db test %ebx,%ebx
100796: 0f 8f d5 0a 00 00 jg 101271 <rtems_rfs_bitmap_ut_test_bitmap+0xdfc><== NEVER TAKEN
10079c: 80 bd 03 ff ff ff 00 cmpb $0x0,-0xfd(%ebp)
1007a3: 75 05 jne 1007aa <rtems_rfs_bitmap_ut_test_bitmap+0x335><== ALWAYS TAKEN
1007a5: e9 c7 0a 00 00 jmp 101271 <rtems_rfs_bitmap_ut_test_bitmap+0xdfc><== NOT EXECUTED
/*
* Test the bits allocated to make sure they are set.
*/
rc = rtems_rfs_bitmap_map_test (&control, 0, &result);
1007aa: 50 push %eax
1007ab: 8d 85 03 ff ff ff lea -0xfd(%ebp),%eax
1007b1: 50 push %eax
1007b2: 6a 00 push $0x0
1007b4: 8d 85 14 ff ff ff lea -0xec(%ebp),%eax
1007ba: 50 push %eax
1007bb: e8 ed f2 00 00 call 10faad <rtems_rfs_bitmap_map_test>
1007c0: 89 c3 mov %eax,%ebx
printf (" 5. Test bit 0: %s (%s)\n",
1007c2: 89 04 24 mov %eax,(%esp)
1007c5: e8 ea ec 01 00 call 11f4b4 <strerror>
1007ca: 83 c4 10 add $0x10,%esp
1007cd: ba 2b b4 12 00 mov $0x12b42b,%edx
1007d2: 80 bd 03 ff ff ff 00 cmpb $0x0,-0xfd(%ebp)
1007d9: 74 05 je 1007e0 <rtems_rfs_bitmap_ut_test_bitmap+0x36b><== NEVER TAKEN
1007db: ba 26 b4 12 00 mov $0x12b426,%edx
1007e0: 50 push %eax
1007e1: 52 push %edx
1007e2: 68 d0 b6 12 00 push $0x12b6d0
1007e7: a1 a0 f2 13 00 mov 0x13f2a0,%eax
1007ec: ff 70 0c pushl 0xc(%eax)
1007ef: e8 68 df 01 00 call 11e75c <fiprintf>
result ? "pass" : "FAIL", strerror (rc));
rtems_rfs_exit_on_error (rc, !result, &control, buffer.buffer);
1007f4: 83 c4 10 add $0x10,%esp
1007f7: 85 db test %ebx,%ebx
1007f9: 0f 8f 72 0a 00 00 jg 101271 <rtems_rfs_bitmap_ut_test_bitmap+0xdfc><== NEVER TAKEN
1007ff: 80 bd 03 ff ff ff 00 cmpb $0x0,-0xfd(%ebp)
100806: 75 05 jne 10080d <rtems_rfs_bitmap_ut_test_bitmap+0x398><== ALWAYS TAKEN
100808: e9 64 0a 00 00 jmp 101271 <rtems_rfs_bitmap_ut_test_bitmap+0xdfc><== NOT EXECUTED
rc = rtems_rfs_bitmap_map_test (&control, size - 1, &result);
10080d: 50 push %eax
10080e: 8d 85 03 ff ff ff lea -0xfd(%ebp),%eax
100814: 50 push %eax
100815: ff b5 ec fe ff ff pushl -0x114(%ebp)
10081b: 8d 85 14 ff ff ff lea -0xec(%ebp),%eax
100821: 50 push %eax
100822: e8 86 f2 00 00 call 10faad <rtems_rfs_bitmap_map_test>
100827: 89 c3 mov %eax,%ebx
printf (" 6. Test bit (size - 1) (%zd): %s (%s)\n",
100829: 89 04 24 mov %eax,(%esp)
10082c: e8 83 ec 01 00 call 11f4b4 <strerror>
100831: 83 c4 10 add $0x10,%esp
100834: ba 2b b4 12 00 mov $0x12b42b,%edx
100839: 80 bd 03 ff ff ff 00 cmpb $0x0,-0xfd(%ebp)
100840: 74 05 je 100847 <rtems_rfs_bitmap_ut_test_bitmap+0x3d2><== NEVER TAKEN
100842: ba 26 b4 12 00 mov $0x12b426,%edx
100847: 83 ec 0c sub $0xc,%esp
10084a: 50 push %eax
10084b: 52 push %edx
10084c: ff b5 ec fe ff ff pushl -0x114(%ebp)
100852: 68 ea b6 12 00 push $0x12b6ea
100857: a1 a0 f2 13 00 mov 0x13f2a0,%eax
10085c: ff 70 0c pushl 0xc(%eax)
10085f: e8 f8 de 01 00 call 11e75c <fiprintf>
size - 1, result ? "pass" : "FAIL", strerror (rc));
rtems_rfs_exit_on_error (rc, !result, &control, buffer.buffer);
100864: 83 c4 20 add $0x20,%esp
100867: 85 db test %ebx,%ebx
100869: 0f 8f 02 0a 00 00 jg 101271 <rtems_rfs_bitmap_ut_test_bitmap+0xdfc><== NEVER TAKEN
10086f: 80 bd 03 ff ff ff 00 cmpb $0x0,-0xfd(%ebp)
100876: 75 05 jne 10087d <rtems_rfs_bitmap_ut_test_bitmap+0x408><== ALWAYS TAKEN
100878: e9 f4 09 00 00 jmp 101271 <rtems_rfs_bitmap_ut_test_bitmap+0xdfc><== NOT EXECUTED
if (!rtems_rfs_bitmap_ut_test_range (&control, 7, false, 1, size - 2))
10087d: 83 ec 0c sub $0xc,%esp
100880: 8b 45 08 mov 0x8(%ebp),%eax
100883: 83 e8 02 sub $0x2,%eax
100886: 50 push %eax
100887: 6a 01 push $0x1
100889: 6a 00 push $0x0
10088b: 6a 07 push $0x7
10088d: 8d 9d 14 ff ff ff lea -0xec(%ebp),%ebx
100893: 53 push %ebx
100894: e8 1b f9 ff ff call 1001b4 <rtems_rfs_bitmap_ut_test_range>
100899: 83 c4 20 add $0x20,%esp
10089c: 84 c0 test %al,%al
10089e: 75 0e jne 1008ae <rtems_rfs_bitmap_ut_test_bitmap+0x439><== ALWAYS TAKEN
rtems_rfs_exit_on_error (0, !result, &control, buffer.buffer);
1008a0: 80 bd 03 ff ff ff 00 cmpb $0x0,-0xfd(%ebp) <== NOT EXECUTED
1008a7: 75 05 jne 1008ae <rtems_rfs_bitmap_ut_test_bitmap+0x439><== NOT EXECUTED
1008a9: e9 a9 08 00 00 jmp 101157 <rtems_rfs_bitmap_ut_test_bitmap+0xce2><== NOT EXECUTED
/*
* Set all bits then clear one and find it.
*/
rc = rtems_rfs_bitmap_map_set_all (&control);
1008ae: 83 ec 0c sub $0xc,%esp
1008b1: 53 push %ebx
1008b2: e8 3c f2 00 00 call 10faf3 <rtems_rfs_bitmap_map_set_all>
1008b7: 89 c3 mov %eax,%ebx
printf (" 8. Set all bits: %s (%s)\n",
1008b9: 89 04 24 mov %eax,(%esp)
1008bc: e8 f3 eb 01 00 call 11f4b4 <strerror>
1008c1: 83 c4 10 add $0x10,%esp
1008c4: ba 2b b4 12 00 mov $0x12b42b,%edx
1008c9: 85 db test %ebx,%ebx
1008cb: 75 05 jne 1008d2 <rtems_rfs_bitmap_ut_test_bitmap+0x45d><== NEVER TAKEN
1008cd: ba 99 b5 12 00 mov $0x12b599,%edx
1008d2: 50 push %eax
1008d3: 52 push %edx
1008d4: 68 13 b7 12 00 push $0x12b713
1008d9: a1 a0 f2 13 00 mov 0x13f2a0,%eax
1008de: ff 70 0c pushl 0xc(%eax)
1008e1: e8 76 de 01 00 call 11e75c <fiprintf>
rc == 0 ? "PASS" : "FAIL", strerror (rc));
rtems_rfs_exit_on_error (rc, false, &control, buffer.buffer);
1008e6: 83 c4 10 add $0x10,%esp
1008e9: 85 db test %ebx,%ebx
1008eb: 7e 05 jle 1008f2 <rtems_rfs_bitmap_ut_test_bitmap+0x47d><== ALWAYS TAKEN
1008ed: e9 7f 09 00 00 jmp 101271 <rtems_rfs_bitmap_ut_test_bitmap+0xdfc><== NOT EXECUTED
bit = rand () % size;
1008f2: e8 d9 e2 01 00 call 11ebd0 <rand>
1008f7: 31 d2 xor %edx,%edx
1008f9: f7 75 08 divl 0x8(%ebp)
1008fc: 89 95 04 ff ff ff mov %edx,-0xfc(%ebp)
rc = rtems_rfs_bitmap_map_clear (&control, bit);
100902: 50 push %eax
100903: 50 push %eax
100904: 52 push %edx
100905: 8d 85 14 ff ff ff lea -0xec(%ebp),%eax
10090b: 50 push %eax
10090c: e8 3e f1 00 00 call 10fa4f <rtems_rfs_bitmap_map_clear>
100911: 89 c3 mov %eax,%ebx
printf (" 9. Clear bit %" PRId32 ": %s (%s)\n",
100913: 89 04 24 mov %eax,(%esp)
100916: e8 99 eb 01 00 call 11f4b4 <strerror>
10091b: 83 c4 10 add $0x10,%esp
10091e: ba 2b b4 12 00 mov $0x12b42b,%edx
100923: 85 db test %ebx,%ebx
100925: 75 05 jne 10092c <rtems_rfs_bitmap_ut_test_bitmap+0x4b7><== NEVER TAKEN
100927: ba 99 b5 12 00 mov $0x12b599,%edx
10092c: 83 ec 0c sub $0xc,%esp
10092f: 50 push %eax
100930: 52 push %edx
100931: ff b5 04 ff ff ff pushl -0xfc(%ebp)
100937: 68 2f b7 12 00 push $0x12b72f
10093c: a1 a0 f2 13 00 mov 0x13f2a0,%eax
100941: ff 70 0c pushl 0xc(%eax)
100944: e8 13 de 01 00 call 11e75c <fiprintf>
bit, rc == 0 ? "PASS" : "FAIL", strerror (rc));
rtems_rfs_exit_on_error (rc, false, &control, buffer.buffer);
100949: 83 c4 20 add $0x20,%esp
10094c: 85 db test %ebx,%ebx
10094e: 7e 05 jle 100955 <rtems_rfs_bitmap_ut_test_bitmap+0x4e0><== ALWAYS TAKEN
100950: e9 1c 09 00 00 jmp 101271 <rtems_rfs_bitmap_ut_test_bitmap+0xdfc><== NOT EXECUTED
last_bit = bit;
100955: 8b b5 04 ff ff ff mov -0xfc(%ebp),%esi
rc = rtems_rfs_bitmap_map_alloc (&control, 0, &result, &bit);
10095b: 8d 85 04 ff ff ff lea -0xfc(%ebp),%eax
100961: 50 push %eax
100962: 8d 85 03 ff ff ff lea -0xfd(%ebp),%eax
100968: 50 push %eax
100969: 6a 00 push $0x0
10096b: 8d 85 14 ff ff ff lea -0xec(%ebp),%eax
100971: 50 push %eax
100972: e8 58 f2 00 00 call 10fbcf <rtems_rfs_bitmap_map_alloc>
100977: 89 c3 mov %eax,%ebx
result = result && (bit == last_bit);
100979: 83 c4 10 add $0x10,%esp
10097c: 31 c0 xor %eax,%eax
10097e: 80 bd 03 ff ff ff 00 cmpb $0x0,-0xfd(%ebp)
100985: 74 0b je 100992 <rtems_rfs_bitmap_ut_test_bitmap+0x51d><== NEVER TAKEN
100987: 31 c0 xor %eax,%eax
100989: 39 b5 04 ff ff ff cmp %esi,-0xfc(%ebp)
10098f: 0f 94 c0 sete %al
100992: 88 85 03 ff ff ff mov %al,-0xfd(%ebp)
100998: 80 a5 03 ff ff ff 01 andb $0x1,-0xfd(%ebp)
printf (" 10. Find bit with seed = 0: %s (%s): bit = %" PRId32 "\n",
10099f: 8b bd 04 ff ff ff mov -0xfc(%ebp),%edi
1009a5: 83 ec 0c sub $0xc,%esp
1009a8: 53 push %ebx
1009a9: e8 06 eb 01 00 call 11f4b4 <strerror>
1009ae: 83 c4 10 add $0x10,%esp
1009b1: ba 2b b4 12 00 mov $0x12b42b,%edx
1009b6: 80 bd 03 ff ff ff 00 cmpb $0x0,-0xfd(%ebp)
1009bd: 74 05 je 1009c4 <rtems_rfs_bitmap_ut_test_bitmap+0x54f><== NEVER TAKEN
1009bf: ba 26 b4 12 00 mov $0x12b426,%edx
1009c4: 83 ec 0c sub $0xc,%esp
1009c7: 57 push %edi
1009c8: 50 push %eax
1009c9: 52 push %edx
1009ca: 68 4c b7 12 00 push $0x12b74c
1009cf: a1 a0 f2 13 00 mov 0x13f2a0,%eax
1009d4: ff 70 0c pushl 0xc(%eax)
1009d7: e8 80 dd 01 00 call 11e75c <fiprintf>
result ? "pass" : "FAIL", strerror (rc), bit);
rtems_rfs_exit_on_error (rc, !result, &control, buffer.buffer);
1009dc: 83 c4 20 add $0x20,%esp
1009df: 85 db test %ebx,%ebx
1009e1: 0f 8f 8a 08 00 00 jg 101271 <rtems_rfs_bitmap_ut_test_bitmap+0xdfc><== NEVER TAKEN
1009e7: 80 bd 03 ff ff ff 00 cmpb $0x0,-0xfd(%ebp)
1009ee: 75 05 jne 1009f5 <rtems_rfs_bitmap_ut_test_bitmap+0x580><== ALWAYS TAKEN
1009f0: e9 7c 08 00 00 jmp 101271 <rtems_rfs_bitmap_ut_test_bitmap+0xdfc><== NOT EXECUTED
rc = rtems_rfs_bitmap_map_alloc (&control, 0, &result, &bit);
1009f5: 8d 85 04 ff ff ff lea -0xfc(%ebp),%eax
1009fb: 50 push %eax
1009fc: 8d 85 03 ff ff ff lea -0xfd(%ebp),%eax
100a02: 50 push %eax
100a03: 6a 00 push $0x0
100a05: 8d 85 14 ff ff ff lea -0xec(%ebp),%eax
100a0b: 50 push %eax
100a0c: e8 be f1 00 00 call 10fbcf <rtems_rfs_bitmap_map_alloc>
100a11: 89 c3 mov %eax,%ebx
result = !result || (bit != last_bit);
100a13: 83 c4 10 add $0x10,%esp
100a16: b8 01 00 00 00 mov $0x1,%eax
100a1b: 80 bd 03 ff ff ff 00 cmpb $0x0,-0xfd(%ebp)
100a22: 74 0b je 100a2f <rtems_rfs_bitmap_ut_test_bitmap+0x5ba><== ALWAYS TAKEN
100a24: 31 c0 xor %eax,%eax
100a26: 39 b5 04 ff ff ff cmp %esi,-0xfc(%ebp) <== NOT EXECUTED
100a2c: 0f 95 c0 setne %al <== NOT EXECUTED
100a2f: 88 85 03 ff ff ff mov %al,-0xfd(%ebp)
100a35: 80 a5 03 ff ff ff 01 andb $0x1,-0xfd(%ebp)
printf (" 11. Fail to find bit with seed = 0: %s (%s): bit = %" PRId32 "\n",
100a3c: 8b b5 04 ff ff ff mov -0xfc(%ebp),%esi
100a42: 83 ec 0c sub $0xc,%esp
100a45: 53 push %ebx
100a46: e8 69 ea 01 00 call 11f4b4 <strerror>
100a4b: 83 c4 10 add $0x10,%esp
100a4e: ba 2b b4 12 00 mov $0x12b42b,%edx
100a53: 80 bd 03 ff ff ff 00 cmpb $0x0,-0xfd(%ebp)
100a5a: 74 05 je 100a61 <rtems_rfs_bitmap_ut_test_bitmap+0x5ec><== NEVER TAKEN
100a5c: ba 26 b4 12 00 mov $0x12b426,%edx
100a61: 83 ec 0c sub $0xc,%esp
100a64: 56 push %esi
100a65: 50 push %eax
100a66: 52 push %edx
100a67: 68 7d b7 12 00 push $0x12b77d
100a6c: a1 a0 f2 13 00 mov 0x13f2a0,%eax
100a71: ff 70 0c pushl 0xc(%eax)
100a74: e8 e3 dc 01 00 call 11e75c <fiprintf>
result ? "pass" : "FAIL", strerror (rc), bit);
rtems_rfs_exit_on_error (rc, !result, &control, buffer.buffer);
100a79: 83 c4 20 add $0x20,%esp
100a7c: 85 db test %ebx,%ebx
100a7e: 0f 8f ed 07 00 00 jg 101271 <rtems_rfs_bitmap_ut_test_bitmap+0xdfc><== NEVER TAKEN
100a84: 80 bd 03 ff ff ff 00 cmpb $0x0,-0xfd(%ebp)
100a8b: 75 05 jne 100a92 <rtems_rfs_bitmap_ut_test_bitmap+0x61d><== ALWAYS TAKEN
100a8d: e9 df 07 00 00 jmp 101271 <rtems_rfs_bitmap_ut_test_bitmap+0xdfc><== NOT EXECUTED
rc = rtems_rfs_bitmap_map_clear (&control, 0);
100a92: 57 push %edi
100a93: 57 push %edi
100a94: 6a 00 push $0x0
100a96: 8d 85 14 ff ff ff lea -0xec(%ebp),%eax
100a9c: 50 push %eax
100a9d: e8 ad ef 00 00 call 10fa4f <rtems_rfs_bitmap_map_clear>
100aa2: 89 c3 mov %eax,%ebx
printf (" 12. Clear bit 0: %s (%s)\n",
100aa4: 89 04 24 mov %eax,(%esp)
100aa7: e8 08 ea 01 00 call 11f4b4 <strerror>
100aac: 83 c4 10 add $0x10,%esp
100aaf: ba 2b b4 12 00 mov $0x12b42b,%edx
100ab4: 85 db test %ebx,%ebx
100ab6: 75 05 jne 100abd <rtems_rfs_bitmap_ut_test_bitmap+0x648><== NEVER TAKEN
100ab8: ba 26 b4 12 00 mov $0x12b426,%edx
100abd: 50 push %eax
100abe: 52 push %edx
100abf: 68 b6 b7 12 00 push $0x12b7b6
100ac4: a1 a0 f2 13 00 mov 0x13f2a0,%eax
100ac9: ff 70 0c pushl 0xc(%eax)
100acc: e8 8b dc 01 00 call 11e75c <fiprintf>
rc == 0 ? "pass" : "FAIL", strerror (rc));
rtems_rfs_exit_on_error (rc, false, &control, buffer.buffer);
100ad1: 83 c4 10 add $0x10,%esp
100ad4: 85 db test %ebx,%ebx
100ad6: 7e 05 jle 100add <rtems_rfs_bitmap_ut_test_bitmap+0x668><== ALWAYS TAKEN
100ad8: e9 94 07 00 00 jmp 101271 <rtems_rfs_bitmap_ut_test_bitmap+0xdfc><== NOT EXECUTED
rc = rtems_rfs_bitmap_map_alloc (&control, size - 1, &result, &bit);
100add: 8d 85 04 ff ff ff lea -0xfc(%ebp),%eax
100ae3: 50 push %eax
100ae4: 8d 85 03 ff ff ff lea -0xfd(%ebp),%eax
100aea: 50 push %eax
100aeb: ff b5 ec fe ff ff pushl -0x114(%ebp)
100af1: 8d 85 14 ff ff ff lea -0xec(%ebp),%eax
100af7: 50 push %eax
100af8: e8 d2 f0 00 00 call 10fbcf <rtems_rfs_bitmap_map_alloc>
100afd: 89 c3 mov %eax,%ebx
result = result && (bit == 0);
100aff: 83 c4 10 add $0x10,%esp
100b02: 31 c0 xor %eax,%eax
100b04: 80 bd 03 ff ff ff 00 cmpb $0x0,-0xfd(%ebp)
100b0b: 74 0c je 100b19 <rtems_rfs_bitmap_ut_test_bitmap+0x6a4><== NEVER TAKEN
100b0d: 31 c0 xor %eax,%eax
100b0f: 83 bd 04 ff ff ff 00 cmpl $0x0,-0xfc(%ebp)
100b16: 0f 94 c0 sete %al
100b19: 88 85 03 ff ff ff mov %al,-0xfd(%ebp)
100b1f: 80 a5 03 ff ff ff 01 andb $0x1,-0xfd(%ebp)
printf (" 13. Find bit with seed = (size - 1): %s (%s): bit = %" PRId32 "\n",
100b26: 8b b5 04 ff ff ff mov -0xfc(%ebp),%esi
100b2c: 83 ec 0c sub $0xc,%esp
100b2f: 53 push %ebx
100b30: e8 7f e9 01 00 call 11f4b4 <strerror>
100b35: 83 c4 10 add $0x10,%esp
100b38: ba 2b b4 12 00 mov $0x12b42b,%edx
100b3d: 80 bd 03 ff ff ff 00 cmpb $0x0,-0xfd(%ebp)
100b44: 74 05 je 100b4b <rtems_rfs_bitmap_ut_test_bitmap+0x6d6><== NEVER TAKEN
100b46: ba 26 b4 12 00 mov $0x12b426,%edx
100b4b: 83 ec 0c sub $0xc,%esp
100b4e: 56 push %esi
100b4f: 50 push %eax
100b50: 52 push %edx
100b51: 68 d1 b7 12 00 push $0x12b7d1
100b56: a1 a0 f2 13 00 mov 0x13f2a0,%eax
100b5b: ff 70 0c pushl 0xc(%eax)
100b5e: e8 f9 db 01 00 call 11e75c <fiprintf>
result ? "pass" : "FAIL", strerror (rc), bit);
rtems_rfs_exit_on_error (rc, !result, &control, buffer.buffer);
100b63: 83 c4 20 add $0x20,%esp
100b66: 85 db test %ebx,%ebx
100b68: 0f 8f 03 07 00 00 jg 101271 <rtems_rfs_bitmap_ut_test_bitmap+0xdfc><== NEVER TAKEN
100b6e: 80 bd 03 ff ff ff 00 cmpb $0x0,-0xfd(%ebp)
100b75: 75 05 jne 100b7c <rtems_rfs_bitmap_ut_test_bitmap+0x707><== ALWAYS TAKEN
100b77: e9 f5 06 00 00 jmp 101271 <rtems_rfs_bitmap_ut_test_bitmap+0xdfc><== NOT EXECUTED
rc = rtems_rfs_bitmap_map_clear (&control, size - 1);
100b7c: 56 push %esi
100b7d: 56 push %esi
100b7e: ff b5 ec fe ff ff pushl -0x114(%ebp)
100b84: 8d 85 14 ff ff ff lea -0xec(%ebp),%eax
100b8a: 50 push %eax
100b8b: e8 bf ee 00 00 call 10fa4f <rtems_rfs_bitmap_map_clear>
100b90: 89 c3 mov %eax,%ebx
printf (" 14. Clear bit (size - 1) (%zd): %s (%s)\n",
100b92: 89 04 24 mov %eax,(%esp)
100b95: e8 1a e9 01 00 call 11f4b4 <strerror>
100b9a: 83 c4 10 add $0x10,%esp
100b9d: ba 2b b4 12 00 mov $0x12b42b,%edx
100ba2: 85 db test %ebx,%ebx
100ba4: 75 05 jne 100bab <rtems_rfs_bitmap_ut_test_bitmap+0x736><== NEVER TAKEN
100ba6: ba 26 b4 12 00 mov $0x12b426,%edx
100bab: 83 ec 0c sub $0xc,%esp
100bae: 50 push %eax
100baf: 52 push %edx
100bb0: ff b5 ec fe ff ff pushl -0x114(%ebp)
100bb6: 68 0b b8 12 00 push $0x12b80b
100bbb: a1 a0 f2 13 00 mov 0x13f2a0,%eax
100bc0: ff 70 0c pushl 0xc(%eax)
100bc3: e8 94 db 01 00 call 11e75c <fiprintf>
size - 1, rc == 0 ? "pass" : "FAIL", strerror (rc));
rtems_rfs_exit_on_error (rc, false, &control, buffer.buffer);
100bc8: 83 c4 20 add $0x20,%esp
100bcb: 85 db test %ebx,%ebx
100bcd: 7e 05 jle 100bd4 <rtems_rfs_bitmap_ut_test_bitmap+0x75f><== ALWAYS TAKEN
100bcf: e9 9d 06 00 00 jmp 101271 <rtems_rfs_bitmap_ut_test_bitmap+0xdfc><== NOT EXECUTED
rc = rtems_rfs_bitmap_map_alloc (&control, 0, &result, &bit);
100bd4: 8d 85 04 ff ff ff lea -0xfc(%ebp),%eax
100bda: 50 push %eax
100bdb: 8d 85 03 ff ff ff lea -0xfd(%ebp),%eax
100be1: 50 push %eax
100be2: 6a 00 push $0x0
100be4: 8d 85 14 ff ff ff lea -0xec(%ebp),%eax
100bea: 50 push %eax
100beb: e8 df ef 00 00 call 10fbcf <rtems_rfs_bitmap_map_alloc>
100bf0: 89 c3 mov %eax,%ebx
result = result && (bit == (size - 1));
100bf2: 83 c4 10 add $0x10,%esp
100bf5: 31 c0 xor %eax,%eax
100bf7: 80 bd 03 ff ff ff 00 cmpb $0x0,-0xfd(%ebp)
100bfe: 74 12 je 100c12 <rtems_rfs_bitmap_ut_test_bitmap+0x79d><== NEVER TAKEN
100c00: 8b 85 ec fe ff ff mov -0x114(%ebp),%eax
100c06: 39 85 04 ff ff ff cmp %eax,-0xfc(%ebp)
100c0c: 0f 94 c0 sete %al
100c0f: 0f b6 c0 movzbl %al,%eax
100c12: 88 85 03 ff ff ff mov %al,-0xfd(%ebp)
100c18: 80 a5 03 ff ff ff 01 andb $0x1,-0xfd(%ebp)
printf (" 15. Find bit with seed = 0: %s (%s): bit = %" PRId32 "\n",
100c1f: 8b b5 04 ff ff ff mov -0xfc(%ebp),%esi
100c25: 83 ec 0c sub $0xc,%esp
100c28: 53 push %ebx
100c29: e8 86 e8 01 00 call 11f4b4 <strerror>
100c2e: 83 c4 10 add $0x10,%esp
100c31: ba 2b b4 12 00 mov $0x12b42b,%edx
100c36: 80 bd 03 ff ff ff 00 cmpb $0x0,-0xfd(%ebp)
100c3d: 74 05 je 100c44 <rtems_rfs_bitmap_ut_test_bitmap+0x7cf><== NEVER TAKEN
100c3f: ba 26 b4 12 00 mov $0x12b426,%edx
100c44: 83 ec 0c sub $0xc,%esp
100c47: 56 push %esi
100c48: 50 push %eax
100c49: 52 push %edx
100c4a: 68 35 b8 12 00 push $0x12b835
100c4f: a1 a0 f2 13 00 mov 0x13f2a0,%eax
100c54: ff 70 0c pushl 0xc(%eax)
100c57: e8 00 db 01 00 call 11e75c <fiprintf>
result ? "pass" : "FAIL", strerror (rc), bit);
rtems_rfs_exit_on_error (rc, !result, &control, buffer.buffer);
100c5c: 83 c4 20 add $0x20,%esp
100c5f: 85 db test %ebx,%ebx
100c61: 0f 8f 0a 06 00 00 jg 101271 <rtems_rfs_bitmap_ut_test_bitmap+0xdfc><== NEVER TAKEN
100c67: 80 bd 03 ff ff ff 00 cmpb $0x0,-0xfd(%ebp)
100c6e: 75 05 jne 100c75 <rtems_rfs_bitmap_ut_test_bitmap+0x800><== ALWAYS TAKEN
100c70: e9 fc 05 00 00 jmp 101271 <rtems_rfs_bitmap_ut_test_bitmap+0xdfc><== NOT EXECUTED
rc = rtems_rfs_bitmap_map_clear (&control, 0);
100c75: 53 push %ebx
100c76: 53 push %ebx
100c77: 6a 00 push $0x0
100c79: 8d 85 14 ff ff ff lea -0xec(%ebp),%eax
100c7f: 50 push %eax
100c80: e8 ca ed 00 00 call 10fa4f <rtems_rfs_bitmap_map_clear>
100c85: 89 c3 mov %eax,%ebx
printf (" 16. Clear bit 0: %s (%s)\n",
100c87: 89 04 24 mov %eax,(%esp)
100c8a: e8 25 e8 01 00 call 11f4b4 <strerror>
100c8f: 83 c4 10 add $0x10,%esp
100c92: ba 2b b4 12 00 mov $0x12b42b,%edx
100c97: 85 db test %ebx,%ebx
100c99: 75 05 jne 100ca0 <rtems_rfs_bitmap_ut_test_bitmap+0x82b><== NEVER TAKEN
100c9b: ba 26 b4 12 00 mov $0x12b426,%edx
100ca0: 50 push %eax
100ca1: 52 push %edx
100ca2: 68 66 b8 12 00 push $0x12b866
100ca7: a1 a0 f2 13 00 mov 0x13f2a0,%eax
100cac: ff 70 0c pushl 0xc(%eax)
100caf: e8 a8 da 01 00 call 11e75c <fiprintf>
rc == 0 ? "pass" : "FAIL", strerror (rc));
rc = rtems_rfs_bitmap_map_alloc (&control, size / 2, &result, &bit);
100cb4: 8b 45 08 mov 0x8(%ebp),%eax
100cb7: d1 e8 shr %eax
100cb9: 89 85 f0 fe ff ff mov %eax,-0x110(%ebp)
100cbf: 8d 85 04 ff ff ff lea -0xfc(%ebp),%eax
100cc5: 50 push %eax
100cc6: 8d 85 03 ff ff ff lea -0xfd(%ebp),%eax
100ccc: 50 push %eax
100ccd: ff b5 f0 fe ff ff pushl -0x110(%ebp)
100cd3: 8d 85 14 ff ff ff lea -0xec(%ebp),%eax
100cd9: 50 push %eax
100cda: e8 f0 ee 00 00 call 10fbcf <rtems_rfs_bitmap_map_alloc>
100cdf: 89 c3 mov %eax,%ebx
result = result && (bit == 0);
100ce1: 83 c4 20 add $0x20,%esp
100ce4: 31 c0 xor %eax,%eax
100ce6: 80 bd 03 ff ff ff 00 cmpb $0x0,-0xfd(%ebp)
100ced: 74 0c je 100cfb <rtems_rfs_bitmap_ut_test_bitmap+0x886><== NEVER TAKEN
100cef: 31 c0 xor %eax,%eax
100cf1: 83 bd 04 ff ff ff 00 cmpl $0x0,-0xfc(%ebp)
100cf8: 0f 94 c0 sete %al
100cfb: 88 85 03 ff ff ff mov %al,-0xfd(%ebp)
100d01: 80 a5 03 ff ff ff 01 andb $0x1,-0xfd(%ebp)
printf (" 17. Find bit with seed = (size / 2) (%zd): %s (%s): bit = %" PRId32 "\n",
100d08: 8b b5 04 ff ff ff mov -0xfc(%ebp),%esi
100d0e: 83 ec 0c sub $0xc,%esp
100d11: 53 push %ebx
100d12: e8 9d e7 01 00 call 11f4b4 <strerror>
100d17: 83 c4 10 add $0x10,%esp
100d1a: ba 2b b4 12 00 mov $0x12b42b,%edx
100d1f: 80 bd 03 ff ff ff 00 cmpb $0x0,-0xfd(%ebp)
100d26: 74 05 je 100d2d <rtems_rfs_bitmap_ut_test_bitmap+0x8b8><== NEVER TAKEN
100d28: ba 26 b4 12 00 mov $0x12b426,%edx
100d2d: 51 push %ecx
100d2e: 51 push %ecx
100d2f: 56 push %esi
100d30: 50 push %eax
100d31: 52 push %edx
100d32: ff b5 f0 fe ff ff pushl -0x110(%ebp)
100d38: 68 81 b8 12 00 push $0x12b881
100d3d: a1 a0 f2 13 00 mov 0x13f2a0,%eax
100d42: ff 70 0c pushl 0xc(%eax)
100d45: e8 12 da 01 00 call 11e75c <fiprintf>
size / 2, result ? "pass" : "FAIL", strerror (rc), bit);
rtems_rfs_exit_on_error (rc, !result, &control, buffer.buffer);
100d4a: 83 c4 20 add $0x20,%esp
100d4d: 85 db test %ebx,%ebx
100d4f: 0f 8f 1c 05 00 00 jg 101271 <rtems_rfs_bitmap_ut_test_bitmap+0xdfc><== NEVER TAKEN
100d55: 80 bd 03 ff ff ff 00 cmpb $0x0,-0xfd(%ebp)
100d5c: 75 05 jne 100d63 <rtems_rfs_bitmap_ut_test_bitmap+0x8ee><== ALWAYS TAKEN
100d5e: e9 0e 05 00 00 jmp 101271 <rtems_rfs_bitmap_ut_test_bitmap+0xdfc><== NOT EXECUTED
rc = rtems_rfs_bitmap_map_clear (&control, size - 1);
100d63: 50 push %eax
100d64: 50 push %eax
100d65: ff b5 ec fe ff ff pushl -0x114(%ebp)
100d6b: 8d 85 14 ff ff ff lea -0xec(%ebp),%eax
100d71: 50 push %eax
100d72: e8 d8 ec 00 00 call 10fa4f <rtems_rfs_bitmap_map_clear>
100d77: 89 c3 mov %eax,%ebx
printf (" 18. Clear bit (size - 1) (%zd): %s, (%s)\n",
100d79: 89 04 24 mov %eax,(%esp)
100d7c: e8 33 e7 01 00 call 11f4b4 <strerror>
100d81: 83 c4 10 add $0x10,%esp
100d84: ba 2b b4 12 00 mov $0x12b42b,%edx
100d89: 85 db test %ebx,%ebx
100d8b: 75 05 jne 100d92 <rtems_rfs_bitmap_ut_test_bitmap+0x91d><== NEVER TAKEN
100d8d: ba 26 b4 12 00 mov $0x12b426,%edx
100d92: 83 ec 0c sub $0xc,%esp
100d95: 50 push %eax
100d96: 52 push %edx
100d97: ff b5 ec fe ff ff pushl -0x114(%ebp)
100d9d: 68 c1 b8 12 00 push $0x12b8c1
100da2: a1 a0 f2 13 00 mov 0x13f2a0,%eax
100da7: ff 70 0c pushl 0xc(%eax)
100daa: e8 ad d9 01 00 call 11e75c <fiprintf>
size - 1, rc == 0 ? "pass" : "FAIL", strerror (rc));
rtems_rfs_exit_on_error (rc, false, &control, buffer.buffer);
100daf: 83 c4 20 add $0x20,%esp
100db2: 85 db test %ebx,%ebx
100db4: 7e 05 jle 100dbb <rtems_rfs_bitmap_ut_test_bitmap+0x946><== ALWAYS TAKEN
100db6: e9 b6 04 00 00 jmp 101271 <rtems_rfs_bitmap_ut_test_bitmap+0xdfc><== NOT EXECUTED
rc = rtems_rfs_bitmap_map_alloc (&control, size / 2, &result, &bit);
100dbb: 8d 85 04 ff ff ff lea -0xfc(%ebp),%eax
100dc1: 50 push %eax
100dc2: 8d 85 03 ff ff ff lea -0xfd(%ebp),%eax
100dc8: 50 push %eax
100dc9: ff b5 f0 fe ff ff pushl -0x110(%ebp)
100dcf: 8d 85 14 ff ff ff lea -0xec(%ebp),%eax
100dd5: 50 push %eax
100dd6: e8 f4 ed 00 00 call 10fbcf <rtems_rfs_bitmap_map_alloc>
100ddb: 89 c3 mov %eax,%ebx
result = result && (bit == (size - 1));
100ddd: 83 c4 10 add $0x10,%esp
100de0: 31 c0 xor %eax,%eax
100de2: 80 bd 03 ff ff ff 00 cmpb $0x0,-0xfd(%ebp)
100de9: 74 12 je 100dfd <rtems_rfs_bitmap_ut_test_bitmap+0x988><== NEVER TAKEN
100deb: 8b 85 ec fe ff ff mov -0x114(%ebp),%eax
100df1: 39 85 04 ff ff ff cmp %eax,-0xfc(%ebp)
100df7: 0f 94 c0 sete %al
100dfa: 0f b6 c0 movzbl %al,%eax
100dfd: 88 85 03 ff ff ff mov %al,-0xfd(%ebp)
100e03: 80 a5 03 ff ff ff 01 andb $0x1,-0xfd(%ebp)
printf (" 19. Find bit with seed = (size / 2) (%zd): %s (%s): bit = %" PRId32 "\n",
100e0a: 8b b5 04 ff ff ff mov -0xfc(%ebp),%esi
100e10: 83 ec 0c sub $0xc,%esp
100e13: 53 push %ebx
100e14: e8 9b e6 01 00 call 11f4b4 <strerror>
100e19: 83 c4 10 add $0x10,%esp
100e1c: ba 2b b4 12 00 mov $0x12b42b,%edx
100e21: 80 bd 03 ff ff ff 00 cmpb $0x0,-0xfd(%ebp)
100e28: 74 05 je 100e2f <rtems_rfs_bitmap_ut_test_bitmap+0x9ba><== NEVER TAKEN
100e2a: ba 26 b4 12 00 mov $0x12b426,%edx
100e2f: 57 push %edi
100e30: 57 push %edi
100e31: 56 push %esi
100e32: 50 push %eax
100e33: 52 push %edx
100e34: ff b5 f0 fe ff ff pushl -0x110(%ebp)
100e3a: 68 ec b8 12 00 push $0x12b8ec
100e3f: a1 a0 f2 13 00 mov 0x13f2a0,%eax
100e44: ff 70 0c pushl 0xc(%eax)
100e47: e8 10 d9 01 00 call 11e75c <fiprintf>
size / 2, result ? "pass" : "FAIL", strerror (rc), bit);
rtems_rfs_exit_on_error (rc, !result, &control, buffer.buffer);
100e4c: 83 c4 20 add $0x20,%esp
100e4f: 85 db test %ebx,%ebx
100e51: 0f 8f 1a 04 00 00 jg 101271 <rtems_rfs_bitmap_ut_test_bitmap+0xdfc><== NEVER TAKEN
100e57: 80 bd 03 ff ff ff 00 cmpb $0x0,-0xfd(%ebp)
100e5e: 75 05 jne 100e65 <rtems_rfs_bitmap_ut_test_bitmap+0x9f0><== ALWAYS TAKEN
100e60: e9 0c 04 00 00 jmp 101271 <rtems_rfs_bitmap_ut_test_bitmap+0xdfc><== NOT EXECUTED
rc = rtems_rfs_bitmap_map_clear (&control, 0);
100e65: 53 push %ebx
100e66: 53 push %ebx
100e67: 6a 00 push $0x0
100e69: 8d 85 14 ff ff ff lea -0xec(%ebp),%eax
100e6f: 50 push %eax
100e70: e8 da eb 00 00 call 10fa4f <rtems_rfs_bitmap_map_clear>
100e75: 89 c3 mov %eax,%ebx
printf (" 20. Clear bit 0: %s (%s)\n",
100e77: 89 04 24 mov %eax,(%esp)
100e7a: e8 35 e6 01 00 call 11f4b4 <strerror>
100e7f: 83 c4 10 add $0x10,%esp
100e82: ba 2b b4 12 00 mov $0x12b42b,%edx
100e87: 85 db test %ebx,%ebx
100e89: 75 05 jne 100e90 <rtems_rfs_bitmap_ut_test_bitmap+0xa1b><== NEVER TAKEN
100e8b: ba 26 b4 12 00 mov $0x12b426,%edx
100e90: 50 push %eax
100e91: 52 push %edx
100e92: 68 2c b9 12 00 push $0x12b92c
100e97: a1 a0 f2 13 00 mov 0x13f2a0,%eax
100e9c: ff 70 0c pushl 0xc(%eax)
100e9f: e8 b8 d8 01 00 call 11e75c <fiprintf>
rc == 0 ? "pass" : "FAIL", strerror (rc));
rc = rtems_rfs_bitmap_map_alloc (&control, (size / 2) - 1, &result, &bit);
100ea4: 8b 9d f0 fe ff ff mov -0x110(%ebp),%ebx
100eaa: 4b dec %ebx
100eab: 8d 85 04 ff ff ff lea -0xfc(%ebp),%eax
100eb1: 50 push %eax
100eb2: 8d 85 03 ff ff ff lea -0xfd(%ebp),%eax
100eb8: 50 push %eax
100eb9: 53 push %ebx
100eba: 8d 85 14 ff ff ff lea -0xec(%ebp),%eax
100ec0: 50 push %eax
100ec1: e8 09 ed 00 00 call 10fbcf <rtems_rfs_bitmap_map_alloc>
100ec6: 89 c6 mov %eax,%esi
result = result && (bit == 0);
100ec8: 83 c4 20 add $0x20,%esp
100ecb: 31 c0 xor %eax,%eax
100ecd: 80 bd 03 ff ff ff 00 cmpb $0x0,-0xfd(%ebp)
100ed4: 74 0c je 100ee2 <rtems_rfs_bitmap_ut_test_bitmap+0xa6d><== NEVER TAKEN
100ed6: 31 c0 xor %eax,%eax
100ed8: 83 bd 04 ff ff ff 00 cmpl $0x0,-0xfc(%ebp)
100edf: 0f 94 c0 sete %al
100ee2: 88 85 03 ff ff ff mov %al,-0xfd(%ebp)
100ee8: 80 a5 03 ff ff ff 01 andb $0x1,-0xfd(%ebp)
printf (" 21. Find bit with seed = ((size / 2) - 1) (%zd): %s (%s): bit = %" PRId32 "\n",
100eef: 8b bd 04 ff ff ff mov -0xfc(%ebp),%edi
100ef5: 83 ec 0c sub $0xc,%esp
100ef8: 56 push %esi
100ef9: e8 b6 e5 01 00 call 11f4b4 <strerror>
100efe: 83 c4 10 add $0x10,%esp
100f01: ba 2b b4 12 00 mov $0x12b42b,%edx
100f06: 80 bd 03 ff ff ff 00 cmpb $0x0,-0xfd(%ebp)
100f0d: 74 05 je 100f14 <rtems_rfs_bitmap_ut_test_bitmap+0xa9f><== NEVER TAKEN
100f0f: ba 26 b4 12 00 mov $0x12b426,%edx
100f14: 51 push %ecx
100f15: 51 push %ecx
100f16: 57 push %edi
100f17: 50 push %eax
100f18: 52 push %edx
100f19: 53 push %ebx
100f1a: 68 47 b9 12 00 push $0x12b947
100f1f: a1 a0 f2 13 00 mov 0x13f2a0,%eax
100f24: ff 70 0c pushl 0xc(%eax)
100f27: e8 30 d8 01 00 call 11e75c <fiprintf>
(size / 2) - 1, result ? "pass" : "FAIL", strerror (rc), bit);
rtems_rfs_exit_on_error (rc, !result, &control, buffer.buffer);
100f2c: 83 c4 20 add $0x20,%esp
100f2f: 85 f6 test %esi,%esi
100f31: 0f 8f 3a 03 00 00 jg 101271 <rtems_rfs_bitmap_ut_test_bitmap+0xdfc><== NEVER TAKEN
100f37: 80 bd 03 ff ff ff 00 cmpb $0x0,-0xfd(%ebp)
100f3e: 75 05 jne 100f45 <rtems_rfs_bitmap_ut_test_bitmap+0xad0><== ALWAYS TAKEN
100f40: e9 2c 03 00 00 jmp 101271 <rtems_rfs_bitmap_ut_test_bitmap+0xdfc><== NOT EXECUTED
rc = rtems_rfs_bitmap_map_clear (&control, size - 1);
100f45: 56 push %esi
100f46: 56 push %esi
100f47: ff b5 ec fe ff ff pushl -0x114(%ebp)
100f4d: 8d 85 14 ff ff ff lea -0xec(%ebp),%eax
100f53: 50 push %eax
100f54: e8 f6 ea 00 00 call 10fa4f <rtems_rfs_bitmap_map_clear>
100f59: 89 c6 mov %eax,%esi
printf (" 22. Clear bit (size - 1) (%zd): %s (%s)\n",
100f5b: 89 04 24 mov %eax,(%esp)
100f5e: e8 51 e5 01 00 call 11f4b4 <strerror>
100f63: 83 c4 10 add $0x10,%esp
100f66: ba 2b b4 12 00 mov $0x12b42b,%edx
100f6b: 85 f6 test %esi,%esi
100f6d: 75 05 jne 100f74 <rtems_rfs_bitmap_ut_test_bitmap+0xaff><== NEVER TAKEN
100f6f: ba 26 b4 12 00 mov $0x12b426,%edx
100f74: 83 ec 0c sub $0xc,%esp
100f77: 50 push %eax
100f78: 52 push %edx
100f79: ff b5 ec fe ff ff pushl -0x114(%ebp)
100f7f: 68 8d b9 12 00 push $0x12b98d
100f84: a1 a0 f2 13 00 mov 0x13f2a0,%eax
100f89: ff 70 0c pushl 0xc(%eax)
100f8c: e8 cb d7 01 00 call 11e75c <fiprintf>
size - 1, rc == 0 ? "pass" : "FAIL", strerror (rc));
rc = rtems_rfs_bitmap_map_alloc (&control, (size / 2) - 1, &result, &bit);
100f91: 83 c4 20 add $0x20,%esp
100f94: 8d 85 04 ff ff ff lea -0xfc(%ebp),%eax
100f9a: 50 push %eax
100f9b: 8d 85 03 ff ff ff lea -0xfd(%ebp),%eax
100fa1: 50 push %eax
100fa2: 53 push %ebx
100fa3: 8d 85 14 ff ff ff lea -0xec(%ebp),%eax
100fa9: 50 push %eax
100faa: e8 20 ec 00 00 call 10fbcf <rtems_rfs_bitmap_map_alloc>
100faf: 89 c6 mov %eax,%esi
result = result && (bit == (size - 1));
100fb1: 83 c4 10 add $0x10,%esp
100fb4: 31 c0 xor %eax,%eax
100fb6: 80 bd 03 ff ff ff 00 cmpb $0x0,-0xfd(%ebp)
100fbd: 74 12 je 100fd1 <rtems_rfs_bitmap_ut_test_bitmap+0xb5c><== NEVER TAKEN
100fbf: 8b 85 ec fe ff ff mov -0x114(%ebp),%eax
100fc5: 39 85 04 ff ff ff cmp %eax,-0xfc(%ebp)
100fcb: 0f 94 c0 sete %al
100fce: 0f b6 c0 movzbl %al,%eax
100fd1: 88 85 03 ff ff ff mov %al,-0xfd(%ebp)
100fd7: 80 a5 03 ff ff ff 01 andb $0x1,-0xfd(%ebp)
printf (" 23. Find bit with seed = ((size / 2) - 1) (%zd): %s (%s): bit = %" PRId32 "\n",
100fde: 8b bd 04 ff ff ff mov -0xfc(%ebp),%edi
100fe4: 83 ec 0c sub $0xc,%esp
100fe7: 56 push %esi
100fe8: e8 c7 e4 01 00 call 11f4b4 <strerror>
100fed: 83 c4 10 add $0x10,%esp
100ff0: ba 2b b4 12 00 mov $0x12b42b,%edx
100ff5: 80 bd 03 ff ff ff 00 cmpb $0x0,-0xfd(%ebp)
100ffc: 74 05 je 101003 <rtems_rfs_bitmap_ut_test_bitmap+0xb8e><== NEVER TAKEN
100ffe: ba 26 b4 12 00 mov $0x12b426,%edx
101003: 51 push %ecx
101004: 51 push %ecx
101005: 57 push %edi
101006: 50 push %eax
101007: 52 push %edx
101008: 53 push %ebx
101009: 68 b7 b9 12 00 push $0x12b9b7
10100e: a1 a0 f2 13 00 mov 0x13f2a0,%eax
101013: ff 70 0c pushl 0xc(%eax)
101016: e8 41 d7 01 00 call 11e75c <fiprintf>
(size / 2) - 1, result ? "pass" : "FAIL", strerror (rc), bit);
rtems_rfs_exit_on_error (rc, !result, &control, buffer.buffer);
10101b: 83 c4 20 add $0x20,%esp
10101e: 85 f6 test %esi,%esi
101020: 0f 8f 4b 02 00 00 jg 101271 <rtems_rfs_bitmap_ut_test_bitmap+0xdfc><== NEVER TAKEN
101026: 80 bd 03 ff ff ff 00 cmpb $0x0,-0xfd(%ebp)
10102d: 75 05 jne 101034 <rtems_rfs_bitmap_ut_test_bitmap+0xbbf><== ALWAYS TAKEN
10102f: e9 3d 02 00 00 jmp 101271 <rtems_rfs_bitmap_ut_test_bitmap+0xdfc><== NOT EXECUTED
bit = rand () % (size / 2) + rtems_rfs_bitmap_element_bits ();
101034: e8 97 db 01 00 call 11ebd0 <rand>
101039: 31 d2 xor %edx,%edx
10103b: f7 b5 f0 fe ff ff divl -0x110(%ebp)
101041: 8d 42 20 lea 0x20(%edx),%eax
101044: 89 85 04 ff ff ff mov %eax,-0xfc(%ebp)
result = rtems_rfs_bitmap_ut_alloc_seq_test (&control, 23, bit,
10104a: 6a 20 push $0x20
10104c: 50 push %eax
10104d: 6a 17 push $0x17
10104f: 8d 9d 14 ff ff ff lea -0xec(%ebp),%ebx
101055: 53 push %ebx
101056: e8 8f f2 ff ff call 1002ea <rtems_rfs_bitmap_ut_alloc_seq_test>
10105b: 88 85 03 ff ff ff mov %al,-0xfd(%ebp)
rtems_rfs_bitmap_element_bits ());
rtems_rfs_exit_on_error (0, !result, &control, buffer.buffer);
101061: 83 c4 10 add $0x10,%esp
101064: 84 c0 test %al,%al
101066: 75 05 jne 10106d <rtems_rfs_bitmap_ut_test_bitmap+0xbf8><== ALWAYS TAKEN
101068: e9 ea 00 00 00 jmp 101157 <rtems_rfs_bitmap_ut_test_bitmap+0xce2><== NOT EXECUTED
bit = rand () % (size / 2) + rtems_rfs_bitmap_element_bits ();
10106d: e8 5e db 01 00 call 11ebd0 <rand>
101072: 31 d2 xor %edx,%edx
101074: f7 b5 f0 fe ff ff divl -0x110(%ebp)
10107a: 8d 42 20 lea 0x20(%edx),%eax
10107d: 89 85 04 ff ff ff mov %eax,-0xfc(%ebp)
result = rtems_rfs_bitmap_ut_alloc_seq_test (&control, 24, bit, 57);
101083: 6a 39 push $0x39
101085: 50 push %eax
101086: 6a 18 push $0x18
101088: 53 push %ebx
101089: e8 5c f2 ff ff call 1002ea <rtems_rfs_bitmap_ut_alloc_seq_test>
10108e: 88 85 03 ff ff ff mov %al,-0xfd(%ebp)
rtems_rfs_exit_on_error (0, !result, &control, buffer.buffer);
101094: 83 c4 10 add $0x10,%esp
101097: 84 c0 test %al,%al
101099: 75 05 jne 1010a0 <rtems_rfs_bitmap_ut_test_bitmap+0xc2b><== ALWAYS TAKEN
10109b: e9 b7 00 00 00 jmp 101157 <rtems_rfs_bitmap_ut_test_bitmap+0xce2><== NOT EXECUTED
/*
* Set all bits, clear a random numberone then create a search map and make
* sure the clear count is correct.
*/
rc = rtems_rfs_bitmap_map_set_all (&control);
1010a0: 83 ec 0c sub $0xc,%esp
1010a3: 53 push %ebx
1010a4: e8 4a ea 00 00 call 10faf3 <rtems_rfs_bitmap_map_set_all>
1010a9: 89 c6 mov %eax,%esi
printf (" 25. Set all bits: %s (%s)\n",
1010ab: 89 04 24 mov %eax,(%esp)
1010ae: e8 01 e4 01 00 call 11f4b4 <strerror>
1010b3: 83 c4 10 add $0x10,%esp
1010b6: ba 2b b4 12 00 mov $0x12b42b,%edx
1010bb: 85 f6 test %esi,%esi
1010bd: 75 05 jne 1010c4 <rtems_rfs_bitmap_ut_test_bitmap+0xc4f><== NEVER TAKEN
1010bf: ba 99 b5 12 00 mov $0x12b599,%edx
1010c4: 50 push %eax
1010c5: 52 push %edx
1010c6: 68 fd b9 12 00 push $0x12b9fd
1010cb: a1 a0 f2 13 00 mov 0x13f2a0,%eax
1010d0: ff 70 0c pushl 0xc(%eax)
1010d3: e8 84 d6 01 00 call 11e75c <fiprintf>
rc == 0 ? "PASS" : "FAIL", strerror (rc));
rtems_rfs_exit_on_error (rc, false, &control, buffer.buffer);
1010d8: 83 c4 10 add $0x10,%esp
1010db: 85 f6 test %esi,%esi
1010dd: 7e 05 jle 1010e4 <rtems_rfs_bitmap_ut_test_bitmap+0xc6f><== ALWAYS TAKEN
1010df: e9 8d 01 00 00 jmp 101271 <rtems_rfs_bitmap_ut_test_bitmap+0xdfc><== NOT EXECUTED
first_bit = rand () % (size / 2) + rtems_rfs_bitmap_element_bits ();
1010e4: e8 e7 da 01 00 call 11ebd0 <rand>
1010e9: 31 d2 xor %edx,%edx
1010eb: f7 b5 f0 fe ff ff divl -0x110(%ebp)
1010f1: 8d 7a 20 lea 0x20(%edx),%edi
last_bit = first_bit + rand () % (size / 2) + rtems_rfs_bitmap_element_bits();
1010f4: e8 d7 da 01 00 call 11ebd0 <rand>
1010f9: 31 d2 xor %edx,%edx
1010fb: f7 b5 f0 fe ff ff divl -0x110(%ebp)
101101: 8d 54 17 20 lea 0x20(%edi,%edx,1),%edx
101105: 89 95 e8 fe ff ff mov %edx,-0x118(%ebp)
for (bit = first_bit; bit < last_bit; bit++)
10110b: 89 bd 04 ff ff ff mov %edi,-0xfc(%ebp)
{
rc = rtems_rfs_bitmap_map_clear (&control, bit);
101111: 8d 9d 14 ff ff ff lea -0xec(%ebp),%ebx
rtems_rfs_exit_on_error (rc, false, &control, buffer.buffer);
first_bit = rand () % (size / 2) + rtems_rfs_bitmap_element_bits ();
last_bit = first_bit + rand () % (size / 2) + rtems_rfs_bitmap_element_bits();
for (bit = first_bit; bit < last_bit; bit++)
101117: eb 5a jmp 101173 <rtems_rfs_bitmap_ut_test_bitmap+0xcfe>
{
rc = rtems_rfs_bitmap_map_clear (&control, bit);
101119: 56 push %esi
10111a: 56 push %esi
10111b: 50 push %eax
10111c: 53 push %ebx
10111d: e8 2d e9 00 00 call 10fa4f <rtems_rfs_bitmap_map_clear>
101122: 89 c6 mov %eax,%esi
if (rc > 0)
101124: 83 c4 10 add $0x10,%esp
101127: 85 c0 test %eax,%eax
101129: 7e 42 jle 10116d <rtems_rfs_bitmap_ut_test_bitmap+0xcf8><== ALWAYS TAKEN
{
printf (" 26. Clear bit %" PRId32 ": %s (%s)\n",
10112b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10112e: 50 push %eax <== NOT EXECUTED
10112f: e8 80 e3 01 00 call 11f4b4 <strerror> <== NOT EXECUTED
101134: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
101137: 68 2b b4 12 00 push $0x12b42b <== NOT EXECUTED
10113c: ff b5 04 ff ff ff pushl -0xfc(%ebp) <== NOT EXECUTED
101142: 68 19 ba 12 00 push $0x12ba19 <== NOT EXECUTED
101147: a1 a0 f2 13 00 mov 0x13f2a0,%eax <== NOT EXECUTED
10114c: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED
10114f: e8 08 d6 01 00 call 11e75c <fiprintf> <== NOT EXECUTED
bit, rc == 0 ? "PASS" : "FAIL", strerror (rc));
rtems_rfs_exit_on_error (rc, false, &control, buffer.buffer);
101154: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
101157: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10115a: ff b5 48 ff ff ff pushl -0xb8(%ebp) <== NOT EXECUTED
101160: e8 c7 75 00 00 call 10872c <free> <== NOT EXECUTED
101165: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED
101168: e9 1b 01 00 00 jmp 101288 <rtems_rfs_bitmap_ut_test_bitmap+0xe13><== NOT EXECUTED
rtems_rfs_exit_on_error (rc, false, &control, buffer.buffer);
first_bit = rand () % (size / 2) + rtems_rfs_bitmap_element_bits ();
last_bit = first_bit + rand () % (size / 2) + rtems_rfs_bitmap_element_bits();
for (bit = first_bit; bit < last_bit; bit++)
10116d: ff 85 04 ff ff ff incl -0xfc(%ebp)
101173: 8b 85 04 ff ff ff mov -0xfc(%ebp),%eax
101179: 3b 85 e8 fe ff ff cmp -0x118(%ebp),%eax
10117f: 7c 98 jl 101119 <rtems_rfs_bitmap_ut_test_bitmap+0xca4>
bit, rc == 0 ? "PASS" : "FAIL", strerror (rc));
rtems_rfs_exit_on_error (rc, false, &control, buffer.buffer);
}
}
printf (" 26. Clear bit (%" PRId32 ", %" PRId32 "]: %s (%s)\n",
101181: 83 ec 0c sub $0xc,%esp
101184: 56 push %esi
101185: e8 2a e3 01 00 call 11f4b4 <strerror>
10118a: 83 c4 10 add $0x10,%esp
10118d: ba 2b b4 12 00 mov $0x12b42b,%edx
101192: 85 f6 test %esi,%esi
101194: 75 05 jne 10119b <rtems_rfs_bitmap_ut_test_bitmap+0xd26><== NEVER TAKEN
101196: ba 99 b5 12 00 mov $0x12b599,%edx
10119b: 53 push %ebx
10119c: 53 push %ebx
10119d: 50 push %eax
10119e: 52 push %edx
10119f: ff b5 e8 fe ff ff pushl -0x118(%ebp)
1011a5: 57 push %edi
1011a6: 68 36 ba 12 00 push $0x12ba36
1011ab: a1 a0 f2 13 00 mov 0x13f2a0,%eax
1011b0: ff 70 0c pushl 0xc(%eax)
1011b3: e8 a4 d5 01 00 call 11e75c <fiprintf>
first_bit, last_bit, rc == 0 ? "PASS" : "FAIL", strerror (rc));
clear = rtems_rfs_bitmap_map_free (&control);
1011b8: 8b 9d 24 ff ff ff mov -0xdc(%ebp),%ebx
result = clear == (last_bit - first_bit);
1011be: 8b 85 e8 fe ff ff mov -0x118(%ebp),%eax
1011c4: 29 f8 sub %edi,%eax
1011c6: 89 c7 mov %eax,%edi
1011c8: 83 c4 14 add $0x14,%esp
1011cb: 39 c3 cmp %eax,%ebx
1011cd: 0f 94 85 03 ff ff ff sete -0xfd(%ebp)
printf (" 27. Check free count is %zd: %" PRId32 ": %s (%s)\n",
1011d4: 56 push %esi
1011d5: e8 da e2 01 00 call 11f4b4 <strerror>
1011da: 83 c4 10 add $0x10,%esp
1011dd: ba 2b b4 12 00 mov $0x12b42b,%edx
1011e2: 80 bd 03 ff ff ff 00 cmpb $0x0,-0xfd(%ebp)
1011e9: 74 05 je 1011f0 <rtems_rfs_bitmap_ut_test_bitmap+0xd7b><== NEVER TAKEN
1011eb: ba 26 b4 12 00 mov $0x12b426,%edx
1011f0: 51 push %ecx
1011f1: 51 push %ecx
1011f2: 50 push %eax
1011f3: 52 push %edx
1011f4: 57 push %edi
1011f5: 53 push %ebx
1011f6: 68 5a ba 12 00 push $0x12ba5a
1011fb: a1 a0 f2 13 00 mov 0x13f2a0,%eax
101200: ff 70 0c pushl 0xc(%eax)
101203: e8 54 d5 01 00 call 11e75c <fiprintf>
clear, last_bit - first_bit,
result ? "pass" : "FAIL", strerror (rc));
rc = rtems_rfs_bitmap_create_search (&control);
101208: 83 c4 14 add $0x14,%esp
10120b: 8d 85 14 ff ff ff lea -0xec(%ebp),%eax
101211: 50 push %eax
101212: e8 61 ea 00 00 call 10fc78 <rtems_rfs_bitmap_create_search>
101217: 89 c6 mov %eax,%esi
result = clear == rtems_rfs_bitmap_map_free (&control);
101219: 3b 9d 24 ff ff ff cmp -0xdc(%ebp),%ebx
10121f: 0f 94 85 03 ff ff ff sete -0xfd(%ebp)
printf (" 28. Create search check free count is %zd: %zd: %s (%s)\n",
101226: 89 04 24 mov %eax,(%esp)
101229: e8 86 e2 01 00 call 11f4b4 <strerror>
10122e: 83 c4 10 add $0x10,%esp
101231: ba 2b b4 12 00 mov $0x12b42b,%edx
101236: 80 bd 03 ff ff ff 00 cmpb $0x0,-0xfd(%ebp)
10123d: 74 05 je 101244 <rtems_rfs_bitmap_ut_test_bitmap+0xdcf><== NEVER TAKEN
10123f: ba 26 b4 12 00 mov $0x12b426,%edx
101244: 57 push %edi
101245: 57 push %edi
101246: 50 push %eax
101247: 52 push %edx
101248: ff b5 24 ff ff ff pushl -0xdc(%ebp)
10124e: 53 push %ebx
10124f: 68 86 ba 12 00 push $0x12ba86
101254: a1 a0 f2 13 00 mov 0x13f2a0,%eax
101259: ff 70 0c pushl 0xc(%eax)
10125c: e8 fb d4 01 00 call 11e75c <fiprintf>
clear, rtems_rfs_bitmap_map_free (&control),
result ? "pass" : "FAIL", strerror (rc));
rtems_rfs_exit_on_error (rc, !result, &control, buffer.buffer);
101261: 83 c4 20 add $0x20,%esp
101264: 85 f6 test %esi,%esi
101266: 7f 09 jg 101271 <rtems_rfs_bitmap_ut_test_bitmap+0xdfc><== NEVER TAKEN
101268: 80 bd 03 ff ff ff 00 cmpb $0x0,-0xfd(%ebp)
10126f: 75 21 jne 101292 <rtems_rfs_bitmap_ut_test_bitmap+0xe1d><== ALWAYS TAKEN
101271: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
101274: ff b5 48 ff ff ff pushl -0xb8(%ebp) <== NOT EXECUTED
10127a: e8 ad 74 00 00 call 10872c <free> <== NOT EXECUTED
10127f: 8d 85 14 ff ff ff lea -0xec(%ebp),%eax <== NOT EXECUTED
101285: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
101288: e8 f4 ea 00 00 call 10fd81 <rtems_rfs_bitmap_close><== NOT EXECUTED
10128d: e9 43 03 00 00 jmp 1015d5 <rtems_rfs_bitmap_ut_test_bitmap+0x1160><== NOT EXECUTED
rtems_rfs_bitmap_bit mybit = control.size +2;
101292: 8b 85 20 ff ff ff mov -0xe0(%ebp),%eax
101298: 8d 70 02 lea 0x2(%eax),%esi
printf (" 29. Map set check with bit (%d) larger than size (%d)\n",
10129b: 50 push %eax
10129c: 56 push %esi
10129d: 68 c0 ba 12 00 push $0x12bac0
1012a2: a1 a0 f2 13 00 mov 0x13f2a0,%eax
1012a7: ff 70 0c pushl 0xc(%eax)
1012aa: e8 ad d4 01 00 call 11e75c <fiprintf>
(int)mybit, (int)control.size);
rc = rtems_rfs_bitmap_map_set(&control, mybit);
1012af: 59 pop %ecx
1012b0: 5b pop %ebx
1012b1: 56 push %esi
1012b2: 8d 9d 14 ff ff ff lea -0xec(%ebp),%ebx
1012b8: 53 push %ebx
1012b9: e8 21 e7 00 00 call 10f9df <rtems_rfs_bitmap_map_set>
rtems_test_assert( rc == EINVAL );
1012be: 83 c4 10 add $0x10,%esp
1012c1: 83 f8 16 cmp $0x16,%eax
1012c4: 74 0f je 1012d5 <rtems_rfs_bitmap_ut_test_bitmap+0xe60><== ALWAYS TAKEN
1012c6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1012c9: 68 f8 ba 12 00 push $0x12baf8 <== NOT EXECUTED
1012ce: 68 7d 01 00 00 push $0x17d <== NOT EXECUTED
1012d3: eb 37 jmp 10130c <rtems_rfs_bitmap_ut_test_bitmap+0xe97><== NOT EXECUTED
printf (" 30. Map clear check with bit (%d) larger than size (%d)\n",
1012d5: ff b5 20 ff ff ff pushl -0xe0(%ebp)
1012db: 56 push %esi
1012dc: 68 74 bb 12 00 push $0x12bb74
1012e1: a1 a0 f2 13 00 mov 0x13f2a0,%eax
1012e6: ff 70 0c pushl 0xc(%eax)
1012e9: e8 6e d4 01 00 call 11e75c <fiprintf>
(int)mybit, (int)control.size);
rc = rtems_rfs_bitmap_map_clear(&control, mybit);
1012ee: 58 pop %eax
1012ef: 5a pop %edx
1012f0: 56 push %esi
1012f1: 53 push %ebx
1012f2: e8 58 e7 00 00 call 10fa4f <rtems_rfs_bitmap_map_clear>
rtems_test_assert( rc == EINVAL );
1012f7: 83 c4 10 add $0x10,%esp
1012fa: 83 f8 16 cmp $0x16,%eax
1012fd: 74 2e je 10132d <rtems_rfs_bitmap_ut_test_bitmap+0xeb8><== ALWAYS TAKEN
1012ff: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
101302: 68 f8 ba 12 00 push $0x12baf8 <== NOT EXECUTED
101307: 68 82 01 00 00 push $0x182 <== NOT EXECUTED
10130c: 68 05 bb 12 00 push $0x12bb05 <== NOT EXECUTED
101311: 68 69 bb 12 00 push $0x12bb69 <== NOT EXECUTED
101316: a1 a0 f2 13 00 mov 0x13f2a0,%eax <== NOT EXECUTED
10131b: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED
10131e: e8 39 d4 01 00 call 11e75c <fiprintf> <== NOT EXECUTED
101323: 83 c4 14 add $0x14,%esp <== NOT EXECUTED
101326: 6a 00 push $0x0 <== NOT EXECUTED
101328: e8 67 cd 01 00 call 11e094 <exit> <== NOT EXECUTED
printf (" 31. Map test check with bit (%d) larger than size (%d)\n",
10132d: ff b5 20 ff ff ff pushl -0xe0(%ebp)
101333: 56 push %esi
101334: 68 ae bb 12 00 push $0x12bbae
101339: a1 a0 f2 13 00 mov 0x13f2a0,%eax
10133e: ff 70 0c pushl 0xc(%eax)
101341: e8 16 d4 01 00 call 11e75c <fiprintf>
(int)mybit, (int)control.size);
rc = rtems_rfs_bitmap_map_test(&control, mybit ,&result);
101346: 83 c4 0c add $0xc,%esp
101349: 8d bd 03 ff ff ff lea -0xfd(%ebp),%edi
10134f: 57 push %edi
101350: 56 push %esi
101351: 53 push %ebx
101352: e8 56 e7 00 00 call 10faad <rtems_rfs_bitmap_map_test>
rtems_test_assert( rc == EINVAL );
101357: 83 c4 10 add $0x10,%esp
10135a: 83 f8 16 cmp $0x16,%eax
10135d: 74 0f je 10136e <rtems_rfs_bitmap_ut_test_bitmap+0xef9><== ALWAYS TAKEN
10135f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
101362: 68 f8 ba 12 00 push $0x12baf8 <== NOT EXECUTED
101367: 68 87 01 00 00 push $0x187 <== NOT EXECUTED
10136c: eb 9e jmp 10130c <rtems_rfs_bitmap_ut_test_bitmap+0xe97><== NOT EXECUTED
/* Set all bits, clear one and then set this cleared bit once again */
printf (" 32. Set all bits in the map, then clear bit (%lu) and set this bit once again:",control.size/2);
10136e: 50 push %eax
10136f: 8b 85 20 ff ff ff mov -0xe0(%ebp),%eax
101375: d1 e8 shr %eax
101377: 50 push %eax
101378: 68 e7 bb 12 00 push $0x12bbe7
10137d: a1 a0 f2 13 00 mov 0x13f2a0,%eax
101382: ff 70 0c pushl 0xc(%eax)
101385: e8 d2 d3 01 00 call 11e75c <fiprintf>
rc = rtems_rfs_bitmap_map_set_all(&control);
10138a: 89 1c 24 mov %ebx,(%esp)
10138d: e8 61 e7 00 00 call 10faf3 <rtems_rfs_bitmap_map_set_all>
rtems_test_assert( rc == 0 );
101392: 83 c4 10 add $0x10,%esp
101395: 85 c0 test %eax,%eax
101397: 74 12 je 1013ab <rtems_rfs_bitmap_ut_test_bitmap+0xf36><== ALWAYS TAKEN
101399: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10139c: 68 37 bc 12 00 push $0x12bc37 <== NOT EXECUTED
1013a1: 68 8c 01 00 00 push $0x18c <== NOT EXECUTED
1013a6: e9 61 ff ff ff jmp 10130c <rtems_rfs_bitmap_ut_test_bitmap+0xe97><== NOT EXECUTED
rc = rtems_rfs_bitmap_map_clear(&control, control.size/2);
1013ab: 50 push %eax
1013ac: 50 push %eax
1013ad: 8b 85 20 ff ff ff mov -0xe0(%ebp),%eax
1013b3: d1 e8 shr %eax
1013b5: 50 push %eax
1013b6: 53 push %ebx
1013b7: e8 93 e6 00 00 call 10fa4f <rtems_rfs_bitmap_map_clear>
rtems_test_assert (rc == 0 );
1013bc: 83 c4 10 add $0x10,%esp
1013bf: 85 c0 test %eax,%eax
1013c1: 74 12 je 1013d5 <rtems_rfs_bitmap_ut_test_bitmap+0xf60><== ALWAYS TAKEN
1013c3: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1013c6: 68 37 bc 12 00 push $0x12bc37 <== NOT EXECUTED
1013cb: 68 8e 01 00 00 push $0x18e <== NOT EXECUTED
1013d0: e9 37 ff ff ff jmp 10130c <rtems_rfs_bitmap_ut_test_bitmap+0xe97><== NOT EXECUTED
rc = rtems_rfs_bitmap_map_set(&control, control.size/2);
1013d5: 50 push %eax
1013d6: 50 push %eax
1013d7: 8b 85 20 ff ff ff mov -0xe0(%ebp),%eax
1013dd: d1 e8 shr %eax
1013df: 50 push %eax
1013e0: 53 push %ebx
1013e1: e8 f9 e5 00 00 call 10f9df <rtems_rfs_bitmap_map_set>
rtems_test_assert (rc == 0 );
1013e6: 83 c4 10 add $0x10,%esp
1013e9: 85 c0 test %eax,%eax
1013eb: 74 12 je 1013ff <rtems_rfs_bitmap_ut_test_bitmap+0xf8a><== ALWAYS TAKEN
1013ed: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1013f0: 68 37 bc 12 00 push $0x12bc37 <== NOT EXECUTED
1013f5: 68 90 01 00 00 push $0x190 <== NOT EXECUTED
1013fa: e9 0d ff ff ff jmp 10130c <rtems_rfs_bitmap_ut_test_bitmap+0xe97><== NOT EXECUTED
printf (" PASSED\n");
1013ff: 51 push %ecx
101400: 51 push %ecx
101401: 68 3f bc 12 00 push $0x12bc3f
101406: a1 a0 f2 13 00 mov 0x13f2a0,%eax
10140b: ff 70 0c pushl 0xc(%eax)
10140e: e8 49 d3 01 00 call 11e75c <fiprintf>
/* Attempt to find free bit (with different seeds) when all bits are set */
printf (" 33. Attempt to find bit when all bits are set (expected FAILED):");
101413: 5e pop %esi
101414: 58 pop %eax
101415: 68 49 bc 12 00 push $0x12bc49
10141a: a1 a0 f2 13 00 mov 0x13f2a0,%eax
10141f: ff 70 0c pushl 0xc(%eax)
101422: e8 35 d3 01 00 call 11e75c <fiprintf>
rc = rtems_rfs_bitmap_map_alloc(&control, 0, &result, &bit);
101427: 8d b5 04 ff ff ff lea -0xfc(%ebp),%esi
10142d: 56 push %esi
10142e: 57 push %edi
10142f: 6a 00 push $0x0
101431: 53 push %ebx
101432: e8 98 e7 00 00 call 10fbcf <rtems_rfs_bitmap_map_alloc>
rtems_test_assert(rc == 0 );
101437: 83 c4 20 add $0x20,%esp
10143a: 85 c0 test %eax,%eax
10143c: 74 12 je 101450 <rtems_rfs_bitmap_ut_test_bitmap+0xfdb><== ALWAYS TAKEN
10143e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
101441: 68 37 bc 12 00 push $0x12bc37 <== NOT EXECUTED
101446: 68 96 01 00 00 push $0x196 <== NOT EXECUTED
10144b: e9 bc fe ff ff jmp 10130c <rtems_rfs_bitmap_ut_test_bitmap+0xe97><== NOT EXECUTED
rtems_test_assert ( result == false );
101450: 80 bd 03 ff ff ff 00 cmpb $0x0,-0xfd(%ebp)
101457: 74 12 je 10146b <rtems_rfs_bitmap_ut_test_bitmap+0xff6><== ALWAYS TAKEN
101459: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10145c: 68 8b bc 12 00 push $0x12bc8b <== NOT EXECUTED
101461: 68 97 01 00 00 push $0x197 <== NOT EXECUTED
101466: e9 a1 fe ff ff jmp 10130c <rtems_rfs_bitmap_ut_test_bitmap+0xe97><== NOT EXECUTED
rc = rtems_rfs_bitmap_map_alloc(&control, size-1, &result, &bit);
10146b: 56 push %esi
10146c: 8d 9d 03 ff ff ff lea -0xfd(%ebp),%ebx
101472: 53 push %ebx
101473: ff b5 ec fe ff ff pushl -0x114(%ebp)
101479: 8d bd 14 ff ff ff lea -0xec(%ebp),%edi
10147f: 57 push %edi
101480: e8 4a e7 00 00 call 10fbcf <rtems_rfs_bitmap_map_alloc>
rtems_test_assert(rc == 0 );
101485: 83 c4 10 add $0x10,%esp
101488: 85 c0 test %eax,%eax
10148a: 74 12 je 10149e <rtems_rfs_bitmap_ut_test_bitmap+0x1029><== ALWAYS TAKEN
10148c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10148f: 68 37 bc 12 00 push $0x12bc37 <== NOT EXECUTED
101494: 68 99 01 00 00 push $0x199 <== NOT EXECUTED
101499: e9 6e fe ff ff jmp 10130c <rtems_rfs_bitmap_ut_test_bitmap+0xe97><== NOT EXECUTED
rtems_test_assert ( result == false );
10149e: 80 bd 03 ff ff ff 00 cmpb $0x0,-0xfd(%ebp)
1014a5: 74 12 je 1014b9 <rtems_rfs_bitmap_ut_test_bitmap+0x1044><== ALWAYS TAKEN
1014a7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1014aa: 68 8b bc 12 00 push $0x12bc8b <== NOT EXECUTED
1014af: 68 9a 01 00 00 push $0x19a <== NOT EXECUTED
1014b4: e9 53 fe ff ff jmp 10130c <rtems_rfs_bitmap_ut_test_bitmap+0xe97><== NOT EXECUTED
rc = rtems_rfs_bitmap_map_alloc(&control, size/2, &result, &bit);
1014b9: 56 push %esi
1014ba: 53 push %ebx
1014bb: ff b5 f0 fe ff ff pushl -0x110(%ebp)
1014c1: 57 push %edi
1014c2: e8 08 e7 00 00 call 10fbcf <rtems_rfs_bitmap_map_alloc>
rtems_test_assert(rc == 0 );
1014c7: 83 c4 10 add $0x10,%esp
1014ca: 85 c0 test %eax,%eax
1014cc: 74 12 je 1014e0 <rtems_rfs_bitmap_ut_test_bitmap+0x106b><== ALWAYS TAKEN
1014ce: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1014d1: 68 37 bc 12 00 push $0x12bc37 <== NOT EXECUTED
1014d6: 68 9c 01 00 00 push $0x19c <== NOT EXECUTED
1014db: e9 2c fe ff ff jmp 10130c <rtems_rfs_bitmap_ut_test_bitmap+0xe97><== NOT EXECUTED
rtems_test_assert ( result == false );
1014e0: 80 bd 03 ff ff ff 00 cmpb $0x0,-0xfd(%ebp)
1014e7: 74 12 je 1014fb <rtems_rfs_bitmap_ut_test_bitmap+0x1086><== ALWAYS TAKEN
1014e9: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1014ec: 68 8b bc 12 00 push $0x12bc8b <== NOT EXECUTED
1014f1: 68 9d 01 00 00 push $0x19d <== NOT EXECUTED
1014f6: e9 11 fe ff ff jmp 10130c <rtems_rfs_bitmap_ut_test_bitmap+0xe97><== NOT EXECUTED
rc = rtems_rfs_bitmap_map_alloc(&control, 1, &result, &bit);
1014fb: 56 push %esi
1014fc: 53 push %ebx
1014fd: 6a 01 push $0x1
1014ff: 57 push %edi
101500: e8 ca e6 00 00 call 10fbcf <rtems_rfs_bitmap_map_alloc>
rtems_test_assert(rc == 0 );
101505: 83 c4 10 add $0x10,%esp
101508: 85 c0 test %eax,%eax
10150a: 74 12 je 10151e <rtems_rfs_bitmap_ut_test_bitmap+0x10a9><== ALWAYS TAKEN
10150c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10150f: 68 37 bc 12 00 push $0x12bc37 <== NOT EXECUTED
101514: 68 9f 01 00 00 push $0x19f <== NOT EXECUTED
101519: e9 ee fd ff ff jmp 10130c <rtems_rfs_bitmap_ut_test_bitmap+0xe97><== NOT EXECUTED
rtems_test_assert ( result == false );
10151e: 80 bd 03 ff ff ff 00 cmpb $0x0,-0xfd(%ebp)
101525: 74 12 je 101539 <rtems_rfs_bitmap_ut_test_bitmap+0x10c4><== ALWAYS TAKEN
101527: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10152a: 68 8b bc 12 00 push $0x12bc8b <== NOT EXECUTED
10152f: 68 a0 01 00 00 push $0x1a0 <== NOT EXECUTED
101534: e9 d3 fd ff ff jmp 10130c <rtems_rfs_bitmap_ut_test_bitmap+0xe97><== NOT EXECUTED
rc = rtems_rfs_bitmap_map_alloc(&control, -2, &result, &bit);
101539: 56 push %esi
10153a: 53 push %ebx
10153b: 6a fe push $0xfffffffe
10153d: 57 push %edi
10153e: e8 8c e6 00 00 call 10fbcf <rtems_rfs_bitmap_map_alloc>
rtems_test_assert(rc == 0 );
101543: 83 c4 10 add $0x10,%esp
101546: 85 c0 test %eax,%eax
101548: 74 12 je 10155c <rtems_rfs_bitmap_ut_test_bitmap+0x10e7><== ALWAYS TAKEN
10154a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10154d: 68 37 bc 12 00 push $0x12bc37 <== NOT EXECUTED
101552: 68 a2 01 00 00 push $0x1a2 <== NOT EXECUTED
101557: e9 b0 fd ff ff jmp 10130c <rtems_rfs_bitmap_ut_test_bitmap+0xe97><== NOT EXECUTED
rtems_test_assert ( result == false );
10155c: 80 bd 03 ff ff ff 00 cmpb $0x0,-0xfd(%ebp)
101563: 74 12 je 101577 <rtems_rfs_bitmap_ut_test_bitmap+0x1102><== ALWAYS TAKEN
101565: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
101568: 68 8b bc 12 00 push $0x12bc8b <== NOT EXECUTED
10156d: 68 a3 01 00 00 push $0x1a3 <== NOT EXECUTED
101572: e9 95 fd ff ff jmp 10130c <rtems_rfs_bitmap_ut_test_bitmap+0xe97><== NOT EXECUTED
printf(" FAILED\n");
101577: 50 push %eax
101578: 50 push %eax
101579: 68 9b bc 12 00 push $0x12bc9b
10157e: a1 a0 f2 13 00 mov 0x13f2a0,%eax
101583: ff 70 0c pushl 0xc(%eax)
101586: e8 d1 d1 01 00 call 11e75c <fiprintf>
/* Simply clear all bits */
printf (" 34. Clear all bits in the map.\n");
10158b: 58 pop %eax
10158c: 5a pop %edx
10158d: 68 a4 bc 12 00 push $0x12bca4
101592: a1 a0 f2 13 00 mov 0x13f2a0,%eax
101597: ff 70 0c pushl 0xc(%eax)
10159a: e8 bd d1 01 00 call 11e75c <fiprintf>
rc = rtems_rfs_bitmap_map_clear_all(&control);
10159f: 89 3c 24 mov %edi,(%esp)
1015a2: e8 b0 e5 00 00 call 10fb57 <rtems_rfs_bitmap_map_clear_all>
rtems_test_assert( rc == 0 );
1015a7: 83 c4 10 add $0x10,%esp
1015aa: 85 c0 test %eax,%eax
1015ac: 74 12 je 1015c0 <rtems_rfs_bitmap_ut_test_bitmap+0x114b><== ALWAYS TAKEN
1015ae: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1015b1: 68 37 bc 12 00 push $0x12bc37 <== NOT EXECUTED
1015b6: 68 a9 01 00 00 push $0x1a9 <== NOT EXECUTED
1015bb: e9 4c fd ff ff jmp 10130c <rtems_rfs_bitmap_ut_test_bitmap+0xe97><== NOT EXECUTED
rtems_rfs_bitmap_close (&control);
1015c0: 83 ec 0c sub $0xc,%esp
1015c3: 57 push %edi
1015c4: e8 b8 e7 00 00 call 10fd81 <rtems_rfs_bitmap_close>
free (buffer.buffer);
1015c9: 5f pop %edi
1015ca: ff b5 48 ff ff ff pushl -0xb8(%ebp)
1015d0: e8 57 71 00 00 call 10872c <free>
1015d5: 83 c4 10 add $0x10,%esp
}
1015d8: 8d 65 f4 lea -0xc(%ebp),%esp
1015db: 5b pop %ebx
1015dc: 5e pop %esi
1015dd: 5f pop %edi
1015de: 5d pop %ebp
1015df: c3 ret
0011937f <rtems_rfs_block_find_indirect>:
rtems_rfs_block_find_indirect (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* buffer,
rtems_rfs_block_no block,
int offset,
rtems_rfs_block_no* result)
{
11937f: 55 push %ebp
119380: 89 e5 mov %esp,%ebp
119382: 57 push %edi
119383: 56 push %esi
119384: 53 push %ebx
119385: 83 ec 1c sub $0x1c,%esp
119388: 89 c6 mov %eax,%esi
11938a: 89 d3 mov %edx,%ebx
11938c: 89 cf mov %ecx,%edi
/*
* If the handle has a buffer and this request is a different block the current
* buffer is released.
*/
rc = rtems_rfs_buffer_handle_request (fs, buffer, block, true);
11938e: 6a 01 push $0x1
119390: 51 push %ecx
119391: 52 push %edx
119392: 50 push %eax
119393: e8 12 0f 00 00 call 11a2aa <rtems_rfs_buffer_handle_request>
if (rc > 0)
119398: 83 c4 10 add $0x10,%esp
11939b: 85 c0 test %eax,%eax
11939d: 7f 7f jg 11941e <rtems_rfs_block_find_indirect+0x9f><== NEVER TAKEN
return rc;
*result = rtems_rfs_block_get_number (buffer, offset);
11939f: 8b 43 08 mov 0x8(%ebx),%eax
1193a2: 8b 58 1c mov 0x1c(%eax),%ebx
1193a5: 8b 45 08 mov 0x8(%ebp),%eax
1193a8: c1 e0 02 shl $0x2,%eax
1193ab: 0f b6 54 03 03 movzbl 0x3(%ebx,%eax,1),%edx
1193b0: 8b 4d 08 mov 0x8(%ebp),%ecx
1193b3: 0f b6 0c 8b movzbl (%ebx,%ecx,4),%ecx
1193b7: c1 e1 18 shl $0x18,%ecx
1193ba: 09 ca or %ecx,%edx
1193bc: 0f b6 4c 03 01 movzbl 0x1(%ebx,%eax,1),%ecx
1193c1: c1 e1 10 shl $0x10,%ecx
1193c4: 09 ca or %ecx,%edx
1193c6: 0f b6 44 03 02 movzbl 0x2(%ebx,%eax,1),%eax
1193cb: c1 e0 08 shl $0x8,%eax
1193ce: 09 c2 or %eax,%edx
if ((*result + 1) == 0)
*result = 0;
1193d0: 31 c0 xor %eax,%eax
1193d2: 83 fa ff cmp $0xffffffff,%edx
1193d5: 0f 95 c0 setne %al
1193d8: f7 d8 neg %eax
1193da: 21 c2 and %eax,%edx
1193dc: 8b 4d 0c mov 0xc(%ebp),%ecx
1193df: 89 11 mov %edx,(%ecx)
if (*result >= rtems_rfs_fs_blocks (fs))
1193e1: 31 c0 xor %eax,%eax
1193e3: 3b 56 04 cmp 0x4(%esi),%edx
1193e6: 72 36 jb 11941e <rtems_rfs_block_find_indirect+0x9f><== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_FIND))
1193e8: 53 push %ebx <== NOT EXECUTED
1193e9: 53 push %ebx <== NOT EXECUTED
1193ea: 6a 00 push $0x0 <== NOT EXECUTED
1193ec: 68 00 10 00 00 push $0x1000 <== NOT EXECUTED
1193f1: e8 a6 a4 ff ff call 11389c <rtems_rfs_trace> <== NOT EXECUTED
1193f6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1193f9: 84 c0 test %al,%al <== NOT EXECUTED
1193fb: 74 16 je 119413 <rtems_rfs_block_find_indirect+0x94><== NOT EXECUTED
printf ("rtems-rfs: block-find: invalid block in table:"
1193fd: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
119400: 57 push %edi <== NOT EXECUTED
119401: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED
119404: ff 31 pushl (%ecx) <== NOT EXECUTED
119406: 68 d3 0c 13 00 push $0x130cd3 <== NOT EXECUTED
11940b: e8 2c 6f 00 00 call 12033c <printf> <== NOT EXECUTED
119410: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
" block=%" PRId32 ", indirect=%" PRId32 "/%d\n", *result, block, offset);
*result = 0;
119413: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED
119416: c7 01 00 00 00 00 movl $0x0,(%ecx) <== NOT EXECUTED
11941c: 31 c0 xor %eax,%eax <== NOT EXECUTED
rc = EIO;
}
return 0;
}
11941e: 8d 65 f4 lea -0xc(%ebp),%esp
119421: 5b pop %ebx
119422: 5e pop %esi
119423: 5f pop %edi
119424: 5d pop %ebp
119425: c3 ret
00119513 <rtems_rfs_block_get_block_size>:
void
rtems_rfs_block_get_block_size (rtems_rfs_file_system* fs,
rtems_rfs_pos pos,
rtems_rfs_block_size* size)
{
119513: 55 push %ebp <== NOT EXECUTED
119514: 89 e5 mov %esp,%ebp <== NOT EXECUTED
119516: 57 push %edi <== NOT EXECUTED
119517: 56 push %esi <== NOT EXECUTED
119518: 53 push %ebx <== NOT EXECUTED
119519: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED
11951c: 8b 75 0c mov 0xc(%ebp),%esi <== NOT EXECUTED
11951f: 8b 7d 10 mov 0x10(%ebp),%edi <== NOT EXECUTED
119522: 8b 5d 14 mov 0x14(%ebp),%ebx <== NOT EXECUTED
if (pos == 0)
119525: 89 f8 mov %edi,%eax <== NOT EXECUTED
119527: 09 f0 or %esi,%eax <== NOT EXECUTED
119529: 75 0f jne 11953a <rtems_rfs_block_get_block_size+0x27><== NOT EXECUTED
* @param size A pointer to the block size.
*/
static inline void
rtems_rfs_block_set_size_zero (rtems_rfs_block_size* size)
{
size->count = 0;
11952b: c7 03 00 00 00 00 movl $0x0,(%ebx) <== NOT EXECUTED
size->offset = 0;
119531: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx) <== NOT EXECUTED
119538: eb 30 jmp 11956a <rtems_rfs_block_get_block_size+0x57><== NOT EXECUTED
rtems_rfs_block_set_size_zero (size);
else
{
size->count = pos / rtems_rfs_fs_block_size (fs) + 1;
11953a: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
11953d: 8b 50 08 mov 0x8(%eax),%edx <== NOT EXECUTED
119540: 31 c9 xor %ecx,%ecx <== NOT EXECUTED
119542: 89 55 e0 mov %edx,-0x20(%ebp) <== NOT EXECUTED
119545: 89 4d e4 mov %ecx,-0x1c(%ebp) <== NOT EXECUTED
119548: 51 push %ecx <== NOT EXECUTED
119549: 52 push %edx <== NOT EXECUTED
11954a: 57 push %edi <== NOT EXECUTED
11954b: 56 push %esi <== NOT EXECUTED
11954c: e8 03 2d 01 00 call 12c254 <__udivdi3> <== NOT EXECUTED
119551: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
119554: 40 inc %eax <== NOT EXECUTED
119555: 89 03 mov %eax,(%ebx) <== NOT EXECUTED
size->offset = pos % rtems_rfs_fs_block_size (fs);
119557: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
11955a: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED
11955d: 57 push %edi <== NOT EXECUTED
11955e: 56 push %esi <== NOT EXECUTED
11955f: e8 f4 2d 01 00 call 12c358 <__umoddi3> <== NOT EXECUTED
119564: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
119567: 89 43 04 mov %eax,0x4(%ebx) <== NOT EXECUTED
}
}
11956a: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
11956d: 5b pop %ebx <== NOT EXECUTED
11956e: 5e pop %esi <== NOT EXECUTED
11956f: 5f pop %edi <== NOT EXECUTED
119570: 5d pop %ebp <== NOT EXECUTED
119571: c3 ret <== NOT EXECUTED
00119749 <rtems_rfs_block_map_close>:
int
rtems_rfs_block_map_close (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map)
{
119749: 55 push %ebp
11974a: 89 e5 mov %esp,%ebp
11974c: 57 push %edi
11974d: 56 push %esi
11974e: 53 push %ebx
11974f: 83 ec 1c sub $0x1c,%esp
119752: 8b 5d 0c mov 0xc(%ebp),%ebx
int rc = 0;
119755: 31 f6 xor %esi,%esi
int brc;
if (map->dirty && map->inode)
119757: 80 3b 00 cmpb $0x0,(%ebx)
11975a: 0f 84 48 01 00 00 je 1198a8 <rtems_rfs_block_map_close+0x15f>
119760: 8b 43 04 mov 0x4(%ebx),%eax
119763: 85 c0 test %eax,%eax
119765: 0f 84 3d 01 00 00 je 1198a8 <rtems_rfs_block_map_close+0x15f><== NEVER TAKEN
{
brc = rtems_rfs_inode_load (fs, map->inode);
11976b: 52 push %edx
11976c: 52 push %edx
11976d: 50 push %eax
11976e: ff 75 08 pushl 0x8(%ebp)
119771: e8 3c 8a ff ff call 1121b2 <rtems_rfs_inode_load>
if (brc > 0)
119776: 83 c4 10 add $0x10,%esp
119779: 89 c6 mov %eax,%esi
11977b: 85 c0 test %eax,%eax
11977d: 0f 8f 25 01 00 00 jg 1198a8 <rtems_rfs_block_map_close+0x15f><== NEVER TAKEN
119783: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
if (rc == 0)
{
int b;
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
rtems_rfs_inode_set_block (map->inode, b, map->blocks[b]);
11978a: 8b 45 e0 mov -0x20(%ebp),%eax
11978d: 8b 74 83 24 mov 0x24(%ebx,%eax,4),%esi
119791: 8b 53 04 mov 0x4(%ebx),%edx
* @param bno The block number.
*/
static inline void
rtems_rfs_inode_set_block (rtems_rfs_inode_handle* handle, int block, uint32_t bno)
{
rtems_rfs_write_u32 (&handle->node->data.blocks[block], bno);
119794: 8d 0c 85 10 00 00 00 lea 0x10(,%eax,4),%ecx
11979b: 89 f7 mov %esi,%edi
11979d: c1 ef 18 shr $0x18,%edi
1197a0: 89 7d e4 mov %edi,-0x1c(%ebp)
1197a3: 8a 45 e4 mov -0x1c(%ebp),%al
1197a6: 8b 7a 0c mov 0xc(%edx),%edi
1197a9: 88 44 0f 0c mov %al,0xc(%edi,%ecx,1)
1197ad: 89 f0 mov %esi,%eax
1197af: c1 e8 10 shr $0x10,%eax
1197b2: 8b 7a 0c mov 0xc(%edx),%edi
1197b5: 88 44 0f 0d mov %al,0xd(%edi,%ecx,1)
1197b9: 89 f0 mov %esi,%eax
1197bb: c1 e8 08 shr $0x8,%eax
1197be: 8b 7a 0c mov 0xc(%edx),%edi
1197c1: 88 44 0f 0e mov %al,0xe(%edi,%ecx,1)
1197c5: 89 f0 mov %esi,%eax
1197c7: 8b 7a 0c mov 0xc(%edx),%edi
1197ca: 88 44 0f 0f mov %al,0xf(%edi,%ecx,1)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
1197ce: c6 42 10 01 movb $0x1,0x10(%edx)
if (rc == 0)
{
int b;
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
1197d2: ff 45 e0 incl -0x20(%ebp)
1197d5: 83 7d e0 05 cmpl $0x5,-0x20(%ebp)
1197d9: 75 af jne 11978a <rtems_rfs_block_map_close+0x41>
rtems_rfs_inode_set_block (map->inode, b, map->blocks[b]);
rtems_rfs_inode_set_block_count (map->inode, map->size.count);
1197db: 8b 53 08 mov 0x8(%ebx),%edx
1197de: 8b 43 04 mov 0x4(%ebx),%eax
* @param block_count The block count.
*/
static inline void
rtems_rfs_inode_set_block_count (rtems_rfs_inode_handle* handle, uint32_t block_count)
{
rtems_rfs_write_u32 (&handle->node->block_count, block_count);
1197e1: 8b 70 0c mov 0xc(%eax),%esi
1197e4: 89 d1 mov %edx,%ecx
1197e6: c1 e9 18 shr $0x18,%ecx
1197e9: 88 4e 0c mov %cl,0xc(%esi)
1197ec: 8b 70 0c mov 0xc(%eax),%esi
1197ef: 89 d1 mov %edx,%ecx
1197f1: c1 e9 10 shr $0x10,%ecx
1197f4: 88 4e 0d mov %cl,0xd(%esi)
1197f7: 8b 70 0c mov 0xc(%eax),%esi
1197fa: 89 d1 mov %edx,%ecx
1197fc: c1 e9 08 shr $0x8,%ecx
1197ff: 88 4e 0e mov %cl,0xe(%esi)
119802: 8b 48 0c mov 0xc(%eax),%ecx
119805: 88 51 0f mov %dl,0xf(%ecx)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
119808: c6 40 10 01 movb $0x1,0x10(%eax)
int
rtems_rfs_block_map_free_all (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map)
{
return rtems_rfs_block_map_shrink (fs, map, map->size.count);
}
11980c: 0f b7 53 0c movzwl 0xc(%ebx),%edx
int b;
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
rtems_rfs_inode_set_block (map->inode, b, map->blocks[b]);
rtems_rfs_inode_set_block_count (map->inode, map->size.count);
rtems_rfs_inode_set_block_offset (map->inode, map->size.offset);
119810: 8b 43 04 mov 0x4(%ebx),%eax
*/
static inline void
rtems_rfs_inode_set_block_offset (rtems_rfs_inode_handle* handle,
uint16_t block_offset)
{
rtems_rfs_write_u16 (&handle->node->block_offset, block_offset);
119813: 8b 70 0c mov 0xc(%eax),%esi
119816: 89 d1 mov %edx,%ecx
119818: 66 c1 e9 08 shr $0x8,%cx
11981c: 88 4e 0a mov %cl,0xa(%esi)
11981f: 8b 48 0c mov 0xc(%eax),%ecx
119822: 88 51 0b mov %dl,0xb(%ecx)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
119825: c6 40 10 01 movb $0x1,0x10(%eax)
rtems_rfs_inode_set_last_map_block (map->inode, map->last_map_block);
119829: 8b 53 1c mov 0x1c(%ebx),%edx
11982c: 8b 43 04 mov 0x4(%ebx),%eax
* @param block_count The last map block number.
*/
static inline void
rtems_rfs_inode_set_last_map_block (rtems_rfs_inode_handle* handle, uint32_t last_map_block)
{
rtems_rfs_write_u32 (&handle->node->last_map_block, last_map_block);
11982f: 8b 70 0c mov 0xc(%eax),%esi
119832: 89 d1 mov %edx,%ecx
119834: c1 e9 18 shr $0x18,%ecx
119837: 88 4e 30 mov %cl,0x30(%esi)
11983a: 8b 70 0c mov 0xc(%eax),%esi
11983d: 89 d1 mov %edx,%ecx
11983f: c1 e9 10 shr $0x10,%ecx
119842: 88 4e 31 mov %cl,0x31(%esi)
119845: 8b 70 0c mov 0xc(%eax),%esi
119848: 89 d1 mov %edx,%ecx
11984a: c1 e9 08 shr $0x8,%ecx
11984d: 88 4e 32 mov %cl,0x32(%esi)
119850: 8b 48 0c mov 0xc(%eax),%ecx
119853: 88 51 33 mov %dl,0x33(%ecx)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
119856: c6 40 10 01 movb $0x1,0x10(%eax)
rtems_rfs_inode_set_last_data_block (map->inode, map->last_data_block);
11985a: 8b 53 20 mov 0x20(%ebx),%edx
11985d: 8b 43 04 mov 0x4(%ebx),%eax
* @param block_count The last data block number.
*/
static inline void
rtems_rfs_inode_set_last_data_block (rtems_rfs_inode_handle* handle, uint32_t last_data_block)
{
rtems_rfs_write_u32 (&handle->node->last_data_block, last_data_block);
119860: 8b 70 0c mov 0xc(%eax),%esi
119863: 89 d1 mov %edx,%ecx
119865: c1 e9 18 shr $0x18,%ecx
119868: 88 4e 34 mov %cl,0x34(%esi)
11986b: 8b 70 0c mov 0xc(%eax),%esi
11986e: 89 d1 mov %edx,%ecx
119870: c1 e9 10 shr $0x10,%ecx
119873: 88 4e 35 mov %cl,0x35(%esi)
119876: 8b 70 0c mov 0xc(%eax),%esi
119879: 89 d1 mov %edx,%ecx
11987b: c1 e9 08 shr $0x8,%ecx
11987e: 88 4e 36 mov %cl,0x36(%esi)
119881: 8b 48 0c mov 0xc(%eax),%ecx
119884: 88 51 37 mov %dl,0x37(%ecx)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
119887: c6 40 10 01 movb $0x1,0x10(%eax)
brc = rtems_rfs_inode_unload (fs, map->inode, true);
11988b: 50 push %eax
11988c: 6a 01 push $0x1
11988e: ff 73 04 pushl 0x4(%ebx)
119891: ff 75 08 pushl 0x8(%ebp)
119894: e8 44 8a ff ff call 1122dd <rtems_rfs_inode_unload>
119899: 83 c4 10 add $0x10,%esp
11989c: 89 c6 mov %eax,%esi
11989e: f7 d6 not %esi
1198a0: c1 fe 1f sar $0x1f,%esi
1198a3: 21 c6 and %eax,%esi
if (brc > 0)
rc = brc;
map->dirty = false;
1198a5: c6 03 00 movb $0x0,(%ebx)
}
}
map->inode = NULL;
1198a8: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx)
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
1198af: 51 push %ecx
1198b0: 51 push %ecx
brc = rtems_rfs_buffer_handle_close (fs, &map->singly_buffer);
1198b1: 8d 43 38 lea 0x38(%ebx),%eax
1198b4: 50 push %eax
1198b5: ff 75 08 pushl 0x8(%ebp)
1198b8: e8 74 08 00 00 call 11a131 <rtems_rfs_buffer_handle_release>
handle->dirty = false;
1198bd: c6 43 38 00 movb $0x0,0x38(%ebx)
handle->bnum = 0;
1198c1: c7 43 3c 00 00 00 00 movl $0x0,0x3c(%ebx)
handle->buffer = NULL;
1198c8: c7 43 40 00 00 00 00 movl $0x0,0x40(%ebx)
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
1198cf: 5f pop %edi
1198d0: 58 pop %eax
if ((brc > 0) && (rc == 0))
rc = brc;
brc = rtems_rfs_buffer_handle_close (fs, &map->doubly_buffer);
1198d1: 8d 43 44 lea 0x44(%ebx),%eax
1198d4: 50 push %eax
1198d5: ff 75 08 pushl 0x8(%ebp)
1198d8: e8 54 08 00 00 call 11a131 <rtems_rfs_buffer_handle_release>
handle->dirty = false;
1198dd: c6 43 44 00 movb $0x0,0x44(%ebx)
handle->bnum = 0;
1198e1: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx)
handle->buffer = NULL;
1198e8: c7 43 4c 00 00 00 00 movl $0x0,0x4c(%ebx)
if ((brc > 0) && (rc == 0))
rc = brc;
return rc;
}
1198ef: 89 f0 mov %esi,%eax
1198f1: 8d 65 f4 lea -0xc(%ebp),%esp
1198f4: 5b pop %ebx
1198f5: 5e pop %esi
1198f6: 5f pop %edi
1198f7: 5d pop %ebp
1198f8: c3 ret
001198f9 <rtems_rfs_block_map_find>:
int
rtems_rfs_block_map_find (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
rtems_rfs_block_pos* bpos,
rtems_rfs_block_no* block)
{
1198f9: 55 push %ebp
1198fa: 89 e5 mov %esp,%ebp
1198fc: 57 push %edi
1198fd: 56 push %esi
1198fe: 53 push %ebx
1198ff: 83 ec 2c sub $0x2c,%esp
119902: 8b 5d 0c mov 0xc(%ebp),%ebx
119905: 8b 75 10 mov 0x10(%ebp),%esi
119908: 8b 7d 14 mov 0x14(%ebp),%edi
int rc = 0;
*block = 0;
11990b: c7 07 00 00 00 00 movl $0x0,(%edi)
/*
* Range checking here makes the remaining logic simpler.
*/
if (rtems_rfs_block_pos_block_past_end (bpos, &map->size))
119911: 8b 06 mov (%esi),%eax
119913: 89 45 d0 mov %eax,-0x30(%ebp)
119916: 85 c0 test %eax,%eax
119918: 74 0f je 119929 <rtems_rfs_block_map_find+0x30>
return ENXIO;
11991a: b8 06 00 00 00 mov $0x6,%eax
*block = 0;
/*
* Range checking here makes the remaining logic simpler.
*/
if (rtems_rfs_block_pos_block_past_end (bpos, &map->size))
11991f: 83 7b 08 00 cmpl $0x0,0x8(%ebx)
119923: 0f 84 d3 00 00 00 je 1199fc <rtems_rfs_block_map_find+0x103><== NEVER TAKEN
119929: 8b 4b 08 mov 0x8(%ebx),%ecx
return ENXIO;
11992c: b8 06 00 00 00 mov $0x6,%eax
*block = 0;
/*
* Range checking here makes the remaining logic simpler.
*/
if (rtems_rfs_block_pos_block_past_end (bpos, &map->size))
119931: 39 4d d0 cmp %ecx,-0x30(%ebp)
119934: 0f 83 c2 00 00 00 jae 1199fc <rtems_rfs_block_map_find+0x103>
return ENXIO;
/*
* If the block position is the same and we have found the block just return it.
*/
if ((bpos->bno == map->bpos.bno) && (map->bpos.block != 0))
11993a: 8b 45 d0 mov -0x30(%ebp),%eax
11993d: 3b 43 10 cmp 0x10(%ebx),%eax
119940: 75 09 jne 11994b <rtems_rfs_block_map_find+0x52>
119942: 8b 43 18 mov 0x18(%ebx),%eax
119945: 85 c0 test %eax,%eax
119947: 74 02 je 11994b <rtems_rfs_block_map_find+0x52>
119949: eb 0c jmp 119957 <rtems_rfs_block_map_find+0x5e>
/*
* Determine the type of access we need to perform. If the number of blocks
* is less than or equal to the number of slots in the inode the blocks are
* directly accessed.
*/
if (map->size.count <= RTEMS_RFS_INODE_BLOCKS)
11994b: 83 f9 05 cmp $0x5,%ecx
11994e: 77 0e ja 11995e <rtems_rfs_block_map_find+0x65>
{
*block = map->blocks[bpos->bno];
119950: 8b 55 d0 mov -0x30(%ebp),%edx
119953: 8b 44 93 24 mov 0x24(%ebx,%edx,4),%eax
119957: 89 07 mov %eax,(%edi)
119959: e9 86 00 00 00 jmp 1199e4 <rtems_rfs_block_map_find+0xeb>
* The map is either singly or doubly indirect.
*/
rtems_rfs_block_no direct;
rtems_rfs_block_no singly;
direct = bpos->bno % fs->blocks_per_block;
11995e: 8b 45 08 mov 0x8(%ebp),%eax
119961: 8b 40 34 mov 0x34(%eax),%eax
119964: 89 45 d4 mov %eax,-0x2c(%ebp)
119967: 8b 45 d0 mov -0x30(%ebp),%eax
11996a: 31 d2 xor %edx,%edx
11996c: f7 75 d4 divl -0x2c(%ebp)
11996f: 89 55 d0 mov %edx,-0x30(%ebp)
singly = bpos->bno / fs->blocks_per_block;
119972: 89 45 e4 mov %eax,-0x1c(%ebp)
if (map->size.count <= fs->block_map_singly_blocks)
119975: 8b 55 08 mov 0x8(%ebp),%edx
119978: 3b 4a 38 cmp 0x38(%edx),%ecx
11997b: 77 0f ja 11998c <rtems_rfs_block_map_find+0x93><== NEVER TAKEN
{
/*
* This is a single indirect table of blocks anchored off a slot in the
* inode.
*/
rc = rtems_rfs_block_find_indirect (fs,
11997d: 52 push %edx
11997e: 52 push %edx
11997f: 8b 4c 83 24 mov 0x24(%ebx,%eax,4),%ecx
119983: 8d 53 38 lea 0x38(%ebx),%edx
119986: 57 push %edi
119987: ff 75 d0 pushl -0x30(%ebp)
11998a: eb 49 jmp 1199d5 <rtems_rfs_block_map_find+0xdc>
* The map is doubly indirect.
*/
rtems_rfs_block_no doubly;
doubly = singly / fs->blocks_per_block;
singly %= fs->blocks_per_block;
11998c: 31 d2 xor %edx,%edx <== NOT EXECUTED
11998e: f7 75 d4 divl -0x2c(%ebp) <== NOT EXECUTED
119991: 89 55 cc mov %edx,-0x34(%ebp) <== NOT EXECUTED
119994: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED
119997: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED
{
/*
* This should never happen. Here so Joel can remove once his coverage
* testing gets to the file systems.
*/
rc = ENXIO;
11999a: b8 06 00 00 00 mov $0x6,%eax <== NOT EXECUTED
rtems_rfs_block_no doubly;
doubly = singly / fs->blocks_per_block;
singly %= fs->blocks_per_block;
if (map->size.count < fs->block_map_doubly_blocks)
11999f: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
1199a2: 3b 4a 3c cmp 0x3c(%edx),%ecx <== NOT EXECUTED
1199a5: 73 55 jae 1199fc <rtems_rfs_block_map_find+0x103><== NOT EXECUTED
{
rc = rtems_rfs_block_find_indirect (fs,
1199a7: 50 push %eax <== NOT EXECUTED
1199a8: 50 push %eax <== NOT EXECUTED
1199a9: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED
1199ac: 8b 4c 83 24 mov 0x24(%ebx,%eax,4),%ecx <== NOT EXECUTED
1199b0: 8d 53 44 lea 0x44(%ebx),%edx <== NOT EXECUTED
1199b3: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED
1199b6: 50 push %eax <== NOT EXECUTED
1199b7: ff 75 cc pushl -0x34(%ebp) <== NOT EXECUTED
1199ba: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
1199bd: e8 bd f9 ff ff call 11937f <rtems_rfs_block_find_indirect><== NOT EXECUTED
&map->doubly_buffer,
map->blocks[doubly],
singly, &singly);
if (rc == 0)
1199c2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1199c5: 85 c0 test %eax,%eax <== NOT EXECUTED
1199c7: 75 33 jne 1199fc <rtems_rfs_block_map_find+0x103><== NOT EXECUTED
{
rc = rtems_rfs_block_find_indirect (fs,
1199c9: 51 push %ecx <== NOT EXECUTED
1199ca: 51 push %ecx <== NOT EXECUTED
1199cb: 8d 53 38 lea 0x38(%ebx),%edx <== NOT EXECUTED
1199ce: 57 push %edi <== NOT EXECUTED
1199cf: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED
1199d2: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED
1199d5: 8b 45 08 mov 0x8(%ebp),%eax
1199d8: e8 a2 f9 ff ff call 11937f <rtems_rfs_block_find_indirect>
1199dd: 83 c4 10 add $0x10,%esp
}
}
}
}
if (rc == 0)
1199e0: 85 c0 test %eax,%eax
1199e2: 75 18 jne 1199fc <rtems_rfs_block_map_find+0x103><== NEVER TAKEN
{
rtems_rfs_block_copy_bpos (&map->bpos, bpos);
1199e4: 8b 06 mov (%esi),%eax
1199e6: 89 43 10 mov %eax,0x10(%ebx)
1199e9: 8b 46 04 mov 0x4(%esi),%eax
1199ec: 89 43 14 mov %eax,0x14(%ebx)
1199ef: 8b 46 08 mov 0x8(%esi),%eax
1199f2: 89 43 18 mov %eax,0x18(%ebx)
map->bpos.block = *block;
1199f5: 8b 07 mov (%edi),%eax
1199f7: 89 43 18 mov %eax,0x18(%ebx)
1199fa: 31 c0 xor %eax,%eax
}
return rc;
}
1199fc: 8d 65 f4 lea -0xc(%ebp),%esp
1199ff: 5b pop %ebx
119a00: 5e pop %esi
119a01: 5f pop %edi
119a02: 5d pop %ebp
119a03: c3 ret
00119a9e <rtems_rfs_block_map_grow>:
int
rtems_rfs_block_map_grow (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
size_t blocks,
rtems_rfs_block_no* new_block)
{
119a9e: 55 push %ebp
119a9f: 89 e5 mov %esp,%ebp
119aa1: 57 push %edi
119aa2: 56 push %esi
119aa3: 53 push %ebx
119aa4: 83 ec 44 sub $0x44,%esp
119aa7: 8b 75 08 mov 0x8(%ebp),%esi
119aaa: 8b 5d 0c mov 0xc(%ebp),%ebx
int b;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_GROW))
119aad: 6a 00 push $0x0
119aaf: 68 00 20 00 00 push $0x2000
119ab4: e8 e3 9d ff ff call 11389c <rtems_rfs_trace>
119ab9: 83 c4 10 add $0x10,%esp
119abc: 84 c0 test %al,%al
119abe: 74 14 je 119ad4 <rtems_rfs_block_map_grow+0x36><== ALWAYS TAKEN
printf ("rtems-rfs: block-map-grow: entry: blocks=%zd count=%" PRIu32 "\n",
119ac0: 51 push %ecx <== NOT EXECUTED
119ac1: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED
119ac4: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED
119ac7: 68 1e 0d 13 00 push $0x130d1e <== NOT EXECUTED
119acc: e8 6b 68 00 00 call 12033c <printf> <== NOT EXECUTED
119ad1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
blocks, map->size.count);
if ((map->size.count + blocks) >= rtems_rfs_fs_max_block_map_blocks (fs))
119ad4: 8b 45 10 mov 0x10(%ebp),%eax
119ad7: 03 43 08 add 0x8(%ebx),%eax
return EFBIG;
119ada: bf 1b 00 00 00 mov $0x1b,%edi
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_GROW))
printf ("rtems-rfs: block-map-grow: entry: blocks=%zd count=%" PRIu32 "\n",
blocks, map->size.count);
if ((map->size.count + blocks) >= rtems_rfs_fs_max_block_map_blocks (fs))
119adf: 3b 46 3c cmp 0x3c(%esi),%eax
119ae2: 0f 83 5f 02 00 00 jae 119d47 <rtems_rfs_block_map_grow+0x2a9><== NEVER TAKEN
119ae8: e9 3f 02 00 00 jmp 119d2c <rtems_rfs_block_map_grow+0x28e>
/*
* Allocate the block. If an indirect block is needed and cannot be
* allocated free this block.
*/
rc = rtems_rfs_group_bitmap_alloc (fs, map->last_data_block,
119aed: 8d 45 e0 lea -0x20(%ebp),%eax
119af0: 50 push %eax
119af1: 6a 00 push $0x0
119af3: ff 73 20 pushl 0x20(%ebx)
119af6: 56 push %esi
119af7: e8 56 83 ff ff call 111e52 <rtems_rfs_group_bitmap_alloc>
119afc: 89 c7 mov %eax,%edi
false, &block);
if (rc > 0)
119afe: 83 c4 10 add $0x10,%esp
119b01: 85 c0 test %eax,%eax
119b03: 0f 8f 3e 02 00 00 jg 119d47 <rtems_rfs_block_map_grow+0x2a9>
return rc;
if (map->size.count < RTEMS_RFS_INODE_BLOCKS)
119b09: 8b 7b 08 mov 0x8(%ebx),%edi
119b0c: 83 ff 04 cmp $0x4,%edi
119b0f: 77 0c ja 119b1d <rtems_rfs_block_map_grow+0x7f>
map->blocks[map->size.count] = block;
119b11: 8b 45 e0 mov -0x20(%ebp),%eax
119b14: 89 44 bb 24 mov %eax,0x24(%ebx,%edi,4)
119b18: e9 ec 01 00 00 jmp 119d09 <rtems_rfs_block_map_grow+0x26b>
* Single indirect access is occuring. It could still be doubly indirect.
*/
rtems_rfs_block_no direct;
rtems_rfs_block_no singly;
direct = map->size.count % fs->blocks_per_block;
119b1d: 8b 4e 34 mov 0x34(%esi),%ecx
119b20: 89 f8 mov %edi,%eax
119b22: 31 d2 xor %edx,%edx
119b24: f7 f1 div %ecx
119b26: 89 55 d0 mov %edx,-0x30(%ebp)
singly = map->size.count / fs->blocks_per_block;
if (map->size.count < fs->block_map_singly_blocks)
119b29: 3b 7e 38 cmp 0x38(%esi),%edi
119b2c: 73 39 jae 119b67 <rtems_rfs_block_map_grow+0xc9><== NEVER TAKEN
* Singly indirect tables are being used. Allocate a new block for a
* mapping table if direct is 0 or we are moving up (upping). If upping
* move the direct blocks into the table and if not this is the first
* entry of a new block.
*/
if ((direct == 0) ||
119b2e: 85 d2 test %edx,%edx
119b30: 74 09 je 119b3b <rtems_rfs_block_map_grow+0x9d><== NEVER TAKEN
119b32: 83 fa 05 cmp $0x5,%edx
119b35: 75 25 jne 119b5c <rtems_rfs_block_map_grow+0xbe>
119b37: 85 c0 test %eax,%eax
119b39: 75 21 jne 119b5c <rtems_rfs_block_map_grow+0xbe><== NEVER TAKEN
/*
* Upping is when we move from direct to singly indirect.
*/
bool upping;
upping = map->size.count == RTEMS_RFS_INODE_BLOCKS;
rc = rtems_rfs_block_map_indirect_alloc (fs, map,
119b3b: 52 push %edx
119b3c: 52 push %edx
119b3d: 8d 4b 38 lea 0x38(%ebx),%ecx
{
/*
* Upping is when we move from direct to singly indirect.
*/
bool upping;
upping = map->size.count == RTEMS_RFS_INODE_BLOCKS;
119b40: 31 d2 xor %edx,%edx
119b42: 83 ff 05 cmp $0x5,%edi
119b45: 0f 94 c2 sete %dl
rc = rtems_rfs_block_map_indirect_alloc (fs, map,
119b48: 52 push %edx
&map->singly_buffer,
&map->blocks[singly],
119b49: 8d 44 83 24 lea 0x24(%ebx,%eax,4),%eax
/*
* Upping is when we move from direct to singly indirect.
*/
bool upping;
upping = map->size.count == RTEMS_RFS_INODE_BLOCKS;
rc = rtems_rfs_block_map_indirect_alloc (fs, map,
119b4d: 50 push %eax
119b4e: 89 da mov %ebx,%edx
119b50: 89 f0 mov %esi,%eax
119b52: e8 1d f7 ff ff call 119274 <rtems_rfs_block_map_indirect_alloc>
119b57: e9 4b 01 00 00 jmp 119ca7 <rtems_rfs_block_map_grow+0x209>
&map->blocks[singly],
upping);
}
else
{
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
119b5c: 6a 01 push $0x1
119b5e: ff 74 83 24 pushl 0x24(%ebx,%eax,4)
119b62: e9 36 01 00 00 jmp 119c9d <rtems_rfs_block_map_grow+0x1ff>
* Doubly indirect tables are being used.
*/
rtems_rfs_block_no doubly;
rtems_rfs_block_no singly_block;
doubly = singly / fs->blocks_per_block;
119b67: 31 d2 xor %edx,%edx <== NOT EXECUTED
119b69: f7 f1 div %ecx <== NOT EXECUTED
119b6b: 89 55 d4 mov %edx,-0x2c(%ebp) <== NOT EXECUTED
119b6e: 89 45 c8 mov %eax,-0x38(%ebp) <== NOT EXECUTED
* Allocate a new block for a singly indirect table if direct is 0 as
* it is the first entry of a new block. We may also need to allocate a
* doubly indirect block as well. Both always occur when direct is 0
* and the doubly indirect block when singly is 0.
*/
if (direct == 0)
119b71: 83 7d d0 00 cmpl $0x0,-0x30(%ebp) <== NOT EXECUTED
119b75: 0f 85 ce 00 00 00 jne 119c49 <rtems_rfs_block_map_grow+0x1ab><== NOT EXECUTED
{
rc = rtems_rfs_block_map_indirect_alloc (fs, map,
119b7b: 50 push %eax <== NOT EXECUTED
119b7c: 50 push %eax <== NOT EXECUTED
119b7d: 8d 4b 38 lea 0x38(%ebx),%ecx <== NOT EXECUTED
119b80: 6a 00 push $0x0 <== NOT EXECUTED
119b82: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED
119b85: 50 push %eax <== NOT EXECUTED
119b86: 89 da mov %ebx,%edx <== NOT EXECUTED
119b88: 89 f0 mov %esi,%eax <== NOT EXECUTED
119b8a: e8 e5 f6 ff ff call 119274 <rtems_rfs_block_map_indirect_alloc><== NOT EXECUTED
119b8f: 89 c7 mov %eax,%edi <== NOT EXECUTED
&map->singly_buffer,
&singly_block,
false);
if (rc > 0)
119b91: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
119b94: 85 c0 test %eax,%eax <== NOT EXECUTED
119b96: 7e 05 jle 119b9d <rtems_rfs_block_map_grow+0xff><== NOT EXECUTED
119b98: e9 13 01 00 00 jmp 119cb0 <rtems_rfs_block_map_grow+0x212><== NOT EXECUTED
/*
* Allocate a new block for a doubly indirect table if singly is 0 as
* it is the first entry of a new singly indirect block.
*/
if ((singly == 0) ||
119b9d: 83 7d d4 00 cmpl $0x0,-0x2c(%ebp) <== NOT EXECUTED
119ba1: 74 0c je 119baf <rtems_rfs_block_map_grow+0x111><== NOT EXECUTED
119ba3: 83 7d d4 05 cmpl $0x5,-0x2c(%ebp) <== NOT EXECUTED
119ba7: 75 2a jne 119bd3 <rtems_rfs_block_map_grow+0x135><== NOT EXECUTED
119ba9: 83 7d c8 00 cmpl $0x0,-0x38(%ebp) <== NOT EXECUTED
119bad: 75 24 jne 119bd3 <rtems_rfs_block_map_grow+0x135><== NOT EXECUTED
((doubly == 0) && (singly == RTEMS_RFS_INODE_BLOCKS)))
{
bool upping;
upping = map->size.count == fs->block_map_singly_blocks;
rc = rtems_rfs_block_map_indirect_alloc (fs, map,
119baf: 57 push %edi <== NOT EXECUTED
119bb0: 57 push %edi <== NOT EXECUTED
*/
if ((singly == 0) ||
((doubly == 0) && (singly == RTEMS_RFS_INODE_BLOCKS)))
{
bool upping;
upping = map->size.count == fs->block_map_singly_blocks;
119bb1: 8b 7e 38 mov 0x38(%esi),%edi <== NOT EXECUTED
119bb4: 31 c0 xor %eax,%eax <== NOT EXECUTED
119bb6: 39 7b 08 cmp %edi,0x8(%ebx) <== NOT EXECUTED
119bb9: 0f 94 c0 sete %al <== NOT EXECUTED
rc = rtems_rfs_block_map_indirect_alloc (fs, map,
119bbc: 50 push %eax <== NOT EXECUTED
&map->doubly_buffer,
&map->blocks[doubly],
119bbd: 8b 55 c8 mov -0x38(%ebp),%edx <== NOT EXECUTED
119bc0: 8d 44 93 24 lea 0x24(%ebx,%edx,4),%eax <== NOT EXECUTED
if ((singly == 0) ||
((doubly == 0) && (singly == RTEMS_RFS_INODE_BLOCKS)))
{
bool upping;
upping = map->size.count == fs->block_map_singly_blocks;
rc = rtems_rfs_block_map_indirect_alloc (fs, map,
119bc4: 50 push %eax <== NOT EXECUTED
119bc5: 8b 4d c4 mov -0x3c(%ebp),%ecx <== NOT EXECUTED
119bc8: 89 da mov %ebx,%edx <== NOT EXECUTED
119bca: 89 f0 mov %esi,%eax <== NOT EXECUTED
119bcc: e8 a3 f6 ff ff call 119274 <rtems_rfs_block_map_indirect_alloc><== NOT EXECUTED
119bd1: eb 12 jmp 119be5 <rtems_rfs_block_map_grow+0x147><== NOT EXECUTED
return rc;
}
}
else
{
rc = rtems_rfs_buffer_handle_request (fs, &map->doubly_buffer,
119bd3: 6a 01 push $0x1 <== NOT EXECUTED
119bd5: 8b 45 c8 mov -0x38(%ebp),%eax <== NOT EXECUTED
119bd8: ff 74 83 24 pushl 0x24(%ebx,%eax,4) <== NOT EXECUTED
119bdc: ff 75 c4 pushl -0x3c(%ebp) <== NOT EXECUTED
119bdf: 56 push %esi <== NOT EXECUTED
119be0: e8 c5 06 00 00 call 11a2aa <rtems_rfs_buffer_handle_request><== NOT EXECUTED
119be5: 89 c7 mov %eax,%edi <== NOT EXECUTED
map->blocks[doubly], true);
if (rc > 0)
119be7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
119bea: 85 c0 test %eax,%eax <== NOT EXECUTED
119bec: 7e 14 jle 119c02 <rtems_rfs_block_map_grow+0x164><== NOT EXECUTED
{
rtems_rfs_group_bitmap_free (fs, false, singly_block);
119bee: 53 push %ebx <== NOT EXECUTED
119bef: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
119bf2: 6a 00 push $0x0 <== NOT EXECUTED
119bf4: 56 push %esi <== NOT EXECUTED
119bf5: e8 e1 83 ff ff call 111fdb <rtems_rfs_group_bitmap_free><== NOT EXECUTED
rtems_rfs_group_bitmap_free (fs, false, block);
119bfa: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
119bfd: e9 af 00 00 00 jmp 119cb1 <rtems_rfs_block_map_grow+0x213><== NOT EXECUTED
return rc;
}
}
rtems_rfs_block_set_number (&map->doubly_buffer,
119c02: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED
119c05: c1 e0 02 shl $0x2,%eax <== NOT EXECUTED
119c08: 8b 53 4c mov 0x4c(%ebx),%edx <== NOT EXECUTED
119c0b: 8b 52 1c mov 0x1c(%edx),%edx <== NOT EXECUTED
119c0e: 0f b6 4d e7 movzbl -0x19(%ebp),%ecx <== NOT EXECUTED
119c12: 8b 7d d4 mov -0x2c(%ebp),%edi <== NOT EXECUTED
119c15: 88 0c ba mov %cl,(%edx,%edi,4) <== NOT EXECUTED
119c18: 8b 53 4c mov 0x4c(%ebx),%edx <== NOT EXECUTED
119c1b: 8b 52 1c mov 0x1c(%edx),%edx <== NOT EXECUTED
119c1e: 0f b7 4d e6 movzwl -0x1a(%ebp),%ecx <== NOT EXECUTED
119c22: 88 4c 02 01 mov %cl,0x1(%edx,%eax,1) <== NOT EXECUTED
119c26: 8b 53 4c mov 0x4c(%ebx),%edx <== NOT EXECUTED
119c29: 8b 4a 1c mov 0x1c(%edx),%ecx <== NOT EXECUTED
119c2c: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
119c2f: c1 ea 08 shr $0x8,%edx <== NOT EXECUTED
119c32: 88 54 01 02 mov %dl,0x2(%ecx,%eax,1) <== NOT EXECUTED
119c36: 8b 53 4c mov 0x4c(%ebx),%edx <== NOT EXECUTED
119c39: 8b 4a 1c mov 0x1c(%edx),%ecx <== NOT EXECUTED
119c3c: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
119c3f: 88 54 01 03 mov %dl,0x3(%ecx,%eax,1) <== NOT EXECUTED
119c43: c6 43 44 01 movb $0x1,0x44(%ebx) <== NOT EXECUTED
119c47: eb 7b jmp 119cc4 <rtems_rfs_block_map_grow+0x226><== NOT EXECUTED
singly,
singly_block);
}
else
{
rc = rtems_rfs_buffer_handle_request (fs,
119c49: 6a 01 push $0x1 <== NOT EXECUTED
119c4b: 8b 45 c8 mov -0x38(%ebp),%eax <== NOT EXECUTED
119c4e: ff 74 83 24 pushl 0x24(%ebx,%eax,4) <== NOT EXECUTED
119c52: ff 75 c4 pushl -0x3c(%ebp) <== NOT EXECUTED
119c55: 56 push %esi <== NOT EXECUTED
119c56: e8 4f 06 00 00 call 11a2aa <rtems_rfs_buffer_handle_request><== NOT EXECUTED
119c5b: 89 c7 mov %eax,%edi <== NOT EXECUTED
&map->doubly_buffer,
map->blocks[doubly],
true);
if (rc > 0)
119c5d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
119c60: 85 c0 test %eax,%eax <== NOT EXECUTED
119c62: 7e 02 jle 119c66 <rtems_rfs_block_map_grow+0x1c8><== NOT EXECUTED
119c64: eb 4a jmp 119cb0 <rtems_rfs_block_map_grow+0x212><== NOT EXECUTED
{
rtems_rfs_group_bitmap_free (fs, false, block);
return rc;
}
singly_block = rtems_rfs_block_get_number (&map->doubly_buffer,
119c66: 8b 43 4c mov 0x4c(%ebx),%eax <== NOT EXECUTED
119c69: 8b 50 1c mov 0x1c(%eax),%edx <== NOT EXECUTED
119c6c: 8b 4d d4 mov -0x2c(%ebp),%ecx <== NOT EXECUTED
119c6f: c1 e1 02 shl $0x2,%ecx <== NOT EXECUTED
119c72: 0f b6 44 0a 03 movzbl 0x3(%edx,%ecx,1),%eax <== NOT EXECUTED
119c77: 8b 7d d4 mov -0x2c(%ebp),%edi <== NOT EXECUTED
119c7a: 0f b6 3c ba movzbl (%edx,%edi,4),%edi <== NOT EXECUTED
119c7e: c1 e7 18 shl $0x18,%edi <== NOT EXECUTED
119c81: 09 f8 or %edi,%eax <== NOT EXECUTED
119c83: 0f b6 7c 0a 01 movzbl 0x1(%edx,%ecx,1),%edi <== NOT EXECUTED
119c88: c1 e7 10 shl $0x10,%edi <== NOT EXECUTED
119c8b: 09 f8 or %edi,%eax <== NOT EXECUTED
119c8d: 0f b6 54 0a 02 movzbl 0x2(%edx,%ecx,1),%edx <== NOT EXECUTED
119c92: c1 e2 08 shl $0x8,%edx <== NOT EXECUTED
119c95: 09 d0 or %edx,%eax <== NOT EXECUTED
119c97: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED
singly);
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
119c9a: 6a 01 push $0x1 <== NOT EXECUTED
119c9c: 50 push %eax <== NOT EXECUTED
119c9d: 8d 43 38 lea 0x38(%ebx),%eax
119ca0: 50 push %eax
119ca1: 56 push %esi
119ca2: e8 03 06 00 00 call 11a2aa <rtems_rfs_buffer_handle_request>
119ca7: 89 c7 mov %eax,%edi
singly_block, true);
if (rc > 0)
119ca9: 83 c4 10 add $0x10,%esp
119cac: 85 c0 test %eax,%eax
119cae: 7e 14 jle 119cc4 <rtems_rfs_block_map_grow+0x226><== ALWAYS TAKEN
{
rtems_rfs_group_bitmap_free (fs, false, block);
119cb0: 51 push %ecx <== NOT EXECUTED
119cb1: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED
119cb4: 6a 00 push $0x0 <== NOT EXECUTED
119cb6: 56 push %esi <== NOT EXECUTED
119cb7: e8 1f 83 ff ff call 111fdb <rtems_rfs_group_bitmap_free><== NOT EXECUTED
119cbc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
119cbf: e9 83 00 00 00 jmp 119d47 <rtems_rfs_block_map_grow+0x2a9><== NOT EXECUTED
return rc;
}
}
}
rtems_rfs_block_set_number (&map->singly_buffer, direct, block);
119cc4: 8b 45 d0 mov -0x30(%ebp),%eax
119cc7: c1 e0 02 shl $0x2,%eax
119cca: 8b 53 40 mov 0x40(%ebx),%edx
119ccd: 8b 52 1c mov 0x1c(%edx),%edx
119cd0: 0f b6 4d e3 movzbl -0x1d(%ebp),%ecx
119cd4: 8b 7d d0 mov -0x30(%ebp),%edi
119cd7: 88 0c ba mov %cl,(%edx,%edi,4)
119cda: 8b 53 40 mov 0x40(%ebx),%edx
119cdd: 8b 52 1c mov 0x1c(%edx),%edx
119ce0: 0f b7 4d e2 movzwl -0x1e(%ebp),%ecx
119ce4: 88 4c 02 01 mov %cl,0x1(%edx,%eax,1)
119ce8: 8b 53 40 mov 0x40(%ebx),%edx
119ceb: 8b 4a 1c mov 0x1c(%edx),%ecx
119cee: 8b 55 e0 mov -0x20(%ebp),%edx
119cf1: c1 ea 08 shr $0x8,%edx
119cf4: 88 54 01 02 mov %dl,0x2(%ecx,%eax,1)
119cf8: 8b 53 40 mov 0x40(%ebx),%edx
119cfb: 8b 4a 1c mov 0x1c(%edx),%ecx
119cfe: 8b 55 e0 mov -0x20(%ebp),%edx
119d01: 88 54 01 03 mov %dl,0x3(%ecx,%eax,1)
119d05: c6 43 38 01 movb $0x1,0x38(%ebx)
}
map->size.count++;
119d09: ff 43 08 incl 0x8(%ebx)
map->size.offset = 0;
119d0c: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
if (b == 0)
119d13: 83 7d cc 00 cmpl $0x0,-0x34(%ebp)
119d17: 8b 45 e0 mov -0x20(%ebp),%eax
119d1a: 75 05 jne 119d21 <rtems_rfs_block_map_grow+0x283><== NEVER TAKEN
*new_block = block;
119d1c: 8b 7d 14 mov 0x14(%ebp),%edi
119d1f: 89 07 mov %eax,(%edi)
map->last_data_block = block;
119d21: 89 43 20 mov %eax,0x20(%ebx)
map->dirty = true;
119d24: c6 03 01 movb $0x1,(%ebx)
/*
* Allocate a block at a time. The buffer handles hold the blocks so adding
* this way does not thrash the cache with lots of requests.
*/
for (b = 0; b < blocks; b++)
119d27: ff 45 cc incl -0x34(%ebp)
119d2a: eb 0d jmp 119d39 <rtems_rfs_block_map_grow+0x29b>
map->last_map_block = new_block;
return 0;
}
int
rtems_rfs_block_map_grow (rtems_rfs_file_system* fs,
119d2c: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp)
singly,
singly_block);
}
else
{
rc = rtems_rfs_buffer_handle_request (fs,
119d33: 8d 7b 44 lea 0x44(%ebx),%edi
119d36: 89 7d c4 mov %edi,-0x3c(%ebp)
/*
* Allocate a block at a time. The buffer handles hold the blocks so adding
* this way does not thrash the cache with lots of requests.
*/
for (b = 0; b < blocks; b++)
119d39: 8b 7d 10 mov 0x10(%ebp),%edi
119d3c: 39 7d cc cmp %edi,-0x34(%ebp)
119d3f: 0f 85 a8 fd ff ff jne 119aed <rtems_rfs_block_map_grow+0x4f>
*new_block = block;
map->last_data_block = block;
map->dirty = true;
}
return 0;
119d45: 31 ff xor %edi,%edi
}
119d47: 89 f8 mov %edi,%eax
119d49: 8d 65 f4 lea -0xc(%ebp),%esp
119d4c: 5b pop %ebx
119d4d: 5e pop %esi
119d4e: 5f pop %edi
119d4f: 5d pop %ebp
119d50: c3 ret
00119274 <rtems_rfs_block_map_indirect_alloc>:
rtems_rfs_block_map_indirect_alloc (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
rtems_rfs_buffer_handle* buffer,
rtems_rfs_block_no* block,
bool upping)
{
119274: 55 push %ebp
119275: 89 e5 mov %esp,%ebp
119277: 57 push %edi
119278: 56 push %esi
119279: 53 push %ebx
11927a: 83 ec 2c sub $0x2c,%esp
11927d: 89 c7 mov %eax,%edi
11927f: 89 d3 mov %edx,%ebx
119281: 89 ce mov %ecx,%esi
119283: 8a 45 0c mov 0xc(%ebp),%al
119286: 88 45 d7 mov %al,-0x29(%ebp)
int rc;
/*
* Save the new block locally because upping can have *block pointing to the
* slots which are cleared when upping.
*/
rc = rtems_rfs_group_bitmap_alloc (fs, map->last_map_block, false, &new_block);
119289: 8d 45 e4 lea -0x1c(%ebp),%eax
11928c: 50 push %eax
11928d: 6a 00 push $0x0
11928f: ff 72 1c pushl 0x1c(%edx)
119292: 57 push %edi
119293: e8 ba 8b ff ff call 111e52 <rtems_rfs_group_bitmap_alloc>
119298: 89 c2 mov %eax,%edx
if (rc > 0)
11929a: 83 c4 10 add $0x10,%esp
11929d: 85 c0 test %eax,%eax
11929f: 0f 8f d0 00 00 00 jg 119375 <rtems_rfs_block_map_indirect_alloc+0x101><== NEVER TAKEN
return rc;
rc = rtems_rfs_buffer_handle_request (fs, buffer, new_block, false);
1192a5: 6a 00 push $0x0
1192a7: ff 75 e4 pushl -0x1c(%ebp)
1192aa: 56 push %esi
1192ab: 57 push %edi
1192ac: e8 f9 0f 00 00 call 11a2aa <rtems_rfs_buffer_handle_request>
if (rc > 0)
1192b1: 83 c4 10 add $0x10,%esp
1192b4: 85 c0 test %eax,%eax
1192b6: 7e 1a jle 1192d2 <rtems_rfs_block_map_indirect_alloc+0x5e><== ALWAYS TAKEN
{
rtems_rfs_group_bitmap_free (fs, false, new_block);
1192b8: 51 push %ecx <== NOT EXECUTED
1192b9: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
1192bc: 6a 00 push $0x0 <== NOT EXECUTED
1192be: 57 push %edi <== NOT EXECUTED
1192bf: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED
1192c2: e8 14 8d ff ff call 111fdb <rtems_rfs_group_bitmap_free><== NOT EXECUTED
1192c7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1192ca: 8b 55 d0 mov -0x30(%ebp),%edx <== NOT EXECUTED
1192cd: e9 a3 00 00 00 jmp 119375 <rtems_rfs_block_map_indirect_alloc+0x101><== NOT EXECUTED
return rc;
}
memset (rtems_rfs_buffer_data (buffer), 0xff, rtems_rfs_fs_block_size (fs));
1192d2: 8b 46 08 mov 0x8(%esi),%eax
1192d5: 8b 50 1c mov 0x1c(%eax),%edx
1192d8: 8b 4f 08 mov 0x8(%edi),%ecx
1192db: b0 ff mov $0xff,%al
1192dd: 89 d7 mov %edx,%edi
1192df: f3 aa rep stos %al,%es:(%edi)
if (upping)
1192e1: 80 7d d7 00 cmpb $0x0,-0x29(%ebp)
1192e5: 74 7e je 119365 <rtems_rfs_block_map_indirect_alloc+0xf1><== NEVER TAKEN
{
int b;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_GROW))
1192e7: 52 push %edx
1192e8: 52 push %edx
1192e9: 6a 00 push $0x0
1192eb: 68 00 20 00 00 push $0x2000
1192f0: e8 a7 a5 ff ff call 11389c <rtems_rfs_trace>
1192f5: 83 c4 10 add $0x10,%esp
1192f8: 84 c0 test %al,%al
1192fa: 74 12 je 11930e <rtems_rfs_block_map_indirect_alloc+0x9a><== ALWAYS TAKEN
printf ("rtems-rfs: block-map-grow: upping: block-count=%" PRId32 "\n",
1192fc: 50 push %eax <== NOT EXECUTED
1192fd: 50 push %eax <== NOT EXECUTED
1192fe: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED
119301: 68 9f 0c 13 00 push $0x130c9f <== NOT EXECUTED
119306: e8 31 70 00 00 call 12033c <printf> <== NOT EXECUTED
11930b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_rfs_block_map_indirect_alloc (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
rtems_rfs_buffer_handle* buffer,
rtems_rfs_block_no* block,
bool upping)
{
11930e: 31 c0 xor %eax,%eax
int b;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_GROW))
printf ("rtems-rfs: block-map-grow: upping: block-count=%" PRId32 "\n",
map->size.count);
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
rtems_rfs_block_set_number (buffer, b, map->blocks[b]);
119310: 8b 56 08 mov 0x8(%esi),%edx
119313: 8b 52 1c mov 0x1c(%edx),%edx
119316: 0f b6 4c 03 27 movzbl 0x27(%ebx,%eax,1),%ecx
11931b: 88 0c 02 mov %cl,(%edx,%eax,1)
11931e: 8b 56 08 mov 0x8(%esi),%edx
119321: 8b 52 1c mov 0x1c(%edx),%edx
119324: 0f b7 4c 03 26 movzwl 0x26(%ebx,%eax,1),%ecx
119329: 88 4c 02 01 mov %cl,0x1(%edx,%eax,1)
11932d: 8b 56 08 mov 0x8(%esi),%edx
119330: 8b 4a 1c mov 0x1c(%edx),%ecx
119333: 8b 54 03 24 mov 0x24(%ebx,%eax,1),%edx
119337: c1 ea 08 shr $0x8,%edx
11933a: 88 54 01 02 mov %dl,0x2(%ecx,%eax,1)
11933e: 8b 56 08 mov 0x8(%esi),%edx
119341: 8b 4a 1c mov 0x1c(%edx),%ecx
119344: 8b 54 03 24 mov 0x24(%ebx,%eax,1),%edx
119348: 88 54 01 03 mov %dl,0x3(%ecx,%eax,1)
11934c: c6 06 01 movb $0x1,(%esi)
11934f: 83 c0 04 add $0x4,%eax
{
int b;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_GROW))
printf ("rtems-rfs: block-map-grow: upping: block-count=%" PRId32 "\n",
map->size.count);
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
119352: 83 f8 14 cmp $0x14,%eax
119355: 75 b9 jne 119310 <rtems_rfs_block_map_indirect_alloc+0x9c>
rtems_rfs_block_set_number (buffer, b, map->blocks[b]);
memset (map->blocks, 0, sizeof (map->blocks));
119357: 8d 53 24 lea 0x24(%ebx),%edx
11935a: b9 05 00 00 00 mov $0x5,%ecx
11935f: 30 c0 xor %al,%al
119361: 89 d7 mov %edx,%edi
119363: f3 ab rep stos %eax,%es:(%edi)
}
rtems_rfs_buffer_mark_dirty (buffer);
119365: c6 06 01 movb $0x1,(%esi)
*block = new_block;
119368: 8b 45 e4 mov -0x1c(%ebp),%eax
11936b: 8b 55 08 mov 0x8(%ebp),%edx
11936e: 89 02 mov %eax,(%edx)
map->last_map_block = new_block;
119370: 89 43 1c mov %eax,0x1c(%ebx)
return 0;
119373: 31 d2 xor %edx,%edx
}
119375: 89 d0 mov %edx,%eax
119377: 8d 65 f4 lea -0xc(%ebp),%esp
11937a: 5b pop %ebx
11937b: 5e pop %esi
11937c: 5f pop %edi
11937d: 5d pop %ebp
11937e: c3 ret
00119426 <rtems_rfs_block_map_indirect_shrink.isra.7>:
* @param indirect The index index in the inode's block table.
* @param index The index in the indirect table of the block.
* @return int The error number (errno). No error if 0.
*/
static int
rtems_rfs_block_map_indirect_shrink (rtems_rfs_file_system* fs,
119426: 55 push %ebp
119427: 89 e5 mov %esp,%ebp
119429: 57 push %edi
11942a: 56 push %esi
11942b: 53 push %ebx
11942c: 83 ec 1c sub $0x1c,%esp
11942f: 89 d6 mov %edx,%esi
119431: 8b 55 08 mov 0x8(%ebp),%edx
119434: 8b 5d 0c mov 0xc(%ebp),%ebx
* block to be freed and the indirect block is now also free, or we have only
* one indirect table and we can fit the remaining blocks into the inode,
* then either move to the next indirect block or move the remaining blocks
* into the inode and free the indirect table's block.
*/
if ((index == 0) ||
119437: 85 db test %ebx,%ebx
119439: 74 09 je 119444 <rtems_rfs_block_map_indirect_shrink.isra.7+0x1e><== NEVER TAKEN
11943b: 83 fb 05 cmp $0x5,%ebx
11943e: 75 6b jne 1194ab <rtems_rfs_block_map_indirect_shrink.isra.7+0x85>
119440: 85 d2 test %edx,%edx
119442: 75 67 jne 1194ab <rtems_rfs_block_map_indirect_shrink.isra.7+0x85><== NEVER TAKEN
((indirect == 0) && (index == RTEMS_RFS_INODE_BLOCKS)))
{
rtems_rfs_block_no block_to_free = map->blocks[indirect];
119444: 8b 7c 96 24 mov 0x24(%esi,%edx,4),%edi
119448: 89 7d e4 mov %edi,-0x1c(%ebp)
if ((indirect == 0) && (index == RTEMS_RFS_INODE_BLOCKS))
11944b: 83 fb 05 cmp $0x5,%ebx
11944e: 75 38 jne 119488 <rtems_rfs_block_map_indirect_shrink.isra.7+0x62><== NEVER TAKEN
119450: 85 d2 test %edx,%edx
119452: 75 34 jne 119488 <rtems_rfs_block_map_indirect_shrink.isra.7+0x62><== NEVER TAKEN
/*
* Move to direct inode access.
*/
int b;
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
map->blocks[b] = rtems_rfs_block_get_number (buffer, b);
119454: 8b 11 mov (%ecx),%edx
119456: 8b 5a 1c mov 0x1c(%edx),%ebx
119459: 31 d2 xor %edx,%edx
11945b: 0f b6 0b movzbl (%ebx),%ecx
11945e: c1 e1 18 shl $0x18,%ecx
119461: 0f b6 7b 01 movzbl 0x1(%ebx),%edi
119465: c1 e7 10 shl $0x10,%edi
119468: 09 f9 or %edi,%ecx
11946a: 0f b6 7b 03 movzbl 0x3(%ebx),%edi
11946e: 09 f9 or %edi,%ecx
119470: 0f b6 7b 02 movzbl 0x2(%ebx),%edi
119474: c1 e7 08 shl $0x8,%edi
119477: 09 f9 or %edi,%ecx
119479: 89 4c 96 24 mov %ecx,0x24(%esi,%edx,4)
{
/*
* Move to direct inode access.
*/
int b;
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
11947d: 42 inc %edx
11947e: 83 c3 04 add $0x4,%ebx
119481: 83 fa 05 cmp $0x5,%edx
119484: 75 d5 jne 11945b <rtems_rfs_block_map_indirect_shrink.isra.7+0x35>
119486: eb 08 jmp 119490 <rtems_rfs_block_map_indirect_shrink.isra.7+0x6a>
else
{
/*
* One less singly indirect block in the inode.
*/
map->blocks[indirect] = 0;
119488: c7 44 96 24 00 00 00 movl $0x0,0x24(%esi,%edx,4) <== NOT EXECUTED
11948f: 00
}
rc = rtems_rfs_group_bitmap_free (fs, false, block_to_free);
119490: 57 push %edi
119491: ff 75 e4 pushl -0x1c(%ebp)
119494: 6a 00 push $0x0
119496: 50 push %eax
119497: e8 3f 8b ff ff call 111fdb <rtems_rfs_group_bitmap_free>
if (rc > 0)
11949c: 83 c4 10 add $0x10,%esp
11949f: 85 c0 test %eax,%eax
1194a1: 7f 0a jg 1194ad <rtems_rfs_block_map_indirect_shrink.isra.7+0x87><== NEVER TAKEN
return rc;
map->last_map_block = block_to_free;
1194a3: 8b 55 e4 mov -0x1c(%ebp),%edx
1194a6: 89 56 1c mov %edx,0x1c(%esi)
1194a9: eb 02 jmp 1194ad <rtems_rfs_block_map_indirect_shrink.isra.7+0x87>
rtems_rfs_block_map* map,
rtems_rfs_buffer_handle* buffer,
rtems_rfs_block_no indirect,
rtems_rfs_block_no index)
{
int rc = 0;
1194ab: 31 c0 xor %eax,%eax
map->last_map_block = block_to_free;
}
return rc;
}
1194ad: 8d 65 f4 lea -0xc(%ebp),%esp
1194b0: 5b pop %ebx
1194b1: 5e pop %esi
1194b2: 5f pop %edi
1194b3: 5d pop %ebp
1194b4: c3 ret
001195a2 <rtems_rfs_block_map_open>:
int
rtems_rfs_block_map_open (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* inode,
rtems_rfs_block_map* map)
{
1195a2: 55 push %ebp
1195a3: 89 e5 mov %esp,%ebp
1195a5: 57 push %edi
1195a6: 56 push %esi
1195a7: 53 push %ebx
1195a8: 83 ec 24 sub $0x24,%esp
1195ab: 8b 75 08 mov 0x8(%ebp),%esi
1195ae: 8b 7d 0c mov 0xc(%ebp),%edi
1195b1: 8b 5d 10 mov 0x10(%ebp),%ebx
* Set the count to 0 so at least find fails, then open the handle and make
* sure the inode has been loaded into memory. If we did not load the inode
* do not unload it. The caller may assume it is still loaded when we return.
*/
map->dirty = false;
1195b4: c6 03 00 movb $0x0,(%ebx)
map->inode = NULL;
1195b7: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx)
* @param size A pointer to the block size.
*/
static inline void
rtems_rfs_block_set_size_zero (rtems_rfs_block_size* size)
{
size->count = 0;
1195be: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
size->offset = 0;
1195c5: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
* @param bpos A pointer to the block position.
*/
static inline void
rtems_rfs_block_set_bpos_zero (rtems_rfs_block_pos* bpos)
{
bpos->bno = 0;
1195cc: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx)
bpos->boff = 0;
1195d3: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx)
bpos->block = 0;
1195da: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx)
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
1195e1: c6 43 38 00 movb $0x0,0x38(%ebx)
handle->bnum = 0;
1195e5: c7 43 3c 00 00 00 00 movl $0x0,0x3c(%ebx)
handle->buffer = NULL;
1195ec: c7 43 40 00 00 00 00 movl $0x0,0x40(%ebx)
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
1195f3: c6 43 44 00 movb $0x0,0x44(%ebx)
handle->bnum = 0;
1195f7: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx)
handle->buffer = NULL;
1195fe: c7 43 4c 00 00 00 00 movl $0x0,0x4c(%ebx)
return rc;
rc = rtems_rfs_buffer_handle_open (fs, &map->doubly_buffer);
if (rc > 0)
return rc;
rc = rtems_rfs_inode_load (fs, inode);
119605: 57 push %edi
119606: 56 push %esi
119607: e8 a6 8b ff ff call 1121b2 <rtems_rfs_inode_load>
11960c: 89 c2 mov %eax,%edx
if (rc > 0)
11960e: 83 c4 10 add $0x10,%esp
119611: 85 c0 test %eax,%eax
119613: 0f 8f e1 00 00 00 jg 1196fa <rtems_rfs_block_map_open+0x158><== NEVER TAKEN
/*
* Extract the block and block count data from the inode into the targets
* byte order.
*/
map->inode = inode;
119619: 89 7b 04 mov %edi,0x4(%ebx)
int
rtems_rfs_block_map_free_all (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map)
{
return rtems_rfs_block_map_shrink (fs, map, map->size.count);
}
11961c: 8b 47 0c mov 0xc(%edi),%eax
/*
* Extract the block and block count data from the inode into the targets
* byte order.
*/
map->inode = inode;
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
11961f: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
* @return uint32_t The block number.
*/
static inline uint32_t
rtems_rfs_inode_get_block (rtems_rfs_inode_handle* handle, int block)
{
return rtems_rfs_read_u32 (&handle->node->data.blocks[block]);
119626: 8b 4d e4 mov -0x1c(%ebp),%ecx
119629: 8d 54 88 10 lea 0x10(%eax,%ecx,4),%edx
11962d: 8d 4a 0c lea 0xc(%edx),%ecx
119630: 89 4d e0 mov %ecx,-0x20(%ebp)
119633: 0f b6 52 0c movzbl 0xc(%edx),%edx
119637: c1 e2 18 shl $0x18,%edx
11963a: 0f b6 49 01 movzbl 0x1(%ecx),%ecx
11963e: c1 e1 10 shl $0x10,%ecx
119641: 09 ca or %ecx,%edx
119643: 8b 4d e0 mov -0x20(%ebp),%ecx
119646: 0f b6 49 03 movzbl 0x3(%ecx),%ecx
11964a: 09 ca or %ecx,%edx
11964c: 8b 4d e0 mov -0x20(%ebp),%ecx
11964f: 0f b6 49 02 movzbl 0x2(%ecx),%ecx
119653: c1 e1 08 shl $0x8,%ecx
119656: 09 ca or %ecx,%edx
119658: 8b 4d e4 mov -0x1c(%ebp),%ecx
11965b: 89 54 8b 24 mov %edx,0x24(%ebx,%ecx,4)
11965f: 41 inc %ecx
119660: 89 4d e4 mov %ecx,-0x1c(%ebp)
119663: 83 f9 05 cmp $0x5,%ecx
119666: 75 be jne 119626 <rtems_rfs_block_map_open+0x84>
* @return uint32_t The block count.
*/
static inline uint32_t
rtems_rfs_inode_get_block_count (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->block_count);
119668: 0f b6 50 0c movzbl 0xc(%eax),%edx
11966c: c1 e2 18 shl $0x18,%edx
11966f: 0f b6 48 0d movzbl 0xd(%eax),%ecx
119673: c1 e1 10 shl $0x10,%ecx
119676: 09 ca or %ecx,%edx
119678: 0f b6 48 0f movzbl 0xf(%eax),%ecx
11967c: 09 ca or %ecx,%edx
11967e: 0f b6 48 0e movzbl 0xe(%eax),%ecx
119682: c1 e1 08 shl $0x8,%ecx
119685: 09 ca or %ecx,%edx
119687: 89 53 08 mov %edx,0x8(%ebx)
* @return uint32_t The block offset.
*/
static inline uint16_t
rtems_rfs_inode_get_block_offset (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->block_offset);
11968a: 0f b6 48 0a movzbl 0xa(%eax),%ecx
11968e: c1 e1 08 shl $0x8,%ecx
119691: 0f b6 50 0b movzbl 0xb(%eax),%edx
119695: 09 ca or %ecx,%edx
map->blocks[b] = rtems_rfs_inode_get_block (inode, b);
map->size.count = rtems_rfs_inode_get_block_count (inode);
map->size.offset = rtems_rfs_inode_get_block_offset (inode);
119697: 0f b7 d2 movzwl %dx,%edx
11969a: 89 53 0c mov %edx,0xc(%ebx)
* @return uint32_t The last map block number.
*/
static inline uint32_t
rtems_rfs_inode_get_last_map_block (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->last_map_block);
11969d: 0f b6 50 30 movzbl 0x30(%eax),%edx
1196a1: c1 e2 18 shl $0x18,%edx
1196a4: 0f b6 48 31 movzbl 0x31(%eax),%ecx
1196a8: c1 e1 10 shl $0x10,%ecx
1196ab: 09 ca or %ecx,%edx
1196ad: 0f b6 48 33 movzbl 0x33(%eax),%ecx
1196b1: 09 ca or %ecx,%edx
1196b3: 0f b6 48 32 movzbl 0x32(%eax),%ecx
1196b7: c1 e1 08 shl $0x8,%ecx
1196ba: 09 ca or %ecx,%edx
1196bc: 89 53 1c mov %edx,0x1c(%ebx)
* @return uint32_t The last data block number.
*/
static inline uint32_t
rtems_rfs_inode_get_last_data_block (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->last_data_block);
1196bf: 0f b6 50 34 movzbl 0x34(%eax),%edx
1196c3: c1 e2 18 shl $0x18,%edx
1196c6: 0f b6 48 35 movzbl 0x35(%eax),%ecx
1196ca: c1 e1 10 shl $0x10,%ecx
1196cd: 09 ca or %ecx,%edx
1196cf: 0f b6 48 37 movzbl 0x37(%eax),%ecx
1196d3: 09 ca or %ecx,%edx
1196d5: 0f b6 40 36 movzbl 0x36(%eax),%eax
1196d9: c1 e0 08 shl $0x8,%eax
1196dc: 09 c2 or %eax,%edx
1196de: 89 53 20 mov %edx,0x20(%ebx)
map->last_map_block = rtems_rfs_inode_get_last_map_block (inode);
map->last_data_block = rtems_rfs_inode_get_last_data_block (inode);
rc = rtems_rfs_inode_unload (fs, inode, false);
1196e1: c7 45 10 00 00 00 00 movl $0x0,0x10(%ebp)
1196e8: 89 7d 0c mov %edi,0xc(%ebp)
1196eb: 89 75 08 mov %esi,0x8(%ebp)
return rc;
}
1196ee: 8d 65 f4 lea -0xc(%ebp),%esp
1196f1: 5b pop %ebx
1196f2: 5e pop %esi
1196f3: 5f pop %edi
1196f4: 5d pop %ebp
map->size.count = rtems_rfs_inode_get_block_count (inode);
map->size.offset = rtems_rfs_inode_get_block_offset (inode);
map->last_map_block = rtems_rfs_inode_get_last_map_block (inode);
map->last_data_block = rtems_rfs_inode_get_last_data_block (inode);
rc = rtems_rfs_inode_unload (fs, inode, false);
1196f5: e9 e3 8b ff ff jmp 1122dd <rtems_rfs_inode_unload>
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
1196fa: 50 push %eax <== NOT EXECUTED
1196fb: 50 push %eax <== NOT EXECUTED
return rc;
rc = rtems_rfs_inode_load (fs, inode);
if (rc > 0)
{
rtems_rfs_buffer_handle_close (fs, &map->singly_buffer);
1196fc: 8d 43 38 lea 0x38(%ebx),%eax <== NOT EXECUTED
1196ff: 50 push %eax <== NOT EXECUTED
119700: 56 push %esi <== NOT EXECUTED
119701: 89 55 dc mov %edx,-0x24(%ebp) <== NOT EXECUTED
119704: e8 28 0a 00 00 call 11a131 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
handle->dirty = false;
119709: c6 43 38 00 movb $0x0,0x38(%ebx) <== NOT EXECUTED
handle->bnum = 0;
11970d: c7 43 3c 00 00 00 00 movl $0x0,0x3c(%ebx) <== NOT EXECUTED
handle->buffer = NULL;
119714: c7 43 40 00 00 00 00 movl $0x0,0x40(%ebx) <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
11971b: 58 pop %eax <== NOT EXECUTED
11971c: 5a pop %edx <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &map->doubly_buffer);
11971d: 8d 43 44 lea 0x44(%ebx),%eax <== NOT EXECUTED
119720: 50 push %eax <== NOT EXECUTED
119721: 56 push %esi <== NOT EXECUTED
119722: e8 0a 0a 00 00 call 11a131 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
handle->dirty = false;
119727: c6 43 44 00 movb $0x0,0x44(%ebx) <== NOT EXECUTED
handle->bnum = 0;
11972b: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx) <== NOT EXECUTED
handle->buffer = NULL;
119732: c7 43 4c 00 00 00 00 movl $0x0,0x4c(%ebx) <== NOT EXECUTED
119739: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11973c: 8b 55 dc mov -0x24(%ebp),%edx <== NOT EXECUTED
map->last_data_block = rtems_rfs_inode_get_last_data_block (inode);
rc = rtems_rfs_inode_unload (fs, inode, false);
return rc;
}
11973f: 89 d0 mov %edx,%eax <== NOT EXECUTED
119741: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
119744: 5b pop %ebx <== NOT EXECUTED
119745: 5e pop %esi <== NOT EXECUTED
119746: 5f pop %edi <== NOT EXECUTED
119747: 5d pop %ebp <== NOT EXECUTED
119748: c3 ret <== NOT EXECUTED
00119d51 <rtems_rfs_block_map_shrink>:
int
rtems_rfs_block_map_shrink (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
size_t blocks)
{
119d51: 55 push %ebp
119d52: 89 e5 mov %esp,%ebp
119d54: 57 push %edi
119d55: 56 push %esi
119d56: 53 push %ebx
119d57: 83 ec 34 sub $0x34,%esp
119d5a: 8b 5d 0c mov 0xc(%ebp),%ebx
119d5d: 8b 75 10 mov 0x10(%ebp),%esi
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_SHRINK))
119d60: 6a 00 push $0x0
119d62: 68 00 40 00 00 push $0x4000
119d67: e8 30 9b ff ff call 11389c <rtems_rfs_trace>
119d6c: 83 c4 10 add $0x10,%esp
119d6f: 84 c0 test %al,%al
119d71: 74 12 je 119d85 <rtems_rfs_block_map_shrink+0x34><== ALWAYS TAKEN
printf ("rtems-rfs: block-map-shrink: entry: blocks=%zd count=%" PRIu32 "\n",
119d73: 50 push %eax <== NOT EXECUTED
119d74: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED
119d77: 56 push %esi <== NOT EXECUTED
119d78: 68 56 0d 13 00 push $0x130d56 <== NOT EXECUTED
119d7d: e8 ba 65 00 00 call 12033c <printf> <== NOT EXECUTED
119d82: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
blocks, map->size.count);
if (map->size.count == 0)
119d85: 8b 43 08 mov 0x8(%ebx),%eax
119d88: 85 c0 test %eax,%eax
119d8a: 75 05 jne 119d91 <rtems_rfs_block_map_shrink+0x40>
119d8c: e9 19 02 00 00 jmp 119faa <rtems_rfs_block_map_shrink+0x259>
119d91: 89 75 e0 mov %esi,-0x20(%ebp)
119d94: 39 c6 cmp %eax,%esi
119d96: 0f 86 ad 01 00 00 jbe 119f49 <rtems_rfs_block_map_shrink+0x1f8><== ALWAYS TAKEN
119d9c: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED
119d9f: e9 a5 01 00 00 jmp 119f49 <rtems_rfs_block_map_shrink+0x1f8><== NOT EXECUTED
{
rtems_rfs_block_no block;
rtems_rfs_block_no block_to_free;
int rc;
block = map->size.count - 1;
119da4: 8b 43 08 mov 0x8(%ebx),%eax
119da7: 8d 48 ff lea -0x1(%eax),%ecx
if (block < RTEMS_RFS_INODE_BLOCKS)
119daa: 83 f9 04 cmp $0x4,%ecx
119dad: 77 14 ja 119dc3 <rtems_rfs_block_map_shrink+0x72>
{
/*
* We have less than RTEMS_RFS_INODE_BLOCKS so they are held in the
* inode.
*/
block_to_free = map->blocks[block];
119daf: 83 c0 07 add $0x7,%eax
119db2: 8b 74 83 04 mov 0x4(%ebx,%eax,4),%esi
map->blocks[block] = 0;
119db6: c7 44 83 04 00 00 00 movl $0x0,0x4(%ebx,%eax,4)
119dbd: 00
119dbe: e9 5e 01 00 00 jmp 119f21 <rtems_rfs_block_map_shrink+0x1d0>
* table of block numbers.
*/
rtems_rfs_block_no direct;
rtems_rfs_block_no singly;
direct = block % fs->blocks_per_block;
119dc3: 8b 7d 08 mov 0x8(%ebp),%edi
119dc6: 8b 77 34 mov 0x34(%edi),%esi
119dc9: 89 c8 mov %ecx,%eax
119dcb: 31 d2 xor %edx,%edx
119dcd: f7 f6 div %esi
119dcf: 89 55 e4 mov %edx,-0x1c(%ebp)
119dd2: 89 45 dc mov %eax,-0x24(%ebp)
singly = block / fs->blocks_per_block;
if (block < fs->block_map_singly_blocks)
119dd5: 3b 4f 38 cmp 0x38(%edi),%ecx
119dd8: 73 59 jae 119e33 <rtems_rfs_block_map_shrink+0xe2><== NEVER TAKEN
{
/*
* Request the indirect block and then obtain the block number from the
* indirect block.
*/
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
119dda: 6a 01 push $0x1
119ddc: ff 74 83 24 pushl 0x24(%ebx,%eax,4)
119de0: ff 75 d4 pushl -0x2c(%ebp)
119de3: 57 push %edi
119de4: e8 c1 04 00 00 call 11a2aa <rtems_rfs_buffer_handle_request>
map->blocks[singly], true);
if (rc > 0)
119de9: 83 c4 10 add $0x10,%esp
119dec: 85 c0 test %eax,%eax
119dee: 0f 8f b8 01 00 00 jg 119fac <rtems_rfs_block_map_shrink+0x25b><== NEVER TAKEN
return rc;
block_to_free = rtems_rfs_block_get_number (&map->singly_buffer,
119df4: 8b 43 40 mov 0x40(%ebx),%eax
119df7: 8b 40 1c mov 0x1c(%eax),%eax
119dfa: 8b 55 e4 mov -0x1c(%ebp),%edx
119dfd: c1 e2 02 shl $0x2,%edx
119e00: 0f b6 74 10 03 movzbl 0x3(%eax,%edx,1),%esi
119e05: 8b 7d e4 mov -0x1c(%ebp),%edi
119e08: 0f b6 0c b8 movzbl (%eax,%edi,4),%ecx
119e0c: c1 e1 18 shl $0x18,%ecx
119e0f: 09 ce or %ecx,%esi
119e11: 0f b6 4c 10 01 movzbl 0x1(%eax,%edx,1),%ecx
119e16: c1 e1 10 shl $0x10,%ecx
119e19: 09 ce or %ecx,%esi
119e1b: 0f b6 44 10 02 movzbl 0x2(%eax,%edx,1),%eax
119e20: c1 e0 08 shl $0x8,%eax
119e23: 09 c6 or %eax,%esi
direct);
rc = rtems_rfs_block_map_indirect_shrink (fs, map, &map->singly_buffer,
119e25: 50 push %eax
119e26: 50 push %eax
int
rtems_rfs_block_map_free_all (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map)
{
return rtems_rfs_block_map_shrink (fs, map, map->size.count);
}
119e27: 8d 4b 40 lea 0x40(%ebx),%ecx
return rc;
block_to_free = rtems_rfs_block_get_number (&map->singly_buffer,
direct);
rc = rtems_rfs_block_map_indirect_shrink (fs, map, &map->singly_buffer,
119e2a: 57 push %edi
119e2b: ff 75 dc pushl -0x24(%ebp)
119e2e: e9 d9 00 00 00 jmp 119f0c <rtems_rfs_block_map_shrink+0x1bb>
singly, direct);
if (rc)
return rc;
}
else if (block < fs->block_map_doubly_blocks)
119e33: 8b 7d 08 mov 0x8(%ebp),%edi <== NOT EXECUTED
119e36: 3b 4f 3c cmp 0x3c(%edi),%ecx <== NOT EXECUTED
119e39: 0f 83 20 01 00 00 jae 119f5f <rtems_rfs_block_map_shrink+0x20e><== NOT EXECUTED
* value is still valid for doubly indirect tables.
*/
rtems_rfs_block_no doubly;
rtems_rfs_block_no doubly_singly;
doubly = singly / fs->blocks_per_block;
119e3f: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED
119e42: 31 d2 xor %edx,%edx <== NOT EXECUTED
119e44: f7 f6 div %esi <== NOT EXECUTED
119e46: 89 55 dc mov %edx,-0x24(%ebp) <== NOT EXECUTED
119e49: 89 45 d8 mov %eax,-0x28(%ebp) <== NOT EXECUTED
doubly_singly = singly % fs->blocks_per_block;
rc = rtems_rfs_buffer_handle_request (fs, &map->doubly_buffer,
119e4c: 6a 01 push $0x1 <== NOT EXECUTED
119e4e: ff 74 83 24 pushl 0x24(%ebx,%eax,4) <== NOT EXECUTED
119e52: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED
119e55: 57 push %edi <== NOT EXECUTED
119e56: e8 4f 04 00 00 call 11a2aa <rtems_rfs_buffer_handle_request><== NOT EXECUTED
map->blocks[doubly], true);
if (rc > 0)
119e5b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
119e5e: 85 c0 test %eax,%eax <== NOT EXECUTED
119e60: 0f 8f 46 01 00 00 jg 119fac <rtems_rfs_block_map_shrink+0x25b><== NOT EXECUTED
return rc;
singly = rtems_rfs_block_get_number (&map->doubly_buffer,
119e66: 8b 43 4c mov 0x4c(%ebx),%eax <== NOT EXECUTED
119e69: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED
119e6c: 8b 55 dc mov -0x24(%ebp),%edx <== NOT EXECUTED
119e6f: c1 e2 02 shl $0x2,%edx <== NOT EXECUTED
119e72: 0f b6 7c 10 03 movzbl 0x3(%eax,%edx,1),%edi <== NOT EXECUTED
119e77: 8b 75 dc mov -0x24(%ebp),%esi <== NOT EXECUTED
119e7a: 0f b6 0c b0 movzbl (%eax,%esi,4),%ecx <== NOT EXECUTED
119e7e: c1 e1 18 shl $0x18,%ecx <== NOT EXECUTED
119e81: 09 cf or %ecx,%edi <== NOT EXECUTED
119e83: 0f b6 4c 10 01 movzbl 0x1(%eax,%edx,1),%ecx <== NOT EXECUTED
119e88: c1 e1 10 shl $0x10,%ecx <== NOT EXECUTED
119e8b: 09 cf or %ecx,%edi <== NOT EXECUTED
119e8d: 0f b6 44 10 02 movzbl 0x2(%eax,%edx,1),%eax <== NOT EXECUTED
119e92: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED
119e95: 09 c7 or %eax,%edi <== NOT EXECUTED
doubly_singly);
/*
* Read the singly indirect table and get the block number.
*/
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
119e97: 6a 01 push $0x1 <== NOT EXECUTED
119e99: 57 push %edi <== NOT EXECUTED
119e9a: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED
119e9d: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
119ea0: e8 05 04 00 00 call 11a2aa <rtems_rfs_buffer_handle_request><== NOT EXECUTED
singly, true);
if (rc > 0)
119ea5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
119ea8: 85 c0 test %eax,%eax <== NOT EXECUTED
119eaa: 0f 8f fc 00 00 00 jg 119fac <rtems_rfs_block_map_shrink+0x25b><== NOT EXECUTED
return rc;
block_to_free = rtems_rfs_block_get_number (&map->singly_buffer,
119eb0: 8b 43 40 mov 0x40(%ebx),%eax <== NOT EXECUTED
119eb3: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED
119eb6: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
119eb9: c1 e2 02 shl $0x2,%edx <== NOT EXECUTED
119ebc: 0f b6 74 10 03 movzbl 0x3(%eax,%edx,1),%esi <== NOT EXECUTED
119ec1: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED
119ec4: 0f b6 0c 88 movzbl (%eax,%ecx,4),%ecx <== NOT EXECUTED
119ec8: c1 e1 18 shl $0x18,%ecx <== NOT EXECUTED
119ecb: 09 ce or %ecx,%esi <== NOT EXECUTED
119ecd: 0f b6 4c 10 01 movzbl 0x1(%eax,%edx,1),%ecx <== NOT EXECUTED
119ed2: c1 e1 10 shl $0x10,%ecx <== NOT EXECUTED
119ed5: 09 ce or %ecx,%esi <== NOT EXECUTED
119ed7: 0f b6 44 10 02 movzbl 0x2(%eax,%edx,1),%eax <== NOT EXECUTED
119edc: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED
119edf: 09 c6 or %eax,%esi <== NOT EXECUTED
direct);
if (direct == 0)
119ee1: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) <== NOT EXECUTED
119ee5: 75 3a jne 119f21 <rtems_rfs_block_map_shrink+0x1d0><== NOT EXECUTED
{
rc = rtems_rfs_group_bitmap_free (fs, false, singly);
119ee7: 50 push %eax <== NOT EXECUTED
119ee8: 57 push %edi <== NOT EXECUTED
119ee9: 6a 00 push $0x0 <== NOT EXECUTED
119eeb: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
119eee: e8 e8 80 ff ff call 111fdb <rtems_rfs_group_bitmap_free><== NOT EXECUTED
if (rc > 0)
119ef3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
119ef6: 85 c0 test %eax,%eax <== NOT EXECUTED
119ef8: 0f 8f ae 00 00 00 jg 119fac <rtems_rfs_block_map_shrink+0x25b><== NOT EXECUTED
return rc;
map->last_map_block = singly;
119efe: 89 7b 1c mov %edi,0x1c(%ebx) <== NOT EXECUTED
rc = rtems_rfs_block_map_indirect_shrink (fs, map, &map->doubly_buffer,
119f01: 50 push %eax <== NOT EXECUTED
119f02: 50 push %eax <== NOT EXECUTED
int
rtems_rfs_block_map_free_all (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map)
{
return rtems_rfs_block_map_shrink (fs, map, map->size.count);
}
119f03: 8d 4b 4c lea 0x4c(%ebx),%ecx <== NOT EXECUTED
if (rc > 0)
return rc;
map->last_map_block = singly;
rc = rtems_rfs_block_map_indirect_shrink (fs, map, &map->doubly_buffer,
119f06: ff 75 dc pushl -0x24(%ebp) <== NOT EXECUTED
119f09: ff 75 d8 pushl -0x28(%ebp) <== NOT EXECUTED
119f0c: 89 da mov %ebx,%edx
119f0e: 8b 45 08 mov 0x8(%ebp),%eax
119f11: e8 10 f5 ff ff call 119426 <rtems_rfs_block_map_indirect_shrink.isra.7>
doubly, doubly_singly);
if (rc)
119f16: 83 c4 10 add $0x10,%esp
119f19: 85 c0 test %eax,%eax
119f1b: 0f 85 8b 00 00 00 jne 119fac <rtems_rfs_block_map_shrink+0x25b><== NEVER TAKEN
{
rc = EIO;
break;
}
}
rc = rtems_rfs_group_bitmap_free (fs, false, block_to_free);
119f21: 57 push %edi
119f22: 56 push %esi
119f23: 6a 00 push $0x0
119f25: ff 75 08 pushl 0x8(%ebp)
119f28: e8 ae 80 ff ff call 111fdb <rtems_rfs_group_bitmap_free>
if (rc > 0)
119f2d: 83 c4 10 add $0x10,%esp
119f30: 85 c0 test %eax,%eax
119f32: 7f 78 jg 119fac <rtems_rfs_block_map_shrink+0x25b><== NEVER TAKEN
return rc;
map->size.count--;
119f34: ff 4b 08 decl 0x8(%ebx)
map->size.offset = 0;
119f37: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
map->last_data_block = block_to_free;
119f3e: 89 73 20 mov %esi,0x20(%ebx)
map->dirty = true;
119f41: c6 03 01 movb $0x1,(%ebx)
blocks--;
119f44: ff 4d e0 decl -0x20(%ebp)
119f47: eb 0c jmp 119f55 <rtems_rfs_block_map_shrink+0x204>
rtems_rfs_block_no doubly_singly;
doubly = singly / fs->blocks_per_block;
doubly_singly = singly % fs->blocks_per_block;
rc = rtems_rfs_buffer_handle_request (fs, &map->doubly_buffer,
119f49: 8d 73 44 lea 0x44(%ebx),%esi
119f4c: 89 75 d0 mov %esi,-0x30(%ebp)
doubly_singly);
/*
* Read the singly indirect table and get the block number.
*/
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
119f4f: 8d 7b 38 lea 0x38(%ebx),%edi
119f52: 89 7d d4 mov %edi,-0x2c(%ebp)
return 0;
if (blocks > map->size.count)
blocks = map->size.count;
while (blocks)
119f55: 83 7d e0 00 cmpl $0x0,-0x20(%ebp)
119f59: 0f 85 45 fe ff ff jne 119da4 <rtems_rfs_block_map_shrink+0x53>
map->last_data_block = block_to_free;
map->dirty = true;
blocks--;
}
if (map->size.count == 0)
119f5f: 8b 43 08 mov 0x8(%ebx),%eax
119f62: 85 c0 test %eax,%eax
119f64: 75 0e jne 119f74 <rtems_rfs_block_map_shrink+0x223>
{
map->last_map_block = 0;
119f66: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx)
map->last_data_block = 0;
119f6d: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx)
}
/*
* Keep the position inside the map.
*/
if (rtems_rfs_block_pos_past_end (&map->bpos, &map->size))
119f74: 8b 53 10 mov 0x10(%ebx),%edx
119f77: 85 d2 test %edx,%edx
119f79: 74 04 je 119f7f <rtems_rfs_block_map_shrink+0x22e>
119f7b: 85 c0 test %eax,%eax
119f7d: 74 13 je 119f92 <rtems_rfs_block_map_shrink+0x241><== ALWAYS TAKEN
119f7f: 39 c2 cmp %eax,%edx
119f81: 73 0f jae 119f92 <rtems_rfs_block_map_shrink+0x241>
119f83: 8d 48 ff lea -0x1(%eax),%ecx
119f86: 39 ca cmp %ecx,%edx
119f88: 75 20 jne 119faa <rtems_rfs_block_map_shrink+0x259><== NEVER TAKEN
119f8a: 8b 53 0c mov 0xc(%ebx),%edx
119f8d: 39 53 14 cmp %edx,0x14(%ebx)
119f90: 76 18 jbe 119faa <rtems_rfs_block_map_shrink+0x259><== NEVER TAKEN
rtems_rfs_block_size_get_bpos (&map->size, &map->bpos);
119f92: 89 43 10 mov %eax,0x10(%ebx)
119f95: 8b 53 0c mov 0xc(%ebx),%edx
119f98: 89 53 14 mov %edx,0x14(%ebx)
119f9b: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx)
119fa2: 85 d2 test %edx,%edx
119fa4: 74 04 je 119faa <rtems_rfs_block_map_shrink+0x259><== ALWAYS TAKEN
119fa6: 48 dec %eax <== NOT EXECUTED
119fa7: 89 43 10 mov %eax,0x10(%ebx) <== NOT EXECUTED
return 0;
119faa: 31 c0 xor %eax,%eax
}
119fac: 8d 65 f4 lea -0xc(%ebp),%esp
119faf: 5b pop %ebx
119fb0: 5e pop %esi
119fb1: 5f pop %edi
119fb2: 5d pop %ebp
119fb3: c3 ret
0011ecb8 <rtems_rfs_buffer_bdbuf_release>:
int
rtems_rfs_buffer_bdbuf_release (rtems_rfs_buffer* buffer,
bool modified)
{
11ecb8: 55 push %ebp
11ecb9: 89 e5 mov %esp,%ebp
11ecbb: 53 push %ebx
11ecbc: 83 ec 1c sub $0x1c,%esp
11ecbf: 8b 5d 08 mov 0x8(%ebp),%ebx
11ecc2: 8a 45 0c mov 0xc(%ebp),%al
11ecc5: 88 45 f7 mov %al,-0x9(%ebp)
rtems_status_code sc;
int rc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_RELEASE))
11ecc8: 6a 00 push $0x0
11ecca: 6a 40 push $0x40
11eccc: e8 cb 4b ff ff call 11389c <rtems_rfs_trace>
11ecd1: 83 c4 10 add $0x10,%esp
11ecd4: 84 c0 test %al,%al
11ecd6: 74 24 je 11ecfc <rtems_rfs_buffer_bdbuf_release+0x44><== ALWAYS TAKEN
printf ("rtems-rfs: bdbuf-release: block=%" PRIuPTR " bdbuf=%" PRIu32 " %s\n",
11ecd8: b8 f5 f5 12 00 mov $0x12f5f5,%eax <== NOT EXECUTED
11ecdd: 80 7d f7 00 cmpb $0x0,-0x9(%ebp) <== NOT EXECUTED
11ece1: 74 05 je 11ece8 <rtems_rfs_buffer_bdbuf_release+0x30><== NOT EXECUTED
11ece3: b8 44 22 13 00 mov $0x132244,%eax <== NOT EXECUTED
11ece8: 50 push %eax <== NOT EXECUTED
11ece9: ff 73 18 pushl 0x18(%ebx) <== NOT EXECUTED
11ecec: ff 73 34 pushl 0x34(%ebx) <== NOT EXECUTED
11ecef: 68 4f 22 13 00 push $0x13224f <== NOT EXECUTED
11ecf4: e8 43 16 00 00 call 12033c <printf> <== NOT EXECUTED
11ecf9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
((intptr_t) buffer->user),
buffer->block, modified ? "(modified)" : "");
if (modified)
11ecfc: 80 7d f7 00 cmpb $0x0,-0x9(%ebp)
11ed00: 74 0b je 11ed0d <rtems_rfs_buffer_bdbuf_release+0x55>
sc = rtems_bdbuf_release_modified (buffer);
11ed02: 83 ec 0c sub $0xc,%esp
11ed05: 53 push %ebx
11ed06: e8 11 68 ff ff call 11551c <rtems_bdbuf_release_modified>
11ed0b: eb 09 jmp 11ed16 <rtems_rfs_buffer_bdbuf_release+0x5e>
else
sc = rtems_bdbuf_release (buffer);
11ed0d: 83 ec 0c sub $0xc,%esp
11ed10: 53 push %ebx
11ed11: e8 75 67 ff ff call 11548b <rtems_bdbuf_release>
11ed16: 83 c4 10 add $0x10,%esp
int
rtems_rfs_buffer_bdbuf_release (rtems_rfs_buffer* buffer,
bool modified)
{
rtems_status_code sc;
int rc = 0;
11ed19: 83 f8 01 cmp $0x1,%eax
11ed1c: 19 c0 sbb %eax,%eax
11ed1e: f7 d0 not %eax
11ed20: 83 e0 05 and $0x5,%eax
#endif
rc = EIO;
}
return rc;
}
11ed23: 8b 5d fc mov -0x4(%ebp),%ebx
11ed26: c9 leave
11ed27: c3 ret
0011a7db <rtems_rfs_buffer_close>:
return 0;
}
int
rtems_rfs_buffer_close (rtems_rfs_file_system* fs)
{
11a7db: 55 push %ebp
11a7dc: 89 e5 mov %esp,%ebp
11a7de: 56 push %esi
11a7df: 53 push %ebx
11a7e0: 8b 75 08 mov 0x8(%ebp),%esi
int rc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CLOSE))
11a7e3: 52 push %edx
11a7e4: 52 push %edx
11a7e5: 6a 00 push $0x0
11a7e7: 6a 10 push $0x10
11a7e9: e8 ae 90 ff ff call 11389c <rtems_rfs_trace>
11a7ee: 83 c4 10 add $0x10,%esp
11a7f1: 84 c0 test %al,%al
11a7f3: 74 10 je 11a805 <rtems_rfs_buffer_close+0x2a><== ALWAYS TAKEN
printf ("rtems-rfs: buffer-close: closing\n");
11a7f5: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11a7f8: 68 da 11 13 00 push $0x1311da <== NOT EXECUTED
11a7fd: e8 52 5d 00 00 call 120554 <puts> <== NOT EXECUTED
11a802: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
/*
* Change the block size to the media device size. It will release and sync
* all buffers.
*/
rc = rtems_rfs_buffer_setblksize (fs, rtems_rfs_fs_media_block_size (fs));
11a805: 50 push %eax
11a806: 50 push %eax
11a807: 8b 46 10 mov 0x10(%esi),%eax
11a80a: ff 70 20 pushl 0x20(%eax)
11a80d: 56 push %esi
11a80e: e8 ef fe ff ff call 11a702 <rtems_rfs_buffer_setblksize>
11a813: 89 c3 mov %eax,%ebx
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CLOSE))
11a815: 83 c4 10 add $0x10,%esp
11a818: 85 c0 test %eax,%eax
11a81a: 7e 2d jle 11a849 <rtems_rfs_buffer_close+0x6e><== ALWAYS TAKEN
11a81c: 50 push %eax <== NOT EXECUTED
11a81d: 50 push %eax <== NOT EXECUTED
11a81e: 6a 00 push $0x0 <== NOT EXECUTED
11a820: 6a 10 push $0x10 <== NOT EXECUTED
11a822: e8 75 90 ff ff call 11389c <rtems_rfs_trace> <== NOT EXECUTED
11a827: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11a82a: 84 c0 test %al,%al <== NOT EXECUTED
11a82c: 74 1b je 11a849 <rtems_rfs_buffer_close+0x6e><== NOT EXECUTED
printf ("rtems-rfs: buffer-close: set media block size failed: %d: %s\n",
11a82e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11a831: 53 push %ebx <== NOT EXECUTED
11a832: e8 8d 68 00 00 call 1210c4 <strerror> <== NOT EXECUTED
11a837: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
11a83a: 50 push %eax <== NOT EXECUTED
11a83b: 53 push %ebx <== NOT EXECUTED
11a83c: 68 fb 11 13 00 push $0x1311fb <== NOT EXECUTED
11a841: e8 f6 5a 00 00 call 12033c <printf> <== NOT EXECUTED
11a846: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rc, strerror (rc));
if (close (fs->device) < 0)
11a849: 83 ec 0c sub $0xc,%esp
11a84c: ff 76 0c pushl 0xc(%esi)
11a84f: e8 64 f4 fe ff call 109cb8 <close>
11a854: 83 c4 10 add $0x10,%esp
11a857: 85 c0 test %eax,%eax
11a859: 79 34 jns 11a88f <rtems_rfs_buffer_close+0xb4><== ALWAYS TAKEN
{
rc = errno;
11a85b: e8 6c 49 00 00 call 11f1cc <__errno> <== NOT EXECUTED
11a860: 8b 18 mov (%eax),%ebx <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CLOSE))
11a862: 50 push %eax <== NOT EXECUTED
11a863: 50 push %eax <== NOT EXECUTED
11a864: 6a 00 push $0x0 <== NOT EXECUTED
11a866: 6a 10 push $0x10 <== NOT EXECUTED
11a868: e8 2f 90 ff ff call 11389c <rtems_rfs_trace> <== NOT EXECUTED
11a86d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11a870: 84 c0 test %al,%al <== NOT EXECUTED
11a872: 74 1b je 11a88f <rtems_rfs_buffer_close+0xb4><== NOT EXECUTED
printf ("rtems-rfs: buffer-close: file close failed: %d: %s\n",
11a874: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11a877: 53 push %ebx <== NOT EXECUTED
11a878: e8 47 68 00 00 call 1210c4 <strerror> <== NOT EXECUTED
11a87d: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
11a880: 50 push %eax <== NOT EXECUTED
11a881: 53 push %ebx <== NOT EXECUTED
11a882: 68 39 12 13 00 push $0x131239 <== NOT EXECUTED
11a887: e8 b0 5a 00 00 call 12033c <printf> <== NOT EXECUTED
11a88c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rc, strerror (rc));
}
return rc;
}
11a88f: 89 d8 mov %ebx,%eax
11a891: 8d 65 f8 lea -0x8(%ebp),%esp
11a894: 5b pop %ebx
11a895: 5e pop %esi
11a896: 5d pop %ebp
11a897: c3 ret
0011a131 <rtems_rfs_buffer_handle_release>:
}
int
rtems_rfs_buffer_handle_release (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
11a131: 55 push %ebp
11a132: 89 e5 mov %esp,%ebp
11a134: 56 push %esi
11a135: 53 push %ebx
11a136: 83 ec 10 sub $0x10,%esp
11a139: 8b 5d 08 mov 0x8(%ebp),%ebx
11a13c: 8b 75 0c mov 0xc(%ebp),%esi
int rc = 0;
if (rtems_rfs_buffer_handle_has_block (handle))
11a13f: 83 7e 08 00 cmpl $0x0,0x8(%esi)
11a143: 0f 84 58 01 00 00 je 11a2a1 <rtems_rfs_buffer_handle_release+0x170>
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_RELEASE))
11a149: 51 push %ecx
11a14a: 51 push %ecx
11a14b: 6a 00 push $0x0
11a14d: 68 00 02 00 00 push $0x200
11a152: e8 45 97 ff ff call 11389c <rtems_rfs_trace>
11a157: 83 c4 10 add $0x10,%esp
11a15a: 84 c0 test %al,%al
11a15c: 74 39 je 11a197 <rtems_rfs_buffer_handle_release+0x66><== ALWAYS TAKEN
printf ("rtems-rfs: buffer-release: block=%" PRIu32 " %s refs=%d %s\n",
rtems_rfs_buffer_bnum (handle),
rtems_rfs_buffer_dirty (handle) ? "(dirty)" : "",
rtems_rfs_buffer_refs (handle),
rtems_rfs_buffer_refs (handle) == 0 ? "BAD REF COUNT" : "");
11a15e: 8b 46 08 mov 0x8(%esi),%eax <== NOT EXECUTED
11a161: 8b 50 30 mov 0x30(%eax),%edx <== NOT EXECUTED
int rc = 0;
if (rtems_rfs_buffer_handle_has_block (handle))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_RELEASE))
printf ("rtems-rfs: buffer-release: block=%" PRIu32 " %s refs=%d %s\n",
11a164: b9 f5 f5 12 00 mov $0x12f5f5,%ecx <== NOT EXECUTED
11a169: 85 d2 test %edx,%edx <== NOT EXECUTED
11a16b: 75 05 jne 11a172 <rtems_rfs_buffer_handle_release+0x41><== NOT EXECUTED
11a16d: b9 08 0e 13 00 mov $0x130e08,%ecx <== NOT EXECUTED
11a172: b8 f5 f5 12 00 mov $0x12f5f5,%eax <== NOT EXECUTED
11a177: 80 3e 00 cmpb $0x0,(%esi) <== NOT EXECUTED
11a17a: 74 05 je 11a181 <rtems_rfs_buffer_handle_release+0x50><== NOT EXECUTED
11a17c: b8 16 0e 13 00 mov $0x130e16,%eax <== NOT EXECUTED
11a181: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11a184: 51 push %ecx <== NOT EXECUTED
11a185: 52 push %edx <== NOT EXECUTED
11a186: 50 push %eax <== NOT EXECUTED
11a187: ff 76 04 pushl 0x4(%esi) <== NOT EXECUTED
11a18a: 68 1e 0e 13 00 push $0x130e1e <== NOT EXECUTED
11a18f: e8 a8 61 00 00 call 12033c <printf> <== NOT EXECUTED
11a194: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
rtems_rfs_buffer_bnum (handle),
rtems_rfs_buffer_dirty (handle) ? "(dirty)" : "",
rtems_rfs_buffer_refs (handle),
rtems_rfs_buffer_refs (handle) == 0 ? "BAD REF COUNT" : "");
if (rtems_rfs_buffer_refs (handle) > 0)
11a197: 8b 56 08 mov 0x8(%esi),%edx
11a19a: 8b 42 30 mov 0x30(%edx),%eax
11a19d: 85 c0 test %eax,%eax
11a19f: 7e 04 jle 11a1a5 <rtems_rfs_buffer_handle_release+0x74>
rtems_rfs_buffer_refs_down (handle);
11a1a1: 48 dec %eax
11a1a2: 89 42 30 mov %eax,0x30(%edx)
int
rtems_rfs_buffer_handle_release (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
int rc = 0;
11a1a5: 31 c0 xor %eax,%eax
rtems_rfs_buffer_refs (handle) == 0 ? "BAD REF COUNT" : "");
if (rtems_rfs_buffer_refs (handle) > 0)
rtems_rfs_buffer_refs_down (handle);
if (rtems_rfs_buffer_refs (handle) == 0)
11a1a7: 83 7a 30 00 cmpl $0x0,0x30(%edx)
11a1ab: 0f 85 e7 00 00 00 jne 11a298 <rtems_rfs_buffer_handle_release+0x167>
11a1b1: 83 ec 0c sub $0xc,%esp
11a1b4: 52 push %edx
11a1b5: e8 4a d6 ff ff call 117804 <_Chain_Extract>
{
rtems_chain_extract (rtems_rfs_buffer_link (handle));
fs->buffers_count--;
11a1ba: ff 4b 50 decl 0x50(%ebx)
if (rtems_rfs_fs_no_local_cache (fs))
11a1bd: 83 c4 10 add $0x10,%esp
11a1c0: 8b 03 mov (%ebx),%eax
11a1c2: 83 e0 02 and $0x2,%eax
11a1c5: 74 1e je 11a1e5 <rtems_rfs_buffer_handle_release+0xb4>
{
handle->buffer->user = (void*) 0;
11a1c7: 8b 46 08 mov 0x8(%esi),%eax
11a1ca: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax)
rc = rtems_rfs_buffer_io_release (handle->buffer,
11a1d1: 52 push %edx
11a1d2: 52 push %edx
11a1d3: 0f b6 16 movzbl (%esi),%edx
11a1d6: 52 push %edx
11a1d7: 50 push %eax
11a1d8: e8 db 4a 00 00 call 11ecb8 <rtems_rfs_buffer_bdbuf_release>
11a1dd: 83 c4 10 add $0x10,%esp
11a1e0: e9 b3 00 00 00 jmp 11a298 <rtems_rfs_buffer_handle_release+0x167>
* head.
*
* This code stops a large series of transactions causing all the
* buffers in the cache being held in queues of this file system.
*/
if ((fs->release_count +
11a1e5: 8b 53 70 mov 0x70(%ebx),%edx
11a1e8: 03 53 60 add 0x60(%ebx),%edx
11a1eb: 3b 53 40 cmp 0x40(%ebx),%edx
11a1ee: 72 73 jb 11a263 <rtems_rfs_buffer_handle_release+0x132>
fs->release_modified_count) >= fs->max_held_buffers)
{
rtems_rfs_buffer* buffer;
bool modified;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_RELEASE))
11a1f0: 50 push %eax
11a1f1: 50 push %eax
11a1f2: 6a 00 push $0x0
11a1f4: 68 00 02 00 00 push $0x200
11a1f9: e8 9e 96 ff ff call 11389c <rtems_rfs_trace>
11a1fe: 83 c4 10 add $0x10,%esp
11a201: 84 c0 test %al,%al
11a203: 74 16 je 11a21b <rtems_rfs_buffer_handle_release+0xea><== ALWAYS TAKEN
printf ("rtems-rfs: buffer-release: local cache overflow:"
11a205: 50 push %eax <== NOT EXECUTED
11a206: 50 push %eax <== NOT EXECUTED
11a207: 8b 43 70 mov 0x70(%ebx),%eax <== NOT EXECUTED
11a20a: 03 43 60 add 0x60(%ebx),%eax <== NOT EXECUTED
11a20d: 50 push %eax <== NOT EXECUTED
11a20e: 68 52 0e 13 00 push $0x130e52 <== NOT EXECUTED
11a213: e8 24 61 00 00 call 12033c <printf> <== NOT EXECUTED
11a218: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
" %" PRIu32 "\n", fs->release_count + fs->release_modified_count);
if (fs->release_count > fs->release_modified_count)
11a21b: 8b 43 70 mov 0x70(%ebx),%eax
11a21e: 39 43 60 cmp %eax,0x60(%ebx)
11a221: 76 16 jbe 11a239 <rtems_rfs_buffer_handle_release+0x108>
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
11a223: 83 ec 0c sub $0xc,%esp
{
buffer = (rtems_rfs_buffer*) rtems_chain_get (&fs->release);
11a226: 8d 43 54 lea 0x54(%ebx),%eax
11a229: 50 push %eax
11a22a: e8 21 43 ff ff call 10e550 <_Chain_Get>
fs->release_count--;
11a22f: ff 4b 60 decl 0x60(%ebx)
11a232: 83 c4 10 add $0x10,%esp
modified = false;
11a235: 31 d2 xor %edx,%edx
11a237: eb 17 jmp 11a250 <rtems_rfs_buffer_handle_release+0x11f>
11a239: 83 ec 0c sub $0xc,%esp
}
else
{
buffer =
(rtems_rfs_buffer*) rtems_chain_get (&fs->release_modified);
11a23c: 8d 43 64 lea 0x64(%ebx),%eax
11a23f: 50 push %eax
11a240: e8 0b 43 ff ff call 10e550 <_Chain_Get>
fs->release_modified_count--;
11a245: ff 4b 70 decl 0x70(%ebx)
11a248: 83 c4 10 add $0x10,%esp
modified = true;
11a24b: ba 01 00 00 00 mov $0x1,%edx
}
buffer->user = (void*) 0;
11a250: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax)
rc = rtems_rfs_buffer_io_release (buffer, modified);
11a257: 51 push %ecx
11a258: 51 push %ecx
11a259: 52 push %edx
11a25a: 50 push %eax
11a25b: e8 58 4a 00 00 call 11ecb8 <rtems_rfs_buffer_bdbuf_release>
11a260: 83 c4 10 add $0x10,%esp
}
if (rtems_rfs_buffer_dirty (handle))
11a263: 80 3e 00 cmpb $0x0,(%esi)
11a266: 74 16 je 11a27e <rtems_rfs_buffer_handle_release+0x14d>
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
11a268: 52 push %edx
11a269: 52 push %edx
11a26a: ff 76 08 pushl 0x8(%esi)
{
rtems_chain_append (&fs->release_modified,
11a26d: 8d 53 64 lea 0x64(%ebx),%edx
11a270: 52 push %edx
11a271: 89 45 f4 mov %eax,-0xc(%ebp)
11a274: e8 b3 42 ff ff call 10e52c <_Chain_Append>
rtems_rfs_buffer_link (handle));
fs->release_modified_count++;
11a279: ff 43 70 incl 0x70(%ebx)
11a27c: eb 14 jmp 11a292 <rtems_rfs_buffer_handle_release+0x161>
11a27e: 51 push %ecx
11a27f: 51 push %ecx
11a280: ff 76 08 pushl 0x8(%esi)
}
else
{
rtems_chain_append (&fs->release, rtems_rfs_buffer_link (handle));
11a283: 8d 53 54 lea 0x54(%ebx),%edx
11a286: 52 push %edx
11a287: 89 45 f4 mov %eax,-0xc(%ebp)
11a28a: e8 9d 42 ff ff call 10e52c <_Chain_Append>
fs->release_count++;
11a28f: ff 43 60 incl 0x60(%ebx)
11a292: 83 c4 10 add $0x10,%esp
11a295: 8b 45 f4 mov -0xc(%ebp),%eax
}
}
}
handle->buffer = NULL;
11a298: c7 46 08 00 00 00 00 movl $0x0,0x8(%esi)
11a29f: eb 02 jmp 11a2a3 <rtems_rfs_buffer_handle_release+0x172>
int
rtems_rfs_buffer_handle_release (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
int rc = 0;
11a2a1: 31 c0 xor %eax,%eax
}
handle->buffer = NULL;
}
return rc;
}
11a2a3: 8d 65 f8 lea -0x8(%ebp),%esp
11a2a6: 5b pop %ebx
11a2a7: 5e pop %esi
11a2a8: 5d pop %ebp
11a2a9: c3 ret
0011a2aa <rtems_rfs_buffer_handle_request>:
int
rtems_rfs_buffer_handle_request (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle,
rtems_rfs_buffer_block block,
bool read)
{
11a2aa: 55 push %ebp
11a2ab: 89 e5 mov %esp,%ebp
11a2ad: 57 push %edi
11a2ae: 56 push %esi
11a2af: 53 push %ebx
11a2b0: 83 ec 1c sub $0x1c,%esp
11a2b3: 8b 75 08 mov 0x8(%ebp),%esi
11a2b6: 8b 5d 0c mov 0xc(%ebp),%ebx
11a2b9: 8b 7d 10 mov 0x10(%ebp),%edi
11a2bc: 8a 45 14 mov 0x14(%ebp),%al
11a2bf: 88 45 e7 mov %al,-0x19(%ebp)
/*
* If the handle has a buffer release it. This allows a handle to be reused
* without needing to close then open it again.
*/
if (rtems_rfs_buffer_handle_has_block (handle))
11a2c2: 83 7b 08 00 cmpl $0x0,0x8(%ebx)
11a2c6: 74 55 je 11a31d <rtems_rfs_buffer_handle_request+0x73>
{
/*
* Treat block 0 as special to handle the loading of the super block.
*/
if (block && (rtems_rfs_buffer_bnum (handle) == block))
11a2c8: 85 ff test %edi,%edi
11a2ca: 74 0a je 11a2d6 <rtems_rfs_buffer_handle_request+0x2c><== NEVER TAKEN
11a2cc: 39 7b 04 cmp %edi,0x4(%ebx)
11a2cf: 75 05 jne 11a2d6 <rtems_rfs_buffer_handle_request+0x2c>
11a2d1: e9 e3 01 00 00 jmp 11a4b9 <rtems_rfs_buffer_handle_request+0x20f>
return 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
11a2d6: 51 push %ecx
11a2d7: 51 push %ecx
11a2d8: 6a 00 push $0x0
11a2da: 68 00 01 00 00 push $0x100
11a2df: e8 b8 95 ff ff call 11389c <rtems_rfs_trace>
11a2e4: 83 c4 10 add $0x10,%esp
11a2e7: 84 c0 test %al,%al
11a2e9: 74 12 je 11a2fd <rtems_rfs_buffer_handle_request+0x53><== ALWAYS TAKEN
printf ("rtems-rfs: buffer-request: handle has buffer: %" PRIu32 "\n",
11a2eb: 52 push %edx <== NOT EXECUTED
11a2ec: 52 push %edx <== NOT EXECUTED
11a2ed: ff 73 04 pushl 0x4(%ebx) <== NOT EXECUTED
11a2f0: 68 8c 0e 13 00 push $0x130e8c <== NOT EXECUTED
11a2f5: e8 42 60 00 00 call 12033c <printf> <== NOT EXECUTED
11a2fa: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_rfs_buffer_bnum (handle));
rc = rtems_rfs_buffer_handle_release (fs, handle);
11a2fd: 50 push %eax
11a2fe: 50 push %eax
11a2ff: 53 push %ebx
11a300: 56 push %esi
11a301: e8 2b fe ff ff call 11a131 <rtems_rfs_buffer_handle_release>
11a306: 89 c2 mov %eax,%edx
if (rc > 0)
11a308: 83 c4 10 add $0x10,%esp
11a30b: 85 c0 test %eax,%eax
11a30d: 0f 8f a8 01 00 00 jg 11a4bb <rtems_rfs_buffer_handle_request+0x211><== NEVER TAKEN
return rc;
handle->dirty = false;
11a313: c6 03 00 movb $0x0,(%ebx)
handle->bnum = 0;
11a316: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx)
}
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
11a31d: 50 push %eax
11a31e: 50 push %eax
11a31f: 6a 00 push $0x0
11a321: 68 00 01 00 00 push $0x100
11a326: e8 71 95 ff ff call 11389c <rtems_rfs_trace>
11a32b: 83 c4 10 add $0x10,%esp
11a32e: 84 c0 test %al,%al
11a330: 74 10 je 11a342 <rtems_rfs_buffer_handle_request+0x98><== ALWAYS TAKEN
printf ("rtems-rfs: buffer-request: block=%" PRIu32 "\n", block);
11a332: 50 push %eax <== NOT EXECUTED
11a333: 50 push %eax <== NOT EXECUTED
11a334: 57 push %edi <== NOT EXECUTED
11a335: 68 bf 0e 13 00 push $0x130ebf <== NOT EXECUTED
11a33a: e8 fd 5f 00 00 call 12033c <printf> <== NOT EXECUTED
11a33f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
* currently attached to a handle. If it is share the access. A buffer could
* be shared where different parts of the block have separate functions. An
* example is an inode block and the file system needs to handle 2 inodes in
* the same block at the same time.
*/
if (fs->buffers_count)
11a342: 83 7e 50 00 cmpl $0x0,0x50(%esi)
11a346: 74 40 je 11a388 <rtems_rfs_buffer_handle_request+0xde>
{
/*
* Check the active buffer list for shared buffers.
*/
handle->buffer = rtems_rfs_scan_chain (&fs->buffers,
11a348: 8d 56 50 lea 0x50(%esi),%edx
11a34b: 8d 46 44 lea 0x44(%esi),%eax
11a34e: 89 f9 mov %edi,%ecx
11a350: e8 f9 fc ff ff call 11a04e <rtems_rfs_scan_chain>
11a355: 89 43 08 mov %eax,0x8(%ebx)
&fs->buffers_count,
block);
if (rtems_rfs_buffer_handle_has_block (handle) &&
11a358: 85 c0 test %eax,%eax
11a35a: 74 2c je 11a388 <rtems_rfs_buffer_handle_request+0xde>
rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
11a35c: 50 push %eax
11a35d: 50 push %eax
11a35e: 6a 00 push $0x0
11a360: 68 00 01 00 00 push $0x100
11a365: e8 32 95 ff ff call 11389c <rtems_rfs_trace>
* Check the active buffer list for shared buffers.
*/
handle->buffer = rtems_rfs_scan_chain (&fs->buffers,
&fs->buffers_count,
block);
if (rtems_rfs_buffer_handle_has_block (handle) &&
11a36a: 83 c4 10 add $0x10,%esp
11a36d: 84 c0 test %al,%al
11a36f: 74 17 je 11a388 <rtems_rfs_buffer_handle_request+0xde><== ALWAYS TAKEN
rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
printf ("rtems-rfs: buffer-request: buffer shared: refs: %d\n",
11a371: 50 push %eax <== NOT EXECUTED
11a372: 50 push %eax <== NOT EXECUTED
rtems_rfs_buffer_refs (handle) + 1);
11a373: 8b 43 08 mov 0x8(%ebx),%eax <== NOT EXECUTED
handle->buffer = rtems_rfs_scan_chain (&fs->buffers,
&fs->buffers_count,
block);
if (rtems_rfs_buffer_handle_has_block (handle) &&
rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
printf ("rtems-rfs: buffer-request: buffer shared: refs: %d\n",
11a376: 8b 40 30 mov 0x30(%eax),%eax <== NOT EXECUTED
11a379: 40 inc %eax <== NOT EXECUTED
11a37a: 50 push %eax <== NOT EXECUTED
11a37b: 68 e5 0e 13 00 push $0x130ee5 <== NOT EXECUTED
11a380: e8 b7 5f 00 00 call 12033c <printf> <== NOT EXECUTED
11a385: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
/*
* If the buffer has not been found check the local cache of released
* buffers. There are release and released modified lists to preserve the
* state.
*/
if (!rtems_rfs_fs_no_local_cache (fs) &&
11a388: f6 06 02 testb $0x2,(%esi)
11a38b: 75 3f jne 11a3cc <rtems_rfs_buffer_handle_request+0x122>
11a38d: 83 7b 08 00 cmpl $0x0,0x8(%ebx)
11a391: 75 39 jne 11a3cc <rtems_rfs_buffer_handle_request+0x122>
!rtems_rfs_buffer_handle_has_block (handle))
{
/*
* Check the local cache of released buffers.
*/
if (fs->release_count)
11a393: 83 7e 60 00 cmpl $0x0,0x60(%esi)
11a397: 74 10 je 11a3a9 <rtems_rfs_buffer_handle_request+0xff>
handle->buffer = rtems_rfs_scan_chain (&fs->release,
11a399: 8d 56 60 lea 0x60(%esi),%edx
11a39c: 8d 46 54 lea 0x54(%esi),%eax
11a39f: 89 f9 mov %edi,%ecx
11a3a1: e8 a8 fc ff ff call 11a04e <rtems_rfs_scan_chain>
11a3a6: 89 43 08 mov %eax,0x8(%ebx)
&fs->release_count,
block);
if (!rtems_rfs_buffer_handle_has_block (handle) &&
11a3a9: 83 7b 08 00 cmpl $0x0,0x8(%ebx)
11a3ad: 75 1d jne 11a3cc <rtems_rfs_buffer_handle_request+0x122>
11a3af: 83 7e 70 00 cmpl $0x0,0x70(%esi)
11a3b3: 74 17 je 11a3cc <rtems_rfs_buffer_handle_request+0x122>
fs->release_modified_count)
{
handle->buffer = rtems_rfs_scan_chain (&fs->release_modified,
11a3b5: 8d 56 70 lea 0x70(%esi),%edx
11a3b8: 8d 46 64 lea 0x64(%esi),%eax
11a3bb: 89 f9 mov %edi,%ecx
11a3bd: e8 8c fc ff ff call 11a04e <rtems_rfs_scan_chain>
11a3c2: 89 43 08 mov %eax,0x8(%ebx)
&fs->release_modified_count,
block);
/*
* If we found a buffer retain the dirty buffer state.
*/
if (rtems_rfs_buffer_handle_has_block (handle))
11a3c5: 85 c0 test %eax,%eax
11a3c7: 74 03 je 11a3cc <rtems_rfs_buffer_handle_request+0x122>
rtems_rfs_buffer_mark_dirty (handle);
11a3c9: c6 03 01 movb $0x1,(%ebx)
}
/*
* If not located we request the buffer from the I/O layer.
*/
if (!rtems_rfs_buffer_handle_has_block (handle))
11a3cc: 83 7b 08 00 cmpl $0x0,0x8(%ebx)
11a3d0: 0f 85 83 00 00 00 jne 11a459 <rtems_rfs_buffer_handle_request+0x1af>
{
rc = rtems_rfs_buffer_io_request (fs, block, read, &handle->buffer);
11a3d6: 8d 43 08 lea 0x8(%ebx),%eax
11a3d9: 50 push %eax
11a3da: 0f b6 45 e7 movzbl -0x19(%ebp),%eax
11a3de: 50 push %eax
11a3df: 57 push %edi
11a3e0: 56 push %esi
11a3e1: e8 92 48 00 00 call 11ec78 <rtems_rfs_buffer_bdbuf_request>
11a3e6: 89 c2 mov %eax,%edx
if (rc > 0)
11a3e8: 83 c4 10 add $0x10,%esp
11a3eb: 85 c0 test %eax,%eax
11a3ed: 7e 5a jle 11a449 <rtems_rfs_buffer_handle_request+0x19f><== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
11a3ef: 50 push %eax <== NOT EXECUTED
11a3f0: 50 push %eax <== NOT EXECUTED
11a3f1: 6a 00 push $0x0 <== NOT EXECUTED
11a3f3: 68 00 01 00 00 push $0x100 <== NOT EXECUTED
11a3f8: 89 55 e0 mov %edx,-0x20(%ebp) <== NOT EXECUTED
11a3fb: e8 9c 94 ff ff call 11389c <rtems_rfs_trace> <== NOT EXECUTED
11a400: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11a403: 84 c0 test %al,%al <== NOT EXECUTED
11a405: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED
11a408: 0f 84 ad 00 00 00 je 11a4bb <rtems_rfs_buffer_handle_request+0x211><== NOT EXECUTED
printf ("rtems-rfs: buffer-request: block=%" PRIu32 ": bdbuf-%s: %d: %s\n",
11a40e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11a411: 52 push %edx <== NOT EXECUTED
11a412: e8 ad 6c 00 00 call 1210c4 <strerror> <== NOT EXECUTED
11a417: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11a41a: b9 88 0e 13 00 mov $0x130e88,%ecx <== NOT EXECUTED
11a41f: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) <== NOT EXECUTED
11a423: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED
11a426: 74 05 je 11a42d <rtems_rfs_buffer_handle_request+0x183><== NOT EXECUTED
11a428: b9 fb 07 13 00 mov $0x1307fb,%ecx <== NOT EXECUTED
11a42d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11a430: 50 push %eax <== NOT EXECUTED
11a431: 52 push %edx <== NOT EXECUTED
11a432: 51 push %ecx <== NOT EXECUTED
11a433: 57 push %edi <== NOT EXECUTED
11a434: 68 19 0f 13 00 push $0x130f19 <== NOT EXECUTED
11a439: 89 55 e0 mov %edx,-0x20(%ebp) <== NOT EXECUTED
11a43c: e8 fb 5e 00 00 call 12033c <printf> <== NOT EXECUTED
11a441: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
11a444: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED
11a447: eb 72 jmp 11a4bb <rtems_rfs_buffer_handle_request+0x211><== NOT EXECUTED
block, read ? "read" : "get", rc, strerror (rc));
return rc;
}
rtems_chain_set_off_chain (rtems_rfs_buffer_link(handle));
11a449: 8b 43 08 mov 0x8(%ebx),%eax
11a44c: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax)
11a453: c7 00 00 00 00 00 movl $0x0,(%eax)
}
/*
* Increase the reference count of the buffer.
*/
rtems_rfs_buffer_refs_up (handle);
11a459: 8b 43 08 mov 0x8(%ebx),%eax
11a45c: ff 40 30 incl 0x30(%eax)
11a45f: 52 push %edx
11a460: 52 push %edx
11a461: 50 push %eax
rtems_chain_append (&fs->buffers, rtems_rfs_buffer_link (handle));
11a462: 8d 46 44 lea 0x44(%esi),%eax
11a465: 50 push %eax
11a466: e8 c1 40 ff ff call 10e52c <_Chain_Append>
fs->buffers_count++;
11a46b: ff 46 50 incl 0x50(%esi)
handle->buffer->user = (void*) ((intptr_t) block);
11a46e: 8b 43 08 mov 0x8(%ebx),%eax
11a471: 89 78 34 mov %edi,0x34(%eax)
handle->bnum = block;
11a474: 89 7b 04 mov %edi,0x4(%ebx)
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
11a477: 59 pop %ecx
11a478: 5e pop %esi
11a479: 6a 00 push $0x0
11a47b: 68 00 01 00 00 push $0x100
11a480: e8 17 94 ff ff call 11389c <rtems_rfs_trace>
11a485: 83 c4 10 add $0x10,%esp
11a488: 84 c0 test %al,%al
11a48a: 74 2d je 11a4b9 <rtems_rfs_buffer_handle_request+0x20f><== ALWAYS TAKEN
printf ("rtems-rfs: buffer-request: block=%" PRIu32 " bdbuf-%s=%" PRIu32 " refs=%d\n",
block, read ? "read" : "get", handle->buffer->block,
handle->buffer->references);
11a48c: 8b 43 08 mov 0x8(%ebx),%eax <== NOT EXECUTED
handle->buffer->user = (void*) ((intptr_t) block);
handle->bnum = block;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
printf ("rtems-rfs: buffer-request: block=%" PRIu32 " bdbuf-%s=%" PRIu32 " refs=%d\n",
11a48f: 8b 48 30 mov 0x30(%eax),%ecx <== NOT EXECUTED
11a492: 8b 50 18 mov 0x18(%eax),%edx <== NOT EXECUTED
11a495: b8 88 0e 13 00 mov $0x130e88,%eax <== NOT EXECUTED
11a49a: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) <== NOT EXECUTED
11a49e: 74 05 je 11a4a5 <rtems_rfs_buffer_handle_request+0x1fb><== NOT EXECUTED
11a4a0: b8 fb 07 13 00 mov $0x1307fb,%eax <== NOT EXECUTED
11a4a5: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11a4a8: 51 push %ecx <== NOT EXECUTED
11a4a9: 52 push %edx <== NOT EXECUTED
11a4aa: 50 push %eax <== NOT EXECUTED
11a4ab: 57 push %edi <== NOT EXECUTED
11a4ac: 68 51 0f 13 00 push $0x130f51 <== NOT EXECUTED
11a4b1: e8 86 5e 00 00 call 12033c <printf> <== NOT EXECUTED
11a4b6: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
block, read ? "read" : "get", handle->buffer->block,
handle->buffer->references);
return 0;
11a4b9: 31 d2 xor %edx,%edx
}
11a4bb: 89 d0 mov %edx,%eax
11a4bd: 8d 65 f4 lea -0xc(%ebp),%esp
11a4c0: 5b pop %ebx
11a4c1: 5e pop %esi
11a4c2: 5f pop %edi
11a4c3: 5d pop %ebp
11a4c4: c3 ret
0011a4c5 <rtems_rfs_buffer_open>:
return rc;
}
int
rtems_rfs_buffer_open (const char* name, rtems_rfs_file_system* fs)
{
11a4c5: 55 push %ebp
11a4c6: 89 e5 mov %esp,%ebp
11a4c8: 56 push %esi
11a4c9: 53 push %ebx
11a4ca: 83 ec 58 sub $0x58,%esp
11a4cd: 8b 5d 08 mov 0x8(%ebp),%ebx
11a4d0: 8b 75 0c mov 0xc(%ebp),%esi
struct stat st;
#if RTEMS_RFS_USE_LIBBLOCK
int rv;
#endif
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
11a4d3: 6a 00 push $0x0
11a4d5: 6a 20 push $0x20
11a4d7: e8 c0 93 ff ff call 11389c <rtems_rfs_trace>
11a4dc: 83 c4 10 add $0x10,%esp
11a4df: 84 c0 test %al,%al
11a4e1: 74 10 je 11a4f3 <rtems_rfs_buffer_open+0x2e><== ALWAYS TAKEN
printf ("rtems-rfs: buffer-open: opening: %s\n", name);
11a4e3: 50 push %eax <== NOT EXECUTED
11a4e4: 50 push %eax <== NOT EXECUTED
11a4e5: 53 push %ebx <== NOT EXECUTED
11a4e6: 68 8c 0f 13 00 push $0x130f8c <== NOT EXECUTED
11a4eb: e8 4c 5e 00 00 call 12033c <printf> <== NOT EXECUTED
11a4f0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
fs->device = open (name, O_RDWR);
11a4f3: 50 push %eax
11a4f4: 50 push %eax
11a4f5: 6a 02 push $0x2
11a4f7: 53 push %ebx
11a4f8: e8 eb 07 ff ff call 10ace8 <open>
11a4fd: 89 46 0c mov %eax,0xc(%esi)
if (fs->device < 0)
11a500: 83 c4 10 add $0x10,%esp
11a503: 85 c0 test %eax,%eax
11a505: 79 2e jns 11a535 <rtems_rfs_buffer_open+0x70><== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_OPEN))
11a507: 51 push %ecx <== NOT EXECUTED
11a508: 51 push %ecx <== NOT EXECUTED
11a509: 6a 00 push $0x0 <== NOT EXECUTED
11a50b: 6a 08 push $0x8 <== NOT EXECUTED
11a50d: e8 8a 93 ff ff call 11389c <rtems_rfs_trace> <== NOT EXECUTED
11a512: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11a515: 84 c0 test %al,%al <== NOT EXECUTED
11a517: 75 02 jne 11a51b <rtems_rfs_buffer_open+0x56><== NOT EXECUTED
11a519: eb 10 jmp 11a52b <rtems_rfs_buffer_open+0x66><== NOT EXECUTED
printf ("rtems-rfs: buffer-open: cannot open file\n");
11a51b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11a51e: 68 b1 0f 13 00 push $0x130fb1 <== NOT EXECUTED
11a523: e8 2c 60 00 00 call 120554 <puts> <== NOT EXECUTED
11a528: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
return ENXIO;
11a52b: bb 06 00 00 00 mov $0x6,%ebx <== NOT EXECUTED
11a530: e9 d7 00 00 00 jmp 11a60c <rtems_rfs_buffer_open+0x147><== NOT EXECUTED
}
if (fstat (fs->device, &st) < 0)
11a535: 52 push %edx
11a536: 52 push %edx
11a537: 8d 55 b0 lea -0x50(%ebp),%edx
11a53a: 52 push %edx
11a53b: 50 push %eax
11a53c: e8 1f fa fe ff call 109f60 <fstat>
11a541: 83 c4 10 add $0x10,%esp
11a544: 85 c0 test %eax,%eax
11a546: 79 2d jns 11a575 <rtems_rfs_buffer_open+0xb0><== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_OPEN))
11a548: 50 push %eax <== NOT EXECUTED
11a549: 50 push %eax <== NOT EXECUTED
11a54a: 6a 00 push $0x0 <== NOT EXECUTED
11a54c: 6a 08 push $0x8 <== NOT EXECUTED
11a54e: e8 49 93 ff ff call 11389c <rtems_rfs_trace> <== NOT EXECUTED
11a553: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11a556: 84 c0 test %al,%al <== NOT EXECUTED
11a558: 74 d1 je 11a52b <rtems_rfs_buffer_open+0x66><== NOT EXECUTED
printf ("rtems-rfs: buffer-open: stat '%s' failed: %s\n",
name, strerror (errno));
11a55a: e8 6d 4c 00 00 call 11f1cc <__errno> <== NOT EXECUTED
}
if (fstat (fs->device, &st) < 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_OPEN))
printf ("rtems-rfs: buffer-open: stat '%s' failed: %s\n",
11a55f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11a562: ff 30 pushl (%eax) <== NOT EXECUTED
11a564: e8 5b 6b 00 00 call 1210c4 <strerror> <== NOT EXECUTED
11a569: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
11a56c: 50 push %eax <== NOT EXECUTED
11a56d: 53 push %ebx <== NOT EXECUTED
11a56e: 68 da 0f 13 00 push $0x130fda <== NOT EXECUTED
11a573: eb 29 jmp 11a59e <rtems_rfs_buffer_open+0xd9><== NOT EXECUTED
#if RTEMS_RFS_USE_LIBBLOCK
/*
* Is the device a block device ?
*/
if (!S_ISBLK (st.st_mode))
11a575: 8b 45 bc mov -0x44(%ebp),%eax
11a578: 25 00 f0 00 00 and $0xf000,%eax
11a57d: 3d 00 60 00 00 cmp $0x6000,%eax
11a582: 74 21 je 11a5a5 <rtems_rfs_buffer_open+0xe0><== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_OPEN))
11a584: 50 push %eax <== NOT EXECUTED
11a585: 50 push %eax <== NOT EXECUTED
11a586: 6a 00 push $0x0 <== NOT EXECUTED
11a588: 6a 08 push $0x8 <== NOT EXECUTED
11a58a: e8 0d 93 ff ff call 11389c <rtems_rfs_trace> <== NOT EXECUTED
11a58f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11a592: 84 c0 test %al,%al <== NOT EXECUTED
11a594: 74 95 je 11a52b <rtems_rfs_buffer_open+0x66><== NOT EXECUTED
printf ("rtems-rfs: buffer-open: '%s' is not a block device\n", name);
11a596: 50 push %eax <== NOT EXECUTED
11a597: 50 push %eax <== NOT EXECUTED
11a598: 53 push %ebx <== NOT EXECUTED
11a599: 68 08 10 13 00 push $0x131008 <== NOT EXECUTED
11a59e: e8 99 5d 00 00 call 12033c <printf> <== NOT EXECUTED
11a5a3: eb 83 jmp 11a528 <rtems_rfs_buffer_open+0x63><== NOT EXECUTED
static inline int rtems_disk_fd_get_disk_device(
int fd,
rtems_disk_device **dd_ptr
)
{
return ioctl(fd, RTEMS_BLKIO_GETDISKDEV, dd_ptr);
11a5a5: 50 push %eax
}
/*
* Check that device is registred as a block device and lock it.
*/
rv = rtems_disk_fd_get_disk_device (fs->device, &fs->disk);
11a5a6: 8d 46 10 lea 0x10(%esi),%eax
11a5a9: 50 push %eax
11a5aa: 68 09 42 04 40 push $0x40044209
11a5af: ff 76 0c pushl 0xc(%esi)
11a5b2: e8 b9 fa fe ff call 10a070 <ioctl>
if (rv != 0)
11a5b7: 83 c4 10 add $0x10,%esp
11a5ba: 85 c0 test %eax,%eax
11a5bc: 74 23 je 11a5e1 <rtems_rfs_buffer_open+0x11c><== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_OPEN))
11a5be: 50 push %eax <== NOT EXECUTED
11a5bf: 50 push %eax <== NOT EXECUTED
11a5c0: 6a 00 push $0x0 <== NOT EXECUTED
11a5c2: 6a 08 push $0x8 <== NOT EXECUTED
11a5c4: e8 d3 92 ff ff call 11389c <rtems_rfs_trace> <== NOT EXECUTED
11a5c9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11a5cc: 84 c0 test %al,%al <== NOT EXECUTED
11a5ce: 0f 84 57 ff ff ff je 11a52b <rtems_rfs_buffer_open+0x66><== NOT EXECUTED
printf ("rtems-rfs: buffer-open: cannot obtain the disk\n");
11a5d4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11a5d7: 68 3c 10 13 00 push $0x13103c <== NOT EXECUTED
11a5dc: e9 42 ff ff ff jmp 11a523 <rtems_rfs_buffer_open+0x5e><== NOT EXECUTED
#else
fs->media_size = st.st_size;
strcat (fs->name, name);
#endif
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
11a5e1: 50 push %eax
11a5e2: 50 push %eax
11a5e3: 6a 00 push $0x0
11a5e5: 6a 20 push $0x20
11a5e7: e8 b0 92 ff ff call 11389c <rtems_rfs_trace>
11a5ec: 83 c4 10 add $0x10,%esp
printf ("rtems-rfs: buffer-open: blks=%" PRId32 ", blk-size=%" PRId32 "\n",
rtems_rfs_fs_media_blocks (fs),
rtems_rfs_fs_media_block_size (fs));
return 0;
11a5ef: 31 db xor %ebx,%ebx
#else
fs->media_size = st.st_size;
strcat (fs->name, name);
#endif
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
11a5f1: 84 c0 test %al,%al
11a5f3: 74 17 je 11a60c <rtems_rfs_buffer_open+0x147><== ALWAYS TAKEN
printf ("rtems-rfs: buffer-open: blks=%" PRId32 ", blk-size=%" PRId32 "\n",
rtems_rfs_fs_media_blocks (fs),
rtems_rfs_fs_media_block_size (fs));
11a5f5: 8b 46 10 mov 0x10(%esi),%eax <== NOT EXECUTED
fs->media_size = st.st_size;
strcat (fs->name, name);
#endif
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
printf ("rtems-rfs: buffer-open: blks=%" PRId32 ", blk-size=%" PRId32 "\n",
11a5f8: 56 push %esi <== NOT EXECUTED
11a5f9: ff 70 20 pushl 0x20(%eax) <== NOT EXECUTED
11a5fc: ff 70 1c pushl 0x1c(%eax) <== NOT EXECUTED
11a5ff: 68 6b 10 13 00 push $0x13106b <== NOT EXECUTED
11a604: e8 33 5d 00 00 call 12033c <printf> <== NOT EXECUTED
11a609: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_rfs_fs_media_blocks (fs),
rtems_rfs_fs_media_block_size (fs));
return 0;
}
11a60c: 89 d8 mov %ebx,%eax
11a60e: 8d 65 f8 lea -0x8(%ebp),%esp
11a611: 5b pop %ebx
11a612: 5e pop %esi
11a613: 5d pop %ebp
11a614: c3 ret
0011a702 <rtems_rfs_buffer_setblksize>:
return result;
}
int
rtems_rfs_buffer_setblksize (rtems_rfs_file_system* fs, size_t size)
{
11a702: 55 push %ebp
11a703: 89 e5 mov %esp,%ebp
11a705: 56 push %esi
11a706: 53 push %ebx
11a707: 8b 5d 08 mov 0x8(%ebp),%ebx
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SETBLKSIZE))
11a70a: 50 push %eax
11a70b: 50 push %eax
11a70c: 6a 00 push $0x0
11a70e: 68 00 04 00 00 push $0x400
11a713: e8 84 91 ff ff call 11389c <rtems_rfs_trace>
11a718: 83 c4 10 add $0x10,%esp
11a71b: 84 c0 test %al,%al
11a71d: 74 12 je 11a731 <rtems_rfs_buffer_setblksize+0x2f><== ALWAYS TAKEN
printf ("rtems-rfs: buffer-setblksize: block size: %zu\n", size);
11a71f: 50 push %eax <== NOT EXECUTED
11a720: 50 push %eax <== NOT EXECUTED
11a721: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
11a724: 68 34 11 13 00 push $0x131134 <== NOT EXECUTED
11a729: e8 0e 5c 00 00 call 12033c <printf> <== NOT EXECUTED
11a72e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rc = rtems_rfs_buffers_release (fs);
11a731: 83 ec 0c sub $0xc,%esp
11a734: 53 push %ebx
11a735: e8 5f ff ff ff call 11a699 <rtems_rfs_buffers_release>
11a73a: 89 c6 mov %eax,%esi
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SETBLKSIZE))
11a73c: 83 c4 10 add $0x10,%esp
11a73f: 85 c0 test %eax,%eax
11a741: 7e 30 jle 11a773 <rtems_rfs_buffer_setblksize+0x71><== ALWAYS TAKEN
11a743: 50 push %eax <== NOT EXECUTED
11a744: 50 push %eax <== NOT EXECUTED
11a745: 6a 00 push $0x0 <== NOT EXECUTED
11a747: 68 00 04 00 00 push $0x400 <== NOT EXECUTED
11a74c: e8 4b 91 ff ff call 11389c <rtems_rfs_trace> <== NOT EXECUTED
11a751: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11a754: 84 c0 test %al,%al <== NOT EXECUTED
11a756: 74 1b je 11a773 <rtems_rfs_buffer_setblksize+0x71><== NOT EXECUTED
printf ("rtems-rfs: buffer-setblksize: buffer release failed: %d: %s\n",
11a758: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11a75b: 56 push %esi <== NOT EXECUTED
11a75c: e8 63 69 00 00 call 1210c4 <strerror> <== NOT EXECUTED
11a761: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
11a764: 50 push %eax <== NOT EXECUTED
11a765: 56 push %esi <== NOT EXECUTED
11a766: 68 63 11 13 00 push $0x131163 <== NOT EXECUTED
11a76b: e8 cc 5b 00 00 call 12033c <printf> <== NOT EXECUTED
11a770: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rc, strerror (rc));
rc = rtems_rfs_buffer_sync (fs);
11a773: 83 ec 0c sub $0xc,%esp
11a776: 53 push %ebx
11a777: e8 99 fe ff ff call 11a615 <rtems_rfs_buffer_sync>
11a77c: 89 c6 mov %eax,%esi
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SETBLKSIZE))
11a77e: 83 c4 10 add $0x10,%esp
11a781: 85 c0 test %eax,%eax
11a783: 7e 30 jle 11a7b5 <rtems_rfs_buffer_setblksize+0xb3><== ALWAYS TAKEN
11a785: 51 push %ecx <== NOT EXECUTED
11a786: 51 push %ecx <== NOT EXECUTED
11a787: 6a 00 push $0x0 <== NOT EXECUTED
11a789: 68 00 04 00 00 push $0x400 <== NOT EXECUTED
11a78e: e8 09 91 ff ff call 11389c <rtems_rfs_trace> <== NOT EXECUTED
11a793: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11a796: 84 c0 test %al,%al <== NOT EXECUTED
11a798: 74 1b je 11a7b5 <rtems_rfs_buffer_setblksize+0xb3><== NOT EXECUTED
printf ("rtems-rfs: buffer-setblksize: device sync failed: %d: %s\n",
11a79a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11a79d: 56 push %esi <== NOT EXECUTED
11a79e: e8 21 69 00 00 call 1210c4 <strerror> <== NOT EXECUTED
11a7a3: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
11a7a6: 50 push %eax <== NOT EXECUTED
11a7a7: 56 push %esi <== NOT EXECUTED
11a7a8: 68 a0 11 13 00 push $0x1311a0 <== NOT EXECUTED
11a7ad: e8 8a 5b 00 00 call 12033c <printf> <== NOT EXECUTED
11a7b2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rc, strerror (rc));
#if RTEMS_RFS_USE_LIBBLOCK
rc = fs->disk->ioctl (fs->disk, RTEMS_BLKIO_SETBLKSIZE, &size);
11a7b5: 8b 43 10 mov 0x10(%ebx),%eax
11a7b8: 52 push %edx
11a7b9: 8d 55 0c lea 0xc(%ebp),%edx
11a7bc: 52 push %edx
11a7bd: 68 04 42 04 80 push $0x80044204
11a7c2: 50 push %eax
11a7c3: ff 50 38 call *0x38(%eax)
if (rc < 0)
11a7c6: 83 c4 10 add $0x10,%esp
11a7c9: 85 c0 test %eax,%eax
11a7cb: 79 07 jns 11a7d4 <rtems_rfs_buffer_setblksize+0xd2><== ALWAYS TAKEN
rc = errno;
11a7cd: e8 fa 49 00 00 call 11f1cc <__errno> <== NOT EXECUTED
11a7d2: 8b 00 mov (%eax),%eax <== NOT EXECUTED
#endif
return rc;
}
11a7d4: 8d 65 f8 lea -0x8(%ebp),%esp
11a7d7: 5b pop %ebx
11a7d8: 5e pop %esi
11a7d9: 5d pop %ebp
11a7da: c3 ret
0011a615 <rtems_rfs_buffer_sync>:
return rc;
}
int
rtems_rfs_buffer_sync (rtems_rfs_file_system* fs)
{
11a615: 55 push %ebp
11a616: 89 e5 mov %esp,%ebp
11a618: 57 push %edi
11a619: 56 push %esi
11a61a: 53 push %ebx
11a61b: 83 ec 14 sub $0x14,%esp
11a61e: 8b 75 08 mov 0x8(%ebp),%esi
int result = 0;
#if RTEMS_RFS_USE_LIBBLOCK
rtems_status_code sc;
#endif
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
11a621: 6a 00 push $0x0
11a623: 6a 20 push $0x20
11a625: e8 72 92 ff ff call 11389c <rtems_rfs_trace>
11a62a: 83 c4 10 add $0x10,%esp
11a62d: 84 c0 test %al,%al
11a62f: 74 10 je 11a641 <rtems_rfs_buffer_sync+0x2c><== ALWAYS TAKEN
printf ("rtems-rfs: buffer-sync: syncing\n");
11a631: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11a634: 68 9b 10 13 00 push $0x13109b <== NOT EXECUTED
11a639: e8 16 5f 00 00 call 120554 <puts> <== NOT EXECUTED
11a63e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
/*
* @todo Split in the separate files for each type.
*/
#if RTEMS_RFS_USE_LIBBLOCK
sc = rtems_bdbuf_syncdev (rtems_rfs_fs_device (fs));
11a641: 83 ec 0c sub $0xc,%esp
11a644: ff 76 10 pushl 0x10(%esi)
11a647: e8 03 b0 ff ff call 11564f <rtems_bdbuf_syncdev>
11a64c: 89 c7 mov %eax,%edi
if (sc != RTEMS_SUCCESSFUL)
11a64e: 83 c4 10 add $0x10,%esp
}
int
rtems_rfs_buffer_sync (rtems_rfs_file_system* fs)
{
int result = 0;
11a651: 31 db xor %ebx,%ebx
/*
* @todo Split in the separate files for each type.
*/
#if RTEMS_RFS_USE_LIBBLOCK
sc = rtems_bdbuf_syncdev (rtems_rfs_fs_device (fs));
if (sc != RTEMS_SUCCESSFUL)
11a653: 85 c0 test %eax,%eax
11a655: 74 2d je 11a684 <rtems_rfs_buffer_sync+0x6f><== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
11a657: 50 push %eax <== NOT EXECUTED
11a658: 50 push %eax <== NOT EXECUTED
11a659: 6a 00 push $0x0 <== NOT EXECUTED
11a65b: 6a 20 push $0x20 <== NOT EXECUTED
11a65d: e8 3a 92 ff ff call 11389c <rtems_rfs_trace> <== NOT EXECUTED
11a662: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
printf ("rtems-rfs: buffer-sync: device sync failed: %s\n",
rtems_status_text (sc));
result = EIO;
11a665: b3 05 mov $0x5,%bl <== NOT EXECUTED
*/
#if RTEMS_RFS_USE_LIBBLOCK
sc = rtems_bdbuf_syncdev (rtems_rfs_fs_device (fs));
if (sc != RTEMS_SUCCESSFUL)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
11a667: 84 c0 test %al,%al <== NOT EXECUTED
11a669: 74 19 je 11a684 <rtems_rfs_buffer_sync+0x6f><== NOT EXECUTED
printf ("rtems-rfs: buffer-sync: device sync failed: %s\n",
11a66b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11a66e: 57 push %edi <== NOT EXECUTED
11a66f: e8 a8 f6 fe ff call 109d1c <rtems_status_text> <== NOT EXECUTED
11a674: 5a pop %edx <== NOT EXECUTED
11a675: 59 pop %ecx <== NOT EXECUTED
11a676: 50 push %eax <== NOT EXECUTED
11a677: 68 bb 10 13 00 push $0x1310bb <== NOT EXECUTED
11a67c: e8 bb 5c 00 00 call 12033c <printf> <== NOT EXECUTED
11a681: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_status_text (sc));
result = EIO;
}
rtems_disk_release (fs->disk);
11a684: 83 ec 0c sub $0xc,%esp
11a687: ff 76 10 pushl 0x10(%esi)
11a68a: e8 1e cd fe ff call 1073ad <rtems_disk_release>
printf ("rtems-rfs: buffer-sync: file sync failed: %d: %s\n",
result, strerror (result));
}
#endif
return result;
}
11a68f: 89 d8 mov %ebx,%eax
11a691: 8d 65 f4 lea -0xc(%ebp),%esp
11a694: 5b pop %ebx
11a695: 5e pop %esi
11a696: 5f pop %edi
11a697: 5d pop %ebp
11a698: c3 ret
0011a699 <rtems_rfs_buffers_release>:
return rrc;
}
int
rtems_rfs_buffers_release (rtems_rfs_file_system* fs)
{
11a699: 55 push %ebp
11a69a: 89 e5 mov %esp,%ebp
11a69c: 56 push %esi
11a69d: 53 push %ebx
11a69e: 8b 5d 08 mov 0x8(%ebp),%ebx
int rrc = 0;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_RELEASE))
11a6a1: 50 push %eax
11a6a2: 50 push %eax
11a6a3: 6a 00 push $0x0
11a6a5: 6a 40 push $0x40
11a6a7: e8 f0 91 ff ff call 11389c <rtems_rfs_trace>
11a6ac: 83 c4 10 add $0x10,%esp
11a6af: 84 c0 test %al,%al
11a6b1: 74 16 je 11a6c9 <rtems_rfs_buffers_release+0x30><== ALWAYS TAKEN
printf ("rtems-rfs: buffers-release: active:%" PRIu32 " "
11a6b3: ff 73 70 pushl 0x70(%ebx) <== NOT EXECUTED
11a6b6: ff 73 60 pushl 0x60(%ebx) <== NOT EXECUTED
11a6b9: ff 73 50 pushl 0x50(%ebx) <== NOT EXECUTED
11a6bc: 68 eb 10 13 00 push $0x1310eb <== NOT EXECUTED
11a6c1: e8 76 5c 00 00 call 12033c <printf> <== NOT EXECUTED
11a6c6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
"release:%" PRIu32 " release-modified:%" PRIu32 "\n",
fs->buffers_count, fs->release_count, fs->release_modified_count);
rc = rtems_rfs_release_chain (&fs->release,
11a6c9: 8d 53 60 lea 0x60(%ebx),%edx
11a6cc: 8d 43 54 lea 0x54(%ebx),%eax
11a6cf: 31 c9 xor %ecx,%ecx
11a6d1: e8 f6 f8 ff ff call 119fcc <rtems_rfs_release_chain>
11a6d6: 89 c6 mov %eax,%esi
11a6d8: f7 d0 not %eax
11a6da: c1 f8 1f sar $0x1f,%eax
11a6dd: 21 c6 and %eax,%esi
&fs->release_count,
false);
if ((rc > 0) && (rrc == 0))
rrc = rc;
rc = rtems_rfs_release_chain (&fs->release_modified,
11a6df: 8d 53 70 lea 0x70(%ebx),%edx
11a6e2: 8d 43 64 lea 0x64(%ebx),%eax
11a6e5: b9 01 00 00 00 mov $0x1,%ecx
11a6ea: e8 dd f8 ff ff call 119fcc <rtems_rfs_release_chain>
&fs->release_modified_count,
true);
if ((rc > 0) && (rrc == 0))
11a6ef: 85 f6 test %esi,%esi
11a6f1: 75 06 jne 11a6f9 <rtems_rfs_buffers_release+0x60><== NEVER TAKEN
11a6f3: 85 c0 test %eax,%eax
11a6f5: 7e 02 jle 11a6f9 <rtems_rfs_buffers_release+0x60><== ALWAYS TAKEN
11a6f7: 89 c6 mov %eax,%esi <== NOT EXECUTED
rrc = rc;
return rrc;
}
11a6f9: 89 f0 mov %esi,%eax
11a6fb: 8d 65 f8 lea -0x8(%ebp),%esp
11a6fe: 5b pop %ebx
11a6ff: 5e pop %esi
11a700: 5d pop %ebp
11a701: c3 ret
0011ad36 <rtems_rfs_dir_add_entry>:
rtems_rfs_dir_add_entry (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* dir,
const char* name,
size_t length,
rtems_rfs_ino ino)
{
11ad36: 55 push %ebp
11ad37: 89 e5 mov %esp,%ebp
11ad39: 57 push %edi
11ad3a: 56 push %esi
11ad3b: 53 push %ebx
11ad3c: 81 ec 94 00 00 00 sub $0x94,%esp
11ad42: 8b 5d 08 mov 0x8(%ebp),%ebx
rtems_rfs_block_map map;
rtems_rfs_block_pos bpos;
rtems_rfs_buffer_handle buffer;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_ADD_ENTRY))
11ad45: 6a 00 push $0x0
11ad47: 68 00 00 00 20 push $0x20000000
11ad4c: e8 4b 8b ff ff call 11389c <rtems_rfs_trace>
11ad51: 83 c4 10 add $0x10,%esp
11ad54: 84 c0 test %al,%al
11ad56: 74 42 je 11ad9a <rtems_rfs_dir_add_entry+0x64><== ALWAYS TAKEN
{
int c;
printf ("rtems-rfs: dir-add-entry: dir=%" PRId32 ", name=",
11ad58: 50 push %eax <== NOT EXECUTED
11ad59: 50 push %eax <== NOT EXECUTED
11ad5a: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
11ad5d: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED
11ad60: 68 15 15 13 00 push $0x131515 <== NOT EXECUTED
11ad65: e8 d2 55 00 00 call 12033c <printf> <== NOT EXECUTED
11ad6a: 8b 7d 10 mov 0x10(%ebp),%edi <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
return rc;
}
int
rtems_rfs_dir_add_entry (rtems_rfs_file_system* fs,
11ad6d: 8b 75 14 mov 0x14(%ebp),%esi <== NOT EXECUTED
11ad70: 01 fe add %edi,%esi <== NOT EXECUTED
11ad72: eb 0d jmp 11ad81 <rtems_rfs_dir_add_entry+0x4b><== NOT EXECUTED
{
int c;
printf ("rtems-rfs: dir-add-entry: dir=%" PRId32 ", name=",
rtems_rfs_inode_ino (dir));
for (c = 0; c < length; c++)
printf ("%c", name[c]);
11ad74: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11ad77: 0f be 07 movsbl (%edi),%eax <== NOT EXECUTED
11ad7a: 50 push %eax <== NOT EXECUTED
11ad7b: e8 28 57 00 00 call 1204a8 <putchar> <== NOT EXECUTED
11ad80: 47 inc %edi <== NOT EXECUTED
11ad81: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_ADD_ENTRY))
{
int c;
printf ("rtems-rfs: dir-add-entry: dir=%" PRId32 ", name=",
rtems_rfs_inode_ino (dir));
for (c = 0; c < length; c++)
11ad84: 39 f7 cmp %esi,%edi <== NOT EXECUTED
11ad86: 75 ec jne 11ad74 <rtems_rfs_dir_add_entry+0x3e><== NOT EXECUTED
printf ("%c", name[c]);
printf (", len=%zd\n", length);
11ad88: 50 push %eax <== NOT EXECUTED
11ad89: 50 push %eax <== NOT EXECUTED
11ad8a: ff 75 14 pushl 0x14(%ebp) <== NOT EXECUTED
11ad8d: 68 3e 15 13 00 push $0x13153e <== NOT EXECUTED
11ad92: e8 a5 55 00 00 call 12033c <printf> <== NOT EXECUTED
11ad97: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
rc = rtems_rfs_block_map_open (fs, dir, &map);
11ad9a: 50 push %eax
11ad9b: 8d 45 98 lea -0x68(%ebp),%eax
11ad9e: 50 push %eax
11ad9f: ff 75 0c pushl 0xc(%ebp)
11ada2: 53 push %ebx
11ada3: e8 fa e7 ff ff call 1195a2 <rtems_rfs_block_map_open>
11ada8: 89 c6 mov %eax,%esi
if (rc > 0)
11adaa: 83 c4 10 add $0x10,%esp
11adad: 85 c0 test %eax,%eax
11adaf: 0f 8f eb 02 00 00 jg 11b0a0 <rtems_rfs_dir_add_entry+0x36a><== NEVER TAKEN
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
11adb5: c6 45 8c 00 movb $0x0,-0x74(%ebp)
handle->bnum = 0;
11adb9: c7 45 90 00 00 00 00 movl $0x0,-0x70(%ebp)
handle->buffer = NULL;
11adc0: c7 45 94 00 00 00 00 movl $0x0,-0x6c(%ebp)
* @param bpos A pointer to the block position.
*/
static inline void
rtems_rfs_block_set_bpos_zero (rtems_rfs_block_pos* bpos)
{
bpos->bno = 0;
11adc7: c7 45 80 00 00 00 00 movl $0x0,-0x80(%ebp)
bpos->boff = 0;
11adce: c7 45 84 00 00 00 00 movl $0x0,-0x7c(%ebp)
bpos->block = 0;
11add5: c7 45 88 00 00 00 00 movl $0x0,-0x78(%ebp)
/*
* Locate the first block. If an error the block will be 0. If the map is
* empty which happens when creating a directory and adding the first entry
* the seek will return ENXIO. In this case we need to grow the directory.
*/
rc = rtems_rfs_block_map_find (fs, &map, &bpos, &block);
11addc: 8d 85 7c ff ff ff lea -0x84(%ebp),%eax
11ade2: 50 push %eax
11ade3: 8d 45 80 lea -0x80(%ebp),%eax
11ade6: 50 push %eax
11ade7: 8d 7d 98 lea -0x68(%ebp),%edi
11adea: 57 push %edi
11adeb: 53 push %ebx
11adec: e8 08 eb ff ff call 1198f9 <rtems_rfs_block_map_find>
11adf1: 89 c6 mov %eax,%esi
if (rc > 0)
11adf3: 83 c4 10 add $0x10,%esp
11adf6: 85 c0 test %eax,%eax
11adf8: 0f 8e 8b 00 00 00 jle 11ae89 <rtems_rfs_dir_add_entry+0x153>
{
if (rc != ENXIO)
11adfe: 83 f8 06 cmp $0x6,%eax
11ae01: 74 31 je 11ae34 <rtems_rfs_dir_add_entry+0xfe><== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_ADD_ENTRY))
11ae03: 50 push %eax <== NOT EXECUTED
11ae04: 50 push %eax <== NOT EXECUTED
11ae05: 6a 00 push $0x0 <== NOT EXECUTED
11ae07: 68 00 00 00 20 push $0x20000000 <== NOT EXECUTED
11ae0c: e8 8b 8a ff ff call 11389c <rtems_rfs_trace> <== NOT EXECUTED
11ae11: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11ae14: 84 c0 test %al,%al <== NOT EXECUTED
11ae16: 0f 84 6b 02 00 00 je 11b087 <rtems_rfs_dir_add_entry+0x351><== NOT EXECUTED
printf ("rtems-rfs: dir-add-entry: "
11ae1c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11ae1f: 56 push %esi <== NOT EXECUTED
11ae20: e8 9f 62 00 00 call 1210c4 <strerror> <== NOT EXECUTED
11ae25: 50 push %eax <== NOT EXECUTED
11ae26: 56 push %esi <== NOT EXECUTED
11ae27: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
11ae2a: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED
11ae2d: 68 49 15 13 00 push $0x131549 <== NOT EXECUTED
11ae32: eb 48 jmp 11ae7c <rtems_rfs_dir_add_entry+0x146><== NOT EXECUTED
}
/*
* We have reached the end of the directory so add a block.
*/
rc = rtems_rfs_block_map_grow (fs, &map, 1, &block);
11ae34: 8d 85 7c ff ff ff lea -0x84(%ebp),%eax
11ae3a: 50 push %eax
11ae3b: 6a 01 push $0x1
11ae3d: 57 push %edi
11ae3e: 53 push %ebx
11ae3f: e8 5a ec ff ff call 119a9e <rtems_rfs_block_map_grow>
11ae44: 89 c6 mov %eax,%esi
if (rc > 0)
11ae46: 83 c4 10 add $0x10,%esp
11ae49: 85 c0 test %eax,%eax
11ae4b: 7e 40 jle 11ae8d <rtems_rfs_dir_add_entry+0x157><== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_ADD_ENTRY))
11ae4d: 50 push %eax <== NOT EXECUTED
11ae4e: 50 push %eax <== NOT EXECUTED
11ae4f: 6a 00 push $0x0 <== NOT EXECUTED
11ae51: 68 00 00 00 20 push $0x20000000 <== NOT EXECUTED
11ae56: e8 41 8a ff ff call 11389c <rtems_rfs_trace> <== NOT EXECUTED
11ae5b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11ae5e: 84 c0 test %al,%al <== NOT EXECUTED
11ae60: 0f 84 21 02 00 00 je 11b087 <rtems_rfs_dir_add_entry+0x351><== NOT EXECUTED
printf ("rtems-rfs: dir-add-entry: "
11ae66: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11ae69: 56 push %esi <== NOT EXECUTED
11ae6a: e8 55 62 00 00 call 1210c4 <strerror> <== NOT EXECUTED
11ae6f: 50 push %eax <== NOT EXECUTED
11ae70: 56 push %esi <== NOT EXECUTED
11ae71: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
11ae74: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED
11ae77: 68 8e 15 13 00 push $0x13158e <== NOT EXECUTED
11ae7c: e8 bb 54 00 00 call 12033c <printf> <== NOT EXECUTED
11ae81: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
11ae84: e9 fe 01 00 00 jmp 11b087 <rtems_rfs_dir_add_entry+0x351><== NOT EXECUTED
while (true)
{
rtems_rfs_block_no block;
uint8_t* entry;
int offset;
bool read = true;
11ae89: b2 01 mov $0x1,%dl
11ae8b: eb 02 jmp 11ae8f <rtems_rfs_dir_add_entry+0x159>
"block map grow failed for ino %" PRIu32 ": %d: %s\n",
rtems_rfs_inode_ino (dir), rc, strerror (rc));
break;
}
read = false;
11ae8d: 31 d2 xor %edx,%edx
}
bpos.bno++;
11ae8f: ff 45 80 incl -0x80(%ebp)
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, read);
11ae92: 0f b6 c2 movzbl %dl,%eax
11ae95: 50 push %eax
11ae96: ff b5 7c ff ff ff pushl -0x84(%ebp)
11ae9c: 8d 45 8c lea -0x74(%ebp),%eax
11ae9f: 50 push %eax
11aea0: 53 push %ebx
11aea1: 88 95 6c ff ff ff mov %dl,-0x94(%ebp)
11aea7: e8 fe f3 ff ff call 11a2aa <rtems_rfs_buffer_handle_request>
11aeac: 89 c6 mov %eax,%esi
if (rc > 0)
11aeae: 83 c4 10 add $0x10,%esp
11aeb1: 85 c0 test %eax,%eax
11aeb3: 8a 95 6c ff ff ff mov -0x94(%ebp),%dl
11aeb9: 7e 31 jle 11aeec <rtems_rfs_dir_add_entry+0x1b6><== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_ADD_ENTRY))
11aebb: 57 push %edi <== NOT EXECUTED
11aebc: 57 push %edi <== NOT EXECUTED
11aebd: 6a 00 push $0x0 <== NOT EXECUTED
11aebf: 68 00 00 00 20 push $0x20000000 <== NOT EXECUTED
11aec4: e8 d3 89 ff ff call 11389c <rtems_rfs_trace> <== NOT EXECUTED
11aec9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11aecc: 84 c0 test %al,%al <== NOT EXECUTED
11aece: 0f 84 b3 01 00 00 je 11b087 <rtems_rfs_dir_add_entry+0x351><== NOT EXECUTED
printf ("rtems-rfs: dir-add-entry: "
11aed4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11aed7: 56 push %esi <== NOT EXECUTED
11aed8: e8 e7 61 00 00 call 1210c4 <strerror> <== NOT EXECUTED
11aedd: 50 push %eax <== NOT EXECUTED
11aede: 56 push %esi <== NOT EXECUTED
11aedf: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
11aee2: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED
11aee5: 68 d3 15 13 00 push $0x1315d3 <== NOT EXECUTED
11aeea: eb 90 jmp 11ae7c <rtems_rfs_dir_add_entry+0x146><== NOT EXECUTED
"block buffer req failed for ino %" PRIu32 ": %d: %s\n",
rtems_rfs_inode_ino (dir), rc, strerror (rc));
break;
}
entry = rtems_rfs_buffer_data (&buffer);
11aeec: 8b 45 94 mov -0x6c(%ebp),%eax
11aeef: 8b 70 1c mov 0x1c(%eax),%esi
if (!read)
11aef2: 84 d2 test %dl,%dl
11aef4: 75 09 jne 11aeff <rtems_rfs_dir_add_entry+0x1c9>
memset (entry, 0xff, rtems_rfs_fs_block_size (fs));
11aef6: 8b 4b 08 mov 0x8(%ebx),%ecx
11aef9: b0 ff mov $0xff,%al
11aefb: 89 f7 mov %esi,%edi
11aefd: f3 aa rep stos %al,%es:(%edi)
offset = 0;
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
11aeff: 8b 4b 08 mov 0x8(%ebx),%ecx
11af02: 8d 41 f6 lea -0xa(%ecx),%eax
11af05: 89 85 70 ff ff ff mov %eax,-0x90(%ebp)
entry = rtems_rfs_buffer_data (&buffer);
if (!read)
memset (entry, 0xff, rtems_rfs_fs_block_size (fs));
offset = 0;
11af0b: c7 85 74 ff ff ff 00 movl $0x0,-0x8c(%ebp)
11af12: 00 00 00
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
11af15: e9 56 01 00 00 jmp 11b070 <rtems_rfs_dir_add_entry+0x33a>
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
11af1a: 0f b6 56 08 movzbl 0x8(%esi),%edx
11af1e: c1 e2 08 shl $0x8,%edx
11af21: 0f b6 46 09 movzbl 0x9(%esi),%eax
11af25: 09 c2 or %eax,%edx
eino = rtems_rfs_dir_entry_ino (entry);
11af27: 0f b6 3e movzbl (%esi),%edi
11af2a: c1 e7 18 shl $0x18,%edi
11af2d: 0f b6 46 01 movzbl 0x1(%esi),%eax
11af31: c1 e0 10 shl $0x10,%eax
11af34: 09 c7 or %eax,%edi
11af36: 0f b6 46 03 movzbl 0x3(%esi),%eax
11af3a: 09 c7 or %eax,%edi
11af3c: 0f b6 46 02 movzbl 0x2(%esi),%eax
11af40: c1 e0 08 shl $0x8,%eax
11af43: 09 c7 or %eax,%edi
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
11af45: 81 fa ff ff 00 00 cmp $0xffff,%edx
11af4b: 0f 85 a5 00 00 00 jne 11aff6 <rtems_rfs_dir_add_entry+0x2c0>
{
if ((length + RTEMS_RFS_DIR_ENTRY_SIZE) <
11af51: 8b 45 14 mov 0x14(%ebp),%eax
11af54: 83 c0 0a add $0xa,%eax
(rtems_rfs_fs_block_size (fs) - offset))
11af57: 89 ca mov %ecx,%edx
11af59: 2b 95 74 ff ff ff sub -0x8c(%ebp),%edx
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
{
if ((length + RTEMS_RFS_DIR_ENTRY_SIZE) <
11af5f: 39 d0 cmp %edx,%eax
11af61: 0f 83 75 fe ff ff jae 11addc <rtems_rfs_dir_add_entry+0xa6><== NEVER TAKEN
(rtems_rfs_fs_block_size (fs) - offset))
{
uint32_t hash;
hash = rtems_rfs_dir_hash (name, length);
11af67: 52 push %edx
11af68: 52 push %edx
11af69: ff 75 14 pushl 0x14(%ebp)
11af6c: ff 75 10 pushl 0x10(%ebp)
11af6f: e8 b4 3d 00 00 call 11ed28 <rtems_rfs_dir_hash>
rtems_rfs_dir_set_entry_hash (entry, hash);
11af74: 89 c2 mov %eax,%edx
11af76: c1 ea 18 shr $0x18,%edx
11af79: 88 56 04 mov %dl,0x4(%esi)
11af7c: 89 c2 mov %eax,%edx
11af7e: c1 ea 10 shr $0x10,%edx
11af81: 88 56 05 mov %dl,0x5(%esi)
11af84: 89 c2 mov %eax,%edx
11af86: c1 ea 08 shr $0x8,%edx
11af89: 88 56 06 mov %dl,0x6(%esi)
11af8c: 88 46 07 mov %al,0x7(%esi)
rtems_rfs_dir_set_entry_ino (entry, ino);
11af8f: 8b 45 18 mov 0x18(%ebp),%eax
11af92: c1 e8 18 shr $0x18,%eax
11af95: 88 06 mov %al,(%esi)
11af97: 8b 45 18 mov 0x18(%ebp),%eax
11af9a: c1 e8 10 shr $0x10,%eax
11af9d: 88 46 01 mov %al,0x1(%esi)
11afa0: 8b 45 18 mov 0x18(%ebp),%eax
11afa3: c1 e8 08 shr $0x8,%eax
11afa6: 88 46 02 mov %al,0x2(%esi)
11afa9: 8a 45 18 mov 0x18(%ebp),%al
11afac: 88 46 03 mov %al,0x3(%esi)
rtems_rfs_dir_set_entry_length (entry,
11afaf: 8b 45 14 mov 0x14(%ebp),%eax
11afb2: 83 c0 0a add $0xa,%eax
11afb5: 66 c1 e8 08 shr $0x8,%ax
11afb9: 88 46 08 mov %al,0x8(%esi)
11afbc: 8a 45 14 mov 0x14(%ebp),%al
11afbf: 83 c0 0a add $0xa,%eax
11afc2: 88 46 09 mov %al,0x9(%esi)
RTEMS_RFS_DIR_ENTRY_SIZE + length);
memcpy (entry + RTEMS_RFS_DIR_ENTRY_SIZE, name, length);
11afc5: 8d 46 0a lea 0xa(%esi),%eax
11afc8: 89 c7 mov %eax,%edi
11afca: 8b 75 10 mov 0x10(%ebp),%esi
11afcd: 8b 4d 14 mov 0x14(%ebp),%ecx
11afd0: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
rtems_rfs_buffer_mark_dirty (&buffer);
11afd2: c6 45 8c 01 movb $0x1,-0x74(%ebp)
rtems_rfs_buffer_handle_close (fs, &buffer);
11afd6: 8d 55 8c lea -0x74(%ebp),%edx
11afd9: 89 d8 mov %ebx,%eax
11afdb: e8 b8 f8 ff ff call 11a898 <rtems_rfs_buffer_handle_close>
rtems_rfs_block_map_close (fs, &map);
11afe0: 59 pop %ecx
11afe1: 5e pop %esi
11afe2: 8d 45 98 lea -0x68(%ebp),%eax
11afe5: 50 push %eax
11afe6: 53 push %ebx
11afe7: e8 5d e7 ff ff call 119749 <rtems_rfs_block_map_close>
11afec: 83 c4 10 add $0x10,%esp
return 0;
11afef: 31 f6 xor %esi,%esi
11aff1: e9 aa 00 00 00 jmp 11b0a0 <rtems_rfs_dir_add_entry+0x36a>
}
break;
}
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
11aff6: 83 fa 0a cmp $0xa,%edx
11aff9: 7e 0e jle 11b009 <rtems_rfs_dir_add_entry+0x2d3><== NEVER TAKEN
11affb: 3b 53 1c cmp 0x1c(%ebx),%edx
11affe: 73 09 jae 11b009 <rtems_rfs_dir_add_entry+0x2d3><== NEVER TAKEN
11b000: 85 ff test %edi,%edi
11b002: 74 05 je 11b009 <rtems_rfs_dir_add_entry+0x2d3><== NEVER TAKEN
11b004: 3b 7b 14 cmp 0x14(%ebx),%edi
11b007: 76 5f jbe 11b068 <rtems_rfs_dir_add_entry+0x332><== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_ADD_ENTRY))
11b009: 50 push %eax <== NOT EXECUTED
11b00a: 50 push %eax <== NOT EXECUTED
11b00b: 6a 00 push $0x0 <== NOT EXECUTED
11b00d: 68 00 00 00 20 push $0x20000000 <== NOT EXECUTED
11b012: 89 95 6c ff ff ff mov %edx,-0x94(%ebp) <== NOT EXECUTED
11b018: e8 7f 88 ff ff call 11389c <rtems_rfs_trace> <== NOT EXECUTED
11b01d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11b020: 84 c0 test %al,%al <== NOT EXECUTED
11b022: 8b 95 6c ff ff ff mov -0x94(%ebp),%edx <== NOT EXECUTED
11b028: 74 1e je 11b048 <rtems_rfs_dir_add_entry+0x312><== NOT EXECUTED
printf ("rtems-rfs: dir-add-entry: "
11b02a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11b02d: ff b5 74 ff ff ff pushl -0x8c(%ebp) <== NOT EXECUTED
11b033: 57 push %edi <== NOT EXECUTED
11b034: 52 push %edx <== NOT EXECUTED
11b035: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
11b038: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED
11b03b: 68 1a 16 13 00 push $0x13161a <== NOT EXECUTED
11b040: e8 f7 52 00 00 call 12033c <printf> <== NOT EXECUTED
11b045: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
"bad length or ino for ino %" PRIu32 ": %u/%" PRId32 " @ %04x\n",
rtems_rfs_inode_ino (dir), elength, eino, offset);
rtems_rfs_buffer_handle_close (fs, &buffer);
11b048: 8d 55 8c lea -0x74(%ebp),%edx <== NOT EXECUTED
11b04b: 89 d8 mov %ebx,%eax <== NOT EXECUTED
11b04d: e8 46 f8 ff ff call 11a898 <rtems_rfs_buffer_handle_close><== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
11b052: 50 push %eax <== NOT EXECUTED
11b053: 50 push %eax <== NOT EXECUTED
11b054: 8d 45 98 lea -0x68(%ebp),%eax <== NOT EXECUTED
11b057: 50 push %eax <== NOT EXECUTED
11b058: 53 push %ebx <== NOT EXECUTED
11b059: e8 eb e6 ff ff call 119749 <rtems_rfs_block_map_close><== NOT EXECUTED
11b05e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
return EIO;
11b061: be 05 00 00 00 mov $0x5,%esi <== NOT EXECUTED
11b066: eb 38 jmp 11b0a0 <rtems_rfs_dir_add_entry+0x36a><== NOT EXECUTED
}
entry += elength;
11b068: 01 d6 add %edx,%esi
offset += elength;
11b06a: 01 95 74 ff ff ff add %edx,-0x8c(%ebp)
if (!read)
memset (entry, 0xff, rtems_rfs_fs_block_size (fs));
offset = 0;
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
11b070: 8b 85 70 ff ff ff mov -0x90(%ebp),%eax
11b076: 39 85 74 ff ff ff cmp %eax,-0x8c(%ebp)
11b07c: 0f 82 98 fe ff ff jb 11af1a <rtems_rfs_dir_add_entry+0x1e4><== ALWAYS TAKEN
11b082: e9 55 fd ff ff jmp 11addc <rtems_rfs_dir_add_entry+0xa6><== NOT EXECUTED
entry += elength;
offset += elength;
}
}
rtems_rfs_buffer_handle_close (fs, &buffer);
11b087: 8d 55 8c lea -0x74(%ebp),%edx <== NOT EXECUTED
11b08a: 89 d8 mov %ebx,%eax <== NOT EXECUTED
11b08c: e8 07 f8 ff ff call 11a898 <rtems_rfs_buffer_handle_close><== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
11b091: 50 push %eax <== NOT EXECUTED
11b092: 50 push %eax <== NOT EXECUTED
11b093: 8d 45 98 lea -0x68(%ebp),%eax <== NOT EXECUTED
11b096: 50 push %eax <== NOT EXECUTED
11b097: 53 push %ebx <== NOT EXECUTED
11b098: e8 ac e6 ff ff call 119749 <rtems_rfs_block_map_close><== NOT EXECUTED
11b09d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
return rc;
}
11b0a0: 89 f0 mov %esi,%eax
11b0a2: 8d 65 f4 lea -0xc(%ebp),%esp
11b0a5: 5b pop %ebx
11b0a6: 5e pop %esi
11b0a7: 5f pop %edi
11b0a8: 5d pop %ebp
11b0a9: c3 ret
0011b0aa <rtems_rfs_dir_del_entry>:
int
rtems_rfs_dir_del_entry (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* dir,
rtems_rfs_ino ino,
uint32_t offset)
{
11b0aa: 55 push %ebp
11b0ab: 89 e5 mov %esp,%ebp
11b0ad: 57 push %edi
11b0ae: 56 push %esi
11b0af: 53 push %ebx
11b0b0: 81 ec 94 00 00 00 sub $0x94,%esp
rtems_rfs_block_no block;
rtems_rfs_buffer_handle buffer;
bool search;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
11b0b6: 6a 00 push $0x0
11b0b8: 68 00 00 00 40 push $0x40000000
11b0bd: e8 da 87 ff ff call 11389c <rtems_rfs_trace>
11b0c2: 83 c4 10 add $0x10,%esp
11b0c5: 84 c0 test %al,%al
11b0c7: 74 19 je 11b0e2 <rtems_rfs_dir_del_entry+0x38><== ALWAYS TAKEN
printf ("rtems-rfs: dir-del-entry: dir=%" PRId32 ", entry=%" PRId32 " offset=%" PRIu32 "\n",
11b0c9: ff 75 14 pushl 0x14(%ebp) <== NOT EXECUTED
11b0cc: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED
11b0cf: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
11b0d2: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED
11b0d5: 68 62 16 13 00 push $0x131662 <== NOT EXECUTED
11b0da: e8 5d 52 00 00 call 12033c <printf> <== NOT EXECUTED
11b0df: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_rfs_inode_ino (dir), ino, offset);
rc = rtems_rfs_block_map_open (fs, dir, &map);
11b0e2: 50 push %eax
11b0e3: 8d 7d 98 lea -0x68(%ebp),%edi
11b0e6: 57 push %edi
11b0e7: ff 75 0c pushl 0xc(%ebp)
11b0ea: ff 75 08 pushl 0x8(%ebp)
11b0ed: e8 b0 e4 ff ff call 1195a2 <rtems_rfs_block_map_open>
11b0f2: 89 c3 mov %eax,%ebx
if (rc > 0)
11b0f4: 83 c4 10 add $0x10,%esp
11b0f7: 85 c0 test %eax,%eax
11b0f9: 0f 8f 19 03 00 00 jg 11b418 <rtems_rfs_dir_del_entry+0x36e><== NEVER TAKEN
return rc;
rc = rtems_rfs_block_map_seek (fs, &map, offset, &block);
11b0ff: 83 ec 0c sub $0xc,%esp
11b102: 8d 75 88 lea -0x78(%ebp),%esi
11b105: 56 push %esi
11b106: 8b 45 14 mov 0x14(%ebp),%eax
11b109: 31 d2 xor %edx,%edx
11b10b: 52 push %edx
11b10c: 50 push %eax
11b10d: 57 push %edi
11b10e: ff 75 08 pushl 0x8(%ebp)
11b111: e8 ee e8 ff ff call 119a04 <rtems_rfs_block_map_seek>
11b116: 89 c3 mov %eax,%ebx
if (rc > 0)
11b118: 83 c4 20 add $0x20,%esp
11b11b: 85 c0 test %eax,%eax
11b11d: 7e 10 jle 11b12f <rtems_rfs_dir_del_entry+0x85><== ALWAYS TAKEN
{
if (rc == ENXIO)
11b11f: 83 f8 06 cmp $0x6,%eax <== NOT EXECUTED
11b122: 0f 85 6d 02 00 00 jne 11b395 <rtems_rfs_dir_del_entry+0x2eb><== NOT EXECUTED
rc = ENOENT;
11b128: b3 02 mov $0x2,%bl <== NOT EXECUTED
11b12a: e9 66 02 00 00 jmp 11b395 <rtems_rfs_dir_del_entry+0x2eb><== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
11b12f: c6 45 8c 00 movb $0x0,-0x74(%ebp)
handle->bnum = 0;
11b133: c7 45 90 00 00 00 00 movl $0x0,-0x70(%ebp)
handle->buffer = NULL;
11b13a: c7 45 94 00 00 00 00 movl $0x0,-0x6c(%ebp)
}
/*
* Only search if the offset is 0 else we are at that position.
*/
search = offset ? false : true;
11b141: 83 7d 14 00 cmpl $0x0,0x14(%ebp)
11b145: 0f 94 45 83 sete -0x7d(%ebp)
rc = ENOENT;
rtems_rfs_block_map_close (fs, &map);
return rc;
}
rc = rtems_rfs_buffer_handle_open (fs, &buffer);
11b149: 31 db xor %ebx,%ebx
/*
* Only search if the offset is 0 else we are at that position.
*/
search = offset ? false : true;
while (rc == 0)
11b14b: e9 97 02 00 00 jmp 11b3e7 <rtems_rfs_dir_del_entry+0x33d>
{
uint8_t* entry;
int eoffset;
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
11b150: 6a 01 push $0x1
11b152: ff 75 88 pushl -0x78(%ebp)
11b155: 8d 55 8c lea -0x74(%ebp),%edx
11b158: 52 push %edx
11b159: ff 75 08 pushl 0x8(%ebp)
11b15c: e8 49 f1 ff ff call 11a2aa <rtems_rfs_buffer_handle_request>
11b161: 89 c7 mov %eax,%edi
if (rc > 0)
11b163: 83 c4 10 add $0x10,%esp
11b166: 85 c0 test %eax,%eax
11b168: 7e 3c jle 11b1a6 <rtems_rfs_dir_del_entry+0xfc><== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
11b16a: 50 push %eax <== NOT EXECUTED
11b16b: 50 push %eax <== NOT EXECUTED
11b16c: 6a 00 push $0x0 <== NOT EXECUTED
11b16e: 68 00 00 00 40 push $0x40000000 <== NOT EXECUTED
11b173: e8 24 87 ff ff call 11389c <rtems_rfs_trace> <== NOT EXECUTED
11b178: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11b17b: 84 c0 test %al,%al <== NOT EXECUTED
11b17d: 0f 84 6e 02 00 00 je 11b3f1 <rtems_rfs_dir_del_entry+0x347><== NOT EXECUTED
printf ("rtems-rfs: dir-del-entry: "
11b183: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11b186: 57 push %edi <== NOT EXECUTED
11b187: e8 38 5f 00 00 call 1210c4 <strerror> <== NOT EXECUTED
11b18c: 50 push %eax <== NOT EXECUTED
11b18d: 57 push %edi <== NOT EXECUTED
11b18e: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED
11b191: ff 71 08 pushl 0x8(%ecx) <== NOT EXECUTED
11b194: 68 9b 16 13 00 push $0x13169b <== NOT EXECUTED
11b199: e8 9e 51 00 00 call 12033c <printf> <== NOT EXECUTED
11b19e: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
11b1a1: e9 4b 02 00 00 jmp 11b3f1 <rtems_rfs_dir_del_entry+0x347><== NOT EXECUTED
/*
* If we are searching start at the beginning of the block. If not searching
* skip to the offset in the block.
*/
if (search)
eoffset = 0;
11b1a6: c7 45 84 00 00 00 00 movl $0x0,-0x7c(%ebp)
/*
* If we are searching start at the beginning of the block. If not searching
* skip to the offset in the block.
*/
if (search)
11b1ad: 80 7d 83 00 cmpb $0x0,-0x7d(%ebp)
11b1b1: 75 0e jne 11b1c1 <rtems_rfs_dir_del_entry+0x117><== NEVER TAKEN
eoffset = 0;
else
eoffset = offset % rtems_rfs_fs_block_size (fs);
11b1b3: 8b 45 14 mov 0x14(%ebp),%eax
11b1b6: 8b 4d 08 mov 0x8(%ebp),%ecx
11b1b9: 31 d2 xor %edx,%edx
11b1bb: f7 71 08 divl 0x8(%ecx)
11b1be: 89 55 84 mov %edx,-0x7c(%ebp)
entry = rtems_rfs_buffer_data (&buffer) + eoffset;
11b1c1: 8b 45 94 mov -0x6c(%ebp),%eax
11b1c4: 8b 75 84 mov -0x7c(%ebp),%esi
11b1c7: 03 70 1c add 0x1c(%eax),%esi
while (eoffset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
11b1ca: 8b 45 08 mov 0x8(%ebp),%eax
11b1cd: 8b 40 08 mov 0x8(%eax),%eax
11b1d0: 89 85 7c ff ff ff mov %eax,-0x84(%ebp)
11b1d6: 83 e8 0a sub $0xa,%eax
11b1d9: 89 85 78 ff ff ff mov %eax,-0x88(%ebp)
11b1df: e9 cf 01 00 00 jmp 11b3b3 <rtems_rfs_dir_del_entry+0x309>
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
11b1e4: 0f b6 4e 08 movzbl 0x8(%esi),%ecx
11b1e8: c1 e1 08 shl $0x8,%ecx
11b1eb: 0f b6 46 09 movzbl 0x9(%esi),%eax
11b1ef: 09 c1 or %eax,%ecx
eino = rtems_rfs_dir_entry_ino (entry);
11b1f1: 0f b6 16 movzbl (%esi),%edx
11b1f4: c1 e2 18 shl $0x18,%edx
11b1f7: 0f b6 46 01 movzbl 0x1(%esi),%eax
11b1fb: c1 e0 10 shl $0x10,%eax
11b1fe: 09 c2 or %eax,%edx
11b200: 0f b6 46 03 movzbl 0x3(%esi),%eax
11b204: 09 c2 or %eax,%edx
11b206: 0f b6 46 02 movzbl 0x2(%esi),%eax
11b20a: c1 e0 08 shl $0x8,%eax
11b20d: 09 c2 or %eax,%edx
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
11b20f: 81 f9 ff ff 00 00 cmp $0xffff,%ecx
11b215: 0f 84 a7 01 00 00 je 11b3c2 <rtems_rfs_dir_del_entry+0x318><== NEVER TAKEN
break;
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
11b21b: 83 f9 0a cmp $0xa,%ecx
11b21e: 7e 11 jle 11b231 <rtems_rfs_dir_del_entry+0x187><== NEVER TAKEN
11b220: 8b 45 08 mov 0x8(%ebp),%eax
11b223: 3b 48 1c cmp 0x1c(%eax),%ecx
11b226: 73 09 jae 11b231 <rtems_rfs_dir_del_entry+0x187><== NEVER TAKEN
11b228: 85 d2 test %edx,%edx
11b22a: 74 05 je 11b231 <rtems_rfs_dir_del_entry+0x187><== NEVER TAKEN
11b22c: 3b 50 14 cmp 0x14(%eax),%edx
11b22f: 76 53 jbe 11b284 <rtems_rfs_dir_del_entry+0x1da><== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
11b231: 56 push %esi <== NOT EXECUTED
11b232: 56 push %esi <== NOT EXECUTED
11b233: 6a 00 push $0x0 <== NOT EXECUTED
11b235: 68 00 00 00 40 push $0x40000000 <== NOT EXECUTED
11b23a: 89 95 70 ff ff ff mov %edx,-0x90(%ebp) <== NOT EXECUTED
11b240: 89 8d 74 ff ff ff mov %ecx,-0x8c(%ebp) <== NOT EXECUTED
11b246: e8 51 86 ff ff call 11389c <rtems_rfs_trace> <== NOT EXECUTED
11b24b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11b24e: 84 c0 test %al,%al <== NOT EXECUTED
11b250: 8b 95 70 ff ff ff mov -0x90(%ebp),%edx <== NOT EXECUTED
11b256: 8b 8d 74 ff ff ff mov -0x8c(%ebp),%ecx <== NOT EXECUTED
11b25c: 0f 84 af 01 00 00 je 11b411 <rtems_rfs_dir_del_entry+0x367><== NOT EXECUTED
printf ("rtems-rfs: dir-del-entry: "
11b262: 53 push %ebx <== NOT EXECUTED
11b263: 53 push %ebx <== NOT EXECUTED
11b264: ff 75 84 pushl -0x7c(%ebp) <== NOT EXECUTED
11b267: ff 75 88 pushl -0x78(%ebp) <== NOT EXECUTED
11b26a: 52 push %edx <== NOT EXECUTED
11b26b: 51 push %ecx <== NOT EXECUTED
11b26c: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
11b26f: ff 72 08 pushl 0x8(%edx) <== NOT EXECUTED
11b272: 68 e2 16 13 00 push $0x1316e2 <== NOT EXECUTED
11b277: e8 c0 50 00 00 call 12033c <printf> <== NOT EXECUTED
11b27c: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
11b27f: e9 8d 01 00 00 jmp 11b411 <rtems_rfs_dir_del_entry+0x367><== NOT EXECUTED
rtems_rfs_inode_ino (dir), elength, eino, block, eoffset);
rc = EIO;
break;
}
if (ino == rtems_rfs_dir_entry_ino (entry))
11b284: 39 55 10 cmp %edx,0x10(%ebp)
11b287: 0f 85 1b 01 00 00 jne 11b3a8 <rtems_rfs_dir_del_entry+0x2fe><== NEVER TAKEN
{
uint32_t remaining;
remaining = rtems_rfs_fs_block_size (fs) - (eoffset + elength);
11b28d: 8b 45 84 mov -0x7c(%ebp),%eax
11b290: 01 c8 add %ecx,%eax
11b292: 8b bd 7c ff ff ff mov -0x84(%ebp),%edi
11b298: 29 c7 sub %eax,%edi
memmove (entry, entry + elength, remaining);
11b29a: 50 push %eax
11b29b: 57 push %edi
11b29c: 8d 04 0e lea (%esi,%ecx,1),%eax
11b29f: 50 push %eax
11b2a0: 56 push %esi
11b2a1: 89 8d 74 ff ff ff mov %ecx,-0x8c(%ebp)
11b2a7: e8 b4 4e 00 00 call 120160 <memmove>
memset (entry + remaining, 0xff, elength);
11b2ac: 8d 14 3e lea (%esi,%edi,1),%edx
11b2af: b0 ff mov $0xff,%al
11b2b1: 8b 8d 74 ff ff ff mov -0x8c(%ebp),%ecx
11b2b7: 89 d7 mov %edx,%edi
11b2b9: f3 aa rep stos %al,%es:(%edi)
* block and it is the last block in the map shrink the map.
*
* @note We could check again to see if the new end block in the map is
* also empty. This way we could clean up an empty directory.
*/
elength = rtems_rfs_dir_entry_length (entry);
11b2bb: 0f b6 7e 08 movzbl 0x8(%esi),%edi
11b2bf: c1 e7 08 shl $0x8,%edi
11b2c2: 0f b6 46 09 movzbl 0x9(%esi),%eax
11b2c6: 09 c7 or %eax,%edi
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
11b2c8: 58 pop %eax
11b2c9: 5a pop %edx
11b2ca: 6a 00 push $0x0
11b2cc: 68 00 00 00 40 push $0x40000000
11b2d1: e8 c6 85 ff ff call 11389c <rtems_rfs_trace>
11b2d6: 83 c4 10 add $0x10,%esp
11b2d9: 84 c0 test %al,%al
11b2db: 74 3b je 11b318 <rtems_rfs_dir_del_entry+0x26e><== ALWAYS TAKEN
printf ("rtems-rfs: dir-del-entry: "
"last block free for ino %" PRIu32 ": elength=%i block=%" PRIu32
" offset=%d last=%s\n",
ino, elength, block, eoffset,
rtems_rfs_block_map_last (&map) ? "yes" : "no");
11b2dd: 8b 45 a8 mov -0x58(%ebp),%eax <== NOT EXECUTED
* also empty. This way we could clean up an empty directory.
*/
elength = rtems_rfs_dir_entry_length (entry);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
printf ("rtems-rfs: dir-del-entry: "
11b2e0: 85 c0 test %eax,%eax <== NOT EXECUTED
11b2e2: 75 0d jne 11b2f1 <rtems_rfs_dir_del_entry+0x247><== NOT EXECUTED
"last block free for ino %" PRIu32 ": elength=%i block=%" PRIu32
" offset=%d last=%s\n",
ino, elength, block, eoffset,
rtems_rfs_block_map_last (&map) ? "yes" : "no");
11b2e4: 83 7d a0 00 cmpl $0x0,-0x60(%ebp) <== NOT EXECUTED
11b2e8: 75 07 jne 11b2f1 <rtems_rfs_dir_del_entry+0x247><== NOT EXECUTED
* also empty. This way we could clean up an empty directory.
*/
elength = rtems_rfs_dir_entry_length (entry);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
printf ("rtems-rfs: dir-del-entry: "
11b2ea: b8 3c de 12 00 mov $0x12de3c,%eax <== NOT EXECUTED
11b2ef: eb 0d jmp 11b2fe <rtems_rfs_dir_del_entry+0x254><== NOT EXECUTED
"last block free for ino %" PRIu32 ": elength=%i block=%" PRIu32
" offset=%d last=%s\n",
ino, elength, block, eoffset,
rtems_rfs_block_map_last (&map) ? "yes" : "no");
11b2f1: 8b 55 a0 mov -0x60(%ebp),%edx <== NOT EXECUTED
11b2f4: 4a dec %edx <== NOT EXECUTED
11b2f5: 39 d0 cmp %edx,%eax <== NOT EXECUTED
11b2f7: 74 f1 je 11b2ea <rtems_rfs_dir_del_entry+0x240><== NOT EXECUTED
* also empty. This way we could clean up an empty directory.
*/
elength = rtems_rfs_dir_entry_length (entry);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
printf ("rtems-rfs: dir-del-entry: "
11b2f9: b8 8f 07 13 00 mov $0x13078f,%eax <== NOT EXECUTED
11b2fe: 52 push %edx <== NOT EXECUTED
11b2ff: 52 push %edx <== NOT EXECUTED
11b300: 50 push %eax <== NOT EXECUTED
11b301: ff 75 84 pushl -0x7c(%ebp) <== NOT EXECUTED
11b304: ff 75 88 pushl -0x78(%ebp) <== NOT EXECUTED
11b307: 57 push %edi <== NOT EXECUTED
11b308: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED
11b30b: 68 2e 17 13 00 push $0x13172e <== NOT EXECUTED
11b310: e8 27 50 00 00 call 12033c <printf> <== NOT EXECUTED
11b315: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
"last block free for ino %" PRIu32 ": elength=%i block=%" PRIu32
" offset=%d last=%s\n",
ino, elength, block, eoffset,
rtems_rfs_block_map_last (&map) ? "yes" : "no");
if ((elength == RTEMS_RFS_DIR_ENTRY_EMPTY) &&
11b318: 81 ff ff ff 00 00 cmp $0xffff,%edi
11b31e: 75 66 jne 11b386 <rtems_rfs_dir_del_entry+0x2dc>
11b320: 83 7d 84 00 cmpl $0x0,-0x7c(%ebp)
11b324: 75 60 jne 11b386 <rtems_rfs_dir_del_entry+0x2dc><== ALWAYS TAKEN
(eoffset == 0) && rtems_rfs_block_map_last (&map))
11b326: 8b 45 a8 mov -0x58(%ebp),%eax <== NOT EXECUTED
11b329: 85 c0 test %eax,%eax <== NOT EXECUTED
11b32b: 75 06 jne 11b333 <rtems_rfs_dir_del_entry+0x289><== NOT EXECUTED
11b32d: 83 7d a0 00 cmpl $0x0,-0x60(%ebp) <== NOT EXECUTED
11b331: 74 08 je 11b33b <rtems_rfs_dir_del_entry+0x291><== NOT EXECUTED
11b333: 8b 55 a0 mov -0x60(%ebp),%edx <== NOT EXECUTED
11b336: 4a dec %edx <== NOT EXECUTED
11b337: 39 d0 cmp %edx,%eax <== NOT EXECUTED
11b339: 75 4b jne 11b386 <rtems_rfs_dir_del_entry+0x2dc><== NOT EXECUTED
{
rc = rtems_rfs_block_map_shrink (fs, &map, 1);
11b33b: 50 push %eax <== NOT EXECUTED
11b33c: 6a 01 push $0x1 <== NOT EXECUTED
11b33e: 8d 45 98 lea -0x68(%ebp),%eax <== NOT EXECUTED
11b341: 50 push %eax <== NOT EXECUTED
11b342: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
11b345: e8 07 ea ff ff call 119d51 <rtems_rfs_block_map_shrink><== NOT EXECUTED
11b34a: 89 c6 mov %eax,%esi <== NOT EXECUTED
if (rc > 0)
11b34c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11b34f: 85 c0 test %eax,%eax <== NOT EXECUTED
11b351: 7e 33 jle 11b386 <rtems_rfs_dir_del_entry+0x2dc><== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
11b353: 57 push %edi <== NOT EXECUTED
11b354: 57 push %edi <== NOT EXECUTED
11b355: 6a 00 push $0x0 <== NOT EXECUTED
11b357: 68 00 00 00 40 push $0x40000000 <== NOT EXECUTED
11b35c: e8 3b 85 ff ff call 11389c <rtems_rfs_trace> <== NOT EXECUTED
11b361: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11b364: 84 c0 test %al,%al <== NOT EXECUTED
11b366: 74 1e je 11b386 <rtems_rfs_dir_del_entry+0x2dc><== NOT EXECUTED
printf ("rtems-rfs: dir-del-entry: "
11b368: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11b36b: 56 push %esi <== NOT EXECUTED
11b36c: e8 53 5d 00 00 call 1210c4 <strerror> <== NOT EXECUTED
11b371: 50 push %eax <== NOT EXECUTED
11b372: 56 push %esi <== NOT EXECUTED
11b373: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED
11b376: ff 71 08 pushl 0x8(%ecx) <== NOT EXECUTED
11b379: 68 8d 17 13 00 push $0x13178d <== NOT EXECUTED
11b37e: e8 b9 4f 00 00 call 12033c <printf> <== NOT EXECUTED
11b383: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
"block map shrink failed for ino %" PRIu32 ": %d: %s\n",
rtems_rfs_inode_ino (dir), rc, strerror (rc));
}
}
rtems_rfs_buffer_mark_dirty (&buffer);
11b386: c6 45 8c 01 movb $0x1,-0x74(%ebp)
rtems_rfs_buffer_handle_close (fs, &buffer);
11b38a: 8d 55 8c lea -0x74(%ebp),%edx
11b38d: 8b 45 08 mov 0x8(%ebp),%eax
11b390: e8 03 f5 ff ff call 11a898 <rtems_rfs_buffer_handle_close>
rtems_rfs_block_map_close (fs, &map);
11b395: 51 push %ecx
11b396: 51 push %ecx
11b397: 8d 45 98 lea -0x68(%ebp),%eax
11b39a: 50 push %eax
11b39b: ff 75 08 pushl 0x8(%ebp)
11b39e: e8 a6 e3 ff ff call 119749 <rtems_rfs_block_map_close>
11b3a3: 83 c4 10 add $0x10,%esp
11b3a6: eb 70 jmp 11b418 <rtems_rfs_dir_del_entry+0x36e>
return 0;
}
if (!search)
11b3a8: 80 7d 83 00 cmpb $0x0,-0x7d(%ebp) <== NOT EXECUTED
11b3ac: 74 63 je 11b411 <rtems_rfs_dir_del_entry+0x367><== NOT EXECUTED
{
rc = EIO;
break;
}
entry += elength;
11b3ae: 01 ce add %ecx,%esi <== NOT EXECUTED
eoffset += elength;
11b3b0: 01 4d 84 add %ecx,-0x7c(%ebp) <== NOT EXECUTED
else
eoffset = offset % rtems_rfs_fs_block_size (fs);
entry = rtems_rfs_buffer_data (&buffer) + eoffset;
while (eoffset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
11b3b3: 8b 85 78 ff ff ff mov -0x88(%ebp),%eax
11b3b9: 39 45 84 cmp %eax,-0x7c(%ebp)
11b3bc: 0f 82 22 fe ff ff jb 11b1e4 <rtems_rfs_dir_del_entry+0x13a><== ALWAYS TAKEN
entry += elength;
eoffset += elength;
}
if (rc == 0)
11b3c2: 85 ff test %edi,%edi <== NOT EXECUTED
11b3c4: 75 1f jne 11b3e5 <rtems_rfs_dir_del_entry+0x33b><== NOT EXECUTED
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
11b3c6: 52 push %edx <== NOT EXECUTED
11b3c7: 8d 55 88 lea -0x78(%ebp),%edx <== NOT EXECUTED
11b3ca: 52 push %edx <== NOT EXECUTED
11b3cb: 8d 45 98 lea -0x68(%ebp),%eax <== NOT EXECUTED
11b3ce: 50 push %eax <== NOT EXECUTED
11b3cf: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
11b3d2: e8 97 e6 ff ff call 119a6e <rtems_rfs_block_map_next_block><== NOT EXECUTED
11b3d7: 89 c3 mov %eax,%ebx <== NOT EXECUTED
if (rc == ENXIO)
11b3d9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11b3dc: 83 f8 06 cmp $0x6,%eax <== NOT EXECUTED
11b3df: 75 06 jne 11b3e7 <rtems_rfs_dir_del_entry+0x33d><== NOT EXECUTED
rc = ENOENT;
11b3e1: b3 02 mov $0x2,%bl <== NOT EXECUTED
11b3e3: eb 0a jmp 11b3ef <rtems_rfs_dir_del_entry+0x345><== NOT EXECUTED
rc = ENOENT;
rtems_rfs_block_map_close (fs, &map);
return rc;
}
rc = rtems_rfs_buffer_handle_open (fs, &buffer);
11b3e5: 89 fb mov %edi,%ebx <== NOT EXECUTED
/*
* Only search if the offset is 0 else we are at that position.
*/
search = offset ? false : true;
while (rc == 0)
11b3e7: 85 db test %ebx,%ebx
11b3e9: 0f 84 61 fd ff ff je 11b150 <rtems_rfs_dir_del_entry+0xa6><== ALWAYS TAKEN
11b3ef: 89 df mov %ebx,%edi <== NOT EXECUTED
if (rc == ENXIO)
rc = ENOENT;
}
}
rtems_rfs_buffer_handle_close (fs, &buffer);
11b3f1: 8d 55 8c lea -0x74(%ebp),%edx <== NOT EXECUTED
11b3f4: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
11b3f7: e8 9c f4 ff ff call 11a898 <rtems_rfs_buffer_handle_close><== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
11b3fc: 50 push %eax <== NOT EXECUTED
11b3fd: 50 push %eax <== NOT EXECUTED
11b3fe: 8d 45 98 lea -0x68(%ebp),%eax <== NOT EXECUTED
11b401: 50 push %eax <== NOT EXECUTED
11b402: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
11b405: e8 3f e3 ff ff call 119749 <rtems_rfs_block_map_close><== NOT EXECUTED
11b40a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
return rc;
11b40d: 89 fb mov %edi,%ebx <== NOT EXECUTED
11b40f: eb 07 jmp 11b418 <rtems_rfs_dir_del_entry+0x36e><== NOT EXECUTED
rc = ENOENT;
rtems_rfs_block_map_close (fs, &map);
return rc;
}
rc = rtems_rfs_buffer_handle_open (fs, &buffer);
11b411: bf 05 00 00 00 mov $0x5,%edi <== NOT EXECUTED
11b416: eb cd jmp 11b3e5 <rtems_rfs_dir_del_entry+0x33b><== NOT EXECUTED
}
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
11b418: 89 d8 mov %ebx,%eax
11b41a: 8d 65 f4 lea -0xc(%ebp),%esp
11b41d: 5b pop %ebx
11b41e: 5e pop %esi
11b41f: 5f pop %edi
11b420: 5d pop %ebp
11b421: c3 ret
0011b785 <rtems_rfs_dir_empty>:
int
rtems_rfs_dir_empty (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* dir)
{
11b785: 55 push %ebp
11b786: 89 e5 mov %esp,%ebp
11b788: 57 push %edi
11b789: 56 push %esi
11b78a: 53 push %ebx
11b78b: 81 ec 84 00 00 00 sub $0x84,%esp
11b791: 8b 7d 08 mov 0x8(%ebp),%edi
rtems_rfs_buffer_handle buffer;
rtems_rfs_block_no block;
bool empty;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
11b794: 6a 00 push $0x0
11b796: 68 00 00 00 80 push $0x80000000
11b79b: e8 fc 80 ff ff call 11389c <rtems_rfs_trace>
11b7a0: 83 c4 10 add $0x10,%esp
11b7a3: 84 c0 test %al,%al
11b7a5: 74 15 je 11b7bc <rtems_rfs_dir_empty+0x37><== ALWAYS TAKEN
printf ("rtems-rfs: dir-empty: dir=%" PRId32 "\n", rtems_rfs_inode_ino (dir));
11b7a7: 50 push %eax <== NOT EXECUTED
11b7a8: 50 push %eax <== NOT EXECUTED
11b7a9: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
11b7ac: ff 72 08 pushl 0x8(%edx) <== NOT EXECUTED
11b7af: 68 ad 18 13 00 push $0x1318ad <== NOT EXECUTED
11b7b4: e8 83 4b 00 00 call 12033c <printf> <== NOT EXECUTED
11b7b9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
empty = true;
rc = rtems_rfs_block_map_open (fs, dir, &map);
11b7bc: 50 push %eax
11b7bd: 8d 75 98 lea -0x68(%ebp),%esi
11b7c0: 56 push %esi
11b7c1: ff 75 0c pushl 0xc(%ebp)
11b7c4: 57 push %edi
11b7c5: e8 d8 dd ff ff call 1195a2 <rtems_rfs_block_map_open>
11b7ca: 89 c3 mov %eax,%ebx
if (rc > 0)
11b7cc: 83 c4 10 add $0x10,%esp
11b7cf: 85 c0 test %eax,%eax
11b7d1: 0f 8f 7c 01 00 00 jg 11b953 <rtems_rfs_dir_empty+0x1ce><== NEVER TAKEN
return rc;
rc = rtems_rfs_block_map_seek (fs, &map, 0, &block);
11b7d7: 83 ec 0c sub $0xc,%esp
11b7da: 8d 55 88 lea -0x78(%ebp),%edx
11b7dd: 52 push %edx
11b7de: 6a 00 push $0x0
11b7e0: 6a 00 push $0x0
11b7e2: 56 push %esi
11b7e3: 57 push %edi
11b7e4: 89 95 7c ff ff ff mov %edx,-0x84(%ebp)
11b7ea: e8 15 e2 ff ff call 119a04 <rtems_rfs_block_map_seek>
11b7ef: 89 c3 mov %eax,%ebx
if (rc > 0)
11b7f1: 83 c4 20 add $0x20,%esp
11b7f4: 85 c0 test %eax,%eax
11b7f6: 7e 08 jle 11b800 <rtems_rfs_dir_empty+0x7b><== ALWAYS TAKEN
{
rtems_rfs_block_map_close (fs, &map);
11b7f8: 50 push %eax <== NOT EXECUTED
11b7f9: 50 push %eax <== NOT EXECUTED
11b7fa: 56 push %esi <== NOT EXECUTED
11b7fb: e9 2a 01 00 00 jmp 11b92a <rtems_rfs_dir_empty+0x1a5><== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
11b800: c6 45 8c 00 movb $0x0,-0x74(%ebp)
handle->bnum = 0;
11b804: c7 45 90 00 00 00 00 movl $0x0,-0x70(%ebp)
handle->buffer = NULL;
11b80b: c7 45 94 00 00 00 00 movl $0x0,-0x6c(%ebp)
while (empty)
{
uint8_t* entry;
int offset;
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
11b812: 6a 01 push $0x1
11b814: ff 75 88 pushl -0x78(%ebp)
11b817: 8d 45 8c lea -0x74(%ebp),%eax
11b81a: 50 push %eax
11b81b: 57 push %edi
11b81c: e8 89 ea ff ff call 11a2aa <rtems_rfs_buffer_handle_request>
11b821: 89 c3 mov %eax,%ebx
if (rc > 0)
11b823: 83 c4 10 add $0x10,%esp
11b826: 85 c0 test %eax,%eax
11b828: 0f 8f e0 00 00 00 jg 11b90e <rtems_rfs_dir_empty+0x189><== NEVER TAKEN
break;
entry = rtems_rfs_buffer_data (&buffer);
11b82e: 8b 45 94 mov -0x6c(%ebp),%eax
11b831: 8b 40 1c mov 0x1c(%eax),%eax
offset = 0;
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
11b834: 8b 57 08 mov 0x8(%edi),%edx
11b837: 83 ea 0a sub $0xa,%edx
11b83a: 89 55 80 mov %edx,-0x80(%ebp)
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
if (rc > 0)
break;
entry = rtems_rfs_buffer_data (&buffer);
offset = 0;
11b83d: c7 45 84 00 00 00 00 movl $0x0,-0x7c(%ebp)
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
11b844: e9 aa 00 00 00 jmp 11b8f3 <rtems_rfs_dir_empty+0x16e>
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
11b849: 0f b6 70 08 movzbl 0x8(%eax),%esi
11b84d: c1 e6 08 shl $0x8,%esi
11b850: 0f b6 50 09 movzbl 0x9(%eax),%edx
11b854: 09 d6 or %edx,%esi
eino = rtems_rfs_dir_entry_ino (entry);
11b856: 0f b6 10 movzbl (%eax),%edx
11b859: c1 e2 18 shl $0x18,%edx
11b85c: 0f b6 48 01 movzbl 0x1(%eax),%ecx
11b860: c1 e1 10 shl $0x10,%ecx
11b863: 09 ca or %ecx,%edx
11b865: 0f b6 48 03 movzbl 0x3(%eax),%ecx
11b869: 09 ca or %ecx,%edx
11b86b: 0f b6 48 02 movzbl 0x2(%eax),%ecx
11b86f: c1 e1 08 shl $0x8,%ecx
11b872: 09 ca or %ecx,%edx
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
11b874: 81 fe ff ff 00 00 cmp $0xffff,%esi
11b87a: 0f 84 b5 00 00 00 je 11b935 <rtems_rfs_dir_empty+0x1b0>
break;
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
11b880: 83 fe 0a cmp $0xa,%esi
11b883: 7e 0e jle 11b893 <rtems_rfs_dir_empty+0x10e><== NEVER TAKEN
11b885: 3b 77 1c cmp 0x1c(%edi),%esi
11b888: 73 09 jae 11b893 <rtems_rfs_dir_empty+0x10e><== NEVER TAKEN
11b88a: 85 d2 test %edx,%edx
11b88c: 74 05 je 11b893 <rtems_rfs_dir_empty+0x10e><== NEVER TAKEN
11b88e: 3b 57 14 cmp 0x14(%edi),%edx
11b891: 76 3f jbe 11b8d2 <rtems_rfs_dir_empty+0x14d><== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_EMPTY))
11b893: 50 push %eax <== NOT EXECUTED
11b894: 50 push %eax <== NOT EXECUTED
11b895: 6a 01 push $0x1 <== NOT EXECUTED
11b897: 6a 00 push $0x0 <== NOT EXECUTED
11b899: 89 95 7c ff ff ff mov %edx,-0x84(%ebp) <== NOT EXECUTED
11b89f: e8 f8 7f ff ff call 11389c <rtems_rfs_trace> <== NOT EXECUTED
11b8a4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11b8a7: 84 c0 test %al,%al <== NOT EXECUTED
11b8a9: 8b 95 7c ff ff ff mov -0x84(%ebp),%edx <== NOT EXECUTED
11b8af: 0f 84 80 00 00 00 je 11b935 <rtems_rfs_dir_empty+0x1b0><== NOT EXECUTED
printf ("rtems-rfs: dir-empty: "
11b8b5: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11b8b8: ff 75 84 pushl -0x7c(%ebp) <== NOT EXECUTED
11b8bb: 52 push %edx <== NOT EXECUTED
11b8bc: 56 push %esi <== NOT EXECUTED
11b8bd: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
11b8c0: ff 72 08 pushl 0x8(%edx) <== NOT EXECUTED
11b8c3: 68 cc 18 13 00 push $0x1318cc <== NOT EXECUTED
11b8c8: e8 6f 4a 00 00 call 12033c <printf> <== NOT EXECUTED
11b8cd: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
11b8d0: eb 63 jmp 11b935 <rtems_rfs_dir_empty+0x1b0><== NOT EXECUTED
/*
* Ignore the current (.) and parent (..) entries. Anything else means
* the directory is not empty.
*/
if (((elength != (RTEMS_RFS_DIR_ENTRY_SIZE + 1)) ||
11b8d2: 83 fe 0b cmp $0xb,%esi
11b8d5: 75 06 jne 11b8dd <rtems_rfs_dir_empty+0x158>
11b8d7: 80 78 0a 2e cmpb $0x2e,0xa(%eax)
11b8db: eb 0f jmp 11b8ec <rtems_rfs_dir_empty+0x167>
(entry[RTEMS_RFS_DIR_ENTRY_SIZE] != '.')) &&
11b8dd: 83 fe 0c cmp $0xc,%esi
11b8e0: 75 26 jne 11b908 <rtems_rfs_dir_empty+0x183>
((elength != (RTEMS_RFS_DIR_ENTRY_SIZE + 2)) ||
11b8e2: 80 78 0a 2e cmpb $0x2e,0xa(%eax)
11b8e6: 75 20 jne 11b908 <rtems_rfs_dir_empty+0x183><== NEVER TAKEN
(entry[RTEMS_RFS_DIR_ENTRY_SIZE] != '.') ||
11b8e8: 80 78 0b 2e cmpb $0x2e,0xb(%eax)
11b8ec: 75 1a jne 11b908 <rtems_rfs_dir_empty+0x183><== NEVER TAKEN
{
empty = false;
break;
}
entry += elength;
11b8ee: 01 f0 add %esi,%eax
offset += elength;
11b8f0: 01 75 84 add %esi,-0x7c(%ebp)
break;
entry = rtems_rfs_buffer_data (&buffer);
offset = 0;
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
11b8f3: 8b 55 80 mov -0x80(%ebp),%edx
11b8f6: 39 55 84 cmp %edx,-0x7c(%ebp)
11b8f9: 0f 82 4a ff ff ff jb 11b849 <rtems_rfs_dir_empty+0xc4><== ALWAYS TAKEN
11b8ff: eb 34 jmp 11b935 <rtems_rfs_dir_empty+0x1b0><== NOT EXECUTED
if (empty)
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
if (rc > 0)
{
if (rc == ENXIO)
11b901: 83 fb 06 cmp $0x6,%ebx
11b904: 74 06 je 11b90c <rtems_rfs_dir_empty+0x187><== ALWAYS TAKEN
11b906: eb 06 jmp 11b90e <rtems_rfs_dir_empty+0x189><== NOT EXECUTED
* the directory is not empty.
*/
if (((elength != (RTEMS_RFS_DIR_ENTRY_SIZE + 1)) ||
(entry[RTEMS_RFS_DIR_ENTRY_SIZE] != '.')) &&
((elength != (RTEMS_RFS_DIR_ENTRY_SIZE + 2)) ||
(entry[RTEMS_RFS_DIR_ENTRY_SIZE] != '.') ||
11b908: 31 c0 xor %eax,%eax
11b90a: eb 04 jmp 11b910 <rtems_rfs_dir_empty+0x18b>
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
if (rc > 0)
{
if (rc == ENXIO)
rc = 0;
11b90c: 31 db xor %ebx,%ebx
if (empty)
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
if (rc > 0)
{
if (rc == ENXIO)
11b90e: b0 01 mov $0x1,%al
break;
}
}
}
if ((rc == 0) && !empty)
11b910: 84 c0 test %al,%al
11b912: 75 06 jne 11b91a <rtems_rfs_dir_empty+0x195>
11b914: 85 db test %ebx,%ebx
11b916: 75 02 jne 11b91a <rtems_rfs_dir_empty+0x195><== NEVER TAKEN
rc = ENOTEMPTY;
11b918: b3 5a mov $0x5a,%bl
rtems_rfs_buffer_handle_close (fs, &buffer);
11b91a: 8d 55 8c lea -0x74(%ebp),%edx
11b91d: 89 f8 mov %edi,%eax
11b91f: e8 74 ef ff ff call 11a898 <rtems_rfs_buffer_handle_close>
rtems_rfs_block_map_close (fs, &map);
11b924: 56 push %esi
11b925: 56 push %esi
11b926: 8d 45 98 lea -0x68(%ebp),%eax
11b929: 50 push %eax
11b92a: 57 push %edi
11b92b: e8 19 de ff ff call 119749 <rtems_rfs_block_map_close>
11b930: 83 c4 10 add $0x10,%esp
11b933: eb 1e jmp 11b953 <rtems_rfs_dir_empty+0x1ce>
offset += elength;
}
if (empty)
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
11b935: 53 push %ebx
11b936: 8d 45 88 lea -0x78(%ebp),%eax
11b939: 50 push %eax
11b93a: 8d 45 98 lea -0x68(%ebp),%eax
11b93d: 50 push %eax
11b93e: 57 push %edi
11b93f: e8 2a e1 ff ff call 119a6e <rtems_rfs_block_map_next_block>
11b944: 89 c3 mov %eax,%ebx
if (rc > 0)
11b946: 83 c4 10 add $0x10,%esp
11b949: 85 c0 test %eax,%eax
11b94b: 0f 8e c1 fe ff ff jle 11b812 <rtems_rfs_dir_empty+0x8d><== NEVER TAKEN
11b951: eb ae jmp 11b901 <rtems_rfs_dir_empty+0x17c>
rc = ENOTEMPTY;
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
11b953: 89 d8 mov %ebx,%eax
11b955: 8d 65 f4 lea -0xc(%ebp),%esp
11b958: 5b pop %ebx
11b959: 5e pop %esi
11b95a: 5f pop %edi
11b95b: 5d pop %ebp
11b95c: c3 ret
0011ed28 <rtems_rfs_dir_hash>:
*/
#define initval (20010928)
uint32_t
rtems_rfs_dir_hash (const void *key, size_t length)
{
11ed28: 55 push %ebp
11ed29: 89 e5 mov %esp,%ebp
11ed2b: 57 push %edi
11ed2c: 56 push %esi
11ed2d: 53 push %ebx
11ed2e: 8b 4d 08 mov 0x8(%ebp),%ecx
11ed31: 8b 5d 0c mov 0xc(%ebp),%ebx
uint32_t a,b,c; /* internal state */
union { const void *ptr; size_t i; } u; /* needed for Mac Powerbook G4 */
/* Set up the internal state */
a = b = c = 0xdeadbeef + ((uint32_t)length) + initval;
11ed34: 8d 83 9f 16 df df lea -0x2020e961(%ebx),%eax
u.ptr = key;
if (HASH_LITTLE_ENDIAN && ((u.i & 0x3) == 0)) {
11ed3a: 89 c2 mov %eax,%edx
11ed3c: 89 c6 mov %eax,%esi
11ed3e: f6 c1 03 test $0x3,%cl
11ed41: 0f 85 f4 00 00 00 jne 11ee3b <rtems_rfs_dir_hash+0x113>
11ed47: eb 5d jmp 11eda6 <rtems_rfs_dir_hash+0x7e>
/*const uint8_t *k8;*/
/*------ all but last block: aligned reads and affect 32 bits of (a,b,c) */
while (length > 12)
{
a += k[0];
11ed49: 03 31 add (%ecx),%esi
b += k[1];
11ed4b: 8b 79 04 mov 0x4(%ecx),%edi
11ed4e: 01 d7 add %edx,%edi
c += k[2];
11ed50: 03 41 08 add 0x8(%ecx),%eax
mix(a,b,c);
11ed53: 29 c6 sub %eax,%esi
11ed55: 89 c2 mov %eax,%edx
11ed57: c1 c2 04 rol $0x4,%edx
11ed5a: 31 d6 xor %edx,%esi
11ed5c: 8d 14 38 lea (%eax,%edi,1),%edx
11ed5f: 89 f8 mov %edi,%eax
11ed61: 29 f0 sub %esi,%eax
11ed63: 89 f7 mov %esi,%edi
11ed65: c1 c7 06 rol $0x6,%edi
11ed68: 31 c7 xor %eax,%edi
11ed6a: 8d 04 16 lea (%esi,%edx,1),%eax
11ed6d: 89 d6 mov %edx,%esi
11ed6f: 29 fe sub %edi,%esi
11ed71: 89 fa mov %edi,%edx
11ed73: c1 c2 08 rol $0x8,%edx
11ed76: 31 f2 xor %esi,%edx
11ed78: 8d 34 07 lea (%edi,%eax,1),%esi
11ed7b: 89 c7 mov %eax,%edi
11ed7d: 29 d7 sub %edx,%edi
11ed7f: 89 d0 mov %edx,%eax
11ed81: c1 c0 10 rol $0x10,%eax
11ed84: 31 f8 xor %edi,%eax
11ed86: 8d 3c 32 lea (%edx,%esi,1),%edi
11ed89: 29 c6 sub %eax,%esi
11ed8b: 89 c2 mov %eax,%edx
11ed8d: c1 c2 13 rol $0x13,%edx
11ed90: 31 f2 xor %esi,%edx
11ed92: 8d 34 38 lea (%eax,%edi,1),%esi
11ed95: 29 d7 sub %edx,%edi
11ed97: 89 d0 mov %edx,%eax
11ed99: c1 c0 04 rol $0x4,%eax
11ed9c: 31 f8 xor %edi,%eax
11ed9e: 01 f2 add %esi,%edx
length -= 12;
11eda0: 83 eb 0c sub $0xc,%ebx
k += 3;
11eda3: 83 c1 0c add $0xc,%ecx
if (HASH_LITTLE_ENDIAN && ((u.i & 0x3) == 0)) {
const uint32_t *k = (const uint32_t *)key; /* read 32-bit chunks */
/*const uint8_t *k8;*/
/*------ all but last block: aligned reads and affect 32 bits of (a,b,c) */
while (length > 12)
11eda6: 83 fb 0c cmp $0xc,%ebx
11eda9: 77 9e ja 11ed49 <rtems_rfs_dir_hash+0x21>
* still catch it and complain. The masking trick does make the hash
* noticably faster for short strings (like English words).
*/
#ifndef VALGRIND
switch(length)
11edab: 4b dec %ebx
11edac: 83 fb 0b cmp $0xb,%ebx
11edaf: 0f 87 00 03 00 00 ja 11f0b5 <rtems_rfs_dir_hash+0x38d><== NEVER TAKEN
11edb5: 8b 39 mov (%ecx),%edi
11edb7: ff 24 9d 84 22 13 00 jmp *0x132284(,%ebx,4)
{
case 12: c+=k[2]; b+=k[1]; a+=k[0]; break;
11edbe: 03 41 08 add 0x8(%ecx),%eax
11edc1: eb 17 jmp 11edda <rtems_rfs_dir_hash+0xb2>
case 11: c+=k[2]&0xffffff; b+=k[1]; a+=k[0]; break;
11edc3: 8b 59 08 mov 0x8(%ecx),%ebx
11edc6: 81 e3 ff ff ff 00 and $0xffffff,%ebx
11edcc: eb 0a jmp 11edd8 <rtems_rfs_dir_hash+0xb0>
case 10: c+=k[2]&0xffff; b+=k[1]; a+=k[0]; break;
11edce: 0f b7 59 08 movzwl 0x8(%ecx),%ebx
11edd2: eb 04 jmp 11edd8 <rtems_rfs_dir_hash+0xb0>
case 9 : c+=k[2]&0xff; b+=k[1]; a+=k[0]; break;
11edd4: 0f b6 59 08 movzbl 0x8(%ecx),%ebx
11edd8: 01 d8 add %ebx,%eax
11edda: 03 51 04 add 0x4(%ecx),%edx
11eddd: 03 31 add (%ecx),%esi
11eddf: 89 f1 mov %esi,%ecx
11ede1: e9 94 02 00 00 jmp 11f07a <rtems_rfs_dir_hash+0x352>
case 8 : b+=k[1]; a+=k[0]; break;
11ede6: 03 51 04 add 0x4(%ecx),%edx
11ede9: eb 21 jmp 11ee0c <rtems_rfs_dir_hash+0xe4>
case 7 : b+=k[1]&0xffffff; a+=k[0]; break;
11edeb: 8b 49 04 mov 0x4(%ecx),%ecx
11edee: 81 e1 ff ff ff 00 and $0xffffff,%ecx
11edf4: eb 14 jmp 11ee0a <rtems_rfs_dir_hash+0xe2>
case 6 : b+=k[1]&0xffff; a+=k[0]; break;
11edf6: 8b 49 04 mov 0x4(%ecx),%ecx
11edf9: 81 e1 ff ff 00 00 and $0xffff,%ecx
11edff: eb 09 jmp 11ee0a <rtems_rfs_dir_hash+0xe2>
case 5 : b+=k[1]&0xff; a+=k[0]; break;
11ee01: 8b 49 04 mov 0x4(%ecx),%ecx
11ee04: 81 e1 ff 00 00 00 and $0xff,%ecx
11ee0a: 01 ca add %ecx,%edx
case 4 : a+=k[0]; break;
11ee0c: 8d 0c 3e lea (%esi,%edi,1),%ecx
11ee0f: e9 66 02 00 00 jmp 11f07a <rtems_rfs_dir_hash+0x352>
case 3 : a+=k[0]&0xffffff; break;
11ee14: 89 f9 mov %edi,%ecx
11ee16: 81 e1 ff ff ff 00 and $0xffffff,%ecx
11ee1c: e9 57 02 00 00 jmp 11f078 <rtems_rfs_dir_hash+0x350>
case 2 : a+=k[0]&0xffff; break;
11ee21: 89 f9 mov %edi,%ecx
11ee23: 81 e1 ff ff 00 00 and $0xffff,%ecx
11ee29: e9 4a 02 00 00 jmp 11f078 <rtems_rfs_dir_hash+0x350>
case 1 : a+=k[0]&0xff; break;
11ee2e: 89 f9 mov %edi,%ecx
11ee30: 81 e1 ff 00 00 00 and $0xff,%ecx
11ee36: e9 3d 02 00 00 jmp 11f078 <rtems_rfs_dir_hash+0x350>
case 0 : return c;
}
#endif /* !valgrind */
} else if (HASH_LITTLE_ENDIAN && ((u.i & 0x1) == 0)) {
11ee3b: f6 c1 01 test $0x1,%cl
11ee3e: 0f 84 83 00 00 00 je 11eec7 <rtems_rfs_dir_hash+0x19f>
11ee44: e9 b5 01 00 00 jmp 11effe <rtems_rfs_dir_hash+0x2d6>
const uint8_t *k8;
/*--------------- all but last block: aligned reads and different mixing */
while (length > 12)
{
a += k[0] + (((uint32_t)k[1])<<16);
11ee49: 0f b7 39 movzwl (%ecx),%edi
11ee4c: 01 fe add %edi,%esi
11ee4e: 0f b7 79 02 movzwl 0x2(%ecx),%edi
11ee52: c1 e7 10 shl $0x10,%edi
11ee55: 01 fe add %edi,%esi
b += k[2] + (((uint32_t)k[3])<<16);
11ee57: 0f b7 79 04 movzwl 0x4(%ecx),%edi
11ee5b: 01 fa add %edi,%edx
11ee5d: 0f b7 79 06 movzwl 0x6(%ecx),%edi
11ee61: c1 e7 10 shl $0x10,%edi
11ee64: 01 d7 add %edx,%edi
c += k[4] + (((uint32_t)k[5])<<16);
11ee66: 0f b7 51 08 movzwl 0x8(%ecx),%edx
11ee6a: 01 d0 add %edx,%eax
11ee6c: 0f b7 51 0a movzwl 0xa(%ecx),%edx
11ee70: c1 e2 10 shl $0x10,%edx
11ee73: 01 c2 add %eax,%edx
mix(a,b,c);
11ee75: 29 d6 sub %edx,%esi
11ee77: 89 d0 mov %edx,%eax
11ee79: c1 c0 04 rol $0x4,%eax
11ee7c: 31 c6 xor %eax,%esi
11ee7e: 01 fa add %edi,%edx
11ee80: 89 f8 mov %edi,%eax
11ee82: 29 f0 sub %esi,%eax
11ee84: 89 f7 mov %esi,%edi
11ee86: c1 c7 06 rol $0x6,%edi
11ee89: 31 c7 xor %eax,%edi
11ee8b: 8d 04 16 lea (%esi,%edx,1),%eax
11ee8e: 89 d6 mov %edx,%esi
11ee90: 29 fe sub %edi,%esi
11ee92: 89 fa mov %edi,%edx
11ee94: c1 c2 08 rol $0x8,%edx
11ee97: 31 f2 xor %esi,%edx
11ee99: 8d 34 07 lea (%edi,%eax,1),%esi
11ee9c: 89 c7 mov %eax,%edi
11ee9e: 29 d7 sub %edx,%edi
11eea0: 89 d0 mov %edx,%eax
11eea2: c1 c0 10 rol $0x10,%eax
11eea5: 31 f8 xor %edi,%eax
11eea7: 8d 3c 32 lea (%edx,%esi,1),%edi
11eeaa: 29 c6 sub %eax,%esi
11eeac: 89 c2 mov %eax,%edx
11eeae: c1 c2 13 rol $0x13,%edx
11eeb1: 31 f2 xor %esi,%edx
11eeb3: 8d 34 38 lea (%eax,%edi,1),%esi
11eeb6: 29 d7 sub %edx,%edi
11eeb8: 89 d0 mov %edx,%eax
11eeba: c1 c0 04 rol $0x4,%eax
11eebd: 31 f8 xor %edi,%eax
11eebf: 01 f2 add %esi,%edx
length -= 12;
11eec1: 83 eb 0c sub $0xc,%ebx
k += 6;
11eec4: 83 c1 0c add $0xc,%ecx
} else if (HASH_LITTLE_ENDIAN && ((u.i & 0x1) == 0)) {
const uint16_t *k = (const uint16_t *)key; /* read 16-bit chunks */
const uint8_t *k8;
/*--------------- all but last block: aligned reads and different mixing */
while (length > 12)
11eec7: 83 fb 0c cmp $0xc,%ebx
11eeca: 0f 87 79 ff ff ff ja 11ee49 <rtems_rfs_dir_hash+0x121>
k += 6;
}
/*----------------------------- handle the last (probably partial) block */
k8 = (const uint8_t *)k;
switch(length)
11eed0: 4b dec %ebx
11eed1: 83 fb 0b cmp $0xb,%ebx
11eed4: 0f 87 db 01 00 00 ja 11f0b5 <rtems_rfs_dir_hash+0x38d><== NEVER TAKEN
11eeda: ff 24 9d b4 22 13 00 jmp *0x1322b4(,%ebx,4)
{
case 12: c+=k[4]+(((uint32_t)k[5])<<16);
11eee1: 0f b7 59 08 movzwl 0x8(%ecx),%ebx <== NOT EXECUTED
11eee5: 01 d8 add %ebx,%eax <== NOT EXECUTED
11eee7: 0f b7 59 0a movzwl 0xa(%ecx),%ebx <== NOT EXECUTED
11eeeb: c1 e3 10 shl $0x10,%ebx <== NOT EXECUTED
11eeee: eb 13 jmp 11ef03 <rtems_rfs_dir_hash+0x1db><== NOT EXECUTED
b+=k[2]+(((uint32_t)k[3])<<16);
a+=k[0]+(((uint32_t)k[1])<<16);
break;
case 11: c+=((uint32_t)k8[10])<<16; /* fall through */
11eef0: 0f b6 59 0a movzbl 0xa(%ecx),%ebx
11eef4: c1 e3 10 shl $0x10,%ebx
11eef7: 01 d8 add %ebx,%eax
case 10: c+=k[4];
11eef9: 0f b7 59 08 movzwl 0x8(%ecx),%ebx
11eefd: eb 04 jmp 11ef03 <rtems_rfs_dir_hash+0x1db>
b+=k[2]+(((uint32_t)k[3])<<16);
a+=k[0]+(((uint32_t)k[1])<<16);
break;
case 9 : c+=k8[8]; /* fall through */
11eeff: 0f b6 59 08 movzbl 0x8(%ecx),%ebx <== NOT EXECUTED
11ef03: 01 d8 add %ebx,%eax
case 8 : b+=k[2]+(((uint32_t)k[3])<<16);
11ef05: 0f b7 59 04 movzwl 0x4(%ecx),%ebx
11ef09: 01 da add %ebx,%edx
11ef0b: 0f b7 59 06 movzwl 0x6(%ecx),%ebx
11ef0f: c1 e3 10 shl $0x10,%ebx
11ef12: eb 13 jmp 11ef27 <rtems_rfs_dir_hash+0x1ff>
a+=k[0]+(((uint32_t)k[1])<<16);
break;
case 7 : b+=((uint32_t)k8[6])<<16; /* fall through */
11ef14: 0f b6 59 06 movzbl 0x6(%ecx),%ebx <== NOT EXECUTED
11ef18: c1 e3 10 shl $0x10,%ebx <== NOT EXECUTED
11ef1b: 01 da add %ebx,%edx <== NOT EXECUTED
case 6 : b+=k[2];
11ef1d: 0f b7 59 04 movzwl 0x4(%ecx),%ebx
11ef21: eb 04 jmp 11ef27 <rtems_rfs_dir_hash+0x1ff>
a+=k[0]+(((uint32_t)k[1])<<16);
break;
case 5 : b+=k8[4]; /* fall through */
11ef23: 0f b6 59 04 movzbl 0x4(%ecx),%ebx
11ef27: 01 da add %ebx,%edx
case 4 : a+=k[0]+(((uint32_t)k[1])<<16);
11ef29: 0f b7 19 movzwl (%ecx),%ebx
11ef2c: 01 de add %ebx,%esi
11ef2e: 0f b7 59 02 movzwl 0x2(%ecx),%ebx
11ef32: c1 e3 10 shl $0x10,%ebx
11ef35: 8d 0c 1e lea (%esi,%ebx,1),%ecx
break;
11ef38: e9 3d 01 00 00 jmp 11f07a <rtems_rfs_dir_hash+0x352>
case 3 : a+=((uint32_t)k8[2])<<16; /* fall through */
11ef3d: 0f b6 59 02 movzbl 0x2(%ecx),%ebx
11ef41: c1 e3 10 shl $0x10,%ebx
11ef44: 01 de add %ebx,%esi
case 2 : a+=k[0];
11ef46: 0f b7 09 movzwl (%ecx),%ecx
11ef49: e9 2a 01 00 00 jmp 11f078 <rtems_rfs_dir_hash+0x350>
const uint8_t *k = (const uint8_t *)key;
/*--------------- all but the last block: affect some 32 bits of (a,b,c) */
while (length > 12)
{
a += k[0];
11ef4e: 0f b6 39 movzbl (%ecx),%edi
11ef51: 01 fe add %edi,%esi
a += ((uint32_t)k[1])<<8;
11ef53: 0f b6 79 01 movzbl 0x1(%ecx),%edi
11ef57: c1 e7 08 shl $0x8,%edi
11ef5a: 01 fe add %edi,%esi
a += ((uint32_t)k[2])<<16;
11ef5c: 0f b6 79 02 movzbl 0x2(%ecx),%edi
11ef60: c1 e7 10 shl $0x10,%edi
11ef63: 01 fe add %edi,%esi
a += ((uint32_t)k[3])<<24;
11ef65: 0f b6 79 03 movzbl 0x3(%ecx),%edi
11ef69: c1 e7 18 shl $0x18,%edi
11ef6c: 01 fe add %edi,%esi
b += k[4];
11ef6e: 0f b6 79 04 movzbl 0x4(%ecx),%edi
11ef72: 01 fa add %edi,%edx
b += ((uint32_t)k[5])<<8;
11ef74: 0f b6 79 05 movzbl 0x5(%ecx),%edi
11ef78: c1 e7 08 shl $0x8,%edi
11ef7b: 01 fa add %edi,%edx
b += ((uint32_t)k[6])<<16;
11ef7d: 0f b6 79 06 movzbl 0x6(%ecx),%edi
11ef81: c1 e7 10 shl $0x10,%edi
11ef84: 01 d7 add %edx,%edi
b += ((uint32_t)k[7])<<24;
11ef86: 0f b6 51 07 movzbl 0x7(%ecx),%edx
11ef8a: c1 e2 18 shl $0x18,%edx
11ef8d: 01 d7 add %edx,%edi
c += k[8];
11ef8f: 0f b6 51 08 movzbl 0x8(%ecx),%edx
11ef93: 01 d0 add %edx,%eax
c += ((uint32_t)k[9])<<8;
11ef95: 0f b6 51 09 movzbl 0x9(%ecx),%edx
11ef99: c1 e2 08 shl $0x8,%edx
11ef9c: 01 d0 add %edx,%eax
c += ((uint32_t)k[10])<<16;
11ef9e: 0f b6 51 0a movzbl 0xa(%ecx),%edx
11efa2: c1 e2 10 shl $0x10,%edx
11efa5: 01 c2 add %eax,%edx
c += ((uint32_t)k[11])<<24;
11efa7: 0f b6 41 0b movzbl 0xb(%ecx),%eax
11efab: c1 e0 18 shl $0x18,%eax
11efae: 01 c2 add %eax,%edx
mix(a,b,c);
11efb0: 29 d6 sub %edx,%esi
11efb2: 89 d0 mov %edx,%eax
11efb4: c1 c0 04 rol $0x4,%eax
11efb7: 31 c6 xor %eax,%esi
11efb9: 01 fa add %edi,%edx
11efbb: 29 f7 sub %esi,%edi
11efbd: 89 f0 mov %esi,%eax
11efbf: c1 c0 06 rol $0x6,%eax
11efc2: 31 f8 xor %edi,%eax
11efc4: 8d 3c 16 lea (%esi,%edx,1),%edi
11efc7: 89 d6 mov %edx,%esi
11efc9: 29 c6 sub %eax,%esi
11efcb: 89 c2 mov %eax,%edx
11efcd: c1 c2 08 rol $0x8,%edx
11efd0: 31 f2 xor %esi,%edx
11efd2: 8d 34 38 lea (%eax,%edi,1),%esi
11efd5: 29 d7 sub %edx,%edi
11efd7: 89 d0 mov %edx,%eax
11efd9: c1 c0 10 rol $0x10,%eax
11efdc: 31 f8 xor %edi,%eax
11efde: 8d 3c 32 lea (%edx,%esi,1),%edi
11efe1: 29 c6 sub %eax,%esi
11efe3: 89 c2 mov %eax,%edx
11efe5: c1 c2 13 rol $0x13,%edx
11efe8: 31 f2 xor %esi,%edx
11efea: 8d 34 38 lea (%eax,%edi,1),%esi
11efed: 29 d7 sub %edx,%edi
11efef: 89 d0 mov %edx,%eax
11eff1: c1 c0 04 rol $0x4,%eax
11eff4: 31 f8 xor %edi,%eax
11eff6: 01 f2 add %esi,%edx
length -= 12;
11eff8: 83 eb 0c sub $0xc,%ebx
k += 12;
11effb: 83 c1 0c add $0xc,%ecx
} else { /* need to read the key one byte at a time */
const uint8_t *k = (const uint8_t *)key;
/*--------------- all but the last block: affect some 32 bits of (a,b,c) */
while (length > 12)
11effe: 83 fb 0c cmp $0xc,%ebx
11f001: 0f 87 47 ff ff ff ja 11ef4e <rtems_rfs_dir_hash+0x226>
length -= 12;
k += 12;
}
/*-------------------------------- last block: affect all 32 bits of (c) */
switch(length) /* all the case statements fall through */
11f007: 4b dec %ebx
11f008: 83 fb 0b cmp $0xb,%ebx
11f00b: 0f 87 a4 00 00 00 ja 11f0b5 <rtems_rfs_dir_hash+0x38d><== NEVER TAKEN
11f011: ff 24 9d e4 22 13 00 jmp *0x1322e4(,%ebx,4)
{
case 12: c+=((uint32_t)k[11])<<24;
11f018: 0f b6 59 0b movzbl 0xb(%ecx),%ebx <== NOT EXECUTED
11f01c: c1 e3 18 shl $0x18,%ebx <== NOT EXECUTED
11f01f: 01 d8 add %ebx,%eax <== NOT EXECUTED
case 11: c+=((uint32_t)k[10])<<16;
11f021: 0f b6 59 0a movzbl 0xa(%ecx),%ebx
11f025: c1 e3 10 shl $0x10,%ebx
11f028: 01 d8 add %ebx,%eax
case 10: c+=((uint32_t)k[9])<<8;
11f02a: 0f b6 59 09 movzbl 0x9(%ecx),%ebx
11f02e: c1 e3 08 shl $0x8,%ebx
11f031: 01 d8 add %ebx,%eax
case 9 : c+=k[8];
11f033: 0f b6 59 08 movzbl 0x8(%ecx),%ebx
11f037: 01 d8 add %ebx,%eax
case 8 : b+=((uint32_t)k[7])<<24;
11f039: 0f b6 59 07 movzbl 0x7(%ecx),%ebx
11f03d: c1 e3 18 shl $0x18,%ebx
11f040: 01 da add %ebx,%edx
case 7 : b+=((uint32_t)k[6])<<16;
11f042: 0f b6 59 06 movzbl 0x6(%ecx),%ebx
11f046: c1 e3 10 shl $0x10,%ebx
11f049: 01 da add %ebx,%edx
case 6 : b+=((uint32_t)k[5])<<8;
11f04b: 0f b6 59 05 movzbl 0x5(%ecx),%ebx
11f04f: c1 e3 08 shl $0x8,%ebx
11f052: 01 da add %ebx,%edx
case 5 : b+=k[4];
11f054: 0f b6 59 04 movzbl 0x4(%ecx),%ebx
11f058: 01 da add %ebx,%edx
case 4 : a+=((uint32_t)k[3])<<24;
11f05a: 0f b6 59 03 movzbl 0x3(%ecx),%ebx
11f05e: c1 e3 18 shl $0x18,%ebx
11f061: 01 de add %ebx,%esi
case 3 : a+=((uint32_t)k[2])<<16;
11f063: 0f b6 59 02 movzbl 0x2(%ecx),%ebx
11f067: c1 e3 10 shl $0x10,%ebx
11f06a: 01 de add %ebx,%esi
case 2 : a+=((uint32_t)k[1])<<8;
11f06c: 0f b6 59 01 movzbl 0x1(%ecx),%ebx
11f070: c1 e3 08 shl $0x8,%ebx
11f073: 01 de add %ebx,%esi
case 1 : a+=k[0];
11f075: 0f b6 09 movzbl (%ecx),%ecx
11f078: 01 f1 add %esi,%ecx
break;
case 0 : return c;
}
}
final(a,b,c);
11f07a: 31 d0 xor %edx,%eax
11f07c: 89 d3 mov %edx,%ebx
11f07e: c1 c3 0e rol $0xe,%ebx
11f081: 29 d8 sub %ebx,%eax
11f083: 31 c1 xor %eax,%ecx
11f085: 89 c3 mov %eax,%ebx
11f087: c1 c3 0b rol $0xb,%ebx
11f08a: 29 d9 sub %ebx,%ecx
11f08c: 31 ca xor %ecx,%edx
11f08e: 89 cb mov %ecx,%ebx
11f090: c1 c3 19 rol $0x19,%ebx
11f093: 29 da sub %ebx,%edx
11f095: 31 d0 xor %edx,%eax
11f097: 89 d3 mov %edx,%ebx
11f099: c1 c3 10 rol $0x10,%ebx
11f09c: 29 d8 sub %ebx,%eax
11f09e: 31 c1 xor %eax,%ecx
11f0a0: 89 c3 mov %eax,%ebx
11f0a2: c1 c3 04 rol $0x4,%ebx
11f0a5: 29 d9 sub %ebx,%ecx
11f0a7: 31 ca xor %ecx,%edx
11f0a9: c1 c1 0e rol $0xe,%ecx
11f0ac: 29 ca sub %ecx,%edx
11f0ae: 31 d0 xor %edx,%eax
11f0b0: c1 c2 18 rol $0x18,%edx
11f0b3: 29 d0 sub %edx,%eax
return c;
}
11f0b5: 5b pop %ebx
11f0b6: 5e pop %esi
11f0b7: 5f pop %edi
11f0b8: 5d pop %ebp
11f0b9: c3 ret
0011a8c0 <rtems_rfs_dir_lookup_ino>:
rtems_rfs_inode_handle* inode,
const char* name,
int length,
rtems_rfs_ino* ino,
uint32_t* offset)
{
11a8c0: 55 push %ebp
11a8c1: 89 e5 mov %esp,%ebp
11a8c3: 57 push %edi
11a8c4: 56 push %esi
11a8c5: 53 push %ebx
11a8c6: 81 ec 84 00 00 00 sub $0x84,%esp
11a8cc: 8b 7d 08 mov 0x8(%ebp),%edi
rtems_rfs_block_map map;
rtems_rfs_buffer_handle entries;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
11a8cf: 6a 00 push $0x0
11a8d1: 68 00 00 00 04 push $0x4000000
11a8d6: e8 c1 8f ff ff call 11389c <rtems_rfs_trace>
11a8db: 83 c4 10 add $0x10,%esp
11a8de: 84 c0 test %al,%al
11a8e0: 74 44 je 11a926 <rtems_rfs_dir_lookup_ino+0x66><== ALWAYS TAKEN
{
int c;
printf ("rtems-rfs: dir-lookup-ino: lookup ino: root=%" PRId32 ", path=",
11a8e2: 50 push %eax <== NOT EXECUTED
11a8e3: 50 push %eax <== NOT EXECUTED
11a8e4: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED
11a8e7: ff 71 08 pushl 0x8(%ecx) <== NOT EXECUTED
11a8ea: 68 6d 12 13 00 push $0x13126d <== NOT EXECUTED
11a8ef: e8 48 5a 00 00 call 12033c <printf> <== NOT EXECUTED
inode->ino);
for (c = 0; c < length; c++)
11a8f4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11a8f7: 31 db xor %ebx,%ebx <== NOT EXECUTED
11a8f9: eb 14 jmp 11a90f <rtems_rfs_dir_lookup_ino+0x4f><== NOT EXECUTED
printf ("%c", name[c]);
11a8fb: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11a8fe: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED
11a901: 0f be 04 1a movsbl (%edx,%ebx,1),%eax <== NOT EXECUTED
11a905: 50 push %eax <== NOT EXECUTED
11a906: e8 9d 5b 00 00 call 1204a8 <putchar> <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
{
int c;
printf ("rtems-rfs: dir-lookup-ino: lookup ino: root=%" PRId32 ", path=",
inode->ino);
for (c = 0; c < length; c++)
11a90b: 43 inc %ebx <== NOT EXECUTED
11a90c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11a90f: 3b 5d 14 cmp 0x14(%ebp),%ebx <== NOT EXECUTED
11a912: 7c e7 jl 11a8fb <rtems_rfs_dir_lookup_ino+0x3b><== NOT EXECUTED
printf ("%c", name[c]);
printf (", len=%d\n", length);
11a914: 50 push %eax <== NOT EXECUTED
11a915: 50 push %eax <== NOT EXECUTED
11a916: ff 75 14 pushl 0x14(%ebp) <== NOT EXECUTED
11a919: 68 a4 12 13 00 push $0x1312a4 <== NOT EXECUTED
11a91e: e8 19 5a 00 00 call 12033c <printf> <== NOT EXECUTED
11a923: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
*ino = RTEMS_RFS_EMPTY_INO;
11a926: 8b 4d 18 mov 0x18(%ebp),%ecx
11a929: c7 01 00 00 00 00 movl $0x0,(%ecx)
*offset = 0;
11a92f: 8b 4d 1c mov 0x1c(%ebp),%ecx
11a932: c7 01 00 00 00 00 movl $0x0,(%ecx)
rc = rtems_rfs_block_map_open (fs, inode, &map);
11a938: 50 push %eax
11a939: 8d 75 98 lea -0x68(%ebp),%esi
11a93c: 56 push %esi
11a93d: ff 75 0c pushl 0xc(%ebp)
11a940: 57 push %edi
11a941: e8 5c ec ff ff call 1195a2 <rtems_rfs_block_map_open>
11a946: 89 c3 mov %eax,%ebx
if (rc > 0)
11a948: 83 c4 10 add $0x10,%esp
11a94b: 85 c0 test %eax,%eax
11a94d: 7e 3c jle 11a98b <rtems_rfs_dir_lookup_ino+0xcb><== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
11a94f: 56 push %esi <== NOT EXECUTED
11a950: 56 push %esi <== NOT EXECUTED
11a951: 6a 00 push $0x0 <== NOT EXECUTED
11a953: 68 00 00 00 04 push $0x4000000 <== NOT EXECUTED
11a958: e8 3f 8f ff ff call 11389c <rtems_rfs_trace> <== NOT EXECUTED
11a95d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11a960: 84 c0 test %al,%al <== NOT EXECUTED
11a962: 0f 84 c4 03 00 00 je 11ad2c <rtems_rfs_dir_lookup_ino+0x46c><== NOT EXECUTED
printf ("rtems-rfs: dir-lookup-ino: map open failed for ino %" PRIu32 ": %d: %s",
11a968: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11a96b: 53 push %ebx <== NOT EXECUTED
11a96c: e8 53 67 00 00 call 1210c4 <strerror> <== NOT EXECUTED
11a971: 50 push %eax <== NOT EXECUTED
11a972: 53 push %ebx <== NOT EXECUTED
11a973: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED
11a976: ff 71 08 pushl 0x8(%ecx) <== NOT EXECUTED
11a979: 68 ae 12 13 00 push $0x1312ae <== NOT EXECUTED
11a97e: e8 b9 59 00 00 call 12033c <printf> <== NOT EXECUTED
11a983: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
11a986: e9 a1 03 00 00 jmp 11ad2c <rtems_rfs_dir_lookup_ino+0x46c><== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
11a98b: c6 45 8c 00 movb $0x0,-0x74(%ebp)
handle->bnum = 0;
11a98f: c7 45 90 00 00 00 00 movl $0x0,-0x70(%ebp)
handle->buffer = NULL;
11a996: c7 45 94 00 00 00 00 movl $0x0,-0x6c(%ebp)
uint32_t hash;
/*
* Calculate the hash of the look up string.
*/
hash = rtems_rfs_dir_hash (name, length);
11a99d: 51 push %ecx
11a99e: 51 push %ecx
11a99f: ff 75 14 pushl 0x14(%ebp)
11a9a2: ff 75 10 pushl 0x10(%ebp)
11a9a5: e8 7e 43 00 00 call 11ed28 <rtems_rfs_dir_hash>
11a9aa: 89 85 7c ff ff ff mov %eax,-0x84(%ebp)
/*
* Locate the first block. The map points to the start after open so just
* seek 0. If an error the block will be 0.
*/
rc = rtems_rfs_block_map_seek (fs, &map, 0, &block);
11a9b0: 8d 55 88 lea -0x78(%ebp),%edx
11a9b3: 89 14 24 mov %edx,(%esp)
11a9b6: 6a 00 push $0x0
11a9b8: 6a 00 push $0x0
11a9ba: 56 push %esi
11a9bb: 57 push %edi
11a9bc: 89 95 78 ff ff ff mov %edx,-0x88(%ebp)
11a9c2: e8 3d f0 ff ff call 119a04 <rtems_rfs_block_map_seek>
11a9c7: 89 c3 mov %eax,%ebx
if (rc > 0)
11a9c9: 83 c4 20 add $0x20,%esp
11a9cc: 85 c0 test %eax,%eax
11a9ce: 0f 8e e0 02 00 00 jle 11acb4 <rtems_rfs_dir_lookup_ino+0x3f4><== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
11a9d4: 52 push %edx <== NOT EXECUTED
11a9d5: 52 push %edx <== NOT EXECUTED
11a9d6: 6a 00 push $0x0 <== NOT EXECUTED
11a9d8: 68 00 00 00 04 push $0x4000000 <== NOT EXECUTED
11a9dd: e8 ba 8e ff ff call 11389c <rtems_rfs_trace> <== NOT EXECUTED
11a9e2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11a9e5: 84 c0 test %al,%al <== NOT EXECUTED
11a9e7: 74 1b je 11aa04 <rtems_rfs_dir_lookup_ino+0x144><== NOT EXECUTED
printf ("rtems-rfs: dir-lookup-ino: block map find failed: %d: %s\n",
11a9e9: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11a9ec: 53 push %ebx <== NOT EXECUTED
11a9ed: e8 d2 66 00 00 call 1210c4 <strerror> <== NOT EXECUTED
11a9f2: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
11a9f5: 50 push %eax <== NOT EXECUTED
11a9f6: 53 push %ebx <== NOT EXECUTED
11a9f7: 68 ed 12 13 00 push $0x1312ed <== NOT EXECUTED
11a9fc: e8 3b 59 00 00 call 12033c <printf> <== NOT EXECUTED
11aa01: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rc, strerror (rc));
if (rc == ENXIO)
11aa04: 83 fb 06 cmp $0x6,%ebx <== NOT EXECUTED
11aa07: 0f 85 dc 02 00 00 jne 11ace9 <rtems_rfs_dir_lookup_ino+0x429><== NOT EXECUTED
rc = ENOENT;
11aa0d: b3 02 mov $0x2,%bl <== NOT EXECUTED
11aa0f: e9 d5 02 00 00 jmp 11ace9 <rtems_rfs_dir_lookup_ino+0x429><== NOT EXECUTED
while ((rc == 0) && block)
{
uint8_t* entry;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
11aa14: 50 push %eax
11aa15: 50 push %eax
11aa16: 6a 00 push $0x0
11aa18: 68 00 00 00 04 push $0x4000000
11aa1d: e8 7a 8e ff ff call 11389c <rtems_rfs_trace>
11aa22: 83 c4 10 add $0x10,%esp
11aa25: 84 c0 test %al,%al
11aa27: 74 17 je 11aa40 <rtems_rfs_dir_lookup_ino+0x180><== ALWAYS TAKEN
printf ("rtems-rfs: dir-lookup-ino: block read, ino=%" PRIu32 " bno=%" PRId32 "\n",
11aa29: 50 push %eax <== NOT EXECUTED
11aa2a: ff 75 a8 pushl -0x58(%ebp) <== NOT EXECUTED
11aa2d: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED
11aa30: ff 71 08 pushl 0x8(%ecx) <== NOT EXECUTED
11aa33: 68 27 13 13 00 push $0x131327 <== NOT EXECUTED
11aa38: e8 ff 58 00 00 call 12033c <printf> <== NOT EXECUTED
11aa3d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_rfs_inode_ino (inode), map.bpos.bno);
rc = rtems_rfs_buffer_handle_request (fs, &entries, block, true);
11aa40: 6a 01 push $0x1
11aa42: ff 75 88 pushl -0x78(%ebp)
11aa45: 8d 45 8c lea -0x74(%ebp),%eax
11aa48: 50 push %eax
11aa49: 57 push %edi
11aa4a: e8 5b f8 ff ff call 11a2aa <rtems_rfs_buffer_handle_request>
11aa4f: 89 45 80 mov %eax,-0x80(%ebp)
if (rc > 0)
11aa52: 83 c4 10 add $0x10,%esp
11aa55: 85 c0 test %eax,%eax
11aa57: 7e 45 jle 11aa9e <rtems_rfs_dir_lookup_ino+0x1de><== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
11aa59: 50 push %eax <== NOT EXECUTED
11aa5a: 50 push %eax <== NOT EXECUTED
11aa5b: 6a 00 push $0x0 <== NOT EXECUTED
11aa5d: 68 00 00 00 04 push $0x4000000 <== NOT EXECUTED
11aa62: e8 35 8e ff ff call 11389c <rtems_rfs_trace> <== NOT EXECUTED
11aa67: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11aa6a: 84 c0 test %al,%al <== NOT EXECUTED
11aa6c: 0f 84 9e 02 00 00 je 11ad10 <rtems_rfs_dir_lookup_ino+0x450><== NOT EXECUTED
printf ("rtems-rfs: dir-lookup-ino: block read, ino=%" PRIu32 " block=%" PRId32 ": %d: %s\n",
11aa72: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11aa75: ff 75 80 pushl -0x80(%ebp) <== NOT EXECUTED
11aa78: e8 47 66 00 00 call 1210c4 <strerror> <== NOT EXECUTED
11aa7d: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
11aa80: ff 75 80 pushl -0x80(%ebp) <== NOT EXECUTED
11aa83: ff 75 88 pushl -0x78(%ebp) <== NOT EXECUTED
11aa86: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED
11aa89: ff 71 08 pushl 0x8(%ecx) <== NOT EXECUTED
11aa8c: 68 5f 13 13 00 push $0x13135f <== NOT EXECUTED
11aa91: e8 a6 58 00 00 call 12033c <printf> <== NOT EXECUTED
11aa96: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
11aa99: e9 72 02 00 00 jmp 11ad10 <rtems_rfs_dir_lookup_ino+0x450><== NOT EXECUTED
/*
* Search the block to see if the name matches. A hash of 0xffff or 0x0
* means the entry is empty.
*/
entry = rtems_rfs_buffer_data (&entries);
11aa9e: 8b 45 94 mov -0x6c(%ebp),%eax
11aaa1: 8b 70 1c mov 0x1c(%eax),%esi
map.bpos.boff = 0;
11aaa4: c7 45 ac 00 00 00 00 movl $0x0,-0x54(%ebp)
while (map.bpos.boff < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
11aaab: e9 8d 01 00 00 jmp 11ac3d <rtems_rfs_dir_lookup_ino+0x37d>
{
uint32_t ehash;
int elength;
ehash = rtems_rfs_dir_entry_hash (entry);
11aab0: 0f b6 56 04 movzbl 0x4(%esi),%edx
11aab4: c1 e2 18 shl $0x18,%edx
11aab7: 0f b6 46 05 movzbl 0x5(%esi),%eax
11aabb: c1 e0 10 shl $0x10,%eax
11aabe: 09 c2 or %eax,%edx
11aac0: 0f b6 46 07 movzbl 0x7(%esi),%eax
11aac4: 09 c2 or %eax,%edx
11aac6: 0f b6 46 06 movzbl 0x6(%esi),%eax
11aaca: c1 e0 08 shl $0x8,%eax
11aacd: 09 c2 or %eax,%edx
elength = rtems_rfs_dir_entry_length (entry);
11aacf: 0f b6 4e 08 movzbl 0x8(%esi),%ecx
11aad3: c1 e1 08 shl $0x8,%ecx
11aad6: 0f b6 46 09 movzbl 0x9(%esi),%eax
11aada: 09 c1 or %eax,%ecx
11aadc: 89 4d 84 mov %ecx,-0x7c(%ebp)
*ino = rtems_rfs_dir_entry_ino (entry);
11aadf: 0f b6 06 movzbl (%esi),%eax
11aae2: c1 e0 18 shl $0x18,%eax
11aae5: 0f b6 4e 01 movzbl 0x1(%esi),%ecx
11aae9: c1 e1 10 shl $0x10,%ecx
11aaec: 09 c8 or %ecx,%eax
11aaee: 0f b6 4e 03 movzbl 0x3(%esi),%ecx
11aaf2: 09 c8 or %ecx,%eax
11aaf4: 0f b6 4e 02 movzbl 0x2(%esi),%ecx
11aaf8: c1 e1 08 shl $0x8,%ecx
11aafb: 09 c8 or %ecx,%eax
11aafd: 8b 4d 18 mov 0x18(%ebp),%ecx
11ab00: 89 01 mov %eax,(%ecx)
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
11ab02: 81 7d 84 ff ff 00 00 cmpl $0xffff,-0x7c(%ebp)
11ab09: 75 0f jne 11ab1a <rtems_rfs_dir_lookup_ino+0x25a>
map.bpos.boff += elength;
entry += elength;
}
if (rc == 0)
11ab0b: 83 7d 80 00 cmpl $0x0,-0x80(%ebp)
11ab0f: 0f 85 9c 01 00 00 jne 11acb1 <rtems_rfs_dir_lookup_ino+0x3f1><== NEVER TAKEN
11ab15: e9 37 01 00 00 jmp 11ac51 <rtems_rfs_dir_lookup_ino+0x391>
*ino = rtems_rfs_dir_entry_ino (entry);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
break;
if (rtems_rfs_dir_entry_valid (fs, elength, *ino))
11ab1a: 83 7d 84 0a cmpl $0xa,-0x7c(%ebp)
11ab1e: 7f 1b jg 11ab3b <rtems_rfs_dir_lookup_ino+0x27b><== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
11ab20: 50 push %eax <== NOT EXECUTED
11ab21: 50 push %eax <== NOT EXECUTED
11ab22: 6a 00 push $0x0 <== NOT EXECUTED
11ab24: 68 00 00 00 04 push $0x4000000 <== NOT EXECUTED
11ab29: e8 6e 8d ff ff call 11389c <rtems_rfs_trace> <== NOT EXECUTED
11ab2e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11ab31: 84 c0 test %al,%al <== NOT EXECUTED
11ab33: 0f 84 cb 01 00 00 je 11ad04 <rtems_rfs_dir_lookup_ino+0x444><== NOT EXECUTED
11ab39: eb 13 jmp 11ab4e <rtems_rfs_dir_lookup_ino+0x28e><== NOT EXECUTED
*ino = rtems_rfs_dir_entry_ino (entry);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
break;
if (rtems_rfs_dir_entry_valid (fs, elength, *ino))
11ab3b: 8b 4d 84 mov -0x7c(%ebp),%ecx
11ab3e: 3b 4f 1c cmp 0x1c(%edi),%ecx
11ab41: 73 dd jae 11ab20 <rtems_rfs_dir_lookup_ino+0x260><== NEVER TAKEN
11ab43: 85 c0 test %eax,%eax
11ab45: 74 d9 je 11ab20 <rtems_rfs_dir_lookup_ino+0x260><== NEVER TAKEN
11ab47: 3b 47 14 cmp 0x14(%edi),%eax
11ab4a: 76 28 jbe 11ab74 <rtems_rfs_dir_lookup_ino+0x2b4><== ALWAYS TAKEN
11ab4c: eb d2 jmp 11ab20 <rtems_rfs_dir_lookup_ino+0x260><== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
printf ("rtems-rfs: dir-lookup-ino: "
11ab4e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11ab51: ff 75 ac pushl -0x54(%ebp) <== NOT EXECUTED
11ab54: 8b 4d 18 mov 0x18(%ebp),%ecx <== NOT EXECUTED
11ab57: ff 31 pushl (%ecx) <== NOT EXECUTED
11ab59: ff 75 84 pushl -0x7c(%ebp) <== NOT EXECUTED
11ab5c: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED
11ab5f: ff 71 08 pushl 0x8(%ecx) <== NOT EXECUTED
11ab62: 68 a1 13 13 00 push $0x1313a1 <== NOT EXECUTED
11ab67: e8 d0 57 00 00 call 12033c <printf> <== NOT EXECUTED
11ab6c: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
11ab6f: e9 90 01 00 00 jmp 11ad04 <rtems_rfs_dir_lookup_ino+0x444><== NOT EXECUTED
rtems_rfs_inode_ino (inode), elength, *ino, map.bpos.boff);
rc = EIO;
break;
}
if (ehash == hash)
11ab74: 3b 95 7c ff ff ff cmp -0x84(%ebp),%edx
11ab7a: 0f 85 b5 00 00 00 jne 11ac35 <rtems_rfs_dir_lookup_ino+0x375>
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO_CHECK))
11ab80: 50 push %eax
11ab81: 50 push %eax
11ab82: 6a 00 push $0x0
11ab84: 68 00 00 00 08 push $0x8000000
11ab89: e8 0e 8d ff ff call 11389c <rtems_rfs_trace>
11ab8e: 83 c4 10 add $0x10,%esp
11ab91: 84 c0 test %al,%al
11ab93: 74 3d je 11abd2 <rtems_rfs_dir_lookup_ino+0x312><== ALWAYS TAKEN
printf ("rtems-rfs: dir-lookup-ino: "
11ab95: 50 push %eax <== NOT EXECUTED
11ab96: 50 push %eax <== NOT EXECUTED
"checking entry for ino %" PRId32 ": bno=%04" PRIx32 "/off=%04" PRIx32
" length:%d ino:%" PRId32 "\n",
rtems_rfs_inode_ino (inode), map.bpos.bno, map.bpos.boff,
elength, rtems_rfs_dir_entry_ino (entry));
11ab97: 0f b6 06 movzbl (%esi),%eax <== NOT EXECUTED
11ab9a: c1 e0 18 shl $0x18,%eax <== NOT EXECUTED
11ab9d: 0f b6 4e 01 movzbl 0x1(%esi),%ecx <== NOT EXECUTED
11aba1: c1 e1 10 shl $0x10,%ecx <== NOT EXECUTED
11aba4: 09 c8 or %ecx,%eax <== NOT EXECUTED
11aba6: 0f b6 4e 03 movzbl 0x3(%esi),%ecx <== NOT EXECUTED
11abaa: 09 c8 or %ecx,%eax <== NOT EXECUTED
11abac: 0f b6 4e 02 movzbl 0x2(%esi),%ecx <== NOT EXECUTED
11abb0: c1 e1 08 shl $0x8,%ecx <== NOT EXECUTED
}
if (ehash == hash)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO_CHECK))
printf ("rtems-rfs: dir-lookup-ino: "
11abb3: 09 c8 or %ecx,%eax <== NOT EXECUTED
11abb5: 50 push %eax <== NOT EXECUTED
11abb6: ff 75 84 pushl -0x7c(%ebp) <== NOT EXECUTED
11abb9: ff 75 ac pushl -0x54(%ebp) <== NOT EXECUTED
11abbc: ff 75 a8 pushl -0x58(%ebp) <== NOT EXECUTED
11abbf: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED
11abc2: ff 71 08 pushl 0x8(%ecx) <== NOT EXECUTED
11abc5: 68 eb 13 13 00 push $0x1313eb <== NOT EXECUTED
11abca: e8 6d 57 00 00 call 12033c <printf> <== NOT EXECUTED
11abcf: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
"checking entry for ino %" PRId32 ": bno=%04" PRIx32 "/off=%04" PRIx32
" length:%d ino:%" PRId32 "\n",
rtems_rfs_inode_ino (inode), map.bpos.bno, map.bpos.boff,
elength, rtems_rfs_dir_entry_ino (entry));
if (memcmp (entry + RTEMS_RFS_DIR_ENTRY_SIZE, name, length) == 0)
11abd2: 51 push %ecx
11abd3: ff 75 14 pushl 0x14(%ebp)
11abd6: ff 75 10 pushl 0x10(%ebp)
11abd9: 8d 46 0a lea 0xa(%esi),%eax
11abdc: 50 push %eax
11abdd: e8 d6 54 00 00 call 1200b8 <memcmp>
11abe2: 83 c4 10 add $0x10,%esp
11abe5: 85 c0 test %eax,%eax
11abe7: 75 4c jne 11ac35 <rtems_rfs_dir_lookup_ino+0x375><== NEVER TAKEN
{
*offset = rtems_rfs_block_map_pos (fs, &map);
11abe9: 56 push %esi
11abea: 56 push %esi
11abeb: 8d 45 a8 lea -0x58(%ebp),%eax
11abee: 50 push %eax
11abef: 57 push %edi
11abf0: e8 08 e9 ff ff call 1194fd <rtems_rfs_block_get_pos>
11abf5: 8b 4d 1c mov 0x1c(%ebp),%ecx
11abf8: 89 01 mov %eax,(%ecx)
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO_FOUND))
11abfa: 58 pop %eax
11abfb: 5a pop %edx
11abfc: 6a 00 push $0x0
11abfe: 68 00 00 00 10 push $0x10000000
11ac03: e8 94 8c ff ff call 11389c <rtems_rfs_trace>
11ac08: 83 c4 10 add $0x10,%esp
11ac0b: 84 c0 test %al,%al
11ac0d: 0f 84 d6 00 00 00 je 11ace9 <rtems_rfs_dir_lookup_ino+0x429><== ALWAYS TAKEN
printf ("rtems-rfs: dir-lookup-ino: "
11ac13: 8b 4d 1c mov 0x1c(%ebp),%ecx <== NOT EXECUTED
11ac16: ff 31 pushl (%ecx) <== NOT EXECUTED
11ac18: 8b 4d 18 mov 0x18(%ebp),%ecx <== NOT EXECUTED
11ac1b: ff 31 pushl (%ecx) <== NOT EXECUTED
11ac1d: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED
11ac20: ff 71 08 pushl 0x8(%ecx) <== NOT EXECUTED
11ac23: 68 49 14 13 00 push $0x131449 <== NOT EXECUTED
11ac28: e8 0f 57 00 00 call 12033c <printf> <== NOT EXECUTED
11ac2d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11ac30: e9 b4 00 00 00 jmp 11ace9 <rtems_rfs_dir_lookup_ino+0x429><== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
return 0;
}
}
map.bpos.boff += elength;
11ac35: 8b 55 84 mov -0x7c(%ebp),%edx
11ac38: 01 55 ac add %edx,-0x54(%ebp)
entry += elength;
11ac3b: 01 d6 add %edx,%esi
entry = rtems_rfs_buffer_data (&entries);
map.bpos.boff = 0;
while (map.bpos.boff < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
11ac3d: 8b 47 08 mov 0x8(%edi),%eax
11ac40: 83 e8 0a sub $0xa,%eax
11ac43: 39 45 ac cmp %eax,-0x54(%ebp)
11ac46: 0f 82 64 fe ff ff jb 11aab0 <rtems_rfs_dir_lookup_ino+0x1f0><== ALWAYS TAKEN
11ac4c: e9 ba fe ff ff jmp 11ab0b <rtems_rfs_dir_lookup_ino+0x24b><== NOT EXECUTED
entry += elength;
}
if (rc == 0)
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
11ac51: 53 push %ebx
11ac52: 8d 4d 88 lea -0x78(%ebp),%ecx
11ac55: 51 push %ecx
11ac56: 8d 45 98 lea -0x68(%ebp),%eax
11ac59: 50 push %eax
11ac5a: 57 push %edi
11ac5b: e8 0e ee ff ff call 119a6e <rtems_rfs_block_map_next_block>
11ac60: 89 c3 mov %eax,%ebx
if ((rc > 0) && (rc != ENXIO))
11ac62: 83 c4 10 add $0x10,%esp
11ac65: 83 f8 06 cmp $0x6,%eax
11ac68: 74 04 je 11ac6e <rtems_rfs_dir_lookup_ino+0x3ae><== ALWAYS TAKEN
11ac6a: 85 c0 test %eax,%eax <== NOT EXECUTED
11ac6c: 7f 07 jg 11ac75 <rtems_rfs_dir_lookup_ino+0x3b5><== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
printf ("rtems-rfs: dir-lookup-ino: "
"block map next block failed in ino %" PRIu32 ": %d: %s\n",
rtems_rfs_inode_ino (inode), rc, strerror (rc));
}
if (rc == ENXIO)
11ac6e: 83 fb 06 cmp $0x6,%ebx
11ac71: 75 41 jne 11acb4 <rtems_rfs_dir_lookup_ino+0x3f4><== NEVER TAKEN
11ac73: eb 35 jmp 11acaa <rtems_rfs_dir_lookup_ino+0x3ea>
if (rc == 0)
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
if ((rc > 0) && (rc != ENXIO))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
11ac75: 51 push %ecx <== NOT EXECUTED
11ac76: 51 push %ecx <== NOT EXECUTED
11ac77: 6a 00 push $0x0 <== NOT EXECUTED
11ac79: 68 00 00 00 04 push $0x4000000 <== NOT EXECUTED
11ac7e: e8 19 8c ff ff call 11389c <rtems_rfs_trace> <== NOT EXECUTED
11ac83: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11ac86: 84 c0 test %al,%al <== NOT EXECUTED
11ac88: 74 e4 je 11ac6e <rtems_rfs_dir_lookup_ino+0x3ae><== NOT EXECUTED
printf ("rtems-rfs: dir-lookup-ino: "
11ac8a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11ac8d: 53 push %ebx <== NOT EXECUTED
11ac8e: e8 31 64 00 00 call 1210c4 <strerror> <== NOT EXECUTED
11ac93: 50 push %eax <== NOT EXECUTED
11ac94: 53 push %ebx <== NOT EXECUTED
11ac95: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED
11ac98: ff 71 08 pushl 0x8(%ecx) <== NOT EXECUTED
11ac9b: 68 90 14 13 00 push $0x131490 <== NOT EXECUTED
11aca0: e8 97 56 00 00 call 12033c <printf> <== NOT EXECUTED
11aca5: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
11aca8: eb 0a jmp 11acb4 <rtems_rfs_dir_lookup_ino+0x3f4><== NOT EXECUTED
"block map next block failed in ino %" PRIu32 ": %d: %s\n",
rtems_rfs_inode_ino (inode), rc, strerror (rc));
}
if (rc == ENXIO)
rc = ENOENT;
11acaa: bb 02 00 00 00 mov $0x2,%ebx
11acaf: eb 5c jmp 11ad0d <rtems_rfs_dir_lookup_ino+0x44d>
11acb1: 8b 5d 80 mov -0x80(%ebp),%ebx <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &entries);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
while ((rc == 0) && block)
11acb4: 85 db test %ebx,%ebx
11acb6: 75 55 jne 11ad0d <rtems_rfs_dir_lookup_ino+0x44d><== NEVER TAKEN
11acb8: 83 7d 88 00 cmpl $0x0,-0x78(%ebp)
11acbc: 0f 85 52 fd ff ff jne 11aa14 <rtems_rfs_dir_lookup_ino+0x154><== ALWAYS TAKEN
11acc2: eb 51 jmp 11ad15 <rtems_rfs_dir_lookup_ino+0x455><== NOT EXECUTED
if ((rc == 0) && (block == 0))
{
rc = EIO;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
printf ("rtems-rfs: dir-lookup-ino: block is 0 in ino %" PRIu32 ": %d: %s\n",
11acc4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11acc7: 6a 05 push $0x5 <== NOT EXECUTED
11acc9: e8 f6 63 00 00 call 1210c4 <strerror> <== NOT EXECUTED
11acce: 50 push %eax <== NOT EXECUTED
11accf: 6a 05 push $0x5 <== NOT EXECUTED
11acd1: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED
11acd4: ff 71 08 pushl 0x8(%ecx) <== NOT EXECUTED
11acd7: 68 db 14 13 00 push $0x1314db <== NOT EXECUTED
11acdc: e8 5b 56 00 00 call 12033c <printf> <== NOT EXECUTED
11ace1: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
}
}
if ((rc == 0) && (block == 0))
{
rc = EIO;
11ace4: bb 05 00 00 00 mov $0x5,%ebx <== NOT EXECUTED
printf ("rtems-rfs: dir-lookup-ino: block is 0 in ino %" PRIu32 ": %d: %s\n",
rtems_rfs_inode_ino (inode), rc, strerror (rc));
}
}
rtems_rfs_buffer_handle_close (fs, &entries);
11ace9: 8d 55 8c lea -0x74(%ebp),%edx
11acec: 89 f8 mov %edi,%eax
11acee: e8 a5 fb ff ff call 11a898 <rtems_rfs_buffer_handle_close>
rtems_rfs_block_map_close (fs, &map);
11acf3: 52 push %edx
11acf4: 52 push %edx
11acf5: 8d 45 98 lea -0x68(%ebp),%eax
11acf8: 50 push %eax
11acf9: 57 push %edi
11acfa: e8 4a ea ff ff call 119749 <rtems_rfs_block_map_close>
11acff: 83 c4 10 add $0x10,%esp
11ad02: eb 28 jmp 11ad2c <rtems_rfs_dir_lookup_ino+0x46c>
printf ("rtems-rfs: dir-lookup-ino: "
"block map next block failed in ino %" PRIu32 ": %d: %s\n",
rtems_rfs_inode_ino (inode), rc, strerror (rc));
}
if (rc == ENXIO)
rc = ENOENT;
11ad04: c7 45 80 05 00 00 00 movl $0x5,-0x80(%ebp) <== NOT EXECUTED
11ad0b: eb a4 jmp 11acb1 <rtems_rfs_dir_lookup_ino+0x3f1><== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &entries);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
while ((rc == 0) && block)
11ad0d: 89 5d 80 mov %ebx,-0x80(%ebp)
printf ("rtems-rfs: dir-lookup-ino: "
"block map next block failed in ino %" PRIu32 ": %d: %s\n",
rtems_rfs_inode_ino (inode), rc, strerror (rc));
}
if (rc == ENXIO)
rc = ENOENT;
11ad10: 8b 5d 80 mov -0x80(%ebp),%ebx
11ad13: eb d4 jmp 11ace9 <rtems_rfs_dir_lookup_ino+0x429>
}
if ((rc == 0) && (block == 0))
{
rc = EIO;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
11ad15: 50 push %eax <== NOT EXECUTED
11ad16: 50 push %eax <== NOT EXECUTED
11ad17: 6a 00 push $0x0 <== NOT EXECUTED
11ad19: 68 00 00 00 04 push $0x4000000 <== NOT EXECUTED
11ad1e: e8 79 8b ff ff call 11389c <rtems_rfs_trace> <== NOT EXECUTED
11ad23: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11ad26: 84 c0 test %al,%al <== NOT EXECUTED
11ad28: 75 9a jne 11acc4 <rtems_rfs_dir_lookup_ino+0x404><== NOT EXECUTED
11ad2a: eb b8 jmp 11ace4 <rtems_rfs_dir_lookup_ino+0x424><== NOT EXECUTED
}
rtems_rfs_buffer_handle_close (fs, &entries);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
11ad2c: 89 d8 mov %ebx,%eax
11ad2e: 8d 65 f4 lea -0xc(%ebp),%esp
11ad31: 5b pop %ebx
11ad32: 5e pop %esi
11ad33: 5f pop %edi
11ad34: 5d pop %ebp
11ad35: c3 ret
0011b422 <rtems_rfs_dir_read>:
rtems_rfs_dir_read (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* dir,
rtems_rfs_pos_rel offset,
struct dirent* dirent,
size_t* length)
{
11b422: 55 push %ebp
11b423: 89 e5 mov %esp,%ebp
11b425: 57 push %edi
11b426: 56 push %esi
11b427: 53 push %ebx
11b428: 81 ec 94 00 00 00 sub $0x94,%esp
11b42e: 8b 45 10 mov 0x10(%ebp),%eax
11b431: 8b 55 14 mov 0x14(%ebp),%edx
11b434: 89 85 78 ff ff ff mov %eax,-0x88(%ebp)
11b43a: 89 95 7c ff ff ff mov %edx,-0x84(%ebp)
rtems_rfs_block_map map;
rtems_rfs_buffer_handle buffer;
rtems_rfs_block_no block;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
11b440: 6a 00 push $0x0
11b442: 68 00 00 00 80 push $0x80000000
11b447: e8 50 84 ff ff call 11389c <rtems_rfs_trace>
11b44c: 83 c4 10 add $0x10,%esp
11b44f: 84 c0 test %al,%al
11b451: 74 1f je 11b472 <rtems_rfs_dir_read+0x50><== ALWAYS TAKEN
printf ("rtems-rfs: dir-read: dir=%" PRId32 " offset=%" PRId64 "\n",
11b453: ff b5 7c ff ff ff pushl -0x84(%ebp) <== NOT EXECUTED
11b459: ff b5 78 ff ff ff pushl -0x88(%ebp) <== NOT EXECUTED
11b45f: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED
11b462: ff 71 08 pushl 0x8(%ecx) <== NOT EXECUTED
11b465: 68 d4 17 13 00 push $0x1317d4 <== NOT EXECUTED
11b46a: e8 cd 4e 00 00 call 12033c <printf> <== NOT EXECUTED
11b46f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_rfs_inode_ino (dir), offset);
*length = 0;
11b472: 8b 5d 1c mov 0x1c(%ebp),%ebx
11b475: c7 03 00 00 00 00 movl $0x0,(%ebx)
rc = rtems_rfs_block_map_open (fs, dir, &map);
11b47b: 51 push %ecx
11b47c: 8d 45 98 lea -0x68(%ebp),%eax
11b47f: 50 push %eax
11b480: ff 75 0c pushl 0xc(%ebp)
11b483: ff 75 08 pushl 0x8(%ebp)
11b486: e8 17 e1 ff ff call 1195a2 <rtems_rfs_block_map_open>
11b48b: 89 45 84 mov %eax,-0x7c(%ebp)
if (rc > 0)
11b48e: 83 c4 10 add $0x10,%esp
11b491: 85 c0 test %eax,%eax
11b493: 0f 8f e1 02 00 00 jg 11b77a <rtems_rfs_dir_read+0x358><== NEVER TAKEN
return rc;
if (((rtems_rfs_fs_block_size (fs) -
(offset % rtems_rfs_fs_block_size (fs))) <= RTEMS_RFS_DIR_ENTRY_SIZE))
11b499: 8b 5d 08 mov 0x8(%ebp),%ebx
11b49c: 8b 73 08 mov 0x8(%ebx),%esi
11b49f: 31 ff xor %edi,%edi
11b4a1: 57 push %edi
11b4a2: 56 push %esi
11b4a3: ff b5 7c ff ff ff pushl -0x84(%ebp)
11b4a9: ff b5 78 ff ff ff pushl -0x88(%ebp)
11b4af: e8 14 0c 01 00 call 12c0c8 <__moddi3>
11b4b4: 83 c4 10 add $0x10,%esp
rc = rtems_rfs_block_map_open (fs, dir, &map);
if (rc > 0)
return rc;
if (((rtems_rfs_fs_block_size (fs) -
11b4b7: 89 f1 mov %esi,%ecx
11b4b9: 89 fb mov %edi,%ebx
11b4bb: 29 c1 sub %eax,%ecx
11b4bd: 19 d3 sbb %edx,%ebx
11b4bf: 83 fb 00 cmp $0x0,%ebx
11b4c2: 7f 56 jg 11b51a <rtems_rfs_dir_read+0xf8><== NEVER TAKEN
11b4c4: 7c 05 jl 11b4cb <rtems_rfs_dir_read+0xa9><== NEVER TAKEN
11b4c6: 83 f9 0a cmp $0xa,%ecx
11b4c9: 77 4f ja 11b51a <rtems_rfs_dir_read+0xf8><== ALWAYS TAKEN
(offset % rtems_rfs_fs_block_size (fs))) <= RTEMS_RFS_DIR_ENTRY_SIZE))
offset = (((offset / rtems_rfs_fs_block_size (fs)) + 1) *
11b4cb: 57 push %edi <== NOT EXECUTED
11b4cc: 56 push %esi <== NOT EXECUTED
11b4cd: ff b5 7c ff ff ff pushl -0x84(%ebp) <== NOT EXECUTED
11b4d3: ff b5 78 ff ff ff pushl -0x88(%ebp) <== NOT EXECUTED
11b4d9: e8 96 0a 01 00 call 12bf74 <__divdi3> <== NOT EXECUTED
11b4de: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11b4e1: 89 85 78 ff ff ff mov %eax,-0x88(%ebp) <== NOT EXECUTED
11b4e7: 89 95 7c ff ff ff mov %edx,-0x84(%ebp) <== NOT EXECUTED
11b4ed: 83 85 78 ff ff ff 01 addl $0x1,-0x88(%ebp) <== NOT EXECUTED
11b4f4: 83 95 7c ff ff ff 00 adcl $0x0,-0x84(%ebp) <== NOT EXECUTED
11b4fb: 8b 8d 7c ff ff ff mov -0x84(%ebp),%ecx <== NOT EXECUTED
11b501: 0f af ce imul %esi,%ecx <== NOT EXECUTED
11b504: 8b 85 78 ff ff ff mov -0x88(%ebp),%eax <== NOT EXECUTED
11b50a: f7 e6 mul %esi <== NOT EXECUTED
11b50c: 89 85 78 ff ff ff mov %eax,-0x88(%ebp) <== NOT EXECUTED
11b512: 01 ca add %ecx,%edx <== NOT EXECUTED
11b514: 89 95 7c ff ff ff mov %edx,-0x84(%ebp) <== NOT EXECUTED
rtems_rfs_fs_block_size (fs));
rc = rtems_rfs_block_map_seek (fs, &map, offset, &block);
11b51a: 83 ec 0c sub $0xc,%esp
11b51d: 8d 5d 88 lea -0x78(%ebp),%ebx
11b520: 53 push %ebx
11b521: ff b5 7c ff ff ff pushl -0x84(%ebp)
11b527: ff b5 78 ff ff ff pushl -0x88(%ebp)
11b52d: 8d 45 98 lea -0x68(%ebp),%eax
11b530: 50 push %eax
11b531: ff 75 08 pushl 0x8(%ebp)
11b534: e8 cb e4 ff ff call 119a04 <rtems_rfs_block_map_seek>
11b539: 89 45 84 mov %eax,-0x7c(%ebp)
if (rc > 0)
11b53c: 83 c4 20 add $0x20,%esp
11b53f: 85 c0 test %eax,%eax
11b541: 7e 15 jle 11b558 <rtems_rfs_dir_read+0x136><== ALWAYS TAKEN
{
if (rc == ENXIO)
11b543: 83 f8 06 cmp $0x6,%eax <== NOT EXECUTED
11b546: 0f 85 1d 02 00 00 jne 11b769 <rtems_rfs_dir_read+0x347><== NOT EXECUTED
rc = ENOENT;
11b54c: c7 45 84 02 00 00 00 movl $0x2,-0x7c(%ebp) <== NOT EXECUTED
11b553: e9 11 02 00 00 jmp 11b769 <rtems_rfs_dir_read+0x347><== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
11b558: c6 45 8c 00 movb $0x0,-0x74(%ebp)
handle->bnum = 0;
11b55c: c7 45 90 00 00 00 00 movl $0x0,-0x70(%ebp)
handle->buffer = NULL;
11b563: c7 45 94 00 00 00 00 movl $0x0,-0x6c(%ebp)
uint8_t* entry;
rtems_rfs_ino eino;
int elength;
int remaining;
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
11b56a: 8d 7d 8c lea -0x74(%ebp),%edi
11b56d: 6a 01 push $0x1
11b56f: ff 75 88 pushl -0x78(%ebp)
11b572: 57 push %edi
11b573: ff 75 08 pushl 0x8(%ebp)
11b576: e8 2f ed ff ff call 11a2aa <rtems_rfs_buffer_handle_request>
11b57b: 89 45 84 mov %eax,-0x7c(%ebp)
if (rc > 0)
11b57e: 83 c4 10 add $0x10,%esp
11b581: 85 c0 test %eax,%eax
11b583: 7e 07 jle 11b58c <rtems_rfs_dir_read+0x16a><== ALWAYS TAKEN
{
rtems_rfs_buffer_handle_close (fs, &buffer);
11b585: 89 fa mov %edi,%edx <== NOT EXECUTED
11b587: e9 d5 01 00 00 jmp 11b761 <rtems_rfs_dir_read+0x33f><== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
return rc;
}
entry = rtems_rfs_buffer_data (&buffer);
entry += map.bpos.boff;
11b58c: 8b 55 ac mov -0x54(%ebp),%edx
11b58f: 89 55 80 mov %edx,-0x80(%ebp)
11b592: 8b 45 94 mov -0x6c(%ebp),%eax
11b595: 03 50 1c add 0x1c(%eax),%edx
elength = rtems_rfs_dir_entry_length (entry);
11b598: 0f b6 72 08 movzbl 0x8(%edx),%esi
11b59c: c1 e6 08 shl $0x8,%esi
11b59f: 0f b6 42 09 movzbl 0x9(%edx),%eax
11b5a3: 09 c6 or %eax,%esi
eino = rtems_rfs_dir_entry_ino (entry);
11b5a5: 8a 1a mov (%edx),%bl
11b5a7: 0f b6 42 01 movzbl 0x1(%edx),%eax
11b5ab: 8a 4a 02 mov 0x2(%edx),%cl
11b5ae: 88 8d 76 ff ff ff mov %cl,-0x8a(%ebp)
11b5b4: 8a 4a 03 mov 0x3(%edx),%cl
11b5b7: 88 8d 77 ff ff ff mov %cl,-0x89(%ebp)
if (elength != RTEMS_RFS_DIR_ENTRY_EMPTY)
11b5bd: 81 fe ff ff 00 00 cmp $0xffff,%esi
11b5c3: 0f 84 2a 01 00 00 je 11b6f3 <rtems_rfs_dir_read+0x2d1>
entry = rtems_rfs_buffer_data (&buffer);
entry += map.bpos.boff;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
11b5c9: c1 e3 18 shl $0x18,%ebx
11b5cc: c1 e0 10 shl $0x10,%eax
11b5cf: 09 c3 or %eax,%ebx
11b5d1: 0f b6 c1 movzbl %cl,%eax
11b5d4: 09 c3 or %eax,%ebx
11b5d6: 0f b6 8d 76 ff ff ff movzbl -0x8a(%ebp),%ecx
11b5dd: c1 e1 08 shl $0x8,%ecx
11b5e0: 09 cb or %ecx,%ebx
if (elength != RTEMS_RFS_DIR_ENTRY_EMPTY)
{
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
11b5e2: 83 fe 0a cmp $0xa,%esi
11b5e5: 7e 11 jle 11b5f8 <rtems_rfs_dir_read+0x1d6><== NEVER TAKEN
11b5e7: 8b 45 08 mov 0x8(%ebp),%eax
11b5ea: 3b 70 1c cmp 0x1c(%eax),%esi
11b5ed: 73 09 jae 11b5f8 <rtems_rfs_dir_read+0x1d6><== NEVER TAKEN
11b5ef: 85 db test %ebx,%ebx
11b5f1: 74 05 je 11b5f8 <rtems_rfs_dir_read+0x1d6><== NEVER TAKEN
11b5f3: 3b 58 14 cmp 0x14(%eax),%ebx
11b5f6: 76 38 jbe 11b630 <rtems_rfs_dir_read+0x20e><== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
11b5f8: 52 push %edx <== NOT EXECUTED
11b5f9: 52 push %edx <== NOT EXECUTED
11b5fa: 6a 00 push $0x0 <== NOT EXECUTED
11b5fc: 68 00 00 00 80 push $0x80000000 <== NOT EXECUTED
11b601: e8 96 82 ff ff call 11389c <rtems_rfs_trace> <== NOT EXECUTED
11b606: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
printf ("rtems-rfs: dir-read: "
"bad length or ino for ino %" PRIu32 ": %u/%" PRId32 " @ %04" PRIx32 "\n",
rtems_rfs_inode_ino (dir), elength, eino, map.bpos.boff);
rc = EIO;
11b609: c7 45 84 05 00 00 00 movl $0x5,-0x7c(%ebp) <== NOT EXECUTED
if (elength != RTEMS_RFS_DIR_ENTRY_EMPTY)
{
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
11b610: 84 c0 test %al,%al <== NOT EXECUTED
11b612: 0f 84 46 01 00 00 je 11b75e <rtems_rfs_dir_read+0x33c><== NOT EXECUTED
printf ("rtems-rfs: dir-read: "
11b618: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11b61b: ff 75 ac pushl -0x54(%ebp) <== NOT EXECUTED
11b61e: 53 push %ebx <== NOT EXECUTED
11b61f: 56 push %esi <== NOT EXECUTED
11b620: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED
11b623: ff 71 08 pushl 0x8(%ecx) <== NOT EXECUTED
11b626: 68 fe 17 13 00 push $0x1317fe <== NOT EXECUTED
11b62b: e9 b9 00 00 00 jmp 11b6e9 <rtems_rfs_dir_read+0x2c7><== NOT EXECUTED
rtems_rfs_inode_ino (dir), elength, eino, map.bpos.boff);
rc = EIO;
break;
}
memset (dirent, 0, sizeof (struct dirent));
11b630: b9 44 00 00 00 mov $0x44,%ecx
11b635: 31 c0 xor %eax,%eax
11b637: 8b 7d 18 mov 0x18(%ebp),%edi
11b63a: f3 ab rep stos %eax,%es:(%edi)
dirent->d_off = offset;
11b63c: 8b 8d 78 ff ff ff mov -0x88(%ebp),%ecx
11b642: 8b 9d 7c ff ff ff mov -0x84(%ebp),%ebx
11b648: 8b 45 18 mov 0x18(%ebp),%eax
11b64b: 89 48 04 mov %ecx,0x4(%eax)
11b64e: 89 58 08 mov %ebx,0x8(%eax)
dirent->d_reclen = sizeof (struct dirent);
11b651: 66 c7 40 0c 10 01 movw $0x110,0xc(%eax)
*length += elength;
11b657: 89 f1 mov %esi,%ecx
11b659: 8b 5d 1c mov 0x1c(%ebp),%ebx
11b65c: 03 0b add (%ebx),%ecx
11b65e: 89 0b mov %ecx,(%ebx)
remaining = rtems_rfs_fs_block_size (fs) - (map.bpos.boff + elength);
11b660: 8b 5d 08 mov 0x8(%ebp),%ebx
11b663: 8b 43 08 mov 0x8(%ebx),%eax
11b666: 2b 45 80 sub -0x80(%ebp),%eax
11b669: 29 f0 sub %esi,%eax
if (remaining <= RTEMS_RFS_DIR_ENTRY_SIZE)
11b66b: 83 f8 0a cmp $0xa,%eax
11b66e: 7f 07 jg 11b677 <rtems_rfs_dir_read+0x255><== ALWAYS TAKEN
*length += remaining;
11b670: 01 c8 add %ecx,%eax <== NOT EXECUTED
11b672: 8b 5d 1c mov 0x1c(%ebp),%ebx <== NOT EXECUTED
11b675: 89 03 mov %eax,(%ebx) <== NOT EXECUTED
11b677: 8d 46 f6 lea -0xa(%esi),%eax
11b67a: 3d ff 00 00 00 cmp $0xff,%eax
11b67f: 7e 05 jle 11b686 <rtems_rfs_dir_read+0x264><== ALWAYS TAKEN
11b681: b8 ff 00 00 00 mov $0xff,%eax <== NOT EXECUTED
elength -= RTEMS_RFS_DIR_ENTRY_SIZE;
if (elength > NAME_MAX)
elength = NAME_MAX;
memcpy (dirent->d_name, entry + RTEMS_RFS_DIR_ENTRY_SIZE, elength);
11b686: 8b 5d 18 mov 0x18(%ebp),%ebx
11b689: 83 c3 10 add $0x10,%ebx
11b68c: 8d 72 0a lea 0xa(%edx),%esi
11b68f: 89 df mov %ebx,%edi
11b691: 89 c1 mov %eax,%ecx
11b693: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
dirent->d_ino = rtems_rfs_dir_entry_ino (entry);
11b695: 0f b6 0a movzbl (%edx),%ecx
11b698: c1 e1 18 shl $0x18,%ecx
11b69b: 0f b6 72 01 movzbl 0x1(%edx),%esi
11b69f: c1 e6 10 shl $0x10,%esi
11b6a2: 09 f1 or %esi,%ecx
11b6a4: 0f b6 72 03 movzbl 0x3(%edx),%esi
11b6a8: 09 f1 or %esi,%ecx
11b6aa: 0f b6 52 02 movzbl 0x2(%edx),%edx
11b6ae: c1 e2 08 shl $0x8,%edx
11b6b1: 09 d1 or %edx,%ecx
11b6b3: 8b 55 18 mov 0x18(%ebp),%edx
11b6b6: 89 0a mov %ecx,(%edx)
dirent->d_namlen = elength;
11b6b8: 66 89 42 0e mov %ax,0xe(%edx)
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
11b6bc: 50 push %eax
11b6bd: 50 push %eax
11b6be: 6a 00 push $0x0
11b6c0: 68 00 00 00 80 push $0x80000000
11b6c5: e8 d2 81 ff ff call 11389c <rtems_rfs_trace>
11b6ca: 83 c4 10 add $0x10,%esp
11b6cd: 84 c0 test %al,%al
11b6cf: 0f 84 89 00 00 00 je 11b75e <rtems_rfs_dir_read+0x33c><== ALWAYS TAKEN
printf ("rtems-rfs: dir-read: found off:%" PRIooff_t " ino:%ld name=%s\n",
11b6d5: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11b6d8: 53 push %ebx <== NOT EXECUTED
11b6d9: 8b 4d 18 mov 0x18(%ebp),%ecx <== NOT EXECUTED
11b6dc: ff 31 pushl (%ecx) <== NOT EXECUTED
11b6de: ff 71 08 pushl 0x8(%ecx) <== NOT EXECUTED
11b6e1: ff 71 04 pushl 0x4(%ecx) <== NOT EXECUTED
11b6e4: 68 42 18 13 00 push $0x131842 <== NOT EXECUTED
11b6e9: e8 4e 4c 00 00 call 12033c <printf> <== NOT EXECUTED
11b6ee: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
11b6f1: eb 6b jmp 11b75e <rtems_rfs_dir_read+0x33c><== NOT EXECUTED
dirent->d_off, dirent->d_ino, dirent->d_name);
break;
}
*length += rtems_rfs_fs_block_size (fs) - map.bpos.boff;
11b6f3: 8b 5d 08 mov 0x8(%ebp),%ebx
11b6f6: 8b 43 08 mov 0x8(%ebx),%eax
11b6f9: 2b 45 80 sub -0x80(%ebp),%eax
11b6fc: 8b 5d 1c mov 0x1c(%ebp),%ebx
11b6ff: 01 03 add %eax,(%ebx)
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
11b701: 50 push %eax
11b702: 50 push %eax
11b703: 6a 00 push $0x0
11b705: 68 00 00 00 80 push $0x80000000
11b70a: e8 8d 81 ff ff call 11389c <rtems_rfs_trace>
11b70f: 83 c4 10 add $0x10,%esp
11b712: 84 c0 test %al,%al
11b714: 74 1b je 11b731 <rtems_rfs_dir_read+0x30f><== ALWAYS TAKEN
printf ("rtems-rfs: dir-read: next block: off:%" PRId64 " length:%zd\n",
11b716: ff 33 pushl (%ebx) <== NOT EXECUTED
11b718: ff b5 7c ff ff ff pushl -0x84(%ebp) <== NOT EXECUTED
11b71e: ff b5 78 ff ff ff pushl -0x88(%ebp) <== NOT EXECUTED
11b724: 68 77 18 13 00 push $0x131877 <== NOT EXECUTED
11b729: e8 0e 4c 00 00 call 12033c <printf> <== NOT EXECUTED
11b72e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
offset, *length);
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
11b731: 50 push %eax
11b732: 8d 45 88 lea -0x78(%ebp),%eax
11b735: 50 push %eax
11b736: 8d 45 98 lea -0x68(%ebp),%eax
11b739: 50 push %eax
11b73a: ff 75 08 pushl 0x8(%ebp)
11b73d: e8 2c e3 ff ff call 119a6e <rtems_rfs_block_map_next_block>
11b742: 89 45 84 mov %eax,-0x7c(%ebp)
if (rc == ENXIO)
11b745: 83 c4 10 add $0x10,%esp
11b748: 83 f8 06 cmp $0x6,%eax
11b74b: 74 0a je 11b757 <rtems_rfs_dir_read+0x335><== ALWAYS TAKEN
/*
* Look for an empty entry and if this is the last block that is the end of
* the directory.
*/
while (rc == 0)
11b74d: 85 c0 test %eax,%eax <== NOT EXECUTED
11b74f: 0f 84 18 fe ff ff je 11b56d <rtems_rfs_dir_read+0x14b><== NOT EXECUTED
11b755: eb 07 jmp 11b75e <rtems_rfs_dir_read+0x33c><== NOT EXECUTED
printf ("rtems-rfs: dir-read: next block: off:%" PRId64 " length:%zd\n",
offset, *length);
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
if (rc == ENXIO)
rc = ENOENT;
11b757: c7 45 84 02 00 00 00 movl $0x2,-0x7c(%ebp)
}
rtems_rfs_buffer_handle_close (fs, &buffer);
11b75e: 8d 55 8c lea -0x74(%ebp),%edx
11b761: 8b 45 08 mov 0x8(%ebp),%eax
11b764: e8 2f f1 ff ff call 11a898 <rtems_rfs_buffer_handle_close>
rtems_rfs_block_map_close (fs, &map);
11b769: 50 push %eax
11b76a: 50 push %eax
11b76b: 8d 45 98 lea -0x68(%ebp),%eax
11b76e: 50 push %eax
11b76f: ff 75 08 pushl 0x8(%ebp)
11b772: e8 d2 df ff ff call 119749 <rtems_rfs_block_map_close>
11b777: 83 c4 10 add $0x10,%esp
return rc;
}
11b77a: 8b 45 84 mov -0x7c(%ebp),%eax
11b77d: 8d 65 f4 lea -0xc(%ebp),%esp
11b780: 5b pop %ebx
11b781: 5e pop %esi
11b782: 5f pop %edi
11b783: 5d pop %ebp
11b784: c3 ret
0011b960 <rtems_rfs_file_close>:
}
int
rtems_rfs_file_close (rtems_rfs_file_system* fs,
rtems_rfs_file_handle* handle)
{
11b960: 55 push %ebp
11b961: 89 e5 mov %esp,%ebp
11b963: 57 push %edi
11b964: 56 push %esi
11b965: 53 push %ebx
11b966: 83 ec 14 sub $0x14,%esp
11b969: 8b 5d 0c mov 0xc(%ebp),%ebx
int rrc;
int rc;
rrc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE))
11b96c: 6a 10 push $0x10
11b96e: 6a 00 push $0x0
11b970: e8 27 7f ff ff call 11389c <rtems_rfs_trace>
11b975: 83 c4 10 add $0x10,%esp
11b978: 84 c0 test %al,%al
11b97a: 74 15 je 11b991 <rtems_rfs_file_close+0x31><== ALWAYS TAKEN
printf ("rtems-rfs: file-close: entry: ino=%" PRId32 "\n",
11b97c: 51 push %ecx <== NOT EXECUTED
11b97d: 51 push %ecx <== NOT EXECUTED
handle->shared->inode.ino);
11b97e: 8b 43 1c mov 0x1c(%ebx),%eax <== NOT EXECUTED
int rc;
rrc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE))
printf ("rtems-rfs: file-close: entry: ino=%" PRId32 "\n",
11b981: ff 70 14 pushl 0x14(%eax) <== NOT EXECUTED
11b984: 68 10 19 13 00 push $0x131910 <== NOT EXECUTED
11b989: e8 ae 49 00 00 call 12033c <printf> <== NOT EXECUTED
11b98e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
handle->shared->inode.ino);
if (handle->shared->references > 0)
11b991: 8b 43 1c mov 0x1c(%ebx),%eax
11b994: 8b 50 08 mov 0x8(%eax),%edx
11b997: 85 d2 test %edx,%edx
11b999: 7e 04 jle 11b99f <rtems_rfs_file_close+0x3f><== NEVER TAKEN
handle->shared->references--;
11b99b: 4a dec %edx
11b99c: 89 50 08 mov %edx,0x8(%eax)
rtems_rfs_file_handle* handle)
{
int rrc;
int rc;
rrc = 0;
11b99f: 31 f6 xor %esi,%esi
handle->shared->inode.ino);
if (handle->shared->references > 0)
handle->shared->references--;
if (handle->shared->references == 0)
11b9a1: 83 78 08 00 cmpl $0x0,0x8(%eax)
11b9a5: 0f 85 9f 01 00 00 jne 11bb4a <rtems_rfs_file_close+0x1ea><== NEVER TAKEN
{
if (!rtems_rfs_inode_is_loaded (&handle->shared->inode))
11b9ab: 83 78 18 00 cmpl $0x0,0x18(%eax)
11b9af: 75 1b jne 11b9cc <rtems_rfs_file_close+0x6c><== NEVER TAKEN
rrc = rtems_rfs_inode_load (fs, &handle->shared->inode);
11b9b1: 52 push %edx
11b9b2: 52 push %edx
11b9b3: 83 c0 0c add $0xc,%eax
11b9b6: 50 push %eax
11b9b7: ff 75 08 pushl 0x8(%ebp)
11b9ba: e8 f3 67 ff ff call 1121b2 <rtems_rfs_inode_load>
11b9bf: 89 c6 mov %eax,%esi
if (rrc == 0)
11b9c1: 83 c4 10 add $0x10,%esp
11b9c4: 85 c0 test %eax,%eax
11b9c6: 0f 85 c7 00 00 00 jne 11ba93 <rtems_rfs_file_close+0x133><== NEVER TAKEN
{
/*
* @todo This could be clever and only update if different.
*/
rtems_rfs_inode_set_atime (&handle->shared->inode,
handle->shared->atime);
11b9cc: 8b 43 1c mov 0x1c(%ebx),%eax
if (rrc == 0)
{
/*
* @todo This could be clever and only update if different.
*/
rtems_rfs_inode_set_atime (&handle->shared->inode,
11b9cf: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx
*/
static inline void
rtems_rfs_inode_set_atime (rtems_rfs_inode_handle* handle,
rtems_rfs_time atime)
{
rtems_rfs_write_u32 (&handle->node->atime, atime);
11b9d5: 8b 70 18 mov 0x18(%eax),%esi
11b9d8: 89 d1 mov %edx,%ecx
11b9da: c1 e9 18 shr $0x18,%ecx
11b9dd: 88 4e 10 mov %cl,0x10(%esi)
11b9e0: 8b 70 18 mov 0x18(%eax),%esi
11b9e3: 89 d1 mov %edx,%ecx
11b9e5: c1 e9 10 shr $0x10,%ecx
11b9e8: 88 4e 11 mov %cl,0x11(%esi)
11b9eb: 8b 70 18 mov 0x18(%eax),%esi
11b9ee: 89 d1 mov %edx,%ecx
11b9f0: c1 e9 08 shr $0x8,%ecx
11b9f3: 88 4e 12 mov %cl,0x12(%esi)
11b9f6: 8b 48 18 mov 0x18(%eax),%ecx
11b9f9: 88 51 13 mov %dl,0x13(%ecx)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
11b9fc: c6 40 1c 01 movb $0x1,0x1c(%eax)
handle->shared->atime);
rtems_rfs_inode_set_mtime (&handle->shared->inode,
handle->shared->mtime);
11ba00: 8b 43 1c mov 0x1c(%ebx),%eax
/*
* @todo This could be clever and only update if different.
*/
rtems_rfs_inode_set_atime (&handle->shared->inode,
handle->shared->atime);
rtems_rfs_inode_set_mtime (&handle->shared->inode,
11ba03: 8b 90 90 00 00 00 mov 0x90(%eax),%edx
*/
static inline void
rtems_rfs_inode_set_mtime (rtems_rfs_inode_handle* handle,
rtems_rfs_time mtime)
{
rtems_rfs_write_u32 (&handle->node->mtime, mtime);
11ba09: 8b 70 18 mov 0x18(%eax),%esi
11ba0c: 89 d1 mov %edx,%ecx
11ba0e: c1 e9 18 shr $0x18,%ecx
11ba11: 88 4e 14 mov %cl,0x14(%esi)
11ba14: 8b 70 18 mov 0x18(%eax),%esi
11ba17: 89 d1 mov %edx,%ecx
11ba19: c1 e9 10 shr $0x10,%ecx
11ba1c: 88 4e 15 mov %cl,0x15(%esi)
11ba1f: 8b 70 18 mov 0x18(%eax),%esi
11ba22: 89 d1 mov %edx,%ecx
11ba24: c1 e9 08 shr $0x8,%ecx
11ba27: 88 4e 16 mov %cl,0x16(%esi)
11ba2a: 8b 48 18 mov 0x18(%eax),%ecx
11ba2d: 88 51 17 mov %dl,0x17(%ecx)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
11ba30: c6 40 1c 01 movb $0x1,0x1c(%eax)
handle->shared->mtime);
rtems_rfs_inode_set_ctime (&handle->shared->inode,
handle->shared->ctime);
11ba34: 8b 43 1c mov 0x1c(%ebx),%eax
*/
rtems_rfs_inode_set_atime (&handle->shared->inode,
handle->shared->atime);
rtems_rfs_inode_set_mtime (&handle->shared->inode,
handle->shared->mtime);
rtems_rfs_inode_set_ctime (&handle->shared->inode,
11ba37: 8b 90 94 00 00 00 mov 0x94(%eax),%edx
*/
static inline void
rtems_rfs_inode_set_ctime (rtems_rfs_inode_handle* handle,
rtems_rfs_time ctime)
{
rtems_rfs_write_u32 (&handle->node->ctime, ctime);
11ba3d: 8b 70 18 mov 0x18(%eax),%esi
11ba40: 89 d1 mov %edx,%ecx
11ba42: c1 e9 18 shr $0x18,%ecx
11ba45: 88 4e 18 mov %cl,0x18(%esi)
11ba48: 8b 70 18 mov 0x18(%eax),%esi
11ba4b: 89 d1 mov %edx,%ecx
11ba4d: c1 e9 10 shr $0x10,%ecx
11ba50: 88 4e 19 mov %cl,0x19(%esi)
11ba53: 8b 70 18 mov 0x18(%eax),%esi
11ba56: 89 d1 mov %edx,%ecx
11ba58: c1 e9 08 shr $0x8,%ecx
11ba5b: 88 4e 1a mov %cl,0x1a(%esi)
11ba5e: 8b 48 18 mov 0x18(%eax),%ecx
11ba61: 88 51 1b mov %dl,0x1b(%ecx)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
11ba64: c6 40 1c 01 movb $0x1,0x1c(%eax)
handle->shared->ctime);
if (!rtems_rfs_block_size_equal (&handle->shared->size,
11ba68: 8b 43 1c mov 0x1c(%ebx),%eax
11ba6b: 8b 90 84 00 00 00 mov 0x84(%eax),%edx
11ba71: 3b 50 3c cmp 0x3c(%eax),%edx
11ba74: 75 0b jne 11ba81 <rtems_rfs_file_close+0x121><== NEVER TAKEN
11ba76: 8b 48 40 mov 0x40(%eax),%ecx
11ba79: 39 88 88 00 00 00 cmp %ecx,0x88(%eax)
11ba7f: 74 10 je 11ba91 <rtems_rfs_file_close+0x131><== ALWAYS TAKEN
*/
static inline void
rtems_rfs_block_map_set_size (rtems_rfs_block_map* map,
rtems_rfs_block_size* size)
{
rtems_rfs_block_copy_size (&map->size, size);
11ba81: 89 50 3c mov %edx,0x3c(%eax) <== NOT EXECUTED
11ba84: 8b 90 88 00 00 00 mov 0x88(%eax),%edx <== NOT EXECUTED
11ba8a: 89 50 40 mov %edx,0x40(%eax) <== NOT EXECUTED
map->dirty = true;
11ba8d: c6 40 34 01 movb $0x1,0x34(%eax) <== NOT EXECUTED
11ba91: 31 f6 xor %esi,%esi
&handle->shared->map.size))
rtems_rfs_block_map_set_size (&handle->shared->map,
&handle->shared->size);
}
rc = rtems_rfs_block_map_close (fs, &handle->shared->map);
11ba93: 50 push %eax
11ba94: 50 push %eax
11ba95: 8b 43 1c mov 0x1c(%ebx),%eax
11ba98: 83 c0 34 add $0x34,%eax
11ba9b: 50 push %eax
11ba9c: ff 75 08 pushl 0x8(%ebp)
11ba9f: e8 a5 dc ff ff call 119749 <rtems_rfs_block_map_close>
11baa4: 89 c7 mov %eax,%edi
if (rc > 0)
11baa6: 83 c4 10 add $0x10,%esp
11baa9: 85 c0 test %eax,%eax
11baab: 7e 36 jle 11bae3 <rtems_rfs_file_close+0x183><== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE))
11baad: 50 push %eax <== NOT EXECUTED
11baae: 50 push %eax <== NOT EXECUTED
11baaf: 6a 10 push $0x10 <== NOT EXECUTED
11bab1: 6a 00 push $0x0 <== NOT EXECUTED
11bab3: e8 e4 7d ff ff call 11389c <rtems_rfs_trace> <== NOT EXECUTED
11bab8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11babb: 84 c0 test %al,%al <== NOT EXECUTED
11babd: 74 1e je 11badd <rtems_rfs_file_close+0x17d><== NOT EXECUTED
printf ("rtems-rfs: file-close: map close error: ino=%" PRId32 ": %d: %s\n",
11babf: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11bac2: 57 push %edi <== NOT EXECUTED
11bac3: e8 fc 55 00 00 call 1210c4 <strerror> <== NOT EXECUTED
11bac8: 50 push %eax <== NOT EXECUTED
11bac9: 57 push %edi <== NOT EXECUTED
handle->shared->inode.ino, rc, strerror (rc));
11baca: 8b 43 1c mov 0x1c(%ebx),%eax <== NOT EXECUTED
rc = rtems_rfs_block_map_close (fs, &handle->shared->map);
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE))
printf ("rtems-rfs: file-close: map close error: ino=%" PRId32 ": %d: %s\n",
11bacd: ff 70 14 pushl 0x14(%eax) <== NOT EXECUTED
11bad0: 68 37 19 13 00 push $0x131937 <== NOT EXECUTED
11bad5: e8 62 48 00 00 call 12033c <printf> <== NOT EXECUTED
11bada: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
handle->shared->inode.ino, rc, strerror (rc));
if (rrc == 0)
11badd: 85 f6 test %esi,%esi <== NOT EXECUTED
11badf: 75 02 jne 11bae3 <rtems_rfs_file_close+0x183><== NOT EXECUTED
11bae1: 89 fe mov %edi,%esi <== NOT EXECUTED
rrc = rc;
}
rc = rtems_rfs_inode_close (fs, &handle->shared->inode);
11bae3: 50 push %eax
11bae4: 50 push %eax
11bae5: 8b 43 1c mov 0x1c(%ebx),%eax
11bae8: 83 c0 0c add $0xc,%eax
11baeb: 50 push %eax
11baec: ff 75 08 pushl 0x8(%ebp)
11baef: e8 b3 68 ff ff call 1123a7 <rtems_rfs_inode_close>
11baf4: 89 c7 mov %eax,%edi
if (rc > 0)
11baf6: 83 c4 10 add $0x10,%esp
11baf9: 85 c0 test %eax,%eax
11bafb: 7e 36 jle 11bb33 <rtems_rfs_file_close+0x1d3><== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE))
11bafd: 50 push %eax <== NOT EXECUTED
11bafe: 50 push %eax <== NOT EXECUTED
11baff: 6a 10 push $0x10 <== NOT EXECUTED
11bb01: 6a 00 push $0x0 <== NOT EXECUTED
11bb03: e8 94 7d ff ff call 11389c <rtems_rfs_trace> <== NOT EXECUTED
11bb08: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11bb0b: 84 c0 test %al,%al <== NOT EXECUTED
11bb0d: 74 1e je 11bb2d <rtems_rfs_file_close+0x1cd><== NOT EXECUTED
printf ("rtems-rfs: file-close: inode close error: ino=%" PRId32 ": %d: %s\n",
11bb0f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11bb12: 57 push %edi <== NOT EXECUTED
11bb13: e8 ac 55 00 00 call 1210c4 <strerror> <== NOT EXECUTED
11bb18: 50 push %eax <== NOT EXECUTED
11bb19: 57 push %edi <== NOT EXECUTED
handle->shared->inode.ino, rc, strerror (rc));
11bb1a: 8b 43 1c mov 0x1c(%ebx),%eax <== NOT EXECUTED
rc = rtems_rfs_inode_close (fs, &handle->shared->inode);
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE))
printf ("rtems-rfs: file-close: inode close error: ino=%" PRId32 ": %d: %s\n",
11bb1d: ff 70 14 pushl 0x14(%eax) <== NOT EXECUTED
11bb20: 68 70 19 13 00 push $0x131970 <== NOT EXECUTED
11bb25: e8 12 48 00 00 call 12033c <printf> <== NOT EXECUTED
11bb2a: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
handle->shared->inode.ino, rc, strerror (rc));
if (rrc == 0)
11bb2d: 85 f6 test %esi,%esi <== NOT EXECUTED
11bb2f: 75 02 jne 11bb33 <rtems_rfs_file_close+0x1d3><== NOT EXECUTED
11bb31: 89 fe mov %edi,%esi <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
11bb33: 83 ec 0c sub $0xc,%esp
11bb36: ff 73 1c pushl 0x1c(%ebx)
11bb39: e8 c6 bc ff ff call 117804 <_Chain_Extract>
rrc = rc;
}
rtems_chain_extract (&handle->shared->link);
free (handle->shared);
11bb3e: 59 pop %ecx
11bb3f: ff 73 1c pushl 0x1c(%ebx)
11bb42: e8 a1 e3 fe ff call 109ee8 <free>
11bb47: 83 c4 10 add $0x10,%esp
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
11bb4a: 52 push %edx
11bb4b: 52 push %edx
}
rc = rtems_rfs_buffer_handle_close (fs, &handle->buffer);
11bb4c: 8d 43 04 lea 0x4(%ebx),%eax
11bb4f: 50 push %eax
11bb50: ff 75 08 pushl 0x8(%ebp)
11bb53: e8 d9 e5 ff ff call 11a131 <rtems_rfs_buffer_handle_release>
handle->dirty = false;
11bb58: c6 43 04 00 movb $0x0,0x4(%ebx)
handle->bnum = 0;
11bb5c: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
handle->buffer = NULL;
11bb63: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
if ((rrc == 0) && (rc > 0))
rrc = rc;
if (rrc > 0)
11bb6a: 83 c4 10 add $0x10,%esp
11bb6d: 85 f6 test %esi,%esi
11bb6f: 7e 2d jle 11bb9e <rtems_rfs_file_close+0x23e><== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE))
11bb71: 50 push %eax <== NOT EXECUTED
11bb72: 50 push %eax <== NOT EXECUTED
11bb73: 6a 10 push $0x10 <== NOT EXECUTED
11bb75: 6a 00 push $0x0 <== NOT EXECUTED
11bb77: e8 20 7d ff ff call 11389c <rtems_rfs_trace> <== NOT EXECUTED
11bb7c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11bb7f: 84 c0 test %al,%al <== NOT EXECUTED
11bb81: 74 1b je 11bb9e <rtems_rfs_file_close+0x23e><== NOT EXECUTED
printf ("rtems-rfs: file-close: result: %d: %s\n", rrc, strerror (rrc));
11bb83: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11bb86: 56 push %esi <== NOT EXECUTED
11bb87: e8 38 55 00 00 call 1210c4 <strerror> <== NOT EXECUTED
11bb8c: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
11bb8f: 50 push %eax <== NOT EXECUTED
11bb90: 56 push %esi <== NOT EXECUTED
11bb91: 68 ab 19 13 00 push $0x1319ab <== NOT EXECUTED
11bb96: e8 a1 47 00 00 call 12033c <printf> <== NOT EXECUTED
11bb9b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
free (handle);
11bb9e: 83 ec 0c sub $0xc,%esp
11bba1: 53 push %ebx
11bba2: e8 41 e3 fe ff call 109ee8 <free>
return rrc;
}
11bba7: 89 f0 mov %esi,%eax
11bba9: 8d 65 f4 lea -0xc(%ebp),%esp
11bbac: 5b pop %ebx
11bbad: 5e pop %esi
11bbae: 5f pop %edi
11bbaf: 5d pop %ebp
11bbb0: c3 ret
0011bd7f <rtems_rfs_file_io_end>:
int
rtems_rfs_file_io_end (rtems_rfs_file_handle* handle,
size_t size,
bool read)
{
11bd7f: 55 push %ebp
11bd80: 89 e5 mov %esp,%ebp
11bd82: 57 push %edi
11bd83: 56 push %esi
11bd84: 53 push %ebx
11bd85: 83 ec 24 sub $0x24,%esp
11bd88: 8b 75 08 mov 0x8(%ebp),%esi
11bd8b: 8b 7d 0c mov 0xc(%ebp),%edi
11bd8e: 8a 5d 10 mov 0x10(%ebp),%bl
bool atime;
bool mtime;
bool length;
int rc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
11bd91: 6a 20 push $0x20
11bd93: 6a 00 push $0x0
11bd95: e8 02 7b ff ff call 11389c <rtems_rfs_trace>
11bd9a: 83 c4 10 add $0x10,%esp
11bd9d: 84 c0 test %al,%al
11bd9f: 74 1e je 11bdbf <rtems_rfs_file_io_end+0x40><== ALWAYS TAKEN
printf ("rtems-rfs: file-io: end: %s size=%zu\n",
11bda1: b8 d2 19 13 00 mov $0x1319d2,%eax <== NOT EXECUTED
11bda6: 84 db test %bl,%bl <== NOT EXECUTED
11bda8: 74 05 je 11bdaf <rtems_rfs_file_io_end+0x30><== NOT EXECUTED
11bdaa: b8 fb 07 13 00 mov $0x1307fb,%eax <== NOT EXECUTED
11bdaf: 51 push %ecx <== NOT EXECUTED
11bdb0: 57 push %edi <== NOT EXECUTED
11bdb1: 50 push %eax <== NOT EXECUTED
11bdb2: 68 89 1a 13 00 push $0x131a89 <== NOT EXECUTED
11bdb7: e8 80 45 00 00 call 12033c <printf> <== NOT EXECUTED
11bdbc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
read ? "read" : "write", size);
if (rtems_rfs_buffer_handle_has_block (&handle->buffer))
11bdbf: 83 7e 0c 00 cmpl $0x0,0xc(%esi)
11bdc3: 74 5b je 11be20 <rtems_rfs_file_io_end+0xa1><== NEVER TAKEN
{
if (!read)
11bdc5: 84 db test %bl,%bl
11bdc7: 75 04 jne 11bdcd <rtems_rfs_file_io_end+0x4e>
rtems_rfs_buffer_mark_dirty (rtems_rfs_file_buffer (handle));
11bdc9: c6 46 04 01 movb $0x1,0x4(%esi)
rc = rtems_rfs_buffer_handle_release (rtems_rfs_file_fs (handle),
11bdcd: 52 push %edx
11bdce: 52 push %edx
11bdcf: 8d 46 04 lea 0x4(%esi),%eax
11bdd2: 50 push %eax
11bdd3: 8b 46 1c mov 0x1c(%esi),%eax
11bdd6: ff b0 98 00 00 00 pushl 0x98(%eax)
11bddc: e8 50 e3 ff ff call 11a131 <rtems_rfs_buffer_handle_release>
11bde1: 89 45 e4 mov %eax,-0x1c(%ebp)
rtems_rfs_file_buffer (handle));
if (rc > 0)
11bde4: 83 c4 10 add $0x10,%esp
11bde7: 85 c0 test %eax,%eax
11bde9: 7e 3c jle 11be27 <rtems_rfs_file_io_end+0xa8><== ALWAYS TAKEN
{
printf (
11bdeb: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11bdee: 50 push %eax <== NOT EXECUTED
11bdef: e8 d0 52 00 00 call 1210c4 <strerror> <== NOT EXECUTED
11bdf4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11bdf7: ba d2 19 13 00 mov $0x1319d2,%edx <== NOT EXECUTED
11bdfc: 84 db test %bl,%bl <== NOT EXECUTED
11bdfe: 74 05 je 11be05 <rtems_rfs_file_io_end+0x86><== NOT EXECUTED
11be00: ba fb 07 13 00 mov $0x1307fb,%edx <== NOT EXECUTED
11be05: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11be08: 50 push %eax <== NOT EXECUTED
11be09: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
11be0c: 57 push %edi <== NOT EXECUTED
11be0d: 52 push %edx <== NOT EXECUTED
11be0e: 68 b1 1a 13 00 push $0x131ab1 <== NOT EXECUTED
11be13: e8 24 45 00 00 call 12033c <printf> <== NOT EXECUTED
"rtems-rfs: file-io: end: error on release: %s size=%zu: %d: %s\n",
read ? "read" : "write", size, rc, strerror (rc));
return rc;
11be18: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
11be1b: e9 2f 01 00 00 jmp 11bf4f <rtems_rfs_file_io_end+0x1d0><== NOT EXECUTED
bool read)
{
bool atime;
bool mtime;
bool length;
int rc = 0;
11be20: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED
* increase the block number and adjust the offset.
*
* If we are the last block and the position is past the current size update
* the size with the new length. The map holds the block count.
*/
handle->bpos.boff += size;
11be27: 03 7e 14 add 0x14(%esi),%edi
11be2a: 89 7e 14 mov %edi,0x14(%esi)
if (handle->bpos.boff >=
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle)))
11be2d: 8b 46 1c mov 0x1c(%esi),%eax
11be30: 8b 90 98 00 00 00 mov 0x98(%eax),%edx
11be36: 8b 52 08 mov 0x8(%edx),%edx
* If we are the last block and the position is past the current size update
* the size with the new length. The map holds the block count.
*/
handle->bpos.boff += size;
if (handle->bpos.boff >=
11be39: 39 d7 cmp %edx,%edi
11be3b: 72 08 jb 11be45 <rtems_rfs_file_io_end+0xc6>
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle)))
{
handle->bpos.bno++;
11be3d: ff 46 10 incl 0x10(%esi)
handle->bpos.boff -= rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
11be40: 29 d7 sub %edx,%edi
11be42: 89 7e 14 mov %edi,0x14(%esi)
}
length = false;
mtime = false;
11be45: 31 d2 xor %edx,%edx
if (!read &&
11be47: 84 db test %bl,%bl
11be49: 75 2f jne 11be7a <rtems_rfs_file_io_end+0xfb>
rtems_rfs_block_map_past_end (rtems_rfs_file_map (handle),
11be4b: 8b 4e 10 mov 0x10(%esi),%ecx
}
length = false;
mtime = false;
if (!read &&
11be4e: 85 c9 test %ecx,%ecx
11be50: 74 06 je 11be58 <rtems_rfs_file_io_end+0xd9>
rtems_rfs_block_map_past_end (rtems_rfs_file_map (handle),
11be52: 83 78 3c 00 cmpl $0x0,0x3c(%eax)
11be56: 74 16 je 11be6e <rtems_rfs_file_io_end+0xef><== NEVER TAKEN
11be58: 8b 78 3c mov 0x3c(%eax),%edi
11be5b: 39 f9 cmp %edi,%ecx
11be5d: 73 0f jae 11be6e <rtems_rfs_file_io_end+0xef>
11be5f: 4f dec %edi
handle->bpos.bno++;
handle->bpos.boff -= rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
}
length = false;
mtime = false;
11be60: 31 d2 xor %edx,%edx
if (!read &&
rtems_rfs_block_map_past_end (rtems_rfs_file_map (handle),
11be62: 39 f9 cmp %edi,%ecx
11be64: 75 14 jne 11be7a <rtems_rfs_file_io_end+0xfb>
11be66: 8b 48 40 mov 0x40(%eax),%ecx
11be69: 39 4e 14 cmp %ecx,0x14(%esi)
11be6c: 76 0c jbe 11be7a <rtems_rfs_file_io_end+0xfb>
*/
static inline void
rtems_rfs_block_map_set_size_offset (rtems_rfs_block_map* map,
rtems_rfs_block_off offset)
{
map->size.offset = offset;
11be6e: 8b 56 14 mov 0x14(%esi),%edx
11be71: 89 50 40 mov %edx,0x40(%eax)
map->dirty = true;
11be74: c6 40 34 01 movb $0x1,0x34(%eax)
rtems_rfs_file_bpos (handle)))
{
rtems_rfs_block_map_set_size_offset (rtems_rfs_file_map (handle),
handle->bpos.boff);
length = true;
mtime = true;
11be78: b2 01 mov $0x1,%dl
}
atime = rtems_rfs_file_update_atime (handle);
11be7a: 8b 06 mov (%esi),%eax
11be7c: 89 c1 mov %eax,%ecx
11be7e: 83 e1 01 and $0x1,%ecx
11be81: 83 f1 01 xor $0x1,%ecx
11be84: 89 4d e0 mov %ecx,-0x20(%ebp)
11be87: 88 4d df mov %cl,-0x21(%ebp)
mtime = rtems_rfs_file_update_mtime (handle) && mtime;
11be8a: 31 ff xor %edi,%edi
11be8c: a8 02 test $0x2,%al
11be8e: 75 03 jne 11be93 <rtems_rfs_file_io_end+0x114><== NEVER TAKEN
11be90: 0f b6 fa movzbl %dl,%edi
11be93: 89 f9 mov %edi,%ecx
11be95: 83 e1 01 and $0x1,%ecx
11be98: 88 4d de mov %cl,-0x22(%ebp)
length = rtems_rfs_file_update_length (handle) && length;
11be9b: 31 c9 xor %ecx,%ecx
11be9d: a8 04 test $0x4,%al
11be9f: 75 03 jne 11bea4 <rtems_rfs_file_io_end+0x125><== NEVER TAKEN
11bea1: 0f b6 ca movzbl %dl,%ecx
11bea4: 83 e1 01 and $0x1,%ecx
11bea7: 88 4d dd mov %cl,-0x23(%ebp)
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
11beaa: 50 push %eax
11beab: 50 push %eax
11beac: 6a 20 push $0x20
11beae: 6a 00 push $0x0
11beb0: e8 e7 79 ff ff call 11389c <rtems_rfs_trace>
11beb5: 83 c4 10 add $0x10,%esp
11beb8: 84 c0 test %al,%al
11beba: 74 3d je 11bef9 <rtems_rfs_file_io_end+0x17a><== ALWAYS TAKEN
printf ("rtems-rfs: file-io: end: pos=%" PRIu32 ":%" PRIu32 " %c %c %c\n",
11bebc: 80 7d dd 01 cmpb $0x1,-0x23(%ebp) <== NOT EXECUTED
11bec0: 19 c9 sbb %ecx,%ecx <== NOT EXECUTED
11bec2: 83 e1 e1 and $0xffffffe1,%ecx <== NOT EXECUTED
11bec5: 83 c1 4c add $0x4c,%ecx <== NOT EXECUTED
11bec8: 80 7d de 01 cmpb $0x1,-0x22(%ebp) <== NOT EXECUTED
11becc: 19 d2 sbb %edx,%edx <== NOT EXECUTED
11bece: 83 e2 e0 and $0xffffffe0,%edx <== NOT EXECUTED
11bed1: 83 c2 4d add $0x4d,%edx <== NOT EXECUTED
11bed4: 80 7d df 01 cmpb $0x1,-0x21(%ebp) <== NOT EXECUTED
11bed8: 19 c0 sbb %eax,%eax <== NOT EXECUTED
11beda: 83 e0 ec and $0xffffffec,%eax <== NOT EXECUTED
11bedd: 83 c0 41 add $0x41,%eax <== NOT EXECUTED
11bee0: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
11bee3: 51 push %ecx <== NOT EXECUTED
11bee4: 52 push %edx <== NOT EXECUTED
11bee5: 50 push %eax <== NOT EXECUTED
11bee6: ff 76 14 pushl 0x14(%esi) <== NOT EXECUTED
11bee9: ff 76 10 pushl 0x10(%esi) <== NOT EXECUTED
11beec: 68 f3 1a 13 00 push $0x131af3 <== NOT EXECUTED
11bef1: e8 46 44 00 00 call 12033c <printf> <== NOT EXECUTED
11bef6: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
handle->bpos.bno, handle->bpos.boff,
atime ? 'A' : '-', mtime ? 'M' : '-', length ? 'L' : '-');
if (atime || mtime)
11bef9: 0b 7d e0 or -0x20(%ebp),%edi
11befc: 83 e7 01 and $0x1,%edi
11beff: 74 33 je 11bf34 <rtems_rfs_file_io_end+0x1b5><== NEVER TAKEN
{
time_t now = time (NULL);
11bf01: 83 ec 0c sub $0xc,%esp
11bf04: 6a 00 push $0x0
11bf06: e8 41 86 00 00 call 12454c <time>
if (read && atime)
11bf0b: 83 c4 10 add $0x10,%esp
11bf0e: 84 db test %bl,%bl
11bf10: 74 0f je 11bf21 <rtems_rfs_file_io_end+0x1a2>
11bf12: 80 7d df 00 cmpb $0x0,-0x21(%ebp)
11bf16: 74 09 je 11bf21 <rtems_rfs_file_io_end+0x1a2><== NEVER TAKEN
handle->shared->atime = now;
11bf18: 8b 56 1c mov 0x1c(%esi),%edx
11bf1b: 89 82 8c 00 00 00 mov %eax,0x8c(%edx)
if (!read && mtime)
11bf21: 80 7d de 00 cmpb $0x0,-0x22(%ebp)
11bf25: 74 0d je 11bf34 <rtems_rfs_file_io_end+0x1b5>
11bf27: fe cb dec %bl
11bf29: 74 09 je 11bf34 <rtems_rfs_file_io_end+0x1b5><== NEVER TAKEN
handle->shared->mtime = now;
11bf2b: 8b 56 1c mov 0x1c(%esi),%edx
11bf2e: 89 82 90 00 00 00 mov %eax,0x90(%edx)
}
if (length)
11bf34: 80 7d dd 00 cmpb $0x0,-0x23(%ebp)
11bf38: 74 15 je 11bf4f <rtems_rfs_file_io_end+0x1d0>
{
handle->shared->size.count =
rtems_rfs_block_map_count (rtems_rfs_file_map (handle));
11bf3a: 8b 46 1c mov 0x1c(%esi),%eax
if (!read && mtime)
handle->shared->mtime = now;
}
if (length)
{
handle->shared->size.count =
11bf3d: 8b 50 3c mov 0x3c(%eax),%edx
11bf40: 89 90 84 00 00 00 mov %edx,0x84(%eax)
rtems_rfs_block_map_count (rtems_rfs_file_map (handle));
handle->shared->size.offset =
11bf46: 8b 50 40 mov 0x40(%eax),%edx
11bf49: 89 90 88 00 00 00 mov %edx,0x88(%eax)
rtems_rfs_block_map_size_offset (rtems_rfs_file_map (handle));
}
return rc;
}
11bf4f: 8b 45 e4 mov -0x1c(%ebp),%eax
11bf52: 8d 65 f4 lea -0xc(%ebp),%esp
11bf55: 5b pop %ebx
11bf56: 5e pop %esi
11bf57: 5f pop %edi
11bf58: 5d pop %ebp
11bf59: c3 ret
0011bf5a <rtems_rfs_file_io_release>:
int
rtems_rfs_file_io_release (rtems_rfs_file_handle* handle)
{
11bf5a: 55 push %ebp
11bf5b: 89 e5 mov %esp,%ebp
11bf5d: 83 ec 08 sub $0x8,%esp
11bf60: 8b 45 08 mov 0x8(%ebp),%eax
int rc = 0;
if (rtems_rfs_buffer_handle_has_block (&handle->buffer))
11bf63: 83 78 0c 00 cmpl $0x0,0xc(%eax)
11bf67: 74 19 je 11bf82 <rtems_rfs_file_io_release+0x28><== ALWAYS TAKEN
rc = rtems_rfs_buffer_handle_release (rtems_rfs_file_fs (handle),
11bf69: 52 push %edx <== NOT EXECUTED
11bf6a: 52 push %edx <== NOT EXECUTED
11bf6b: 8d 50 04 lea 0x4(%eax),%edx <== NOT EXECUTED
11bf6e: 52 push %edx <== NOT EXECUTED
11bf6f: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED
11bf72: ff b0 98 00 00 00 pushl 0x98(%eax) <== NOT EXECUTED
11bf78: e8 b4 e1 ff ff call 11a131 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
11bf7d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11bf80: eb 02 jmp 11bf84 <rtems_rfs_file_io_release+0x2a><== NOT EXECUTED
}
int
rtems_rfs_file_io_release (rtems_rfs_file_handle* handle)
{
int rc = 0;
11bf82: 31 c0 xor %eax,%eax
if (rtems_rfs_buffer_handle_has_block (&handle->buffer))
rc = rtems_rfs_buffer_handle_release (rtems_rfs_file_fs (handle),
rtems_rfs_file_buffer (handle));
return rc;
}
11bf84: c9 leave
11bf85: c3 ret
0011bbb1 <rtems_rfs_file_io_start>:
int
rtems_rfs_file_io_start (rtems_rfs_file_handle* handle,
size_t* available,
bool read)
{
11bbb1: 55 push %ebp
11bbb2: 89 e5 mov %esp,%ebp
11bbb4: 57 push %edi
11bbb5: 56 push %esi
11bbb6: 53 push %ebx
11bbb7: 83 ec 34 sub $0x34,%esp
11bbba: 8b 5d 08 mov 0x8(%ebp),%ebx
11bbbd: 8b 7d 0c mov 0xc(%ebp),%edi
11bbc0: 8a 55 10 mov 0x10(%ebp),%dl
11bbc3: 88 55 d7 mov %dl,-0x29(%ebp)
size_t size;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
11bbc6: 6a 20 push $0x20
11bbc8: 6a 00 push $0x0
11bbca: e8 cd 7c ff ff call 11389c <rtems_rfs_trace>
11bbcf: 83 c4 10 add $0x10,%esp
11bbd2: 84 c0 test %al,%al
11bbd4: 74 26 je 11bbfc <rtems_rfs_file_io_start+0x4b><== ALWAYS TAKEN
printf ("rtems-rfs: file-io: start: %s pos=%" PRIu32 ":%" PRIu32 "\n",
11bbd6: 8b 4b 14 mov 0x14(%ebx),%ecx <== NOT EXECUTED
11bbd9: 8b 53 10 mov 0x10(%ebx),%edx <== NOT EXECUTED
11bbdc: b8 d2 19 13 00 mov $0x1319d2,%eax <== NOT EXECUTED
11bbe1: 80 7d d7 00 cmpb $0x0,-0x29(%ebp) <== NOT EXECUTED
11bbe5: 74 05 je 11bbec <rtems_rfs_file_io_start+0x3b><== NOT EXECUTED
11bbe7: b8 fb 07 13 00 mov $0x1307fb,%eax <== NOT EXECUTED
11bbec: 51 push %ecx <== NOT EXECUTED
11bbed: 52 push %edx <== NOT EXECUTED
11bbee: 50 push %eax <== NOT EXECUTED
11bbef: 68 d8 19 13 00 push $0x1319d8 <== NOT EXECUTED
11bbf4: e8 43 47 00 00 call 12033c <printf> <== NOT EXECUTED
11bbf9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
read ? "read" : "write", handle->bpos.bno, handle->bpos.boff);
if (!rtems_rfs_buffer_handle_has_block (&handle->buffer))
11bbfc: 83 7b 0c 00 cmpl $0x0,0xc(%ebx)
11bc00: 0f 85 0c 01 00 00 jne 11bd12 <rtems_rfs_file_io_start+0x161>
int rc;
request_read = read;
rc = rtems_rfs_block_map_find (rtems_rfs_file_fs (handle),
rtems_rfs_file_map (handle),
11bc06: 8b 43 1c mov 0x1c(%ebx),%eax
bool request_read;
int rc;
request_read = read;
rc = rtems_rfs_block_map_find (rtems_rfs_file_fs (handle),
11bc09: 8d 55 e4 lea -0x1c(%ebp),%edx
11bc0c: 52 push %edx
11bc0d: 8d 53 10 lea 0x10(%ebx),%edx
11bc10: 52 push %edx
11bc11: 8d 50 34 lea 0x34(%eax),%edx
11bc14: 52 push %edx
11bc15: ff b0 98 00 00 00 pushl 0x98(%eax)
11bc1b: e8 d9 dc ff ff call 1198f9 <rtems_rfs_block_map_find>
11bc20: 89 c2 mov %eax,%edx
rtems_rfs_file_map (handle),
rtems_rfs_file_bpos (handle),
&block);
if (rc > 0)
11bc22: 83 c4 10 add $0x10,%esp
11bc25: 85 c0 test %eax,%eax
11bc27: 7e 6c jle 11bc95 <rtems_rfs_file_io_start+0xe4>
{
/*
* Has the read reached the EOF ?
*/
if (read && (rc == ENXIO))
11bc29: 83 f8 06 cmp $0x6,%eax
11bc2c: 75 13 jne 11bc41 <rtems_rfs_file_io_start+0x90><== NEVER TAKEN
11bc2e: 80 7d d7 00 cmpb $0x0,-0x29(%ebp)
11bc32: 74 0d je 11bc41 <rtems_rfs_file_io_start+0x90><== ALWAYS TAKEN
{
*available = 0;
11bc34: c7 07 00 00 00 00 movl $0x0,(%edi) <== NOT EXECUTED
return 0;
11bc3a: 30 d2 xor %dl,%dl <== NOT EXECUTED
11bc3c: e9 34 01 00 00 jmp 11bd75 <rtems_rfs_file_io_start+0x1c4><== NOT EXECUTED
}
if (rc != ENXIO)
11bc41: 83 fa 06 cmp $0x6,%edx
11bc44: 0f 85 2b 01 00 00 jne 11bd75 <rtems_rfs_file_io_start+0x1c4><== NEVER TAKEN
return rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
11bc4a: 56 push %esi
11bc4b: 56 push %esi
11bc4c: 6a 20 push $0x20
11bc4e: 6a 00 push $0x0
11bc50: e8 47 7c ff ff call 11389c <rtems_rfs_trace>
11bc55: 83 c4 10 add $0x10,%esp
11bc58: 84 c0 test %al,%al
11bc5a: 74 10 je 11bc6c <rtems_rfs_file_io_start+0xbb><== ALWAYS TAKEN
printf ("rtems-rfs: file-io: start: grow\n");
11bc5c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11bc5f: 68 03 1a 13 00 push $0x131a03 <== NOT EXECUTED
11bc64: e8 eb 48 00 00 call 120554 <puts> <== NOT EXECUTED
11bc69: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rc = rtems_rfs_block_map_grow (rtems_rfs_file_fs (handle),
rtems_rfs_file_map (handle),
11bc6c: 8b 43 1c mov 0x1c(%ebx),%eax
1, &block);
11bc6f: 8d 55 e4 lea -0x1c(%ebp),%edx
return rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
printf ("rtems-rfs: file-io: start: grow\n");
rc = rtems_rfs_block_map_grow (rtems_rfs_file_fs (handle),
11bc72: 52 push %edx
11bc73: 6a 01 push $0x1
11bc75: 8d 50 34 lea 0x34(%eax),%edx
11bc78: 52 push %edx
11bc79: ff b0 98 00 00 00 pushl 0x98(%eax)
11bc7f: e8 1a de ff ff call 119a9e <rtems_rfs_block_map_grow>
11bc84: 89 c2 mov %eax,%edx
rtems_rfs_file_map (handle),
1, &block);
if (rc > 0)
11bc86: 83 c4 10 add $0x10,%esp
11bc89: 85 c0 test %eax,%eax
11bc8b: 0f 8f e4 00 00 00 jg 11bd75 <rtems_rfs_file_io_start+0x1c4>
return rc;
request_read = false;
11bc91: 31 f6 xor %esi,%esi
11bc93: eb 25 jmp 11bcba <rtems_rfs_file_io_start+0x109>
/*
* If this is a write check if the write starts within a block or the
* amount of data is less than a block size. If it is read the block
* rather than getting a block to fill.
*/
if (!read &&
11bc95: 0f b6 75 d7 movzbl -0x29(%ebp),%esi
11bc99: 80 7d d7 00 cmpb $0x0,-0x29(%ebp)
11bc9d: 75 1b jne 11bcba <rtems_rfs_file_io_start+0x109>
(rtems_rfs_file_block_offset (handle) ||
(*available < rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle)))))
request_read = true;
11bc9f: be 01 00 00 00 mov $0x1,%esi
/*
* If this is a write check if the write starts within a block or the
* amount of data is less than a block size. If it is read the block
* rather than getting a block to fill.
*/
if (!read &&
11bca4: 83 7b 14 00 cmpl $0x0,0x14(%ebx)
11bca8: 75 10 jne 11bcba <rtems_rfs_file_io_start+0x109>
(rtems_rfs_file_block_offset (handle) ||
(*available < rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle)))))
11bcaa: 8b 43 1c mov 0x1c(%ebx),%eax
11bcad: 8b 80 98 00 00 00 mov 0x98(%eax),%eax
* If this is a write check if the write starts within a block or the
* amount of data is less than a block size. If it is read the block
* rather than getting a block to fill.
*/
if (!read &&
(rtems_rfs_file_block_offset (handle) ||
11bcb3: 8b 48 08 mov 0x8(%eax),%ecx
11bcb6: 39 0f cmp %ecx,(%edi)
11bcb8: 73 d7 jae 11bc91 <rtems_rfs_file_io_start+0xe0><== NEVER TAKEN
(*available < rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle)))))
request_read = true;
}
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
11bcba: 51 push %ecx
11bcbb: 51 push %ecx
11bcbc: 6a 20 push $0x20
11bcbe: 6a 00 push $0x0
11bcc0: e8 d7 7b ff ff call 11389c <rtems_rfs_trace>
11bcc5: 83 c4 10 add $0x10,%esp
11bcc8: 84 c0 test %al,%al
11bcca: 74 22 je 11bcee <rtems_rfs_file_io_start+0x13d><== ALWAYS TAKEN
printf ("rtems-rfs: file-io: start: block=%" PRIu32 " request-read=%s\n",
11bccc: b8 8f 07 13 00 mov $0x13078f,%eax <== NOT EXECUTED
11bcd1: 89 f2 mov %esi,%edx <== NOT EXECUTED
11bcd3: 84 d2 test %dl,%dl <== NOT EXECUTED
11bcd5: 74 05 je 11bcdc <rtems_rfs_file_io_start+0x12b><== NOT EXECUTED
11bcd7: b8 3c de 12 00 mov $0x12de3c,%eax <== NOT EXECUTED
11bcdc: 52 push %edx <== NOT EXECUTED
11bcdd: 50 push %eax <== NOT EXECUTED
11bcde: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
11bce1: 68 23 1a 13 00 push $0x131a23 <== NOT EXECUTED
11bce6: e8 51 46 00 00 call 12033c <printf> <== NOT EXECUTED
11bceb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
block, request_read ? "yes" : "no");
rc = rtems_rfs_buffer_handle_request (rtems_rfs_file_fs (handle),
11bcee: 89 f1 mov %esi,%ecx
11bcf0: 0f b6 d1 movzbl %cl,%edx
11bcf3: 52 push %edx
11bcf4: ff 75 e4 pushl -0x1c(%ebp)
11bcf7: 8d 43 04 lea 0x4(%ebx),%eax
11bcfa: 50 push %eax
11bcfb: 8b 43 1c mov 0x1c(%ebx),%eax
11bcfe: ff b0 98 00 00 00 pushl 0x98(%eax)
11bd04: e8 a1 e5 ff ff call 11a2aa <rtems_rfs_buffer_handle_request>
11bd09: 89 c2 mov %eax,%edx
rtems_rfs_file_buffer (handle),
block, request_read);
if (rc > 0)
11bd0b: 83 c4 10 add $0x10,%esp
11bd0e: 85 c0 test %eax,%eax
11bd10: 7f 63 jg 11bd75 <rtems_rfs_file_io_start+0x1c4><== NEVER TAKEN
return rc;
}
if (read
11bd12: 80 7d d7 00 cmpb $0x0,-0x29(%ebp)
11bd16: 74 1f je 11bd37 <rtems_rfs_file_io_start+0x186>
&& rtems_rfs_block_map_last (rtems_rfs_file_map (handle))
11bd18: 8b 43 1c mov 0x1c(%ebx),%eax
11bd1b: 8b 50 44 mov 0x44(%eax),%edx
11bd1e: 85 d2 test %edx,%edx
11bd20: 75 06 jne 11bd28 <rtems_rfs_file_io_start+0x177>
11bd22: 83 78 3c 00 cmpl $0x0,0x3c(%eax)
11bd26: 74 08 je 11bd30 <rtems_rfs_file_io_start+0x17f><== NEVER TAKEN
11bd28: 8b 48 3c mov 0x3c(%eax),%ecx
11bd2b: 49 dec %ecx
11bd2c: 39 ca cmp %ecx,%edx
11bd2e: 75 07 jne 11bd37 <rtems_rfs_file_io_start+0x186>
&& rtems_rfs_block_map_size_offset (rtems_rfs_file_map (handle)))
11bd30: 8b 70 40 mov 0x40(%eax),%esi
11bd33: 85 f6 test %esi,%esi
11bd35: 75 0c jne 11bd43 <rtems_rfs_file_io_start+0x192>
size = rtems_rfs_block_map_size_offset (rtems_rfs_file_map (handle));
else
size = rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
11bd37: 8b 43 1c mov 0x1c(%ebx),%eax
11bd3a: 8b 80 98 00 00 00 mov 0x98(%eax),%eax
11bd40: 8b 70 08 mov 0x8(%eax),%esi
*available = size - rtems_rfs_file_block_offset (handle);
11bd43: 89 f0 mov %esi,%eax
11bd45: 2b 43 14 sub 0x14(%ebx),%eax
11bd48: 89 07 mov %eax,(%edi)
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
11bd4a: 50 push %eax
11bd4b: 50 push %eax
11bd4c: 6a 20 push $0x20
11bd4e: 6a 00 push $0x0
11bd50: e8 47 7b ff ff call 11389c <rtems_rfs_trace>
11bd55: 83 c4 10 add $0x10,%esp
printf ("rtems-rfs: file-io: start: available=%zu (%zu)\n",
*available, size);
return 0;
11bd58: 31 d2 xor %edx,%edx
else
size = rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
*available = size - rtems_rfs_file_block_offset (handle);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
11bd5a: 84 c0 test %al,%al
11bd5c: 74 17 je 11bd75 <rtems_rfs_file_io_start+0x1c4><== ALWAYS TAKEN
printf ("rtems-rfs: file-io: start: available=%zu (%zu)\n",
11bd5e: 53 push %ebx <== NOT EXECUTED
11bd5f: 56 push %esi <== NOT EXECUTED
11bd60: ff 37 pushl (%edi) <== NOT EXECUTED
11bd62: 68 59 1a 13 00 push $0x131a59 <== NOT EXECUTED
11bd67: 89 55 d0 mov %edx,-0x30(%ebp) <== NOT EXECUTED
11bd6a: e8 cd 45 00 00 call 12033c <printf> <== NOT EXECUTED
11bd6f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11bd72: 8b 55 d0 mov -0x30(%ebp),%edx <== NOT EXECUTED
*available, size);
return 0;
}
11bd75: 89 d0 mov %edx,%eax
11bd77: 8d 65 f4 lea -0xc(%ebp),%esp
11bd7a: 5b pop %ebx
11bd7b: 5e pop %esi
11bd7c: 5f pop %edi
11bd7d: 5d pop %ebp
11bd7e: c3 ret
0011c366 <rtems_rfs_file_open>:
int
rtems_rfs_file_open (rtems_rfs_file_system* fs,
rtems_rfs_ino ino,
int oflag,
rtems_rfs_file_handle** file)
{
11c366: 55 push %ebp
11c367: 89 e5 mov %esp,%ebp
11c369: 57 push %edi
11c36a: 56 push %esi
11c36b: 53 push %ebx
11c36c: 83 ec 24 sub $0x24,%esp
rtems_rfs_file_handle* handle;
rtems_rfs_file_shared* shared;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
11c36f: 6a 08 push $0x8
11c371: 6a 00 push $0x0
11c373: e8 24 75 ff ff call 11389c <rtems_rfs_trace>
11c378: 83 c4 10 add $0x10,%esp
11c37b: 84 c0 test %al,%al
11c37d: 74 12 je 11c391 <rtems_rfs_file_open+0x2b><== ALWAYS TAKEN
printf ("rtems-rfs: file-open: ino=%" PRId32 "\n", ino);
11c37f: 56 push %esi <== NOT EXECUTED
11c380: 56 push %esi <== NOT EXECUTED
11c381: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
11c384: 68 69 1b 13 00 push $0x131b69 <== NOT EXECUTED
11c389: e8 ae 3f 00 00 call 12033c <printf> <== NOT EXECUTED
11c38e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
*file = NULL;
11c391: 8b 45 14 mov 0x14(%ebp),%eax
11c394: c7 00 00 00 00 00 movl $0x0,(%eax)
/*
* Allocate a new handle and initialise it. Do this before we deal with the
* shared node data so we do not have to be concerned with reference
* counting.
*/
handle = malloc (sizeof (rtems_rfs_file_handle));
11c39a: 83 ec 0c sub $0xc,%esp
11c39d: 6a 20 push $0x20
11c39f: e8 5c e0 fe ff call 10a400 <malloc>
11c3a4: 89 c6 mov %eax,%esi
if (!handle)
11c3a6: 83 c4 10 add $0x10,%esp
return ENOMEM;
11c3a9: c7 45 e4 0c 00 00 00 movl $0xc,-0x1c(%ebp)
* Allocate a new handle and initialise it. Do this before we deal with the
* shared node data so we do not have to be concerned with reference
* counting.
*/
handle = malloc (sizeof (rtems_rfs_file_handle));
if (!handle)
11c3b0: 85 c0 test %eax,%eax
11c3b2: 0f 84 62 02 00 00 je 11c61a <rtems_rfs_file_open+0x2b4><== NEVER TAKEN
return ENOMEM;
memset (handle, 0, sizeof (rtems_rfs_file_handle));
11c3b8: 31 c0 xor %eax,%eax
11c3ba: 89 f7 mov %esi,%edi
11c3bc: b9 08 00 00 00 mov $0x8,%ecx
11c3c1: f3 ab rep stos %eax,%es:(%edi)
11c3c3: 89 4d e0 mov %ecx,-0x20(%ebp)
/*
* Scan the file system data list of open files for this ino. If found up
* the reference count and return the pointer to the data.
*/
shared = rtems_rfs_file_get_shared (fs, ino);
11c3c6: 53 push %ebx
11c3c7: 53 push %ebx
11c3c8: ff 75 0c pushl 0xc(%ebp)
11c3cb: ff 75 08 pushl 0x8(%ebp)
11c3ce: e8 73 ff ff ff call 11c346 <rtems_rfs_file_get_shared>
11c3d3: 83 c4 10 add $0x10,%esp
11c3d6: 89 c3 mov %eax,%ebx
if (shared)
11c3d8: 85 c0 test %eax,%eax
11c3da: 74 28 je 11c404 <rtems_rfs_file_open+0x9e><== ALWAYS TAKEN
{
shared->references++;
11c3dc: ff 40 08 incl 0x8(%eax) <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
11c3df: 51 push %ecx <== NOT EXECUTED
11c3e0: 51 push %ecx <== NOT EXECUTED
11c3e1: 6a 08 push $0x8 <== NOT EXECUTED
11c3e3: 6a 00 push $0x0 <== NOT EXECUTED
11c3e5: e8 b2 74 ff ff call 11389c <rtems_rfs_trace> <== NOT EXECUTED
11c3ea: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11c3ed: 84 c0 test %al,%al <== NOT EXECUTED
11c3ef: 0f 84 11 02 00 00 je 11c606 <rtems_rfs_file_open+0x2a0><== NOT EXECUTED
printf ("rtems-rfs: file-open: ino=%" PRId32 " shared\n", ino);
11c3f5: 52 push %edx <== NOT EXECUTED
11c3f6: 52 push %edx <== NOT EXECUTED
11c3f7: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
11c3fa: 68 88 1b 13 00 push $0x131b88 <== NOT EXECUTED
11c3ff: e9 fa 01 00 00 jmp 11c5fe <rtems_rfs_file_open+0x298><== NOT EXECUTED
{
/*
* None exists so create. Copy in the shared parts of the inode we hold in
* memory.
*/
shared = malloc (sizeof (rtems_rfs_file_shared));
11c404: 83 ec 0c sub $0xc,%esp
11c407: 68 9c 00 00 00 push $0x9c
11c40c: e8 ef df fe ff call 10a400 <malloc>
11c411: 89 c3 mov %eax,%ebx
if (!shared)
11c413: 83 c4 10 add $0x10,%esp
11c416: 85 c0 test %eax,%eax
11c418: 75 07 jne 11c421 <rtems_rfs_file_open+0xbb><== ALWAYS TAKEN
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
11c41a: 50 push %eax <== NOT EXECUTED
11c41b: 50 push %eax <== NOT EXECUTED
11c41c: e9 ba 00 00 00 jmp 11c4db <rtems_rfs_file_open+0x175><== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &handle->buffer);
free (handle);
return ENOMEM;
}
memset (shared, 0, sizeof (rtems_rfs_file_shared));
11c421: b9 27 00 00 00 mov $0x27,%ecx
11c426: 89 c7 mov %eax,%edi
11c428: 8b 45 e0 mov -0x20(%ebp),%eax
11c42b: f3 ab rep stos %eax,%es:(%edi)
rc = rtems_rfs_inode_open (fs, ino, &shared->inode, true);
11c42d: 8d 7b 0c lea 0xc(%ebx),%edi
11c430: 6a 01 push $0x1
11c432: 57 push %edi
11c433: ff 75 0c pushl 0xc(%ebp)
11c436: ff 75 08 pushl 0x8(%ebp)
11c439: e8 ec 5d ff ff call 11222a <rtems_rfs_inode_open>
11c43e: 89 45 e4 mov %eax,-0x1c(%ebp)
if (rc > 0)
11c441: 83 c4 10 add $0x10,%esp
11c444: 85 c0 test %eax,%eax
11c446: 7e 36 jle 11c47e <rtems_rfs_file_open+0x118><== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
11c448: 50 push %eax <== NOT EXECUTED
11c449: 50 push %eax <== NOT EXECUTED
11c44a: 6a 08 push $0x8 <== NOT EXECUTED
11c44c: 6a 00 push $0x0 <== NOT EXECUTED
11c44e: e8 49 74 ff ff call 11389c <rtems_rfs_trace> <== NOT EXECUTED
11c453: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11c456: 84 c0 test %al,%al <== NOT EXECUTED
11c458: 74 1f je 11c479 <rtems_rfs_file_open+0x113><== NOT EXECUTED
printf ("rtems-rfs: file-open: inode open failed: %d: %s\n",
11c45a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11c45d: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
11c460: e8 5f 4c 00 00 call 1210c4 <strerror> <== NOT EXECUTED
11c465: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
11c468: 50 push %eax <== NOT EXECUTED
11c469: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
11c46c: 68 ae 1b 13 00 push $0x131bae <== NOT EXECUTED
11c471: e8 c6 3e 00 00 call 12033c <printf> <== NOT EXECUTED
11c476: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rc, strerror (rc));
free (shared);
11c479: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11c47c: eb 55 jmp 11c4d3 <rtems_rfs_file_open+0x16d><== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &handle->buffer);
free (handle);
return rc;
}
rc = rtems_rfs_block_map_open (fs, &shared->inode, &shared->map);
11c47e: 50 push %eax
11c47f: 8d 43 34 lea 0x34(%ebx),%eax
11c482: 50 push %eax
11c483: 57 push %edi
11c484: ff 75 08 pushl 0x8(%ebp)
11c487: e8 16 d1 ff ff call 1195a2 <rtems_rfs_block_map_open>
11c48c: 89 45 e4 mov %eax,-0x1c(%ebp)
if (rc > 0)
11c48f: 83 c4 10 add $0x10,%esp
11c492: 85 c0 test %eax,%eax
11c494: 7e 73 jle 11c509 <rtems_rfs_file_open+0x1a3><== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
11c496: 50 push %eax <== NOT EXECUTED
11c497: 50 push %eax <== NOT EXECUTED
11c498: 6a 08 push $0x8 <== NOT EXECUTED
11c49a: 6a 00 push $0x0 <== NOT EXECUTED
11c49c: e8 fb 73 ff ff call 11389c <rtems_rfs_trace> <== NOT EXECUTED
11c4a1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11c4a4: 84 c0 test %al,%al <== NOT EXECUTED
11c4a6: 74 1f je 11c4c7 <rtems_rfs_file_open+0x161><== NOT EXECUTED
printf ("rtems-rfs: file-open: block map open failed: %d: %s\n",
11c4a8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11c4ab: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
11c4ae: e8 11 4c 00 00 call 1210c4 <strerror> <== NOT EXECUTED
11c4b3: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
11c4b6: 50 push %eax <== NOT EXECUTED
11c4b7: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
11c4ba: 68 df 1b 13 00 push $0x131bdf <== NOT EXECUTED
11c4bf: e8 78 3e 00 00 call 12033c <printf> <== NOT EXECUTED
11c4c4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rc, strerror (rc));
rtems_rfs_inode_close (fs, &shared->inode);
11c4c7: 50 push %eax <== NOT EXECUTED
11c4c8: 50 push %eax <== NOT EXECUTED
11c4c9: 57 push %edi <== NOT EXECUTED
11c4ca: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
11c4cd: e8 d5 5e ff ff call 1123a7 <rtems_rfs_inode_close> <== NOT EXECUTED
free (shared);
11c4d2: 58 pop %eax <== NOT EXECUTED
11c4d3: 53 push %ebx <== NOT EXECUTED
11c4d4: e8 0f da fe ff call 109ee8 <free> <== NOT EXECUTED
11c4d9: 59 pop %ecx <== NOT EXECUTED
11c4da: 5b pop %ebx <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &handle->buffer);
11c4db: 8d 46 04 lea 0x4(%esi),%eax <== NOT EXECUTED
11c4de: 50 push %eax <== NOT EXECUTED
11c4df: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
11c4e2: e8 4a dc ff ff call 11a131 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
handle->dirty = false;
11c4e7: c6 46 04 00 movb $0x0,0x4(%esi) <== NOT EXECUTED
handle->bnum = 0;
11c4eb: c7 46 08 00 00 00 00 movl $0x0,0x8(%esi) <== NOT EXECUTED
handle->buffer = NULL;
11c4f2: c7 46 0c 00 00 00 00 movl $0x0,0xc(%esi) <== NOT EXECUTED
free (handle);
11c4f9: 89 34 24 mov %esi,(%esp) <== NOT EXECUTED
11c4fc: e8 e7 d9 fe ff call 109ee8 <free> <== NOT EXECUTED
return rc;
11c501: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11c504: e9 11 01 00 00 jmp 11c61a <rtems_rfs_file_open+0x2b4><== NOT EXECUTED
}
shared->references = 1;
11c509: c7 43 08 01 00 00 00 movl $0x1,0x8(%ebx)
if (shared->inode.ino == ino)
return shared;
node = rtems_chain_next (node);
}
return NULL;
}
11c510: 8b 43 18 mov 0x18(%ebx),%eax
* @return uint32_t The block count.
*/
static inline uint32_t
rtems_rfs_inode_get_block_count (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->block_count);
11c513: 0f b6 50 0c movzbl 0xc(%eax),%edx
11c517: c1 e2 18 shl $0x18,%edx
11c51a: 0f b6 48 0d movzbl 0xd(%eax),%ecx
11c51e: c1 e1 10 shl $0x10,%ecx
11c521: 09 ca or %ecx,%edx
11c523: 0f b6 48 0f movzbl 0xf(%eax),%ecx
11c527: 09 ca or %ecx,%edx
11c529: 0f b6 48 0e movzbl 0xe(%eax),%ecx
11c52d: c1 e1 08 shl $0x8,%ecx
11c530: 09 ca or %ecx,%edx
11c532: 89 93 84 00 00 00 mov %edx,0x84(%ebx)
* @return uint32_t The block offset.
*/
static inline uint16_t
rtems_rfs_inode_get_block_offset (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->block_offset);
11c538: 0f b6 48 0a movzbl 0xa(%eax),%ecx
11c53c: c1 e1 08 shl $0x8,%ecx
11c53f: 0f b6 50 0b movzbl 0xb(%eax),%edx
11c543: 09 ca or %ecx,%edx
return rc;
}
shared->references = 1;
shared->size.count = rtems_rfs_inode_get_block_count (&shared->inode);
shared->size.offset = rtems_rfs_inode_get_block_offset (&shared->inode);
11c545: 0f b7 d2 movzwl %dx,%edx
11c548: 89 93 88 00 00 00 mov %edx,0x88(%ebx)
* @return rtems_rfs_time The atime.
*/
static inline rtems_rfs_time
rtems_rfs_inode_get_atime (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->atime);
11c54e: 0f b6 50 10 movzbl 0x10(%eax),%edx
11c552: c1 e2 18 shl $0x18,%edx
11c555: 0f b6 48 11 movzbl 0x11(%eax),%ecx
11c559: c1 e1 10 shl $0x10,%ecx
11c55c: 09 ca or %ecx,%edx
11c55e: 0f b6 48 13 movzbl 0x13(%eax),%ecx
11c562: 09 ca or %ecx,%edx
11c564: 0f b6 48 12 movzbl 0x12(%eax),%ecx
11c568: c1 e1 08 shl $0x8,%ecx
11c56b: 09 ca or %ecx,%edx
11c56d: 89 93 8c 00 00 00 mov %edx,0x8c(%ebx)
* @return rtems_rfs_time The mtime.
*/
static inline rtems_rfs_time
rtems_rfs_inode_get_mtime (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->mtime);
11c573: 0f b6 50 14 movzbl 0x14(%eax),%edx
11c577: c1 e2 18 shl $0x18,%edx
11c57a: 0f b6 48 15 movzbl 0x15(%eax),%ecx
11c57e: c1 e1 10 shl $0x10,%ecx
11c581: 09 ca or %ecx,%edx
11c583: 0f b6 48 17 movzbl 0x17(%eax),%ecx
11c587: 09 ca or %ecx,%edx
11c589: 0f b6 48 16 movzbl 0x16(%eax),%ecx
11c58d: c1 e1 08 shl $0x8,%ecx
11c590: 09 ca or %ecx,%edx
11c592: 89 93 90 00 00 00 mov %edx,0x90(%ebx)
* @return rtems_rfs_time The ctime.
*/
static inline rtems_rfs_time
rtems_rfs_inode_get_ctime (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->ctime);
11c598: 0f b6 50 18 movzbl 0x18(%eax),%edx
11c59c: c1 e2 18 shl $0x18,%edx
11c59f: 0f b6 48 19 movzbl 0x19(%eax),%ecx
11c5a3: c1 e1 10 shl $0x10,%ecx
11c5a6: 09 ca or %ecx,%edx
11c5a8: 0f b6 48 1b movzbl 0x1b(%eax),%ecx
11c5ac: 09 ca or %ecx,%edx
11c5ae: 0f b6 40 1a movzbl 0x1a(%eax),%eax
11c5b2: c1 e0 08 shl $0x8,%eax
11c5b5: 09 c2 or %eax,%edx
11c5b7: 89 93 94 00 00 00 mov %edx,0x94(%ebx)
shared->atime = rtems_rfs_inode_get_atime (&shared->inode);
shared->mtime = rtems_rfs_inode_get_mtime (&shared->inode);
shared->ctime = rtems_rfs_inode_get_ctime (&shared->inode);
shared->fs = fs;
11c5bd: 8b 4d 08 mov 0x8(%ebp),%ecx
11c5c0: 89 8b 98 00 00 00 mov %ecx,0x98(%ebx)
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
11c5c6: 50 push %eax
11c5c7: 50 push %eax
11c5c8: 53 push %ebx
rtems_chain_append (&fs->file_shares, &shared->link);
11c5c9: 89 c8 mov %ecx,%eax
11c5cb: 83 c0 74 add $0x74,%eax
11c5ce: 50 push %eax
11c5cf: e8 58 1f ff ff call 10e52c <_Chain_Append>
rtems_rfs_inode_unload (fs, &shared->inode, false);
11c5d4: 83 c4 0c add $0xc,%esp
11c5d7: 6a 00 push $0x0
11c5d9: 57 push %edi
11c5da: ff 75 08 pushl 0x8(%ebp)
11c5dd: e8 fb 5c ff ff call 1122dd <rtems_rfs_inode_unload>
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
11c5e2: 58 pop %eax
11c5e3: 5a pop %edx
11c5e4: 6a 08 push $0x8
11c5e6: 6a 00 push $0x0
11c5e8: e8 af 72 ff ff call 11389c <rtems_rfs_trace>
11c5ed: 83 c4 10 add $0x10,%esp
11c5f0: 84 c0 test %al,%al
11c5f2: 74 12 je 11c606 <rtems_rfs_file_open+0x2a0><== ALWAYS TAKEN
printf ("rtems-rfs: file-open: ino=%" PRId32 " share created\n", ino);
11c5f4: 57 push %edi <== NOT EXECUTED
11c5f5: 57 push %edi <== NOT EXECUTED
11c5f6: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
11c5f9: 68 14 1c 13 00 push $0x131c14 <== NOT EXECUTED
11c5fe: e8 39 3d 00 00 call 12033c <printf> <== NOT EXECUTED
11c603: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
handle->flags = oflag;
11c606: 8b 45 10 mov 0x10(%ebp),%eax
11c609: 89 06 mov %eax,(%esi)
handle->shared = shared;
11c60b: 89 5e 1c mov %ebx,0x1c(%esi)
*file = handle;
11c60e: 8b 45 14 mov 0x14(%ebp),%eax
11c611: 89 30 mov %esi,(%eax)
return 0;
11c613: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
}
11c61a: 8b 45 e4 mov -0x1c(%ebp),%eax
11c61d: 8d 65 f4 lea -0xc(%ebp),%esp
11c620: 5b pop %ebx
11c621: 5e pop %esi
11c622: 5f pop %edi
11c623: 5d pop %ebp
11c624: c3 ret
0011bf86 <rtems_rfs_file_seek>:
int
rtems_rfs_file_seek (rtems_rfs_file_handle* handle,
rtems_rfs_pos pos,
rtems_rfs_pos* new_pos)
{
11bf86: 55 push %ebp
11bf87: 89 e5 mov %esp,%ebp
11bf89: 57 push %edi
11bf8a: 56 push %esi
11bf8b: 53 push %ebx
11bf8c: 83 ec 34 sub $0x34,%esp
11bf8f: 8b 5d 08 mov 0x8(%ebp),%ebx
11bf92: 8b 75 0c mov 0xc(%ebp),%esi
11bf95: 8b 7d 10 mov 0x10(%ebp),%edi
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
11bf98: 6a 20 push $0x20
11bf9a: 6a 00 push $0x0
11bf9c: e8 fb 78 ff ff call 11389c <rtems_rfs_trace>
11bfa1: 83 c4 10 add $0x10,%esp
11bfa4: 84 c0 test %al,%al
11bfa6: 74 10 je 11bfb8 <rtems_rfs_file_seek+0x32><== ALWAYS TAKEN
printf ("rtems-rfs: file-seek: new=%" PRIu64 "\n", pos);
11bfa8: 51 push %ecx <== NOT EXECUTED
11bfa9: 57 push %edi <== NOT EXECUTED
11bfaa: 56 push %esi <== NOT EXECUTED
11bfab: 68 24 1b 13 00 push $0x131b24 <== NOT EXECUTED
11bfb0: e8 87 43 00 00 call 12033c <printf> <== NOT EXECUTED
11bfb5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
* file, this function does not itself extend the size of the file."
*
* This means the file needs to set the file size to the pos only when a
* write occurs.
*/
if (pos <= rtems_rfs_file_shared_get_size (rtems_rfs_file_fs (handle),
11bfb8: 8b 43 1c mov 0x1c(%ebx),%eax
11bfbb: 52 push %edx
11bfbc: 52 push %edx
11bfbd: 8d 90 84 00 00 00 lea 0x84(%eax),%edx
11bfc3: 52 push %edx
11bfc4: ff b0 98 00 00 00 pushl 0x98(%eax)
11bfca: e8 a3 d5 ff ff call 119572 <rtems_rfs_block_get_size>
11bfcf: 83 c4 10 add $0x10,%esp
11bfd2: 39 d7 cmp %edx,%edi
11bfd4: 77 65 ja 11c03b <rtems_rfs_file_seek+0xb5><== NEVER TAKEN
11bfd6: 72 04 jb 11bfdc <rtems_rfs_file_seek+0x56><== NEVER TAKEN
11bfd8: 39 c6 cmp %eax,%esi
11bfda: 77 5f ja 11c03b <rtems_rfs_file_seek+0xb5>
handle->shared))
{
rtems_rfs_file_set_bpos (handle, pos);
11bfdc: 8d 53 10 lea 0x10(%ebx),%edx
11bfdf: 52 push %edx
11bfe0: 57 push %edi
11bfe1: 56 push %esi
11bfe2: 8b 43 1c mov 0x1c(%ebx),%eax
11bfe5: ff b0 98 00 00 00 pushl 0x98(%eax)
11bfeb: 89 55 d4 mov %edx,-0x2c(%ebp)
11bfee: e8 c2 d4 ff ff call 1194b5 <rtems_rfs_block_get_bpos>
/*
* If the file has a block check if it maps to the current position and it
* does not release it. That will force us to get the block at the new
* position when the I/O starts.
*/
if (rtems_rfs_buffer_handle_has_block (&handle->buffer))
11bff3: 83 c4 10 add $0x10,%esp
11bff6: 83 7b 0c 00 cmpl $0x0,0xc(%ebx)
11bffa: 8b 55 d4 mov -0x2c(%ebp),%edx
11bffd: 74 4c je 11c04b <rtems_rfs_file_seek+0xc5>
{
rtems_rfs_buffer_block block;
int rc;
rc = rtems_rfs_block_map_find (rtems_rfs_file_fs (handle),
rtems_rfs_file_map (handle),
11bfff: 8b 43 1c mov 0x1c(%ebx),%eax
if (rtems_rfs_buffer_handle_has_block (&handle->buffer))
{
rtems_rfs_buffer_block block;
int rc;
rc = rtems_rfs_block_map_find (rtems_rfs_file_fs (handle),
11c002: 8d 4d e4 lea -0x1c(%ebp),%ecx
11c005: 51 push %ecx
11c006: 52 push %edx
11c007: 8d 50 34 lea 0x34(%eax),%edx
11c00a: 52 push %edx
11c00b: ff b0 98 00 00 00 pushl 0x98(%eax)
11c011: e8 e3 d8 ff ff call 1198f9 <rtems_rfs_block_map_find>
rtems_rfs_file_map (handle),
rtems_rfs_file_bpos (handle),
&block);
if (rc > 0)
11c016: 83 c4 10 add $0x10,%esp
11c019: 85 c0 test %eax,%eax
11c01b: 7f 38 jg 11c055 <rtems_rfs_file_seek+0xcf><== NEVER TAKEN
return rc;
if (rtems_rfs_buffer_bnum (&handle->buffer) != block)
11c01d: 8b 45 e4 mov -0x1c(%ebp),%eax
11c020: 39 43 08 cmp %eax,0x8(%ebx)
11c023: 74 26 je 11c04b <rtems_rfs_file_seek+0xc5><== ALWAYS TAKEN
{
rc = rtems_rfs_buffer_handle_release (rtems_rfs_file_fs (handle),
11c025: 50 push %eax <== NOT EXECUTED
11c026: 50 push %eax <== NOT EXECUTED
11c027: 8d 43 04 lea 0x4(%ebx),%eax <== NOT EXECUTED
11c02a: 50 push %eax <== NOT EXECUTED
11c02b: 8b 43 1c mov 0x1c(%ebx),%eax <== NOT EXECUTED
11c02e: ff b0 98 00 00 00 pushl 0x98(%eax) <== NOT EXECUTED
11c034: e8 f8 e0 ff ff call 11a131 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
11c039: eb 09 jmp 11c044 <rtems_rfs_file_seek+0xbe><== NOT EXECUTED
{
/*
* The seek is outside the current file so release any buffer. A write will
* extend the file.
*/
int rc = rtems_rfs_file_io_release (handle);
11c03b: 83 ec 0c sub $0xc,%esp
11c03e: 53 push %ebx
11c03f: e8 16 ff ff ff call 11bf5a <rtems_rfs_file_io_release>
if (rc > 0)
11c044: 83 c4 10 add $0x10,%esp
11c047: 85 c0 test %eax,%eax
11c049: 7f 0a jg 11c055 <rtems_rfs_file_seek+0xcf><== NEVER TAKEN
return rc;
}
*new_pos = pos;
11c04b: 8b 45 14 mov 0x14(%ebp),%eax
11c04e: 89 30 mov %esi,(%eax)
11c050: 89 78 04 mov %edi,0x4(%eax)
return 0;
11c053: 31 c0 xor %eax,%eax
}
11c055: 8d 65 f4 lea -0xc(%ebp),%esp
11c058: 5b pop %ebx
11c059: 5e pop %esi
11c05a: 5f pop %edi
11c05b: 5d pop %ebp
11c05c: c3 ret
0011c05d <rtems_rfs_file_set_size>:
int
rtems_rfs_file_set_size (rtems_rfs_file_handle* handle,
rtems_rfs_pos new_size)
{
11c05d: 55 push %ebp
11c05e: 89 e5 mov %esp,%ebp
11c060: 57 push %edi
11c061: 56 push %esi
11c062: 53 push %ebx
11c063: 83 ec 54 sub $0x54,%esp
11c066: 8b 5d 08 mov 0x8(%ebp),%ebx
11c069: 8b 75 0c mov 0xc(%ebp),%esi
11c06c: 8b 7d 10 mov 0x10(%ebp),%edi
11c06f: 89 75 b0 mov %esi,-0x50(%ebp)
11c072: 89 7d b4 mov %edi,-0x4c(%ebp)
rtems_rfs_block_map* map = rtems_rfs_file_map (handle);
11c075: 8b 73 1c mov 0x1c(%ebx),%esi
11c078: 89 75 d4 mov %esi,-0x2c(%ebp)
11c07b: 83 c6 34 add $0x34,%esi
11c07e: 89 75 c0 mov %esi,-0x40(%ebp)
rtems_rfs_pos size;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
11c081: 6a 20 push $0x20
11c083: 6a 00 push $0x0
11c085: e8 12 78 ff ff call 11389c <rtems_rfs_trace>
11c08a: 83 c4 10 add $0x10,%esp
11c08d: 84 c0 test %al,%al
11c08f: 74 14 je 11c0a5 <rtems_rfs_file_set_size+0x48><== ALWAYS TAKEN
printf ("rtems-rfs: file-set-size: size=%" PRIu64 "\n", new_size);
11c091: 51 push %ecx <== NOT EXECUTED
11c092: ff 75 b4 pushl -0x4c(%ebp) <== NOT EXECUTED
11c095: ff 75 b0 pushl -0x50(%ebp) <== NOT EXECUTED
11c098: 68 44 1b 13 00 push $0x131b44 <== NOT EXECUTED
11c09d: e8 9a 42 00 00 call 12033c <printf> <== NOT EXECUTED
11c0a2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
size = rtems_rfs_file_size (handle);
11c0a5: 8b 43 1c mov 0x1c(%ebx),%eax
11c0a8: 52 push %edx
11c0a9: 52 push %edx
11c0aa: 8d 90 84 00 00 00 lea 0x84(%eax),%edx
11c0b0: 52 push %edx
11c0b1: ff b0 98 00 00 00 pushl 0x98(%eax)
11c0b7: e8 b6 d4 ff ff call 119572 <rtems_rfs_block_get_size>
/*
* If the file is same size do nothing else grow or shrink it ?
*
* If the file does not change size do not update the times.
*/
if (size != new_size)
11c0bc: 83 c4 10 add $0x10,%esp
11c0bf: 3b 55 b4 cmp -0x4c(%ebp),%edx
11c0c2: 75 0a jne 11c0ce <rtems_rfs_file_set_size+0x71><== NEVER TAKEN
11c0c4: 3b 45 b0 cmp -0x50(%ebp),%eax
11c0c7: 75 05 jne 11c0ce <rtems_rfs_file_set_size+0x71>
11c0c9: e9 6e 02 00 00 jmp 11c33c <rtems_rfs_file_set_size+0x2df>
{
/*
* Short cut for the common truncate on open call.
*/
if (new_size == 0)
11c0ce: 8b 7d b4 mov -0x4c(%ebp),%edi
11c0d1: 0b 7d b0 or -0x50(%ebp),%edi
11c0d4: 8b 4b 1c mov 0x1c(%ebx),%ecx
11c0d7: 89 4d d0 mov %ecx,-0x30(%ebp)
11c0da: 75 20 jne 11c0fc <rtems_rfs_file_set_size+0x9f>
{
rc = rtems_rfs_block_map_free_all (rtems_rfs_file_fs (handle), map);
11c0dc: 50 push %eax
11c0dd: 50 push %eax
11c0de: ff 75 c0 pushl -0x40(%ebp)
11c0e1: ff b1 98 00 00 00 pushl 0x98(%ecx)
11c0e7: e8 c8 de ff ff call 119fb4 <rtems_rfs_block_map_free_all>
if (rc > 0)
11c0ec: 83 c4 10 add $0x10,%esp
11c0ef: 85 c0 test %eax,%eax
11c0f1: 0f 8f 47 02 00 00 jg 11c33e <rtems_rfs_file_set_size+0x2e1><== NEVER TAKEN
11c0f7: e9 10 02 00 00 jmp 11c30c <rtems_rfs_file_set_size+0x2af>
return rc;
}
else
{
if (size < new_size)
11c0fc: 3b 55 b4 cmp -0x4c(%ebp),%edx
11c0ff: 0f 87 51 01 00 00 ja 11c256 <rtems_rfs_file_set_size+0x1f9><== NEVER TAKEN
11c105: 72 09 jb 11c110 <rtems_rfs_file_set_size+0xb3><== NEVER TAKEN
11c107: 3b 45 b0 cmp -0x50(%ebp),%eax
11c10a: 0f 83 46 01 00 00 jae 11c256 <rtems_rfs_file_set_size+0x1f9>
*/
rtems_rfs_pos count;
uint32_t length;
bool read_block;
count = new_size - size;
11c110: 8b 75 b0 mov -0x50(%ebp),%esi
11c113: 8b 7d b4 mov -0x4c(%ebp),%edi
11c116: 29 c6 sub %eax,%esi
11c118: 19 d7 sbb %edx,%edi
11c11a: 89 75 c8 mov %esi,-0x38(%ebp)
11c11d: 89 7d cc mov %edi,-0x34(%ebp)
length = rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
11c120: 8b 7d d0 mov -0x30(%ebp),%edi
11c123: 8b 87 98 00 00 00 mov 0x98(%edi),%eax
11c129: 8b 70 08 mov 0x8(%eax),%esi
read_block = false;
11c12c: c6 45 d0 00 movb $0x0,-0x30(%ebp)
while (count)
11c130: e9 10 01 00 00 jmp 11c245 <rtems_rfs_file_set_size+0x1e8>
/*
* Get the block position for the current end of the file as seen by
* the map. If not found and the EOF grow the map then fill the block
* with 0.
*/
rtems_rfs_block_size_get_bpos (rtems_rfs_block_map_size (map), &bpos);
11c135: 8b 55 d4 mov -0x2c(%ebp),%edx
11c138: 8b 42 3c mov 0x3c(%edx),%eax
11c13b: 89 45 dc mov %eax,-0x24(%ebp)
11c13e: 8b 52 40 mov 0x40(%edx),%edx
11c141: 89 55 e0 mov %edx,-0x20(%ebp)
11c144: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
11c14b: 85 d2 test %edx,%edx
11c14d: 74 04 je 11c153 <rtems_rfs_file_set_size+0xf6>
11c14f: 48 dec %eax
11c150: 89 45 dc mov %eax,-0x24(%ebp)
rc = rtems_rfs_block_map_find (rtems_rfs_file_fs (handle),
11c153: 8d 7d d8 lea -0x28(%ebp),%edi
11c156: 57 push %edi
11c157: 8d 45 dc lea -0x24(%ebp),%eax
11c15a: 50 push %eax
11c15b: ff 75 c0 pushl -0x40(%ebp)
11c15e: 8b 43 1c mov 0x1c(%ebx),%eax
11c161: ff b0 98 00 00 00 pushl 0x98(%eax)
11c167: e8 8d d7 ff ff call 1198f9 <rtems_rfs_block_map_find>
map, &bpos, &block);
if (rc > 0)
11c16c: 83 c4 10 add $0x10,%esp
11c16f: 85 c0 test %eax,%eax
11c171: 7f 14 jg 11c187 <rtems_rfs_file_set_size+0x12a>
map, 1, &block);
if (rc > 0)
return rc;
}
if (count < (length - bpos.boff))
11c173: 8b 45 e0 mov -0x20(%ebp),%eax
11c176: 89 f2 mov %esi,%edx
11c178: 29 c2 sub %eax,%edx
11c17a: 83 7d cc 00 cmpl $0x0,-0x34(%ebp)
11c17e: 77 48 ja 11c1c8 <rtems_rfs_file_set_size+0x16b><== NEVER TAKEN
11c180: 39 55 c8 cmp %edx,-0x38(%ebp)
11c183: 72 2e jb 11c1b3 <rtems_rfs_file_set_size+0x156>
11c185: eb 41 jmp 11c1c8 <rtems_rfs_file_set_size+0x16b>
if (rc > 0)
{
/*
* Have we reached the EOF ?
*/
if (rc != ENXIO)
11c187: 83 f8 06 cmp $0x6,%eax
11c18a: 0f 85 ae 01 00 00 jne 11c33e <rtems_rfs_file_set_size+0x2e1><== NEVER TAKEN
return rc;
rc = rtems_rfs_block_map_grow (rtems_rfs_file_fs (handle),
11c190: 8d 55 d8 lea -0x28(%ebp),%edx
11c193: 52 push %edx
11c194: 6a 01 push $0x1
11c196: ff 75 c0 pushl -0x40(%ebp)
11c199: 8b 43 1c mov 0x1c(%ebx),%eax
11c19c: ff b0 98 00 00 00 pushl 0x98(%eax)
11c1a2: e8 f7 d8 ff ff call 119a9e <rtems_rfs_block_map_grow>
map, 1, &block);
if (rc > 0)
11c1a7: 83 c4 10 add $0x10,%esp
11c1aa: 85 c0 test %eax,%eax
11c1ac: 7e c5 jle 11c173 <rtems_rfs_file_set_size+0x116><== ALWAYS TAKEN
11c1ae: e9 8b 01 00 00 jmp 11c33e <rtems_rfs_file_set_size+0x2e1><== NOT EXECUTED
return rc;
}
if (count < (length - bpos.boff))
{
length = count + bpos.boff;
11c1b3: 8b 75 c8 mov -0x38(%ebp),%esi
11c1b6: 01 c6 add %eax,%esi
*/
static inline void
rtems_rfs_block_map_set_size_offset (rtems_rfs_block_map* map,
rtems_rfs_block_off offset)
{
map->size.offset = offset;
11c1b8: 8b 4d d4 mov -0x2c(%ebp),%ecx
11c1bb: 89 71 40 mov %esi,0x40(%ecx)
map->dirty = true;
11c1be: c6 41 34 01 movb $0x1,0x34(%ecx)
read_block = true;
11c1c2: c6 45 d0 01 movb $0x1,-0x30(%ebp)
11c1c6: eb 0e jmp 11c1d6 <rtems_rfs_file_set_size+0x179>
*/
static inline void
rtems_rfs_block_map_set_size_offset (rtems_rfs_block_map* map,
rtems_rfs_block_off offset)
{
map->size.offset = offset;
11c1c8: 8b 7d d4 mov -0x2c(%ebp),%edi
11c1cb: c7 47 40 00 00 00 00 movl $0x0,0x40(%edi)
map->dirty = true;
11c1d2: c6 47 34 01 movb $0x1,0x34(%edi)
}
/*
* Only read the block if the length is not the block size.
*/
rc = rtems_rfs_buffer_handle_request (rtems_rfs_file_fs (handle),
11c1d6: 8d 53 04 lea 0x4(%ebx),%edx
11c1d9: 0f b6 45 d0 movzbl -0x30(%ebp),%eax
11c1dd: 50 push %eax
11c1de: ff 75 d8 pushl -0x28(%ebp)
11c1e1: 52 push %edx
11c1e2: 8b 43 1c mov 0x1c(%ebx),%eax
11c1e5: ff b0 98 00 00 00 pushl 0x98(%eax)
11c1eb: 89 55 b8 mov %edx,-0x48(%ebp)
11c1ee: e8 b7 e0 ff ff call 11a2aa <rtems_rfs_buffer_handle_request>
rtems_rfs_file_buffer (handle),
block, read_block);
if (rc > 0)
11c1f3: 83 c4 10 add $0x10,%esp
11c1f6: 85 c0 test %eax,%eax
11c1f8: 8b 55 b8 mov -0x48(%ebp),%edx
11c1fb: 0f 8f 3d 01 00 00 jg 11c33e <rtems_rfs_file_set_size+0x2e1><== NEVER TAKEN
return rc;
dst = rtems_rfs_buffer_data (&handle->buffer);
memset (dst + bpos.boff, 0, length - bpos.boff);
11c201: 8b 45 e0 mov -0x20(%ebp),%eax
11c204: 89 f1 mov %esi,%ecx
11c206: 29 c1 sub %eax,%ecx
rtems_rfs_file_buffer (handle),
block, read_block);
if (rc > 0)
return rc;
dst = rtems_rfs_buffer_data (&handle->buffer);
11c208: 8b 7b 0c mov 0xc(%ebx),%edi
memset (dst + bpos.boff, 0, length - bpos.boff);
11c20b: 03 47 1c add 0x1c(%edi),%eax
11c20e: 89 45 bc mov %eax,-0x44(%ebp)
11c211: 31 c0 xor %eax,%eax
11c213: 8b 7d bc mov -0x44(%ebp),%edi
11c216: f3 aa rep stos %al,%es:(%edi)
rtems_rfs_buffer_mark_dirty (rtems_rfs_file_buffer (handle));
11c218: c6 43 04 01 movb $0x1,0x4(%ebx)
rc = rtems_rfs_buffer_handle_release (rtems_rfs_file_fs (handle),
11c21c: 50 push %eax
11c21d: 50 push %eax
11c21e: 52 push %edx
11c21f: 8b 43 1c mov 0x1c(%ebx),%eax
11c222: ff b0 98 00 00 00 pushl 0x98(%eax)
11c228: e8 04 df ff ff call 11a131 <rtems_rfs_buffer_handle_release>
rtems_rfs_file_buffer (handle));
if (rc > 0)
11c22d: 83 c4 10 add $0x10,%esp
11c230: 85 c0 test %eax,%eax
11c232: 0f 8f 06 01 00 00 jg 11c33e <rtems_rfs_file_set_size+0x2e1><== NEVER TAKEN
return rc;
count -= length - bpos.boff;
11c238: 89 f0 mov %esi,%eax
11c23a: 2b 45 e0 sub -0x20(%ebp),%eax
11c23d: 31 d2 xor %edx,%edx
11c23f: 29 45 c8 sub %eax,-0x38(%ebp)
11c242: 19 55 cc sbb %edx,-0x34(%ebp)
count = new_size - size;
length = rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
read_block = false;
while (count)
11c245: 8b 45 cc mov -0x34(%ebp),%eax
11c248: 0b 45 c8 or -0x38(%ebp),%eax
11c24b: 0f 85 e4 fe ff ff jne 11c135 <rtems_rfs_file_set_size+0xd8>
11c251: e9 b6 00 00 00 jmp 11c30c <rtems_rfs_file_set_size+0x2af>
uint32_t offset;
blocks =
rtems_rfs_block_map_count (map) -
(((new_size - 1) /
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle))) + 1);
11c256: 8b 4d d0 mov -0x30(%ebp),%ecx
11c259: 8b b9 98 00 00 00 mov 0x98(%ecx),%edi
rtems_rfs_block_no blocks;
uint32_t offset;
blocks =
rtems_rfs_block_map_count (map) -
(((new_size - 1) /
11c25f: 8b 47 08 mov 0x8(%edi),%eax
11c262: 31 d2 xor %edx,%edx
11c264: 89 45 c0 mov %eax,-0x40(%ebp)
11c267: 89 55 c4 mov %edx,-0x3c(%ebp)
11c26a: 8b 45 b0 mov -0x50(%ebp),%eax
11c26d: 8b 55 b4 mov -0x4c(%ebp),%edx
11c270: 83 c0 ff add $0xffffffff,%eax
11c273: 83 d2 ff adc $0xffffffff,%edx
11c276: ff 75 c4 pushl -0x3c(%ebp)
11c279: ff 75 c0 pushl -0x40(%ebp)
11c27c: 52 push %edx
11c27d: 50 push %eax
11c27e: e8 d1 ff 00 00 call 12c254 <__udivdi3>
11c283: 83 c4 10 add $0x10,%esp
11c286: 89 c1 mov %eax,%ecx
* Shrink
*/
rtems_rfs_block_no blocks;
uint32_t offset;
blocks =
11c288: f7 d1 not %ecx
11c28a: 8b 75 d4 mov -0x2c(%ebp),%esi
11c28d: 03 4e 3c add 0x3c(%esi),%ecx
rtems_rfs_block_map_count (map) -
(((new_size - 1) /
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle))) + 1);
offset =
new_size % rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
11c290: ff 75 c4 pushl -0x3c(%ebp)
11c293: ff 75 c0 pushl -0x40(%ebp)
11c296: ff 75 b4 pushl -0x4c(%ebp)
11c299: ff 75 b0 pushl -0x50(%ebp)
11c29c: 89 4d b8 mov %ecx,-0x48(%ebp)
11c29f: e8 b4 00 01 00 call 12c358 <__umoddi3>
11c2a4: 83 c4 10 add $0x10,%esp
11c2a7: 89 c6 mov %eax,%esi
if (blocks)
11c2a9: 8b 4d b8 mov -0x48(%ebp),%ecx
11c2ac: 85 c9 test %ecx,%ecx
11c2ae: 75 16 jne 11c2c6 <rtems_rfs_file_set_size+0x269>
*/
static inline void
rtems_rfs_block_map_set_size_offset (rtems_rfs_block_map* map,
rtems_rfs_block_off offset)
{
map->size.offset = offset;
11c2b0: 8b 7d d4 mov -0x2c(%ebp),%edi
11c2b3: 89 77 40 mov %esi,0x40(%edi)
map->dirty = true;
11c2b6: c6 47 34 01 movb $0x1,0x34(%edi)
return rc;
}
rtems_rfs_block_map_set_size_offset (map, offset);
if (rtems_rfs_block_pos_past_end (rtems_rfs_file_bpos (handle),
11c2ba: 8b 53 10 mov 0x10(%ebx),%edx
11c2bd: 85 d2 test %edx,%edx
11c2bf: 8b 47 3c mov 0x3c(%edi),%eax
11c2c2: 75 1a jne 11c2de <rtems_rfs_file_set_size+0x281>
11c2c4: eb 21 jmp 11c2e7 <rtems_rfs_file_set_size+0x28a>
new_size % rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
if (blocks)
{
int rc;
rc = rtems_rfs_block_map_shrink (rtems_rfs_file_fs (handle),
11c2c6: 50 push %eax
11c2c7: 51 push %ecx
11c2c8: 8b 45 d0 mov -0x30(%ebp),%eax
11c2cb: 83 c0 34 add $0x34,%eax
11c2ce: 50 push %eax
11c2cf: 57 push %edi
11c2d0: e8 7c da ff ff call 119d51 <rtems_rfs_block_map_shrink>
rtems_rfs_file_map (handle),
blocks);
if (rc > 0)
11c2d5: 83 c4 10 add $0x10,%esp
11c2d8: 85 c0 test %eax,%eax
11c2da: 7f 62 jg 11c33e <rtems_rfs_file_set_size+0x2e1><== NEVER TAKEN
11c2dc: eb d2 jmp 11c2b0 <rtems_rfs_file_set_size+0x253>
return rc;
}
rtems_rfs_block_map_set_size_offset (map, offset);
if (rtems_rfs_block_pos_past_end (rtems_rfs_file_bpos (handle),
11c2de: 8b 4d d4 mov -0x2c(%ebp),%ecx
11c2e1: 83 79 3c 00 cmpl $0x0,0x3c(%ecx)
11c2e5: 74 10 je 11c2f7 <rtems_rfs_file_set_size+0x29a><== NEVER TAKEN
11c2e7: 39 c2 cmp %eax,%edx
11c2e9: 73 0c jae 11c2f7 <rtems_rfs_file_set_size+0x29a><== NEVER TAKEN
11c2eb: 8d 48 ff lea -0x1(%eax),%ecx
11c2ee: 39 ca cmp %ecx,%edx
11c2f0: 75 1a jne 11c30c <rtems_rfs_file_set_size+0x2af><== NEVER TAKEN
11c2f2: 39 73 14 cmp %esi,0x14(%ebx)
11c2f5: 76 15 jbe 11c30c <rtems_rfs_file_set_size+0x2af>
rtems_rfs_block_map_size (map)))
rtems_rfs_block_size_get_bpos (rtems_rfs_block_map_size (map),
11c2f7: 89 43 10 mov %eax,0x10(%ebx)
11c2fa: 89 73 14 mov %esi,0x14(%ebx)
11c2fd: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx)
11c304: 85 f6 test %esi,%esi
11c306: 74 04 je 11c30c <rtems_rfs_file_set_size+0x2af><== NEVER TAKEN
11c308: 48 dec %eax
11c309: 89 43 10 mov %eax,0x10(%ebx)
rtems_rfs_file_bpos (handle));
}
}
handle->shared->size.count = rtems_rfs_block_map_count (map);
11c30c: 8b 73 1c mov 0x1c(%ebx),%esi
11c30f: 8b 7d d4 mov -0x2c(%ebp),%edi
11c312: 8b 47 3c mov 0x3c(%edi),%eax
11c315: 89 86 84 00 00 00 mov %eax,0x84(%esi)
handle->shared->size.offset = rtems_rfs_block_map_size_offset (map);
11c31b: 8b 47 40 mov 0x40(%edi),%eax
11c31e: 89 86 88 00 00 00 mov %eax,0x88(%esi)
if (rtems_rfs_file_update_mtime (handle))
11c324: f6 03 02 testb $0x2,(%ebx)
11c327: 75 13 jne 11c33c <rtems_rfs_file_set_size+0x2df><== NEVER TAKEN
handle->shared->mtime = time (NULL);
11c329: 83 ec 0c sub $0xc,%esp
11c32c: 6a 00 push $0x0
11c32e: e8 19 82 00 00 call 12454c <time>
11c333: 89 86 90 00 00 00 mov %eax,0x90(%esi)
11c339: 83 c4 10 add $0x10,%esp
}
return 0;
11c33c: 31 c0 xor %eax,%eax
}
11c33e: 8d 65 f4 lea -0xc(%ebp),%esp
11c341: 5b pop %ebx
11c342: 5e pop %esi
11c343: 5f pop %edi
11c344: 5d pop %ebp
11c345: c3 ret
00110f92 <rtems_rfs_format>:
return rc;
}
int
rtems_rfs_format (const char* name, const rtems_rfs_format_config* config)
{
110f92: 55 push %ebp
110f93: 89 e5 mov %esp,%ebp
110f95: 57 push %edi
110f96: 56 push %esi
110f97: 53 push %ebx
110f98: 81 ec 0c 01 00 00 sub $0x10c,%esp
rtems_rfs_file_system fs;
int group;
int rc;
if (config->verbose)
110f9e: 8b 45 0c mov 0xc(%ebp),%eax
110fa1: 80 78 15 00 cmpb $0x0,0x15(%eax)
110fa5: 74 12 je 110fb9 <rtems_rfs_format+0x27> <== ALWAYS TAKEN
printf ("rtems-rfs: format: %s\n", name);
110fa7: 50 push %eax <== NOT EXECUTED
110fa8: 50 push %eax <== NOT EXECUTED
110fa9: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
110fac: 68 2c f9 12 00 push $0x12f92c <== NOT EXECUTED
110fb1: e8 86 f3 00 00 call 12033c <printf> <== NOT EXECUTED
110fb6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
memset (&fs, 0, sizeof (rtems_rfs_file_system));
110fb9: 8d 9d 64 ff ff ff lea -0x9c(%ebp),%ebx
110fbf: b9 21 00 00 00 mov $0x21,%ecx
110fc4: 31 c0 xor %eax,%eax
110fc6: 89 df mov %ebx,%edi
110fc8: f3 ab rep stos %eax,%es:(%edi)
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
110fca: 8d 45 ac lea -0x54(%ebp),%eax
110fcd: 89 45 a8 mov %eax,-0x58(%ebp)
head->previous = NULL;
tail->previous = head;
110fd0: 8d 45 a8 lea -0x58(%ebp),%eax
110fd3: 89 45 b0 mov %eax,-0x50(%ebp)
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
110fd6: 8d 45 bc lea -0x44(%ebp),%eax
110fd9: 89 45 b8 mov %eax,-0x48(%ebp)
head->previous = NULL;
tail->previous = head;
110fdc: 8d 45 b8 lea -0x48(%ebp),%eax
110fdf: 89 45 c0 mov %eax,-0x40(%ebp)
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
110fe2: 8d 45 cc lea -0x34(%ebp),%eax
110fe5: 89 45 c8 mov %eax,-0x38(%ebp)
head->previous = NULL;
tail->previous = head;
110fe8: 8d 45 c8 lea -0x38(%ebp),%eax
110feb: 89 45 d0 mov %eax,-0x30(%ebp)
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
110fee: 8d 45 dc lea -0x24(%ebp),%eax
110ff1: 89 45 d8 mov %eax,-0x28(%ebp)
head->previous = NULL;
tail->previous = head;
110ff4: 8d 45 d8 lea -0x28(%ebp),%eax
110ff7: 89 45 e0 mov %eax,-0x20(%ebp)
rtems_chain_initialize_empty (&fs.buffers);
rtems_chain_initialize_empty (&fs.release);
rtems_chain_initialize_empty (&fs.release_modified);
rtems_chain_initialize_empty (&fs.file_shares);
fs.max_held_buffers = RTEMS_RFS_FS_MAX_HELD_BUFFERS;
110ffa: c7 45 a4 05 00 00 00 movl $0x5,-0x5c(%ebp)
fs.release_count = 0;
fs.release_modified_count = 0;
fs.flags = RTEMS_RFS_FS_NO_LOCAL_CACHE;
111001: c7 85 64 ff ff ff 02 movl $0x2,-0x9c(%ebp)
111008: 00 00 00
/*
* Open the buffer interface.
*/
rc = rtems_rfs_buffer_open (name, &fs);
11100b: 50 push %eax
11100c: 50 push %eax
11100d: 53 push %ebx
11100e: ff 75 08 pushl 0x8(%ebp)
111011: e8 af 94 00 00 call 11a4c5 <rtems_rfs_buffer_open>
111016: 89 c6 mov %eax,%esi
if (rc > 0)
111018: 83 c4 10 add $0x10,%esp
11101b: 85 c0 test %eax,%eax
11101d: 7e 18 jle 111037 <rtems_rfs_format+0xa5> <== ALWAYS TAKEN
{
printf ("rtems-rfs: format: buffer open failed: %d: %s\n",
11101f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
111022: 50 push %eax <== NOT EXECUTED
111023: e8 9c 00 01 00 call 1210c4 <strerror> <== NOT EXECUTED
111028: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
11102b: 50 push %eax <== NOT EXECUTED
11102c: 56 push %esi <== NOT EXECUTED
11102d: 68 43 f9 12 00 push $0x12f943 <== NOT EXECUTED
111032: e9 ef 08 00 00 jmp 111926 <rtems_rfs_format+0x994><== NOT EXECUTED
}
/*
* Check the media.
*/
if (rtems_rfs_fs_media_block_size (&fs) == 0)
111037: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax
11103d: 83 78 20 00 cmpl $0x0,0x20(%eax)
111041: 75 0e jne 111051 <rtems_rfs_format+0xbf> <== ALWAYS TAKEN
{
printf ("rtems-rfs: media block is invalid: %" PRIu32 "\n",
111043: 57 push %edi <== NOT EXECUTED
111044: 57 push %edi <== NOT EXECUTED
111045: 6a 00 push $0x0 <== NOT EXECUTED
111047: 68 72 f9 12 00 push $0x12f972 <== NOT EXECUTED
11104c: e9 d5 08 00 00 jmp 111926 <rtems_rfs_format+0x994><== NOT EXECUTED
static bool
rtems_rfs_check_config (rtems_rfs_file_system* fs,
const rtems_rfs_format_config* config)
{
fs->block_size = config->block_size;
111051: 8b 55 0c mov 0xc(%ebp),%edx
111054: 8b 02 mov (%edx),%eax
111056: 89 85 6c ff ff ff mov %eax,-0x94(%ebp)
if (!fs->block_size)
11105c: 85 c0 test %eax,%eax
11105e: 75 75 jne 1110d5 <rtems_rfs_format+0x143>
{
uint64_t total_size = rtems_rfs_fs_media_size (fs);
111060: 83 ec 0c sub $0xc,%esp
111063: 53 push %ebx
111064: e8 f5 b5 00 00 call 11c65e <rtems_rfs_fs_media_size>
if (total_size >= GIGS (1))
111069: 83 c4 10 add $0x10,%esp
11106c: 83 fa 00 cmp $0x0,%edx
11106f: 77 07 ja 111078 <rtems_rfs_format+0xe6> <== NEVER TAKEN
111071: 3d ff ff 0f 00 cmp $0xfffff,%eax
111076: 76 31 jbe 1110a9 <rtems_rfs_format+0x117><== ALWAYS TAKEN
{
uint32_t gigs = (total_size + GIGS (1)) / GIGS (1);
111078: 05 00 00 10 00 add $0x100000,%eax <== NOT EXECUTED
11107d: 83 d2 00 adc $0x0,%edx <== NOT EXECUTED
111080: 0f ac d0 14 shrd $0x14,%edx,%eax <== NOT EXECUTED
111084: c1 ea 14 shr $0x14,%edx <== NOT EXECUTED
int b;
for (b = 31; b > 0; b--)
111087: b9 1f 00 00 00 mov $0x1f,%ecx <== NOT EXECUTED
if ((gigs & (1 << b)) != 0)
11108c: ba 01 00 00 00 mov $0x1,%edx <== NOT EXECUTED
111091: 89 d3 mov %edx,%ebx <== NOT EXECUTED
111093: d3 e3 shl %cl,%ebx <== NOT EXECUTED
111095: 85 c3 test %eax,%ebx <== NOT EXECUTED
111097: 75 03 jne 11109c <rtems_rfs_format+0x10a><== NOT EXECUTED
if (total_size >= GIGS (1))
{
uint32_t gigs = (total_size + GIGS (1)) / GIGS (1);
int b;
for (b = 31; b > 0; b--)
111099: 49 dec %ecx <== NOT EXECUTED
11109a: 75 f5 jne 111091 <rtems_rfs_format+0xff> <== NOT EXECUTED
if ((gigs & (1 << b)) != 0)
break;
fs->block_size = 1 << b;
11109c: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
1110a1: d3 e0 shl %cl,%eax <== NOT EXECUTED
1110a3: 89 85 6c ff ff ff mov %eax,-0x94(%ebp) <== NOT EXECUTED
}
if (fs->block_size < 512)
1110a9: 81 bd 6c ff ff ff ff cmpl $0x1ff,-0x94(%ebp)
1110b0: 01 00 00
1110b3: 77 0a ja 1110bf <rtems_rfs_format+0x12d><== NEVER TAKEN
fs->block_size = 512;
1110b5: c7 85 6c ff ff ff 00 movl $0x200,-0x94(%ebp)
1110bc: 02 00 00
if (fs->block_size > (4 * 1024))
1110bf: 81 bd 6c ff ff ff 00 cmpl $0x1000,-0x94(%ebp)
1110c6: 10 00 00
1110c9: 76 0a jbe 1110d5 <rtems_rfs_format+0x143><== ALWAYS TAKEN
fs->block_size = (4 * 1024);
1110cb: c7 85 6c ff ff ff 00 movl $0x1000,-0x94(%ebp) <== NOT EXECUTED
1110d2: 10 00 00
}
if ((fs->block_size % rtems_rfs_fs_media_block_size (fs)) != 0)
1110d5: 8b 8d 6c ff ff ff mov -0x94(%ebp),%ecx
1110db: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax
1110e1: 8b 58 20 mov 0x20(%eax),%ebx
1110e4: 89 c8 mov %ecx,%eax
1110e6: 31 d2 xor %edx,%edx
1110e8: f7 f3 div %ebx
1110ea: 85 d2 test %edx,%edx
1110ec: 74 0d je 1110fb <rtems_rfs_format+0x169><== ALWAYS TAKEN
{
printf ("block size (%zd) is not a multiple of media block size (%" PRId32 ")\n",
1110ee: 56 push %esi <== NOT EXECUTED
1110ef: 53 push %ebx <== NOT EXECUTED
1110f0: 51 push %ecx <== NOT EXECUTED
1110f1: 68 9a f9 12 00 push $0x12f99a <== NOT EXECUTED
1110f6: e9 2b 08 00 00 jmp 111926 <rtems_rfs_format+0x994><== NOT EXECUTED
fs->block_size, rtems_rfs_fs_media_block_size (fs));
return false;
}
fs->group_blocks = config->group_blocks;
1110fb: 8b 55 0c mov 0xc(%ebp),%edx
1110fe: 8b 42 04 mov 0x4(%edx),%eax
if (!fs->group_blocks)
111101: 85 c0 test %eax,%eax
111103: 74 02 je 111107 <rtems_rfs_format+0x175><== ALWAYS TAKEN
111105: eb 07 jmp 11110e <rtems_rfs_format+0x17c><== NOT EXECUTED
{
/*
* The number of blocks per group is defined by the number of bits in a
* block.
*/
fs->group_blocks = rtems_rfs_bitmap_numof_bits (fs->block_size);
111107: 8d 04 cd 00 00 00 00 lea 0x0(,%ecx,8),%eax
11110e: 89 45 8c mov %eax,-0x74(%ebp)
}
if (fs->group_blocks > rtems_rfs_bitmap_numof_bits (fs->block_size))
111111: c1 e1 03 shl $0x3,%ecx
111114: 39 4d 8c cmp %ecx,-0x74(%ebp)
111117: 76 15 jbe 11112e <rtems_rfs_format+0x19c><== ALWAYS TAKEN
{
printf ("group block count is higher than bits in block\n");
111119: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11111c: 68 d8 f9 12 00 push $0x12f9d8 <== NOT EXECUTED
111121: e8 2e f4 00 00 call 120554 <puts> <== NOT EXECUTED
111126: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
111129: e9 62 0a 00 00 jmp 111b90 <rtems_rfs_format+0xbfe><== NOT EXECUTED
return false;
}
fs->blocks = rtems_rfs_fs_media_size (fs) / fs->block_size;
11112e: 83 ec 0c sub $0xc,%esp
}
/*
* Check the configuration data.
*/
if (!rtems_rfs_check_config (&fs, config))
111131: 8d 85 64 ff ff ff lea -0x9c(%ebp),%eax
{
printf ("group block count is higher than bits in block\n");
return false;
}
fs->blocks = rtems_rfs_fs_media_size (fs) / fs->block_size;
111137: 50 push %eax
111138: e8 21 b5 00 00 call 11c65e <rtems_rfs_fs_media_size>
11113d: 8b 9d 6c ff ff ff mov -0x94(%ebp),%ebx
111143: 31 ff xor %edi,%edi
111145: 57 push %edi
111146: 53 push %ebx
111147: 52 push %edx
111148: 50 push %eax
111149: e8 06 b1 01 00 call 12c254 <__udivdi3>
11114e: 89 c7 mov %eax,%edi
111150: 89 85 68 ff ff ff mov %eax,-0x98(%ebp)
* Return the number of bits that fit in the block size.
*/
static int
rtems_rfs_bits_per_block (rtems_rfs_file_system* fs)
{
return rtems_rfs_bitmap_numof_bits (rtems_rfs_fs_block_size (fs));
111156: 8d 34 dd 00 00 00 00 lea 0x0(,%ebx,8),%esi
/*
* The bits per block sets the upper limit for the number of blocks in a
* group. The disk will be divided into groups which are the number of bits
* per block.
*/
fs->group_count = rtems_rfs_rup_quotient (rtems_rfs_fs_blocks (fs),
11115d: 83 c4 18 add $0x18,%esp
111160: 56 push %esi
111161: 50 push %eax
111162: e8 11 fe ff ff call 110f78 <rtems_rfs_rup_quotient>
111167: 83 c4 10 add $0x10,%esp
11116a: 89 45 88 mov %eax,-0x78(%ebp)
rtems_rfs_bits_per_block (fs));
fs->group_inodes = config->group_inodes;
11116d: 8b 4d 0c mov 0xc(%ebp),%ecx
111170: 8b 51 08 mov 0x8(%ecx),%edx
111173: 89 55 90 mov %edx,-0x70(%ebp)
if (!fs->group_inodes)
111176: 85 d2 test %edx,%edx
111178: 75 37 jne 1111b1 <rtems_rfs_format+0x21f><== NEVER TAKEN
int inode_overhead = RTEMS_RFS_INODE_OVERHEAD_PERCENTAGE;
/*
* The number of inodes per group is set as a percentage.
*/
if (config->inode_overhead)
11117a: 8b 51 0c mov 0xc(%ecx),%edx
11117d: 85 d2 test %edx,%edx
11117f: 75 02 jne 111183 <rtems_rfs_format+0x1f1><== NEVER TAKEN
rtems_rfs_bits_per_block (fs));
fs->group_inodes = config->group_inodes;
if (!fs->group_inodes)
{
int inode_overhead = RTEMS_RFS_INODE_OVERHEAD_PERCENTAGE;
111181: b2 01 mov $0x1,%dl
int percentage)
{
int blocks;
blocks = ((rtems_rfs_fs_blocks (fs) -
RTEMS_RFS_SUPERBLOCK_SIZE) * percentage) / 100;
blocks = rtems_rfs_rup_quotient (blocks, fs->group_count);
111183: 51 push %ecx
111184: 51 push %ecx
111185: 50 push %eax
static int
rtems_rfs_inodes_from_percent (rtems_rfs_file_system* fs,
int percentage)
{
int blocks;
blocks = ((rtems_rfs_fs_blocks (fs) -
111186: 4f dec %edi
RTEMS_RFS_SUPERBLOCK_SIZE) * percentage) / 100;
111187: 89 d0 mov %edx,%eax
111189: 0f af c7 imul %edi,%eax
11118c: b9 64 00 00 00 mov $0x64,%ecx
111191: 31 d2 xor %edx,%edx
111193: f7 f1 div %ecx
blocks = rtems_rfs_rup_quotient (blocks, fs->group_count);
111195: 50 push %eax
111196: e8 dd fd ff ff call 110f78 <rtems_rfs_rup_quotient>
11119b: 83 c4 10 add $0x10,%esp
11119e: 89 c1 mov %eax,%ecx
return blocks * (rtems_rfs_fs_block_size (fs) / RTEMS_RFS_INODE_SIZE);
1111a0: bf 38 00 00 00 mov $0x38,%edi
1111a5: 89 d8 mov %ebx,%eax
1111a7: 31 d2 xor %edx,%edx
1111a9: f7 f7 div %edi
1111ab: 0f af c8 imul %eax,%ecx
* The number of inodes per group is set as a percentage.
*/
if (config->inode_overhead)
inode_overhead = config->inode_overhead;
fs->group_inodes = rtems_rfs_inodes_from_percent (fs, inode_overhead);
1111ae: 89 4d 90 mov %ecx,-0x70(%ebp)
}
/*
* Round up to fill a block because the minimum allocation unit is a block.
*/
fs->inodes_per_block = rtems_rfs_fs_block_size (fs) / RTEMS_RFS_INODE_SIZE;
1111b1: b9 38 00 00 00 mov $0x38,%ecx
1111b6: 89 d8 mov %ebx,%eax
1111b8: 31 d2 xor %edx,%edx
1111ba: f7 f1 div %ecx
1111bc: 89 c3 mov %eax,%ebx
1111be: 89 45 94 mov %eax,-0x6c(%ebp)
fs->group_inodes =
rtems_rfs_rup_quotient (fs->group_inodes,
1111c1: 51 push %ecx
1111c2: 51 push %ecx
1111c3: 50 push %eax
1111c4: ff 75 90 pushl -0x70(%ebp)
1111c7: e8 ac fd ff ff call 110f78 <rtems_rfs_rup_quotient>
1111cc: 83 c4 10 add $0x10,%esp
fs->inodes_per_block) * fs->inodes_per_block;
1111cf: 0f af c3 imul %ebx,%eax
if (fs->group_inodes > rtems_rfs_bitmap_numof_bits (fs->block_size))
1111d2: 39 f0 cmp %esi,%eax
1111d4: 77 05 ja 1111db <rtems_rfs_format+0x249><== NEVER TAKEN
/*
* Round up to fill a block because the minimum allocation unit is a block.
*/
fs->inodes_per_block = rtems_rfs_fs_block_size (fs) / RTEMS_RFS_INODE_SIZE;
fs->group_inodes =
1111d6: 89 45 90 mov %eax,-0x70(%ebp)
1111d9: eb 03 jmp 1111de <rtems_rfs_format+0x24c>
rtems_rfs_rup_quotient (fs->group_inodes,
fs->inodes_per_block) * fs->inodes_per_block;
if (fs->group_inodes > rtems_rfs_bitmap_numof_bits (fs->block_size))
fs->group_inodes = rtems_rfs_bitmap_numof_bits (fs->block_size);
1111db: 89 75 90 mov %esi,-0x70(%ebp) <== NOT EXECUTED
fs->max_name_length = config->max_name_length;
1111de: 8b 55 0c mov 0xc(%ebp),%edx
1111e1: 8b 42 10 mov 0x10(%edx),%eax
if (!fs->max_name_length)
1111e4: 85 c0 test %eax,%eax
1111e6: 0f 85 a9 09 00 00 jne 111b95 <rtems_rfs_format+0xc03><== NEVER TAKEN
{
fs->max_name_length = 512;
1111ec: c7 45 80 00 02 00 00 movl $0x200,-0x80(%ebp)
1111f3: e9 a0 09 00 00 jmp 111b98 <rtems_rfs_format+0xc06>
if (!rtems_rfs_check_config (&fs, config))
return -1;
if (config->verbose)
{
printf ("rtems-rfs: format: media size = %" PRIu64 "\n",
1111f8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1111fb: 8d 9d 64 ff ff ff lea -0x9c(%ebp),%ebx <== NOT EXECUTED
111201: 53 push %ebx <== NOT EXECUTED
111202: e8 57 b4 00 00 call 11c65e <rtems_rfs_fs_media_size><== NOT EXECUTED
111207: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
11120a: 52 push %edx <== NOT EXECUTED
11120b: 50 push %eax <== NOT EXECUTED
11120c: 68 07 fa 12 00 push $0x12fa07 <== NOT EXECUTED
111211: e8 26 f1 00 00 call 12033c <printf> <== NOT EXECUTED
rtems_rfs_fs_media_size (&fs));
printf ("rtems-rfs: format: media blocks = %" PRIu32 "\n",
111216: 58 pop %eax <== NOT EXECUTED
111217: 5a pop %edx <== NOT EXECUTED
rtems_rfs_fs_media_blocks (&fs));
111218: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax <== NOT EXECUTED
if (config->verbose)
{
printf ("rtems-rfs: format: media size = %" PRIu64 "\n",
rtems_rfs_fs_media_size (&fs));
printf ("rtems-rfs: format: media blocks = %" PRIu32 "\n",
11121e: ff 70 1c pushl 0x1c(%eax) <== NOT EXECUTED
111221: 68 2d fa 12 00 push $0x12fa2d <== NOT EXECUTED
111226: e8 11 f1 00 00 call 12033c <printf> <== NOT EXECUTED
rtems_rfs_fs_media_blocks (&fs));
printf ("rtems-rfs: format: media block size = %" PRIu32 "\n",
11122b: 59 pop %ecx <== NOT EXECUTED
11122c: 5e pop %esi <== NOT EXECUTED
rtems_rfs_fs_media_block_size (&fs));
11122d: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax <== NOT EXECUTED
{
printf ("rtems-rfs: format: media size = %" PRIu64 "\n",
rtems_rfs_fs_media_size (&fs));
printf ("rtems-rfs: format: media blocks = %" PRIu32 "\n",
rtems_rfs_fs_media_blocks (&fs));
printf ("rtems-rfs: format: media block size = %" PRIu32 "\n",
111233: ff 70 20 pushl 0x20(%eax) <== NOT EXECUTED
111236: 68 54 fa 12 00 push $0x12fa54 <== NOT EXECUTED
11123b: e8 fc f0 00 00 call 12033c <printf> <== NOT EXECUTED
rtems_rfs_fs_media_block_size (&fs));
printf ("rtems-rfs: format: size = %" PRIu64 "\n",
111240: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED
111243: e8 08 b4 00 00 call 11c650 <rtems_rfs_fs_size> <== NOT EXECUTED
111248: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
11124b: 52 push %edx <== NOT EXECUTED
11124c: 50 push %eax <== NOT EXECUTED
11124d: 68 7f fa 12 00 push $0x12fa7f <== NOT EXECUTED
111252: e8 e5 f0 00 00 call 12033c <printf> <== NOT EXECUTED
rtems_rfs_fs_size (&fs));
printf ("rtems-rfs: format: blocks = %zu\n",
111257: 5f pop %edi <== NOT EXECUTED
111258: 58 pop %eax <== NOT EXECUTED
111259: ff b5 68 ff ff ff pushl -0x98(%ebp) <== NOT EXECUTED
11125f: 68 9f fa 12 00 push $0x12fa9f <== NOT EXECUTED
111264: e8 d3 f0 00 00 call 12033c <printf> <== NOT EXECUTED
rtems_rfs_fs_blocks (&fs));
printf ("rtems-rfs: format: block size = %zu\n",
111269: 58 pop %eax <== NOT EXECUTED
11126a: 5a pop %edx <== NOT EXECUTED
11126b: ff b5 6c ff ff ff pushl -0x94(%ebp) <== NOT EXECUTED
111271: 68 c0 fa 12 00 push $0x12fac0 <== NOT EXECUTED
111276: e8 c1 f0 00 00 call 12033c <printf> <== NOT EXECUTED
rtems_rfs_fs_block_size (&fs));
printf ("rtems-rfs: format: bits per block = %u\n",
11127b: 59 pop %ecx <== NOT EXECUTED
11127c: 5b pop %ebx <== NOT EXECUTED
* Return the number of bits that fit in the block size.
*/
static int
rtems_rfs_bits_per_block (rtems_rfs_file_system* fs)
{
return rtems_rfs_bitmap_numof_bits (rtems_rfs_fs_block_size (fs));
11127d: 8b 85 6c ff ff ff mov -0x94(%ebp),%eax <== NOT EXECUTED
111283: c1 e0 03 shl $0x3,%eax <== NOT EXECUTED
rtems_rfs_fs_size (&fs));
printf ("rtems-rfs: format: blocks = %zu\n",
rtems_rfs_fs_blocks (&fs));
printf ("rtems-rfs: format: block size = %zu\n",
rtems_rfs_fs_block_size (&fs));
printf ("rtems-rfs: format: bits per block = %u\n",
111286: 50 push %eax <== NOT EXECUTED
111287: 68 e5 fa 12 00 push $0x12fae5 <== NOT EXECUTED
11128c: e8 ab f0 00 00 call 12033c <printf> <== NOT EXECUTED
rtems_rfs_bits_per_block (&fs));
printf ("rtems-rfs: format: inode size = %zu\n", RTEMS_RFS_INODE_SIZE);
111291: 5e pop %esi <== NOT EXECUTED
111292: 5f pop %edi <== NOT EXECUTED
111293: 6a 38 push $0x38 <== NOT EXECUTED
111295: 68 0d fb 12 00 push $0x12fb0d <== NOT EXECUTED
11129a: e8 9d f0 00 00 call 12033c <printf> <== NOT EXECUTED
static int
rtems_rfs_inode_overhead (rtems_rfs_file_system* fs)
{
int blocks;
int bits_per_block;
blocks = rtems_rfs_rup_quotient(fs->group_inodes * RTEMS_RFS_INODE_SIZE,
11129f: 8b b5 6c ff ff ff mov -0x94(%ebp),%esi <== NOT EXECUTED
1112a5: 8b 5d 90 mov -0x70(%ebp),%ebx <== NOT EXECUTED
1112a8: 58 pop %eax <== NOT EXECUTED
1112a9: 5a pop %edx <== NOT EXECUTED
1112aa: 56 push %esi <== NOT EXECUTED
1112ab: 6b c3 38 imul $0x38,%ebx,%eax <== NOT EXECUTED
1112ae: 50 push %eax <== NOT EXECUTED
1112af: e8 c4 fc ff ff call 110f78 <rtems_rfs_rup_quotient><== NOT EXECUTED
1112b4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
* Return the number of bits that fit in the block size.
*/
static int
rtems_rfs_bits_per_block (rtems_rfs_file_system* fs)
{
return rtems_rfs_bitmap_numof_bits (rtems_rfs_fs_block_size (fs));
1112b7: c1 e6 03 shl $0x3,%esi <== NOT EXECUTED
bits_per_block = rtems_rfs_bits_per_block (fs);
/*
* There could be more bits than blocks, eg 512K disk with 512 blocks.
*/
if (bits_per_block > (rtems_rfs_fs_blocks (fs) - RTEMS_RFS_SUPERBLOCK_SIZE))
bits_per_block = rtems_rfs_fs_blocks (fs) - RTEMS_RFS_SUPERBLOCK_SIZE;
1112ba: 8b 8d 68 ff ff ff mov -0x98(%ebp),%ecx <== NOT EXECUTED
1112c0: 49 dec %ecx <== NOT EXECUTED
rtems_rfs_fs_block_size (fs));
bits_per_block = rtems_rfs_bits_per_block (fs);
/*
* There could be more bits than blocks, eg 512K disk with 512 blocks.
*/
if (bits_per_block > (rtems_rfs_fs_blocks (fs) - RTEMS_RFS_SUPERBLOCK_SIZE))
1112c1: 39 ce cmp %ecx,%esi <== NOT EXECUTED
1112c3: 77 02 ja 1112c7 <rtems_rfs_format+0x335><== NOT EXECUTED
* Return the number of bits that fit in the block size.
*/
static int
rtems_rfs_bits_per_block (rtems_rfs_file_system* fs)
{
return rtems_rfs_bitmap_numof_bits (rtems_rfs_fs_block_size (fs));
1112c5: 89 f1 mov %esi,%ecx <== NOT EXECUTED
/*
* There could be more bits than blocks, eg 512K disk with 512 blocks.
*/
if (bits_per_block > (rtems_rfs_fs_blocks (fs) - RTEMS_RFS_SUPERBLOCK_SIZE))
bits_per_block = rtems_rfs_fs_blocks (fs) - RTEMS_RFS_SUPERBLOCK_SIZE;
return ((blocks + 1) * 100 * 10) / bits_per_block;
1112c7: 40 inc %eax <== NOT EXECUTED
1112c8: 69 c0 e8 03 00 00 imul $0x3e8,%eax,%eax <== NOT EXECUTED
1112ce: 99 cltd <== NOT EXECUTED
1112cf: f7 f9 idiv %ecx <== NOT EXECUTED
printf ("rtems-rfs: format: block size = %zu\n",
rtems_rfs_fs_block_size (&fs));
printf ("rtems-rfs: format: bits per block = %u\n",
rtems_rfs_bits_per_block (&fs));
printf ("rtems-rfs: format: inode size = %zu\n", RTEMS_RFS_INODE_SIZE);
printf ("rtems-rfs: format: inodes = %zu (%d.%d%%)\n",
1112d1: b9 0a 00 00 00 mov $0xa,%ecx <== NOT EXECUTED
1112d6: 99 cltd <== NOT EXECUTED
1112d7: f7 f9 idiv %ecx <== NOT EXECUTED
1112d9: 52 push %edx <== NOT EXECUTED
1112da: 50 push %eax <== NOT EXECUTED
1112db: 0f af 5d 88 imul -0x78(%ebp),%ebx <== NOT EXECUTED
1112df: 53 push %ebx <== NOT EXECUTED
1112e0: 68 32 fb 12 00 push $0x12fb32 <== NOT EXECUTED
1112e5: e8 52 f0 00 00 call 12033c <printf> <== NOT EXECUTED
fs.group_inodes * fs.group_count,
rtems_rfs_inode_overhead (&fs) / 10,
rtems_rfs_inode_overhead (&fs) % 10);
printf ("rtems-rfs: format: groups = %u\n", fs.group_count);
1112ea: 58 pop %eax <== NOT EXECUTED
1112eb: 5a pop %edx <== NOT EXECUTED
1112ec: ff 75 88 pushl -0x78(%ebp) <== NOT EXECUTED
1112ef: 68 5d fb 12 00 push $0x12fb5d <== NOT EXECUTED
1112f4: e8 43 f0 00 00 call 12033c <printf> <== NOT EXECUTED
printf ("rtems-rfs: format: group blocks = %zu\n", fs.group_blocks);
1112f9: 59 pop %ecx <== NOT EXECUTED
1112fa: 5b pop %ebx <== NOT EXECUTED
1112fb: ff 75 8c pushl -0x74(%ebp) <== NOT EXECUTED
1112fe: 68 7d fb 12 00 push $0x12fb7d <== NOT EXECUTED
111303: e8 34 f0 00 00 call 12033c <printf> <== NOT EXECUTED
printf ("rtems-rfs: format: group inodes = %zu\n", fs.group_inodes);
111308: 5e pop %esi <== NOT EXECUTED
111309: 5f pop %edi <== NOT EXECUTED
11130a: ff 75 90 pushl -0x70(%ebp) <== NOT EXECUTED
11130d: 68 a4 fb 12 00 push $0x12fba4 <== NOT EXECUTED
111312: e8 25 f0 00 00 call 12033c <printf> <== NOT EXECUTED
111317: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
rc = rtems_rfs_buffer_setblksize (&fs, rtems_rfs_fs_block_size (&fs));
11131a: 50 push %eax
11131b: 50 push %eax
11131c: ff b5 6c ff ff ff pushl -0x94(%ebp)
111322: 8d 9d 64 ff ff ff lea -0x9c(%ebp),%ebx
111328: 53 push %ebx
111329: e8 d4 93 00 00 call 11a702 <rtems_rfs_buffer_setblksize>
11132e: 89 c6 mov %eax,%esi
if (rc > 0)
111330: 83 c4 10 add $0x10,%esp
111333: 85 c0 test %eax,%eax
111335: 7e 18 jle 11134f <rtems_rfs_format+0x3bd><== ALWAYS TAKEN
{
printf ("rtems-rfs: format: setting block size failed: %d: %s\n",
111337: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11133a: 50 push %eax <== NOT EXECUTED
11133b: e8 84 fd 00 00 call 1210c4 <strerror> <== NOT EXECUTED
111340: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
111343: 50 push %eax <== NOT EXECUTED
111344: 56 push %esi <== NOT EXECUTED
111345: 68 cb fb 12 00 push $0x12fbcb <== NOT EXECUTED
11134a: e9 d7 05 00 00 jmp 111926 <rtems_rfs_format+0x994><== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
11134f: c6 85 18 ff ff ff 00 movb $0x0,-0xe8(%ebp)
handle->bnum = 0;
111356: c7 85 1c ff ff ff 00 movl $0x0,-0xe4(%ebp)
11135d: 00 00 00
handle->buffer = NULL;
111360: c7 85 20 ff ff ff 00 movl $0x0,-0xe0(%ebp)
111367: 00 00 00
printf ("rtems-rfs: write-superblock: handle open failed: %d: %s\n",
rc, strerror (rc));
return false;
}
rc = rtems_rfs_buffer_handle_request (fs, &handle, 0, false);
11136a: 6a 00 push $0x0
11136c: 6a 00 push $0x0
11136e: 8d b5 18 ff ff ff lea -0xe8(%ebp),%esi
111374: 56 push %esi
111375: 53 push %ebx
111376: e8 2f 8f 00 00 call 11a2aa <rtems_rfs_buffer_handle_request>
11137b: 89 c7 mov %eax,%edi
if (rc > 0)
11137d: 83 c4 10 add $0x10,%esp
111380: 85 c0 test %eax,%eax
111382: 7e 21 jle 1113a5 <rtems_rfs_format+0x413><== ALWAYS TAKEN
{
rtems_rfs_buffer_handle_close (fs, &handle);
111384: 89 f2 mov %esi,%edx <== NOT EXECUTED
111386: 89 d8 mov %ebx,%eax <== NOT EXECUTED
111388: e8 c3 fb ff ff call 110f50 <rtems_rfs_buffer_handle_close><== NOT EXECUTED
printf ("rtems-rfs: write-superblock: request failed: %d: %s\n",
11138d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
111390: 57 push %edi <== NOT EXECUTED
111391: e8 2e fd 00 00 call 1210c4 <strerror> <== NOT EXECUTED
111396: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
111399: 50 push %eax <== NOT EXECUTED
11139a: 57 push %edi <== NOT EXECUTED
11139b: 68 01 fc 12 00 push $0x12fc01 <== NOT EXECUTED
1113a0: e9 60 01 00 00 jmp 111505 <rtems_rfs_format+0x573><== NOT EXECUTED
rc, strerror (rc));
return false;
}
sb = rtems_rfs_buffer_data (&handle);
1113a5: 8b 85 20 ff ff ff mov -0xe0(%ebp),%eax
1113ab: 8b 50 1c mov 0x1c(%eax),%edx
#define write_sb(_o, _d) rtems_rfs_write_u32(sb + (_o), _d)
memset (sb, 0xff, rtems_rfs_fs_block_size (fs));
1113ae: 8b 8d 6c ff ff ff mov -0x94(%ebp),%ecx
1113b4: b0 ff mov $0xff,%al
1113b6: 89 d7 mov %edx,%edi
1113b8: f3 aa rep stos %al,%es:(%edi)
write_sb (RTEMS_RFS_SB_OFFSET_MAGIC, RTEMS_RFS_SB_MAGIC);
1113ba: c6 02 28 movb $0x28,(%edx)
1113bd: c6 42 01 09 movb $0x9,0x1(%edx)
1113c1: c6 42 02 20 movb $0x20,0x2(%edx)
1113c5: c6 42 03 01 movb $0x1,0x3(%edx)
write_sb (RTEMS_RFS_SB_OFFSET_VERSION, RTEMS_RFS_VERSION);
1113c9: c6 42 04 00 movb $0x0,0x4(%edx)
1113cd: c6 42 05 00 movb $0x0,0x5(%edx)
1113d1: c6 42 06 00 movb $0x0,0x6(%edx)
1113d5: c6 42 07 00 movb $0x0,0x7(%edx)
write_sb (RTEMS_RFS_SB_OFFSET_BLOCKS, rtems_rfs_fs_blocks (fs));
1113d9: 8b 85 68 ff ff ff mov -0x98(%ebp),%eax
1113df: 89 c1 mov %eax,%ecx
1113e1: c1 e9 18 shr $0x18,%ecx
1113e4: 88 4a 0c mov %cl,0xc(%edx)
1113e7: 89 c1 mov %eax,%ecx
1113e9: c1 e9 10 shr $0x10,%ecx
1113ec: 88 4a 0d mov %cl,0xd(%edx)
1113ef: 89 c1 mov %eax,%ecx
1113f1: c1 e9 08 shr $0x8,%ecx
1113f4: 88 4a 0e mov %cl,0xe(%edx)
1113f7: 88 42 0f mov %al,0xf(%edx)
write_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE, rtems_rfs_fs_block_size (fs));
1113fa: 0f b6 85 6f ff ff ff movzbl -0x91(%ebp),%eax
111401: 88 42 08 mov %al,0x8(%edx)
111404: 0f b7 85 6e ff ff ff movzwl -0x92(%ebp),%eax
11140b: 88 42 09 mov %al,0x9(%edx)
11140e: 8b 85 6c ff ff ff mov -0x94(%ebp),%eax
111414: c1 e8 08 shr $0x8,%eax
111417: 88 42 0a mov %al,0xa(%edx)
11141a: 8b 85 6c ff ff ff mov -0x94(%ebp),%eax
111420: 88 42 0b mov %al,0xb(%edx)
write_sb (RTEMS_RFS_SB_OFFSET_BAD_BLOCKS, fs->bad_blocks);
111423: 0f b6 85 7f ff ff ff movzbl -0x81(%ebp),%eax
11142a: 88 42 10 mov %al,0x10(%edx)
11142d: 0f b7 85 7e ff ff ff movzwl -0x82(%ebp),%eax
111434: 88 42 11 mov %al,0x11(%edx)
111437: 8b 85 7c ff ff ff mov -0x84(%ebp),%eax
11143d: c1 e8 08 shr $0x8,%eax
111440: 88 42 12 mov %al,0x12(%edx)
111443: 8b 85 7c ff ff ff mov -0x84(%ebp),%eax
111449: 88 42 13 mov %al,0x13(%edx)
write_sb (RTEMS_RFS_SB_OFFSET_MAX_NAME_LENGTH, fs->max_name_length);
11144c: 0f b6 45 83 movzbl -0x7d(%ebp),%eax
111450: 88 42 14 mov %al,0x14(%edx)
111453: 0f b7 45 82 movzwl -0x7e(%ebp),%eax
111457: 88 42 15 mov %al,0x15(%edx)
11145a: 8b 45 80 mov -0x80(%ebp),%eax
11145d: c1 e8 08 shr $0x8,%eax
111460: 88 42 16 mov %al,0x16(%edx)
111463: 8b 45 80 mov -0x80(%ebp),%eax
111466: 88 42 17 mov %al,0x17(%edx)
write_sb (RTEMS_RFS_SB_OFFSET_GROUPS, fs->group_count);
111469: 0f b6 45 8b movzbl -0x75(%ebp),%eax
11146d: 88 42 18 mov %al,0x18(%edx)
111470: 0f b7 45 8a movzwl -0x76(%ebp),%eax
111474: 88 42 19 mov %al,0x19(%edx)
111477: 8b 45 88 mov -0x78(%ebp),%eax
11147a: c1 e8 08 shr $0x8,%eax
11147d: 88 42 1a mov %al,0x1a(%edx)
111480: 8b 45 88 mov -0x78(%ebp),%eax
111483: 88 42 1b mov %al,0x1b(%edx)
write_sb (RTEMS_RFS_SB_OFFSET_GROUP_BLOCKS, fs->group_blocks);
111486: 0f b6 45 8f movzbl -0x71(%ebp),%eax
11148a: 88 42 1c mov %al,0x1c(%edx)
11148d: 0f b7 45 8e movzwl -0x72(%ebp),%eax
111491: 88 42 1d mov %al,0x1d(%edx)
111494: 8b 45 8c mov -0x74(%ebp),%eax
111497: c1 e8 08 shr $0x8,%eax
11149a: 88 42 1e mov %al,0x1e(%edx)
11149d: 8b 45 8c mov -0x74(%ebp),%eax
1114a0: 88 42 1f mov %al,0x1f(%edx)
write_sb (RTEMS_RFS_SB_OFFSET_GROUP_INODES, fs->group_inodes);
1114a3: 0f b6 45 93 movzbl -0x6d(%ebp),%eax
1114a7: 88 42 20 mov %al,0x20(%edx)
1114aa: 0f b7 45 92 movzwl -0x6e(%ebp),%eax
1114ae: 88 42 21 mov %al,0x21(%edx)
1114b1: 8b 45 90 mov -0x70(%ebp),%eax
1114b4: c1 e8 08 shr $0x8,%eax
1114b7: 88 42 22 mov %al,0x22(%edx)
1114ba: 8b 45 90 mov -0x70(%ebp),%eax
1114bd: 88 42 23 mov %al,0x23(%edx)
write_sb (RTEMS_RFS_SB_OFFSET_INODE_SIZE, RTEMS_RFS_INODE_SIZE);
1114c0: c6 42 24 00 movb $0x0,0x24(%edx)
1114c4: c6 42 25 00 movb $0x0,0x25(%edx)
1114c8: c6 42 26 00 movb $0x0,0x26(%edx)
1114cc: c6 42 27 38 movb $0x38,0x27(%edx)
rtems_rfs_buffer_mark_dirty (&handle);
1114d0: c6 85 18 ff ff ff 01 movb $0x1,-0xe8(%ebp)
rc = rtems_rfs_buffer_handle_release (fs, &handle);
1114d7: 50 push %eax
1114d8: 50 push %eax
1114d9: 56 push %esi
1114da: 53 push %ebx
1114db: e8 51 8c 00 00 call 11a131 <rtems_rfs_buffer_handle_release>
1114e0: 89 c7 mov %eax,%edi
if (rc > 0)
1114e2: 83 c4 10 add $0x10,%esp
{
rtems_rfs_buffer_handle_close (fs, &handle);
1114e5: 89 f2 mov %esi,%edx
1114e7: 89 d8 mov %ebx,%eax
write_sb (RTEMS_RFS_SB_OFFSET_INODE_SIZE, RTEMS_RFS_INODE_SIZE);
rtems_rfs_buffer_mark_dirty (&handle);
rc = rtems_rfs_buffer_handle_release (fs, &handle);
if (rc > 0)
1114e9: 85 ff test %edi,%edi
1114eb: 7e 22 jle 11150f <rtems_rfs_format+0x57d><== ALWAYS TAKEN
{
rtems_rfs_buffer_handle_close (fs, &handle);
1114ed: e8 5e fa ff ff call 110f50 <rtems_rfs_buffer_handle_close><== NOT EXECUTED
printf ("rtems-rfs: write-superblock: buffer release failed: %d: %s\n",
1114f2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1114f5: 57 push %edi <== NOT EXECUTED
1114f6: e8 c9 fb 00 00 call 1210c4 <strerror> <== NOT EXECUTED
1114fb: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
1114fe: 50 push %eax <== NOT EXECUTED
1114ff: 57 push %edi <== NOT EXECUTED
111500: 68 36 fc 12 00 push $0x12fc36 <== NOT EXECUTED
111505: e8 32 ee 00 00 call 12033c <printf> <== NOT EXECUTED
11150a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11150d: eb 2f jmp 11153e <rtems_rfs_format+0x5ac><== NOT EXECUTED
rc, strerror (rc));
return false;
}
rc = rtems_rfs_buffer_handle_close (fs, &handle);
11150f: e8 3c fa ff ff call 110f50 <rtems_rfs_buffer_handle_close>
111514: 89 c7 mov %eax,%edi
if (rc > 0)
111516: 85 c0 test %eax,%eax
111518: 7e 15 jle 11152f <rtems_rfs_format+0x59d><== ALWAYS TAKEN
{
printf ("rtems-rfs: write-superblock: buffer handle close failed: %d: %s\n",
11151a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11151d: 50 push %eax <== NOT EXECUTED
11151e: e8 a1 fb 00 00 call 1210c4 <strerror> <== NOT EXECUTED
111523: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
111526: 50 push %eax <== NOT EXECUTED
111527: 57 push %edi <== NOT EXECUTED
111528: 68 72 fc 12 00 push $0x12fc72 <== NOT EXECUTED
11152d: eb d6 jmp 111505 <rtems_rfs_format+0x573><== NOT EXECUTED
printf ("rtems-rfs: format: setting block size failed: %d: %s\n",
rc, strerror (rc));
return -1;
}
if (!rtems_rfs_write_superblock (&fs))
11152f: c7 85 04 ff ff ff 00 movl $0x0,-0xfc(%ebp)
111536: 00 00 00
111539: e9 f2 03 00 00 jmp 111930 <rtems_rfs_format+0x99e>
{
printf ("rtems-rfs: format: superblock write failed\n");
11153e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
111541: 68 b3 fc 12 00 push $0x12fcb3 <== NOT EXECUTED
111546: e9 d6 fb ff ff jmp 111121 <rtems_rfs_format+0x18f><== NOT EXECUTED
return -1;
}
for (group = 0; group < fs.group_count; group++)
if (!rtems_rfs_write_group (&fs, group,
config->initialise_inodes, config->verbose))
11154b: 8b 55 0c mov 0xc(%ebp),%edx
11154e: 8a 52 15 mov 0x15(%edx),%dl
111551: 88 95 00 ff ff ff mov %dl,-0x100(%ebp)
111557: 8b 55 0c mov 0xc(%ebp),%edx
11155a: 8a 52 14 mov 0x14(%edx),%dl
11155d: 88 95 f7 fe ff ff mov %dl,-0x109(%ebp)
size_t group_size;
int blocks;
int b;
int rc;
group_base = rtems_rfs_fs_block (fs, group, 0);
111563: 8b 75 8c mov -0x74(%ebp),%esi
111566: 8b 8d 04 ff ff ff mov -0xfc(%ebp),%ecx
11156c: 0f af ce imul %esi,%ecx
11156f: 89 8d fc fe ff ff mov %ecx,-0x104(%ebp)
111575: 89 cb mov %ecx,%ebx
111577: 43 inc %ebx
if (group_base > rtems_rfs_fs_blocks (fs))
111578: 8b 85 68 ff ff ff mov -0x98(%ebp),%eax
11157e: 39 c3 cmp %eax,%ebx
111580: 76 12 jbe 111594 <rtems_rfs_format+0x602><== ALWAYS TAKEN
{
printf ("rtems-rfs: write-group: group %d base beyond disk limit\n",
111582: 50 push %eax <== NOT EXECUTED
111583: 50 push %eax <== NOT EXECUTED
111584: ff b5 04 ff ff ff pushl -0xfc(%ebp) <== NOT EXECUTED
11158a: 68 de fc 12 00 push $0x12fcde <== NOT EXECUTED
11158f: e9 92 03 00 00 jmp 111926 <rtems_rfs_format+0x994><== NOT EXECUTED
/*
* Be nice to strange sizes of disks. These are embedded systems after all
* and nice numbers do not always work out. Let the last block pick up the
* remainder of the blocks.
*/
if ((group_base + group_size) > rtems_rfs_fs_blocks (fs))
111594: 8d 14 33 lea (%ebx,%esi,1),%edx
111597: 39 c2 cmp %eax,%edx
111599: 76 04 jbe 11159f <rtems_rfs_format+0x60d><== NEVER TAKEN
group_size = rtems_rfs_fs_blocks (fs) - group_base;
11159b: 89 c6 mov %eax,%esi
11159d: 29 de sub %ebx,%esi
if (verbose)
11159f: 80 bd 00 ff ff ff 00 cmpb $0x0,-0x100(%ebp)
1115a6: 74 15 je 1115bd <rtems_rfs_format+0x62b><== ALWAYS TAKEN
printf ("\rrtems-rfs: format: group %3d: base = %" PRId32 ", size = %zd",
1115a8: 56 push %esi <== NOT EXECUTED
1115a9: 53 push %ebx <== NOT EXECUTED
1115aa: ff b5 04 ff ff ff pushl -0xfc(%ebp) <== NOT EXECUTED
1115b0: 68 17 fd 12 00 push $0x12fd17 <== NOT EXECUTED
1115b5: e8 82 ed 00 00 call 12033c <printf> <== NOT EXECUTED
1115ba: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
1115bd: c6 85 18 ff ff ff 00 movb $0x0,-0xe8(%ebp)
handle->bnum = 0;
1115c4: c7 85 1c ff ff ff 00 movl $0x0,-0xe4(%ebp)
1115cb: 00 00 00
handle->buffer = NULL;
1115ce: c7 85 20 ff ff ff 00 movl $0x0,-0xe0(%ebp)
1115d5: 00 00 00
printf ("\nrtems-rfs: write-group: handle open failed: %d: %s\n",
rc, strerror (rc));
return false;
}
if (verbose)
1115d8: 80 bd 00 ff ff ff 00 cmpb $0x0,-0x100(%ebp)
1115df: 74 10 je 1115f1 <rtems_rfs_format+0x65f><== ALWAYS TAKEN
printf (", blocks");
1115e1: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1115e4: 68 4d fd 12 00 push $0x12fd4d <== NOT EXECUTED
1115e9: e8 4e ed 00 00 call 12033c <printf> <== NOT EXECUTED
1115ee: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
/*
* Open the block bitmap using the new buffer.
*/
rc = rtems_rfs_bitmap_open (&bitmap, fs, &handle, group_size,
1115f1: 83 ec 0c sub $0xc,%esp
1115f4: 53 push %ebx
1115f5: 56 push %esi
1115f6: 8d 85 18 ff ff ff lea -0xe8(%ebp),%eax
1115fc: 50 push %eax
1115fd: 8d 95 64 ff ff ff lea -0x9c(%ebp),%edx
111603: 52 push %edx
111604: 8d 9d 24 ff ff ff lea -0xdc(%ebp),%ebx
11160a: 53 push %ebx
11160b: e8 fb 7b 00 00 call 11920b <rtems_rfs_bitmap_open>
111610: 89 c7 mov %eax,%edi
group_base + RTEMS_RFS_GROUP_BLOCK_BITMAP_BLOCK);
if (rc > 0)
111612: 83 c4 20 add $0x20,%esp
111615: 85 c0 test %eax,%eax
111617: 7e 29 jle 111642 <rtems_rfs_format+0x6b0><== ALWAYS TAKEN
{
rtems_rfs_buffer_handle_close (fs, &handle);
111619: 8d 95 18 ff ff ff lea -0xe8(%ebp),%edx <== NOT EXECUTED
11161f: 8d 85 64 ff ff ff lea -0x9c(%ebp),%eax <== NOT EXECUTED
111625: e8 26 f9 ff ff call 110f50 <rtems_rfs_buffer_handle_close><== NOT EXECUTED
printf ("\nrtems-rfs: write-group: group %3d: open block bitmap failed: %d: %s\n",
11162a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11162d: 57 push %edi <== NOT EXECUTED
11162e: e8 91 fa 00 00 call 1210c4 <strerror> <== NOT EXECUTED
111633: 50 push %eax <== NOT EXECUTED
111634: 57 push %edi <== NOT EXECUTED
111635: ff b5 04 ff ff ff pushl -0xfc(%ebp) <== NOT EXECUTED
11163b: 68 56 fd 12 00 push $0x12fd56 <== NOT EXECUTED
111640: eb 56 jmp 111698 <rtems_rfs_format+0x706><== NOT EXECUTED
/*
* Force the whole buffer to a known state. The bit map may not occupy the
* whole block.
*/
memset (rtems_rfs_buffer_data (&handle), 0xff, rtems_rfs_fs_block_size (fs));
111642: 8b 85 20 ff ff ff mov -0xe0(%ebp),%eax
111648: 8b 50 1c mov 0x1c(%eax),%edx
11164b: 8b 8d 6c ff ff ff mov -0x94(%ebp),%ecx
111651: b0 ff mov $0xff,%al
111653: 89 d7 mov %edx,%edi
111655: f3 aa rep stos %al,%es:(%edi)
/*
* Clear the bitmap.
*/
rc = rtems_rfs_bitmap_map_clear_all (&bitmap);
111657: 83 ec 0c sub $0xc,%esp
11165a: 53 push %ebx
11165b: e8 d3 79 00 00 call 119033 <rtems_rfs_bitmap_map_clear_all>
111660: 89 c7 mov %eax,%edi
if (rc > 0)
111662: 83 c4 10 add $0x10,%esp
111665: 85 c0 test %eax,%eax
111667: 7e 39 jle 1116a2 <rtems_rfs_format+0x710><== ALWAYS TAKEN
{
rtems_rfs_bitmap_close (&bitmap);
111669: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11166c: 53 push %ebx <== NOT EXECUTED
11166d: e8 eb 7b 00 00 call 11925d <rtems_rfs_bitmap_close><== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &handle);
111672: 8d 95 18 ff ff ff lea -0xe8(%ebp),%edx <== NOT EXECUTED
111678: 8d 85 64 ff ff ff lea -0x9c(%ebp),%eax <== NOT EXECUTED
11167e: e8 cd f8 ff ff call 110f50 <rtems_rfs_buffer_handle_close><== NOT EXECUTED
printf ("\nrtems-rfs: write-group: group %3d: block bitmap clear all failed: %d: %s\n",
111683: 89 3c 24 mov %edi,(%esp) <== NOT EXECUTED
111686: e8 39 fa 00 00 call 1210c4 <strerror> <== NOT EXECUTED
11168b: 50 push %eax <== NOT EXECUTED
11168c: 57 push %edi <== NOT EXECUTED
11168d: ff b5 04 ff ff ff pushl -0xfc(%ebp) <== NOT EXECUTED
111693: 68 9c fd 12 00 push $0x12fd9c <== NOT EXECUTED
111698: e8 9f ec 00 00 call 12033c <printf> <== NOT EXECUTED
11169d: e9 3b 02 00 00 jmp 1118dd <rtems_rfs_format+0x94b><== NOT EXECUTED
}
/*
* Forced allocation of the block bitmap.
*/
rtems_rfs_bitmap_map_set (&bitmap, RTEMS_RFS_GROUP_BLOCK_BITMAP_BLOCK);
1116a2: 50 push %eax
1116a3: 50 push %eax
1116a4: 6a 00 push $0x0
1116a6: 53 push %ebx
1116a7: e8 0f 78 00 00 call 118ebb <rtems_rfs_bitmap_map_set>
/*
* Forced allocation of the inode bitmap.
*/
rtems_rfs_bitmap_map_set (&bitmap, RTEMS_RFS_GROUP_INODE_BITMAP_BLOCK);
1116ac: 58 pop %eax
1116ad: 5a pop %edx
1116ae: 6a 01 push $0x1
1116b0: 53 push %ebx
1116b1: e8 05 78 00 00 call 118ebb <rtems_rfs_bitmap_map_set>
/*
* Determine the number of inodes blocks in the group.
*/
blocks = rtems_rfs_rup_quotient (fs->group_inodes, fs->inodes_per_block);
1116b6: 59 pop %ecx
1116b7: 5f pop %edi
1116b8: ff 75 94 pushl -0x6c(%ebp)
1116bb: ff 75 90 pushl -0x70(%ebp)
1116be: e8 b5 f8 ff ff call 110f78 <rtems_rfs_rup_quotient>
1116c3: 83 c4 10 add $0x10,%esp
1116c6: 89 85 f8 fe ff ff mov %eax,-0x108(%ebp)
/*
* Forced allocation of the inode blocks which follow the block bitmap.
*/
for (b = 0; b < blocks; b++)
1116cc: 31 ff xor %edi,%edi
1116ce: eb 10 jmp 1116e0 <rtems_rfs_format+0x74e>
rtems_rfs_bitmap_map_set (&bitmap, b + RTEMS_RFS_GROUP_INODE_BLOCK);
1116d0: 50 push %eax
1116d1: 50 push %eax
return rc;
}
int
rtems_rfs_format (const char* name, const rtems_rfs_format_config* config)
1116d2: 8d 47 02 lea 0x2(%edi),%eax
/*
* Forced allocation of the inode blocks which follow the block bitmap.
*/
for (b = 0; b < blocks; b++)
rtems_rfs_bitmap_map_set (&bitmap, b + RTEMS_RFS_GROUP_INODE_BLOCK);
1116d5: 50 push %eax
1116d6: 53 push %ebx
1116d7: e8 df 77 00 00 call 118ebb <rtems_rfs_bitmap_map_set>
blocks = rtems_rfs_rup_quotient (fs->group_inodes, fs->inodes_per_block);
/*
* Forced allocation of the inode blocks which follow the block bitmap.
*/
for (b = 0; b < blocks; b++)
1116dc: 47 inc %edi
1116dd: 83 c4 10 add $0x10,%esp
1116e0: 3b bd f8 fe ff ff cmp -0x108(%ebp),%edi
1116e6: 7c e8 jl 1116d0 <rtems_rfs_format+0x73e>
rtems_rfs_bitmap_map_set (&bitmap, b + RTEMS_RFS_GROUP_INODE_BLOCK);
/*
* Close the block bitmap.
*/
rc = rtems_rfs_bitmap_close (&bitmap);
1116e8: 83 ec 0c sub $0xc,%esp
1116eb: 53 push %ebx
1116ec: e8 6c 7b 00 00 call 11925d <rtems_rfs_bitmap_close>
1116f1: 89 c3 mov %eax,%ebx
if (rc > 0)
1116f3: 83 c4 10 add $0x10,%esp
1116f6: 85 c0 test %eax,%eax
1116f8: 7e 2c jle 111726 <rtems_rfs_format+0x794><== ALWAYS TAKEN
{
rtems_rfs_buffer_handle_close (fs, &handle);
1116fa: 8d 95 18 ff ff ff lea -0xe8(%ebp),%edx <== NOT EXECUTED
111700: 8d 85 64 ff ff ff lea -0x9c(%ebp),%eax <== NOT EXECUTED
111706: e8 45 f8 ff ff call 110f50 <rtems_rfs_buffer_handle_close><== NOT EXECUTED
printf ("\nrtems-rfs: write-group: group %3d: close block bitmap failed: %d: %s\n",
11170b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11170e: 53 push %ebx <== NOT EXECUTED
11170f: e8 b0 f9 00 00 call 1210c4 <strerror> <== NOT EXECUTED
111714: 50 push %eax <== NOT EXECUTED
111715: 53 push %ebx <== NOT EXECUTED
111716: ff b5 04 ff ff ff pushl -0xfc(%ebp) <== NOT EXECUTED
11171c: 68 e7 fd 12 00 push $0x12fde7 <== NOT EXECUTED
111721: e9 72 ff ff ff jmp 111698 <rtems_rfs_format+0x706><== NOT EXECUTED
group, rc, strerror (rc));
return false;
}
rtems_rfs_buffer_mark_dirty (&handle);
111726: c6 85 18 ff ff ff 01 movb $0x1,-0xe8(%ebp)
if (verbose)
11172d: 80 bd 00 ff ff ff 00 cmpb $0x0,-0x100(%ebp)
111734: 74 10 je 111746 <rtems_rfs_format+0x7b4><== ALWAYS TAKEN
printf (", inodes");
111736: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
111739: 68 2e fe 12 00 push $0x12fe2e <== NOT EXECUTED
11173e: e8 f9 eb 00 00 call 12033c <printf> <== NOT EXECUTED
111743: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
/*
* Open the inode bitmap using the old buffer. Should release any changes.
*/
rc = rtems_rfs_bitmap_open (&bitmap, fs, &handle, group_size,
111746: 83 ec 0c sub $0xc,%esp
111749: 8b 85 fc fe ff ff mov -0x104(%ebp),%eax
11174f: 83 c0 02 add $0x2,%eax
111752: 50 push %eax
111753: 56 push %esi
111754: 8d 8d 18 ff ff ff lea -0xe8(%ebp),%ecx
11175a: 51 push %ecx
11175b: 8d 85 64 ff ff ff lea -0x9c(%ebp),%eax
111761: 50 push %eax
111762: 8d 9d 24 ff ff ff lea -0xdc(%ebp),%ebx
111768: 53 push %ebx
111769: e8 9d 7a 00 00 call 11920b <rtems_rfs_bitmap_open>
11176e: 89 c6 mov %eax,%esi
group_base + RTEMS_RFS_GROUP_INODE_BITMAP_BLOCK);
if (rc > 0)
111770: 83 c4 20 add $0x20,%esp
111773: 85 c0 test %eax,%eax
111775: 7e 2c jle 1117a3 <rtems_rfs_format+0x811><== ALWAYS TAKEN
{
rtems_rfs_buffer_handle_close (fs, &handle);
111777: 8d 95 18 ff ff ff lea -0xe8(%ebp),%edx <== NOT EXECUTED
11177d: 8d 85 64 ff ff ff lea -0x9c(%ebp),%eax <== NOT EXECUTED
111783: e8 c8 f7 ff ff call 110f50 <rtems_rfs_buffer_handle_close><== NOT EXECUTED
printf ("\nrtems-rfs: write-group: group %3d: open inode bitmap failed: %d: %s\n",
111788: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11178b: 56 push %esi <== NOT EXECUTED
11178c: e8 33 f9 00 00 call 1210c4 <strerror> <== NOT EXECUTED
111791: 50 push %eax <== NOT EXECUTED
111792: 56 push %esi <== NOT EXECUTED
111793: ff b5 04 ff ff ff pushl -0xfc(%ebp) <== NOT EXECUTED
111799: 68 37 fe 12 00 push $0x12fe37 <== NOT EXECUTED
11179e: e9 f5 fe ff ff jmp 111698 <rtems_rfs_format+0x706><== NOT EXECUTED
/*
* Force the whole buffer to a known state. The bit map may not occupy the
* whole block.
*/
memset (rtems_rfs_buffer_data (&handle), 0x00, rtems_rfs_fs_block_size (fs));
1117a3: 8b 85 20 ff ff ff mov -0xe0(%ebp),%eax
1117a9: 8b 50 1c mov 0x1c(%eax),%edx
1117ac: 8b 8d 6c ff ff ff mov -0x94(%ebp),%ecx
1117b2: 31 c0 xor %eax,%eax
1117b4: 89 d7 mov %edx,%edi
1117b6: f3 aa rep stos %al,%es:(%edi)
/*
* Clear the inode bitmap.
*/
rc = rtems_rfs_bitmap_map_clear_all (&bitmap);
1117b8: 83 ec 0c sub $0xc,%esp
1117bb: 53 push %ebx
1117bc: e8 72 78 00 00 call 119033 <rtems_rfs_bitmap_map_clear_all>
1117c1: 89 c6 mov %eax,%esi
if (rc > 0)
1117c3: 83 c4 10 add $0x10,%esp
1117c6: 85 c0 test %eax,%eax
1117c8: 7e 34 jle 1117fe <rtems_rfs_format+0x86c><== ALWAYS TAKEN
{
rtems_rfs_bitmap_close (&bitmap);
1117ca: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1117cd: 53 push %ebx <== NOT EXECUTED
1117ce: e8 8a 7a 00 00 call 11925d <rtems_rfs_bitmap_close><== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &handle);
1117d3: 8d 95 18 ff ff ff lea -0xe8(%ebp),%edx <== NOT EXECUTED
1117d9: 8d 85 64 ff ff ff lea -0x9c(%ebp),%eax <== NOT EXECUTED
1117df: e8 6c f7 ff ff call 110f50 <rtems_rfs_buffer_handle_close><== NOT EXECUTED
printf ("\nrtems-rfs: write-group: group %3d: inode bitmap" \
1117e4: 89 34 24 mov %esi,(%esp) <== NOT EXECUTED
1117e7: e8 d8 f8 00 00 call 1210c4 <strerror> <== NOT EXECUTED
1117ec: 50 push %eax <== NOT EXECUTED
1117ed: 56 push %esi <== NOT EXECUTED
1117ee: ff b5 04 ff ff ff pushl -0xfc(%ebp) <== NOT EXECUTED
1117f4: 68 7d fe 12 00 push $0x12fe7d <== NOT EXECUTED
1117f9: e9 9a fe ff ff jmp 111698 <rtems_rfs_format+0x706><== NOT EXECUTED
}
/*
* Close the inode bitmap.
*/
rc = rtems_rfs_bitmap_close (&bitmap);
1117fe: 83 ec 0c sub $0xc,%esp
111801: 53 push %ebx
111802: e8 56 7a 00 00 call 11925d <rtems_rfs_bitmap_close>
111807: 89 c3 mov %eax,%ebx
if (rc > 0)
111809: 83 c4 10 add $0x10,%esp
11180c: 85 c0 test %eax,%eax
11180e: 7e 2c jle 11183c <rtems_rfs_format+0x8aa><== ALWAYS TAKEN
{
rtems_rfs_buffer_handle_close (fs, &handle);
111810: 8d 95 18 ff ff ff lea -0xe8(%ebp),%edx <== NOT EXECUTED
111816: 8d 85 64 ff ff ff lea -0x9c(%ebp),%eax <== NOT EXECUTED
11181c: e8 2f f7 ff ff call 110f50 <rtems_rfs_buffer_handle_close><== NOT EXECUTED
printf ("\nrtems-rfs: write-group: group %3d: close inode" \
111821: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
111824: 53 push %ebx <== NOT EXECUTED
111825: e8 9a f8 00 00 call 1210c4 <strerror> <== NOT EXECUTED
11182a: 50 push %eax <== NOT EXECUTED
11182b: 53 push %ebx <== NOT EXECUTED
11182c: ff b5 04 ff ff ff pushl -0xfc(%ebp) <== NOT EXECUTED
111832: 68 c8 fe 12 00 push $0x12fec8 <== NOT EXECUTED
111837: e9 5c fe ff ff jmp 111698 <rtems_rfs_format+0x706><== NOT EXECUTED
" bitmap failed: %d: %s\n", group, rc, strerror (rc));
return false;
}
rtems_rfs_buffer_mark_dirty (&handle);
11183c: c6 85 18 ff ff ff 01 movb $0x1,-0xe8(%ebp)
/*
* Initialise the inode tables if required to do so.
*/
if (initialise_inodes)
111843: 31 db xor %ebx,%ebx
{
for (b = 0; b < blocks; b++)
{
rc = rtems_rfs_buffer_handle_request (fs, &handle,
group_base + b + RTEMS_RFS_GROUP_INODE_BLOCK,
111845: 8b 95 fc fe ff ff mov -0x104(%ebp),%edx
11184b: 83 c2 03 add $0x3,%edx
11184e: 89 95 00 ff ff ff mov %edx,-0x100(%ebp)
rtems_rfs_buffer_mark_dirty (&handle);
/*
* Initialise the inode tables if required to do so.
*/
if (initialise_inodes)
111854: 80 bd f7 fe ff ff 00 cmpb $0x0,-0x109(%ebp)
11185b: 0f 85 a1 00 00 00 jne 111902 <rtems_rfs_format+0x970><== NEVER TAKEN
rtems_rfs_buffer_mark_dirty (&handle);
}
}
rc = rtems_rfs_buffer_handle_close (fs, &handle);
111861: 8d 95 18 ff ff ff lea -0xe8(%ebp),%edx
111867: 8d 85 64 ff ff ff lea -0x9c(%ebp),%eax
11186d: e8 de f6 ff ff call 110f50 <rtems_rfs_buffer_handle_close>
111872: 89 c3 mov %eax,%ebx
if (rc > 0)
111874: 85 c0 test %eax,%eax
111876: 0f 8f 97 00 00 00 jg 111913 <rtems_rfs_format+0x981><== NEVER TAKEN
{
printf ("rtems-rfs: format: superblock write failed\n");
return -1;
}
for (group = 0; group < fs.group_count; group++)
11187c: ff 85 04 ff ff ff incl -0xfc(%ebp)
111882: e9 a9 00 00 00 jmp 111930 <rtems_rfs_format+0x99e>
return rc;
}
int
rtems_rfs_format (const char* name, const rtems_rfs_format_config* config)
111887: 8b bd 00 ff ff ff mov -0x100(%ebp),%edi <== NOT EXECUTED
11188d: 01 df add %ebx,%edi <== NOT EXECUTED
*/
if (initialise_inodes)
{
for (b = 0; b < blocks; b++)
{
rc = rtems_rfs_buffer_handle_request (fs, &handle,
11188f: 6a 00 push $0x0 <== NOT EXECUTED
111891: 57 push %edi <== NOT EXECUTED
111892: 8d 8d 18 ff ff ff lea -0xe8(%ebp),%ecx <== NOT EXECUTED
111898: 51 push %ecx <== NOT EXECUTED
111899: 8d 85 64 ff ff ff lea -0x9c(%ebp),%eax <== NOT EXECUTED
11189f: 50 push %eax <== NOT EXECUTED
1118a0: e8 05 8a 00 00 call 11a2aa <rtems_rfs_buffer_handle_request><== NOT EXECUTED
1118a5: 89 c6 mov %eax,%esi <== NOT EXECUTED
group_base + b + RTEMS_RFS_GROUP_INODE_BLOCK,
false);
if (rc > 0)
1118a7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1118aa: 85 c0 test %eax,%eax <== NOT EXECUTED
1118ac: 7e 37 jle 1118e5 <rtems_rfs_format+0x953><== NOT EXECUTED
{
rtems_rfs_buffer_handle_close (fs, &handle);
1118ae: 8d 95 18 ff ff ff lea -0xe8(%ebp),%edx <== NOT EXECUTED
1118b4: 8d 85 64 ff ff ff lea -0x9c(%ebp),%eax <== NOT EXECUTED
1118ba: e8 91 f6 ff ff call 110f50 <rtems_rfs_buffer_handle_close><== NOT EXECUTED
printf ("\nrtems-rfs: write-group: group %3d: block %" PRId32 " request failed: %d: %s\n",
1118bf: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1118c2: 56 push %esi <== NOT EXECUTED
1118c3: e8 fc f7 00 00 call 1210c4 <strerror> <== NOT EXECUTED
1118c8: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
1118cb: 56 push %esi <== NOT EXECUTED
1118cc: 57 push %edi <== NOT EXECUTED
1118cd: ff b5 04 ff ff ff pushl -0xfc(%ebp) <== NOT EXECUTED
1118d3: 68 0f ff 12 00 push $0x12ff0f <== NOT EXECUTED
1118d8: e8 5f ea 00 00 call 12033c <printf> <== NOT EXECUTED
1118dd: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
1118e0: e9 ab 02 00 00 jmp 111b90 <rtems_rfs_format+0xbfe><== NOT EXECUTED
/*
* Force the whole buffer to a known state. The bit map may not occupy the
* whole block.
*/
memset (rtems_rfs_buffer_data (&handle), 0xff, rtems_rfs_fs_block_size (fs));
1118e5: 8b 85 20 ff ff ff mov -0xe0(%ebp),%eax <== NOT EXECUTED
1118eb: 8b 50 1c mov 0x1c(%eax),%edx <== NOT EXECUTED
1118ee: 8b 8d 6c ff ff ff mov -0x94(%ebp),%ecx <== NOT EXECUTED
1118f4: b0 ff mov $0xff,%al <== NOT EXECUTED
1118f6: 89 d7 mov %edx,%edi <== NOT EXECUTED
1118f8: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle);
1118fa: c6 85 18 ff ff ff 01 movb $0x1,-0xe8(%ebp) <== NOT EXECUTED
/*
* Initialise the inode tables if required to do so.
*/
if (initialise_inodes)
{
for (b = 0; b < blocks; b++)
111901: 43 inc %ebx <== NOT EXECUTED
111902: 3b 9d f8 fe ff ff cmp -0x108(%ebp),%ebx <== NOT EXECUTED
111908: 0f 8c 79 ff ff ff jl 111887 <rtems_rfs_format+0x8f5><== NOT EXECUTED
11190e: e9 4e ff ff ff jmp 111861 <rtems_rfs_format+0x8cf><== NOT EXECUTED
}
rc = rtems_rfs_buffer_handle_close (fs, &handle);
if (rc > 0)
{
printf ("\nrtems-rfs: write-group: buffer handle close failed: %d: %s\n",
111913: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
111916: 50 push %eax <== NOT EXECUTED
111917: e8 a8 f7 00 00 call 1210c4 <strerror> <== NOT EXECUTED
11191c: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
11191f: 50 push %eax <== NOT EXECUTED
111920: 53 push %ebx <== NOT EXECUTED
111921: 68 55 ff 12 00 push $0x12ff55 <== NOT EXECUTED
111926: e8 11 ea 00 00 call 12033c <printf> <== NOT EXECUTED
11192b: e9 f6 f7 ff ff jmp 111126 <rtems_rfs_format+0x194><== NOT EXECUTED
{
printf ("rtems-rfs: format: superblock write failed\n");
return -1;
}
for (group = 0; group < fs.group_count; group++)
111930: 8b 95 04 ff ff ff mov -0xfc(%ebp),%edx
111936: 3b 55 88 cmp -0x78(%ebp),%edx
111939: 0f 8c 0c fc ff ff jl 11154b <rtems_rfs_format+0x5b9>
if (!rtems_rfs_write_group (&fs, group,
config->initialise_inodes, config->verbose))
return -1;
if (config->verbose)
11193f: 8b 4d 0c mov 0xc(%ebp),%ecx
111942: 80 79 15 00 cmpb $0x0,0x15(%ecx)
111946: 74 0d je 111955 <rtems_rfs_format+0x9c3><== ALWAYS TAKEN
printf ("\n");
111948: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11194b: 6a 0a push $0xa <== NOT EXECUTED
11194d: e8 56 eb 00 00 call 1204a8 <putchar> <== NOT EXECUTED
111952: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rc = rtems_rfs_buffer_close (&fs);
111955: 83 ec 0c sub $0xc,%esp
111958: 8d 85 64 ff ff ff lea -0x9c(%ebp),%eax
11195e: 50 push %eax
11195f: e8 77 8e 00 00 call 11a7db <rtems_rfs_buffer_close>
111964: 89 c3 mov %eax,%ebx
if (rc > 0)
111966: 83 c4 10 add $0x10,%esp
111969: 85 c0 test %eax,%eax
11196b: 7e 15 jle 111982 <rtems_rfs_format+0x9f0><== ALWAYS TAKEN
{
printf ("rtems-rfs: format: buffer close failed: %d: %s\n",
11196d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
111970: 50 push %eax <== NOT EXECUTED
111971: e8 4e f7 00 00 call 1210c4 <strerror> <== NOT EXECUTED
111976: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
111979: 50 push %eax <== NOT EXECUTED
11197a: 53 push %ebx <== NOT EXECUTED
11197b: 68 92 ff 12 00 push $0x12ff92 <== NOT EXECUTED
111980: eb a4 jmp 111926 <rtems_rfs_format+0x994><== NOT EXECUTED
int rc;
/*
* External API so returns -1.
*/
rc = rtems_rfs_fs_open (name, NULL,
111982: 83 ec 0c sub $0xc,%esp
111985: 8d 85 10 ff ff ff lea -0xf0(%ebp),%eax
11198b: 50 push %eax
11198c: 6a 00 push $0x0
11198e: 6a 06 push $0x6
111990: 6a 00 push $0x0
111992: ff 75 08 pushl 0x8(%ebp)
111995: e8 d5 ac 00 00 call 11c66f <rtems_rfs_fs_open>
RTEMS_RFS_FS_FORCE_OPEN | RTEMS_RFS_FS_NO_LOCAL_CACHE,
0, &fs);
if (rc < 0)
11199a: 83 c4 20 add $0x20,%esp
11199d: 85 c0 test %eax,%eax
11199f: 79 2e jns 1119cf <rtems_rfs_format+0xa3d><== ALWAYS TAKEN
{
printf ("rtems-rfs: format: file system open failed: %d: %s\n",
errno, strerror (errno));
1119a1: e8 26 d8 00 00 call 11f1cc <__errno> <== NOT EXECUTED
rc = rtems_rfs_fs_open (name, NULL,
RTEMS_RFS_FS_FORCE_OPEN | RTEMS_RFS_FS_NO_LOCAL_CACHE,
0, &fs);
if (rc < 0)
{
printf ("rtems-rfs: format: file system open failed: %d: %s\n",
1119a6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1119a9: ff 30 pushl (%eax) <== NOT EXECUTED
1119ab: e8 14 f7 00 00 call 1210c4 <strerror> <== NOT EXECUTED
1119b0: 89 c3 mov %eax,%ebx <== NOT EXECUTED
errno, strerror (errno));
1119b2: e8 15 d8 00 00 call 11f1cc <__errno> <== NOT EXECUTED
rc = rtems_rfs_fs_open (name, NULL,
RTEMS_RFS_FS_FORCE_OPEN | RTEMS_RFS_FS_NO_LOCAL_CACHE,
0, &fs);
if (rc < 0)
{
printf ("rtems-rfs: format: file system open failed: %d: %s\n",
1119b7: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
1119ba: 53 push %ebx <== NOT EXECUTED
1119bb: ff 30 pushl (%eax) <== NOT EXECUTED
1119bd: 68 c2 ff 12 00 push $0x12ffc2 <== NOT EXECUTED
1119c2: e8 75 e9 00 00 call 12033c <printf> <== NOT EXECUTED
1119c7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1119ca: e9 bd 01 00 00 jmp 111b8c <rtems_rfs_format+0xbfa><== NOT EXECUTED
errno, strerror (errno));
return -1;
}
rc = rtems_rfs_inode_alloc (fs, RTEMS_RFS_ROOT_INO, &ino);
1119cf: 53 push %ebx
1119d0: 8d 85 14 ff ff ff lea -0xec(%ebp),%eax
1119d6: 50 push %eax
1119d7: 6a 01 push $0x1
1119d9: ff b5 10 ff ff ff pushl -0xf0(%ebp)
1119df: e8 98 07 00 00 call 11217c <rtems_rfs_inode_alloc>
1119e4: 89 c3 mov %eax,%ebx
if (rc > 0)
1119e6: 83 c4 10 add $0x10,%esp
1119e9: 85 c0 test %eax,%eax
1119eb: 7e 15 jle 111a02 <rtems_rfs_format+0xa70><== ALWAYS TAKEN
{
printf ("rtems-rfs: format: inode allocation failed: %d: %s\n",
1119ed: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1119f0: 50 push %eax <== NOT EXECUTED
1119f1: e8 ce f6 00 00 call 1210c4 <strerror> <== NOT EXECUTED
1119f6: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
1119f9: 50 push %eax <== NOT EXECUTED
1119fa: 53 push %ebx <== NOT EXECUTED
1119fb: 68 f6 ff 12 00 push $0x12fff6 <== NOT EXECUTED
111a00: eb 13 jmp 111a15 <rtems_rfs_format+0xa83><== NOT EXECUTED
rc, strerror (rc));
rtems_rfs_fs_close (fs);
return rc;
}
if (ino != RTEMS_RFS_ROOT_INO)
111a02: 8b 85 14 ff ff ff mov -0xec(%ebp),%eax
111a08: 83 f8 01 cmp $0x1,%eax
111a0b: 74 0f je 111a1c <rtems_rfs_format+0xa8a><== ALWAYS TAKEN
{
printf ("rtems-rfs: format: allocated inode not root ino: %" PRId32 "\n", ino);
111a0d: 51 push %ecx <== NOT EXECUTED
111a0e: 51 push %ecx <== NOT EXECUTED
111a0f: 50 push %eax <== NOT EXECUTED
111a10: 68 2a 00 13 00 push $0x13002a <== NOT EXECUTED
111a15: e8 22 e9 00 00 call 12033c <printf> <== NOT EXECUTED
111a1a: eb 4d jmp 111a69 <rtems_rfs_format+0xad7><== NOT EXECUTED
rtems_rfs_fs_close (fs);
return rc;
}
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
111a1c: 6a 01 push $0x1
111a1e: 8d b5 3c ff ff ff lea -0xc4(%ebp),%esi
111a24: 56 push %esi
111a25: 6a 01 push $0x1
111a27: ff b5 10 ff ff ff pushl -0xf0(%ebp)
111a2d: e8 f8 07 00 00 call 11222a <rtems_rfs_inode_open>
111a32: 89 c3 mov %eax,%ebx
if (rc > 0)
111a34: 83 c4 10 add $0x10,%esp
111a37: 85 c0 test %eax,%eax
111a39: 7e 3f jle 111a7a <rtems_rfs_format+0xae8><== ALWAYS TAKEN
{
printf ("rtems-rfs: format: inode open failed: %d: %s\n",
111a3b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
111a3e: 50 push %eax <== NOT EXECUTED
111a3f: e8 80 f6 00 00 call 1210c4 <strerror> <== NOT EXECUTED
111a44: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
111a47: 50 push %eax <== NOT EXECUTED
111a48: 53 push %ebx <== NOT EXECUTED
111a49: 68 60 00 13 00 push $0x130060 <== NOT EXECUTED
111a4e: e8 e9 e8 00 00 call 12033c <printf> <== NOT EXECUTED
rc, strerror (rc));
rtems_rfs_group_bitmap_free (fs, true, ino);
111a53: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
111a56: ff b5 14 ff ff ff pushl -0xec(%ebp) <== NOT EXECUTED
111a5c: 6a 01 push $0x1 <== NOT EXECUTED
111a5e: ff b5 10 ff ff ff pushl -0xf0(%ebp) <== NOT EXECUTED
111a64: e8 72 05 00 00 call 111fdb <rtems_rfs_group_bitmap_free><== NOT EXECUTED
rtems_rfs_fs_close (fs);
111a69: 5a pop %edx <== NOT EXECUTED
111a6a: ff b5 10 ff ff ff pushl -0xf0(%ebp) <== NOT EXECUTED
111a70: e8 a2 b2 00 00 call 11cd17 <rtems_rfs_fs_close> <== NOT EXECUTED
111a75: e9 f3 00 00 00 jmp 111b6d <rtems_rfs_format+0xbdb><== NOT EXECUTED
return rc;
}
rc = rtems_rfs_inode_initialise (&inode, 0,
111a7a: 83 ec 0c sub $0xc,%esp
111a7d: 6a 00 push $0x0
111a7f: 6a 00 push $0x0
111a81: 68 c9 41 00 00 push $0x41c9
111a86: 6a 00 push $0x0
111a88: 56 push %esi
111a89: e8 f6 0a 00 00 call 112584 <rtems_rfs_inode_initialise>
111a8e: 89 c3 mov %eax,%ebx
(RTEMS_RFS_S_IFDIR | RTEMS_RFS_S_IRWXU |
RTEMS_RFS_S_IXGRP | RTEMS_RFS_S_IXOTH),
0, 0);
if (rc > 0)
111a90: 83 c4 20 add $0x20,%esp
111a93: 85 c0 test %eax,%eax
111a95: 7e 1b jle 111ab2 <rtems_rfs_format+0xb20><== ALWAYS TAKEN
printf ("rtems-rfs: format: inode initialise failed: %d: %s\n",
111a97: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
111a9a: 50 push %eax <== NOT EXECUTED
111a9b: e8 24 f6 00 00 call 1210c4 <strerror> <== NOT EXECUTED
111aa0: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
111aa3: 50 push %eax <== NOT EXECUTED
111aa4: 53 push %ebx <== NOT EXECUTED
111aa5: 68 8e 00 13 00 push $0x13008e <== NOT EXECUTED
111aaa: e8 8d e8 00 00 call 12033c <printf> <== NOT EXECUTED
111aaf: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rc, strerror (rc));
rc = rtems_rfs_dir_add_entry (fs, &inode, ".", 1, ino);
111ab2: 83 ec 0c sub $0xc,%esp
111ab5: ff b5 14 ff ff ff pushl -0xec(%ebp)
111abb: 6a 01 push $0x1
111abd: 68 61 cd 12 00 push $0x12cd61
111ac2: 8d 85 3c ff ff ff lea -0xc4(%ebp),%eax
111ac8: 50 push %eax
111ac9: ff b5 10 ff ff ff pushl -0xf0(%ebp)
111acf: e8 62 92 00 00 call 11ad36 <rtems_rfs_dir_add_entry>
111ad4: 89 c3 mov %eax,%ebx
if (rc > 0)
111ad6: 83 c4 20 add $0x20,%esp
111ad9: 85 c0 test %eax,%eax
111adb: 7e 1b jle 111af8 <rtems_rfs_format+0xb66><== ALWAYS TAKEN
printf ("rtems-rfs: format: directory add failed: %d: %s\n",
111add: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
111ae0: 50 push %eax <== NOT EXECUTED
111ae1: e8 de f5 00 00 call 1210c4 <strerror> <== NOT EXECUTED
111ae6: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
111ae9: 50 push %eax <== NOT EXECUTED
111aea: 53 push %ebx <== NOT EXECUTED
111aeb: 68 c2 00 13 00 push $0x1300c2 <== NOT EXECUTED
111af0: e8 47 e8 00 00 call 12033c <printf> <== NOT EXECUTED
111af5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rc, strerror (rc));
rc = rtems_rfs_inode_close (fs, &inode);
111af8: 50 push %eax
111af9: 50 push %eax
111afa: 8d 85 3c ff ff ff lea -0xc4(%ebp),%eax
111b00: 50 push %eax
111b01: ff b5 10 ff ff ff pushl -0xf0(%ebp)
111b07: e8 9b 08 00 00 call 1123a7 <rtems_rfs_inode_close>
111b0c: 89 c3 mov %eax,%ebx
if (rc > 0)
111b0e: 83 c4 10 add $0x10,%esp
111b11: 85 c0 test %eax,%eax
111b13: 7e 1b jle 111b30 <rtems_rfs_format+0xb9e><== ALWAYS TAKEN
printf ("rtems-rfs: format: inode close failed: %d: %s\n",
111b15: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
111b18: 50 push %eax <== NOT EXECUTED
111b19: e8 a6 f5 00 00 call 1210c4 <strerror> <== NOT EXECUTED
111b1e: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
111b21: 50 push %eax <== NOT EXECUTED
111b22: 53 push %ebx <== NOT EXECUTED
111b23: 68 f3 00 13 00 push $0x1300f3 <== NOT EXECUTED
111b28: e8 0f e8 00 00 call 12033c <printf> <== NOT EXECUTED
111b2d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rc, strerror (rc));
rc = rtems_rfs_fs_close (fs);
111b30: 83 ec 0c sub $0xc,%esp
111b33: ff b5 10 ff ff ff pushl -0xf0(%ebp)
111b39: e8 d9 b1 00 00 call 11cd17 <rtems_rfs_fs_close>
111b3e: 89 c3 mov %eax,%ebx
if (rc < 0)
111b40: 83 c4 10 add $0x10,%esp
111b43: 85 c0 test %eax,%eax
111b45: 79 29 jns 111b70 <rtems_rfs_format+0xbde><== ALWAYS TAKEN
printf ("rtems-rfs: format: file system close failed: %d: %s\n",
errno, strerror (errno));
111b47: e8 80 d6 00 00 call 11f1cc <__errno> <== NOT EXECUTED
printf ("rtems-rfs: format: inode close failed: %d: %s\n",
rc, strerror (rc));
rc = rtems_rfs_fs_close (fs);
if (rc < 0)
printf ("rtems-rfs: format: file system close failed: %d: %s\n",
111b4c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
111b4f: ff 30 pushl (%eax) <== NOT EXECUTED
111b51: e8 6e f5 00 00 call 1210c4 <strerror> <== NOT EXECUTED
111b56: 89 c6 mov %eax,%esi <== NOT EXECUTED
errno, strerror (errno));
111b58: e8 6f d6 00 00 call 11f1cc <__errno> <== NOT EXECUTED
printf ("rtems-rfs: format: inode close failed: %d: %s\n",
rc, strerror (rc));
rc = rtems_rfs_fs_close (fs);
if (rc < 0)
printf ("rtems-rfs: format: file system close failed: %d: %s\n",
111b5d: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
111b60: 56 push %esi <== NOT EXECUTED
111b61: ff 30 pushl (%eax) <== NOT EXECUTED
111b63: 68 22 01 13 00 push $0x130122 <== NOT EXECUTED
111b68: e8 cf e7 00 00 call 12033c <printf> <== NOT EXECUTED
111b6d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rc, strerror (rc));
return -1;
}
rc = rtems_rfs_write_root_dir (name);
if (rc > 0)
111b70: 85 db test %ebx,%ebx
111b72: 7e 18 jle 111b8c <rtems_rfs_format+0xbfa><== ALWAYS TAKEN
{
printf ("rtems-rfs: format: writing root dir failed: %d: %s\n",
111b74: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
111b77: 53 push %ebx <== NOT EXECUTED
111b78: e8 47 f5 00 00 call 1210c4 <strerror> <== NOT EXECUTED
111b7d: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
111b80: 50 push %eax <== NOT EXECUTED
111b81: 53 push %ebx <== NOT EXECUTED
111b82: 68 57 01 13 00 push $0x130157 <== NOT EXECUTED
111b87: e9 9a fd ff ff jmp 111926 <rtems_rfs_format+0x994><== NOT EXECUTED
rc, strerror (rc));
return -1;
}
return 0;
111b8c: 31 c0 xor %eax,%eax
111b8e: eb 1a jmp 111baa <rtems_rfs_format+0xc18>
/*
* Check the configuration data.
*/
if (!rtems_rfs_check_config (&fs, config))
return -1;
111b90: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
111b93: eb 15 jmp 111baa <rtems_rfs_format+0xc18><== NOT EXECUTED
fs->inodes_per_block) * fs->inodes_per_block;
if (fs->group_inodes > rtems_rfs_bitmap_numof_bits (fs->block_size))
fs->group_inodes = rtems_rfs_bitmap_numof_bits (fs->block_size);
fs->max_name_length = config->max_name_length;
111b95: 89 45 80 mov %eax,-0x80(%ebp) <== NOT EXECUTED
* Check the configuration data.
*/
if (!rtems_rfs_check_config (&fs, config))
return -1;
if (config->verbose)
111b98: 8b 45 0c mov 0xc(%ebp),%eax
111b9b: 80 78 15 00 cmpb $0x0,0x15(%eax)
111b9f: 0f 84 75 f7 ff ff je 11131a <rtems_rfs_format+0x388><== ALWAYS TAKEN
111ba5: e9 4e f6 ff ff jmp 1111f8 <rtems_rfs_format+0x266><== NOT EXECUTED
rc, strerror (rc));
return -1;
}
return 0;
}
111baa: 8d 65 f4 lea -0xc(%ebp),%esp
111bad: 5b pop %ebx
111bae: 5e pop %esi
111baf: 5f pop %edi
111bb0: 5d pop %ebp
111bb1: c3 ret
0011cd17 <rtems_rfs_fs_close>:
int
rtems_rfs_fs_close (rtems_rfs_file_system* fs)
{
11cd17: 55 push %ebp
11cd18: 89 e5 mov %esp,%ebp
11cd1a: 56 push %esi
11cd1b: 53 push %ebx
11cd1c: 8b 5d 08 mov 0x8(%ebp),%ebx
int group;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_CLOSE))
11cd1f: 50 push %eax
11cd20: 50 push %eax
11cd21: 6a 00 push $0x0
11cd23: 6a 02 push $0x2
11cd25: e8 72 6b ff ff call 11389c <rtems_rfs_trace>
11cd2a: 83 c4 10 add $0x10,%esp
11cd2d: 84 c0 test %al,%al
11cd2f: 74 10 je 11cd41 <rtems_rfs_fs_close+0x2a><== ALWAYS TAKEN
printf ("rtems-rfs: close\n");
11cd31: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11cd34: 68 48 1f 13 00 push $0x131f48 <== NOT EXECUTED
11cd39: e8 16 38 00 00 call 120554 <puts> <== NOT EXECUTED
11cd3e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
return 0;
}
int
rtems_rfs_fs_close (rtems_rfs_file_system* fs)
{
11cd41: 31 f6 xor %esi,%esi
11cd43: eb 13 jmp 11cd58 <rtems_rfs_fs_close+0x41>
if (rtems_rfs_trace (RTEMS_RFS_TRACE_CLOSE))
printf ("rtems-rfs: close\n");
for (group = 0; group < fs->group_count; group++)
rtems_rfs_group_close (fs, &fs->groups[group]);
11cd45: 50 push %eax
11cd46: 50 push %eax
errno = 0;
return 0;
}
int
rtems_rfs_fs_close (rtems_rfs_file_system* fs)
11cd47: 6b c6 50 imul $0x50,%esi,%eax
if (rtems_rfs_trace (RTEMS_RFS_TRACE_CLOSE))
printf ("rtems-rfs: close\n");
for (group = 0; group < fs->group_count; group++)
rtems_rfs_group_close (fs, &fs->groups[group]);
11cd4a: 03 43 20 add 0x20(%ebx),%eax
11cd4d: 50 push %eax
11cd4e: 53 push %ebx
11cd4f: e8 59 50 ff ff call 111dad <rtems_rfs_group_close>
int group;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_CLOSE))
printf ("rtems-rfs: close\n");
for (group = 0; group < fs->group_count; group++)
11cd54: 46 inc %esi
11cd55: 83 c4 10 add $0x10,%esp
11cd58: 3b 73 24 cmp 0x24(%ebx),%esi
11cd5b: 7c e8 jl 11cd45 <rtems_rfs_fs_close+0x2e>
rtems_rfs_group_close (fs, &fs->groups[group]);
rtems_rfs_buffer_close (fs);
11cd5d: 83 ec 0c sub $0xc,%esp
11cd60: 53 push %ebx
11cd61: e8 75 da ff ff call 11a7db <rtems_rfs_buffer_close>
free (fs);
11cd66: 89 1c 24 mov %ebx,(%esp)
11cd69: e8 7a d1 fe ff call 109ee8 <free>
return 0;
}
11cd6e: 31 c0 xor %eax,%eax
11cd70: 8d 65 f8 lea -0x8(%ebp),%esp
11cd73: 5b pop %ebx
11cd74: 5e pop %esi
11cd75: 5d pop %ebp
11cd76: c3 ret
0011c66f <rtems_rfs_fs_open>:
rtems_rfs_fs_open (const char* name,
void* user,
uint32_t flags,
uint32_t max_held_buffers,
rtems_rfs_file_system** fs)
{
11c66f: 55 push %ebp
11c670: 89 e5 mov %esp,%ebp
11c672: 57 push %edi
11c673: 56 push %esi
11c674: 53 push %ebx
11c675: 83 ec 74 sub $0x74,%esp
11c678: 8b 5d 08 mov 0x8(%ebp),%ebx
11c67b: 8b 75 18 mov 0x18(%ebp),%esi
#endif
rtems_rfs_inode_handle inode;
uint16_t mode;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
11c67e: 6a 00 push $0x0
11c680: 6a 01 push $0x1
11c682: e8 15 72 ff ff call 11389c <rtems_rfs_trace>
11c687: 83 c4 10 add $0x10,%esp
11c68a: 84 c0 test %al,%al
11c68c: 74 10 je 11c69e <rtems_rfs_fs_open+0x2f><== ALWAYS TAKEN
printf ("rtems-rfs: open: %s\n", name);
11c68e: 57 push %edi <== NOT EXECUTED
11c68f: 57 push %edi <== NOT EXECUTED
11c690: 53 push %ebx <== NOT EXECUTED
11c691: 68 41 1c 13 00 push $0x131c41 <== NOT EXECUTED
11c696: e8 a1 3c 00 00 call 12033c <printf> <== NOT EXECUTED
11c69b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
*fs = malloc (sizeof (rtems_rfs_file_system));
11c69e: 83 ec 0c sub $0xc,%esp
11c6a1: 68 84 00 00 00 push $0x84
11c6a6: e8 55 dd fe ff call 10a400 <malloc>
11c6ab: 89 c2 mov %eax,%edx
11c6ad: 89 06 mov %eax,(%esi)
if (!*fs)
11c6af: 83 c4 10 add $0x10,%esp
11c6b2: 85 c0 test %eax,%eax
11c6b4: 75 32 jne 11c6e8 <rtems_rfs_fs_open+0x79><== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
11c6b6: 53 push %ebx <== NOT EXECUTED
11c6b7: 53 push %ebx <== NOT EXECUTED
11c6b8: 6a 00 push $0x0 <== NOT EXECUTED
11c6ba: 6a 01 push $0x1 <== NOT EXECUTED
11c6bc: e8 db 71 ff ff call 11389c <rtems_rfs_trace> <== NOT EXECUTED
11c6c1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11c6c4: 84 c0 test %al,%al <== NOT EXECUTED
11c6c6: 74 10 je 11c6d8 <rtems_rfs_fs_open+0x69><== NOT EXECUTED
printf ("rtems-rfs: open: no memory for file system data\n");
11c6c8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11c6cb: 68 56 1c 13 00 push $0x131c56 <== NOT EXECUTED
11c6d0: e8 7f 3e 00 00 call 120554 <puts> <== NOT EXECUTED
11c6d5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
errno = ENOMEM;
11c6d8: e8 ef 2a 00 00 call 11f1cc <__errno> <== NOT EXECUTED
11c6dd: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED
11c6e3: e9 9f 00 00 00 jmp 11c787 <rtems_rfs_fs_open+0x118><== NOT EXECUTED
return -1;
}
memset (*fs, 0, sizeof (rtems_rfs_file_system));
11c6e8: b9 21 00 00 00 mov $0x21,%ecx
11c6ed: 31 c0 xor %eax,%eax
11c6ef: 89 d7 mov %edx,%edi
11c6f1: f3 ab rep stos %eax,%es:(%edi)
(*fs)->user = user;
11c6f3: 8b 45 0c mov 0xc(%ebp),%eax
11c6f6: 89 82 80 00 00 00 mov %eax,0x80(%edx)
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
11c6fc: 8d 42 44 lea 0x44(%edx),%eax
11c6ff: 8d 4a 48 lea 0x48(%edx),%ecx
11c702: 89 4a 44 mov %ecx,0x44(%edx)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
11c705: 89 42 4c mov %eax,0x4c(%edx)
Chain_Node *tail = _Chain_Tail( the_chain );
11c708: 8d 42 54 lea 0x54(%edx),%eax
11c70b: 8d 4a 58 lea 0x58(%edx),%ecx
11c70e: 89 4a 54 mov %ecx,0x54(%edx)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
11c711: 89 42 5c mov %eax,0x5c(%edx)
Chain_Node *tail = _Chain_Tail( the_chain );
11c714: 8d 42 64 lea 0x64(%edx),%eax
11c717: 8d 4a 68 lea 0x68(%edx),%ecx
11c71a: 89 4a 64 mov %ecx,0x64(%edx)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
11c71d: 89 42 6c mov %eax,0x6c(%edx)
Chain_Node *tail = _Chain_Tail( the_chain );
11c720: 8d 42 74 lea 0x74(%edx),%eax
11c723: 8d 4a 78 lea 0x78(%edx),%ecx
11c726: 89 4a 74 mov %ecx,0x74(%edx)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
11c729: 89 42 7c mov %eax,0x7c(%edx)
rtems_chain_initialize_empty (&(*fs)->buffers);
rtems_chain_initialize_empty (&(*fs)->release);
rtems_chain_initialize_empty (&(*fs)->release_modified);
rtems_chain_initialize_empty (&(*fs)->file_shares);
(*fs)->max_held_buffers = max_held_buffers;
11c72c: 8b 45 14 mov 0x14(%ebp),%eax
11c72f: 89 42 40 mov %eax,0x40(%edx)
(*fs)->buffers_count = 0;
(*fs)->release_count = 0;
(*fs)->release_modified_count = 0;
(*fs)->flags = flags;
11c732: 8b 45 10 mov 0x10(%ebp),%eax
11c735: 89 02 mov %eax,(%edx)
#endif
/*
* Open the buffer interface.
*/
rc = rtems_rfs_buffer_open (name, *fs);
11c737: 51 push %ecx
11c738: 51 push %ecx
11c739: 52 push %edx
11c73a: 53 push %ebx
11c73b: e8 85 dd ff ff call 11a4c5 <rtems_rfs_buffer_open>
11c740: 89 c3 mov %eax,%ebx
if (rc > 0)
11c742: 83 c4 10 add $0x10,%esp
11c745: 85 c0 test %eax,%eax
11c747: 7e 46 jle 11c78f <rtems_rfs_fs_open+0x120><== ALWAYS TAKEN
{
free (*fs);
11c749: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11c74c: ff 36 pushl (%esi) <== NOT EXECUTED
11c74e: e8 95 d7 fe ff call 109ee8 <free> <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
11c753: 58 pop %eax <== NOT EXECUTED
11c754: 5a pop %edx <== NOT EXECUTED
11c755: 6a 00 push $0x0 <== NOT EXECUTED
11c757: 6a 01 push $0x1 <== NOT EXECUTED
11c759: e8 3e 71 ff ff call 11389c <rtems_rfs_trace> <== NOT EXECUTED
11c75e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11c761: 84 c0 test %al,%al <== NOT EXECUTED
11c763: 74 1b je 11c780 <rtems_rfs_fs_open+0x111><== NOT EXECUTED
printf ("rtems-rfs: open: buffer open failed: %d: %s\n",
11c765: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11c768: 53 push %ebx <== NOT EXECUTED
11c769: e8 56 49 00 00 call 1210c4 <strerror> <== NOT EXECUTED
11c76e: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
11c771: 50 push %eax <== NOT EXECUTED
11c772: 53 push %ebx <== NOT EXECUTED
11c773: 68 86 1c 13 00 push $0x131c86 <== NOT EXECUTED
11c778: e8 bf 3b 00 00 call 12033c <printf> <== NOT EXECUTED
11c77d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rc, strerror (rc));
errno = rc;
11c780: e8 47 2a 00 00 call 11f1cc <__errno> <== NOT EXECUTED
11c785: 89 18 mov %ebx,(%eax) <== NOT EXECUTED
return -1;
11c787: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
11c78a: e9 80 05 00 00 jmp 11cd0f <rtems_rfs_fs_open+0x6a0><== NOT EXECUTED
}
rc = rtems_rfs_fs_read_superblock (*fs);
11c78f: 8b 3e mov (%esi),%edi
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
11c791: c6 45 b4 00 movb $0x0,-0x4c(%ebp)
handle->bnum = 0;
11c795: c7 45 b8 00 00 00 00 movl $0x0,-0x48(%ebp)
handle->buffer = NULL;
11c79c: c7 45 bc 00 00 00 00 movl $0x0,-0x44(%ebp)
printf ("rtems-rfs: read-superblock: handle open failed: %d: %s\n",
rc, strerror (rc));
return rc;
}
rc = rtems_rfs_buffer_handle_request (fs, &handle, 0, true);
11c7a3: 6a 01 push $0x1
11c7a5: 6a 00 push $0x0
11c7a7: 8d 45 b4 lea -0x4c(%ebp),%eax
11c7aa: 50 push %eax
11c7ab: 57 push %edi
11c7ac: e8 f9 da ff ff call 11a2aa <rtems_rfs_buffer_handle_request>
11c7b1: 89 c3 mov %eax,%ebx
if (rc > 0)
11c7b3: 83 c4 10 add $0x10,%esp
11c7b6: 85 c0 test %eax,%eax
11c7b8: 7e 2e jle 11c7e8 <rtems_rfs_fs_open+0x179><== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
11c7ba: 50 push %eax <== NOT EXECUTED
11c7bb: 50 push %eax <== NOT EXECUTED
11c7bc: 6a 00 push $0x0 <== NOT EXECUTED
11c7be: 6a 01 push $0x1 <== NOT EXECUTED
11c7c0: e8 d7 70 ff ff call 11389c <rtems_rfs_trace> <== NOT EXECUTED
11c7c5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11c7c8: 84 c0 test %al,%al <== NOT EXECUTED
11c7ca: 0f 84 cc 03 00 00 je 11cb9c <rtems_rfs_fs_open+0x52d><== NOT EXECUTED
printf ("rtems-rfs: read-superblock: request failed%d: %s\n",
11c7d0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11c7d3: 53 push %ebx <== NOT EXECUTED
11c7d4: e8 eb 48 00 00 call 1210c4 <strerror> <== NOT EXECUTED
11c7d9: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
11c7dc: 50 push %eax <== NOT EXECUTED
11c7dd: 53 push %ebx <== NOT EXECUTED
11c7de: 68 b3 1c 13 00 push $0x131cb3 <== NOT EXECUTED
11c7e3: e9 bf 02 00 00 jmp 11caa7 <rtems_rfs_fs_open+0x438><== NOT EXECUTED
rc, strerror (rc));
return rc;
}
sb = rtems_rfs_buffer_data (&handle);
11c7e8: 8b 45 bc mov -0x44(%ebp),%eax
11c7eb: 8b 58 1c mov 0x1c(%eax),%ebx
#define read_sb(_o) rtems_rfs_read_u32 (sb + (_o))
if (read_sb (RTEMS_RFS_SB_OFFSET_MAGIC) != RTEMS_RFS_SB_MAGIC)
11c7ee: 0f b6 03 movzbl (%ebx),%eax
11c7f1: c1 e0 18 shl $0x18,%eax
11c7f4: 0f b6 53 01 movzbl 0x1(%ebx),%edx
11c7f8: c1 e2 10 shl $0x10,%edx
11c7fb: 09 d0 or %edx,%eax
11c7fd: 0f b6 53 03 movzbl 0x3(%ebx),%edx
11c801: 09 d0 or %edx,%eax
11c803: 0f b6 53 02 movzbl 0x2(%ebx),%edx
11c807: c1 e2 08 shl $0x8,%edx
11c80a: 09 d0 or %edx,%eax
11c80c: 3d 01 20 09 28 cmp $0x28092001,%eax
11c811: 74 23 je 11c836 <rtems_rfs_fs_open+0x1c7><== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
11c813: 50 push %eax <== NOT EXECUTED
11c814: 50 push %eax <== NOT EXECUTED
11c815: 6a 00 push $0x0 <== NOT EXECUTED
11c817: 6a 01 push $0x1 <== NOT EXECUTED
11c819: e8 7e 70 ff ff call 11389c <rtems_rfs_trace> <== NOT EXECUTED
11c81e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11c821: 84 c0 test %al,%al <== NOT EXECUTED
11c823: 0f 84 05 01 00 00 je 11c92e <rtems_rfs_fs_open+0x2bf><== NOT EXECUTED
printf ("rtems-rfs: read-superblock: invalid superblock, bad magic\n");
11c829: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11c82c: 68 e5 1c 13 00 push $0x131ce5 <== NOT EXECUTED
11c831: e9 88 00 00 00 jmp 11c8be <rtems_rfs_fs_open+0x24f><== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &handle);
return EIO;
}
fs->blocks = read_sb (RTEMS_RFS_SB_OFFSET_BLOCKS);
11c836: 0f b6 43 0c movzbl 0xc(%ebx),%eax
11c83a: c1 e0 18 shl $0x18,%eax
11c83d: 0f b6 53 0d movzbl 0xd(%ebx),%edx
11c841: c1 e2 10 shl $0x10,%edx
11c844: 09 d0 or %edx,%eax
11c846: 0f b6 53 0f movzbl 0xf(%ebx),%edx
11c84a: 09 d0 or %edx,%eax
11c84c: 0f b6 53 0e movzbl 0xe(%ebx),%edx
11c850: c1 e2 08 shl $0x8,%edx
11c853: 09 d0 or %edx,%eax
11c855: 89 45 98 mov %eax,-0x68(%ebp)
11c858: 89 47 04 mov %eax,0x4(%edi)
fs->block_size = read_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE);
11c85b: 0f b6 43 08 movzbl 0x8(%ebx),%eax
11c85f: c1 e0 18 shl $0x18,%eax
11c862: 0f b6 53 09 movzbl 0x9(%ebx),%edx
11c866: c1 e2 10 shl $0x10,%edx
11c869: 09 d0 or %edx,%eax
11c86b: 0f b6 53 0b movzbl 0xb(%ebx),%edx
11c86f: 09 d0 or %edx,%eax
11c871: 0f b6 53 0a movzbl 0xa(%ebx),%edx
11c875: c1 e2 08 shl $0x8,%edx
11c878: 09 d0 or %edx,%eax
11c87a: 89 45 a4 mov %eax,-0x5c(%ebp)
11c87d: 89 47 08 mov %eax,0x8(%edi)
}
uint64_t
rtems_rfs_fs_media_size (rtems_rfs_file_system* fs)
{
uint64_t media_blocks = (uint64_t) rtems_rfs_fs_media_blocks (fs);
11c880: 8b 4f 10 mov 0x10(%edi),%ecx
uint64_t
rtems_rfs_fs_size (rtems_rfs_file_system* fs)
{
uint64_t blocks = rtems_rfs_fs_blocks (fs);
uint64_t block_size = rtems_rfs_fs_block_size (fs);
return blocks * block_size;
11c883: f7 65 98 mull -0x68(%ebp)
11c886: 89 45 98 mov %eax,-0x68(%ebp)
11c889: 89 55 9c mov %edx,-0x64(%ebp)
uint64_t
rtems_rfs_fs_media_size (rtems_rfs_file_system* fs)
{
uint64_t media_blocks = (uint64_t) rtems_rfs_fs_media_blocks (fs);
uint64_t media_block_size = (uint64_t) rtems_rfs_fs_media_block_size (fs);
return media_blocks * media_block_size;
11c88c: 8b 41 20 mov 0x20(%ecx),%eax
11c88f: f7 61 1c mull 0x1c(%ecx)
11c892: 89 45 88 mov %eax,-0x78(%ebp)
11c895: 89 55 8c mov %edx,-0x74(%ebp)
}
fs->blocks = read_sb (RTEMS_RFS_SB_OFFSET_BLOCKS);
fs->block_size = read_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE);
if (rtems_rfs_fs_size(fs) > rtems_rfs_fs_media_size (fs))
11c898: 39 55 9c cmp %edx,-0x64(%ebp)
11c89b: 72 28 jb 11c8c5 <rtems_rfs_fs_open+0x256><== NEVER TAKEN
11c89d: 77 05 ja 11c8a4 <rtems_rfs_fs_open+0x235><== NEVER TAKEN
11c89f: 39 45 98 cmp %eax,-0x68(%ebp)
11c8a2: 76 21 jbe 11c8c5 <rtems_rfs_fs_open+0x256><== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
11c8a4: 53 push %ebx <== NOT EXECUTED
11c8a5: 53 push %ebx <== NOT EXECUTED
11c8a6: 6a 00 push $0x0 <== NOT EXECUTED
11c8a8: 6a 01 push $0x1 <== NOT EXECUTED
11c8aa: e8 ed 6f ff ff call 11389c <rtems_rfs_trace> <== NOT EXECUTED
11c8af: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11c8b2: 84 c0 test %al,%al <== NOT EXECUTED
11c8b4: 74 78 je 11c92e <rtems_rfs_fs_open+0x2bf><== NOT EXECUTED
printf ("rtems-rfs: read-superblock: invalid superblock block/size count\n");
11c8b6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11c8b9: 68 1f 1d 13 00 push $0x131d1f <== NOT EXECUTED
11c8be: e8 91 3c 00 00 call 120554 <puts> <== NOT EXECUTED
11c8c3: eb 66 jmp 11c92b <rtems_rfs_fs_open+0x2bc><== NOT EXECUTED
read_sb (RTEMS_RFS_SB_OFFSET_VERSION), RTEMS_RFS_VERSION_MASK);
rtems_rfs_buffer_handle_close (fs, &handle);
return EIO;
}
if (read_sb (RTEMS_RFS_SB_OFFSET_INODE_SIZE) != RTEMS_RFS_INODE_SIZE)
11c8c5: 0f b6 53 24 movzbl 0x24(%ebx),%edx
11c8c9: c1 e2 18 shl $0x18,%edx
11c8cc: 0f b6 43 25 movzbl 0x25(%ebx),%eax
11c8d0: c1 e0 10 shl $0x10,%eax
11c8d3: 09 c2 or %eax,%edx
11c8d5: 0f b6 43 27 movzbl 0x27(%ebx),%eax
11c8d9: 09 c2 or %eax,%edx
11c8db: 0f b6 43 26 movzbl 0x26(%ebx),%eax
11c8df: c1 e0 08 shl $0x8,%eax
11c8e2: 09 c2 or %eax,%edx
11c8e4: 89 55 98 mov %edx,-0x68(%ebp)
11c8e7: 83 fa 38 cmp $0x38,%edx
11c8ea: 74 56 je 11c942 <rtems_rfs_fs_open+0x2d3><== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
11c8ec: 51 push %ecx <== NOT EXECUTED
11c8ed: 51 push %ecx <== NOT EXECUTED
11c8ee: 6a 00 push $0x0 <== NOT EXECUTED
11c8f0: 6a 01 push $0x1 <== NOT EXECUTED
11c8f2: e8 a5 6f ff ff call 11389c <rtems_rfs_trace> <== NOT EXECUTED
11c8f7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11c8fa: 84 c0 test %al,%al <== NOT EXECUTED
11c8fc: 74 30 je 11c92e <rtems_rfs_fs_open+0x2bf><== NOT EXECUTED
printf ("rtems-rfs: read-superblock: inode size mismatch: fs:%" PRId32 " target:%" PRId32 "\n",
11c8fe: 52 push %edx <== NOT EXECUTED
11c8ff: 6a 00 push $0x0 <== NOT EXECUTED
read_sb (RTEMS_RFS_SB_OFFSET_VERSION), RTEMS_RFS_VERSION_MASK);
11c901: 0f b6 43 04 movzbl 0x4(%ebx),%eax <== NOT EXECUTED
11c905: c1 e0 18 shl $0x18,%eax <== NOT EXECUTED
11c908: 0f b6 53 05 movzbl 0x5(%ebx),%edx <== NOT EXECUTED
11c90c: c1 e2 10 shl $0x10,%edx <== NOT EXECUTED
11c90f: 09 d0 or %edx,%eax <== NOT EXECUTED
11c911: 0f b6 53 07 movzbl 0x7(%ebx),%edx <== NOT EXECUTED
11c915: 09 d0 or %edx,%eax <== NOT EXECUTED
11c917: 0f b6 53 06 movzbl 0x6(%ebx),%edx <== NOT EXECUTED
11c91b: c1 e2 08 shl $0x8,%edx <== NOT EXECUTED
}
if (read_sb (RTEMS_RFS_SB_OFFSET_INODE_SIZE) != RTEMS_RFS_INODE_SIZE)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: read-superblock: inode size mismatch: fs:%" PRId32 " target:%" PRId32 "\n",
11c91e: 09 d0 or %edx,%eax <== NOT EXECUTED
11c920: 50 push %eax <== NOT EXECUTED
11c921: 68 5f 1d 13 00 push $0x131d5f <== NOT EXECUTED
11c926: e8 11 3a 00 00 call 12033c <printf> <== NOT EXECUTED
11c92b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
read_sb (RTEMS_RFS_SB_OFFSET_VERSION), RTEMS_RFS_VERSION_MASK);
rtems_rfs_buffer_handle_close (fs, &handle);
11c92e: 8d 55 b4 lea -0x4c(%ebp),%edx <== NOT EXECUTED
11c931: 89 f8 mov %edi,%eax <== NOT EXECUTED
11c933: e8 f0 fc ff ff call 11c628 <rtems_rfs_buffer_handle_close><== NOT EXECUTED
return EIO;
11c938: bb 05 00 00 00 mov $0x5,%ebx <== NOT EXECUTED
11c93d: e9 5e 02 00 00 jmp 11cba0 <rtems_rfs_fs_open+0x531><== NOT EXECUTED
}
fs->bad_blocks = read_sb (RTEMS_RFS_SB_OFFSET_BAD_BLOCKS);
11c942: 0f b6 43 10 movzbl 0x10(%ebx),%eax
11c946: c1 e0 18 shl $0x18,%eax
11c949: 0f b6 53 11 movzbl 0x11(%ebx),%edx
11c94d: c1 e2 10 shl $0x10,%edx
11c950: 09 d0 or %edx,%eax
11c952: 0f b6 53 13 movzbl 0x13(%ebx),%edx
11c956: 09 d0 or %edx,%eax
11c958: 0f b6 53 12 movzbl 0x12(%ebx),%edx
11c95c: c1 e2 08 shl $0x8,%edx
11c95f: 09 d0 or %edx,%eax
11c961: 89 47 18 mov %eax,0x18(%edi)
fs->max_name_length = read_sb (RTEMS_RFS_SB_OFFSET_MAX_NAME_LENGTH);
11c964: 0f b6 43 14 movzbl 0x14(%ebx),%eax
11c968: c1 e0 18 shl $0x18,%eax
11c96b: 0f b6 53 15 movzbl 0x15(%ebx),%edx
11c96f: c1 e2 10 shl $0x10,%edx
11c972: 09 d0 or %edx,%eax
11c974: 0f b6 53 17 movzbl 0x17(%ebx),%edx
11c978: 09 d0 or %edx,%eax
11c97a: 0f b6 53 16 movzbl 0x16(%ebx),%edx
11c97e: c1 e2 08 shl $0x8,%edx
11c981: 09 d0 or %edx,%eax
11c983: 89 47 1c mov %eax,0x1c(%edi)
fs->group_count = read_sb (RTEMS_RFS_SB_OFFSET_GROUPS);
11c986: 0f b6 43 18 movzbl 0x18(%ebx),%eax
11c98a: c1 e0 18 shl $0x18,%eax
11c98d: 89 45 a0 mov %eax,-0x60(%ebp)
11c990: 0f b6 43 19 movzbl 0x19(%ebx),%eax
11c994: c1 e0 10 shl $0x10,%eax
11c997: 09 45 a0 or %eax,-0x60(%ebp)
11c99a: 0f b6 43 1b movzbl 0x1b(%ebx),%eax
11c99e: 09 45 a0 or %eax,-0x60(%ebp)
11c9a1: 0f b6 43 1a movzbl 0x1a(%ebx),%eax
11c9a5: c1 e0 08 shl $0x8,%eax
11c9a8: 09 45 a0 or %eax,-0x60(%ebp)
11c9ab: 8b 55 a0 mov -0x60(%ebp),%edx
11c9ae: 89 57 24 mov %edx,0x24(%edi)
fs->group_blocks = read_sb (RTEMS_RFS_SB_OFFSET_GROUP_BLOCKS);
11c9b1: 0f b6 4b 1c movzbl 0x1c(%ebx),%ecx
11c9b5: c1 e1 18 shl $0x18,%ecx
11c9b8: 0f b6 43 1d movzbl 0x1d(%ebx),%eax
11c9bc: c1 e0 10 shl $0x10,%eax
11c9bf: 09 c1 or %eax,%ecx
11c9c1: 0f b6 43 1f movzbl 0x1f(%ebx),%eax
11c9c5: 09 c1 or %eax,%ecx
11c9c7: 0f b6 43 1e movzbl 0x1e(%ebx),%eax
11c9cb: c1 e0 08 shl $0x8,%eax
11c9ce: 09 c1 or %eax,%ecx
11c9d0: 89 4f 28 mov %ecx,0x28(%edi)
fs->group_inodes = read_sb (RTEMS_RFS_SB_OFFSET_GROUP_INODES);
11c9d3: 0f b6 43 20 movzbl 0x20(%ebx),%eax
11c9d7: c1 e0 18 shl $0x18,%eax
11c9da: 0f b6 53 21 movzbl 0x21(%ebx),%edx
11c9de: c1 e2 10 shl $0x10,%edx
11c9e1: 09 d0 or %edx,%eax
11c9e3: 0f b6 53 23 movzbl 0x23(%ebx),%edx
11c9e7: 09 d0 or %edx,%eax
11c9e9: 0f b6 53 22 movzbl 0x22(%ebx),%edx
11c9ed: c1 e2 08 shl $0x8,%edx
11c9f0: 09 d0 or %edx,%eax
11c9f2: 89 47 2c mov %eax,0x2c(%edi)
fs->blocks_per_block =
rtems_rfs_fs_block_size (fs) / sizeof (rtems_rfs_inode_block);
11c9f5: 8b 55 a4 mov -0x5c(%ebp),%edx
11c9f8: c1 ea 02 shr $0x2,%edx
fs->max_name_length = read_sb (RTEMS_RFS_SB_OFFSET_MAX_NAME_LENGTH);
fs->group_count = read_sb (RTEMS_RFS_SB_OFFSET_GROUPS);
fs->group_blocks = read_sb (RTEMS_RFS_SB_OFFSET_GROUP_BLOCKS);
fs->group_inodes = read_sb (RTEMS_RFS_SB_OFFSET_GROUP_INODES);
fs->blocks_per_block =
11c9fb: 89 57 34 mov %edx,0x34(%edi)
rtems_rfs_fs_block_size (fs) / sizeof (rtems_rfs_inode_block);
fs->block_map_singly_blocks =
fs->blocks_per_block * RTEMS_RFS_INODE_BLOCKS;
11c9fe: 8d 1c 92 lea (%edx,%edx,4),%ebx
fs->group_inodes = read_sb (RTEMS_RFS_SB_OFFSET_GROUP_INODES);
fs->blocks_per_block =
rtems_rfs_fs_block_size (fs) / sizeof (rtems_rfs_inode_block);
fs->block_map_singly_blocks =
11ca01: 89 5f 38 mov %ebx,0x38(%edi)
fs->blocks_per_block * RTEMS_RFS_INODE_BLOCKS;
fs->block_map_doubly_blocks =
fs->blocks_per_block * fs->blocks_per_block * RTEMS_RFS_INODE_BLOCKS;
11ca04: 0f af d2 imul %edx,%edx
11ca07: 8d 14 92 lea (%edx,%edx,4),%edx
fs->blocks_per_block =
rtems_rfs_fs_block_size (fs) / sizeof (rtems_rfs_inode_block);
fs->block_map_singly_blocks =
fs->blocks_per_block * RTEMS_RFS_INODE_BLOCKS;
fs->block_map_doubly_blocks =
11ca0a: 89 57 3c mov %edx,0x3c(%edi)
fs->blocks_per_block * fs->blocks_per_block * RTEMS_RFS_INODE_BLOCKS;
fs->inodes = fs->group_count * fs->group_inodes;
11ca0d: 0f af 45 a0 imul -0x60(%ebp),%eax
11ca11: 89 47 14 mov %eax,0x14(%edi)
fs->inodes_per_block = fs->block_size / RTEMS_RFS_INODE_SIZE;
11ca14: 8b 45 a4 mov -0x5c(%ebp),%eax
11ca17: 31 d2 xor %edx,%edx
11ca19: f7 75 98 divl -0x68(%ebp)
11ca1c: 89 47 30 mov %eax,0x30(%edi)
if (fs->group_blocks >
rtems_rfs_bitmap_numof_bits (rtems_rfs_fs_block_size (fs)))
11ca1f: 8b 45 a4 mov -0x5c(%ebp),%eax
11ca22: c1 e0 03 shl $0x3,%eax
{
rtems_rfs_buffer_handle_close (fs, &handle);
11ca25: 8d 55 b4 lea -0x4c(%ebp),%edx
fs->inodes = fs->group_count * fs->group_inodes;
fs->inodes_per_block = fs->block_size / RTEMS_RFS_INODE_SIZE;
if (fs->group_blocks >
11ca28: 39 c1 cmp %eax,%ecx
rtems_rfs_bitmap_numof_bits (rtems_rfs_fs_block_size (fs)))
{
rtems_rfs_buffer_handle_close (fs, &handle);
11ca2a: 89 f8 mov %edi,%eax
fs->inodes = fs->group_count * fs->group_inodes;
fs->inodes_per_block = fs->block_size / RTEMS_RFS_INODE_SIZE;
if (fs->group_blocks >
11ca2c: 76 2d jbe 11ca5b <rtems_rfs_fs_open+0x3ec><== ALWAYS TAKEN
rtems_rfs_bitmap_numof_bits (rtems_rfs_fs_block_size (fs)))
{
rtems_rfs_buffer_handle_close (fs, &handle);
11ca2e: e8 f5 fb ff ff call 11c628 <rtems_rfs_buffer_handle_close><== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
11ca33: 50 push %eax <== NOT EXECUTED
11ca34: 50 push %eax <== NOT EXECUTED
11ca35: 6a 00 push $0x0 <== NOT EXECUTED
11ca37: 6a 01 push $0x1 <== NOT EXECUTED
11ca39: e8 5e 6e ff ff call 11389c <rtems_rfs_trace> <== NOT EXECUTED
11ca3e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
printf ("rtems-rfs: read-superblock: groups blocks larger than block bits\n");
return EIO;
11ca41: bb 05 00 00 00 mov $0x5,%ebx <== NOT EXECUTED
if (fs->group_blocks >
rtems_rfs_bitmap_numof_bits (rtems_rfs_fs_block_size (fs)))
{
rtems_rfs_buffer_handle_close (fs, &handle);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
11ca46: 84 c0 test %al,%al <== NOT EXECUTED
11ca48: 0f 84 52 01 00 00 je 11cba0 <rtems_rfs_fs_open+0x531><== NOT EXECUTED
printf ("rtems-rfs: read-superblock: groups blocks larger than block bits\n");
11ca4e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11ca51: 68 a3 1d 13 00 push $0x131da3 <== NOT EXECUTED
11ca56: e9 a2 00 00 00 jmp 11cafd <rtems_rfs_fs_open+0x48e><== NOT EXECUTED
return EIO;
}
rtems_rfs_buffer_handle_close (fs, &handle);
11ca5b: e8 c8 fb ff ff call 11c628 <rtems_rfs_buffer_handle_close>
/*
* Change the block size to the value in the superblock.
*/
rc = rtems_rfs_buffer_setblksize (fs, rtems_rfs_fs_block_size (fs));
11ca60: 50 push %eax
11ca61: 50 push %eax
11ca62: ff 77 08 pushl 0x8(%edi)
11ca65: 57 push %edi
11ca66: e8 97 dc ff ff call 11a702 <rtems_rfs_buffer_setblksize>
11ca6b: 89 c3 mov %eax,%ebx
if (rc > 0)
11ca6d: 83 c4 10 add $0x10,%esp
11ca70: 85 c0 test %eax,%eax
11ca72: 7e 40 jle 11cab4 <rtems_rfs_fs_open+0x445><== ALWAYS TAKEN
{
rtems_rfs_buffer_handle_close (fs, &handle);
11ca74: 8d 55 b4 lea -0x4c(%ebp),%edx <== NOT EXECUTED
11ca77: 89 f8 mov %edi,%eax <== NOT EXECUTED
11ca79: e8 aa fb ff ff call 11c628 <rtems_rfs_buffer_handle_close><== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
11ca7e: 50 push %eax <== NOT EXECUTED
11ca7f: 50 push %eax <== NOT EXECUTED
11ca80: 6a 00 push $0x0 <== NOT EXECUTED
11ca82: 6a 01 push $0x1 <== NOT EXECUTED
11ca84: e8 13 6e ff ff call 11389c <rtems_rfs_trace> <== NOT EXECUTED
11ca89: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11ca8c: 84 c0 test %al,%al <== NOT EXECUTED
11ca8e: 0f 84 08 01 00 00 je 11cb9c <rtems_rfs_fs_open+0x52d><== NOT EXECUTED
printf ("rtems-rfs: read-superblock: invalid superblock block size%d: %s\n",
11ca94: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11ca97: 53 push %ebx <== NOT EXECUTED
11ca98: e8 27 46 00 00 call 1210c4 <strerror> <== NOT EXECUTED
11ca9d: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
11caa0: 50 push %eax <== NOT EXECUTED
11caa1: 53 push %ebx <== NOT EXECUTED
11caa2: 68 e4 1d 13 00 push $0x131de4 <== NOT EXECUTED
11caa7: e8 90 38 00 00 call 12033c <printf> <== NOT EXECUTED
11caac: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11caaf: e9 e8 00 00 00 jmp 11cb9c <rtems_rfs_fs_open+0x52d><== NOT EXECUTED
rc, strerror (rc));
return rc;
}
fs->groups = calloc (fs->group_count, sizeof (rtems_rfs_group));
11cab4: 50 push %eax
11cab5: 50 push %eax
11cab6: 6a 50 push $0x50
11cab8: ff 77 24 pushl 0x24(%edi)
11cabb: e8 1c d1 fe ff call 109bdc <calloc>
11cac0: 89 47 20 mov %eax,0x20(%edi)
if (!fs->groups)
11cac3: 83 c4 10 add $0x10,%esp
11cac6: 31 d2 xor %edx,%edx
11cac8: 85 c0 test %eax,%eax
11caca: 0f 85 c1 00 00 00 jne 11cb91 <rtems_rfs_fs_open+0x522><== ALWAYS TAKEN
{
rtems_rfs_buffer_handle_close (fs, &handle);
11cad0: 8d 55 b4 lea -0x4c(%ebp),%edx <== NOT EXECUTED
11cad3: 89 f8 mov %edi,%eax <== NOT EXECUTED
11cad5: e8 4e fb ff ff call 11c628 <rtems_rfs_buffer_handle_close><== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
11cada: 50 push %eax <== NOT EXECUTED
11cadb: 50 push %eax <== NOT EXECUTED
11cadc: 6a 00 push $0x0 <== NOT EXECUTED
11cade: 6a 01 push $0x1 <== NOT EXECUTED
11cae0: e8 b7 6d ff ff call 11389c <rtems_rfs_trace> <== NOT EXECUTED
11cae5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
printf ("rtems-rfs: read-superblock: no memory for group table\n");
return ENOMEM;
11cae8: bb 0c 00 00 00 mov $0xc,%ebx <== NOT EXECUTED
fs->groups = calloc (fs->group_count, sizeof (rtems_rfs_group));
if (!fs->groups)
{
rtems_rfs_buffer_handle_close (fs, &handle);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
11caed: 84 c0 test %al,%al <== NOT EXECUTED
11caef: 0f 84 ab 00 00 00 je 11cba0 <rtems_rfs_fs_open+0x531><== NOT EXECUTED
printf ("rtems-rfs: read-superblock: no memory for group table\n");
11caf5: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11caf8: 68 25 1e 13 00 push $0x131e25 <== NOT EXECUTED
11cafd: e8 52 3a 00 00 call 120554 <puts> <== NOT EXECUTED
11cb02: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11cb05: e9 96 00 00 00 jmp 11cba0 <rtems_rfs_fs_open+0x531><== NOT EXECUTED
* close everything.
*/
for (group = 0; group < fs->group_count; group++)
{
rc = rtems_rfs_group_open (fs,
rtems_rfs_fs_block (fs, group, 0),
11cb0a: 8b 4f 28 mov 0x28(%edi),%ecx
* know how far the initialisation has gone if an error occurs and we need to
* close everything.
*/
for (group = 0; group < fs->group_count; group++)
{
rc = rtems_rfs_group_open (fs,
11cb0d: 83 ec 0c sub $0xc,%esp
return 0;
}
int
rtems_rfs_fs_open (const char* name,
11cb10: 6b c2 50 imul $0x50,%edx,%eax
* know how far the initialisation has gone if an error occurs and we need to
* close everything.
*/
for (group = 0; group < fs->group_count; group++)
{
rc = rtems_rfs_group_open (fs,
11cb13: 03 47 20 add 0x20(%edi),%eax
11cb16: 50 push %eax
11cb17: ff 77 2c pushl 0x2c(%edi)
11cb1a: 51 push %ecx
rtems_rfs_fs_block (fs, group, 0),
11cb1b: 0f af ca imul %edx,%ecx
* know how far the initialisation has gone if an error occurs and we need to
* close everything.
*/
for (group = 0; group < fs->group_count; group++)
{
rc = rtems_rfs_group_open (fs,
11cb1e: 41 inc %ecx
11cb1f: 51 push %ecx
11cb20: 57 push %edi
11cb21: 89 55 94 mov %edx,-0x6c(%ebp)
11cb24: e8 8b 50 ff ff call 111bb4 <rtems_rfs_group_open>
11cb29: 89 c3 mov %eax,%ebx
rtems_rfs_fs_block (fs, group, 0),
fs->group_blocks,
fs->group_inodes,
&fs->groups[group]);
if (rc > 0)
11cb2b: 83 c4 20 add $0x20,%esp
11cb2e: 85 c0 test %eax,%eax
11cb30: 8b 55 94 mov -0x6c(%ebp),%edx
11cb33: 7e 5b jle 11cb90 <rtems_rfs_fs_open+0x521><== ALWAYS TAKEN
11cb35: 31 c9 xor %ecx,%ecx <== NOT EXECUTED
11cb37: eb 1f jmp 11cb58 <rtems_rfs_fs_open+0x4e9><== NOT EXECUTED
{
int g;
for (g = 0; g < group; g++)
rtems_rfs_group_close (fs, &fs->groups[g]);
11cb39: 50 push %eax <== NOT EXECUTED
11cb3a: 50 push %eax <== NOT EXECUTED
return 0;
}
int
rtems_rfs_fs_open (const char* name,
11cb3b: 6b c1 50 imul $0x50,%ecx,%eax <== NOT EXECUTED
&fs->groups[group]);
if (rc > 0)
{
int g;
for (g = 0; g < group; g++)
rtems_rfs_group_close (fs, &fs->groups[g]);
11cb3e: 03 47 20 add 0x20(%edi),%eax <== NOT EXECUTED
11cb41: 50 push %eax <== NOT EXECUTED
11cb42: 57 push %edi <== NOT EXECUTED
11cb43: 89 55 94 mov %edx,-0x6c(%ebp) <== NOT EXECUTED
11cb46: 89 4d 90 mov %ecx,-0x70(%ebp) <== NOT EXECUTED
11cb49: e8 5f 52 ff ff call 111dad <rtems_rfs_group_close> <== NOT EXECUTED
fs->group_inodes,
&fs->groups[group]);
if (rc > 0)
{
int g;
for (g = 0; g < group; g++)
11cb4e: 8b 4d 90 mov -0x70(%ebp),%ecx <== NOT EXECUTED
11cb51: 41 inc %ecx <== NOT EXECUTED
11cb52: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11cb55: 8b 55 94 mov -0x6c(%ebp),%edx <== NOT EXECUTED
11cb58: 39 d1 cmp %edx,%ecx <== NOT EXECUTED
11cb5a: 7c dd jl 11cb39 <rtems_rfs_fs_open+0x4ca><== NOT EXECUTED
rtems_rfs_group_close (fs, &fs->groups[g]);
rtems_rfs_buffer_handle_close (fs, &handle);
11cb5c: 8d 55 b4 lea -0x4c(%ebp),%edx <== NOT EXECUTED
11cb5f: 89 f8 mov %edi,%eax <== NOT EXECUTED
11cb61: e8 c2 fa ff ff call 11c628 <rtems_rfs_buffer_handle_close><== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
11cb66: 51 push %ecx <== NOT EXECUTED
11cb67: 51 push %ecx <== NOT EXECUTED
11cb68: 6a 00 push $0x0 <== NOT EXECUTED
11cb6a: 6a 01 push $0x1 <== NOT EXECUTED
11cb6c: e8 2b 6d ff ff call 11389c <rtems_rfs_trace> <== NOT EXECUTED
11cb71: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11cb74: 84 c0 test %al,%al <== NOT EXECUTED
11cb76: 74 24 je 11cb9c <rtems_rfs_fs_open+0x52d><== NOT EXECUTED
printf ("rtems-rfs: read-superblock: no memory for group table%d: %s\n",
11cb78: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11cb7b: 53 push %ebx <== NOT EXECUTED
11cb7c: e8 43 45 00 00 call 1210c4 <strerror> <== NOT EXECUTED
11cb81: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
11cb84: 50 push %eax <== NOT EXECUTED
11cb85: 53 push %ebx <== NOT EXECUTED
11cb86: 68 5b 1e 13 00 push $0x131e5b <== NOT EXECUTED
11cb8b: e9 17 ff ff ff jmp 11caa7 <rtems_rfs_fs_open+0x438><== NOT EXECUTED
/*
* Perform each phase of group initialisation at the same time. This way we
* know how far the initialisation has gone if an error occurs and we need to
* close everything.
*/
for (group = 0; group < fs->group_count; group++)
11cb90: 42 inc %edx
11cb91: 3b 57 24 cmp 0x24(%edi),%edx
11cb94: 0f 8c 70 ff ff ff jl 11cb0a <rtems_rfs_fs_open+0x49b>
11cb9a: eb 44 jmp 11cbe0 <rtems_rfs_fs_open+0x571>
errno = rc;
return -1;
}
rc = rtems_rfs_fs_read_superblock (*fs);
if (rc > 0)
11cb9c: 85 db test %ebx,%ebx <== NOT EXECUTED
11cb9e: 74 40 je 11cbe0 <rtems_rfs_fs_open+0x571><== NOT EXECUTED
{
rtems_rfs_buffer_close (*fs);
11cba0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11cba3: ff 36 pushl (%esi) <== NOT EXECUTED
11cba5: e8 31 dc ff ff call 11a7db <rtems_rfs_buffer_close><== NOT EXECUTED
free (*fs);
11cbaa: 58 pop %eax <== NOT EXECUTED
11cbab: ff 36 pushl (%esi) <== NOT EXECUTED
11cbad: e8 36 d3 fe ff call 109ee8 <free> <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
11cbb2: 58 pop %eax <== NOT EXECUTED
11cbb3: 5a pop %edx <== NOT EXECUTED
11cbb4: 6a 00 push $0x0 <== NOT EXECUTED
11cbb6: 6a 01 push $0x1 <== NOT EXECUTED
11cbb8: e8 df 6c ff ff call 11389c <rtems_rfs_trace> <== NOT EXECUTED
11cbbd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11cbc0: 84 c0 test %al,%al <== NOT EXECUTED
11cbc2: 0f 84 b8 fb ff ff je 11c780 <rtems_rfs_fs_open+0x111><== NOT EXECUTED
printf ("rtems-rfs: open: reading superblock: %d: %s\n",
11cbc8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11cbcb: 53 push %ebx <== NOT EXECUTED
11cbcc: e8 f3 44 00 00 call 1210c4 <strerror> <== NOT EXECUTED
11cbd1: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
11cbd4: 50 push %eax <== NOT EXECUTED
11cbd5: 53 push %ebx <== NOT EXECUTED
11cbd6: 68 98 1e 13 00 push $0x131e98 <== NOT EXECUTED
11cbdb: e9 98 fb ff ff jmp 11c778 <rtems_rfs_fs_open+0x109><== NOT EXECUTED
rc, strerror (rc));
errno = rc;
return -1;
}
rc = rtems_rfs_inode_open (*fs, RTEMS_RFS_ROOT_INO, &inode, true);
11cbe0: 6a 01 push $0x1
11cbe2: 8d 45 c0 lea -0x40(%ebp),%eax
11cbe5: 50 push %eax
11cbe6: 6a 01 push $0x1
11cbe8: ff 36 pushl (%esi)
11cbea: e8 3b 56 ff ff call 11222a <rtems_rfs_inode_open>
11cbef: 89 c3 mov %eax,%ebx
if (rc > 0)
11cbf1: 83 c4 10 add $0x10,%esp
11cbf4: 85 c0 test %eax,%eax
11cbf6: 7e 40 jle 11cc38 <rtems_rfs_fs_open+0x5c9><== ALWAYS TAKEN
{
rtems_rfs_buffer_close (*fs);
11cbf8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11cbfb: ff 36 pushl (%esi) <== NOT EXECUTED
11cbfd: e8 d9 db ff ff call 11a7db <rtems_rfs_buffer_close><== NOT EXECUTED
free (*fs);
11cc02: 59 pop %ecx <== NOT EXECUTED
11cc03: ff 36 pushl (%esi) <== NOT EXECUTED
11cc05: e8 de d2 fe ff call 109ee8 <free> <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
11cc0a: 5e pop %esi <== NOT EXECUTED
11cc0b: 5f pop %edi <== NOT EXECUTED
11cc0c: 6a 00 push $0x0 <== NOT EXECUTED
11cc0e: 6a 01 push $0x1 <== NOT EXECUTED
11cc10: e8 87 6c ff ff call 11389c <rtems_rfs_trace> <== NOT EXECUTED
11cc15: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11cc18: 84 c0 test %al,%al <== NOT EXECUTED
11cc1a: 0f 84 60 fb ff ff je 11c780 <rtems_rfs_fs_open+0x111><== NOT EXECUTED
printf ("rtems-rfs: open: reading root inode: %d: %s\n",
11cc20: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11cc23: 53 push %ebx <== NOT EXECUTED
11cc24: e8 9b 44 00 00 call 1210c4 <strerror> <== NOT EXECUTED
11cc29: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
11cc2c: 50 push %eax <== NOT EXECUTED
11cc2d: 53 push %ebx <== NOT EXECUTED
11cc2e: 68 c5 1e 13 00 push $0x131ec5 <== NOT EXECUTED
11cc33: e9 40 fb ff ff jmp 11c778 <rtems_rfs_fs_open+0x109><== NOT EXECUTED
rc, strerror (rc));
errno = rc;
return -1;
}
if (((*fs)->flags & RTEMS_RFS_FS_FORCE_OPEN) == 0)
11cc38: 8b 16 mov (%esi),%edx
11cc3a: f6 02 04 testb $0x4,(%edx)
11cc3d: 75 6e jne 11ccad <rtems_rfs_fs_open+0x63e>
{
mode = rtems_rfs_inode_get_mode (&inode);
11cc3f: 8b 45 cc mov -0x34(%ebp),%eax
* @return uint16_t The mode.
*/
static inline uint16_t
rtems_rfs_inode_get_mode (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->mode);
11cc42: 0f b6 48 02 movzbl 0x2(%eax),%ecx
11cc46: c1 e1 08 shl $0x8,%ecx
11cc49: 0f b6 40 03 movzbl 0x3(%eax),%eax
11cc4d: 09 c8 or %ecx,%eax
if ((mode == 0xffff) || !RTEMS_RFS_S_ISDIR (mode))
11cc4f: 66 83 f8 ff cmp $0xffff,%ax
11cc53: 74 0a je 11cc5f <rtems_rfs_fs_open+0x5f0><== NEVER TAKEN
11cc55: 66 25 00 f0 and $0xf000,%ax
11cc59: 66 3d 00 40 cmp $0x4000,%ax
11cc5d: 74 4e je 11ccad <rtems_rfs_fs_open+0x63e><== ALWAYS TAKEN
{
rtems_rfs_inode_close (*fs, &inode);
11cc5f: 57 push %edi <== NOT EXECUTED
11cc60: 57 push %edi <== NOT EXECUTED
11cc61: 8d 45 c0 lea -0x40(%ebp),%eax <== NOT EXECUTED
11cc64: 50 push %eax <== NOT EXECUTED
11cc65: 52 push %edx <== NOT EXECUTED
11cc66: e8 3c 57 ff ff call 1123a7 <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_buffer_close (*fs);
11cc6b: 58 pop %eax <== NOT EXECUTED
11cc6c: ff 36 pushl (%esi) <== NOT EXECUTED
11cc6e: e8 68 db ff ff call 11a7db <rtems_rfs_buffer_close><== NOT EXECUTED
free (*fs);
11cc73: 58 pop %eax <== NOT EXECUTED
11cc74: ff 36 pushl (%esi) <== NOT EXECUTED
11cc76: e8 6d d2 fe ff call 109ee8 <free> <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
11cc7b: 58 pop %eax <== NOT EXECUTED
11cc7c: 5a pop %edx <== NOT EXECUTED
11cc7d: 6a 00 push $0x0 <== NOT EXECUTED
11cc7f: 6a 01 push $0x1 <== NOT EXECUTED
11cc81: e8 16 6c ff ff call 11389c <rtems_rfs_trace> <== NOT EXECUTED
11cc86: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11cc89: 84 c0 test %al,%al <== NOT EXECUTED
11cc8b: 74 10 je 11cc9d <rtems_rfs_fs_open+0x62e><== NOT EXECUTED
printf ("rtems-rfs: open: invalid root inode mode\n");
11cc8d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11cc90: 68 f2 1e 13 00 push $0x131ef2 <== NOT EXECUTED
11cc95: e8 ba 38 00 00 call 120554 <puts> <== NOT EXECUTED
11cc9a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
errno = EIO;
11cc9d: e8 2a 25 00 00 call 11f1cc <__errno> <== NOT EXECUTED
11cca2: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
11cca8: e9 da fa ff ff jmp 11c787 <rtems_rfs_fs_open+0x118><== NOT EXECUTED
return -1;
}
}
rc = rtems_rfs_inode_close (*fs, &inode);
11ccad: 53 push %ebx
11ccae: 53 push %ebx
11ccaf: 8d 45 c0 lea -0x40(%ebp),%eax
11ccb2: 50 push %eax
11ccb3: 52 push %edx
11ccb4: e8 ee 56 ff ff call 1123a7 <rtems_rfs_inode_close>
11ccb9: 89 c3 mov %eax,%ebx
if (rc > 0)
11ccbb: 83 c4 10 add $0x10,%esp
11ccbe: 85 c0 test %eax,%eax
11ccc0: 7e 40 jle 11cd02 <rtems_rfs_fs_open+0x693><== ALWAYS TAKEN
{
rtems_rfs_buffer_close (*fs);
11ccc2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11ccc5: ff 36 pushl (%esi) <== NOT EXECUTED
11ccc7: e8 0f db ff ff call 11a7db <rtems_rfs_buffer_close><== NOT EXECUTED
free (*fs);
11cccc: 58 pop %eax <== NOT EXECUTED
11cccd: ff 36 pushl (%esi) <== NOT EXECUTED
11cccf: e8 14 d2 fe ff call 109ee8 <free> <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
11ccd4: 5a pop %edx <== NOT EXECUTED
11ccd5: 59 pop %ecx <== NOT EXECUTED
11ccd6: 6a 00 push $0x0 <== NOT EXECUTED
11ccd8: 6a 01 push $0x1 <== NOT EXECUTED
11ccda: e8 bd 6b ff ff call 11389c <rtems_rfs_trace> <== NOT EXECUTED
11ccdf: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11cce2: 84 c0 test %al,%al <== NOT EXECUTED
11cce4: 0f 84 96 fa ff ff je 11c780 <rtems_rfs_fs_open+0x111><== NOT EXECUTED
printf ("rtems-rfs: open: closing root inode: %d: %s\n", rc, strerror (rc));
11ccea: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11cced: 53 push %ebx <== NOT EXECUTED
11ccee: e8 d1 43 00 00 call 1210c4 <strerror> <== NOT EXECUTED
11ccf3: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
11ccf6: 50 push %eax <== NOT EXECUTED
11ccf7: 53 push %ebx <== NOT EXECUTED
11ccf8: 68 1b 1f 13 00 push $0x131f1b <== NOT EXECUTED
11ccfd: e9 76 fa ff ff jmp 11c778 <rtems_rfs_fs_open+0x109><== NOT EXECUTED
errno = rc;
return -1;
}
errno = 0;
11cd02: e8 c5 24 00 00 call 11f1cc <__errno>
11cd07: c7 00 00 00 00 00 movl $0x0,(%eax)
return 0;
11cd0d: 31 c0 xor %eax,%eax
}
11cd0f: 8d 65 f4 lea -0xc(%ebp),%esp
11cd12: 5b pop %ebx
11cd13: 5e pop %esi
11cd14: 5f pop %edi
11cd15: 5d pop %ebp
11cd16: c3 ret
0011c650 <rtems_rfs_fs_size>:
#include <rtems/rfs/rtems-rfs-inode.h>
#include <rtems/rfs/rtems-rfs-trace.h>
uint64_t
rtems_rfs_fs_size (rtems_rfs_file_system* fs)
{
11c650: 55 push %ebp <== NOT EXECUTED
11c651: 89 e5 mov %esp,%ebp <== NOT EXECUTED
11c653: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
uint64_t blocks = rtems_rfs_fs_blocks (fs);
uint64_t block_size = rtems_rfs_fs_block_size (fs);
11c656: 8b 42 08 mov 0x8(%edx),%eax <== NOT EXECUTED
return blocks * block_size;
11c659: f7 62 04 mull 0x4(%edx) <== NOT EXECUTED
}
11c65c: 5d pop %ebp <== NOT EXECUTED
11c65d: c3 ret <== NOT EXECUTED
00111e52 <rtems_rfs_group_bitmap_alloc>:
int
rtems_rfs_group_bitmap_alloc (rtems_rfs_file_system* fs,
rtems_rfs_bitmap_bit goal,
bool inode,
rtems_rfs_bitmap_bit* result)
{
111e52: 55 push %ebp
111e53: 89 e5 mov %esp,%ebp
111e55: 57 push %edi
111e56: 56 push %esi
111e57: 53 push %ebx
111e58: 83 ec 3c sub $0x3c,%esp
111e5b: 8b 75 08 mov 0x8(%ebp),%esi
111e5e: 8b 45 0c mov 0xc(%ebp),%eax
111e61: 8a 55 10 mov 0x10(%ebp),%dl
111e64: 88 55 cf mov %dl,-0x31(%ebp)
rtems_rfs_bitmap_bit bit;
int offset;
bool updown;
int direction;
if (inode)
111e67: 84 d2 test %dl,%dl
111e69: 74 09 je 111e74 <rtems_rfs_group_bitmap_alloc+0x22>
{
size = fs->group_inodes;
111e6b: 8b 56 2c mov 0x2c(%esi),%edx
111e6e: 89 55 d4 mov %edx,-0x2c(%ebp)
goal -= RTEMS_RFS_ROOT_INO;
111e71: 48 dec %eax
111e72: eb 06 jmp 111e7a <rtems_rfs_group_bitmap_alloc+0x28>
}
else
size = fs->group_blocks;
111e74: 8b 56 28 mov 0x28(%esi),%edx
111e77: 89 55 d4 mov %edx,-0x2c(%ebp)
group_start = goal / size;
111e7a: 31 d2 xor %edx,%edx
111e7c: f7 75 d4 divl -0x2c(%ebp)
111e7f: 89 45 c8 mov %eax,-0x38(%ebp)
bit = (rtems_rfs_bitmap_bit) (goal % size);
111e82: 89 55 e4 mov %edx,-0x1c(%ebp)
offset = 0;
updown = true;
direction = 1;
111e85: bb 01 00 00 00 mov $0x1,%ebx
size = fs->group_blocks;
group_start = goal / size;
bit = (rtems_rfs_bitmap_bit) (goal % size);
offset = 0;
updown = true;
111e8a: b1 01 mov $0x1,%cl
else
size = fs->group_blocks;
group_start = goal / size;
bit = (rtems_rfs_bitmap_bit) (goal % size);
offset = 0;
111e8c: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp)
*/
while (true)
{
rtems_rfs_bitmap_control* bitmap;
int group;
bool allocated = false;
111e93: c6 45 e3 00 movb $0x0,-0x1d(%ebp)
/*
* We can start at any location and we move out from that point in each
* direction. The offset grows until we find a free bit or we hit an end.
*/
group = group_start + (direction * offset);
111e97: 8b 7d d0 mov -0x30(%ebp),%edi
111e9a: 0f af fb imul %ebx,%edi
111e9d: 03 7d c8 add -0x38(%ebp),%edi
if (offset)
111ea0: 83 7d d0 00 cmpl $0x0,-0x30(%ebp)
111ea4: 74 0d je 111eb3 <rtems_rfs_group_bitmap_alloc+0x61>
bit = direction > 0 ? 0 : size - 1;
111ea6: 31 c0 xor %eax,%eax
111ea8: 85 db test %ebx,%ebx
111eaa: 7f 04 jg 111eb0 <rtems_rfs_group_bitmap_alloc+0x5e>
111eac: 8b 45 d4 mov -0x2c(%ebp),%eax
111eaf: 48 dec %eax
111eb0: 89 45 e4 mov %eax,-0x1c(%ebp)
/*
* If we are still looking up and down and if the group is out of range we
* have reached one end. Stopping looking up and down and just move in the
* one direction one group at a time.
*/
if ((group < 0) || (group >= fs->group_count))
111eb3: 85 ff test %edi,%edi
111eb5: 78 05 js 111ebc <rtems_rfs_group_bitmap_alloc+0x6a>
111eb7: 3b 7e 24 cmp 0x24(%esi),%edi
111eba: 7c 18 jl 111ed4 <rtems_rfs_group_bitmap_alloc+0x82>
{
if (!updown)
111ebc: 84 c9 test %cl,%cl
111ebe: 0f 84 e3 00 00 00 je 111fa7 <rtems_rfs_group_bitmap_alloc+0x155>
break;
direction = direction > 0 ? -1 : 1;
111ec4: 85 db test %ebx,%ebx
111ec6: 0f 9e c3 setle %bl
111ec9: 0f b6 db movzbl %bl,%ebx
111ecc: 8d 5c 1b ff lea -0x1(%ebx,%ebx,1),%ebx
updown = false;
111ed0: 31 c9 xor %ecx,%ecx
111ed2: eb bf jmp 111e93 <rtems_rfs_group_bitmap_alloc+0x41>
continue;
}
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
111ed4: 6b d7 50 imul $0x50,%edi,%edx
direction = direction > 0 ? -1 : 1;
updown = false;
continue;
}
if (inode)
111ed7: 80 7d cf 00 cmpb $0x0,-0x31(%ebp)
111edb: 8b 46 20 mov 0x20(%esi),%eax
111ede: 74 06 je 111ee6 <rtems_rfs_group_bitmap_alloc+0x94>
bitmap = &fs->groups[group].inode_bitmap;
111ee0: 8d 54 10 2c lea 0x2c(%eax,%edx,1),%edx
111ee4: eb 04 jmp 111eea <rtems_rfs_group_bitmap_alloc+0x98>
else
bitmap = &fs->groups[group].block_bitmap;
111ee6: 8d 54 10 08 lea 0x8(%eax,%edx,1),%edx
rc = rtems_rfs_bitmap_map_alloc (bitmap, bit, &allocated, &bit);
111eea: 8d 45 e4 lea -0x1c(%ebp),%eax
111eed: 50 push %eax
111eee: 8d 45 e3 lea -0x1d(%ebp),%eax
111ef1: 50 push %eax
111ef2: ff 75 e4 pushl -0x1c(%ebp)
111ef5: 52 push %edx
111ef6: 89 55 c0 mov %edx,-0x40(%ebp)
111ef9: 88 4d c4 mov %cl,-0x3c(%ebp)
111efc: e8 aa 71 00 00 call 1190ab <rtems_rfs_bitmap_map_alloc>
if (rc > 0)
111f01: 83 c4 10 add $0x10,%esp
111f04: 85 c0 test %eax,%eax
111f06: 8b 55 c0 mov -0x40(%ebp),%edx
111f09: 8a 4d c4 mov -0x3c(%ebp),%cl
111f0c: 0f 8f c1 00 00 00 jg 111fd3 <rtems_rfs_group_bitmap_alloc+0x181><== NEVER TAKEN
return rc;
if (rtems_rfs_fs_release_bitmaps (fs))
111f12: f6 06 01 testb $0x1,(%esi)
111f15: 75 10 jne 111f27 <rtems_rfs_group_bitmap_alloc+0xd5><== NEVER TAKEN
rtems_rfs_bitmap_release_buffer (fs, bitmap);
111f17: 50 push %eax
111f18: 50 push %eax
111f19: ff 32 pushl (%edx)
111f1b: 56 push %esi
111f1c: e8 10 82 00 00 call 11a131 <rtems_rfs_buffer_handle_release>
111f21: 83 c4 10 add $0x10,%esp
111f24: 8a 4d c4 mov -0x3c(%ebp),%cl
if (allocated)
111f27: 80 7d e3 00 cmpb $0x0,-0x1d(%ebp)
111f2b: 74 62 je 111f8f <rtems_rfs_group_bitmap_alloc+0x13d>
{
if (inode)
111f2d: 80 7d cf 00 cmpb $0x0,-0x31(%ebp)
111f31: 8b 45 e4 mov -0x1c(%ebp),%eax
111f34: 74 0a je 111f40 <rtems_rfs_group_bitmap_alloc+0xee>
*result = rtems_rfs_group_inode (fs, group, bit);
111f36: 0f af 7e 2c imul 0x2c(%esi),%edi
111f3a: 8d 44 07 01 lea 0x1(%edi,%eax,1),%eax
111f3e: eb 08 jmp 111f48 <rtems_rfs_group_bitmap_alloc+0xf6>
else
*result = rtems_rfs_group_block (&fs->groups[group], bit);
111f40: 6b ff 50 imul $0x50,%edi,%edi
111f43: 03 7e 20 add 0x20(%esi),%edi
111f46: 03 07 add (%edi),%eax
111f48: 8b 55 14 mov 0x14(%ebp),%edx
111f4b: 89 02 mov %eax,(%edx)
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_BITMAPS))
111f4d: 57 push %edi
111f4e: 57 push %edi
111f4f: 6a 00 push $0x0
111f51: 68 00 00 02 00 push $0x20000
111f56: e8 41 19 00 00 call 11389c <rtems_rfs_trace>
111f5b: 88 c2 mov %al,%dl
111f5d: 83 c4 10 add $0x10,%esp
printf ("rtems-rfs: group-bitmap-alloc: %s allocated: %" PRId32 "\n",
inode ? "inode" : "block", *result);
return 0;
111f60: 31 c0 xor %eax,%eax
{
if (inode)
*result = rtems_rfs_group_inode (fs, group, bit);
else
*result = rtems_rfs_group_block (&fs->groups[group], bit);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_BITMAPS))
111f62: 84 d2 test %dl,%dl
111f64: 74 6d je 111fd3 <rtems_rfs_group_bitmap_alloc+0x181><== ALWAYS TAKEN
printf ("rtems-rfs: group-bitmap-alloc: %s allocated: %" PRId32 "\n",
111f66: 8b 45 14 mov 0x14(%ebp),%eax <== NOT EXECUTED
111f69: 8b 10 mov (%eax),%edx <== NOT EXECUTED
111f6b: b8 01 fa 12 00 mov $0x12fa01,%eax <== NOT EXECUTED
111f70: 80 7d cf 00 cmpb $0x0,-0x31(%ebp) <== NOT EXECUTED
111f74: 74 05 je 111f7b <rtems_rfs_group_bitmap_alloc+0x129><== NOT EXECUTED
111f76: b8 9c 02 13 00 mov $0x13029c,%eax <== NOT EXECUTED
111f7b: 56 push %esi <== NOT EXECUTED
111f7c: 52 push %edx <== NOT EXECUTED
111f7d: 50 push %eax <== NOT EXECUTED
111f7e: 68 a2 02 13 00 push $0x1302a2 <== NOT EXECUTED
111f83: e8 b4 e3 00 00 call 12033c <printf> <== NOT EXECUTED
111f88: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
inode ? "inode" : "block", *result);
return 0;
111f8b: 31 c0 xor %eax,%eax <== NOT EXECUTED
111f8d: eb 44 jmp 111fd3 <rtems_rfs_group_bitmap_alloc+0x181><== NOT EXECUTED
}
if (updown)
111f8f: 84 c9 test %cl,%cl
111f91: 74 0c je 111f9f <rtems_rfs_group_bitmap_alloc+0x14d><== NEVER TAKEN
direction = direction > 0 ? -1 : 1;
111f93: 85 db test %ebx,%ebx
111f95: 0f 9e c3 setle %bl
111f98: 0f b6 db movzbl %bl,%ebx
111f9b: 8d 5c 1b ff lea -0x1(%ebx,%ebx,1),%ebx
offset++;
111f9f: ff 45 d0 incl -0x30(%ebp)
111fa2: e9 ec fe ff ff jmp 111e93 <rtems_rfs_group_bitmap_alloc+0x41>
}
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_BITMAPS))
111fa7: 53 push %ebx
111fa8: 53 push %ebx
111fa9: 6a 00 push $0x0
111fab: 68 00 00 02 00 push $0x20000
111fb0: e8 e7 18 00 00 call 11389c <rtems_rfs_trace>
111fb5: 83 c4 10 add $0x10,%esp
111fb8: 84 c0 test %al,%al
111fba: 75 02 jne 111fbe <rtems_rfs_group_bitmap_alloc+0x16c><== NEVER TAKEN
111fbc: eb 10 jmp 111fce <rtems_rfs_group_bitmap_alloc+0x17c>
printf ("rtems-rfs: group-bitmap-alloc: no blocks available\n");
111fbe: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
111fc1: 68 d4 02 13 00 push $0x1302d4 <== NOT EXECUTED
111fc6: e8 89 e5 00 00 call 120554 <puts> <== NOT EXECUTED
111fcb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
return ENOSPC;
111fce: b8 1c 00 00 00 mov $0x1c,%eax
}
111fd3: 8d 65 f4 lea -0xc(%ebp),%esp
111fd6: 5b pop %ebx
111fd7: 5e pop %esi
111fd8: 5f pop %edi
111fd9: 5d pop %ebp
111fda: c3 ret
00111fdb <rtems_rfs_group_bitmap_free>:
int
rtems_rfs_group_bitmap_free (rtems_rfs_file_system* fs,
bool inode,
rtems_rfs_bitmap_bit no)
{
111fdb: 55 push %ebp
111fdc: 89 e5 mov %esp,%ebp
111fde: 57 push %edi
111fdf: 56 push %esi
111fe0: 53 push %ebx
111fe1: 83 ec 14 sub $0x14,%esp
111fe4: 8b 75 10 mov 0x10(%ebp),%esi
111fe7: 8a 5d 0c mov 0xc(%ebp),%bl
unsigned int group;
rtems_rfs_bitmap_bit bit;
size_t size;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_BITMAPS))
111fea: 6a 00 push $0x0
111fec: 68 00 00 02 00 push $0x20000
111ff1: e8 a6 18 00 00 call 11389c <rtems_rfs_trace>
111ff6: 83 c4 10 add $0x10,%esp
111ff9: 84 c0 test %al,%al
111ffb: 74 1e je 11201b <rtems_rfs_group_bitmap_free+0x40><== ALWAYS TAKEN
printf ("rtems-rfs: group-bitmap-free: %s free: %" PRId32 "\n",
111ffd: b8 01 fa 12 00 mov $0x12fa01,%eax <== NOT EXECUTED
112002: 84 db test %bl,%bl <== NOT EXECUTED
112004: 74 05 je 11200b <rtems_rfs_group_bitmap_free+0x30><== NOT EXECUTED
112006: b8 9c 02 13 00 mov $0x13029c,%eax <== NOT EXECUTED
11200b: 51 push %ecx <== NOT EXECUTED
11200c: 56 push %esi <== NOT EXECUTED
11200d: 50 push %eax <== NOT EXECUTED
11200e: 68 07 03 13 00 push $0x130307 <== NOT EXECUTED
112013: e8 24 e3 00 00 call 12033c <printf> <== NOT EXECUTED
112018: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
inode ? "inode" : "block", no);
if (inode)
{
no -= RTEMS_RFS_ROOT_INO;
size = fs->group_inodes;
11201b: 8b 55 08 mov 0x8(%ebp),%edx
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_BITMAPS))
printf ("rtems-rfs: group-bitmap-free: %s free: %" PRId32 "\n",
inode ? "inode" : "block", no);
if (inode)
11201e: 84 db test %bl,%bl
112020: 8d 46 ff lea -0x1(%esi),%eax
112023: 74 05 je 11202a <rtems_rfs_group_bitmap_free+0x4f>
{
no -= RTEMS_RFS_ROOT_INO;
size = fs->group_inodes;
112025: 8b 72 2c mov 0x2c(%edx),%esi
112028: eb 03 jmp 11202d <rtems_rfs_group_bitmap_free+0x52>
}
else
{
no -= RTEMS_RFS_SUPERBLOCK_SIZE;
size = fs->group_blocks;
11202a: 8b 72 28 mov 0x28(%edx),%esi
}
group = no / size;
11202d: 31 d2 xor %edx,%edx
11202f: f7 f6 div %esi
bit = (rtems_rfs_bitmap_bit) (no % size);
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
112031: 6b c0 50 imul $0x50,%eax,%eax
}
group = no / size;
bit = (rtems_rfs_bitmap_bit) (no % size);
if (inode)
112034: 84 db test %bl,%bl
112036: 8b 5d 08 mov 0x8(%ebp),%ebx
112039: 8b 4b 20 mov 0x20(%ebx),%ecx
11203c: 74 06 je 112044 <rtems_rfs_group_bitmap_free+0x69>
bitmap = &fs->groups[group].inode_bitmap;
11203e: 8d 74 01 2c lea 0x2c(%ecx,%eax,1),%esi
112042: eb 04 jmp 112048 <rtems_rfs_group_bitmap_free+0x6d>
else
bitmap = &fs->groups[group].block_bitmap;
112044: 8d 74 01 08 lea 0x8(%ecx,%eax,1),%esi
rc = rtems_rfs_bitmap_map_clear (bitmap, bit);
112048: 50 push %eax
112049: 50 push %eax
11204a: 52 push %edx
11204b: 56 push %esi
11204c: e8 da 6e 00 00 call 118f2b <rtems_rfs_bitmap_map_clear>
112051: 89 c7 mov %eax,%edi
rtems_rfs_bitmap_release_buffer (fs, bitmap);
112053: 58 pop %eax
112054: 5a pop %edx
112055: ff 36 pushl (%esi)
112057: ff 75 08 pushl 0x8(%ebp)
11205a: e8 d2 80 00 00 call 11a131 <rtems_rfs_buffer_handle_release>
return rc;
}
11205f: 89 f8 mov %edi,%eax
112061: 8d 65 f4 lea -0xc(%ebp),%esp
112064: 5b pop %ebx
112065: 5e pop %esi
112066: 5f pop %edi
112067: 5d pop %ebp
112068: c3 ret
00112069 <rtems_rfs_group_bitmap_test>:
int
rtems_rfs_group_bitmap_test (rtems_rfs_file_system* fs,
bool inode,
rtems_rfs_bitmap_bit no,
bool* state)
{
112069: 55 push %ebp <== NOT EXECUTED
11206a: 89 e5 mov %esp,%ebp <== NOT EXECUTED
11206c: 57 push %edi <== NOT EXECUTED
11206d: 56 push %esi <== NOT EXECUTED
11206e: 53 push %ebx <== NOT EXECUTED
11206f: 83 ec 24 sub $0x24,%esp <== NOT EXECUTED
112072: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED
112075: 8b 5d 10 mov 0x10(%ebp),%ebx <== NOT EXECUTED
112078: 8a 4d 0c mov 0xc(%ebp),%cl <== NOT EXECUTED
unsigned int group;
rtems_rfs_bitmap_bit bit;
size_t size;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_BITMAPS))
11207b: 6a 00 push $0x0 <== NOT EXECUTED
11207d: 68 00 00 02 00 push $0x20000 <== NOT EXECUTED
112082: 88 4d e4 mov %cl,-0x1c(%ebp) <== NOT EXECUTED
112085: e8 12 18 00 00 call 11389c <rtems_rfs_trace> <== NOT EXECUTED
11208a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11208d: 84 c0 test %al,%al <== NOT EXECUTED
11208f: 8a 4d e4 mov -0x1c(%ebp),%cl <== NOT EXECUTED
112092: 74 24 je 1120b8 <rtems_rfs_group_bitmap_test+0x4f><== NOT EXECUTED
printf ("rtems-rfs: group-bitmap-test: %s test: %" PRId32 "\n",
112094: b8 01 fa 12 00 mov $0x12fa01,%eax <== NOT EXECUTED
112099: 84 c9 test %cl,%cl <== NOT EXECUTED
11209b: 74 05 je 1120a2 <rtems_rfs_group_bitmap_test+0x39><== NOT EXECUTED
11209d: b8 9c 02 13 00 mov $0x13029c,%eax <== NOT EXECUTED
1120a2: 57 push %edi <== NOT EXECUTED
1120a3: 53 push %ebx <== NOT EXECUTED
1120a4: 50 push %eax <== NOT EXECUTED
1120a5: 68 33 03 13 00 push $0x130333 <== NOT EXECUTED
1120aa: 88 4d e4 mov %cl,-0x1c(%ebp) <== NOT EXECUTED
1120ad: e8 8a e2 00 00 call 12033c <printf> <== NOT EXECUTED
1120b2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1120b5: 8a 4d e4 mov -0x1c(%ebp),%cl <== NOT EXECUTED
inode ? "inode" : "block", no);
if (inode)
{
if ((no < RTEMS_RFS_ROOT_INO) || (no > rtems_rfs_fs_inodes (fs)))
return EINVAL;
1120b8: bf 16 00 00 00 mov $0x16,%edi <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_BITMAPS))
printf ("rtems-rfs: group-bitmap-test: %s test: %" PRId32 "\n",
inode ? "inode" : "block", no);
if (inode)
1120bd: 84 c9 test %cl,%cl <== NOT EXECUTED
1120bf: 74 0f je 1120d0 <rtems_rfs_group_bitmap_test+0x67><== NOT EXECUTED
{
if ((no < RTEMS_RFS_ROOT_INO) || (no > rtems_rfs_fs_inodes (fs)))
1120c1: 85 db test %ebx,%ebx <== NOT EXECUTED
1120c3: 7e 47 jle 11210c <rtems_rfs_group_bitmap_test+0xa3><== NOT EXECUTED
1120c5: 3b 5e 14 cmp 0x14(%esi),%ebx <== NOT EXECUTED
1120c8: 77 42 ja 11210c <rtems_rfs_group_bitmap_test+0xa3><== NOT EXECUTED
return EINVAL;
no -= RTEMS_RFS_ROOT_INO;
1120ca: 4b dec %ebx <== NOT EXECUTED
size = fs->group_inodes;
1120cb: 8b 7e 2c mov 0x2c(%esi),%edi <== NOT EXECUTED
1120ce: eb 08 jmp 1120d8 <rtems_rfs_group_bitmap_test+0x6f><== NOT EXECUTED
}
else
{
if (no >= rtems_rfs_fs_blocks (fs))
1120d0: 3b 5e 04 cmp 0x4(%esi),%ebx <== NOT EXECUTED
1120d3: 73 37 jae 11210c <rtems_rfs_group_bitmap_test+0xa3><== NOT EXECUTED
return EINVAL;
size = fs->group_blocks;
1120d5: 8b 7e 28 mov 0x28(%esi),%edi <== NOT EXECUTED
}
group = no / size;
1120d8: 89 d8 mov %ebx,%eax <== NOT EXECUTED
1120da: 31 d2 xor %edx,%edx <== NOT EXECUTED
1120dc: f7 f7 div %edi <== NOT EXECUTED
bit = (rtems_rfs_bitmap_bit) (no % size);
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
1120de: 6b d8 50 imul $0x50,%eax,%ebx <== NOT EXECUTED
}
group = no / size;
bit = (rtems_rfs_bitmap_bit) (no % size);
if (inode)
1120e1: 84 c9 test %cl,%cl <== NOT EXECUTED
1120e3: 8b 46 20 mov 0x20(%esi),%eax <== NOT EXECUTED
1120e6: 74 06 je 1120ee <rtems_rfs_group_bitmap_test+0x85><== NOT EXECUTED
bitmap = &fs->groups[group].inode_bitmap;
1120e8: 8d 5c 18 2c lea 0x2c(%eax,%ebx,1),%ebx <== NOT EXECUTED
1120ec: eb 04 jmp 1120f2 <rtems_rfs_group_bitmap_test+0x89><== NOT EXECUTED
else
bitmap = &fs->groups[group].block_bitmap;
1120ee: 8d 5c 18 08 lea 0x8(%eax,%ebx,1),%ebx <== NOT EXECUTED
rc = rtems_rfs_bitmap_map_test (bitmap, bit, state);
1120f2: 57 push %edi <== NOT EXECUTED
1120f3: ff 75 14 pushl 0x14(%ebp) <== NOT EXECUTED
1120f6: 52 push %edx <== NOT EXECUTED
1120f7: 53 push %ebx <== NOT EXECUTED
1120f8: e8 8c 6e 00 00 call 118f89 <rtems_rfs_bitmap_map_test><== NOT EXECUTED
1120fd: 89 c7 mov %eax,%edi <== NOT EXECUTED
rtems_rfs_bitmap_release_buffer (fs, bitmap);
1120ff: 58 pop %eax <== NOT EXECUTED
112100: 5a pop %edx <== NOT EXECUTED
112101: ff 33 pushl (%ebx) <== NOT EXECUTED
112103: 56 push %esi <== NOT EXECUTED
112104: e8 28 80 00 00 call 11a131 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
return rc;
112109: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
11210c: 89 f8 mov %edi,%eax <== NOT EXECUTED
11210e: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
112111: 5b pop %ebx <== NOT EXECUTED
112112: 5e pop %esi <== NOT EXECUTED
112113: 5f pop %edi <== NOT EXECUTED
112114: 5d pop %ebp <== NOT EXECUTED
112115: c3 ret <== NOT EXECUTED
00111dad <rtems_rfs_group_close>:
int
rtems_rfs_group_close (rtems_rfs_file_system* fs, rtems_rfs_group* group)
{
111dad: 55 push %ebp
111dae: 89 e5 mov %esp,%ebp
111db0: 57 push %edi
111db1: 56 push %esi
111db2: 53 push %ebx
111db3: 83 ec 14 sub $0x14,%esp
111db6: 8b 5d 0c mov 0xc(%ebp),%ebx
int result = 0;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_CLOSE))
111db9: 6a 00 push $0x0
111dbb: 68 00 00 01 00 push $0x10000
111dc0: e8 d7 1a 00 00 call 11389c <rtems_rfs_trace>
111dc5: 83 c4 10 add $0x10,%esp
111dc8: 84 c0 test %al,%al
111dca: 74 11 je 111ddd <rtems_rfs_group_close+0x30><== ALWAYS TAKEN
printf ("rtems-rfs: group-close: base=%" PRId32 "\n", group->base);
111dcc: 51 push %ecx <== NOT EXECUTED
111dcd: 51 push %ecx <== NOT EXECUTED
111dce: ff 33 pushl (%ebx) <== NOT EXECUTED
111dd0: 68 7a 02 13 00 push $0x13027a <== NOT EXECUTED
111dd5: e8 62 e5 00 00 call 12033c <printf> <== NOT EXECUTED
111dda: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
/*
* We need to close as much as possible and also return any error if one
* occurs but this may result in one even more important error being lost but
* we cannot OR the errors together so this is a reasonable compromise.
*/
rc = rtems_rfs_bitmap_close (&group->inode_bitmap);
111ddd: 83 ec 0c sub $0xc,%esp
111de0: 8d 43 2c lea 0x2c(%ebx),%eax
111de3: 50 push %eax
111de4: e8 74 74 00 00 call 11925d <rtems_rfs_bitmap_close>
111de9: 89 c7 mov %eax,%edi
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
111deb: 58 pop %eax
111dec: 5a pop %edx
if (rc > 0)
result = rc;
rc = rtems_rfs_buffer_handle_close (fs, &group->inode_bitmap_buffer);
111ded: 8d 43 44 lea 0x44(%ebx),%eax
111df0: 50 push %eax
111df1: ff 75 08 pushl 0x8(%ebp)
111df4: e8 38 83 00 00 call 11a131 <rtems_rfs_buffer_handle_release>
handle->dirty = false;
111df9: c6 43 44 00 movb $0x0,0x44(%ebx)
handle->bnum = 0;
111dfd: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx)
handle->buffer = NULL;
111e04: c7 43 4c 00 00 00 00 movl $0x0,0x4c(%ebx)
if (rc > 0)
result = rc;
rc = rtems_rfs_bitmap_close (&group->block_bitmap);
111e0b: 8d 43 08 lea 0x8(%ebx),%eax
111e0e: 89 04 24 mov %eax,(%esp)
111e11: e8 47 74 00 00 call 11925d <rtems_rfs_bitmap_close>
if (rc > 0)
111e16: 83 c4 10 add $0x10,%esp
111e19: 89 c6 mov %eax,%esi
111e1b: 85 c0 test %eax,%eax
111e1d: 7f 09 jg 111e28 <rtems_rfs_group_close+0x7b><== NEVER TAKEN
111e1f: 89 fe mov %edi,%esi
111e21: f7 d6 not %esi
111e23: c1 fe 1f sar $0x1f,%esi
111e26: 21 fe and %edi,%esi
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
111e28: 50 push %eax
111e29: 50 push %eax
result = rc;
rc = rtems_rfs_buffer_handle_close (fs, &group->block_bitmap_buffer);
111e2a: 8d 43 20 lea 0x20(%ebx),%eax
111e2d: 50 push %eax
111e2e: ff 75 08 pushl 0x8(%ebp)
111e31: e8 fb 82 00 00 call 11a131 <rtems_rfs_buffer_handle_release>
handle->dirty = false;
111e36: c6 43 20 00 movb $0x0,0x20(%ebx)
handle->bnum = 0;
111e3a: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx)
handle->buffer = NULL;
111e41: c7 43 28 00 00 00 00 movl $0x0,0x28(%ebx)
if (rc > 0)
result = rc;
return result;
}
111e48: 89 f0 mov %esi,%eax
111e4a: 8d 65 f4 lea -0xc(%ebp),%esp
111e4d: 5b pop %ebx
111e4e: 5e pop %esi
111e4f: 5f pop %edi
111e50: 5d pop %ebp
111e51: c3 ret
00111bb4 <rtems_rfs_group_open>:
rtems_rfs_group_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_block base,
size_t size,
size_t inodes,
rtems_rfs_group* group)
{
111bb4: 55 push %ebp
111bb5: 89 e5 mov %esp,%ebp
111bb7: 57 push %edi
111bb8: 56 push %esi
111bb9: 53 push %ebx
111bba: 83 ec 1c sub $0x1c,%esp
111bbd: 8b 75 08 mov 0x8(%ebp),%esi
111bc0: 8b 4d 0c mov 0xc(%ebp),%ecx
111bc3: 8b 5d 10 mov 0x10(%ebp),%ebx
111bc6: 8b 7d 18 mov 0x18(%ebp),%edi
int rc;
if (base >= rtems_rfs_fs_blocks (fs))
111bc9: 8b 46 04 mov 0x4(%esi),%eax
111bcc: 39 c1 cmp %eax,%ecx
111bce: 72 38 jb 111c08 <rtems_rfs_group_open+0x54><== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_OPEN))
111bd0: 50 push %eax <== NOT EXECUTED
111bd1: 50 push %eax <== NOT EXECUTED
111bd2: 6a 00 push $0x0 <== NOT EXECUTED
111bd4: 68 00 80 00 00 push $0x8000 <== NOT EXECUTED
111bd9: e8 be 1c 00 00 call 11389c <rtems_rfs_trace> <== NOT EXECUTED
111bde: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
printf ("rtems-rfs: group-open: base outside file system range: %d: %s\n",
EIO, strerror (EIO));
return EIO;
111be1: bb 05 00 00 00 mov $0x5,%ebx <== NOT EXECUTED
{
int rc;
if (base >= rtems_rfs_fs_blocks (fs))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_OPEN))
111be6: 84 c0 test %al,%al <== NOT EXECUTED
111be8: 0f 84 b5 01 00 00 je 111da3 <rtems_rfs_group_open+0x1ef><== NOT EXECUTED
printf ("rtems-rfs: group-open: base outside file system range: %d: %s\n",
111bee: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
111bf1: 6a 05 push $0x5 <== NOT EXECUTED
111bf3: e8 cc f4 00 00 call 1210c4 <strerror> <== NOT EXECUTED
111bf8: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
111bfb: 50 push %eax <== NOT EXECUTED
111bfc: 6a 05 push $0x5 <== NOT EXECUTED
111bfe: 68 8b 01 13 00 push $0x13018b <== NOT EXECUTED
111c03: e9 74 01 00 00 jmp 111d7c <rtems_rfs_group_open+0x1c8><== NOT EXECUTED
EIO, strerror (EIO));
return EIO;
}
if ((base + size) >= rtems_rfs_fs_blocks (fs))
111c08: 8d 14 0b lea (%ebx,%ecx,1),%edx
111c0b: 39 c2 cmp %eax,%edx
111c0d: 72 04 jb 111c13 <rtems_rfs_group_open+0x5f><== NEVER TAKEN
size = rtems_rfs_fs_blocks (fs) - base;
111c0f: 89 c3 mov %eax,%ebx
111c11: 29 cb sub %ecx,%ebx
111c13: 89 5d e0 mov %ebx,-0x20(%ebp)
111c16: 3b 5d 14 cmp 0x14(%ebp),%ebx
111c19: 76 06 jbe 111c21 <rtems_rfs_group_open+0x6d><== NEVER TAKEN
111c1b: 8b 45 14 mov 0x14(%ebp),%eax
111c1e: 89 45 e0 mov %eax,-0x20(%ebp)
* the format configuration needs reviewing.
*/
if (inodes > size)
inodes = size;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_OPEN))
111c21: 50 push %eax
111c22: 50 push %eax
111c23: 6a 00 push $0x0
111c25: 68 00 80 00 00 push $0x8000
111c2a: 89 4d d8 mov %ecx,-0x28(%ebp)
111c2d: e8 6a 1c 00 00 call 11389c <rtems_rfs_trace>
111c32: 83 c4 10 add $0x10,%esp
111c35: 84 c0 test %al,%al
111c37: 8b 4d d8 mov -0x28(%ebp),%ecx
111c3a: 74 15 je 111c51 <rtems_rfs_group_open+0x9d><== ALWAYS TAKEN
printf ("rtems-rfs: group-open: base=%" PRId32 ", blocks=%zd inodes=%zd\n",
111c3c: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED
111c3f: 53 push %ebx <== NOT EXECUTED
111c40: 51 push %ecx <== NOT EXECUTED
111c41: 68 ca 01 13 00 push $0x1301ca <== NOT EXECUTED
111c46: e8 f1 e6 00 00 call 12033c <printf> <== NOT EXECUTED
111c4b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
111c4e: 8b 4d d8 mov -0x28(%ebp),%ecx <== NOT EXECUTED
base, size, inodes);
group->base = base;
111c51: 89 0f mov %ecx,(%edi)
group->size = size;
111c53: 89 5f 04 mov %ebx,0x4(%edi)
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
111c56: c6 47 20 00 movb $0x0,0x20(%edi)
handle->bnum = 0;
111c5a: c7 47 24 00 00 00 00 movl $0x0,0x24(%edi)
handle->buffer = NULL;
111c61: c7 47 28 00 00 00 00 movl $0x0,0x28(%edi)
printf ("rtems-rfs: group-open: could not open block bitmap handle: %d: %s\n",
rc, strerror (rc));
return rc;
}
rc = rtems_rfs_bitmap_open (&group->block_bitmap, fs,
111c68: 8d 47 20 lea 0x20(%edi),%eax
111c6b: 89 45 e4 mov %eax,-0x1c(%ebp)
111c6e: 8d 47 08 lea 0x8(%edi),%eax
111c71: 89 45 dc mov %eax,-0x24(%ebp)
111c74: 83 ec 0c sub $0xc,%esp
111c77: 51 push %ecx
111c78: 53 push %ebx
111c79: ff 75 e4 pushl -0x1c(%ebp)
111c7c: 56 push %esi
111c7d: 50 push %eax
111c7e: e8 88 75 00 00 call 11920b <rtems_rfs_bitmap_open>
111c83: 89 c3 mov %eax,%ebx
&group->block_bitmap_buffer, size,
group->base + RTEMS_RFS_GROUP_BLOCK_BITMAP_BLOCK);
if (rc > 0)
111c85: 83 c4 20 add $0x20,%esp
111c88: 85 c0 test %eax,%eax
111c8a: 7e 4e jle 111cda <rtems_rfs_group_open+0x126><== ALWAYS TAKEN
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
111c8c: 50 push %eax <== NOT EXECUTED
111c8d: 50 push %eax <== NOT EXECUTED
111c8e: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
111c91: 56 push %esi <== NOT EXECUTED
111c92: e8 9a 84 00 00 call 11a131 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
handle->dirty = false;
111c97: c6 47 20 00 movb $0x0,0x20(%edi) <== NOT EXECUTED
handle->bnum = 0;
111c9b: c7 47 24 00 00 00 00 movl $0x0,0x24(%edi) <== NOT EXECUTED
handle->buffer = NULL;
111ca2: c7 47 28 00 00 00 00 movl $0x0,0x28(%edi) <== NOT EXECUTED
{
rtems_rfs_buffer_handle_close (fs, &group->block_bitmap_buffer);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_OPEN))
111ca9: 58 pop %eax <== NOT EXECUTED
111caa: 5a pop %edx <== NOT EXECUTED
111cab: 6a 00 push $0x0 <== NOT EXECUTED
111cad: 68 00 80 00 00 push $0x8000 <== NOT EXECUTED
111cb2: e8 e5 1b 00 00 call 11389c <rtems_rfs_trace> <== NOT EXECUTED
111cb7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
111cba: 84 c0 test %al,%al <== NOT EXECUTED
111cbc: 0f 84 e1 00 00 00 je 111da3 <rtems_rfs_group_open+0x1ef><== NOT EXECUTED
printf ("rtems-rfs: group-open: could not open block bitmap: %d: %s\n",
111cc2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
111cc5: 53 push %ebx <== NOT EXECUTED
111cc6: e8 f9 f3 00 00 call 1210c4 <strerror> <== NOT EXECUTED
111ccb: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
111cce: 50 push %eax <== NOT EXECUTED
111ccf: 53 push %ebx <== NOT EXECUTED
111cd0: 68 02 02 13 00 push $0x130202 <== NOT EXECUTED
111cd5: e9 a2 00 00 00 jmp 111d7c <rtems_rfs_group_open+0x1c8><== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
111cda: c6 47 44 00 movb $0x0,0x44(%edi)
handle->bnum = 0;
111cde: c7 47 48 00 00 00 00 movl $0x0,0x48(%edi)
handle->buffer = NULL;
111ce5: c7 47 4c 00 00 00 00 movl $0x0,0x4c(%edi)
printf ("rtems-rfs: group-open: could not open inode bitmap handle: %d: %s\n",
rc, strerror (rc));
return rc;
}
rc = rtems_rfs_bitmap_open (&group->inode_bitmap, fs,
111cec: 8d 4f 44 lea 0x44(%edi),%ecx
111cef: 83 ec 0c sub $0xc,%esp
111cf2: 8b 07 mov (%edi),%eax
111cf4: 40 inc %eax
111cf5: 50 push %eax
111cf6: ff 75 e0 pushl -0x20(%ebp)
111cf9: 51 push %ecx
111cfa: 56 push %esi
111cfb: 8d 47 2c lea 0x2c(%edi),%eax
111cfe: 50 push %eax
111cff: 89 4d d8 mov %ecx,-0x28(%ebp)
111d02: e8 04 75 00 00 call 11920b <rtems_rfs_bitmap_open>
111d07: 89 c3 mov %eax,%ebx
&group->inode_bitmap_buffer, inodes,
group->base + RTEMS_RFS_GROUP_INODE_BITMAP_BLOCK);
if (rc > 0)
111d09: 83 c4 20 add $0x20,%esp
111d0c: 85 c0 test %eax,%eax
111d0e: 8b 4d d8 mov -0x28(%ebp),%ecx
111d11: 7e 70 jle 111d83 <rtems_rfs_group_open+0x1cf><== ALWAYS TAKEN
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
111d13: 50 push %eax <== NOT EXECUTED
111d14: 50 push %eax <== NOT EXECUTED
111d15: 51 push %ecx <== NOT EXECUTED
111d16: 56 push %esi <== NOT EXECUTED
111d17: e8 15 84 00 00 call 11a131 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
handle->dirty = false;
111d1c: c6 47 44 00 movb $0x0,0x44(%edi) <== NOT EXECUTED
handle->bnum = 0;
111d20: c7 47 48 00 00 00 00 movl $0x0,0x48(%edi) <== NOT EXECUTED
handle->buffer = NULL;
111d27: c7 47 4c 00 00 00 00 movl $0x0,0x4c(%edi) <== NOT EXECUTED
{
rtems_rfs_buffer_handle_close (fs, &group->inode_bitmap_buffer);
rtems_rfs_bitmap_close (&group->block_bitmap);
111d2e: 58 pop %eax <== NOT EXECUTED
111d2f: ff 75 dc pushl -0x24(%ebp) <== NOT EXECUTED
111d32: e8 26 75 00 00 call 11925d <rtems_rfs_bitmap_close><== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
111d37: 58 pop %eax <== NOT EXECUTED
111d38: 5a pop %edx <== NOT EXECUTED
111d39: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
111d3c: 56 push %esi <== NOT EXECUTED
111d3d: e8 ef 83 00 00 call 11a131 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
handle->dirty = false;
111d42: c6 47 20 00 movb $0x0,0x20(%edi) <== NOT EXECUTED
handle->bnum = 0;
111d46: c7 47 24 00 00 00 00 movl $0x0,0x24(%edi) <== NOT EXECUTED
handle->buffer = NULL;
111d4d: c7 47 28 00 00 00 00 movl $0x0,0x28(%edi) <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &group->block_bitmap_buffer);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_OPEN))
111d54: 59 pop %ecx <== NOT EXECUTED
111d55: 5e pop %esi <== NOT EXECUTED
111d56: 6a 00 push $0x0 <== NOT EXECUTED
111d58: 68 00 80 00 00 push $0x8000 <== NOT EXECUTED
111d5d: e8 3a 1b 00 00 call 11389c <rtems_rfs_trace> <== NOT EXECUTED
111d62: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
111d65: 84 c0 test %al,%al <== NOT EXECUTED
111d67: 74 3a je 111da3 <rtems_rfs_group_open+0x1ef><== NOT EXECUTED
printf ("rtems-rfs: group-open: could not open inode bitmap: %d: %s\n",
111d69: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
111d6c: 53 push %ebx <== NOT EXECUTED
111d6d: e8 52 f3 00 00 call 1210c4 <strerror> <== NOT EXECUTED
111d72: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
111d75: 50 push %eax <== NOT EXECUTED
111d76: 53 push %ebx <== NOT EXECUTED
111d77: 68 3e 02 13 00 push $0x13023e <== NOT EXECUTED
111d7c: e8 bb e5 00 00 call 12033c <printf> <== NOT EXECUTED
111d81: eb 1d jmp 111da0 <rtems_rfs_group_open+0x1ec><== NOT EXECUTED
{
rtems_rfs_bitmap_release_buffer (fs, &group->block_bitmap);
rtems_rfs_bitmap_release_buffer (fs, &group->inode_bitmap);
}
return 0;
111d83: 31 db xor %ebx,%ebx
printf ("rtems-rfs: group-open: could not open inode bitmap: %d: %s\n",
rc, strerror (rc));
return rc;
}
if (rtems_rfs_fs_release_bitmaps (fs))
111d85: f6 06 01 testb $0x1,(%esi)
111d88: 75 19 jne 111da3 <rtems_rfs_group_open+0x1ef><== NEVER TAKEN
{
rtems_rfs_bitmap_release_buffer (fs, &group->block_bitmap);
111d8a: 50 push %eax
111d8b: 50 push %eax
111d8c: ff 77 08 pushl 0x8(%edi)
111d8f: 56 push %esi
111d90: e8 9c 83 00 00 call 11a131 <rtems_rfs_buffer_handle_release>
rtems_rfs_bitmap_release_buffer (fs, &group->inode_bitmap);
111d95: 5a pop %edx
111d96: 59 pop %ecx
111d97: ff 77 2c pushl 0x2c(%edi)
111d9a: 56 push %esi
111d9b: e8 91 83 00 00 call 11a131 <rtems_rfs_buffer_handle_release>
111da0: 83 c4 10 add $0x10,%esp
}
return 0;
}
111da3: 89 d8 mov %ebx,%eax
111da5: 8d 65 f4 lea -0xc(%ebp),%esp
111da8: 5b pop %ebx
111da9: 5e pop %esi
111daa: 5f pop %edi
111dab: 5d pop %ebp
111dac: c3 ret
00112116 <rtems_rfs_group_usage>:
int
rtems_rfs_group_usage (rtems_rfs_file_system* fs,
size_t* blocks,
size_t* inodes)
{
112116: 55 push %ebp <== NOT EXECUTED
112117: 89 e5 mov %esp,%ebp <== NOT EXECUTED
112119: 57 push %edi <== NOT EXECUTED
11211a: 56 push %esi <== NOT EXECUTED
11211b: 53 push %ebx <== NOT EXECUTED
11211c: 51 push %ecx <== NOT EXECUTED
11211d: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
112120: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED
112123: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED
int g;
*blocks = 0;
112126: c7 01 00 00 00 00 movl $0x0,(%ecx) <== NOT EXECUTED
*inodes = 0;
11212c: c7 02 00 00 00 00 movl $0x0,(%edx) <== NOT EXECUTED
for (g = 0; g < fs->group_count; g++)
112132: 8b 43 24 mov 0x24(%ebx),%eax <== NOT EXECUTED
112135: 89 45 f0 mov %eax,-0x10(%ebp) <== NOT EXECUTED
112138: 31 f6 xor %esi,%esi <== NOT EXECUTED
11213a: eb 17 jmp 112153 <rtems_rfs_group_usage+0x3d><== NOT EXECUTED
return rc;
}
int
rtems_rfs_group_usage (rtems_rfs_file_system* fs,
11213c: 6b c6 50 imul $0x50,%esi,%eax <== NOT EXECUTED
*blocks = 0;
*inodes = 0;
for (g = 0; g < fs->group_count; g++)
{
rtems_rfs_group* group = &fs->groups[g];
11213f: 03 43 20 add 0x20(%ebx),%eax <== NOT EXECUTED
*blocks +=
rtems_rfs_bitmap_map_size(&group->block_bitmap) -
112142: 8b 78 14 mov 0x14(%eax),%edi <== NOT EXECUTED
112145: 2b 78 18 sub 0x18(%eax),%edi <== NOT EXECUTED
*inodes = 0;
for (g = 0; g < fs->group_count; g++)
{
rtems_rfs_group* group = &fs->groups[g];
*blocks +=
112148: 01 39 add %edi,(%ecx) <== NOT EXECUTED
rtems_rfs_bitmap_map_size(&group->block_bitmap) -
rtems_rfs_bitmap_map_free (&group->block_bitmap);
*inodes +=
rtems_rfs_bitmap_map_size (&group->inode_bitmap) -
11214a: 8b 78 38 mov 0x38(%eax),%edi <== NOT EXECUTED
11214d: 2b 78 3c sub 0x3c(%eax),%edi <== NOT EXECUTED
{
rtems_rfs_group* group = &fs->groups[g];
*blocks +=
rtems_rfs_bitmap_map_size(&group->block_bitmap) -
rtems_rfs_bitmap_map_free (&group->block_bitmap);
*inodes +=
112150: 01 3a add %edi,(%edx) <== NOT EXECUTED
int g;
*blocks = 0;
*inodes = 0;
for (g = 0; g < fs->group_count; g++)
112152: 46 inc %esi <== NOT EXECUTED
112153: 3b 75 f0 cmp -0x10(%ebp),%esi <== NOT EXECUTED
112156: 7c e4 jl 11213c <rtems_rfs_group_usage+0x26><== NOT EXECUTED
*inodes +=
rtems_rfs_bitmap_map_size (&group->inode_bitmap) -
rtems_rfs_bitmap_map_free (&group->inode_bitmap);
}
if (*blocks > rtems_rfs_fs_blocks (fs))
112158: 8b 73 04 mov 0x4(%ebx),%esi <== NOT EXECUTED
11215b: 8b 01 mov (%ecx),%eax <== NOT EXECUTED
11215d: 39 f0 cmp %esi,%eax <== NOT EXECUTED
11215f: 76 02 jbe 112163 <rtems_rfs_group_usage+0x4d><== NOT EXECUTED
112161: 89 f0 mov %esi,%eax <== NOT EXECUTED
112163: 89 01 mov %eax,(%ecx) <== NOT EXECUTED
*blocks = rtems_rfs_fs_blocks (fs);
if (*inodes > rtems_rfs_fs_inodes (fs))
112165: 8b 4b 14 mov 0x14(%ebx),%ecx <== NOT EXECUTED
112168: 8b 02 mov (%edx),%eax <== NOT EXECUTED
11216a: 39 c8 cmp %ecx,%eax <== NOT EXECUTED
11216c: 76 02 jbe 112170 <rtems_rfs_group_usage+0x5a><== NOT EXECUTED
11216e: 89 c8 mov %ecx,%eax <== NOT EXECUTED
112170: 89 02 mov %eax,(%edx) <== NOT EXECUTED
*inodes = rtems_rfs_fs_inodes (fs);
return 0;
}
112172: 31 c0 xor %eax,%eax <== NOT EXECUTED
112174: 5a pop %edx <== NOT EXECUTED
112175: 5b pop %ebx <== NOT EXECUTED
112176: 5e pop %esi <== NOT EXECUTED
112177: 5f pop %edi <== NOT EXECUTED
112178: 5d pop %ebp <== NOT EXECUTED
112179: c3 ret <== NOT EXECUTED
001123a7 <rtems_rfs_inode_close>:
}
int
rtems_rfs_inode_close (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle)
{
1123a7: 55 push %ebp
1123a8: 89 e5 mov %esp,%ebp
1123aa: 56 push %esi
1123ab: 53 push %ebx
1123ac: 8b 5d 0c mov 0xc(%ebp),%ebx
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_CLOSE))
1123af: 50 push %eax
1123b0: 50 push %eax
1123b1: 6a 00 push $0x0
1123b3: 68 00 00 08 00 push $0x80000
1123b8: e8 df 14 00 00 call 11389c <rtems_rfs_trace>
1123bd: 83 c4 10 add $0x10,%esp
1123c0: 84 c0 test %al,%al
1123c2: 74 12 je 1123d6 <rtems_rfs_inode_close+0x2f><== ALWAYS TAKEN
printf ("rtems-rfs: inode-close: ino: %" PRIu32 "\n", handle->ino);
1123c4: 50 push %eax <== NOT EXECUTED
1123c5: 50 push %eax <== NOT EXECUTED
1123c6: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED
1123c9: 68 e8 03 13 00 push $0x1303e8 <== NOT EXECUTED
1123ce: e8 69 df 00 00 call 12033c <printf> <== NOT EXECUTED
1123d3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rc = rtems_rfs_inode_unload (fs, handle, true);
1123d6: 50 push %eax
1123d7: 6a 01 push $0x1
1123d9: 53 push %ebx
1123da: ff 75 08 pushl 0x8(%ebp)
1123dd: e8 fb fe ff ff call 1122dd <rtems_rfs_inode_unload>
1123e2: 89 c6 mov %eax,%esi
if ((rc == 0) && (handle->loads > 0))
1123e4: 83 c4 10 add $0x10,%esp
1123e7: 85 c0 test %eax,%eax
1123e9: 75 31 jne 11241c <rtems_rfs_inode_close+0x75><== NEVER TAKEN
1123eb: 83 7b 24 00 cmpl $0x0,0x24(%ebx)
1123ef: 7e 2b jle 11241c <rtems_rfs_inode_close+0x75><== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_CLOSE))
1123f1: 50 push %eax <== NOT EXECUTED
1123f2: 50 push %eax <== NOT EXECUTED
1123f3: 6a 00 push $0x0 <== NOT EXECUTED
1123f5: 68 00 00 08 00 push $0x80000 <== NOT EXECUTED
1123fa: e8 9d 14 00 00 call 11389c <rtems_rfs_trace> <== NOT EXECUTED
1123ff: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
printf ("rtems-rfs: inode-close: bad loads number: %d\n",
handle->loads);
rc = EIO;
112402: 66 be 05 00 mov $0x5,%si <== NOT EXECUTED
rc = rtems_rfs_inode_unload (fs, handle, true);
if ((rc == 0) && (handle->loads > 0))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_CLOSE))
112406: 84 c0 test %al,%al <== NOT EXECUTED
112408: 74 12 je 11241c <rtems_rfs_inode_close+0x75><== NOT EXECUTED
printf ("rtems-rfs: inode-close: bad loads number: %d\n",
11240a: 51 push %ecx <== NOT EXECUTED
11240b: 51 push %ecx <== NOT EXECUTED
11240c: ff 73 24 pushl 0x24(%ebx) <== NOT EXECUTED
11240f: 68 0a 04 13 00 push $0x13040a <== NOT EXECUTED
112414: e8 23 df 00 00 call 12033c <printf> <== NOT EXECUTED
112419: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
handle->loads);
rc = EIO;
}
handle->ino = 0;
11241c: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
return rc;
}
112423: 89 f0 mov %esi,%eax
112425: 8d 65 f8 lea -0x8(%ebp),%esp
112428: 5b pop %ebx
112429: 5e pop %esi
11242a: 5d pop %ebp
11242b: c3 ret
001126af <rtems_rfs_inode_create>:
uint16_t mode,
uint16_t links,
uid_t uid,
gid_t gid,
rtems_rfs_ino* ino)
{
1126af: 55 push %ebp
1126b0: 89 e5 mov %esp,%ebp
1126b2: 57 push %edi
1126b3: 56 push %esi
1126b4: 53 push %ebx
1126b5: 81 ec 84 00 00 00 sub $0x84,%esp
1126bb: 8b 5d 08 mov 0x8(%ebp),%ebx
1126be: 8b 45 18 mov 0x18(%ebp),%eax
1126c1: 66 89 85 78 ff ff ff mov %ax,-0x88(%ebp)
1126c8: 8b 45 1c mov 0x1c(%ebp),%eax
1126cb: 66 89 45 92 mov %ax,-0x6e(%ebp)
1126cf: 8b 45 20 mov 0x20(%ebp),%eax
1126d2: 66 89 45 90 mov %ax,-0x70(%ebp)
1126d6: 8b 45 24 mov 0x24(%ebp),%eax
1126d9: 66 89 45 8e mov %ax,-0x72(%ebp)
rtems_rfs_inode_handle parent_inode;
rtems_rfs_inode_handle inode;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_CREATE))
1126dd: 6a 00 push $0x0
1126df: 68 00 00 40 00 push $0x400000
1126e4: e8 b3 11 00 00 call 11389c <rtems_rfs_trace>
1126e9: 83 c4 10 add $0x10,%esp
1126ec: 84 c0 test %al,%al
1126ee: 0f 84 a3 00 00 00 je 112797 <rtems_rfs_inode_create+0xe8><== ALWAYS TAKEN
{
const char* type = "unknown";
int c;
if (RTEMS_RFS_S_ISDIR (mode))
1126f4: 8b 85 78 ff ff ff mov -0x88(%ebp),%eax <== NOT EXECUTED
1126fa: 66 25 00 f0 and $0xf000,%ax <== NOT EXECUTED
1126fe: 66 3d 00 40 cmp $0x4000,%ax <== NOT EXECUTED
112702: 74 1f je 112723 <rtems_rfs_inode_create+0x74><== NOT EXECUTED
type = "dir";
else if (RTEMS_RFS_S_ISCHR (mode))
112704: 66 3d 00 20 cmp $0x2000,%ax <== NOT EXECUTED
112708: 74 20 je 11272a <rtems_rfs_inode_create+0x7b><== NOT EXECUTED
type = "char";
else if (RTEMS_RFS_S_ISBLK (mode))
11270a: 66 3d 00 60 cmp $0x6000,%ax <== NOT EXECUTED
11270e: 74 21 je 112731 <rtems_rfs_inode_create+0x82><== NOT EXECUTED
type = "block";
else if (RTEMS_RFS_S_ISREG (mode))
112710: 66 3d 00 80 cmp $0x8000,%ax <== NOT EXECUTED
112714: 74 22 je 112738 <rtems_rfs_inode_create+0x89><== NOT EXECUTED
type = "file";
else if (RTEMS_RFS_S_ISLNK (mode))
112716: 66 3d 00 a0 cmp $0xa000,%ax <== NOT EXECUTED
11271a: 74 23 je 11273f <rtems_rfs_inode_create+0x90><== NOT EXECUTED
rtems_rfs_inode_handle inode;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_CREATE))
{
const char* type = "unknown";
11271c: bf 34 de 12 00 mov $0x12de34,%edi <== NOT EXECUTED
112721: eb 21 jmp 112744 <rtems_rfs_inode_create+0x95><== NOT EXECUTED
int c;
if (RTEMS_RFS_S_ISDIR (mode))
type = "dir";
112723: bf 64 04 13 00 mov $0x130464,%edi <== NOT EXECUTED
112728: eb 1a jmp 112744 <rtems_rfs_inode_create+0x95><== NOT EXECUTED
else if (RTEMS_RFS_S_ISCHR (mode))
type = "char";
11272a: bf 68 04 13 00 mov $0x130468,%edi <== NOT EXECUTED
11272f: eb 13 jmp 112744 <rtems_rfs_inode_create+0x95><== NOT EXECUTED
else if (RTEMS_RFS_S_ISBLK (mode))
type = "block";
112731: bf 01 fa 12 00 mov $0x12fa01,%edi <== NOT EXECUTED
112736: eb 0c jmp 112744 <rtems_rfs_inode_create+0x95><== NOT EXECUTED
else if (RTEMS_RFS_S_ISREG (mode))
type = "file";
112738: bf d5 0f 13 00 mov $0x130fd5,%edi <== NOT EXECUTED
11273d: eb 05 jmp 112744 <rtems_rfs_inode_create+0x95><== NOT EXECUTED
else if (RTEMS_RFS_S_ISLNK (mode))
type = "link";
11273f: bf a4 27 13 00 mov $0x1327a4,%edi <== NOT EXECUTED
printf("rtems-rfs: inode-create: parent:%" PRIu32 " name:", parent);
112744: 56 push %esi <== NOT EXECUTED
112745: 56 push %esi <== NOT EXECUTED
112746: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
112749: 68 6d 04 13 00 push $0x13046d <== NOT EXECUTED
11274e: e8 e9 db 00 00 call 12033c <printf> <== NOT EXECUTED
112753: 8b 75 10 mov 0x10(%ebp),%esi <== NOT EXECUTED
return rc;
}
int
rtems_rfs_inode_create (rtems_rfs_file_system* fs,
112756: 8b 45 14 mov 0x14(%ebp),%eax <== NOT EXECUTED
112759: 01 f0 add %esi,%eax <== NOT EXECUTED
11275b: 89 45 94 mov %eax,-0x6c(%ebp) <== NOT EXECUTED
11275e: eb 0d jmp 11276d <rtems_rfs_inode_create+0xbe><== NOT EXECUTED
type = "file";
else if (RTEMS_RFS_S_ISLNK (mode))
type = "link";
printf("rtems-rfs: inode-create: parent:%" PRIu32 " name:", parent);
for (c = 0; c < length; c++)
printf ("%c", name[c]);
112760: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
112763: 0f be 06 movsbl (%esi),%eax <== NOT EXECUTED
112766: 50 push %eax <== NOT EXECUTED
112767: e8 3c dd 00 00 call 1204a8 <putchar> <== NOT EXECUTED
11276c: 46 inc %esi <== NOT EXECUTED
11276d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
else if (RTEMS_RFS_S_ISREG (mode))
type = "file";
else if (RTEMS_RFS_S_ISLNK (mode))
type = "link";
printf("rtems-rfs: inode-create: parent:%" PRIu32 " name:", parent);
for (c = 0; c < length; c++)
112770: 3b 75 94 cmp -0x6c(%ebp),%esi <== NOT EXECUTED
112773: 75 eb jne 112760 <rtems_rfs_inode_create+0xb1><== NOT EXECUTED
printf ("%c", name[c]);
printf (" type:%s mode:%04x (%03o)\n", type, mode, mode & ((1 << 10) - 1));
112775: 8b 85 78 ff ff ff mov -0x88(%ebp),%eax <== NOT EXECUTED
11277b: 25 ff 03 00 00 and $0x3ff,%eax <== NOT EXECUTED
112780: 50 push %eax <== NOT EXECUTED
112781: 0f b7 85 78 ff ff ff movzwl -0x88(%ebp),%eax <== NOT EXECUTED
112788: 50 push %eax <== NOT EXECUTED
112789: 57 push %edi <== NOT EXECUTED
11278a: 68 97 04 13 00 push $0x130497 <== NOT EXECUTED
11278f: e8 a8 db 00 00 call 12033c <printf> <== NOT EXECUTED
112794: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
/*
* The file type is field within the mode. Check we have a sane mode set.
*/
switch (mode & RTEMS_RFS_S_IFMT)
112797: 8b 85 78 ff ff ff mov -0x88(%ebp),%eax
11279d: 66 25 00 f0 and $0xf000,%ax
1127a1: 66 89 45 94 mov %ax,-0x6c(%ebp)
1127a5: 66 3d 00 60 cmp $0x6000,%ax
1127a9: 74 22 je 1127cd <rtems_rfs_inode_create+0x11e><== NEVER TAKEN
1127ab: 77 0c ja 1127b9 <rtems_rfs_inode_create+0x10a>
1127ad: 66 3d 00 20 cmp $0x2000,%ax
1127b1: 74 1a je 1127cd <rtems_rfs_inode_create+0x11e><== NEVER TAKEN
1127b3: 66 3d 00 40 cmp $0x4000,%ax
1127b7: eb 0e jmp 1127c7 <rtems_rfs_inode_create+0x118>
1127b9: 66 81 7d 94 00 80 cmpw $0x8000,-0x6c(%ebp)
1127bf: 74 0c je 1127cd <rtems_rfs_inode_create+0x11e>
1127c1: 66 81 7d 94 00 a0 cmpw $0xa000,-0x6c(%ebp)
1127c7: 0f 85 9f 01 00 00 jne 11296c <rtems_rfs_inode_create+0x2bd><== NEVER TAKEN
break;
default:
return EINVAL;
}
rc = rtems_rfs_inode_alloc (fs, parent, ino);
1127cd: 51 push %ecx
1127ce: ff 75 28 pushl 0x28(%ebp)
1127d1: ff 75 0c pushl 0xc(%ebp)
1127d4: 53 push %ebx
1127d5: e8 a2 f9 ff ff call 11217c <rtems_rfs_inode_alloc>
1127da: 89 c7 mov %eax,%edi
if (rc > 0)
1127dc: 83 c4 10 add $0x10,%esp
1127df: 85 c0 test %eax,%eax
1127e1: 0f 8f 8e 01 00 00 jg 112975 <rtems_rfs_inode_create+0x2c6>
return rc;
rc = rtems_rfs_inode_open (fs, *ino, &inode, true);
1127e7: 6a 01 push $0x1
1127e9: 8d 75 c0 lea -0x40(%ebp),%esi
1127ec: 56 push %esi
1127ed: 8b 45 28 mov 0x28(%ebp),%eax
1127f0: ff 30 pushl (%eax)
1127f2: 53 push %ebx
1127f3: e8 32 fa ff ff call 11222a <rtems_rfs_inode_open>
1127f8: 89 c7 mov %eax,%edi
if (rc > 0)
1127fa: 83 c4 10 add $0x10,%esp
1127fd: 85 c0 test %eax,%eax
1127ff: 7e 05 jle 112806 <rtems_rfs_inode_create+0x157><== ALWAYS TAKEN
112801: e9 54 01 00 00 jmp 11295a <rtems_rfs_inode_create+0x2ab><== NOT EXECUTED
{
rtems_rfs_inode_free (fs, *ino);
return rc;
}
rc = rtems_rfs_inode_initialise (&inode, links, mode, uid, gid);
112806: 83 ec 0c sub $0xc,%esp
112809: 0f b7 45 8e movzwl -0x72(%ebp),%eax
11280d: 50 push %eax
11280e: 0f b7 45 90 movzwl -0x70(%ebp),%eax
112812: 50 push %eax
112813: 0f b7 bd 78 ff ff ff movzwl -0x88(%ebp),%edi
11281a: 57 push %edi
11281b: 0f b7 45 92 movzwl -0x6e(%ebp),%eax
11281f: 50 push %eax
112820: 56 push %esi
112821: e8 5e fd ff ff call 112584 <rtems_rfs_inode_initialise>
112826: 89 c7 mov %eax,%edi
if (rc > 0)
112828: 83 c4 20 add $0x20,%esp
11282b: 85 c0 test %eax,%eax
11282d: 7e 10 jle 11283f <rtems_rfs_inode_create+0x190><== ALWAYS TAKEN
{
rtems_rfs_inode_close (fs, &inode);
11282f: 50 push %eax <== NOT EXECUTED
112830: 50 push %eax <== NOT EXECUTED
112831: 56 push %esi <== NOT EXECUTED
112832: 53 push %ebx <== NOT EXECUTED
112833: e8 6f fb ff ff call 1123a7 <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_inode_free (fs, *ino);
112838: 58 pop %eax <== NOT EXECUTED
112839: 5a pop %edx <== NOT EXECUTED
11283a: e9 1d 01 00 00 jmp 11295c <rtems_rfs_inode_create+0x2ad><== NOT EXECUTED
/*
* Only handle the specifics of a directory. Let caller handle the others.
*
* The inode delete will free the inode.
*/
if (RTEMS_RFS_S_ISDIR (mode))
11283f: 66 81 7d 94 00 40 cmpw $0x4000,-0x6c(%ebp)
112845: 75 3e jne 112885 <rtems_rfs_inode_create+0x1d6>
{
rc = rtems_rfs_dir_add_entry (fs, &inode, ".", 1, *ino);
112847: 83 ec 0c sub $0xc,%esp
11284a: 8b 45 28 mov 0x28(%ebp),%eax
11284d: ff 30 pushl (%eax)
11284f: 6a 01 push $0x1
112851: 68 61 cd 12 00 push $0x12cd61
112856: 56 push %esi
112857: 53 push %ebx
112858: e8 d9 84 00 00 call 11ad36 <rtems_rfs_dir_add_entry>
11285d: 89 c7 mov %eax,%edi
if (rc == 0)
11285f: 83 c4 20 add $0x20,%esp
112862: 85 c0 test %eax,%eax
112864: 75 19 jne 11287f <rtems_rfs_inode_create+0x1d0><== NEVER TAKEN
rc = rtems_rfs_dir_add_entry (fs, &inode, "..", 2, parent);
112866: 83 ec 0c sub $0xc,%esp
112869: ff 75 0c pushl 0xc(%ebp)
11286c: 6a 02 push $0x2
11286e: 68 60 cd 12 00 push $0x12cd60
112873: 56 push %esi
112874: 53 push %ebx
112875: e8 bc 84 00 00 call 11ad36 <rtems_rfs_dir_add_entry>
11287a: 89 c7 mov %eax,%edi
11287c: 83 c4 20 add $0x20,%esp
if (rc > 0)
11287f: 85 ff test %edi,%edi
112881: 7e 02 jle 112885 <rtems_rfs_inode_create+0x1d6><== ALWAYS TAKEN
112883: eb 18 jmp 11289d <rtems_rfs_inode_create+0x1ee><== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
return rc;
}
}
rc = rtems_rfs_inode_open (fs, parent, &parent_inode, true);
112885: 6a 01 push $0x1
112887: 8d 45 98 lea -0x68(%ebp),%eax
11288a: 50 push %eax
11288b: ff 75 0c pushl 0xc(%ebp)
11288e: 53 push %ebx
11288f: e8 96 f9 ff ff call 11222a <rtems_rfs_inode_open>
112894: 89 c7 mov %eax,%edi
if (rc > 0)
112896: 83 c4 10 add $0x10,%esp
112899: 85 c0 test %eax,%eax
11289b: 7e 0a jle 1128a7 <rtems_rfs_inode_create+0x1f8><== ALWAYS TAKEN
{
rtems_rfs_inode_delete (fs, &inode);
11289d: 50 push %eax <== NOT EXECUTED
11289e: 50 push %eax <== NOT EXECUTED
11289f: 8d 75 c0 lea -0x40(%ebp),%esi <== NOT EXECUTED
1128a2: e9 8f 00 00 00 jmp 112936 <rtems_rfs_inode_create+0x287><== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
return rc;
}
rc = rtems_rfs_dir_add_entry (fs, &parent_inode, name, length, *ino);
1128a7: 83 ec 0c sub $0xc,%esp
1128aa: 8b 45 28 mov 0x28(%ebp),%eax
1128ad: ff 30 pushl (%eax)
1128af: ff 75 14 pushl 0x14(%ebp)
1128b2: ff 75 10 pushl 0x10(%ebp)
1128b5: 8d 45 98 lea -0x68(%ebp),%eax
1128b8: 50 push %eax
1128b9: 53 push %ebx
1128ba: e8 77 84 00 00 call 11ad36 <rtems_rfs_dir_add_entry>
1128bf: 89 c7 mov %eax,%edi
if (rc > 0)
1128c1: 83 c4 20 add $0x20,%esp
1128c4: 85 c0 test %eax,%eax
1128c6: 7e 1d jle 1128e5 <rtems_rfs_inode_create+0x236><== ALWAYS TAKEN
{
rtems_rfs_inode_delete (fs, &inode);
1128c8: 50 push %eax <== NOT EXECUTED
1128c9: 50 push %eax <== NOT EXECUTED
1128ca: 8d 75 c0 lea -0x40(%ebp),%esi <== NOT EXECUTED
1128cd: 56 push %esi <== NOT EXECUTED
1128ce: 53 push %ebx <== NOT EXECUTED
1128cf: e8 58 fb ff ff call 11242c <rtems_rfs_inode_delete><== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
1128d4: 58 pop %eax <== NOT EXECUTED
1128d5: 5a pop %edx <== NOT EXECUTED
1128d6: 56 push %esi <== NOT EXECUTED
1128d7: 53 push %ebx <== NOT EXECUTED
1128d8: e8 ca fa ff ff call 1123a7 <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_inode_close (fs, &parent_inode);
1128dd: 59 pop %ecx <== NOT EXECUTED
1128de: 5e pop %esi <== NOT EXECUTED
1128df: 8d 45 98 lea -0x68(%ebp),%eax <== NOT EXECUTED
1128e2: 50 push %eax <== NOT EXECUTED
1128e3: eb 5b jmp 112940 <rtems_rfs_inode_create+0x291><== NOT EXECUTED
/*
* If the node is a directory update the parent link count as the
* new directory has the '..' link that points to the parent.
*/
if (RTEMS_RFS_S_ISDIR (mode))
1128e5: 66 81 7d 94 00 40 cmpw $0x4000,-0x6c(%ebp)
1128eb: 75 2f jne 11291c <rtems_rfs_inode_create+0x26d>
rtems_rfs_inode_set_links (&parent_inode,
rtems_rfs_inode_get_links (&parent_inode) + 1);
1128ed: 8b 55 a4 mov -0x5c(%ebp),%edx
*/
static inline uint16_t
rtems_rfs_inode_get_links (rtems_rfs_inode_handle* handle)
{
uint16_t links;
links = rtems_rfs_read_u16 (&handle->node->links);
1128f0: 0f b6 0a movzbl (%edx),%ecx
1128f3: c1 e1 08 shl $0x8,%ecx
1128f6: 0f b6 42 01 movzbl 0x1(%edx),%eax
1128fa: 09 c8 or %ecx,%eax
if (links == 0xffff)
links = 0;
1128fc: 31 c9 xor %ecx,%ecx
1128fe: 66 83 f8 ff cmp $0xffff,%ax
112902: 0f 95 c1 setne %cl
112905: f7 d9 neg %ecx
112907: 21 c8 and %ecx,%eax
/*
* If the node is a directory update the parent link count as the
* new directory has the '..' link that points to the parent.
*/
if (RTEMS_RFS_S_ISDIR (mode))
rtems_rfs_inode_set_links (&parent_inode,
112909: 40 inc %eax
* @prarm links The links.
*/
static inline void
rtems_rfs_inode_set_links (rtems_rfs_inode_handle* handle, uint16_t links)
{
rtems_rfs_write_u16 (&handle->node->links, links);
11290a: 89 c1 mov %eax,%ecx
11290c: 66 c1 e9 08 shr $0x8,%cx
112910: 88 0a mov %cl,(%edx)
112912: 8b 55 a4 mov -0x5c(%ebp),%edx
112915: 88 42 01 mov %al,0x1(%edx)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
112918: c6 45 a8 01 movb $0x1,-0x58(%ebp)
rtems_rfs_inode_get_links (&parent_inode) + 1);
rc = rtems_rfs_inode_close (fs, &parent_inode);
11291c: 56 push %esi
11291d: 56 push %esi
11291e: 8d 45 98 lea -0x68(%ebp),%eax
112921: 50 push %eax
112922: 53 push %ebx
112923: e8 7f fa ff ff call 1123a7 <rtems_rfs_inode_close>
112928: 89 c7 mov %eax,%edi
if (rc > 0)
11292a: 83 c4 10 add $0x10,%esp
11292d: 85 c0 test %eax,%eax
11292f: 8d 75 c0 lea -0x40(%ebp),%esi
112932: 7e 14 jle 112948 <rtems_rfs_inode_create+0x299><== ALWAYS TAKEN
{
rtems_rfs_inode_delete (fs, &inode);
112934: 51 push %ecx <== NOT EXECUTED
112935: 51 push %ecx <== NOT EXECUTED
112936: 56 push %esi <== NOT EXECUTED
112937: 53 push %ebx <== NOT EXECUTED
112938: e8 ef fa ff ff call 11242c <rtems_rfs_inode_delete><== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
11293d: 58 pop %eax <== NOT EXECUTED
11293e: 5a pop %edx <== NOT EXECUTED
11293f: 56 push %esi <== NOT EXECUTED
112940: 53 push %ebx <== NOT EXECUTED
112941: e8 61 fa ff ff call 1123a7 <rtems_rfs_inode_close> <== NOT EXECUTED
112946: eb 1f jmp 112967 <rtems_rfs_inode_create+0x2b8><== NOT EXECUTED
return rc;
}
rc = rtems_rfs_inode_close (fs, &inode);
112948: 57 push %edi
112949: 57 push %edi
11294a: 56 push %esi
11294b: 53 push %ebx
11294c: e8 56 fa ff ff call 1123a7 <rtems_rfs_inode_close>
112951: 89 c7 mov %eax,%edi
if (rc > 0)
112953: 83 c4 10 add $0x10,%esp
112956: 85 c0 test %eax,%eax
112958: 7e 19 jle 112973 <rtems_rfs_inode_create+0x2c4><== ALWAYS TAKEN
{
rtems_rfs_inode_free (fs, *ino);
11295a: 51 push %ecx <== NOT EXECUTED
11295b: 51 push %ecx <== NOT EXECUTED
11295c: 8b 45 28 mov 0x28(%ebp),%eax <== NOT EXECUTED
11295f: ff 30 pushl (%eax) <== NOT EXECUTED
112961: 53 push %ebx <== NOT EXECUTED
112962: e8 36 f8 ff ff call 11219d <rtems_rfs_inode_free> <== NOT EXECUTED
112967: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11296a: eb 09 jmp 112975 <rtems_rfs_inode_create+0x2c6><== NOT EXECUTED
case RTEMS_RFS_S_IFBLK:
case RTEMS_RFS_S_IFREG:
case RTEMS_RFS_S_IFLNK:
break;
default:
return EINVAL;
11296c: bf 16 00 00 00 mov $0x16,%edi <== NOT EXECUTED
112971: eb 02 jmp 112975 <rtems_rfs_inode_create+0x2c6><== NOT EXECUTED
{
rtems_rfs_inode_free (fs, *ino);
return rc;
}
return 0;
112973: 31 ff xor %edi,%edi
}
112975: 89 f8 mov %edi,%eax
112977: 8d 65 f4 lea -0xc(%ebp),%esp
11297a: 5b pop %ebx
11297b: 5e pop %esi
11297c: 5f pop %edi
11297d: 5d pop %ebp
11297e: c3 ret
0011242c <rtems_rfs_inode_delete>:
}
int
rtems_rfs_inode_delete (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle)
{
11242c: 55 push %ebp
11242d: 89 e5 mov %esp,%ebp
11242f: 57 push %edi
112430: 56 push %esi
112431: 53 push %ebx
112432: 83 ec 64 sub $0x64,%esp
112435: 8b 75 08 mov 0x8(%ebp),%esi
112438: 8b 5d 0c mov 0xc(%ebp),%ebx
int rc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_DELETE))
11243b: 6a 00 push $0x0
11243d: 68 00 00 80 00 push $0x800000
112442: e8 55 14 00 00 call 11389c <rtems_rfs_trace>
112447: 83 c4 10 add $0x10,%esp
11244a: 84 c0 test %al,%al
11244c: 74 24 je 112472 <rtems_rfs_inode_delete+0x46><== ALWAYS TAKEN
printf("rtems-rfs: inode-delete: ino:%" PRIu32 " loaded:%s\n",
11244e: 83 7b 0c 00 cmpl $0x0,0xc(%ebx) <== NOT EXECUTED
112452: 74 07 je 11245b <rtems_rfs_inode_delete+0x2f><== NOT EXECUTED
112454: b8 3c de 12 00 mov $0x12de3c,%eax <== NOT EXECUTED
112459: eb 05 jmp 112460 <rtems_rfs_inode_delete+0x34><== NOT EXECUTED
11245b: b8 8f 07 13 00 mov $0x13078f,%eax <== NOT EXECUTED
112460: 52 push %edx <== NOT EXECUTED
112461: 50 push %eax <== NOT EXECUTED
112462: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED
112465: 68 38 04 13 00 push $0x130438 <== NOT EXECUTED
11246a: e8 cd de 00 00 call 12033c <printf> <== NOT EXECUTED
11246f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_rfs_inode_ino (handle),
rtems_rfs_inode_is_loaded (handle) ? "yes" : "no");
if (rtems_rfs_inode_is_loaded (handle))
112472: 83 7b 0c 00 cmpl $0x0,0xc(%ebx)
112476: 74 67 je 1124df <rtems_rfs_inode_delete+0xb3><== NEVER TAKEN
rtems_rfs_block_map map;
/*
* Free the ino number.
*/
rc = rtems_rfs_inode_free (fs, handle->ino);
112478: 50 push %eax
112479: 50 push %eax
11247a: ff 73 08 pushl 0x8(%ebx)
11247d: 56 push %esi
11247e: e8 1a fd ff ff call 11219d <rtems_rfs_inode_free>
if (rc > 0)
112483: 83 c4 10 add $0x10,%esp
112486: 85 c0 test %eax,%eax
112488: 7f 57 jg 1124e1 <rtems_rfs_inode_delete+0xb5><== NEVER TAKEN
return rc;
/*
* Free the blocks the inode may have attached.
*/
rc = rtems_rfs_block_map_open (fs, handle, &map);
11248a: 50 push %eax
11248b: 8d 7d 98 lea -0x68(%ebp),%edi
11248e: 57 push %edi
11248f: 53 push %ebx
112490: 56 push %esi
112491: e8 0c 71 00 00 call 1195a2 <rtems_rfs_block_map_open>
if (rc == 0)
112496: 83 c4 10 add $0x10,%esp
112499: 85 c0 test %eax,%eax
11249b: 75 44 jne 1124e1 <rtems_rfs_inode_delete+0xb5><== NEVER TAKEN
{
int rrc;
rrc = rtems_rfs_block_map_free_all (fs, &map);
11249d: 50 push %eax
11249e: 50 push %eax
11249f: 57 push %edi
1124a0: 56 push %esi
1124a1: e8 0e 7b 00 00 call 119fb4 <rtems_rfs_block_map_free_all>
rc = rtems_rfs_block_map_close (fs, &map);
1124a6: 58 pop %eax
1124a7: 5a pop %edx
1124a8: 57 push %edi
1124a9: 56 push %esi
1124aa: e8 9a 72 00 00 call 119749 <rtems_rfs_block_map_close>
if (rc > 0)
rrc = rc;
memset (handle->node, 0xff, RTEMS_RFS_INODE_SIZE);
1124af: b9 0e 00 00 00 mov $0xe,%ecx
1124b4: 83 c8 ff or $0xffffffff,%eax
1124b7: 8b 7b 0c mov 0xc(%ebx),%edi
1124ba: f3 ab rep stos %eax,%es:(%edi)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
1124bc: c6 43 10 01 movb $0x1,0x10(%ebx)
/*
* Do the release here to avoid the ctime field being set on a
* close. Also if there loads is greater then one then other loads
* active. Forcing the loads count to 0.
*/
rc = rtems_rfs_buffer_handle_release (fs, &handle->buffer);
1124c0: 59 pop %ecx
1124c1: 5f pop %edi
1124c2: 8d 43 10 lea 0x10(%ebx),%eax
1124c5: 50 push %eax
1124c6: 56 push %esi
1124c7: e8 65 7c 00 00 call 11a131 <rtems_rfs_buffer_handle_release>
handle->loads = 0;
1124cc: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx)
handle->node = NULL;
1124d3: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
1124da: 83 c4 10 add $0x10,%esp
1124dd: eb 02 jmp 1124e1 <rtems_rfs_inode_delete+0xb5>
int
rtems_rfs_inode_delete (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle)
{
int rc = 0;
1124df: 31 c0 xor %eax,%eax
handle->loads = 0;
handle->node = NULL;
}
}
return rc;
}
1124e1: 8d 65 f4 lea -0xc(%ebp),%esp
1124e4: 5b pop %ebx
1124e5: 5e pop %esi
1124e6: 5f pop %edi
1124e7: 5d pop %ebp
1124e8: c3 ret
0011d81d <rtems_rfs_inode_get_block.isra.0>:
* @param handle The inode handle.
* @param block The block number to return.
* @return uint32_t The block number.
*/
static inline uint32_t
rtems_rfs_inode_get_block (rtems_rfs_inode_handle* handle, int block)
11d81d: 55 push %ebp <== NOT EXECUTED
11d81e: 89 e5 mov %esp,%ebp <== NOT EXECUTED
{
return rtems_rfs_read_u32 (&handle->node->data.blocks[block]);
11d820: 8d 44 90 10 lea 0x10(%eax,%edx,4),%eax <== NOT EXECUTED
11d824: 8d 50 0c lea 0xc(%eax),%edx <== NOT EXECUTED
11d827: 0f b6 40 0c movzbl 0xc(%eax),%eax <== NOT EXECUTED
11d82b: c1 e0 18 shl $0x18,%eax <== NOT EXECUTED
11d82e: 0f b6 4a 01 movzbl 0x1(%edx),%ecx <== NOT EXECUTED
11d832: c1 e1 10 shl $0x10,%ecx <== NOT EXECUTED
11d835: 09 c8 or %ecx,%eax <== NOT EXECUTED
11d837: 0f b6 4a 03 movzbl 0x3(%edx),%ecx <== NOT EXECUTED
11d83b: 09 c8 or %ecx,%eax <== NOT EXECUTED
11d83d: 0f b6 52 02 movzbl 0x2(%edx),%edx <== NOT EXECUTED
11d841: c1 e2 08 shl $0x8,%edx <== NOT EXECUTED
11d844: 09 d0 or %edx,%eax <== NOT EXECUTED
}
11d846: 5d pop %ebp <== NOT EXECUTED
11d847: c3 ret <== NOT EXECUTED
001130b0 <rtems_rfs_inode_get_block.isra.12>:
* @param handle The inode handle.
* @param block The block number to return.
* @return uint32_t The block number.
*/
static inline uint32_t
rtems_rfs_inode_get_block (rtems_rfs_inode_handle* handle, int block)
1130b0: 55 push %ebp <== NOT EXECUTED
1130b1: 89 e5 mov %esp,%ebp <== NOT EXECUTED
{
return rtems_rfs_read_u32 (&handle->node->data.blocks[block]);
1130b3: 8d 44 90 10 lea 0x10(%eax,%edx,4),%eax <== NOT EXECUTED
1130b7: 8d 50 0c lea 0xc(%eax),%edx <== NOT EXECUTED
1130ba: 0f b6 40 0c movzbl 0xc(%eax),%eax <== NOT EXECUTED
1130be: c1 e0 18 shl $0x18,%eax <== NOT EXECUTED
1130c1: 0f b6 4a 01 movzbl 0x1(%edx),%ecx <== NOT EXECUTED
1130c5: c1 e1 10 shl $0x10,%ecx <== NOT EXECUTED
1130c8: 09 c8 or %ecx,%eax <== NOT EXECUTED
1130ca: 0f b6 4a 03 movzbl 0x3(%edx),%ecx <== NOT EXECUTED
1130ce: 09 c8 or %ecx,%eax <== NOT EXECUTED
1130d0: 0f b6 52 02 movzbl 0x2(%edx),%edx <== NOT EXECUTED
1130d4: c1 e2 08 shl $0x8,%edx <== NOT EXECUTED
1130d7: 09 d0 or %edx,%eax <== NOT EXECUTED
}
1130d9: 5d pop %ebp <== NOT EXECUTED
1130da: c3 ret <== NOT EXECUTED
0011e760 <rtems_rfs_inode_get_block.isra.5>:
* @param handle The inode handle.
* @param block The block number to return.
* @return uint32_t The block number.
*/
static inline uint32_t
rtems_rfs_inode_get_block (rtems_rfs_inode_handle* handle, int block)
11e760: 55 push %ebp <== NOT EXECUTED
11e761: 89 e5 mov %esp,%ebp <== NOT EXECUTED
{
return rtems_rfs_read_u32 (&handle->node->data.blocks[block]);
11e763: 8d 44 90 10 lea 0x10(%eax,%edx,4),%eax <== NOT EXECUTED
11e767: 8d 50 0c lea 0xc(%eax),%edx <== NOT EXECUTED
11e76a: 0f b6 40 0c movzbl 0xc(%eax),%eax <== NOT EXECUTED
11e76e: c1 e0 18 shl $0x18,%eax <== NOT EXECUTED
11e771: 0f b6 4a 01 movzbl 0x1(%edx),%ecx <== NOT EXECUTED
11e775: c1 e1 10 shl $0x10,%ecx <== NOT EXECUTED
11e778: 09 c8 or %ecx,%eax <== NOT EXECUTED
11e77a: 0f b6 4a 03 movzbl 0x3(%edx),%ecx <== NOT EXECUTED
11e77e: 09 c8 or %ecx,%eax <== NOT EXECUTED
11e780: 0f b6 52 02 movzbl 0x2(%edx),%edx <== NOT EXECUTED
11e784: c1 e2 08 shl $0x8,%edx <== NOT EXECUTED
11e787: 09 d0 or %edx,%eax <== NOT EXECUTED
}
11e789: 5d pop %ebp <== NOT EXECUTED
11e78a: c3 ret <== NOT EXECUTED
001121b2 <rtems_rfs_inode_load>:
}
int
rtems_rfs_inode_load (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle)
{
1121b2: 55 push %ebp
1121b3: 89 e5 mov %esp,%ebp
1121b5: 53 push %ebx
1121b6: 83 ec 0c sub $0xc,%esp
1121b9: 8b 5d 0c mov 0xc(%ebp),%ebx
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_LOAD))
1121bc: 6a 00 push $0x0
1121be: 68 00 00 10 00 push $0x100000
1121c3: e8 d4 16 00 00 call 11389c <rtems_rfs_trace>
1121c8: 83 c4 10 add $0x10,%esp
1121cb: 84 c0 test %al,%al
1121cd: 74 26 je 1121f5 <rtems_rfs_inode_load+0x43><== ALWAYS TAKEN
printf ("rtems-rfs: inode-load: ino=%" PRIu32 " loads=%i loaded=%s\n",
1121cf: 83 7b 0c 00 cmpl $0x0,0xc(%ebx) <== NOT EXECUTED
1121d3: 74 07 je 1121dc <rtems_rfs_inode_load+0x2a><== NOT EXECUTED
1121d5: b8 3c de 12 00 mov $0x12de3c,%eax <== NOT EXECUTED
1121da: eb 05 jmp 1121e1 <rtems_rfs_inode_load+0x2f><== NOT EXECUTED
1121dc: b8 8f 07 13 00 mov $0x13078f,%eax <== NOT EXECUTED
1121e1: 50 push %eax <== NOT EXECUTED
1121e2: ff 73 24 pushl 0x24(%ebx) <== NOT EXECUTED
1121e5: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED
1121e8: 68 5f 03 13 00 push $0x13035f <== NOT EXECUTED
1121ed: e8 4a e1 00 00 call 12033c <printf> <== NOT EXECUTED
1121f2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
/*
* An inode does not move so once loaded no need to do again.
*/
if (!rtems_rfs_inode_is_loaded (handle))
1121f5: 83 7b 0c 00 cmpl $0x0,0xc(%ebx)
1121f9: 75 25 jne 112220 <rtems_rfs_inode_load+0x6e>
{
int rc;
rc = rtems_rfs_buffer_handle_request (fs,&handle->buffer,
1121fb: 6a 01 push $0x1
1121fd: ff 73 1c pushl 0x1c(%ebx)
112200: 8d 43 10 lea 0x10(%ebx),%eax
112203: 50 push %eax
112204: ff 75 08 pushl 0x8(%ebp)
112207: e8 9e 80 00 00 call 11a2aa <rtems_rfs_buffer_handle_request>
handle->block, true);
if (rc > 0)
11220c: 83 c4 10 add $0x10,%esp
11220f: 85 c0 test %eax,%eax
112211: 7f 12 jg 112225 <rtems_rfs_inode_load+0x73><== NEVER TAKEN
return rc;
handle->node = rtems_rfs_buffer_data (&handle->buffer);
112213: 8b 53 18 mov 0x18(%ebx),%edx
handle->node += handle->offset;
112216: 6b 43 20 38 imul $0x38,0x20(%ebx),%eax
11221a: 03 42 1c add 0x1c(%edx),%eax
11221d: 89 43 0c mov %eax,0xc(%ebx)
}
handle->loads++;
112220: ff 43 24 incl 0x24(%ebx)
return 0;
112223: 31 c0 xor %eax,%eax
}
112225: 8b 5d fc mov -0x4(%ebp),%ebx
112228: c9 leave
112229: c3 ret
0011222a <rtems_rfs_inode_open>:
int
rtems_rfs_inode_open (rtems_rfs_file_system* fs,
rtems_rfs_ino ino,
rtems_rfs_inode_handle* handle,
bool load)
{
11222a: 55 push %ebp
11222b: 89 e5 mov %esp,%ebp
11222d: 57 push %edi
11222e: 56 push %esi
11222f: 53 push %ebx
112230: 83 ec 24 sub $0x24,%esp
112233: 8b 75 08 mov 0x8(%ebp),%esi
112236: 8b 7d 0c mov 0xc(%ebp),%edi
112239: 8b 5d 10 mov 0x10(%ebp),%ebx
11223c: 8a 45 14 mov 0x14(%ebp),%al
11223f: 88 45 e7 mov %al,-0x19(%ebp)
int group;
int gino;
int index;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_OPEN))
112242: 6a 00 push $0x0
112244: 68 00 00 04 00 push $0x40000
112249: e8 4e 16 00 00 call 11389c <rtems_rfs_trace>
11224e: 83 c4 10 add $0x10,%esp
112251: 84 c0 test %al,%al
112253: 74 10 je 112265 <rtems_rfs_inode_open+0x3b><== ALWAYS TAKEN
printf ("rtems-rfs: inode-open: ino: %" PRIu32 "\n", ino);
112255: 50 push %eax <== NOT EXECUTED
112256: 50 push %eax <== NOT EXECUTED
112257: 57 push %edi <== NOT EXECUTED
112258: 68 92 03 13 00 push $0x130392 <== NOT EXECUTED
11225d: e8 da e0 00 00 call 12033c <printf> <== NOT EXECUTED
112262: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
if (ino == RTEMS_RFS_EMPTY_INO)
return EINVAL;
112265: b8 16 00 00 00 mov $0x16,%eax
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_OPEN))
printf ("rtems-rfs: inode-open: ino: %" PRIu32 "\n", ino);
if (ino == RTEMS_RFS_EMPTY_INO)
11226a: 85 ff test %edi,%edi
11226c: 74 67 je 1122d5 <rtems_rfs_inode_open+0xab><== NEVER TAKEN
return EINVAL;
if ((ino - RTEMS_RFS_ROOT_INO) > rtems_rfs_fs_inodes (fs))
11226e: 8d 4f ff lea -0x1(%edi),%ecx
112271: 3b 4e 14 cmp 0x14(%esi),%ecx
112274: 77 5f ja 1122d5 <rtems_rfs_inode_open+0xab><== NEVER TAKEN
return EINVAL;
handle->ino = ino;
112276: 89 7b 08 mov %edi,0x8(%ebx)
handle->node = NULL;
112279: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
handle->loads = 0;
112280: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx)
gino = ino - RTEMS_RFS_ROOT_INO;
group = gino / fs->group_inodes;
gino = gino % fs->group_inodes;
112287: 89 c8 mov %ecx,%eax
112289: 31 d2 xor %edx,%edx
11228b: f7 76 2c divl 0x2c(%esi)
11228e: 89 c1 mov %eax,%ecx
index = (gino / fs->inodes_per_block) + RTEMS_RFS_GROUP_INODE_BLOCK;
handle->offset = gino % fs->inodes_per_block;
112290: 89 d0 mov %edx,%eax
112292: 31 d2 xor %edx,%edx
112294: f7 76 30 divl 0x30(%esi)
112297: 89 53 20 mov %edx,0x20(%ebx)
handle->block = rtems_rfs_group_block (&fs->groups[group], index);
11229a: 6b c9 50 imul $0x50,%ecx,%ecx
11229d: 03 4e 20 add 0x20(%esi),%ecx
handle->loads = 0;
gino = ino - RTEMS_RFS_ROOT_INO;
group = gino / fs->group_inodes;
gino = gino % fs->group_inodes;
index = (gino / fs->inodes_per_block) + RTEMS_RFS_GROUP_INODE_BLOCK;
1122a0: 8b 11 mov (%ecx),%edx
handle->offset = gino % fs->inodes_per_block;
handle->block = rtems_rfs_group_block (&fs->groups[group], index);
1122a2: 8d 44 10 02 lea 0x2(%eax,%edx,1),%eax
1122a6: 89 43 1c mov %eax,0x1c(%ebx)
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
1122a9: c6 43 10 00 movb $0x0,0x10(%ebx)
handle->bnum = 0;
1122ad: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx)
handle->buffer = NULL;
1122b4: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx)
rc = rtems_rfs_buffer_handle_open (fs, &handle->buffer);
1122bb: 31 c0 xor %eax,%eax
if ((rc == 0) && load)
1122bd: 80 7d e7 00 cmpb $0x0,-0x19(%ebp)
1122c1: 74 12 je 1122d5 <rtems_rfs_inode_open+0xab><== NEVER TAKEN
rc = rtems_rfs_inode_load (fs, handle);
1122c3: 89 5d 0c mov %ebx,0xc(%ebp)
1122c6: 89 75 08 mov %esi,0x8(%ebp)
return rc;
}
1122c9: 8d 65 f4 lea -0xc(%ebp),%esp
1122cc: 5b pop %ebx
1122cd: 5e pop %esi
1122ce: 5f pop %edi
1122cf: 5d pop %ebp
handle->offset = gino % fs->inodes_per_block;
handle->block = rtems_rfs_group_block (&fs->groups[group], index);
rc = rtems_rfs_buffer_handle_open (fs, &handle->buffer);
if ((rc == 0) && load)
rc = rtems_rfs_inode_load (fs, handle);
1122d0: e9 dd fe ff ff jmp 1121b2 <rtems_rfs_inode_load>
return rc;
}
1122d5: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1122d8: 5b pop %ebx <== NOT EXECUTED
1122d9: 5e pop %esi <== NOT EXECUTED
1122da: 5f pop %edi <== NOT EXECUTED
1122db: 5d pop %ebp <== NOT EXECUTED
1122dc: c3 ret <== NOT EXECUTED
001129d0 <rtems_rfs_inode_set_block>:
* @param block The block index.
* @param bno The block number.
*/
static inline void
rtems_rfs_inode_set_block (rtems_rfs_inode_handle* handle, int block, uint32_t bno)
{
1129d0: 55 push %ebp <== NOT EXECUTED
1129d1: 89 e5 mov %esp,%ebp <== NOT EXECUTED
1129d3: 56 push %esi <== NOT EXECUTED
1129d4: 53 push %ebx <== NOT EXECUTED
rtems_rfs_write_u32 (&handle->node->data.blocks[block], bno);
1129d5: 8d 14 95 10 00 00 00 lea 0x10(,%edx,4),%edx <== NOT EXECUTED
1129dc: 8b 70 0c mov 0xc(%eax),%esi <== NOT EXECUTED
1129df: 89 cb mov %ecx,%ebx <== NOT EXECUTED
1129e1: c1 eb 18 shr $0x18,%ebx <== NOT EXECUTED
1129e4: 88 5c 16 0c mov %bl,0xc(%esi,%edx,1) <== NOT EXECUTED
1129e8: 8b 70 0c mov 0xc(%eax),%esi <== NOT EXECUTED
1129eb: 89 cb mov %ecx,%ebx <== NOT EXECUTED
1129ed: c1 eb 10 shr $0x10,%ebx <== NOT EXECUTED
1129f0: 88 5c 16 0d mov %bl,0xd(%esi,%edx,1) <== NOT EXECUTED
1129f4: 89 cb mov %ecx,%ebx <== NOT EXECUTED
1129f6: c1 eb 08 shr $0x8,%ebx <== NOT EXECUTED
1129f9: 8b 70 0c mov 0xc(%eax),%esi <== NOT EXECUTED
1129fc: 88 5c 16 0e mov %bl,0xe(%esi,%edx,1) <== NOT EXECUTED
112a00: 8b 58 0c mov 0xc(%eax),%ebx <== NOT EXECUTED
112a03: 88 4c 13 0f mov %cl,0xf(%ebx,%edx,1) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
112a07: c6 40 10 01 movb $0x1,0x10(%eax) <== NOT EXECUTED
}
112a0b: 5b pop %ebx <== NOT EXECUTED
112a0c: 5e pop %esi <== NOT EXECUTED
112a0d: 5d pop %ebp <== NOT EXECUTED
112a0e: c3 ret <== NOT EXECUTED
001124e9 <rtems_rfs_inode_time_stamp_now>:
int
rtems_rfs_inode_time_stamp_now (rtems_rfs_inode_handle* handle,
bool atime,
bool mtime)
{
1124e9: 55 push %ebp
1124ea: 89 e5 mov %esp,%ebp
1124ec: 56 push %esi
1124ed: 53 push %ebx
1124ee: 83 ec 10 sub $0x10,%esp
1124f1: 8b 5d 08 mov 0x8(%ebp),%ebx
1124f4: 8a 45 0c mov 0xc(%ebp),%al
1124f7: 88 45 f7 mov %al,-0x9(%ebp)
1124fa: 8a 4d 10 mov 0x10(%ebp),%cl
time_t now;
if (!rtems_rfs_inode_is_loaded (handle))
return ENXIO;
1124fd: b8 06 00 00 00 mov $0x6,%eax
rtems_rfs_inode_time_stamp_now (rtems_rfs_inode_handle* handle,
bool atime,
bool mtime)
{
time_t now;
if (!rtems_rfs_inode_is_loaded (handle))
112502: 83 7b 0c 00 cmpl $0x0,0xc(%ebx)
112506: 74 75 je 11257d <rtems_rfs_inode_time_stamp_now+0x94><== NEVER TAKEN
return ENXIO;
now = time (NULL);
112508: 83 ec 0c sub $0xc,%esp
11250b: 6a 00 push $0x0
11250d: 88 4d f0 mov %cl,-0x10(%ebp)
112510: e8 37 20 01 00 call 12454c <time>
112515: 89 c2 mov %eax,%edx
if (atime)
112517: 83 c4 10 add $0x10,%esp
11251a: 80 7d f7 00 cmpb $0x0,-0x9(%ebp)
11251e: 8a 4d f0 mov -0x10(%ebp),%cl
112521: 74 29 je 11254c <rtems_rfs_inode_time_stamp_now+0x63><== NEVER TAKEN
*/
static inline void
rtems_rfs_inode_set_atime (rtems_rfs_inode_handle* handle,
rtems_rfs_time atime)
{
rtems_rfs_write_u32 (&handle->node->atime, atime);
112523: 8b 73 0c mov 0xc(%ebx),%esi
112526: c1 e8 18 shr $0x18,%eax
112529: 88 46 10 mov %al,0x10(%esi)
11252c: 8b 73 0c mov 0xc(%ebx),%esi
11252f: 89 d0 mov %edx,%eax
112531: c1 e8 10 shr $0x10,%eax
112534: 88 46 11 mov %al,0x11(%esi)
112537: 8b 73 0c mov 0xc(%ebx),%esi
11253a: 89 d0 mov %edx,%eax
11253c: c1 e8 08 shr $0x8,%eax
11253f: 88 46 12 mov %al,0x12(%esi)
112542: 8b 43 0c mov 0xc(%ebx),%eax
112545: 88 50 13 mov %dl,0x13(%eax)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
112548: c6 43 10 01 movb $0x1,0x10(%ebx)
rtems_rfs_inode_set_atime (handle, now);
if (mtime)
rtems_rfs_inode_set_mtime (handle, now);
return 0;
11254c: 31 c0 xor %eax,%eax
if (!rtems_rfs_inode_is_loaded (handle))
return ENXIO;
now = time (NULL);
if (atime)
rtems_rfs_inode_set_atime (handle, now);
if (mtime)
11254e: 84 c9 test %cl,%cl
112550: 74 2b je 11257d <rtems_rfs_inode_time_stamp_now+0x94><== NEVER TAKEN
*/
static inline void
rtems_rfs_inode_set_mtime (rtems_rfs_inode_handle* handle,
rtems_rfs_time mtime)
{
rtems_rfs_write_u32 (&handle->node->mtime, mtime);
112552: 8b 73 0c mov 0xc(%ebx),%esi
112555: 89 d1 mov %edx,%ecx
112557: c1 e9 18 shr $0x18,%ecx
11255a: 88 4e 14 mov %cl,0x14(%esi)
11255d: 8b 73 0c mov 0xc(%ebx),%esi
112560: 89 d1 mov %edx,%ecx
112562: c1 e9 10 shr $0x10,%ecx
112565: 88 4e 15 mov %cl,0x15(%esi)
112568: 8b 73 0c mov 0xc(%ebx),%esi
11256b: 89 d1 mov %edx,%ecx
11256d: c1 e9 08 shr $0x8,%ecx
112570: 88 4e 16 mov %cl,0x16(%esi)
112573: 8b 4b 0c mov 0xc(%ebx),%ecx
112576: 88 51 17 mov %dl,0x17(%ecx)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
112579: c6 43 10 01 movb $0x1,0x10(%ebx)
rtems_rfs_inode_set_mtime (handle, now);
return 0;
}
11257d: 8d 65 f8 lea -0x8(%ebp),%esp
112580: 5b pop %ebx
112581: 5e pop %esi
112582: 5d pop %ebp
112583: c3 ret
001122dd <rtems_rfs_inode_unload>:
int
rtems_rfs_inode_unload (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle,
bool update_ctime)
{
1122dd: 55 push %ebp
1122de: 89 e5 mov %esp,%ebp
1122e0: 53 push %ebx
1122e1: 83 ec 1c sub $0x1c,%esp
1122e4: 8b 5d 0c mov 0xc(%ebp),%ebx
1122e7: 8a 45 10 mov 0x10(%ebp),%al
1122ea: 88 45 f7 mov %al,-0x9(%ebp)
int rc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_UNLOAD))
1122ed: 6a 00 push $0x0
1122ef: 68 00 00 20 00 push $0x200000
1122f4: e8 a3 15 00 00 call 11389c <rtems_rfs_trace>
1122f9: 83 c4 10 add $0x10,%esp
1122fc: 84 c0 test %al,%al
1122fe: 74 26 je 112326 <rtems_rfs_inode_unload+0x49><== ALWAYS TAKEN
printf ("rtems-rfs: inode-unload: ino=%" PRIu32 " loads=%i loaded=%s\n",
112300: 83 7b 0c 00 cmpl $0x0,0xc(%ebx) <== NOT EXECUTED
112304: 74 07 je 11230d <rtems_rfs_inode_unload+0x30><== NOT EXECUTED
112306: b8 3c de 12 00 mov $0x12de3c,%eax <== NOT EXECUTED
11230b: eb 05 jmp 112312 <rtems_rfs_inode_unload+0x35><== NOT EXECUTED
11230d: b8 8f 07 13 00 mov $0x13078f,%eax <== NOT EXECUTED
112312: 50 push %eax <== NOT EXECUTED
112313: ff 73 24 pushl 0x24(%ebx) <== NOT EXECUTED
112316: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED
112319: 68 b3 03 13 00 push $0x1303b3 <== NOT EXECUTED
11231e: e8 19 e0 00 00 call 12033c <printf> <== NOT EXECUTED
112323: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
handle->ino, handle->loads,
rtems_rfs_inode_is_loaded (handle) ? "yes" : "no");
if (rtems_rfs_inode_is_loaded (handle))
112326: 83 7b 0c 00 cmpl $0x0,0xc(%ebx)
11232a: 75 04 jne 112330 <rtems_rfs_inode_unload+0x53>
int
rtems_rfs_inode_unload (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle,
bool update_ctime)
{
int rc = 0;
11232c: 31 c0 xor %eax,%eax
11232e: eb 72 jmp 1123a2 <rtems_rfs_inode_unload+0xc5>
handle->ino, handle->loads,
rtems_rfs_inode_is_loaded (handle) ? "yes" : "no");
if (rtems_rfs_inode_is_loaded (handle))
{
if (handle->loads == 0)
112330: 8b 53 24 mov 0x24(%ebx),%edx
return EIO;
112333: b8 05 00 00 00 mov $0x5,%eax
handle->ino, handle->loads,
rtems_rfs_inode_is_loaded (handle) ? "yes" : "no");
if (rtems_rfs_inode_is_loaded (handle))
{
if (handle->loads == 0)
112338: 85 d2 test %edx,%edx
11233a: 74 66 je 1123a2 <rtems_rfs_inode_unload+0xc5><== NEVER TAKEN
return EIO;
handle->loads--;
11233c: 8d 42 ff lea -0x1(%edx),%eax
11233f: 89 43 24 mov %eax,0x24(%ebx)
if (handle->loads == 0)
112342: 85 c0 test %eax,%eax
112344: 75 e6 jne 11232c <rtems_rfs_inode_unload+0x4f>
{
/*
* If the buffer is dirty it will be release. Also set the ctime.
*/
if (rtems_rfs_buffer_dirty (&handle->buffer) && update_ctime)
112346: 80 7b 10 00 cmpb $0x0,0x10(%ebx)
11234a: 74 3e je 11238a <rtems_rfs_inode_unload+0xad>
11234c: 80 7d f7 00 cmpb $0x0,-0x9(%ebp)
112350: 74 38 je 11238a <rtems_rfs_inode_unload+0xad><== NEVER TAKEN
rtems_rfs_inode_set_ctime (handle, time (NULL));
112352: 83 ec 0c sub $0xc,%esp
112355: 6a 00 push $0x0
112357: e8 f0 21 01 00 call 12454c <time>
*/
static inline void
rtems_rfs_inode_set_ctime (rtems_rfs_inode_handle* handle,
rtems_rfs_time ctime)
{
rtems_rfs_write_u32 (&handle->node->ctime, ctime);
11235c: 8b 53 0c mov 0xc(%ebx),%edx
11235f: 89 c1 mov %eax,%ecx
112361: c1 e9 18 shr $0x18,%ecx
112364: 88 4a 18 mov %cl,0x18(%edx)
112367: 8b 53 0c mov 0xc(%ebx),%edx
11236a: 89 c1 mov %eax,%ecx
11236c: c1 e9 10 shr $0x10,%ecx
11236f: 88 4a 19 mov %cl,0x19(%edx)
112372: 8b 53 0c mov 0xc(%ebx),%edx
112375: 89 c1 mov %eax,%ecx
112377: c1 e9 08 shr $0x8,%ecx
11237a: 88 4a 1a mov %cl,0x1a(%edx)
11237d: 8b 53 0c mov 0xc(%ebx),%edx
112380: 88 42 1b mov %al,0x1b(%edx)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
112383: c6 43 10 01 movb $0x1,0x10(%ebx)
112387: 83 c4 10 add $0x10,%esp
rc = rtems_rfs_buffer_handle_release (fs, &handle->buffer);
11238a: 52 push %edx
11238b: 52 push %edx
11238c: 8d 43 10 lea 0x10(%ebx),%eax
11238f: 50 push %eax
112390: ff 75 08 pushl 0x8(%ebp)
112393: e8 99 7d 00 00 call 11a131 <rtems_rfs_buffer_handle_release>
handle->node = NULL;
112398: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
11239f: 83 c4 10 add $0x10,%esp
}
}
return rc;
}
1123a2: 8b 5d fc mov -0x4(%ebp),%ebx
1123a5: c9 leave
1123a6: c3 ret
0011cd78 <rtems_rfs_link>:
const char* name,
int length,
rtems_rfs_ino parent,
rtems_rfs_ino target,
bool link_dir)
{
11cd78: 55 push %ebp
11cd79: 89 e5 mov %esp,%ebp
11cd7b: 57 push %edi
11cd7c: 56 push %esi
11cd7d: 53 push %ebx
11cd7e: 83 ec 74 sub $0x74,%esp
11cd81: 8b 5d 08 mov 0x8(%ebp),%ebx
11cd84: 8b 75 18 mov 0x18(%ebp),%esi
11cd87: 8a 55 1c mov 0x1c(%ebp),%dl
11cd8a: 88 55 97 mov %dl,-0x69(%ebp)
rtems_rfs_inode_handle parent_inode;
rtems_rfs_inode_handle target_inode;
uint16_t links;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_LINK))
11cd8d: 6a 00 push $0x0
11cd8f: 68 00 00 00 01 push $0x1000000
11cd94: e8 03 6b ff ff call 11389c <rtems_rfs_trace>
11cd99: 83 c4 10 add $0x10,%esp
11cd9c: 84 c0 test %al,%al
11cd9e: 74 3f je 11cddf <rtems_rfs_link+0x67> <== ALWAYS TAKEN
{
int c;
printf ("rtems-rfs: link: parent(%" PRIu32 ") -> ", parent);
11cda0: 50 push %eax <== NOT EXECUTED
11cda1: 50 push %eax <== NOT EXECUTED
11cda2: ff 75 14 pushl 0x14(%ebp) <== NOT EXECUTED
11cda5: 68 59 1f 13 00 push $0x131f59 <== NOT EXECUTED
11cdaa: e8 8d 35 00 00 call 12033c <printf> <== NOT EXECUTED
for (c = 0; c < length; c++)
11cdaf: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11cdb2: 31 ff xor %edi,%edi <== NOT EXECUTED
11cdb4: eb 14 jmp 11cdca <rtems_rfs_link+0x52> <== NOT EXECUTED
printf ("%c", name[c]);
11cdb6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11cdb9: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
11cdbc: 0f be 04 3a movsbl (%edx,%edi,1),%eax <== NOT EXECUTED
11cdc0: 50 push %eax <== NOT EXECUTED
11cdc1: e8 e2 36 00 00 call 1204a8 <putchar> <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_LINK))
{
int c;
printf ("rtems-rfs: link: parent(%" PRIu32 ") -> ", parent);
for (c = 0; c < length; c++)
11cdc6: 47 inc %edi <== NOT EXECUTED
11cdc7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11cdca: 3b 7d 10 cmp 0x10(%ebp),%edi <== NOT EXECUTED
11cdcd: 7c e7 jl 11cdb6 <rtems_rfs_link+0x3e> <== NOT EXECUTED
printf ("%c", name[c]);
printf ("(%" PRIu32 ")\n", target);
11cdcf: 57 push %edi <== NOT EXECUTED
11cdd0: 57 push %edi <== NOT EXECUTED
11cdd1: 56 push %esi <== NOT EXECUTED
11cdd2: 68 9e 1f 13 00 push $0x131f9e <== NOT EXECUTED
11cdd7: e8 60 35 00 00 call 12033c <printf> <== NOT EXECUTED
11cddc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
rc = rtems_rfs_inode_open (fs, target, &target_inode, true);
11cddf: 6a 01 push $0x1
11cde1: 8d 4d c0 lea -0x40(%ebp),%ecx
11cde4: 51 push %ecx
11cde5: 56 push %esi
11cde6: 53 push %ebx
11cde7: 89 4d 90 mov %ecx,-0x70(%ebp)
11cdea: e8 3b 54 ff ff call 11222a <rtems_rfs_inode_open>
11cdef: 89 c7 mov %eax,%edi
if (rc)
11cdf1: 83 c4 10 add $0x10,%esp
11cdf4: 85 c0 test %eax,%eax
11cdf6: 8b 4d 90 mov -0x70(%ebp),%ecx
11cdf9: 0f 85 fe 00 00 00 jne 11cefd <rtems_rfs_link+0x185> <== NEVER TAKEN
/*
* If the target inode is a directory and we cannot link directories
* return a not supported error code.
*/
if (!link_dir && S_ISDIR (rtems_rfs_inode_get_mode (&target_inode)))
11cdff: 80 7d 97 00 cmpb $0x0,-0x69(%ebp)
11ce03: 75 29 jne 11ce2e <rtems_rfs_link+0xb6> <== NEVER TAKEN
11ce05: 8b 45 cc mov -0x34(%ebp),%eax
11ce08: 0f b6 40 02 movzbl 0x2(%eax),%eax
11ce0c: c1 e0 08 shl $0x8,%eax
11ce0f: 66 25 00 f0 and $0xf000,%ax
11ce13: 66 3d 00 40 cmp $0x4000,%ax
11ce17: 75 15 jne 11ce2e <rtems_rfs_link+0xb6> <== ALWAYS TAKEN
{
rtems_rfs_inode_close (fs, &target_inode);
11ce19: 56 push %esi <== NOT EXECUTED
11ce1a: 56 push %esi <== NOT EXECUTED
11ce1b: 51 push %ecx <== NOT EXECUTED
11ce1c: 53 push %ebx <== NOT EXECUTED
11ce1d: e8 85 55 ff ff call 1123a7 <rtems_rfs_inode_close> <== NOT EXECUTED
11ce22: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
return ENOTSUP;
11ce25: 66 bf 86 00 mov $0x86,%di <== NOT EXECUTED
11ce29: e9 cf 00 00 00 jmp 11cefd <rtems_rfs_link+0x185> <== NOT EXECUTED
}
rc = rtems_rfs_inode_open (fs, parent, &parent_inode, true);
11ce2e: 6a 01 push $0x1
11ce30: 8d 4d 98 lea -0x68(%ebp),%ecx
11ce33: 51 push %ecx
11ce34: ff 75 14 pushl 0x14(%ebp)
11ce37: 53 push %ebx
11ce38: 89 4d 90 mov %ecx,-0x70(%ebp)
11ce3b: e8 ea 53 ff ff call 11222a <rtems_rfs_inode_open>
11ce40: 89 c7 mov %eax,%edi
if (rc)
11ce42: 83 c4 10 add $0x10,%esp
11ce45: 85 c0 test %eax,%eax
11ce47: 8b 4d 90 mov -0x70(%ebp),%ecx
11ce4a: 74 04 je 11ce50 <rtems_rfs_link+0xd8> <== ALWAYS TAKEN
{
rtems_rfs_inode_close (fs, &target_inode);
11ce4c: 51 push %ecx <== NOT EXECUTED
11ce4d: 51 push %ecx <== NOT EXECUTED
11ce4e: eb 2b jmp 11ce7b <rtems_rfs_link+0x103> <== NOT EXECUTED
return rc;
}
rc = rtems_rfs_dir_add_entry (fs, &parent_inode, name, length, target);
11ce50: 83 ec 0c sub $0xc,%esp
11ce53: 56 push %esi
11ce54: ff 75 10 pushl 0x10(%ebp)
11ce57: ff 75 0c pushl 0xc(%ebp)
11ce5a: 51 push %ecx
11ce5b: 53 push %ebx
11ce5c: 89 4d 90 mov %ecx,-0x70(%ebp)
11ce5f: e8 d2 de ff ff call 11ad36 <rtems_rfs_dir_add_entry>
11ce64: 89 c7 mov %eax,%edi
if (rc > 0)
11ce66: 83 c4 20 add $0x20,%esp
11ce69: 85 c0 test %eax,%eax
11ce6b: 8b 4d 90 mov -0x70(%ebp),%ecx
11ce6e: 7e 10 jle 11ce80 <rtems_rfs_link+0x108> <== ALWAYS TAKEN
{
rtems_rfs_inode_close (fs, &parent_inode);
11ce70: 50 push %eax <== NOT EXECUTED
11ce71: 50 push %eax <== NOT EXECUTED
11ce72: 51 push %ecx <== NOT EXECUTED
11ce73: 53 push %ebx <== NOT EXECUTED
11ce74: e8 2e 55 ff ff call 1123a7 <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_inode_close (fs, &target_inode);
11ce79: 58 pop %eax <== NOT EXECUTED
11ce7a: 5a pop %edx <== NOT EXECUTED
11ce7b: 8d 45 c0 lea -0x40(%ebp),%eax <== NOT EXECUTED
11ce7e: eb 66 jmp 11cee6 <rtems_rfs_link+0x16e> <== NOT EXECUTED
return rc;
}
links = rtems_rfs_inode_get_links (&target_inode) + 1;
11ce80: 8b 7d cc mov -0x34(%ebp),%edi
*/
static inline uint16_t
rtems_rfs_inode_get_links (rtems_rfs_inode_handle* handle)
{
uint16_t links;
links = rtems_rfs_read_u16 (&handle->node->links);
11ce83: 0f b6 37 movzbl (%edi),%esi
11ce86: c1 e6 08 shl $0x8,%esi
11ce89: 0f b6 47 01 movzbl 0x1(%edi),%eax
11ce8d: 09 f0 or %esi,%eax
if (links == 0xffff)
links = 0;
11ce8f: 31 d2 xor %edx,%edx
11ce91: 66 83 f8 ff cmp $0xffff,%ax
11ce95: 0f 95 c2 setne %dl
11ce98: 89 d6 mov %edx,%esi
11ce9a: f7 de neg %esi
11ce9c: 21 f0 and %esi,%eax
11ce9e: 40 inc %eax
* @prarm links The links.
*/
static inline void
rtems_rfs_inode_set_links (rtems_rfs_inode_handle* handle, uint16_t links)
{
rtems_rfs_write_u16 (&handle->node->links, links);
11ce9f: 89 c6 mov %eax,%esi
11cea1: 66 c1 ee 08 shr $0x8,%si
11cea5: 89 f2 mov %esi,%edx
11cea7: 88 17 mov %dl,(%edi)
11cea9: 8b 55 cc mov -0x34(%ebp),%edx
11ceac: 88 42 01 mov %al,0x1(%edx)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
11ceaf: c6 45 d0 01 movb $0x1,-0x30(%ebp)
rtems_rfs_inode_set_links (&target_inode, links);
rc = rtems_rfs_inode_time_stamp_now (&parent_inode, true, true);
11ceb3: 57 push %edi
11ceb4: 6a 01 push $0x1
11ceb6: 6a 01 push $0x1
11ceb8: 51 push %ecx
11ceb9: 89 4d 90 mov %ecx,-0x70(%ebp)
11cebc: e8 28 56 ff ff call 1124e9 <rtems_rfs_inode_time_stamp_now>
11cec1: 89 c7 mov %eax,%edi
if (rc > 0)
11cec3: 83 c4 10 add $0x10,%esp
11cec6: 85 c0 test %eax,%eax
11cec8: 8b 4d 90 mov -0x70(%ebp),%ecx
11cecb: 7e 02 jle 11cecf <rtems_rfs_link+0x157> <== ALWAYS TAKEN
11cecd: eb a1 jmp 11ce70 <rtems_rfs_link+0xf8> <== NOT EXECUTED
rtems_rfs_inode_close (fs, &parent_inode);
rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
rc = rtems_rfs_inode_close (fs, &parent_inode);
11cecf: 56 push %esi
11ced0: 56 push %esi
11ced1: 51 push %ecx
11ced2: 53 push %ebx
11ced3: e8 cf 54 ff ff call 1123a7 <rtems_rfs_inode_close>
11ced8: 89 c7 mov %eax,%edi
if (rc > 0)
11ceda: 83 c4 10 add $0x10,%esp
11cedd: 85 c0 test %eax,%eax
11cedf: 8d 45 c0 lea -0x40(%ebp),%eax
11cee2: 7e 0b jle 11ceef <rtems_rfs_link+0x177> <== ALWAYS TAKEN
{
rtems_rfs_inode_close (fs, &target_inode);
11cee4: 51 push %ecx <== NOT EXECUTED
11cee5: 51 push %ecx <== NOT EXECUTED
11cee6: 50 push %eax <== NOT EXECUTED
11cee7: 53 push %ebx <== NOT EXECUTED
11cee8: e8 ba 54 ff ff call 1123a7 <rtems_rfs_inode_close> <== NOT EXECUTED
11ceed: eb 0b jmp 11cefa <rtems_rfs_link+0x182> <== NOT EXECUTED
return rc;
}
rc = rtems_rfs_inode_close (fs, &target_inode);
11ceef: 52 push %edx
11cef0: 52 push %edx
11cef1: 50 push %eax
11cef2: 53 push %ebx
11cef3: e8 af 54 ff ff call 1123a7 <rtems_rfs_inode_close>
11cef8: 89 c7 mov %eax,%edi
11cefa: 83 c4 10 add $0x10,%esp
return rc;
}
11cefd: 89 f8 mov %edi,%eax
11ceff: 8d 65 f4 lea -0xc(%ebp),%esp
11cf02: 5b pop %ebx
11cf03: 5e pop %esi
11cf04: 5f pop %edi
11cf05: 5d pop %ebp
11cf06: c3 ret
0011d6f8 <rtems_rfs_mutex_create>:
RTEMS_INHERIT_PRIORITY | RTEMS_NO_PRIORITY_CEILING | RTEMS_LOCAL)
#endif
int
rtems_rfs_mutex_create (rtems_rfs_mutex* mutex)
{
11d6f8: 55 push %ebp
11d6f9: 89 e5 mov %esp,%ebp
11d6fb: 56 push %esi
11d6fc: 53 push %ebx
#if __rtems__
rtems_status_code sc;
sc = rtems_semaphore_create (rtems_build_name ('R', 'F', 'S', 'm'),
11d6fd: 83 ec 0c sub $0xc,%esp
11d700: ff 75 08 pushl 0x8(%ebp)
11d703: 6a 00 push $0x0
11d705: 6a 54 push $0x54
11d707: 6a 01 push $0x1
11d709: 68 6d 53 46 52 push $0x5246536d
11d70e: e8 55 03 ff ff call 10da68 <rtems_semaphore_create>
11d713: 89 c6 mov %eax,%esi
1, RTEMS_RFS_MUTEX_ATTRIBS, 0,
mutex);
if (sc != RTEMS_SUCCESSFUL)
11d715: 83 c4 20 add $0x20,%esp
printf ("rtems-rfs: mutex: open failed: %s\n",
rtems_status_text (sc));
return EIO;
}
#endif
return 0;
11d718: 31 db xor %ebx,%ebx
#if __rtems__
rtems_status_code sc;
sc = rtems_semaphore_create (rtems_build_name ('R', 'F', 'S', 'm'),
1, RTEMS_RFS_MUTEX_ATTRIBS, 0,
mutex);
if (sc != RTEMS_SUCCESSFUL)
11d71a: 85 c0 test %eax,%eax
11d71c: 74 2d je 11d74b <rtems_rfs_mutex_create+0x53><== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
11d71e: 50 push %eax <== NOT EXECUTED
11d71f: 50 push %eax <== NOT EXECUTED
11d720: 6a 00 push $0x0 <== NOT EXECUTED
11d722: 6a 04 push $0x4 <== NOT EXECUTED
11d724: e8 73 61 ff ff call 11389c <rtems_rfs_trace> <== NOT EXECUTED
11d729: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
printf ("rtems-rfs: mutex: open failed: %s\n",
rtems_status_text (sc));
return EIO;
11d72c: b3 05 mov $0x5,%bl <== NOT EXECUTED
sc = rtems_semaphore_create (rtems_build_name ('R', 'F', 'S', 'm'),
1, RTEMS_RFS_MUTEX_ATTRIBS, 0,
mutex);
if (sc != RTEMS_SUCCESSFUL)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
11d72e: 84 c0 test %al,%al <== NOT EXECUTED
11d730: 74 19 je 11d74b <rtems_rfs_mutex_create+0x53><== NOT EXECUTED
printf ("rtems-rfs: mutex: open failed: %s\n",
11d732: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11d735: 56 push %esi <== NOT EXECUTED
11d736: e8 e1 c5 fe ff call 109d1c <rtems_status_text> <== NOT EXECUTED
11d73b: 5a pop %edx <== NOT EXECUTED
11d73c: 59 pop %ecx <== NOT EXECUTED
11d73d: 50 push %eax <== NOT EXECUTED
11d73e: 68 77 21 13 00 push $0x132177 <== NOT EXECUTED
11d743: e8 f4 2b 00 00 call 12033c <printf> <== NOT EXECUTED
11d748: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_status_text (sc));
return EIO;
}
#endif
return 0;
}
11d74b: 89 d8 mov %ebx,%eax
11d74d: 8d 65 f8 lea -0x8(%ebp),%esp
11d750: 5b pop %ebx
11d751: 5e pop %esi
11d752: 5d pop %ebp
11d753: c3 ret
0011d754 <rtems_rfs_mutex_destroy>:
int
rtems_rfs_mutex_destroy (rtems_rfs_mutex* mutex)
{
11d754: 55 push %ebp
11d755: 89 e5 mov %esp,%ebp
11d757: 56 push %esi
11d758: 53 push %ebx
#if __rtems__
rtems_status_code sc;
sc = rtems_semaphore_delete (*mutex);
11d759: 83 ec 0c sub $0xc,%esp
11d75c: 8b 45 08 mov 0x8(%ebp),%eax
11d75f: ff 30 pushl (%eax)
11d761: e8 a2 04 ff ff call 10dc08 <rtems_semaphore_delete>
11d766: 89 c6 mov %eax,%esi
if (sc != RTEMS_SUCCESSFUL)
11d768: 83 c4 10 add $0x10,%esp
printf ("rtems-rfs: mutex: close failed: %s\n",
rtems_status_text (sc));
return EIO;
}
#endif
return 0;
11d76b: 31 db xor %ebx,%ebx
rtems_rfs_mutex_destroy (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc;
sc = rtems_semaphore_delete (*mutex);
if (sc != RTEMS_SUCCESSFUL)
11d76d: 85 c0 test %eax,%eax
11d76f: 74 2d je 11d79e <rtems_rfs_mutex_destroy+0x4a><== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
11d771: 50 push %eax <== NOT EXECUTED
11d772: 50 push %eax <== NOT EXECUTED
11d773: 6a 00 push $0x0 <== NOT EXECUTED
11d775: 6a 04 push $0x4 <== NOT EXECUTED
11d777: e8 20 61 ff ff call 11389c <rtems_rfs_trace> <== NOT EXECUTED
11d77c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
printf ("rtems-rfs: mutex: close failed: %s\n",
rtems_status_text (sc));
return EIO;
11d77f: b3 05 mov $0x5,%bl <== NOT EXECUTED
#if __rtems__
rtems_status_code sc;
sc = rtems_semaphore_delete (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
11d781: 84 c0 test %al,%al <== NOT EXECUTED
11d783: 74 19 je 11d79e <rtems_rfs_mutex_destroy+0x4a><== NOT EXECUTED
printf ("rtems-rfs: mutex: close failed: %s\n",
11d785: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11d788: 56 push %esi <== NOT EXECUTED
11d789: e8 8e c5 fe ff call 109d1c <rtems_status_text> <== NOT EXECUTED
11d78e: 5a pop %edx <== NOT EXECUTED
11d78f: 59 pop %ecx <== NOT EXECUTED
11d790: 50 push %eax <== NOT EXECUTED
11d791: 68 9a 21 13 00 push $0x13219a <== NOT EXECUTED
11d796: e8 a1 2b 00 00 call 12033c <printf> <== NOT EXECUTED
11d79b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_status_text (sc));
return EIO;
}
#endif
return 0;
}
11d79e: 89 d8 mov %ebx,%eax
11d7a0: 8d 65 f8 lea -0x8(%ebp),%esp
11d7a3: 5b pop %ebx
11d7a4: 5e pop %esi
11d7a5: 5d pop %ebp
11d7a6: c3 ret
0011dbf4 <rtems_rfs_mutex_lock.isra.0>:
* @param mutex The mutex to lock.
* @retval true The mutex is locked.
* @retval false The mutex could not be locked.
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
11dbf4: 55 push %ebp
11dbf5: 89 e5 mov %esp,%ebp
11dbf7: 56 push %esi
11dbf8: 53 push %ebx
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
11dbf9: 56 push %esi
11dbfa: 6a 00 push $0x0
11dbfc: 6a 00 push $0x0
11dbfe: 50 push %eax
11dbff: e8 94 00 ff ff call 10dc98 <rtems_semaphore_obtain>
11dc04: 89 c6 mov %eax,%esi
if (sc != RTEMS_SUCCESSFUL)
11dc06: 83 c4 10 add $0x10,%esp
rtems_status_text (sc));
#endif
return EIO;
}
#endif
return 0;
11dc09: 31 db xor %ebx,%ebx
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
11dc0b: 85 c0 test %eax,%eax
11dc0d: 74 32 je 11dc41 <rtems_rfs_mutex_lock.isra.0+0x4d><== ALWAYS TAKEN
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
11dc0f: 53 push %ebx <== NOT EXECUTED
11dc10: 53 push %ebx <== NOT EXECUTED
11dc11: 6a 00 push $0x0 <== NOT EXECUTED
11dc13: 6a 04 push $0x4 <== NOT EXECUTED
11dc15: e8 82 5c ff ff call 11389c <rtems_rfs_trace> <== NOT EXECUTED
11dc1a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
rtems_status_text (sc));
#endif
return EIO;
11dc1d: bb 05 00 00 00 mov $0x5,%ebx <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
11dc22: 84 c0 test %al,%al <== NOT EXECUTED
11dc24: 74 1b je 11dc41 <rtems_rfs_mutex_lock.isra.0+0x4d><== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
11dc26: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11dc29: 56 push %esi <== NOT EXECUTED
11dc2a: e8 ed c0 fe ff call 109d1c <rtems_status_text> <== NOT EXECUTED
11dc2f: 5a pop %edx <== NOT EXECUTED
11dc30: 59 pop %ecx <== NOT EXECUTED
11dc31: 50 push %eax <== NOT EXECUTED
11dc32: 68 d8 04 13 00 push $0x1304d8 <== NOT EXECUTED
11dc37: e8 00 27 00 00 call 12033c <printf> <== NOT EXECUTED
11dc3c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11dc3f: eb 00 jmp 11dc41 <rtems_rfs_mutex_lock.isra.0+0x4d><== NOT EXECUTED
#endif
return EIO;
}
#endif
return 0;
}
11dc41: 89 d8 mov %ebx,%eax
11dc43: 8d 65 f8 lea -0x8(%ebp),%esp
11dc46: 5b pop %ebx
11dc47: 5e pop %esi
11dc48: 5d pop %ebp
11dc49: c3 ret
0011d9ab <rtems_rfs_mutex_lock.isra.1>:
* @param mutex The mutex to lock.
* @retval true The mutex is locked.
* @retval false The mutex could not be locked.
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
11d9ab: 55 push %ebp
11d9ac: 89 e5 mov %esp,%ebp
11d9ae: 56 push %esi
11d9af: 53 push %ebx
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
11d9b0: 56 push %esi
11d9b1: 6a 00 push $0x0
11d9b3: 6a 00 push $0x0
11d9b5: 50 push %eax
11d9b6: e8 dd 02 ff ff call 10dc98 <rtems_semaphore_obtain>
11d9bb: 89 c6 mov %eax,%esi
if (sc != RTEMS_SUCCESSFUL)
11d9bd: 83 c4 10 add $0x10,%esp
rtems_status_text (sc));
#endif
return EIO;
}
#endif
return 0;
11d9c0: 31 db xor %ebx,%ebx
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
11d9c2: 85 c0 test %eax,%eax
11d9c4: 74 32 je 11d9f8 <rtems_rfs_mutex_lock.isra.1+0x4d><== ALWAYS TAKEN
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
11d9c6: 53 push %ebx <== NOT EXECUTED
11d9c7: 53 push %ebx <== NOT EXECUTED
11d9c8: 6a 00 push $0x0 <== NOT EXECUTED
11d9ca: 6a 04 push $0x4 <== NOT EXECUTED
11d9cc: e8 cb 5e ff ff call 11389c <rtems_rfs_trace> <== NOT EXECUTED
11d9d1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
rtems_status_text (sc));
#endif
return EIO;
11d9d4: bb 05 00 00 00 mov $0x5,%ebx <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
11d9d9: 84 c0 test %al,%al <== NOT EXECUTED
11d9db: 74 1b je 11d9f8 <rtems_rfs_mutex_lock.isra.1+0x4d><== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
11d9dd: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11d9e0: 56 push %esi <== NOT EXECUTED
11d9e1: e8 36 c3 fe ff call 109d1c <rtems_status_text> <== NOT EXECUTED
11d9e6: 5a pop %edx <== NOT EXECUTED
11d9e7: 59 pop %ecx <== NOT EXECUTED
11d9e8: 50 push %eax <== NOT EXECUTED
11d9e9: 68 d8 04 13 00 push $0x1304d8 <== NOT EXECUTED
11d9ee: e8 49 29 00 00 call 12033c <printf> <== NOT EXECUTED
11d9f3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11d9f6: eb 00 jmp 11d9f8 <rtems_rfs_mutex_lock.isra.1+0x4d><== NOT EXECUTED
#endif
return EIO;
}
#endif
return 0;
}
11d9f8: 89 d8 mov %ebx,%eax
11d9fa: 8d 65 f8 lea -0x8(%ebp),%esp
11d9fd: 5b pop %ebx
11d9fe: 5e pop %esi
11d9ff: 5d pop %ebp
11da00: c3 ret
001133c9 <rtems_rfs_mutex_lock.isra.21>:
* @param mutex The mutex to lock.
* @retval true The mutex is locked.
* @retval false The mutex could not be locked.
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
1133c9: 55 push %ebp
1133ca: 89 e5 mov %esp,%ebp
1133cc: 56 push %esi
1133cd: 53 push %ebx
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
1133ce: 53 push %ebx
1133cf: 6a 00 push $0x0
1133d1: 6a 00 push $0x0
1133d3: 50 push %eax
1133d4: e8 bf a8 ff ff call 10dc98 <rtems_semaphore_obtain>
1133d9: 89 c6 mov %eax,%esi
if (sc != RTEMS_SUCCESSFUL)
1133db: 83 c4 10 add $0x10,%esp
rtems_status_text (sc));
#endif
return EIO;
}
#endif
return 0;
1133de: 31 db xor %ebx,%ebx
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
1133e0: 85 c0 test %eax,%eax
1133e2: 74 32 je 113416 <rtems_rfs_mutex_lock.isra.21+0x4d><== ALWAYS TAKEN
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
1133e4: 51 push %ecx <== NOT EXECUTED
1133e5: 51 push %ecx <== NOT EXECUTED
1133e6: 6a 00 push $0x0 <== NOT EXECUTED
1133e8: 6a 04 push $0x4 <== NOT EXECUTED
1133ea: e8 ad 04 00 00 call 11389c <rtems_rfs_trace> <== NOT EXECUTED
1133ef: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
rtems_status_text (sc));
#endif
return EIO;
1133f2: bb 05 00 00 00 mov $0x5,%ebx <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
1133f7: 84 c0 test %al,%al <== NOT EXECUTED
1133f9: 74 1b je 113416 <rtems_rfs_mutex_lock.isra.21+0x4d><== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
1133fb: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1133fe: 56 push %esi <== NOT EXECUTED
1133ff: e8 18 69 ff ff call 109d1c <rtems_status_text> <== NOT EXECUTED
113404: 5e pop %esi <== NOT EXECUTED
113405: 5a pop %edx <== NOT EXECUTED
113406: 50 push %eax <== NOT EXECUTED
113407: 68 d8 04 13 00 push $0x1304d8 <== NOT EXECUTED
11340c: e8 2b cf 00 00 call 12033c <printf> <== NOT EXECUTED
113411: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
113414: eb 00 jmp 113416 <rtems_rfs_mutex_lock.isra.21+0x4d><== NOT EXECUTED
#endif
return EIO;
}
#endif
return 0;
}
113416: 89 d8 mov %ebx,%eax
113418: 8d 65 f8 lea -0x8(%ebp),%esp
11341b: 5b pop %ebx
11341c: 5e pop %esi
11341d: 5d pop %ebp
11341e: c3 ret
0011e78b <rtems_rfs_mutex_lock.isra.6>:
* @param mutex The mutex to lock.
* @retval true The mutex is locked.
* @retval false The mutex could not be locked.
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
11e78b: 55 push %ebp <== NOT EXECUTED
11e78c: 89 e5 mov %esp,%ebp <== NOT EXECUTED
11e78e: 56 push %esi <== NOT EXECUTED
11e78f: 53 push %ebx <== NOT EXECUTED
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
11e790: 56 push %esi <== NOT EXECUTED
11e791: 6a 00 push $0x0 <== NOT EXECUTED
11e793: 6a 00 push $0x0 <== NOT EXECUTED
11e795: 50 push %eax <== NOT EXECUTED
11e796: e8 15 b4 fe ff call 109bb0 <rtems_semaphore_obtain><== NOT EXECUTED
11e79b: 89 c6 mov %eax,%esi <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
11e79d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_status_text (sc));
#endif
return EIO;
}
#endif
return 0;
11e7a0: 31 db xor %ebx,%ebx <== NOT EXECUTED
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
11e7a2: 85 c0 test %eax,%eax <== NOT EXECUTED
11e7a4: 74 32 je 11e7d8 <rtems_rfs_mutex_lock.isra.6+0x4d><== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
11e7a6: 53 push %ebx <== NOT EXECUTED
11e7a7: 53 push %ebx <== NOT EXECUTED
11e7a8: 6a 00 push $0x0 <== NOT EXECUTED
11e7aa: 6a 04 push $0x4 <== NOT EXECUTED
11e7ac: e8 3b 0e 00 00 call 11f5ec <rtems_rfs_trace> <== NOT EXECUTED
11e7b1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
rtems_status_text (sc));
#endif
return EIO;
11e7b4: bb 05 00 00 00 mov $0x5,%ebx <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
11e7b9: 84 c0 test %al,%al <== NOT EXECUTED
11e7bb: 74 1b je 11e7d8 <rtems_rfs_mutex_lock.isra.6+0x4d><== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
11e7bd: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11e7c0: 56 push %esi <== NOT EXECUTED
11e7c1: e8 c2 7b fe ff call 106388 <rtems_status_text> <== NOT EXECUTED
11e7c6: 5a pop %edx <== NOT EXECUTED
11e7c7: 59 pop %ecx <== NOT EXECUTED
11e7c8: 50 push %eax <== NOT EXECUTED
11e7c9: 68 9d ee 14 00 push $0x14ee9d <== NOT EXECUTED
11e7ce: e8 6d 68 01 00 call 135040 <printf> <== NOT EXECUTED
11e7d3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11e7d6: eb 00 jmp 11e7d8 <rtems_rfs_mutex_lock.isra.6+0x4d><== NOT EXECUTED
#endif
return EIO;
}
#endif
return 0;
}
11e7d8: 89 d8 mov %ebx,%eax <== NOT EXECUTED
11e7da: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
11e7dd: 5b pop %ebx <== NOT EXECUTED
11e7de: 5e pop %esi <== NOT EXECUTED
11e7df: 5d pop %ebp <== NOT EXECUTED
11e7e0: c3 ret <== NOT EXECUTED
00113375 <rtems_rfs_mutex_unlock.isra.20>:
* @param mutex The mutex to unlock.
* @retval true The mutex is unlocked.
* @retval false The mutex could not be unlocked.
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
113375: 55 push %ebp
113376: 89 e5 mov %esp,%ebp
113378: 56 push %esi
113379: 53 push %ebx
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
11337a: 83 ec 0c sub $0xc,%esp
11337d: 50 push %eax
11337e: e8 05 aa ff ff call 10dd88 <rtems_semaphore_release>
113383: 89 c6 mov %eax,%esi
if (sc != RTEMS_SUCCESSFUL)
113385: 83 c4 10 add $0x10,%esp
rtems_status_text (sc));
#endif
return EIO;
}
#endif
return 0;
113388: 31 db xor %ebx,%ebx
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
11338a: 85 c0 test %eax,%eax
11338c: 74 32 je 1133c0 <rtems_rfs_mutex_unlock.isra.20+0x4b><== ALWAYS TAKEN
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
11338e: 53 push %ebx <== NOT EXECUTED
11338f: 53 push %ebx <== NOT EXECUTED
113390: 6a 00 push $0x0 <== NOT EXECUTED
113392: 6a 04 push $0x4 <== NOT EXECUTED
113394: e8 03 05 00 00 call 11389c <rtems_rfs_trace> <== NOT EXECUTED
113399: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
rtems_status_text (sc));
#endif
return EIO;
11339c: bb 05 00 00 00 mov $0x5,%ebx <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
1133a1: 84 c0 test %al,%al <== NOT EXECUTED
1133a3: 74 1b je 1133c0 <rtems_rfs_mutex_unlock.isra.20+0x4b><== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
1133a5: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1133a8: 56 push %esi <== NOT EXECUTED
1133a9: e8 6e 69 ff ff call 109d1c <rtems_status_text> <== NOT EXECUTED
1133ae: 5a pop %edx <== NOT EXECUTED
1133af: 59 pop %ecx <== NOT EXECUTED
1133b0: 50 push %eax <== NOT EXECUTED
1133b1: 68 b2 04 13 00 push $0x1304b2 <== NOT EXECUTED
1133b6: e8 81 cf 00 00 call 12033c <printf> <== NOT EXECUTED
1133bb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1133be: eb 00 jmp 1133c0 <rtems_rfs_mutex_unlock.isra.20+0x4b><== NOT EXECUTED
#endif
return EIO;
}
#endif
return 0;
}
1133c0: 89 d8 mov %ebx,%eax
1133c2: 8d 65 f8 lea -0x8(%ebp),%esp
1133c5: 5b pop %ebx
1133c6: 5e pop %esi
1133c7: 5d pop %ebp
1133c8: c3 ret
00119fcc <rtems_rfs_release_chain>:
static int
rtems_rfs_release_chain (rtems_chain_control* chain,
uint32_t* count,
bool modified)
{
119fcc: 55 push %ebp
119fcd: 89 e5 mov %esp,%ebp
119fcf: 57 push %edi
119fd0: 56 push %esi
119fd1: 53 push %ebx
119fd2: 83 ec 24 sub $0x24,%esp
119fd5: 89 c3 mov %eax,%ebx
119fd7: 89 d6 mov %edx,%esi
119fd9: 89 cf mov %ecx,%edi
rtems_rfs_buffer* buffer;
int rrc = 0;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
119fdb: 6a 00 push $0x0
119fdd: 68 80 00 00 00 push $0x80
119fe2: e8 b5 98 ff ff call 11389c <rtems_rfs_trace>
119fe7: 83 c4 10 add $0x10,%esp
119fea: 84 c0 test %al,%al
119fec: 74 11 je 119fff <rtems_rfs_release_chain+0x33><== ALWAYS TAKEN
printf ("rtems-rfs: release-chain: count=%" PRIu32 "\n", *count);
119fee: 50 push %eax <== NOT EXECUTED
119fef: 50 push %eax <== NOT EXECUTED
119ff0: ff 36 pushl (%esi) <== NOT EXECUTED
119ff2: 68 90 0d 13 00 push $0x130d90 <== NOT EXECUTED
119ff7: e8 40 63 00 00 call 12033c <printf> <== NOT EXECUTED
119ffc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
(*count)--;
buffer->user = (void*) 0;
rc = rtems_rfs_buffer_io_release (buffer, modified);
if ((rc > 0) && (rrc == 0))
119fff: 31 d2 xor %edx,%edx
11a001: 8d 4b 04 lea 0x4(%ebx),%ecx
buffer = (rtems_rfs_buffer*) rtems_chain_get (chain);
(*count)--;
buffer->user = (void*) 0;
rc = rtems_rfs_buffer_io_release (buffer, modified);
11a004: 81 e7 ff 00 00 00 and $0xff,%edi
11a00a: eb 34 jmp 11a040 <rtems_rfs_release_chain+0x74>
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
11a00c: 83 ec 0c sub $0xc,%esp
11a00f: 53 push %ebx
11a010: 89 55 e4 mov %edx,-0x1c(%ebp)
11a013: 89 4d e0 mov %ecx,-0x20(%ebp)
11a016: e8 35 45 ff ff call 10e550 <_Chain_Get>
printf ("rtems-rfs: release-chain: count=%" PRIu32 "\n", *count);
while (!rtems_chain_is_empty (chain))
{
buffer = (rtems_rfs_buffer*) rtems_chain_get (chain);
(*count)--;
11a01b: ff 0e decl (%esi)
buffer->user = (void*) 0;
11a01d: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax)
rc = rtems_rfs_buffer_io_release (buffer, modified);
11a024: 5a pop %edx
11a025: 59 pop %ecx
11a026: 57 push %edi
11a027: 50 push %eax
11a028: e8 8b 4c 00 00 call 11ecb8 <rtems_rfs_buffer_bdbuf_release>
if ((rc > 0) && (rrc == 0))
11a02d: 83 c4 10 add $0x10,%esp
11a030: 85 c0 test %eax,%eax
11a032: 8b 55 e4 mov -0x1c(%ebp),%edx
11a035: 8b 4d e0 mov -0x20(%ebp),%ecx
11a038: 7e 06 jle 11a040 <rtems_rfs_release_chain+0x74><== ALWAYS TAKEN
11a03a: 85 d2 test %edx,%edx <== NOT EXECUTED
11a03c: 75 02 jne 11a040 <rtems_rfs_release_chain+0x74><== NOT EXECUTED
11a03e: 89 c2 mov %eax,%edx <== NOT EXECUTED
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
printf ("rtems-rfs: release-chain: count=%" PRIu32 "\n", *count);
while (!rtems_chain_is_empty (chain))
11a040: 39 0b cmp %ecx,(%ebx)
11a042: 75 c8 jne 11a00c <rtems_rfs_release_chain+0x40>
rc = rtems_rfs_buffer_io_release (buffer, modified);
if ((rc > 0) && (rrc == 0))
rrc = rc;
}
return rrc;
}
11a044: 89 d0 mov %edx,%eax
11a046: 8d 65 f4 lea -0xc(%ebp),%esp
11a049: 5b pop %ebx
11a04a: 5e pop %esi
11a04b: 5f pop %edi
11a04c: 5d pop %ebp
11a04d: c3 ret
00112ce5 <rtems_rfs_rtems_chown>:
static int
rtems_rfs_rtems_chown (const rtems_filesystem_location_info_t *pathloc,
uid_t owner,
gid_t group)
{
112ce5: 55 push %ebp
112ce6: 89 e5 mov %esp,%ebp
112ce8: 57 push %edi
112ce9: 56 push %esi
112cea: 53 push %ebx
112ceb: 83 ec 5c sub $0x5c,%esp
112cee: 8b 45 08 mov 0x8(%ebp),%eax
112cf1: 8b 55 0c mov 0xc(%ebp),%edx
112cf4: 66 89 55 b6 mov %dx,-0x4a(%ebp)
112cf8: 8b 55 10 mov 0x10(%ebp),%edx
112cfb: 66 89 55 98 mov %dx,-0x68(%ebp)
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
112cff: 8b 50 14 mov 0x14(%eax),%edx
112d02: 8b 5a 08 mov 0x8(%edx),%ebx
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_CHOWN))
printf ("rtems-rfs-rtems: chown: in: ino:%" PRId32 " uid:%d gid:%d\n",
ino, owner, group);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
112d05: 6a 01 push $0x1
112d07: 8d 75 c0 lea -0x40(%ebp),%esi
112d0a: 56 push %esi
112d0b: ff 70 08 pushl 0x8(%eax)
112d0e: 53 push %ebx
112d0f: e8 16 f5 ff ff call 11222a <rtems_rfs_inode_open>
112d14: 89 c7 mov %eax,%edi
if (rc > 0)
112d16: 83 c4 10 add $0x10,%esp
112d19: 85 c0 test %eax,%eax
112d1b: 7e 0c jle 112d29 <rtems_rfs_rtems_chown+0x44><== ALWAYS TAKEN
{
return rtems_rfs_rtems_error ("chown: opening inode", rc);
112d1d: e8 aa c4 00 00 call 11f1cc <__errno> <== NOT EXECUTED
112d22: 89 38 mov %edi,(%eax) <== NOT EXECUTED
112d24: e9 8b 00 00 00 jmp 112db4 <rtems_rfs_rtems_chown+0xcf><== NOT EXECUTED
/*
* Verify I am the owner of the node or the super user.
*/
#if defined (RTEMS_POSIX_API)
uid = geteuid();
112d29: e8 82 37 00 00 call 1164b0 <geteuid>
if ((uid != rtems_rfs_inode_get_uid (&inode)) && (uid != 0))
112d2e: 8b 4d cc mov -0x34(%ebp),%ecx
* @return uint16_t The user id (uid).
*/
static inline uint16_t
rtems_rfs_inode_get_uid (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->owner) & 0xffff;
112d31: 0f b6 51 06 movzbl 0x6(%ecx),%edx
112d35: c1 e2 08 shl $0x8,%edx
112d38: 0f b6 79 07 movzbl 0x7(%ecx),%edi
112d3c: 09 fa or %edi,%edx
112d3e: 66 39 d0 cmp %dx,%ax
112d41: 74 1e je 112d61 <rtems_rfs_rtems_chown+0x7c><== ALWAYS TAKEN
112d43: 66 85 c0 test %ax,%ax <== NOT EXECUTED
112d46: 74 19 je 112d61 <rtems_rfs_rtems_chown+0x7c><== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
112d48: 51 push %ecx <== NOT EXECUTED
112d49: 51 push %ecx <== NOT EXECUTED
112d4a: 56 push %esi <== NOT EXECUTED
112d4b: 53 push %ebx <== NOT EXECUTED
112d4c: e8 56 f6 ff ff call 1123a7 <rtems_rfs_inode_close> <== NOT EXECUTED
return rtems_rfs_rtems_error ("chown: not able", EPERM);
112d51: e8 76 c4 00 00 call 11f1cc <__errno> <== NOT EXECUTED
112d56: c7 00 01 00 00 00 movl $0x1,(%eax) <== NOT EXECUTED
112d5c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
112d5f: eb 53 jmp 112db4 <rtems_rfs_rtems_chown+0xcf><== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_uid_gid (rtems_rfs_inode_handle* handle,
uint16_t uid, uint16_t gid)
{
rtems_rfs_write_u32 (&handle->node->owner, (((uint32_t) gid) << 16) | uid);
112d61: 8b 45 98 mov -0x68(%ebp),%eax
112d64: c1 e0 10 shl $0x10,%eax
112d67: 0f b7 55 b6 movzwl -0x4a(%ebp),%edx
112d6b: 09 d0 or %edx,%eax
112d6d: 89 c2 mov %eax,%edx
112d6f: c1 ea 18 shr $0x18,%edx
112d72: 88 51 04 mov %dl,0x4(%ecx)
112d75: 89 c1 mov %eax,%ecx
112d77: c1 e9 10 shr $0x10,%ecx
112d7a: 8b 55 cc mov -0x34(%ebp),%edx
112d7d: 88 4a 05 mov %cl,0x5(%edx)
112d80: c1 e8 08 shr $0x8,%eax
112d83: 8b 55 cc mov -0x34(%ebp),%edx
112d86: 88 42 06 mov %al,0x6(%edx)
112d89: 8b 45 cc mov -0x34(%ebp),%eax
112d8c: 8a 55 b6 mov -0x4a(%ebp),%dl
112d8f: 88 50 07 mov %dl,0x7(%eax)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
112d92: c6 45 d0 01 movb $0x1,-0x30(%ebp)
}
#endif
rtems_rfs_inode_set_uid_gid (&inode, owner, group);
rc = rtems_rfs_inode_close (fs, &inode);
112d96: 52 push %edx
112d97: 52 push %edx
112d98: 8d 45 c0 lea -0x40(%ebp),%eax
112d9b: 50 push %eax
112d9c: 53 push %ebx
112d9d: e8 05 f6 ff ff call 1123a7 <rtems_rfs_inode_close>
112da2: 89 c3 mov %eax,%ebx
if (rc)
112da4: 83 c4 10 add $0x10,%esp
{
return rtems_rfs_rtems_error ("chown: closing inode", rc);
}
return 0;
112da7: 31 c0 xor %eax,%eax
#endif
rtems_rfs_inode_set_uid_gid (&inode, owner, group);
rc = rtems_rfs_inode_close (fs, &inode);
if (rc)
112da9: 85 db test %ebx,%ebx
112dab: 74 0a je 112db7 <rtems_rfs_rtems_chown+0xd2><== ALWAYS TAKEN
{
return rtems_rfs_rtems_error ("chown: closing inode", rc);
112dad: e8 1a c4 00 00 call 11f1cc <__errno> <== NOT EXECUTED
112db2: 89 18 mov %ebx,(%eax) <== NOT EXECUTED
112db4: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
}
return 0;
}
112db7: 8d 65 f4 lea -0xc(%ebp),%esp
112dba: 5b pop %ebx
112dbb: 5e pop %esi
112dbc: 5f pop %edi
112dbd: 5d pop %ebp
112dbe: c3 ret
0011d806 <rtems_rfs_rtems_device_close>:
* @return int
*/
static int
rtems_rfs_rtems_device_close (rtems_libio_t* iop)
{
11d806: 55 push %ebp <== NOT EXECUTED
11d807: 89 e5 mov %esp,%ebp <== NOT EXECUTED
11d809: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11d80c: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
rtems_device_major_number major;
rtems_device_minor_number minor;
rtems_rfs_rtems_device_get_major_and_minor (iop, &major, &minor);
return rtems_deviceio_close (iop, major, minor);
11d80f: ff 70 2c pushl 0x2c(%eax) <== NOT EXECUTED
11d812: ff 70 28 pushl 0x28(%eax) <== NOT EXECUTED
11d815: 50 push %eax <== NOT EXECUTED
11d816: e8 b6 0c 00 00 call 11e4d1 <rtems_deviceio_close> <== NOT EXECUTED
}
11d81b: c9 leave <== NOT EXECUTED
11d81c: c3 ret <== NOT EXECUTED
0011d7a8 <rtems_rfs_rtems_device_ftruncate>:
* @return int
*/
static int
rtems_rfs_rtems_device_ftruncate (rtems_libio_t* iop, off_t length)
{
11d7a8: 55 push %ebp <== NOT EXECUTED
11d7a9: 89 e5 mov %esp,%ebp <== NOT EXECUTED
return 0;
}
11d7ab: 31 c0 xor %eax,%eax <== NOT EXECUTED
11d7ad: 5d pop %ebp <== NOT EXECUTED
11d7ae: c3 ret <== NOT EXECUTED
0011d7af <rtems_rfs_rtems_device_ioctl>:
static int
rtems_rfs_rtems_device_ioctl (rtems_libio_t* iop,
ioctl_command_t command,
void* buffer)
{
11d7af: 55 push %ebp <== NOT EXECUTED
11d7b0: 89 e5 mov %esp,%ebp <== NOT EXECUTED
11d7b2: 83 ec 14 sub $0x14,%esp <== NOT EXECUTED
11d7b5: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
rtems_device_major_number major;
rtems_device_minor_number minor;
rtems_rfs_rtems_device_get_major_and_minor (iop, &major, &minor);
return rtems_deviceio_control (iop, command, buffer, major, minor);
11d7b8: ff 70 2c pushl 0x2c(%eax) <== NOT EXECUTED
11d7bb: ff 70 28 pushl 0x28(%eax) <== NOT EXECUTED
11d7be: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED
11d7c1: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
11d7c4: 50 push %eax <== NOT EXECUTED
11d7c5: e8 0c 0e 00 00 call 11e5d6 <rtems_deviceio_control><== NOT EXECUTED
}
11d7ca: c9 leave <== NOT EXECUTED
11d7cb: c3 ret <== NOT EXECUTED
0011d89c <rtems_rfs_rtems_device_open>:
static int
rtems_rfs_rtems_device_open ( rtems_libio_t *iop,
const char *pathname,
int oflag,
mode_t mode)
{
11d89c: 55 push %ebp <== NOT EXECUTED
11d89d: 89 e5 mov %esp,%ebp <== NOT EXECUTED
11d89f: 57 push %edi <== NOT EXECUTED
11d8a0: 56 push %esi <== NOT EXECUTED
11d8a1: 53 push %ebx <== NOT EXECUTED
11d8a2: 83 ec 50 sub $0x50,%esp <== NOT EXECUTED
11d8a5: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (&iop->pathinfo);
11d8a8: 8b 46 24 mov 0x24(%esi),%eax <== NOT EXECUTED
11d8ab: 8b 58 08 mov 0x8(%eax),%ebx <== NOT EXECUTED
rtems_rfs_ino ino = rtems_rfs_rtems_get_iop_ino (iop);
11d8ae: 8b 46 18 mov 0x18(%esi),%eax <== NOT EXECUTED
11d8b1: 89 45 b4 mov %eax,-0x4c(%ebp) <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
11d8b4: 6a 00 push $0x0 <== NOT EXECUTED
11d8b6: 6a 00 push $0x0 <== NOT EXECUTED
.fstat_h = rtems_rfs_rtems_fstat,
.ftruncate_h = rtems_rfs_rtems_device_ftruncate,
.fsync_h = rtems_filesystem_default_fsync_or_fdatasync,
.fdatasync_h = rtems_filesystem_default_fsync_or_fdatasync,
.fcntl_h = rtems_filesystem_default_fcntl
};
11d8b8: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax <== NOT EXECUTED
11d8be: ff 30 pushl (%eax) <== NOT EXECUTED
11d8c0: e8 d3 03 ff ff call 10dc98 <rtems_semaphore_obtain><== NOT EXECUTED
11d8c5: 89 c7 mov %eax,%edi <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
11d8c7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11d8ca: 85 c0 test %eax,%eax <== NOT EXECUTED
11d8cc: 74 2b je 11d8f9 <rtems_rfs_rtems_device_open+0x5d><== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
11d8ce: 51 push %ecx <== NOT EXECUTED
11d8cf: 51 push %ecx <== NOT EXECUTED
11d8d0: 6a 00 push $0x0 <== NOT EXECUTED
11d8d2: 6a 04 push $0x4 <== NOT EXECUTED
11d8d4: e8 c3 5f ff ff call 11389c <rtems_rfs_trace> <== NOT EXECUTED
11d8d9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11d8dc: 84 c0 test %al,%al <== NOT EXECUTED
11d8de: 74 19 je 11d8f9 <rtems_rfs_rtems_device_open+0x5d><== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
11d8e0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11d8e3: 57 push %edi <== NOT EXECUTED
11d8e4: e8 33 c4 fe ff call 109d1c <rtems_status_text> <== NOT EXECUTED
11d8e9: 5f pop %edi <== NOT EXECUTED
11d8ea: 5a pop %edx <== NOT EXECUTED
11d8eb: 50 push %eax <== NOT EXECUTED
11d8ec: 68 d8 04 13 00 push $0x1304d8 <== NOT EXECUTED
11d8f1: e8 46 2a 00 00 call 12033c <printf> <== NOT EXECUTED
11d8f6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_device_minor_number minor;
int rc;
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
11d8f9: 6a 01 push $0x1 <== NOT EXECUTED
11d8fb: 8d 7d c0 lea -0x40(%ebp),%edi <== NOT EXECUTED
11d8fe: 57 push %edi <== NOT EXECUTED
11d8ff: ff 75 b4 pushl -0x4c(%ebp) <== NOT EXECUTED
11d902: 53 push %ebx <== NOT EXECUTED
11d903: e8 22 49 ff ff call 11222a <rtems_rfs_inode_open> <== NOT EXECUTED
11d908: 89 c2 mov %eax,%edx <== NOT EXECUTED
if (rc > 0)
11d90a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11d90d: 85 c0 test %eax,%eax <== NOT EXECUTED
11d90f: 7e 16 jle 11d927 <rtems_rfs_rtems_device_open+0x8b><== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
11d911: 89 d8 mov %ebx,%eax <== NOT EXECUTED
11d913: 89 55 ac mov %edx,-0x54(%ebp) <== NOT EXECUTED
11d916: e8 2d ff ff ff call 11d848 <rtems_rfs_rtems_unlock><== NOT EXECUTED
return rtems_rfs_rtems_error ("device_open: opening inode", rc);
11d91b: e8 ac 18 00 00 call 11f1cc <__errno> <== NOT EXECUTED
11d920: 8b 55 ac mov -0x54(%ebp),%edx <== NOT EXECUTED
11d923: 89 10 mov %edx,(%eax) <== NOT EXECUTED
11d925: eb 44 jmp 11d96b <rtems_rfs_rtems_device_open+0xcf><== NOT EXECUTED
}
major = rtems_rfs_inode_get_block (&inode, 0);
11d927: 8b 4d cc mov -0x34(%ebp),%ecx <== NOT EXECUTED
11d92a: 31 d2 xor %edx,%edx <== NOT EXECUTED
11d92c: 89 c8 mov %ecx,%eax <== NOT EXECUTED
11d92e: 89 4d ac mov %ecx,-0x54(%ebp) <== NOT EXECUTED
11d931: e8 e7 fe ff ff call 11d81d <rtems_rfs_inode_get_block.isra.0><== NOT EXECUTED
11d936: 89 45 b4 mov %eax,-0x4c(%ebp) <== NOT EXECUTED
minor = rtems_rfs_inode_get_block (&inode, 1);
11d939: ba 01 00 00 00 mov $0x1,%edx <== NOT EXECUTED
11d93e: 8b 4d ac mov -0x54(%ebp),%ecx <== NOT EXECUTED
11d941: 89 c8 mov %ecx,%eax <== NOT EXECUTED
11d943: e8 d5 fe ff ff call 11d81d <rtems_rfs_inode_get_block.isra.0><== NOT EXECUTED
11d948: 89 45 b0 mov %eax,-0x50(%ebp) <== NOT EXECUTED
rc = rtems_rfs_inode_close (fs, &inode);
11d94b: 51 push %ecx <== NOT EXECUTED
11d94c: 51 push %ecx <== NOT EXECUTED
11d94d: 57 push %edi <== NOT EXECUTED
11d94e: 53 push %ebx <== NOT EXECUTED
11d94f: e8 53 4a ff ff call 1123a7 <rtems_rfs_inode_close> <== NOT EXECUTED
11d954: 89 c7 mov %eax,%edi <== NOT EXECUTED
if (rc > 0)
11d956: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
11d959: 89 d8 mov %ebx,%eax <== NOT EXECUTED
major = rtems_rfs_inode_get_block (&inode, 0);
minor = rtems_rfs_inode_get_block (&inode, 1);
rc = rtems_rfs_inode_close (fs, &inode);
if (rc > 0)
11d95b: 85 ff test %edi,%edi <== NOT EXECUTED
11d95d: 7e 11 jle 11d970 <rtems_rfs_rtems_device_open+0xd4><== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
11d95f: e8 e4 fe ff ff call 11d848 <rtems_rfs_rtems_unlock><== NOT EXECUTED
return rtems_rfs_rtems_error ("device_open: closing inode", rc);
11d964: e8 63 18 00 00 call 11f1cc <__errno> <== NOT EXECUTED
11d969: 89 38 mov %edi,(%eax) <== NOT EXECUTED
11d96b: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
11d96e: eb 29 jmp 11d999 <rtems_rfs_rtems_device_open+0xfd><== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
11d970: e8 d3 fe ff ff call 11d848 <rtems_rfs_rtems_unlock><== NOT EXECUTED
iop->data0 = major;
11d975: 8b 45 b4 mov -0x4c(%ebp),%eax <== NOT EXECUTED
11d978: 89 46 28 mov %eax,0x28(%esi) <== NOT EXECUTED
iop->data1 = (void *) minor;
11d97b: 8b 45 b0 mov -0x50(%ebp),%eax <== NOT EXECUTED
11d97e: 89 46 2c mov %eax,0x2c(%esi) <== NOT EXECUTED
return rtems_deviceio_open (iop, pathname, oflag, mode, minor, major);
11d981: 52 push %edx <== NOT EXECUTED
11d982: 52 push %edx <== NOT EXECUTED
11d983: ff 75 b4 pushl -0x4c(%ebp) <== NOT EXECUTED
11d986: 50 push %eax <== NOT EXECUTED
11d987: ff 75 14 pushl 0x14(%ebp) <== NOT EXECUTED
11d98a: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED
11d98d: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
11d990: 56 push %esi <== NOT EXECUTED
11d991: e8 0a 0b 00 00 call 11e4a0 <rtems_deviceio_open> <== NOT EXECUTED
11d996: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
}
11d999: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
11d99c: 5b pop %ebx <== NOT EXECUTED
11d99d: 5e pop %esi <== NOT EXECUTED
11d99e: 5f pop %edi <== NOT EXECUTED
11d99f: 5d pop %ebp <== NOT EXECUTED
11d9a0: c3 ret <== NOT EXECUTED
0011d7e9 <rtems_rfs_rtems_device_read>:
* @return ssize_t
*/
static ssize_t
rtems_rfs_rtems_device_read (rtems_libio_t* iop, void* buffer, size_t count)
{
11d7e9: 55 push %ebp <== NOT EXECUTED
11d7ea: 89 e5 mov %esp,%ebp <== NOT EXECUTED
11d7ec: 83 ec 14 sub $0x14,%esp <== NOT EXECUTED
11d7ef: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
rtems_device_major_number major;
rtems_device_minor_number minor;
rtems_rfs_rtems_device_get_major_and_minor (iop, &major, &minor);
return rtems_deviceio_read (iop, buffer, count, major, minor);
11d7f2: ff 70 2c pushl 0x2c(%eax) <== NOT EXECUTED
11d7f5: ff 70 28 pushl 0x28(%eax) <== NOT EXECUTED
11d7f8: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED
11d7fb: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
11d7fe: 50 push %eax <== NOT EXECUTED
11d7ff: e8 00 0d 00 00 call 11e504 <rtems_deviceio_read> <== NOT EXECUTED
}
11d804: c9 leave <== NOT EXECUTED
11d805: c3 ret <== NOT EXECUTED
0011d7cc <rtems_rfs_rtems_device_write>:
static ssize_t
rtems_rfs_rtems_device_write (rtems_libio_t* iop,
const void* buffer,
size_t count)
{
11d7cc: 55 push %ebp <== NOT EXECUTED
11d7cd: 89 e5 mov %esp,%ebp <== NOT EXECUTED
11d7cf: 83 ec 14 sub $0x14,%esp <== NOT EXECUTED
11d7d2: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
rtems_device_major_number major;
rtems_device_minor_number minor;
rtems_rfs_rtems_device_get_major_and_minor (iop, &major, &minor);
return rtems_deviceio_write (iop, buffer, count, major, minor);
11d7d5: ff 70 2c pushl 0x2c(%eax) <== NOT EXECUTED
11d7d8: ff 70 28 pushl 0x28(%eax) <== NOT EXECUTED
11d7db: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED
11d7de: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
11d7e1: 50 push %eax <== NOT EXECUTED
11d7e2: e8 86 0d 00 00 call 11e56d <rtems_deviceio_write> <== NOT EXECUTED
}
11d7e7: c9 leave <== NOT EXECUTED
11d7e8: c3 ret <== NOT EXECUTED
0011db3e <rtems_rfs_rtems_dir_open>:
static int
rtems_rfs_rtems_dir_open (rtems_libio_t* iop,
const char* pathname,
int oflag,
mode_t mode)
{
11db3e: 55 push %ebp
11db3f: 89 e5 mov %esp,%ebp
11db41: 57 push %edi
11db42: 56 push %esi
11db43: 53 push %ebx
11db44: 83 ec 4c sub $0x4c,%esp
11db47: 8b 7d 08 mov 0x8(%ebp),%edi
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (&iop->pathinfo);
11db4a: 8b 47 24 mov 0x24(%edi),%eax
11db4d: 8b 58 08 mov 0x8(%eax),%ebx
rtems_rfs_ino ino = rtems_rfs_rtems_get_iop_ino (iop);
11db50: 8b 57 18 mov 0x18(%edi),%edx
.fstat_h = rtems_rfs_rtems_fstat,
.ftruncate_h = rtems_filesystem_default_ftruncate_directory,
.fsync_h = rtems_filesystem_default_fsync_or_fdatasync,
.fdatasync_h = rtems_rfs_rtems_fdatasync,
.fcntl_h = rtems_filesystem_default_fcntl
};
11db53: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax
11db59: 8b 00 mov (%eax),%eax
11db5b: 89 55 b4 mov %edx,-0x4c(%ebp)
11db5e: e8 48 fe ff ff call 11d9ab <rtems_rfs_mutex_lock.isra.1>
rtems_rfs_inode_handle inode;
int rc;
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
11db63: 6a 01 push $0x1
11db65: 8d 75 c0 lea -0x40(%ebp),%esi
11db68: 56 push %esi
11db69: 8b 55 b4 mov -0x4c(%ebp),%edx
11db6c: 52 push %edx
11db6d: 53 push %ebx
11db6e: e8 b7 46 ff ff call 11222a <rtems_rfs_inode_open>
11db73: 89 c2 mov %eax,%edx
if (rc)
11db75: 83 c4 10 add $0x10,%esp
11db78: 85 c0 test %eax,%eax
11db7a: 74 16 je 11db92 <rtems_rfs_rtems_dir_open+0x54><== ALWAYS TAKEN
{
rtems_rfs_rtems_unlock (fs);
11db7c: 89 d8 mov %ebx,%eax <== NOT EXECUTED
11db7e: 89 55 b4 mov %edx,-0x4c(%ebp) <== NOT EXECUTED
11db81: e8 7b fe ff ff call 11da01 <rtems_rfs_rtems_unlock><== NOT EXECUTED
return rtems_rfs_rtems_error ("dir_open: opening inode", rc);
11db86: e8 41 16 00 00 call 11f1cc <__errno> <== NOT EXECUTED
11db8b: 8b 55 b4 mov -0x4c(%ebp),%edx <== NOT EXECUTED
11db8e: 89 10 mov %edx,(%eax) <== NOT EXECUTED
11db90: eb 32 jmp 11dbc4 <rtems_rfs_rtems_dir_open+0x86><== NOT EXECUTED
}
if (!RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)))
11db92: 8b 45 cc mov -0x34(%ebp),%eax
* @return uint16_t The mode.
*/
static inline uint16_t
rtems_rfs_inode_get_mode (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->mode);
11db95: 0f b6 40 02 movzbl 0x2(%eax),%eax
11db99: c1 e0 08 shl $0x8,%eax
11db9c: 66 25 00 f0 and $0xf000,%ax
11dba0: 66 3d 00 40 cmp $0x4000,%ax
11dba4: 74 23 je 11dbc9 <rtems_rfs_rtems_dir_open+0x8b><== ALWAYS TAKEN
{
rtems_rfs_inode_close (fs, &inode);
11dba6: 57 push %edi <== NOT EXECUTED
11dba7: 57 push %edi <== NOT EXECUTED
11dba8: 56 push %esi <== NOT EXECUTED
11dba9: 53 push %ebx <== NOT EXECUTED
11dbaa: e8 f8 47 ff ff call 1123a7 <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
11dbaf: 89 d8 mov %ebx,%eax <== NOT EXECUTED
11dbb1: e8 4b fe ff ff call 11da01 <rtems_rfs_rtems_unlock><== NOT EXECUTED
return rtems_rfs_rtems_error ("dir_open: not dir", ENOTDIR);
11dbb6: e8 11 16 00 00 call 11f1cc <__errno> <== NOT EXECUTED
11dbbb: c7 00 14 00 00 00 movl $0x14,(%eax) <== NOT EXECUTED
11dbc1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11dbc4: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
11dbc7: eb 23 jmp 11dbec <rtems_rfs_rtems_dir_open+0xae><== NOT EXECUTED
}
iop->offset = 0;
11dbc9: c7 47 04 00 00 00 00 movl $0x0,0x4(%edi)
11dbd0: c7 47 08 00 00 00 00 movl $0x0,0x8(%edi)
rtems_rfs_inode_close (fs, &inode);
11dbd7: 51 push %ecx
11dbd8: 51 push %ecx
11dbd9: 56 push %esi
11dbda: 53 push %ebx
11dbdb: e8 c7 47 ff ff call 1123a7 <rtems_rfs_inode_close>
rtems_rfs_rtems_unlock (fs);
11dbe0: 89 d8 mov %ebx,%eax
11dbe2: e8 1a fe ff ff call 11da01 <rtems_rfs_rtems_unlock>
11dbe7: 83 c4 10 add $0x10,%esp
return 0;
11dbea: 31 c0 xor %eax,%eax
}
11dbec: 8d 65 f4 lea -0xc(%ebp),%esp
11dbef: 5b pop %ebx
11dbf0: 5e pop %esi
11dbf1: 5f pop %edi
11dbf2: 5d pop %ebp
11dbf3: c3 ret
0011da55 <rtems_rfs_rtems_dir_read>:
*/
static ssize_t
rtems_rfs_rtems_dir_read (rtems_libio_t* iop,
void* buffer,
size_t count)
{
11da55: 55 push %ebp
11da56: 89 e5 mov %esp,%ebp
11da58: 57 push %edi
11da59: 56 push %esi
11da5a: 53 push %ebx
11da5b: 83 ec 4c sub $0x4c,%esp
11da5e: 8b 75 08 mov 0x8(%ebp),%esi
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (&iop->pathinfo);
11da61: 8b 46 24 mov 0x24(%esi),%eax
11da64: 8b 58 08 mov 0x8(%eax),%ebx
rtems_rfs_ino ino = rtems_rfs_rtems_get_iop_ino (iop);
11da67: 8b 56 18 mov 0x18(%esi),%edx
.fstat_h = rtems_rfs_rtems_fstat,
.ftruncate_h = rtems_filesystem_default_ftruncate_directory,
.fsync_h = rtems_filesystem_default_fsync_or_fdatasync,
.fdatasync_h = rtems_rfs_rtems_fdatasync,
.fcntl_h = rtems_filesystem_default_fcntl
};
11da6a: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax
*/
static inline void
rtems_rfs_rtems_lock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
rtems_rfs_mutex_lock (&rtems->access);
11da70: 8b 00 mov (%eax),%eax
11da72: 89 55 ac mov %edx,-0x54(%ebp)
11da75: e8 31 ff ff ff call 11d9ab <rtems_rfs_mutex_lock.isra.1>
count = count / sizeof (struct dirent);
dirent = buffer;
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
11da7a: 6a 01 push $0x1
11da7c: 8d 7d c0 lea -0x40(%ebp),%edi
11da7f: 57 push %edi
11da80: 8b 55 ac mov -0x54(%ebp),%edx
11da83: 52 push %edx
11da84: 53 push %ebx
11da85: e8 a0 47 ff ff call 11222a <rtems_rfs_inode_open>
11da8a: 89 c2 mov %eax,%edx
if (rc)
11da8c: 83 c4 10 add $0x10,%esp
11da8f: 85 c0 test %eax,%eax
11da91: 74 61 je 11daf4 <rtems_rfs_rtems_dir_read+0x9f><== ALWAYS TAKEN
{
rtems_rfs_rtems_unlock (fs);
11da93: 89 d8 mov %ebx,%eax <== NOT EXECUTED
11da95: 89 55 ac mov %edx,-0x54(%ebp) <== NOT EXECUTED
11da98: e8 64 ff ff ff call 11da01 <rtems_rfs_rtems_unlock><== NOT EXECUTED
return rtems_rfs_rtems_error ("dir_read: read inode", rc);
11da9d: e8 2a 17 00 00 call 11f1cc <__errno> <== NOT EXECUTED
11daa2: 8b 55 ac mov -0x54(%ebp),%edx <== NOT EXECUTED
11daa5: 89 10 mov %edx,(%eax) <== NOT EXECUTED
11daa7: 83 cf ff or $0xffffffff,%edi <== NOT EXECUTED
11daaa: e9 85 00 00 00 jmp 11db34 <rtems_rfs_rtems_dir_read+0xdf><== NOT EXECUTED
bytes_transferred = 0;
for (d = 0; d < count; d++, dirent++)
{
size_t size;
rc = rtems_rfs_dir_read (fs, &inode, iop->offset, dirent, &size);
11daaf: 52 push %edx
11dab0: 52 push %edx
11dab1: 8d 55 bc lea -0x44(%ebp),%edx
11dab4: 52 push %edx
11dab5: 50 push %eax
11dab6: ff 76 08 pushl 0x8(%esi)
11dab9: ff 76 04 pushl 0x4(%esi)
11dabc: 8d 45 c0 lea -0x40(%ebp),%eax
11dabf: 50 push %eax
11dac0: 53 push %ebx
11dac1: e8 5c d9 ff ff call 11b422 <rtems_rfs_dir_read>
if (rc == ENOENT)
11dac6: 83 c4 20 add $0x20,%esp
11dac9: 83 f8 02 cmp $0x2,%eax
11dacc: 74 50 je 11db1e <rtems_rfs_rtems_dir_read+0xc9>
{
rc = 0;
break;
}
if (rc > 0)
11dace: 85 c0 test %eax,%eax
11dad0: 7e 12 jle 11dae4 <rtems_rfs_rtems_dir_read+0x8f><== ALWAYS TAKEN
{
bytes_transferred = rtems_rfs_rtems_error ("dir_read: dir read", rc);
11dad2: 89 45 ac mov %eax,-0x54(%ebp) <== NOT EXECUTED
11dad5: e8 f2 16 00 00 call 11f1cc <__errno> <== NOT EXECUTED
11dada: 8b 4d ac mov -0x54(%ebp),%ecx <== NOT EXECUTED
11dadd: 89 08 mov %ecx,(%eax) <== NOT EXECUTED
11dadf: 83 cf ff or $0xffffffff,%edi <== NOT EXECUTED
11dae2: eb 3a jmp 11db1e <rtems_rfs_rtems_dir_read+0xc9><== NOT EXECUTED
break;
}
iop->offset += size;
11dae4: 8b 45 bc mov -0x44(%ebp),%eax
11dae7: 31 d2 xor %edx,%edx
11dae9: 01 46 04 add %eax,0x4(%esi)
11daec: 11 56 08 adc %edx,0x8(%esi)
return rtems_rfs_rtems_error ("dir_read: read inode", rc);
}
bytes_transferred = 0;
for (d = 0; d < count; d++, dirent++)
11daef: ff 45 b4 incl -0x4c(%ebp)
11daf2: eb 16 jmp 11db0a <rtems_rfs_rtems_dir_read+0xb5>
struct dirent* dirent;
ssize_t bytes_transferred;
int d;
int rc;
count = count / sizeof (struct dirent);
11daf4: b9 10 01 00 00 mov $0x110,%ecx
11daf9: 8b 45 10 mov 0x10(%ebp),%eax
11dafc: 31 d2 xor %edx,%edx
11dafe: f7 f1 div %ecx
11db00: 89 45 b0 mov %eax,-0x50(%ebp)
* exisiting file, the remaining entries will be placed in the buffer and the
* returned value will be equal to -m actual- times the size of a directory
* entry.
*/
static ssize_t
rtems_rfs_rtems_dir_read (rtems_libio_t* iop,
11db03: c7 45 b4 00 00 00 00 movl $0x0,-0x4c(%ebp)
11db0a: 69 7d b4 10 01 00 00 imul $0x110,-0x4c(%ebp),%edi
11db11: 8b 45 0c mov 0xc(%ebp),%eax
11db14: 01 f8 add %edi,%eax
return rtems_rfs_rtems_error ("dir_read: read inode", rc);
}
bytes_transferred = 0;
for (d = 0; d < count; d++, dirent++)
11db16: 8b 55 b0 mov -0x50(%ebp),%edx
11db19: 39 55 b4 cmp %edx,-0x4c(%ebp)
11db1c: 75 91 jne 11daaf <rtems_rfs_rtems_dir_read+0x5a>
}
iop->offset += size;
bytes_transferred += sizeof (struct dirent);
}
rtems_rfs_inode_close (fs, &inode);
11db1e: 50 push %eax
11db1f: 50 push %eax
11db20: 8d 45 c0 lea -0x40(%ebp),%eax
11db23: 50 push %eax
11db24: 53 push %ebx
11db25: e8 7d 48 ff ff call 1123a7 <rtems_rfs_inode_close>
rtems_rfs_rtems_unlock (fs);
11db2a: 89 d8 mov %ebx,%eax
11db2c: e8 d0 fe ff ff call 11da01 <rtems_rfs_rtems_unlock>
11db31: 83 c4 10 add $0x10,%esp
return bytes_transferred;
}
11db34: 89 f8 mov %edi,%eax
11db36: 8d 65 f4 lea -0xc(%ebp),%esp
11db39: 5b pop %ebx
11db3a: 5e pop %esi
11db3b: 5f pop %edi
11db3c: 5d pop %ebp
11db3d: c3 ret
0011300e <rtems_rfs_rtems_eval_path>:
.eval_token = rtems_rfs_rtems_eval_token
};
static void
rtems_rfs_rtems_eval_path (rtems_filesystem_eval_path_context_t *ctx)
{
11300e: 55 push %ebp
11300f: 89 e5 mov %esp,%ebp
113011: 57 push %edi
113012: 56 push %esi
113013: 53 push %ebx
113014: 83 ec 4c sub $0x4c,%esp
113017: 8b 5d 08 mov 0x8(%ebp),%ebx
rtems_filesystem_location_info_t *currentloc =
rtems_filesystem_eval_path_get_currentloc (ctx);
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (currentloc);
11301a: 8b 43 2c mov 0x2c(%ebx),%eax
11301d: 8b 78 08 mov 0x8(%eax),%edi
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (currentloc);
rtems_rfs_inode_handle inode;
int rc;
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
113020: 6a 01 push $0x1
113022: 8d 75 c0 lea -0x40(%ebp),%esi
113025: 56 push %esi
113026: ff 73 20 pushl 0x20(%ebx)
113029: 57 push %edi
11302a: e8 fb f1 ff ff call 11222a <rtems_rfs_inode_open>
if (rc == 0) {
11302f: 83 c4 10 add $0x10,%esp
113032: 85 c0 test %eax,%eax
113034: 75 28 jne 11305e <rtems_rfs_rtems_eval_path+0x50><== NEVER TAKEN
rtems_filesystem_eval_path_generic (
113036: 50 push %eax
113037: 68 b4 05 13 00 push $0x1305b4
11303c: 56 push %esi
11303d: 53 push %ebx
11303e: e8 b5 37 00 00 call 1167f8 <rtems_filesystem_eval_path_generic>
ctx,
&inode,
&rtems_rfs_rtems_eval_config
);
rc = rtems_rfs_inode_close (fs, &inode);
113043: 58 pop %eax
113044: 5a pop %edx
113045: 56 push %esi
113046: 57 push %edi
113047: e8 5b f3 ff ff call 1123a7 <rtems_rfs_inode_close>
11304c: 89 c6 mov %eax,%esi
if (rc != 0) {
11304e: 83 c4 10 add $0x10,%esp
113051: 85 c0 test %eax,%eax
113053: 74 23 je 113078 <rtems_rfs_rtems_eval_path+0x6a><== ALWAYS TAKEN
rtems_filesystem_eval_path_error (
ctx,
rtems_rfs_rtems_error ("eval_path: closing inode", rc)
113055: e8 72 c1 00 00 call 11f1cc <__errno> <== NOT EXECUTED
11305a: 89 30 mov %esi,(%eax) <== NOT EXECUTED
11305c: eb 0d jmp 11306b <rtems_rfs_rtems_eval_path+0x5d><== NOT EXECUTED
);
}
} else {
rtems_filesystem_eval_path_error (
ctx,
rtems_rfs_rtems_error ("eval_path: opening inode", rc)
11305e: 89 45 b4 mov %eax,-0x4c(%ebp) <== NOT EXECUTED
113061: e8 66 c1 00 00 call 11f1cc <__errno> <== NOT EXECUTED
113066: 8b 55 b4 mov -0x4c(%ebp),%edx <== NOT EXECUTED
113069: 89 10 mov %edx,(%eax) <== NOT EXECUTED
ctx,
rtems_rfs_rtems_error ("eval_path: closing inode", rc)
);
}
} else {
rtems_filesystem_eval_path_error (
11306b: 50 push %eax <== NOT EXECUTED
11306c: 50 push %eax <== NOT EXECUTED
11306d: 6a ff push $0xffffffff <== NOT EXECUTED
11306f: 53 push %ebx <== NOT EXECUTED
113070: e8 49 82 ff ff call 10b2be <rtems_filesystem_eval_path_error><== NOT EXECUTED
113075: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
ctx,
rtems_rfs_rtems_error ("eval_path: opening inode", rc)
);
}
}
113078: 8d 65 f4 lea -0xc(%ebp),%esp
11307b: 5b pop %ebx
11307c: 5e pop %esi
11307d: 5f pop %edi
11307e: 5d pop %ebp
11307f: c3 ret
001135d4 <rtems_rfs_rtems_eval_token>:
rtems_filesystem_eval_path_context_t *ctx,
void *arg,
const char *token,
size_t tokenlen
)
{
1135d4: 55 push %ebp
1135d5: 89 e5 mov %esp,%ebp
1135d7: 57 push %edi
1135d8: 56 push %esi
1135d9: 53 push %ebx
1135da: 83 ec 38 sub $0x38,%esp
1135dd: 8b 5d 08 mov 0x8(%ebp),%ebx
1135e0: 8b 75 0c mov 0xc(%ebp),%esi
/* FIXME: Return value? */
rtems_rfs_fs_close(fs);
rtems_rfs_mutex_destroy (&rtems->access);
free (rtems);
}
1135e3: 8b 56 0c mov 0xc(%esi),%edx
* @return uint16_t The group id (gid).
*/
static inline uint16_t
rtems_rfs_inode_get_gid (rtems_rfs_inode_handle* handle)
{
return (rtems_rfs_read_u32 (&handle->node->owner) >> 16) & 0xffff;
1135e6: 0f b6 42 04 movzbl 0x4(%edx),%eax
1135ea: c1 e0 18 shl $0x18,%eax
1135ed: 0f b6 4a 05 movzbl 0x5(%edx),%ecx
1135f1: c1 e1 10 shl $0x10,%ecx
1135f4: 09 c8 or %ecx,%eax
1135f6: c1 e8 10 shr $0x10,%eax
static bool
rtems_rfs_rtems_eval_perms (rtems_filesystem_eval_path_context_t *ctx,
int eval_flags,
rtems_rfs_inode_handle* inode)
{
return rtems_filesystem_eval_path_check_access(
1135f9: 50 push %eax
* @return uint16_t The user id (uid).
*/
static inline uint16_t
rtems_rfs_inode_get_uid (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->owner) & 0xffff;
1135fa: 0f b6 42 06 movzbl 0x6(%edx),%eax
1135fe: c1 e0 08 shl $0x8,%eax
113601: 0f b6 4a 07 movzbl 0x7(%edx),%ecx
113605: 09 c8 or %ecx,%eax
113607: 0f b7 c0 movzwl %ax,%eax
11360a: 50 push %eax
* @return uint16_t The mode.
*/
static inline uint16_t
rtems_rfs_inode_get_mode (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->mode);
11360b: 0f b6 4a 02 movzbl 0x2(%edx),%ecx
11360f: c1 e1 08 shl $0x8,%ecx
113612: 0f b6 42 03 movzbl 0x3(%edx),%eax
113616: 09 c8 or %ecx,%eax
113618: 0f b7 c0 movzwl %ax,%eax
11361b: 50 push %eax
11361c: 6a 01 push $0x1
11361e: 53 push %ebx
11361f: e8 99 31 00 00 call 1167bd <rtems_filesystem_eval_path_check_access>
rtems_filesystem_eval_path_generic_status status =
RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_DONE;
rtems_rfs_inode_handle* inode = arg;
bool access_ok = rtems_rfs_rtems_eval_perms (ctx, RTEMS_FS_PERMS_EXEC, inode);
if (access_ok) {
113624: 83 c4 20 add $0x20,%esp
void *arg,
const char *token,
size_t tokenlen
)
{
rtems_filesystem_eval_path_generic_status status =
113627: ba 01 00 00 00 mov $0x1,%edx
RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_DONE;
rtems_rfs_inode_handle* inode = arg;
bool access_ok = rtems_rfs_rtems_eval_perms (ctx, RTEMS_FS_PERMS_EXEC, inode);
if (access_ok) {
11362c: 84 c0 test %al,%al
11362e: 0f 84 6b 01 00 00 je 11379f <rtems_rfs_rtems_eval_token+0x1cb>
static inline bool rtems_filesystem_is_current_directory(
const char *token,
size_t tokenlen
)
{
return tokenlen == 1 && token [0] == '.';
113634: 31 c0 xor %eax,%eax
113636: 83 7d 14 01 cmpl $0x1,0x14(%ebp)
11363a: 75 0c jne 113648 <rtems_rfs_rtems_eval_token+0x74>
11363c: 8b 45 10 mov 0x10(%ebp),%eax
11363f: 80 38 2e cmpb $0x2e,(%eax)
113642: 0f 94 c0 sete %al
113645: 0f b6 c0 movzbl %al,%eax
if (rtems_filesystem_is_current_directory (token, tokenlen)) {
113648: 85 c0 test %eax,%eax
11364a: 74 0c je 113658 <rtems_rfs_rtems_eval_token+0x84>
static inline void rtems_filesystem_eval_path_clear_token(
rtems_filesystem_eval_path_context_t *ctx
)
{
ctx->tokenlen = 0;
11364c: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
113653: e9 dd 00 00 00 jmp 113735 <rtems_rfs_rtems_eval_token+0x161>
rtems_filesystem_eval_path_clear_token (ctx);
} else {
rtems_filesystem_location_info_t *currentloc =
rtems_filesystem_eval_path_get_currentloc( ctx );
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (currentloc);
113658: 8b 43 2c mov 0x2c(%ebx),%eax
11365b: 8b 78 08 mov 0x8(%eax),%edi
rtems_rfs_ino entry_ino;
uint32_t entry_doff;
int rc = rtems_rfs_dir_lookup_ino (
11365e: 50 push %eax
11365f: 50 push %eax
113660: 8d 45 e0 lea -0x20(%ebp),%eax
113663: 50 push %eax
113664: 8d 45 dc lea -0x24(%ebp),%eax
113667: 50 push %eax
113668: ff 75 14 pushl 0x14(%ebp)
11366b: ff 75 10 pushl 0x10(%ebp)
11366e: 56 push %esi
11366f: 57 push %edi
113670: e8 4b 72 00 00 call 11a8c0 <rtems_rfs_dir_lookup_ino>
tokenlen,
&entry_ino,
&entry_doff
);
if (rc == 0) {
113675: 83 c4 20 add $0x20,%esp
* rtems_rfs_rtems_eval_path().
*/
memset (inode, 0, sizeof(*inode));
}
} else {
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY;
113678: ba 02 00 00 00 mov $0x2,%edx
tokenlen,
&entry_ino,
&entry_doff
);
if (rc == 0) {
11367d: 85 c0 test %eax,%eax
11367f: 0f 85 1a 01 00 00 jne 11379f <rtems_rfs_rtems_eval_token+0x1cb>
rc = rtems_rfs_inode_close (fs, inode);
113685: 50 push %eax
113686: 50 push %eax
113687: 56 push %esi
113688: 57 push %edi
113689: e8 19 ed ff ff call 1123a7 <rtems_rfs_inode_close>
if (rc == 0) {
11368e: 83 c4 10 add $0x10,%esp
113691: 85 c0 test %eax,%eax
113693: 74 10 je 1136a5 <rtems_rfs_rtems_eval_token+0xd1><== ALWAYS TAKEN
if (rc != 0) {
/*
* This prevents the rtems_rfs_inode_close() from doing something in
* rtems_rfs_rtems_eval_path().
*/
memset (inode, 0, sizeof(*inode));
113695: b9 0a 00 00 00 mov $0xa,%ecx <== NOT EXECUTED
11369a: 31 c0 xor %eax,%eax <== NOT EXECUTED
11369c: 89 f7 mov %esi,%edi <== NOT EXECUTED
11369e: f3 ab rep stos %eax,%es:(%edi) <== NOT EXECUTED
1136a0: e9 90 00 00 00 jmp 113735 <rtems_rfs_rtems_eval_token+0x161><== NOT EXECUTED
);
if (rc == 0) {
rc = rtems_rfs_inode_close (fs, inode);
if (rc == 0) {
rc = rtems_rfs_inode_open (fs, entry_ino, inode, true);
1136a5: 6a 01 push $0x1
1136a7: 56 push %esi
1136a8: ff 75 dc pushl -0x24(%ebp)
1136ab: 57 push %edi
1136ac: e8 79 eb ff ff call 11222a <rtems_rfs_inode_open>
}
if (rc != 0) {
1136b1: 83 c4 10 add $0x10,%esp
1136b4: 85 c0 test %eax,%eax
1136b6: 0f 84 9b 00 00 00 je 113757 <rtems_rfs_rtems_eval_token+0x183><== ALWAYS TAKEN
1136bc: eb d7 jmp 113695 <rtems_rfs_rtems_eval_token+0xc1><== NOT EXECUTED
bool follow_sym_link = (eval_flags & RTEMS_FS_FOLLOW_SYM_LINK) != 0;
bool terminal = !rtems_filesystem_eval_path_has_path (ctx);
rtems_filesystem_eval_path_clear_token (ctx);
if (is_sym_link && (follow_sym_link || !terminal)) {
1136be: 84 c9 test %cl,%cl
1136c0: 74 04 je 1136c6 <rtems_rfs_rtems_eval_token+0xf2>
1136c2: 84 d2 test %dl,%dl
1136c4: 74 76 je 11373c <rtems_rfs_rtems_eval_token+0x168>
rtems_rfs_rtems_follow_link (ctx, fs, entry_ino);
1136c6: 8b 55 dc mov -0x24(%ebp),%edx
rtems_filesystem_eval_path_context_t* ctx,
rtems_rfs_file_system* fs,
rtems_rfs_ino ino
)
{
size_t len = MAXPATHLEN;
1136c9: c7 45 e4 00 04 00 00 movl $0x400,-0x1c(%ebp)
char *link = malloc(len + 1);
1136d0: 83 ec 0c sub $0xc,%esp
1136d3: 68 01 04 00 00 push $0x401
1136d8: 89 55 d4 mov %edx,-0x2c(%ebp)
1136db: e8 20 6d ff ff call 10a400 <malloc>
1136e0: 89 c6 mov %eax,%esi
if (link != NULL) {
1136e2: 83 c4 10 add $0x10,%esp
1136e5: 85 c0 test %eax,%eax
1136e7: 8b 55 d4 mov -0x2c(%ebp),%edx
1136ea: 74 3c je 113728 <rtems_rfs_rtems_eval_token+0x154><== NEVER TAKEN
int rc = rtems_rfs_symlink_read (fs, ino, link, len, &len);
1136ec: 83 ec 0c sub $0xc,%esp
1136ef: 8d 45 e4 lea -0x1c(%ebp),%eax
1136f2: 50 push %eax
1136f3: 68 00 04 00 00 push $0x400
1136f8: 56 push %esi
1136f9: 52 push %edx
1136fa: 57 push %edi
1136fb: e8 1c 9e 00 00 call 11d51c <rtems_rfs_symlink_read>
if (rc == 0) {
113700: 83 c4 20 add $0x20,%esp
113703: 85 c0 test %eax,%eax
113705: 75 0d jne 113714 <rtems_rfs_rtems_eval_token+0x140><== NEVER TAKEN
rtems_filesystem_eval_path_recursive (ctx, link, len);
113707: 50 push %eax
113708: ff 75 e4 pushl -0x1c(%ebp)
11370b: 56 push %esi
11370c: 53 push %ebx
11370d: e8 48 7f ff ff call 10b65a <rtems_filesystem_eval_path_recursive>
113712: eb 0a jmp 11371e <rtems_rfs_rtems_eval_token+0x14a>
} else {
rtems_filesystem_eval_path_error (ctx, 0);
113714: 57 push %edi <== NOT EXECUTED
113715: 57 push %edi <== NOT EXECUTED
113716: 6a 00 push $0x0 <== NOT EXECUTED
113718: 53 push %ebx <== NOT EXECUTED
113719: e8 a0 7b ff ff call 10b2be <rtems_filesystem_eval_path_error><== NOT EXECUTED
}
free(link);
11371e: 89 34 24 mov %esi,(%esp)
113721: e8 c2 67 ff ff call 109ee8 <free>
113726: eb 0a jmp 113732 <rtems_rfs_rtems_eval_token+0x15e>
} else {
rtems_filesystem_eval_path_error (ctx, ENOMEM);
113728: 51 push %ecx <== NOT EXECUTED
113729: 51 push %ecx <== NOT EXECUTED
11372a: 6a 0c push $0xc <== NOT EXECUTED
11372c: 53 push %ebx <== NOT EXECUTED
11372d: e8 8c 7b ff ff call 10b2be <rtems_filesystem_eval_path_error><== NOT EXECUTED
113732: 83 c4 10 add $0x10,%esp
void *arg,
const char *token,
size_t tokenlen
)
{
rtems_filesystem_eval_path_generic_status status =
113735: ba 01 00 00 00 mov $0x1,%edx
11373a: eb 63 jmp 11379f <rtems_rfs_rtems_eval_token+0x1cb>
rtems_filesystem_eval_path_clear_token (ctx);
if (is_sym_link && (follow_sym_link || !terminal)) {
rtems_rfs_rtems_follow_link (ctx, fs, entry_ino);
} else {
rc = rtems_rfs_rtems_set_handlers (currentloc, inode) ? 0 : EIO;
11373c: 52 push %edx
11373d: 52 push %edx
11373e: 56 push %esi
if (access_ok) {
if (rtems_filesystem_is_current_directory (token, tokenlen)) {
rtems_filesystem_eval_path_clear_token (ctx);
} else {
rtems_filesystem_location_info_t *currentloc =
11373f: 8d 43 18 lea 0x18(%ebx),%eax
rtems_filesystem_eval_path_clear_token (ctx);
if (is_sym_link && (follow_sym_link || !terminal)) {
rtems_rfs_rtems_follow_link (ctx, fs, entry_ino);
} else {
rc = rtems_rfs_rtems_set_handlers (currentloc, inode) ? 0 : EIO;
113742: 50 push %eax
113743: 88 4d d4 mov %cl,-0x2c(%ebp)
113746: e8 b5 00 00 00 call 113800 <rtems_rfs_rtems_set_handlers>
11374b: 83 c4 10 add $0x10,%esp
11374e: 84 c0 test %al,%al
113750: 8a 4d d4 mov -0x2c(%ebp),%cl
113753: 75 3b jne 113790 <rtems_rfs_rtems_eval_token+0x1bc><== ALWAYS TAKEN
113755: eb 28 jmp 11377f <rtems_rfs_rtems_eval_token+0x1ab><== NOT EXECUTED
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY;
rc = -1;
}
if (rc == 0) {
bool is_sym_link = rtems_rfs_rtems_node_type_by_inode (inode)
113757: 89 f0 mov %esi,%eax
113759: e8 b1 f2 ff ff call 112a0f <rtems_rfs_rtems_node_type_by_inode>
== RTEMS_FILESYSTEM_SYM_LINK;
int eval_flags = rtems_filesystem_eval_path_get_flags (ctx);
bool follow_sym_link = (eval_flags & RTEMS_FS_FOLLOW_SYM_LINK) != 0;
11375e: 8b 53 10 mov 0x10(%ebx),%edx
113761: c1 ea 04 shr $0x4,%edx
113764: 83 e2 01 and $0x1,%edx
bool terminal = !rtems_filesystem_eval_path_has_path (ctx);
113767: 83 7b 04 00 cmpl $0x0,0x4(%ebx)
11376b: 0f 94 c1 sete %cl
11376e: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
rtems_filesystem_eval_path_clear_token (ctx);
if (is_sym_link && (follow_sym_link || !terminal)) {
113775: 83 f8 03 cmp $0x3,%eax
113778: 75 c2 jne 11373c <rtems_rfs_rtems_eval_token+0x168>
11377a: e9 3f ff ff ff jmp 1136be <rtems_rfs_rtems_eval_token+0xea>
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_CONTINUE;
}
} else {
rtems_filesystem_eval_path_error (
ctx,
rtems_rfs_rtems_error ("eval_path: set handlers", rc)
11377f: e8 48 ba 00 00 call 11f1cc <__errno> <== NOT EXECUTED
113784: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
if (!terminal) {
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_CONTINUE;
}
} else {
rtems_filesystem_eval_path_error (
11378a: 50 push %eax <== NOT EXECUTED
11378b: 50 push %eax <== NOT EXECUTED
11378c: 6a ff push $0xffffffff <== NOT EXECUTED
11378e: eb 9c jmp 11372c <rtems_rfs_rtems_eval_token+0x158><== NOT EXECUTED
if (is_sym_link && (follow_sym_link || !terminal)) {
rtems_rfs_rtems_follow_link (ctx, fs, entry_ino);
} else {
rc = rtems_rfs_rtems_set_handlers (currentloc, inode) ? 0 : EIO;
if (rc == 0) {
rtems_rfs_rtems_set_pathloc_ino (currentloc, entry_ino);
113790: 8b 45 dc mov -0x24(%ebp),%eax
113793: 89 43 20 mov %eax,0x20(%ebx)
rtems_rfs_rtems_set_pathloc_doff (currentloc, entry_doff);
113796: 8b 45 e0 mov -0x20(%ebp),%eax
113799: 89 43 24 mov %eax,0x24(%ebx)
void *arg,
const char *token,
size_t tokenlen
)
{
rtems_filesystem_eval_path_generic_status status =
11379c: 0f b6 d1 movzbl %cl,%edx
}
}
}
return status;
}
11379f: 89 d0 mov %edx,%eax
1137a1: 8d 65 f4 lea -0xc(%ebp),%esp
1137a4: 5b pop %ebx
1137a5: 5e pop %esi
1137a6: 5f pop %edi
1137a7: 5d pop %ebp
1137a8: c3 ret
00112dbf <rtems_rfs_rtems_fchmod>:
}
static int
rtems_rfs_rtems_fchmod (const rtems_filesystem_location_info_t* pathloc,
mode_t mode)
{
112dbf: 55 push %ebp
112dc0: 89 e5 mov %esp,%ebp
112dc2: 57 push %edi
112dc3: 56 push %esi
112dc4: 53 push %ebx
112dc5: 83 ec 4c sub $0x4c,%esp
112dc8: 8b 45 08 mov 0x8(%ebp),%eax
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
112dcb: 8b 50 14 mov 0x14(%eax),%edx
112dce: 8b 5a 08 mov 0x8(%edx),%ebx
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FCHMOD))
printf ("rtems-rfs-rtems: fchmod: in: ino:%" PRId32 " mode:%06" PRIomode_t "\n",
ino, mode);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
112dd1: 6a 01 push $0x1
112dd3: 8d 75 c0 lea -0x40(%ebp),%esi
112dd6: 56 push %esi
112dd7: ff 70 08 pushl 0x8(%eax)
112dda: 53 push %ebx
112ddb: e8 4a f4 ff ff call 11222a <rtems_rfs_inode_open>
112de0: 89 c7 mov %eax,%edi
if (rc)
112de2: 83 c4 10 add $0x10,%esp
112de5: 85 c0 test %eax,%eax
112de7: 74 0c je 112df5 <rtems_rfs_rtems_fchmod+0x36><== ALWAYS TAKEN
{
return rtems_rfs_rtems_error ("fchmod: opening inode", rc);
112de9: e8 de c3 00 00 call 11f1cc <__errno> <== NOT EXECUTED
112dee: 89 38 mov %edi,(%eax) <== NOT EXECUTED
112df0: e9 8d 00 00 00 jmp 112e82 <rtems_rfs_rtems_fchmod+0xc3><== NOT EXECUTED
}
imode = rtems_rfs_inode_get_mode (&inode);
112df5: 8b 55 cc mov -0x34(%ebp),%edx
* @return uint16_t The mode.
*/
static inline uint16_t
rtems_rfs_inode_get_mode (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->mode);
112df8: 0f b6 42 02 movzbl 0x2(%edx),%eax
112dfc: c1 e0 08 shl $0x8,%eax
112dff: 0f b6 52 03 movzbl 0x3(%edx),%edx
112e03: 09 c2 or %eax,%edx
112e05: 66 89 55 b4 mov %dx,-0x4c(%ebp)
/*
* Verify I am the owner of the node or the super user.
*/
#if defined (RTEMS_POSIX_API)
uid = geteuid();
112e09: e8 a2 36 00 00 call 1164b0 <geteuid>
if ((uid != rtems_rfs_inode_get_uid (&inode)) && (uid != 0))
112e0e: 8b 4d cc mov -0x34(%ebp),%ecx
* @return uint16_t The user id (uid).
*/
static inline uint16_t
rtems_rfs_inode_get_uid (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->owner) & 0xffff;
112e11: 0f b6 51 06 movzbl 0x6(%ecx),%edx
112e15: c1 e2 08 shl $0x8,%edx
112e18: 0f b6 79 07 movzbl 0x7(%ecx),%edi
112e1c: 09 fa or %edi,%edx
112e1e: 66 39 d0 cmp %dx,%ax
112e21: 74 1e je 112e41 <rtems_rfs_rtems_fchmod+0x82><== ALWAYS TAKEN
112e23: 66 85 c0 test %ax,%ax <== NOT EXECUTED
112e26: 74 19 je 112e41 <rtems_rfs_rtems_fchmod+0x82><== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
112e28: 57 push %edi <== NOT EXECUTED
112e29: 57 push %edi <== NOT EXECUTED
112e2a: 56 push %esi <== NOT EXECUTED
112e2b: 53 push %ebx <== NOT EXECUTED
112e2c: e8 76 f5 ff ff call 1123a7 <rtems_rfs_inode_close> <== NOT EXECUTED
return rtems_rfs_rtems_error ("fchmod: checking uid", EPERM);
112e31: e8 96 c3 00 00 call 11f1cc <__errno> <== NOT EXECUTED
112e36: c7 00 01 00 00 00 movl $0x1,(%eax) <== NOT EXECUTED
112e3c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
112e3f: eb 41 jmp 112e82 <rtems_rfs_rtems_fchmod+0xc3><== NOT EXECUTED
}
#endif
imode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
112e41: 8b 45 b4 mov -0x4c(%ebp),%eax
112e44: 66 25 00 f0 and $0xf000,%ax
imode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
112e48: 8b 55 0c mov 0xc(%ebp),%edx
112e4b: 81 e2 ff 0f 00 00 and $0xfff,%edx
112e51: 09 d0 or %edx,%eax
* @prarm mode The mode.
*/
static inline void
rtems_rfs_inode_set_mode (rtems_rfs_inode_handle* handle, uint16_t mode)
{
rtems_rfs_write_u16 (&handle->node->mode, mode);
112e53: 89 c2 mov %eax,%edx
112e55: 66 c1 ea 08 shr $0x8,%dx
112e59: 88 51 02 mov %dl,0x2(%ecx)
112e5c: 8b 55 cc mov -0x34(%ebp),%edx
112e5f: 88 42 03 mov %al,0x3(%edx)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
112e62: c6 45 d0 01 movb $0x1,-0x30(%ebp)
rtems_rfs_inode_set_mode (&inode, imode);
rc = rtems_rfs_inode_close (fs, &inode);
112e66: 56 push %esi
112e67: 56 push %esi
112e68: 8d 45 c0 lea -0x40(%ebp),%eax
112e6b: 50 push %eax
112e6c: 53 push %ebx
112e6d: e8 35 f5 ff ff call 1123a7 <rtems_rfs_inode_close>
112e72: 89 c3 mov %eax,%ebx
if (rc > 0)
112e74: 83 c4 10 add $0x10,%esp
112e77: 85 c0 test %eax,%eax
112e79: 7e 0c jle 112e87 <rtems_rfs_rtems_fchmod+0xc8><== ALWAYS TAKEN
{
return rtems_rfs_rtems_error ("fchmod: closing inode", rc);
112e7b: e8 4c c3 00 00 call 11f1cc <__errno> <== NOT EXECUTED
112e80: 89 18 mov %ebx,(%eax) <== NOT EXECUTED
112e82: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
112e85: eb 02 jmp 112e89 <rtems_rfs_rtems_fchmod+0xca><== NOT EXECUTED
}
return 0;
112e87: 31 c0 xor %eax,%eax
}
112e89: 8d 65 f4 lea -0xc(%ebp),%esp
112e8c: 5b pop %ebx
112e8d: 5e pop %esi
112e8e: 5f pop %edi
112e8f: 5d pop %ebp
112e90: c3 ret
001137d0 <rtems_rfs_rtems_fdatasync>:
* @param iop
* @return int
*/
int
rtems_rfs_rtems_fdatasync (rtems_libio_t* iop)
{
1137d0: 55 push %ebp <== NOT EXECUTED
1137d1: 89 e5 mov %esp,%ebp <== NOT EXECUTED
1137d3: 53 push %ebx <== NOT EXECUTED
1137d4: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED
int rc;
rc = rtems_rfs_buffer_sync (rtems_rfs_rtems_pathloc_dev (&iop->pathinfo));
1137d7: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
1137da: 8b 40 24 mov 0x24(%eax),%eax <== NOT EXECUTED
1137dd: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED
1137e0: e8 30 6e 00 00 call 11a615 <rtems_rfs_buffer_sync> <== NOT EXECUTED
1137e5: 89 c3 mov %eax,%ebx <== NOT EXECUTED
if (rc)
1137e7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
return rtems_rfs_rtems_error ("fdatasync: sync", rc);
return 0;
1137ea: 31 c0 xor %eax,%eax <== NOT EXECUTED
rtems_rfs_rtems_fdatasync (rtems_libio_t* iop)
{
int rc;
rc = rtems_rfs_buffer_sync (rtems_rfs_rtems_pathloc_dev (&iop->pathinfo));
if (rc)
1137ec: 85 db test %ebx,%ebx <== NOT EXECUTED
1137ee: 74 0a je 1137fa <rtems_rfs_rtems_fdatasync+0x2a><== NOT EXECUTED
return rtems_rfs_rtems_error ("fdatasync: sync", rc);
1137f0: e8 d7 b9 00 00 call 11f1cc <__errno> <== NOT EXECUTED
1137f5: 89 18 mov %ebx,(%eax) <== NOT EXECUTED
1137f7: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
return 0;
}
1137fa: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
1137fd: c9 leave <== NOT EXECUTED
1137fe: c3 ret <== NOT EXECUTED
0011ddb5 <rtems_rfs_rtems_file_close>:
* @param iop
* @return int
*/
static int
rtems_rfs_rtems_file_close (rtems_libio_t* iop)
{
11ddb5: 55 push %ebp
11ddb6: 89 e5 mov %esp,%ebp
11ddb8: 56 push %esi
11ddb9: 53 push %ebx
rtems_rfs_file_handle* file = rtems_rfs_rtems_get_iop_file_handle (iop);
11ddba: 8b 45 08 mov 0x8(%ebp),%eax
11ddbd: 8b 58 1c mov 0x1c(%eax),%ebx
rtems_rfs_file_system* fs = rtems_rfs_file_fs (file);
11ddc0: 8b 43 1c mov 0x1c(%ebx),%eax
11ddc3: 8b b0 98 00 00 00 mov 0x98(%eax),%esi
.fstat_h = rtems_rfs_rtems_fstat,
.ftruncate_h = rtems_rfs_rtems_file_ftruncate,
.fsync_h = rtems_rfs_rtems_fdatasync,
.fdatasync_h = rtems_rfs_rtems_fdatasync,
.fcntl_h = rtems_filesystem_default_fcntl
};
11ddc9: 8b 86 80 00 00 00 mov 0x80(%esi),%eax
11ddcf: 8b 00 mov (%eax),%eax
11ddd1: e8 1e fe ff ff call 11dbf4 <rtems_rfs_mutex_lock.isra.0>
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_CLOSE))
printf("rtems-rfs: file-close: handle:%p\n", file);
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_file_close (fs, file);
11ddd6: 50 push %eax
11ddd7: 50 push %eax
11ddd8: 53 push %ebx
11ddd9: 56 push %esi
11ddda: e8 81 db ff ff call 11b960 <rtems_rfs_file_close>
11dddf: 89 c3 mov %eax,%ebx
if (rc > 0)
11dde1: 83 c4 10 add $0x10,%esp
11dde4: 85 c0 test %eax,%eax
11dde6: 7e 0a jle 11ddf2 <rtems_rfs_rtems_file_close+0x3d><== ALWAYS TAKEN
rc = rtems_rfs_rtems_error ("file-close: file close", rc);
11dde8: e8 df 13 00 00 call 11f1cc <__errno> <== NOT EXECUTED
11dded: 89 18 mov %ebx,(%eax) <== NOT EXECUTED
11ddef: 83 cb ff or $0xffffffff,%ebx <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
11ddf2: 89 f0 mov %esi,%eax
11ddf4: e8 51 fe ff ff call 11dc4a <rtems_rfs_rtems_unlock>
return rc;
}
11ddf9: 89 d8 mov %ebx,%eax
11ddfb: 8d 65 f8 lea -0x8(%ebp),%esp
11ddfe: 5b pop %ebx
11ddff: 5e pop %esi
11de00: 5d pop %ebp
11de01: c3 ret
0011de63 <rtems_rfs_rtems_file_ftruncate>:
* @return int
*/
static int
rtems_rfs_rtems_file_ftruncate (rtems_libio_t* iop,
off_t length)
{
11de63: 55 push %ebp
11de64: 89 e5 mov %esp,%ebp
11de66: 57 push %edi
11de67: 56 push %esi
11de68: 53 push %ebx
11de69: 83 ec 0c sub $0xc,%esp
11de6c: 8b 75 0c mov 0xc(%ebp),%esi
11de6f: 8b 7d 10 mov 0x10(%ebp),%edi
rtems_rfs_file_handle* file = rtems_rfs_rtems_get_iop_file_handle (iop);
11de72: 8b 45 08 mov 0x8(%ebp),%eax
11de75: 8b 58 1c mov 0x1c(%eax),%ebx
int rc;
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_FTRUNC))
printf("rtems-rfs: file-ftrunc: handle:%p length:%" PRIdoff_t "\n", file, length);
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
11de78: 8b 43 1c mov 0x1c(%ebx),%eax
.fstat_h = rtems_rfs_rtems_fstat,
.ftruncate_h = rtems_rfs_rtems_file_ftruncate,
.fsync_h = rtems_rfs_rtems_fdatasync,
.fdatasync_h = rtems_rfs_rtems_fdatasync,
.fcntl_h = rtems_filesystem_default_fcntl
};
11de7b: 8b 80 98 00 00 00 mov 0x98(%eax),%eax
11de81: 8b 80 80 00 00 00 mov 0x80(%eax),%eax
11de87: 8b 00 mov (%eax),%eax
11de89: e8 66 fd ff ff call 11dbf4 <rtems_rfs_mutex_lock.isra.0>
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_FTRUNC))
printf("rtems-rfs: file-ftrunc: handle:%p length:%" PRIdoff_t "\n", file, length);
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
rc = rtems_rfs_file_set_size (file, length);
11de8e: 50 push %eax
11de8f: 57 push %edi
11de90: 56 push %esi
11de91: 53 push %ebx
11de92: e8 c6 e1 ff ff call 11c05d <rtems_rfs_file_set_size>
11de97: 89 c6 mov %eax,%esi
if (rc)
11de99: 83 c4 10 add $0x10,%esp
11de9c: 85 c0 test %eax,%eax
11de9e: 74 0a je 11deaa <rtems_rfs_rtems_file_ftruncate+0x47><== ALWAYS TAKEN
rc = rtems_rfs_rtems_error ("file_ftruncate: set size", rc);
11dea0: e8 27 13 00 00 call 11f1cc <__errno> <== NOT EXECUTED
11dea5: 89 30 mov %esi,(%eax) <== NOT EXECUTED
11dea7: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
11deaa: 8b 43 1c mov 0x1c(%ebx),%eax
11dead: 8b 80 98 00 00 00 mov 0x98(%eax),%eax
11deb3: e8 92 fd ff ff call 11dc4a <rtems_rfs_rtems_unlock>
return rc;
}
11deb8: 89 f0 mov %esi,%eax
11deba: 8d 65 f4 lea -0xc(%ebp),%esp
11debd: 5b pop %ebx
11debe: 5e pop %esi
11debf: 5f pop %edi
11dec0: 5d pop %ebp
11dec1: c3 ret
0011dec2 <rtems_rfs_rtems_file_lseek>:
*/
static off_t
rtems_rfs_rtems_file_lseek (rtems_libio_t* iop,
off_t offset,
int whence)
{
11dec2: 55 push %ebp
11dec3: 89 e5 mov %esp,%ebp
11dec5: 57 push %edi
11dec6: 56 push %esi
11dec7: 53 push %ebx
11dec8: 83 ec 3c sub $0x3c,%esp
11decb: 8b 5d 08 mov 0x8(%ebp),%ebx
11dece: 8b 75 0c mov 0xc(%ebp),%esi
11ded1: 8b 7d 10 mov 0x10(%ebp),%edi
rtems_rfs_file_handle* file = rtems_rfs_rtems_get_iop_file_handle (iop);
11ded4: 8b 43 1c mov 0x1c(%ebx),%eax
11ded7: 89 45 d4 mov %eax,-0x2c(%ebp)
off_t new_offset;
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_LSEEK))
printf("rtems-rfs: file-lseek: handle:%p offset:%" PRIdoff_t "\n", file, offset);
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
11deda: 8b 40 1c mov 0x1c(%eax),%eax
.fstat_h = rtems_rfs_rtems_fstat,
.ftruncate_h = rtems_rfs_rtems_file_ftruncate,
.fsync_h = rtems_rfs_rtems_fdatasync,
.fdatasync_h = rtems_rfs_rtems_fdatasync,
.fcntl_h = rtems_filesystem_default_fcntl
};
11dedd: 8b 80 98 00 00 00 mov 0x98(%eax),%eax
11dee3: 8b 80 80 00 00 00 mov 0x80(%eax),%eax
11dee9: 8b 00 mov (%eax),%eax
11deeb: e8 04 fd ff ff call 11dbf4 <rtems_rfs_mutex_lock.isra.0>
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_LSEEK))
printf("rtems-rfs: file-lseek: handle:%p offset:%" PRIdoff_t "\n", file, offset);
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
old_offset = iop->offset;
11def0: 8b 43 04 mov 0x4(%ebx),%eax
11def3: 8b 53 08 mov 0x8(%ebx),%edx
11def6: 89 45 c8 mov %eax,-0x38(%ebp)
11def9: 89 55 cc mov %edx,-0x34(%ebp)
new_offset = rtems_filesystem_default_lseek_file (iop, offset, whence);
11defc: ff 75 14 pushl 0x14(%ebp)
11deff: 57 push %edi
11df00: 56 push %esi
11df01: 53 push %ebx
11df02: e8 79 02 00 00 call 11e180 <rtems_filesystem_default_lseek_file>
11df07: 89 c6 mov %eax,%esi
11df09: 89 d7 mov %edx,%edi
if (new_offset != -1)
11df0b: 83 c4 10 add $0x10,%esp
11df0e: 83 fa ff cmp $0xffffffff,%edx
11df11: 75 05 jne 11df18 <rtems_rfs_rtems_file_lseek+0x56>
11df13: 83 f8 ff cmp $0xffffffff,%eax
11df16: 74 3f je 11df57 <rtems_rfs_rtems_file_lseek+0x95><== ALWAYS TAKEN
{
rtems_rfs_pos pos = iop->offset;
11df18: 8b 43 04 mov 0x4(%ebx),%eax
11df1b: 8b 53 08 mov 0x8(%ebx),%edx
11df1e: 89 45 e0 mov %eax,-0x20(%ebp)
11df21: 89 55 e4 mov %edx,-0x1c(%ebp)
int rc = rtems_rfs_file_seek (file, pos, &pos);
11df24: 8d 4d e0 lea -0x20(%ebp),%ecx
11df27: 51 push %ecx
11df28: 52 push %edx
11df29: 50 push %eax
11df2a: ff 75 d4 pushl -0x2c(%ebp)
11df2d: e8 54 e0 ff ff call 11bf86 <rtems_rfs_file_seek>
if (rc)
11df32: 83 c4 10 add $0x10,%esp
11df35: 85 c0 test %eax,%eax
11df37: 74 1e je 11df57 <rtems_rfs_rtems_file_lseek+0x95><== ALWAYS TAKEN
{
rtems_rfs_rtems_error ("file_lseek: lseek", rc);
11df39: 89 45 c4 mov %eax,-0x3c(%ebp) <== NOT EXECUTED
11df3c: e8 8b 12 00 00 call 11f1cc <__errno> <== NOT EXECUTED
11df41: 8b 55 c4 mov -0x3c(%ebp),%edx <== NOT EXECUTED
11df44: 89 10 mov %edx,(%eax) <== NOT EXECUTED
iop->offset = old_offset;
11df46: 8b 45 c8 mov -0x38(%ebp),%eax <== NOT EXECUTED
11df49: 8b 55 cc mov -0x34(%ebp),%edx <== NOT EXECUTED
11df4c: 89 43 04 mov %eax,0x4(%ebx) <== NOT EXECUTED
11df4f: 89 53 08 mov %edx,0x8(%ebx) <== NOT EXECUTED
new_offset = -1;
11df52: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED
11df55: 89 f7 mov %esi,%edi <== NOT EXECUTED
}
}
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
11df57: 8b 55 d4 mov -0x2c(%ebp),%edx
11df5a: 8b 42 1c mov 0x1c(%edx),%eax
11df5d: 8b 80 98 00 00 00 mov 0x98(%eax),%eax
11df63: e8 e2 fc ff ff call 11dc4a <rtems_rfs_rtems_unlock>
return new_offset;
}
11df68: 89 f0 mov %esi,%eax
11df6a: 89 fa mov %edi,%edx
11df6c: 8d 65 f4 lea -0xc(%ebp),%esp
11df6f: 5b pop %ebx
11df70: 5e pop %esi
11df71: 5f pop %edi
11df72: 5d pop %ebp
11df73: c3 ret
0011de02 <rtems_rfs_rtems_file_open>:
static int
rtems_rfs_rtems_file_open (rtems_libio_t* iop,
const char* pathname,
int oflag,
mode_t mode)
{
11de02: 55 push %ebp
11de03: 89 e5 mov %esp,%ebp
11de05: 57 push %edi
11de06: 56 push %esi
11de07: 53 push %ebx
11de08: 83 ec 1c sub $0x1c,%esp
11de0b: 8b 75 08 mov 0x8(%ebp),%esi
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (&iop->pathinfo);
11de0e: 8b 46 24 mov 0x24(%esi),%eax
11de11: 8b 58 08 mov 0x8(%eax),%ebx
.fstat_h = rtems_rfs_rtems_fstat,
.ftruncate_h = rtems_rfs_rtems_file_ftruncate,
.fsync_h = rtems_rfs_rtems_fdatasync,
.fdatasync_h = rtems_rfs_rtems_fdatasync,
.fcntl_h = rtems_filesystem_default_fcntl
};
11de14: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax
11de1a: 8b 00 mov (%eax),%eax
11de1c: e8 d3 fd ff ff call 11dbf4 <rtems_rfs_mutex_lock.isra.0>
rtems_rfs_rtems_lock (fs);
ino = rtems_rfs_rtems_get_iop_ino (iop);
rc = rtems_rfs_file_open (fs, ino, flags, &file);
11de21: 8d 45 e4 lea -0x1c(%ebp),%eax
11de24: 50 push %eax
11de25: 6a 00 push $0x0
11de27: ff 76 18 pushl 0x18(%esi)
11de2a: 53 push %ebx
11de2b: e8 36 e5 ff ff call 11c366 <rtems_rfs_file_open>
11de30: 89 c7 mov %eax,%edi
if (rc > 0)
11de32: 83 c4 10 add $0x10,%esp
11de35: 85 c0 test %eax,%eax
11de37: 7e 13 jle 11de4c <rtems_rfs_rtems_file_open+0x4a><== ALWAYS TAKEN
{
rtems_rfs_rtems_unlock (fs);
11de39: 89 d8 mov %ebx,%eax <== NOT EXECUTED
11de3b: e8 0a fe ff ff call 11dc4a <rtems_rfs_rtems_unlock><== NOT EXECUTED
return rtems_rfs_rtems_error ("file-open: open", rc);
11de40: e8 87 13 00 00 call 11f1cc <__errno> <== NOT EXECUTED
11de45: 89 38 mov %edi,(%eax) <== NOT EXECUTED
11de47: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
11de4a: eb 0f jmp 11de5b <rtems_rfs_rtems_file_open+0x59><== NOT EXECUTED
}
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_OPEN))
printf("rtems-rfs: file-open: handle:%p\n", file);
rtems_rfs_rtems_set_iop_file_handle (iop, file);
11de4c: 8b 45 e4 mov -0x1c(%ebp),%eax
11de4f: 89 46 1c mov %eax,0x1c(%esi)
rtems_rfs_rtems_unlock (fs);
11de52: 89 d8 mov %ebx,%eax
11de54: e8 f1 fd ff ff call 11dc4a <rtems_rfs_rtems_unlock>
return 0;
11de59: 31 c0 xor %eax,%eax
}
11de5b: 8d 65 f4 lea -0xc(%ebp),%esp
11de5e: 5b pop %ebx
11de5f: 5e pop %esi
11de60: 5f pop %edi
11de61: 5d pop %ebp
11de62: c3 ret
0011dc9e <rtems_rfs_rtems_file_read>:
*/
static ssize_t
rtems_rfs_rtems_file_read (rtems_libio_t* iop,
void* buffer,
size_t count)
{
11dc9e: 55 push %ebp
11dc9f: 89 e5 mov %esp,%ebp
11dca1: 57 push %edi
11dca2: 56 push %esi
11dca3: 53 push %ebx
11dca4: 83 ec 3c sub $0x3c,%esp
rtems_rfs_file_handle* file = rtems_rfs_rtems_get_iop_file_handle (iop);
11dca7: 8b 45 08 mov 0x8(%ebp),%eax
11dcaa: 8b 58 1c mov 0x1c(%eax),%ebx
int rc;
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_READ))
printf("rtems-rfs: file-read: handle:%p count:%zd\n", file, count);
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
11dcad: 8b 43 1c mov 0x1c(%ebx),%eax
.fstat_h = rtems_rfs_rtems_fstat,
.ftruncate_h = rtems_rfs_rtems_file_ftruncate,
.fsync_h = rtems_rfs_rtems_fdatasync,
.fdatasync_h = rtems_rfs_rtems_fdatasync,
.fcntl_h = rtems_filesystem_default_fcntl
};
11dcb0: 8b 80 98 00 00 00 mov 0x98(%eax),%eax
11dcb6: 8b 80 80 00 00 00 mov 0x80(%eax),%eax
*/
static inline void
rtems_rfs_rtems_lock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
rtems_rfs_mutex_lock (&rtems->access);
11dcbc: 8b 00 mov (%eax),%eax
11dcbe: e8 31 ff ff ff call 11dbf4 <rtems_rfs_mutex_lock.isra.0>
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_READ))
printf("rtems-rfs: file-read: handle:%p count:%zd\n", file, count);
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
pos = iop->offset;
11dcc3: 8b 55 08 mov 0x8(%ebp),%edx
11dcc6: 8b 42 04 mov 0x4(%edx),%eax
11dcc9: 8b 52 08 mov 0x8(%edx),%edx
11dccc: 89 45 c8 mov %eax,-0x38(%ebp)
11dccf: 89 55 cc mov %edx,-0x34(%ebp)
if (pos < rtems_rfs_file_size (file))
11dcd2: 8b 43 1c mov 0x1c(%ebx),%eax
11dcd5: 57 push %edi
11dcd6: 57 push %edi
11dcd7: 8d 90 84 00 00 00 lea 0x84(%eax),%edx
11dcdd: 52 push %edx
11dcde: ff b0 98 00 00 00 pushl 0x98(%eax)
11dce4: e8 89 b8 ff ff call 119572 <rtems_rfs_block_get_size>
11dce9: 83 c4 10 add $0x10,%esp
11dcec: 39 55 cc cmp %edx,-0x34(%ebp)
11dcef: 72 7e jb 11dd6f <rtems_rfs_rtems_file_read+0xd1><== NEVER TAKEN
11dcf1: 77 05 ja 11dcf8 <rtems_rfs_rtems_file_read+0x5a><== NEVER TAKEN
11dcf3: 39 45 c8 cmp %eax,-0x38(%ebp)
11dcf6: 72 77 jb 11dd6f <rtems_rfs_rtems_file_read+0xd1>
size_t count)
{
rtems_rfs_file_handle* file = rtems_rfs_rtems_get_iop_file_handle (iop);
rtems_rfs_pos pos;
uint8_t* data = buffer;
ssize_t read = 0;
11dcf8: 31 d2 xor %edx,%edx
11dcfa: e9 82 00 00 00 jmp 11dd81 <rtems_rfs_rtems_file_read+0xe3>
{
while (count)
{
size_t size;
rc = rtems_rfs_file_io_start (file, &size, true);
11dcff: 56 push %esi
11dd00: 6a 01 push $0x1
11dd02: 8d 45 e4 lea -0x1c(%ebp),%eax
11dd05: 50 push %eax
11dd06: 53 push %ebx
11dd07: 89 55 c4 mov %edx,-0x3c(%ebp)
11dd0a: e8 a2 de ff ff call 11bbb1 <rtems_rfs_file_io_start>
11dd0f: 89 c6 mov %eax,%esi
if (rc > 0)
11dd11: 83 c4 10 add $0x10,%esp
11dd14: 85 c0 test %eax,%eax
11dd16: 8b 55 c4 mov -0x3c(%ebp),%edx
11dd19: 7e 02 jle 11dd1d <rtems_rfs_rtems_file_read+0x7f><== ALWAYS TAKEN
11dd1b: eb 46 jmp 11dd63 <rtems_rfs_rtems_file_read+0xc5><== NOT EXECUTED
{
read = rtems_rfs_rtems_error ("file-read: read: io-start", rc);
break;
}
if (size == 0)
11dd1d: 8b 45 e4 mov -0x1c(%ebp),%eax
11dd20: 85 c0 test %eax,%eax
11dd22: 74 59 je 11dd7d <rtems_rfs_rtems_file_read+0xdf>
break;
if (size > count)
11dd24: 3b 45 10 cmp 0x10(%ebp),%eax
11dd27: 76 06 jbe 11dd2f <rtems_rfs_rtems_file_read+0x91>
size = count;
11dd29: 8b 45 10 mov 0x10(%ebp),%eax
11dd2c: 89 45 e4 mov %eax,-0x1c(%ebp)
memcpy (data, rtems_rfs_file_data (file), size);
11dd2f: 8b 45 e4 mov -0x1c(%ebp),%eax
11dd32: 8b 4b 0c mov 0xc(%ebx),%ecx
11dd35: 8b 71 1c mov 0x1c(%ecx),%esi
11dd38: 03 73 14 add 0x14(%ebx),%esi
11dd3b: 8b 7d d4 mov -0x2c(%ebp),%edi
11dd3e: 89 c1 mov %eax,%ecx
11dd40: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
data += size;
11dd42: 89 7d d4 mov %edi,-0x2c(%ebp)
count -= size;
11dd45: 29 45 10 sub %eax,0x10(%ebp)
read += size;
11dd48: 01 c2 add %eax,%edx
rc = rtems_rfs_file_io_end (file, size, true);
11dd4a: 51 push %ecx
11dd4b: 6a 01 push $0x1
11dd4d: 50 push %eax
11dd4e: 53 push %ebx
11dd4f: 89 55 c4 mov %edx,-0x3c(%ebp)
11dd52: e8 28 e0 ff ff call 11bd7f <rtems_rfs_file_io_end>
11dd57: 89 c6 mov %eax,%esi
if (rc > 0)
11dd59: 83 c4 10 add $0x10,%esp
11dd5c: 85 c0 test %eax,%eax
11dd5e: 8b 55 c4 mov -0x3c(%ebp),%edx
11dd61: 7e 14 jle 11dd77 <rtems_rfs_rtems_file_read+0xd9><== ALWAYS TAKEN
{
read = rtems_rfs_rtems_error ("file-read: read: io-end", rc);
11dd63: e8 64 14 00 00 call 11f1cc <__errno> <== NOT EXECUTED
11dd68: 89 30 mov %esi,(%eax) <== NOT EXECUTED
11dd6a: 83 ca ff or $0xffffffff,%edx <== NOT EXECUTED
11dd6d: eb 28 jmp 11dd97 <rtems_rfs_rtems_file_read+0xf9><== NOT EXECUTED
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
pos = iop->offset;
if (pos < rtems_rfs_file_size (file))
11dd6f: 8b 55 0c mov 0xc(%ebp),%edx
11dd72: 89 55 d4 mov %edx,-0x2c(%ebp)
11dd75: 31 d2 xor %edx,%edx
{
while (count)
11dd77: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
11dd7b: 75 82 jne 11dcff <rtems_rfs_rtems_file_read+0x61>
break;
}
}
}
if (read >= 0)
11dd7d: 85 d2 test %edx,%edx
11dd7f: 78 16 js 11dd97 <rtems_rfs_rtems_file_read+0xf9><== NEVER TAKEN
iop->offset = pos + read;
11dd81: 89 d6 mov %edx,%esi
11dd83: 89 d7 mov %edx,%edi
11dd85: c1 ff 1f sar $0x1f,%edi
11dd88: 03 75 c8 add -0x38(%ebp),%esi
11dd8b: 13 7d cc adc -0x34(%ebp),%edi
11dd8e: 8b 45 08 mov 0x8(%ebp),%eax
11dd91: 89 70 04 mov %esi,0x4(%eax)
11dd94: 89 78 08 mov %edi,0x8(%eax)
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
11dd97: 8b 43 1c mov 0x1c(%ebx),%eax
11dd9a: 8b 80 98 00 00 00 mov 0x98(%eax),%eax
11dda0: 89 55 c4 mov %edx,-0x3c(%ebp)
11dda3: e8 a2 fe ff ff call 11dc4a <rtems_rfs_rtems_unlock>
return read;
}
11dda8: 8b 55 c4 mov -0x3c(%ebp),%edx
11ddab: 89 d0 mov %edx,%eax
11ddad: 8d 65 f4 lea -0xc(%ebp),%esp
11ddb0: 5b pop %ebx
11ddb1: 5e pop %esi
11ddb2: 5f pop %edi
11ddb3: 5d pop %ebp
11ddb4: c3 ret
0011df74 <rtems_rfs_rtems_file_write>:
*/
static ssize_t
rtems_rfs_rtems_file_write (rtems_libio_t* iop,
const void* buffer,
size_t count)
{
11df74: 55 push %ebp
11df75: 89 e5 mov %esp,%ebp
11df77: 57 push %edi
11df78: 56 push %esi
11df79: 53 push %ebx
11df7a: 83 ec 2c sub $0x2c,%esp
rtems_rfs_file_handle* file = rtems_rfs_rtems_get_iop_file_handle (iop);
11df7d: 8b 45 08 mov 0x8(%ebp),%eax
11df80: 8b 58 1c mov 0x1c(%eax),%ebx
int rc;
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_WRITE))
printf("rtems-rfs: file-write: handle:%p count:%zd\n", file, count);
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
11df83: 8b 43 1c mov 0x1c(%ebx),%eax
.fstat_h = rtems_rfs_rtems_fstat,
.ftruncate_h = rtems_rfs_rtems_file_ftruncate,
.fsync_h = rtems_rfs_rtems_fdatasync,
.fdatasync_h = rtems_rfs_rtems_fdatasync,
.fcntl_h = rtems_filesystem_default_fcntl
};
11df86: 8b 80 98 00 00 00 mov 0x98(%eax),%eax
11df8c: 8b 80 80 00 00 00 mov 0x80(%eax),%eax
11df92: 8b 00 mov (%eax),%eax
11df94: e8 5b fc ff ff call 11dbf4 <rtems_rfs_mutex_lock.isra.0>
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_WRITE))
printf("rtems-rfs: file-write: handle:%p count:%zd\n", file, count);
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
pos = iop->offset;
11df99: 8b 4d 08 mov 0x8(%ebp),%ecx
11df9c: 8b 41 04 mov 0x4(%ecx),%eax
11df9f: 8b 51 08 mov 0x8(%ecx),%edx
11dfa2: 89 45 e0 mov %eax,-0x20(%ebp)
11dfa5: 89 55 e4 mov %edx,-0x1c(%ebp)
file_size = rtems_rfs_file_size (file);
11dfa8: 8b 43 1c mov 0x1c(%ebx),%eax
11dfab: 52 push %edx
11dfac: 52 push %edx
11dfad: 8d 90 84 00 00 00 lea 0x84(%eax),%edx
11dfb3: 52 push %edx
11dfb4: ff b0 98 00 00 00 pushl 0x98(%eax)
11dfba: e8 b3 b5 ff ff call 119572 <rtems_rfs_block_get_size>
if (pos > file_size)
11dfbf: 8b 75 e0 mov -0x20(%ebp),%esi
11dfc2: 8b 7d e4 mov -0x1c(%ebp),%edi
11dfc5: 83 c4 10 add $0x10,%esp
11dfc8: 39 d7 cmp %edx,%edi
11dfca: 72 4c jb 11e018 <rtems_rfs_rtems_file_write+0xa4><== NEVER TAKEN
11dfcc: 77 04 ja 11dfd2 <rtems_rfs_rtems_file_write+0x5e><== NEVER TAKEN
11dfce: 39 c6 cmp %eax,%esi
11dfd0: 76 3c jbe 11e00e <rtems_rfs_rtems_file_write+0x9a>
/*
* If the iop position is past the physical end of the file we need to set
* the file size to the new length before writing. The
* rtems_rfs_file_io_end() will grow the file subsequently.
*/
rc = rtems_rfs_file_set_size (file, pos);
11dfd2: 50 push %eax
11dfd3: 57 push %edi
11dfd4: 56 push %esi
11dfd5: 53 push %ebx
11dfd6: e8 82 e0 ff ff call 11c05d <rtems_rfs_file_set_size>
11dfdb: 89 c6 mov %eax,%esi
if (rc)
11dfdd: 83 c4 10 add $0x10,%esp
11dfe0: 85 c0 test %eax,%eax
11dfe2: 8b 43 1c mov 0x1c(%ebx),%eax
11dfe5: 74 02 je 11dfe9 <rtems_rfs_rtems_file_write+0x75><== ALWAYS TAKEN
11dfe7: eb 56 jmp 11e03f <rtems_rfs_rtems_file_write+0xcb><== NOT EXECUTED
{
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
return rtems_rfs_rtems_error ("file-write: write extend", rc);
}
rtems_rfs_file_set_bpos (file, pos);
11dfe9: 8d 53 10 lea 0x10(%ebx),%edx
11dfec: 52 push %edx
11dfed: ff 75 e4 pushl -0x1c(%ebp)
11dff0: ff 75 e0 pushl -0x20(%ebp)
11dff3: ff b0 98 00 00 00 pushl 0x98(%eax)
11dff9: e8 b7 b4 ff ff call 1194b5 <rtems_rfs_block_get_bpos>
11dffe: 83 c4 10 add $0x10,%esp
*/
static ssize_t
rtems_rfs_rtems_file_write (rtems_libio_t* iop,
const void* buffer,
size_t count)
{
11e001: 8b 45 0c mov 0xc(%ebp),%eax
11e004: 89 45 d4 mov %eax,-0x2c(%ebp)
11e007: 31 d2 xor %edx,%edx
11e009: e9 bd 00 00 00 jmp 11e0cb <rtems_rfs_rtems_file_write+0x157>
return rtems_rfs_rtems_error ("file-write: write extend", rc);
}
rtems_rfs_file_set_bpos (file, pos);
}
else if (pos < file_size && (iop->flags & LIBIO_FLAGS_APPEND) != 0)
11e00e: 39 d7 cmp %edx,%edi
11e010: 72 06 jb 11e018 <rtems_rfs_rtems_file_write+0xa4><== NEVER TAKEN
11e012: 77 ed ja 11e001 <rtems_rfs_rtems_file_write+0x8d><== NEVER TAKEN
11e014: 39 c6 cmp %eax,%esi
11e016: 73 e9 jae 11e001 <rtems_rfs_rtems_file_write+0x8d>
11e018: 8b 4d 08 mov 0x8(%ebp),%ecx
11e01b: f6 41 0d 02 testb $0x2,0xd(%ecx)
11e01f: 74 e0 je 11e001 <rtems_rfs_rtems_file_write+0x8d>
{
pos = file_size;
11e021: 89 45 e0 mov %eax,-0x20(%ebp)
11e024: 89 55 e4 mov %edx,-0x1c(%ebp)
rc = rtems_rfs_file_seek (file, pos, &pos);
11e027: 8d 4d e0 lea -0x20(%ebp),%ecx
11e02a: 51 push %ecx
11e02b: 52 push %edx
11e02c: 50 push %eax
11e02d: 53 push %ebx
11e02e: e8 53 df ff ff call 11bf86 <rtems_rfs_file_seek>
11e033: 89 c6 mov %eax,%esi
if (rc)
11e035: 83 c4 10 add $0x10,%esp
11e038: 85 c0 test %eax,%eax
11e03a: 74 c5 je 11e001 <rtems_rfs_rtems_file_write+0x8d><== ALWAYS TAKEN
{
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
11e03c: 8b 43 1c mov 0x1c(%ebx),%eax <== NOT EXECUTED
11e03f: 8b 80 98 00 00 00 mov 0x98(%eax),%eax <== NOT EXECUTED
11e045: e8 00 fc ff ff call 11dc4a <rtems_rfs_rtems_unlock><== NOT EXECUTED
return rtems_rfs_rtems_error ("file-write: write append seek", rc);
11e04a: e8 7d 11 00 00 call 11f1cc <__errno> <== NOT EXECUTED
11e04f: 89 30 mov %esi,(%eax) <== NOT EXECUTED
11e051: 83 ca ff or $0xffffffff,%edx <== NOT EXECUTED
11e054: e9 a6 00 00 00 jmp 11e0ff <rtems_rfs_rtems_file_write+0x18b><== NOT EXECUTED
}
}
while (count)
{
size_t size = count;
11e059: 8b 45 10 mov 0x10(%ebp),%eax
11e05c: 89 45 dc mov %eax,-0x24(%ebp)
rc = rtems_rfs_file_io_start (file, &size, false);
11e05f: 56 push %esi
11e060: 6a 00 push $0x0
11e062: 8d 4d dc lea -0x24(%ebp),%ecx
11e065: 51 push %ecx
11e066: 53 push %ebx
11e067: 89 55 d0 mov %edx,-0x30(%ebp)
11e06a: e8 42 db ff ff call 11bbb1 <rtems_rfs_file_io_start>
11e06f: 89 c6 mov %eax,%esi
if (rc)
11e071: 83 c4 10 add $0x10,%esp
11e074: 85 c0 test %eax,%eax
11e076: 8b 55 d0 mov -0x30(%ebp),%edx
11e079: 74 02 je 11e07d <rtems_rfs_rtems_file_write+0x109>
11e07b: eb 42 jmp 11e0bf <rtems_rfs_rtems_file_write+0x14b>
{
write = rtems_rfs_rtems_error ("file-write: write open", rc);
break;
}
if (size > count)
11e07d: 8b 45 10 mov 0x10(%ebp),%eax
11e080: 39 45 dc cmp %eax,-0x24(%ebp)
11e083: 76 03 jbe 11e088 <rtems_rfs_rtems_file_write+0x114>
size = count;
11e085: 89 45 dc mov %eax,-0x24(%ebp)
memcpy (rtems_rfs_file_data (file), data, size);
11e088: 8b 43 0c mov 0xc(%ebx),%eax
11e08b: 8b 40 1c mov 0x1c(%eax),%eax
11e08e: 03 43 14 add 0x14(%ebx),%eax
11e091: 8b 4d dc mov -0x24(%ebp),%ecx
11e094: 89 c7 mov %eax,%edi
11e096: 8b 75 d4 mov -0x2c(%ebp),%esi
11e099: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
data += size;
11e09b: 8b 45 dc mov -0x24(%ebp),%eax
11e09e: 01 45 d4 add %eax,-0x2c(%ebp)
count -= size;
11e0a1: 29 45 10 sub %eax,0x10(%ebp)
write += size;
11e0a4: 01 c2 add %eax,%edx
rc = rtems_rfs_file_io_end (file, size, false);
11e0a6: 51 push %ecx
11e0a7: 6a 00 push $0x0
11e0a9: 50 push %eax
11e0aa: 53 push %ebx
11e0ab: 89 55 d0 mov %edx,-0x30(%ebp)
11e0ae: e8 cc dc ff ff call 11bd7f <rtems_rfs_file_io_end>
11e0b3: 89 c6 mov %eax,%esi
if (rc)
11e0b5: 83 c4 10 add $0x10,%esp
11e0b8: 85 c0 test %eax,%eax
11e0ba: 8b 55 d0 mov -0x30(%ebp),%edx
11e0bd: 74 0c je 11e0cb <rtems_rfs_rtems_file_write+0x157><== ALWAYS TAKEN
{
write = rtems_rfs_rtems_error ("file-write: write close", rc);
11e0bf: e8 08 11 00 00 call 11f1cc <__errno>
11e0c4: 89 30 mov %esi,(%eax)
11e0c6: 83 ca ff or $0xffffffff,%edx
11e0c9: eb 20 jmp 11e0eb <rtems_rfs_rtems_file_write+0x177>
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
return rtems_rfs_rtems_error ("file-write: write append seek", rc);
}
}
while (count)
11e0cb: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
11e0cf: 75 88 jne 11e059 <rtems_rfs_rtems_file_write+0xe5>
write = rtems_rfs_rtems_error ("file-write: write close", rc);
break;
}
}
if (write >= 0)
11e0d1: 85 d2 test %edx,%edx
11e0d3: 78 16 js 11e0eb <rtems_rfs_rtems_file_write+0x177><== NEVER TAKEN
iop->offset = pos + write;
11e0d5: 89 d6 mov %edx,%esi
11e0d7: 89 d7 mov %edx,%edi
11e0d9: c1 ff 1f sar $0x1f,%edi
11e0dc: 03 75 e0 add -0x20(%ebp),%esi
11e0df: 13 7d e4 adc -0x1c(%ebp),%edi
11e0e2: 8b 4d 08 mov 0x8(%ebp),%ecx
11e0e5: 89 71 04 mov %esi,0x4(%ecx)
11e0e8: 89 79 08 mov %edi,0x8(%ecx)
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
11e0eb: 8b 43 1c mov 0x1c(%ebx),%eax
11e0ee: 8b 80 98 00 00 00 mov 0x98(%eax),%eax
11e0f4: 89 55 d0 mov %edx,-0x30(%ebp)
11e0f7: e8 4e fb ff ff call 11dc4a <rtems_rfs_rtems_unlock>
11e0fc: 8b 55 d0 mov -0x30(%ebp),%edx
return write;
}
11e0ff: 89 d0 mov %edx,%eax
11e101: 8d 65 f4 lea -0xc(%ebp),%esp
11e104: 5b pop %ebx
11e105: 5e pop %esi
11e106: 5f pop %edi
11e107: 5d pop %ebp
11e108: c3 ret
001130db <rtems_rfs_rtems_fstat>:
}
int
rtems_rfs_rtems_fstat (const rtems_filesystem_location_info_t* pathloc,
struct stat* buf)
{
1130db: 55 push %ebp
1130dc: 89 e5 mov %esp,%ebp
1130de: 57 push %edi
1130df: 56 push %esi
1130e0: 53 push %ebx
1130e1: 83 ec 4c sub $0x4c,%esp
1130e4: 8b 45 08 mov 0x8(%ebp),%eax
1130e7: 8b 5d 0c mov 0xc(%ebp),%ebx
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
1130ea: 8b 50 14 mov 0x14(%eax),%edx
1130ed: 8b 7a 08 mov 0x8(%edx),%edi
int rc;
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_STAT))
printf ("rtems-rfs-rtems: stat: in: ino:%" PRId32 "\n", ino);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
1130f0: 6a 01 push $0x1
1130f2: 8d 55 c0 lea -0x40(%ebp),%edx
1130f5: 52 push %edx
1130f6: ff 70 08 pushl 0x8(%eax)
1130f9: 57 push %edi
1130fa: e8 2b f1 ff ff call 11222a <rtems_rfs_inode_open>
1130ff: 89 c6 mov %eax,%esi
if (rc)
113101: 83 c4 10 add $0x10,%esp
113104: 85 c0 test %eax,%eax
113106: 74 0c je 113114 <rtems_rfs_rtems_fstat+0x39><== ALWAYS TAKEN
{
return rtems_rfs_rtems_error ("stat: opening inode", rc);
113108: e8 bf c0 00 00 call 11f1cc <__errno> <== NOT EXECUTED
11310d: 89 30 mov %esi,(%eax) <== NOT EXECUTED
11310f: e9 fe 01 00 00 jmp 113312 <rtems_rfs_rtems_fstat+0x237><== NOT EXECUTED
}
mode = rtems_rfs_inode_get_mode (&inode);
113114: 8b 4d cc mov -0x34(%ebp),%ecx
* @return uint16_t The mode.
*/
static inline uint16_t
rtems_rfs_inode_get_mode (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->mode);
113117: 0f b6 41 02 movzbl 0x2(%ecx),%eax
11311b: c1 e0 08 shl $0x8,%eax
11311e: 0f b6 71 03 movzbl 0x3(%ecx),%esi
113122: 09 c6 or %eax,%esi
if (RTEMS_RFS_S_ISCHR (mode) || RTEMS_RFS_S_ISBLK (mode))
113124: 89 f0 mov %esi,%eax
113126: 66 25 00 b0 and $0xb000,%ax
11312a: 66 3d 00 20 cmp $0x2000,%ax
11312e: 75 27 jne 113157 <rtems_rfs_rtems_fstat+0x7c><== ALWAYS TAKEN
{
buf->st_rdev =
rtems_filesystem_make_dev_t (rtems_rfs_inode_get_block (&inode, 0),
113130: ba 01 00 00 00 mov $0x1,%edx <== NOT EXECUTED
113135: 89 c8 mov %ecx,%eax <== NOT EXECUTED
113137: 89 4d b0 mov %ecx,-0x50(%ebp) <== NOT EXECUTED
11313a: e8 71 ff ff ff call 1130b0 <rtems_rfs_inode_get_block.isra.12><== NOT EXECUTED
11313f: 89 45 b4 mov %eax,-0x4c(%ebp) <== NOT EXECUTED
113142: 31 d2 xor %edx,%edx <== NOT EXECUTED
113144: 8b 4d b0 mov -0x50(%ebp),%ecx <== NOT EXECUTED
113147: 89 c8 mov %ecx,%eax <== NOT EXECUTED
113149: e8 62 ff ff ff call 1130b0 <rtems_rfs_inode_get_block.isra.12><== NOT EXECUTED
mode = rtems_rfs_inode_get_mode (&inode);
if (RTEMS_RFS_S_ISCHR (mode) || RTEMS_RFS_S_ISBLK (mode))
{
buf->st_rdev =
11314e: 89 43 18 mov %eax,0x18(%ebx) <== NOT EXECUTED
113151: 8b 45 b4 mov -0x4c(%ebp),%eax <== NOT EXECUTED
113154: 89 43 1c mov %eax,0x1c(%ebx) <== NOT EXECUTED
rtems_filesystem_make_dev_t (rtems_rfs_inode_get_block (&inode, 0),
rtems_rfs_inode_get_block (&inode, 1));
}
buf->st_dev = rtems_rfs_fs_device (fs);
113157: 8b 47 10 mov 0x10(%edi),%eax
11315a: 89 03 mov %eax,(%ebx)
11315c: 99 cltd
11315d: 89 53 04 mov %edx,0x4(%ebx)
buf->st_ino = rtems_rfs_inode_ino (&inode);
113160: 8b 45 c8 mov -0x38(%ebp),%eax
113163: 89 43 08 mov %eax,0x8(%ebx)
buf->st_mode = rtems_rfs_rtems_mode (mode);
113166: 83 ec 0c sub $0xc,%esp
113169: 0f b7 f6 movzwl %si,%esi
11316c: 56 push %esi
11316d: e8 22 07 00 00 call 113894 <rtems_rfs_rtems_mode>
113172: 89 43 0c mov %eax,0xc(%ebx)
buf->st_nlink = rtems_rfs_inode_get_links (&inode);
113175: 8b 55 cc mov -0x34(%ebp),%edx
*/
static inline uint16_t
rtems_rfs_inode_get_links (rtems_rfs_inode_handle* handle)
{
uint16_t links;
links = rtems_rfs_read_u16 (&handle->node->links);
113178: 0f b6 0a movzbl (%edx),%ecx
11317b: c1 e1 08 shl $0x8,%ecx
11317e: 0f b6 42 01 movzbl 0x1(%edx),%eax
113182: 09 c8 or %ecx,%eax
if (links == 0xffff)
113184: 59 pop %ecx
113185: 5e pop %esi
links = 0;
113186: 31 c9 xor %ecx,%ecx
113188: 66 83 f8 ff cmp $0xffff,%ax
11318c: 0f 95 c1 setne %cl
11318f: f7 d9 neg %ecx
113191: 21 c8 and %ecx,%eax
113193: 66 89 43 10 mov %ax,0x10(%ebx)
* @return uint16_t The user id (uid).
*/
static inline uint16_t
rtems_rfs_inode_get_uid (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->owner) & 0xffff;
113197: 0f b6 42 06 movzbl 0x6(%edx),%eax
11319b: c1 e0 08 shl $0x8,%eax
11319e: 0f b6 4a 07 movzbl 0x7(%edx),%ecx
1131a2: 09 c8 or %ecx,%eax
1131a4: 66 89 43 12 mov %ax,0x12(%ebx)
* @return uint16_t The group id (gid).
*/
static inline uint16_t
rtems_rfs_inode_get_gid (rtems_rfs_inode_handle* handle)
{
return (rtems_rfs_read_u32 (&handle->node->owner) >> 16) & 0xffff;
1131a8: 0f b6 42 04 movzbl 0x4(%edx),%eax
1131ac: c1 e0 18 shl $0x18,%eax
1131af: 0f b6 52 05 movzbl 0x5(%edx),%edx
1131b3: c1 e2 10 shl $0x10,%edx
1131b6: 09 d0 or %edx,%eax
1131b8: c1 e8 10 shr $0x10,%eax
1131bb: 66 89 43 14 mov %ax,0x14(%ebx)
/*
* Need to check is the ino is an open file. If so we take the values from
* the open file rather than the inode.
*/
shared = rtems_rfs_file_get_shared (fs, rtems_rfs_inode_ino (&inode));
1131bf: ff 75 c8 pushl -0x38(%ebp)
1131c2: 57 push %edi
1131c3: e8 7e 91 00 00 call 11c346 <rtems_rfs_file_get_shared>
if (shared)
1131c8: 83 c4 10 add $0x10,%esp
1131cb: 85 c0 test %eax,%eax
1131cd: 74 54 je 113223 <rtems_rfs_rtems_fstat+0x148>
{
buf->st_atime = rtems_rfs_file_shared_get_atime (shared);
1131cf: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx
1131d5: 89 53 28 mov %edx,0x28(%ebx)
buf->st_mtime = rtems_rfs_file_shared_get_mtime (shared);
1131d8: 8b 90 90 00 00 00 mov 0x90(%eax),%edx
1131de: 89 53 30 mov %edx,0x30(%ebx)
buf->st_ctime = rtems_rfs_file_shared_get_ctime (shared);
1131e1: 8b 90 94 00 00 00 mov 0x94(%eax),%edx
1131e7: 89 53 38 mov %edx,0x38(%ebx)
buf->st_blocks = rtems_rfs_file_shared_get_block_count (shared);
1131ea: 8b 90 84 00 00 00 mov 0x84(%eax),%edx
1131f0: 89 53 44 mov %edx,0x44(%ebx)
if (S_ISLNK (buf->st_mode))
1131f3: 8b 53 0c mov 0xc(%ebx),%edx
1131f6: 81 e2 00 f0 00 00 and $0xf000,%edx
1131fc: 81 fa 00 a0 00 00 cmp $0xa000,%edx
113202: 75 0c jne 113210 <rtems_rfs_rtems_fstat+0x135><== ALWAYS TAKEN
buf->st_size = rtems_rfs_file_shared_get_block_offset (shared);
113204: 0f b7 80 88 00 00 00 movzwl 0x88(%eax),%eax <== NOT EXECUTED
11320b: e9 bf 00 00 00 jmp 1132cf <rtems_rfs_rtems_fstat+0x1f4><== NOT EXECUTED
*/
static inline rtems_rfs_pos
rtems_rfs_file_shared_get_size (rtems_rfs_file_system* fs,
rtems_rfs_file_shared* shared)
{
return rtems_rfs_block_get_size (fs, &shared->size);
113210: 52 push %edx
113211: 52 push %edx
113212: 05 84 00 00 00 add $0x84,%eax
113217: 50 push %eax
113218: 57 push %edi
113219: e8 54 63 00 00 call 119572 <rtems_rfs_block_get_size>
11321e: e9 c4 00 00 00 jmp 1132e7 <rtems_rfs_rtems_fstat+0x20c>
else
buf->st_size = rtems_rfs_file_shared_get_size (fs, shared);
}
else
{
buf->st_atime = rtems_rfs_inode_get_atime (&inode);
113223: 8b 45 cc mov -0x34(%ebp),%eax
* @return rtems_rfs_time The atime.
*/
static inline rtems_rfs_time
rtems_rfs_inode_get_atime (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->atime);
113226: 0f b6 50 10 movzbl 0x10(%eax),%edx
11322a: c1 e2 18 shl $0x18,%edx
11322d: 0f b6 48 11 movzbl 0x11(%eax),%ecx
113231: c1 e1 10 shl $0x10,%ecx
113234: 09 ca or %ecx,%edx
113236: 0f b6 48 13 movzbl 0x13(%eax),%ecx
11323a: 09 ca or %ecx,%edx
11323c: 0f b6 48 12 movzbl 0x12(%eax),%ecx
113240: c1 e1 08 shl $0x8,%ecx
113243: 09 ca or %ecx,%edx
113245: 89 53 28 mov %edx,0x28(%ebx)
* @return rtems_rfs_time The mtime.
*/
static inline rtems_rfs_time
rtems_rfs_inode_get_mtime (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->mtime);
113248: 0f b6 50 14 movzbl 0x14(%eax),%edx
11324c: c1 e2 18 shl $0x18,%edx
11324f: 0f b6 48 15 movzbl 0x15(%eax),%ecx
113253: c1 e1 10 shl $0x10,%ecx
113256: 09 ca or %ecx,%edx
113258: 0f b6 48 17 movzbl 0x17(%eax),%ecx
11325c: 09 ca or %ecx,%edx
11325e: 0f b6 48 16 movzbl 0x16(%eax),%ecx
113262: c1 e1 08 shl $0x8,%ecx
113265: 09 ca or %ecx,%edx
113267: 89 53 30 mov %edx,0x30(%ebx)
* @return rtems_rfs_time The ctime.
*/
static inline rtems_rfs_time
rtems_rfs_inode_get_ctime (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->ctime);
11326a: 0f b6 50 18 movzbl 0x18(%eax),%edx
11326e: c1 e2 18 shl $0x18,%edx
113271: 0f b6 48 19 movzbl 0x19(%eax),%ecx
113275: c1 e1 10 shl $0x10,%ecx
113278: 09 ca or %ecx,%edx
11327a: 0f b6 48 1b movzbl 0x1b(%eax),%ecx
11327e: 09 ca or %ecx,%edx
113280: 0f b6 48 1a movzbl 0x1a(%eax),%ecx
113284: c1 e1 08 shl $0x8,%ecx
113287: 09 ca or %ecx,%edx
113289: 89 53 38 mov %edx,0x38(%ebx)
* @return uint32_t The block count.
*/
static inline uint32_t
rtems_rfs_inode_get_block_count (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->block_count);
11328c: 0f b6 50 0c movzbl 0xc(%eax),%edx
113290: c1 e2 18 shl $0x18,%edx
113293: 0f b6 48 0d movzbl 0xd(%eax),%ecx
113297: c1 e1 10 shl $0x10,%ecx
11329a: 09 ca or %ecx,%edx
11329c: 0f b6 48 0f movzbl 0xf(%eax),%ecx
1132a0: 09 ca or %ecx,%edx
1132a2: 0f b6 48 0e movzbl 0xe(%eax),%ecx
1132a6: c1 e1 08 shl $0x8,%ecx
1132a9: 09 ca or %ecx,%edx
1132ab: 89 53 44 mov %edx,0x44(%ebx)
buf->st_mtime = rtems_rfs_inode_get_mtime (&inode);
buf->st_ctime = rtems_rfs_inode_get_ctime (&inode);
buf->st_blocks = rtems_rfs_inode_get_block_count (&inode);
if (S_ISLNK (buf->st_mode))
1132ae: 8b 53 0c mov 0xc(%ebx),%edx
1132b1: 81 e2 00 f0 00 00 and $0xf000,%edx
1132b7: 81 fa 00 a0 00 00 cmp $0xa000,%edx
1132bd: 75 1c jne 1132db <rtems_rfs_rtems_fstat+0x200>
* @return uint32_t The block offset.
*/
static inline uint16_t
rtems_rfs_inode_get_block_offset (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->block_offset);
1132bf: 0f b6 50 0a movzbl 0xa(%eax),%edx
1132c3: c1 e2 08 shl $0x8,%edx
1132c6: 0f b6 40 0b movzbl 0xb(%eax),%eax
1132ca: 09 d0 or %edx,%eax
buf->st_size = rtems_rfs_inode_get_block_offset (&inode);
1132cc: 0f b7 c0 movzwl %ax,%eax
1132cf: 89 43 20 mov %eax,0x20(%ebx)
1132d2: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx)
1132d9: eb 15 jmp 1132f0 <rtems_rfs_rtems_fstat+0x215>
else
buf->st_size = rtems_rfs_inode_get_size (fs, &inode);
1132db: 56 push %esi
1132dc: 56 push %esi
1132dd: 8d 45 c0 lea -0x40(%ebp),%eax
1132e0: 50 push %eax
1132e1: 57 push %edi
1132e2: e8 98 f6 ff ff call 11297f <rtems_rfs_inode_get_size>
1132e7: 89 43 20 mov %eax,0x20(%ebx)
1132ea: 89 53 24 mov %edx,0x24(%ebx)
1132ed: 83 c4 10 add $0x10,%esp
}
buf->st_blksize = rtems_rfs_fs_block_size (fs);
1132f0: 8b 47 08 mov 0x8(%edi),%eax
1132f3: 89 43 40 mov %eax,0x40(%ebx)
rc = rtems_rfs_inode_close (fs, &inode);
1132f6: 51 push %ecx
1132f7: 51 push %ecx
1132f8: 8d 45 c0 lea -0x40(%ebp),%eax
1132fb: 50 push %eax
1132fc: 57 push %edi
1132fd: e8 a5 f0 ff ff call 1123a7 <rtems_rfs_inode_close>
113302: 89 c3 mov %eax,%ebx
if (rc > 0)
113304: 83 c4 10 add $0x10,%esp
113307: 85 c0 test %eax,%eax
113309: 7e 0c jle 113317 <rtems_rfs_rtems_fstat+0x23c><== ALWAYS TAKEN
{
return rtems_rfs_rtems_error ("stat: closing inode", rc);
11330b: e8 bc be 00 00 call 11f1cc <__errno> <== NOT EXECUTED
113310: 89 18 mov %ebx,(%eax) <== NOT EXECUTED
113312: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
113315: eb 02 jmp 113319 <rtems_rfs_rtems_fstat+0x23e><== NOT EXECUTED
}
return 0;
113317: 31 c0 xor %eax,%eax
}
113319: 8d 65 f4 lea -0xc(%ebp),%esp
11331c: 5b pop %ebx
11331d: 5e pop %esi
11331e: 5f pop %edi
11331f: 5d pop %ebp
113320: c3 ret
0011341f <rtems_rfs_rtems_initialise>:
*/
int
rtems_rfs_rtems_initialise (rtems_filesystem_mount_table_entry_t* mt_entry,
const void* data)
{
11341f: 55 push %ebp
113420: 89 e5 mov %esp,%ebp
113422: 57 push %edi
113423: 56 push %esi
113424: 53 push %ebx
113425: 83 ec 2c sub $0x2c,%esp
rtems_rfs_rtems_private* rtems;
rtems_rfs_file_system* fs;
uint32_t flags = 0;
uint32_t max_held_buffers = RTEMS_RFS_FS_MAX_HELD_BUFFERS;
const char* options = data;
113428: 8b 75 0c mov 0xc(%ebp),%esi
const void* data)
{
rtems_rfs_rtems_private* rtems;
rtems_rfs_file_system* fs;
uint32_t flags = 0;
uint32_t max_held_buffers = RTEMS_RFS_FS_MAX_HELD_BUFFERS;
11342b: bf 05 00 00 00 mov $0x5,%edi
rtems_rfs_rtems_initialise (rtems_filesystem_mount_table_entry_t* mt_entry,
const void* data)
{
rtems_rfs_rtems_private* rtems;
rtems_rfs_file_system* fs;
uint32_t flags = 0;
113430: 31 db xor %ebx,%ebx
int rc;
/*
* Parse the options the user specifiies.
*/
while (options)
113432: e9 94 00 00 00 jmp 1134cb <rtems_rfs_rtems_initialise+0xac>
{
printf ("options=%s\n", options);
113437: 50 push %eax <== NOT EXECUTED
113438: 50 push %eax <== NOT EXECUTED
113439: 56 push %esi <== NOT EXECUTED
11343a: 68 fd 04 13 00 push $0x1304fd <== NOT EXECUTED
11343f: e8 f8 ce 00 00 call 12033c <printf> <== NOT EXECUTED
if (strncmp (options, "hold-bitmaps",
113444: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
113447: 6a 0c push $0xc <== NOT EXECUTED
113449: 68 09 05 13 00 push $0x130509 <== NOT EXECUTED
11344e: 56 push %esi <== NOT EXECUTED
11344f: e8 58 dd 00 00 call 1211ac <strncmp> <== NOT EXECUTED
113454: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
113457: 85 c0 test %eax,%eax <== NOT EXECUTED
113459: 75 05 jne 113460 <rtems_rfs_rtems_initialise+0x41><== NOT EXECUTED
sizeof ("hold-bitmaps") - 1) == 0)
flags |= RTEMS_RFS_FS_BITMAPS_HOLD;
11345b: 83 cb 01 or $0x1,%ebx <== NOT EXECUTED
11345e: eb 51 jmp 1134b1 <rtems_rfs_rtems_initialise+0x92><== NOT EXECUTED
else if (strncmp (options, "no-local-cache",
113460: 50 push %eax <== NOT EXECUTED
113461: 6a 0e push $0xe <== NOT EXECUTED
113463: 68 16 05 13 00 push $0x130516 <== NOT EXECUTED
113468: 56 push %esi <== NOT EXECUTED
113469: e8 3e dd 00 00 call 1211ac <strncmp> <== NOT EXECUTED
11346e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
113471: 85 c0 test %eax,%eax <== NOT EXECUTED
113473: 75 05 jne 11347a <rtems_rfs_rtems_initialise+0x5b><== NOT EXECUTED
sizeof ("no-local-cache") - 1) == 0)
flags |= RTEMS_RFS_FS_NO_LOCAL_CACHE;
113475: 83 cb 02 or $0x2,%ebx <== NOT EXECUTED
113478: eb 37 jmp 1134b1 <rtems_rfs_rtems_initialise+0x92><== NOT EXECUTED
else if (strncmp (options, "max-held-bufs",
11347a: 50 push %eax <== NOT EXECUTED
11347b: 6a 0d push $0xd <== NOT EXECUTED
11347d: 68 25 05 13 00 push $0x130525 <== NOT EXECUTED
113482: 56 push %esi <== NOT EXECUTED
113483: e8 24 dd 00 00 call 1211ac <strncmp> <== NOT EXECUTED
113488: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11348b: 85 c0 test %eax,%eax <== NOT EXECUTED
11348d: 75 15 jne 1134a4 <rtems_rfs_rtems_initialise+0x85><== NOT EXECUTED
sizeof ("max-held-bufs") - 1) == 0)
{
max_held_buffers = strtoul (options + sizeof ("max-held-bufs"), 0, 0);
11348f: 50 push %eax <== NOT EXECUTED
113490: 6a 00 push $0x0 <== NOT EXECUTED
113492: 6a 00 push $0x0 <== NOT EXECUTED
113494: 8d 46 0e lea 0xe(%esi),%eax <== NOT EXECUTED
113497: 50 push %eax <== NOT EXECUTED
113498: e8 ff e6 00 00 call 121b9c <strtoul> <== NOT EXECUTED
11349d: 89 c7 mov %eax,%edi <== NOT EXECUTED
11349f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1134a2: eb 0d jmp 1134b1 <rtems_rfs_rtems_initialise+0x92><== NOT EXECUTED
}
else
return rtems_rfs_rtems_error ("initialise: invalid option", EINVAL);
1134a4: e8 23 bd 00 00 call 11f1cc <__errno> <== NOT EXECUTED
1134a9: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
1134af: eb 40 jmp 1134f1 <rtems_rfs_rtems_initialise+0xd2><== NOT EXECUTED
options = strchr (options, ',');
1134b1: 50 push %eax <== NOT EXECUTED
1134b2: 50 push %eax <== NOT EXECUTED
1134b3: 6a 2c push $0x2c <== NOT EXECUTED
1134b5: 56 push %esi <== NOT EXECUTED
1134b6: e8 d5 d6 00 00 call 120b90 <strchr> <== NOT EXECUTED
1134bb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1134be: 89 c6 mov %eax,%esi <== NOT EXECUTED
if (options)
1134c0: 85 c0 test %eax,%eax <== NOT EXECUTED
1134c2: 74 0f je 1134d3 <rtems_rfs_rtems_initialise+0xb4><== NOT EXECUTED
{
++options;
if (*options == '\0')
1134c4: 80 78 01 00 cmpb $0x0,0x1(%eax) <== NOT EXECUTED
1134c8: 74 09 je 1134d3 <rtems_rfs_rtems_initialise+0xb4><== NOT EXECUTED
return rtems_rfs_rtems_error ("initialise: invalid option", EINVAL);
options = strchr (options, ',');
if (options)
{
++options;
1134ca: 46 inc %esi <== NOT EXECUTED
int rc;
/*
* Parse the options the user specifiies.
*/
while (options)
1134cb: 85 f6 test %esi,%esi
1134cd: 0f 85 64 ff ff ff jne 113437 <rtems_rfs_rtems_initialise+0x18><== NEVER TAKEN
if (*options == '\0')
options = NULL;
}
}
rtems = malloc (sizeof (rtems_rfs_rtems_private));
1134d3: 83 ec 0c sub $0xc,%esp
1134d6: 6a 04 push $0x4
1134d8: e8 23 6f ff ff call 10a400 <malloc>
1134dd: 89 c6 mov %eax,%esi
if (!rtems)
1134df: 83 c4 10 add $0x10,%esp
1134e2: 85 c0 test %eax,%eax
1134e4: 75 13 jne 1134f9 <rtems_rfs_rtems_initialise+0xda><== ALWAYS TAKEN
return rtems_rfs_rtems_error ("initialise: local data", ENOMEM);
1134e6: e8 e1 bc 00 00 call 11f1cc <__errno> <== NOT EXECUTED
1134eb: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED
1134f1: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
1134f4: e9 bc 00 00 00 jmp 1135b5 <rtems_rfs_rtems_initialise+0x196><== NOT EXECUTED
memset (rtems, 0, sizeof (rtems_rfs_rtems_private));
1134f9: c7 00 00 00 00 00 movl $0x0,(%eax)
rc = rtems_rfs_mutex_create (&rtems->access);
1134ff: 83 ec 0c sub $0xc,%esp
113502: 50 push %eax
113503: e8 f0 a1 00 00 call 11d6f8 <rtems_rfs_mutex_create>
if (rc > 0)
113508: 83 c4 10 add $0x10,%esp
11350b: 85 c0 test %eax,%eax
11350d: 7e 09 jle 113518 <rtems_rfs_rtems_initialise+0xf9><== ALWAYS TAKEN
{
free (rtems);
11350f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
113512: 56 push %esi <== NOT EXECUTED
113513: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED
113516: eb 1a jmp 113532 <rtems_rfs_rtems_initialise+0x113><== NOT EXECUTED
return rtems_rfs_rtems_error ("initialise: cannot create mutex", rc);
}
rc = rtems_rfs_mutex_lock (&rtems->access);
113518: 8b 06 mov (%esi),%eax
11351a: e8 aa fe ff ff call 1133c9 <rtems_rfs_mutex_lock.isra.21>
if (rc > 0)
11351f: 85 c0 test %eax,%eax
113521: 7e 20 jle 113543 <rtems_rfs_rtems_initialise+0x124><== ALWAYS TAKEN
{
rtems_rfs_mutex_destroy (&rtems->access);
113523: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
113526: 56 push %esi <== NOT EXECUTED
113527: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED
11352a: e8 25 a2 00 00 call 11d754 <rtems_rfs_mutex_destroy><== NOT EXECUTED
free (rtems);
11352f: 89 34 24 mov %esi,(%esp) <== NOT EXECUTED
113532: e8 b1 69 ff ff call 109ee8 <free> <== NOT EXECUTED
return rtems_rfs_rtems_error ("initialise: cannot lock access mutex", rc);
113537: e8 90 bc 00 00 call 11f1cc <__errno> <== NOT EXECUTED
11353c: 8b 4d d4 mov -0x2c(%ebp),%ecx <== NOT EXECUTED
11353f: 89 08 mov %ecx,(%eax) <== NOT EXECUTED
113541: eb 2e jmp 113571 <rtems_rfs_rtems_initialise+0x152><== NOT EXECUTED
}
rc = rtems_rfs_fs_open (mt_entry->dev, rtems, flags, max_held_buffers, &fs);
113543: 83 ec 0c sub $0xc,%esp
113546: 8d 45 e4 lea -0x1c(%ebp),%eax
113549: 50 push %eax
11354a: 57 push %edi
11354b: 53 push %ebx
11354c: 56 push %esi
11354d: 8b 55 08 mov 0x8(%ebp),%edx
113550: ff 72 38 pushl 0x38(%edx)
113553: e8 17 91 00 00 call 11c66f <rtems_rfs_fs_open>
113558: 89 c3 mov %eax,%ebx
if (rc)
11355a: 83 c4 20 add $0x20,%esp
11355d: 85 c0 test %eax,%eax
11355f: 74 18 je 113579 <rtems_rfs_rtems_initialise+0x15a><== ALWAYS TAKEN
{
free (rtems);
113561: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
113564: 56 push %esi <== NOT EXECUTED
113565: e8 7e 69 ff ff call 109ee8 <free> <== NOT EXECUTED
return rtems_rfs_rtems_error ("initialise: open", rc);
11356a: e8 5d bc 00 00 call 11f1cc <__errno> <== NOT EXECUTED
11356f: 89 18 mov %ebx,(%eax) <== NOT EXECUTED
113571: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
113574: e9 78 ff ff ff jmp 1134f1 <rtems_rfs_rtems_initialise+0xd2><== NOT EXECUTED
}
mt_entry->fs_info = fs;
113579: 8b 45 e4 mov -0x1c(%ebp),%eax
11357c: 8b 4d 08 mov 0x8(%ebp),%ecx
11357f: 89 41 08 mov %eax,0x8(%ecx)
mt_entry->ops = &rtems_rfs_ops;
113582: c7 41 0c 34 05 13 00 movl $0x130534,0xc(%ecx)
mt_entry->mt_fs_root->location.node_access = (void*) RTEMS_RFS_ROOT_INO;
113589: 8b 51 24 mov 0x24(%ecx),%edx
11358c: c7 42 08 01 00 00 00 movl $0x1,0x8(%edx)
mt_entry->mt_fs_root->location.handlers = &rtems_rfs_rtems_dir_handlers;
113593: c7 42 10 ec 21 13 00 movl $0x1321ec,0x10(%edx)
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
11359a: 8b 98 80 00 00 00 mov 0x80(%eax),%ebx
rtems_rfs_buffers_release (fs);
1135a0: 83 ec 0c sub $0xc,%esp
1135a3: 50 push %eax
1135a4: e8 f0 70 00 00 call 11a699 <rtems_rfs_buffers_release>
rtems_rfs_mutex_unlock (&rtems->access);
1135a9: 8b 03 mov (%ebx),%eax
1135ab: e8 c5 fd ff ff call 113375 <rtems_rfs_mutex_unlock.isra.20>
1135b0: 83 c4 10 add $0x10,%esp
rtems_rfs_rtems_unlock (fs);
return 0;
1135b3: 31 c0 xor %eax,%eax
}
1135b5: 8d 65 f4 lea -0xc(%ebp),%esp
1135b8: 5b pop %ebx
1135b9: 5e pop %esi
1135ba: 5f pop %edi
1135bb: 5d pop %ebp
1135bc: c3 ret
00112ae8 <rtems_rfs_rtems_link>:
static int
rtems_rfs_rtems_link (const rtems_filesystem_location_info_t *parentloc,
const rtems_filesystem_location_info_t *targetloc,
const char *name,
size_t namelen)
{
112ae8: 55 push %ebp
112ae9: 89 e5 mov %esp,%ebp
112aeb: 53 push %ebx
112aec: 83 ec 0c sub $0xc,%esp
112aef: 8b 45 0c mov 0xc(%ebp),%eax
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_LINK))
printf ("rtems-rfs-rtems: link: in: parent:%" PRId32 " target:%" PRId32 "\n",
parent, target);
rc = rtems_rfs_link (fs, name, namelen, parent, target, false);
112af2: 6a 00 push $0x0
112af4: ff 70 08 pushl 0x8(%eax)
112af7: 8b 55 08 mov 0x8(%ebp),%edx
112afa: ff 72 08 pushl 0x8(%edx)
112afd: ff 75 14 pushl 0x14(%ebp)
112b00: ff 75 10 pushl 0x10(%ebp)
rtems_rfs_rtems_link (const rtems_filesystem_location_info_t *parentloc,
const rtems_filesystem_location_info_t *targetloc,
const char *name,
size_t namelen)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (targetloc);
112b03: 8b 40 14 mov 0x14(%eax),%eax
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_LINK))
printf ("rtems-rfs-rtems: link: in: parent:%" PRId32 " target:%" PRId32 "\n",
parent, target);
rc = rtems_rfs_link (fs, name, namelen, parent, target, false);
112b06: ff 70 08 pushl 0x8(%eax)
112b09: e8 6a a2 00 00 call 11cd78 <rtems_rfs_link>
112b0e: 89 c3 mov %eax,%ebx
if (rc)
112b10: 83 c4 20 add $0x20,%esp
{
return rtems_rfs_rtems_error ("link: linking", rc);
}
return 0;
112b13: 31 c0 xor %eax,%eax
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_LINK))
printf ("rtems-rfs-rtems: link: in: parent:%" PRId32 " target:%" PRId32 "\n",
parent, target);
rc = rtems_rfs_link (fs, name, namelen, parent, target, false);
if (rc)
112b15: 85 db test %ebx,%ebx
112b17: 74 0a je 112b23 <rtems_rfs_rtems_link+0x3b><== ALWAYS TAKEN
{
return rtems_rfs_rtems_error ("link: linking", rc);
112b19: e8 ae c6 00 00 call 11f1cc <__errno> <== NOT EXECUTED
112b1e: 89 18 mov %ebx,(%eax) <== NOT EXECUTED
112b20: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
}
return 0;
}
112b23: 8b 5d fc mov -0x4(%ebp),%ebx
112b26: c9 leave
112b27: c3 ret
00112ef3 <rtems_rfs_rtems_mknod>:
rtems_rfs_rtems_mknod (const rtems_filesystem_location_info_t *parentloc,
const char *name,
size_t namelen,
mode_t mode,
dev_t dev)
{
112ef3: 55 push %ebp
112ef4: 89 e5 mov %esp,%ebp
112ef6: 57 push %edi
112ef7: 56 push %esi
112ef8: 53 push %ebx
112ef9: 83 ec 4c sub $0x4c,%esp
112efc: 8b 45 08 mov 0x8(%ebp),%eax
112eff: 8b 55 18 mov 0x18(%ebp),%edx
112f02: 89 55 b4 mov %edx,-0x4c(%ebp)
112f05: 8b 55 1c mov 0x1c(%ebp),%edx
112f08: 89 55 b0 mov %edx,-0x50(%ebp)
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (parentloc);
112f0b: 8b 50 14 mov 0x14(%eax),%edx
112f0e: 8b 5a 08 mov 0x8(%edx),%ebx
rtems_rfs_ino parent = rtems_rfs_rtems_get_pathloc_ino (parentloc);
112f11: 8b 50 08 mov 0x8(%eax),%edx
uid_t uid;
gid_t gid;
int rc;
#if defined(RTEMS_POSIX_API)
uid = geteuid ();
112f14: 89 55 ac mov %edx,-0x54(%ebp)
112f17: e8 94 35 00 00 call 1164b0 <geteuid>
112f1c: 0f b7 f0 movzwl %ax,%esi
gid = getegid ();
112f1f: e8 7c 35 00 00 call 1164a0 <getegid>
112f24: 0f b7 f8 movzwl %ax,%edi
uid = 0;
gid = 0;
#endif
rc = rtems_rfs_inode_create (fs, parent, name, namelen,
rtems_rfs_rtems_imode (mode),
112f27: 83 ec 0c sub $0xc,%esp
112f2a: ff 75 14 pushl 0x14(%ebp)
112f2d: e8 5a 09 00 00 call 11388c <rtems_rfs_rtems_imode>
#else
uid = 0;
gid = 0;
#endif
rc = rtems_rfs_inode_create (fs, parent, name, namelen,
112f32: 8d 4d bc lea -0x44(%ebp),%ecx
112f35: 89 0c 24 mov %ecx,(%esp)
112f38: 57 push %edi
112f39: 56 push %esi
112f3a: 6a 01 push $0x1
112f3c: 0f b7 c0 movzwl %ax,%eax
112f3f: 50 push %eax
112f40: ff 75 10 pushl 0x10(%ebp)
112f43: ff 75 0c pushl 0xc(%ebp)
112f46: 8b 55 ac mov -0x54(%ebp),%edx
112f49: 52 push %edx
112f4a: 53 push %ebx
112f4b: e8 5f f7 ff ff call 1126af <rtems_rfs_inode_create>
112f50: 89 c6 mov %eax,%esi
rtems_rfs_rtems_imode (mode),
1, uid, gid, &ino);
if (rc > 0)
112f52: 83 c4 30 add $0x30,%esp
112f55: 85 c0 test %eax,%eax
112f57: 7e 0c jle 112f65 <rtems_rfs_rtems_mknod+0x72>
{
return rtems_rfs_rtems_error ("mknod: inode create", rc);
112f59: e8 6e c2 00 00 call 11f1cc <__errno>
112f5e: 89 30 mov %esi,(%eax)
112f60: e9 9a 00 00 00 jmp 112fff <rtems_rfs_rtems_mknod+0x10c>
}
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
112f65: 6a 01 push $0x1
112f67: 8d 75 c0 lea -0x40(%ebp),%esi
112f6a: 56 push %esi
112f6b: ff 75 bc pushl -0x44(%ebp)
112f6e: 53 push %ebx
112f6f: e8 b6 f2 ff ff call 11222a <rtems_rfs_inode_open>
112f74: 89 c7 mov %eax,%edi
if (rc > 0)
112f76: 83 c4 10 add $0x10,%esp
112f79: 85 c0 test %eax,%eax
112f7b: 7e 09 jle 112f86 <rtems_rfs_rtems_mknod+0x93><== ALWAYS TAKEN
{
return rtems_rfs_rtems_error ("mknod: inode open", rc);
112f7d: e8 4a c2 00 00 call 11f1cc <__errno> <== NOT EXECUTED
112f82: 89 38 mov %edi,(%eax) <== NOT EXECUTED
112f84: eb 79 jmp 112fff <rtems_rfs_rtems_mknod+0x10c><== NOT EXECUTED
}
if (S_ISDIR(mode) || S_ISREG(mode))
112f86: 8b 45 14 mov 0x14(%ebp),%eax
112f89: 25 00 f0 00 00 and $0xf000,%eax
112f8e: 3d 00 80 00 00 cmp $0x8000,%eax
112f93: 74 4e je 112fe3 <rtems_rfs_rtems_mknod+0xf0>
112f95: 3d 00 40 00 00 cmp $0x4000,%eax
112f9a: 74 47 je 112fe3 <rtems_rfs_rtems_mknod+0xf0><== ALWAYS TAKEN
{
}
else if (S_ISCHR (mode) || S_ISBLK (mode))
112f9c: 8b 45 14 mov 0x14(%ebp),%eax <== NOT EXECUTED
112f9f: 25 00 b0 00 00 and $0xb000,%eax <== NOT EXECUTED
112fa4: 3d 00 20 00 00 cmp $0x2000,%eax <== NOT EXECUTED
112fa9: 75 1f jne 112fca <rtems_rfs_rtems_mknod+0xd7><== NOT EXECUTED
112fab: 8b 7d b0 mov -0x50(%ebp),%edi <== NOT EXECUTED
{
int major;
int minor;
rtems_filesystem_split_dev_t (dev, major, minor);
rtems_rfs_inode_set_block (&inode, 0, major);
112fae: 8b 4d b4 mov -0x4c(%ebp),%ecx <== NOT EXECUTED
112fb1: 31 d2 xor %edx,%edx <== NOT EXECUTED
112fb3: 89 f0 mov %esi,%eax <== NOT EXECUTED
112fb5: e8 16 fa ff ff call 1129d0 <rtems_rfs_inode_set_block><== NOT EXECUTED
rtems_rfs_inode_set_block (&inode, 1, minor);
112fba: 89 f9 mov %edi,%ecx <== NOT EXECUTED
112fbc: ba 01 00 00 00 mov $0x1,%edx <== NOT EXECUTED
112fc1: 89 f0 mov %esi,%eax <== NOT EXECUTED
112fc3: e8 08 fa ff ff call 1129d0 <rtems_rfs_inode_set_block><== NOT EXECUTED
112fc8: eb 19 jmp 112fe3 <rtems_rfs_rtems_mknod+0xf0><== NOT EXECUTED
}
else
{
rtems_rfs_inode_close (fs, &inode);
112fca: 50 push %eax <== NOT EXECUTED
112fcb: 50 push %eax <== NOT EXECUTED
112fcc: 56 push %esi <== NOT EXECUTED
112fcd: 53 push %ebx <== NOT EXECUTED
112fce: e8 d4 f3 ff ff call 1123a7 <rtems_rfs_inode_close> <== NOT EXECUTED
return rtems_rfs_rtems_error ("mknod: bad mode", EINVAL);
112fd3: e8 f4 c1 00 00 call 11f1cc <__errno> <== NOT EXECUTED
112fd8: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
112fde: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
112fe1: eb 1c jmp 112fff <rtems_rfs_rtems_mknod+0x10c><== NOT EXECUTED
}
rc = rtems_rfs_inode_close (fs, &inode);
112fe3: 50 push %eax
112fe4: 50 push %eax
112fe5: 8d 45 c0 lea -0x40(%ebp),%eax
112fe8: 50 push %eax
112fe9: 53 push %ebx
112fea: e8 b8 f3 ff ff call 1123a7 <rtems_rfs_inode_close>
112fef: 89 c3 mov %eax,%ebx
if (rc > 0)
112ff1: 83 c4 10 add $0x10,%esp
112ff4: 85 c0 test %eax,%eax
112ff6: 7e 0c jle 113004 <rtems_rfs_rtems_mknod+0x111><== ALWAYS TAKEN
{
return rtems_rfs_rtems_error ("mknod: closing inode", rc);
112ff8: e8 cf c1 00 00 call 11f1cc <__errno> <== NOT EXECUTED
112ffd: 89 18 mov %ebx,(%eax) <== NOT EXECUTED
112fff: 83 c8 ff or $0xffffffff,%eax
113002: eb 02 jmp 113006 <rtems_rfs_rtems_mknod+0x113>
}
return 0;
113004: 31 c0 xor %eax,%eax
}
113006: 8d 65 f4 lea -0xc(%ebp),%esp
113009: 5b pop %ebx
11300a: 5e pop %esi
11300b: 5f pop %edi
11300c: 5d pop %ebp
11300d: c3 ret
00112e91 <rtems_rfs_rtems_node_type>:
* @return rtems_filesystem_node_types_t
*/
static rtems_filesystem_node_types_t
rtems_rfs_rtems_node_type (const rtems_filesystem_location_info_t* pathloc)
{
112e91: 55 push %ebp
112e92: 89 e5 mov %esp,%ebp
112e94: 57 push %edi
112e95: 56 push %esi
112e96: 53 push %ebx
112e97: 83 ec 3c sub $0x3c,%esp
112e9a: 8b 45 08 mov 0x8(%ebp),%eax
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
112e9d: 8b 50 14 mov 0x14(%eax),%edx
112ea0: 8b 7a 08 mov 0x8(%edx),%edi
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
rtems_filesystem_node_types_t type;
rtems_rfs_inode_handle inode;
int rc;
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
112ea3: 6a 01 push $0x1
112ea5: 8d 5d c0 lea -0x40(%ebp),%ebx
112ea8: 53 push %ebx
112ea9: ff 70 08 pushl 0x8(%eax)
112eac: 57 push %edi
112ead: e8 78 f3 ff ff call 11222a <rtems_rfs_inode_open>
112eb2: 89 c6 mov %eax,%esi
if (rc > 0)
112eb4: 83 c4 10 add $0x10,%esp
112eb7: 85 c0 test %eax,%eax
112eb9: 7e 09 jle 112ec4 <rtems_rfs_rtems_node_type+0x33><== ALWAYS TAKEN
{
return rtems_rfs_rtems_error ("node_type: opening inode", rc);
112ebb: e8 0c c3 00 00 call 11f1cc <__errno> <== NOT EXECUTED
112ec0: 89 30 mov %esi,(%eax) <== NOT EXECUTED
112ec2: eb 22 jmp 112ee6 <rtems_rfs_rtems_node_type+0x55><== NOT EXECUTED
}
type = rtems_rfs_rtems_node_type_by_inode (&inode);
112ec4: 89 d8 mov %ebx,%eax
112ec6: e8 44 fb ff ff call 112a0f <rtems_rfs_rtems_node_type_by_inode>
112ecb: 89 c6 mov %eax,%esi
rc = rtems_rfs_inode_close (fs, &inode);
112ecd: 50 push %eax
112ece: 50 push %eax
112ecf: 53 push %ebx
112ed0: 57 push %edi
112ed1: e8 d1 f4 ff ff call 1123a7 <rtems_rfs_inode_close>
112ed6: 89 c3 mov %eax,%ebx
if (rc > 0)
112ed8: 83 c4 10 add $0x10,%esp
112edb: 85 c0 test %eax,%eax
112edd: 7e 0a jle 112ee9 <rtems_rfs_rtems_node_type+0x58><== ALWAYS TAKEN
{
return rtems_rfs_rtems_error ("node_type: closing inode", rc);
112edf: e8 e8 c2 00 00 call 11f1cc <__errno> <== NOT EXECUTED
112ee4: 89 18 mov %ebx,(%eax) <== NOT EXECUTED
112ee6: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED
}
return type;
}
112ee9: 89 f0 mov %esi,%eax
112eeb: 8d 65 f4 lea -0xc(%ebp),%esp
112eee: 5b pop %ebx
112eef: 5e pop %esi
112ef0: 5f pop %edi
112ef1: 5d pop %ebp
112ef2: c3 ret
00112ba4 <rtems_rfs_rtems_readlink>:
static ssize_t
rtems_rfs_rtems_readlink (const rtems_filesystem_location_info_t* pathloc,
char* buf,
size_t bufsize)
{
112ba4: 55 push %ebp
112ba5: 89 e5 mov %esp,%ebp
112ba7: 53 push %ebx
112ba8: 83 ec 20 sub $0x20,%esp
112bab: 8b 45 08 mov 0x8(%ebp),%eax
int rc;
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_READLINK))
printf ("rtems-rfs-rtems: readlink: in: ino:%" PRId32 "\n", ino);
rc = rtems_rfs_symlink_read (fs, ino, buf, bufsize, &length);
112bae: 8d 55 f4 lea -0xc(%ebp),%edx
112bb1: 52 push %edx
112bb2: ff 75 10 pushl 0x10(%ebp)
112bb5: ff 75 0c pushl 0xc(%ebp)
112bb8: ff 70 08 pushl 0x8(%eax)
static ssize_t
rtems_rfs_rtems_readlink (const rtems_filesystem_location_info_t* pathloc,
char* buf,
size_t bufsize)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
112bbb: 8b 40 14 mov 0x14(%eax),%eax
int rc;
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_READLINK))
printf ("rtems-rfs-rtems: readlink: in: ino:%" PRId32 "\n", ino);
rc = rtems_rfs_symlink_read (fs, ino, buf, bufsize, &length);
112bbe: ff 70 08 pushl 0x8(%eax)
112bc1: e8 56 a9 00 00 call 11d51c <rtems_rfs_symlink_read>
112bc6: 89 c3 mov %eax,%ebx
if (rc)
112bc8: 83 c4 20 add $0x20,%esp
112bcb: 85 c0 test %eax,%eax
112bcd: 74 0c je 112bdb <rtems_rfs_rtems_readlink+0x37><== ALWAYS TAKEN
{
return rtems_rfs_rtems_error ("readlink: reading link", rc);
112bcf: e8 f8 c5 00 00 call 11f1cc <__errno> <== NOT EXECUTED
112bd4: 89 18 mov %ebx,(%eax) <== NOT EXECUTED
112bd6: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
112bd9: eb 03 jmp 112bde <rtems_rfs_rtems_readlink+0x3a><== NOT EXECUTED
}
return (ssize_t) length;
112bdb: 8b 45 f4 mov -0xc(%ebp),%eax
}
112bde: 8b 5d fc mov -0x4(%ebp),%ebx
112be1: c9 leave
112be2: c3 ret
00112b28 <rtems_rfs_rtems_rename>:
rtems_rfs_rtems_rename(const rtems_filesystem_location_info_t* old_parent_loc,
const rtems_filesystem_location_info_t* old_loc,
const rtems_filesystem_location_info_t* new_parent_loc,
const char* new_name,
size_t new_name_len)
{
112b28: 55 push %ebp <== NOT EXECUTED
112b29: 89 e5 mov %esp,%ebp <== NOT EXECUTED
112b2b: 57 push %edi <== NOT EXECUTED
112b2c: 56 push %esi <== NOT EXECUTED
112b2d: 53 push %ebx <== NOT EXECUTED
112b2e: 83 ec 24 sub $0x24,%esp <== NOT EXECUTED
112b31: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (old_loc);
112b34: 8b 50 14 mov 0x14(%eax),%edx <== NOT EXECUTED
112b37: 8b 5a 08 mov 0x8(%edx),%ebx <== NOT EXECUTED
rtems_rfs_ino new_parent;
rtems_rfs_ino ino;
uint32_t doff;
int rc;
old_parent = rtems_rfs_rtems_get_pathloc_ino (old_parent_loc);
112b3a: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
112b3d: 8b 52 08 mov 0x8(%edx),%edx <== NOT EXECUTED
new_parent = rtems_rfs_rtems_get_pathloc_ino (new_parent_loc);
ino = rtems_rfs_rtems_get_pathloc_ino (old_loc);
112b40: 8b 70 08 mov 0x8(%eax),%esi <== NOT EXECUTED
doff = rtems_rfs_rtems_get_pathloc_doff (old_loc);
112b43: 8b 48 0c mov 0xc(%eax),%ecx <== NOT EXECUTED
/*
* Link to the inode before unlinking so the inode is not erased when
* unlinked.
*/
rc = rtems_rfs_link (fs, new_name, new_name_len, new_parent, ino, true);
112b46: 6a 01 push $0x1 <== NOT EXECUTED
112b48: 56 push %esi <== NOT EXECUTED
112b49: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
112b4c: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED
112b4f: ff 75 18 pushl 0x18(%ebp) <== NOT EXECUTED
112b52: ff 75 14 pushl 0x14(%ebp) <== NOT EXECUTED
112b55: 53 push %ebx <== NOT EXECUTED
112b56: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED
112b59: 89 4d e0 mov %ecx,-0x20(%ebp) <== NOT EXECUTED
112b5c: e8 17 a2 00 00 call 11cd78 <rtems_rfs_link> <== NOT EXECUTED
112b61: 89 c7 mov %eax,%edi <== NOT EXECUTED
if (rc)
112b63: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
112b66: 85 c0 test %eax,%eax <== NOT EXECUTED
112b68: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
112b6b: 8b 4d e0 mov -0x20(%ebp),%ecx <== NOT EXECUTED
112b6e: 74 09 je 112b79 <rtems_rfs_rtems_rename+0x51><== NOT EXECUTED
{
return rtems_rfs_rtems_error ("rename: linking", rc);
112b70: e8 57 c6 00 00 call 11f1cc <__errno> <== NOT EXECUTED
112b75: 89 38 mov %edi,(%eax) <== NOT EXECUTED
112b77: eb 20 jmp 112b99 <rtems_rfs_rtems_rename+0x71><== NOT EXECUTED
/*
* Unlink all inodes even directories with the dir option as false because a
* directory may not be empty.
*/
rc = rtems_rfs_unlink (fs, old_parent, ino, doff,
112b79: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
112b7c: 6a 02 push $0x2 <== NOT EXECUTED
112b7e: 51 push %ecx <== NOT EXECUTED
112b7f: 56 push %esi <== NOT EXECUTED
112b80: 52 push %edx <== NOT EXECUTED
112b81: 53 push %ebx <== NOT EXECUTED
112b82: e8 80 a3 00 00 call 11cf07 <rtems_rfs_unlink> <== NOT EXECUTED
112b87: 89 c3 mov %eax,%ebx <== NOT EXECUTED
rtems_rfs_unlink_dir_allowed);
if (rc)
112b89: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
{
return rtems_rfs_rtems_error ("rename: unlinking", rc);
}
return 0;
112b8c: 31 c0 xor %eax,%eax <== NOT EXECUTED
* Unlink all inodes even directories with the dir option as false because a
* directory may not be empty.
*/
rc = rtems_rfs_unlink (fs, old_parent, ino, doff,
rtems_rfs_unlink_dir_allowed);
if (rc)
112b8e: 85 db test %ebx,%ebx <== NOT EXECUTED
112b90: 74 0a je 112b9c <rtems_rfs_rtems_rename+0x74><== NOT EXECUTED
{
return rtems_rfs_rtems_error ("rename: unlinking", rc);
112b92: e8 35 c6 00 00 call 11f1cc <__errno> <== NOT EXECUTED
112b97: 89 18 mov %ebx,(%eax) <== NOT EXECUTED
112b99: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
}
return 0;
}
112b9c: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
112b9f: 5b pop %ebx <== NOT EXECUTED
112ba0: 5e pop %esi <== NOT EXECUTED
112ba1: 5f pop %edi <== NOT EXECUTED
112ba2: 5d pop %ebp <== NOT EXECUTED
112ba3: c3 ret <== NOT EXECUTED
00113800 <rtems_rfs_rtems_set_handlers>:
*/
bool
rtems_rfs_rtems_set_handlers (rtems_filesystem_location_info_t* loc,
rtems_rfs_inode_handle* inode)
{
113800: 55 push %ebp
113801: 89 e5 mov %esp,%ebp
113803: 53 push %ebx
113804: 51 push %ecx
113805: 8b 55 08 mov 0x8(%ebp),%edx
{
/*
* Mapping matches RTEMS so no need to change.
*/
return imode;
}
113808: 8b 45 0c mov 0xc(%ebp),%eax
11380b: 8b 40 0c mov 0xc(%eax),%eax
11380e: 0f b6 48 02 movzbl 0x2(%eax),%ecx
113812: c1 e1 08 shl $0x8,%ecx
113815: 0f b6 40 03 movzbl 0x3(%eax),%eax
113819: 09 c8 or %ecx,%eax
bool
rtems_rfs_rtems_set_handlers (rtems_filesystem_location_info_t* loc,
rtems_rfs_inode_handle* inode)
{
uint16_t mode = rtems_rfs_inode_get_mode (inode);
loc->handlers = NULL;
11381b: c7 42 10 00 00 00 00 movl $0x0,0x10(%edx)
if (RTEMS_RFS_S_ISDIR (mode))
113822: 89 c1 mov %eax,%ecx
113824: 66 81 e1 00 f0 and $0xf000,%cx
113829: 66 81 f9 00 40 cmp $0x4000,%cx
11382e: 75 09 jne 113839 <rtems_rfs_rtems_set_handlers+0x39>
loc->handlers = rtems_rfs_rtems_handlers (dir);
113830: c7 42 10 ec 21 13 00 movl $0x1321ec,0x10(%edx)
113837: eb 15 jmp 11384e <rtems_rfs_rtems_set_handlers+0x4e>
else if (RTEMS_RFS_S_ISCHR (mode) || RTEMS_RFS_S_ISBLK(mode))
113839: 89 c3 mov %eax,%ebx
11383b: 66 81 e3 00 b0 and $0xb000,%bx
113840: 66 81 fb 00 20 cmp $0x2000,%bx
113845: 75 0b jne 113852 <rtems_rfs_rtems_set_handlers+0x52><== ALWAYS TAKEN
loc->handlers = rtems_rfs_rtems_handlers (device);
113847: c7 42 10 c0 21 13 00 movl $0x1321c0,0x10(%edx) <== NOT EXECUTED
else
{
printf ("rtems-rfs: mode type unknown: %04x\n", mode);
return false;
}
return true;
11384e: b0 01 mov $0x1,%al
113850: eb 35 jmp 113887 <rtems_rfs_rtems_set_handlers+0x87>
loc->handlers = NULL;
if (RTEMS_RFS_S_ISDIR (mode))
loc->handlers = rtems_rfs_rtems_handlers (dir);
else if (RTEMS_RFS_S_ISCHR (mode) || RTEMS_RFS_S_ISBLK(mode))
loc->handlers = rtems_rfs_rtems_handlers (device);
else if (RTEMS_RFS_S_ISLNK (mode))
113852: 66 81 f9 00 a0 cmp $0xa000,%cx
113857: 75 09 jne 113862 <rtems_rfs_rtems_set_handlers+0x62>
loc->handlers = rtems_rfs_rtems_handlers (link);
113859: c7 42 10 88 05 13 00 movl $0x130588,0x10(%edx)
113860: eb ec jmp 11384e <rtems_rfs_rtems_set_handlers+0x4e>
else if (RTEMS_RFS_S_ISREG (mode))
113862: 66 81 f9 00 80 cmp $0x8000,%cx
113867: 75 09 jne 113872 <rtems_rfs_rtems_set_handlers+0x72><== NEVER TAKEN
loc->handlers = rtems_rfs_rtems_handlers (file);
113869: c7 42 10 18 22 13 00 movl $0x132218,0x10(%edx)
113870: eb dc jmp 11384e <rtems_rfs_rtems_set_handlers+0x4e>
else
{
printf ("rtems-rfs: mode type unknown: %04x\n", mode);
113872: 52 push %edx <== NOT EXECUTED
113873: 52 push %edx <== NOT EXECUTED
113874: 0f b7 c0 movzwl %ax,%eax <== NOT EXECUTED
113877: 50 push %eax <== NOT EXECUTED
113878: 68 bc 05 13 00 push $0x1305bc <== NOT EXECUTED
11387d: e8 ba ca 00 00 call 12033c <printf> <== NOT EXECUTED
return false;
113882: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
113885: 31 c0 xor %eax,%eax <== NOT EXECUTED
}
return true;
}
113887: 8b 5d fc mov -0x4(%ebp),%ebx
11388a: c9 leave
11388b: c3 ret
00112a67 <rtems_rfs_rtems_statvfs>:
* @return int
*/
static int
rtems_rfs_rtems_statvfs (const rtems_filesystem_location_info_t* pathloc,
struct statvfs* sb)
{
112a67: 55 push %ebp <== NOT EXECUTED
112a68: 89 e5 mov %esp,%ebp <== NOT EXECUTED
112a6a: 56 push %esi <== NOT EXECUTED
112a6b: 53 push %ebx <== NOT EXECUTED
112a6c: 83 ec 14 sub $0x14,%esp <== NOT EXECUTED
112a6f: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
112a72: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
112a75: 8b 40 14 mov 0x14(%eax),%eax <== NOT EXECUTED
112a78: 8b 70 08 mov 0x8(%eax),%esi <== NOT EXECUTED
size_t blocks;
size_t inodes;
rtems_rfs_group_usage (fs, &blocks, &inodes);
112a7b: 8d 45 f4 lea -0xc(%ebp),%eax <== NOT EXECUTED
112a7e: 50 push %eax <== NOT EXECUTED
112a7f: 8d 45 f0 lea -0x10(%ebp),%eax <== NOT EXECUTED
112a82: 50 push %eax <== NOT EXECUTED
112a83: 56 push %esi <== NOT EXECUTED
112a84: e8 8d f6 ff ff call 112116 <rtems_rfs_group_usage> <== NOT EXECUTED
sb->f_bsize = rtems_rfs_fs_block_size (fs);
112a89: 8b 46 08 mov 0x8(%esi),%eax <== NOT EXECUTED
112a8c: 89 03 mov %eax,(%ebx) <== NOT EXECUTED
sb->f_frsize = rtems_rfs_fs_media_block_size (fs);
112a8e: 8b 46 10 mov 0x10(%esi),%eax <== NOT EXECUTED
112a91: 8b 50 20 mov 0x20(%eax),%edx <== NOT EXECUTED
112a94: 89 53 04 mov %edx,0x4(%ebx) <== NOT EXECUTED
sb->f_blocks = rtems_rfs_fs_media_blocks (fs);
112a97: 8b 50 1c mov 0x1c(%eax),%edx <== NOT EXECUTED
112a9a: 89 53 08 mov %edx,0x8(%ebx) <== NOT EXECUTED
112a9d: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) <== NOT EXECUTED
sb->f_bfree = rtems_rfs_fs_blocks (fs) - blocks;
112aa4: 8b 46 04 mov 0x4(%esi),%eax <== NOT EXECUTED
112aa7: 2b 45 f0 sub -0x10(%ebp),%eax <== NOT EXECUTED
112aaa: 89 43 10 mov %eax,0x10(%ebx) <== NOT EXECUTED
112aad: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) <== NOT EXECUTED
sb->f_bavail = sb->f_bfree;
112ab4: 89 43 18 mov %eax,0x18(%ebx) <== NOT EXECUTED
112ab7: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx) <== NOT EXECUTED
sb->f_files = rtems_rfs_fs_inodes (fs);
112abe: 8b 46 14 mov 0x14(%esi),%eax <== NOT EXECUTED
112ac1: 89 43 20 mov %eax,0x20(%ebx) <== NOT EXECUTED
sb->f_ffree = rtems_rfs_fs_inodes (fs) - inodes;
112ac4: 2b 45 f4 sub -0xc(%ebp),%eax <== NOT EXECUTED
112ac7: 89 43 24 mov %eax,0x24(%ebx) <== NOT EXECUTED
sb->f_favail = sb->f_ffree;
112aca: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED
sb->f_fsid = RTEMS_RFS_SB_MAGIC;
112acd: c7 43 2c 01 20 09 28 movl $0x28092001,0x2c(%ebx) <== NOT EXECUTED
sb->f_flag = rtems_rfs_fs_flags (fs);
112ad4: 8b 06 mov (%esi),%eax <== NOT EXECUTED
112ad6: 89 43 30 mov %eax,0x30(%ebx) <== NOT EXECUTED
sb->f_namemax = rtems_rfs_fs_max_name (fs);
112ad9: 8b 46 1c mov 0x1c(%esi),%eax <== NOT EXECUTED
112adc: 89 43 34 mov %eax,0x34(%ebx) <== NOT EXECUTED
return 0;
}
112adf: 31 c0 xor %eax,%eax <== NOT EXECUTED
112ae1: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
112ae4: 5b pop %ebx <== NOT EXECUTED
112ae5: 5e pop %esi <== NOT EXECUTED
112ae6: 5d pop %ebp <== NOT EXECUTED
112ae7: c3 ret <== NOT EXECUTED
00112be3 <rtems_rfs_rtems_symlink>:
static int
rtems_rfs_rtems_symlink (const rtems_filesystem_location_info_t* parent_loc,
const char* node_name,
size_t node_name_len,
const char* target)
{
112be3: 55 push %ebp
112be4: 89 e5 mov %esp,%ebp
112be6: 57 push %edi
112be7: 56 push %esi
112be8: 53 push %ebx
112be9: 83 ec 1c sub $0x1c,%esp
112bec: 8b 45 08 mov 0x8(%ebp),%eax
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (parent_loc);
112bef: 8b 50 14 mov 0x14(%eax),%edx
112bf2: 8b 5a 08 mov 0x8(%edx),%ebx
rtems_rfs_ino parent = rtems_rfs_rtems_get_pathloc_ino (parent_loc);
112bf5: 8b 70 08 mov 0x8(%eax),%esi
int rc;
rc = rtems_rfs_symlink (fs, node_name, node_name_len,
target, strlen (target),
geteuid(), getegid(), parent);
112bf8: e8 a3 38 00 00 call 1164a0 <getegid>
112bfd: 66 89 45 e6 mov %ax,-0x1a(%ebp)
112c01: e8 aa 38 00 00 call 1164b0 <geteuid>
112c06: 0f b7 d0 movzwl %ax,%edx
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (parent_loc);
rtems_rfs_ino parent = rtems_rfs_rtems_get_pathloc_ino (parent_loc);
int rc;
rc = rtems_rfs_symlink (fs, node_name, node_name_len,
target, strlen (target),
112c09: 31 c0 xor %eax,%eax
112c0b: 83 c9 ff or $0xffffffff,%ecx
112c0e: 8b 7d 14 mov 0x14(%ebp),%edi
112c11: f2 ae repnz scas %es:(%edi),%al
112c13: f7 d1 not %ecx
112c15: 49 dec %ecx
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (parent_loc);
rtems_rfs_ino parent = rtems_rfs_rtems_get_pathloc_ino (parent_loc);
int rc;
rc = rtems_rfs_symlink (fs, node_name, node_name_len,
112c16: 56 push %esi
112c17: 0f b7 45 e6 movzwl -0x1a(%ebp),%eax
112c1b: 50 push %eax
112c1c: 52 push %edx
112c1d: 51 push %ecx
112c1e: ff 75 14 pushl 0x14(%ebp)
112c21: ff 75 10 pushl 0x10(%ebp)
112c24: ff 75 0c pushl 0xc(%ebp)
112c27: 53 push %ebx
112c28: e8 45 a6 00 00 call 11d272 <rtems_rfs_symlink>
112c2d: 89 c3 mov %eax,%ebx
target, strlen (target),
geteuid(), getegid(), parent);
if (rc)
112c2f: 83 c4 20 add $0x20,%esp
{
return rtems_rfs_rtems_error ("symlink: linking", rc);
}
return 0;
112c32: 31 c0 xor %eax,%eax
int rc;
rc = rtems_rfs_symlink (fs, node_name, node_name_len,
target, strlen (target),
geteuid(), getegid(), parent);
if (rc)
112c34: 85 db test %ebx,%ebx
112c36: 74 0a je 112c42 <rtems_rfs_rtems_symlink+0x5f><== ALWAYS TAKEN
{
return rtems_rfs_rtems_error ("symlink: linking", rc);
112c38: e8 8f c5 00 00 call 11f1cc <__errno> <== NOT EXECUTED
112c3d: 89 18 mov %ebx,(%eax) <== NOT EXECUTED
112c3f: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
}
return 0;
}
112c42: 8d 65 f4 lea -0xc(%ebp),%esp
112c45: 5b pop %ebx
112c46: 5e pop %esi
112c47: 5f pop %edi
112c48: 5d pop %ebp
112c49: c3 ret
0011d848 <rtems_rfs_rtems_unlock>:
/**
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
11d848: 55 push %ebp
11d849: 89 e5 mov %esp,%ebp
11d84b: 53 push %ebx
11d84c: 83 ec 10 sub $0x10,%esp
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
11d84f: 8b 98 80 00 00 00 mov 0x80(%eax),%ebx
rtems_rfs_buffers_release (fs);
11d855: 50 push %eax
11d856: e8 3e ce ff ff call 11a699 <rtems_rfs_buffers_release>
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
11d85b: 58 pop %eax
11d85c: ff 33 pushl (%ebx)
11d85e: e8 25 05 ff ff call 10dd88 <rtems_semaphore_release>
11d863: 89 c3 mov %eax,%ebx
if (sc != RTEMS_SUCCESSFUL)
11d865: 83 c4 10 add $0x10,%esp
11d868: 85 c0 test %eax,%eax
11d86a: 74 2b je 11d897 <rtems_rfs_rtems_unlock+0x4f><== ALWAYS TAKEN
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
11d86c: 50 push %eax <== NOT EXECUTED
11d86d: 50 push %eax <== NOT EXECUTED
11d86e: 6a 00 push $0x0 <== NOT EXECUTED
11d870: 6a 04 push $0x4 <== NOT EXECUTED
11d872: e8 25 60 ff ff call 11389c <rtems_rfs_trace> <== NOT EXECUTED
11d877: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11d87a: 84 c0 test %al,%al <== NOT EXECUTED
11d87c: 74 19 je 11d897 <rtems_rfs_rtems_unlock+0x4f><== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
11d87e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11d881: 53 push %ebx <== NOT EXECUTED
11d882: e8 95 c4 fe ff call 109d1c <rtems_status_text> <== NOT EXECUTED
11d887: 5a pop %edx <== NOT EXECUTED
11d888: 59 pop %ecx <== NOT EXECUTED
11d889: 50 push %eax <== NOT EXECUTED
11d88a: 68 b2 04 13 00 push $0x1304b2 <== NOT EXECUTED
11d88f: e8 a8 2a 00 00 call 12033c <printf> <== NOT EXECUTED
11d894: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_rfs_mutex_unlock (&rtems->access);
}
11d897: 8b 5d fc mov -0x4(%ebp),%ebx
11d89a: c9 leave
11d89b: c3 ret
00112c4a <rtems_rfs_rtems_utime>:
static int
rtems_rfs_rtems_utime(const rtems_filesystem_location_info_t* pathloc,
time_t atime,
time_t mtime)
{
112c4a: 55 push %ebp <== NOT EXECUTED
112c4b: 89 e5 mov %esp,%ebp <== NOT EXECUTED
112c4d: 57 push %edi <== NOT EXECUTED
112c4e: 56 push %esi <== NOT EXECUTED
112c4f: 53 push %ebx <== NOT EXECUTED
112c50: 83 ec 3c sub $0x3c,%esp <== NOT EXECUTED
112c53: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
112c56: 8b 50 14 mov 0x14(%eax),%edx <== NOT EXECUTED
112c59: 8b 7a 08 mov 0x8(%edx),%edi <== NOT EXECUTED
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
rtems_rfs_inode_handle inode;
int rc;
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
112c5c: 6a 01 push $0x1 <== NOT EXECUTED
112c5e: 8d 75 c0 lea -0x40(%ebp),%esi <== NOT EXECUTED
112c61: 56 push %esi <== NOT EXECUTED
112c62: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED
112c65: 57 push %edi <== NOT EXECUTED
112c66: e8 bf f5 ff ff call 11222a <rtems_rfs_inode_open> <== NOT EXECUTED
112c6b: 89 c3 mov %eax,%ebx <== NOT EXECUTED
if (rc)
112c6d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
112c70: 85 c0 test %eax,%eax <== NOT EXECUTED
112c72: 74 02 je 112c76 <rtems_rfs_rtems_utime+0x2c><== NOT EXECUTED
112c74: eb 5d jmp 112cd3 <rtems_rfs_rtems_utime+0x89><== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_atime (rtems_rfs_inode_handle* handle,
rtems_rfs_time atime)
{
rtems_rfs_write_u32 (&handle->node->atime, atime);
112c76: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED
112c79: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED
112c7c: c1 e9 18 shr $0x18,%ecx <== NOT EXECUTED
112c7f: 88 48 10 mov %cl,0x10(%eax) <== NOT EXECUTED
112c82: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED
112c85: c1 e9 10 shr $0x10,%ecx <== NOT EXECUTED
112c88: 88 48 11 mov %cl,0x11(%eax) <== NOT EXECUTED
112c8b: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED
112c8e: c1 e9 08 shr $0x8,%ecx <== NOT EXECUTED
112c91: 88 48 12 mov %cl,0x12(%eax) <== NOT EXECUTED
112c94: 8a 55 0c mov 0xc(%ebp),%dl <== NOT EXECUTED
112c97: 88 50 13 mov %dl,0x13(%eax) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
112c9a: c6 45 d0 01 movb $0x1,-0x30(%ebp) <== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_mtime (rtems_rfs_inode_handle* handle,
rtems_rfs_time mtime)
{
rtems_rfs_write_u32 (&handle->node->mtime, mtime);
112c9e: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED
112ca1: c1 e9 18 shr $0x18,%ecx <== NOT EXECUTED
112ca4: 88 48 14 mov %cl,0x14(%eax) <== NOT EXECUTED
112ca7: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED
112caa: c1 e9 10 shr $0x10,%ecx <== NOT EXECUTED
112cad: 88 48 15 mov %cl,0x15(%eax) <== NOT EXECUTED
112cb0: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED
112cb3: c1 e9 08 shr $0x8,%ecx <== NOT EXECUTED
112cb6: 88 48 16 mov %cl,0x16(%eax) <== NOT EXECUTED
112cb9: 8a 55 10 mov 0x10(%ebp),%dl <== NOT EXECUTED
112cbc: 88 50 17 mov %dl,0x17(%eax) <== NOT EXECUTED
}
rtems_rfs_inode_set_atime (&inode, atime);
rtems_rfs_inode_set_mtime (&inode, mtime);
rc = rtems_rfs_inode_close (fs, &inode);
112cbf: 50 push %eax <== NOT EXECUTED
112cc0: 50 push %eax <== NOT EXECUTED
112cc1: 56 push %esi <== NOT EXECUTED
112cc2: 57 push %edi <== NOT EXECUTED
112cc3: e8 df f6 ff ff call 1123a7 <rtems_rfs_inode_close> <== NOT EXECUTED
112cc8: 89 c3 mov %eax,%ebx <== NOT EXECUTED
if (rc)
112cca: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
{
return rtems_rfs_rtems_error ("utime: closing inode", rc);
}
return 0;
112ccd: 31 c0 xor %eax,%eax <== NOT EXECUTED
rtems_rfs_inode_set_atime (&inode, atime);
rtems_rfs_inode_set_mtime (&inode, mtime);
rc = rtems_rfs_inode_close (fs, &inode);
if (rc)
112ccf: 85 db test %ebx,%ebx <== NOT EXECUTED
112cd1: 74 0a je 112cdd <rtems_rfs_rtems_utime+0x93><== NOT EXECUTED
{
return rtems_rfs_rtems_error ("utime: closing inode", rc);
112cd3: e8 f4 c4 00 00 call 11f1cc <__errno> <== NOT EXECUTED
112cd8: 89 18 mov %ebx,(%eax) <== NOT EXECUTED
112cda: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
}
return 0;
}
112cdd: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
112ce0: 5b pop %ebx <== NOT EXECUTED
112ce1: 5e pop %esi <== NOT EXECUTED
112ce2: 5f pop %edi <== NOT EXECUTED
112ce3: 5d pop %ebp <== NOT EXECUTED
112ce4: c3 ret <== NOT EXECUTED
0011a04e <rtems_rfs_scan_chain>:
*/
static rtems_rfs_buffer*
rtems_rfs_scan_chain (rtems_chain_control* chain,
uint32_t* count,
rtems_rfs_buffer_block block)
{
11a04e: 55 push %ebp
11a04f: 89 e5 mov %esp,%ebp
11a051: 57 push %edi
11a052: 56 push %esi
11a053: 53 push %ebx
11a054: 83 ec 24 sub $0x24,%esp
11a057: 89 45 e4 mov %eax,-0x1c(%ebp)
11a05a: 89 d6 mov %edx,%esi
11a05c: 89 cf mov %ecx,%edi
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last(
Chain_Control *the_chain
)
{
return _Chain_Tail( the_chain )->previous;
11a05e: 8b 58 08 mov 0x8(%eax),%ebx
rtems_rfs_buffer* buffer;
rtems_chain_node* node;
node = rtems_chain_last (chain);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
11a061: 6a 00 push $0x0
11a063: 68 80 00 00 00 push $0x80
11a068: e8 2f 98 ff ff call 11389c <rtems_rfs_trace>
11a06d: 83 c4 10 add $0x10,%esp
11a070: 84 c0 test %al,%al
11a072: 0f 84 83 00 00 00 je 11a0fb <rtems_rfs_scan_chain+0xad><== ALWAYS TAKEN
printf ("rtems-rfs: buffer-scan: count=%" PRIu32 ", block=%" PRIu32 ": ", *count, block);
11a078: 52 push %edx <== NOT EXECUTED
11a079: 57 push %edi <== NOT EXECUTED
11a07a: ff 36 pushl (%esi) <== NOT EXECUTED
11a07c: 68 b5 0d 13 00 push $0x130db5 <== NOT EXECUTED
11a081: e8 b6 62 00 00 call 12033c <printf> <== NOT EXECUTED
11a086: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11a089: eb 70 jmp 11a0fb <rtems_rfs_scan_chain+0xad><== NOT EXECUTED
while (!rtems_chain_is_head (chain, node))
{
buffer = (rtems_rfs_buffer*) node;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
11a08b: 50 push %eax
11a08c: 50 push %eax
11a08d: 6a 00 push $0x0
11a08f: 68 80 00 00 00 push $0x80
11a094: e8 03 98 ff ff call 11389c <rtems_rfs_trace>
11a099: 83 c4 10 add $0x10,%esp
11a09c: 84 c0 test %al,%al
11a09e: 74 12 je 11a0b2 <rtems_rfs_scan_chain+0x64><== ALWAYS TAKEN
printf ("%" PRIuPTR " ", ((intptr_t) buffer->user));
11a0a0: 50 push %eax <== NOT EXECUTED
11a0a1: 50 push %eax <== NOT EXECUTED
11a0a2: ff 73 34 pushl 0x34(%ebx) <== NOT EXECUTED
11a0a5: 68 e4 0d 13 00 push $0x130de4 <== NOT EXECUTED
11a0aa: e8 8d 62 00 00 call 12033c <printf> <== NOT EXECUTED
11a0af: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
if (((rtems_rfs_buffer_block) ((intptr_t)(buffer->user))) == block)
11a0b2: 39 7b 34 cmp %edi,0x34(%ebx)
11a0b5: 75 41 jne 11a0f8 <rtems_rfs_scan_chain+0xaa>
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
11a0b7: 50 push %eax
11a0b8: 50 push %eax
11a0b9: 6a 00 push $0x0
11a0bb: 68 80 00 00 00 push $0x80
11a0c0: e8 d7 97 ff ff call 11389c <rtems_rfs_trace>
11a0c5: 83 c4 10 add $0x10,%esp
11a0c8: 84 c0 test %al,%al
11a0ca: 74 12 je 11a0de <rtems_rfs_scan_chain+0x90><== ALWAYS TAKEN
printf (": found block=%" PRIuPTR "\n",
11a0cc: 50 push %eax <== NOT EXECUTED
11a0cd: 50 push %eax <== NOT EXECUTED
11a0ce: ff 73 34 pushl 0x34(%ebx) <== NOT EXECUTED
11a0d1: 68 e9 0d 13 00 push $0x130de9 <== NOT EXECUTED
11a0d6: e8 61 62 00 00 call 12033c <printf> <== NOT EXECUTED
11a0db: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
((intptr_t)(buffer->user)));
(*count)--;
11a0de: ff 0e decl (%esi)
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
11a0e0: 83 ec 0c sub $0xc,%esp
11a0e3: 53 push %ebx
11a0e4: e8 1b d7 ff ff call 117804 <_Chain_Extract>
*/
RTEMS_INLINE_ROUTINE void _Chain_Set_off_chain(
Chain_Node *node
)
{
node->next = node->previous = NULL;
11a0e9: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx)
11a0f0: c7 03 00 00 00 00 movl $0x0,(%ebx)
11a0f6: eb 2c jmp 11a124 <rtems_rfs_scan_chain+0xd6>
true);
if ((rc > 0) && (rrc == 0))
rrc = rc;
return rrc;
}
11a0f8: 8b 5b 04 mov 0x4(%ebx),%ebx
node = rtems_chain_last (chain);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
printf ("rtems-rfs: buffer-scan: count=%" PRIu32 ", block=%" PRIu32 ": ", *count, block);
while (!rtems_chain_is_head (chain, node))
11a0fb: 3b 5d e4 cmp -0x1c(%ebp),%ebx
11a0fe: 75 8b jne 11a08b <rtems_rfs_scan_chain+0x3d>
return buffer;
}
node = rtems_chain_previous (node);
}
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
11a100: 50 push %eax
11a101: 50 push %eax
11a102: 6a 00 push $0x0
11a104: 68 80 00 00 00 push $0x80
11a109: e8 8e 97 ff ff call 11389c <rtems_rfs_trace>
11a10e: 83 c4 10 add $0x10,%esp
printf (": not found\n");
return NULL;
11a111: 31 db xor %ebx,%ebx
return buffer;
}
node = rtems_chain_previous (node);
}
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
11a113: 84 c0 test %al,%al
11a115: 74 10 je 11a127 <rtems_rfs_scan_chain+0xd9><== ALWAYS TAKEN
printf (": not found\n");
11a117: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11a11a: 68 fc 0d 13 00 push $0x130dfc <== NOT EXECUTED
11a11f: e8 30 64 00 00 call 120554 <puts> <== NOT EXECUTED
11a124: 83 c4 10 add $0x10,%esp
return NULL;
}
11a127: 89 d8 mov %ebx,%eax
11a129: 8d 65 f4 lea -0xc(%ebp),%esp
11a12c: 5b pop %ebx
11a12d: 5e pop %esi
11a12e: 5f pop %edi
11a12f: 5d pop %ebp
11a130: c3 ret
00118c92 <rtems_rfs_search_map_for_clear_bit.constprop.1>:
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
118c92: 55 push %ebp
118c93: 89 e5 mov %esp,%ebp
118c95: 57 push %edi
118c96: 56 push %esi
118c97: 53 push %ebx
118c98: 83 ec 6c sub $0x6c,%esp
118c9b: 89 c3 mov %eax,%ebx
118c9d: 89 55 ac mov %edx,-0x54(%ebp)
118ca0: 89 4d a8 mov %ecx,-0x58(%ebp)
118ca3: 8b 7d 08 mov 0x8(%ebp),%edi
rtems_rfs_bitmap_element* map_bits;
int map_index;
int map_offset;
int rc;
*found = false;
118ca6: c6 01 00 movb $0x0,(%ecx)
/*
* Load the bitmap.
*/
rc = rtems_rfs_bitmap_load_map (control, &map);
118ca9: 8d 55 e4 lea -0x1c(%ebp),%edx
118cac: e8 9f ff ff ff call 118c50 <rtems_rfs_bitmap_load_map>
if (rc > 0)
118cb1: 85 c0 test %eax,%eax
118cb3: 0f 8f c7 01 00 00 jg 118e80 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x1ee><== NEVER TAKEN
return rc;
/*
* Calculate the bit we are testing plus the end point we search over.
*/
test_bit = *bit;
118cb9: 8b 55 ac mov -0x54(%ebp),%edx
118cbc: 8b 02 mov (%edx),%eax
end_bit = test_bit + (window * direction);
118cbe: 89 fa mov %edi,%edx
118cc0: c1 e2 0b shl $0xb,%edx
if (end_bit < 0)
118cc3: 01 c2 add %eax,%edx
118cc5: 89 55 d0 mov %edx,-0x30(%ebp)
118cc8: 78 0e js 118cd8 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x46>
end_bit = 0;
else if (end_bit >= control->size)
118cca: 8b 53 0c mov 0xc(%ebx),%edx
118ccd: 39 55 d0 cmp %edx,-0x30(%ebp)
118cd0: 72 0d jb 118cdf <rtems_rfs_search_map_for_clear_bit.constprop.1+0x4d>
end_bit = control->size - 1;
118cd2: 4a dec %edx
118cd3: 89 55 d0 mov %edx,-0x30(%ebp)
118cd6: eb 07 jmp 118cdf <rtems_rfs_search_map_for_clear_bit.constprop.1+0x4d>
*/
test_bit = *bit;
end_bit = test_bit + (window * direction);
if (end_bit < 0)
end_bit = 0;
118cd8: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp)
else if (end_bit >= control->size)
end_bit = control->size - 1;
map_index = rtems_rfs_bitmap_map_index (test_bit);
118cdf: 89 c6 mov %eax,%esi
118ce1: c1 fe 05 sar $0x5,%esi
118ce4: 89 75 c8 mov %esi,-0x38(%ebp)
map_offset = rtems_rfs_bitmap_map_offset (test_bit);
118ce7: 89 c6 mov %eax,%esi
118ce9: 83 e6 1f and $0x1f,%esi
search_index = rtems_rfs_bitmap_map_index (map_index);
search_offset = rtems_rfs_bitmap_map_offset (map_index);
118cec: 8b 55 c8 mov -0x38(%ebp),%edx
118cef: 83 e2 1f and $0x1f,%edx
118cf2: 89 55 d4 mov %edx,-0x2c(%ebp)
else if (end_bit >= control->size)
end_bit = control->size - 1;
map_index = rtems_rfs_bitmap_map_index (test_bit);
map_offset = rtems_rfs_bitmap_map_offset (test_bit);
search_index = rtems_rfs_bitmap_map_index (map_index);
118cf5: 89 c1 mov %eax,%ecx
118cf7: c1 f9 0a sar $0xa,%ecx
search_offset = rtems_rfs_bitmap_map_offset (map_index);
search_bits = &control->search_bits[search_index];
118cfa: 8b 53 14 mov 0x14(%ebx),%edx
118cfd: 8d 14 8a lea (%edx,%ecx,4),%edx
118d00: 89 55 c0 mov %edx,-0x40(%ebp)
map_bits = &map[map_index];
118d03: 8b 55 e4 mov -0x1c(%ebp),%edx
118d06: 8b 4d c8 mov -0x38(%ebp),%ecx
118d09: 8d 14 8a lea (%edx,%ecx,4),%edx
118d0c: 89 55 c4 mov %edx,-0x3c(%ebp)
map_offset += direction;
test_bit += direction;
}
}
map_bits += direction;
118d0f: 8d 14 bd 00 00 00 00 lea 0x0(,%edi,4),%edx
118d16: 89 55 b0 mov %edx,-0x50(%ebp)
118d19: 31 d2 xor %edx,%edx
118d1b: 85 ff test %edi,%edi
118d1d: 0f 9f c2 setg %dl
118d20: 4a dec %edx
118d21: 83 e2 1f and $0x1f,%edx
118d24: 89 55 cc mov %edx,-0x34(%ebp)
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
118d27: 89 fa mov %edi,%edx
118d29: c1 e2 05 shl $0x5,%edx
118d2c: 89 55 94 mov %edx,-0x6c(%ebp)
test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset;
search_offset += direction;
if (((direction < 0) && (test_bit <= end_bit))
118d2f: 89 fa mov %edi,%edx
118d31: c1 ea 1f shr $0x1f,%edx
118d34: 88 55 98 mov %dl,-0x68(%ebp)
118d37: eb 03 jmp 118d3c <rtems_rfs_search_map_for_clear_bit.constprop.1+0xaa>
*/
test_bit = *bit;
end_bit = test_bit + (window * direction);
if (end_bit < 0)
end_bit = 0;
118d39: 89 55 c8 mov %edx,-0x38(%ebp)
/*
* 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))
118d3c: 8b 55 c0 mov -0x40(%ebp),%edx
118d3f: 8b 12 mov (%edx),%edx
118d41: 89 55 b4 mov %edx,-0x4c(%ebp)
118d44: 85 d2 test %edx,%edx
118d46: 0f 84 c1 00 00 00 je 118e0d <rtems_rfs_search_map_for_clear_bit.constprop.1+0x17b>
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
118d4c: 8b 55 c8 mov -0x38(%ebp),%edx
118d4f: 01 fa add %edi,%edx
118d51: c1 e2 05 shl $0x5,%edx
118d54: 03 55 cc add -0x34(%ebp),%edx
118d57: 89 55 b8 mov %edx,-0x48(%ebp)
118d5a: 8b 55 c8 mov -0x38(%ebp),%edx
118d5d: e9 98 00 00 00 jmp 118dfa <rtems_rfs_search_map_for_clear_bit.constprop.1+0x168>
*/
static bool
rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_bit bit)
{
return RTEMS_RFS_BITMAP_TEST_BIT (target, bit);
118d62: c7 45 bc 01 00 00 00 movl $0x1,-0x44(%ebp)
118d69: d3 65 bc shll %cl,-0x44(%ebp)
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))
118d6c: 8b 4d b4 mov -0x4c(%ebp),%ecx
118d6f: 85 4d bc test %ecx,-0x44(%ebp)
118d72: 74 5e je 118dd2 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x140>
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
118d74: 29 c6 sub %eax,%esi
118d76: 89 75 90 mov %esi,-0x70(%ebp)
118d79: eb 4d jmp 118dc8 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x136>
* 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))
118d7b: 8b 75 c4 mov -0x3c(%ebp),%esi
118d7e: 8b 36 mov (%esi),%esi
118d80: 89 75 8c mov %esi,-0x74(%ebp)
*/
static bool
rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_bit bit)
{
return RTEMS_RFS_BITMAP_TEST_BIT (target, bit);
118d83: be 01 00 00 00 mov $0x1,%esi
118d88: d3 e6 shl %cl,%esi
118d8a: 89 f1 mov %esi,%ecx
* 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))
118d8c: 85 75 8c test %esi,-0x74(%ebp)
118d8f: 74 30 je 118dc1 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x12f>
*/
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);
118d91: f7 d1 not %ecx
118d93: 23 4d 8c and -0x74(%ebp),%ecx
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);
118d96: 8b 55 c4 mov -0x3c(%ebp),%edx
118d99: 89 0a mov %ecx,(%edx)
if (rtems_rfs_bitmap_match(*map_bits,
118d9b: 85 c9 test %ecx,%ecx
118d9d: 75 0a jne 118da9 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x117>
*/
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);
118d9f: 8b 55 bc mov -0x44(%ebp),%edx
118da2: f7 d2 not %edx
118da4: 8b 75 c0 mov -0x40(%ebp),%esi
118da7: 21 16 and %edx,(%esi)
*map_bits = rtems_rfs_bitmap_set (*map_bits, 1 << map_offset);
if (rtems_rfs_bitmap_match(*map_bits,
RTEMS_RFS_BITMAP_ELEMENT_SET))
*search_bits = rtems_rfs_bitmap_set (*search_bits,
1 << search_offset);
control->free--;
118da9: ff 4b 10 decl 0x10(%ebx)
*bit = test_bit;
118dac: 8b 55 ac mov -0x54(%ebp),%edx
118daf: 89 02 mov %eax,(%edx)
*found = true;
118db1: 8b 4d a8 mov -0x58(%ebp),%ecx
118db4: c6 01 01 movb $0x1,(%ecx)
rtems_rfs_buffer_mark_dirty (control->buffer);
118db7: 8b 03 mov (%ebx),%eax
118db9: c6 00 01 movb $0x1,(%eax)
118dbc: e9 bd 00 00 00 jmp 118e7e <rtems_rfs_search_map_for_clear_bit.constprop.1+0x1ec>
return 0;
}
if (test_bit == end_bit)
118dc1: 3b 45 d0 cmp -0x30(%ebp),%eax
118dc4: 74 0c je 118dd2 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x140>
break;
map_offset += direction;
test_bit += direction;
118dc6: 01 f8 add %edi,%eax
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
118dc8: 8b 4d 90 mov -0x70(%ebp),%ecx
118dcb: 01 c1 add %eax,%ecx
{
/*
* 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)
118dcd: 83 f9 1f cmp $0x1f,%ecx
118dd0: 76 a9 jbe 118d7b <rtems_rfs_search_map_for_clear_bit.constprop.1+0xe9><== ALWAYS TAKEN
map_offset += direction;
test_bit += direction;
}
}
map_bits += direction;
118dd2: 8b 75 b0 mov -0x50(%ebp),%esi
118dd5: 01 75 c4 add %esi,-0x3c(%ebp)
map_index += direction;
118dd8: 01 fa add %edi,%edx
map_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1;
test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset;
118dda: 8b 45 b8 mov -0x48(%ebp),%eax
search_offset += direction;
if (((direction < 0) && (test_bit <= end_bit))
118ddd: 3b 45 d0 cmp -0x30(%ebp),%eax
118de0: 7f 06 jg 118de8 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x156>
118de2: 80 7d 98 00 cmpb $0x0,-0x68(%ebp)
118de6: 75 63 jne 118e4b <rtems_rfs_search_map_for_clear_bit.constprop.1+0x1b9>
118de8: 8b 75 94 mov -0x6c(%ebp),%esi
118deb: 01 75 b8 add %esi,-0x48(%ebp)
}
}
map_bits += direction;
map_index += direction;
map_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1;
118dee: 8b 75 cc mov -0x34(%ebp),%esi
test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset;
search_offset += direction;
if (((direction < 0) && (test_bit <= end_bit))
|| ((direction > 0) && (test_bit >= end_bit)))
118df1: 3b 45 d0 cmp -0x30(%ebp),%eax
118df4: 7c 04 jl 118dfa <rtems_rfs_search_map_for_clear_bit.constprop.1+0x168>
118df6: 85 ff test %edi,%edi
118df8: 7f 54 jg 118e4e <rtems_rfs_search_map_for_clear_bit.constprop.1+0x1bc>
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
118dfa: 8b 4d d4 mov -0x2c(%ebp),%ecx
118dfd: 2b 4d c8 sub -0x38(%ebp),%ecx
118e00: 01 d1 add %edx,%ecx
* 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)
118e02: 83 f9 1f cmp $0x1f,%ecx
118e05: 0f 86 57 ff ff ff jbe 118d62 <rtems_rfs_search_map_for_clear_bit.constprop.1+0xd0>
118e0b: eb 41 jmp 118e4e <rtems_rfs_search_map_for_clear_bit.constprop.1+0x1bc>
*
* 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);
118e0d: 83 e0 e0 and $0xffffffe0,%eax
if (direction > 0)
118e10: 85 ff test %edi,%edi
118e12: 7e 13 jle 118e27 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x195>
{
bits_skipped = rtems_rfs_bitmap_element_bits () - search_offset;
118e14: ba 20 00 00 00 mov $0x20,%edx
118e19: 2b 55 d4 sub -0x2c(%ebp),%edx
test_bit += bits_skipped * rtems_rfs_bitmap_element_bits ();
118e1c: 89 d1 mov %edx,%ecx
118e1e: c1 e1 05 shl $0x5,%ecx
118e21: 01 c8 add %ecx,%eax
map_offset = 0;
118e23: 31 f6 xor %esi,%esi
118e25: eb 13 jmp 118e3a <rtems_rfs_search_map_for_clear_bit.constprop.1+0x1a8>
}
else
{
bits_skipped = search_offset + 1;
118e27: 8b 55 d4 mov -0x2c(%ebp),%edx
118e2a: 42 inc %edx
/*
* 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;
118e2b: 8b 4d d4 mov -0x2c(%ebp),%ecx
118e2e: c1 e1 05 shl $0x5,%ecx
118e31: f7 d1 not %ecx
118e33: 01 c8 add %ecx,%eax
map_offset = rtems_rfs_bitmap_element_bits () - 1;
118e35: be 1f 00 00 00 mov $0x1f,%esi
}
map_bits += direction * bits_skipped;
118e3a: 0f af d7 imul %edi,%edx
118e3d: 8b 4d c4 mov -0x3c(%ebp),%ecx
118e40: 8d 0c 91 lea (%ecx,%edx,4),%ecx
118e43: 89 4d c4 mov %ecx,-0x3c(%ebp)
map_index += direction * bits_skipped;
118e46: 03 55 c8 add -0x38(%ebp),%edx
118e49: eb 03 jmp 118e4e <rtems_rfs_search_map_for_clear_bit.constprop.1+0x1bc>
}
}
map_bits += direction;
map_index += direction;
map_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1;
118e4b: 8b 75 cc mov -0x34(%ebp),%esi
}
map_bits += direction * bits_skipped;
map_index += direction * bits_skipped;
}
search_bits += direction;
118e4e: 8b 4d b0 mov -0x50(%ebp),%ecx
118e51: 01 4d c0 add %ecx,-0x40(%ebp)
search_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1;
118e54: 31 c9 xor %ecx,%ecx
118e56: 85 ff test %edi,%edi
118e58: 0f 9f c1 setg %cl
118e5b: 49 dec %ecx
118e5c: 83 e1 1f and $0x1f,%ecx
118e5f: 89 4d d4 mov %ecx,-0x2c(%ebp)
}
while (((direction < 0) && (test_bit >= end_bit))
|| ((direction > 0) && (test_bit <= end_bit)));
118e62: 3b 45 d0 cmp -0x30(%ebp),%eax
118e65: 7c 0a jl 118e71 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x1df>
118e67: 80 7d 98 00 cmpb $0x0,-0x68(%ebp)
118e6b: 0f 85 c8 fe ff ff jne 118d39 <rtems_rfs_search_map_for_clear_bit.constprop.1+0xa7>
118e71: 3b 45 d0 cmp -0x30(%ebp),%eax
118e74: 7f 08 jg 118e7e <rtems_rfs_search_map_for_clear_bit.constprop.1+0x1ec>
118e76: 85 ff test %edi,%edi
118e78: 0f 8f bb fe ff ff jg 118d39 <rtems_rfs_search_map_for_clear_bit.constprop.1+0xa7>
return 0;
118e7e: 31 c0 xor %eax,%eax
}
118e80: 83 c4 6c add $0x6c,%esp
118e83: 5b pop %ebx
118e84: 5e pop %esi
118e85: 5f pop %edi
118e86: 5d pop %ebp
118e87: c3 ret
0011d272 <rtems_rfs_symlink>:
const char* link,
int link_length,
uid_t uid,
gid_t gid,
rtems_rfs_ino parent)
{
11d272: 55 push %ebp
11d273: 89 e5 mov %esp,%ebp
11d275: 57 push %edi
11d276: 56 push %esi
11d277: 53 push %ebx
11d278: 81 ec b4 00 00 00 sub $0xb4,%esp
11d27e: 8b 5d 08 mov 0x8(%ebp),%ebx
11d281: 8b 75 14 mov 0x14(%ebp),%esi
11d284: 8b 55 1c mov 0x1c(%ebp),%edx
11d287: 66 89 95 56 ff ff ff mov %dx,-0xaa(%ebp)
11d28e: 8b 55 20 mov 0x20(%ebp),%edx
11d291: 66 89 95 54 ff ff ff mov %dx,-0xac(%ebp)
rtems_rfs_inode_handle inode;
rtems_rfs_ino ino;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_SYMLINK))
11d298: 6a 02 push $0x2
11d29a: 6a 00 push $0x0
11d29c: e8 fb 65 ff ff call 11389c <rtems_rfs_trace>
11d2a1: 83 c4 10 add $0x10,%esp
11d2a4: 84 c0 test %al,%al
11d2a6: 75 13 jne 11d2bb <rtems_rfs_symlink+0x49><== NEVER TAKEN
for (c = 0; c < link_length; c++)
printf ("%c", link[c]);
}
if (link_length >= rtems_rfs_fs_block_size (fs))
return ENAMETOOLONG;
11d2a8: bf 5b 00 00 00 mov $0x5b,%edi
printf (" link:");
for (c = 0; c < link_length; c++)
printf ("%c", link[c]);
}
if (link_length >= rtems_rfs_fs_block_size (fs))
11d2ad: 8b 45 18 mov 0x18(%ebp),%eax
11d2b0: 3b 43 08 cmp 0x8(%ebx),%eax
11d2b3: 0f 83 59 02 00 00 jae 11d512 <rtems_rfs_symlink+0x2a0><== NEVER TAKEN
11d2b9: eb 5b jmp 11d316 <rtems_rfs_symlink+0xa4>
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_SYMLINK))
{
int c;
printf ("rtems-rfs: symlink: parent:%" PRIu32 " name:", parent);
11d2bb: 50 push %eax <== NOT EXECUTED
11d2bc: 50 push %eax <== NOT EXECUTED
11d2bd: ff 75 24 pushl 0x24(%ebp) <== NOT EXECUTED
11d2c0: 68 28 21 13 00 push $0x132128 <== NOT EXECUTED
11d2c5: e8 72 30 00 00 call 12033c <printf> <== NOT EXECUTED
for (c = 0; c < length; c++)
11d2ca: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11d2cd: 31 ff xor %edi,%edi <== NOT EXECUTED
11d2cf: eb 14 jmp 11d2e5 <rtems_rfs_symlink+0x73><== NOT EXECUTED
printf ("%c", name[c]);
11d2d1: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11d2d4: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
11d2d7: 0f be 04 3a movsbl (%edx,%edi,1),%eax <== NOT EXECUTED
11d2db: 50 push %eax <== NOT EXECUTED
11d2dc: e8 c7 31 00 00 call 1204a8 <putchar> <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_SYMLINK))
{
int c;
printf ("rtems-rfs: symlink: parent:%" PRIu32 " name:", parent);
for (c = 0; c < length; c++)
11d2e1: 47 inc %edi <== NOT EXECUTED
11d2e2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11d2e5: 3b 7d 10 cmp 0x10(%ebp),%edi <== NOT EXECUTED
11d2e8: 7c e7 jl 11d2d1 <rtems_rfs_symlink+0x5f><== NOT EXECUTED
printf ("%c", name[c]);
printf (" link:");
11d2ea: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11d2ed: 68 4d 21 13 00 push $0x13214d <== NOT EXECUTED
11d2f2: e8 45 30 00 00 call 12033c <printf> <== NOT EXECUTED
for (c = 0; c < link_length; c++)
11d2f7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11d2fa: 31 ff xor %edi,%edi <== NOT EXECUTED
11d2fc: eb 11 jmp 11d30f <rtems_rfs_symlink+0x9d><== NOT EXECUTED
printf ("%c", link[c]);
11d2fe: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11d301: 0f be 04 3e movsbl (%esi,%edi,1),%eax <== NOT EXECUTED
11d305: 50 push %eax <== NOT EXECUTED
11d306: e8 9d 31 00 00 call 1204a8 <putchar> <== NOT EXECUTED
int c;
printf ("rtems-rfs: symlink: parent:%" PRIu32 " name:", parent);
for (c = 0; c < length; c++)
printf ("%c", name[c]);
printf (" link:");
for (c = 0; c < link_length; c++)
11d30b: 47 inc %edi <== NOT EXECUTED
11d30c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11d30f: 3b 7d 18 cmp 0x18(%ebp),%edi <== NOT EXECUTED
11d312: 7c ea jl 11d2fe <rtems_rfs_symlink+0x8c><== NOT EXECUTED
11d314: eb 92 jmp 11d2a8 <rtems_rfs_symlink+0x36><== NOT EXECUTED
}
if (link_length >= rtems_rfs_fs_block_size (fs))
return ENAMETOOLONG;
rc = rtems_rfs_inode_create (fs, parent, name, strlen (name),
11d316: 31 c0 xor %eax,%eax
11d318: 83 c9 ff or $0xffffffff,%ecx
11d31b: 8b 7d 0c mov 0xc(%ebp),%edi
11d31e: f2 ae repnz scas %es:(%edi),%al
11d320: f7 d1 not %ecx
11d322: 49 dec %ecx
11d323: 83 ec 0c sub $0xc,%esp
11d326: 8d 85 5c ff ff ff lea -0xa4(%ebp),%eax
11d32c: 50 push %eax
11d32d: 0f b7 85 54 ff ff ff movzwl -0xac(%ebp),%eax
11d334: 50 push %eax
11d335: 0f b7 85 56 ff ff ff movzwl -0xaa(%ebp),%eax
11d33c: 50 push %eax
11d33d: 6a 01 push $0x1
11d33f: 68 ff a1 00 00 push $0xa1ff
11d344: 51 push %ecx
11d345: ff 75 0c pushl 0xc(%ebp)
11d348: ff 75 24 pushl 0x24(%ebp)
11d34b: 53 push %ebx
11d34c: e8 5e 53 ff ff call 1126af <rtems_rfs_inode_create>
11d351: 89 c7 mov %eax,%edi
RTEMS_RFS_S_SYMLINK,
1, uid, gid, &ino);
if (rc > 0)
11d353: 83 c4 30 add $0x30,%esp
11d356: 85 c0 test %eax,%eax
11d358: 0f 8f b4 01 00 00 jg 11d512 <rtems_rfs_symlink+0x2a0><== NEVER TAKEN
return rc;
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
11d35e: 6a 01 push $0x1
11d360: 8d 85 70 ff ff ff lea -0x90(%ebp),%eax
11d366: 50 push %eax
11d367: ff b5 5c ff ff ff pushl -0xa4(%ebp)
11d36d: 53 push %ebx
11d36e: e8 b7 4e ff ff call 11222a <rtems_rfs_inode_open>
11d373: 89 c7 mov %eax,%edi
if (rc > 0)
11d375: 83 c4 10 add $0x10,%esp
11d378: 85 c0 test %eax,%eax
11d37a: 0f 8f 92 01 00 00 jg 11d512 <rtems_rfs_symlink+0x2a0><== NEVER TAKEN
/*
* If the link length is less than the length of data union in the inode
* place the link into the data area else allocate a block and write the link
* to that.
*/
if (link_length < RTEMS_RFS_INODE_DATA_NAME_SIZE)
11d380: 83 7d 18 13 cmpl $0x13,0x18(%ebp)
11d384: 77 51 ja 11d3d7 <rtems_rfs_symlink+0x165><== NEVER TAKEN
{
memset (inode.node->data.name, 0, RTEMS_RFS_INODE_DATA_NAME_SIZE);
11d386: 8b 95 7c ff ff ff mov -0x84(%ebp),%edx
11d38c: 83 c2 1c add $0x1c,%edx
11d38f: b9 05 00 00 00 mov $0x5,%ecx
11d394: 31 c0 xor %eax,%eax
11d396: 89 d7 mov %edx,%edi
11d398: f3 ab rep stos %eax,%es:(%edi)
memcpy (inode.node->data.name, link, link_length);
11d39a: 8b 85 7c ff ff ff mov -0x84(%ebp),%eax
11d3a0: 83 c0 1c add $0x1c,%eax
11d3a3: 89 c7 mov %eax,%edi
11d3a5: 8b 4d 18 mov 0x18(%ebp),%ecx
11d3a8: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
* @param block_count The block count.
*/
static inline void
rtems_rfs_inode_set_block_count (rtems_rfs_inode_handle* handle, uint32_t block_count)
{
rtems_rfs_write_u32 (&handle->node->block_count, block_count);
11d3aa: 8b 85 7c ff ff ff mov -0x84(%ebp),%eax
11d3b0: c6 40 0c 00 movb $0x0,0xc(%eax)
11d3b4: 8b 85 7c ff ff ff mov -0x84(%ebp),%eax
11d3ba: c6 40 0d 00 movb $0x0,0xd(%eax)
11d3be: 8b 85 7c ff ff ff mov -0x84(%ebp),%eax
11d3c4: c6 40 0e 00 movb $0x0,0xe(%eax)
11d3c8: 8b 85 7c ff ff ff mov -0x84(%ebp),%eax
11d3ce: c6 40 0f 00 movb $0x0,0xf(%eax)
11d3d2: e9 07 01 00 00 jmp 11d4de <rtems_rfs_symlink+0x26c>
rtems_rfs_block_map map;
rtems_rfs_block_no block;
rtems_rfs_buffer_handle buffer;
uint8_t* data;
rc = rtems_rfs_block_map_open (fs, &inode, &map);
11d3d7: 50 push %eax <== NOT EXECUTED
11d3d8: 8d 55 98 lea -0x68(%ebp),%edx <== NOT EXECUTED
11d3db: 52 push %edx <== NOT EXECUTED
11d3dc: 8d 85 70 ff ff ff lea -0x90(%ebp),%eax <== NOT EXECUTED
11d3e2: 50 push %eax <== NOT EXECUTED
11d3e3: 53 push %ebx <== NOT EXECUTED
11d3e4: e8 b9 c1 ff ff call 1195a2 <rtems_rfs_block_map_open><== NOT EXECUTED
11d3e9: 89 c7 mov %eax,%edi <== NOT EXECUTED
if (rc > 0)
11d3eb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11d3ee: 85 c0 test %eax,%eax <== NOT EXECUTED
11d3f0: 7e 04 jle 11d3f6 <rtems_rfs_symlink+0x184><== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
11d3f2: 50 push %eax <== NOT EXECUTED
11d3f3: 50 push %eax <== NOT EXECUTED
11d3f4: eb 76 jmp 11d46c <rtems_rfs_symlink+0x1fa><== NOT EXECUTED
return rc;
}
rc = rtems_rfs_block_map_grow (fs, &map, 1, &block);
11d3f6: 8d 85 60 ff ff ff lea -0xa0(%ebp),%eax <== NOT EXECUTED
11d3fc: 50 push %eax <== NOT EXECUTED
11d3fd: 6a 01 push $0x1 <== NOT EXECUTED
11d3ff: 8d 45 98 lea -0x68(%ebp),%eax <== NOT EXECUTED
11d402: 50 push %eax <== NOT EXECUTED
11d403: 53 push %ebx <== NOT EXECUTED
11d404: e8 95 c6 ff ff call 119a9e <rtems_rfs_block_map_grow><== NOT EXECUTED
11d409: 89 c7 mov %eax,%edi <== NOT EXECUTED
if (rc > 0)
11d40b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11d40e: 85 c0 test %eax,%eax <== NOT EXECUTED
11d410: 7e 13 jle 11d425 <rtems_rfs_symlink+0x1b3><== NOT EXECUTED
{
rtems_rfs_block_map_close (fs, &map);
11d412: 51 push %ecx <== NOT EXECUTED
11d413: 51 push %ecx <== NOT EXECUTED
11d414: 8d 55 98 lea -0x68(%ebp),%edx <== NOT EXECUTED
11d417: 52 push %edx <== NOT EXECUTED
11d418: 53 push %ebx <== NOT EXECUTED
11d419: e8 2b c3 ff ff call 119749 <rtems_rfs_block_map_close><== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
11d41e: 5e pop %esi <== NOT EXECUTED
11d41f: 58 pop %eax <== NOT EXECUTED
11d420: e9 aa 00 00 00 jmp 11d4cf <rtems_rfs_symlink+0x25d><== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
11d425: c6 85 64 ff ff ff 00 movb $0x0,-0x9c(%ebp) <== NOT EXECUTED
handle->bnum = 0;
11d42c: c7 85 68 ff ff ff 00 movl $0x0,-0x98(%ebp) <== NOT EXECUTED
11d433: 00 00 00
handle->buffer = NULL;
11d436: c7 85 6c ff ff ff 00 movl $0x0,-0x94(%ebp) <== NOT EXECUTED
11d43d: 00 00 00
rtems_rfs_block_map_close (fs, &map);
rtems_rfs_inode_close (fs, &inode);
return rc;
}
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, false);
11d440: 6a 00 push $0x0 <== NOT EXECUTED
11d442: ff b5 60 ff ff ff pushl -0xa0(%ebp) <== NOT EXECUTED
11d448: 8d 95 64 ff ff ff lea -0x9c(%ebp),%edx <== NOT EXECUTED
11d44e: 52 push %edx <== NOT EXECUTED
11d44f: 53 push %ebx <== NOT EXECUTED
11d450: e8 55 ce ff ff call 11a2aa <rtems_rfs_buffer_handle_request><== NOT EXECUTED
11d455: 89 c7 mov %eax,%edi <== NOT EXECUTED
if (rc > 0)
11d457: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11d45a: 85 c0 test %eax,%eax <== NOT EXECUTED
11d45c: 7e 17 jle 11d475 <rtems_rfs_symlink+0x203><== NOT EXECUTED
{
rtems_rfs_block_map_close (fs, &map);
11d45e: 50 push %eax <== NOT EXECUTED
11d45f: 50 push %eax <== NOT EXECUTED
11d460: 8d 45 98 lea -0x68(%ebp),%eax <== NOT EXECUTED
11d463: 50 push %eax <== NOT EXECUTED
11d464: 53 push %ebx <== NOT EXECUTED
11d465: e8 df c2 ff ff call 119749 <rtems_rfs_block_map_close><== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
11d46a: 58 pop %eax <== NOT EXECUTED
11d46b: 5a pop %edx <== NOT EXECUTED
11d46c: 8d 95 70 ff ff ff lea -0x90(%ebp),%edx <== NOT EXECUTED
11d472: 52 push %edx <== NOT EXECUTED
11d473: eb 61 jmp 11d4d6 <rtems_rfs_symlink+0x264><== NOT EXECUTED
return rc;
}
data = rtems_rfs_buffer_data (&buffer);
11d475: 8b 85 6c ff ff ff mov -0x94(%ebp),%eax <== NOT EXECUTED
11d47b: 8b 50 1c mov 0x1c(%eax),%edx <== NOT EXECUTED
memset (data, 0xff, rtems_rfs_fs_block_size (fs));
11d47e: 8b 4b 08 mov 0x8(%ebx),%ecx <== NOT EXECUTED
11d481: b0 ff mov $0xff,%al <== NOT EXECUTED
11d483: 89 d7 mov %edx,%edi <== NOT EXECUTED
11d485: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED
memcpy (data, link, link_length);
11d487: 89 d7 mov %edx,%edi <== NOT EXECUTED
11d489: 8b 4d 18 mov 0x18(%ebp),%ecx <== NOT EXECUTED
11d48c: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
11d48e: 52 push %edx <== NOT EXECUTED
11d48f: 52 push %edx <== NOT EXECUTED
11d490: 8d 85 64 ff ff ff lea -0x9c(%ebp),%eax <== NOT EXECUTED
11d496: 50 push %eax <== NOT EXECUTED
11d497: 53 push %ebx <== NOT EXECUTED
11d498: e8 94 cc ff ff call 11a131 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
handle->dirty = false;
11d49d: c6 85 64 ff ff ff 00 movb $0x0,-0x9c(%ebp) <== NOT EXECUTED
handle->bnum = 0;
11d4a4: c7 85 68 ff ff ff 00 movl $0x0,-0x98(%ebp) <== NOT EXECUTED
11d4ab: 00 00 00
handle->buffer = NULL;
11d4ae: c7 85 6c ff ff ff 00 movl $0x0,-0x94(%ebp) <== NOT EXECUTED
11d4b5: 00 00 00
rtems_rfs_block_map_close (fs, &map);
rtems_rfs_inode_close (fs, &inode);
return rc;
}
rc = rtems_rfs_block_map_close (fs, &map);
11d4b8: 59 pop %ecx <== NOT EXECUTED
11d4b9: 5e pop %esi <== NOT EXECUTED
11d4ba: 8d 55 98 lea -0x68(%ebp),%edx <== NOT EXECUTED
11d4bd: 52 push %edx <== NOT EXECUTED
11d4be: 53 push %ebx <== NOT EXECUTED
11d4bf: e8 85 c2 ff ff call 119749 <rtems_rfs_block_map_close><== NOT EXECUTED
11d4c4: 89 c7 mov %eax,%edi <== NOT EXECUTED
if (rc > 0)
11d4c6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11d4c9: 85 c0 test %eax,%eax <== NOT EXECUTED
11d4cb: 7e 11 jle 11d4de <rtems_rfs_symlink+0x26c><== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
11d4cd: 50 push %eax <== NOT EXECUTED
11d4ce: 50 push %eax <== NOT EXECUTED
11d4cf: 8d 85 70 ff ff ff lea -0x90(%ebp),%eax <== NOT EXECUTED
11d4d5: 50 push %eax <== NOT EXECUTED
11d4d6: 53 push %ebx <== NOT EXECUTED
11d4d7: e8 cb 4e ff ff call 1123a7 <rtems_rfs_inode_close> <== NOT EXECUTED
11d4dc: eb 31 jmp 11d50f <rtems_rfs_symlink+0x29d><== NOT EXECUTED
return rc;
}
}
rtems_rfs_inode_set_block_offset (&inode, link_length);
11d4de: 0f b7 45 18 movzwl 0x18(%ebp),%eax
*/
static inline void
rtems_rfs_inode_set_block_offset (rtems_rfs_inode_handle* handle,
uint16_t block_offset)
{
rtems_rfs_write_u16 (&handle->node->block_offset, block_offset);
11d4e2: 89 c1 mov %eax,%ecx
11d4e4: 66 c1 e9 08 shr $0x8,%cx
11d4e8: 8b 95 7c ff ff ff mov -0x84(%ebp),%edx
11d4ee: 88 4a 0a mov %cl,0xa(%edx)
11d4f1: 8b 95 7c ff ff ff mov -0x84(%ebp),%edx
11d4f7: 88 42 0b mov %al,0xb(%edx)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
11d4fa: c6 45 80 01 movb $0x1,-0x80(%ebp)
rc = rtems_rfs_inode_close (fs, &inode);
11d4fe: 50 push %eax
11d4ff: 50 push %eax
11d500: 8d 85 70 ff ff ff lea -0x90(%ebp),%eax
11d506: 50 push %eax
11d507: 53 push %ebx
11d508: e8 9a 4e ff ff call 1123a7 <rtems_rfs_inode_close>
11d50d: 89 c7 mov %eax,%edi
11d50f: 83 c4 10 add $0x10,%esp
return rc;
}
11d512: 89 f8 mov %edi,%eax
11d514: 8d 65 f4 lea -0xc(%ebp),%esp
11d517: 5b pop %ebx
11d518: 5e pop %esi
11d519: 5f pop %edi
11d51a: 5d pop %ebp
11d51b: c3 ret
0011d51c <rtems_rfs_symlink_read>:
rtems_rfs_symlink_read (rtems_rfs_file_system* fs,
rtems_rfs_ino link,
char* path,
size_t size,
size_t* length)
{
11d51c: 55 push %ebp
11d51d: 89 e5 mov %esp,%ebp
11d51f: 57 push %edi
11d520: 56 push %esi
11d521: 53 push %ebx
11d522: 81 ec b4 00 00 00 sub $0xb4,%esp
11d528: 8b 5d 08 mov 0x8(%ebp),%ebx
11d52b: 8b 75 0c mov 0xc(%ebp),%esi
rtems_rfs_inode_handle inode;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_SYMLINK_READ))
11d52e: 6a 04 push $0x4
11d530: 6a 00 push $0x0
11d532: e8 65 63 ff ff call 11389c <rtems_rfs_trace>
11d537: 83 c4 10 add $0x10,%esp
11d53a: 84 c0 test %al,%al
11d53c: 74 10 je 11d54e <rtems_rfs_symlink_read+0x32><== ALWAYS TAKEN
printf ("rtems-rfs: symlink-read: link:%" PRIu32 "\n", link);
11d53e: 57 push %edi <== NOT EXECUTED
11d53f: 57 push %edi <== NOT EXECUTED
11d540: 56 push %esi <== NOT EXECUTED
11d541: 68 54 21 13 00 push $0x132154 <== NOT EXECUTED
11d546: e8 f1 2d 00 00 call 12033c <printf> <== NOT EXECUTED
11d54b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rc = rtems_rfs_inode_open (fs, link, &inode, true);
11d54e: 6a 01 push $0x1
11d550: 8d bd 70 ff ff ff lea -0x90(%ebp),%edi
11d556: 57 push %edi
11d557: 56 push %esi
11d558: 53 push %ebx
11d559: e8 cc 4c ff ff call 11222a <rtems_rfs_inode_open>
11d55e: 89 c6 mov %eax,%esi
if (rc)
11d560: 83 c4 10 add $0x10,%esp
11d563: 85 c0 test %eax,%eax
11d565: 0f 85 81 01 00 00 jne 11d6ec <rtems_rfs_symlink_read+0x1d0><== NEVER TAKEN
return rc;
if (!RTEMS_RFS_S_ISLNK (rtems_rfs_inode_get_mode (&inode)))
11d56b: 8b b5 7c ff ff ff mov -0x84(%ebp),%esi
* @return uint16_t The mode.
*/
static inline uint16_t
rtems_rfs_inode_get_mode (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->mode);
11d571: 0f b6 46 02 movzbl 0x2(%esi),%eax
11d575: c1 e0 08 shl $0x8,%eax
11d578: 66 25 00 f0 and $0xf000,%ax
11d57c: 66 3d 00 a0 cmp $0xa000,%ax
11d580: 74 16 je 11d598 <rtems_rfs_symlink_read+0x7c><== ALWAYS TAKEN
{
rtems_rfs_inode_close (fs, &inode);
11d582: 56 push %esi <== NOT EXECUTED
11d583: 56 push %esi <== NOT EXECUTED
11d584: 57 push %edi <== NOT EXECUTED
11d585: 53 push %ebx <== NOT EXECUTED
11d586: e8 1c 4e ff ff call 1123a7 <rtems_rfs_inode_close> <== NOT EXECUTED
11d58b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
return EINVAL;
11d58e: be 16 00 00 00 mov $0x16,%esi <== NOT EXECUTED
11d593: e9 54 01 00 00 jmp 11d6ec <rtems_rfs_symlink_read+0x1d0><== NOT EXECUTED
* @return uint32_t The block offset.
*/
static inline uint16_t
rtems_rfs_inode_get_block_offset (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->block_offset);
11d598: 0f b6 46 0a movzbl 0xa(%esi),%eax
11d59c: c1 e0 08 shl $0x8,%eax
11d59f: 0f b6 4e 0b movzbl 0xb(%esi),%ecx
11d5a3: 09 c1 or %eax,%ecx
}
*length = rtems_rfs_inode_get_block_offset (&inode);
11d5a5: 0f b7 c9 movzwl %cx,%ecx
11d5a8: 3b 4d 14 cmp 0x14(%ebp),%ecx
11d5ab: 76 03 jbe 11d5b0 <rtems_rfs_symlink_read+0x94>
11d5ad: 8b 4d 14 mov 0x14(%ebp),%ecx
11d5b0: 8b 45 18 mov 0x18(%ebp),%eax
11d5b3: 89 08 mov %ecx,(%eax)
* @return uint32_t The block count.
*/
static inline uint32_t
rtems_rfs_inode_get_block_count (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->block_count);
11d5b5: 0f b6 46 0c movzbl 0xc(%esi),%eax
11d5b9: c1 e0 18 shl $0x18,%eax
11d5bc: 0f b6 56 0d movzbl 0xd(%esi),%edx
11d5c0: c1 e2 10 shl $0x10,%edx
11d5c3: 09 d0 or %edx,%eax
11d5c5: 0f b6 56 0f movzbl 0xf(%esi),%edx
11d5c9: 09 d0 or %edx,%eax
11d5cb: 0f b6 56 0e movzbl 0xe(%esi),%edx
11d5cf: c1 e2 08 shl $0x8,%edx
if (size < *length)
{
*length = size;
}
if (rtems_rfs_inode_get_block_count (&inode) == 0)
11d5d2: 09 d0 or %edx,%eax
11d5d4: 75 0d jne 11d5e3 <rtems_rfs_symlink_read+0xc7><== NEVER TAKEN
{
memcpy (path, inode.node->data.name, *length);
11d5d6: 83 c6 1c add $0x1c,%esi
11d5d9: 8b 7d 10 mov 0x10(%ebp),%edi
11d5dc: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
11d5de: e9 f5 00 00 00 jmp 11d6d8 <rtems_rfs_symlink_read+0x1bc>
rtems_rfs_block_map map;
rtems_rfs_block_no block;
rtems_rfs_buffer_handle buffer;
char* data;
rc = rtems_rfs_block_map_open (fs, &inode, &map);
11d5e3: 51 push %ecx <== NOT EXECUTED
11d5e4: 8d 45 98 lea -0x68(%ebp),%eax <== NOT EXECUTED
11d5e7: 50 push %eax <== NOT EXECUTED
11d5e8: 8d 85 70 ff ff ff lea -0x90(%ebp),%eax <== NOT EXECUTED
11d5ee: 50 push %eax <== NOT EXECUTED
11d5ef: 53 push %ebx <== NOT EXECUTED
11d5f0: e8 ad bf ff ff call 1195a2 <rtems_rfs_block_map_open><== NOT EXECUTED
11d5f5: 89 c6 mov %eax,%esi <== NOT EXECUTED
if (rc > 0)
11d5f7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11d5fa: 85 c0 test %eax,%eax <== NOT EXECUTED
11d5fc: 7e 05 jle 11d603 <rtems_rfs_symlink_read+0xe7><== NOT EXECUTED
11d5fe: e9 c4 00 00 00 jmp 11d6c7 <rtems_rfs_symlink_read+0x1ab><== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
return rc;
}
rc = rtems_rfs_block_map_seek (fs, &map, 0, &block);
11d603: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11d606: 8d 85 60 ff ff ff lea -0xa0(%ebp),%eax <== NOT EXECUTED
11d60c: 50 push %eax <== NOT EXECUTED
11d60d: 6a 00 push $0x0 <== NOT EXECUTED
11d60f: 6a 00 push $0x0 <== NOT EXECUTED
11d611: 8d 45 98 lea -0x68(%ebp),%eax <== NOT EXECUTED
11d614: 50 push %eax <== NOT EXECUTED
11d615: 53 push %ebx <== NOT EXECUTED
11d616: e8 e9 c3 ff ff call 119a04 <rtems_rfs_block_map_seek><== NOT EXECUTED
11d61b: 89 c6 mov %eax,%esi <== NOT EXECUTED
if (rc > 0)
11d61d: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
11d620: 85 c0 test %eax,%eax <== NOT EXECUTED
11d622: 7e 02 jle 11d626 <rtems_rfs_symlink_read+0x10a><== NOT EXECUTED
11d624: eb 45 jmp 11d66b <rtems_rfs_symlink_read+0x14f><== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
11d626: c6 85 64 ff ff ff 00 movb $0x0,-0x9c(%ebp) <== NOT EXECUTED
handle->bnum = 0;
11d62d: c7 85 68 ff ff ff 00 movl $0x0,-0x98(%ebp) <== NOT EXECUTED
11d634: 00 00 00
handle->buffer = NULL;
11d637: c7 85 6c ff ff ff 00 movl $0x0,-0x94(%ebp) <== NOT EXECUTED
11d63e: 00 00 00
rtems_rfs_block_map_close (fs, &map);
rtems_rfs_inode_close (fs, &inode);
return rc;
}
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, false);
11d641: 6a 00 push $0x0 <== NOT EXECUTED
11d643: ff b5 60 ff ff ff pushl -0xa0(%ebp) <== NOT EXECUTED
11d649: 8d 95 64 ff ff ff lea -0x9c(%ebp),%edx <== NOT EXECUTED
11d64f: 52 push %edx <== NOT EXECUTED
11d650: 53 push %ebx <== NOT EXECUTED
11d651: 89 95 54 ff ff ff mov %edx,-0xac(%ebp) <== NOT EXECUTED
11d657: e8 4e cc ff ff call 11a2aa <rtems_rfs_buffer_handle_request><== NOT EXECUTED
11d65c: 89 c6 mov %eax,%esi <== NOT EXECUTED
if (rc > 0)
11d65e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11d661: 85 c0 test %eax,%eax <== NOT EXECUTED
11d663: 8b 95 54 ff ff ff mov -0xac(%ebp),%edx <== NOT EXECUTED
11d669: 7e 10 jle 11d67b <rtems_rfs_symlink_read+0x15f><== NOT EXECUTED
{
rtems_rfs_block_map_close (fs, &map);
11d66b: 50 push %eax <== NOT EXECUTED
11d66c: 50 push %eax <== NOT EXECUTED
11d66d: 8d 45 98 lea -0x68(%ebp),%eax <== NOT EXECUTED
11d670: 50 push %eax <== NOT EXECUTED
11d671: 53 push %ebx <== NOT EXECUTED
11d672: e8 d2 c0 ff ff call 119749 <rtems_rfs_block_map_close><== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
11d677: 58 pop %eax <== NOT EXECUTED
11d678: 5a pop %edx <== NOT EXECUTED
11d679: eb 4e jmp 11d6c9 <rtems_rfs_symlink_read+0x1ad><== NOT EXECUTED
return rc;
}
data = rtems_rfs_buffer_data (&buffer);
11d67b: 8b 85 6c ff ff ff mov -0x94(%ebp),%eax <== NOT EXECUTED
memcpy (path, data, *length);
11d681: 8b 70 1c mov 0x1c(%eax),%esi <== NOT EXECUTED
11d684: 8b 45 18 mov 0x18(%ebp),%eax <== NOT EXECUTED
11d687: 8b 08 mov (%eax),%ecx <== NOT EXECUTED
11d689: 8b 7d 10 mov 0x10(%ebp),%edi <== NOT EXECUTED
11d68c: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
11d68e: 51 push %ecx <== NOT EXECUTED
11d68f: 51 push %ecx <== NOT EXECUTED
11d690: 52 push %edx <== NOT EXECUTED
11d691: 53 push %ebx <== NOT EXECUTED
11d692: e8 9a ca ff ff call 11a131 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
handle->dirty = false;
11d697: c6 85 64 ff ff ff 00 movb $0x0,-0x9c(%ebp) <== NOT EXECUTED
handle->bnum = 0;
11d69e: c7 85 68 ff ff ff 00 movl $0x0,-0x98(%ebp) <== NOT EXECUTED
11d6a5: 00 00 00
handle->buffer = NULL;
11d6a8: c7 85 6c ff ff ff 00 movl $0x0,-0x94(%ebp) <== NOT EXECUTED
11d6af: 00 00 00
rtems_rfs_block_map_close (fs, &map);
rtems_rfs_inode_close (fs, &inode);
return rc;
}
rc = rtems_rfs_block_map_close (fs, &map);
11d6b2: 5e pop %esi <== NOT EXECUTED
11d6b3: 5f pop %edi <== NOT EXECUTED
11d6b4: 8d 45 98 lea -0x68(%ebp),%eax <== NOT EXECUTED
11d6b7: 50 push %eax <== NOT EXECUTED
11d6b8: 53 push %ebx <== NOT EXECUTED
11d6b9: e8 8b c0 ff ff call 119749 <rtems_rfs_block_map_close><== NOT EXECUTED
11d6be: 89 c6 mov %eax,%esi <== NOT EXECUTED
if (rc > 0)
11d6c0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11d6c3: 85 c0 test %eax,%eax <== NOT EXECUTED
11d6c5: 7e 11 jle 11d6d8 <rtems_rfs_symlink_read+0x1bc><== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
11d6c7: 50 push %eax <== NOT EXECUTED
11d6c8: 50 push %eax <== NOT EXECUTED
11d6c9: 8d 85 70 ff ff ff lea -0x90(%ebp),%eax <== NOT EXECUTED
11d6cf: 50 push %eax <== NOT EXECUTED
11d6d0: 53 push %ebx <== NOT EXECUTED
11d6d1: e8 d1 4c ff ff call 1123a7 <rtems_rfs_inode_close> <== NOT EXECUTED
11d6d6: eb 11 jmp 11d6e9 <rtems_rfs_symlink_read+0x1cd><== NOT EXECUTED
return rc;
}
}
rc = rtems_rfs_inode_close (fs, &inode);
11d6d8: 50 push %eax
11d6d9: 50 push %eax
11d6da: 8d 85 70 ff ff ff lea -0x90(%ebp),%eax
11d6e0: 50 push %eax
11d6e1: 53 push %ebx
11d6e2: e8 c0 4c ff ff call 1123a7 <rtems_rfs_inode_close>
11d6e7: 89 c6 mov %eax,%esi
11d6e9: 83 c4 10 add $0x10,%esp
return rc;
}
11d6ec: 89 f0 mov %esi,%eax
11d6ee: 8d 65 f4 lea -0xc(%ebp),%esp
11d6f1: 5b pop %ebx
11d6f2: 5e pop %esi
11d6f3: 5f pop %edi
11d6f4: 5d pop %ebp
11d6f5: c3 ret
001138e0 <rtems_rfs_trace_clear_mask>:
rtems_rfs_trace_mask
rtems_rfs_trace_clear_mask (rtems_rfs_trace_mask mask)
{
1138e0: 55 push %ebp <== NOT EXECUTED
1138e1: 89 e5 mov %esp,%ebp <== NOT EXECUTED
1138e3: 53 push %ebx <== NOT EXECUTED
1138e4: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
1138e7: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED
rtems_rfs_trace_mask state = rtems_rfs_trace_flags;
1138ea: a1 a8 35 15 00 mov 0x1535a8,%eax <== NOT EXECUTED
1138ef: 8b 15 ac 35 15 00 mov 0x1535ac,%edx <== NOT EXECUTED
rtems_rfs_trace_flags &= ~mask;
1138f5: f7 d3 not %ebx <== NOT EXECUTED
1138f7: f7 d1 not %ecx <== NOT EXECUTED
1138f9: 21 c3 and %eax,%ebx <== NOT EXECUTED
1138fb: 89 1d a8 35 15 00 mov %ebx,0x1535a8 <== NOT EXECUTED
113901: 21 d1 and %edx,%ecx <== NOT EXECUTED
113903: 89 0d ac 35 15 00 mov %ecx,0x1535ac <== NOT EXECUTED
return state;
}
113909: 5b pop %ebx <== NOT EXECUTED
11390a: 5d pop %ebp <== NOT EXECUTED
11390b: c3 ret <== NOT EXECUTED
001138b8 <rtems_rfs_trace_set_mask>:
rtems_rfs_trace_mask
rtems_rfs_trace_set_mask (rtems_rfs_trace_mask mask)
{
1138b8: 55 push %ebp <== NOT EXECUTED
1138b9: 89 e5 mov %esp,%ebp <== NOT EXECUTED
1138bb: 53 push %ebx <== NOT EXECUTED
1138bc: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED
rtems_rfs_trace_mask state = rtems_rfs_trace_flags;
1138bf: a1 a8 35 15 00 mov 0x1535a8,%eax <== NOT EXECUTED
1138c4: 8b 15 ac 35 15 00 mov 0x1535ac,%edx <== NOT EXECUTED
rtems_rfs_trace_flags |= mask;
1138ca: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
1138cd: 09 c3 or %eax,%ebx <== NOT EXECUTED
1138cf: 89 1d a8 35 15 00 mov %ebx,0x1535a8 <== NOT EXECUTED
1138d5: 09 d1 or %edx,%ecx <== NOT EXECUTED
1138d7: 89 0d ac 35 15 00 mov %ecx,0x1535ac <== NOT EXECUTED
return state;
}
1138dd: 5b pop %ebx <== NOT EXECUTED
1138de: 5d pop %ebp <== NOT EXECUTED
1138df: c3 ret <== NOT EXECUTED
0011390c <rtems_rfs_trace_shell_command>:
int
rtems_rfs_trace_shell_command (int argc, char *argv[])
{
11390c: 55 push %ebp <== NOT EXECUTED
11390d: 89 e5 mov %esp,%ebp <== NOT EXECUTED
11390f: 57 push %edi <== NOT EXECUTED
113910: 56 push %esi <== NOT EXECUTED
113911: 53 push %ebx <== NOT EXECUTED
113912: 81 ec cc 00 00 00 sub $0xcc,%esp <== NOT EXECUTED
const char* table[] =
113918: 8d bd 4c ff ff ff lea -0xb4(%ebp),%edi <== NOT EXECUTED
11391e: be 28 08 13 00 mov $0x130828,%esi <== NOT EXECUTED
113923: b9 27 00 00 00 mov $0x27,%ecx <== NOT EXECUTED
113928: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED
rtems_rfs_trace_mask clear_value = 0;
bool set = true;
int arg;
int t;
for (arg = 1; arg < argc; arg++)
11392a: c7 85 38 ff ff ff 01 movl $0x1,-0xc8(%ebp) <== NOT EXECUTED
113931: 00 00 00
"file-set"
};
rtems_rfs_trace_mask set_value = 0;
rtems_rfs_trace_mask clear_value = 0;
bool set = true;
113934: c6 85 3f ff ff ff 01 movb $0x1,-0xc1(%ebp) <== NOT EXECUTED
"file-io",
"file-set"
};
rtems_rfs_trace_mask set_value = 0;
rtems_rfs_trace_mask clear_value = 0;
11393b: c7 85 40 ff ff ff 00 movl $0x0,-0xc0(%ebp) <== NOT EXECUTED
113942: 00 00 00
113945: c7 85 44 ff ff ff 00 movl $0x0,-0xbc(%ebp) <== NOT EXECUTED
11394c: 00 00 00
"file-close",
"file-io",
"file-set"
};
rtems_rfs_trace_mask set_value = 0;
11394f: 31 f6 xor %esi,%esi <== NOT EXECUTED
113951: 31 ff xor %edi,%edi <== NOT EXECUTED
rtems_rfs_trace_mask clear_value = 0;
bool set = true;
int arg;
int t;
for (arg = 1; arg < argc; arg++)
113953: e9 9a 01 00 00 jmp 113af2 <rtems_rfs_trace_shell_command+0x1e6><== NOT EXECUTED
{
if (argv[arg][0] == '-')
113958: 8b 95 38 ff ff ff mov -0xc8(%ebp),%edx <== NOT EXECUTED
11395e: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
113961: 8b 1c 90 mov (%eax,%edx,4),%ebx <== NOT EXECUTED
113964: 80 3b 2d cmpb $0x2d,(%ebx) <== NOT EXECUTED
113967: 75 76 jne 1139df <rtems_rfs_trace_shell_command+0xd3><== NOT EXECUTED
{
switch (argv[arg][1])
113969: 8a 43 01 mov 0x1(%ebx),%al <== NOT EXECUTED
11396c: 3c 68 cmp $0x68,%al <== NOT EXECUTED
11396e: 74 06 je 113976 <rtems_rfs_trace_shell_command+0x6a><== NOT EXECUTED
113970: 3c 6c cmp $0x6c,%al <== NOT EXECUTED
113972: 75 51 jne 1139c5 <rtems_rfs_trace_shell_command+0xb9><== NOT EXECUTED
113974: eb 16 jmp 11398c <rtems_rfs_trace_shell_command+0x80><== NOT EXECUTED
{
case 'h':
printf ("usage: %s [-hl] [set/clear] [flags]\n", argv[0]);
113976: 50 push %eax <== NOT EXECUTED
113977: 50 push %eax <== NOT EXECUTED
113978: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
11397b: ff 32 pushl (%edx) <== NOT EXECUTED
11397d: 68 e0 05 13 00 push $0x1305e0 <== NOT EXECUTED
113982: e8 b5 c9 00 00 call 12033c <printf> <== NOT EXECUTED
113987: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11398a: eb 32 jmp 1139be <rtems_rfs_trace_shell_command+0xb2><== NOT EXECUTED
return 0;
case 'l':
printf ("%s: valid flags to set or clear are:\n", argv[0]);
11398c: 50 push %eax <== NOT EXECUTED
11398d: 50 push %eax <== NOT EXECUTED
11398e: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
113991: ff 32 pushl (%edx) <== NOT EXECUTED
113993: 68 05 06 13 00 push $0x130605 <== NOT EXECUTED
113998: e8 9f c9 00 00 call 12033c <printf> <== NOT EXECUTED
11399d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
for (t = 0; t < (sizeof (table) / sizeof (const char*)); t++)
1139a0: 31 db xor %ebx,%ebx <== NOT EXECUTED
printf (" %s\n", table[t]);
1139a2: 50 push %eax <== NOT EXECUTED
1139a3: 50 push %eax <== NOT EXECUTED
1139a4: ff b4 9d 4c ff ff ff pushl -0xb4(%ebp,%ebx,4) <== NOT EXECUTED
1139ab: 68 2b 06 13 00 push $0x13062b <== NOT EXECUTED
1139b0: e8 87 c9 00 00 call 12033c <printf> <== NOT EXECUTED
case 'h':
printf ("usage: %s [-hl] [set/clear] [flags]\n", argv[0]);
return 0;
case 'l':
printf ("%s: valid flags to set or clear are:\n", argv[0]);
for (t = 0; t < (sizeof (table) / sizeof (const char*)); t++)
1139b5: 43 inc %ebx <== NOT EXECUTED
1139b6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1139b9: 83 fb 27 cmp $0x27,%ebx <== NOT EXECUTED
1139bc: 75 e4 jne 1139a2 <rtems_rfs_trace_shell_command+0x96><== NOT EXECUTED
printf (" %s\n", table[t]);
return 0;
1139be: 31 c0 xor %eax,%eax <== NOT EXECUTED
1139c0: e9 41 01 00 00 jmp 113b06 <rtems_rfs_trace_shell_command+0x1fa><== NOT EXECUTED
default:
printf ("error: unknown option\n");
1139c5: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1139c8: 68 31 06 13 00 push $0x130631 <== NOT EXECUTED
1139cd: e8 82 cb 00 00 call 120554 <puts> <== NOT EXECUTED
1139d2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
return 1;
1139d5: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
1139da: e9 27 01 00 00 jmp 113b06 <rtems_rfs_trace_shell_command+0x1fa><== NOT EXECUTED
}
}
else
{
if (strcmp (argv[arg], "set") == 0)
1139df: 50 push %eax <== NOT EXECUTED
1139e0: 50 push %eax <== NOT EXECUTED
1139e1: 68 22 08 13 00 push $0x130822 <== NOT EXECUTED
1139e6: 53 push %ebx <== NOT EXECUTED
1139e7: e8 a0 d2 00 00 call 120c8c <strcmp> <== NOT EXECUTED
1139ec: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1139ef: 85 c0 test %eax,%eax <== NOT EXECUTED
1139f1: 75 07 jne 1139fa <rtems_rfs_trace_shell_command+0xee><== NOT EXECUTED
set = true;
1139f3: c6 85 3f ff ff ff 01 movb $0x1,-0xc1(%ebp) <== NOT EXECUTED
if (strcmp (argv[arg], "clear") == 0)
1139fa: 51 push %ecx <== NOT EXECUTED
1139fb: 51 push %ecx <== NOT EXECUTED
1139fc: 68 47 06 13 00 push $0x130647 <== NOT EXECUTED
113a01: 53 push %ebx <== NOT EXECUTED
113a02: e8 85 d2 00 00 call 120c8c <strcmp> <== NOT EXECUTED
113a07: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
113a0a: 85 c0 test %eax,%eax <== NOT EXECUTED
113a0c: 0f 84 8e 00 00 00 je 113aa0 <rtems_rfs_trace_shell_command+0x194><== NOT EXECUTED
set = false;
else if (strcmp (argv[arg], "all") == 0)
113a12: 52 push %edx <== NOT EXECUTED
113a13: 52 push %edx <== NOT EXECUTED
113a14: 68 94 26 13 00 push $0x132694 <== NOT EXECUTED
113a19: 53 push %ebx <== NOT EXECUTED
113a1a: e8 6d d2 00 00 call 120c8c <strcmp> <== NOT EXECUTED
113a1f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
113a22: 85 c0 test %eax,%eax <== NOT EXECUTED
113a24: 75 13 jne 113a39 <rtems_rfs_trace_shell_command+0x12d><== NOT EXECUTED
{
if (set)
113a26: 80 bd 3f ff ff ff 00 cmpb $0x0,-0xc1(%ebp) <== NOT EXECUTED
113a2d: 74 7a je 113aa9 <rtems_rfs_trace_shell_command+0x19d><== NOT EXECUTED
set_value = RTEMS_RFS_TRACE_ALL;
113a2f: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED
113a32: 89 f7 mov %esi,%edi <== NOT EXECUTED
113a34: e9 84 00 00 00 jmp 113abd <rtems_rfs_trace_shell_command+0x1b1><== NOT EXECUTED
{
if (strcmp (argv[arg], "set") == 0)
set = true;
if (strcmp (argv[arg], "clear") == 0)
set = false;
else if (strcmp (argv[arg], "all") == 0)
113a39: 31 c9 xor %ecx,%ecx <== NOT EXECUTED
}
else
{
for (t = 0; t < (sizeof (table) / sizeof (const char*)); t++)
{
if (strcmp (argv[arg], table[t]) == 0)
113a3b: 50 push %eax <== NOT EXECUTED
113a3c: 50 push %eax <== NOT EXECUTED
113a3d: ff b4 8d 4c ff ff ff pushl -0xb4(%ebp,%ecx,4) <== NOT EXECUTED
113a44: 53 push %ebx <== NOT EXECUTED
113a45: 89 8d 34 ff ff ff mov %ecx,-0xcc(%ebp) <== NOT EXECUTED
113a4b: e8 3c d2 00 00 call 120c8c <strcmp> <== NOT EXECUTED
113a50: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
113a53: 85 c0 test %eax,%eax <== NOT EXECUTED
113a55: 8b 8d 34 ff ff ff mov -0xcc(%ebp),%ecx <== NOT EXECUTED
113a5b: 75 3b jne 113a98 <rtems_rfs_trace_shell_command+0x18c><== NOT EXECUTED
{
if (set)
113a5d: 80 bd 3f ff ff ff 00 cmpb $0x0,-0xc1(%ebp) <== NOT EXECUTED
113a64: 74 13 je 113a79 <rtems_rfs_trace_shell_command+0x16d><== NOT EXECUTED
set_value = 1ULL << t;
113a66: 89 cf mov %ecx,%edi <== NOT EXECUTED
113a68: c1 ef 05 shr $0x5,%edi <== NOT EXECUTED
113a6b: 83 e7 01 and $0x1,%edi <== NOT EXECUTED
113a6e: 89 fe mov %edi,%esi <== NOT EXECUTED
113a70: 83 f6 01 xor $0x1,%esi <== NOT EXECUTED
113a73: d3 e6 shl %cl,%esi <== NOT EXECUTED
113a75: d3 e7 shl %cl,%edi <== NOT EXECUTED
113a77: eb 44 jmp 113abd <rtems_rfs_trace_shell_command+0x1b1><== NOT EXECUTED
else
clear_value = 1ULL << t;
113a79: 31 c0 xor %eax,%eax <== NOT EXECUTED
113a7b: 31 d2 xor %edx,%edx <== NOT EXECUTED
113a7d: f6 c1 20 test $0x20,%cl <== NOT EXECUTED
113a80: 0f 94 c0 sete %al <== NOT EXECUTED
113a83: 0f 95 c2 setne %dl <== NOT EXECUTED
113a86: d3 e0 shl %cl,%eax <== NOT EXECUTED
113a88: d3 e2 shl %cl,%edx <== NOT EXECUTED
113a8a: 89 85 40 ff ff ff mov %eax,-0xc0(%ebp) <== NOT EXECUTED
113a90: 89 95 44 ff ff ff mov %edx,-0xbc(%ebp) <== NOT EXECUTED
113a96: eb 25 jmp 113abd <rtems_rfs_trace_shell_command+0x1b1><== NOT EXECUTED
else
clear_value = RTEMS_RFS_TRACE_ALL;
}
else
{
for (t = 0; t < (sizeof (table) / sizeof (const char*)); t++)
113a98: 41 inc %ecx <== NOT EXECUTED
113a99: 83 f9 27 cmp $0x27,%ecx <== NOT EXECUTED
113a9c: 75 9d jne 113a3b <rtems_rfs_trace_shell_command+0x12f><== NOT EXECUTED
113a9e: eb 1d jmp 113abd <rtems_rfs_trace_shell_command+0x1b1><== NOT EXECUTED
else
{
if (strcmp (argv[arg], "set") == 0)
set = true;
if (strcmp (argv[arg], "clear") == 0)
set = false;
113aa0: c6 85 3f ff ff ff 00 movb $0x0,-0xc1(%ebp) <== NOT EXECUTED
113aa7: eb 14 jmp 113abd <rtems_rfs_trace_shell_command+0x1b1><== NOT EXECUTED
else if (strcmp (argv[arg], "all") == 0)
{
if (set)
set_value = RTEMS_RFS_TRACE_ALL;
else
clear_value = RTEMS_RFS_TRACE_ALL;
113aa9: c7 85 40 ff ff ff ff movl $0xffffffff,-0xc0(%ebp) <== NOT EXECUTED
113ab0: ff ff ff
113ab3: c7 85 44 ff ff ff ff movl $0xffffffff,-0xbc(%ebp) <== NOT EXECUTED
113aba: ff ff ff
}
}
}
rtems_rfs_trace_flags |= set_value;
rtems_rfs_trace_flags &= ~clear_value;
113abd: 8b 95 40 ff ff ff mov -0xc0(%ebp),%edx <== NOT EXECUTED
113ac3: f7 d2 not %edx <== NOT EXECUTED
113ac5: 8b 85 44 ff ff ff mov -0xbc(%ebp),%eax <== NOT EXECUTED
113acb: f7 d0 not %eax <== NOT EXECUTED
break;
}
}
}
rtems_rfs_trace_flags |= set_value;
113acd: 8b 1d a8 35 15 00 mov 0x1535a8,%ebx <== NOT EXECUTED
113ad3: 09 f3 or %esi,%ebx <== NOT EXECUTED
113ad5: 8b 0d ac 35 15 00 mov 0x1535ac,%ecx <== NOT EXECUTED
113adb: 09 f9 or %edi,%ecx <== NOT EXECUTED
rtems_rfs_trace_flags &= ~clear_value;
113add: 21 da and %ebx,%edx <== NOT EXECUTED
113adf: 89 15 a8 35 15 00 mov %edx,0x1535a8 <== NOT EXECUTED
113ae5: 21 c8 and %ecx,%eax <== NOT EXECUTED
113ae7: a3 ac 35 15 00 mov %eax,0x1535ac <== NOT EXECUTED
rtems_rfs_trace_mask clear_value = 0;
bool set = true;
int arg;
int t;
for (arg = 1; arg < argc; arg++)
113aec: ff 85 38 ff ff ff incl -0xc8(%ebp) <== NOT EXECUTED
113af2: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
113af5: 39 95 38 ff ff ff cmp %edx,-0xc8(%ebp) <== NOT EXECUTED
113afb: 0f 8c 57 fe ff ff jl 113958 <rtems_rfs_trace_shell_command+0x4c><== NOT EXECUTED
113b01: e9 b8 fe ff ff jmp 1139be <rtems_rfs_trace_shell_command+0xb2><== NOT EXECUTED
rtems_rfs_trace_flags &= ~clear_value;
}
}
return 0;
}
113b06: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
113b09: 5b pop %ebx <== NOT EXECUTED
113b0a: 5e pop %esi <== NOT EXECUTED
113b0b: 5f pop %edi <== NOT EXECUTED
113b0c: 5d pop %ebp <== NOT EXECUTED
113b0d: c3 ret <== NOT EXECUTED
0011cf07 <rtems_rfs_unlink>:
rtems_rfs_unlink (rtems_rfs_file_system* fs,
rtems_rfs_ino parent,
rtems_rfs_ino target,
uint32_t doff,
rtems_rfs_unlink_dir dir_mode)
{
11cf07: 55 push %ebp
11cf08: 89 e5 mov %esp,%ebp
11cf0a: 57 push %edi
11cf0b: 56 push %esi
11cf0c: 53 push %ebx
11cf0d: 83 ec 74 sub $0x74,%esp
11cf10: 8b 75 08 mov 0x8(%ebp),%esi
11cf13: 8b 7d 10 mov 0x10(%ebp),%edi
rtems_rfs_inode_handle target_inode;
uint16_t links;
bool dir;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
11cf16: 6a 00 push $0x0
11cf18: 68 00 00 00 02 push $0x2000000
11cf1d: e8 7a 69 ff ff call 11389c <rtems_rfs_trace>
11cf22: 83 c4 10 add $0x10,%esp
11cf25: 84 c0 test %al,%al
11cf27: 74 12 je 11cf3b <rtems_rfs_unlink+0x34> <== ALWAYS TAKEN
printf ("rtems-rfs: unlink: parent(%" PRIu32 ") -X-> (%" PRIu32 ")\n", parent, target);
11cf29: 50 push %eax <== NOT EXECUTED
11cf2a: 57 push %edi <== NOT EXECUTED
11cf2b: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
11cf2e: 68 7a 1f 13 00 push $0x131f7a <== NOT EXECUTED
11cf33: e8 04 34 00 00 call 12033c <printf> <== NOT EXECUTED
11cf38: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rc = rtems_rfs_inode_open (fs, target, &target_inode, true);
11cf3b: 6a 01 push $0x1
11cf3d: 8d 55 c0 lea -0x40(%ebp),%edx
11cf40: 52 push %edx
11cf41: 57 push %edi
11cf42: 56 push %esi
11cf43: 89 55 90 mov %edx,-0x70(%ebp)
11cf46: e8 df 52 ff ff call 11222a <rtems_rfs_inode_open>
11cf4b: 89 c3 mov %eax,%ebx
if (rc)
11cf4d: 83 c4 10 add $0x10,%esp
11cf50: 85 c0 test %eax,%eax
11cf52: 8b 55 90 mov -0x70(%ebp),%edx
11cf55: 0f 85 0d 03 00 00 jne 11d268 <rtems_rfs_unlink+0x361><== NEVER TAKEN
/*
* If a directory process the unlink mode.
*/
dir = RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&target_inode));
11cf5b: 8b 45 cc mov -0x34(%ebp),%eax
* @return uint16_t The mode.
*/
static inline uint16_t
rtems_rfs_inode_get_mode (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->mode);
11cf5e: 0f b6 40 02 movzbl 0x2(%eax),%eax
11cf62: c1 e0 08 shl $0x8,%eax
11cf65: 66 25 00 f0 and $0xf000,%ax
11cf69: 66 3d 00 40 cmp $0x4000,%ax
if (dir)
11cf6d: 0f 94 45 97 sete -0x69(%ebp)
11cf71: 0f 85 93 00 00 00 jne 11d00a <rtems_rfs_unlink+0x103>
{
switch (dir_mode)
11cf77: 83 7d 18 00 cmpl $0x0,0x18(%ebp)
11cf7b: 74 0c je 11cf89 <rtems_rfs_unlink+0x82> <== NEVER TAKEN
11cf7d: 83 7d 18 01 cmpl $0x1,0x18(%ebp)
11cf81: 0f 85 83 00 00 00 jne 11d00a <rtems_rfs_unlink+0x103><== NEVER TAKEN
11cf87: eb 3e jmp 11cfc7 <rtems_rfs_unlink+0xc0>
{
case rtems_rfs_unlink_dir_denied:
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
11cf89: 50 push %eax <== NOT EXECUTED
11cf8a: 50 push %eax <== NOT EXECUTED
11cf8b: 6a 00 push $0x0 <== NOT EXECUTED
11cf8d: 68 00 00 00 02 push $0x2000000 <== NOT EXECUTED
11cf92: e8 05 69 ff ff call 11389c <rtems_rfs_trace> <== NOT EXECUTED
11cf97: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11cf9a: 84 c0 test %al,%al <== NOT EXECUTED
11cf9c: 74 10 je 11cfae <rtems_rfs_unlink+0xa7> <== NOT EXECUTED
printf ("rtems-rfs: link is a directory\n");
11cf9e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11cfa1: 68 a5 1f 13 00 push $0x131fa5 <== NOT EXECUTED
11cfa6: e8 a9 35 00 00 call 120554 <puts> <== NOT EXECUTED
11cfab: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_rfs_inode_close (fs, &target_inode);
11cfae: 50 push %eax <== NOT EXECUTED
11cfaf: 50 push %eax <== NOT EXECUTED
11cfb0: 8d 45 c0 lea -0x40(%ebp),%eax <== NOT EXECUTED
11cfb3: 50 push %eax <== NOT EXECUTED
11cfb4: 56 push %esi <== NOT EXECUTED
11cfb5: e8 ed 53 ff ff call 1123a7 <rtems_rfs_inode_close> <== NOT EXECUTED
11cfba: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
return EISDIR;
11cfbd: bb 15 00 00 00 mov $0x15,%ebx <== NOT EXECUTED
11cfc2: e9 a1 02 00 00 jmp 11d268 <rtems_rfs_unlink+0x361><== NOT EXECUTED
case rtems_rfs_unlink_dir_if_empty:
rc = rtems_rfs_dir_empty (fs, &target_inode);
11cfc7: 50 push %eax
11cfc8: 50 push %eax
11cfc9: 52 push %edx
11cfca: 56 push %esi
11cfcb: e8 b5 e7 ff ff call 11b785 <rtems_rfs_dir_empty>
11cfd0: 89 c3 mov %eax,%ebx
if (rc > 0)
11cfd2: 83 c4 10 add $0x10,%esp
11cfd5: 85 c0 test %eax,%eax
11cfd7: 7e 31 jle 11d00a <rtems_rfs_unlink+0x103>
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
11cfd9: 57 push %edi
11cfda: 57 push %edi
11cfdb: 6a 00 push $0x0
11cfdd: 68 00 00 00 02 push $0x2000000
11cfe2: e8 b5 68 ff ff call 11389c <rtems_rfs_trace>
11cfe7: 83 c4 10 add $0x10,%esp
11cfea: 84 c0 test %al,%al
11cfec: 0f 84 23 02 00 00 je 11d215 <rtems_rfs_unlink+0x30e>
printf ("rtems-rfs: dir-empty: %d: %s\n", rc, strerror (rc));
11cff2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11cff5: 53 push %ebx <== NOT EXECUTED
11cff6: e8 c9 40 00 00 call 1210c4 <strerror> <== NOT EXECUTED
11cffb: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
11cffe: 50 push %eax <== NOT EXECUTED
11cfff: 53 push %ebx <== NOT EXECUTED
11d000: 68 c4 1f 13 00 push $0x131fc4 <== NOT EXECUTED
11d005: e9 03 02 00 00 jmp 11d20d <rtems_rfs_unlink+0x306><== NOT EXECUTED
default:
break;
}
}
rc = rtems_rfs_inode_open (fs, parent, &parent_inode, true);
11d00a: 6a 01 push $0x1
11d00c: 8d 55 98 lea -0x68(%ebp),%edx
11d00f: 52 push %edx
11d010: ff 75 0c pushl 0xc(%ebp)
11d013: 56 push %esi
11d014: 89 55 90 mov %edx,-0x70(%ebp)
11d017: e8 0e 52 ff ff call 11222a <rtems_rfs_inode_open>
11d01c: 89 c3 mov %eax,%ebx
if (rc)
11d01e: 83 c4 10 add $0x10,%esp
11d021: 85 c0 test %eax,%eax
11d023: 8b 55 90 mov -0x70(%ebp),%edx
11d026: 74 31 je 11d059 <rtems_rfs_unlink+0x152><== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
11d028: 51 push %ecx <== NOT EXECUTED
11d029: 51 push %ecx <== NOT EXECUTED
11d02a: 6a 00 push $0x0 <== NOT EXECUTED
11d02c: 68 00 00 00 02 push $0x2000000 <== NOT EXECUTED
11d031: e8 66 68 ff ff call 11389c <rtems_rfs_trace> <== NOT EXECUTED
11d036: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11d039: 84 c0 test %al,%al <== NOT EXECUTED
11d03b: 0f 84 d4 01 00 00 je 11d215 <rtems_rfs_unlink+0x30e><== NOT EXECUTED
printf ("rtems-rfs: link: inode-open failed: %d: %s\n",
11d041: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11d044: 53 push %ebx <== NOT EXECUTED
11d045: e8 7a 40 00 00 call 1210c4 <strerror> <== NOT EXECUTED
11d04a: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
11d04d: 50 push %eax <== NOT EXECUTED
11d04e: 53 push %ebx <== NOT EXECUTED
11d04f: 68 e2 1f 13 00 push $0x131fe2 <== NOT EXECUTED
11d054: e9 b4 01 00 00 jmp 11d20d <rtems_rfs_unlink+0x306><== NOT EXECUTED
rc, strerror (rc));
rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
rc = rtems_rfs_dir_del_entry (fs, &parent_inode, target, doff);
11d059: ff 75 14 pushl 0x14(%ebp)
11d05c: 57 push %edi
11d05d: 52 push %edx
11d05e: 56 push %esi
11d05f: e8 46 e0 ff ff call 11b0aa <rtems_rfs_dir_del_entry>
11d064: 89 c3 mov %eax,%ebx
if (rc > 0)
11d066: 83 c4 10 add $0x10,%esp
11d069: 85 c0 test %eax,%eax
11d06b: 7e 31 jle 11d09e <rtems_rfs_unlink+0x197><== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
11d06d: 52 push %edx <== NOT EXECUTED
11d06e: 52 push %edx <== NOT EXECUTED
11d06f: 6a 00 push $0x0 <== NOT EXECUTED
11d071: 68 00 00 00 02 push $0x2000000 <== NOT EXECUTED
11d076: e8 21 68 ff ff call 11389c <rtems_rfs_trace> <== NOT EXECUTED
11d07b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11d07e: 84 c0 test %al,%al <== NOT EXECUTED
11d080: 0f 84 3d 01 00 00 je 11d1c3 <rtems_rfs_unlink+0x2bc><== NOT EXECUTED
printf ("rtems-rfs: unlink: dir-del failed: %d: %s\n",
11d086: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11d089: 53 push %ebx <== NOT EXECUTED
11d08a: e8 35 40 00 00 call 1210c4 <strerror> <== NOT EXECUTED
11d08f: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
11d092: 50 push %eax <== NOT EXECUTED
11d093: 53 push %ebx <== NOT EXECUTED
11d094: 68 0e 20 13 00 push $0x13200e <== NOT EXECUTED
11d099: e9 1d 01 00 00 jmp 11d1bb <rtems_rfs_unlink+0x2b4><== NOT EXECUTED
rtems_rfs_inode_close (fs, &parent_inode);
rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
links = rtems_rfs_inode_get_links (&target_inode);
11d09e: 8b 55 cc mov -0x34(%ebp),%edx
*/
static inline uint16_t
rtems_rfs_inode_get_links (rtems_rfs_inode_handle* handle)
{
uint16_t links;
links = rtems_rfs_read_u16 (&handle->node->links);
11d0a1: 0f b6 02 movzbl (%edx),%eax
11d0a4: c1 e0 08 shl $0x8,%eax
11d0a7: 0f b6 5a 01 movzbl 0x1(%edx),%ebx
11d0ab: 09 c3 or %eax,%ebx
if (links == 0xffff)
links = 0;
11d0ad: 31 c0 xor %eax,%eax
11d0af: 66 83 fb ff cmp $0xffff,%bx
11d0b3: 0f 95 c0 setne %al
11d0b6: f7 d8 neg %eax
11d0b8: 21 c3 and %eax,%ebx
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
11d0ba: 50 push %eax
11d0bb: 50 push %eax
11d0bc: 6a 00 push $0x0
11d0be: 68 00 00 00 02 push $0x2000000
11d0c3: e8 d4 67 ff ff call 11389c <rtems_rfs_trace>
11d0c8: 83 c4 10 add $0x10,%esp
11d0cb: 84 c0 test %al,%al
11d0cd: 74 13 je 11d0e2 <rtems_rfs_unlink+0x1db><== ALWAYS TAKEN
printf ("rtems-rfs: unlink: target:%" PRIu32 " links:%u\n", target, links);
11d0cf: 50 push %eax <== NOT EXECUTED
11d0d0: 0f b7 c3 movzwl %bx,%eax <== NOT EXECUTED
11d0d3: 50 push %eax <== NOT EXECUTED
11d0d4: 57 push %edi <== NOT EXECUTED
11d0d5: 68 39 20 13 00 push $0x132039 <== NOT EXECUTED
11d0da: e8 5d 32 00 00 call 12033c <printf> <== NOT EXECUTED
11d0df: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
if (links > 1)
11d0e2: 66 83 fb 01 cmp $0x1,%bx
11d0e6: 76 18 jbe 11d100 <rtems_rfs_unlink+0x1f9>
{
links--;
11d0e8: 4b dec %ebx
* @prarm links The links.
*/
static inline void
rtems_rfs_inode_set_links (rtems_rfs_inode_handle* handle, uint16_t links)
{
rtems_rfs_write_u16 (&handle->node->links, links);
11d0e9: 89 da mov %ebx,%edx
11d0eb: 66 c1 ea 08 shr $0x8,%dx
11d0ef: 8b 45 cc mov -0x34(%ebp),%eax
11d0f2: 88 10 mov %dl,(%eax)
11d0f4: 8b 45 cc mov -0x34(%ebp),%eax
11d0f7: 88 58 01 mov %bl,0x1(%eax)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
11d0fa: c6 45 d0 01 movb $0x1,-0x30(%ebp)
11d0fe: eb 7c jmp 11d17c <rtems_rfs_unlink+0x275>
else
{
/*
* Erasing the inode releases all blocks attached to it.
*/
rc = rtems_rfs_inode_delete (fs, &target_inode);
11d100: 50 push %eax
11d101: 50 push %eax
11d102: 8d 45 c0 lea -0x40(%ebp),%eax
11d105: 50 push %eax
11d106: 56 push %esi
11d107: e8 20 53 ff ff call 11242c <rtems_rfs_inode_delete>
11d10c: 89 c3 mov %eax,%ebx
if (rc > 0)
11d10e: 83 c4 10 add $0x10,%esp
11d111: 85 c0 test %eax,%eax
11d113: 7e 2e jle 11d143 <rtems_rfs_unlink+0x23c><== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
11d115: 50 push %eax <== NOT EXECUTED
11d116: 50 push %eax <== NOT EXECUTED
11d117: 6a 00 push $0x0 <== NOT EXECUTED
11d119: 68 00 00 00 02 push $0x2000000 <== NOT EXECUTED
11d11e: e8 79 67 ff ff call 11389c <rtems_rfs_trace> <== NOT EXECUTED
11d123: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11d126: 84 c0 test %al,%al <== NOT EXECUTED
11d128: 0f 84 95 00 00 00 je 11d1c3 <rtems_rfs_unlink+0x2bc><== NOT EXECUTED
printf ("rtems-rfs: unlink: inode-del failed: %d: %s\n",
11d12e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11d131: 53 push %ebx <== NOT EXECUTED
11d132: e8 8d 3f 00 00 call 1210c4 <strerror> <== NOT EXECUTED
11d137: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
11d13a: 50 push %eax <== NOT EXECUTED
11d13b: 53 push %ebx <== NOT EXECUTED
11d13c: 68 61 20 13 00 push $0x132061 <== NOT EXECUTED
11d141: eb 78 jmp 11d1bb <rtems_rfs_unlink+0x2b4><== NOT EXECUTED
rtems_rfs_inode_close (fs, &parent_inode);
rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
if (dir)
11d143: 80 7d 97 00 cmpb $0x0,-0x69(%ebp)
11d147: 74 33 je 11d17c <rtems_rfs_unlink+0x275>
{
links = rtems_rfs_inode_get_links (&parent_inode);
11d149: 8b 55 a4 mov -0x5c(%ebp),%edx
*/
static inline uint16_t
rtems_rfs_inode_get_links (rtems_rfs_inode_handle* handle)
{
uint16_t links;
links = rtems_rfs_read_u16 (&handle->node->links);
11d14c: 0f b6 0a movzbl (%edx),%ecx
11d14f: c1 e1 08 shl $0x8,%ecx
11d152: 0f b6 42 01 movzbl 0x1(%edx),%eax
11d156: 09 c8 or %ecx,%eax
if (links == 0xffff)
11d158: 66 83 f8 ff cmp $0xffff,%ax
11d15c: 74 0a je 11d168 <rtems_rfs_unlink+0x261><== NEVER TAKEN
if (links > 1)
links--;
11d15e: 66 83 f8 02 cmp $0x2,%ax
11d162: 66 83 d0 ff adc $0xffff,%ax
11d166: eb 02 jmp 11d16a <rtems_rfs_unlink+0x263>
links = 0;
11d168: 31 c0 xor %eax,%eax
* @prarm links The links.
*/
static inline void
rtems_rfs_inode_set_links (rtems_rfs_inode_handle* handle, uint16_t links)
{
rtems_rfs_write_u16 (&handle->node->links, links);
11d16a: 89 c1 mov %eax,%ecx
11d16c: 66 c1 e9 08 shr $0x8,%cx
11d170: 88 0a mov %cl,(%edx)
11d172: 8b 55 a4 mov -0x5c(%ebp),%edx
11d175: 88 42 01 mov %al,0x1(%edx)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
11d178: c6 45 a8 01 movb $0x1,-0x58(%ebp)
rtems_rfs_inode_set_links (&parent_inode, links);
}
}
rc = rtems_rfs_inode_time_stamp_now (&parent_inode, true, true);
11d17c: 50 push %eax
11d17d: 6a 01 push $0x1
11d17f: 6a 01 push $0x1
11d181: 8d 7d 98 lea -0x68(%ebp),%edi
11d184: 57 push %edi
11d185: e8 5f 53 ff ff call 1124e9 <rtems_rfs_inode_time_stamp_now>
11d18a: 89 c3 mov %eax,%ebx
if (rc > 0)
11d18c: 83 c4 10 add $0x10,%esp
11d18f: 85 c0 test %eax,%eax
11d191: 7e 40 jle 11d1d3 <rtems_rfs_unlink+0x2cc><== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
11d193: 50 push %eax <== NOT EXECUTED
11d194: 50 push %eax <== NOT EXECUTED
11d195: 6a 00 push $0x0 <== NOT EXECUTED
11d197: 68 00 00 00 02 push $0x2000000 <== NOT EXECUTED
11d19c: e8 fb 66 ff ff call 11389c <rtems_rfs_trace> <== NOT EXECUTED
11d1a1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11d1a4: 84 c0 test %al,%al <== NOT EXECUTED
11d1a6: 74 1b je 11d1c3 <rtems_rfs_unlink+0x2bc><== NOT EXECUTED
printf ("rtems-rfs: link: inode-time-stamp failed: %d: %s\n",
11d1a8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11d1ab: 53 push %ebx <== NOT EXECUTED
11d1ac: e8 13 3f 00 00 call 1210c4 <strerror> <== NOT EXECUTED
11d1b1: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
11d1b4: 50 push %eax <== NOT EXECUTED
11d1b5: 53 push %ebx <== NOT EXECUTED
11d1b6: 68 8e 20 13 00 push $0x13208e <== NOT EXECUTED
11d1bb: e8 7c 31 00 00 call 12033c <printf> <== NOT EXECUTED
11d1c0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rc, strerror (rc));
rtems_rfs_inode_close (fs, &parent_inode);
11d1c3: 52 push %edx <== NOT EXECUTED
11d1c4: 52 push %edx <== NOT EXECUTED
11d1c5: 8d 45 98 lea -0x68(%ebp),%eax <== NOT EXECUTED
11d1c8: 50 push %eax <== NOT EXECUTED
11d1c9: 56 push %esi <== NOT EXECUTED
11d1ca: e8 d8 51 ff ff call 1123a7 <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_inode_close (fs, &target_inode);
11d1cf: 59 pop %ecx <== NOT EXECUTED
11d1d0: 5f pop %edi <== NOT EXECUTED
11d1d1: eb 44 jmp 11d217 <rtems_rfs_unlink+0x310><== NOT EXECUTED
return rc;
}
rc = rtems_rfs_inode_close (fs, &parent_inode);
11d1d3: 50 push %eax
11d1d4: 50 push %eax
11d1d5: 57 push %edi
11d1d6: 56 push %esi
11d1d7: e8 cb 51 ff ff call 1123a7 <rtems_rfs_inode_close>
11d1dc: 89 c3 mov %eax,%ebx
if (rc > 0)
11d1de: 83 c4 10 add $0x10,%esp
11d1e1: 85 c0 test %eax,%eax
11d1e3: 7e 3e jle 11d223 <rtems_rfs_unlink+0x31c><== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
11d1e5: 50 push %eax <== NOT EXECUTED
11d1e6: 50 push %eax <== NOT EXECUTED
11d1e7: 6a 00 push $0x0 <== NOT EXECUTED
11d1e9: 68 00 00 00 02 push $0x2000000 <== NOT EXECUTED
11d1ee: e8 a9 66 ff ff call 11389c <rtems_rfs_trace> <== NOT EXECUTED
11d1f3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11d1f6: 84 c0 test %al,%al <== NOT EXECUTED
11d1f8: 74 1b je 11d215 <rtems_rfs_unlink+0x30e><== NOT EXECUTED
printf ("rtems-rfs: link: parent inode-close failed: %d: %s\n",
11d1fa: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11d1fd: 53 push %ebx <== NOT EXECUTED
11d1fe: e8 c1 3e 00 00 call 1210c4 <strerror> <== NOT EXECUTED
11d203: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
11d206: 50 push %eax <== NOT EXECUTED
11d207: 53 push %ebx <== NOT EXECUTED
11d208: 68 c0 20 13 00 push $0x1320c0 <== NOT EXECUTED
11d20d: e8 2a 31 00 00 call 12033c <printf> <== NOT EXECUTED
11d212: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rc, strerror (rc));
rtems_rfs_inode_close (fs, &target_inode);
11d215: 50 push %eax
11d216: 50 push %eax
11d217: 8d 45 c0 lea -0x40(%ebp),%eax
11d21a: 50 push %eax
11d21b: 56 push %esi
11d21c: e8 86 51 ff ff call 1123a7 <rtems_rfs_inode_close>
11d221: eb 42 jmp 11d265 <rtems_rfs_unlink+0x35e>
return rc;
}
rc = rtems_rfs_inode_close (fs, &target_inode);
11d223: 50 push %eax
11d224: 50 push %eax
11d225: 8d 45 c0 lea -0x40(%ebp),%eax
11d228: 50 push %eax
11d229: 56 push %esi
11d22a: e8 78 51 ff ff call 1123a7 <rtems_rfs_inode_close>
11d22f: 89 c3 mov %eax,%ebx
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
11d231: 83 c4 10 add $0x10,%esp
11d234: 85 c0 test %eax,%eax
11d236: 7e 30 jle 11d268 <rtems_rfs_unlink+0x361><== ALWAYS TAKEN
11d238: 50 push %eax <== NOT EXECUTED
11d239: 50 push %eax <== NOT EXECUTED
11d23a: 6a 00 push $0x0 <== NOT EXECUTED
11d23c: 68 00 00 00 02 push $0x2000000 <== NOT EXECUTED
11d241: e8 56 66 ff ff call 11389c <rtems_rfs_trace> <== NOT EXECUTED
11d246: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11d249: 84 c0 test %al,%al <== NOT EXECUTED
11d24b: 74 1b je 11d268 <rtems_rfs_unlink+0x361><== NOT EXECUTED
printf ("rtems-rfs: link: target inode-close failed: %d: %s\n",
11d24d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11d250: 53 push %ebx <== NOT EXECUTED
11d251: e8 6e 3e 00 00 call 1210c4 <strerror> <== NOT EXECUTED
11d256: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
11d259: 50 push %eax <== NOT EXECUTED
11d25a: 53 push %ebx <== NOT EXECUTED
11d25b: 68 f4 20 13 00 push $0x1320f4 <== NOT EXECUTED
11d260: e8 d7 30 00 00 call 12033c <printf> <== NOT EXECUTED
11d265: 83 c4 10 add $0x10,%esp
rc, strerror (rc));
return rc;
}
11d268: 89 d8 mov %ebx,%eax
11d26a: 8d 65 f4 lea -0xc(%ebp),%esp
11d26d: 5b pop %ebx
11d26e: 5e pop %esi
11d26f: 5f pop %edi
11d270: 5d pop %ebp
11d271: c3 ret
0011f46f <rtems_shell_rfs_format>:
int
rtems_shell_rfs_format (int argc, char* argv[])
{
11f46f: 55 push %ebp <== NOT EXECUTED
11f470: 89 e5 mov %esp,%ebp <== NOT EXECUTED
11f472: 57 push %edi <== NOT EXECUTED
11f473: 56 push %esi <== NOT EXECUTED
11f474: 53 push %ebx <== NOT EXECUTED
11f475: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED
11f478: 8b 75 0c mov 0xc(%ebp),%esi <== NOT EXECUTED
rtems_rfs_format_config config;
const char* driver = NULL;
int arg;
memset (&config, 0, sizeof (rtems_rfs_format_config));
11f47b: 8d 55 d0 lea -0x30(%ebp),%edx <== NOT EXECUTED
11f47e: b9 06 00 00 00 mov $0x6,%ecx <== NOT EXECUTED
11f483: 31 c0 xor %eax,%eax <== NOT EXECUTED
11f485: 89 d7 mov %edx,%edi <== NOT EXECUTED
11f487: f3 ab rep stos %eax,%es:(%edi) <== NOT EXECUTED
for (arg = 1; arg < argc; arg++)
11f489: bb 01 00 00 00 mov $0x1,%ebx <== NOT EXECUTED
int
rtems_shell_rfs_format (int argc, char* argv[])
{
rtems_rfs_format_config config;
const char* driver = NULL;
11f48e: 31 ff xor %edi,%edi <== NOT EXECUTED
int arg;
memset (&config, 0, sizeof (rtems_rfs_format_config));
for (arg = 1; arg < argc; arg++)
11f490: e9 f4 00 00 00 jmp 11f589 <rtems_shell_rfs_format+0x11a><== NOT EXECUTED
{
if (argv[arg][0] == '-')
11f495: 8b 0c 9e mov (%esi,%ebx,4),%ecx <== NOT EXECUTED
11f498: 80 39 2d cmpb $0x2d,(%ecx) <== NOT EXECUTED
11f49b: 0f 85 d7 00 00 00 jne 11f578 <rtems_shell_rfs_format+0x109><== NOT EXECUTED
{
switch (argv[arg][1])
11f4a1: 8a 41 01 mov 0x1(%ecx),%al <== NOT EXECUTED
11f4a4: 3c 69 cmp $0x69,%al <== NOT EXECUTED
11f4a6: 74 79 je 11f521 <rtems_shell_rfs_format+0xb2><== NOT EXECUTED
11f4a8: 7f 12 jg 11f4bc <rtems_shell_rfs_format+0x4d><== NOT EXECUTED
11f4aa: 3c 49 cmp $0x49,%al <== NOT EXECUTED
11f4ac: 0f 84 94 00 00 00 je 11f546 <rtems_shell_rfs_format+0xd7><== NOT EXECUTED
11f4b2: 3c 62 cmp $0x62,%al <== NOT EXECUTED
11f4b4: 0f 85 b4 00 00 00 jne 11f56e <rtems_shell_rfs_format+0xff><== NOT EXECUTED
11f4ba: eb 40 jmp 11f4fc <rtems_shell_rfs_format+0x8d><== NOT EXECUTED
11f4bc: 3c 73 cmp $0x73,%al <== NOT EXECUTED
11f4be: 74 17 je 11f4d7 <rtems_shell_rfs_format+0x68><== NOT EXECUTED
11f4c0: 3c 76 cmp $0x76,%al <== NOT EXECUTED
11f4c2: 74 0a je 11f4ce <rtems_shell_rfs_format+0x5f><== NOT EXECUTED
11f4c4: 3c 6f cmp $0x6f,%al <== NOT EXECUTED
11f4c6: 0f 85 a2 00 00 00 jne 11f56e <rtems_shell_rfs_format+0xff><== NOT EXECUTED
11f4cc: eb 7e jmp 11f54c <rtems_shell_rfs_format+0xdd><== NOT EXECUTED
{
case 'v':
config.verbose = true;
11f4ce: c6 45 e5 01 movb $0x1,-0x1b(%ebp) <== NOT EXECUTED
break;
11f4d2: e9 b1 00 00 00 jmp 11f588 <rtems_shell_rfs_format+0x119><== NOT EXECUTED
case 's':
arg++;
11f4d7: 43 inc %ebx <== NOT EXECUTED
if (arg >= argc)
11f4d8: 3b 5d 08 cmp 0x8(%ebp),%ebx <== NOT EXECUTED
11f4db: 7c 0d jl 11f4ea <rtems_shell_rfs_format+0x7b><== NOT EXECUTED
{
printf ("error: block size needs an argument\n");
11f4dd: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11f4e0: 68 d7 f6 14 00 push $0x14f6d7 <== NOT EXECUTED
11f4e5: e9 b4 00 00 00 jmp 11f59e <rtems_shell_rfs_format+0x12f><== NOT EXECUTED
return 1;
}
config.block_size = strtoul (argv[arg], 0, 0);
11f4ea: 50 push %eax <== NOT EXECUTED
11f4eb: 6a 00 push $0x0 <== NOT EXECUTED
11f4ed: 6a 00 push $0x0 <== NOT EXECUTED
11f4ef: ff 34 9e pushl (%esi,%ebx,4) <== NOT EXECUTED
11f4f2: e8 b1 96 01 00 call 138ba8 <strtoul> <== NOT EXECUTED
11f4f7: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED
11f4fa: eb 45 jmp 11f541 <rtems_shell_rfs_format+0xd2><== NOT EXECUTED
break;
case 'b':
arg++;
11f4fc: 43 inc %ebx <== NOT EXECUTED
if (arg >= argc)
11f4fd: 3b 5d 08 cmp 0x8(%ebp),%ebx <== NOT EXECUTED
11f500: 7c 0d jl 11f50f <rtems_shell_rfs_format+0xa0><== NOT EXECUTED
{
printf ("error: group block count needs an argument\n");
11f502: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11f505: 68 fb f6 14 00 push $0x14f6fb <== NOT EXECUTED
11f50a: e9 8f 00 00 00 jmp 11f59e <rtems_shell_rfs_format+0x12f><== NOT EXECUTED
return 1;
}
config.group_blocks = strtoul (argv[arg], 0, 0);
11f50f: 50 push %eax <== NOT EXECUTED
11f510: 6a 00 push $0x0 <== NOT EXECUTED
11f512: 6a 00 push $0x0 <== NOT EXECUTED
11f514: ff 34 9e pushl (%esi,%ebx,4) <== NOT EXECUTED
11f517: e8 8c 96 01 00 call 138ba8 <strtoul> <== NOT EXECUTED
11f51c: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED
11f51f: eb 20 jmp 11f541 <rtems_shell_rfs_format+0xd2><== NOT EXECUTED
break;
case 'i':
arg++;
11f521: 43 inc %ebx <== NOT EXECUTED
if (arg >= argc)
11f522: 3b 5d 08 cmp 0x8(%ebp),%ebx <== NOT EXECUTED
11f525: 7c 0a jl 11f531 <rtems_shell_rfs_format+0xc2><== NOT EXECUTED
{
printf ("error: group inode count needs an argument\n");
11f527: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11f52a: 68 26 f7 14 00 push $0x14f726 <== NOT EXECUTED
11f52f: eb 6d jmp 11f59e <rtems_shell_rfs_format+0x12f><== NOT EXECUTED
return 1;
}
config.group_inodes = strtoul (argv[arg], 0, 0);
11f531: 50 push %eax <== NOT EXECUTED
11f532: 6a 00 push $0x0 <== NOT EXECUTED
11f534: 6a 00 push $0x0 <== NOT EXECUTED
11f536: ff 34 9e pushl (%esi,%ebx,4) <== NOT EXECUTED
11f539: e8 6a 96 01 00 call 138ba8 <strtoul> <== NOT EXECUTED
11f53e: 89 45 d8 mov %eax,-0x28(%ebp) <== NOT EXECUTED
break;
11f541: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11f544: eb 42 jmp 11f588 <rtems_shell_rfs_format+0x119><== NOT EXECUTED
case 'I':
config.initialise_inodes = true;
11f546: c6 45 e4 01 movb $0x1,-0x1c(%ebp) <== NOT EXECUTED
break;
11f54a: eb 3c jmp 11f588 <rtems_shell_rfs_format+0x119><== NOT EXECUTED
case 'o':
arg++;
11f54c: 43 inc %ebx <== NOT EXECUTED
if (arg >= argc)
11f54d: 3b 5d 08 cmp 0x8(%ebp),%ebx <== NOT EXECUTED
11f550: 7c 0a jl 11f55c <rtems_shell_rfs_format+0xed><== NOT EXECUTED
{
printf ("error: inode percentage overhead needs an argument\n");
11f552: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11f555: 68 51 f7 14 00 push $0x14f751 <== NOT EXECUTED
11f55a: eb 42 jmp 11f59e <rtems_shell_rfs_format+0x12f><== NOT EXECUTED
return 1;
}
config.inode_overhead = strtoul (argv[arg], 0, 0);
11f55c: 50 push %eax <== NOT EXECUTED
11f55d: 6a 00 push $0x0 <== NOT EXECUTED
11f55f: 6a 00 push $0x0 <== NOT EXECUTED
11f561: ff 34 9e pushl (%esi,%ebx,4) <== NOT EXECUTED
11f564: e8 3f 96 01 00 call 138ba8 <strtoul> <== NOT EXECUTED
11f569: 89 45 dc mov %eax,-0x24(%ebp) <== NOT EXECUTED
11f56c: eb d3 jmp 11f541 <rtems_shell_rfs_format+0xd2><== NOT EXECUTED
break;
default:
printf ("error: invalid option: %s\n", argv[arg]);
11f56e: 57 push %edi <== NOT EXECUTED
11f56f: 57 push %edi <== NOT EXECUTED
11f570: 51 push %ecx <== NOT EXECUTED
11f571: 68 2a dc 14 00 push $0x14dc2a <== NOT EXECUTED
11f576: eb 5b jmp 11f5d3 <rtems_shell_rfs_format+0x164><== NOT EXECUTED
return 1;
}
}
else
{
if (!driver)
11f578: 85 ff test %edi,%edi <== NOT EXECUTED
11f57a: 74 0a je 11f586 <rtems_shell_rfs_format+0x117><== NOT EXECUTED
driver = argv[arg];
else
{
printf ("error: only one driver name allowed: %s\n", argv[arg]);
11f57c: 56 push %esi <== NOT EXECUTED
11f57d: 56 push %esi <== NOT EXECUTED
11f57e: 51 push %ecx <== NOT EXECUTED
11f57f: 68 84 f7 14 00 push $0x14f784 <== NOT EXECUTED
11f584: eb 4d jmp 11f5d3 <rtems_shell_rfs_format+0x164><== NOT EXECUTED
return 1;
}
}
else
{
if (!driver)
11f586: 89 cf mov %ecx,%edi <== NOT EXECUTED
const char* driver = NULL;
int arg;
memset (&config, 0, sizeof (rtems_rfs_format_config));
for (arg = 1; arg < argc; arg++)
11f588: 43 inc %ebx <== NOT EXECUTED
11f589: 3b 5d 08 cmp 0x8(%ebp),%ebx <== NOT EXECUTED
11f58c: 0f 8c 03 ff ff ff jl 11f495 <rtems_shell_rfs_format+0x26><== NOT EXECUTED
return 1;
}
}
}
if (!driver) {
11f592: 85 ff test %edi,%edi <== NOT EXECUTED
11f594: 75 0f jne 11f5a5 <rtems_shell_rfs_format+0x136><== NOT EXECUTED
printf ("error: no driver name provided\n");
11f596: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11f599: 68 ad f7 14 00 push $0x14f7ad <== NOT EXECUTED
11f59e: e8 b5 5c 01 00 call 135258 <puts> <== NOT EXECUTED
11f5a3: eb 33 jmp 11f5d8 <rtems_shell_rfs_format+0x169><== NOT EXECUTED
return 1;
}
if (rtems_rfs_format (driver, &config) < 0)
11f5a5: 53 push %ebx <== NOT EXECUTED
11f5a6: 53 push %ebx <== NOT EXECUTED
11f5a7: 8d 45 d0 lea -0x30(%ebp),%eax <== NOT EXECUTED
11f5aa: 50 push %eax <== NOT EXECUTED
11f5ab: 57 push %edi <== NOT EXECUTED
11f5ac: e8 51 a6 00 00 call 129c02 <rtems_rfs_format> <== NOT EXECUTED
11f5b1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
printf ("error: format of %s failed: %s\n",
driver, strerror (errno));
return 1;
}
return 0;
11f5b4: 31 d2 xor %edx,%edx <== NOT EXECUTED
if (!driver) {
printf ("error: no driver name provided\n");
return 1;
}
if (rtems_rfs_format (driver, &config) < 0)
11f5b6: 85 c0 test %eax,%eax <== NOT EXECUTED
11f5b8: 79 26 jns 11f5e0 <rtems_shell_rfs_format+0x171><== NOT EXECUTED
{
printf ("error: format of %s failed: %s\n",
driver, strerror (errno));
11f5ba: e8 c9 18 01 00 call 130e88 <__errno> <== NOT EXECUTED
return 1;
}
if (rtems_rfs_format (driver, &config) < 0)
{
printf ("error: format of %s failed: %s\n",
11f5bf: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11f5c2: ff 30 pushl (%eax) <== NOT EXECUTED
11f5c4: e8 cb 79 01 00 call 136f94 <strerror> <== NOT EXECUTED
11f5c9: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
11f5cc: 50 push %eax <== NOT EXECUTED
11f5cd: 57 push %edi <== NOT EXECUTED
11f5ce: 68 cc f7 14 00 push $0x14f7cc <== NOT EXECUTED
11f5d3: e8 68 5a 01 00 call 135040 <printf> <== NOT EXECUTED
11f5d8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
driver, strerror (errno));
return 1;
11f5db: ba 01 00 00 00 mov $0x1,%edx <== NOT EXECUTED
}
return 0;
}
11f5e0: 89 d0 mov %edx,%eax <== NOT EXECUTED
11f5e2: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
11f5e5: 5b pop %ebx <== NOT EXECUTED
11f5e6: 5e pop %esi <== NOT EXECUTED
11f5e7: 5f pop %edi <== NOT EXECUTED
11f5e8: 5d pop %ebp <== NOT EXECUTED
11f5e9: c3 ret <== NOT EXECUTED
00115724 <rtems_signal_send>:
rtems_status_code rtems_signal_send(
rtems_id id,
rtems_signal_set signal_set
)
{
115724: 55 push %ebp
115725: 89 e5 mov %esp,%ebp
115727: 53 push %ebx
115728: 83 ec 14 sub $0x14,%esp
11572b: 8b 5d 0c mov 0xc(%ebp),%ebx
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
return RTEMS_INVALID_NUMBER;
11572e: b8 0a 00 00 00 mov $0xa,%eax
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
115733: 85 db test %ebx,%ebx
115735: 74 6d je 1157a4 <rtems_signal_send+0x80>
return RTEMS_INVALID_NUMBER;
the_thread = _Thread_Get( id, &location );
115737: 50 push %eax
115738: 50 push %eax
115739: 8d 45 f4 lea -0xc(%ebp),%eax
11573c: 50 push %eax
11573d: ff 75 08 pushl 0x8(%ebp)
115740: e8 6f 3c 00 00 call 1193b4 <_Thread_Get>
switch ( location ) {
115745: 83 c4 10 add $0x10,%esp
115748: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
11574c: 75 51 jne 11579f <rtems_signal_send+0x7b>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
11574e: 8b 90 e4 00 00 00 mov 0xe4(%eax),%edx
asr = &api->Signal;
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
115754: 83 7a 0c 00 cmpl $0x0,0xc(%edx)
115758: 74 39 je 115793 <rtems_signal_send+0x6f>
if ( asr->is_enabled ) {
11575a: 80 7a 08 00 cmpb $0x0,0x8(%edx)
11575e: 74 22 je 115782 <rtems_signal_send+0x5e>
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
115760: 9c pushf
115761: fa cli
115762: 59 pop %ecx
*signal_set |= signals;
115763: 09 5a 14 or %ebx,0x14(%edx)
_ISR_Enable( _level );
115766: 51 push %ecx
115767: 9d popf
_ASR_Post_signals( signal_set, &asr->signals_posted );
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
115768: 83 3d 60 83 14 00 00 cmpl $0x0,0x148360
11576f: 74 19 je 11578a <rtems_signal_send+0x66>
115771: 3b 05 64 83 14 00 cmp 0x148364,%eax
115777: 75 11 jne 11578a <rtems_signal_send+0x66><== NEVER TAKEN
_Thread_Dispatch_necessary = true;
115779: c6 05 70 83 14 00 01 movb $0x1,0x148370
115780: eb 08 jmp 11578a <rtems_signal_send+0x66>
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
115782: 9c pushf
115783: fa cli
115784: 58 pop %eax
*signal_set |= signals;
115785: 09 5a 18 or %ebx,0x18(%edx)
_ISR_Enable( _level );
115788: 50 push %eax
115789: 9d popf
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
11578a: e8 05 3c 00 00 call 119394 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
11578f: 31 c0 xor %eax,%eax
115791: eb 11 jmp 1157a4 <rtems_signal_send+0x80>
}
_Thread_Enable_dispatch();
115793: e8 fc 3b 00 00 call 119394 <_Thread_Enable_dispatch>
return RTEMS_NOT_DEFINED;
115798: b8 0b 00 00 00 mov $0xb,%eax
11579d: eb 05 jmp 1157a4 <rtems_signal_send+0x80>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
11579f: b8 04 00 00 00 mov $0x4,%eax
}
1157a4: 8b 5d fc mov -0x4(%ebp),%ebx
1157a7: c9 leave
1157a8: c3 ret
00120a83 <rtems_stack_checker_begin_extension>:
* rtems_stack_checker_Begin_extension
*/
void rtems_stack_checker_begin_extension(
Thread_Control *the_thread
)
{
120a83: 55 push %ebp
120a84: 89 e5 mov %esp,%ebp
120a86: 57 push %edi
120a87: 56 push %esi
120a88: 8b 45 08 mov 0x8(%ebp),%eax
Stack_check_Control *the_pattern;
if ( the_thread->Object.id == 0 ) /* skip system tasks */
120a8b: 83 78 08 00 cmpl $0x0,0x8(%eax)
120a8f: 74 15 je 120aa6 <rtems_stack_checker_begin_extension+0x23><== NEVER TAKEN
return;
the_pattern = Stack_check_Get_pattern_area(&the_thread->Start.Initial_stack);
*the_pattern = Stack_check_Pattern;
120a91: 8b b8 b8 00 00 00 mov 0xb8(%eax),%edi
120a97: 83 c7 08 add $0x8,%edi
120a9a: be 08 ec 16 00 mov $0x16ec08,%esi
120a9f: b9 04 00 00 00 mov $0x4,%ecx
120aa4: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
}
120aa6: 5e pop %esi
120aa7: 5f pop %edi
120aa8: 5d pop %ebp
120aa9: c3 ret
001209fc <rtems_stack_checker_create_extension>:
*/
bool rtems_stack_checker_create_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *the_thread
)
{
1209fc: 55 push %ebp
1209fd: 89 e5 mov %esp,%ebp
1209ff: 57 push %edi
120a00: 53 push %ebx
120a01: 8b 5d 0c mov 0xc(%ebp),%ebx
static uint32_t pattern[ 4 ] = {
0xFEEDF00D, 0x0BAD0D06, /* FEED FOOD to BAD DOG */
0xDEADF00D, 0x600D0D06 /* DEAD FOOD but GOOD DOG */
};
if ( Stack_check_Initialized )
120a04: 83 3d 40 da 16 00 00 cmpl $0x0,0x16da40
120a0b: 75 5a jne 120a67 <rtems_stack_checker_create_extension+0x6b>
/*
* Dope the pattern and fill areas
*/
p = Stack_check_Pattern.pattern;
for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) {
p[i] = pattern[ i%4 ];
120a0d: c7 05 08 ec 16 00 0d movl $0xfeedf00d,0x16ec08
120a14: f0 ed fe
120a17: c7 05 0c ec 16 00 06 movl $0xbad0d06,0x16ec0c
120a1e: 0d ad 0b
120a21: c7 05 10 ec 16 00 0d movl $0xdeadf00d,0x16ec10
120a28: f0 ad de
120a2b: c7 05 14 ec 16 00 06 movl $0x600d0d06,0x16ec14
120a32: 0d 0d 60
/*
* 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) {
120a35: 8b 15 f8 e6 16 00 mov 0x16e6f8,%edx
120a3b: 85 d2 test %edx,%edx
120a3d: 74 1e je 120a5d <rtems_stack_checker_create_extension+0x61><== NEVER TAKEN
120a3f: 8b 0d fc e6 16 00 mov 0x16e6fc,%ecx
120a45: 85 c9 test %ecx,%ecx
120a47: 74 14 je 120a5d <rtems_stack_checker_create_extension+0x61><== NEVER TAKEN
Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low;
120a49: 89 15 1c ec 16 00 mov %edx,0x16ec1c
Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high -
120a4f: 29 d1 sub %edx,%ecx
120a51: 89 0d 18 ec 16 00 mov %ecx,0x16ec18
(char *) _CPU_Interrupt_stack_low;
Stack_check_Dope_stack(&Stack_check_Interrupt_stack);
120a57: b0 a5 mov $0xa5,%al
120a59: 89 d7 mov %edx,%edi
120a5b: f3 aa rep stos %al,%es:(%edi)
}
#endif
Stack_check_Initialized = 1;
120a5d: c7 05 40 da 16 00 01 movl $0x1,0x16da40
120a64: 00 00 00
Thread_Control *the_thread
)
{
Stack_check_Initialize();
if (the_thread)
120a67: 85 db test %ebx,%ebx
120a69: 74 12 je 120a7d <rtems_stack_checker_create_extension+0x81><== NEVER TAKEN
Stack_check_Dope_stack(&the_thread->Start.Initial_stack);
120a6b: 8b 93 b8 00 00 00 mov 0xb8(%ebx),%edx
120a71: 8b 8b b4 00 00 00 mov 0xb4(%ebx),%ecx
120a77: b0 a5 mov $0xa5,%al
120a79: 89 d7 mov %edx,%edi
120a7b: f3 aa rep stos %al,%es:(%edi)
return true;
}
120a7d: b0 01 mov $0x1,%al
120a7f: 5b pop %ebx
120a80: 5f pop %edi
120a81: 5d pop %ebp
120a82: c3 ret
00120bb5 <rtems_stack_checker_is_blown>:
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
{
120bb5: 55 push %ebp
120bb6: 89 e5 mov %esp,%ebp
120bb8: 53 push %ebx
120bb9: 83 ec 14 sub $0x14,%esp
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
120bbc: 8b 1d 04 e7 16 00 mov 0x16e704,%ebx
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
120bc2: 8b 93 b8 00 00 00 mov 0xb8(%ebx),%edx
return false;
120bc8: 31 c9 xor %ecx,%ecx
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
120bca: 39 d5 cmp %edx,%ebp
120bcc: 72 0d jb 120bdb <rtems_stack_checker_is_blown+0x26><== NEVER TAKEN
return false;
}
if ( sp > (the_stack->area + the_stack->size) ) {
120bce: 8b 83 b4 00 00 00 mov 0xb4(%ebx),%eax
120bd4: 01 d0 add %edx,%eax
120bd6: 39 c5 cmp %eax,%ebp
120bd8: 0f 96 c1 setbe %cl
*/
bool rtems_stack_checker_is_blown( void )
{
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
bool sp_ok;
bool pattern_ok = true;
120bdb: b0 01 mov $0x1,%al
/*
* The stack checker must be initialized before the pattern is there
* to check.
*/
if ( Stack_check_Initialized ) {
120bdd: 83 3d 40 da 16 00 00 cmpl $0x0,0x16da40
120be4: 74 1f je 120c05 <rtems_stack_checker_is_blown+0x50><== NEVER TAKEN
pattern_ok = (!memcmp(
120be6: 50 push %eax
120be7: 6a 10 push $0x10
120be9: 68 08 ec 16 00 push $0x16ec08
120bee: 83 c2 08 add $0x8,%edx
120bf1: 52 push %edx
120bf2: 88 4d f4 mov %cl,-0xc(%ebp)
120bf5: e8 6e 34 01 00 call 134068 <memcmp>
120bfa: 83 c4 10 add $0x10,%esp
120bfd: 85 c0 test %eax,%eax
120bff: 0f 94 c0 sete %al
120c02: 8a 4d f4 mov -0xc(%ebp),%cl
/*
* Let's report as much as we can.
*/
if ( !sp_ok || !pattern_ok ) {
120c05: 84 c0 test %al,%al
120c07: 74 04 je 120c0d <rtems_stack_checker_is_blown+0x58><== NEVER TAKEN
120c09: 84 c9 test %cl,%cl
120c0b: 75 0c jne 120c19 <rtems_stack_checker_is_blown+0x64><== ALWAYS TAKEN
Stack_check_report_blown_task( _Thread_Executing, pattern_ok );
120c0d: 52 push %edx <== NOT EXECUTED
120c0e: 52 push %edx <== NOT EXECUTED
120c0f: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED
120c12: 50 push %eax <== NOT EXECUTED
120c13: 53 push %ebx <== NOT EXECUTED
120c14: e8 91 fe ff ff call 120aaa <Stack_check_report_blown_task><== NOT EXECUTED
/*
* The Stack Pointer and the Pattern Area are OK so return false.
*/
return false;
}
120c19: 31 c0 xor %eax,%eax
120c1b: 8b 5d fc mov -0x4(%ebp),%ebx
120c1e: c9 leave
120c1f: c3 ret
00120c85 <rtems_stack_checker_report_usage>:
void rtems_stack_checker_report_usage( void )
{
120c85: 55 push %ebp <== NOT EXECUTED
120c86: 89 e5 mov %esp,%ebp <== NOT EXECUTED
120c88: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED
rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin );
120c8b: 68 c0 28 12 00 push $0x1228c0 <== NOT EXECUTED
120c90: 6a 00 push $0x0 <== NOT EXECUTED
120c92: e8 89 ff ff ff call 120c20 <rtems_stack_checker_report_usage_with_plugin><== NOT EXECUTED
120c97: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
120c9a: c9 leave <== NOT EXECUTED
120c9b: c3 ret <== NOT EXECUTED
00120c20 <rtems_stack_checker_report_usage_with_plugin>:
void rtems_stack_checker_report_usage_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
120c20: 55 push %ebp <== NOT EXECUTED
120c21: 89 e5 mov %esp,%ebp <== NOT EXECUTED
120c23: 56 push %esi <== NOT EXECUTED
120c24: 53 push %ebx <== NOT EXECUTED
120c25: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED
120c28: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED
if ( !print )
120c2b: 85 db test %ebx,%ebx <== NOT EXECUTED
120c2d: 74 4f je 120c7e <rtems_stack_checker_report_usage_with_plugin+0x5e><== NOT EXECUTED
return;
print_context = context;
120c2f: 89 35 44 da 16 00 mov %esi,0x16da44 <== NOT EXECUTED
print_handler = print;
120c35: 89 1d 48 da 16 00 mov %ebx,0x16da48 <== NOT EXECUTED
(*print)( context, "Stack usage by thread\n");
120c3b: 50 push %eax <== NOT EXECUTED
120c3c: 50 push %eax <== NOT EXECUTED
120c3d: 68 57 00 15 00 push $0x150057 <== NOT EXECUTED
120c42: 56 push %esi <== NOT EXECUTED
120c43: ff d3 call *%ebx <== NOT EXECUTED
(*print)( context,
120c45: 58 pop %eax <== NOT EXECUTED
120c46: 5a pop %edx <== NOT EXECUTED
120c47: 68 6e 00 15 00 push $0x15006e <== NOT EXECUTED
120c4c: 56 push %esi <== NOT EXECUTED
120c4d: ff d3 call *%ebx <== NOT EXECUTED
" ID NAME LOW HIGH CURRENT AVAILABLE USED\n"
);
/* iterate over all threads and dump the usage */
rtems_iterate_over_all_threads( Stack_check_Dump_threads_usage );
120c4f: c7 04 24 e4 08 12 00 movl $0x1208e4,(%esp) <== NOT EXECUTED
120c56: e8 6d 36 00 00 call 1242c8 <rtems_iterate_over_all_threads><== NOT EXECUTED
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
/* dump interrupt stack info if any */
Stack_check_Dump_threads_usage((Thread_Control *) -1);
120c5b: c7 04 24 ff ff ff ff movl $0xffffffff,(%esp) <== NOT EXECUTED
120c62: e8 7d fc ff ff call 1208e4 <Stack_check_Dump_threads_usage><== NOT EXECUTED
#endif
print_context = NULL;
120c67: c7 05 44 da 16 00 00 movl $0x0,0x16da44 <== NOT EXECUTED
120c6e: 00 00 00
print_handler = NULL;
120c71: c7 05 48 da 16 00 00 movl $0x0,0x16da48 <== NOT EXECUTED
120c78: 00 00 00
120c7b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
120c7e: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
120c81: 5b pop %ebx <== NOT EXECUTED
120c82: 5e pop %esi <== NOT EXECUTED
120c83: 5d pop %ebp <== NOT EXECUTED
120c84: c3 ret <== NOT EXECUTED
00120b5e <rtems_stack_checker_switch_extension>:
*/
void rtems_stack_checker_switch_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *heir __attribute__((unused))
)
{
120b5e: 55 push %ebp
120b5f: 89 e5 mov %esp,%ebp
120b61: 53 push %ebx
120b62: 83 ec 14 sub $0x14,%esp
120b65: 8b 5d 08 mov 0x8(%ebp),%ebx
Stack_Control *the_stack = &running->Start.Initial_stack;
void *pattern;
bool sp_ok;
bool pattern_ok = true;
pattern = Stack_check_Get_pattern_area(the_stack);
120b68: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
120b6e: 8d 48 08 lea 0x8(%eax),%ecx
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
return false;
120b71: 31 d2 xor %edx,%edx
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
120b73: 39 c5 cmp %eax,%ebp
120b75: 72 0b jb 120b82 <rtems_stack_checker_switch_extension+0x24><== NEVER TAKEN
return false;
}
if ( sp > (the_stack->area + the_stack->size) ) {
120b77: 03 83 b4 00 00 00 add 0xb4(%ebx),%eax
120b7d: 39 c5 cmp %eax,%ebp
120b7f: 0f 96 c2 setbe %dl
/*
* Check for an out of bounds stack pointer or an overwrite
*/
sp_ok = Stack_check_Frame_pointer_in_range( the_stack );
pattern_ok = (!memcmp( pattern,
120b82: 50 push %eax
120b83: 6a 10 push $0x10
120b85: 68 08 ec 16 00 push $0x16ec08
120b8a: 51 push %ecx
120b8b: 88 55 f4 mov %dl,-0xc(%ebp)
120b8e: e8 d5 34 01 00 call 134068 <memcmp>
120b93: 83 c4 10 add $0x10,%esp
120b96: 85 c0 test %eax,%eax
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
120b98: 0f 94 c0 sete %al
120b9b: 8a 55 f4 mov -0xc(%ebp),%dl
120b9e: 75 04 jne 120ba4 <rtems_stack_checker_switch_extension+0x46><== NEVER TAKEN
120ba0: 84 d2 test %dl,%dl
120ba2: 75 0c jne 120bb0 <rtems_stack_checker_switch_extension+0x52><== ALWAYS TAKEN
Stack_check_report_blown_task( running, pattern_ok );
120ba4: 51 push %ecx <== NOT EXECUTED
120ba5: 51 push %ecx <== NOT EXECUTED
120ba6: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED
120ba9: 50 push %eax <== NOT EXECUTED
120baa: 53 push %ebx <== NOT EXECUTED
120bab: e8 fa fe ff ff call 120aaa <Stack_check_report_blown_task><== NOT EXECUTED
}
}
120bb0: 8b 5d fc mov -0x4(%ebp),%ebx
120bb3: c9 leave
120bb4: c3 ret
0010e8cc <rtems_string_to_double>:
rtems_status_code rtems_string_to_double (
const char *s,
double *n,
char **endptr
)
{
10e8cc: 55 push %ebp
10e8cd: 89 e5 mov %esp,%ebp
10e8cf: 57 push %edi
10e8d0: 56 push %esi
10e8d1: 53 push %ebx
10e8d2: 83 ec 2c sub $0x2c,%esp
10e8d5: 8b 75 08 mov 0x8(%ebp),%esi
10e8d8: 8b 5d 0c mov 0xc(%ebp),%ebx
10e8db: 8b 7d 10 mov 0x10(%ebp),%edi
double result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
10e8de: ba 09 00 00 00 mov $0x9,%edx
)
{
double result;
char *end;
if ( !n )
10e8e3: 85 db test %ebx,%ebx
10e8e5: 0f 84 95 00 00 00 je 10e980 <rtems_string_to_double+0xb4>
return RTEMS_INVALID_ADDRESS;
errno = 0;
10e8eb: e8 dc 30 00 00 call 1119cc <__errno>
10e8f0: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
10e8f6: c7 03 00 00 00 00 movl $0x0,(%ebx)
10e8fc: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx)
result = strtod( s, &end );
10e903: 50 push %eax
10e904: 50 push %eax
10e905: 8d 45 e4 lea -0x1c(%ebp),%eax
10e908: 50 push %eax
10e909: 56 push %esi
10e90a: e8 61 5e 00 00 call 114770 <strtod>
if ( endptr )
10e90f: 83 c4 10 add $0x10,%esp
10e912: 85 ff test %edi,%edi
10e914: 74 05 je 10e91b <rtems_string_to_double+0x4f>
*endptr = end;
10e916: 8b 45 e4 mov -0x1c(%ebp),%eax
10e919: 89 07 mov %eax,(%edi)
if ( end == s )
return RTEMS_NOT_DEFINED;
10e91b: ba 0b 00 00 00 mov $0xb,%edx
result = strtod( s, &end );
if ( endptr )
*endptr = end;
if ( end == s )
10e920: 39 75 e4 cmp %esi,-0x1c(%ebp)
10e923: 74 4d je 10e972 <rtems_string_to_double+0xa6>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
10e925: dd 5d c8 fstpl -0x38(%ebp)
10e928: e8 9f 30 00 00 call 1119cc <__errno>
10e92d: 83 38 22 cmpl $0x22,(%eax)
10e930: dd 45 c8 fldl -0x38(%ebp)
10e933: 75 37 jne 10e96c <rtems_string_to_double+0xa0>
10e935: d9 ee fldz
10e937: d9 c9 fxch %st(1)
10e939: dd e1 fucom %st(1)
10e93b: df e0 fnstsw %ax
10e93d: dd d9 fstp %st(1)
10e93f: 9e sahf
10e940: 7a 07 jp 10e949 <rtems_string_to_double+0x7d><== NEVER TAKEN
(( result == 0 ) || ( result == HUGE_VAL ) || ( result == -HUGE_VAL )))
return RTEMS_INVALID_NUMBER;
10e942: ba 0a 00 00 00 mov $0xa,%edx
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
10e947: 74 2d je 10e976 <rtems_string_to_double+0xaa><== NEVER TAKEN
(( result == 0 ) || ( result == HUGE_VAL ) || ( result == -HUGE_VAL )))
return RTEMS_INVALID_NUMBER;
10e949: ba 0a 00 00 00 mov $0xa,%edx
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == HUGE_VAL ) || ( result == -HUGE_VAL )))
10e94e: dd 05 38 45 12 00 fldl 0x124538
10e954: d9 c9 fxch %st(1)
10e956: dd e1 fucom %st(1)
10e958: df e0 fnstsw %ax
10e95a: dd d9 fstp %st(1)
10e95c: 9e sahf
10e95d: 77 1b ja 10e97a <rtems_string_to_double+0xae>
10e95f: dd 05 40 45 12 00 fldl 0x124540
10e965: dd e9 fucomp %st(1)
10e967: df e0 fnstsw %ax
10e969: 9e sahf
10e96a: 77 12 ja 10e97e <rtems_string_to_double+0xb2><== ALWAYS TAKEN
return RTEMS_INVALID_NUMBER;
*n = result;
10e96c: dd 1b fstpl (%ebx)
return RTEMS_SUCCESSFUL;
10e96e: 31 d2 xor %edx,%edx
10e970: eb 0e jmp 10e980 <rtems_string_to_double+0xb4>
10e972: dd d8 fstp %st(0)
10e974: eb 0a jmp 10e980 <rtems_string_to_double+0xb4>
10e976: dd d8 fstp %st(0) <== NOT EXECUTED
10e978: eb 06 jmp 10e980 <rtems_string_to_double+0xb4><== NOT EXECUTED
10e97a: dd d8 fstp %st(0)
10e97c: eb 02 jmp 10e980 <rtems_string_to_double+0xb4>
10e97e: dd d8 fstp %st(0)
}
10e980: 89 d0 mov %edx,%eax
10e982: 8d 65 f4 lea -0xc(%ebp),%esp
10e985: 5b pop %ebx
10e986: 5e pop %esi
10e987: 5f pop %edi
10e988: 5d pop %ebp
10e989: c3 ret
0010e98c <rtems_string_to_float>:
rtems_status_code rtems_string_to_float (
const char *s,
float *n,
char **endptr
)
{
10e98c: 55 push %ebp
10e98d: 89 e5 mov %esp,%ebp
10e98f: 57 push %edi
10e990: 56 push %esi
10e991: 53 push %ebx
10e992: 83 ec 2c sub $0x2c,%esp
10e995: 8b 75 08 mov 0x8(%ebp),%esi
10e998: 8b 5d 0c mov 0xc(%ebp),%ebx
10e99b: 8b 7d 10 mov 0x10(%ebp),%edi
float result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
10e99e: ba 09 00 00 00 mov $0x9,%edx
)
{
float result;
char *end;
if ( !n )
10e9a3: 85 db test %ebx,%ebx
10e9a5: 0f 84 8e 00 00 00 je 10ea39 <rtems_string_to_float+0xad>
return RTEMS_INVALID_ADDRESS;
errno = 0;
10e9ab: e8 1c 30 00 00 call 1119cc <__errno>
10e9b0: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
10e9b6: c7 03 00 00 00 00 movl $0x0,(%ebx)
result = strtof( s, &end );
10e9bc: 50 push %eax
10e9bd: 50 push %eax
10e9be: 8d 45 e4 lea -0x1c(%ebp),%eax
10e9c1: 50 push %eax
10e9c2: 56 push %esi
10e9c3: e8 cc 5d 00 00 call 114794 <strtof>
if ( endptr )
10e9c8: 83 c4 10 add $0x10,%esp
10e9cb: 85 ff test %edi,%edi
10e9cd: 74 05 je 10e9d4 <rtems_string_to_float+0x48>
*endptr = end;
10e9cf: 8b 45 e4 mov -0x1c(%ebp),%eax
10e9d2: 89 07 mov %eax,(%edi)
if ( end == s )
return RTEMS_NOT_DEFINED;
10e9d4: ba 0b 00 00 00 mov $0xb,%edx
result = strtof( s, &end );
if ( endptr )
*endptr = end;
if ( end == s )
10e9d9: 39 75 e4 cmp %esi,-0x1c(%ebp)
10e9dc: 74 4d je 10ea2b <rtems_string_to_float+0x9f>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
10e9de: d9 5d c8 fstps -0x38(%ebp)
10e9e1: e8 e6 2f 00 00 call 1119cc <__errno>
10e9e6: 83 38 22 cmpl $0x22,(%eax)
10e9e9: d9 45 c8 flds -0x38(%ebp)
10e9ec: 75 37 jne 10ea25 <rtems_string_to_float+0x99>
10e9ee: d9 ee fldz
10e9f0: d9 c9 fxch %st(1)
10e9f2: dd e1 fucom %st(1)
10e9f4: df e0 fnstsw %ax
10e9f6: dd d9 fstp %st(1)
10e9f8: 9e sahf
10e9f9: 7a 07 jp 10ea02 <rtems_string_to_float+0x76><== NEVER TAKEN
(( result == 0 ) || ( result == HUGE_VALF ) || ( result == -HUGE_VALF )))
return RTEMS_INVALID_NUMBER;
10e9fb: ba 0a 00 00 00 mov $0xa,%edx
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
10ea00: 74 2d je 10ea2f <rtems_string_to_float+0xa3><== NEVER TAKEN
(( result == 0 ) || ( result == HUGE_VALF ) || ( result == -HUGE_VALF )))
return RTEMS_INVALID_NUMBER;
10ea02: ba 0a 00 00 00 mov $0xa,%edx
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == HUGE_VALF ) || ( result == -HUGE_VALF )))
10ea07: d9 05 48 45 12 00 flds 0x124548
10ea0d: d9 c9 fxch %st(1)
10ea0f: dd e1 fucom %st(1)
10ea11: df e0 fnstsw %ax
10ea13: dd d9 fstp %st(1)
10ea15: 9e sahf
10ea16: 77 1b ja 10ea33 <rtems_string_to_float+0xa7>
10ea18: d9 05 4c 45 12 00 flds 0x12454c
10ea1e: dd e9 fucomp %st(1)
10ea20: df e0 fnstsw %ax
10ea22: 9e sahf
10ea23: 77 12 ja 10ea37 <rtems_string_to_float+0xab><== ALWAYS TAKEN
return RTEMS_INVALID_NUMBER;
*n = result;
10ea25: d9 1b fstps (%ebx)
return RTEMS_SUCCESSFUL;
10ea27: 31 d2 xor %edx,%edx
10ea29: eb 0e jmp 10ea39 <rtems_string_to_float+0xad>
10ea2b: dd d8 fstp %st(0)
10ea2d: eb 0a jmp 10ea39 <rtems_string_to_float+0xad>
10ea2f: dd d8 fstp %st(0) <== NOT EXECUTED
10ea31: eb 06 jmp 10ea39 <rtems_string_to_float+0xad><== NOT EXECUTED
10ea33: dd d8 fstp %st(0)
10ea35: eb 02 jmp 10ea39 <rtems_string_to_float+0xad>
10ea37: dd d8 fstp %st(0)
}
10ea39: 89 d0 mov %edx,%eax
10ea3b: 8d 65 f4 lea -0xc(%ebp),%esp
10ea3e: 5b pop %ebx
10ea3f: 5e pop %esi
10ea40: 5f pop %edi
10ea41: 5d pop %ebp
10ea42: c3 ret
0011c6f0 <rtems_string_to_int>:
const char *s,
int *n,
char **endptr,
int base
)
{
11c6f0: 55 push %ebp
11c6f1: 89 e5 mov %esp,%ebp
11c6f3: 57 push %edi
11c6f4: 56 push %esi
11c6f5: 53 push %ebx
11c6f6: 83 ec 1c sub $0x1c,%esp
11c6f9: 8b 5d 0c mov 0xc(%ebp),%ebx
11c6fc: 8b 7d 10 mov 0x10(%ebp),%edi
long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
11c6ff: b8 09 00 00 00 mov $0x9,%eax
)
{
long result;
char *end;
if ( !n )
11c704: 85 db test %ebx,%ebx
11c706: 74 63 je 11c76b <rtems_string_to_int+0x7b>
return RTEMS_INVALID_ADDRESS;
errno = 0;
11c708: e8 7b 47 01 00 call 130e88 <__errno>
11c70d: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
11c713: c7 03 00 00 00 00 movl $0x0,(%ebx)
result = strtol( s, &end, base );
11c719: 50 push %eax
11c71a: ff 75 14 pushl 0x14(%ebp)
11c71d: 8d 45 e4 lea -0x1c(%ebp),%eax
11c720: 50 push %eax
11c721: ff 75 08 pushl 0x8(%ebp)
11c724: e8 03 bf 01 00 call 13862c <strtol>
11c729: 89 c6 mov %eax,%esi
if ( endptr )
11c72b: 83 c4 10 add $0x10,%esp
11c72e: 85 ff test %edi,%edi
11c730: 74 05 je 11c737 <rtems_string_to_int+0x47>
*endptr = end;
11c732: 8b 45 e4 mov -0x1c(%ebp),%eax
11c735: 89 07 mov %eax,(%edi)
if ( end == s )
return RTEMS_NOT_DEFINED;
11c737: b8 0b 00 00 00 mov $0xb,%eax
result = strtol( s, &end, base );
if ( endptr )
*endptr = end;
if ( end == s )
11c73c: 8b 55 08 mov 0x8(%ebp),%edx
11c73f: 39 55 e4 cmp %edx,-0x1c(%ebp)
11c742: 74 27 je 11c76b <rtems_string_to_int+0x7b>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
11c744: e8 3f 47 01 00 call 130e88 <__errno>
11c749: 83 38 22 cmpl $0x22,(%eax)
11c74c: 75 19 jne 11c767 <rtems_string_to_int+0x77>
(( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
return RTEMS_INVALID_NUMBER;
11c74e: b8 0a 00 00 00 mov $0xa,%eax
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
11c753: 81 fe ff ff ff 7f cmp $0x7fffffff,%esi
11c759: 74 10 je 11c76b <rtems_string_to_int+0x7b>
11c75b: 85 f6 test %esi,%esi
11c75d: 74 0c je 11c76b <rtems_string_to_int+0x7b><== NEVER TAKEN
(( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
11c75f: 81 fe 00 00 00 80 cmp $0x80000000,%esi
11c765: 74 04 je 11c76b <rtems_string_to_int+0x7b><== ALWAYS TAKEN
errno = ERANGE;
return RTEMS_INVALID_NUMBER;
}
#endif
*n = result;
11c767: 89 33 mov %esi,(%ebx)
return RTEMS_SUCCESSFUL;
11c769: 31 c0 xor %eax,%eax
}
11c76b: 8d 65 f4 lea -0xc(%ebp),%esp
11c76e: 5b pop %ebx
11c76f: 5e pop %esi
11c770: 5f pop %edi
11c771: 5d pop %ebp
11c772: c3 ret
0010eb74 <rtems_string_to_long>:
const char *s,
long *n,
char **endptr,
int base
)
{
10eb74: 55 push %ebp
10eb75: 89 e5 mov %esp,%ebp
10eb77: 57 push %edi
10eb78: 56 push %esi
10eb79: 53 push %ebx
10eb7a: 83 ec 1c sub $0x1c,%esp
10eb7d: 8b 5d 0c mov 0xc(%ebp),%ebx
10eb80: 8b 7d 10 mov 0x10(%ebp),%edi
long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
10eb83: b8 09 00 00 00 mov $0x9,%eax
)
{
long result;
char *end;
if ( !n )
10eb88: 85 db test %ebx,%ebx
10eb8a: 74 63 je 10ebef <rtems_string_to_long+0x7b>
return RTEMS_INVALID_ADDRESS;
errno = 0;
10eb8c: e8 3b 2e 00 00 call 1119cc <__errno>
10eb91: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
10eb97: c7 03 00 00 00 00 movl $0x0,(%ebx)
result = strtol( s, &end, base );
10eb9d: 50 push %eax
10eb9e: ff 75 14 pushl 0x14(%ebp)
10eba1: 8d 45 e4 lea -0x1c(%ebp),%eax
10eba4: 50 push %eax
10eba5: ff 75 08 pushl 0x8(%ebp)
10eba8: e8 fb 5d 00 00 call 1149a8 <strtol>
10ebad: 89 c6 mov %eax,%esi
if ( endptr )
10ebaf: 83 c4 10 add $0x10,%esp
10ebb2: 85 ff test %edi,%edi
10ebb4: 74 05 je 10ebbb <rtems_string_to_long+0x47>
*endptr = end;
10ebb6: 8b 45 e4 mov -0x1c(%ebp),%eax
10ebb9: 89 07 mov %eax,(%edi)
if ( end == s )
return RTEMS_NOT_DEFINED;
10ebbb: b8 0b 00 00 00 mov $0xb,%eax
result = strtol( s, &end, base );
if ( endptr )
*endptr = end;
if ( end == s )
10ebc0: 8b 55 08 mov 0x8(%ebp),%edx
10ebc3: 39 55 e4 cmp %edx,-0x1c(%ebp)
10ebc6: 74 27 je 10ebef <rtems_string_to_long+0x7b>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
10ebc8: e8 ff 2d 00 00 call 1119cc <__errno>
10ebcd: 83 38 22 cmpl $0x22,(%eax)
10ebd0: 75 19 jne 10ebeb <rtems_string_to_long+0x77>
(( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
return RTEMS_INVALID_NUMBER;
10ebd2: b8 0a 00 00 00 mov $0xa,%eax
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
10ebd7: 81 fe ff ff ff 7f cmp $0x7fffffff,%esi
10ebdd: 74 10 je 10ebef <rtems_string_to_long+0x7b>
10ebdf: 85 f6 test %esi,%esi
10ebe1: 74 0c je 10ebef <rtems_string_to_long+0x7b><== NEVER TAKEN
(( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
10ebe3: 81 fe 00 00 00 80 cmp $0x80000000,%esi
10ebe9: 74 04 je 10ebef <rtems_string_to_long+0x7b><== ALWAYS TAKEN
return RTEMS_INVALID_NUMBER;
*n = result;
10ebeb: 89 33 mov %esi,(%ebx)
return RTEMS_SUCCESSFUL;
10ebed: 31 c0 xor %eax,%eax
}
10ebef: 8d 65 f4 lea -0xc(%ebp),%esp
10ebf2: 5b pop %ebx
10ebf3: 5e pop %esi
10ebf4: 5f pop %edi
10ebf5: 5d pop %ebp
10ebf6: c3 ret
0010eac8 <rtems_string_to_long_long>:
const char *s,
long long *n,
char **endptr,
int base
)
{
10eac8: 55 push %ebp
10eac9: 89 e5 mov %esp,%ebp
10eacb: 57 push %edi
10eacc: 56 push %esi
10eacd: 53 push %ebx
10eace: 83 ec 2c sub $0x2c,%esp
10ead1: 8b 75 08 mov 0x8(%ebp),%esi
10ead4: 8b 5d 0c mov 0xc(%ebp),%ebx
long long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
10ead7: b8 09 00 00 00 mov $0x9,%eax
)
{
long long result;
char *end;
if ( !n )
10eadc: 85 db test %ebx,%ebx
10eade: 0f 84 85 00 00 00 je 10eb69 <rtems_string_to_long_long+0xa1>
return RTEMS_INVALID_ADDRESS;
errno = 0;
10eae4: e8 e3 2e 00 00 call 1119cc <__errno>
10eae9: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
10eaef: c7 03 00 00 00 00 movl $0x0,(%ebx)
10eaf5: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx)
result = strtoll( s, &end, base );
10eafc: 50 push %eax
10eafd: ff 75 14 pushl 0x14(%ebp)
10eb00: 8d 45 e4 lea -0x1c(%ebp),%eax
10eb03: 50 push %eax
10eb04: 56 push %esi
10eb05: e8 ca 5e 00 00 call 1149d4 <strtoll>
10eb0a: 89 c7 mov %eax,%edi
if ( endptr )
10eb0c: 83 c4 10 add $0x10,%esp
10eb0f: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
10eb13: 74 08 je 10eb1d <rtems_string_to_long_long+0x55>
*endptr = end;
10eb15: 8b 45 e4 mov -0x1c(%ebp),%eax
10eb18: 8b 4d 10 mov 0x10(%ebp),%ecx
10eb1b: 89 01 mov %eax,(%ecx)
if ( end == s )
return RTEMS_NOT_DEFINED;
10eb1d: b8 0b 00 00 00 mov $0xb,%eax
result = strtoll( s, &end, base );
if ( endptr )
*endptr = end;
if ( end == s )
10eb22: 39 75 e4 cmp %esi,-0x1c(%ebp)
10eb25: 74 42 je 10eb69 <rtems_string_to_long_long+0xa1>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
10eb27: 89 55 d4 mov %edx,-0x2c(%ebp)
10eb2a: e8 9d 2e 00 00 call 1119cc <__errno>
10eb2f: 83 38 22 cmpl $0x22,(%eax)
10eb32: 8b 55 d4 mov -0x2c(%ebp),%edx
10eb35: 75 24 jne 10eb5b <rtems_string_to_long_long+0x93>
(( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN )))
10eb37: 89 fe mov %edi,%esi
10eb39: f7 d6 not %esi
10eb3b: 89 d0 mov %edx,%eax
10eb3d: 35 ff ff ff 7f xor $0x7fffffff,%eax
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
10eb42: 09 c6 or %eax,%esi
10eb44: 74 1e je 10eb64 <rtems_string_to_long_long+0x9c>
10eb46: 89 f8 mov %edi,%eax
10eb48: 09 d0 or %edx,%eax
10eb4a: 74 18 je 10eb64 <rtems_string_to_long_long+0x9c><== NEVER TAKEN
(( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN )))
10eb4c: 8d b2 00 00 00 80 lea -0x80000000(%edx),%esi
return RTEMS_INVALID_NUMBER;
10eb52: b8 0a 00 00 00 mov $0xa,%eax
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN )))
10eb57: 09 fe or %edi,%esi
10eb59: 74 0e je 10eb69 <rtems_string_to_long_long+0xa1><== ALWAYS TAKEN
return RTEMS_INVALID_NUMBER;
*n = result;
10eb5b: 89 3b mov %edi,(%ebx)
10eb5d: 89 53 04 mov %edx,0x4(%ebx)
return RTEMS_SUCCESSFUL;
10eb60: 31 c0 xor %eax,%eax
10eb62: eb 05 jmp 10eb69 <rtems_string_to_long_long+0xa1>
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN )))
return RTEMS_INVALID_NUMBER;
10eb64: b8 0a 00 00 00 mov $0xa,%eax
*n = result;
return RTEMS_SUCCESSFUL;
}
10eb69: 8d 65 f4 lea -0xc(%ebp),%esp
10eb6c: 5b pop %ebx
10eb6d: 5e pop %esi
10eb6e: 5f pop %edi
10eb6f: 5d pop %ebp
10eb70: c3 ret
0011c78c <rtems_string_to_unsigned_char>:
const char *s,
unsigned char *n,
char **endptr,
int base
)
{
11c78c: 55 push %ebp
11c78d: 89 e5 mov %esp,%ebp
11c78f: 57 push %edi
11c790: 56 push %esi
11c791: 53 push %ebx
11c792: 83 ec 2c sub $0x2c,%esp
11c795: 8b 75 08 mov 0x8(%ebp),%esi
11c798: 8b 5d 0c mov 0xc(%ebp),%ebx
11c79b: 8b 7d 10 mov 0x10(%ebp),%edi
unsigned long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
11c79e: ba 09 00 00 00 mov $0x9,%edx
)
{
unsigned long result;
char *end;
if ( !n )
11c7a3: 85 db test %ebx,%ebx
11c7a5: 74 6f je 11c816 <rtems_string_to_unsigned_char+0x8a>
return RTEMS_INVALID_ADDRESS;
errno = 0;
11c7a7: e8 dc 46 01 00 call 130e88 <__errno>
11c7ac: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
11c7b2: c6 03 00 movb $0x0,(%ebx)
result = strtoul( s, &end, base );
11c7b5: 50 push %eax
11c7b6: ff 75 14 pushl 0x14(%ebp)
11c7b9: 8d 45 e4 lea -0x1c(%ebp),%eax
11c7bc: 50 push %eax
11c7bd: 56 push %esi
11c7be: e8 e5 c3 01 00 call 138ba8 <strtoul>
11c7c3: 89 c1 mov %eax,%ecx
if ( endptr )
11c7c5: 83 c4 10 add $0x10,%esp
11c7c8: 85 ff test %edi,%edi
11c7ca: 74 05 je 11c7d1 <rtems_string_to_unsigned_char+0x45>
*endptr = end;
11c7cc: 8b 45 e4 mov -0x1c(%ebp),%eax
11c7cf: 89 07 mov %eax,(%edi)
if ( end == s )
return RTEMS_NOT_DEFINED;
11c7d1: ba 0b 00 00 00 mov $0xb,%edx
result = strtoul( s, &end, base );
if ( endptr )
*endptr = end;
if ( end == s )
11c7d6: 39 75 e4 cmp %esi,-0x1c(%ebp)
11c7d9: 74 3b je 11c816 <rtems_string_to_unsigned_char+0x8a>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
11c7db: 89 4d d4 mov %ecx,-0x2c(%ebp)
11c7de: e8 a5 46 01 00 call 130e88 <__errno>
11c7e3: 83 38 22 cmpl $0x22,(%eax)
11c7e6: 8b 4d d4 mov -0x2c(%ebp),%ecx
11c7e9: 75 0d jne 11c7f8 <rtems_string_to_unsigned_char+0x6c>
(( result == 0 ) || ( result == ULONG_MAX )))
11c7eb: 8d 41 ff lea -0x1(%ecx),%eax
return RTEMS_INVALID_NUMBER;
11c7ee: ba 0a 00 00 00 mov $0xa,%edx
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
11c7f3: 83 f8 fd cmp $0xfffffffd,%eax
11c7f6: 77 1e ja 11c816 <rtems_string_to_unsigned_char+0x8a><== ALWAYS TAKEN
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
#if (UCHAR_MAX < ULONG_MAX)
if ( result > UCHAR_MAX ) {
11c7f8: 81 f9 ff 00 00 00 cmp $0xff,%ecx
11c7fe: 76 12 jbe 11c812 <rtems_string_to_unsigned_char+0x86>
errno = ERANGE;
11c800: e8 83 46 01 00 call 130e88 <__errno>
11c805: c7 00 22 00 00 00 movl $0x22,(%eax)
return RTEMS_INVALID_NUMBER;
11c80b: ba 0a 00 00 00 mov $0xa,%edx
11c810: eb 04 jmp 11c816 <rtems_string_to_unsigned_char+0x8a>
}
#endif
*n = result;
11c812: 88 0b mov %cl,(%ebx)
return RTEMS_SUCCESSFUL;
11c814: 31 d2 xor %edx,%edx
}
11c816: 89 d0 mov %edx,%eax
11c818: 8d 65 f4 lea -0xc(%ebp),%esp
11c81b: 5b pop %ebx
11c81c: 5e pop %esi
11c81d: 5f pop %edi
11c81e: 5d pop %ebp
11c81f: c3 ret
0010eca4 <rtems_string_to_unsigned_int>:
const char *s,
unsigned int *n,
char **endptr,
int base
)
{
10eca4: 55 push %ebp
10eca5: 89 e5 mov %esp,%ebp
10eca7: 57 push %edi
10eca8: 56 push %esi
10eca9: 53 push %ebx
10ecaa: 83 ec 1c sub $0x1c,%esp
10ecad: 8b 5d 0c mov 0xc(%ebp),%ebx
10ecb0: 8b 7d 10 mov 0x10(%ebp),%edi
unsigned long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
10ecb3: ba 09 00 00 00 mov $0x9,%edx
)
{
unsigned long result;
char *end;
if ( !n )
10ecb8: 85 db test %ebx,%ebx
10ecba: 74 57 je 10ed13 <rtems_string_to_unsigned_int+0x6f>
return RTEMS_INVALID_ADDRESS;
errno = 0;
10ecbc: e8 0b 2d 00 00 call 1119cc <__errno>
10ecc1: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
10ecc7: c7 03 00 00 00 00 movl $0x0,(%ebx)
result = strtoul( s, &end, base );
10eccd: 50 push %eax
10ecce: ff 75 14 pushl 0x14(%ebp)
10ecd1: 8d 45 e4 lea -0x1c(%ebp),%eax
10ecd4: 50 push %eax
10ecd5: ff 75 08 pushl 0x8(%ebp)
10ecd8: e8 47 62 00 00 call 114f24 <strtoul>
10ecdd: 89 c6 mov %eax,%esi
if ( endptr )
10ecdf: 83 c4 10 add $0x10,%esp
10ece2: 85 ff test %edi,%edi
10ece4: 74 05 je 10eceb <rtems_string_to_unsigned_int+0x47>
*endptr = end;
10ece6: 8b 45 e4 mov -0x1c(%ebp),%eax
10ece9: 89 07 mov %eax,(%edi)
if ( end == s )
return RTEMS_NOT_DEFINED;
10eceb: ba 0b 00 00 00 mov $0xb,%edx
result = strtoul( s, &end, base );
if ( endptr )
*endptr = end;
if ( end == s )
10ecf0: 8b 45 08 mov 0x8(%ebp),%eax
10ecf3: 39 45 e4 cmp %eax,-0x1c(%ebp)
10ecf6: 74 1b je 10ed13 <rtems_string_to_unsigned_int+0x6f>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
10ecf8: e8 cf 2c 00 00 call 1119cc <__errno>
10ecfd: 83 38 22 cmpl $0x22,(%eax)
10ed00: 75 0d jne 10ed0f <rtems_string_to_unsigned_int+0x6b>
(( result == 0 ) || ( result == ULONG_MAX )))
10ed02: 8d 46 ff lea -0x1(%esi),%eax
return RTEMS_INVALID_NUMBER;
10ed05: ba 0a 00 00 00 mov $0xa,%edx
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
10ed0a: 83 f8 fd cmp $0xfffffffd,%eax
10ed0d: 77 04 ja 10ed13 <rtems_string_to_unsigned_int+0x6f><== ALWAYS TAKEN
errno = ERANGE;
return RTEMS_INVALID_NUMBER;
}
#endif
*n = result;
10ed0f: 89 33 mov %esi,(%ebx)
return RTEMS_SUCCESSFUL;
10ed11: 31 d2 xor %edx,%edx
}
10ed13: 89 d0 mov %edx,%eax
10ed15: 8d 65 f4 lea -0xc(%ebp),%esp
10ed18: 5b pop %ebx
10ed19: 5e pop %esi
10ed1a: 5f pop %edi
10ed1b: 5d pop %ebp
10ed1c: c3 ret
0010d460 <rtems_string_to_unsigned_long>:
const char *s,
unsigned long *n,
char **endptr,
int base
)
{
10d460: 55 push %ebp
10d461: 89 e5 mov %esp,%ebp
10d463: 57 push %edi
10d464: 56 push %esi
10d465: 53 push %ebx
10d466: 83 ec 1c sub $0x1c,%esp
10d469: 8b 5d 0c mov 0xc(%ebp),%ebx
10d46c: 8b 7d 10 mov 0x10(%ebp),%edi
unsigned long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
10d46f: ba 09 00 00 00 mov $0x9,%edx
)
{
unsigned long result;
char *end;
if ( !n )
10d474: 85 db test %ebx,%ebx
10d476: 74 57 je 10d4cf <rtems_string_to_unsigned_long+0x6f>
return RTEMS_INVALID_ADDRESS;
errno = 0;
10d478: e8 0b 3a 02 00 call 130e88 <__errno>
10d47d: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
10d483: c7 03 00 00 00 00 movl $0x0,(%ebx)
result = strtoul( s, &end, base );
10d489: 50 push %eax
10d48a: ff 75 14 pushl 0x14(%ebp)
10d48d: 8d 45 e4 lea -0x1c(%ebp),%eax
10d490: 50 push %eax
10d491: ff 75 08 pushl 0x8(%ebp)
10d494: e8 0f b7 02 00 call 138ba8 <strtoul>
10d499: 89 c6 mov %eax,%esi
if ( endptr )
10d49b: 83 c4 10 add $0x10,%esp
10d49e: 85 ff test %edi,%edi
10d4a0: 74 05 je 10d4a7 <rtems_string_to_unsigned_long+0x47>
*endptr = end;
10d4a2: 8b 45 e4 mov -0x1c(%ebp),%eax
10d4a5: 89 07 mov %eax,(%edi)
if ( end == s )
return RTEMS_NOT_DEFINED;
10d4a7: ba 0b 00 00 00 mov $0xb,%edx
result = strtoul( s, &end, base );
if ( endptr )
*endptr = end;
if ( end == s )
10d4ac: 8b 45 08 mov 0x8(%ebp),%eax
10d4af: 39 45 e4 cmp %eax,-0x1c(%ebp)
10d4b2: 74 1b je 10d4cf <rtems_string_to_unsigned_long+0x6f>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
10d4b4: e8 cf 39 02 00 call 130e88 <__errno>
10d4b9: 83 38 22 cmpl $0x22,(%eax)
10d4bc: 75 0d jne 10d4cb <rtems_string_to_unsigned_long+0x6b>
(( result == 0 ) || ( result == ULONG_MAX )))
10d4be: 8d 46 ff lea -0x1(%esi),%eax
return RTEMS_INVALID_NUMBER;
10d4c1: ba 0a 00 00 00 mov $0xa,%edx
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
10d4c6: 83 f8 fd cmp $0xfffffffd,%eax
10d4c9: 77 04 ja 10d4cf <rtems_string_to_unsigned_long+0x6f><== ALWAYS TAKEN
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
*n = result;
10d4cb: 89 33 mov %esi,(%ebx)
return RTEMS_SUCCESSFUL;
10d4cd: 31 d2 xor %edx,%edx
}
10d4cf: 89 d0 mov %edx,%eax
10d4d1: 8d 65 f4 lea -0xc(%ebp),%esp
10d4d4: 5b pop %ebx
10d4d5: 5e pop %esi
10d4d6: 5f pop %edi
10d4d7: 5d pop %ebp
10d4d8: c3 ret
0010ed20 <rtems_string_to_unsigned_long_long>:
const char *s,
unsigned long long *n,
char **endptr,
int base
)
{
10ed20: 55 push %ebp
10ed21: 89 e5 mov %esp,%ebp
10ed23: 57 push %edi
10ed24: 56 push %esi
10ed25: 53 push %ebx
10ed26: 83 ec 1c sub $0x1c,%esp
10ed29: 8b 5d 08 mov 0x8(%ebp),%ebx
unsigned long long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
10ed2c: b8 09 00 00 00 mov $0x9,%eax
)
{
unsigned long long result;
char *end;
if ( !n )
10ed31: 83 7d 0c 00 cmpl $0x0,0xc(%ebp)
10ed35: 74 75 je 10edac <rtems_string_to_unsigned_long_long+0x8c>
return RTEMS_INVALID_ADDRESS;
errno = 0;
10ed37: e8 90 2c 00 00 call 1119cc <__errno>
10ed3c: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
10ed42: 8b 45 0c mov 0xc(%ebp),%eax
10ed45: c7 00 00 00 00 00 movl $0x0,(%eax)
10ed4b: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax)
result = strtoull( s, &end, base );
10ed52: 50 push %eax
10ed53: ff 75 14 pushl 0x14(%ebp)
10ed56: 8d 45 e4 lea -0x1c(%ebp),%eax
10ed59: 50 push %eax
10ed5a: 53 push %ebx
10ed5b: e8 f0 61 00 00 call 114f50 <strtoull>
10ed60: 89 c6 mov %eax,%esi
10ed62: 89 d7 mov %edx,%edi
if ( endptr )
10ed64: 83 c4 10 add $0x10,%esp
10ed67: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
10ed6b: 74 08 je 10ed75 <rtems_string_to_unsigned_long_long+0x55>
*endptr = end;
10ed6d: 8b 45 e4 mov -0x1c(%ebp),%eax
10ed70: 8b 55 10 mov 0x10(%ebp),%edx
10ed73: 89 02 mov %eax,(%edx)
if ( end == s )
return RTEMS_NOT_DEFINED;
10ed75: b8 0b 00 00 00 mov $0xb,%eax
result = strtoull( s, &end, base );
if ( endptr )
*endptr = end;
if ( end == s )
10ed7a: 39 5d e4 cmp %ebx,-0x1c(%ebp)
10ed7d: 74 2d je 10edac <rtems_string_to_unsigned_long_long+0x8c>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
10ed7f: e8 48 2c 00 00 call 1119cc <__errno>
10ed84: 83 38 22 cmpl $0x22,(%eax)
10ed87: 75 19 jne 10eda2 <rtems_string_to_unsigned_long_long+0x82>
(( result == 0 ) || ( result == ULONG_LONG_MAX )))
10ed89: 89 f1 mov %esi,%ecx
10ed8b: 89 fb mov %edi,%ebx
10ed8d: 83 c1 ff add $0xffffffff,%ecx
10ed90: 83 d3 ff adc $0xffffffff,%ebx
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
10ed93: 83 fb ff cmp $0xffffffff,%ebx
10ed96: 72 0a jb 10eda2 <rtems_string_to_unsigned_long_long+0x82><== NEVER TAKEN
(( result == 0 ) || ( result == ULONG_LONG_MAX )))
return RTEMS_INVALID_NUMBER;
10ed98: b8 0a 00 00 00 mov $0xa,%eax
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
10ed9d: 83 f9 fd cmp $0xfffffffd,%ecx
10eda0: 77 0a ja 10edac <rtems_string_to_unsigned_long_long+0x8c><== ALWAYS TAKEN
(( result == 0 ) || ( result == ULONG_LONG_MAX )))
return RTEMS_INVALID_NUMBER;
*n = result;
10eda2: 8b 45 0c mov 0xc(%ebp),%eax
10eda5: 89 30 mov %esi,(%eax)
10eda7: 89 78 04 mov %edi,0x4(%eax)
return RTEMS_SUCCESSFUL;
10edaa: 31 c0 xor %eax,%eax
}
10edac: 8d 65 f4 lea -0xc(%ebp),%esp
10edaf: 5b pop %ebx
10edb0: 5e pop %esi
10edb1: 5f pop %edi
10edb2: 5d pop %ebp
10edb3: c3 ret
001062b0 <rtems_tarfs_load>:
int rtems_tarfs_load(
const char *mountpoint,
uint8_t *tar_image,
size_t tar_size
)
{
1062b0: 55 push %ebp
1062b1: 89 e5 mov %esp,%ebp
1062b3: 57 push %edi
1062b4: 56 push %esi
1062b5: 53 push %ebx
1062b6: 81 ec f0 01 00 00 sub $0x1f0,%esp
IMFS_jnode_t *node;
int rv = 0;
int eval_flags = RTEMS_FS_FOLLOW_LINK;
rtems_filesystem_eval_path_context_t ctx;
rtems_filesystem_location_info_t rootloc;
rtems_filesystem_location_info_t *currentloc =
1062bc: 6a 18 push $0x18
1062be: ff 75 08 pushl 0x8(%ebp)
rtems_filesystem_eval_path_start( &ctx, mountpoint, eval_flags );
1062c1: 8d 85 4c fe ff ff lea -0x1b4(%ebp),%eax
IMFS_jnode_t *node;
int rv = 0;
int eval_flags = RTEMS_FS_FOLLOW_LINK;
rtems_filesystem_eval_path_context_t ctx;
rtems_filesystem_location_info_t rootloc;
rtems_filesystem_location_info_t *currentloc =
1062c7: 50 push %eax
1062c8: e8 28 1c 00 00 call 107ef5 <rtems_filesystem_eval_path_start>
1062cd: 89 c6 mov %eax,%esi
static inline void rtems_filesystem_eval_path_extract_currentloc(
rtems_filesystem_eval_path_context_t *ctx,
rtems_filesystem_location_info_t *get
)
{
rtems_filesystem_location_copy_and_detach(
1062cf: 5b pop %ebx
1062d0: 5f pop %edi
1062d1: 8d 85 64 fe ff ff lea -0x19c(%ebp),%eax
1062d7: 50 push %eax
rtems_filesystem_eval_path_start( &ctx, mountpoint, eval_flags );
rtems_filesystem_eval_path_extract_currentloc( &ctx, &rootloc );
1062d8: 8d 85 34 fe ff ff lea -0x1cc(%ebp),%eax
1062de: 50 push %eax
1062df: e8 6b 1f 00 00 call 10824f <rtems_filesystem_location_copy_and_detach>
static inline void rtems_filesystem_eval_path_set_flags(
rtems_filesystem_eval_path_context_t *ctx,
int flags
)
{
ctx->flags = flags;
1062e4: c7 85 5c fe ff ff 60 movl $0x60,-0x1a4(%ebp)
1062eb: 00 00 00
&ctx,
RTEMS_FS_MAKE | RTEMS_FS_EXCLUSIVE
);
if (
rootloc.mt_entry->ops != &IMFS_ops
1062ee: 8b 85 48 fe ff ff mov -0x1b8(%ebp),%eax
1062f4: 8b 40 0c mov 0xc(%eax),%eax
rtems_filesystem_eval_path_set_flags(
&ctx,
RTEMS_FS_MAKE | RTEMS_FS_EXCLUSIVE
);
if (
1062f7: 83 c4 10 add $0x10,%esp
1062fa: 3d e8 3d 12 00 cmp $0x123de8,%eax
1062ff: 74 0b je 10630c <rtems_tarfs_load+0x5c>
rootloc.mt_entry->ops != &IMFS_ops
&& rootloc.mt_entry->ops != &fifoIMFS_ops
106301: 3d 00 49 12 00 cmp $0x124900,%eax
106306: 0f 85 ee 01 00 00 jne 1064fa <rtems_tarfs_load+0x24a><== ALWAYS TAKEN
rtems_filesystem_eval_path_set_flags(
&ctx,
RTEMS_FS_MAKE | RTEMS_FS_EXCLUSIVE
);
if (
10630c: 31 db xor %ebx,%ebx
hdr_ptr = (char *) &tar_image[offset];
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar", 5))
break;
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
10630e: 8d 85 84 fe ff ff lea -0x17c(%ebp),%eax
106314: 89 85 24 fe ff ff mov %eax,-0x1dc(%ebp)
/*
* Create an IMFS node structure pointing to tar image memory.
*/
offset = 0;
while ( rv == 0 ) {
if (offset + 512 > tar_size)
10631a: 8d 93 00 02 00 00 lea 0x200(%ebx),%edx
106320: 89 95 20 fe ff ff mov %edx,-0x1e0(%ebp)
106326: 8b 45 10 mov 0x10(%ebp),%eax
106329: 39 c2 cmp %eax,%edx
10632b: 0f 87 ce 01 00 00 ja 1064ff <rtems_tarfs_load+0x24f><== NEVER TAKEN
break;
/*
* Read a header.
*/
hdr_ptr = (char *) &tar_image[offset];
106331: 03 5d 0c add 0xc(%ebp),%ebx
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar", 5))
106334: 51 push %ecx
106335: 6a 05 push $0x5
106337: 68 6c 3e 12 00 push $0x123e6c
10633c: 8d 83 01 01 00 00 lea 0x101(%ebx),%eax
106342: 50 push %eax
106343: e8 24 ed 00 00 call 11506c <strncmp>
106348: 83 c4 10 add $0x10,%esp
10634b: 85 c0 test %eax,%eax
10634d: 0f 85 ac 01 00 00 jne 1064ff <rtems_tarfs_load+0x24f>
break;
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
106353: 50 push %eax
106354: 6a 63 push $0x63
106356: 53 push %ebx
106357: 8d 95 84 fe ff ff lea -0x17c(%ebp),%edx
10635d: 52 push %edx
10635e: e8 c9 ed 00 00 call 11512c <strncpy>
filename[MAX_NAME_FIELD_SIZE] = '\0';
106363: c6 85 e7 fe ff ff 00 movb $0x0,-0x119(%ebp)
linkflag = hdr_ptr[156];
10636a: 8a 93 9c 00 00 00 mov 0x9c(%ebx),%dl
file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8);
106370: 58 pop %eax
106371: 59 pop %ecx
106372: 6a 08 push $0x8
106374: 8d 43 64 lea 0x64(%ebx),%eax
106377: 50 push %eax
106378: 88 95 14 fe ff ff mov %dl,-0x1ec(%ebp)
10637e: e8 bd 73 00 00 call 10d740 <_rtems_octal2ulong>
106383: 89 85 18 fe ff ff mov %eax,-0x1e8(%ebp)
file_size = _rtems_octal2ulong(&hdr_ptr[124], 12);
106389: 5f pop %edi
10638a: 58 pop %eax
10638b: 6a 0c push $0xc
10638d: 8d 43 7c lea 0x7c(%ebx),%eax
106390: 50 push %eax
106391: e8 aa 73 00 00 call 10d740 <_rtems_octal2ulong>
106396: 89 85 1c fe ff ff mov %eax,-0x1e4(%ebp)
hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8);
10639c: 58 pop %eax
10639d: 5a pop %edx
10639e: 6a 08 push $0x8
1063a0: 8d 83 94 00 00 00 lea 0x94(%ebx),%eax
1063a6: 50 push %eax
1063a7: e8 94 73 00 00 call 10d740 <_rtems_octal2ulong>
1063ac: 89 c7 mov %eax,%edi
if (_rtems_tar_header_checksum(hdr_ptr) != hdr_chksum)
1063ae: 89 1c 24 mov %ebx,(%esp)
1063b1: e8 b0 73 00 00 call 10d766 <_rtems_tar_header_checksum>
1063b6: 83 c4 10 add $0x10,%esp
1063b9: 39 f8 cmp %edi,%eax
1063bb: 8a 95 14 fe ff ff mov -0x1ec(%ebp),%dl
1063c1: 0f 85 38 01 00 00 jne 1064ff <rtems_tarfs_load+0x24f><== NEVER TAKEN
* Generate an IMFS node depending on the file type.
* - For directories, just create directories as usual. IMFS
* will take care of the rest.
* - For files, create a file node with special tarfs properties.
*/
if (linkflag == DIRTYPE) {
1063c7: 80 fa 35 cmp $0x35,%dl
1063ca: 75 63 jne 10642f <rtems_tarfs_load+0x17f>
strcpy(full_filename, mountpoint);
1063cc: 50 push %eax
1063cd: 50 push %eax
1063ce: ff 75 08 pushl 0x8(%ebp)
1063d1: 8d 9d e8 fe ff ff lea -0x118(%ebp),%ebx
1063d7: 53 push %ebx
1063d8: e8 07 e8 00 00 call 114be4 <strcpy>
if (full_filename[strlen(full_filename)-1] != '/')
1063dd: 31 c0 xor %eax,%eax
1063df: 83 c9 ff or $0xffffffff,%ecx
1063e2: 89 df mov %ebx,%edi
1063e4: f2 ae repnz scas %es:(%edi),%al
1063e6: f7 d1 not %ecx
1063e8: 83 c4 10 add $0x10,%esp
1063eb: 80 bc 0d e6 fe ff ff cmpb $0x2f,-0x11a(%ebp,%ecx,1)
1063f2: 2f
1063f3: 74 10 je 106405 <rtems_tarfs_load+0x155><== ALWAYS TAKEN
strcat(full_filename, "/");
1063f5: 50 push %eax <== NOT EXECUTED
1063f6: 50 push %eax <== NOT EXECUTED
1063f7: 68 79 00 12 00 push $0x120079 <== NOT EXECUTED
1063fc: 53 push %ebx <== NOT EXECUTED
1063fd: e8 26 e6 00 00 call 114a28 <strcat> <== NOT EXECUTED
106402: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
strcat(full_filename, filename);
106405: 53 push %ebx
106406: 53 push %ebx
106407: 8d 85 84 fe ff ff lea -0x17c(%ebp),%eax
10640d: 50 push %eax
10640e: 8d 9d e8 fe ff ff lea -0x118(%ebp),%ebx
106414: 53 push %ebx
106415: e8 0e e6 00 00 call 114a28 <strcat>
mkdir(full_filename, S_IRWXU | S_IRWXG | S_IRWXO);
10641a: 5f pop %edi
10641b: 58 pop %eax
10641c: 68 ff 01 00 00 push $0x1ff
106421: 53 push %ebx
106422: e8 f1 0c 00 00 call 107118 <mkdir>
106427: 83 c4 10 add $0x10,%esp
10642a: e9 c0 00 00 00 jmp 1064ef <rtems_tarfs_load+0x23f>
}
/*
* Create a LINEAR_FILE node
*/
else if (linkflag == REGTYPE) {
10642f: 80 fa 30 cmp $0x30,%dl
106432: 0f 85 b7 00 00 00 jne 1064ef <rtems_tarfs_load+0x23f>
rtems_filesystem_location_free( currentloc );
106438: 83 ec 0c sub $0xc,%esp
10643b: 56 push %esi
10643c: e8 a7 07 00 00 call 106be8 <rtems_filesystem_location_free>
rtems_filesystem_location_clone( currentloc, &rootloc );
106441: 5a pop %edx
106442: 59 pop %ecx
106443: 8d 95 34 fe ff ff lea -0x1cc(%ebp),%edx
106449: 52 push %edx
10644a: 56 push %esi
10644b: e8 1c 05 00 00 call 10696c <rtems_filesystem_location_clone>
rtems_filesystem_eval_path_set_path(
106450: 31 c0 xor %eax,%eax
106452: 83 c9 ff or $0xffffffff,%ecx
106455: 8b bd 24 fe ff ff mov -0x1dc(%ebp),%edi
10645b: f2 ae repnz scas %es:(%edi),%al
10645d: f7 d1 not %ecx
10645f: 49 dec %ecx
rtems_filesystem_eval_path_context_t *ctx,
const char *path,
size_t pathlen
)
{
ctx->path = path;
106460: 8d 85 84 fe ff ff lea -0x17c(%ebp),%eax
106466: 89 85 4c fe ff ff mov %eax,-0x1b4(%ebp)
ctx->pathlen = pathlen;
10646c: 89 8d 50 fe ff ff mov %ecx,-0x1b0(%ebp)
&ctx,
filename,
strlen( filename )
);
rtems_filesystem_eval_path_continue( &ctx );
106472: 8d 85 4c fe ff ff lea -0x1b4(%ebp),%eax
106478: 89 04 24 mov %eax,(%esp)
10647b: e8 1b 19 00 00 call 107d9b <rtems_filesystem_eval_path_continue>
if ( !rtems_filesystem_location_is_null( currentloc ) ) {
106480: 83 c4 10 add $0x10,%esp
106483: 81 7e 10 64 45 12 00 cmpl $0x124564,0x10(%esi)
10648a: 74 4d je 1064d9 <rtems_tarfs_load+0x229><== NEVER TAKEN
10648c: 50 push %eax
10648d: 50 push %eax
10648e: 6a 00 push $0x0
node = IMFS_create_node(
currentloc,
IMFS_LINEAR_FILE,
rtems_filesystem_eval_path_get_token( &ctx ),
rtems_filesystem_eval_path_get_tokenlen( &ctx ),
(file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG,
106490: 8b 85 18 fe ff ff mov -0x1e8(%ebp),%eax
106496: 25 ff 01 00 00 and $0x1ff,%eax
strlen( filename )
);
rtems_filesystem_eval_path_continue( &ctx );
if ( !rtems_filesystem_location_is_null( currentloc ) ) {
node = IMFS_create_node(
10649b: 80 cc 80 or $0x80,%ah
10649e: 50 push %eax
10649f: ff b5 58 fe ff ff pushl -0x1a8(%ebp)
1064a5: ff b5 54 fe ff ff pushl -0x1ac(%ebp)
size_t namelen,
mode_t mode,
const IMFS_types_union *info
)
{
const IMFS_fs_info_t *fs_info =
1064ab: 8b 46 14 mov 0x14(%esi),%eax
(const IMFS_fs_info_t *) parentloc->mt_entry->fs_info;
return IMFS_create_node_with_control(
1064ae: 8b 40 08 mov 0x8(%eax),%eax
1064b1: ff 70 1c pushl 0x1c(%eax)
1064b4: 56 push %esi
1064b5: e8 36 79 00 00 call 10ddf0 <IMFS_create_node_with_control>
rtems_filesystem_eval_path_get_token( &ctx ),
rtems_filesystem_eval_path_get_tokenlen( &ctx ),
(file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG,
NULL
);
node->info.linearfile.size = file_size;
1064ba: 8b 95 1c fe ff ff mov -0x1e4(%ebp),%edx
1064c0: 89 50 50 mov %edx,0x50(%eax)
1064c3: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax)
node->info.linearfile.direct = &tar_image[offset];
1064ca: 8b 55 0c mov 0xc(%ebp),%edx
1064cd: 03 95 20 fe ff ff add -0x1e0(%ebp),%edx
1064d3: 89 50 58 mov %edx,0x58(%eax)
1064d6: 83 c4 20 add $0x20,%esp
}
nblocks = (((file_size) + 511) & ~511) / 512;
1064d9: 8b 85 1c fe ff ff mov -0x1e4(%ebp),%eax
1064df: 05 ff 01 00 00 add $0x1ff,%eax
offset += 512 * nblocks;
1064e4: 25 00 fe ff ff and $0xfffffe00,%eax
1064e9: 01 85 20 fe ff ff add %eax,-0x1e0(%ebp)
rtems_filesystem_eval_path_set_flags(
&ctx,
RTEMS_FS_MAKE | RTEMS_FS_EXCLUSIVE
);
if (
1064ef: 8b 9d 20 fe ff ff mov -0x1e0(%ebp),%ebx
1064f5: e9 20 fe ff ff jmp 10631a <rtems_tarfs_load+0x6a>
rootloc.mt_entry->ops != &IMFS_ops
&& rootloc.mt_entry->ops != &fifoIMFS_ops
) {
rv = -1;
1064fa: 83 cb ff or $0xffffffff,%ebx
1064fd: eb 02 jmp 106501 <rtems_tarfs_load+0x251>
linkflag = hdr_ptr[156];
file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8);
file_size = _rtems_octal2ulong(&hdr_ptr[124], 12);
hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8);
if (_rtems_tar_header_checksum(hdr_ptr) != hdr_chksum)
1064ff: 31 db xor %ebx,%ebx
nblocks = (((file_size) + 511) & ~511) / 512;
offset += 512 * nblocks;
}
}
rtems_filesystem_location_free( &rootloc );
106501: 83 ec 0c sub $0xc,%esp
106504: 8d 85 34 fe ff ff lea -0x1cc(%ebp),%eax
10650a: 50 push %eax
10650b: e8 d8 06 00 00 call 106be8 <rtems_filesystem_location_free>
rtems_filesystem_eval_path_cleanup( &ctx );
106510: 8d 85 4c fe ff ff lea -0x1b4(%ebp),%eax
106516: 89 04 24 mov %eax,(%esp)
106519: e8 93 1a 00 00 call 107fb1 <rtems_filesystem_eval_path_cleanup>
return rv;
}
10651e: 89 d8 mov %ebx,%eax
106520: 8d 65 f4 lea -0xc(%ebp),%esp
106523: 5b pop %ebx
106524: 5e pop %esi
106525: 5f pop %edi
106526: 5d pop %ebp
106527: c3 ret
0010b68c <rtems_task_get_note>:
rtems_status_code rtems_task_get_note(
rtems_id id,
uint32_t notepad,
uint32_t *note
)
{
10b68c: 55 push %ebp
10b68d: 89 e5 mov %esp,%ebp
10b68f: 56 push %esi
10b690: 53 push %ebx
10b691: 83 ec 10 sub $0x10,%esp
10b694: 8b 55 08 mov 0x8(%ebp),%edx
10b697: 8b 75 0c mov 0xc(%ebp),%esi
10b69a: 8b 5d 10 mov 0x10(%ebp),%ebx
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
return RTEMS_NOT_CONFIGURED;
10b69d: b8 16 00 00 00 mov $0x16,%eax
{
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
10b6a2: 80 3d 54 cf 12 00 00 cmpb $0x0,0x12cf54
10b6a9: 74 5d je 10b708 <rtems_task_get_note+0x7c><== NEVER TAKEN
return RTEMS_NOT_CONFIGURED;
if ( !note )
10b6ab: 85 db test %ebx,%ebx
10b6ad: 74 4d je 10b6fc <rtems_task_get_note+0x70>
* NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would
* be checking an unsigned number for being negative.
*/
if ( notepad > RTEMS_NOTEPAD_LAST )
return RTEMS_INVALID_NUMBER;
10b6af: b0 0a mov $0xa,%al
/*
* NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would
* be checking an unsigned number for being negative.
*/
if ( notepad > RTEMS_NOTEPAD_LAST )
10b6b1: 83 fe 0f cmp $0xf,%esi
10b6b4: 77 52 ja 10b708 <rtems_task_get_note+0x7c>
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
10b6b6: 85 d2 test %edx,%edx
10b6b8: a1 3c 19 13 00 mov 0x13193c,%eax
10b6bd: 74 05 je 10b6c4 <rtems_task_get_note+0x38>
10b6bf: 3b 50 08 cmp 0x8(%eax),%edx
10b6c2: 75 0e jne 10b6d2 <rtems_task_get_note+0x46>
_Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) {
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
*note = api->Notepads[ notepad ];
10b6c4: 8b 80 e4 00 00 00 mov 0xe4(%eax),%eax
10b6ca: 8b 44 b0 20 mov 0x20(%eax,%esi,4),%eax
10b6ce: 89 03 mov %eax,(%ebx)
10b6d0: eb 26 jmp 10b6f8 <rtems_task_get_note+0x6c>
return RTEMS_SUCCESSFUL;
}
the_thread = _Thread_Get( id, &location );
10b6d2: 50 push %eax
10b6d3: 50 push %eax
10b6d4: 8d 45 f4 lea -0xc(%ebp),%eax
10b6d7: 50 push %eax
10b6d8: 52 push %edx
10b6d9: e8 fe 1f 00 00 call 10d6dc <_Thread_Get>
switch ( location ) {
10b6de: 83 c4 10 add $0x10,%esp
10b6e1: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
10b6e5: 75 1c jne 10b703 <rtems_task_get_note+0x77>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
*note = api->Notepads[ notepad ];
10b6e7: 8b 80 e4 00 00 00 mov 0xe4(%eax),%eax
10b6ed: 8b 44 b0 20 mov 0x20(%eax,%esi,4),%eax
10b6f1: 89 03 mov %eax,(%ebx)
_Thread_Enable_dispatch();
10b6f3: e8 c4 1f 00 00 call 10d6bc <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10b6f8: 31 c0 xor %eax,%eax
10b6fa: eb 0c jmp 10b708 <rtems_task_get_note+0x7c>
if ( !rtems_configuration_get_notepads_enabled() )
return RTEMS_NOT_CONFIGURED;
if ( !note )
return RTEMS_INVALID_ADDRESS;
10b6fc: b8 09 00 00 00 mov $0x9,%eax
10b701: eb 05 jmp 10b708 <rtems_task_get_note+0x7c>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10b703: b8 04 00 00 00 mov $0x4,%eax
}
10b708: 8d 65 f8 lea -0x8(%ebp),%esp
10b70b: 5b pop %ebx
10b70c: 5e pop %esi
10b70d: 5d pop %ebp
10b70e: c3 ret
00110a2c <rtems_task_mode>:
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
110a2c: 55 push %ebp
110a2d: 89 e5 mov %esp,%ebp
110a2f: 57 push %edi
110a30: 56 push %esi
110a31: 53 push %ebx
110a32: 83 ec 1c sub $0x1c,%esp
ASR_Information *asr;
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
110a35: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
110a39: 0f 84 00 01 00 00 je 110b3f <rtems_task_mode+0x113>
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
110a3f: 8b 35 ec e8 12 00 mov 0x12e8ec,%esi
api = executing->API_Extensions[ THREAD_API_RTEMS ];
110a45: 8b 9e e4 00 00 00 mov 0xe4(%esi),%ebx
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
110a4b: 80 7e 70 01 cmpb $0x1,0x70(%esi)
110a4f: 19 ff sbb %edi,%edi
110a51: 81 e7 00 01 00 00 and $0x100,%edi
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
110a57: 83 7e 78 00 cmpl $0x0,0x78(%esi)
110a5b: 74 06 je 110a63 <rtems_task_mode+0x37>
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
110a5d: 81 cf 00 02 00 00 or $0x200,%edi
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
110a63: 80 7b 08 01 cmpb $0x1,0x8(%ebx)
110a67: 19 c9 sbb %ecx,%ecx
110a69: 81 e1 00 04 00 00 and $0x400,%ecx
old_mode |= _ISR_Get_level();
110a6f: 89 4d e4 mov %ecx,-0x1c(%ebp)
110a72: e8 89 c4 ff ff call 10cf00 <_CPU_ISR_Get_level>
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
110a77: 8b 4d e4 mov -0x1c(%ebp),%ecx
110a7a: 09 c8 or %ecx,%eax
old_mode |= _ISR_Get_level();
110a7c: 09 f8 or %edi,%eax
110a7e: 8b 55 10 mov 0x10(%ebp),%edx
110a81: 89 02 mov %eax,(%edx)
*previous_mode_set = old_mode;
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
110a83: f7 45 0c 00 01 00 00 testl $0x100,0xc(%ebp)
110a8a: 74 0f je 110a9b <rtems_task_mode+0x6f>
110a8c: 8b 45 08 mov 0x8(%ebp),%eax
110a8f: c1 e8 08 shr $0x8,%eax
110a92: 83 f0 01 xor $0x1,%eax
110a95: 83 e0 01 and $0x1,%eax
110a98: 88 46 70 mov %al,0x70(%esi)
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
if ( mask & RTEMS_TIMESLICE_MASK ) {
110a9b: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp)
110aa2: 74 21 je 110ac5 <rtems_task_mode+0x99>
if ( _Modes_Is_timeslice(mode_set) ) {
110aa4: f7 45 08 00 02 00 00 testl $0x200,0x8(%ebp)
110aab: 74 11 je 110abe <rtems_task_mode+0x92>
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
110aad: c7 46 78 01 00 00 00 movl $0x1,0x78(%esi)
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
110ab4: a1 b8 e3 12 00 mov 0x12e3b8,%eax
110ab9: 89 46 74 mov %eax,0x74(%esi)
110abc: eb 07 jmp 110ac5 <rtems_task_mode+0x99>
} else
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
110abe: c7 46 78 00 00 00 00 movl $0x0,0x78(%esi)
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
110ac5: f6 45 0c 01 testb $0x1,0xc(%ebp)
110ac9: 74 0a je 110ad5 <rtems_task_mode+0xa9>
*/
RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level (
Modes_Control mode_set
)
{
_ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) );
110acb: f6 45 08 01 testb $0x1,0x8(%ebp)
110acf: 74 03 je 110ad4 <rtems_task_mode+0xa8>
110ad1: fa cli
110ad2: eb 01 jmp 110ad5 <rtems_task_mode+0xa9>
110ad4: fb sti
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
110ad5: 31 d2 xor %edx,%edx
if ( mask & RTEMS_ASR_MASK ) {
110ad7: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp)
110ade: 74 2c je 110b0c <rtems_task_mode+0xe0>
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
110ae0: 8b 45 08 mov 0x8(%ebp),%eax
110ae3: c1 e8 0a shr $0xa,%eax
110ae6: 83 f0 01 xor $0x1,%eax
110ae9: 83 e0 01 and $0x1,%eax
if ( is_asr_enabled != asr->is_enabled ) {
110aec: 3a 43 08 cmp 0x8(%ebx),%al
110aef: 74 1b je 110b0c <rtems_task_mode+0xe0>
asr->is_enabled = is_asr_enabled;
110af1: 88 43 08 mov %al,0x8(%ebx)
)
{
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
110af4: 9c pushf
110af5: fa cli
110af6: 58 pop %eax
_signals = information->signals_pending;
110af7: 8b 53 18 mov 0x18(%ebx),%edx
information->signals_pending = information->signals_posted;
110afa: 8b 4b 14 mov 0x14(%ebx),%ecx
110afd: 89 4b 18 mov %ecx,0x18(%ebx)
information->signals_posted = _signals;
110b00: 89 53 14 mov %edx,0x14(%ebx)
_ISR_Enable( _level );
110b03: 50 push %eax
110b04: 9d popf
_ASR_Swap_signals( asr );
if ( _ASR_Are_signals_pending( asr ) ) {
110b05: 83 7b 14 00 cmpl $0x0,0x14(%ebx)
110b09: 0f 95 c2 setne %dl
if ( _System_state_Is_up( _System_state_Get() ) ) {
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
}
return RTEMS_SUCCESSFUL;
110b0c: 31 c0 xor %eax,%eax
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
110b0e: 83 3d 20 e5 12 00 03 cmpl $0x3,0x12e520
110b15: 75 2d jne 110b44 <rtems_task_mode+0x118>
bool are_signals_pending
)
{
Thread_Control *executing;
executing = _Thread_Executing;
110b17: 8b 0d ec e8 12 00 mov 0x12e8ec,%ecx
if ( are_signals_pending ||
110b1d: 84 d2 test %dl,%dl
110b1f: 75 0e jne 110b2f <rtems_task_mode+0x103>
110b21: 3b 0d f0 e8 12 00 cmp 0x12e8f0,%ecx
110b27: 74 1b je 110b44 <rtems_task_mode+0x118>
(!_Thread_Is_heir( executing ) && executing->is_preemptible) ) {
110b29: 80 79 70 00 cmpb $0x0,0x70(%ecx)
110b2d: 74 15 je 110b44 <rtems_task_mode+0x118> <== NEVER TAKEN
_Thread_Dispatch_necessary = true;
110b2f: c6 05 f8 e8 12 00 01 movb $0x1,0x12e8f8
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
110b36: e8 95 b1 ff ff call 10bcd0 <_Thread_Dispatch>
}
return RTEMS_SUCCESSFUL;
110b3b: 31 c0 xor %eax,%eax
110b3d: eb 05 jmp 110b44 <rtems_task_mode+0x118>
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
110b3f: b8 09 00 00 00 mov $0x9,%eax
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
}
return RTEMS_SUCCESSFUL;
}
110b44: 83 c4 1c add $0x1c,%esp
110b47: 5b pop %ebx
110b48: 5e pop %esi
110b49: 5f pop %edi
110b4a: 5d pop %ebp
110b4b: c3 ret
0010d48c <rtems_task_set_priority>:
rtems_status_code rtems_task_set_priority(
rtems_id id,
rtems_task_priority new_priority,
rtems_task_priority *old_priority
)
{
10d48c: 55 push %ebp
10d48d: 89 e5 mov %esp,%ebp
10d48f: 56 push %esi
10d490: 53 push %ebx
10d491: 83 ec 10 sub $0x10,%esp
10d494: 8b 5d 0c mov 0xc(%ebp),%ebx
10d497: 8b 75 10 mov 0x10(%ebp),%esi
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
10d49a: 85 db test %ebx,%ebx
10d49c: 74 10 je 10d4ae <rtems_task_set_priority+0x22>
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
( the_priority <= RTEMS_MAXIMUM_PRIORITY ) );
10d49e: 0f b6 15 88 e1 12 00 movzbl 0x12e188,%edx
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
10d4a5: b8 13 00 00 00 mov $0x13,%eax
)
{
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
10d4aa: 39 d3 cmp %edx,%ebx
10d4ac: 77 52 ja 10d500 <rtems_task_set_priority+0x74>
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
return RTEMS_INVALID_ADDRESS;
10d4ae: b8 09 00 00 00 mov $0x9,%eax
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
10d4b3: 85 f6 test %esi,%esi
10d4b5: 74 49 je 10d500 <rtems_task_set_priority+0x74>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
10d4b7: 51 push %ecx
10d4b8: 51 push %ecx
10d4b9: 8d 45 f4 lea -0xc(%ebp),%eax
10d4bc: 50 push %eax
10d4bd: ff 75 08 pushl 0x8(%ebp)
10d4c0: e8 d7 1d 00 00 call 10f29c <_Thread_Get>
switch ( location ) {
10d4c5: 83 c4 10 add $0x10,%esp
10d4c8: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
10d4cc: 75 2d jne 10d4fb <rtems_task_set_priority+0x6f>
case OBJECTS_LOCAL:
/* XXX need helper to "convert" from core priority */
*old_priority = the_thread->current_priority;
10d4ce: 8b 50 14 mov 0x14(%eax),%edx
10d4d1: 89 16 mov %edx,(%esi)
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
10d4d3: 85 db test %ebx,%ebx
10d4d5: 74 1b je 10d4f2 <rtems_task_set_priority+0x66>
the_thread->real_priority = new_priority;
10d4d7: 89 58 18 mov %ebx,0x18(%eax)
if ( the_thread->resource_count == 0 ||
10d4da: 83 78 1c 00 cmpl $0x0,0x1c(%eax)
10d4de: 74 05 je 10d4e5 <rtems_task_set_priority+0x59>
10d4e0: 39 58 14 cmp %ebx,0x14(%eax)
10d4e3: 76 0d jbe 10d4f2 <rtems_task_set_priority+0x66><== ALWAYS TAKEN
the_thread->current_priority > new_priority )
_Thread_Change_priority( the_thread, new_priority, false );
10d4e5: 52 push %edx
10d4e6: 6a 00 push $0x0
10d4e8: 53 push %ebx
10d4e9: 50 push %eax
10d4ea: e8 9d 19 00 00 call 10ee8c <_Thread_Change_priority>
10d4ef: 83 c4 10 add $0x10,%esp
}
_Thread_Enable_dispatch();
10d4f2: e8 85 1d 00 00 call 10f27c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10d4f7: 31 c0 xor %eax,%eax
10d4f9: eb 05 jmp 10d500 <rtems_task_set_priority+0x74>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10d4fb: b8 04 00 00 00 mov $0x4,%eax
}
10d500: 8d 65 f8 lea -0x8(%ebp),%esp
10d503: 5b pop %ebx
10d504: 5e pop %esi
10d505: 5d pop %ebp
10d506: c3 ret
00108cfc <rtems_termios_baud_to_index>:
#include <rtems/termiostypes.h>
int rtems_termios_baud_to_index(
rtems_termios_baud_t termios_baud
)
{
108cfc: 55 push %ebp
108cfd: 89 e5 mov %esp,%ebp
108cff: 8b 55 08 mov 0x8(%ebp),%edx
int baud_index;
switch (termios_baud) {
108d02: 83 fa 09 cmp $0x9,%edx
108d05: 0f 84 eb 00 00 00 je 108df6 <rtems_termios_baud_to_index+0xfa>
108d0b: 77 61 ja 108d6e <rtems_termios_baud_to_index+0x72>
108d0d: 83 fa 04 cmp $0x4,%edx
108d10: 0f 84 c4 00 00 00 je 108dda <rtems_termios_baud_to_index+0xde>
108d16: 77 2b ja 108d43 <rtems_termios_baud_to_index+0x47>
108d18: 83 fa 01 cmp $0x1,%edx
108d1b: 0f 84 20 01 00 00 je 108e41 <rtems_termios_baud_to_index+0x145>
case B0: baud_index = 0; break;
108d21: b8 00 00 00 00 mov $0x0,%eax
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
108d26: 0f 82 1a 01 00 00 jb 108e46 <rtems_termios_baud_to_index+0x14a>
108d2c: 83 fa 02 cmp $0x2,%edx
108d2f: 0f 84 97 00 00 00 je 108dcc <rtems_termios_baud_to_index+0xd0>
108d35: 83 fa 03 cmp $0x3,%edx
108d38: 0f 85 fe 00 00 00 jne 108e3c <rtems_termios_baud_to_index+0x140><== NEVER TAKEN
108d3e: e9 90 00 00 00 jmp 108dd3 <rtems_termios_baud_to_index+0xd7>
108d43: 83 fa 06 cmp $0x6,%edx
108d46: 0f 84 95 00 00 00 je 108de1 <rtems_termios_baud_to_index+0xe5>
case B0: baud_index = 0; break;
case B50: baud_index = 1; break;
case B75: baud_index = 2; break;
case B110: baud_index = 3; break;
case B134: baud_index = 4; break;
case B150: baud_index = 5; break;
108d4c: b8 05 00 00 00 mov $0x5,%eax
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
108d51: 0f 82 ef 00 00 00 jb 108e46 <rtems_termios_baud_to_index+0x14a>
108d57: 83 fa 07 cmp $0x7,%edx
108d5a: 0f 84 88 00 00 00 je 108de8 <rtems_termios_baud_to_index+0xec>
108d60: 83 fa 08 cmp $0x8,%edx
108d63: 0f 85 d3 00 00 00 jne 108e3c <rtems_termios_baud_to_index+0x140><== NEVER TAKEN
108d69: e9 81 00 00 00 jmp 108def <rtems_termios_baud_to_index+0xf3>
108d6e: 83 fa 0e cmp $0xe,%edx
108d71: 0f 84 9b 00 00 00 je 108e12 <rtems_termios_baud_to_index+0x116>
108d77: 77 20 ja 108d99 <rtems_termios_baud_to_index+0x9d>
108d79: 83 fa 0b cmp $0xb,%edx
108d7c: 74 7f je 108dfd <rtems_termios_baud_to_index+0x101>
case B150: baud_index = 5; break;
case B200: baud_index = 6; break;
case B300: baud_index = 7; break;
case B600: baud_index = 8; break;
case B1200: baud_index = 9; break;
case B1800: baud_index = 10; break;
108d7e: b8 0a 00 00 00 mov $0xa,%eax
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
108d83: 0f 82 bd 00 00 00 jb 108e46 <rtems_termios_baud_to_index+0x14a>
108d89: 83 fa 0c cmp $0xc,%edx
108d8c: 74 76 je 108e04 <rtems_termios_baud_to_index+0x108>
108d8e: 83 fa 0d cmp $0xd,%edx
108d91: 0f 85 a5 00 00 00 jne 108e3c <rtems_termios_baud_to_index+0x140><== NEVER TAKEN
108d97: eb 72 jmp 108e0b <rtems_termios_baud_to_index+0x10f>
108d99: 81 fa 02 10 00 00 cmp $0x1002,%edx
108d9f: 0f 84 82 00 00 00 je 108e27 <rtems_termios_baud_to_index+0x12b>
108da5: 77 13 ja 108dba <rtems_termios_baud_to_index+0xbe>
108da7: 83 fa 0f cmp $0xf,%edx
108daa: 74 6d je 108e19 <rtems_termios_baud_to_index+0x11d>
108dac: 81 fa 01 10 00 00 cmp $0x1001,%edx
108db2: 0f 85 84 00 00 00 jne 108e3c <rtems_termios_baud_to_index+0x140><== NEVER TAKEN
108db8: eb 66 jmp 108e20 <rtems_termios_baud_to_index+0x124>
108dba: 81 fa 03 10 00 00 cmp $0x1003,%edx
108dc0: 74 6c je 108e2e <rtems_termios_baud_to_index+0x132>
108dc2: 81 fa 04 10 00 00 cmp $0x1004,%edx
108dc8: 75 72 jne 108e3c <rtems_termios_baud_to_index+0x140>
108dca: eb 69 jmp 108e35 <rtems_termios_baud_to_index+0x139>
case B0: baud_index = 0; break;
case B50: baud_index = 1; break;
case B75: baud_index = 2; break;
108dcc: b8 02 00 00 00 mov $0x2,%eax
108dd1: eb 73 jmp 108e46 <rtems_termios_baud_to_index+0x14a>
case B110: baud_index = 3; break;
108dd3: b8 03 00 00 00 mov $0x3,%eax
108dd8: eb 6c jmp 108e46 <rtems_termios_baud_to_index+0x14a>
case B134: baud_index = 4; break;
108dda: b8 04 00 00 00 mov $0x4,%eax
108ddf: eb 65 jmp 108e46 <rtems_termios_baud_to_index+0x14a>
case B150: baud_index = 5; break;
case B200: baud_index = 6; break;
108de1: b8 06 00 00 00 mov $0x6,%eax
108de6: eb 5e jmp 108e46 <rtems_termios_baud_to_index+0x14a>
case B300: baud_index = 7; break;
108de8: b8 07 00 00 00 mov $0x7,%eax
108ded: eb 57 jmp 108e46 <rtems_termios_baud_to_index+0x14a>
case B600: baud_index = 8; break;
108def: b8 08 00 00 00 mov $0x8,%eax
108df4: eb 50 jmp 108e46 <rtems_termios_baud_to_index+0x14a>
case B1200: baud_index = 9; break;
108df6: b8 09 00 00 00 mov $0x9,%eax
108dfb: eb 49 jmp 108e46 <rtems_termios_baud_to_index+0x14a>
case B1800: baud_index = 10; break;
case B2400: baud_index = 11; break;
108dfd: b8 0b 00 00 00 mov $0xb,%eax
108e02: eb 42 jmp 108e46 <rtems_termios_baud_to_index+0x14a>
case B4800: baud_index = 12; break;
108e04: b8 0c 00 00 00 mov $0xc,%eax
108e09: eb 3b jmp 108e46 <rtems_termios_baud_to_index+0x14a>
case B9600: baud_index = 13; break;
108e0b: b8 0d 00 00 00 mov $0xd,%eax
108e10: eb 34 jmp 108e46 <rtems_termios_baud_to_index+0x14a>
case B19200: baud_index = 14; break;
108e12: b8 0e 00 00 00 mov $0xe,%eax
108e17: eb 2d jmp 108e46 <rtems_termios_baud_to_index+0x14a>
case B38400: baud_index = 15; break;
108e19: b8 0f 00 00 00 mov $0xf,%eax
108e1e: eb 26 jmp 108e46 <rtems_termios_baud_to_index+0x14a>
case B57600: baud_index = 16; break;
108e20: b8 10 00 00 00 mov $0x10,%eax
108e25: eb 1f jmp 108e46 <rtems_termios_baud_to_index+0x14a>
case B115200: baud_index = 17; break;
108e27: b8 11 00 00 00 mov $0x11,%eax
108e2c: eb 18 jmp 108e46 <rtems_termios_baud_to_index+0x14a>
case B230400: baud_index = 18; break;
108e2e: b8 12 00 00 00 mov $0x12,%eax
108e33: eb 11 jmp 108e46 <rtems_termios_baud_to_index+0x14a>
case B460800: baud_index = 19; break;
108e35: b8 13 00 00 00 mov $0x13,%eax
108e3a: eb 0a jmp 108e46 <rtems_termios_baud_to_index+0x14a>
default: baud_index = -1; break;
108e3c: 83 c8 ff or $0xffffffff,%eax
108e3f: eb 05 jmp 108e46 <rtems_termios_baud_to_index+0x14a>
{
int baud_index;
switch (termios_baud) {
case B0: baud_index = 0; break;
case B50: baud_index = 1; break;
108e41: b8 01 00 00 00 mov $0x1,%eax
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
108e46: 5d pop %ebp
108e47: c3 ret
001083dd <rtems_termios_close>:
}
}
rtems_status_code
rtems_termios_close (void *arg)
{
1083dd: 55 push %ebp
1083de: 89 e5 mov %esp,%ebp
1083e0: 56 push %esi
1083e1: 53 push %ebx
1083e2: 8b 75 08 mov 0x8(%ebp),%esi
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
1083e5: 8b 06 mov (%esi),%eax
1083e7: 8b 58 2c mov 0x2c(%eax),%ebx
rtems_status_code sc;
sc = rtems_semaphore_obtain(
1083ea: 50 push %eax
1083eb: 6a 00 push $0x0
1083ed: 6a 00 push $0x0
1083ef: ff 35 14 e3 12 00 pushl 0x12e314
1083f5: e8 96 19 00 00 call 109d90 <rtems_semaphore_obtain>
rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
1083fa: 83 c4 10 add $0x10,%esp
1083fd: 85 c0 test %eax,%eax
1083ff: 74 05 je 108406 <rtems_termios_close+0x29><== ALWAYS TAKEN
108401: e9 8f 00 00 00 jmp 108495 <rtems_termios_close+0xb8><== NOT EXECUTED
rtems_fatal_error_occurred (sc);
if (--tty->refcount == 0) {
108406: ff 4b 08 decl 0x8(%ebx)
108409: 0f 85 4b 01 00 00 jne 10855a <rtems_termios_close+0x17d>
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
10840f: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax
108415: c1 e0 05 shl $0x5,%eax
108418: 8b 80 c4 df 12 00 mov 0x12dfc4(%eax),%eax
10841e: 85 c0 test %eax,%eax
108420: 74 08 je 10842a <rtems_termios_close+0x4d>
/*
* call discipline-specific close
*/
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
108422: 83 ec 0c sub $0xc,%esp
108425: 53 push %ebx
108426: ff d0 call *%eax
108428: eb 31 jmp 10845b <rtems_termios_close+0x7e>
} else {
/*
* default: just flush output buffer
*/
sc = rtems_semaphore_obtain(tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
10842a: 50 push %eax
10842b: 6a 00 push $0x0
10842d: 6a 00 push $0x0
10842f: ff 73 18 pushl 0x18(%ebx)
108432: e8 59 19 00 00 call 109d90 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL) {
108437: 83 c4 10 add $0x10,%esp
10843a: 85 c0 test %eax,%eax
10843c: 74 02 je 108440 <rtems_termios_close+0x63><== ALWAYS TAKEN
10843e: eb 55 jmp 108495 <rtems_termios_close+0xb8><== NOT EXECUTED
drainOutput (struct rtems_termios_tty *tty)
{
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
108440: 83 bb b4 00 00 00 00 cmpl $0x0,0xb4(%ebx)
108447: 74 07 je 108450 <rtems_termios_close+0x73>
108449: 89 d8 mov %ebx,%eax
10844b: e8 56 fb ff ff call 107fa6 <drainOutput.part.0>
sc = rtems_semaphore_obtain(tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL) {
rtems_fatal_error_occurred (sc);
}
drainOutput (tty);
rtems_semaphore_release (tty->osem);
108450: 83 ec 0c sub $0xc,%esp
108453: ff 73 18 pushl 0x18(%ebx)
108456: e8 25 1a 00 00 call 109e80 <rtems_semaphore_release>
10845b: 83 c4 10 add $0x10,%esp
}
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
10845e: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx)
108465: 75 37 jne 10849e <rtems_termios_close+0xc1>
/*
* send "terminate" to I/O tasks
*/
sc = rtems_event_send( tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT );
108467: 50 push %eax
108468: 50 push %eax
108469: 6a 01 push $0x1
10846b: ff b3 c4 00 00 00 pushl 0xc4(%ebx)
108471: e8 4e 15 00 00 call 1099c4 <rtems_event_send>
if (sc != RTEMS_SUCCESSFUL)
108476: 83 c4 10 add $0x10,%esp
108479: 85 c0 test %eax,%eax
10847b: 74 02 je 10847f <rtems_termios_close+0xa2><== ALWAYS TAKEN
10847d: eb 16 jmp 108495 <rtems_termios_close+0xb8><== NOT EXECUTED
rtems_fatal_error_occurred (sc);
sc = rtems_event_send( tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT );
10847f: 51 push %ecx
108480: 51 push %ecx
108481: 6a 01 push $0x1
108483: ff b3 c8 00 00 00 pushl 0xc8(%ebx)
108489: e8 36 15 00 00 call 1099c4 <rtems_event_send>
if (sc != RTEMS_SUCCESSFUL)
10848e: 83 c4 10 add $0x10,%esp
108491: 85 c0 test %eax,%eax
108493: 74 09 je 10849e <rtems_termios_close+0xc1><== ALWAYS TAKEN
rtems_fatal_error_occurred (sc);
108495: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
108498: 50 push %eax <== NOT EXECUTED
108499: e8 16 1f 00 00 call 10a3b4 <rtems_fatal_error_occurred><== NOT EXECUTED
}
if (tty->device.lastClose)
10849e: 8b 83 9c 00 00 00 mov 0x9c(%ebx),%eax
1084a4: 85 c0 test %eax,%eax
1084a6: 74 0d je 1084b5 <rtems_termios_close+0xd8>
(*tty->device.lastClose)(tty->major, tty->minor, arg);
1084a8: 52 push %edx
1084a9: 56 push %esi
1084aa: ff 73 10 pushl 0x10(%ebx)
1084ad: ff 73 0c pushl 0xc(%ebx)
1084b0: ff d0 call *%eax
1084b2: 83 c4 10 add $0x10,%esp
if (tty->forw == NULL) {
1084b5: 8b 13 mov (%ebx),%edx
1084b7: 85 d2 test %edx,%edx
1084b9: 8b 43 04 mov 0x4(%ebx),%eax
1084bc: 75 11 jne 1084cf <rtems_termios_close+0xf2>
rtems_termios_ttyTail = tty->back;
1084be: a3 18 e3 12 00 mov %eax,0x12e318
if ( rtems_termios_ttyTail != NULL ) {
1084c3: 85 c0 test %eax,%eax
1084c5: 74 0b je 1084d2 <rtems_termios_close+0xf5><== ALWAYS TAKEN
rtems_termios_ttyTail->forw = NULL;
1084c7: c7 00 00 00 00 00 movl $0x0,(%eax) <== NOT EXECUTED
1084cd: eb 03 jmp 1084d2 <rtems_termios_close+0xf5><== NOT EXECUTED
}
} else {
tty->forw->back = tty->back;
1084cf: 89 42 04 mov %eax,0x4(%edx)
}
if (tty->back == NULL) {
1084d2: 8b 53 04 mov 0x4(%ebx),%edx
1084d5: 85 d2 test %edx,%edx
1084d7: 8b 03 mov (%ebx),%eax
1084d9: 75 12 jne 1084ed <rtems_termios_close+0x110><== NEVER TAKEN
rtems_termios_ttyHead = tty->forw;
1084db: a3 1c e3 12 00 mov %eax,0x12e31c
if ( rtems_termios_ttyHead != NULL ) {
1084e0: 85 c0 test %eax,%eax
1084e2: 74 0b je 1084ef <rtems_termios_close+0x112>
rtems_termios_ttyHead->back = NULL;
1084e4: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax)
1084eb: eb 02 jmp 1084ef <rtems_termios_close+0x112>
}
} else {
tty->back->forw = tty->forw;
1084ed: 89 02 mov %eax,(%edx) <== NOT EXECUTED
}
rtems_semaphore_delete (tty->isem);
1084ef: 83 ec 0c sub $0xc,%esp
1084f2: ff 73 14 pushl 0x14(%ebx)
1084f5: e8 06 18 00 00 call 109d00 <rtems_semaphore_delete>
rtems_semaphore_delete (tty->osem);
1084fa: 58 pop %eax
1084fb: ff 73 18 pushl 0x18(%ebx)
1084fe: e8 fd 17 00 00 call 109d00 <rtems_semaphore_delete>
rtems_semaphore_delete (tty->rawOutBuf.Semaphore);
108503: 58 pop %eax
108504: ff b3 8c 00 00 00 pushl 0x8c(%ebx)
10850a: e8 f1 17 00 00 call 109d00 <rtems_semaphore_delete>
if ((tty->device.pollRead == NULL) ||
10850f: 83 c4 10 add $0x10,%esp
108512: 83 bb a0 00 00 00 00 cmpl $0x0,0xa0(%ebx)
108519: 74 09 je 108524 <rtems_termios_close+0x147>
10851b: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx)
108522: 75 0e jne 108532 <rtems_termios_close+0x155>
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN))
rtems_semaphore_delete (tty->rawInBuf.Semaphore);
108524: 83 ec 0c sub $0xc,%esp
108527: ff 73 68 pushl 0x68(%ebx)
10852a: e8 d1 17 00 00 call 109d00 <rtems_semaphore_delete>
10852f: 83 c4 10 add $0x10,%esp
free (tty->rawInBuf.theBuf);
108532: 83 ec 0c sub $0xc,%esp
108535: ff 73 58 pushl 0x58(%ebx)
108538: e8 f7 e1 ff ff call 106734 <free>
free (tty->rawOutBuf.theBuf);
10853d: 58 pop %eax
10853e: ff 73 7c pushl 0x7c(%ebx)
108541: e8 ee e1 ff ff call 106734 <free>
free (tty->cbuf);
108546: 58 pop %eax
108547: ff 73 1c pushl 0x1c(%ebx)
10854a: e8 e5 e1 ff ff call 106734 <free>
free (tty);
10854f: 89 1c 24 mov %ebx,(%esp)
108552: e8 dd e1 ff ff call 106734 <free>
108557: 83 c4 10 add $0x10,%esp
}
rtems_semaphore_release (rtems_termios_ttyMutex);
10855a: 83 ec 0c sub $0xc,%esp
10855d: ff 35 14 e3 12 00 pushl 0x12e314
108563: e8 18 19 00 00 call 109e80 <rtems_semaphore_release>
return RTEMS_SUCCESSFUL;
}
108568: 31 c0 xor %eax,%eax
10856a: 8d 65 f8 lea -0x8(%ebp),%esp
10856d: 5b pop %ebx
10856e: 5e pop %esi
10856f: 5d pop %ebp
108570: c3 ret
00109495 <rtems_termios_dequeue_characters>:
* for each transmitted character.
* It returns number of characters left to transmit
*/
int
rtems_termios_dequeue_characters (void *ttyp, int len)
{
109495: 55 push %ebp
109496: 89 e5 mov %esp,%ebp
109498: 83 ec 08 sub $0x8,%esp
10949b: 8b 45 08 mov 0x8(%ebp),%eax
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
10949e: 8b 55 0c mov 0xc(%ebp),%edx
1094a1: 01 90 90 00 00 00 add %edx,0x90(%eax)
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
1094a7: 83 b8 b4 00 00 00 02 cmpl $0x2,0xb4(%eax)
1094ae: 75 1f jne 1094cf <rtems_termios_dequeue_characters+0x3a>
/*
* send wake up to transmitter task
*/
sc = rtems_event_send(tty->txTaskId, TERMIOS_TX_START_EVENT);
1094b0: 52 push %edx
1094b1: 52 push %edx
1094b2: 6a 02 push $0x2
1094b4: ff b0 c8 00 00 00 pushl 0xc8(%eax)
1094ba: e8 05 05 00 00 call 1099c4 <rtems_event_send>
if (sc != RTEMS_SUCCESSFUL)
1094bf: 83 c4 10 add $0x10,%esp
1094c2: 85 c0 test %eax,%eax
1094c4: 74 2d je 1094f3 <rtems_termios_dequeue_characters+0x5e><== ALWAYS TAKEN
rtems_fatal_error_occurred (sc);
1094c6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1094c9: 50 push %eax <== NOT EXECUTED
1094ca: e8 e5 0e 00 00 call 10a3b4 <rtems_fatal_error_occurred><== NOT EXECUTED
return 0; /* nothing to output in IRQ... */
}
if (tty->t_line == PPPDISC ) {
1094cf: 83 b8 cc 00 00 00 05 cmpl $0x5,0xcc(%eax)
1094d6: 75 15 jne 1094ed <rtems_termios_dequeue_characters+0x58><== ALWAYS TAKEN
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
1094d8: 8b 15 74 e0 12 00 mov 0x12e074,%edx
1094de: 85 d2 test %edx,%edx
1094e0: 74 11 je 1094f3 <rtems_termios_dequeue_characters+0x5e><== NEVER TAKEN
rtems_termios_linesw[tty->t_line].l_start(tty);
1094e2: 83 ec 0c sub $0xc,%esp
1094e5: 50 push %eax
1094e6: ff d2 call *%edx
1094e8: 83 c4 10 add $0x10,%esp
1094eb: eb 06 jmp 1094f3 <rtems_termios_dequeue_characters+0x5e>
}
return 0; /* nothing to output in IRQ... */
}
return rtems_termios_refill_transmitter(tty);
}
1094ed: c9 leave
rtems_termios_linesw[tty->t_line].l_start(tty);
}
return 0; /* nothing to output in IRQ... */
}
return rtems_termios_refill_transmitter(tty);
1094ee: e9 8d e8 ff ff jmp 107d80 <rtems_termios_refill_transmitter>
}
1094f3: 31 c0 xor %eax,%eax
1094f5: c9 leave
1094f6: c3 ret
001091b7 <rtems_termios_enqueue_raw_characters>:
* device receive interrupt handler.
* Returns the number of characters dropped because of overflow.
*/
int
rtems_termios_enqueue_raw_characters (void *ttyp, const char *buf, int len)
{
1091b7: 55 push %ebp
1091b8: 89 e5 mov %esp,%ebp
1091ba: 57 push %edi
1091bb: 56 push %esi
1091bc: 53 push %ebx
1091bd: 83 ec 2c sub $0x2c,%esp
1091c0: 8b 5d 08 mov 0x8(%ebp),%ebx
1091c3: 8b 75 0c mov 0xc(%ebp),%esi
char c;
int dropped = 0;
bool flow_rcv = false; /* true, if flow control char received */
rtems_interrupt_level level;
if (rtems_termios_linesw[tty->t_line].l_rint != NULL) {
1091c6: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax
1091cc: c1 e0 05 shl $0x5,%eax
1091cf: 83 b8 d0 df 12 00 00 cmpl $0x0,0x12dfd0(%eax)
1091d6: 8b 45 10 mov 0x10(%ebp),%eax
1091d9: 8d 04 06 lea (%esi,%eax,1),%eax
1091dc: 89 45 dc mov %eax,-0x24(%ebp)
1091df: 75 31 jne 109212 <rtems_termios_enqueue_raw_characters+0x5b>
* NOTE: This routine runs in the context of the
* device receive interrupt handler.
* Returns the number of characters dropped because of overflow.
*/
int
rtems_termios_enqueue_raw_characters (void *ttyp, const char *buf, int len)
1091e1: c6 45 e3 00 movb $0x0,-0x1d(%ebp)
1091e5: 31 ff xor %edi,%edi
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
1091e7: 8d 4b 30 lea 0x30(%ebx),%ecx
1091ea: 89 4d d4 mov %ecx,-0x2c(%ebp)
(tty->rawOutBufState == rob_idle)) {
/* if tx is stopped due to XOFF or out of data */
/* call write function here */
tty->flow_ctrl |= FL_ISNTXOF;
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTOP]), 1);
1091ed: 8d 4b 4a lea 0x4a(%ebx),%ecx
1091f0: 89 4d d0 mov %ecx,-0x30(%ebp)
1091f3: e9 0a 02 00 00 jmp 109402 <rtems_termios_enqueue_raw_characters+0x24b>
bool flow_rcv = false; /* true, if flow control char received */
rtems_interrupt_level level;
if (rtems_termios_linesw[tty->t_line].l_rint != NULL) {
while (len--) {
c = *buf++;
1091f8: 0f be 16 movsbl (%esi),%edx
1091fb: 46 inc %esi
rtems_termios_linesw[tty->t_line].l_rint(c,tty);
1091fc: 57 push %edi
1091fd: 57 push %edi
1091fe: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax
109204: c1 e0 05 shl $0x5,%eax
109207: 53 push %ebx
109208: 52 push %edx
109209: ff 90 d0 df 12 00 call *0x12dfd0(%eax)
10920f: 83 c4 10 add $0x10,%esp
int dropped = 0;
bool flow_rcv = false; /* true, if flow control char received */
rtems_interrupt_level level;
if (rtems_termios_linesw[tty->t_line].l_rint != NULL) {
while (len--) {
109212: 3b 75 dc cmp -0x24(%ebp),%esi
109215: 75 e1 jne 1091f8 <rtems_termios_enqueue_raw_characters+0x41>
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
tty->tty_rcvwakeup = 1;
}
return 0;
109217: 31 ff xor %edi,%edi
}
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
109219: 83 bb e4 00 00 00 00 cmpl $0x0,0xe4(%ebx)
109220: 0f 85 01 02 00 00 jne 109427 <rtems_termios_enqueue_raw_characters+0x270><== NEVER TAKEN
109226: 8b 83 dc 00 00 00 mov 0xdc(%ebx),%eax
10922c: 85 c0 test %eax,%eax
10922e: 0f 84 f3 01 00 00 je 109427 <rtems_termios_enqueue_raw_characters+0x270>
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
109234: 51 push %ecx
109235: 51 push %ecx
109236: ff b3 e0 00 00 00 pushl 0xe0(%ebx)
10923c: 8d 53 30 lea 0x30(%ebx),%edx
10923f: 52 push %edx
109240: ff d0 call *%eax
tty->tty_rcvwakeup = 1;
109242: c7 83 e4 00 00 00 01 movl $0x1,0xe4(%ebx)
109249: 00 00 00
10924c: e9 c8 01 00 00 jmp 109419 <rtems_termios_enqueue_raw_characters+0x262>
}
return 0;
}
while (len--) {
c = *buf++;
109251: 8a 0e mov (%esi),%cl
109253: 88 4d e2 mov %cl,-0x1e(%ebp)
109256: 46 inc %esi
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
109257: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
10925d: f6 c4 02 test $0x2,%ah
109260: 74 3b je 10929d <rtems_termios_enqueue_raw_characters+0xe6>
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
109262: 0f be c1 movsbl %cl,%eax
109265: 0f b6 53 4a movzbl 0x4a(%ebx),%edx
109269: 39 d0 cmp %edx,%eax
if (c == tty->termios.c_cc[VSTART]) {
10926b: 0f b6 53 49 movzbl 0x49(%ebx),%edx
c = *buf++;
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
10926f: 75 1d jne 10928e <rtems_termios_enqueue_raw_characters+0xd7>
if (c == tty->termios.c_cc[VSTART]) {
109271: 39 d0 cmp %edx,%eax
/* received VSTOP and VSTART==VSTOP? */
/* then toggle "stop output" status */
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
109273: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
if (c == tty->termios.c_cc[VSTART]) {
109279: 75 05 jne 109280 <rtems_termios_enqueue_raw_characters+0xc9><== ALWAYS TAKEN
/* received VSTOP and VSTART==VSTOP? */
/* then toggle "stop output" status */
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
10927b: 83 f0 10 xor $0x10,%eax <== NOT EXECUTED
10927e: eb 03 jmp 109283 <rtems_termios_enqueue_raw_characters+0xcc><== NOT EXECUTED
}
else {
/* VSTOP received (other code than VSTART) */
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
109280: 83 c8 10 or $0x10,%eax
109283: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx)
109289: e9 90 01 00 00 jmp 10941e <rtems_termios_enqueue_raw_characters+0x267>
}
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
10928e: 39 d0 cmp %edx,%eax
109290: 75 0b jne 10929d <rtems_termios_enqueue_raw_characters+0xe6><== ALWAYS TAKEN
/* VSTART received */
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
109292: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
109298: 83 e0 ef and $0xffffffef,%eax <== NOT EXECUTED
10929b: eb e6 jmp 109283 <rtems_termios_enqueue_raw_characters+0xcc><== NOT EXECUTED
flow_rcv = true;
}
}
if (flow_rcv) {
10929d: 80 7d e3 00 cmpb $0x0,-0x1d(%ebp)
1092a1: 74 51 je 1092f4 <rtems_termios_enqueue_raw_characters+0x13d><== ALWAYS TAKEN
/* restart output according to FL_ORCVXOF flag */
if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) {
1092a3: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
1092a9: 83 e0 30 and $0x30,%eax
1092ac: 83 f8 20 cmp $0x20,%eax
1092af: 0f 85 4d 01 00 00 jne 109402 <rtems_termios_enqueue_raw_characters+0x24b><== ALWAYS TAKEN
/* disable interrupts */
rtems_interrupt_disable(level);
1092b5: 9c pushf <== NOT EXECUTED
1092b6: fa cli <== NOT EXECUTED
1092b7: 8f 45 e4 popl -0x1c(%ebp) <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
1092ba: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
1092c0: 83 e0 df and $0xffffffdf,%eax <== NOT EXECUTED
1092c3: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
1092c9: 83 bb 94 00 00 00 00 cmpl $0x0,0x94(%ebx) <== NOT EXECUTED
1092d0: 74 19 je 1092eb <rtems_termios_enqueue_raw_characters+0x134><== NOT EXECUTED
/* if chars available, call write function... */
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1);
1092d2: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax <== NOT EXECUTED
rtems_interrupt_disable(level);
tty->flow_ctrl &= ~FL_OSTOP;
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
/* if chars available, call write function... */
(*tty->device.write)(
1092d8: 52 push %edx <== NOT EXECUTED
1092d9: 6a 01 push $0x1 <== NOT EXECUTED
1092db: 03 43 7c add 0x7c(%ebx),%eax <== NOT EXECUTED
1092de: 50 push %eax <== NOT EXECUTED
1092df: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
1092e2: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED
1092e8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1);
}
/* reenable interrupts */
rtems_interrupt_enable(level);
1092eb: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
1092ee: 9d popf <== NOT EXECUTED
1092ef: e9 0e 01 00 00 jmp 109402 <rtems_termios_enqueue_raw_characters+0x24b><== NOT EXECUTED
}
} else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
1092f4: 8b 43 60 mov 0x60(%ebx),%eax
1092f7: 8b 4b 64 mov 0x64(%ebx),%ecx
1092fa: 40 inc %eax
1092fb: 31 d2 xor %edx,%edx
1092fd: f7 f1 div %ecx
1092ff: 89 55 e4 mov %edx,-0x1c(%ebp)
/* if chars_in_buffer > highwater */
rtems_interrupt_disable(level);
109302: 9c pushf
109303: fa cli
109304: 8f 45 d8 popl -0x28(%ebp)
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
109307: 8b 53 5c mov 0x5c(%ebx),%edx
10930a: 8b 43 64 mov 0x64(%ebx),%eax
% tty->rawInBuf.Size) > tty->highwater) &&
10930d: 8b 4b 64 mov 0x64(%ebx),%ecx
}
} else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
/* if chars_in_buffer > highwater */
rtems_interrupt_disable(level);
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
109310: 29 d0 sub %edx,%eax
109312: 03 45 e4 add -0x1c(%ebp),%eax
% tty->rawInBuf.Size) > tty->highwater) &&
109315: 31 d2 xor %edx,%edx
109317: f7 f1 div %ecx
}
} else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
/* if chars_in_buffer > highwater */
rtems_interrupt_disable(level);
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
109319: 3b 93 c0 00 00 00 cmp 0xc0(%ebx),%edx
10931f: 0f 86 92 00 00 00 jbe 1093b7 <rtems_termios_enqueue_raw_characters+0x200><== ALWAYS TAKEN
% tty->rawInBuf.Size) > tty->highwater) &&
!(tty->flow_ctrl & FL_IREQXOF)) {
109325: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
} else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
/* if chars_in_buffer > highwater */
rtems_interrupt_disable(level);
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
% tty->rawInBuf.Size) > tty->highwater) &&
10932b: a8 01 test $0x1,%al <== NOT EXECUTED
10932d: 0f 85 84 00 00 00 jne 1093b7 <rtems_termios_enqueue_raw_characters+0x200><== NOT EXECUTED
!(tty->flow_ctrl & FL_IREQXOF)) {
/* incoming data stream should be stopped */
tty->flow_ctrl |= FL_IREQXOF;
109333: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
109339: 83 c8 01 or $0x1,%eax <== NOT EXECUTED
10933c: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF))
109342: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
109348: 25 02 04 00 00 and $0x402,%eax <== NOT EXECUTED
10934d: 3d 00 04 00 00 cmp $0x400,%eax <== NOT EXECUTED
== (FL_MDXOF ) ) {
if ((tty->flow_ctrl & FL_OSTOP) ||
109352: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
% tty->rawInBuf.Size) > tty->highwater) &&
!(tty->flow_ctrl & FL_IREQXOF)) {
/* incoming data stream should be stopped */
tty->flow_ctrl |= FL_IREQXOF;
if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF))
109358: 75 2d jne 109387 <rtems_termios_enqueue_raw_characters+0x1d0><== NOT EXECUTED
== (FL_MDXOF ) ) {
if ((tty->flow_ctrl & FL_OSTOP) ||
10935a: a8 20 test $0x20,%al <== NOT EXECUTED
10935c: 75 09 jne 109367 <rtems_termios_enqueue_raw_characters+0x1b0><== NOT EXECUTED
10935e: 83 bb 94 00 00 00 00 cmpl $0x0,0x94(%ebx) <== NOT EXECUTED
109365: 75 50 jne 1093b7 <rtems_termios_enqueue_raw_characters+0x200><== NOT EXECUTED
(tty->rawOutBufState == rob_idle)) {
/* if tx is stopped due to XOFF or out of data */
/* call write function here */
tty->flow_ctrl |= FL_ISNTXOF;
109367: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10936d: 83 c8 02 or $0x2,%eax <== NOT EXECUTED
109370: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
(*tty->device.write)(tty->minor,
109376: 51 push %ecx <== NOT EXECUTED
109377: 6a 01 push $0x1 <== NOT EXECUTED
109379: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED
10937c: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
10937f: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED
109385: eb 2d jmp 1093b4 <rtems_termios_enqueue_raw_characters+0x1fd><== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTOP]), 1);
}
} else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS) ) {
109387: 25 04 01 00 00 and $0x104,%eax <== NOT EXECUTED
10938c: 3d 00 01 00 00 cmp $0x100,%eax <== NOT EXECUTED
109391: 75 24 jne 1093b7 <rtems_termios_enqueue_raw_characters+0x200><== NOT EXECUTED
tty->flow_ctrl |= FL_IRTSOFF;
109393: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
109399: 83 c8 04 or $0x4,%eax <== NOT EXECUTED
10939c: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
/* deactivate RTS line */
if (tty->device.stopRemoteTx != NULL) {
1093a2: 8b 83 ac 00 00 00 mov 0xac(%ebx),%eax <== NOT EXECUTED
1093a8: 85 c0 test %eax,%eax <== NOT EXECUTED
1093aa: 74 0b je 1093b7 <rtems_termios_enqueue_raw_characters+0x200><== NOT EXECUTED
tty->device.stopRemoteTx(tty->minor);
1093ac: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1093af: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
1093b2: ff d0 call *%eax <== NOT EXECUTED
1093b4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
}
}
/* reenable interrupts */
rtems_interrupt_enable(level);
1093b7: ff 75 d8 pushl -0x28(%ebp)
1093ba: 9d popf
if (newTail == tty->rawInBuf.Head) {
1093bb: 8b 43 5c mov 0x5c(%ebx),%eax
1093be: 39 45 e4 cmp %eax,-0x1c(%ebp)
1093c1: 75 03 jne 1093c6 <rtems_termios_enqueue_raw_characters+0x20f><== ALWAYS TAKEN
dropped++;
1093c3: 47 inc %edi <== NOT EXECUTED
1093c4: eb 3c jmp 109402 <rtems_termios_enqueue_raw_characters+0x24b><== NOT EXECUTED
} else {
tty->rawInBuf.theBuf[newTail] = c;
1093c6: 8b 43 58 mov 0x58(%ebx),%eax
1093c9: 8a 4d e2 mov -0x1e(%ebp),%cl
1093cc: 8b 55 e4 mov -0x1c(%ebp),%edx
1093cf: 88 0c 10 mov %cl,(%eax,%edx,1)
tty->rawInBuf.Tail = newTail;
1093d2: 89 53 60 mov %edx,0x60(%ebx)
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
1093d5: 83 bb e4 00 00 00 00 cmpl $0x0,0xe4(%ebx)
1093dc: 75 24 jne 109402 <rtems_termios_enqueue_raw_characters+0x24b><== NEVER TAKEN
1093de: 8b 83 dc 00 00 00 mov 0xdc(%ebx),%eax
1093e4: 85 c0 test %eax,%eax
1093e6: 74 1a je 109402 <rtems_termios_enqueue_raw_characters+0x24b><== ALWAYS TAKEN
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
1093e8: 52 push %edx <== NOT EXECUTED
1093e9: 52 push %edx <== NOT EXECUTED
1093ea: ff b3 e0 00 00 00 pushl 0xe0(%ebx) <== NOT EXECUTED
1093f0: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED
1093f3: ff d0 call *%eax <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
1093f5: c7 83 e4 00 00 00 01 movl $0x1,0xe4(%ebx) <== NOT EXECUTED
1093fc: 00 00 00
1093ff: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
}
return 0;
}
while (len--) {
109402: 3b 75 dc cmp -0x24(%ebp),%esi
109405: 0f 85 46 fe ff ff jne 109251 <rtems_termios_enqueue_raw_characters+0x9a>
}
}
}
}
tty->rawInBufDropped += dropped;
10940b: 01 7b 78 add %edi,0x78(%ebx)
rtems_semaphore_release (tty->rawInBuf.Semaphore);
10940e: 83 ec 0c sub $0xc,%esp
109411: ff 73 68 pushl 0x68(%ebx)
109414: e8 67 0a 00 00 call 109e80 <rtems_semaphore_release>
return dropped;
109419: 83 c4 10 add $0x10,%esp
10941c: eb 09 jmp 109427 <rtems_termios_enqueue_raw_characters+0x270>
* device receive interrupt handler.
* Returns the number of characters dropped because of overflow.
*/
int
rtems_termios_enqueue_raw_characters (void *ttyp, const char *buf, int len)
{
10941e: c6 45 e3 01 movb $0x1,-0x1d(%ebp)
109422: e9 7c fe ff ff jmp 1092a3 <rtems_termios_enqueue_raw_characters+0xec>
}
tty->rawInBufDropped += dropped;
rtems_semaphore_release (tty->rawInBuf.Semaphore);
return dropped;
}
109427: 89 f8 mov %edi,%eax
109429: 8d 65 f4 lea -0xc(%ebp),%esp
10942c: 5b pop %ebx
10942d: 5e pop %esi
10942e: 5f pop %edi
10942f: 5d pop %ebp
109430: c3 ret
00108590 <rtems_termios_ioctl>:
}
}
rtems_status_code
rtems_termios_ioctl (void *arg)
{
108590: 55 push %ebp
108591: 89 e5 mov %esp,%ebp
108593: 57 push %edi
108594: 56 push %esi
108595: 53 push %ebx
108596: 83 ec 20 sub $0x20,%esp
108599: 8b 75 08 mov 0x8(%ebp),%esi
rtems_libio_ioctl_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
10859c: 8b 06 mov (%esi),%eax
10859e: 8b 58 2c mov 0x2c(%eax),%ebx
struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer;
1085a1: 8b 7e 08 mov 0x8(%esi),%edi
rtems_status_code sc;
args->ioctl_return = 0;
1085a4: c7 46 0c 00 00 00 00 movl $0x0,0xc(%esi)
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
1085ab: 6a 00 push $0x0
1085ad: 6a 00 push $0x0
1085af: ff 73 18 pushl 0x18(%ebx)
1085b2: e8 d9 17 00 00 call 109d90 <rtems_semaphore_obtain>
1085b7: 89 45 e4 mov %eax,-0x1c(%ebp)
if (sc != RTEMS_SUCCESSFUL) {
1085ba: 83 c4 10 add $0x10,%esp
1085bd: 85 c0 test %eax,%eax
1085bf: 0f 85 f5 02 00 00 jne 1088ba <rtems_termios_ioctl+0x32a><== NEVER TAKEN
return sc;
}
switch (args->command) {
1085c5: 8b 46 04 mov 0x4(%esi),%eax
1085c8: 83 f8 04 cmp $0x4,%eax
1085cb: 0f 84 55 02 00 00 je 108826 <rtems_termios_ioctl+0x296>
1085d1: 77 10 ja 1085e3 <rtems_termios_ioctl+0x53>
1085d3: 83 f8 02 cmp $0x2,%eax
1085d6: 74 71 je 108649 <rtems_termios_ioctl+0xb9>
1085d8: 0f 87 19 02 00 00 ja 1087f7 <rtems_termios_ioctl+0x267>
1085de: 48 dec %eax
1085df: 75 35 jne 108616 <rtems_termios_ioctl+0x86><== NEVER TAKEN
1085e1: eb 52 jmp 108635 <rtems_termios_ioctl+0xa5>
1085e3: 3d 7f 66 04 40 cmp $0x4004667f,%eax
1085e8: 0f 84 9b 02 00 00 je 108889 <rtems_termios_ioctl+0x2f9><== NEVER TAKEN
1085ee: 77 0a ja 1085fa <rtems_termios_ioctl+0x6a>
1085f0: 83 f8 05 cmp $0x5,%eax
1085f3: 75 21 jne 108616 <rtems_termios_ioctl+0x86>
1085f5: e9 16 02 00 00 jmp 108810 <rtems_termios_ioctl+0x280>
1085fa: 3d 1a 74 04 40 cmp $0x4004741a,%eax
1085ff: 8b 93 cc 00 00 00 mov 0xcc(%ebx),%edx
108605: 0f 84 77 02 00 00 je 108882 <rtems_termios_ioctl+0x2f2>
10860b: 3d 1b 74 04 80 cmp $0x8004741b,%eax
108610: 0f 84 23 02 00 00 je 108839 <rtems_termios_ioctl+0x2a9><== ALWAYS TAKEN
default:
if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
108616: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax
10861c: c1 e0 05 shl $0x5,%eax
10861f: 8b 80 d8 df 12 00 mov 0x12dfd8(%eax),%eax
108625: 85 c0 test %eax,%eax
108627: 0f 84 78 02 00 00 je 1088a5 <rtems_termios_ioctl+0x315><== NEVER TAKEN
sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args);
10862d: 57 push %edi
10862e: 57 push %edi
10862f: 56 push %esi
108630: e9 42 02 00 00 jmp 108877 <rtems_termios_ioctl+0x2e7>
sc = RTEMS_INVALID_NUMBER;
}
break;
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
108635: 8b 46 08 mov 0x8(%esi),%eax
108638: 8d 73 30 lea 0x30(%ebx),%esi
10863b: b9 09 00 00 00 mov $0x9,%ecx
108640: 89 c7 mov %eax,%edi
108642: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
break;
108644: e9 63 02 00 00 jmp 1088ac <rtems_termios_ioctl+0x31c>
case RTEMS_IO_SET_ATTRIBUTES:
tty->termios = *(struct termios *)args->buffer;
108649: 8b 76 08 mov 0x8(%esi),%esi
10864c: 8d 7b 30 lea 0x30(%ebx),%edi
10864f: b9 09 00 00 00 mov $0x9,%ecx
108654: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/*
* check for flow control options to be switched off
*/
/* check for outgoing XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXON) &&
108656: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
10865c: f6 c4 02 test $0x2,%ah
10865f: 74 57 je 1086b8 <rtems_termios_ioctl+0x128>
108661: f6 43 31 04 testb $0x4,0x31(%ebx)
108665: 75 51 jne 1086b8 <rtems_termios_ioctl+0x128>
!(tty->termios.c_iflag & IXON)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF);
108667: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
10866d: 25 ef fd ff ff and $0xfffffdef,%eax
108672: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx)
/* has output been stopped due to received XOFF? */
if (tty->flow_ctrl & FL_OSTOP) {
108678: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
10867e: a8 20 test $0x20,%al
108680: 74 36 je 1086b8 <rtems_termios_ioctl+0x128><== ALWAYS TAKEN
/* disable interrupts */
rtems_interrupt_disable(level);
108682: 9c pushf <== NOT EXECUTED
108683: fa cli <== NOT EXECUTED
108684: 5e pop %esi <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
108685: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10868b: 83 e0 df and $0xffffffdf,%eax <== NOT EXECUTED
10868e: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
108694: 83 bb 94 00 00 00 00 cmpl $0x0,0x94(%ebx) <== NOT EXECUTED
10869b: 74 19 je 1086b6 <rtems_termios_ioctl+0x126><== NOT EXECUTED
/* if chars available, call write function... */
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
10869d: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax <== NOT EXECUTED
rtems_interrupt_disable(level);
tty->flow_ctrl &= ~FL_OSTOP;
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
/* if chars available, call write function... */
(*tty->device.write)(
1086a3: 51 push %ecx <== NOT EXECUTED
1086a4: 6a 01 push $0x1 <== NOT EXECUTED
1086a6: 03 43 7c add 0x7c(%ebx),%eax <== NOT EXECUTED
1086a9: 50 push %eax <== NOT EXECUTED
1086aa: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
1086ad: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED
1086b3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
}
/* reenable interrupts */
rtems_interrupt_enable(level);
1086b6: 56 push %esi <== NOT EXECUTED
1086b7: 9d popf <== NOT EXECUTED
}
}
/* check for incoming XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXOF) && !(tty->termios.c_iflag & IXOFF)) {
1086b8: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
1086be: f6 c4 04 test $0x4,%ah
1086c1: 74 24 je 1086e7 <rtems_termios_ioctl+0x157>
1086c3: f6 43 31 10 testb $0x10,0x31(%ebx)
1086c7: 75 1e jne 1086e7 <rtems_termios_ioctl+0x157><== NEVER TAKEN
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXOF);
1086c9: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
1086cf: 80 e4 fb and $0xfb,%ah
1086d2: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx)
/* FIXME: what happens, if we had sent XOFF but not yet XON? */
tty->flow_ctrl &= ~(FL_ISNTXOF);
1086d8: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
1086de: 83 e0 fd and $0xfffffffd,%eax
1086e1: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx)
}
/* check for incoming RTS/CTS flow control switched off */
if (( tty->flow_ctrl & FL_MDRTS) && !(tty->termios.c_cflag & CRTSCTS)) {
1086e7: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
1086ed: f6 c4 01 test $0x1,%ah
1086f0: 74 43 je 108735 <rtems_termios_ioctl+0x1a5><== ALWAYS TAKEN
1086f2: 83 7b 38 00 cmpl $0x0,0x38(%ebx) <== NOT EXECUTED
1086f6: 78 3d js 108735 <rtems_termios_ioctl+0x1a5><== NOT EXECUTED
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDRTS);
1086f8: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
1086fe: 80 e4 fe and $0xfe,%ah <== NOT EXECUTED
108701: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
/* restart remote Tx, if it was stopped */
if ((tty->flow_ctrl & FL_IRTSOFF) && (tty->device.startRemoteTx != NULL)) {
108707: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10870d: a8 04 test $0x4,%al <== NOT EXECUTED
10870f: 74 15 je 108726 <rtems_termios_ioctl+0x196><== NOT EXECUTED
108711: 8b 83 b0 00 00 00 mov 0xb0(%ebx),%eax <== NOT EXECUTED
108717: 85 c0 test %eax,%eax <== NOT EXECUTED
108719: 74 0b je 108726 <rtems_termios_ioctl+0x196><== NOT EXECUTED
tty->device.startRemoteTx(tty->minor);
10871b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10871e: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
108721: ff d0 call *%eax <== NOT EXECUTED
108723: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
tty->flow_ctrl &= ~(FL_IRTSOFF);
108726: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10872c: 83 e0 fb and $0xfffffffb,%eax <== NOT EXECUTED
10872f: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
/*
* check for flow control options to be switched on
*/
/* check for incoming RTS/CTS flow control switched on */
if (tty->termios.c_cflag & CRTSCTS) {
108735: 83 7b 38 00 cmpl $0x0,0x38(%ebx)
108739: 79 0f jns 10874a <rtems_termios_ioctl+0x1ba><== ALWAYS TAKEN
tty->flow_ctrl |= FL_MDRTS;
10873b: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
108741: 80 cc 01 or $0x1,%ah <== NOT EXECUTED
108744: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
}
/* check for incoming XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXOFF) {
10874a: 8b 53 30 mov 0x30(%ebx),%edx
10874d: f6 c6 10 test $0x10,%dh
108750: 74 0f je 108761 <rtems_termios_ioctl+0x1d1>
tty->flow_ctrl |= FL_MDXOF;
108752: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
108758: 80 cc 04 or $0x4,%ah
10875b: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx)
}
/* check for outgoing XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXON) {
108761: 80 e6 04 and $0x4,%dh
108764: 74 0f je 108775 <rtems_termios_ioctl+0x1e5>
tty->flow_ctrl |= FL_MDXON;
108766: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
10876c: 80 cc 02 or $0x2,%ah
10876f: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx)
tty->termios = *(struct termios *)args->buffer;
/* check for and process change in flow control options */
termios_set_flowctrl(tty);
if (tty->termios.c_lflag & ICANON) {
108775: f6 43 3c 02 testb $0x2,0x3c(%ebx)
108779: 74 02 je 10877d <rtems_termios_ioctl+0x1ed>
10877b: eb 3b jmp 1087b8 <rtems_termios_ioctl+0x228>
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
10877d: 0f b6 73 46 movzbl 0x46(%ebx),%esi
rtems_clock_get_ticks_per_second() / 10;
108781: e8 5e 10 00 00 call 1097e4 <rtems_clock_get_ticks_per_second>
if (tty->termios.c_lflag & ICANON) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
108786: 0f af c6 imul %esi,%eax
rtems_clock_get_ticks_per_second() / 10;
108789: b9 0a 00 00 00 mov $0xa,%ecx
10878e: 31 d2 xor %edx,%edx
108790: f7 f1 div %ecx
if (tty->termios.c_lflag & ICANON) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
108792: 89 43 54 mov %eax,0x54(%ebx)
rtems_clock_get_ticks_per_second() / 10;
if (tty->termios.c_cc[VTIME]) {
108795: 80 7b 46 00 cmpb $0x0,0x46(%ebx)
108799: 74 17 je 1087b2 <rtems_termios_ioctl+0x222>
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
10879b: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx)
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
1087a2: 89 43 70 mov %eax,0x70(%ebx)
if (tty->termios.c_cc[VMIN])
1087a5: 80 7b 47 00 cmpb $0x0,0x47(%ebx)
1087a9: 74 02 je 1087ad <rtems_termios_ioctl+0x21d>
1087ab: eb 19 jmp 1087c6 <rtems_termios_ioctl+0x236>
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
1087ad: 89 43 74 mov %eax,0x74(%ebx)
1087b0: eb 24 jmp 1087d6 <rtems_termios_ioctl+0x246>
} else {
if (tty->termios.c_cc[VMIN]) {
1087b2: 80 7b 47 00 cmpb $0x0,0x47(%ebx)
1087b6: 74 17 je 1087cf <rtems_termios_ioctl+0x23f><== ALWAYS TAKEN
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
1087b8: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx)
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
1087bf: c7 43 70 00 00 00 00 movl $0x0,0x70(%ebx)
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
1087c6: c7 43 74 00 00 00 00 movl $0x0,0x74(%ebx)
1087cd: eb 07 jmp 1087d6 <rtems_termios_ioctl+0x246>
} else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
1087cf: c7 43 6c 01 00 00 00 movl $0x1,0x6c(%ebx)
}
}
}
if (tty->device.setAttributes)
1087d6: 8b 83 a8 00 00 00 mov 0xa8(%ebx),%eax
1087dc: 85 c0 test %eax,%eax
1087de: 0f 84 c8 00 00 00 je 1088ac <rtems_termios_ioctl+0x31c><== NEVER TAKEN
(*tty->device.setAttributes)(tty->minor, &tty->termios);
1087e4: 52 push %edx
1087e5: 52 push %edx
1087e6: 8d 53 30 lea 0x30(%ebx),%edx
1087e9: 52 push %edx
1087ea: ff 73 10 pushl 0x10(%ebx)
1087ed: ff d0 call *%eax
1087ef: 83 c4 10 add $0x10,%esp
1087f2: e9 b5 00 00 00 jmp 1088ac <rtems_termios_ioctl+0x31c>
drainOutput (struct rtems_termios_tty *tty)
{
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
1087f7: 83 bb b4 00 00 00 00 cmpl $0x0,0xb4(%ebx)
1087fe: 0f 84 a8 00 00 00 je 1088ac <rtems_termios_ioctl+0x31c>
108804: 89 d8 mov %ebx,%eax
108806: e8 9b f7 ff ff call 107fa6 <drainOutput.part.0>
10880b: e9 9c 00 00 00 jmp 1088ac <rtems_termios_ioctl+0x31c>
case RTEMS_IO_TCDRAIN:
drainOutput (tty);
break;
case RTEMS_IO_SNDWAKEUP:
tty->tty_snd = *wakeup;
108810: 8b 07 mov (%edi),%eax
108812: 8b 57 04 mov 0x4(%edi),%edx
108815: 89 83 d4 00 00 00 mov %eax,0xd4(%ebx)
10881b: 89 93 d8 00 00 00 mov %edx,0xd8(%ebx)
break;
108821: e9 86 00 00 00 jmp 1088ac <rtems_termios_ioctl+0x31c>
case RTEMS_IO_RCVWAKEUP:
tty->tty_rcv = *wakeup;
108826: 8b 07 mov (%edi),%eax
108828: 8b 57 04 mov 0x4(%edi),%edx
10882b: 89 83 dc 00 00 00 mov %eax,0xdc(%ebx)
108831: 89 93 e0 00 00 00 mov %edx,0xe0(%ebx)
break;
108837: eb 73 jmp 1088ac <rtems_termios_ioctl+0x31c>
#if 1 /* FIXME */
case TIOCSETD:
/*
* close old line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
108839: c1 e2 05 shl $0x5,%edx
10883c: 8b 82 c4 df 12 00 mov 0x12dfc4(%edx),%eax
108842: 85 c0 test %eax,%eax
108844: 74 0c je 108852 <rtems_termios_ioctl+0x2c2>
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
108846: 83 ec 0c sub $0xc,%esp
108849: 53 push %ebx
10884a: ff d0 call *%eax
10884c: 89 45 e4 mov %eax,-0x1c(%ebp)
10884f: 83 c4 10 add $0x10,%esp
}
tty->t_line=*(int*)(args->buffer);
108852: 8b 46 08 mov 0x8(%esi),%eax
108855: 8b 00 mov (%eax),%eax
108857: 89 83 cc 00 00 00 mov %eax,0xcc(%ebx)
tty->t_sc = NULL; /* ensure that no more valid data */
10885d: c7 83 d0 00 00 00 00 movl $0x0,0xd0(%ebx)
108864: 00 00 00
/*
* open new line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
108867: c1 e0 05 shl $0x5,%eax
10886a: 8b 80 c0 df 12 00 mov 0x12dfc0(%eax),%eax
108870: 85 c0 test %eax,%eax
108872: 74 38 je 1088ac <rtems_termios_ioctl+0x31c>
sc = rtems_termios_linesw[tty->t_line].l_open(tty);
108874: 83 ec 0c sub $0xc,%esp
108877: 53 push %ebx
108878: ff d0 call *%eax
10887a: 89 45 e4 mov %eax,-0x1c(%ebp)
10887d: e9 6d ff ff ff jmp 1087ef <rtems_termios_ioctl+0x25f>
}
break;
case TIOCGETD:
*(int*)(args->buffer)=tty->t_line;
108882: 8b 46 08 mov 0x8(%esi),%eax
108885: 89 10 mov %edx,(%eax)
break;
108887: eb 23 jmp 1088ac <rtems_termios_ioctl+0x31c>
#endif
case FIONREAD: {
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
108889: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED
10888c: 8b 53 5c mov 0x5c(%ebx),%edx <== NOT EXECUTED
if ( rawnc < 0 )
10888f: 29 d0 sub %edx,%eax <== NOT EXECUTED
108891: 79 05 jns 108898 <rtems_termios_ioctl+0x308><== NOT EXECUTED
rawnc += tty->rawInBuf.Size;
108893: 8b 53 64 mov 0x64(%ebx),%edx <== NOT EXECUTED
108896: 01 d0 add %edx,%eax <== NOT EXECUTED
/* Half guess that this is the right operation */
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
108898: 8b 56 08 mov 0x8(%esi),%edx <== NOT EXECUTED
10889b: 03 43 20 add 0x20(%ebx),%eax <== NOT EXECUTED
10889e: 2b 43 24 sub 0x24(%ebx),%eax <== NOT EXECUTED
1088a1: 89 02 mov %eax,(%edx) <== NOT EXECUTED
}
break;
1088a3: eb 07 jmp 1088ac <rtems_termios_ioctl+0x31c><== NOT EXECUTED
default:
if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args);
}
else {
sc = RTEMS_INVALID_NUMBER;
1088a5: c7 45 e4 0a 00 00 00 movl $0xa,-0x1c(%ebp) <== NOT EXECUTED
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
}
break;
}
rtems_semaphore_release (tty->osem);
1088ac: 83 ec 0c sub $0xc,%esp
1088af: ff 73 18 pushl 0x18(%ebx)
1088b2: e8 c9 15 00 00 call 109e80 <rtems_semaphore_release>
return sc;
1088b7: 83 c4 10 add $0x10,%esp
}
1088ba: 8b 45 e4 mov -0x1c(%ebp),%eax
1088bd: 8d 65 f4 lea -0xc(%ebp),%esp
1088c0: 5b pop %ebx
1088c1: 5e pop %esi
1088c2: 5f pop %edi
1088c3: 5d pop %ebp
1088c4: c3 ret
00107ff5 <rtems_termios_open>:
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
107ff5: 55 push %ebp
107ff6: 89 e5 mov %esp,%ebp
107ff8: 57 push %edi
107ff9: 56 push %esi
107ffa: 53 push %ebx
107ffb: 83 ec 20 sub $0x20,%esp
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain(
107ffe: 6a 00 push $0x0
108000: 6a 00 push $0x0
108002: ff 35 14 e3 12 00 pushl 0x12e314
108008: e8 83 1d 00 00 call 109d90 <rtems_semaphore_obtain>
10800d: 89 45 e4 mov %eax,-0x1c(%ebp)
rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
108010: 83 c4 10 add $0x10,%esp
108013: 85 c0 test %eax,%eax
108015: 0f 85 b7 03 00 00 jne 1083d2 <rtems_termios_open+0x3dd><== NEVER TAKEN
return sc;
for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) {
10801b: 8b 35 1c e3 12 00 mov 0x12e31c,%esi
108021: 89 f3 mov %esi,%ebx
108023: eb 16 jmp 10803b <rtems_termios_open+0x46>
if ((tty->major == major) && (tty->minor == minor))
108025: 8b 55 08 mov 0x8(%ebp),%edx
108028: 39 53 0c cmp %edx,0xc(%ebx)
10802b: 75 0c jne 108039 <rtems_termios_open+0x44>
10802d: 8b 55 0c mov 0xc(%ebp),%edx
108030: 39 53 10 cmp %edx,0x10(%ebx)
108033: 0f 84 f2 02 00 00 je 10832b <rtems_termios_open+0x336>
sc = rtems_semaphore_obtain(
rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
return sc;
for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) {
108039: 8b 1b mov (%ebx),%ebx
10803b: 85 db test %ebx,%ebx
10803d: 75 e6 jne 108025 <rtems_termios_open+0x30>
10803f: e9 6e 03 00 00 jmp 1083b2 <rtems_termios_open+0x3bd>
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
if (tty == NULL) {
rtems_semaphore_release (rtems_termios_ttyMutex);
108044: 83 ec 0c sub $0xc,%esp
108047: e9 84 00 00 00 jmp 1080d0 <rtems_termios_open+0xdb>
return RTEMS_NO_MEMORY;
}
/*
* allocate raw input buffer
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
10804c: a1 04 c1 12 00 mov 0x12c104,%eax
108051: 89 43 64 mov %eax,0x64(%ebx)
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
108054: 8b 43 64 mov 0x64(%ebx),%eax
108057: 83 ec 0c sub $0xc,%esp
10805a: 50 push %eax
10805b: e8 94 e9 ff ff call 1069f4 <malloc>
108060: 89 c7 mov %eax,%edi
108062: 89 43 58 mov %eax,0x58(%ebx)
if (tty->rawInBuf.theBuf == NULL) {
108065: 83 c4 10 add $0x10,%esp
108068: 85 c0 test %eax,%eax
10806a: 75 05 jne 108071 <rtems_termios_open+0x7c>
free(tty);
10806c: 83 ec 0c sub $0xc,%esp
10806f: eb 58 jmp 1080c9 <rtems_termios_open+0xd4>
return RTEMS_NO_MEMORY;
}
/*
* allocate raw output buffer
*/
tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
108071: a1 08 c1 12 00 mov 0x12c108,%eax
108076: 89 83 88 00 00 00 mov %eax,0x88(%ebx)
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
10807c: 8b 83 88 00 00 00 mov 0x88(%ebx),%eax
108082: 83 ec 0c sub $0xc,%esp
108085: 50 push %eax
108086: e8 69 e9 ff ff call 1069f4 <malloc>
10808b: 89 43 7c mov %eax,0x7c(%ebx)
if (tty->rawOutBuf.theBuf == NULL) {
10808e: 83 c4 10 add $0x10,%esp
108091: 85 c0 test %eax,%eax
108093: 75 05 jne 10809a <rtems_termios_open+0xa5>
free((void *)(tty->rawInBuf.theBuf));
108095: 83 ec 0c sub $0xc,%esp
108098: eb 28 jmp 1080c2 <rtems_termios_open+0xcd>
return RTEMS_NO_MEMORY;
}
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
10809a: 83 ec 0c sub $0xc,%esp
10809d: ff 35 0c c1 12 00 pushl 0x12c10c
1080a3: 89 45 e0 mov %eax,-0x20(%ebp)
1080a6: e8 49 e9 ff ff call 1069f4 <malloc>
1080ab: 89 43 1c mov %eax,0x1c(%ebx)
if (tty->cbuf == NULL) {
1080ae: 83 c4 10 add $0x10,%esp
1080b1: 85 c0 test %eax,%eax
1080b3: 8b 55 e0 mov -0x20(%ebp),%edx
1080b6: 75 32 jne 1080ea <rtems_termios_open+0xf5>
free((void *)(tty->rawOutBuf.theBuf));
1080b8: 83 ec 0c sub $0xc,%esp
1080bb: 52 push %edx
1080bc: e8 73 e6 ff ff call 106734 <free>
free((void *)(tty->rawInBuf.theBuf));
1080c1: 58 pop %eax
1080c2: 57 push %edi
1080c3: e8 6c e6 ff ff call 106734 <free>
free(tty);
1080c8: 58 pop %eax
1080c9: 53 push %ebx
1080ca: e8 65 e6 ff ff call 106734 <free>
rtems_semaphore_release (rtems_termios_ttyMutex);
1080cf: 5f pop %edi
1080d0: ff 35 14 e3 12 00 pushl 0x12e314
1080d6: e8 a5 1d 00 00 call 109e80 <rtems_semaphore_release>
return RTEMS_NO_MEMORY;
1080db: 83 c4 10 add $0x10,%esp
1080de: c7 45 e4 1a 00 00 00 movl $0x1a,-0x1c(%ebp)
1080e5: e9 e8 02 00 00 jmp 1083d2 <rtems_termios_open+0x3dd>
}
/*
* Initialize wakeup callbacks
*/
tty->tty_snd.sw_pfn = NULL;
1080ea: c7 83 d4 00 00 00 00 movl $0x0,0xd4(%ebx)
1080f1: 00 00 00
tty->tty_snd.sw_arg = NULL;
1080f4: c7 83 d8 00 00 00 00 movl $0x0,0xd8(%ebx)
1080fb: 00 00 00
tty->tty_rcv.sw_pfn = NULL;
1080fe: c7 83 dc 00 00 00 00 movl $0x0,0xdc(%ebx)
108105: 00 00 00
tty->tty_rcv.sw_arg = NULL;
108108: c7 83 e0 00 00 00 00 movl $0x0,0xe0(%ebx)
10810f: 00 00 00
tty->tty_rcvwakeup = 0;
108112: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx)
108119: 00 00 00
/*
* link tty
*/
tty->forw = rtems_termios_ttyHead;
10811c: 89 33 mov %esi,(%ebx)
tty->back = NULL;
10811e: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx)
if (rtems_termios_ttyHead != NULL)
108125: 85 f6 test %esi,%esi
108127: 74 03 je 10812c <rtems_termios_open+0x137>
rtems_termios_ttyHead->back = tty;
108129: 89 5e 04 mov %ebx,0x4(%esi)
rtems_termios_ttyHead = tty;
10812c: 89 1d 1c e3 12 00 mov %ebx,0x12e31c
if (rtems_termios_ttyTail == NULL)
108132: 83 3d 18 e3 12 00 00 cmpl $0x0,0x12e318
108139: 75 06 jne 108141 <rtems_termios_open+0x14c>
rtems_termios_ttyTail = tty;
10813b: 89 1d 18 e3 12 00 mov %ebx,0x12e318
tty->minor = minor;
108141: 8b 55 0c mov 0xc(%ebp),%edx
108144: 89 53 10 mov %edx,0x10(%ebx)
tty->major = major;
108147: 8b 55 08 mov 0x8(%ebp),%edx
10814a: 89 53 0c mov %edx,0xc(%ebx)
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
10814d: 83 ec 0c sub $0xc,%esp
108150: 8d 43 14 lea 0x14(%ebx),%eax
108153: 50 push %eax
108154: 6a 00 push $0x0
108156: 6a 54 push $0x54
108158: 6a 01 push $0x1
rtems_build_name ('T', 'R', 'i', c),
10815a: 0f be 05 10 c1 12 00 movsbl 0x12c110,%eax
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
108161: 0d 00 69 52 54 or $0x54526900,%eax
108166: 50 push %eax
108167: e8 f4 19 00 00 call 109b60 <rtems_semaphore_create>
rtems_build_name ('T', 'R', 'i', c),
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->isem);
if (sc != RTEMS_SUCCESSFUL)
10816c: 83 c4 20 add $0x20,%esp
10816f: 85 c0 test %eax,%eax
108171: 74 05 je 108178 <rtems_termios_open+0x183>
108173: e9 1e 02 00 00 jmp 108396 <rtems_termios_open+0x3a1>
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
108178: 83 ec 0c sub $0xc,%esp
10817b: 8d 43 18 lea 0x18(%ebx),%eax
10817e: 50 push %eax
10817f: 6a 00 push $0x0
108181: 6a 54 push $0x54
108183: 6a 01 push $0x1
rtems_build_name ('T', 'R', 'o', c),
108185: 0f be 05 10 c1 12 00 movsbl 0x12c110,%eax
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->isem);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
10818c: 0d 00 6f 52 54 or $0x54526f00,%eax
108191: 50 push %eax
108192: e8 c9 19 00 00 call 109b60 <rtems_semaphore_create>
rtems_build_name ('T', 'R', 'o', c),
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->osem);
if (sc != RTEMS_SUCCESSFUL)
108197: 83 c4 20 add $0x20,%esp
10819a: 85 c0 test %eax,%eax
10819c: 74 05 je 1081a3 <rtems_termios_open+0x1ae>
10819e: e9 f3 01 00 00 jmp 108396 <rtems_termios_open+0x3a1>
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
1081a3: 83 ec 0c sub $0xc,%esp
1081a6: 8d 83 8c 00 00 00 lea 0x8c(%ebx),%eax
1081ac: 50 push %eax
1081ad: 6a 00 push $0x0
1081af: 6a 20 push $0x20
1081b1: 6a 00 push $0x0
rtems_build_name ('T', 'R', 'x', c),
1081b3: 0f be 05 10 c1 12 00 movsbl 0x12c110,%eax
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->osem);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
1081ba: 0d 00 78 52 54 or $0x54527800,%eax
1081bf: 50 push %eax
1081c0: e8 9b 19 00 00 call 109b60 <rtems_semaphore_create>
rtems_build_name ('T', 'R', 'x', c),
0,
RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO,
RTEMS_NO_PRIORITY,
&tty->rawOutBuf.Semaphore);
if (sc != RTEMS_SUCCESSFUL)
1081c5: 83 c4 20 add $0x20,%esp
1081c8: 85 c0 test %eax,%eax
1081ca: 74 05 je 1081d1 <rtems_termios_open+0x1dc>
1081cc: e9 c5 01 00 00 jmp 108396 <rtems_termios_open+0x3a1>
rtems_fatal_error_occurred (sc);
tty->rawOutBufState = rob_idle;
1081d1: c7 83 94 00 00 00 00 movl $0x0,0x94(%ebx)
1081d8: 00 00 00
/*
* Set callbacks
*/
tty->device = *callbacks;
1081db: 8d bb 98 00 00 00 lea 0x98(%ebx),%edi
1081e1: b9 08 00 00 00 mov $0x8,%ecx
1081e6: 8b 75 14 mov 0x14(%ebp),%esi
1081e9: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
1081eb: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx)
1081f2: 75 6a jne 10825e <rtems_termios_open+0x269>
sc = rtems_task_create (
1081f4: 56 push %esi
1081f5: 56 push %esi
1081f6: 8d 83 c8 00 00 00 lea 0xc8(%ebx),%eax
1081fc: 50 push %eax
1081fd: 6a 00 push $0x0
1081ff: 68 00 05 00 00 push $0x500
108204: 68 00 04 00 00 push $0x400
108209: 6a 0a push $0xa
rtems_build_name ('T', 'x', 'T', c),
10820b: 0f be 05 10 c1 12 00 movsbl 0x12c110,%eax
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
sc = rtems_task_create (
108212: 0d 00 54 78 54 or $0x54785400,%eax
108217: 50 push %eax
108218: e8 f3 1c 00 00 call 109f10 <rtems_task_create>
TERMIOS_TXTASK_STACKSIZE,
RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE |
RTEMS_NO_ASR,
RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
&tty->txTaskId);
if (sc != RTEMS_SUCCESSFUL)
10821d: 83 c4 20 add $0x20,%esp
108220: 85 c0 test %eax,%eax
108222: 74 05 je 108229 <rtems_termios_open+0x234><== ALWAYS TAKEN
108224: e9 6d 01 00 00 jmp 108396 <rtems_termios_open+0x3a1><== NOT EXECUTED
rtems_fatal_error_occurred (sc);
sc = rtems_task_create (
108229: 51 push %ecx
10822a: 51 push %ecx
10822b: 8d 83 c4 00 00 00 lea 0xc4(%ebx),%eax
108231: 50 push %eax
108232: 6a 00 push $0x0
108234: 68 00 05 00 00 push $0x500
108239: 68 00 04 00 00 push $0x400
10823e: 6a 09 push $0x9
rtems_build_name ('R', 'x', 'T', c),
108240: 0f be 05 10 c1 12 00 movsbl 0x12c110,%eax
RTEMS_NO_ASR,
RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
&tty->txTaskId);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
sc = rtems_task_create (
108247: 0d 00 54 78 52 or $0x52785400,%eax
10824c: 50 push %eax
10824d: e8 be 1c 00 00 call 109f10 <rtems_task_create>
TERMIOS_RXTASK_STACKSIZE,
RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE |
RTEMS_NO_ASR,
RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
&tty->rxTaskId);
if (sc != RTEMS_SUCCESSFUL)
108252: 83 c4 20 add $0x20,%esp
108255: 85 c0 test %eax,%eax
108257: 74 05 je 10825e <rtems_termios_open+0x269><== ALWAYS TAKEN
108259: e9 38 01 00 00 jmp 108396 <rtems_termios_open+0x3a1><== NOT EXECUTED
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
10825e: 83 bb a0 00 00 00 00 cmpl $0x0,0xa0(%ebx)
108265: 74 09 je 108270 <rtems_termios_open+0x27b>
108267: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx)
10826e: 75 2b jne 10829b <rtems_termios_open+0x2a6>
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
sc = rtems_semaphore_create (
108270: 83 ec 0c sub $0xc,%esp
108273: 8d 43 68 lea 0x68(%ebx),%eax
108276: 50 push %eax
108277: 6a 00 push $0x0
108279: 6a 24 push $0x24
10827b: 6a 00 push $0x0
rtems_build_name ('T', 'R', 'r', c),
10827d: 0f be 05 10 c1 12 00 movsbl 0x12c110,%eax
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
sc = rtems_semaphore_create (
108284: 0d 00 72 52 54 or $0x54527200,%eax
108289: 50 push %eax
10828a: e8 d1 18 00 00 call 109b60 <rtems_semaphore_create>
rtems_build_name ('T', 'R', 'r', c),
0,
RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->rawInBuf.Semaphore);
if (sc != RTEMS_SUCCESSFUL)
10828f: 83 c4 20 add $0x20,%esp
108292: 85 c0 test %eax,%eax
108294: 74 05 je 10829b <rtems_termios_open+0x2a6>
108296: e9 fb 00 00 00 jmp 108396 <rtems_termios_open+0x3a1>
}
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
10829b: c7 43 30 02 25 00 00 movl $0x2502,0x30(%ebx)
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
1082a2: c7 43 34 05 18 00 00 movl $0x1805,0x34(%ebx)
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
1082a9: c7 43 38 bd 08 00 00 movl $0x8bd,0x38(%ebx)
tty->termios.c_lflag =
1082b0: c7 43 3c 3b 82 00 00 movl $0x823b,0x3c(%ebx)
ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
tty->termios.c_cc[VINTR] = '\003';
1082b7: c6 43 41 03 movb $0x3,0x41(%ebx)
tty->termios.c_cc[VQUIT] = '\034';
1082bb: c6 43 42 1c movb $0x1c,0x42(%ebx)
tty->termios.c_cc[VERASE] = '\177';
1082bf: c6 43 43 7f movb $0x7f,0x43(%ebx)
tty->termios.c_cc[VKILL] = '\025';
1082c3: c6 43 44 15 movb $0x15,0x44(%ebx)
tty->termios.c_cc[VEOF] = '\004';
1082c7: c6 43 45 04 movb $0x4,0x45(%ebx)
tty->termios.c_cc[VEOL] = '\000';
1082cb: c6 43 4c 00 movb $0x0,0x4c(%ebx)
tty->termios.c_cc[VEOL2] = '\000';
1082cf: c6 43 51 00 movb $0x0,0x51(%ebx)
tty->termios.c_cc[VSTART] = '\021';
1082d3: c6 43 49 11 movb $0x11,0x49(%ebx)
tty->termios.c_cc[VSTOP] = '\023';
1082d7: c6 43 4a 13 movb $0x13,0x4a(%ebx)
tty->termios.c_cc[VSUSP] = '\032';
1082db: c6 43 4b 1a movb $0x1a,0x4b(%ebx)
tty->termios.c_cc[VREPRINT] = '\022';
1082df: c6 43 4d 12 movb $0x12,0x4d(%ebx)
tty->termios.c_cc[VDISCARD] = '\017';
1082e3: c6 43 4e 0f movb $0xf,0x4e(%ebx)
tty->termios.c_cc[VWERASE] = '\027';
1082e7: c6 43 4f 17 movb $0x17,0x4f(%ebx)
tty->termios.c_cc[VLNEXT] = '\026';
1082eb: c6 43 50 16 movb $0x16,0x50(%ebx)
/* start with no flow control, clear flow control flags */
tty->flow_ctrl = 0;
1082ef: c7 83 b8 00 00 00 00 movl $0x0,0xb8(%ebx)
1082f6: 00 00 00
/*
* set low/highwater mark for XON/XOFF support
*/
tty->lowwater = tty->rawInBuf.Size * 1/2;
1082f9: 8b 43 64 mov 0x64(%ebx),%eax
1082fc: d1 e8 shr %eax
1082fe: 89 83 bc 00 00 00 mov %eax,0xbc(%ebx)
tty->highwater = tty->rawInBuf.Size * 3/4;
108304: 8b 43 64 mov 0x64(%ebx),%eax
108307: 8d 04 40 lea (%eax,%eax,2),%eax
10830a: c1 e8 02 shr $0x2,%eax
10830d: 89 83 c0 00 00 00 mov %eax,0xc0(%ebx)
/*
* Bump name characer
*/
if (c++ == 'z')
108313: a0 10 c1 12 00 mov 0x12c110,%al
108318: 3c 7a cmp $0x7a,%al
10831a: 74 08 je 108324 <rtems_termios_open+0x32f>
10831c: 40 inc %eax
10831d: a2 10 c1 12 00 mov %al,0x12c110
108322: eb 07 jmp 10832b <rtems_termios_open+0x336>
c = 'a';
108324: c6 05 10 c1 12 00 61 movb $0x61,0x12c110
}
args->iop->data1 = tty;
10832b: 8b 55 10 mov 0x10(%ebp),%edx
10832e: 8b 02 mov (%edx),%eax
108330: 89 58 2c mov %ebx,0x2c(%eax)
if (!tty->refcount++) {
108333: 8b 43 08 mov 0x8(%ebx),%eax
108336: 8d 50 01 lea 0x1(%eax),%edx
108339: 89 53 08 mov %edx,0x8(%ebx)
10833c: 85 c0 test %eax,%eax
10833e: 75 5f jne 10839f <rtems_termios_open+0x3aa>
if (tty->device.firstOpen)
108340: 8b 83 98 00 00 00 mov 0x98(%ebx),%eax
108346: 85 c0 test %eax,%eax
108348: 74 0f je 108359 <rtems_termios_open+0x364>
(*tty->device.firstOpen)(major, minor, arg);
10834a: 52 push %edx
10834b: ff 75 10 pushl 0x10(%ebp)
10834e: ff 75 0c pushl 0xc(%ebp)
108351: ff 75 08 pushl 0x8(%ebp)
108354: ff d0 call *%eax
108356: 83 c4 10 add $0x10,%esp
/*
* start I/O tasks, if needed
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
108359: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx)
108360: 75 3d jne 10839f <rtems_termios_open+0x3aa>
sc = rtems_task_start(
108362: 57 push %edi
108363: 53 push %ebx
108364: 68 31 94 10 00 push $0x109431
108369: ff b3 c4 00 00 00 pushl 0xc4(%ebx)
10836f: e8 18 1e 00 00 call 10a18c <rtems_task_start>
tty->rxTaskId, rtems_termios_rxdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
108374: 83 c4 10 add $0x10,%esp
108377: 85 c0 test %eax,%eax
108379: 74 02 je 10837d <rtems_termios_open+0x388><== ALWAYS TAKEN
10837b: eb 19 jmp 108396 <rtems_termios_open+0x3a1><== NOT EXECUTED
rtems_fatal_error_occurred (sc);
sc = rtems_task_start(
10837d: 56 push %esi
10837e: 53 push %ebx
10837f: 68 47 7f 10 00 push $0x107f47
108384: ff b3 c8 00 00 00 pushl 0xc8(%ebx)
10838a: e8 fd 1d 00 00 call 10a18c <rtems_task_start>
tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
10838f: 83 c4 10 add $0x10,%esp
108392: 85 c0 test %eax,%eax
108394: 74 09 je 10839f <rtems_termios_open+0x3aa><== ALWAYS TAKEN
rtems_fatal_error_occurred (sc);
108396: 83 ec 0c sub $0xc,%esp
108399: 50 push %eax
10839a: e8 15 20 00 00 call 10a3b4 <rtems_fatal_error_occurred>
}
}
rtems_semaphore_release (rtems_termios_ttyMutex);
10839f: 83 ec 0c sub $0xc,%esp
1083a2: ff 35 14 e3 12 00 pushl 0x12e314
1083a8: e8 d3 1a 00 00 call 109e80 <rtems_semaphore_release>
return RTEMS_SUCCESSFUL;
1083ad: 83 c4 10 add $0x10,%esp
1083b0: eb 20 jmp 1083d2 <rtems_termios_open+0x3dd>
static char c = 'a';
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
1083b2: 51 push %ecx
1083b3: 51 push %ecx
1083b4: 68 e8 00 00 00 push $0xe8
1083b9: 6a 01 push $0x1
1083bb: e8 6c e1 ff ff call 10652c <calloc>
1083c0: 89 c3 mov %eax,%ebx
if (tty == NULL) {
1083c2: 83 c4 10 add $0x10,%esp
1083c5: 85 c0 test %eax,%eax
1083c7: 0f 85 7f fc ff ff jne 10804c <rtems_termios_open+0x57>
1083cd: e9 72 fc ff ff jmp 108044 <rtems_termios_open+0x4f>
rtems_fatal_error_occurred (sc);
}
}
rtems_semaphore_release (rtems_termios_ttyMutex);
return RTEMS_SUCCESSFUL;
}
1083d2: 8b 45 e4 mov -0x1c(%ebp),%eax
1083d5: 8d 65 f4 lea -0xc(%ebp),%esp
1083d8: 5b pop %ebx
1083d9: 5e pop %esi
1083da: 5f pop %edi
1083db: 5d pop %ebp
1083dc: c3 ret
001088c5 <rtems_termios_puts>:
* Send characters to device-specific code
*/
void
rtems_termios_puts (
const void *_buf, size_t len, struct rtems_termios_tty *tty)
{
1088c5: 55 push %ebp
1088c6: 89 e5 mov %esp,%ebp
1088c8: 57 push %edi
1088c9: 56 push %esi
1088ca: 53 push %ebx
1088cb: 83 ec 1c sub $0x1c,%esp
1088ce: 8b 75 08 mov 0x8(%ebp),%esi
1088d1: 8b 45 0c mov 0xc(%ebp),%eax
1088d4: 8b 5d 10 mov 0x10(%ebp),%ebx
const unsigned char *buf = _buf;
unsigned int newHead;
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
1088d7: 83 bb b4 00 00 00 00 cmpl $0x0,0xb4(%ebx)
1088de: 75 1b jne 1088fb <rtems_termios_puts+0x36>
(*tty->device.write)(tty->minor, buf, len);
1088e0: 89 45 10 mov %eax,0x10(%ebp)
1088e3: 89 75 0c mov %esi,0xc(%ebp)
1088e6: 8b 43 10 mov 0x10(%ebx),%eax
1088e9: 89 45 08 mov %eax,0x8(%ebp)
1088ec: 8b 83 a4 00 00 00 mov 0xa4(%ebx),%eax
tty->rawOutBufState = rob_busy;
}
rtems_interrupt_enable (level);
len--;
}
}
1088f2: 8d 65 f4 lea -0xc(%ebp),%esp
1088f5: 5b pop %ebx
1088f6: 5e pop %esi
1088f7: 5f pop %edi
1088f8: 5d pop %ebp
unsigned int newHead;
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, buf, len);
1088f9: ff e0 jmp *%eax
return;
}
newHead = tty->rawOutBuf.Head;
1088fb: 8b bb 80 00 00 00 mov 0x80(%ebx),%edi
/*
* Send characters to device-specific code
*/
void
rtems_termios_puts (
108901: 01 f0 add %esi,%eax
108903: 89 45 e0 mov %eax,-0x20(%ebp)
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
while (len) {
108906: e9 b5 00 00 00 jmp 1089c0 <rtems_termios_puts+0xfb>
* len -= ncopy
*
* To minimize latency, the memcpy should be done
* with interrupts enabled.
*/
newHead = (newHead + 1) % tty->rawOutBuf.Size;
10890b: 8d 47 01 lea 0x1(%edi),%eax
10890e: 8b 8b 88 00 00 00 mov 0x88(%ebx),%ecx
108914: 31 d2 xor %edx,%edx
108916: f7 f1 div %ecx
108918: 89 55 d8 mov %edx,-0x28(%ebp)
10891b: 89 d7 mov %edx,%edi
10891d: eb 2e jmp 10894d <rtems_termios_puts+0x88>
rtems_interrupt_disable (level);
while (newHead == tty->rawOutBuf.Tail) {
tty->rawOutBufState = rob_wait;
10891f: c7 83 94 00 00 00 02 movl $0x2,0x94(%ebx)
108926: 00 00 00
rtems_interrupt_enable (level);
108929: ff 75 e4 pushl -0x1c(%ebp)
10892c: 9d popf
sc = rtems_semaphore_obtain(
10892d: 51 push %ecx
10892e: 6a 00 push $0x0
108930: 6a 00 push $0x0
108932: ff b3 8c 00 00 00 pushl 0x8c(%ebx)
108938: e8 53 14 00 00 call 109d90 <rtems_semaphore_obtain>
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
10893d: 83 c4 10 add $0x10,%esp
108940: 85 c0 test %eax,%eax
108942: 74 09 je 10894d <rtems_termios_puts+0x88><== ALWAYS TAKEN
rtems_fatal_error_occurred (sc);
108944: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
108947: 50 push %eax <== NOT EXECUTED
108948: e8 67 1a 00 00 call 10a3b4 <rtems_fatal_error_occurred><== NOT EXECUTED
rtems_interrupt_disable (level);
10894d: 9c pushf
10894e: fa cli
10894f: 8f 45 e4 popl -0x1c(%ebp)
* To minimize latency, the memcpy should be done
* with interrupts enabled.
*/
newHead = (newHead + 1) % tty->rawOutBuf.Size;
rtems_interrupt_disable (level);
while (newHead == tty->rawOutBuf.Tail) {
108952: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax
108958: 39 45 d8 cmp %eax,-0x28(%ebp)
10895b: 74 c2 je 10891f <rtems_termios_puts+0x5a>
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
}
tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++;
10895d: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax
108963: 8a 0e mov (%esi),%cl
108965: 8b 53 7c mov 0x7c(%ebx),%edx
108968: 88 0c 02 mov %cl,(%edx,%eax,1)
10896b: 46 inc %esi
tty->rawOutBuf.Head = newHead;
10896c: 8b 55 d8 mov -0x28(%ebp),%edx
10896f: 89 93 80 00 00 00 mov %edx,0x80(%ebx)
if (tty->rawOutBufState == rob_idle) {
108975: 83 bb 94 00 00 00 00 cmpl $0x0,0x94(%ebx)
10897c: 75 3e jne 1089bc <rtems_termios_puts+0xf7>
/* check, whether XOFF has been received */
if (!(tty->flow_ctrl & FL_ORCVXOF)) {
10897e: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
108984: a8 10 test $0x10,%al
108986: 75 1b jne 1089a3 <rtems_termios_puts+0xde><== NEVER TAKEN
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
108988: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax
tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++;
tty->rawOutBuf.Head = newHead;
if (tty->rawOutBufState == rob_idle) {
/* check, whether XOFF has been received */
if (!(tty->flow_ctrl & FL_ORCVXOF)) {
(*tty->device.write)(
10898e: 52 push %edx
10898f: 6a 01 push $0x1
108991: 03 43 7c add 0x7c(%ebx),%eax
108994: 50 push %eax
108995: ff 73 10 pushl 0x10(%ebx)
108998: ff 93 a4 00 00 00 call *0xa4(%ebx)
10899e: 83 c4 10 add $0x10,%esp
1089a1: eb 0f jmp 1089b2 <rtems_termios_puts+0xed>
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
} else {
/* remember that output has been stopped due to flow ctrl*/
tty->flow_ctrl |= FL_OSTOP;
1089a3: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
1089a9: 83 c8 20 or $0x20,%eax <== NOT EXECUTED
1089ac: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
}
tty->rawOutBufState = rob_busy;
1089b2: c7 83 94 00 00 00 01 movl $0x1,0x94(%ebx)
1089b9: 00 00 00
}
rtems_interrupt_enable (level);
1089bc: ff 75 e4 pushl -0x1c(%ebp)
1089bf: 9d popf
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
while (len) {
1089c0: 3b 75 e0 cmp -0x20(%ebp),%esi
1089c3: 0f 85 42 ff ff ff jne 10890b <rtems_termios_puts+0x46>
tty->rawOutBufState = rob_busy;
}
rtems_interrupt_enable (level);
len--;
}
}
1089c9: 8d 65 f4 lea -0xc(%ebp),%esp
1089cc: 5b pop %ebx
1089cd: 5e pop %esi
1089ce: 5f pop %edi
1089cf: 5d pop %ebp
1089d0: c3 ret
00108ed2 <rtems_termios_read>:
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_termios_read (void *arg)
{
108ed2: 55 push %ebp
108ed3: 89 e5 mov %esp,%ebp
108ed5: 57 push %edi
108ed6: 56 push %esi
108ed7: 53 push %ebx
108ed8: 83 ec 30 sub $0x30,%esp
108edb: 8b 75 08 mov 0x8(%ebp),%esi
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
108ede: 8b 06 mov (%esi),%eax
108ee0: 8b 58 2c mov 0x2c(%eax),%ebx
uint32_t count = args->count;
108ee3: 8b 4e 10 mov 0x10(%esi),%ecx
108ee6: 89 4d e4 mov %ecx,-0x1c(%ebp)
char *buffer = args->buffer;
108ee9: 8b 4e 0c mov 0xc(%esi),%ecx
108eec: 89 4d dc mov %ecx,-0x24(%ebp)
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
108eef: 6a 00 push $0x0
108ef1: 6a 00 push $0x0
108ef3: ff 73 14 pushl 0x14(%ebx)
108ef6: e8 95 0e 00 00 call 109d90 <rtems_semaphore_obtain>
108efb: 89 45 d8 mov %eax,-0x28(%ebp)
if (sc != RTEMS_SUCCESSFUL)
108efe: 83 c4 10 add $0x10,%esp
108f01: 85 c0 test %eax,%eax
108f03: 0f 85 88 02 00 00 jne 109191 <rtems_termios_read+0x2bf><== NEVER TAKEN
return sc;
if (rtems_termios_linesw[tty->t_line].l_read != NULL) {
108f09: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax
108f0f: c1 e0 05 shl $0x5,%eax
108f12: 8b 80 c8 df 12 00 mov 0x12dfc8(%eax),%eax
108f18: 85 c0 test %eax,%eax
108f1a: 74 19 je 108f35 <rtems_termios_read+0x63>
sc = rtems_termios_linesw[tty->t_line].l_read(tty,args);
108f1c: 52 push %edx
108f1d: 52 push %edx
108f1e: 56 push %esi
108f1f: 53 push %ebx
108f20: ff d0 call *%eax
108f22: 89 45 d8 mov %eax,-0x28(%ebp)
tty->tty_rcvwakeup = 0;
108f25: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx)
108f2c: 00 00 00
rtems_semaphore_release (tty->isem);
108f2f: 59 pop %ecx
108f30: e9 51 02 00 00 jmp 109186 <rtems_termios_read+0x2b4>
return sc;
}
if (tty->cindex == tty->ccount) {
108f35: 8b 43 20 mov 0x20(%ebx),%eax
108f38: 39 43 24 cmp %eax,0x24(%ebx)
108f3b: 0f 85 21 02 00 00 jne 109162 <rtems_termios_read+0x290><== NEVER TAKEN
tty->cindex = tty->ccount = 0;
108f41: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx)
108f48: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx)
tty->read_start_column = tty->column;
108f4f: 8b 43 28 mov 0x28(%ebx),%eax
108f52: 89 43 2c mov %eax,0x2c(%ebx)
if (tty->device.pollRead != NULL &&
108f55: 83 bb a0 00 00 00 00 cmpl $0x0,0xa0(%ebx)
108f5c: 0f 84 c9 00 00 00 je 10902b <rtems_termios_read+0x159>
108f62: 83 bb b4 00 00 00 00 cmpl $0x0,0xb4(%ebx)
108f69: 0f 85 bc 00 00 00 jne 10902b <rtems_termios_read+0x159>
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
108f6f: f6 43 3c 02 testb $0x2,0x3c(%ebx)
108f73: 74 37 je 108fac <rtems_termios_read+0xda>
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
108f75: 83 ec 0c sub $0xc,%esp
108f78: ff 73 10 pushl 0x10(%ebx)
108f7b: ff 93 a0 00 00 00 call *0xa0(%ebx)
if (n < 0) {
108f81: 83 c4 10 add $0x10,%esp
108f84: 85 c0 test %eax,%eax
108f86: 79 0f jns 108f97 <rtems_termios_read+0xc5>
rtems_task_wake_after (1);
108f88: 83 ec 0c sub $0xc,%esp
108f8b: 6a 01 push $0x1
108f8d: e8 5e 12 00 00 call 10a1f0 <rtems_task_wake_after>
108f92: 83 c4 10 add $0x10,%esp
108f95: eb de jmp 108f75 <rtems_termios_read+0xa3>
} else {
if (siproc (n, tty))
108f97: 25 ff 00 00 00 and $0xff,%eax
108f9c: 89 da mov %ebx,%edx
108f9e: e8 3a fe ff ff call 108ddd <siproc>
108fa3: 85 c0 test %eax,%eax
108fa5: 74 ce je 108f75 <rtems_termios_read+0xa3>
108fa7: e9 b6 01 00 00 jmp 109162 <rtems_termios_read+0x290>
}
}
} else {
rtems_interval then, now;
then = rtems_clock_get_ticks_since_boot();
108fac: e8 47 08 00 00 call 1097f8 <rtems_clock_get_ticks_since_boot>
108fb1: 89 c7 mov %eax,%edi
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
108fb3: 83 ec 0c sub $0xc,%esp
108fb6: ff 73 10 pushl 0x10(%ebx)
108fb9: ff 93 a0 00 00 00 call *0xa0(%ebx)
if (n < 0) {
108fbf: 83 c4 10 add $0x10,%esp
108fc2: 85 c0 test %eax,%eax
108fc4: 79 3e jns 109004 <rtems_termios_read+0x132>
if (tty->termios.c_cc[VMIN]) {
108fc6: 80 7b 47 00 cmpb $0x0,0x47(%ebx)
108fca: 74 1d je 108fe9 <rtems_termios_read+0x117><== NEVER TAKEN
if (tty->termios.c_cc[VTIME] && tty->ccount) {
108fcc: 80 7b 46 00 cmpb $0x0,0x46(%ebx)
108fd0: 75 0f jne 108fe1 <rtems_termios_read+0x10f><== ALWAYS TAKEN
now = rtems_clock_get_ticks_since_boot();
if ((now - then) > tty->vtimeTicks) {
break;
}
}
rtems_task_wake_after (1);
108fd2: 83 ec 0c sub $0xc,%esp
108fd5: 6a 01 push $0x1
108fd7: e8 14 12 00 00 call 10a1f0 <rtems_task_wake_after>
108fdc: 83 c4 10 add $0x10,%esp
108fdf: eb d2 jmp 108fb3 <rtems_termios_read+0xe1>
then = rtems_clock_get_ticks_since_boot();
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
if (n < 0) {
if (tty->termios.c_cc[VMIN]) {
if (tty->termios.c_cc[VTIME] && tty->ccount) {
108fe1: 83 7b 20 00 cmpl $0x0,0x20(%ebx)
108fe5: 74 eb je 108fd2 <rtems_termios_read+0x100>
108fe7: eb 0a jmp 108ff3 <rtems_termios_read+0x121>
if ((now - then) > tty->vtimeTicks) {
break;
}
}
} else {
if (!tty->termios.c_cc[VTIME])
108fe9: 80 7b 46 00 cmpb $0x0,0x46(%ebx) <== NOT EXECUTED
108fed: 0f 84 6f 01 00 00 je 109162 <rtems_termios_read+0x290><== NOT EXECUTED
break;
now = rtems_clock_get_ticks_since_boot();
108ff3: e8 00 08 00 00 call 1097f8 <rtems_clock_get_ticks_since_boot>
if ((now - then) > tty->vtimeTicks) {
108ff8: 29 f8 sub %edi,%eax
108ffa: 3b 43 54 cmp 0x54(%ebx),%eax
108ffd: 76 d3 jbe 108fd2 <rtems_termios_read+0x100>
108fff: e9 5e 01 00 00 jmp 109162 <rtems_termios_read+0x290>
break;
}
}
rtems_task_wake_after (1);
} else {
siproc (n, tty);
109004: 25 ff 00 00 00 and $0xff,%eax
109009: 89 da mov %ebx,%edx
10900b: e8 cd fd ff ff call 108ddd <siproc>
if (tty->ccount >= tty->termios.c_cc[VMIN])
109010: 8a 43 47 mov 0x47(%ebx),%al
109013: 0f b6 d0 movzbl %al,%edx
109016: 39 53 20 cmp %edx,0x20(%ebx)
109019: 0f 8d 43 01 00 00 jge 109162 <rtems_termios_read+0x290>
break;
if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME])
10901f: 84 c0 test %al,%al
109021: 74 90 je 108fb3 <rtems_termios_read+0xe1><== NEVER TAKEN
109023: 80 7b 46 00 cmpb $0x0,0x46(%ebx)
109027: 74 8a je 108fb3 <rtems_termios_read+0xe1><== NEVER TAKEN
109029: eb 81 jmp 108fac <rtems_termios_read+0xda>
* Fill the input buffer from the raw input queue
*/
static rtems_status_code
fillBufferQueue (struct rtems_termios_tty *tty)
{
rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout;
10902b: 8b 7b 74 mov 0x74(%ebx),%edi
rtems_status_code sc;
int wait = 1;
10902e: c7 45 d4 01 00 00 00 movl $0x1,-0x2c(%ebp)
== (FL_MDXON | FL_ISNTXOF))
&& ((tty->rawOutBufState == rob_idle)
|| (tty->flow_ctrl & FL_OSTOP))) {
/* XON should be sent now... */
(*tty->device.write)(
tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1);
109035: 8d 4b 49 lea 0x49(%ebx),%ecx
109038: 89 4d d0 mov %ecx,-0x30(%ebp)
10903b: e9 d3 00 00 00 jmp 109113 <rtems_termios_read+0x241>
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
(tty->ccount < (CBUFSIZE-1))) {
unsigned char c;
unsigned int newHead;
newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size;
109040: 8b 43 5c mov 0x5c(%ebx),%eax
109043: 8b 4b 64 mov 0x64(%ebx),%ecx
109046: 40 inc %eax
109047: 31 d2 xor %edx,%edx
109049: f7 f1 div %ecx
c = tty->rawInBuf.theBuf[newHead];
10904b: 8b 43 58 mov 0x58(%ebx),%eax
10904e: 8a 04 10 mov (%eax,%edx,1),%al
109051: 88 45 e3 mov %al,-0x1d(%ebp)
tty->rawInBuf.Head = newHead;
109054: 89 53 5c mov %edx,0x5c(%ebx)
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
109057: 8b 43 60 mov 0x60(%ebx),%eax
10905a: 8b 7b 64 mov 0x64(%ebx),%edi
% tty->rawInBuf.Size)
10905d: 8b 4b 64 mov 0x64(%ebx),%ecx
unsigned int newHead;
newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size;
c = tty->rawInBuf.theBuf[newHead];
tty->rawInBuf.Head = newHead;
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
109060: 01 f8 add %edi,%eax
109062: 29 d0 sub %edx,%eax
% tty->rawInBuf.Size)
109064: 31 d2 xor %edx,%edx
109066: f7 f1 div %ecx
unsigned int newHead;
newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size;
c = tty->rawInBuf.theBuf[newHead];
tty->rawInBuf.Head = newHead;
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
109068: 3b 93 bc 00 00 00 cmp 0xbc(%ebx),%edx
10906e: 73 74 jae 1090e4 <rtems_termios_read+0x212><== NEVER TAKEN
% tty->rawInBuf.Size)
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
109070: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
109076: 83 e0 fe and $0xfffffffe,%eax
109079: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx)
/* if tx stopped and XON should be sent... */
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
10907f: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
109085: 25 02 02 00 00 and $0x202,%eax
10908a: 3d 02 02 00 00 cmp $0x202,%eax
10908f: 75 24 jne 1090b5 <rtems_termios_read+0x1e3><== ALWAYS TAKEN
== (FL_MDXON | FL_ISNTXOF))
&& ((tty->rawOutBufState == rob_idle)
109091: 83 bb 94 00 00 00 00 cmpl $0x0,0x94(%ebx) <== NOT EXECUTED
109098: 74 0a je 1090a4 <rtems_termios_read+0x1d2><== NOT EXECUTED
|| (tty->flow_ctrl & FL_OSTOP))) {
10909a: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
1090a0: a8 20 test $0x20,%al <== NOT EXECUTED
1090a2: 74 11 je 1090b5 <rtems_termios_read+0x1e3><== NOT EXECUTED
/* XON should be sent now... */
(*tty->device.write)(
1090a4: 50 push %eax <== NOT EXECUTED
1090a5: 6a 01 push $0x1 <== NOT EXECUTED
1090a7: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED
1090aa: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
1090ad: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED
1090b3: eb 2c jmp 1090e1 <rtems_termios_read+0x20f><== NOT EXECUTED
tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1);
} else if (tty->flow_ctrl & FL_MDRTS) {
1090b5: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
1090bb: f6 c4 01 test $0x1,%ah
1090be: 74 24 je 1090e4 <rtems_termios_read+0x212><== ALWAYS TAKEN
tty->flow_ctrl &= ~FL_IRTSOFF;
1090c0: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
1090c6: 83 e0 fb and $0xfffffffb,%eax <== NOT EXECUTED
1090c9: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
/* activate RTS line */
if (tty->device.startRemoteTx != NULL) {
1090cf: 8b 83 b0 00 00 00 mov 0xb0(%ebx),%eax <== NOT EXECUTED
1090d5: 85 c0 test %eax,%eax <== NOT EXECUTED
1090d7: 74 0b je 1090e4 <rtems_termios_read+0x212><== NOT EXECUTED
tty->device.startRemoteTx(tty->minor);
1090d9: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1090dc: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
1090df: ff d0 call *%eax <== NOT EXECUTED
1090e1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
if (siproc (c, tty))
1090e4: 0f b6 45 e3 movzbl -0x1d(%ebp),%eax
1090e8: 89 da mov %ebx,%edx
}
}
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
1090ea: f6 43 3c 02 testb $0x2,0x3c(%ebx)
1090ee: 74 12 je 109102 <rtems_termios_read+0x230><== NEVER TAKEN
if (siproc (c, tty))
1090f0: e8 e8 fc ff ff call 108ddd <siproc>
1090f5: 85 c0 test %eax,%eax
1090f7: 74 17 je 109110 <rtems_termios_read+0x23e>
wait = 0;
1090f9: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp)
109100: eb 0e jmp 109110 <rtems_termios_read+0x23e>
} else {
siproc (c, tty);
109102: e8 d6 fc ff ff call 108ddd <siproc> <== NOT EXECUTED
if (tty->ccount >= tty->termios.c_cc[VMIN])
109107: 0f b6 43 47 movzbl 0x47(%ebx),%eax <== NOT EXECUTED
10910b: 39 43 20 cmp %eax,0x20(%ebx) <== NOT EXECUTED
10910e: 7d e9 jge 1090f9 <rtems_termios_read+0x227><== NOT EXECUTED
wait = 0;
}
timeout = tty->rawInBufSemaphoreTimeout;
109110: 8b 7b 70 mov 0x70(%ebx),%edi
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
109113: 8b 53 5c mov 0x5c(%ebx),%edx
109116: 8b 43 60 mov 0x60(%ebx),%eax
109119: 39 c2 cmp %eax,%edx
10911b: 75 08 jne 109125 <rtems_termios_read+0x253>
}
/*
* Wait for characters
*/
if ( wait ) {
10911d: 83 7d d4 00 cmpl $0x0,-0x2c(%ebp)
109121: 74 3f je 109162 <rtems_termios_read+0x290>
109123: eb 11 jmp 109136 <rtems_termios_read+0x264>
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
(tty->ccount < (CBUFSIZE-1))) {
109125: a1 0c c1 12 00 mov 0x12c10c,%eax
10912a: 48 dec %eax
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
10912b: 39 43 20 cmp %eax,0x20(%ebx)
10912e: 0f 82 0c ff ff ff jb 109040 <rtems_termios_read+0x16e><== ALWAYS TAKEN
109134: eb e7 jmp 10911d <rtems_termios_read+0x24b><== NOT EXECUTED
/*
* Wait for characters
*/
if ( wait ) {
sc = rtems_semaphore_obtain(
109136: 50 push %eax
109137: 57 push %edi
109138: ff 73 6c pushl 0x6c(%ebx)
10913b: ff 73 68 pushl 0x68(%ebx)
10913e: e8 4d 0c 00 00 call 109d90 <rtems_semaphore_obtain>
tty->rawInBuf.Semaphore, tty->rawInBufSemaphoreOptions, timeout);
if (sc != RTEMS_SUCCESSFUL)
109143: 83 c4 10 add $0x10,%esp
109146: 85 c0 test %eax,%eax
109148: 74 c9 je 109113 <rtems_termios_read+0x241>
10914a: eb 16 jmp 109162 <rtems_termios_read+0x290>
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
*buffer++ = tty->cbuf[tty->cindex++];
10914c: 8b 53 1c mov 0x1c(%ebx),%edx
10914f: 8a 14 02 mov (%edx,%eax,1),%dl
109152: 8b 4d dc mov -0x24(%ebp),%ecx
109155: 88 11 mov %dl,(%ecx)
109157: 41 inc %ecx
109158: 89 4d dc mov %ecx,-0x24(%ebp)
10915b: 40 inc %eax
10915c: 89 43 24 mov %eax,0x24(%ebx)
count--;
10915f: ff 4d e4 decl -0x1c(%ebp)
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
109162: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp)
109166: 74 08 je 109170 <rtems_termios_read+0x29e>
109168: 8b 43 24 mov 0x24(%ebx),%eax
10916b: 3b 43 20 cmp 0x20(%ebx),%eax
10916e: 7c dc jl 10914c <rtems_termios_read+0x27a>
*buffer++ = tty->cbuf[tty->cindex++];
count--;
}
args->bytes_moved = args->count - count;
109170: 8b 46 10 mov 0x10(%esi),%eax
109173: 2b 45 e4 sub -0x1c(%ebp),%eax
109176: 89 46 18 mov %eax,0x18(%esi)
tty->tty_rcvwakeup = 0;
109179: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx)
109180: 00 00 00
rtems_semaphore_release (tty->isem);
109183: 83 ec 0c sub $0xc,%esp
109186: ff 73 14 pushl 0x14(%ebx)
109189: e8 f2 0c 00 00 call 109e80 <rtems_semaphore_release>
return sc;
10918e: 83 c4 10 add $0x10,%esp
}
109191: 8b 45 d8 mov -0x28(%ebp),%eax
109194: 8d 65 f4 lea -0xc(%ebp),%esp
109197: 5b pop %ebx
109198: 5e pop %esi
109199: 5f pop %edi
10919a: 5d pop %ebp
10919b: c3 ret
00107d80 <rtems_termios_refill_transmitter>:
* in task-driven mode, this function is called in Tx task context
* in interrupt-driven mode, this function is called in TxIRQ context
*/
static int
rtems_termios_refill_transmitter (struct rtems_termios_tty *tty)
{
107d80: 55 push %ebp
107d81: 89 e5 mov %esp,%ebp
107d83: 57 push %edi
107d84: 56 push %esi
107d85: 53 push %ebx
107d86: 83 ec 0c sub $0xc,%esp
107d89: 89 c3 mov %eax,%ebx
int nToSend;
rtems_interrupt_level level;
int len;
/* check for XOF/XON to send */
if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF))
107d8b: 8b 80 b8 00 00 00 mov 0xb8(%eax),%eax
107d91: 25 03 04 00 00 and $0x403,%eax
107d96: 3d 01 04 00 00 cmp $0x401,%eax
107d9b: 75 24 jne 107dc1 <rtems_termios_refill_transmitter+0x41><== ALWAYS TAKEN
== (FL_MDXOF | FL_IREQXOF)) {
/* XOFF should be sent now... */
(*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1);
107d9d: 56 push %esi <== NOT EXECUTED
107d9e: 6a 01 push $0x1 <== NOT EXECUTED
107da0: 8d 43 4a lea 0x4a(%ebx),%eax <== NOT EXECUTED
107da3: 50 push %eax <== NOT EXECUTED
107da4: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
107da7: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED
rtems_interrupt_disable(level);
107dad: 9c pushf <== NOT EXECUTED
107dae: fa cli <== NOT EXECUTED
107daf: 5a pop %edx <== NOT EXECUTED
tty->t_dqlen--;
107db0: ff 8b 90 00 00 00 decl 0x90(%ebx) <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
107db6: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
107dbc: 83 c8 02 or $0x2,%eax <== NOT EXECUTED
107dbf: eb 30 jmp 107df1 <rtems_termios_refill_transmitter+0x71><== NOT EXECUTED
rtems_interrupt_enable(level);
nToSend = 1;
} else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) == FL_ISNTXOF) {
107dc1: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
107dc7: 83 e0 03 and $0x3,%eax
107dca: 83 f8 02 cmp $0x2,%eax
107dcd: 75 37 jne 107e06 <rtems_termios_refill_transmitter+0x86><== ALWAYS TAKEN
* FIXME: this .write call will generate another
* dequeue callback. This will advance the "Tail" in the data
* buffer, although the corresponding data is not yet out!
* Therefore the dequeue "length" should be reduced by 1
*/
(*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1);
107dcf: 51 push %ecx <== NOT EXECUTED
107dd0: 6a 01 push $0x1 <== NOT EXECUTED
107dd2: 8d 43 49 lea 0x49(%ebx),%eax <== NOT EXECUTED
107dd5: 50 push %eax <== NOT EXECUTED
107dd6: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
107dd9: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED
rtems_interrupt_disable(level);
107ddf: 9c pushf <== NOT EXECUTED
107de0: fa cli <== NOT EXECUTED
107de1: 5a pop %edx <== NOT EXECUTED
tty->t_dqlen--;
107de2: ff 8b 90 00 00 00 decl 0x90(%ebx) <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
107de8: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
107dee: 83 e0 fd and $0xfffffffd,%eax <== NOT EXECUTED
107df1: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
rtems_interrupt_enable(level);
107df7: 52 push %edx <== NOT EXECUTED
107df8: 9d popf <== NOT EXECUTED
107df9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
nToSend = 1;
107dfc: be 01 00 00 00 mov $0x1,%esi <== NOT EXECUTED
107e01: e9 37 01 00 00 jmp 107f3d <rtems_termios_refill_transmitter+0x1bd><== NOT EXECUTED
} else {
if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
107e06: 8b 93 80 00 00 00 mov 0x80(%ebx),%edx
107e0c: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax
107e12: 39 c2 cmp %eax,%edx
107e14: 75 25 jne 107e3b <rtems_termios_refill_transmitter+0xbb>
/*
* this should never happen...
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
}
return 0;
107e16: 31 f6 xor %esi,%esi
} else {
if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
/*
* buffer was empty
*/
if (tty->rawOutBufState == rob_wait) {
107e18: 83 bb 94 00 00 00 02 cmpl $0x2,0x94(%ebx)
107e1f: 0f 85 18 01 00 00 jne 107f3d <rtems_termios_refill_transmitter+0x1bd><== ALWAYS TAKEN
/*
* this should never happen...
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
107e25: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107e28: ff b3 8c 00 00 00 pushl 0x8c(%ebx) <== NOT EXECUTED
107e2e: e8 4d 20 00 00 call 109e80 <rtems_semaphore_release><== NOT EXECUTED
107e33: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
107e36: e9 02 01 00 00 jmp 107f3d <rtems_termios_refill_transmitter+0x1bd><== NOT EXECUTED
}
return 0;
}
rtems_interrupt_disable(level);
107e3b: 9c pushf
107e3c: fa cli
107e3d: 58 pop %eax
len = tty->t_dqlen;
107e3e: 8b bb 90 00 00 00 mov 0x90(%ebx),%edi
tty->t_dqlen = 0;
107e44: c7 83 90 00 00 00 00 movl $0x0,0x90(%ebx)
107e4b: 00 00 00
rtems_interrupt_enable(level);
107e4e: 50 push %eax
107e4f: 9d popf
newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size;
107e50: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax
107e56: 8b 8b 88 00 00 00 mov 0x88(%ebx),%ecx
107e5c: 01 f8 add %edi,%eax
107e5e: 31 d2 xor %edx,%edx
107e60: f7 f1 div %ecx
107e62: 89 d7 mov %edx,%edi
tty->rawOutBuf.Tail = newTail;
107e64: 89 93 84 00 00 00 mov %edx,0x84(%ebx)
if (tty->rawOutBufState == rob_wait) {
107e6a: 83 bb 94 00 00 00 02 cmpl $0x2,0x94(%ebx)
107e71: 75 11 jne 107e84 <rtems_termios_refill_transmitter+0x104>
/*
* wake up any pending writer task
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
107e73: 83 ec 0c sub $0xc,%esp
107e76: ff b3 8c 00 00 00 pushl 0x8c(%ebx)
107e7c: e8 ff 1f 00 00 call 109e80 <rtems_semaphore_release>
107e81: 83 c4 10 add $0x10,%esp
}
if (newTail == tty->rawOutBuf.Head) {
107e84: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax
107e8a: 39 c7 cmp %eax,%edi
107e8c: 75 2b jne 107eb9 <rtems_termios_refill_transmitter+0x139>
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
107e8e: c7 83 94 00 00 00 00 movl $0x0,0x94(%ebx)
107e95: 00 00 00
nToSend = 0;
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
107e98: 8b 83 d4 00 00 00 mov 0xd4(%ebx),%eax
107e9e: 85 c0 test %eax,%eax
107ea0: 0f 84 8f 00 00 00 je 107f35 <rtems_termios_refill_transmitter+0x1b5><== ALWAYS TAKEN
(*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg);
107ea6: 52 push %edx <== NOT EXECUTED
107ea7: 52 push %edx <== NOT EXECUTED
107ea8: ff b3 d8 00 00 00 pushl 0xd8(%ebx) <== NOT EXECUTED
107eae: 8d 53 30 lea 0x30(%ebx),%edx <== NOT EXECUTED
107eb1: 52 push %edx <== NOT EXECUTED
107eb2: ff d0 call *%eax <== NOT EXECUTED
107eb4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
107eb7: eb 7c jmp 107f35 <rtems_termios_refill_transmitter+0x1b5><== NOT EXECUTED
}
}
/* check, whether output should stop due to received XOFF */
else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF))
107eb9: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
107ebf: 25 10 02 00 00 and $0x210,%eax
107ec4: 3d 10 02 00 00 cmp $0x210,%eax
107ec9: 75 20 jne 107eeb <rtems_termios_refill_transmitter+0x16b><== ALWAYS TAKEN
== (FL_MDXON | FL_ORCVXOF)) {
/* Buffer not empty, but output stops due to XOFF */
/* set flag, that output has been stopped */
rtems_interrupt_disable(level);
107ecb: 9c pushf <== NOT EXECUTED
107ecc: fa cli <== NOT EXECUTED
107ecd: 5a pop %edx <== NOT EXECUTED
tty->flow_ctrl |= FL_OSTOP;
107ece: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
107ed4: 83 c8 20 or $0x20,%eax <== NOT EXECUTED
107ed7: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/
107edd: c7 83 94 00 00 00 01 movl $0x1,0x94(%ebx) <== NOT EXECUTED
107ee4: 00 00 00
rtems_interrupt_enable(level);
107ee7: 52 push %edx <== NOT EXECUTED
107ee8: 9d popf <== NOT EXECUTED
107ee9: eb 4a jmp 107f35 <rtems_termios_refill_transmitter+0x1b5><== NOT EXECUTED
nToSend = 0;
} else {
/*
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
107eeb: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax
107ef1: 39 c7 cmp %eax,%edi
107ef3: 76 08 jbe 107efd <rtems_termios_refill_transmitter+0x17d>
nToSend = tty->rawOutBuf.Size - newTail;
107ef5: 8b b3 88 00 00 00 mov 0x88(%ebx),%esi
107efb: eb 06 jmp 107f03 <rtems_termios_refill_transmitter+0x183>
else
nToSend = tty->rawOutBuf.Head - newTail;
107efd: 8b b3 80 00 00 00 mov 0x80(%ebx),%esi
107f03: 29 fe sub %edi,%esi
/* when flow control XON or XOF, don't send blocks of data */
/* to allow fast reaction on incoming flow ctrl and low latency*/
/* for outgoing flow control */
if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) {
107f05: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
107f0b: f6 c4 06 test $0x6,%ah
107f0e: 74 05 je 107f15 <rtems_termios_refill_transmitter+0x195>
nToSend = 1;
107f10: be 01 00 00 00 mov $0x1,%esi
}
tty->rawOutBufState = rob_busy; /*apm*/
107f15: c7 83 94 00 00 00 01 movl $0x1,0x94(%ebx)
107f1c: 00 00 00
(*tty->device.write)(
107f1f: 50 push %eax
107f20: 56 push %esi
107f21: 8b 43 7c mov 0x7c(%ebx),%eax
107f24: 01 f8 add %edi,%eax
107f26: 50 push %eax
107f27: ff 73 10 pushl 0x10(%ebx)
107f2a: ff 93 a4 00 00 00 call *0xa4(%ebx)
107f30: 83 c4 10 add $0x10,%esp
107f33: eb 02 jmp 107f37 <rtems_termios_refill_transmitter+0x1b7>
if (newTail == tty->rawOutBuf.Head) {
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
nToSend = 0;
107f35: 31 f6 xor %esi,%esi
}
tty->rawOutBufState = rob_busy; /*apm*/
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
107f37: 89 bb 84 00 00 00 mov %edi,0x84(%ebx)
}
return nToSend;
}
107f3d: 89 f0 mov %esi,%eax
107f3f: 8d 65 f4 lea -0xc(%ebp),%esp
107f42: 5b pop %ebx
107f43: 5e pop %esi
107f44: 5f pop %edi
107f45: 5d pop %ebp
107f46: c3 ret
00109431 <rtems_termios_rxdaemon>:
/*
* this task actually processes any receive events
*/
static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument)
{
109431: 55 push %ebp
109432: 89 e5 mov %esp,%ebp
109434: 57 push %edi
109435: 56 push %esi
109436: 53 push %ebx
109437: 83 ec 1c sub $0x1c,%esp
10943a: 8b 5d 08 mov 0x8(%ebp),%ebx
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
10943d: 8d 7d e4 lea -0x1c(%ebp),%edi
if (c != EOF) {
/*
* pollRead did call enqueue on its own
*/
c_buf = c;
rtems_termios_enqueue_raw_characters ( tty,&c_buf,1);
109440: 8d 75 e3 lea -0x1d(%ebp),%esi
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
109443: 57 push %edi
109444: 6a 00 push $0x0
109446: 6a 02 push $0x2
109448: 6a 03 push $0x3
10944a: e8 0d 04 00 00 call 10985c <rtems_event_receive>
(TERMIOS_RX_PROC_EVENT | TERMIOS_RX_TERMINATE_EVENT),
RTEMS_EVENT_ANY | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&the_event
);
if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) {
10944f: 83 c4 10 add $0x10,%esp
109452: f6 45 e4 01 testb $0x1,-0x1c(%ebp)
109456: 74 17 je 10946f <rtems_termios_rxdaemon+0x3e><== ALWAYS TAKEN
tty->rxTaskId = 0;
109458: c7 83 c4 00 00 00 00 movl $0x0,0xc4(%ebx) <== NOT EXECUTED
10945f: 00 00 00
rtems_task_delete(RTEMS_SELF);
109462: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
109465: 6a 00 push $0x0 <== NOT EXECUTED
109467: e8 dc 0b 00 00 call 10a048 <rtems_task_delete> <== NOT EXECUTED
10946c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
/*
* do something
*/
c = tty->device.pollRead(tty->minor);
10946f: 83 ec 0c sub $0xc,%esp
109472: ff 73 10 pushl 0x10(%ebx)
109475: ff 93 a0 00 00 00 call *0xa0(%ebx)
if (c != EOF) {
10947b: 83 c4 10 add $0x10,%esp
10947e: 83 f8 ff cmp $0xffffffff,%eax
109481: 74 c0 je 109443 <rtems_termios_rxdaemon+0x12>
/*
* pollRead did call enqueue on its own
*/
c_buf = c;
109483: 88 45 e3 mov %al,-0x1d(%ebp)
rtems_termios_enqueue_raw_characters ( tty,&c_buf,1);
109486: 50 push %eax
109487: 6a 01 push $0x1
109489: 56 push %esi
10948a: 53 push %ebx
10948b: e8 27 fd ff ff call 1091b7 <rtems_termios_enqueue_raw_characters>
109490: 83 c4 10 add $0x10,%esp
109493: eb ae jmp 109443 <rtems_termios_rxdaemon+0x12>
00107f47 <rtems_termios_txdaemon>:
/*
* this task actually processes any transmit events
*/
static rtems_task rtems_termios_txdaemon(rtems_task_argument argument)
{
107f47: 55 push %ebp
107f48: 89 e5 mov %esp,%ebp
107f4a: 56 push %esi
107f4b: 53 push %ebx
107f4c: 83 ec 10 sub $0x10,%esp
107f4f: 8b 5d 08 mov 0x8(%ebp),%ebx
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
107f52: 8d 75 f4 lea -0xc(%ebp),%esi
107f55: 56 push %esi
107f56: 6a 00 push $0x0
107f58: 6a 02 push $0x2
107f5a: 6a 03 push $0x3
107f5c: e8 fb 18 00 00 call 10985c <rtems_event_receive>
(TERMIOS_TX_START_EVENT | TERMIOS_TX_TERMINATE_EVENT),
RTEMS_EVENT_ANY | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&the_event
);
if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) {
107f61: 83 c4 10 add $0x10,%esp
107f64: f6 45 f4 01 testb $0x1,-0xc(%ebp)
107f68: 74 17 je 107f81 <rtems_termios_txdaemon+0x3a><== ALWAYS TAKEN
tty->txTaskId = 0;
107f6a: c7 83 c8 00 00 00 00 movl $0x0,0xc8(%ebx) <== NOT EXECUTED
107f71: 00 00 00
rtems_task_delete(RTEMS_SELF);
107f74: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107f77: 6a 00 push $0x0 <== NOT EXECUTED
107f79: e8 ca 20 00 00 call 10a048 <rtems_task_delete> <== NOT EXECUTED
107f7e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
107f81: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax
107f87: c1 e0 05 shl $0x5,%eax
107f8a: 8b 80 d4 df 12 00 mov 0x12dfd4(%eax),%eax
107f90: 85 c0 test %eax,%eax
107f92: 74 09 je 107f9d <rtems_termios_txdaemon+0x56><== ALWAYS TAKEN
rtems_termios_linesw[tty->t_line].l_start(tty);
107f94: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107f97: 53 push %ebx <== NOT EXECUTED
107f98: ff d0 call *%eax <== NOT EXECUTED
107f9a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
/*
* try to push further characters to device
*/
rtems_termios_refill_transmitter(tty);
107f9d: 89 d8 mov %ebx,%eax
107f9f: e8 dc fd ff ff call 107d80 <rtems_termios_refill_transmitter>
}
107fa4: eb af jmp 107f55 <rtems_termios_txdaemon+0xe>
00108e2f <rtems_termios_write>:
rtems_termios_puts (&c, 1, tty);
}
rtems_status_code
rtems_termios_write (void *arg)
{
108e2f: 55 push %ebp
108e30: 89 e5 mov %esp,%ebp
108e32: 57 push %edi
108e33: 56 push %esi
108e34: 53 push %ebx
108e35: 83 ec 20 sub $0x20,%esp
108e38: 8b 5d 08 mov 0x8(%ebp),%ebx
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
108e3b: 8b 03 mov (%ebx),%eax
108e3d: 8b 70 2c mov 0x2c(%eax),%esi
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
108e40: 6a 00 push $0x0
108e42: 6a 00 push $0x0
108e44: ff 76 18 pushl 0x18(%esi)
108e47: e8 44 0f 00 00 call 109d90 <rtems_semaphore_obtain>
108e4c: 89 c7 mov %eax,%edi
if (sc != RTEMS_SUCCESSFUL)
108e4e: 83 c4 10 add $0x10,%esp
108e51: 85 c0 test %eax,%eax
108e53: 75 73 jne 108ec8 <rtems_termios_write+0x99><== NEVER TAKEN
return sc;
if (rtems_termios_linesw[tty->t_line].l_write != NULL) {
108e55: 8b 86 cc 00 00 00 mov 0xcc(%esi),%eax
108e5b: c1 e0 05 shl $0x5,%eax
108e5e: 8b 80 cc df 12 00 mov 0x12dfcc(%eax),%eax
108e64: 85 c0 test %eax,%eax
108e66: 74 0b je 108e73 <rtems_termios_write+0x44>
sc = rtems_termios_linesw[tty->t_line].l_write(tty,args);
108e68: 52 push %edx
108e69: 52 push %edx
108e6a: 53 push %ebx
108e6b: 56 push %esi
108e6c: ff d0 call *%eax
108e6e: 89 c7 mov %eax,%edi
rtems_semaphore_release (tty->osem);
108e70: 59 pop %ecx
108e71: eb 4a jmp 108ebd <rtems_termios_write+0x8e>
return sc;
}
if (tty->termios.c_oflag & OPOST) {
108e73: f6 46 34 01 testb $0x1,0x34(%esi)
108e77: 74 2b je 108ea4 <rtems_termios_write+0x75><== NEVER TAKEN
uint32_t count = args->count;
char *buffer = args->buffer;
108e79: 8b 4b 0c mov 0xc(%ebx),%ecx
}
rtems_termios_puts (&c, 1, tty);
}
rtems_status_code
rtems_termios_write (void *arg)
108e7c: 8b 43 10 mov 0x10(%ebx),%eax
108e7f: 01 c8 add %ecx,%eax
108e81: 89 45 e4 mov %eax,-0x1c(%ebp)
return sc;
}
if (tty->termios.c_oflag & OPOST) {
uint32_t count = args->count;
char *buffer = args->buffer;
while (count--)
108e84: eb 11 jmp 108e97 <rtems_termios_write+0x68>
oproc (*buffer++, tty);
108e86: 0f b6 01 movzbl (%ecx),%eax
108e89: 41 inc %ecx
108e8a: 89 f2 mov %esi,%edx
108e8c: 89 4d e0 mov %ecx,-0x20(%ebp)
108e8f: e8 3d fb ff ff call 1089d1 <oproc>
108e94: 8b 4d e0 mov -0x20(%ebp),%ecx
return sc;
}
if (tty->termios.c_oflag & OPOST) {
uint32_t count = args->count;
char *buffer = args->buffer;
while (count--)
108e97: 3b 4d e4 cmp -0x1c(%ebp),%ecx
108e9a: 75 ea jne 108e86 <rtems_termios_write+0x57>
oproc (*buffer++, tty);
args->bytes_moved = args->count;
108e9c: 8b 43 10 mov 0x10(%ebx),%eax
108e9f: 89 43 18 mov %eax,0x18(%ebx)
108ea2: eb 16 jmp 108eba <rtems_termios_write+0x8b>
} else {
rtems_termios_puts (args->buffer, args->count, tty);
108ea4: 50 push %eax <== NOT EXECUTED
108ea5: 56 push %esi <== NOT EXECUTED
108ea6: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
108ea9: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED
108eac: e8 14 fa ff ff call 1088c5 <rtems_termios_puts> <== NOT EXECUTED
args->bytes_moved = args->count;
108eb1: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED
108eb4: 89 43 18 mov %eax,0x18(%ebx) <== NOT EXECUTED
108eb7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
rtems_semaphore_release (tty->osem);
108eba: 83 ec 0c sub $0xc,%esp
108ebd: ff 76 18 pushl 0x18(%esi)
108ec0: e8 bb 0f 00 00 call 109e80 <rtems_semaphore_release>
return sc;
108ec5: 83 c4 10 add $0x10,%esp
}
108ec8: 89 f8 mov %edi,%eax
108eca: 8d 65 f4 lea -0xc(%ebp),%esp
108ecd: 5b pop %ebx
108ece: 5e pop %esi
108ecf: 5f pop %edi
108ed0: 5d pop %ebp
108ed1: c3 ret
00115fac <rtems_timer_cancel>:
*/
rtems_status_code rtems_timer_cancel(
rtems_id id
)
{
115fac: 55 push %ebp
115fad: 89 e5 mov %esp,%ebp
115faf: 83 ec 1c sub $0x1c,%esp
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
115fb2: 8d 45 f4 lea -0xc(%ebp),%eax
RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
115fb5: 50 push %eax
115fb6: ff 75 08 pushl 0x8(%ebp)
115fb9: 68 84 87 14 00 push $0x148784
115fbe: e8 2d 28 00 00 call 1187f0 <_Objects_Get>
switch ( location ) {
115fc3: 83 c4 10 add $0x10,%esp
115fc6: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
115fca: 75 1e jne 115fea <rtems_timer_cancel+0x3e>
case OBJECTS_LOCAL:
if ( !_Timer_Is_dormant_class( the_timer->the_class ) )
115fcc: 83 78 38 04 cmpl $0x4,0x38(%eax)
115fd0: 74 0f je 115fe1 <rtems_timer_cancel+0x35><== NEVER TAKEN
(void) _Watchdog_Remove( &the_timer->Ticker );
115fd2: 83 ec 0c sub $0xc,%esp
115fd5: 83 c0 10 add $0x10,%eax
115fd8: 50 push %eax
115fd9: e8 62 41 00 00 call 11a140 <_Watchdog_Remove>
115fde: 83 c4 10 add $0x10,%esp
_Thread_Enable_dispatch();
115fe1: e8 ae 33 00 00 call 119394 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
115fe6: 31 c0 xor %eax,%eax
115fe8: eb 05 jmp 115fef <rtems_timer_cancel+0x43>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
115fea: b8 04 00 00 00 mov $0x4,%eax
}
115fef: c9 leave
115ff0: c3 ret
001168b9 <rtems_timer_initiate_server>:
rtems_status_code rtems_timer_initiate_server(
uint32_t priority,
uint32_t stack_size,
rtems_attribute attribute_set
)
{
1168b9: 55 push %ebp
1168ba: 89 e5 mov %esp,%ebp
1168bc: 53 push %ebx
1168bd: 83 ec 24 sub $0x24,%esp
1168c0: 8b 55 08 mov 0x8(%ebp),%edx
*/
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
1168c3: 31 c0 xor %eax,%eax
1168c5: 85 d2 test %edx,%edx
1168c7: 74 0f je 1168d8 <rtems_timer_initiate_server+0x1f>
( the_priority <= RTEMS_MAXIMUM_PRIORITY ) );
1168c9: 0f b6 05 48 f8 13 00 movzbl 0x13f848,%eax
*/
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
1168d0: 39 c2 cmp %eax,%edx
1168d2: 0f 96 c0 setbe %al
1168d5: 0f b6 c0 movzbl %al,%eax
* Make sure the requested priority is valid. The if is
* structured so we check it is invalid before looking for
* a specific invalid value as the default.
*/
_priority = priority;
if ( !_RTEMS_tasks_Priority_is_valid( priority ) ) {
1168d8: 85 c0 test %eax,%eax
1168da: 75 0d jne 1168e9 <rtems_timer_initiate_server+0x30>
if ( priority != RTEMS_TIMER_SERVER_DEFAULT_PRIORITY )
return RTEMS_INVALID_PRIORITY;
1168dc: b0 13 mov $0x13,%al
* structured so we check it is invalid before looking for
* a specific invalid value as the default.
*/
_priority = priority;
if ( !_RTEMS_tasks_Priority_is_valid( priority ) ) {
if ( priority != RTEMS_TIMER_SERVER_DEFAULT_PRIORITY )
1168de: 42 inc %edx
1168df: 0f 85 5c 01 00 00 jne 116a41 <rtems_timer_initiate_server+0x188>
return RTEMS_INVALID_PRIORITY;
_priority = 0;
1168e5: 31 db xor %ebx,%ebx
1168e7: eb 02 jmp 1168eb <rtems_timer_initiate_server+0x32>
* Make sure the requested priority is valid. The if is
* structured so we check it is invalid before looking for
* a specific invalid value as the default.
*/
_priority = priority;
if ( !_RTEMS_tasks_Priority_is_valid( priority ) ) {
1168e9: 89 d3 mov %edx,%ebx
1168eb: e8 78 fc ff ff call 116568 <_Thread_Dispatch_increment_disable_level>
/*
* Just to make sure this is only called once.
*/
_Thread_Disable_dispatch();
tmpInitialized = initialized;
1168f0: 8a 15 c0 37 14 00 mov 0x1437c0,%dl
initialized = true;
1168f6: c6 05 c0 37 14 00 01 movb $0x1,0x1437c0
_Thread_Enable_dispatch();
1168fd: 88 55 e4 mov %dl,-0x1c(%ebp)
116900: e8 8f 2a 00 00 call 119394 <_Thread_Enable_dispatch>
if ( tmpInitialized )
return RTEMS_INCORRECT_STATE;
116905: b8 0e 00 00 00 mov $0xe,%eax
_Thread_Disable_dispatch();
tmpInitialized = initialized;
initialized = true;
_Thread_Enable_dispatch();
if ( tmpInitialized )
11690a: 8a 55 e4 mov -0x1c(%ebp),%dl
11690d: 84 d2 test %dl,%dl
11690f: 0f 85 2c 01 00 00 jne 116a41 <rtems_timer_initiate_server+0x188><== NEVER TAKEN
* other library rules. For example, if using a TSR written in Ada the
* Server should run at the same priority as the priority Ada task.
* Otherwise, the priority ceiling for the mutex used to protect the
* GNAT run-time is violated.
*/
status = rtems_task_create(
116915: 50 push %eax
116916: 50 push %eax
116917: 8d 45 f4 lea -0xc(%ebp),%eax
11691a: 50 push %eax
11691b: 8b 45 10 mov 0x10(%ebp),%eax
11691e: 80 cc 80 or $0x80,%ah
116921: 50 push %eax
116922: 68 00 01 00 00 push $0x100
116927: ff 75 0c pushl 0xc(%ebp)
11692a: 53 push %ebx
11692b: 68 45 4d 49 54 push $0x54494d45
116930: e8 77 ee ff ff call 1157ac <rtems_task_create>
/* user may want floating point but we need */
/* system task specified for 0 priority */
attribute_set | RTEMS_SYSTEM_TASK,
&id /* get the id back */
);
if (status) {
116935: 83 c4 20 add $0x20,%esp
116938: 85 c0 test %eax,%eax
11693a: 74 0c je 116948 <rtems_timer_initiate_server+0x8f>
initialized = false;
11693c: c6 05 c0 37 14 00 00 movb $0x0,0x1437c0
116943: e9 f9 00 00 00 jmp 116a41 <rtems_timer_initiate_server+0x188>
* We work with the TCB pointer, not the ID, so we need to convert
* to a TCB pointer from here out.
*/
ts->thread = (Thread_Control *)_Objects_Get_local_object(
&_RTEMS_tasks_Information,
_Objects_Get_index(id)
116948: 8b 5d f4 mov -0xc(%ebp),%ebx
*/
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return NULL;
#endif
return information->local_table[ index ];
11694b: 0f b7 d3 movzwl %bx,%edx
11694e: a1 ec 7d 14 00 mov 0x147dec,%eax
116953: 8b 04 90 mov (%eax,%edx,4),%eax
/*
* We work with the TCB pointer, not the ID, so we need to convert
* to a TCB pointer from here out.
*/
ts->thread = (Thread_Control *)_Objects_Get_local_object(
116956: a3 c4 37 14 00 mov %eax,0x1437c4
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
11695b: c7 05 f4 37 14 00 f8 movl $0x1437f8,0x1437f4
116962: 37 14 00
head->previous = NULL;
116965: c7 05 f8 37 14 00 00 movl $0x0,0x1437f8
11696c: 00 00 00
tail->previous = head;
11696f: c7 05 fc 37 14 00 f4 movl $0x1437f4,0x1437fc
116976: 37 14 00
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
116979: c7 05 2c 38 14 00 30 movl $0x143830,0x14382c
116980: 38 14 00
head->previous = NULL;
116983: c7 05 30 38 14 00 00 movl $0x0,0x143830
11698a: 00 00 00
tail->previous = head;
11698d: c7 05 34 38 14 00 2c movl $0x14382c,0x143834
116994: 38 14 00
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
116997: c7 05 d4 37 14 00 00 movl $0x0,0x1437d4
11699e: 00 00 00
the_watchdog->routine = routine;
1169a1: c7 05 e8 37 14 00 18 movl $0x119218,0x1437e8
1169a8: 92 11 00
the_watchdog->id = id;
1169ab: 89 1d ec 37 14 00 mov %ebx,0x1437ec
the_watchdog->user_data = user_data;
1169b1: c7 05 f0 37 14 00 00 movl $0x0,0x1437f0
1169b8: 00 00 00
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
1169bb: c7 05 0c 38 14 00 00 movl $0x0,0x14380c
1169c2: 00 00 00
the_watchdog->routine = routine;
1169c5: c7 05 20 38 14 00 18 movl $0x119218,0x143820
1169cc: 92 11 00
the_watchdog->id = id;
1169cf: 89 1d 24 38 14 00 mov %ebx,0x143824
the_watchdog->user_data = user_data;
1169d5: c7 05 28 38 14 00 00 movl $0x0,0x143828
1169dc: 00 00 00
/*
* Initialize the pointer to the timer schedule method so applications that
* do not use the Timer Server do not have to pull it in.
*/
ts->schedule_operation = _Timer_server_Schedule_operation_method;
1169df: c7 05 c8 37 14 00 09 movl $0x116609,0x1437c8
1169e6: 66 11 00
ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot;
1169e9: a1 48 7f 14 00 mov 0x147f48,%eax
1169ee: a3 00 38 14 00 mov %eax,0x143800
1169f3: 6a 00 push $0x0
1169f5: 68 00 ca 9a 3b push $0x3b9aca00
1169fa: ff 35 14 7e 14 00 pushl 0x147e14
116a00: ff 35 10 7e 14 00 pushl 0x147e10
116a06: e8 e9 3b 01 00 call 12a5f4 <__divdi3>
116a0b: 83 c4 0c add $0xc,%esp
ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
116a0e: a3 38 38 14 00 mov %eax,0x143838
ts->insert_chain = NULL;
116a13: c7 05 3c 38 14 00 00 movl $0x0,0x14383c
116a1a: 00 00 00
ts->active = false;
116a1d: c6 05 40 38 14 00 00 movb $0x0,0x143840
/*
* The default timer server is now available.
*/
_Timer_server = ts;
116a24: c7 05 c4 87 14 00 c4 movl $0x1437c4,0x1487c4
116a2b: 37 14 00
/*
* Start the timer server
*/
status = rtems_task_start(
116a2e: 68 c4 37 14 00 push $0x1437c4
116a33: 68 32 67 11 00 push $0x116732
116a38: 53 push %ebx
116a39: e8 56 f3 ff ff call 115d94 <rtems_task_start>
116a3e: 83 c4 10 add $0x10,%esp
initialized = false;
}
#endif
return status;
}
116a41: 8b 5d fc mov -0x4(%ebp),%ebx
116a44: c9 leave
116a45: c3 ret
0011645c <rtems_timer_server_fire_when>:
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
11645c: 55 push %ebp
11645d: 89 e5 mov %esp,%ebp
11645f: 57 push %edi
116460: 56 push %esi
116461: 53 push %ebx
116462: 83 ec 1c sub $0x1c,%esp
116465: 8b 75 0c mov 0xc(%ebp),%esi
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
116468: 8b 1d c4 87 14 00 mov 0x1487c4,%ebx
if ( !timer_server )
11646e: 85 db test %ebx,%ebx
116470: 0f 84 e1 00 00 00 je 116557 <rtems_timer_server_fire_when+0xfb>
return RTEMS_INCORRECT_STATE;
if ( !_TOD.is_set )
return RTEMS_NOT_DEFINED;
116476: b8 0b 00 00 00 mov $0xb,%eax
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
return RTEMS_INCORRECT_STATE;
if ( !_TOD.is_set )
11647b: 80 3d 24 7e 14 00 00 cmpb $0x0,0x147e24
116482: 0f 84 d6 00 00 00 je 11655e <rtems_timer_server_fire_when+0x102><== NEVER TAKEN
return RTEMS_NOT_DEFINED;
if ( !routine )
return RTEMS_INVALID_ADDRESS;
116488: b0 09 mov $0x9,%al
return RTEMS_INCORRECT_STATE;
if ( !_TOD.is_set )
return RTEMS_NOT_DEFINED;
if ( !routine )
11648a: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
11648e: 0f 84 ca 00 00 00 je 11655e <rtems_timer_server_fire_when+0x102>
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
116494: 83 ec 0c sub $0xc,%esp
116497: 56 push %esi
116498: e8 b3 d4 ff ff call 113950 <_TOD_Validate>
11649d: 83 c4 10 add $0x10,%esp
1164a0: 84 c0 test %al,%al
1164a2: 75 0a jne 1164ae <rtems_timer_server_fire_when+0x52>
return RTEMS_INVALID_CLOCK;
1164a4: b8 14 00 00 00 mov $0x14,%eax
1164a9: e9 b0 00 00 00 jmp 11655e <rtems_timer_server_fire_when+0x102>
seconds = _TOD_To_seconds( wall_time );
1164ae: 83 ec 0c sub $0xc,%esp
1164b1: 56 push %esi
1164b2: e8 25 d4 ff ff call 1138dc <_TOD_To_seconds>
1164b7: 89 c6 mov %eax,%esi
1164b9: 6a 00 push $0x0
1164bb: 68 00 ca 9a 3b push $0x3b9aca00
1164c0: ff 35 14 7e 14 00 pushl 0x147e14
1164c6: ff 35 10 7e 14 00 pushl 0x147e10
1164cc: e8 23 41 01 00 call 12a5f4 <__divdi3>
if ( seconds <= _TOD_Seconds_since_epoch() )
1164d1: 83 c4 20 add $0x20,%esp
1164d4: 39 c6 cmp %eax,%esi
1164d6: 76 cc jbe 1164a4 <rtems_timer_server_fire_when+0x48>
1164d8: 50 push %eax
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
1164d9: 8d 45 e4 lea -0x1c(%ebp),%eax
1164dc: 50 push %eax
1164dd: ff 75 08 pushl 0x8(%ebp)
1164e0: 68 84 87 14 00 push $0x148784
1164e5: e8 06 23 00 00 call 1187f0 <_Objects_Get>
1164ea: 89 c7 mov %eax,%edi
switch ( location ) {
1164ec: 83 c4 10 add $0x10,%esp
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
1164ef: b8 04 00 00 00 mov $0x4,%eax
seconds = _TOD_To_seconds( wall_time );
if ( seconds <= _TOD_Seconds_since_epoch() )
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
1164f4: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp)
1164f8: 75 64 jne 11655e <rtems_timer_server_fire_when+0x102>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
1164fa: 83 ec 0c sub $0xc,%esp
1164fd: 8d 47 10 lea 0x10(%edi),%eax
116500: 50 push %eax
116501: e8 3a 3c 00 00 call 11a140 <_Watchdog_Remove>
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
116506: c7 47 38 03 00 00 00 movl $0x3,0x38(%edi)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
11650d: c7 47 18 00 00 00 00 movl $0x0,0x18(%edi)
the_watchdog->routine = routine;
116514: 8b 45 10 mov 0x10(%ebp),%eax
116517: 89 47 2c mov %eax,0x2c(%edi)
the_watchdog->id = id;
11651a: 8b 45 08 mov 0x8(%ebp),%eax
11651d: 89 47 30 mov %eax,0x30(%edi)
the_watchdog->user_data = user_data;
116520: 8b 45 14 mov 0x14(%ebp),%eax
116523: 89 47 34 mov %eax,0x34(%edi)
116526: 6a 00 push $0x0
116528: 68 00 ca 9a 3b push $0x3b9aca00
11652d: ff 35 14 7e 14 00 pushl 0x147e14
116533: ff 35 10 7e 14 00 pushl 0x147e10
116539: e8 b6 40 01 00 call 12a5f4 <__divdi3>
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
11653e: 29 c6 sub %eax,%esi
116540: 89 77 1c mov %esi,0x1c(%edi)
(*timer_server->schedule_operation)( timer_server, the_timer );
116543: 83 c4 18 add $0x18,%esp
116546: 57 push %edi
116547: 53 push %ebx
116548: ff 53 04 call *0x4(%ebx)
_Thread_Enable_dispatch();
11654b: e8 44 2e 00 00 call 119394 <_Thread_Enable_dispatch>
116550: 83 c4 10 add $0x10,%esp
return RTEMS_SUCCESSFUL;
116553: 31 c0 xor %eax,%eax
116555: eb 07 jmp 11655e <rtems_timer_server_fire_when+0x102>
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
return RTEMS_INCORRECT_STATE;
116557: b8 0e 00 00 00 mov $0xe,%eax
11655c: eb 00 jmp 11655e <rtems_timer_server_fire_when+0x102>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11655e: 8d 65 f4 lea -0xc(%ebp),%esp
116561: 5b pop %ebx
116562: 5e pop %esi
116563: 5f pop %edi
116564: 5d pop %ebp
116565: c3 ret
0010657d <rtems_verror>:
static int rtems_verror(
rtems_error_code_t error_flag,
const char *printf_format,
va_list arglist
)
{
10657d: 55 push %ebp
10657e: 89 e5 mov %esp,%ebp
106580: 57 push %edi
106581: 56 push %esi
106582: 53 push %ebx
106583: 83 ec 1c sub $0x1c,%esp
106586: 89 c3 mov %eax,%ebx
106588: 89 55 e4 mov %edx,-0x1c(%ebp)
10658b: 89 cf mov %ecx,%edi
int local_errno = 0;
int chars_written = 0;
rtems_status_code status;
if (error_flag & RTEMS_ERROR_PANIC) {
10658d: a9 00 00 00 20 test $0x20000000,%eax
106592: 75 27 jne 1065bb <rtems_verror+0x3e>
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
106594: 83 ec 0c sub $0xc,%esp
106597: a1 a0 c2 12 00 mov 0x12c2a0,%eax
10659c: ff 70 08 pushl 0x8(%eax)
10659f: e8 a0 ac 00 00 call 111244 <fflush>
status = error_flag & ~RTEMS_ERROR_MASK;
1065a4: 89 de mov %ebx,%esi
1065a6: 81 e6 ff ff ff 8f and $0x8fffffff,%esi
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
1065ac: 83 c4 10 add $0x10,%esp
1065af: 81 e3 00 00 00 40 and $0x40000000,%ebx
1065b5: 75 36 jne 1065ed <rtems_verror+0x70>
rtems_error_code_t error_flag,
const char *printf_format,
va_list arglist
)
{
int local_errno = 0;
1065b7: 31 db xor %ebx,%ebx
1065b9: eb 39 jmp 1065f4 <rtems_verror+0x77>
int chars_written = 0;
rtems_status_code status;
if (error_flag & RTEMS_ERROR_PANIC) {
if (rtems_panic_in_progress++)
1065bb: a1 cc e2 12 00 mov 0x12e2cc,%eax
1065c0: 8d 50 01 lea 0x1(%eax),%edx
1065c3: 89 15 cc e2 12 00 mov %edx,0x12e2cc
1065c9: 85 c0 test %eax,%eax
1065cb: 74 10 je 1065dd <rtems_verror+0x60> <== ALWAYS TAKEN
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
1065cd: a1 e4 e3 12 00 mov 0x12e3e4,%eax <== NOT EXECUTED
1065d2: 40 inc %eax <== NOT EXECUTED
1065d3: a3 e4 e3 12 00 mov %eax,0x12e3e4 <== NOT EXECUTED
return _Thread_Dispatch_disable_level;
1065d8: a1 e4 e3 12 00 mov 0x12e3e4,%eax <== NOT EXECUTED
_Thread_Disable_dispatch(); /* disable task switches */
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
return 0;
1065dd: 31 f6 xor %esi,%esi
if (error_flag & RTEMS_ERROR_PANIC) {
if (rtems_panic_in_progress++)
_Thread_Disable_dispatch(); /* disable task switches */
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
1065df: 83 3d cc e2 12 00 02 cmpl $0x2,0x12e2cc
1065e6: 7e ac jle 106594 <rtems_verror+0x17> <== ALWAYS TAKEN
1065e8: e9 b3 00 00 00 jmp 1066a0 <rtems_verror+0x123> <== NOT EXECUTED
(void) fflush(stdout); /* in case stdout/stderr same */
status = error_flag & ~RTEMS_ERROR_MASK;
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
local_errno = errno;
1065ed: e8 ea a8 00 00 call 110edc <__errno>
1065f2: 8b 18 mov (%eax),%ebx
#if defined(RTEMS_MULTIPROCESSING)
if (_System_state_Is_multiprocessing)
fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node);
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
1065f4: 50 push %eax
1065f5: 57 push %edi
1065f6: ff 75 e4 pushl -0x1c(%ebp)
1065f9: a1 a0 c2 12 00 mov 0x12c2a0,%eax
1065fe: ff 70 0c pushl 0xc(%eax)
106601: e8 ea 26 01 00 call 118cf0 <vfprintf>
106606: 89 c7 mov %eax,%edi
if (status)
106608: 83 c4 10 add $0x10,%esp
10660b: 85 f6 test %esi,%esi
10660d: 74 24 je 106633 <rtems_verror+0xb6>
chars_written +=
fprintf(stderr, " (status: %s)", rtems_status_text(status));
10660f: 83 ec 0c sub $0xc,%esp
106612: 56 push %esi
106613: e8 50 ff ff ff call 106568 <rtems_status_text>
106618: 83 c4 0c add $0xc,%esp
10661b: 50 push %eax
10661c: 68 b1 f3 11 00 push $0x11f3b1
106621: a1 a0 c2 12 00 mov 0x12c2a0,%eax
106626: ff 70 0c pushl 0xc(%eax)
106629: e8 d6 af 00 00 call 111604 <fprintf>
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
if (status)
chars_written +=
10662e: 01 c7 add %eax,%edi
106630: 83 c4 10 add $0x10,%esp
fprintf(stderr, " (status: %s)", rtems_status_text(status));
if (local_errno) {
106633: 83 fb 00 cmp $0x0,%ebx
106636: 74 40 je 106678 <rtems_verror+0xfb>
if ((local_errno > 0) && *strerror(local_errno))
106638: 7e 25 jle 10665f <rtems_verror+0xe2>
10663a: 83 ec 0c sub $0xc,%esp
10663d: 53 push %ebx
10663e: e8 71 ba 00 00 call 1120b4 <strerror>
106643: 83 c4 10 add $0x10,%esp
106646: 80 38 00 cmpb $0x0,(%eax)
106649: 74 14 je 10665f <rtems_verror+0xe2> <== NEVER TAKEN
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
10664b: 83 ec 0c sub $0xc,%esp
10664e: 53 push %ebx
10664f: e8 60 ba 00 00 call 1120b4 <strerror>
106654: 83 c4 0c add $0xc,%esp
106657: 50 push %eax
106658: 68 bf f3 11 00 push $0x11f3bf
10665d: eb 07 jmp 106666 <rtems_verror+0xe9>
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
10665f: 51 push %ecx
106660: 53 push %ebx
106661: 68 cc f3 11 00 push $0x11f3cc
106666: a1 a0 c2 12 00 mov 0x12c2a0,%eax
10666b: ff 70 0c pushl 0xc(%eax)
10666e: e8 91 af 00 00 call 111604 <fprintf>
106673: 01 c7 add %eax,%edi
106675: 83 c4 10 add $0x10,%esp
}
chars_written += fprintf(stderr, "\n");
106678: 50 push %eax
106679: 50 push %eax
10667a: 68 af fc 11 00 push $0x11fcaf
10667f: a1 a0 c2 12 00 mov 0x12c2a0,%eax
106684: ff 70 0c pushl 0xc(%eax)
106687: e8 78 af 00 00 call 111604 <fprintf>
10668c: 8d 34 07 lea (%edi,%eax,1),%esi
(void) fflush(stderr);
10668f: 5a pop %edx
106690: a1 a0 c2 12 00 mov 0x12c2a0,%eax
106695: ff 70 0c pushl 0xc(%eax)
106698: e8 a7 ab 00 00 call 111244 <fflush>
return chars_written;
10669d: 83 c4 10 add $0x10,%esp
}
1066a0: 89 f0 mov %esi,%eax
1066a2: 8d 65 f4 lea -0xc(%ebp),%esp
1066a5: 5b pop %ebx
1066a6: 5e pop %esi
1066a7: 5f pop %edi
1066a8: 5d pop %ebp
1066a9: c3 ret
00121e9c <scanInt>:
/*
* Extract an integer value from the database
*/
static int
scanInt(FILE *fp, int *val)
{
121e9c: 55 push %ebp
121e9d: 89 e5 mov %esp,%ebp
121e9f: 57 push %edi
121ea0: 56 push %esi
121ea1: 53 push %ebx
121ea2: 83 ec 1c sub $0x1c,%esp
121ea5: 89 c6 mov %eax,%esi
121ea7: 89 55 dc mov %edx,-0x24(%ebp)
int c;
unsigned int i = 0;
unsigned int limit = INT_MAX;
int sign = 0;
121eaa: 31 db xor %ebx,%ebx
static int
scanInt(FILE *fp, int *val)
{
int c;
unsigned int i = 0;
unsigned int limit = INT_MAX;
121eac: c7 45 e4 ff ff ff 7f movl $0x7fffffff,-0x1c(%ebp)
*/
static int
scanInt(FILE *fp, int *val)
{
int c;
unsigned int i = 0;
121eb3: 31 ff xor %edi,%edi
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
121eb5: ff 4e 04 decl 0x4(%esi)
121eb8: 79 13 jns 121ecd <scanInt+0x31> <== ALWAYS TAKEN
121eba: 50 push %eax <== NOT EXECUTED
121ebb: 50 push %eax <== NOT EXECUTED
121ebc: 56 push %esi <== NOT EXECUTED
121ebd: ff 35 20 91 16 00 pushl 0x169120 <== NOT EXECUTED
121ec3: e8 78 40 01 00 call 135f40 <__srget_r> <== NOT EXECUTED
121ec8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
121ecb: eb 08 jmp 121ed5 <scanInt+0x39> <== NOT EXECUTED
121ecd: 8b 16 mov (%esi),%edx
121ecf: 0f b6 02 movzbl (%edx),%eax
121ed2: 42 inc %edx
121ed3: 89 16 mov %edx,(%esi)
if (c == ':')
121ed5: 83 f8 3a cmp $0x3a,%eax
121ed8: 74 45 je 121f1f <scanInt+0x83>
break;
if (sign == 0) {
121eda: 85 db test %ebx,%ebx
121edc: 75 0f jne 121eed <scanInt+0x51>
if (c == '-') {
sign = -1;
limit++;
continue;
}
sign = 1;
121ede: b3 01 mov $0x1,%bl
for (;;) {
c = getc(fp);
if (c == ':')
break;
if (sign == 0) {
if (c == '-') {
121ee0: 83 f8 2d cmp $0x2d,%eax
121ee3: 75 08 jne 121eed <scanInt+0x51>
sign = -1;
limit++;
121ee5: ff 45 e4 incl -0x1c(%ebp)
c = getc(fp);
if (c == ':')
break;
if (sign == 0) {
if (c == '-') {
sign = -1;
121ee8: 83 cb ff or $0xffffffff,%ebx
limit++;
continue;
121eeb: eb c8 jmp 121eb5 <scanInt+0x19>
}
sign = 1;
}
if (!isdigit(c))
121eed: 8b 15 00 91 16 00 mov 0x169100,%edx
121ef3: f6 44 02 01 04 testb $0x4,0x1(%edx,%eax,1)
121ef8: 74 3a je 121f34 <scanInt+0x98>
return 0;
d = c - '0';
121efa: 83 e8 30 sub $0x30,%eax
121efd: 89 45 e0 mov %eax,-0x20(%ebp)
if ((i > (limit / 10))
121f00: b9 0a 00 00 00 mov $0xa,%ecx
121f05: 8b 45 e4 mov -0x1c(%ebp),%eax
121f08: 31 d2 xor %edx,%edx
121f0a: f7 f1 div %ecx
121f0c: 39 c7 cmp %eax,%edi
121f0e: 77 24 ja 121f34 <scanInt+0x98>
|| ((i == (limit / 10)) && (d > (limit % 10))))
121f10: 75 05 jne 121f17 <scanInt+0x7b>
121f12: 39 55 e0 cmp %edx,-0x20(%ebp)
121f15: 77 1d ja 121f34 <scanInt+0x98> <== ALWAYS TAKEN
return 0;
i = i * 10 + d;
121f17: 6b ff 0a imul $0xa,%edi,%edi
121f1a: 03 7d e0 add -0x20(%ebp),%edi
121f1d: eb 96 jmp 121eb5 <scanInt+0x19>
continue;
}
sign = 1;
}
if (!isdigit(c))
return 0;
121f1f: 31 c0 xor %eax,%eax
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
return 0;
i = i * 10 + d;
}
if (sign == 0)
121f21: 85 db test %ebx,%ebx
121f23: 74 11 je 121f36 <scanInt+0x9a> <== NEVER TAKEN
return 0;
*val = i * sign;
121f25: 0f af df imul %edi,%ebx
121f28: 8b 45 dc mov -0x24(%ebp),%eax
121f2b: 89 18 mov %ebx,(%eax)
return 1;
121f2d: b8 01 00 00 00 mov $0x1,%eax
121f32: eb 02 jmp 121f36 <scanInt+0x9a>
continue;
}
sign = 1;
}
if (!isdigit(c))
return 0;
121f34: 31 c0 xor %eax,%eax
}
if (sign == 0)
return 0;
*val = i * sign;
return 1;
}
121f36: 8d 65 f4 lea -0xc(%ebp),%esp
121f39: 5b pop %ebx
121f3a: 5e pop %esi
121f3b: 5f pop %edi
121f3c: 5d pop %ebp
121f3d: c3 ret
00121fbe <scangr>:
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
121fbe: 55 push %ebp
121fbf: 89 e5 mov %esp,%ebp
121fc1: 56 push %esi
121fc2: 53 push %ebx
121fc3: 83 ec 28 sub $0x28,%esp
121fc6: 89 c6 mov %eax,%esi
121fc8: 89 d3 mov %edx,%ebx
121fca: 89 4d e4 mov %ecx,-0x1c(%ebp)
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
121fcd: 6a 00 push $0x0
121fcf: 8d 45 08 lea 0x8(%ebp),%eax
121fd2: 50 push %eax
121fd3: 8d 4d e4 lea -0x1c(%ebp),%ecx
121fd6: 89 f0 mov %esi,%eax
121fd8: e8 61 ff ff ff call 121f3e <scanString>
121fdd: 83 c4 10 add $0x10,%esp
121fe0: 85 c0 test %eax,%eax
121fe2: 75 07 jne 121feb <scangr+0x2d>
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
|| !scanInt(fp, &grgid)
|| !scanString(fp, &grmem, &buffer, &bufsize, 1))
return 0;
121fe4: 31 c0 xor %eax,%eax
121fe6: e9 b7 00 00 00 jmp 1220a2 <scangr+0xe4>
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
121feb: 50 push %eax
121fec: 50 push %eax
121fed: 8d 53 04 lea 0x4(%ebx),%edx
121ff0: 6a 00 push $0x0
121ff2: 8d 45 08 lea 0x8(%ebp),%eax
121ff5: 50 push %eax
121ff6: 8d 4d e4 lea -0x1c(%ebp),%ecx
121ff9: 89 f0 mov %esi,%eax
121ffb: e8 3e ff ff ff call 121f3e <scanString>
122000: 83 c4 10 add $0x10,%esp
122003: 85 c0 test %eax,%eax
122005: 74 dd je 121fe4 <scangr+0x26> <== NEVER TAKEN
|| !scanInt(fp, &grgid)
122007: 8d 55 f0 lea -0x10(%ebp),%edx
12200a: 89 f0 mov %esi,%eax
12200c: e8 8b fe ff ff call 121e9c <scanInt>
122011: 85 c0 test %eax,%eax
122013: 74 cf je 121fe4 <scangr+0x26> <== NEVER TAKEN
|| !scanString(fp, &grmem, &buffer, &bufsize, 1))
122015: 51 push %ecx
122016: 51 push %ecx
122017: 6a 01 push $0x1
122019: 8d 45 08 lea 0x8(%ebp),%eax
12201c: 50 push %eax
12201d: 8d 4d e4 lea -0x1c(%ebp),%ecx
122020: 8d 55 f4 lea -0xc(%ebp),%edx
122023: 89 f0 mov %esi,%eax
122025: e8 14 ff ff ff call 121f3e <scanString>
12202a: 83 c4 10 add $0x10,%esp
12202d: 85 c0 test %eax,%eax
12202f: 74 b3 je 121fe4 <scangr+0x26> <== NEVER TAKEN
return 0;
grp->gr_gid = grgid;
122031: 8b 45 f0 mov -0x10(%ebp),%eax
122034: 66 89 43 08 mov %ax,0x8(%ebx)
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
122038: 8b 75 f4 mov -0xc(%ebp),%esi
12203b: 89 f2 mov %esi,%edx
12203d: b8 01 00 00 00 mov $0x1,%eax
122042: eb 0c jmp 122050 <scangr+0x92>
if(*cp == ',')
memcount++;
122044: 80 f9 2c cmp $0x2c,%cl
122047: 0f 94 c1 sete %cl
12204a: 0f b6 c9 movzbl %cl,%ecx
12204d: 01 c8 add %ecx,%eax
grp->gr_gid = grgid;
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
12204f: 42 inc %edx
122050: 8a 0a mov (%edx),%cl
122052: 84 c9 test %cl,%cl
122054: 75 ee jne 122044 <scangr+0x86>
}
/*
* Hack to produce (hopefully) a suitably-aligned array of pointers
*/
if (bufsize < (((memcount+1)*sizeof(char *)) + 15))
122056: 8d 04 85 13 00 00 00 lea 0x13(,%eax,4),%eax
12205d: 39 45 08 cmp %eax,0x8(%ebp)
122060: 72 82 jb 121fe4 <scangr+0x26> <== NEVER TAKEN
return 0;
grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15);
122062: 8b 45 e4 mov -0x1c(%ebp),%eax
122065: 83 c0 0f add $0xf,%eax
122068: 83 e0 f0 and $0xfffffff0,%eax
12206b: 89 43 0c mov %eax,0xc(%ebx)
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
12206e: 89 30 mov %esi,(%eax)
}
/*
* Extract a single group record from the database
*/
static int scangr(
122070: 8b 45 f4 mov -0xc(%ebp),%eax
122073: 40 inc %eax
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
122074: ba 01 00 00 00 mov $0x1,%edx
122079: eb 11 jmp 12208c <scangr+0xce>
if(*cp == ',') {
12207b: 80 f9 2c cmp $0x2c,%cl
12207e: 75 0b jne 12208b <scangr+0xcd>
*cp = '\0';
122080: c6 40 ff 00 movb $0x0,-0x1(%eax)
grp->gr_mem[memcount++] = cp + 1;
122084: 8b 4b 0c mov 0xc(%ebx),%ecx
122087: 89 04 91 mov %eax,(%ecx,%edx,4)
12208a: 42 inc %edx
12208b: 40 inc %eax
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
12208c: 8a 48 ff mov -0x1(%eax),%cl
12208f: 84 c9 test %cl,%cl
122091: 75 e8 jne 12207b <scangr+0xbd>
if(*cp == ',') {
*cp = '\0';
grp->gr_mem[memcount++] = cp + 1;
}
}
grp->gr_mem[memcount] = NULL;
122093: 8b 43 0c mov 0xc(%ebx),%eax
122096: c7 04 90 00 00 00 00 movl $0x0,(%eax,%edx,4)
return 1;
12209d: b8 01 00 00 00 mov $0x1,%eax
}
1220a2: 8d 65 f8 lea -0x8(%ebp),%esp
1220a5: 5b pop %ebx
1220a6: 5e pop %esi
1220a7: 5d pop %ebp
1220a8: c3 ret
001220a9 <scanpw>:
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
1220a9: 55 push %ebp
1220aa: 89 e5 mov %esp,%ebp
1220ac: 56 push %esi
1220ad: 53 push %ebx
1220ae: 83 ec 28 sub $0x28,%esp
1220b1: 89 c6 mov %eax,%esi
1220b3: 89 d3 mov %edx,%ebx
1220b5: 89 4d e4 mov %ecx,-0x1c(%ebp)
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
1220b8: 6a 00 push $0x0
1220ba: 8d 45 08 lea 0x8(%ebp),%eax
1220bd: 50 push %eax
1220be: 8d 4d e4 lea -0x1c(%ebp),%ecx
1220c1: 89 f0 mov %esi,%eax
1220c3: e8 76 fe ff ff call 121f3e <scanString>
1220c8: 83 c4 10 add $0x10,%esp
1220cb: 85 c0 test %eax,%eax
1220cd: 75 07 jne 1220d6 <scanpw+0x2d>
|| !scanInt(fp, &pwgid)
|| !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1))
return 0;
1220cf: 31 c0 xor %eax,%eax
1220d1: e9 c3 00 00 00 jmp 122199 <scanpw+0xf0>
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0)
1220d6: 50 push %eax
1220d7: 50 push %eax
1220d8: 8d 53 04 lea 0x4(%ebx),%edx
1220db: 6a 00 push $0x0
1220dd: 8d 45 08 lea 0x8(%ebp),%eax
1220e0: 50 push %eax
1220e1: 8d 4d e4 lea -0x1c(%ebp),%ecx
1220e4: 89 f0 mov %esi,%eax
1220e6: e8 53 fe ff ff call 121f3e <scanString>
1220eb: 83 c4 10 add $0x10,%esp
1220ee: 85 c0 test %eax,%eax
1220f0: 74 dd je 1220cf <scanpw+0x26> <== NEVER TAKEN
|| !scanInt(fp, &pwuid)
1220f2: 8d 55 f0 lea -0x10(%ebp),%edx
1220f5: 89 f0 mov %esi,%eax
1220f7: e8 a0 fd ff ff call 121e9c <scanInt>
1220fc: 85 c0 test %eax,%eax
1220fe: 74 cf je 1220cf <scanpw+0x26>
|| !scanInt(fp, &pwgid)
122100: 8d 55 f4 lea -0xc(%ebp),%edx
122103: 89 f0 mov %esi,%eax
122105: e8 92 fd ff ff call 121e9c <scanInt>
12210a: 85 c0 test %eax,%eax
12210c: 74 c1 je 1220cf <scanpw+0x26>
|| !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0)
12210e: 50 push %eax
12210f: 50 push %eax
122110: 8d 53 0c lea 0xc(%ebx),%edx
122113: 6a 00 push $0x0
122115: 8d 45 08 lea 0x8(%ebp),%eax
122118: 50 push %eax
122119: 8d 4d e4 lea -0x1c(%ebp),%ecx
12211c: 89 f0 mov %esi,%eax
12211e: e8 1b fe ff ff call 121f3e <scanString>
122123: 83 c4 10 add $0x10,%esp
122126: 85 c0 test %eax,%eax
122128: 74 a5 je 1220cf <scanpw+0x26> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0)
12212a: 50 push %eax
12212b: 50 push %eax
12212c: 8d 53 10 lea 0x10(%ebx),%edx
12212f: 6a 00 push $0x0
122131: 8d 45 08 lea 0x8(%ebp),%eax
122134: 50 push %eax
122135: 8d 4d e4 lea -0x1c(%ebp),%ecx
122138: 89 f0 mov %esi,%eax
12213a: e8 ff fd ff ff call 121f3e <scanString>
12213f: 83 c4 10 add $0x10,%esp
122142: 85 c0 test %eax,%eax
122144: 74 89 je 1220cf <scanpw+0x26> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0)
122146: 50 push %eax
122147: 50 push %eax
122148: 8d 53 14 lea 0x14(%ebx),%edx
12214b: 6a 00 push $0x0
12214d: 8d 45 08 lea 0x8(%ebp),%eax
122150: 50 push %eax
122151: 8d 4d e4 lea -0x1c(%ebp),%ecx
122154: 89 f0 mov %esi,%eax
122156: e8 e3 fd ff ff call 121f3e <scanString>
12215b: 83 c4 10 add $0x10,%esp
12215e: 85 c0 test %eax,%eax
122160: 0f 84 69 ff ff ff je 1220cf <scanpw+0x26> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1))
122166: 50 push %eax
122167: 50 push %eax
122168: 8d 53 18 lea 0x18(%ebx),%edx
12216b: 6a 01 push $0x1
12216d: 8d 45 08 lea 0x8(%ebp),%eax
122170: 50 push %eax
122171: 8d 4d e4 lea -0x1c(%ebp),%ecx
122174: 89 f0 mov %esi,%eax
122176: e8 c3 fd ff ff call 121f3e <scanString>
12217b: 83 c4 10 add $0x10,%esp
12217e: 85 c0 test %eax,%eax
122180: 0f 84 49 ff ff ff je 1220cf <scanpw+0x26>
return 0;
pwd->pw_uid = pwuid;
122186: 8b 45 f0 mov -0x10(%ebp),%eax
122189: 66 89 43 08 mov %ax,0x8(%ebx)
pwd->pw_gid = pwgid;
12218d: 8b 45 f4 mov -0xc(%ebp),%eax
122190: 66 89 43 0a mov %ax,0xa(%ebx)
return 1;
122194: b8 01 00 00 00 mov $0x1,%eax
}
122199: 8d 65 f8 lea -0x8(%ebp),%esp
12219c: 5b pop %ebx
12219d: 5e pop %esi
12219e: 5d pop %ebp
12219f: c3 ret
0010a400 <sched_get_priority_max>:
#include <rtems/posix/priority.h>
int sched_get_priority_max(
int policy
)
{
10a400: 55 push %ebp
10a401: 89 e5 mov %esp,%ebp
10a403: 83 ec 08 sub $0x8,%esp
10a406: 8b 4d 08 mov 0x8(%ebp),%ecx
switch ( policy ) {
10a409: 83 f9 04 cmp $0x4,%ecx
10a40c: 77 0b ja 10a419 <sched_get_priority_max+0x19>
10a40e: b8 01 00 00 00 mov $0x1,%eax
10a413: d3 e0 shl %cl,%eax
10a415: a8 17 test $0x17,%al
10a417: 75 10 jne 10a429 <sched_get_priority_max+0x29><== ALWAYS TAKEN
case SCHED_RR:
case SCHED_SPORADIC:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
10a419: e8 36 74 00 00 call 111854 <__errno>
10a41e: c7 00 16 00 00 00 movl $0x16,(%eax)
10a424: 83 c8 ff or $0xffffffff,%eax
10a427: eb 08 jmp 10a431 <sched_get_priority_max+0x31>
}
return POSIX_SCHEDULER_MAXIMUM_PRIORITY;
10a429: 0f b6 05 88 b1 12 00 movzbl 0x12b188,%eax
10a430: 48 dec %eax
}
10a431: c9 leave
10a432: c3 ret
0010a434 <sched_get_priority_min>:
#include <rtems/posix/priority.h>
int sched_get_priority_min(
int policy
)
{
10a434: 55 push %ebp
10a435: 89 e5 mov %esp,%ebp
10a437: 83 ec 08 sub $0x8,%esp
10a43a: 8b 4d 08 mov 0x8(%ebp),%ecx
switch ( policy ) {
10a43d: 83 f9 04 cmp $0x4,%ecx
10a440: 77 11 ja 10a453 <sched_get_priority_min+0x1f>
10a442: ba 01 00 00 00 mov $0x1,%edx
10a447: d3 e2 shl %cl,%edx
default:
rtems_set_errno_and_return_minus_one( EINVAL );
}
return POSIX_SCHEDULER_MINIMUM_PRIORITY;
10a449: b8 01 00 00 00 mov $0x1,%eax
int sched_get_priority_min(
int policy
)
{
switch ( policy ) {
10a44e: 80 e2 17 and $0x17,%dl
10a451: 75 0e jne 10a461 <sched_get_priority_min+0x2d><== ALWAYS TAKEN
case SCHED_RR:
case SCHED_SPORADIC:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
10a453: e8 fc 73 00 00 call 111854 <__errno>
10a458: c7 00 16 00 00 00 movl $0x16,(%eax)
10a45e: 83 c8 ff or $0xffffffff,%eax
}
return POSIX_SCHEDULER_MINIMUM_PRIORITY;
}
10a461: c9 leave
10a462: c3 ret
0010a464 <sched_rr_get_interval>:
int sched_rr_get_interval(
pid_t pid,
struct timespec *interval
)
{
10a464: 55 push %ebp
10a465: 89 e5 mov %esp,%ebp
10a467: 56 push %esi
10a468: 53 push %ebx
10a469: 8b 75 08 mov 0x8(%ebp),%esi
10a46c: 8b 5d 0c mov 0xc(%ebp),%ebx
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid && pid != getpid() )
10a46f: 85 f6 test %esi,%esi
10a471: 74 16 je 10a489 <sched_rr_get_interval+0x25><== NEVER TAKEN
10a473: e8 a4 c7 ff ff call 106c1c <getpid>
10a478: 39 c6 cmp %eax,%esi
10a47a: 74 0d je 10a489 <sched_rr_get_interval+0x25>
rtems_set_errno_and_return_minus_one( ESRCH );
10a47c: e8 d3 73 00 00 call 111854 <__errno>
10a481: c7 00 03 00 00 00 movl $0x3,(%eax)
10a487: eb 0f jmp 10a498 <sched_rr_get_interval+0x34>
if ( !interval )
10a489: 85 db test %ebx,%ebx
10a48b: 75 10 jne 10a49d <sched_rr_get_interval+0x39>
rtems_set_errno_and_return_minus_one( EINVAL );
10a48d: e8 c2 73 00 00 call 111854 <__errno>
10a492: c7 00 16 00 00 00 movl $0x16,(%eax)
10a498: 83 c8 ff or $0xffffffff,%eax
10a49b: eb 13 jmp 10a4b0 <sched_rr_get_interval+0x4c>
_Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval );
10a49d: 50 push %eax
10a49e: 50 push %eax
10a49f: 53 push %ebx
10a4a0: ff 35 a8 f3 12 00 pushl 0x12f3a8
10a4a6: e8 2d 2f 00 00 call 10d3d8 <_Timespec_From_ticks>
return 0;
10a4ab: 83 c4 10 add $0x10,%esp
10a4ae: 31 c0 xor %eax,%eax
}
10a4b0: 8d 65 f8 lea -0x8(%ebp),%esp
10a4b3: 5b pop %ebx
10a4b4: 5e pop %esi
10a4b5: 5d pop %ebp
10a4b6: c3 ret
0010a90c <sem_open>:
int oflag,
...
/* mode_t mode, */
/* unsigned int value */
)
{
10a90c: 55 push %ebp
10a90d: 89 e5 mov %esp,%ebp
10a90f: 57 push %edi
10a910: 56 push %esi
10a911: 53 push %ebx
10a912: 83 ec 1c sub $0x1c,%esp
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
10a915: a1 b4 31 13 00 mov 0x1331b4,%eax
10a91a: 40 inc %eax
10a91b: a3 b4 31 13 00 mov %eax,0x1331b4
return _Thread_Dispatch_disable_level;
10a920: a1 b4 31 13 00 mov 0x1331b4,%eax
va_list arg;
mode_t mode;
unsigned int value = 0;
10a925: 31 db xor %ebx,%ebx
Objects_Locations location;
size_t name_len;
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
10a927: 8b 75 0c mov 0xc(%ebp),%esi
10a92a: 81 e6 00 02 00 00 and $0x200,%esi
10a930: 74 03 je 10a935 <sem_open+0x29>
va_start(arg, oflag);
mode = va_arg( arg, mode_t );
value = va_arg( arg, unsigned int );
10a932: 8b 5d 14 mov 0x14(%ebp),%ebx
va_end(arg);
}
status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id, &name_len );
10a935: 8d 45 e4 lea -0x1c(%ebp),%eax
const char *name,
Objects_Id *id,
size_t *len
)
{
return _POSIX_Name_to_id( &_POSIX_Semaphore_Information, name, id, len );
10a938: 50 push %eax
10a939: 8d 45 d8 lea -0x28(%ebp),%eax
10a93c: 50 push %eax
10a93d: ff 75 08 pushl 0x8(%ebp)
10a940: 68 78 34 13 00 push $0x133478
10a945: e8 16 fa ff ff call 10a360 <_POSIX_Name_to_id>
10a94a: 89 c7 mov %eax,%edi
* and we can just return a pointer to the id. Otherwise we may
* need to check to see if this is a "semaphore does not exist"
* or some other miscellaneous error on the name.
*/
if ( status ) {
10a94c: 83 c4 10 add $0x10,%esp
10a94f: 85 c0 test %eax,%eax
10a951: 74 17 je 10a96a <sem_open+0x5e>
/*
* Unless provided a valid name that did not already exist
* and we are willing to create then it is an error.
*/
if ( !( status == ENOENT && (oflag & O_CREAT) ) ) {
10a953: 83 f8 02 cmp $0x2,%eax
10a956: 75 04 jne 10a95c <sem_open+0x50>
10a958: 85 f6 test %esi,%esi
10a95a: 75 56 jne 10a9b2 <sem_open+0xa6>
_Thread_Enable_dispatch();
10a95c: e8 5b 2d 00 00 call 10d6bc <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one_cast( status, sem_t * );
10a961: e8 32 7f 00 00 call 112898 <__errno>
10a966: 89 38 mov %edi,(%eax)
10a968: eb 72 jmp 10a9dc <sem_open+0xd0>
/*
* Check for existence with creation.
*/
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
10a96a: 8b 45 0c mov 0xc(%ebp),%eax
10a96d: 25 00 0a 00 00 and $0xa00,%eax
10a972: 3d 00 0a 00 00 cmp $0xa00,%eax
10a977: 75 12 jne 10a98b <sem_open+0x7f>
_Thread_Enable_dispatch();
10a979: e8 3e 2d 00 00 call 10d6bc <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * );
10a97e: e8 15 7f 00 00 call 112898 <__errno>
10a983: c7 00 11 00 00 00 movl $0x11,(%eax)
10a989: eb 51 jmp 10a9dc <sem_open+0xd0>
RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Get (
sem_t *id,
Objects_Locations *location
)
{
return (POSIX_Semaphore_Control *)
10a98b: 50 push %eax
}
the_semaphore = _POSIX_Semaphore_Get( (sem_t *) &the_semaphore_id, &location );
10a98c: 8d 45 e0 lea -0x20(%ebp),%eax
10a98f: 50 push %eax
10a990: ff 75 d8 pushl -0x28(%ebp)
10a993: 68 78 34 13 00 push $0x133478
10a998: e8 27 21 00 00 call 10cac4 <_Objects_Get>
10a99d: 89 45 dc mov %eax,-0x24(%ebp)
the_semaphore->open_count += 1;
10a9a0: ff 40 18 incl 0x18(%eax)
_Thread_Enable_dispatch();
10a9a3: e8 14 2d 00 00 call 10d6bc <_Thread_Enable_dispatch>
_Thread_Enable_dispatch();
10a9a8: e8 0f 2d 00 00 call 10d6bc <_Thread_Enable_dispatch>
goto return_id;
10a9ad: 83 c4 10 add $0x10,%esp
10a9b0: eb 22 jmp 10a9d4 <sem_open+0xc8>
/*
* At this point, the semaphore does not exist and everything has been
* checked. We should go ahead and create a semaphore.
*/
status =_POSIX_Semaphore_Create_support(
10a9b2: 83 ec 0c sub $0xc,%esp
10a9b5: 8d 45 dc lea -0x24(%ebp),%eax
10a9b8: 50 push %eax
10a9b9: 53 push %ebx
10a9ba: 6a 00 push $0x0
10a9bc: ff 75 e4 pushl -0x1c(%ebp)
10a9bf: ff 75 08 pushl 0x8(%ebp)
10a9c2: e8 11 57 00 00 call 1100d8 <_POSIX_Semaphore_Create_support>
10a9c7: 89 c3 mov %eax,%ebx
/*
* errno was set by Create_support, so don't set it again.
*/
_Thread_Enable_dispatch();
10a9c9: 83 c4 20 add $0x20,%esp
10a9cc: e8 eb 2c 00 00 call 10d6bc <_Thread_Enable_dispatch>
if ( status == -1 )
10a9d1: 43 inc %ebx
10a9d2: 74 08 je 10a9dc <sem_open+0xd0> <== NEVER TAKEN
return_id:
#if defined(RTEMS_USE_16_BIT_OBJECT)
the_semaphore->Semaphore_id = the_semaphore->Object.id;
return &the_semaphore->Semaphore_id;
#else
return (sem_t *)&the_semaphore->Object.id;
10a9d4: 8b 45 dc mov -0x24(%ebp),%eax
10a9d7: 83 c0 08 add $0x8,%eax
10a9da: eb 03 jmp 10a9df <sem_open+0xd3>
*/
_Thread_Enable_dispatch();
if ( status == -1 )
return SEM_FAILED;
10a9dc: 83 c8 ff or $0xffffffff,%eax
the_semaphore->Semaphore_id = the_semaphore->Object.id;
return &the_semaphore->Semaphore_id;
#else
return (sem_t *)&the_semaphore->Object.id;
#endif
}
10a9df: 8d 65 f4 lea -0xc(%ebp),%esp
10a9e2: 5b pop %ebx
10a9e3: 5e pop %esi
10a9e4: 5f pop %edi
10a9e5: 5d pop %ebp
10a9e6: c3 ret
0010cc08 <sem_timedwait>:
int sem_timedwait(
sem_t *sem,
const struct timespec *abstime
)
{
10cc08: 55 push %ebp
10cc09: 89 e5 mov %esp,%ebp
10cc0b: 53 push %ebx
10cc0c: 83 ec 1c sub $0x1c,%esp
*
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
10cc0f: 8d 45 f4 lea -0xc(%ebp),%eax
10cc12: 50 push %eax
10cc13: ff 75 0c pushl 0xc(%ebp)
10cc16: e8 49 49 00 00 call 111564 <_POSIX_Absolute_timeout_to_ticks>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
10cc1b: 83 c4 0c add $0xc,%esp
10cc1e: 83 f8 03 cmp $0x3,%eax
10cc21: 0f 94 c3 sete %bl
do_wait = false;
lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks );
10cc24: ff 75 f4 pushl -0xc(%ebp)
10cc27: 0f b6 c3 movzbl %bl,%eax
10cc2a: 50 push %eax
10cc2b: ff 75 08 pushl 0x8(%ebp)
10cc2e: e8 59 53 00 00 call 111f8c <_POSIX_Semaphore_Wait_support>
* This service only gives us the option to block. We used a polling
* attempt to obtain if the abstime was not in the future. If we did
* not obtain the semaphore, then not look at the status immediately,
* make sure the right reason is returned.
*/
if ( !do_wait && (lock_status == EBUSY) ) {
10cc33: 83 c4 10 add $0x10,%esp
10cc36: 84 db test %bl,%bl
10cc38: 75 00 jne 10cc3a <sem_timedwait+0x32> <== ALWAYS TAKEN
lock_status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
rtems_set_errno_and_return_minus_one( ETIMEDOUT );
}
return lock_status;
}
10cc3a: 8b 5d fc mov -0x4(%ebp),%ebx
10cc3d: c9 leave
10cc3e: c3 ret
0010a2a8 <sigaction>:
int sigaction(
int sig,
const struct sigaction *act,
struct sigaction *oact
)
{
10a2a8: 55 push %ebp
10a2a9: 89 e5 mov %esp,%ebp
10a2ab: 57 push %edi
10a2ac: 56 push %esi
10a2ad: 53 push %ebx
10a2ae: 83 ec 1c sub $0x1c,%esp
10a2b1: 8b 5d 08 mov 0x8(%ebp),%ebx
10a2b4: 8b 45 10 mov 0x10(%ebp),%eax
ISR_Level level;
if ( oact )
10a2b7: 85 c0 test %eax,%eax
10a2b9: 74 12 je 10a2cd <sigaction+0x25>
*oact = _POSIX_signals_Vectors[ sig ];
10a2bb: 6b f3 0c imul $0xc,%ebx,%esi
10a2be: 81 c6 68 09 13 00 add $0x130968,%esi
10a2c4: b9 03 00 00 00 mov $0x3,%ecx
10a2c9: 89 c7 mov %eax,%edi
10a2cb: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
if ( !sig )
10a2cd: 85 db test %ebx,%ebx
10a2cf: 75 02 jne 10a2d3 <sigaction+0x2b>
10a2d1: eb 0f jmp 10a2e2 <sigaction+0x3a>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
10a2d3: 8d 43 ff lea -0x1(%ebx),%eax
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
10a2d6: 83 f8 1f cmp $0x1f,%eax
10a2d9: 76 02 jbe 10a2dd <sigaction+0x35>
10a2db: eb 05 jmp 10a2e2 <sigaction+0x3a>
*
* NOTE: Solaris documentation claims to "silently enforce" this which
* contradicts the POSIX specification.
*/
if ( sig == SIGKILL )
10a2dd: 83 fb 09 cmp $0x9,%ebx
10a2e0: 75 10 jne 10a2f2 <sigaction+0x4a>
rtems_set_errno_and_return_minus_one( EINVAL );
10a2e2: e8 b5 78 00 00 call 111b9c <__errno>
10a2e7: c7 00 16 00 00 00 movl $0x16,(%eax)
10a2ed: 83 c8 ff or $0xffffffff,%eax
10a2f0: eb 55 jmp 10a347 <sigaction+0x9f>
/*
* Evaluate the new action structure and set the global signal vector
* appropriately.
*/
if ( act ) {
10a2f2: 83 7d 0c 00 cmpl $0x0,0xc(%ebp)
10a2f6: 74 4d je 10a345 <sigaction+0x9d> <== NEVER TAKEN
/*
* Unless the user is installing the default signal actions, then
* we can just copy the provided sigaction structure into the vectors.
*/
_ISR_Disable( level );
10a2f8: 9c pushf
10a2f9: fa cli
10a2fa: 8f 45 e4 popl -0x1c(%ebp)
if ( act->sa_handler == SIG_DFL ) {
10a2fd: 8b 45 0c mov 0xc(%ebp),%eax
10a300: 83 78 08 00 cmpl $0x0,0x8(%eax)
10a304: 75 1a jne 10a320 <sigaction+0x78>
_POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ];
10a306: 6b f3 0c imul $0xc,%ebx,%esi
10a309: 8d 86 68 09 13 00 lea 0x130968(%esi),%eax
10a30f: 81 c6 a8 19 12 00 add $0x1219a8,%esi
10a315: b9 03 00 00 00 mov $0x3,%ecx
10a31a: 89 c7 mov %eax,%edi
10a31c: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
10a31e: eb 21 jmp 10a341 <sigaction+0x99>
} else {
_POSIX_signals_Clear_process_signals( sig );
10a320: 83 ec 0c sub $0xc,%esp
10a323: 53 push %ebx
10a324: e8 6f 4c 00 00 call 10ef98 <_POSIX_signals_Clear_process_signals>
_POSIX_signals_Vectors[ sig ] = *act;
10a329: 6b db 0c imul $0xc,%ebx,%ebx
10a32c: 81 c3 68 09 13 00 add $0x130968,%ebx
10a332: b9 03 00 00 00 mov $0x3,%ecx
10a337: 89 df mov %ebx,%edi
10a339: 8b 75 0c mov 0xc(%ebp),%esi
10a33c: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
10a33e: 83 c4 10 add $0x10,%esp
}
_ISR_Enable( level );
10a341: ff 75 e4 pushl -0x1c(%ebp)
10a344: 9d popf
* now (signals not posted when SIG_IGN).
* + If we are now ignoring a signal that was previously pending,
* we clear the pending signal indicator.
*/
return 0;
10a345: 31 c0 xor %eax,%eax
}
10a347: 8d 65 f4 lea -0xc(%ebp),%esp
10a34a: 5b pop %ebx
10a34b: 5e pop %esi
10a34c: 5f pop %edi
10a34d: 5d pop %ebp
10a34e: c3 ret
0010a702 <sigtimedwait>:
int sigtimedwait(
const sigset_t *set,
siginfo_t *info,
const struct timespec *timeout
)
{
10a702: 55 push %ebp
10a703: 89 e5 mov %esp,%ebp
10a705: 57 push %edi
10a706: 56 push %esi
10a707: 53 push %ebx
10a708: 83 ec 2c sub $0x2c,%esp
10a70b: 8b 5d 10 mov 0x10(%ebp),%ebx
ISR_Level level;
/*
* Error check parameters before disabling interrupts.
*/
if ( !set )
10a70e: 83 7d 08 00 cmpl $0x0,0x8(%ebp)
10a712: 75 02 jne 10a716 <sigtimedwait+0x14>
10a714: eb 28 jmp 10a73e <sigtimedwait+0x3c>
/* NOTE: This is very specifically a RELATIVE not ABSOLUTE time
* in the Open Group specification.
*/
interval = 0;
if ( timeout ) {
10a716: 85 db test %ebx,%ebx
10a718: 74 34 je 10a74e <sigtimedwait+0x4c>
if ( !_Timespec_Is_valid( timeout ) )
10a71a: 83 ec 0c sub $0xc,%esp
10a71d: 53 push %ebx
10a71e: e8 35 30 00 00 call 10d758 <_Timespec_Is_valid>
10a723: 83 c4 10 add $0x10,%esp
10a726: 84 c0 test %al,%al
10a728: 75 02 jne 10a72c <sigtimedwait+0x2a>
10a72a: eb 12 jmp 10a73e <sigtimedwait+0x3c>
rtems_set_errno_and_return_minus_one( EINVAL );
interval = _Timespec_To_ticks( timeout );
10a72c: 83 ec 0c sub $0xc,%esp
10a72f: 53 push %ebx
10a730: e8 47 30 00 00 call 10d77c <_Timespec_To_ticks>
10a735: 89 c1 mov %eax,%ecx
if ( !interval )
10a737: 83 c4 10 add $0x10,%esp
10a73a: 85 c0 test %eax,%eax
10a73c: 75 12 jne 10a750 <sigtimedwait+0x4e> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
10a73e: e8 1d 7a 00 00 call 112160 <__errno>
10a743: c7 00 16 00 00 00 movl $0x16,(%eax)
10a749: e9 29 01 00 00 jmp 10a877 <sigtimedwait+0x175>
/* NOTE: This is very specifically a RELATIVE not ABSOLUTE time
* in the Open Group specification.
*/
interval = 0;
10a74e: 31 c9 xor %ecx,%ecx
/*
* Initialize local variables.
*/
the_info = ( info ) ? info : &signal_information;
10a750: 8b 5d 0c mov 0xc(%ebp),%ebx
10a753: 85 db test %ebx,%ebx
10a755: 75 03 jne 10a75a <sigtimedwait+0x58>
10a757: 8d 5d dc lea -0x24(%ebp),%ebx
the_thread = _Thread_Executing;
10a75a: 8b 15 2c 09 13 00 mov 0x13092c,%edx
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
10a760: 8b b2 e8 00 00 00 mov 0xe8(%edx),%esi
* What if they are already pending?
*/
/* API signals pending? */
_ISR_Disable( level );
10a766: 9c pushf
10a767: fa cli
10a768: 8f 45 d4 popl -0x2c(%ebp)
if ( *set & api->signals_pending ) {
10a76b: 8b 45 08 mov 0x8(%ebp),%eax
10a76e: 8b 38 mov (%eax),%edi
10a770: 8b 86 d4 00 00 00 mov 0xd4(%esi),%eax
10a776: 85 c7 test %eax,%edi
10a778: 74 2c je 10a7a6 <sigtimedwait+0xa4>
/* XXX real info later */
the_info->si_signo = _POSIX_signals_Get_lowest( api->signals_pending );
10a77a: e8 45 ff ff ff call 10a6c4 <_POSIX_signals_Get_lowest>
10a77f: 89 03 mov %eax,(%ebx)
_POSIX_signals_Clear_signals(
10a781: 83 ec 0c sub $0xc,%esp
10a784: 6a 00 push $0x0
10a786: 6a 00 push $0x0
10a788: 53 push %ebx
10a789: 50 push %eax
10a78a: 56 push %esi
10a78b: e8 f4 4e 00 00 call 10f684 <_POSIX_signals_Clear_signals>
the_info->si_signo,
the_info,
false,
false
);
_ISR_Enable( level );
10a790: ff 75 d4 pushl -0x2c(%ebp)
10a793: 9d popf
the_info->si_code = SI_USER;
10a794: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx)
the_info->si_value.sival_int = 0;
10a79b: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
return the_info->si_signo;
10a7a2: 8b 3b mov (%ebx),%edi
10a7a4: eb 33 jmp 10a7d9 <sigtimedwait+0xd7>
}
/* Process pending signals? */
if ( *set & _POSIX_signals_Pending ) {
10a7a6: a1 5c 0b 13 00 mov 0x130b5c,%eax
10a7ab: 85 c7 test %eax,%edi
10a7ad: 74 32 je 10a7e1 <sigtimedwait+0xdf>
signo = _POSIX_signals_Get_lowest( _POSIX_signals_Pending );
10a7af: e8 10 ff ff ff call 10a6c4 <_POSIX_signals_Get_lowest>
10a7b4: 89 c7 mov %eax,%edi
_POSIX_signals_Clear_signals( api, signo, the_info, true, false );
10a7b6: 83 ec 0c sub $0xc,%esp
10a7b9: 6a 00 push $0x0
10a7bb: 6a 01 push $0x1
10a7bd: 53 push %ebx
10a7be: 50 push %eax
10a7bf: 56 push %esi
10a7c0: e8 bf 4e 00 00 call 10f684 <_POSIX_signals_Clear_signals>
_ISR_Enable( level );
10a7c5: ff 75 d4 pushl -0x2c(%ebp)
10a7c8: 9d popf
the_info->si_signo = signo;
10a7c9: 89 3b mov %edi,(%ebx)
the_info->si_code = SI_USER;
10a7cb: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx)
the_info->si_value.sival_int = 0;
10a7d2: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
10a7d9: 83 c4 20 add $0x20,%esp
10a7dc: e9 99 00 00 00 jmp 10a87a <sigtimedwait+0x178>
return signo;
}
the_info->si_signo = -1;
10a7e1: c7 03 ff ff ff ff movl $0xffffffff,(%ebx)
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
10a7e7: a1 24 04 13 00 mov 0x130424,%eax
10a7ec: 40 inc %eax
10a7ed: a3 24 04 13 00 mov %eax,0x130424
return _Thread_Dispatch_disable_level;
10a7f2: a1 24 04 13 00 mov 0x130424,%eax
_Thread_Disable_dispatch();
the_thread->Wait.queue = &_POSIX_signals_Wait_queue;
10a7f7: c7 42 44 f4 0a 13 00 movl $0x130af4,0x44(%edx)
the_thread->Wait.return_code = EINTR;
10a7fe: c7 42 34 04 00 00 00 movl $0x4,0x34(%edx)
the_thread->Wait.option = *set;
10a805: 8b 7d 08 mov 0x8(%ebp),%edi
10a808: 8b 07 mov (%edi),%eax
10a80a: 89 42 30 mov %eax,0x30(%edx)
the_thread->Wait.return_argument = the_info;
10a80d: 89 5a 28 mov %ebx,0x28(%edx)
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;
10a810: c7 05 24 0b 13 00 01 movl $0x1,0x130b24
10a817: 00 00 00
_Thread_queue_Enter_critical_section( &_POSIX_signals_Wait_queue );
_ISR_Enable( level );
10a81a: ff 75 d4 pushl -0x2c(%ebp)
10a81d: 9d popf
_Thread_queue_Enqueue( &_POSIX_signals_Wait_queue, interval );
10a81e: 50 push %eax
10a81f: 68 90 d5 10 00 push $0x10d590
10a824: 51 push %ecx
10a825: 68 f4 0a 13 00 push $0x130af4
10a82a: e8 a9 2a 00 00 call 10d2d8 <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
10a82f: e8 44 26 00 00 call 10ce78 <_Thread_Enable_dispatch>
/*
* When the thread is set free by a signal, it is need to eliminate
* the signal.
*/
_POSIX_signals_Clear_signals( api, the_info->si_signo, the_info, false, false );
10a834: c7 04 24 00 00 00 00 movl $0x0,(%esp)
10a83b: 6a 00 push $0x0
10a83d: 53 push %ebx
10a83e: ff 33 pushl (%ebx)
10a840: 56 push %esi
10a841: e8 3e 4e 00 00 call 10f684 <_POSIX_signals_Clear_signals>
/* Set errno only if return code is not EINTR or
* if EINTR was caused by a signal being caught, which
* was not in our set.
*/
if ( (_Thread_Executing->Wait.return_code != EINTR)
10a846: 83 c4 20 add $0x20,%esp
10a849: a1 2c 09 13 00 mov 0x13092c,%eax
10a84e: 83 78 34 04 cmpl $0x4,0x34(%eax)
10a852: 75 13 jne 10a867 <sigtimedwait+0x165>
|| !(*set & signo_to_mask( the_info->si_signo )) ) {
10a854: 8b 3b mov (%ebx),%edi
10a856: 8d 4f ff lea -0x1(%edi),%ecx
10a859: b8 01 00 00 00 mov $0x1,%eax
10a85e: d3 e0 shl %cl,%eax
10a860: 8b 55 08 mov 0x8(%ebp),%edx
10a863: 85 02 test %eax,(%edx)
10a865: 75 13 jne 10a87a <sigtimedwait+0x178>
errno = _Thread_Executing->Wait.return_code;
10a867: e8 f4 78 00 00 call 112160 <__errno>
10a86c: 8b 15 2c 09 13 00 mov 0x13092c,%edx
10a872: 8b 52 34 mov 0x34(%edx),%edx
10a875: 89 10 mov %edx,(%eax)
return -1;
10a877: 83 cf ff or $0xffffffff,%edi
}
return the_info->si_signo;
}
10a87a: 89 f8 mov %edi,%eax
10a87c: 8d 65 f4 lea -0xc(%ebp),%esp
10a87f: 5b pop %ebx
10a880: 5e pop %esi
10a881: 5f pop %edi
10a882: 5d pop %ebp
10a883: c3 ret
0010c244 <sigwait>:
int sigwait(
const sigset_t *set,
int *sig
)
{
10c244: 55 push %ebp
10c245: 89 e5 mov %esp,%ebp
10c247: 53 push %ebx
10c248: 83 ec 08 sub $0x8,%esp
10c24b: 8b 5d 0c mov 0xc(%ebp),%ebx
int status;
status = sigtimedwait( set, NULL, NULL );
10c24e: 6a 00 push $0x0
10c250: 6a 00 push $0x0
10c252: ff 75 08 pushl 0x8(%ebp)
10c255: e8 50 fe ff ff call 10c0aa <sigtimedwait>
if ( status != -1 ) {
10c25a: 83 c4 10 add $0x10,%esp
10c25d: 83 f8 ff cmp $0xffffffff,%eax
10c260: 74 08 je 10c26a <sigwait+0x26>
if ( sig )
10c262: 85 db test %ebx,%ebx
10c264: 74 0d je 10c273 <sigwait+0x2f> <== NEVER TAKEN
*sig = status;
10c266: 89 03 mov %eax,(%ebx)
10c268: eb 09 jmp 10c273 <sigwait+0x2f>
return 0;
}
return errno;
10c26a: e8 1d 76 00 00 call 11388c <__errno>
10c26f: 8b 00 mov (%eax),%eax
10c271: eb 02 jmp 10c275 <sigwait+0x31>
status = sigtimedwait( set, NULL, NULL );
if ( status != -1 ) {
if ( sig )
*sig = status;
return 0;
10c273: 31 c0 xor %eax,%eax
}
return errno;
}
10c275: 8b 5d fc mov -0x4(%ebp),%ebx
10c278: c9 leave
10c279: c3 ret
00108ddd <siproc>:
/*
* Process input character, with semaphore.
*/
static int
siproc (unsigned char c, struct rtems_termios_tty *tty)
{
108ddd: 55 push %ebp
108dde: 89 e5 mov %esp,%ebp
108de0: 56 push %esi
108de1: 53 push %ebx
108de2: 89 d3 mov %edx,%ebx
108de4: 89 c6 mov %eax,%esi
int i;
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
108de6: f7 42 3c 78 0e 00 00 testl $0xe78,0x3c(%edx)
108ded: 75 10 jne 108dff <siproc+0x22> <== ALWAYS TAKEN
rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
i = iproc (c, tty);
rtems_semaphore_release (tty->osem);
}
else {
i = iproc (c, tty);
108def: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED
108df2: 89 da mov %ebx,%edx <== NOT EXECUTED
}
return i;
}
108df4: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
108df7: 5b pop %ebx <== NOT EXECUTED
108df8: 5e pop %esi <== NOT EXECUTED
108df9: 5d pop %ebp <== NOT EXECUTED
rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
i = iproc (c, tty);
rtems_semaphore_release (tty->osem);
}
else {
i = iproc (c, tty);
108dfa: e9 70 fe ff ff jmp 108c6f <iproc> <== NOT EXECUTED
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
108dff: 50 push %eax
108e00: 6a 00 push $0x0
108e02: 6a 00 push $0x0
108e04: ff 72 18 pushl 0x18(%edx)
108e07: e8 84 0f 00 00 call 109d90 <rtems_semaphore_obtain>
i = iproc (c, tty);
108e0c: 89 f2 mov %esi,%edx
108e0e: 0f b6 c2 movzbl %dl,%eax
108e11: 89 da mov %ebx,%edx
108e13: e8 57 fe ff ff call 108c6f <iproc>
108e18: 89 c6 mov %eax,%esi
rtems_semaphore_release (tty->osem);
108e1a: 58 pop %eax
108e1b: ff 73 18 pushl 0x18(%ebx)
108e1e: e8 5d 10 00 00 call 109e80 <rtems_semaphore_release>
108e23: 83 c4 10 add $0x10,%esp
}
else {
i = iproc (c, tty);
}
return i;
}
108e26: 89 f0 mov %esi,%eax
108e28: 8d 65 f8 lea -0x8(%ebp),%esp
108e2b: 5b pop %ebx
108e2c: 5e pop %esi
108e2d: 5d pop %ebp
108e2e: c3 ret
001088c4 <sync_per_thread>:
fdatasync(fn);
}
/* iterate over all FILE *'s for this thread */
static void sync_per_thread(Thread_Control *t)
{
1088c4: 55 push %ebp
1088c5: 89 e5 mov %esp,%ebp
1088c7: 53 push %ebx
1088c8: 51 push %ecx
1088c9: 8b 45 08 mov 0x8(%ebp),%eax
/*
* The sync_wrapper() function will operate on the current thread's
* reent structure so we will temporarily use that.
*/
this_reent = t->libc_reent;
1088cc: 8b 88 e0 00 00 00 mov 0xe0(%eax),%ecx
if ( this_reent ) {
1088d2: 85 c9 test %ecx,%ecx
1088d4: 74 32 je 108908 <sync_per_thread+0x44> <== NEVER TAKEN
current_reent = _Thread_Executing->libc_reent;
1088d6: 8b 15 2c 09 13 00 mov 0x13092c,%edx
1088dc: 8b 9a e0 00 00 00 mov 0xe0(%edx),%ebx
_Thread_Executing->libc_reent = this_reent;
1088e2: 89 8a e0 00 00 00 mov %ecx,0xe0(%edx)
_fwalk (t->libc_reent, sync_wrapper);
1088e8: 52 push %edx
1088e9: 52 push %edx
1088ea: 68 0d 89 10 00 push $0x10890d
1088ef: ff b0 e0 00 00 00 pushl 0xe0(%eax)
1088f5: e8 56 a0 00 00 call 112950 <_fwalk>
_Thread_Executing->libc_reent = current_reent;
1088fa: a1 2c 09 13 00 mov 0x13092c,%eax
1088ff: 89 98 e0 00 00 00 mov %ebx,0xe0(%eax)
108905: 83 c4 10 add $0x10,%esp
}
}
108908: 8b 5d fc mov -0x4(%ebp),%ebx
10890b: c9 leave
10890c: c3 ret
00109808 <sysconf>:
*/
long sysconf(
int name
)
{
109808: 55 push %ebp
109809: 89 e5 mov %esp,%ebp
10980b: 83 ec 08 sub $0x8,%esp
10980e: 8b 55 08 mov 0x8(%ebp),%edx
if ( name == _SC_CLK_TCK )
109811: 83 fa 02 cmp $0x2,%edx
109814: 75 0f jne 109825 <sysconf+0x1d>
return (TOD_MICROSECONDS_PER_SECOND /
109816: b8 40 42 0f 00 mov $0xf4240,%eax
10981b: 31 d2 xor %edx,%edx
10981d: f7 35 4c a1 12 00 divl 0x12a14c
109823: eb 34 jmp 109859 <sysconf+0x51>
rtems_configuration_get_microseconds_per_tick());
if ( name == _SC_OPEN_MAX )
return rtems_libio_number_iops;
109825: a1 94 a2 12 00 mov 0x12a294,%eax
{
if ( name == _SC_CLK_TCK )
return (TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick());
if ( name == _SC_OPEN_MAX )
10982a: 83 fa 04 cmp $0x4,%edx
10982d: 74 2a je 109859 <sysconf+0x51>
return rtems_libio_number_iops;
if ( name == _SC_GETPW_R_SIZE_MAX )
return 1024;
10982f: b8 00 04 00 00 mov $0x400,%eax
rtems_configuration_get_microseconds_per_tick());
if ( name == _SC_OPEN_MAX )
return rtems_libio_number_iops;
if ( name == _SC_GETPW_R_SIZE_MAX )
109834: 83 fa 33 cmp $0x33,%edx
109837: 74 20 je 109859 <sysconf+0x51>
return 1024;
if ( name == _SC_PAGESIZE )
return PAGE_SIZE;
109839: 66 b8 00 10 mov $0x1000,%ax
return rtems_libio_number_iops;
if ( name == _SC_GETPW_R_SIZE_MAX )
return 1024;
if ( name == _SC_PAGESIZE )
10983d: 83 fa 08 cmp $0x8,%edx
109840: 74 17 je 109859 <sysconf+0x51>
return PAGE_SIZE;
if ( name == _SC_SYMLOOP_MAX )
return RTEMS_FILESYSTEM_SYMLOOP_MAX;
109842: 66 b8 20 00 mov $0x20,%ax
return 1024;
if ( name == _SC_PAGESIZE )
return PAGE_SIZE;
if ( name == _SC_SYMLOOP_MAX )
109846: 83 fa 4f cmp $0x4f,%edx
109849: 74 0e je 109859 <sysconf+0x51> <== NEVER TAKEN
#if defined(__sparc__)
if ( name == 515 ) /* Solaris _SC_STACK_PROT */
return 0;
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
10984b: e8 5c 79 00 00 call 1111ac <__errno>
109850: c7 00 16 00 00 00 movl $0x16,(%eax)
109856: 83 c8 ff or $0xffffffff,%eax
}
109859: c9 leave
10985a: c3 ret
00113240 <tcsetattr>:
int tcsetattr(
int fd,
int opt,
struct termios *tp
)
{
113240: 55 push %ebp
113241: 89 e5 mov %esp,%ebp
113243: 56 push %esi
113244: 53 push %ebx
113245: 8b 5d 08 mov 0x8(%ebp),%ebx
113248: 8b 45 0c mov 0xc(%ebp),%eax
11324b: 8b 75 10 mov 0x10(%ebp),%esi
switch (opt) {
11324e: 85 c0 test %eax,%eax
113250: 74 22 je 113274 <tcsetattr+0x34>
113252: 48 dec %eax
113253: 74 0d je 113262 <tcsetattr+0x22>
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
113255: e8 3a 3a 00 00 call 116c94 <__errno>
11325a: c7 00 86 00 00 00 movl $0x86,(%eax)
113260: eb 2a jmp 11328c <tcsetattr+0x4c>
case TCSADRAIN:
if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0)
113262: 50 push %eax
113263: 6a 00 push $0x0
113265: 6a 03 push $0x3
113267: 53 push %ebx
113268: e8 37 f9 ff ff call 112ba4 <ioctl>
11326d: 83 c4 10 add $0x10,%esp
113270: 85 c0 test %eax,%eax
113272: 78 18 js 11328c <tcsetattr+0x4c> <== NEVER TAKEN
return -1;
/*
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
113274: 89 75 10 mov %esi,0x10(%ebp)
113277: c7 45 0c 02 00 00 00 movl $0x2,0xc(%ebp)
11327e: 89 5d 08 mov %ebx,0x8(%ebp)
}
}
113281: 8d 65 f8 lea -0x8(%ebp),%esp
113284: 5b pop %ebx
113285: 5e pop %esi
113286: 5d pop %ebp
return -1;
/*
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
113287: e9 18 f9 ff ff jmp 112ba4 <ioctl>
}
}
11328c: 83 c8 ff or $0xffffffff,%eax
11328f: 8d 65 f8 lea -0x8(%ebp),%esp
113292: 5b pop %ebx
113293: 5e pop %esi
113294: 5d pop %ebp
113295: c3 ret
0010a9e8 <timer_create>:
int timer_create(
clockid_t clock_id,
struct sigevent *evp,
timer_t *timerid
)
{
10a9e8: 55 push %ebp
10a9e9: 89 e5 mov %esp,%ebp
10a9eb: 56 push %esi
10a9ec: 53 push %ebx
10a9ed: 8b 5d 0c mov 0xc(%ebp),%ebx
10a9f0: 8b 75 10 mov 0x10(%ebp),%esi
POSIX_Timer_Control *ptimer;
if ( clock_id != CLOCK_REALTIME )
10a9f3: 83 7d 08 01 cmpl $0x1,0x8(%ebp)
10a9f7: 74 02 je 10a9fb <timer_create+0x13>
10a9f9: eb 23 jmp 10aa1e <timer_create+0x36>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !timerid )
10a9fb: 85 f6 test %esi,%esi
10a9fd: 75 02 jne 10aa01 <timer_create+0x19>
10a9ff: eb 1d jmp 10aa1e <timer_create+0x36>
/*
* The data of the structure evp are checked in order to verify if they
* are coherent.
*/
if (evp != NULL) {
10aa01: 85 db test %ebx,%ebx
10aa03: 74 26 je 10aa2b <timer_create+0x43>
/* The structure has data */
if ( ( evp->sigev_notify != SIGEV_NONE ) &&
10aa05: 8b 03 mov (%ebx),%eax
10aa07: 48 dec %eax
10aa08: 83 f8 01 cmp $0x1,%eax
10aa0b: 76 02 jbe 10aa0f <timer_create+0x27> <== ALWAYS TAKEN
10aa0d: eb 0f jmp 10aa1e <timer_create+0x36> <== NOT EXECUTED
( evp->sigev_notify != SIGEV_SIGNAL ) ) {
/* The value of the field sigev_notify is not valid */
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( !evp->sigev_signo )
10aa0f: 8b 43 04 mov 0x4(%ebx),%eax
10aa12: 85 c0 test %eax,%eax
10aa14: 75 02 jne 10aa18 <timer_create+0x30> <== ALWAYS TAKEN
10aa16: eb 06 jmp 10aa1e <timer_create+0x36> <== NOT EXECUTED
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
10aa18: 48 dec %eax
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(evp->sigev_signo) )
10aa19: 83 f8 1f cmp $0x1f,%eax
10aa1c: 76 0d jbe 10aa2b <timer_create+0x43> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
10aa1e: e8 75 7e 00 00 call 112898 <__errno>
10aa23: c7 00 16 00 00 00 movl $0x16,(%eax)
10aa29: eb 34 jmp 10aa5f <timer_create+0x77>
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
10aa2b: a1 b4 31 13 00 mov 0x1331b4,%eax
10aa30: 40 inc %eax
10aa31: a3 b4 31 13 00 mov %eax,0x1331b4
return _Thread_Dispatch_disable_level;
10aa36: a1 b4 31 13 00 mov 0x1331b4,%eax
* the inactive chain of free timer control blocks.
*/
RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Allocate( void )
{
return (POSIX_Timer_Control *) _Objects_Allocate( &_POSIX_Timer_Information );
10aa3b: 83 ec 0c sub $0xc,%esp
10aa3e: 68 b8 34 13 00 push $0x1334b8
10aa43: e8 70 1c 00 00 call 10c6b8 <_Objects_Allocate>
/*
* Allocate a timer
*/
ptimer = _POSIX_Timer_Allocate();
if ( !ptimer ) {
10aa48: 83 c4 10 add $0x10,%esp
10aa4b: 85 c0 test %eax,%eax
10aa4d: 75 18 jne 10aa67 <timer_create+0x7f>
_Thread_Enable_dispatch();
10aa4f: e8 68 2c 00 00 call 10d6bc <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EAGAIN );
10aa54: e8 3f 7e 00 00 call 112898 <__errno>
10aa59: c7 00 0b 00 00 00 movl $0xb,(%eax)
10aa5f: 83 c8 ff or $0xffffffff,%eax
10aa62: e9 83 00 00 00 jmp 10aaea <timer_create+0x102>
}
/* The data of the created timer are stored to use them later */
ptimer->state = POSIX_TIMER_STATE_CREATE_NEW;
10aa67: c6 40 3c 02 movb $0x2,0x3c(%eax)
ptimer->thread_id = _Thread_Executing->Object.id;
10aa6b: 8b 15 fc 36 13 00 mov 0x1336fc,%edx
10aa71: 8b 52 08 mov 0x8(%edx),%edx
10aa74: 89 50 38 mov %edx,0x38(%eax)
if ( evp != NULL ) {
10aa77: 85 db test %ebx,%ebx
10aa79: 74 11 je 10aa8c <timer_create+0xa4>
ptimer->inf.sigev_notify = evp->sigev_notify;
10aa7b: 8b 13 mov (%ebx),%edx
10aa7d: 89 50 40 mov %edx,0x40(%eax)
ptimer->inf.sigev_signo = evp->sigev_signo;
10aa80: 8b 53 04 mov 0x4(%ebx),%edx
10aa83: 89 50 44 mov %edx,0x44(%eax)
ptimer->inf.sigev_value = evp->sigev_value;
10aa86: 8b 53 08 mov 0x8(%ebx),%edx
10aa89: 89 50 48 mov %edx,0x48(%eax)
}
ptimer->overrun = 0;
10aa8c: c7 40 68 00 00 00 00 movl $0x0,0x68(%eax)
ptimer->timer_data.it_value.tv_sec = 0;
10aa93: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax)
ptimer->timer_data.it_value.tv_nsec = 0;
10aa9a: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax)
ptimer->timer_data.it_interval.tv_sec = 0;
10aaa1: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax)
ptimer->timer_data.it_interval.tv_nsec = 0;
10aaa8: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
10aaaf: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax)
the_watchdog->routine = routine;
10aab6: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax)
the_watchdog->id = id;
10aabd: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax)
the_watchdog->user_data = user_data;
10aac4: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax)
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
10aacb: 8b 50 08 mov 0x8(%eax),%edx
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
10aace: 0f b7 da movzwl %dx,%ebx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10aad1: 8b 0d d4 34 13 00 mov 0x1334d4,%ecx
10aad7: 89 04 99 mov %eax,(%ecx,%ebx,4)
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
10aada: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
_Watchdog_Initialize( &ptimer->Timer, NULL, 0, NULL );
_Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0);
*timerid = ptimer->Object.id;
10aae1: 89 16 mov %edx,(%esi)
_Thread_Enable_dispatch();
10aae3: e8 d4 2b 00 00 call 10d6bc <_Thread_Enable_dispatch>
return 0;
10aae8: 31 c0 xor %eax,%eax
}
10aaea: 8d 65 f8 lea -0x8(%ebp),%esp
10aaed: 5b pop %ebx
10aaee: 5e pop %esi
10aaef: 5d pop %ebp
10aaf0: c3 ret
001099d0 <timer_settime>:
timer_t timerid,
int flags,
const struct itimerspec *value,
struct itimerspec *ovalue
)
{
1099d0: 55 push %ebp
1099d1: 89 e5 mov %esp,%ebp
1099d3: 57 push %edi
1099d4: 56 push %esi
1099d5: 53 push %ebx
1099d6: 83 ec 3c sub $0x3c,%esp
1099d9: 8b 5d 0c mov 0xc(%ebp),%ebx
Objects_Locations location;
bool activated;
uint32_t initial_period;
struct itimerspec normalize;
if ( !value )
1099dc: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
1099e0: 75 05 jne 1099e7 <timer_settime+0x17> <== ALWAYS TAKEN
1099e2: e9 ba 01 00 00 jmp 109ba1 <timer_settime+0x1d1> <== NOT EXECUTED
/*
* First, it verifies if the structure "value" is correct
* if the number of nanoseconds is not correct return EINVAL
*/
if ( !_Timespec_Is_valid( &(value->it_value) ) ) {
1099e7: 83 ec 0c sub $0xc,%esp
1099ea: 8b 45 10 mov 0x10(%ebp),%eax
1099ed: 83 c0 08 add $0x8,%eax
1099f0: 50 push %eax
1099f1: e8 06 32 00 00 call 10cbfc <_Timespec_Is_valid>
1099f6: 83 c4 10 add $0x10,%esp
1099f9: 84 c0 test %al,%al
1099fb: 75 05 jne 109a02 <timer_settime+0x32>
1099fd: e9 9f 01 00 00 jmp 109ba1 <timer_settime+0x1d1>
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( !_Timespec_Is_valid( &(value->it_interval) ) ) {
109a02: 83 ec 0c sub $0xc,%esp
109a05: ff 75 10 pushl 0x10(%ebp)
109a08: e8 ef 31 00 00 call 10cbfc <_Timespec_Is_valid>
109a0d: 83 c4 10 add $0x10,%esp
109a10: 84 c0 test %al,%al
109a12: 75 05 jne 109a19 <timer_settime+0x49> <== ALWAYS TAKEN
109a14: e9 88 01 00 00 jmp 109ba1 <timer_settime+0x1d1> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) {
109a19: f7 c3 fb ff ff ff test $0xfffffffb,%ebx
109a1f: 74 05 je 109a26 <timer_settime+0x56>
109a21: e9 7b 01 00 00 jmp 109ba1 <timer_settime+0x1d1>
rtems_set_errno_and_return_minus_one( EINVAL );
}
normalize = *value;
109a26: 8d 7d d8 lea -0x28(%ebp),%edi
109a29: b9 04 00 00 00 mov $0x4,%ecx
109a2e: 8b 75 10 mov 0x10(%ebp),%esi
109a31: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/* Convert absolute to relative time */
if (flags == TIMER_ABSTIME) {
109a33: 83 fb 04 cmp $0x4,%ebx
109a36: 75 5f jne 109a97 <timer_settime+0xc7>
struct timespec *tod_as_timespec
)
{
Timestamp_Control tod_as_timestamp;
_TOD_Get_as_timestamp( &tod_as_timestamp );
109a38: 83 ec 0c sub $0xc,%esp
109a3b: 8d 45 c8 lea -0x38(%ebp),%eax
109a3e: 50 push %eax
109a3f: e8 18 15 00 00 call 10af5c <_TOD_Get_as_timestamp>
_Timestamp_To_timespec( &tod_as_timestamp, tod_as_timespec );
109a44: 8b 75 c8 mov -0x38(%ebp),%esi
109a47: 8b 7d cc mov -0x34(%ebp),%edi
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
109a4a: 6a 00 push $0x0
109a4c: 68 00 ca 9a 3b push $0x3b9aca00
109a51: 57 push %edi
109a52: 56 push %esi
109a53: e8 8c 41 01 00 call 11dbe4 <__divdi3>
109a58: 83 c4 10 add $0x10,%esp
109a5b: 89 45 d0 mov %eax,-0x30(%ebp)
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
109a5e: 6a 00 push $0x0
109a60: 68 00 ca 9a 3b push $0x3b9aca00
109a65: 57 push %edi
109a66: 56 push %esi
109a67: e8 cc 42 01 00 call 11dd38 <__moddi3>
109a6c: 89 45 d4 mov %eax,-0x2c(%ebp)
struct timespec now;
_TOD_Get( &now );
/* Check for seconds in the past */
if ( _Timespec_Greater_than( &now, &normalize.it_value ) )
109a6f: 83 c4 18 add $0x18,%esp
109a72: 8d 75 d0 lea -0x30(%ebp),%esi
109a75: 56 push %esi
109a76: 8d 5d e0 lea -0x20(%ebp),%ebx
109a79: 53 push %ebx
109a7a: e8 a1 31 00 00 call 10cc20 <_Timespec_Less_than>
109a7f: 83 c4 10 add $0x10,%esp
109a82: 84 c0 test %al,%al
109a84: 74 05 je 109a8b <timer_settime+0xbb>
109a86: e9 16 01 00 00 jmp 109ba1 <timer_settime+0x1d1>
rtems_set_errno_and_return_minus_one( EINVAL );
_Timespec_Subtract( &now, &normalize.it_value, &normalize.it_value );
109a8b: 52 push %edx
109a8c: 53 push %ebx
109a8d: 53 push %ebx
109a8e: 56 push %esi
109a8f: e8 b0 31 00 00 call 10cc44 <_Timespec_Subtract>
109a94: 83 c4 10 add $0x10,%esp
RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get (
timer_t id,
Objects_Locations *location
)
{
return (POSIX_Timer_Control *)
109a97: 50 push %eax
/* If the function reaches this point, then it will be necessary to do
* something with the structure of times of the timer: to stop, start
* or start it again
*/
ptimer = _POSIX_Timer_Get( timerid, &location );
109a98: 8d 45 c4 lea -0x3c(%ebp),%eax
109a9b: 50 push %eax
109a9c: ff 75 08 pushl 0x8(%ebp)
109a9f: 68 b8 e6 12 00 push $0x12e6b8
109aa4: e8 3f 1d 00 00 call 10b7e8 <_Objects_Get>
109aa9: 89 c3 mov %eax,%ebx
switch ( location ) {
109aab: 83 c4 10 add $0x10,%esp
109aae: 83 7d c4 00 cmpl $0x0,-0x3c(%ebp)
109ab2: 0f 85 e9 00 00 00 jne 109ba1 <timer_settime+0x1d1>
case OBJECTS_LOCAL:
/* First, it verifies if the timer must be stopped */
if ( normalize.it_value.tv_sec == 0 && normalize.it_value.tv_nsec == 0 ) {
109ab8: 83 7d e0 00 cmpl $0x0,-0x20(%ebp)
109abc: 75 3c jne 109afa <timer_settime+0x12a>
109abe: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp)
109ac2: 75 36 jne 109afa <timer_settime+0x12a>
/* Stop the timer */
(void) _Watchdog_Remove( &ptimer->Timer );
109ac4: 83 ec 0c sub $0xc,%esp
109ac7: 8d 40 10 lea 0x10(%eax),%eax
109aca: 50 push %eax
109acb: e8 10 35 00 00 call 10cfe0 <_Watchdog_Remove>
/* The old data of the timer are returned */
if ( ovalue )
109ad0: 83 c4 10 add $0x10,%esp
109ad3: 83 7d 14 00 cmpl $0x0,0x14(%ebp)
109ad7: 8d 43 54 lea 0x54(%ebx),%eax
109ada: 74 0c je 109ae8 <timer_settime+0x118>
*ovalue = ptimer->timer_data;
109adc: b9 04 00 00 00 mov $0x4,%ecx
109ae1: 8b 7d 14 mov 0x14(%ebp),%edi
109ae4: 89 c6 mov %eax,%esi
109ae6: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/* The new data are set */
ptimer->timer_data = normalize;
109ae8: 8d 75 d8 lea -0x28(%ebp),%esi
109aeb: b9 04 00 00 00 mov $0x4,%ecx
109af0: 89 c7 mov %eax,%edi
109af2: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/* Indicates that the timer is created and stopped */
ptimer->state = POSIX_TIMER_STATE_CREATE_STOP;
109af4: c6 43 3c 04 movb $0x4,0x3c(%ebx)
109af8: eb 35 jmp 109b2f <timer_settime+0x15f>
_Thread_Enable_dispatch();
return 0;
}
/* Convert from seconds and nanoseconds to ticks */
ptimer->ticks = _Timespec_To_ticks( &value->it_interval );
109afa: 83 ec 0c sub $0xc,%esp
109afd: ff 75 10 pushl 0x10(%ebp)
109b00: e8 77 31 00 00 call 10cc7c <_Timespec_To_ticks>
109b05: 89 43 64 mov %eax,0x64(%ebx)
initial_period = _Timespec_To_ticks( &normalize.it_value );
109b08: 8d 45 e0 lea -0x20(%ebp),%eax
109b0b: 89 04 24 mov %eax,(%esp)
109b0e: e8 69 31 00 00 call 10cc7c <_Timespec_To_ticks>
activated = _POSIX_Timer_Insert_helper(
109b13: 89 1c 24 mov %ebx,(%esp)
109b16: 68 b8 9b 10 00 push $0x109bb8
109b1b: ff 73 08 pushl 0x8(%ebx)
109b1e: 50 push %eax
109b1f: 8d 43 10 lea 0x10(%ebx),%eax
109b22: 50 push %eax
109b23: e8 28 52 00 00 call 10ed50 <_POSIX_Timer_Insert_helper>
initial_period,
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated ) {
109b28: 83 c4 20 add $0x20,%esp
109b2b: 84 c0 test %al,%al
109b2d: 75 07 jne 109b36 <timer_settime+0x166>
_Thread_Enable_dispatch();
109b2f: e8 e8 27 00 00 call 10c31c <_Thread_Enable_dispatch>
109b34: eb 67 jmp 109b9d <timer_settime+0x1cd>
/*
* The timer has been started and is running. So we return the
* old ones in "ovalue"
*/
if ( ovalue )
109b36: 83 7d 14 00 cmpl $0x0,0x14(%ebp)
109b3a: 8d 43 54 lea 0x54(%ebx),%eax
109b3d: 74 0c je 109b4b <timer_settime+0x17b>
*ovalue = ptimer->timer_data;
109b3f: b9 04 00 00 00 mov $0x4,%ecx
109b44: 8b 7d 14 mov 0x14(%ebp),%edi
109b47: 89 c6 mov %eax,%esi
109b49: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
ptimer->timer_data = normalize;
109b4b: 8d 75 d8 lea -0x28(%ebp),%esi
109b4e: b9 04 00 00 00 mov $0x4,%ecx
109b53: 89 c7 mov %eax,%edi
109b55: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/* Indicate that the time is running */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
109b57: c6 43 3c 03 movb $0x3,0x3c(%ebx)
struct timespec *tod_as_timespec
)
{
Timestamp_Control tod_as_timestamp;
_TOD_Get_as_timestamp( &tod_as_timestamp );
109b5b: 83 ec 0c sub $0xc,%esp
109b5e: 8d 45 c8 lea -0x38(%ebp),%eax
109b61: 50 push %eax
109b62: e8 f5 13 00 00 call 10af5c <_TOD_Get_as_timestamp>
_Timestamp_To_timespec( &tod_as_timestamp, tod_as_timespec );
109b67: 8b 75 c8 mov -0x38(%ebp),%esi
109b6a: 8b 7d cc mov -0x34(%ebp),%edi
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
109b6d: 6a 00 push $0x0
109b6f: 68 00 ca 9a 3b push $0x3b9aca00
109b74: 57 push %edi
109b75: 56 push %esi
109b76: e8 69 40 01 00 call 11dbe4 <__divdi3>
109b7b: 83 c4 10 add $0x10,%esp
109b7e: 89 43 6c mov %eax,0x6c(%ebx)
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
109b81: 6a 00 push $0x0
109b83: 68 00 ca 9a 3b push $0x3b9aca00
109b88: 57 push %edi
109b89: 56 push %esi
109b8a: e8 a9 41 01 00 call 11dd38 <__moddi3>
109b8f: 83 c4 10 add $0x10,%esp
109b92: 89 43 70 mov %eax,0x70(%ebx)
_TOD_Get( &ptimer->time );
_Thread_Enable_dispatch();
109b95: e8 82 27 00 00 call 10c31c <_Thread_Enable_dispatch>
109b9a: 83 c4 10 add $0x10,%esp
return 0;
109b9d: 31 c0 xor %eax,%eax
109b9f: eb 0e jmp 109baf <timer_settime+0x1df>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
109ba1: e8 c6 7a 00 00 call 11166c <__errno>
109ba6: c7 00 16 00 00 00 movl $0x16,(%eax)
109bac: 83 c8 ff or $0xffffffff,%eax
}
109baf: 8d 65 f4 lea -0xc(%ebp),%esp
109bb2: 5b pop %ebx
109bb3: 5e pop %esi
109bb4: 5f pop %edi
109bb5: 5d pop %ebp
109bb6: c3 ret
00109aa8 <ualarm>:
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
109aa8: 55 push %ebp
109aa9: 89 e5 mov %esp,%ebp
109aab: 56 push %esi
109aac: 53 push %ebx
109aad: 83 ec 10 sub $0x10,%esp
/*
* Initialize the timer used to implement alarm().
*/
if ( !the_timer->routine ) {
109ab0: 83 3d 0c fd 12 00 00 cmpl $0x0,0x12fd0c
109ab7: 75 2c jne 109ae5 <ualarm+0x3d>
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
109ab9: c7 05 f8 fc 12 00 00 movl $0x0,0x12fcf8
109ac0: 00 00 00
the_watchdog->routine = routine;
109ac3: c7 05 0c fd 12 00 70 movl $0x109a70,0x12fd0c
109aca: 9a 10 00
the_watchdog->id = id;
109acd: c7 05 10 fd 12 00 00 movl $0x0,0x12fd10
109ad4: 00 00 00
the_watchdog->user_data = user_data;
109ad7: c7 05 14 fd 12 00 00 movl $0x0,0x12fd14
109ade: 00 00 00
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
useconds_t remaining = 0;
109ae1: 31 db xor %ebx,%ebx
109ae3: eb 4f jmp 109b34 <ualarm+0x8c>
if ( !the_timer->routine ) {
_Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL );
} else {
Watchdog_States state;
state = _Watchdog_Remove( the_timer );
109ae5: 83 ec 0c sub $0xc,%esp
109ae8: 68 f0 fc 12 00 push $0x12fcf0
109aed: e8 12 33 00 00 call 10ce04 <_Watchdog_Remove>
if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) {
109af2: 83 e8 02 sub $0x2,%eax
109af5: 83 c4 10 add $0x10,%esp
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
useconds_t remaining = 0;
109af8: 31 db xor %ebx,%ebx
_Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL );
} else {
Watchdog_States state;
state = _Watchdog_Remove( the_timer );
if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) {
109afa: 83 f8 01 cmp $0x1,%eax
109afd: 77 35 ja 109b34 <ualarm+0x8c> <== NEVER TAKEN
* boot. Since alarm() is dealing in seconds, we must account for
* this.
*/
ticks = the_timer->initial;
ticks -= (the_timer->stop_time - the_timer->start_time);
109aff: 8b 0d 04 fd 12 00 mov 0x12fd04,%ecx
109b05: 03 0d fc fc 12 00 add 0x12fcfc,%ecx
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
109b0b: 50 push %eax
109b0c: 50 push %eax
109b0d: 8d 45 f0 lea -0x10(%ebp),%eax
109b10: 50 push %eax
* boot. Since alarm() is dealing in seconds, we must account for
* this.
*/
ticks = the_timer->initial;
ticks -= (the_timer->stop_time - the_timer->start_time);
109b11: 2b 0d 08 fd 12 00 sub 0x12fd08,%ecx
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
109b17: 51 push %ecx
109b18: e8 f3 2e 00 00 call 10ca10 <_Timespec_From_ticks>
remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND;
109b1d: 69 5d f0 40 42 0f 00 imul $0xf4240,-0x10(%ebp),%ebx
remaining += tp.tv_nsec / 1000;
109b24: 8b 45 f4 mov -0xc(%ebp),%eax
109b27: b9 e8 03 00 00 mov $0x3e8,%ecx
109b2c: 99 cltd
109b2d: f7 f9 idiv %ecx
109b2f: 01 c3 add %eax,%ebx
109b31: 83 c4 10 add $0x10,%esp
/*
* If useconds is non-zero, then the caller wants to schedule
* the alarm repeatedly at that interval. If the interval is
* less than a single clock tick, then fudge it to a clock tick.
*/
if ( useconds ) {
109b34: 83 7d 08 00 cmpl $0x0,0x8(%ebp)
109b38: 74 45 je 109b7f <ualarm+0xd7>
Watchdog_Interval ticks;
tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND;
109b3a: b9 40 42 0f 00 mov $0xf4240,%ecx
109b3f: 8b 45 08 mov 0x8(%ebp),%eax
109b42: 31 d2 xor %edx,%edx
109b44: f7 f1 div %ecx
109b46: 89 45 f0 mov %eax,-0x10(%ebp)
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
109b49: 69 d2 e8 03 00 00 imul $0x3e8,%edx,%edx
109b4f: 89 55 f4 mov %edx,-0xc(%ebp)
ticks = _Timespec_To_ticks( &tp );
109b52: 83 ec 0c sub $0xc,%esp
109b55: 8d 75 f0 lea -0x10(%ebp),%esi
109b58: 56 push %esi
109b59: e8 da 2e 00 00 call 10ca38 <_Timespec_To_ticks>
if ( ticks == 0 )
ticks = 1;
_Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) );
109b5e: 89 34 24 mov %esi,(%esp)
109b61: e8 d2 2e 00 00 call 10ca38 <_Timespec_To_ticks>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
109b66: a3 fc fc 12 00 mov %eax,0x12fcfc
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
109b6b: 59 pop %ecx
109b6c: 5e pop %esi
109b6d: 68 f0 fc 12 00 push $0x12fcf0
109b72: 68 d8 f4 12 00 push $0x12f4d8
109b77: e8 74 31 00 00 call 10ccf0 <_Watchdog_Insert>
109b7c: 83 c4 10 add $0x10,%esp
}
return remaining;
}
109b7f: 89 d8 mov %ebx,%eax
109b81: 8d 65 f8 lea -0x8(%ebp),%esp
109b84: 5b pop %ebx
109b85: 5e pop %esi
109b86: 5d pop %ebp
109b87: c3 ret
0010981c <unmount>:
return mt_entry == root->mt_entry || mt_entry == current->mt_entry;
}
int unmount( const char *path )
{
10981c: 55 push %ebp
10981d: 89 e5 mov %esp,%ebp
10981f: 56 push %esi
109820: 53 push %ebx
109821: 83 ec 44 sub $0x44,%esp
int rv = 0;
rtems_filesystem_eval_path_context_t ctx;
int eval_flags = RTEMS_FS_FOLLOW_LINK;
const rtems_filesystem_location_info_t *currentloc =
109824: 6a 18 push $0x18
109826: ff 75 08 pushl 0x8(%ebp)
rtems_filesystem_eval_path_start( &ctx, path, eval_flags );
109829: 8d 45 c0 lea -0x40(%ebp),%eax
int unmount( const char *path )
{
int rv = 0;
rtems_filesystem_eval_path_context_t ctx;
int eval_flags = RTEMS_FS_FOLLOW_LINK;
const rtems_filesystem_location_info_t *currentloc =
10982c: 50 push %eax
10982d: e8 a3 e2 ff ff call 107ad5 <rtems_filesystem_eval_path_start>
rtems_filesystem_eval_path_start( &ctx, path, eval_flags );
rtems_filesystem_mount_table_entry_t *mt_entry = currentloc->mt_entry;
109832: 8b 58 14 mov 0x14(%eax),%ebx
const rtems_filesystem_location_info_t *loc
)
{
const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry;
return (*mt_entry->ops->are_nodes_equal_h)(
109835: 5a pop %edx
109836: 59 pop %ecx
109837: 8b 53 0c mov 0xc(%ebx),%edx
10983a: ff 73 24 pushl 0x24(%ebx)
10983d: 50 push %eax
10983e: ff 52 10 call *0x10(%edx)
if ( rtems_filesystem_location_is_root( currentloc ) ) {
109841: 83 c4 10 add $0x10,%esp
109844: 84 c0 test %al,%al
109846: 74 5b je 1098a3 <unmount+0x87>
static bool contains_root_or_current_directory(
const rtems_filesystem_mount_table_entry_t *mt_entry
)
{
const rtems_filesystem_location_info_t *root =
&rtems_filesystem_root->location;
109848: a1 14 c1 12 00 mov 0x12c114,%eax
const rtems_filesystem_location_info_t *current =
&rtems_filesystem_current->location;
10984d: 8b 10 mov (%eax),%edx
return mt_entry == root->mt_entry || mt_entry == current->mt_entry;
10984f: 8b 40 04 mov 0x4(%eax),%eax
109852: 3b 58 14 cmp 0x14(%eax),%ebx
109855: 74 0a je 109861 <unmount+0x45>
109857: 31 c0 xor %eax,%eax
109859: 3b 5a 14 cmp 0x14(%edx),%ebx
10985c: 0f 94 c0 sete %al
10985f: eb 05 jmp 109866 <unmount+0x4a>
109861: b8 01 00 00 00 mov $0x1,%eax
const rtems_filesystem_location_info_t *currentloc =
rtems_filesystem_eval_path_start( &ctx, path, eval_flags );
rtems_filesystem_mount_table_entry_t *mt_entry = currentloc->mt_entry;
if ( rtems_filesystem_location_is_root( currentloc ) ) {
if ( !contains_root_or_current_directory( mt_entry ) ) {
109866: 85 c0 test %eax,%eax
109868: 75 2c jne 109896 <unmount+0x7a>
const rtems_filesystem_operations_table *mt_point_ops =
mt_entry->mt_point_node->location.mt_entry->ops;
rv = (*mt_point_ops->unmount_h)( mt_entry );
10986a: 83 ec 0c sub $0xc,%esp
rtems_filesystem_mount_table_entry_t *mt_entry = currentloc->mt_entry;
if ( rtems_filesystem_location_is_root( currentloc ) ) {
if ( !contains_root_or_current_directory( mt_entry ) ) {
const rtems_filesystem_operations_table *mt_point_ops =
mt_entry->mt_point_node->location.mt_entry->ops;
10986d: 8b 43 20 mov 0x20(%ebx),%eax
109870: 8b 40 14 mov 0x14(%eax),%eax
rv = (*mt_point_ops->unmount_h)( mt_entry );
109873: 8b 40 0c mov 0xc(%eax),%eax
109876: 53 push %ebx
109877: ff 50 38 call *0x38(%eax)
10987a: 89 c6 mov %eax,%esi
if ( rv == 0 ) {
10987c: 83 c4 10 add $0x10,%esp
10987f: 85 c0 test %eax,%eax
109881: 75 2e jne 1098b1 <unmount+0x95>
rtems_id self_task_id = rtems_task_self();
109883: e8 80 0c 00 00 call 10a508 <rtems_task_self>
rtems_filesystem_mt_entry_declare_lock_context( lock_context );
rtems_filesystem_mt_entry_lock( lock_context );
109888: 9c pushf
109889: fa cli
10988a: 5a pop %edx
mt_entry->unmount_task = self_task_id;
10988b: 89 43 3c mov %eax,0x3c(%ebx)
mt_entry->mounted = false;
10988e: c6 43 28 00 movb $0x0,0x28(%ebx)
rtems_filesystem_mt_entry_unlock( lock_context );
109892: 52 push %edx
109893: 9d popf
109894: eb 1b jmp 1098b1 <unmount+0x95>
}
} else {
errno = EBUSY;
109896: e8 c9 79 00 00 call 111264 <__errno>
10989b: c7 00 10 00 00 00 movl $0x10,(%eax)
1098a1: eb 0b jmp 1098ae <unmount+0x92>
rv = -1;
}
} else {
errno = EACCES;
1098a3: e8 bc 79 00 00 call 111264 <__errno>
1098a8: c7 00 0d 00 00 00 movl $0xd,(%eax)
rv = -1;
1098ae: 83 ce ff or $0xffffffff,%esi
}
rtems_filesystem_eval_path_cleanup( &ctx );
1098b1: 83 ec 0c sub $0xc,%esp
1098b4: 8d 45 c0 lea -0x40(%ebp),%eax
1098b7: 50 push %eax
1098b8: e8 d4 e2 ff ff call 107b91 <rtems_filesystem_eval_path_cleanup>
if ( rv == 0 ) {
1098bd: 83 c4 10 add $0x10,%esp
1098c0: 85 f6 test %esi,%esi
1098c2: 75 23 jne 1098e7 <unmount+0xcb>
rtems_event_set out;
rtems_status_code sc = rtems_event_receive(
1098c4: 8d 45 bc lea -0x44(%ebp),%eax
1098c7: 50 push %eax
1098c8: 6a 00 push $0x0
1098ca: 6a 00 push $0x0
1098cc: 6a 02 push $0x2
1098ce: e8 4d 03 00 00 call 109c20 <rtems_event_receive>
RTEMS_EVENT_ALL | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&out
);
if ( sc != RTEMS_SUCCESSFUL ) {
1098d3: 83 c4 10 add $0x10,%esp
1098d6: 85 c0 test %eax,%eax
1098d8: 74 0d je 1098e7 <unmount+0xcb> <== ALWAYS TAKEN
rtems_fatal_error_occurred( 0xdeadbeef );
1098da: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1098dd: 68 ef be ad de push $0xdeadbeef <== NOT EXECUTED
1098e2: e8 59 0e 00 00 call 10a740 <rtems_fatal_error_occurred><== NOT EXECUTED
}
}
return rv;
}
1098e7: 89 f0 mov %esi,%eax
1098e9: 8d 65 f8 lea -0x8(%ebp),%esp
1098ec: 5b pop %ebx
1098ed: 5e pop %esi
1098ee: 5d pop %ebp
1098ef: c3 ret
0011d920 <write>:
ssize_t write(
int fd,
const void *buffer,
size_t count
)
{
11d920: 55 push %ebp
11d921: 89 e5 mov %esp,%ebp
11d923: 53 push %ebx
11d924: 53 push %ebx
11d925: 8b 45 08 mov 0x8(%ebp),%eax
11d928: 8b 55 0c mov 0xc(%ebp),%edx
11d92b: 8b 4d 10 mov 0x10(%ebp),%ecx
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
11d92e: 3b 05 70 a2 12 00 cmp 0x12a270,%eax
11d934: 72 02 jb 11d938 <write+0x18>
11d936: eb 2d jmp 11d965 <write+0x45>
iop = rtems_libio_iop( fd );
11d938: 6b c0 30 imul $0x30,%eax,%eax
11d93b: 03 05 d0 e2 12 00 add 0x12e2d0,%eax
rtems_libio_check_is_open( iop );
11d941: 8b 58 0c mov 0xc(%eax),%ebx
11d944: f6 c7 01 test $0x1,%bh
11d947: 75 02 jne 11d94b <write+0x2b>
11d949: eb 1a jmp 11d965 <write+0x45>
rtems_libio_check_buffer( buffer );
11d94b: 85 d2 test %edx,%edx
11d94d: 75 0d jne 11d95c <write+0x3c> <== ALWAYS TAKEN
11d94f: e8 88 35 ff ff call 110edc <__errno> <== NOT EXECUTED
11d954: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
11d95a: eb 14 jmp 11d970 <write+0x50> <== NOT EXECUTED
rtems_libio_check_count( count );
11d95c: 85 c9 test %ecx,%ecx
11d95e: 74 29 je 11d989 <write+0x69>
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF );
11d960: 80 e3 04 and $0x4,%bl
11d963: 75 10 jne 11d975 <write+0x55>
11d965: e8 72 35 ff ff call 110edc <__errno>
11d96a: c7 00 09 00 00 00 movl $0x9,(%eax)
11d970: 83 c8 ff or $0xffffffff,%eax
11d973: eb 16 jmp 11d98b <write+0x6b>
/*
* Now process the write() request.
*/
return (*iop->pathinfo.handlers->write_h)( iop, buffer, count );
11d975: 8b 58 20 mov 0x20(%eax),%ebx
11d978: 89 4d 10 mov %ecx,0x10(%ebp)
11d97b: 89 55 0c mov %edx,0xc(%ebp)
11d97e: 89 45 08 mov %eax,0x8(%ebp)
11d981: 8b 43 0c mov 0xc(%ebx),%eax
}
11d984: 59 pop %ecx
11d985: 5b pop %ebx
11d986: 5d pop %ebp
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF );
/*
* Now process the write() request.
*/
return (*iop->pathinfo.handlers->write_h)( iop, buffer, count );
11d987: ff e0 jmp *%eax
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
rtems_libio_check_buffer( buffer );
rtems_libio_check_count( count );
11d989: 31 c0 xor %eax,%eax
/*
* Now process the write() request.
*/
return (*iop->pathinfo.handlers->write_h)( iop, buffer, count );
}
11d98b: 5a pop %edx
11d98c: 5b pop %ebx
11d98d: 5d pop %ebp
11d98e: c3 ret
0010a278 <writev>:
ssize_t writev(
int fd,
const struct iovec *iov,
int iovcnt
)
{
10a278: 55 push %ebp
10a279: 89 e5 mov %esp,%ebp
10a27b: 57 push %edi
10a27c: 56 push %esi
10a27d: 53 push %ebx
10a27e: 83 ec 1c sub $0x1c,%esp
10a281: 8b 75 08 mov 0x8(%ebp),%esi
10a284: 8b 5d 0c mov 0xc(%ebp),%ebx
10a287: 8b 45 10 mov 0x10(%ebp),%eax
int bytes;
rtems_libio_t *iop;
ssize_t old;
bool all_zeros;
rtems_libio_check_fd( fd );
10a28a: 3b 35 70 a2 12 00 cmp 0x12a270,%esi
10a290: 72 02 jb 10a294 <writev+0x1c>
10a292: eb 18 jmp 10a2ac <writev+0x34>
iop = rtems_libio_iop( fd );
10a294: 6b f6 30 imul $0x30,%esi,%esi
10a297: 03 35 d0 e2 12 00 add 0x12e2d0,%esi
rtems_libio_check_is_open( iop );
10a29d: 8b 56 0c mov 0xc(%esi),%edx
10a2a0: f6 c6 01 test $0x1,%dh
10a2a3: 75 02 jne 10a2a7 <writev+0x2f>
10a2a5: eb 05 jmp 10a2ac <writev+0x34>
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF );
10a2a7: 80 e2 04 and $0x4,%dl
10a2aa: 75 10 jne 10a2bc <writev+0x44> <== ALWAYS TAKEN
10a2ac: e8 23 75 00 00 call 1117d4 <__errno>
10a2b1: c7 00 09 00 00 00 movl $0x9,(%eax)
10a2b7: e9 95 00 00 00 jmp 10a351 <writev+0xd9>
/*
* Argument validation on IO vector
*/
if ( !iov )
10a2bc: 85 db test %ebx,%ebx
10a2be: 75 02 jne 10a2c2 <writev+0x4a>
10a2c0: eb 3f jmp 10a301 <writev+0x89>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
10a2c2: 85 c0 test %eax,%eax
10a2c4: 7f 02 jg 10a2c8 <writev+0x50>
10a2c6: eb 39 jmp 10a301 <writev+0x89>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
10a2c8: 3d 00 04 00 00 cmp $0x400,%eax
10a2cd: 7e 02 jle 10a2d1 <writev+0x59> <== ALWAYS TAKEN
10a2cf: eb 30 jmp 10a301 <writev+0x89> <== NOT EXECUTED
#include <sys/uio.h>
#include <rtems/libio_.h>
#include <rtems/seterr.h>
ssize_t writev(
10a2d1: 8d 04 c3 lea (%ebx,%eax,8),%eax
10a2d4: 89 45 e4 mov %eax,-0x1c(%ebp)
10a2d7: 89 d8 mov %ebx,%eax
10a2d9: bf 01 00 00 00 mov $0x1,%edi
10a2de: 31 c9 xor %ecx,%ecx
10a2e0: eb 02 jmp 10a2e4 <writev+0x6c>
if ( iov[v].iov_len )
all_zeros = false;
/* check for wrap */
old = total;
total += iov[v].iov_len;
10a2e2: 89 d1 mov %edx,%ecx
/*
* iov[v].iov_len cannot be less than 0 because size_t is unsigned.
* So we only check for zero.
*/
if ( iov[v].iov_base == 0 )
10a2e4: 83 38 00 cmpl $0x0,(%eax)
10a2e7: 75 02 jne 10a2eb <writev+0x73>
10a2e9: eb 16 jmp 10a301 <writev+0x89>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
all_zeros = false;
10a2eb: 83 78 04 00 cmpl $0x0,0x4(%eax)
10a2ef: 0f 94 c2 sete %dl
10a2f2: f7 da neg %edx
10a2f4: 21 d7 and %edx,%edi
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old || total > SSIZE_MAX )
10a2f6: 8b 50 04 mov 0x4(%eax),%edx
10a2f9: 01 ca add %ecx,%edx
10a2fb: 78 04 js 10a301 <writev+0x89>
10a2fd: 39 ca cmp %ecx,%edx
10a2ff: 7d 0d jge 10a30e <writev+0x96>
rtems_set_errno_and_return_minus_one( EINVAL );
10a301: e8 ce 74 00 00 call 1117d4 <__errno>
10a306: c7 00 16 00 00 00 movl $0x16,(%eax)
10a30c: eb 43 jmp 10a351 <writev+0xd9>
10a30e: 83 c0 08 add $0x8,%eax
* this loop does that check as well and sets "all-zero" appropriately.
* The variable "all_zero" is used as an early exit point before
* entering the write loop.
*/
all_zeros = true;
for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) {
10a311: 3b 45 e4 cmp -0x1c(%ebp),%eax
10a314: 75 cc jne 10a2e2 <writev+0x6a>
/*
* A writev with all zeros is supposed to have no effect per OpenGroup.
*/
if ( all_zeros == true ) {
return 0;
10a316: 31 d2 xor %edx,%edx
}
/*
* A writev with all zeros is supposed to have no effect per OpenGroup.
*/
if ( all_zeros == true ) {
10a318: 89 f8 mov %edi,%eax
10a31a: 84 c0 test %al,%al
10a31c: 75 36 jne 10a354 <writev+0xdc>
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
/* all zero lengths has no effect */
if ( iov[v].iov_len == 0 )
10a31e: 8b 43 04 mov 0x4(%ebx),%eax
10a321: 85 c0 test %eax,%eax
10a323: 74 22 je 10a347 <writev+0xcf> <== NEVER TAKEN
continue;
bytes = (*iop->pathinfo.handlers->write_h)(
10a325: 51 push %ecx
10a326: 8b 4e 20 mov 0x20(%esi),%ecx
10a329: 50 push %eax
10a32a: ff 33 pushl (%ebx)
10a32c: 56 push %esi
10a32d: 89 55 e0 mov %edx,-0x20(%ebp)
10a330: ff 51 0c call *0xc(%ecx)
iop,
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
10a333: 83 c4 10 add $0x10,%esp
10a336: 83 f8 00 cmp $0x0,%eax
10a339: 8b 55 e0 mov -0x20(%ebp),%edx
10a33c: 7c 13 jl 10a351 <writev+0xd9> <== NEVER TAKEN
return -1;
if ( bytes > 0 ) {
10a33e: 74 02 je 10a342 <writev+0xca> <== NEVER TAKEN
total += bytes;
10a340: 01 c2 add %eax,%edx
}
if (bytes != iov[ v ].iov_len)
10a342: 3b 43 04 cmp 0x4(%ebx),%eax
10a345: 75 0d jne 10a354 <writev+0xdc> <== NEVER TAKEN
10a347: 83 c3 08 add $0x8,%ebx
}
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
10a34a: 3b 5d e4 cmp -0x1c(%ebp),%ebx
10a34d: 75 cf jne 10a31e <writev+0xa6>
10a34f: eb 03 jmp 10a354 <writev+0xdc>
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
return -1;
10a351: 83 ca ff or $0xffffffff,%edx
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
10a354: 89 d0 mov %edx,%eax
10a356: 8d 65 f4 lea -0xc(%ebp),%esp
10a359: 5b pop %ebx
10a35a: 5e pop %esi
10a35b: 5f pop %edi
10a35c: 5d pop %ebp
10a35d: c3 ret