RTEMS 4.11Annotated Report
Sun Dec 23 00:09:42 2012
ffc0c58c <IMFS_chown>:
int IMFS_chown(
const rtems_filesystem_location_info_t *loc,
uid_t owner,
gid_t group
)
{
ffc0c58c: 94 21 ff d8 stwu r1,-40(r1)
ffc0c590: 7c 08 02 a6 mflr r0
ffc0c594: 90 01 00 2c stw r0,44(r1)
ffc0c598: bf a1 00 1c stmw r29,28(r1)
ffc0c59c: 7c 9e 23 78 mr r30,r4
ffc0c5a0: 7c bd 2b 78 mr r29,r5
IMFS_jnode_t *jnode;
#if defined(RTEMS_POSIX_API)
uid_t st_uid;
#endif
jnode = (IMFS_jnode_t *) loc->node_access;
ffc0c5a4: 83 e3 00 08 lwz r31,8(r3)
/*
* Verify I am the owner of the node or the super user.
*/
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
ffc0c5a8: 48 00 09 d5 bl ffc0cf7c <geteuid>
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
ffc0c5ac: a1 3f 00 3c lhz r9,60(r31)
ffc0c5b0: 7f 89 18 00 cmpw cr7,r9,r3
ffc0c5b4: 41 9e 00 20 beq- cr7,ffc0c5d4 <IMFS_chown+0x48>
ffc0c5b8: 2f 83 00 00 cmpwi cr7,r3,0
ffc0c5bc: 41 be 00 18 beq+ cr7,ffc0c5d4 <IMFS_chown+0x48> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EPERM );
ffc0c5c0: 48 00 3f ed bl ffc105ac <__errno>
ffc0c5c4: 39 20 00 01 li r9,1
ffc0c5c8: 91 23 00 00 stw r9,0(r3)
ffc0c5cc: 38 60 ff ff li r3,-1
ffc0c5d0: 48 00 00 24 b ffc0c5f4 <IMFS_chown+0x68>
#endif
jnode->st_uid = owner;
ffc0c5d4: b3 df 00 3c sth r30,60(r31)
jnode->st_gid = group;
IMFS_update_ctime( jnode );
ffc0c5d8: 38 61 00 08 addi r3,r1,8
ffc0c5dc: 38 80 00 00 li r4,0
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
rtems_set_errno_and_return_minus_one( EPERM );
#endif
jnode->st_uid = owner;
jnode->st_gid = group;
ffc0c5e0: b3 bf 00 3e sth r29,62(r31)
IMFS_update_ctime( jnode );
ffc0c5e4: 4b ff 80 49 bl ffc0462c <gettimeofday>
ffc0c5e8: 81 21 00 08 lwz r9,8(r1)
return 0;
ffc0c5ec: 38 60 00 00 li r3,0
#endif
jnode->st_uid = owner;
jnode->st_gid = group;
IMFS_update_ctime( jnode );
ffc0c5f0: 91 3f 00 48 stw r9,72(r31)
return 0;
}
ffc0c5f4: 39 61 00 28 addi r11,r1,40
ffc0c5f8: 4b ff 3f c4 b ffc005bc <_restgpr_29_x>
ffc068d4 <IMFS_dump_directory>:
*/
static void IMFS_dump_directory(
IMFS_jnode_t *the_directory,
int level
)
{
ffc068d4: 94 21 ff c8 stwu r1,-56(r1)
ffc068d8: 7c 08 02 a6 mflr r0
ffc068dc: 90 01 00 3c stw r0,60(r1)
ffc068e0: be a1 00 0c stmw r21,12(r1)
the_node = the_node->next ) {
the_jnode = (IMFS_jnode_t *) the_node;
for ( i=0 ; i<=level ; i++ )
fprintf(stdout, "...." );
ffc068e4: 3f 20 ff c2 lis r25,-62
ffc068e8: 3f c0 00 00 lis r30,0
case IMFS_FIFO:
fprintf(stdout, " FIFO not printed\n" );
return;
default:
fprintf(stdout, " bad type %d\n", IMFS_type( the_jnode ) );
ffc068ec: 3f 00 ff c2 lis r24,-62
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
ffc068f0: 83 e3 00 50 lwz r31,80(r3)
return;
}
puts("");
ffc068f4: 3e c0 ff c2 lis r22,-62
case IMFS_SYM_LINK:
fprintf(stdout, " links not printed\n" );
return;
case IMFS_FIFO:
fprintf(stdout, " FIFO not printed\n" );
ffc068f8: 3e a0 ff c2 lis r21,-62
case IMFS_HARD_LINK:
fprintf(stdout, " links not printed\n" );
return;
case IMFS_SYM_LINK:
fprintf(stdout, " links not printed\n" );
ffc068fc: 3f 40 ff c2 lis r26,-62
*/
static void IMFS_dump_directory(
IMFS_jnode_t *the_directory,
int level
)
{
ffc06900: 7c 7c 1b 78 mr r28,r3
ffc06904: 7c 9b 23 78 mr r27,r4
the_node = the_node->next ) {
the_jnode = (IMFS_jnode_t *) the_node;
for ( i=0 ; i<=level ; i++ )
fprintf(stdout, "...." );
ffc06908: 3b 39 45 88 addi r25,r25,17800
ffc0690c: 3b de 28 30 addi r30,r30,10288
case IMFS_FIFO:
fprintf(stdout, " FIFO not printed\n" );
return;
default:
fprintf(stdout, " bad type %d\n", IMFS_type( the_jnode ) );
ffc06910: 3b 18 45 e2 addi r24,r24,17890
)
{
IMFS_assert( the_jnode );
fprintf(stdout, "%s", the_jnode->name );
switch( IMFS_type( the_jnode ) ) {
ffc06914: 3e e0 ff c2 lis r23,-62
default:
fprintf(stdout, " bad type %d\n", IMFS_type( the_jnode ) );
return;
}
puts("");
ffc06918: 3a d6 4c b3 addi r22,r22,19635
case IMFS_SYM_LINK:
fprintf(stdout, " links not printed\n" );
return;
case IMFS_FIFO:
fprintf(stdout, " FIFO not printed\n" );
ffc0691c: 3a b5 45 cf addi r21,r21,17871
case IMFS_HARD_LINK:
fprintf(stdout, " links not printed\n" );
return;
case IMFS_SYM_LINK:
fprintf(stdout, " links not printed\n" );
ffc06920: 3b 5a 45 bb addi r26,r26,17851
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 );
ffc06924: 48 00 01 1c b ffc06a40 <IMFS_dump_directory+0x16c>
the_node = the_node->next ) {
the_jnode = (IMFS_jnode_t *) the_node;
for ( i=0 ; i<=level ; i++ )
fprintf(stdout, "...." );
ffc06928: 80 89 00 08 lwz r4,8(r9)
ffc0692c: 7f 23 cb 78 mr r3,r25
!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++ )
ffc06930: 3b bd 00 01 addi r29,r29,1
fprintf(stdout, "...." );
ffc06934: 48 00 e8 a5 bl ffc151d8 <fputs>
ffc06938: 48 00 00 08 b ffc06940 <IMFS_dump_directory+0x6c>
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 );
ffc0693c: 3b a0 00 00 li r29,0
!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++ )
ffc06940: 7f 9d d8 00 cmpw cr7,r29,r27
fprintf(stdout, "...." );
ffc06944: 81 3e 00 00 lwz r9,0(r30)
!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++ )
ffc06948: 40 9d ff e0 ble+ cr7,ffc06928 <IMFS_dump_directory+0x54>
IMFS_jnode_t *the_jnode
)
{
IMFS_assert( the_jnode );
fprintf(stdout, "%s", the_jnode->name );
ffc0694c: 80 89 00 08 lwz r4,8(r9)
ffc06950: 38 7f 00 0c addi r3,r31,12
ffc06954: 48 00 e8 85 bl ffc151d8 <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;
ffc06958: 81 3f 00 4c lwz r9,76(r31)
ffc0695c: 80 a9 00 00 lwz r5,0(r9)
switch( IMFS_type( the_jnode ) ) {
ffc06960: 2b 85 00 06 cmplwi cr7,r5,6
ffc06964: 41 9d 00 9c bgt- cr7,ffc06a00 <IMFS_dump_directory+0x12c><== NEVER TAKEN
ffc06968: 39 37 45 6c addi r9,r23,17772
ffc0696c: 54 a5 10 3a rlwinm r5,r5,2,0,29
ffc06970: 7d 49 28 2e lwzx r10,r9,r5
ffc06974: 7d 2a 4a 14 add r9,r10,r9
ffc06978: 7d 29 03 a6 mtctr r9
case IMFS_SYM_LINK:
fprintf(stdout, " links not printed\n" );
return;
case IMFS_FIFO:
fprintf(stdout, " FIFO not printed\n" );
ffc0697c: 81 3e 00 00 lwz r9,0(r30)
)
{
IMFS_assert( the_jnode );
fprintf(stdout, "%s", the_jnode->name );
switch( IMFS_type( the_jnode ) ) {
ffc06980: 4e 80 04 20 bctr
case IMFS_DIRECTORY:
fprintf(stdout, "/" );
ffc06984: 80 89 00 08 lwz r4,8(r9)
ffc06988: 38 60 00 2f li r3,47
ffc0698c: 48 00 e7 35 bl ffc150c0 <fputc>
ffc06990: 48 00 00 88 b ffc06a18 <IMFS_dump_directory+0x144>
break;
case IMFS_DEVICE:
fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")",
ffc06994: 3c 80 ff c2 lis r4,-62
ffc06998: 80 69 00 08 lwz r3,8(r9)
ffc0699c: 38 84 45 8d addi r4,r4,17805
ffc069a0: 80 bf 00 50 lwz r5,80(r31)
ffc069a4: 80 df 00 54 lwz r6,84(r31)
ffc069a8: 48 00 00 18 b ffc069c0 <IMFS_dump_directory+0xec>
the_jnode->info.device.major, the_jnode->info.device.minor );
break;
case IMFS_LINEAR_FILE:
fprintf(stdout, " (file %" PRId32 " %p)",
ffc069ac: 3c 80 ff c2 lis r4,-62
ffc069b0: 80 69 00 08 lwz r3,8(r9)
ffc069b4: 80 bf 00 54 lwz r5,84(r31)
ffc069b8: 38 84 45 a0 addi r4,r4,17824
ffc069bc: 80 df 00 58 lwz r6,88(r31)
ffc069c0: 4c c6 31 82 crclr 4*cr1+eq
ffc069c4: 48 00 e6 19 bl ffc14fdc <fprintf>
ffc069c8: 48 00 00 50 b ffc06a18 <IMFS_dump_directory+0x144>
the_jnode->info.file.indirect,
the_jnode->info.file.doubly_indirect,
the_jnode->info.file.triply_indirect
);
#else
fprintf(stdout, " (file %" PRId32 ")",
ffc069cc: 80 69 00 08 lwz r3,8(r9)
ffc069d0: 3c 80 ff c2 lis r4,-62
ffc069d4: 80 bf 00 54 lwz r5,84(r31)
ffc069d8: 38 84 45 af addi r4,r4,17839
ffc069dc: 4c c6 31 82 crclr 4*cr1+eq
ffc069e0: 48 00 e5 fd bl ffc14fdc <fprintf>
ffc069e4: 48 00 00 34 b ffc06a18 <IMFS_dump_directory+0x144>
case IMFS_HARD_LINK:
fprintf(stdout, " links not printed\n" );
return;
case IMFS_SYM_LINK:
fprintf(stdout, " links not printed\n" );
ffc069e8: 7f 43 d3 78 mr r3,r26
ffc069ec: 48 00 00 08 b ffc069f4 <IMFS_dump_directory+0x120>
return;
case IMFS_FIFO:
fprintf(stdout, " FIFO not printed\n" );
ffc069f0: 7e a3 ab 78 mr r3,r21
ffc069f4: 80 89 00 08 lwz r4,8(r9)
ffc069f8: 48 00 e7 e1 bl ffc151d8 <fputs>
ffc069fc: 48 00 00 24 b ffc06a20 <IMFS_dump_directory+0x14c>
return;
default:
fprintf(stdout, " bad type %d\n", IMFS_type( the_jnode ) );
ffc06a00: 81 3e 00 00 lwz r9,0(r30) <== NOT EXECUTED
ffc06a04: 7f 04 c3 78 mr r4,r24 <== NOT EXECUTED
ffc06a08: 80 69 00 08 lwz r3,8(r9) <== NOT EXECUTED
ffc06a0c: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc06a10: 48 00 e5 cd bl ffc14fdc <fprintf> <== NOT EXECUTED
ffc06a14: 48 00 00 0c b ffc06a20 <IMFS_dump_directory+0x14c> <== NOT EXECUTED
return;
}
puts("");
ffc06a18: 7e c3 b3 78 mr r3,r22
ffc06a1c: 48 01 07 95 bl ffc171b0 <puts>
}
static inline bool IMFS_is_directory( const IMFS_jnode_t *node )
{
return node->control->imfs_type == IMFS_DIRECTORY;
ffc06a20: 81 3f 00 4c lwz r9,76(r31)
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 ) )
ffc06a24: 81 29 00 00 lwz r9,0(r9)
ffc06a28: 2f 89 00 00 cmpwi cr7,r9,0
ffc06a2c: 40 be 00 10 bne+ cr7,ffc06a3c <IMFS_dump_directory+0x168>
IMFS_dump_directory( the_jnode, level + 1 );
ffc06a30: 7f e3 fb 78 mr r3,r31
ffc06a34: 38 9b 00 01 addi r4,r27,1
ffc06a38: 4b ff fe 9d bl ffc068d4 <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 ) {
ffc06a3c: 83 ff 00 00 lwz r31,0(r31)
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 ));
ffc06a40: 39 3c 00 54 addi r9,r28,84
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 );
ffc06a44: 7f 9f 48 00 cmpw cr7,r31,r9
ffc06a48: 40 9e fe f4 bne+ cr7,ffc0693c <IMFS_dump_directory+0x68>
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
if ( IMFS_is_directory( the_jnode ) )
IMFS_dump_directory( the_jnode, level + 1 );
}
}
ffc06a4c: 39 61 00 38 addi r11,r1,56
ffc06a50: 4b ff c9 f0 b ffc03440 <_restgpr_21_x>
ffc0c758 <IMFS_eval_token>:
rtems_filesystem_eval_path_context_t *ctx,
void *arg,
const char *token,
size_t tokenlen
)
{
ffc0c758: 94 21 ff e0 stwu r1,-32(r1)
ffc0c75c: 7c 08 02 a6 mflr r0
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;
bool access_ok = rtems_filesystem_eval_path_check_access(
ffc0c760: 38 80 00 01 li r4,1
rtems_filesystem_eval_path_context_t *ctx,
void *arg,
const char *token,
size_t tokenlen
)
{
ffc0c764: 90 01 00 24 stw r0,36(r1)
ffc0c768: bf 41 00 08 stmw r26,8(r1)
ffc0c76c: 7c bc 2b 78 mr r28,r5
ffc0c770: 7c db 33 78 mr r27,r6
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;
ffc0c774: 83 a3 00 20 lwz r29,32(r3)
rtems_filesystem_eval_path_context_t *ctx,
void *arg,
const char *token,
size_t tokenlen
)
{
ffc0c778: 7c 7e 1b 78 mr r30,r3
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;
bool access_ok = rtems_filesystem_eval_path_check_access(
ffc0c77c: 80 bd 00 30 lwz r5,48(r29)
ffc0c780: a0 dd 00 3c lhz r6,60(r29)
ffc0c784: a0 fd 00 3e lhz r7,62(r29)
ffc0c788: 48 00 0c 89 bl ffc0d410 <rtems_filesystem_eval_path_check_access>
dir->st_mode,
dir->st_uid,
dir->st_gid
);
if ( access_ok ) {
ffc0c78c: 2f 83 00 00 cmpwi cr7,r3,0
ffc0c790: 40 9e 00 08 bne- cr7,ffc0c798 <IMFS_eval_token+0x40>
ffc0c794: 48 00 01 78 b ffc0c90c <IMFS_eval_token+0x1b4>
static inline bool rtems_filesystem_is_current_directory(
const char *token,
size_t tokenlen
)
{
return tokenlen == 1 && token [0] == '.';
ffc0c798: 2f 9b 00 01 cmpwi cr7,r27,1
ffc0c79c: 39 20 00 00 li r9,0
ffc0c7a0: 40 be 00 14 bne+ cr7,ffc0c7b4 <IMFS_eval_token+0x5c>
ffc0c7a4: 89 3c 00 00 lbz r9,0(r28)
ffc0c7a8: 69 29 00 2e xori r9,r9,46
ffc0c7ac: 7d 29 00 34 cntlzw r9,r9
ffc0c7b0: 55 29 d9 7e rlwinm r9,r9,27,5,31
IMFS_jnode_t *dir,
const char *token,
size_t tokenlen
)
{
if ( rtems_filesystem_is_current_directory( token, tokenlen ) ) {
ffc0c7b4: 2f 89 00 00 cmpwi cr7,r9,0
ffc0c7b8: 40 9e 00 94 bne- cr7,ffc0c84c <IMFS_eval_token+0xf4>
static inline bool rtems_filesystem_is_parent_directory(
const char *token,
size_t tokenlen
)
{
return tokenlen == 2 && token [0] == '.' && token [1] == '.';
ffc0c7bc: 2f 9b 00 02 cmpwi cr7,r27,2
ffc0c7c0: 40 be 00 20 bne+ cr7,ffc0c7e0 <IMFS_eval_token+0x88>
ffc0c7c4: 89 5c 00 00 lbz r10,0(r28)
ffc0c7c8: 2f 8a 00 2e cmpwi cr7,r10,46
ffc0c7cc: 40 be 00 14 bne+ cr7,ffc0c7e0 <IMFS_eval_token+0x88>
ffc0c7d0: 89 3c 00 01 lbz r9,1(r28)
ffc0c7d4: 69 29 00 2e xori r9,r9,46
ffc0c7d8: 7d 29 00 34 cntlzw r9,r9
ffc0c7dc: 55 29 d9 7e rlwinm r9,r9,27,5,31
return dir;
} else {
if ( rtems_filesystem_is_parent_directory( token, tokenlen ) ) {
ffc0c7e0: 2f 89 00 00 cmpwi cr7,r9,0
ffc0c7e4: 41 be 00 0c beq+ cr7,ffc0c7f0 <IMFS_eval_token+0x98>
return dir->Parent;
ffc0c7e8: 83 fd 00 08 lwz r31,8(r29)
ffc0c7ec: 48 00 00 54 b ffc0c840 <IMFS_eval_token+0xe8>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
ffc0c7f0: 83 fd 00 50 lwz r31,80(r29)
} 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 );
ffc0c7f4: 3b 5d 00 54 addi r26,r29,84
ffc0c7f8: 48 00 00 3c b ffc0c834 <IMFS_eval_token+0xdc>
while ( current != tail ) {
IMFS_jnode_t *entry = (IMFS_jnode_t *) current;
bool match = strncmp( entry->name, token, tokenlen ) == 0
ffc0c7fc: 38 7f 00 0c addi r3,r31,12
ffc0c800: 7f 84 e3 78 mr r4,r28
ffc0c804: 7f 65 db 78 mr r5,r27
ffc0c808: 48 00 57 05 bl ffc11f0c <strncmp>
&& entry->name [tokenlen] == '\0';
ffc0c80c: 39 20 00 00 li r9,0
ffc0c810: 2f 83 00 00 cmpwi cr7,r3,0
ffc0c814: 40 9e 00 14 bne- cr7,ffc0c828 <IMFS_eval_token+0xd0>
ffc0c818: 7d 3f da 14 add r9,r31,r27
ffc0c81c: 89 29 00 0c lbz r9,12(r9)
ffc0c820: 7d 29 00 34 cntlzw r9,r9
ffc0c824: 55 29 d9 7e rlwinm r9,r9,27,5,31
if ( match ) {
ffc0c828: 2f 89 00 00 cmpwi cr7,r9,0
ffc0c82c: 40 9e 00 14 bne- cr7,ffc0c840 <IMFS_eval_token+0xe8>
};
void IMFS_eval_path( rtems_filesystem_eval_path_context_t *ctx )
{
rtems_filesystem_eval_path_generic( ctx, NULL, &IMFS_eval_config );
}
ffc0c830: 83 ff 00 00 lwz r31,0(r31)
} 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 ) {
ffc0c834: 7f 9f d0 00 cmpw cr7,r31,r26
ffc0c838: 40 9e ff c4 bne+ cr7,ffc0c7fc <IMFS_eval_token+0xa4>
ffc0c83c: 48 00 00 d8 b ffc0c914 <IMFS_eval_token+0x1bc>
);
if ( access_ok ) {
IMFS_jnode_t *entry = IMFS_search_in_directory( dir, token, tokenlen );
if ( entry != NULL ) {
ffc0c840: 2f 9f 00 00 cmpwi cr7,r31,0
ffc0c844: 40 be 00 0c bne+ cr7,ffc0c850 <IMFS_eval_token+0xf8>
ffc0c848: 48 00 00 cc b ffc0c914 <IMFS_eval_token+0x1bc>
IMFS_jnode_t *dir,
const char *token,
size_t tokenlen
)
{
if ( rtems_filesystem_is_current_directory( token, tokenlen ) ) {
ffc0c84c: 7f bf eb 78 mr r31,r29
rtems_chain_extract_unprotected( &node->Node );
}
static inline IMFS_jnode_types_t IMFS_type( const IMFS_jnode_t *node )
{
return node->control->imfs_type;
ffc0c850: 81 3f 00 4c lwz r9,76(r31)
static inline void rtems_filesystem_eval_path_clear_token(
rtems_filesystem_eval_path_context_t *ctx
)
{
ctx->tokenlen = 0;
ffc0c854: 39 00 00 00 li r8,0
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 );
ffc0c858: 80 7e 00 04 lwz r3,4(r30)
ffc0c85c: 81 29 00 00 lwz r9,0(r9)
ffc0c860: 7c 63 00 34 cntlzw r3,r3
};
void IMFS_eval_path( rtems_filesystem_eval_path_context_t *ctx )
{
rtems_filesystem_eval_path_generic( ctx, NULL, &IMFS_eval_config );
}
ffc0c864: 81 5e 00 10 lwz r10,16(r30)
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)) {
ffc0c868: 2f 89 00 02 cmpwi cr7,r9,2
ffc0c86c: 91 1e 00 0c stw r8,12(r30)
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 );
ffc0c870: 54 63 d9 7e rlwinm r3,r3,27,5,31
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)) {
ffc0c874: 40 be 00 1c bne+ cr7,ffc0c890 <IMFS_eval_token+0x138>
ffc0c878: 71 49 00 08 andi. r9,r10,8
ffc0c87c: 40 82 00 0c bne- ffc0c888 <IMFS_eval_token+0x130>
ffc0c880: 2f 83 00 00 cmpwi cr7,r3,0
ffc0c884: 40 9e 00 98 bne- cr7,ffc0c91c <IMFS_eval_token+0x1c4> <== ALWAYS TAKEN
entry = entry->info.hard_link.link_node;
ffc0c888: 83 ff 00 50 lwz r31,80(r31)
ffc0c88c: 48 00 00 90 b ffc0c91c <IMFS_eval_token+0x1c4>
}
if ( type == IMFS_SYM_LINK && (follow_sym_link || !terminal)) {
ffc0c890: 2f 89 00 03 cmpwi cr7,r9,3
ffc0c894: 40 be 00 34 bne+ cr7,ffc0c8c8 <IMFS_eval_token+0x170>
ffc0c898: 71 49 00 10 andi. r9,r10,16
ffc0c89c: 40 82 00 0c bne- ffc0c8a8 <IMFS_eval_token+0x150>
ffc0c8a0: 2f 83 00 00 cmpwi cr7,r3,0
ffc0c8a4: 40 be 00 78 bne+ cr7,ffc0c91c <IMFS_eval_token+0x1c4>
const char *target = entry->info.sym_link.name;
ffc0c8a8: 83 ff 00 50 lwz r31,80(r31)
rtems_filesystem_eval_path_recursive( ctx, target, strlen( target ) );
ffc0c8ac: 7f e3 fb 78 mr r3,r31
ffc0c8b0: 48 00 55 c1 bl ffc11e70 <strlen>
ffc0c8b4: 7f e4 fb 78 mr r4,r31
ffc0c8b8: 7c 65 1b 78 mr r5,r3
ffc0c8bc: 7f c3 f3 78 mr r3,r30
ffc0c8c0: 4b ff 92 19 bl ffc05ad8 <rtems_filesystem_eval_path_recursive>
ffc0c8c4: 48 00 00 48 b ffc0c90c <IMFS_eval_token+0x1b4>
IMFS_jnode_types_t type
)
{
rtems_filesystem_global_location_t **fs_root_ptr = NULL;
if ( type == IMFS_DIRECTORY ) {
ffc0c8c8: 2f 89 00 00 cmpwi cr7,r9,0
ffc0c8cc: 40 9e 00 50 bne- cr7,ffc0c91c <IMFS_eval_token+0x1c4>
if ( node->info.directory.mt_fs != NULL ) {
ffc0c8d0: 80 9f 00 5c lwz r4,92(r31)
ffc0c8d4: 2f 84 00 00 cmpwi cr7,r4,0
ffc0c8d8: 41 9e 00 44 beq- cr7,ffc0c91c <IMFS_eval_token+0x1c4>
if ( !terminal ) {
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_CONTINUE;
}
} else {
access_ok = rtems_filesystem_eval_path_check_access(
ffc0c8dc: 80 bf 00 30 lwz r5,48(r31)
{
rtems_filesystem_global_location_t **fs_root_ptr = NULL;
if ( type == IMFS_DIRECTORY ) {
if ( node->info.directory.mt_fs != NULL ) {
fs_root_ptr = &node->info.directory.mt_fs->mt_fs_root;
ffc0c8e0: 3b a4 00 24 addi r29,r4,36
if ( !terminal ) {
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_CONTINUE;
}
} else {
access_ok = rtems_filesystem_eval_path_check_access(
ffc0c8e4: a0 df 00 3c lhz r6,60(r31)
ffc0c8e8: 7f c3 f3 78 mr r3,r30
ffc0c8ec: a0 ff 00 3e lhz r7,62(r31)
ffc0c8f0: 38 80 00 01 li r4,1
ffc0c8f4: 48 00 0b 1d bl ffc0d410 <rtems_filesystem_eval_path_check_access>
RTEMS_FS_PERMS_EXEC,
entry->st_mode,
entry->st_uid,
entry->st_gid
);
if ( access_ok ) {
ffc0c8f8: 2f 83 00 00 cmpwi cr7,r3,0
ffc0c8fc: 41 be 00 10 beq+ cr7,ffc0c90c <IMFS_eval_token+0x1b4> <== NEVER TAKEN
rtems_filesystem_eval_path_restart( ctx, fs_root_ptr );
ffc0c900: 7f c3 f3 78 mr r3,r30
ffc0c904: 7f a4 eb 78 mr r4,r29
ffc0c908: 4b ff 91 49 bl ffc05a50 <rtems_filesystem_eval_path_restart>
void *arg,
const char *token,
size_t tokenlen
)
{
rtems_filesystem_eval_path_generic_status status =
ffc0c90c: 38 60 00 01 li r3,1
ffc0c910: 48 00 00 34 b ffc0c944 <IMFS_eval_token+0x1ec>
rtems_filesystem_eval_path_restart( ctx, fs_root_ptr );
}
}
}
} else {
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY;
ffc0c914: 38 60 00 02 li r3,2
ffc0c918: 48 00 00 2c b ffc0c944 <IMFS_eval_token+0x1ec>
} else {
rtems_filesystem_global_location_t **fs_root_ptr =
IMFS_is_mount_point( entry, type );
if ( fs_root_ptr == NULL ) {
--dir->reference_count;
ffc0c91c: a1 3d 00 34 lhz r9,52(r29)
ffc0c920: 39 29 ff ff addi r9,r9,-1
ffc0c924: b1 3d 00 34 sth r9,52(r29)
++entry->reference_count;
ffc0c928: a1 3f 00 34 lhz r9,52(r31)
ffc0c92c: 39 29 00 01 addi r9,r9,1
ffc0c930: b1 3f 00 34 sth r9,52(r31)
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;
ffc0c934: 81 3f 00 4c lwz r9,76(r31)
currentloc->node_access = entry;
ffc0c938: 93 fe 00 20 stw r31,32(r30)
ffc0c93c: 81 29 00 04 lwz r9,4(r9)
ffc0c940: 91 3e 00 28 stw r9,40(r30)
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY;
}
}
return status;
}
ffc0c944: 39 61 00 20 addi r11,r1,32
ffc0c948: 4b ff 3c 68 b ffc005b0 <_restgpr_26_x>
ffc0c95c <IMFS_fchmod>:
int IMFS_fchmod(
const rtems_filesystem_location_info_t *loc,
mode_t mode
)
{
ffc0c95c: 94 21 ff e0 stwu r1,-32(r1)
ffc0c960: 7c 08 02 a6 mflr r0
ffc0c964: 90 01 00 24 stw r0,36(r1)
ffc0c968: bf c1 00 18 stmw r30,24(r1)
ffc0c96c: 7c 9e 23 78 mr r30,r4
IMFS_jnode_t *jnode;
#if defined(RTEMS_POSIX_API)
uid_t st_uid;
#endif
jnode = loc->node_access;
ffc0c970: 83 e3 00 08 lwz r31,8(r3)
/*
* Verify I am the owner of the node or the super user.
*/
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
ffc0c974: 48 00 06 09 bl ffc0cf7c <geteuid>
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
ffc0c978: a1 3f 00 3c lhz r9,60(r31)
ffc0c97c: 7f 89 18 00 cmpw cr7,r9,r3
ffc0c980: 41 9e 00 20 beq- cr7,ffc0c9a0 <IMFS_fchmod+0x44>
ffc0c984: 2f 83 00 00 cmpwi cr7,r3,0
ffc0c988: 41 be 00 18 beq+ cr7,ffc0c9a0 <IMFS_fchmod+0x44> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EPERM );
ffc0c98c: 48 00 3c 21 bl ffc105ac <__errno>
ffc0c990: 39 20 00 01 li r9,1
ffc0c994: 91 23 00 00 stw r9,0(r3)
ffc0c998: 38 60 ff ff li r3,-1
ffc0c99c: 48 00 00 30 b ffc0c9cc <IMFS_fchmod+0x70>
/*
* 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);
ffc0c9a0: 81 3f 00 30 lwz r9,48(r31)
jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
ffc0c9a4: 57 de 05 3e clrlwi r30,r30,20
IMFS_update_ctime( jnode );
ffc0c9a8: 38 61 00 08 addi r3,r1,8
/*
* 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);
ffc0c9ac: 55 29 00 26 rlwinm r9,r9,0,0,19
jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
ffc0c9b0: 7f c9 4b 78 or r9,r30,r9
ffc0c9b4: 91 3f 00 30 stw r9,48(r31)
IMFS_update_ctime( jnode );
ffc0c9b8: 38 80 00 00 li r4,0
ffc0c9bc: 4b ff 7c 71 bl ffc0462c <gettimeofday>
ffc0c9c0: 81 21 00 08 lwz r9,8(r1)
return 0;
ffc0c9c4: 38 60 00 00 li r3,0
*/
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);
IMFS_update_ctime( jnode );
ffc0c9c8: 91 3f 00 48 stw r9,72(r31)
return 0;
}
ffc0c9cc: 39 61 00 20 addi r11,r1,32
ffc0c9d0: 4b ff 3b f0 b ffc005c0 <_restgpr_30_x>
ffc046fc <IMFS_fifo_write>:
static ssize_t IMFS_fifo_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
ffc046fc: 94 21 ff e0 stwu r1,-32(r1)
ffc04700: 7c 08 02 a6 mflr r0
ffc04704: 7c 66 1b 78 mr r6,r3
ffc04708: 90 01 00 24 stw r0,36(r1)
ffc0470c: bf c1 00 18 stmw r30,24(r1)
IMFS_jnode_t *jnode = iop->pathinfo.node_access;
ffc04710: 83 e3 00 1c lwz r31,28(r3)
int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop);
ffc04714: 80 7f 00 50 lwz r3,80(r31)
ffc04718: 48 00 a9 99 bl ffc0f0b0 <pipe_write>
if (err > 0) {
ffc0471c: 7c 7e 1b 79 mr. r30,r3
ffc04720: 40 81 00 20 ble- ffc04740 <IMFS_fifo_write+0x44>
IMFS_mtime_ctime_update(jnode);
ffc04724: 38 61 00 08 addi r3,r1,8
ffc04728: 38 80 00 00 li r4,0
ffc0472c: 48 00 0f 81 bl ffc056ac <gettimeofday>
ffc04730: 81 21 00 08 lwz r9,8(r1)
ffc04734: 91 3f 00 44 stw r9,68(r31)
ffc04738: 91 3f 00 48 stw r9,72(r31)
ffc0473c: 48 00 00 18 b ffc04754 <IMFS_fifo_write+0x58>
}
IMFS_FIFO_RETURN(err);
ffc04740: 41 a2 00 14 beq+ ffc04754 <IMFS_fifo_write+0x58> <== NEVER TAKEN
ffc04744: 7f de 00 d0 neg r30,r30
ffc04748: 48 00 da ed bl ffc12234 <__errno>
ffc0474c: 93 c3 00 00 stw r30,0(r3)
ffc04750: 3b c0 ff ff li r30,-1
}
ffc04754: 39 61 00 20 addi r11,r1,32
ffc04758: 7f c3 f3 78 mr r3,r30
ffc0475c: 48 01 c3 c0 b ffc20b1c <_restgpr_30_x>
ffc0c9d4 <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
)
{
ffc0c9d4: 94 21 ff c8 stwu r1,-56(r1)
ffc0c9d8: 7c 08 02 a6 mflr r0
ffc0c9dc: 90 01 00 3c stw r0,60(r1)
/*
* Traverse tree that starts at the mt_fs_root and deallocate memory
* associated memory space
*/
loc = temp_mt_entry->mt_fs_root->location;
ffc0c9e0: 38 81 00 08 addi r4,r1,8
ffc0c9e4: 80 63 00 24 lwz r3,36(r3)
((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next))
void IMFS_fsunmount(
rtems_filesystem_mount_table_entry_t *temp_mt_entry
)
{
ffc0c9e8: bf a1 00 2c stmw r29,44(r1)
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 );
ffc0c9ec: 7c 9d 23 78 mr r29,r4
/*
* Traverse tree that starts at the mt_fs_root and deallocate memory
* associated memory space
*/
loc = temp_mt_entry->mt_fs_root->location;
ffc0c9f0: 7c a3 c4 aa lswi r5,r3,24
ffc0c9f4: 7c a4 c5 aa stswi r5,r4,24
/*
* Set this to null to indicate that it is being unmounted.
*/
temp_mt_entry->mt_fs_root->location.node_access = NULL;
ffc0c9f8: 39 20 00 00 li r9,0
* Traverse tree that starts at the mt_fs_root and deallocate memory
* associated memory space
*/
loc = temp_mt_entry->mt_fs_root->location;
jnode = (IMFS_jnode_t *)loc.node_access;
ffc0c9fc: 83 e1 00 10 lwz r31,16(r1)
/*
* Set this to null to indicate that it is being unmounted.
*/
temp_mt_entry->mt_fs_root->location.node_access = NULL;
ffc0ca00: 91 23 00 08 stw r9,8(r3)
ffc0ca04: 48 00 00 08 b ffc0ca0c <IMFS_fsunmount+0x38>
if ( IMFS_is_directory( jnode ) ) {
if ( jnode_has_children( jnode ) )
jnode = jnode_get_first_child( jnode );
}
}
} while (jnode != NULL);
ffc0ca08: 7d 3f 4b 78 mr r31,r9
ffc0ca0c: 81 3f 00 4c lwz r9,76(r31)
*/
temp_mt_entry->mt_fs_root->location.node_access = NULL;
do {
next = jnode->Parent;
ffc0ca10: 83 df 00 08 lwz r30,8(r31)
ffc0ca14: 81 49 00 04 lwz r10,4(r9)
loc.node_access = (void *)jnode;
IMFS_Set_handlers( &loc );
if ( !IMFS_is_directory( jnode ) || jnode_has_no_children( jnode ) ) {
ffc0ca18: 81 29 00 00 lwz r9,0(r9)
temp_mt_entry->mt_fs_root->location.node_access = NULL;
do {
next = jnode->Parent;
loc.node_access = (void *)jnode;
ffc0ca1c: 93 e1 00 10 stw r31,16(r1)
IMFS_Set_handlers( &loc );
if ( !IMFS_is_directory( jnode ) || jnode_has_no_children( jnode ) ) {
ffc0ca20: 2f 89 00 00 cmpwi cr7,r9,0
ffc0ca24: 91 41 00 18 stw r10,24(r1)
ffc0ca28: 40 9e 00 14 bne- cr7,ffc0ca3c <IMFS_fsunmount+0x68>
ffc0ca2c: 81 3f 00 50 lwz r9,80(r31)
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
ffc0ca30: 39 5f 00 54 addi r10,r31,84
ffc0ca34: 7f 89 50 00 cmpw cr7,r9,r10
ffc0ca38: 40 be 00 38 bne+ cr7,ffc0ca70 <IMFS_fsunmount+0x9c>
result = IMFS_rmnod( NULL, &loc );
ffc0ca3c: 38 60 00 00 li r3,0
ffc0ca40: 7f a4 eb 78 mr r4,r29
ffc0ca44: 4b ff 74 89 bl ffc03ecc <IMFS_rmnod>
if ( result != 0 )
ffc0ca48: 2f 83 00 00 cmpwi cr7,r3,0
ffc0ca4c: 41 be 00 10 beq+ cr7,ffc0ca5c <IMFS_fsunmount+0x88> <== ALWAYS TAKEN
rtems_fatal_error_occurred( 0xdeadbeef );
ffc0ca50: 3c 60 de ad lis r3,-8531 <== NOT EXECUTED
ffc0ca54: 60 63 be ef ori r3,r3,48879 <== NOT EXECUTED
ffc0ca58: 4b ff c6 1d bl ffc09074 <rtems_fatal_error_occurred> <== NOT EXECUTED
IMFS_node_destroy( jnode );
ffc0ca5c: 7f e3 fb 78 mr r3,r31
ffc0ca60: 4b ff 70 fd bl ffc03b5c <IMFS_node_destroy>
jnode = next;
}
if ( jnode != NULL ) {
ffc0ca64: 2f 9e 00 00 cmpwi cr7,r30,0
ffc0ca68: 41 9e 00 30 beq- cr7,ffc0ca98 <IMFS_fsunmount+0xc4>
ffc0ca6c: 7f df f3 78 mr r31,r30
return node->control->imfs_type;
}
static inline bool IMFS_is_directory( const IMFS_jnode_t *node )
{
return node->control->imfs_type == IMFS_DIRECTORY;
ffc0ca70: 81 3f 00 4c lwz r9,76(r31)
if ( IMFS_is_directory( jnode ) ) {
ffc0ca74: 81 29 00 00 lwz r9,0(r9)
ffc0ca78: 2f 89 00 00 cmpwi cr7,r9,0
ffc0ca7c: 40 be ff 90 bne- cr7,ffc0ca0c <IMFS_fsunmount+0x38> <== NEVER TAKEN
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
ffc0ca80: 81 3f 00 50 lwz r9,80(r31)
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
ffc0ca84: 39 5f 00 54 addi r10,r31,84
if ( jnode_has_children( jnode ) )
ffc0ca88: 7f 89 50 00 cmpw cr7,r9,r10
ffc0ca8c: 41 be ff 80 beq- cr7,ffc0ca0c <IMFS_fsunmount+0x38>
jnode = jnode_get_first_child( jnode );
}
}
} while (jnode != NULL);
ffc0ca90: 2f 89 00 00 cmpwi cr7,r9,0
ffc0ca94: 40 9e ff 74 bne+ cr7,ffc0ca08 <IMFS_fsunmount+0x34> <== ALWAYS TAKEN
}
ffc0ca98: 39 61 00 38 addi r11,r1,56
ffc0ca9c: 4b ff 3b 20 b ffc005bc <_restgpr_29_x>
ffc03a4c <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]
)
{
ffc03a4c: 94 21 ff e8 stwu r1,-24(r1)
ffc03a50: 7c 08 02 a6 mflr r0
ffc03a54: bf 81 00 08 stmw r28,8(r1)
ffc03a58: 7c 7f 1b 78 mr r31,r3
ffc03a5c: 7c 9d 23 78 mr r29,r4
static int imfs_instance;
int rv = 0;
IMFS_fs_info_t *fs_info = calloc( 1, sizeof( *fs_info ) );
ffc03a60: 38 60 00 01 li r3,1
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]
)
{
ffc03a64: 90 01 00 1c stw r0,28(r1)
static int imfs_instance;
int rv = 0;
IMFS_fs_info_t *fs_info = calloc( 1, sizeof( *fs_info ) );
ffc03a68: 38 80 00 24 li r4,36
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]
)
{
ffc03a6c: 7c bc 2b 78 mr r28,r5
static int imfs_instance;
int rv = 0;
IMFS_fs_info_t *fs_info = calloc( 1, sizeof( *fs_info ) );
ffc03a70: 48 00 07 91 bl ffc04200 <calloc>
if ( fs_info != NULL ) {
ffc03a74: 7c 7e 1b 79 mr. r30,r3
ffc03a78: 41 82 00 88 beq- ffc03b00 <IMFS_initialize_support+0xb4>
IMFS_jnode_t *root_node;
fs_info->instance = imfs_instance++;
ffc03a7c: 3d 40 00 00 lis r10,0
ffc03a80: 81 2a 29 2c lwz r9,10540(r10)
memcpy(
fs_info->node_controls,
ffc03a84: 38 9e 00 08 addi r4,r30,8
IMFS_fs_info_t *fs_info = calloc( 1, sizeof( *fs_info ) );
if ( fs_info != NULL ) {
IMFS_jnode_t *root_node;
fs_info->instance = imfs_instance++;
ffc03a88: 91 3e 00 00 stw r9,0(r30)
ffc03a8c: 39 29 00 01 addi r9,r9,1
ffc03a90: 91 2a 29 2c stw r9,10540(r10)
memcpy(
ffc03a94: 7c bc e4 aa lswi r5,r28,28
ffc03a98: 7c a4 e5 aa stswi r5,r4,28
fs_info->node_controls,
node_controls,
sizeof( fs_info->node_controls )
);
root_node = IMFS_allocate_node(
ffc03a9c: 3c a0 ff c2 lis r5,-62
ffc03aa0: 38 a5 d1 01 addi r5,r5,-12031
ffc03aa4: 80 9e 00 08 lwz r4,8(r30)
ffc03aa8: 38 c0 00 00 li r6,0
ffc03aac: 38 e0 41 ed li r7,16877
ffc03ab0: 39 00 00 00 li r8,0
ffc03ab4: 48 00 8b 49 bl ffc0c5fc <IMFS_allocate_node>
"",
0,
(S_IFDIR | 0755),
NULL
);
if ( root_node != NULL ) {
ffc03ab8: 2c 03 00 00 cmpwi r3,0
ffc03abc: 41 82 00 44 beq- ffc03b00 <IMFS_initialize_support+0xb4><== NEVER TAKEN
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;
ffc03ac0: 81 43 00 4c lwz r10,76(r3)
mt_entry->fs_info = fs_info;
mt_entry->ops = op_table;
mt_entry->pathconf_limits_and_options = &IMFS_LIMITS_AND_OPTIONS;
ffc03ac4: 3d 20 ff c2 lis r9,-62
ffc03ac8: 39 29 d2 40 addi r9,r9,-11712
0,
(S_IFDIR | 0755),
NULL
);
if ( root_node != NULL ) {
mt_entry->fs_info = fs_info;
ffc03acc: 93 df 00 08 stw r30,8(r31)
int bit_mask;
/*
* check, whether requested bytes per block is valid
*/
for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) {
ffc03ad0: 39 00 00 06 li r8,6
NULL
);
if ( root_node != NULL ) {
mt_entry->fs_info = fs_info;
mt_entry->ops = op_table;
mt_entry->pathconf_limits_and_options = &IMFS_LIMITS_AND_OPTIONS;
ffc03ad4: 91 3f 00 2c stw r9,44(r31)
int bit_mask;
/*
* check, whether requested bytes per block is valid
*/
for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) {
ffc03ad8: 7d 09 03 a6 mtctr r8
);
if ( root_node != NULL ) {
mt_entry->fs_info = fs_info;
mt_entry->ops = op_table;
mt_entry->pathconf_limits_and_options = &IMFS_LIMITS_AND_OPTIONS;
mt_entry->mt_fs_root->location.node_access = root_node;
ffc03adc: 81 3f 00 24 lwz r9,36(r31)
ffc03ae0: 81 4a 00 04 lwz r10,4(r10)
(S_IFDIR | 0755),
NULL
);
if ( root_node != NULL ) {
mt_entry->fs_info = fs_info;
mt_entry->ops = op_table;
ffc03ae4: 93 bf 00 0c stw r29,12(r31)
ffc03ae8: 91 49 00 10 stw r10,16(r9)
int bit_mask;
/*
* check, whether requested bytes per block is valid
*/
for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) {
ffc03aec: 39 40 00 10 li r10,16
);
if ( root_node != NULL ) {
mt_entry->fs_info = fs_info;
mt_entry->ops = op_table;
mt_entry->pathconf_limits_and_options = &IMFS_LIMITS_AND_OPTIONS;
mt_entry->mt_fs_root->location.node_access = root_node;
ffc03af0: 90 69 00 08 stw r3,8(r9)
errno = ENOMEM;
rv = -1;
}
if ( rv == 0 ) {
IMFS_determine_bytes_per_block(
ffc03af4: 3d 20 00 00 lis r9,0
ffc03af8: 81 29 27 94 lwz r9,10132(r9)
ffc03afc: 48 00 00 14 b ffc03b10 <IMFS_initialize_support+0xc4>
} else {
errno = ENOMEM;
rv = -1;
}
} else {
errno = ENOMEM;
ffc03b00: 48 00 ca ad bl ffc105ac <__errno>
ffc03b04: 39 20 00 0c li r9,12
ffc03b08: 91 23 00 00 stw r9,0(r3)
ffc03b0c: 48 00 00 2c b ffc03b38 <IMFS_initialize_support+0xec>
/*
* 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) {
ffc03b10: 7f 8a 48 00 cmpw cr7,r10,r9
ffc03b14: 41 9e 00 14 beq- cr7,ffc03b28 <IMFS_initialize_support+0xdc>
is_valid = true;
break;
}
if(bit_mask > requested_bytes_per_block)
ffc03b18: 41 9d 00 0c bgt- cr7,ffc03b24 <IMFS_initialize_support+0xd8>
int bit_mask;
/*
* check, whether requested bytes per block is valid
*/
for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) {
ffc03b1c: 55 4a 08 3c rlwinm r10,r10,1,0,30
ffc03b20: 42 00 ff f0 bdnz+ ffc03b10 <IMFS_initialize_support+0xc4>
if(bit_mask > requested_bytes_per_block)
break;
}
*dest_bytes_per_block = ((is_valid)
? requested_bytes_per_block
: default_bytes_per_block);
ffc03b24: 39 20 00 80 li r9,128
break;
}
if(bit_mask > requested_bytes_per_block)
break;
}
*dest_bytes_per_block = ((is_valid)
ffc03b28: 3d 40 00 00 lis r10,0
ffc03b2c: 91 2a 28 44 stw r9,10308(r10)
const IMFS_node_control *const node_controls [IMFS_TYPE_COUNT]
)
{
static int imfs_instance;
int rv = 0;
ffc03b30: 38 60 00 00 li r3,0
ffc03b34: 48 00 00 08 b ffc03b3c <IMFS_initialize_support+0xf0>
if(bit_mask > requested_bytes_per_block)
break;
}
*dest_bytes_per_block = ((is_valid)
? requested_bytes_per_block
: default_bytes_per_block);
ffc03b38: 38 60 ff ff li r3,-1
IMFS_MEMFILE_DEFAULT_BYTES_PER_BLOCK
);
}
return rv;
}
ffc03b3c: 39 61 00 18 addi r11,r1,24
ffc03b40: 4b ff ca 78 b ffc005b8 <_restgpr_28_x>
ffc05718 <IMFS_make_generic_node>:
const char *path,
mode_t mode,
const IMFS_node_control *node_control,
void *context
)
{
ffc05718: 94 21 ff 88 stwu r1,-120(r1)
ffc0571c: 7c 08 02 a6 mflr r0
int rv = 0;
mode &= ~rtems_filesystem_umask;
ffc05720: 3d 20 00 00 lis r9,0
ffc05724: 81 29 27 90 lwz r9,10128(r9)
const char *path,
mode_t mode,
const IMFS_node_control *node_control,
void *context
)
{
ffc05728: 7c 6a 1b 78 mr r10,r3
ffc0572c: 90 01 00 7c stw r0,124(r1)
ffc05730: bf 81 00 68 stmw r28,104(r1)
ffc05734: 7c bf 2b 78 mr r31,r5
ffc05738: 7c dc 33 78 mr r28,r6
int rv = 0;
mode &= ~rtems_filesystem_umask;
ffc0573c: 83 a9 00 08 lwz r29,8(r9)
ffc05740: 7c 9d e8 78 andc r29,r4,r29
switch (mode & S_IFMT) {
ffc05744: 57 a9 04 26 rlwinm r9,r29,0,16,19
ffc05748: 2f 89 20 00 cmpwi cr7,r9,8192
ffc0574c: 41 9e 00 e0 beq- cr7,ffc0582c <IMFS_make_generic_node+0x114>
ffc05750: 2b 89 20 00 cmplwi cr7,r9,8192
ffc05754: 41 9d 00 0c bgt- cr7,ffc05760 <IMFS_make_generic_node+0x48><== ALWAYS TAKEN
ffc05758: 2f 89 10 00 cmpwi cr7,r9,4096 <== NOT EXECUTED
ffc0575c: 48 00 00 18 b ffc05774 <IMFS_make_generic_node+0x5c> <== NOT EXECUTED
ffc05760: 2f 89 60 00 cmpwi cr7,r9,24576
ffc05764: 41 9e 00 c8 beq- cr7,ffc0582c <IMFS_make_generic_node+0x114>
ffc05768: 39 00 00 00 li r8,0
ffc0576c: 61 08 80 00 ori r8,r8,32768
ffc05770: 7f 89 40 00 cmpw cr7,r9,r8
ffc05774: 41 9e 00 b8 beq- cr7,ffc0582c <IMFS_make_generic_node+0x114><== NEVER TAKEN
ffc05778: 48 00 00 a0 b ffc05818 <IMFS_make_generic_node+0x100>
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 =
ffc0577c: 7d 44 53 78 mr r4,r10
ffc05780: 38 a0 00 78 li r5,120
ffc05784: 38 61 00 08 addi r3,r1,8
ffc05788: 48 00 20 21 bl ffc077a8 <rtems_filesystem_eval_path_start>
ffc0578c: 7c 7e 1b 78 mr r30,r3
rtems_filesystem_eval_path_start( &ctx, path, eval_flags );
if ( IMFS_is_imfs_instance( currentloc ) ) {
ffc05790: 4b ff ff 2d bl ffc056bc <IMFS_is_imfs_instance>
ffc05794: 2f 83 00 00 cmpwi cr7,r3,0
ffc05798: 41 9e 00 64 beq- cr7,ffc057fc <IMFS_make_generic_node+0xe4>
IMFS_types_union info;
IMFS_jnode_t *new_node;
info.generic.context = context;
new_node = IMFS_create_node_with_control(
ffc0579c: 80 a1 00 10 lwz r5,16(r1)
ffc057a0: 7f e4 fb 78 mr r4,r31
ffc057a4: 80 c1 00 14 lwz r6,20(r1)
ffc057a8: 7f c3 f3 78 mr r3,r30
ffc057ac: 7f a7 eb 78 mr r7,r29
if ( IMFS_is_imfs_instance( currentloc ) ) {
IMFS_types_union info;
IMFS_jnode_t *new_node;
info.generic.context = context;
ffc057b0: 93 81 00 40 stw r28,64(r1)
new_node = IMFS_create_node_with_control(
ffc057b4: 39 01 00 40 addi r8,r1,64
ffc057b8: 48 00 b8 8d bl ffc11044 <IMFS_create_node_with_control>
IMFS_jnode_t *parent = currentloc->node_access;
IMFS_update_ctime( parent );
IMFS_update_mtime( parent );
} else {
rv = -1;
ffc057bc: 3b e0 ff ff li r31,-1
rtems_filesystem_eval_path_get_tokenlen( &ctx ),
mode,
&info
);
if ( new_node != NULL ) {
ffc057c0: 2f 83 00 00 cmpwi cr7,r3,0
ffc057c4: 41 9e 00 48 beq- cr7,ffc0580c <IMFS_make_generic_node+0xf4>
IMFS_jnode_t *parent = currentloc->node_access;
IMFS_update_ctime( parent );
ffc057c8: 38 80 00 00 li r4,0
mode,
&info
);
if ( new_node != NULL ) {
IMFS_jnode_t *parent = currentloc->node_access;
ffc057cc: 83 fe 00 08 lwz r31,8(r30)
IMFS_update_ctime( parent );
ffc057d0: 38 61 00 58 addi r3,r1,88
ffc057d4: 48 00 08 f5 bl ffc060c8 <gettimeofday>
ffc057d8: 81 21 00 58 lwz r9,88(r1)
IMFS_update_mtime( parent );
ffc057dc: 38 61 00 58 addi r3,r1,88
);
if ( new_node != NULL ) {
IMFS_jnode_t *parent = currentloc->node_access;
IMFS_update_ctime( parent );
ffc057e0: 91 3f 00 48 stw r9,72(r31)
IMFS_update_mtime( parent );
ffc057e4: 38 80 00 00 li r4,0
ffc057e8: 48 00 08 e1 bl ffc060c8 <gettimeofday>
ffc057ec: 81 21 00 58 lwz r9,88(r1)
ffc057f0: 91 3f 00 44 stw r9,68(r31)
ffc057f4: 3b e0 00 00 li r31,0
ffc057f8: 48 00 00 14 b ffc0580c <IMFS_make_generic_node+0xf4>
} else {
rv = -1;
}
} else {
rtems_filesystem_eval_path_error( &ctx, ENOTSUP );
ffc057fc: 38 61 00 08 addi r3,r1,8
ffc05800: 38 80 00 86 li r4,134
ffc05804: 48 00 1c 85 bl ffc07488 <rtems_filesystem_eval_path_error>
rv = -1;
ffc05808: 3b e0 ff ff li r31,-1
}
rtems_filesystem_eval_path_cleanup( &ctx );
ffc0580c: 38 61 00 08 addi r3,r1,8
ffc05810: 48 00 20 c1 bl ffc078d0 <rtems_filesystem_eval_path_cleanup>
ffc05814: 48 00 00 28 b ffc0583c <IMFS_make_generic_node+0x124>
} else {
errno = EINVAL;
ffc05818: 48 00 f8 41 bl ffc15058 <__errno>
ffc0581c: 39 20 00 16 li r9,22
ffc05820: 91 23 00 00 stw r9,0(r3)
rv = -1;
ffc05824: 3b e0 ff ff li r31,-1
ffc05828: 48 00 00 14 b ffc0583c <IMFS_make_generic_node+0x124>
rv = -1;
break;
}
if ( rv == 0 ) {
if ( node_control->imfs_type == IMFS_GENERIC ) {
ffc0582c: 81 3f 00 00 lwz r9,0(r31)
ffc05830: 2f 89 00 07 cmpwi cr7,r9,7
ffc05834: 41 9e ff 48 beq+ cr7,ffc0577c <IMFS_make_generic_node+0x64>
ffc05838: 4b ff ff e0 b ffc05818 <IMFS_make_generic_node+0x100>
rv = -1;
}
}
return rv;
}
ffc0583c: 39 61 00 78 addi r11,r1,120
ffc05840: 7f e3 fb 78 mr r3,r31
ffc05844: 4b ff b8 e4 b ffc01128 <_restgpr_28_x>
ffc0f084 <IMFS_memfile_addblock>:
*/
MEMFILE_STATIC int IMFS_memfile_addblock(
IMFS_jnode_t *the_jnode,
unsigned int block
)
{
ffc0f084: 7c 2b 0b 78 mr r11,r1
ffc0f088: 7c 08 02 a6 mflr r0
ffc0f08c: 94 21 ff f0 stwu r1,-16(r1)
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 );
ffc0f090: 38 a0 00 01 li r5,1
*/
MEMFILE_STATIC int IMFS_memfile_addblock(
IMFS_jnode_t *the_jnode,
unsigned int block
)
{
ffc0f094: 48 00 bd 29 bl ffc1adbc <_savegpr_31>
ffc0f098: 90 01 00 14 stw r0,20(r1)
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 );
ffc0f09c: 4b ff fb 91 bl ffc0ec2c <IMFS_memfile_get_block_pointer>
if ( *block_entry_ptr )
ffc0f0a0: 81 23 00 00 lwz r9,0(r3)
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 );
ffc0f0a4: 7c 7f 1b 78 mr r31,r3
if ( *block_entry_ptr )
ffc0f0a8: 2f 89 00 00 cmpwi cr7,r9,0
ffc0f0ac: 40 be 00 14 bne+ cr7,ffc0f0c0 <IMFS_memfile_addblock+0x3c>
return 0;
/*
* There is no memory for this block number so allocate it.
*/
memory = memfile_alloc_block();
ffc0f0b0: 4b ff fb 39 bl ffc0ebe8 <memfile_alloc_block>
if ( !memory )
ffc0f0b4: 2c 03 00 00 cmpwi r3,0
ffc0f0b8: 41 82 00 10 beq- ffc0f0c8 <IMFS_memfile_addblock+0x44> <== NEVER TAKEN
return 1;
*block_entry_ptr = memory;
ffc0f0bc: 90 7f 00 00 stw r3,0(r31)
/*
* Obtain the pointer for the specified block number
*/
block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 );
if ( *block_entry_ptr )
return 0;
ffc0f0c0: 38 60 00 00 li r3,0
ffc0f0c4: 48 00 00 08 b ffc0f0cc <IMFS_memfile_addblock+0x48>
/*
* There is no memory for this block number so allocate it.
*/
memory = memfile_alloc_block();
if ( !memory )
return 1;
ffc0f0c8: 38 60 00 01 li r3,1 <== NOT EXECUTED
*block_entry_ptr = memory;
return 0;
}
ffc0f0cc: 39 61 00 10 addi r11,r1,16
ffc0f0d0: 4b ff 14 f4 b ffc005c4 <_restgpr_31_x>
ffc0f2d4 <IMFS_memfile_extend>:
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
bool zero_fill,
off_t new_length
)
{
ffc0f2d4: 94 21 ff c0 stwu r1,-64(r1)
IMFS_assert( IMFS_type( the_jnode ) == IMFS_MEMORY_FILE );
/*
* Verify new file size is supported
*/
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
ffc0f2d8: 3d 20 00 00 lis r9,0
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
bool zero_fill,
off_t new_length
)
{
ffc0f2dc: 7d 80 00 26 mfcr r12
ffc0f2e0: be e1 00 1c stmw r23,28(r1)
ffc0f2e4: 7c 08 02 a6 mflr r0
ffc0f2e8: 7c 7f 1b 78 mr r31,r3
IMFS_assert( IMFS_type( the_jnode ) == IMFS_MEMORY_FILE );
/*
* Verify new file size is supported
*/
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
ffc0f2ec: 83 c9 28 44 lwz r30,10308(r9)
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
bool zero_fill,
off_t new_length
)
{
ffc0f2f0: 7c 97 23 78 mr r23,r4
ffc0f2f4: 90 01 00 44 stw r0,68(r1)
ffc0f2f8: 7c bc 2b 78 mr r28,r5
IMFS_assert( IMFS_type( the_jnode ) == IMFS_MEMORY_FILE );
/*
* Verify new file size is supported
*/
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
ffc0f2fc: 57 c9 f0 be rlwinm r9,r30,30,2,31
ffc0f300: 39 49 00 01 addi r10,r9,1
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
bool zero_fill,
off_t new_length
)
{
ffc0f304: 91 81 00 18 stw r12,24(r1)
IMFS_assert( IMFS_type( the_jnode ) == IMFS_MEMORY_FILE );
/*
* Verify new file size is supported
*/
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
ffc0f308: 7d 4a 49 d6 mullw r10,r10,r9
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
bool zero_fill,
off_t new_length
)
{
ffc0f30c: 7c dd 33 78 mr r29,r6
IMFS_assert( IMFS_type( the_jnode ) == IMFS_MEMORY_FILE );
/*
* Verify new file size is supported
*/
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
ffc0f310: 39 4a 00 01 addi r10,r10,1
ffc0f314: 7d 2a 49 d6 mullw r9,r10,r9
ffc0f318: 39 40 00 00 li r10,0
ffc0f31c: 7f 8a 28 00 cmpw cr7,r10,r5
ffc0f320: 39 29 ff ff addi r9,r9,-1
ffc0f324: 7d 29 f1 d6 mullw r9,r9,r30
ffc0f328: 41 bd 00 1c bgt+ cr7,ffc0f344 <IMFS_memfile_extend+0x70><== NEVER TAKEN
ffc0f32c: 40 9e 00 0c bne- cr7,ffc0f338 <IMFS_memfile_extend+0x64><== NEVER TAKEN
ffc0f330: 7f 89 30 40 cmplw cr7,r9,r6
ffc0f334: 41 bd 00 10 bgt+ cr7,ffc0f344 <IMFS_memfile_extend+0x70>
rtems_set_errno_and_return_minus_one( EFBIG );
ffc0f338: 48 00 12 75 bl ffc105ac <__errno>
ffc0f33c: 39 20 00 1b li r9,27
ffc0f340: 48 00 00 d8 b ffc0f418 <IMFS_memfile_extend+0x144>
/*
* Verify new file size is actually larger than current size
*/
if ( new_length <= the_jnode->info.file.size )
ffc0f344: 83 3f 00 50 lwz r25,80(r31)
ffc0f348: 83 5f 00 54 lwz r26,84(r31)
ffc0f34c: 7f 9c c8 00 cmpw cr7,r28,r25
ffc0f350: 41 bd 00 10 bgt+ cr7,ffc0f360 <IMFS_memfile_extend+0x8c><== NEVER TAKEN
ffc0f354: 40 9e 01 0c bne- cr7,ffc0f460 <IMFS_memfile_extend+0x18c><== NEVER TAKEN
ffc0f358: 7f 9d d0 40 cmplw cr7,r29,r26
ffc0f35c: 40 9d 01 04 ble- cr7,ffc0f460 <IMFS_memfile_extend+0x18c><== NEVER TAKEN
return 0;
/*
* Calculate the number of range of blocks to allocate
*/
new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
ffc0f360: 7f db fe 70 srawi r27,r30,31
ffc0f364: 7f 65 db 78 mr r5,r27
ffc0f368: 7f c6 f3 78 mr r6,r30
ffc0f36c: 7f 83 e3 78 mr r3,r28
ffc0f370: 7f a4 eb 78 mr r4,r29
ffc0f374: 48 00 aa c1 bl ffc19e34 <__divdi3>
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
ffc0f378: 7f 23 cb 78 mr r3,r25
ffc0f37c: 7f 65 db 78 mr r5,r27
ffc0f380: 7f c6 f3 78 mr r6,r30
return 0;
/*
* Calculate the number of range of blocks to allocate
*/
new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
ffc0f384: 7c 98 23 78 mr r24,r4
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
ffc0f388: 7f 44 d3 78 mr r4,r26
ffc0f38c: 48 00 aa a9 bl ffc19e34 <__divdi3>
/*
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
if ( !IMFS_memfile_addblock( the_jnode, block ) ) {
if ( zero_fill ) {
ffc0f390: 2e 17 00 00 cmpwi cr4,r23,0
/*
* Calculate the number of range of blocks to allocate
*/
new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
offset = the_jnode->info.file.size - old_blocks * IMFS_MEMFILE_BYTES_PER_BLOCK;
ffc0f394: 7f c4 f1 d6 mullw r30,r4,r30
/*
* Calculate the number of range of blocks to allocate
*/
new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
ffc0f398: 7c 9b 23 78 mr r27,r4
offset = the_jnode->info.file.size - old_blocks * IMFS_MEMFILE_BYTES_PER_BLOCK;
ffc0f39c: 7f 5e d0 50 subf r26,r30,r26
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
if ( !IMFS_memfile_addblock( the_jnode, block ) ) {
if ( zero_fill ) {
size_t count = IMFS_MEMFILE_BYTES_PER_BLOCK - offset;
ffc0f3a0: 3f 20 00 00 lis r25,0
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++ ) {
ffc0f3a4: 7c 9e 23 78 mr r30,r4
ffc0f3a8: 48 00 00 80 b ffc0f428 <IMFS_memfile_extend+0x154>
if ( !IMFS_memfile_addblock( the_jnode, block ) ) {
ffc0f3ac: 7f e3 fb 78 mr r3,r31
ffc0f3b0: 7f c4 f3 78 mr r4,r30
ffc0f3b4: 4b ff fc d1 bl ffc0f084 <IMFS_memfile_addblock>
ffc0f3b8: 2f 83 00 00 cmpwi cr7,r3,0
ffc0f3bc: 40 9e 00 4c bne- cr7,ffc0f408 <IMFS_memfile_extend+0x134><== NEVER TAKEN
if ( zero_fill ) {
ffc0f3c0: 41 b2 00 64 beq+ cr4,ffc0f424 <IMFS_memfile_extend+0x150>
size_t count = IMFS_MEMFILE_BYTES_PER_BLOCK - offset;
block_p *block_ptr =
ffc0f3c4: 7f c4 f3 78 mr r4,r30
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
if ( !IMFS_memfile_addblock( the_jnode, block ) ) {
if ( zero_fill ) {
size_t count = IMFS_MEMFILE_BYTES_PER_BLOCK - offset;
ffc0f3c8: 82 f9 28 44 lwz r23,10308(r25)
block_p *block_ptr =
ffc0f3cc: 38 a0 00 00 li r5,0
ffc0f3d0: 7f e3 fb 78 mr r3,r31
ffc0f3d4: 4b ff f8 59 bl ffc0ec2c <IMFS_memfile_get_block_pointer>
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
if ( !IMFS_memfile_addblock( the_jnode, block ) ) {
if ( zero_fill ) {
size_t count = IMFS_MEMFILE_BYTES_PER_BLOCK - offset;
ffc0f3d8: 7e fa b8 50 subf r23,r26,r23
block_p *block_ptr =
IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
memset( &(*block_ptr) [offset], 0, count);
ffc0f3dc: 80 63 00 00 lwz r3,0(r3)
ffc0f3e0: 38 80 00 00 li r4,0
ffc0f3e4: 7e e5 bb 78 mr r5,r23
ffc0f3e8: 7c 63 d2 14 add r3,r3,r26
ffc0f3ec: 48 00 1f b9 bl ffc113a4 <memset>
offset = 0;
ffc0f3f0: 3b 40 00 00 li r26,0
ffc0f3f4: 48 00 00 30 b ffc0f424 <IMFS_memfile_extend+0x150>
}
} else {
for ( ; block>=old_blocks ; block-- ) {
IMFS_memfile_remove_block( the_jnode, block );
ffc0f3f8: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED
ffc0f3fc: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc0f400: 4b ff fe 99 bl ffc0f298 <IMFS_memfile_remove_block> <== NOT EXECUTED
memset( &(*block_ptr) [offset], 0, count);
offset = 0;
}
} else {
for ( ; block>=old_blocks ; block-- ) {
ffc0f404: 3b de ff ff addi r30,r30,-1 <== NOT EXECUTED
ffc0f408: 7f 9e d8 40 cmplw cr7,r30,r27 <== NOT EXECUTED
ffc0f40c: 40 9c ff ec bge+ cr7,ffc0f3f8 <IMFS_memfile_extend+0x124><== NOT EXECUTED
IMFS_memfile_remove_block( the_jnode, block );
}
rtems_set_errno_and_return_minus_one( ENOSPC );
ffc0f410: 48 00 11 9d bl ffc105ac <__errno> <== NOT EXECUTED
ffc0f414: 39 20 00 1c li r9,28 <== NOT EXECUTED
ffc0f418: 91 23 00 00 stw r9,0(r3)
ffc0f41c: 38 60 ff ff li r3,-1
ffc0f420: 48 00 00 44 b ffc0f464 <IMFS_memfile_extend+0x190>
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++ ) {
ffc0f424: 3b de 00 01 addi r30,r30,1
ffc0f428: 7f 9e c0 40 cmplw cr7,r30,r24
ffc0f42c: 40 9d ff 80 ble+ cr7,ffc0f3ac <IMFS_memfile_extend+0xd8>
}
/*
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
ffc0f430: 93 9f 00 50 stw r28,80(r31)
IMFS_update_ctime(the_jnode);
ffc0f434: 38 80 00 00 li r4,0
ffc0f438: 38 61 00 08 addi r3,r1,8
}
/*
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
ffc0f43c: 93 bf 00 54 stw r29,84(r31)
IMFS_update_ctime(the_jnode);
ffc0f440: 4b ff 51 ed bl ffc0462c <gettimeofday>
ffc0f444: 81 21 00 08 lwz r9,8(r1)
IMFS_update_mtime(the_jnode);
ffc0f448: 38 61 00 08 addi r3,r1,8
/*
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
IMFS_update_ctime(the_jnode);
ffc0f44c: 91 3f 00 48 stw r9,72(r31)
IMFS_update_mtime(the_jnode);
ffc0f450: 38 80 00 00 li r4,0
ffc0f454: 4b ff 51 d9 bl ffc0462c <gettimeofday>
ffc0f458: 81 21 00 08 lwz r9,8(r1)
ffc0f45c: 91 3f 00 44 stw r9,68(r31)
/*
* Verify new file size is actually larger than current size
*/
if ( new_length <= the_jnode->info.file.size )
return 0;
ffc0f460: 38 60 00 00 li r3,0
the_jnode->info.file.size = new_length;
IMFS_update_ctime(the_jnode);
IMFS_update_mtime(the_jnode);
return 0;
}
ffc0f464: 81 81 00 18 lwz r12,24(r1)
ffc0f468: 39 61 00 40 addi r11,r1,64
ffc0f46c: 7d 80 81 20 mtcrf 8,r12
ffc0f470: 4b ff 11 34 b ffc005a4 <_restgpr_23_x>
ffc0ec2c <IMFS_memfile_get_block_pointer>:
my_block = block;
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
ffc0ec2c: 3d 20 00 00 lis r9,0
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
ffc0ec30: 94 21 ff e8 stwu r1,-24(r1)
ffc0ec34: 7c 08 02 a6 mflr r0
my_block = block;
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
ffc0ec38: 81 29 28 44 lwz r9,10308(r9)
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
ffc0ec3c: bf 81 00 08 stmw r28,8(r1)
ffc0ec40: 7c 7f 1b 78 mr r31,r3
my_block = block;
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
ffc0ec44: 55 29 f0 be rlwinm r9,r9,30,2,31
ffc0ec48: 39 49 ff ff addi r10,r9,-1
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
ffc0ec4c: 90 01 00 1c stw r0,28(r1)
my_block = block;
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
ffc0ec50: 7f 84 50 40 cmplw cr7,r4,r10
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
ffc0ec54: 7c 9e 23 78 mr r30,r4
my_block = block;
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
ffc0ec58: 41 9d 00 4c bgt- cr7,ffc0eca4 <IMFS_memfile_get_block_pointer+0x78>
p = info->indirect;
if ( malloc_it ) {
ffc0ec5c: 2f 05 00 00 cmpwi cr6,r5,0
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
p = info->indirect;
ffc0ec60: 81 23 00 58 lwz r9,88(r3)
ffc0ec64: 2f 89 00 00 cmpwi cr7,r9,0
if ( malloc_it ) {
ffc0ec68: 41 9a 00 2c beq- cr6,ffc0ec94 <IMFS_memfile_get_block_pointer+0x68>
if ( !p ) {
ffc0ec6c: 40 be 00 1c bne+ cr7,ffc0ec88 <IMFS_memfile_get_block_pointer+0x5c>
p = memfile_alloc_block();
ffc0ec70: 4b ff ff 79 bl ffc0ebe8 <memfile_alloc_block>
if ( !p )
ffc0ec74: 2c 03 00 00 cmpwi r3,0
ffc0ec78: 40 a2 00 0c bne+ ffc0ec84 <IMFS_memfile_get_block_pointer+0x58><== ALWAYS TAKEN
return 0;
ffc0ec7c: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc0ec80: 48 00 01 88 b ffc0ee08 <IMFS_memfile_get_block_pointer+0x1dc><== NOT EXECUTED
info->indirect = p;
ffc0ec84: 90 7f 00 58 stw r3,88(r31)
}
return &info->indirect[ my_block ];
ffc0ec88: 57 de 10 3a rlwinm r30,r30,2,0,29
ffc0ec8c: 80 7f 00 58 lwz r3,88(r31)
ffc0ec90: 48 00 00 84 b ffc0ed14 <IMFS_memfile_get_block_pointer+0xe8>
}
if ( !p )
ffc0ec94: 41 be ff e8 beq- cr7,ffc0ec7c <IMFS_memfile_get_block_pointer+0x50><== NEVER TAKEN
return 0;
return &info->indirect[ my_block ];
ffc0ec98: 54 9e 10 3a rlwinm r30,r4,2,0,29
ffc0ec9c: 7c 69 f2 14 add r3,r9,r30
ffc0eca0: 48 00 01 68 b ffc0ee08 <IMFS_memfile_get_block_pointer+0x1dc>
/*
* Is the block number in the doubly indirect portion?
*/
if ( my_block <= LAST_DOUBLY_INDIRECT ) {
ffc0eca4: 38 69 00 01 addi r3,r9,1
ffc0eca8: 7c 63 49 d6 mullw r3,r3,r9
ffc0ecac: 39 43 ff ff addi r10,r3,-1
ffc0ecb0: 7f 84 50 40 cmplw cr7,r4,r10
ffc0ecb4: 41 9d 00 88 bgt- cr7,ffc0ed3c <IMFS_memfile_get_block_pointer+0x110>
my_block -= FIRST_DOUBLY_INDIRECT;
ffc0ecb8: 7f c9 20 50 subf r30,r9,r4
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
p = info->doubly_indirect;
ffc0ecbc: 80 7f 00 5c lwz r3,92(r31)
*/
if ( my_block <= LAST_DOUBLY_INDIRECT ) {
my_block -= FIRST_DOUBLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
ffc0ecc0: 7f be 4b 96 divwu r29,r30,r9
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
p = info->doubly_indirect;
if ( malloc_it ) {
ffc0ecc4: 2f 05 00 00 cmpwi cr6,r5,0
*/
if ( my_block <= LAST_DOUBLY_INDIRECT ) {
my_block -= FIRST_DOUBLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
ffc0ecc8: 7d 3d 49 d6 mullw r9,r29,r9
ffc0eccc: 2f 83 00 00 cmpwi cr7,r3,0
ffc0ecd0: 7f c9 f0 50 subf r30,r9,r30
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
p = info->doubly_indirect;
if ( malloc_it ) {
ffc0ecd4: 41 9a 00 48 beq- cr6,ffc0ed1c <IMFS_memfile_get_block_pointer+0xf0>
if ( !p ) {
ffc0ecd8: 40 be 00 14 bne+ cr7,ffc0ecec <IMFS_memfile_get_block_pointer+0xc0>
p = memfile_alloc_block();
ffc0ecdc: 4b ff ff 0d bl ffc0ebe8 <memfile_alloc_block>
if ( !p )
ffc0ece0: 2c 03 00 00 cmpwi r3,0
ffc0ece4: 41 a2 ff 98 beq- ffc0ec7c <IMFS_memfile_get_block_pointer+0x50><== NEVER TAKEN
return 0;
info->doubly_indirect = p;
ffc0ece8: 90 7f 00 5c stw r3,92(r31)
}
p1 = (block_p *)p[ doubly ];
ffc0ecec: 57 bd 10 3a rlwinm r29,r29,2,0,29
ffc0ecf0: 7f e3 ea 14 add r31,r3,r29
ffc0ecf4: 7c 63 e8 2e lwzx r3,r3,r29
if ( !p1 ) {
ffc0ecf8: 2f 83 00 00 cmpwi cr7,r3,0
ffc0ecfc: 40 be 00 14 bne+ cr7,ffc0ed10 <IMFS_memfile_get_block_pointer+0xe4>
p1 = memfile_alloc_block();
ffc0ed00: 4b ff fe e9 bl ffc0ebe8 <memfile_alloc_block>
if ( !p1 )
ffc0ed04: 2c 03 00 00 cmpwi r3,0
ffc0ed08: 41 a2 ff 74 beq- ffc0ec7c <IMFS_memfile_get_block_pointer+0x50><== NEVER TAKEN
return 0;
p[ doubly ] = (block_p) p1;
ffc0ed0c: 90 7f 00 00 stw r3,0(r31)
}
return (block_p *)&p1[ singly ];
ffc0ed10: 57 de 10 3a rlwinm r30,r30,2,0,29
ffc0ed14: 7c 63 f2 14 add r3,r3,r30
ffc0ed18: 48 00 00 f0 b ffc0ee08 <IMFS_memfile_get_block_pointer+0x1dc>
}
if ( !p )
ffc0ed1c: 41 be ff 60 beq- cr7,ffc0ec7c <IMFS_memfile_get_block_pointer+0x50><== NEVER TAKEN
return 0;
p = (block_p *)p[ doubly ];
ffc0ed20: 57 bd 10 3a rlwinm r29,r29,2,0,29
ffc0ed24: 7d 43 e8 2e lwzx r10,r3,r29
if ( !p )
ffc0ed28: 2f 8a 00 00 cmpwi cr7,r10,0
ffc0ed2c: 41 be ff 50 beq- cr7,ffc0ec7c <IMFS_memfile_get_block_pointer+0x50><== NEVER TAKEN
return 0;
return (block_p *)&p[ singly ];
ffc0ed30: 57 de 10 3a rlwinm r30,r30,2,0,29
ffc0ed34: 7c 6a f2 14 add r3,r10,r30
ffc0ed38: 48 00 00 d0 b ffc0ee08 <IMFS_memfile_get_block_pointer+0x1dc>
}
/*
* Is the block number in the triply indirect portion?
*/
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
ffc0ed3c: 39 43 00 01 addi r10,r3,1
ffc0ed40: 7d 4a 49 d6 mullw r10,r10,r9
ffc0ed44: 39 4a ff ff addi r10,r10,-1
ffc0ed48: 7f 84 50 40 cmplw cr7,r4,r10
ffc0ed4c: 41 bd ff 30 bgt- cr7,ffc0ec7c <IMFS_memfile_get_block_pointer+0x50><== NEVER TAKEN
my_block -= FIRST_TRIPLY_INDIRECT;
ffc0ed50: 7f c3 20 50 subf r30,r3,r4
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
ffc0ed54: 7d 5e 4b 96 divwu r10,r30,r9
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
ffc0ed58: 7f aa 4b 96 divwu r29,r10,r9
* Is the block number in the triply indirect portion?
*/
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
my_block -= FIRST_TRIPLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
ffc0ed5c: 7c 6a 49 d6 mullw r3,r10,r9
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
p = info->triply_indirect;
if ( malloc_it ) {
ffc0ed60: 2f 05 00 00 cmpwi cr6,r5,0
my_block -= FIRST_TRIPLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
ffc0ed64: 7d 3d 49 d6 mullw r9,r29,r9
* Is the block number in the triply indirect portion?
*/
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
my_block -= FIRST_TRIPLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
ffc0ed68: 7f c3 f0 50 subf r30,r3,r30
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
p = info->triply_indirect;
ffc0ed6c: 80 7f 00 60 lwz r3,96(r31)
my_block -= FIRST_TRIPLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
ffc0ed70: 7f 89 50 50 subf r28,r9,r10
ffc0ed74: 2f 83 00 00 cmpwi cr7,r3,0
p = info->triply_indirect;
if ( malloc_it ) {
ffc0ed78: 41 9a 00 64 beq- cr6,ffc0eddc <IMFS_memfile_get_block_pointer+0x1b0>
if ( !p ) {
ffc0ed7c: 40 be 00 14 bne+ cr7,ffc0ed90 <IMFS_memfile_get_block_pointer+0x164>
p = memfile_alloc_block();
ffc0ed80: 4b ff fe 69 bl ffc0ebe8 <memfile_alloc_block>
if ( !p )
ffc0ed84: 2c 03 00 00 cmpwi r3,0
ffc0ed88: 41 a2 fe f4 beq- ffc0ec7c <IMFS_memfile_get_block_pointer+0x50><== NEVER TAKEN
return 0;
info->triply_indirect = p;
ffc0ed8c: 90 7f 00 60 stw r3,96(r31)
}
p1 = (block_p *) p[ triply ];
ffc0ed90: 57 bd 10 3a rlwinm r29,r29,2,0,29
ffc0ed94: 7f e3 ea 14 add r31,r3,r29
ffc0ed98: 7c 63 e8 2e lwzx r3,r3,r29
if ( !p1 ) {
ffc0ed9c: 2f 83 00 00 cmpwi cr7,r3,0
ffc0eda0: 40 be 00 14 bne+ cr7,ffc0edb4 <IMFS_memfile_get_block_pointer+0x188>
p1 = memfile_alloc_block();
ffc0eda4: 4b ff fe 45 bl ffc0ebe8 <memfile_alloc_block>
if ( !p1 )
ffc0eda8: 2c 03 00 00 cmpwi r3,0
ffc0edac: 41 a2 fe d0 beq- ffc0ec7c <IMFS_memfile_get_block_pointer+0x50><== NEVER TAKEN
return 0;
p[ triply ] = (block_p) p1;
ffc0edb0: 90 7f 00 00 stw r3,0(r31)
}
p2 = (block_p *)p1[ doubly ];
ffc0edb4: 57 9c 10 3a rlwinm r28,r28,2,0,29
ffc0edb8: 7d 23 e0 2e lwzx r9,r3,r28
ffc0edbc: 7f e3 e2 14 add r31,r3,r28
if ( !p2 ) {
ffc0edc0: 2f 89 00 00 cmpwi cr7,r9,0
ffc0edc4: 40 be 00 3c bne+ cr7,ffc0ee00 <IMFS_memfile_get_block_pointer+0x1d4>
p2 = memfile_alloc_block();
ffc0edc8: 4b ff fe 21 bl ffc0ebe8 <memfile_alloc_block>
if ( !p2 )
ffc0edcc: 7c 69 1b 79 mr. r9,r3
ffc0edd0: 41 a2 fe ac beq- ffc0ec7c <IMFS_memfile_get_block_pointer+0x50><== NEVER TAKEN
return 0;
p1[ doubly ] = (block_p) p2;
ffc0edd4: 91 3f 00 00 stw r9,0(r31)
ffc0edd8: 48 00 00 28 b ffc0ee00 <IMFS_memfile_get_block_pointer+0x1d4>
}
return (block_p *)&p2[ singly ];
}
if ( !p )
ffc0eddc: 41 be fe a0 beq- cr7,ffc0ec7c <IMFS_memfile_get_block_pointer+0x50><== NEVER TAKEN
return 0;
p1 = (block_p *) p[ triply ];
ffc0ede0: 57 bd 10 3a rlwinm r29,r29,2,0,29
ffc0ede4: 7d 03 e8 2e lwzx r8,r3,r29
if ( !p1 )
ffc0ede8: 2f 88 00 00 cmpwi cr7,r8,0
ffc0edec: 41 be fe 90 beq- cr7,ffc0ec7c <IMFS_memfile_get_block_pointer+0x50><== NEVER TAKEN
return 0;
p2 = (block_p *)p1[ doubly ];
ffc0edf0: 57 9c 10 3a rlwinm r28,r28,2,0,29
ffc0edf4: 7d 28 e0 2e lwzx r9,r8,r28
if ( !p2 )
ffc0edf8: 2f 89 00 00 cmpwi cr7,r9,0
ffc0edfc: 41 be fe 80 beq- cr7,ffc0ec7c <IMFS_memfile_get_block_pointer+0x50><== NEVER TAKEN
return 0;
return (block_p *)&p2[ singly ];
ffc0ee00: 57 c3 10 3a rlwinm r3,r30,2,0,29
ffc0ee04: 7c 69 1a 14 add r3,r9,r3
/*
* This means the requested block number is out of range.
*/
return 0;
}
ffc0ee08: 39 61 00 18 addi r11,r1,24
ffc0ee0c: 4b ff 17 ac b ffc005b8 <_restgpr_28_x>
ffc0ee10 <IMFS_memfile_read>:
IMFS_jnode_t *the_jnode,
off_t start,
unsigned char *destination,
unsigned int length
)
{
ffc0ee10: 94 21 ff c8 stwu r1,-56(r1)
ffc0ee14: 7c 08 02 a6 mflr r0
ffc0ee18: bf 01 00 18 stmw r24,24(r1)
ffc0ee1c: 7c 7c 1b 78 mr r28,r3
ffc0ee20: 7c df 33 78 mr r31,r6
ffc0ee24: 90 01 00 3c stw r0,60(r1)
ffc0ee28: 7c be 2b 78 mr r30,r5
ffc0ee2c: 7c fa 3b 78 mr r26,r7
rtems_chain_extract_unprotected( &node->Node );
}
static inline IMFS_jnode_types_t IMFS_type( const IMFS_jnode_t *node )
{
return node->control->imfs_type;
ffc0ee30: 81 23 00 4c lwz r9,76(r3)
* 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 ) {
ffc0ee34: 81 29 00 00 lwz r9,0(r9)
ffc0ee38: 2f 89 00 05 cmpwi cr7,r9,5
ffc0ee3c: 40 be 00 68 bne+ cr7,ffc0eea4 <IMFS_memfile_read+0x94>
unsigned char *file_ptr;
file_ptr = (unsigned char *)the_jnode->info.linearfile.direct;
if (my_length > (the_jnode->info.linearfile.size - start))
ffc0ee40: 81 43 00 50 lwz r10,80(r3)
ffc0ee44: 39 20 00 00 li r9,0
ffc0ee48: 81 63 00 54 lwz r11,84(r3)
my_length = length;
if ( IMFS_type( the_jnode ) == IMFS_LINEAR_FILE ) {
unsigned char *file_ptr;
file_ptr = (unsigned char *)the_jnode->info.linearfile.direct;
ffc0ee4c: 80 83 00 58 lwz r4,88(r3)
if (my_length > (the_jnode->info.linearfile.size - start))
ffc0ee50: 7c ff 58 10 subfc r7,r31,r11
ffc0ee54: 7c de 51 10 subfe r6,r30,r10
ffc0ee58: 7f 89 30 00 cmpw cr7,r9,r6
ffc0ee5c: 41 bd 00 10 bgt+ cr7,ffc0ee6c <IMFS_memfile_read+0x5c> <== NEVER TAKEN
ffc0ee60: 40 9e 00 14 bne- cr7,ffc0ee74 <IMFS_memfile_read+0x64> <== NEVER TAKEN
ffc0ee64: 7f 88 38 40 cmplw cr7,r8,r7
ffc0ee68: 40 9d 00 0c ble- cr7,ffc0ee74 <IMFS_memfile_read+0x64> <== NEVER TAKEN
my_length = the_jnode->info.linearfile.size - start;
ffc0ee6c: 7f bf 58 50 subf r29,r31,r11
ffc0ee70: 48 00 00 08 b ffc0ee78 <IMFS_memfile_read+0x68>
/*
* Linear files (as created from a tar file are easier to handle
* than block files).
*/
my_length = length;
ffc0ee74: 7d 1d 43 78 mr r29,r8 <== 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);
ffc0ee78: 7c 84 fa 14 add r4,r4,r31
ffc0ee7c: 7f a5 eb 78 mr r5,r29
ffc0ee80: 7f 43 d3 78 mr r3,r26
ffc0ee84: 48 00 24 2d bl ffc112b0 <memcpy>
IMFS_update_atime( the_jnode );
ffc0ee88: 38 61 00 08 addi r3,r1,8
ffc0ee8c: 38 80 00 00 li r4,0
ffc0ee90: 4b ff 57 9d bl ffc0462c <gettimeofday>
ffc0ee94: 81 21 00 08 lwz r9,8(r1)
return my_length;
ffc0ee98: 7f bf eb 78 mr r31,r29
if (my_length > (the_jnode->info.linearfile.size - start))
my_length = the_jnode->info.linearfile.size - start;
memcpy(dest, &file_ptr[start], my_length);
IMFS_update_atime( the_jnode );
ffc0ee9c: 91 3c 00 40 stw r9,64(r28)
return my_length;
ffc0eea0: 48 00 01 78 b ffc0f018 <IMFS_memfile_read+0x208>
/*
* If the last byte we are supposed to read is past the end of this
* in memory file, then shorten the length to read.
*/
last_byte = start + length;
if ( last_byte > the_jnode->info.file.size )
ffc0eea4: 81 43 00 50 lwz r10,80(r3)
/*
* 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;
ffc0eea8: 7c c9 33 78 mr r9,r6
ffc0eeac: 7c e8 32 14 add r7,r8,r6
if ( last_byte > the_jnode->info.file.size )
ffc0eeb0: 83 a3 00 54 lwz r29,84(r3)
ffc0eeb4: 38 c0 00 00 li r6,0
ffc0eeb8: 7f 86 50 00 cmpw cr7,r6,r10
ffc0eebc: 41 9d 00 10 bgt- cr7,ffc0eecc <IMFS_memfile_read+0xbc> <== NEVER TAKEN
ffc0eec0: 40 9e 00 14 bne- cr7,ffc0eed4 <IMFS_memfile_read+0xc4> <== NEVER TAKEN
ffc0eec4: 7f 87 e8 40 cmplw cr7,r7,r29
ffc0eec8: 40 9d 00 0c ble- cr7,ffc0eed4 <IMFS_memfile_read+0xc4>
my_length = the_jnode->info.file.size - start;
ffc0eecc: 7f a9 e8 50 subf r29,r9,r29
ffc0eed0: 48 00 00 08 b ffc0eed8 <IMFS_memfile_read+0xc8>
/*
* Linear files (as created from a tar file are easier to handle
* than block files).
*/
my_length = length;
ffc0eed4: 7d 1d 43 78 mr r29,r8
*/
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
ffc0eed8: 3d 20 00 00 lis r9,0
ffc0eedc: 83 69 28 44 lwz r27,10308(r9)
ffc0eee0: 7f c3 f3 78 mr r3,r30
ffc0eee4: 7f e4 fb 78 mr r4,r31
ffc0eee8: 7f 78 fe 70 srawi r24,r27,31
ffc0eeec: 7f 05 c3 78 mr r5,r24
ffc0eef0: 7f 66 db 78 mr r6,r27
ffc0eef4: 48 00 b3 65 bl ffc1a258 <__moddi3>
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
ffc0eef8: 7f c3 f3 78 mr r3,r30
*/
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
ffc0eefc: 7c 99 23 78 mr r25,r4
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
ffc0ef00: 7f 05 c3 78 mr r5,r24
ffc0ef04: 7f e4 fb 78 mr r4,r31
ffc0ef08: 7f 66 db 78 mr r6,r27
ffc0ef0c: 48 00 af 29 bl ffc19e34 <__divdi3>
if ( start_offset ) {
ffc0ef10: 2f 99 00 00 cmpwi cr7,r25,0
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
ffc0ef14: 7c 9e 23 78 mr r30,r4
if ( start_offset ) {
ffc0ef18: 41 9e 00 5c beq- cr7,ffc0ef74 <IMFS_memfile_read+0x164>
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
ffc0ef1c: 7d 39 d8 50 subf r9,r25,r27
ffc0ef20: 7f 9d 48 40 cmplw cr7,r29,r9
ffc0ef24: 7f bb eb 78 mr r27,r29
ffc0ef28: 40 9d 00 08 ble- cr7,ffc0ef30 <IMFS_memfile_read+0x120>
ffc0ef2c: 7d 3b 4b 78 mr r27,r9
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
ffc0ef30: 7f 83 e3 78 mr r3,r28
ffc0ef34: 7f c4 f3 78 mr r4,r30
ffc0ef38: 38 a0 00 00 li r5,0
ffc0ef3c: 4b ff fc f1 bl ffc0ec2c <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
return copied;
ffc0ef40: 3b e0 00 00 li r31,0
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 );
if ( !block_ptr )
ffc0ef44: 2c 03 00 00 cmpwi r3,0
ffc0ef48: 41 82 00 d0 beq- ffc0f018 <IMFS_memfile_read+0x208> <== NEVER TAKEN
return copied;
memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
ffc0ef4c: 80 83 00 00 lwz r4,0(r3)
ffc0ef50: 7f 65 db 78 mr r5,r27
ffc0ef54: 7f 43 d3 78 mr r3,r26
ffc0ef58: 7c 84 ca 14 add r4,r4,r25
ffc0ef5c: 48 00 23 55 bl ffc112b0 <memcpy>
dest += to_copy;
ffc0ef60: 7f 5a da 14 add r26,r26,r27
block++;
ffc0ef64: 3b de 00 01 addi r30,r30,1
my_length -= to_copy;
ffc0ef68: 7f bb e8 50 subf r29,r27,r29
copied += to_copy;
ffc0ef6c: 7f 7f db 78 mr r31,r27
ffc0ef70: 48 00 00 08 b ffc0ef78 <IMFS_memfile_read+0x168>
*/
last_byte = start + length;
if ( last_byte > the_jnode->info.file.size )
my_length = the_jnode->info.file.size - start;
copied = 0;
ffc0ef74: 3b e0 00 00 li r31,0
}
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
ffc0ef78: 3d 20 00 00 lis r9,0
ffc0ef7c: 83 29 28 44 lwz r25,10308(r9)
* 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(
ffc0ef80: 7f 5f d0 50 subf r26,r31,r26
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
ffc0ef84: 7d 38 4b 78 mr r24,r9
ffc0ef88: 48 00 00 38 b ffc0efc0 <IMFS_memfile_read+0x1b0>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
ffc0ef8c: 7f 83 e3 78 mr r3,r28
ffc0ef90: 7f c4 f3 78 mr r4,r30
ffc0ef94: 38 a0 00 00 li r5,0
ffc0ef98: 4b ff fc 95 bl ffc0ec2c <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
ffc0ef9c: 7c 69 1b 79 mr. r9,r3
ffc0efa0: 41 82 00 78 beq- ffc0f018 <IMFS_memfile_read+0x208> <== NEVER TAKEN
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
ffc0efa4: 80 89 00 00 lwz r4,0(r9)
ffc0efa8: 7f 63 db 78 mr r3,r27
ffc0efac: 7f 25 cb 78 mr r5,r25
ffc0efb0: 48 00 23 01 bl ffc112b0 <memcpy>
dest += to_copy;
block++;
ffc0efb4: 3b de 00 01 addi r30,r30,1
my_length -= to_copy;
ffc0efb8: 7f b9 e8 50 subf r29,r25,r29
copied += to_copy;
ffc0efbc: 7f ff ca 14 add r31,r31,r25
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
ffc0efc0: 81 38 28 44 lwz r9,10308(r24)
* 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(
ffc0efc4: 7f 7a fa 14 add r27,r26,r31
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
ffc0efc8: 7f 9d 48 40 cmplw cr7,r29,r9
ffc0efcc: 40 9c ff c0 bge+ cr7,ffc0ef8c <IMFS_memfile_read+0x17c>
/*
* Phase 3: possibly the first part of one block
*/
IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
if ( my_length ) {
ffc0efd0: 2f 9d 00 00 cmpwi cr7,r29,0
ffc0efd4: 41 9e 00 30 beq- cr7,ffc0f004 <IMFS_memfile_read+0x1f4>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
ffc0efd8: 7f 83 e3 78 mr r3,r28
ffc0efdc: 7f c4 f3 78 mr r4,r30
ffc0efe0: 38 a0 00 00 li r5,0
ffc0efe4: 4b ff fc 49 bl ffc0ec2c <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
ffc0efe8: 7c 69 1b 79 mr. r9,r3
ffc0efec: 41 82 00 2c beq- ffc0f018 <IMFS_memfile_read+0x208> <== NEVER TAKEN
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], my_length );
ffc0eff0: 80 89 00 00 lwz r4,0(r9)
ffc0eff4: 7f 63 db 78 mr r3,r27
ffc0eff8: 7f a5 eb 78 mr r5,r29
ffc0effc: 48 00 22 b5 bl ffc112b0 <memcpy>
copied += my_length;
ffc0f000: 7f fd fa 14 add r31,r29,r31
}
IMFS_update_atime( the_jnode );
ffc0f004: 38 61 00 08 addi r3,r1,8
ffc0f008: 38 80 00 00 li r4,0
ffc0f00c: 4b ff 56 21 bl ffc0462c <gettimeofday>
ffc0f010: 81 21 00 08 lwz r9,8(r1)
ffc0f014: 91 3c 00 40 stw r9,64(r28)
return copied;
}
ffc0f018: 39 61 00 38 addi r11,r1,56
ffc0f01c: 7f e3 fb 78 mr r3,r31
ffc0f020: 4b ff 15 88 b ffc005a8 <_restgpr_24_x>
ffc0f168 <IMFS_memfile_remove>:
* is better to stick to simple, easy to understand algorithms.
*/
IMFS_jnode_t *IMFS_memfile_remove(
IMFS_jnode_t *the_jnode
)
{
ffc0f168: 94 21 ff d8 stwu r1,-40(r1)
ffc0f16c: 7c 08 02 a6 mflr r0
/*
* 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;
ffc0f170: 3d 20 00 00 lis r9,0
* is better to stick to simple, easy to understand algorithms.
*/
IMFS_jnode_t *IMFS_memfile_remove(
IMFS_jnode_t *the_jnode
)
{
ffc0f174: 90 01 00 2c stw r0,44(r1)
ffc0f178: bf 21 00 0c stmw r25,12(r1)
ffc0f17c: 7c 7f 1b 78 mr r31,r3
/*
* 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;
ffc0f180: 83 c9 28 44 lwz r30,10308(r9)
* + doubly indirect
* + triply indirect
*/
info = &the_jnode->info.file;
if ( info->indirect ) {
ffc0f184: 81 23 00 58 lwz r9,88(r3)
/*
* 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;
ffc0f188: 57 de f0 be rlwinm r30,r30,30,2,31
* + doubly indirect
* + triply indirect
*/
info = &the_jnode->info.file;
if ( info->indirect ) {
ffc0f18c: 2f 89 00 00 cmpwi cr7,r9,0
ffc0f190: 41 9e 00 10 beq- cr7,ffc0f1a0 <IMFS_memfile_remove+0x38>
memfile_free_blocks_in_table( &info->indirect, to_free );
ffc0f194: 38 63 00 58 addi r3,r3,88
ffc0f198: 7f c4 f3 78 mr r4,r30
ffc0f19c: 4b ff ff 69 bl ffc0f104 <memfile_free_blocks_in_table>
}
if ( info->doubly_indirect ) {
ffc0f1a0: 81 3f 00 5c lwz r9,92(r31)
ffc0f1a4: 3b a0 00 00 li r29,0
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
ffc0f1a8: 3f 80 00 00 lis r28,0
if ( info->indirect ) {
memfile_free_blocks_in_table( &info->indirect, to_free );
}
if ( info->doubly_indirect ) {
ffc0f1ac: 2f 89 00 00 cmpwi cr7,r9,0
ffc0f1b0: 40 be 00 2c bne+ cr7,ffc0f1dc <IMFS_memfile_remove+0x74>
ffc0f1b4: 48 00 00 44 b ffc0f1f8 <IMFS_memfile_remove+0x90>
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
if ( info->doubly_indirect[i] ) {
ffc0f1b8: 81 3f 00 5c lwz r9,92(r31)
* 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(
ffc0f1bc: 57 aa 10 3a rlwinm r10,r29,2,0,29
memfile_free_blocks_in_table( &info->indirect, to_free );
}
if ( info->doubly_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
if ( info->doubly_indirect[i] ) {
ffc0f1c0: 7c 69 52 14 add r3,r9,r10
ffc0f1c4: 7d 29 50 2e lwzx r9,r9,r10
ffc0f1c8: 2f 89 00 00 cmpwi cr7,r9,0
ffc0f1cc: 41 9e 00 0c beq- cr7,ffc0f1d8 <IMFS_memfile_remove+0x70><== NEVER TAKEN
memfile_free_blocks_in_table(
ffc0f1d0: 7f c4 f3 78 mr r4,r30
ffc0f1d4: 4b ff ff 31 bl ffc0f104 <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++ ) {
ffc0f1d8: 3b bd 00 01 addi r29,r29,1
ffc0f1dc: 81 3c 28 44 lwz r9,10308(r28)
ffc0f1e0: 55 29 f0 be rlwinm r9,r9,30,2,31
ffc0f1e4: 7f 9d 48 40 cmplw cr7,r29,r9
ffc0f1e8: 41 9c ff d0 blt+ cr7,ffc0f1b8 <IMFS_memfile_remove+0x50>
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 );
ffc0f1ec: 38 7f 00 5c addi r3,r31,92
ffc0f1f0: 7f c4 f3 78 mr r4,r30
ffc0f1f4: 4b ff ff 11 bl ffc0f104 <memfile_free_blocks_in_table>
}
if ( info->triply_indirect ) {
ffc0f1f8: 81 3f 00 60 lwz r9,96(r31)
ffc0f1fc: 3b a0 00 00 li r29,0
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
ffc0f200: 3f 40 00 00 lis r26,0
}
memfile_free_blocks_in_table( &info->doubly_indirect, to_free );
}
if ( info->triply_indirect ) {
ffc0f204: 2f 89 00 00 cmpwi cr7,r9,0
ffc0f208: 40 be 00 68 bne+ cr7,ffc0f270 <IMFS_memfile_remove+0x108>
ffc0f20c: 48 00 00 80 b ffc0f28c <IMFS_memfile_remove+0x124>
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
p = (block_p *) info->triply_indirect[i];
ffc0f210: 81 3f 00 60 lwz r9,96(r31)
* 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(
ffc0f214: 57 b9 10 3a rlwinm r25,r29,2,0,29
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
p = (block_p *) info->triply_indirect[i];
ffc0f218: 7f 89 c8 2e lwzx r28,r9,r25
if ( !p ) /* ensure we have a valid pointer */
ffc0f21c: 2f 9c 00 00 cmpwi cr7,r28,0
ffc0f220: 41 9e 00 60 beq- cr7,ffc0f280 <IMFS_memfile_remove+0x118><== NEVER TAKEN
ffc0f224: 3b 60 00 00 li r27,0
ffc0f228: 48 00 00 24 b ffc0f24c <IMFS_memfile_remove+0xe4>
break;
for ( j=0 ; j<IMFS_MEMFILE_BLOCK_SLOTS ; j++ ) {
if ( p[j] ) {
ffc0f22c: 81 3c 00 00 lwz r9,0(r28)
ffc0f230: 2f 89 00 00 cmpwi cr7,r9,0
ffc0f234: 41 9e 00 10 beq- cr7,ffc0f244 <IMFS_memfile_remove+0xdc><== NEVER TAKEN
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
ffc0f238: 7f 83 e3 78 mr r3,r28
ffc0f23c: 7f c4 f3 78 mr r4,r30
ffc0f240: 4b ff fe c5 bl ffc0f104 <memfile_free_blocks_in_table>
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++ ) {
ffc0f244: 3b 7b 00 01 addi r27,r27,1
ffc0f248: 3b 9c 00 04 addi r28,r28,4
ffc0f24c: 81 3a 28 44 lwz r9,10308(r26)
ffc0f250: 55 29 f0 be rlwinm r9,r9,30,2,31
ffc0f254: 7f 9b 48 40 cmplw cr7,r27,r9
ffc0f258: 41 9c ff d4 blt+ cr7,ffc0f22c <IMFS_memfile_remove+0xc4>
if ( p[j] ) {
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
}
}
memfile_free_blocks_in_table(
ffc0f25c: 80 7f 00 60 lwz r3,96(r31)
ffc0f260: 7f c4 f3 78 mr r4,r30
memfile_free_blocks_in_table( &info->doubly_indirect, to_free );
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
ffc0f264: 3b bd 00 01 addi r29,r29,1
for ( j=0 ; j<IMFS_MEMFILE_BLOCK_SLOTS ; j++ ) {
if ( p[j] ) {
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
}
}
memfile_free_blocks_in_table(
ffc0f268: 7c 63 ca 14 add r3,r3,r25
ffc0f26c: 4b ff fe 99 bl ffc0f104 <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++ ) {
ffc0f270: 81 3a 28 44 lwz r9,10308(r26)
ffc0f274: 55 29 f0 be rlwinm r9,r9,30,2,31
ffc0f278: 7f 9d 48 40 cmplw cr7,r29,r9
ffc0f27c: 41 9c ff 94 blt+ cr7,ffc0f210 <IMFS_memfile_remove+0xa8>
}
}
memfile_free_blocks_in_table(
(block_p **)&info->triply_indirect[i], to_free );
}
memfile_free_blocks_in_table(
ffc0f280: 38 7f 00 60 addi r3,r31,96
ffc0f284: 7f c4 f3 78 mr r4,r30
ffc0f288: 4b ff fe 7d bl ffc0f104 <memfile_free_blocks_in_table>
(block_p **)&info->triply_indirect, to_free );
}
return the_jnode;
}
ffc0f28c: 39 61 00 28 addi r11,r1,40
ffc0f290: 7f e3 fb 78 mr r3,r31
ffc0f294: 4b ff 13 18 b ffc005ac <_restgpr_25_x>
ffc0f298 <IMFS_memfile_remove_block>:
*/
MEMFILE_STATIC int IMFS_memfile_remove_block(
IMFS_jnode_t *the_jnode,
unsigned int block
)
{
ffc0f298: 94 21 ff f8 stwu r1,-8(r1) <== NOT EXECUTED
ffc0f29c: 7c 08 02 a6 mflr r0 <== NOT EXECUTED
block_p *block_ptr;
block_p ptr;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
ffc0f2a0: 38 a0 00 00 li r5,0 <== NOT EXECUTED
*/
MEMFILE_STATIC int IMFS_memfile_remove_block(
IMFS_jnode_t *the_jnode,
unsigned int block
)
{
ffc0f2a4: 90 01 00 0c stw r0,12(r1) <== NOT EXECUTED
block_p *block_ptr;
block_p ptr;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
ffc0f2a8: 4b ff f9 85 bl ffc0ec2c <IMFS_memfile_get_block_pointer><== NOT EXECUTED
ffc0f2ac: 7c 69 1b 78 mr r9,r3 <== NOT EXECUTED
IMFS_assert( block_ptr );
ptr = *block_ptr;
*block_ptr = 0;
ffc0f2b0: 39 40 00 00 li r10,0 <== NOT EXECUTED
block_p ptr;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
IMFS_assert( block_ptr );
ptr = *block_ptr;
ffc0f2b4: 80 63 00 00 lwz r3,0(r3) <== NOT EXECUTED
*block_ptr = 0;
ffc0f2b8: 91 49 00 00 stw r10,0(r9) <== NOT EXECUTED
memfile_free_block( ptr );
ffc0f2bc: 4b ff fe 19 bl ffc0f0d4 <memfile_free_block> <== NOT EXECUTED
return 1;
}
ffc0f2c0: 80 01 00 0c lwz r0,12(r1) <== NOT EXECUTED
ffc0f2c4: 38 60 00 01 li r3,1 <== NOT EXECUTED
ffc0f2c8: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED
ffc0f2cc: 38 21 00 08 addi r1,r1,8 <== NOT EXECUTED
ffc0f2d0: 4e 80 00 20 blr <== NOT EXECUTED
ffc0f474 <IMFS_memfile_write>:
IMFS_jnode_t *the_jnode,
off_t start,
const unsigned char *source,
unsigned int length
)
{
ffc0f474: 94 21 ff c8 stwu r1,-56(r1)
ffc0f478: 7c 08 02 a6 mflr r0
ffc0f47c: bf 01 00 18 stmw r24,24(r1)
ffc0f480: 7c dd 33 78 mr r29,r6
ffc0f484: 7d 1c 43 78 mr r28,r8
ffc0f488: 90 01 00 3c stw r0,60(r1)
/*
* 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;
ffc0f48c: 7c c8 32 14 add r6,r8,r6
if ( last_byte > the_jnode->info.file.size ) {
ffc0f490: 39 00 00 00 li r8,0
ffc0f494: 81 43 00 50 lwz r10,80(r3)
IMFS_jnode_t *the_jnode,
off_t start,
const unsigned char *source,
unsigned int length
)
{
ffc0f498: 7c 7e 1b 78 mr r30,r3
ffc0f49c: 7c ba 2b 78 mr r26,r5
* If the last byte we are supposed to write is past the end of this
* in memory file, then extend the length.
*/
last_byte = start + my_length;
if ( last_byte > the_jnode->info.file.size ) {
ffc0f4a0: 81 23 00 54 lwz r9,84(r3)
ffc0f4a4: 7f 88 50 00 cmpw cr7,r8,r10
IMFS_jnode_t *the_jnode,
off_t start,
const unsigned char *source,
unsigned int length
)
{
ffc0f4a8: 7c fb 3b 78 mr r27,r7
* If the last byte we are supposed to write is past the end of this
* in memory file, then extend the length.
*/
last_byte = start + my_length;
if ( last_byte > the_jnode->info.file.size ) {
ffc0f4ac: 41 9d 00 5c bgt- cr7,ffc0f508 <IMFS_memfile_write+0x94> <== NEVER TAKEN
ffc0f4b0: 40 be 00 0c bne+ cr7,ffc0f4bc <IMFS_memfile_write+0x48> <== NEVER TAKEN
ffc0f4b4: 7f 86 48 40 cmplw cr7,r6,r9
ffc0f4b8: 41 9d 00 50 bgt- cr7,ffc0f508 <IMFS_memfile_write+0x94>
*/
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
ffc0f4bc: 3d 20 00 00 lis r9,0
ffc0f4c0: 83 e9 28 44 lwz r31,10308(r9)
ffc0f4c4: 7f a4 eb 78 mr r4,r29
ffc0f4c8: 7f 43 d3 78 mr r3,r26
ffc0f4cc: 7f f8 fe 70 srawi r24,r31,31
ffc0f4d0: 7f 05 c3 78 mr r5,r24
ffc0f4d4: 7f e6 fb 78 mr r6,r31
ffc0f4d8: 48 00 ad 81 bl ffc1a258 <__moddi3>
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
ffc0f4dc: 7f 43 d3 78 mr r3,r26
*/
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
ffc0f4e0: 7c 99 23 78 mr r25,r4
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
ffc0f4e4: 7f 05 c3 78 mr r5,r24
ffc0f4e8: 7f a4 eb 78 mr r4,r29
ffc0f4ec: 7f e6 fb 78 mr r6,r31
ffc0f4f0: 48 00 a9 45 bl ffc19e34 <__divdi3>
if ( start_offset ) {
ffc0f4f4: 2f 99 00 00 cmpwi cr7,r25,0
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
ffc0f4f8: 7c 9d 23 78 mr r29,r4
if ( start_offset ) {
ffc0f4fc: 40 9e 00 44 bne- cr7,ffc0f540 <IMFS_memfile_write+0xcc>
status = IMFS_memfile_extend( the_jnode, zero_fill, last_byte );
if ( status )
return status;
}
copied = 0;
ffc0f500: 3b e0 00 00 li r31,0
ffc0f504: 48 00 00 88 b ffc0f58c <IMFS_memfile_write+0x118>
* 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;
ffc0f508: 7f 9a 50 00 cmpw cr7,r26,r10
ffc0f50c: 38 80 00 01 li r4,1
ffc0f510: 41 9d 00 14 bgt- cr7,ffc0f524 <IMFS_memfile_write+0xb0> <== NEVER TAKEN
ffc0f514: 40 be 00 0c bne+ cr7,ffc0f520 <IMFS_memfile_write+0xac> <== NEVER TAKEN
ffc0f518: 7f 9d 48 40 cmplw cr7,r29,r9
ffc0f51c: 41 9d 00 08 bgt- cr7,ffc0f524 <IMFS_memfile_write+0xb0>
ffc0f520: 38 80 00 00 li r4,0
status = IMFS_memfile_extend( the_jnode, zero_fill, last_byte );
ffc0f524: 7f c3 f3 78 mr r3,r30
ffc0f528: 54 84 07 fe clrlwi r4,r4,31
ffc0f52c: 38 a0 00 00 li r5,0
ffc0f530: 4b ff fd a5 bl ffc0f2d4 <IMFS_memfile_extend>
if ( status )
ffc0f534: 7c 69 1b 79 mr. r9,r3
ffc0f538: 41 82 ff 84 beq+ ffc0f4bc <IMFS_memfile_write+0x48>
ffc0f53c: 48 00 00 fc b ffc0f638 <IMFS_memfile_write+0x1c4>
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
if ( start_offset ) {
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
ffc0f540: 7f f9 f8 50 subf r31,r25,r31
ffc0f544: 7f 9f e0 40 cmplw cr7,r31,r28
ffc0f548: 40 9d 00 08 ble- cr7,ffc0f550 <IMFS_memfile_write+0xdc>
ffc0f54c: 7f 9f e3 78 mr r31,r28
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
ffc0f550: 7f c3 f3 78 mr r3,r30
ffc0f554: 7f a4 eb 78 mr r4,r29
ffc0f558: 38 a0 00 00 li r5,0
ffc0f55c: 4b ff f6 d1 bl ffc0ec2c <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
return copied;
ffc0f560: 39 20 00 00 li r9,0
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 );
if ( !block_ptr )
ffc0f564: 2c 03 00 00 cmpwi r3,0
ffc0f568: 41 82 00 d0 beq- ffc0f638 <IMFS_memfile_write+0x1c4> <== NEVER TAKEN
block,
to_copy,
src
);
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
ffc0f56c: 80 63 00 00 lwz r3,0(r3)
ffc0f570: 7f 64 db 78 mr r4,r27
ffc0f574: 7f e5 fb 78 mr r5,r31
ffc0f578: 7c 63 ca 14 add r3,r3,r25
ffc0f57c: 48 00 1d 35 bl ffc112b0 <memcpy>
src += to_copy;
ffc0f580: 7f 7b fa 14 add r27,r27,r31
block++;
ffc0f584: 3b bd 00 01 addi r29,r29,1
my_length -= to_copy;
ffc0f588: 7f 9f e0 50 subf r28,r31,r28
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
ffc0f58c: 3d 20 00 00 lis r9,0
ffc0f590: 83 49 28 44 lwz r26,10308(r9)
* 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(
ffc0f594: 7f 7f d8 50 subf r27,r31,r27
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
ffc0f598: 7d 38 4b 78 mr r24,r9
ffc0f59c: 48 00 00 38 b ffc0f5d4 <IMFS_memfile_write+0x160>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
ffc0f5a0: 7f c3 f3 78 mr r3,r30
ffc0f5a4: 7f a4 eb 78 mr r4,r29
ffc0f5a8: 38 a0 00 00 li r5,0
ffc0f5ac: 4b ff f6 81 bl ffc0ec2c <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
ffc0f5b0: 2c 03 00 00 cmpwi r3,0
ffc0f5b4: 41 82 00 80 beq- ffc0f634 <IMFS_memfile_write+0x1c0> <== 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 );
ffc0f5b8: 80 63 00 00 lwz r3,0(r3)
ffc0f5bc: 7f 24 cb 78 mr r4,r25
ffc0f5c0: 7f 45 d3 78 mr r5,r26
ffc0f5c4: 48 00 1c ed bl ffc112b0 <memcpy>
src += to_copy;
block++;
ffc0f5c8: 3b bd 00 01 addi r29,r29,1
my_length -= to_copy;
ffc0f5cc: 7f 9a e0 50 subf r28,r26,r28
* 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(
ffc0f5d0: 7f ff d2 14 add r31,r31,r26
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
ffc0f5d4: 81 38 28 44 lwz r9,10308(r24)
* 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(
ffc0f5d8: 7f 3b fa 14 add r25,r27,r31
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
ffc0f5dc: 7f 9c 48 40 cmplw cr7,r28,r9
ffc0f5e0: 40 9c ff c0 bge+ cr7,ffc0f5a0 <IMFS_memfile_write+0x12c>
* 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 ) {
ffc0f5e4: 2f 9c 00 00 cmpwi cr7,r28,0
ffc0f5e8: 41 9e 00 34 beq- cr7,ffc0f61c <IMFS_memfile_write+0x1a8>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
ffc0f5ec: 7f c3 f3 78 mr r3,r30
ffc0f5f0: 7f a4 eb 78 mr r4,r29
ffc0f5f4: 38 a0 00 00 li r5,0
ffc0f5f8: 4b ff f6 35 bl ffc0ec2c <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
ffc0f5fc: 7f e9 fb 78 mr r9,r31
ffc0f600: 2c 03 00 00 cmpwi r3,0
ffc0f604: 41 82 00 34 beq- ffc0f638 <IMFS_memfile_write+0x1c4> <== 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 );
ffc0f608: 80 63 00 00 lwz r3,0(r3)
ffc0f60c: 7f 24 cb 78 mr r4,r25
ffc0f610: 7f 85 e3 78 mr r5,r28
ffc0f614: 48 00 1c 9d bl ffc112b0 <memcpy>
my_length = 0;
copied += to_copy;
ffc0f618: 7f ff e2 14 add r31,r31,r28
}
IMFS_mtime_ctime_update( the_jnode );
ffc0f61c: 38 61 00 08 addi r3,r1,8
ffc0f620: 38 80 00 00 li r4,0
ffc0f624: 4b ff 50 09 bl ffc0462c <gettimeofday>
ffc0f628: 81 21 00 08 lwz r9,8(r1)
ffc0f62c: 91 3e 00 44 stw r9,68(r30)
ffc0f630: 91 3e 00 48 stw r9,72(r30)
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
ffc0f634: 7f e9 fb 78 mr r9,r31
}
IMFS_mtime_ctime_update( the_jnode );
return copied;
}
ffc0f638: 39 61 00 38 addi r11,r1,56
ffc0f63c: 7d 23 4b 78 mr r3,r9
ffc0f640: 4b ff 0f 68 b ffc005a8 <_restgpr_24_x>
ffc03c4c <IMFS_mknod>:
dev_t dev,
IMFS_jnode_types_t *type,
IMFS_types_union *info
)
{
if ( S_ISDIR( mode ) ) {
ffc03c4c: 54 c9 04 26 rlwinm r9,r6,0,16,19
const char *name,
size_t namelen,
mode_t mode,
dev_t dev
)
{
ffc03c50: 7c 08 02 a6 mflr r0
dev_t dev,
IMFS_jnode_types_t *type,
IMFS_types_union *info
)
{
if ( S_ISDIR( mode ) ) {
ffc03c54: 2f 89 40 00 cmpwi cr7,r9,16384
const char *name,
size_t namelen,
mode_t mode,
dev_t dev
)
{
ffc03c58: 7c 2b 0b 78 mr r11,r1
ffc03c5c: 94 21 ff d0 stwu r1,-48(r1)
ffc03c60: 7c 8c 23 78 mr r12,r4
ffc03c64: 48 01 71 59 bl ffc1adbc <_savegpr_31>
ffc03c68: 90 01 00 34 stw r0,52(r1)
ffc03c6c: 7c 7f 1b 78 mr r31,r3
ffc03c70: 7c a0 2b 78 mr r0,r5
ffc03c74: 7c cb 33 78 mr r11,r6
dev_t dev,
IMFS_jnode_types_t *type,
IMFS_types_union *info
)
{
if ( S_ISDIR( mode ) ) {
ffc03c78: 41 9e 00 3c beq- cr7,ffc03cb4 <IMFS_mknod+0x68>
*type = IMFS_DIRECTORY;
} else if ( S_ISREG( mode ) ) {
ffc03c7c: 6d 26 ff ff xoris r6,r9,65535
ffc03c80: 2f 86 80 00 cmpwi cr7,r6,-32768
ffc03c84: 41 9e 00 38 beq- cr7,ffc03cbc <IMFS_mknod+0x70>
*type = IMFS_MEMORY_FILE;
} else if ( S_ISBLK( mode ) || S_ISCHR( mode ) ) {
ffc03c88: 2f 89 60 00 cmpwi cr7,r9,24576
ffc03c8c: 41 9e 00 0c beq- cr7,ffc03c98 <IMFS_mknod+0x4c>
ffc03c90: 2f 89 20 00 cmpwi cr7,r9,8192
ffc03c94: 40 be 00 14 bne+ cr7,ffc03ca8 <IMFS_mknod+0x5c>
*type = IMFS_DEVICE;
rtems_filesystem_split_dev_t(
ffc03c98: 90 e1 00 08 stw r7,8(r1)
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;
ffc03c9c: 39 40 00 01 li r10,1
rtems_filesystem_split_dev_t(
ffc03ca0: 91 01 00 0c stw r8,12(r1)
ffc03ca4: 48 00 00 24 b ffc03cc8 <IMFS_mknod+0x7c>
dev,
info->device.major,
info->device.minor
);
} else if (S_ISFIFO( mode )) {
ffc03ca8: 2f 89 10 00 cmpwi cr7,r9,4096
ffc03cac: 40 be 00 1c bne+ cr7,ffc03cc8 <IMFS_mknod+0x7c> <== NEVER TAKEN
ffc03cb0: 48 00 00 14 b ffc03cc4 <IMFS_mknod+0x78>
IMFS_jnode_types_t *type,
IMFS_types_union *info
)
{
if ( S_ISDIR( mode ) ) {
*type = IMFS_DIRECTORY;
ffc03cb4: 39 40 00 00 li r10,0
ffc03cb8: 48 00 00 10 b ffc03cc8 <IMFS_mknod+0x7c>
} else if ( S_ISREG( mode ) ) {
*type = IMFS_MEMORY_FILE;
ffc03cbc: 39 40 00 04 li r10,4
ffc03cc0: 48 00 00 08 b ffc03cc8 <IMFS_mknod+0x7c>
dev,
info->device.major,
info->device.minor
);
} else if (S_ISFIFO( mode )) {
*type = IMFS_FIFO;
ffc03cc4: 39 40 00 06 li r10,6
size_t namelen,
mode_t mode,
const IMFS_types_union *info
)
{
const IMFS_fs_info_t *fs_info =
ffc03cc8: 81 3f 00 14 lwz r9,20(r31)
(const IMFS_fs_info_t *) parentloc->mt_entry->fs_info;
return IMFS_create_node_with_control(
ffc03ccc: 55 4a 10 3a rlwinm r10,r10,2,0,29
ffc03cd0: 7f e3 fb 78 mr r3,r31
ffc03cd4: 81 29 00 08 lwz r9,8(r9)
ffc03cd8: 7d 85 63 78 mr r5,r12
ffc03cdc: 7c 06 03 78 mr r6,r0
ffc03ce0: 7d 49 52 14 add r10,r9,r10
ffc03ce4: 80 8a 00 08 lwz r4,8(r10)
ffc03ce8: 7d 67 5b 78 mr r7,r11
ffc03cec: 39 01 00 08 addi r8,r1,8
ffc03cf0: 48 00 89 fd bl ffc0c6ec <IMFS_create_node_with_control>
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 );
if ( new_node != NULL ) {
ffc03cf4: 2f 83 00 00 cmpwi cr7,r3,0
ffc03cf8: 41 9e 00 38 beq- cr7,ffc03d30 <IMFS_mknod+0xe4>
IMFS_jnode_t *parent = parentloc->node_access;
IMFS_update_ctime( parent );
ffc03cfc: 38 80 00 00 li r4,0
get_type_and_info_by_mode_and_dev( mode, dev, &type, &info );
new_node = IMFS_create_node( parentloc, type, name, namelen, mode, &info );
if ( new_node != NULL ) {
IMFS_jnode_t *parent = parentloc->node_access;
ffc03d00: 83 ff 00 08 lwz r31,8(r31)
IMFS_update_ctime( parent );
ffc03d04: 38 61 00 20 addi r3,r1,32
ffc03d08: 48 00 09 25 bl ffc0462c <gettimeofday>
ffc03d0c: 81 21 00 20 lwz r9,32(r1)
IMFS_update_mtime( parent );
ffc03d10: 38 61 00 20 addi r3,r1,32
new_node = IMFS_create_node( parentloc, type, name, namelen, mode, &info );
if ( new_node != NULL ) {
IMFS_jnode_t *parent = parentloc->node_access;
IMFS_update_ctime( parent );
ffc03d14: 91 3f 00 48 stw r9,72(r31)
IMFS_update_mtime( parent );
ffc03d18: 38 80 00 00 li r4,0
ffc03d1c: 48 00 09 11 bl ffc0462c <gettimeofday>
ffc03d20: 81 21 00 20 lwz r9,32(r1)
size_t namelen,
mode_t mode,
dev_t dev
)
{
int rv = 0;
ffc03d24: 38 60 00 00 li r3,0
new_node = IMFS_create_node( parentloc, type, name, namelen, mode, &info );
if ( new_node != NULL ) {
IMFS_jnode_t *parent = parentloc->node_access;
IMFS_update_ctime( parent );
IMFS_update_mtime( parent );
ffc03d28: 91 3f 00 44 stw r9,68(r31)
ffc03d2c: 48 00 00 08 b ffc03d34 <IMFS_mknod+0xe8>
} else {
rv = -1;
ffc03d30: 38 60 ff ff li r3,-1
}
return rv;
}
ffc03d34: 39 61 00 30 addi r11,r1,48
ffc03d38: 4b ff c8 8c b ffc005c4 <_restgpr_31_x>
ffc03d3c <IMFS_mount>:
#endif
#include "imfs.h"
int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry )
{
ffc03d3c: 94 21 ff f8 stwu r1,-8(r1)
ffc03d40: 7c 08 02 a6 mflr r0
ffc03d44: 90 01 00 0c stw r0,12(r1)
int rv = 0;
IMFS_jnode_t *node = mt_entry->mt_point_node->location.node_access;
ffc03d48: 81 23 00 20 lwz r9,32(r3)
ffc03d4c: 81 29 00 08 lwz r9,8(r9)
return node->control->imfs_type;
}
static inline bool IMFS_is_directory( const IMFS_jnode_t *node )
{
return node->control->imfs_type == IMFS_DIRECTORY;
ffc03d50: 81 49 00 4c lwz r10,76(r9)
if ( IMFS_is_directory( node ) ) {
ffc03d54: 81 4a 00 00 lwz r10,0(r10)
ffc03d58: 2f 8a 00 00 cmpwi cr7,r10,0
ffc03d5c: 40 9e 00 28 bne- cr7,ffc03d84 <IMFS_mount+0x48>
if ( node->info.directory.mt_fs == NULL ) {
ffc03d60: 81 49 00 5c lwz r10,92(r9)
ffc03d64: 2f 8a 00 00 cmpwi cr7,r10,0
ffc03d68: 40 9e 00 10 bne- cr7,ffc03d78 <IMFS_mount+0x3c> <== NEVER TAKEN
node->info.directory.mt_fs = mt_entry;
ffc03d6c: 90 69 00 5c stw r3,92(r9)
#include "imfs.h"
int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry )
{
int rv = 0;
ffc03d70: 38 60 00 00 li r3,0
ffc03d74: 48 00 00 20 b ffc03d94 <IMFS_mount+0x58>
if ( IMFS_is_directory( node ) ) {
if ( node->info.directory.mt_fs == NULL ) {
node->info.directory.mt_fs = mt_entry;
} else {
errno = EBUSY;
ffc03d78: 48 00 c8 35 bl ffc105ac <__errno> <== NOT EXECUTED
ffc03d7c: 39 20 00 10 li r9,16 <== NOT EXECUTED
ffc03d80: 48 00 00 0c b ffc03d8c <IMFS_mount+0x50> <== NOT EXECUTED
rv = -1;
}
} else {
errno = ENOTDIR;
ffc03d84: 48 00 c8 29 bl ffc105ac <__errno>
ffc03d88: 39 20 00 14 li r9,20
ffc03d8c: 91 23 00 00 stw r9,0(r3)
rv = -1;
ffc03d90: 38 60 ff ff li r3,-1
}
return rv;
}
ffc03d94: 80 01 00 0c lwz r0,12(r1)
ffc03d98: 38 21 00 08 addi r1,r1,8
ffc03d9c: 7c 08 03 a6 mtlr r0
ffc03da0: 4e 80 00 20 blr
ffc0cb1c <IMFS_node_remove_directory>:
}
static IMFS_jnode_t *IMFS_node_remove_directory(
IMFS_jnode_t *node
)
{
ffc0cb1c: 94 21 ff f8 stwu r1,-8(r1)
ffc0cb20: 7c 08 02 a6 mflr r0
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
ffc0cb24: 39 43 00 54 addi r10,r3,84
ffc0cb28: 90 01 00 0c stw r0,12(r1)
if ( !rtems_chain_is_empty( &node->info.directory.Entries ) ) {
ffc0cb2c: 81 23 00 50 lwz r9,80(r3)
ffc0cb30: 7f 89 50 00 cmpw cr7,r9,r10
ffc0cb34: 41 be 00 10 beq+ cr7,ffc0cb44 <IMFS_node_remove_directory+0x28>
errno = ENOTEMPTY;
ffc0cb38: 48 00 3a 75 bl ffc105ac <__errno>
ffc0cb3c: 39 20 00 5a li r9,90
ffc0cb40: 48 00 00 18 b ffc0cb58 <IMFS_node_remove_directory+0x3c>
node = NULL;
} else if ( IMFS_is_mount_point( node ) ) {
ffc0cb44: 81 23 00 5c lwz r9,92(r3)
ffc0cb48: 2f 89 00 00 cmpwi cr7,r9,0
ffc0cb4c: 41 be 00 14 beq+ cr7,ffc0cb60 <IMFS_node_remove_directory+0x44><== ALWAYS TAKEN
errno = EBUSY;
ffc0cb50: 48 00 3a 5d bl ffc105ac <__errno> <== NOT EXECUTED
ffc0cb54: 39 20 00 10 li r9,16 <== NOT EXECUTED
ffc0cb58: 91 23 00 00 stw r9,0(r3)
ffc0cb5c: 38 60 00 00 li r3,0
node = NULL;
}
return node;
}
ffc0cb60: 80 01 00 0c lwz r0,12(r1)
ffc0cb64: 38 21 00 08 addi r1,r1,8
ffc0cb68: 7c 08 03 a6 mtlr r0
ffc0cb6c: 4e 80 00 20 blr
ffc03da4 <IMFS_node_type>:
rtems_filesystem_node_types_t IMFS_node_type(
const rtems_filesystem_location_info_t *loc
)
{
const IMFS_jnode_t *node = loc->node_access;
ffc03da4: 81 43 00 08 lwz r10,8(r3)
rtems_chain_extract_unprotected( &node->Node );
}
static inline IMFS_jnode_types_t IMFS_type( const IMFS_jnode_t *node )
{
return node->control->imfs_type;
ffc03da8: 81 2a 00 4c lwz r9,76(r10)
ffc03dac: 81 29 00 00 lwz r9,0(r9)
IMFS_jnode_types_t imfs_type = IMFS_type( node );
rtems_filesystem_node_types_t type;
switch ( imfs_type ) {
ffc03db0: 2f 89 00 02 cmpwi cr7,r9,2
ffc03db4: 41 9e 00 14 beq- cr7,ffc03dc8 <IMFS_node_type+0x24>
ffc03db8: 2f 89 00 05 cmpwi cr7,r9,5
case IMFS_HARD_LINK:
type = IMFS_type( node->info.hard_link.link_node );
break;
case IMFS_LINEAR_FILE:
type = RTEMS_FILESYSTEM_MEMORY_FILE;
ffc03dbc: 38 60 00 04 li r3,4
{
const IMFS_jnode_t *node = loc->node_access;
IMFS_jnode_types_t imfs_type = IMFS_type( node );
rtems_filesystem_node_types_t type;
switch ( imfs_type ) {
ffc03dc0: 40 be 00 18 bne+ cr7,ffc03dd8 <IMFS_node_type+0x34> <== ALWAYS TAKEN
ffc03dc4: 4e 80 00 20 blr <== NOT EXECUTED
type = imfs_type;
break;
}
return type;
}
ffc03dc8: 81 2a 00 50 lwz r9,80(r10)
ffc03dcc: 81 29 00 4c lwz r9,76(r9)
ffc03dd0: 80 69 00 00 lwz r3,0(r9)
rtems_filesystem_node_types_t type;
switch ( imfs_type ) {
case IMFS_HARD_LINK:
type = IMFS_type( node->info.hard_link.link_node );
break;
ffc03dd4: 4e 80 00 20 blr
ffc03dd8: 7d 23 4b 78 mr r3,r9
type = imfs_type;
break;
}
return type;
}
ffc03ddc: 4e 80 00 20 blr
ffc03e14 <IMFS_rename>:
const rtems_filesystem_location_info_t *oldloc,
const rtems_filesystem_location_info_t *newparentloc,
const char *name,
size_t namelen
)
{
ffc03e14: 94 21 ff d8 stwu r1,-40(r1)
ffc03e18: 7c 08 02 a6 mflr r0
ffc03e1c: 90 01 00 2c stw r0,44(r1)
ffc03e20: bf a1 00 1c stmw r29,28(r1)
int rv = 0;
IMFS_jnode_t *node = oldloc->node_access;
ffc03e24: 83 e4 00 08 lwz r31,8(r4)
IMFS_jnode_t *new_parent = newparentloc->node_access;
ffc03e28: 83 c5 00 08 lwz r30,8(r5)
/*
* FIXME: Due to insufficient checks we can create inaccessible nodes with
* this operation.
*/
if ( node->Parent != NULL ) {
ffc03e2c: 81 3f 00 08 lwz r9,8(r31)
ffc03e30: 2f 89 00 00 cmpwi cr7,r9,0
ffc03e34: 41 9e 00 80 beq- cr7,ffc03eb4 <IMFS_rename+0xa0> <== NEVER TAKEN
if ( namelen < IMFS_NAME_MAX ) {
ffc03e38: 2b 87 00 1f cmplwi cr7,r7,31
ffc03e3c: 7c fd 3b 78 mr r29,r7
ffc03e40: 41 9d 00 68 bgt- cr7,ffc03ea8 <IMFS_rename+0x94> <== NEVER TAKEN
memcpy( node->name, name, namelen );
ffc03e44: 7c c4 33 78 mr r4,r6
ffc03e48: 7c e5 3b 78 mr r5,r7
ffc03e4c: 38 7f 00 0c addi r3,r31,12
ffc03e50: 48 00 d4 61 bl ffc112b0 <memcpy>
node->name [namelen] = '\0';
ffc03e54: 7f bf ea 14 add r29,r31,r29
ffc03e58: 39 20 00 00 li r9,0
ffc03e5c: 99 3d 00 0c stb r9,12(r29)
IMFS_remove_from_directory( node );
IMFS_add_to_directory( new_parent, node );
IMFS_update_ctime( node );
ffc03e60: 38 61 00 08 addi r3,r1,8
ffc03e64: 38 80 00 00 li r4,0
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
ffc03e68: 81 3f 00 00 lwz r9,0(r31)
previous = the_node->previous;
ffc03e6c: 81 5f 00 04 lwz r10,4(r31)
next->previous = previous;
ffc03e70: 91 49 00 04 stw r10,4(r9)
previous->next = next;
ffc03e74: 91 2a 00 00 stw r9,0(r10)
RTEMS_INLINE_ROUTINE void _Chain_Append_unprotected(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
ffc03e78: 39 5e 00 54 addi r10,r30,84
Chain_Node *old_last = tail->previous;
ffc03e7c: 81 3e 00 58 lwz r9,88(r30)
static inline void IMFS_add_to_directory(
IMFS_jnode_t *dir,
IMFS_jnode_t *node
)
{
node->Parent = dir;
ffc03e80: 93 df 00 08 stw r30,8(r31)
the_node->next = tail;
ffc03e84: 91 5f 00 00 stw r10,0(r31)
tail->previous = the_node;
ffc03e88: 93 fe 00 58 stw r31,88(r30)
old_last->next = the_node;
ffc03e8c: 93 e9 00 00 stw r31,0(r9)
the_node->previous = old_last;
ffc03e90: 91 3f 00 04 stw r9,4(r31)
ffc03e94: 48 00 07 99 bl ffc0462c <gettimeofday>
ffc03e98: 81 21 00 08 lwz r9,8(r1)
const rtems_filesystem_location_info_t *newparentloc,
const char *name,
size_t namelen
)
{
int rv = 0;
ffc03e9c: 38 60 00 00 li r3,0
memcpy( node->name, name, namelen );
node->name [namelen] = '\0';
IMFS_remove_from_directory( node );
IMFS_add_to_directory( new_parent, node );
IMFS_update_ctime( node );
ffc03ea0: 91 3f 00 48 stw r9,72(r31)
ffc03ea4: 48 00 00 20 b ffc03ec4 <IMFS_rename+0xb0>
} else {
errno = ENAMETOOLONG;
ffc03ea8: 48 00 c7 05 bl ffc105ac <__errno> <== NOT EXECUTED
ffc03eac: 39 20 00 5b li r9,91 <== NOT EXECUTED
ffc03eb0: 48 00 00 0c b ffc03ebc <IMFS_rename+0xa8> <== NOT EXECUTED
rv = -1;
}
} else {
errno = EINVAL;
ffc03eb4: 48 00 c6 f9 bl ffc105ac <__errno> <== NOT EXECUTED
ffc03eb8: 39 20 00 16 li r9,22 <== NOT EXECUTED
ffc03ebc: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED
rv = -1;
ffc03ec0: 38 60 ff ff li r3,-1 <== NOT EXECUTED
}
return rv;
}
ffc03ec4: 39 61 00 28 addi r11,r1,40
ffc03ec8: 4b ff c6 f4 b ffc005bc <_restgpr_29_x>
ffc03fd4 <IMFS_unmount>:
#endif
#include "imfs.h"
int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry )
{
ffc03fd4: 94 21 ff f8 stwu r1,-8(r1)
ffc03fd8: 7c 08 02 a6 mflr r0
ffc03fdc: 90 01 00 0c stw r0,12(r1)
int rv = 0;
IMFS_jnode_t *node = mt_entry->mt_point_node->location.node_access;
ffc03fe0: 81 23 00 20 lwz r9,32(r3)
ffc03fe4: 81 29 00 08 lwz r9,8(r9)
return node->control->imfs_type;
}
static inline bool IMFS_is_directory( const IMFS_jnode_t *node )
{
return node->control->imfs_type == IMFS_DIRECTORY;
ffc03fe8: 81 49 00 4c lwz r10,76(r9)
if ( IMFS_is_directory( node ) ) {
ffc03fec: 81 4a 00 00 lwz r10,0(r10)
ffc03ff0: 2f 8a 00 00 cmpwi cr7,r10,0
ffc03ff4: 40 9e 00 28 bne- cr7,ffc0401c <IMFS_unmount+0x48> <== NEVER TAKEN
if ( node->info.directory.mt_fs == mt_entry ) {
ffc03ff8: 81 09 00 5c lwz r8,92(r9)
ffc03ffc: 7f 88 18 00 cmpw cr7,r8,r3
ffc04000: 40 9e 00 10 bne- cr7,ffc04010 <IMFS_unmount+0x3c> <== NEVER TAKEN
node->info.directory.mt_fs = NULL;
ffc04004: 91 49 00 5c stw r10,92(r9)
#include "imfs.h"
int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry )
{
int rv = 0;
ffc04008: 38 60 00 00 li r3,0
ffc0400c: 48 00 00 20 b ffc0402c <IMFS_unmount+0x58>
if ( IMFS_is_directory( node ) ) {
if ( node->info.directory.mt_fs == mt_entry ) {
node->info.directory.mt_fs = NULL;
} else {
errno = EINVAL;
ffc04010: 48 00 c5 9d bl ffc105ac <__errno> <== NOT EXECUTED
ffc04014: 39 20 00 16 li r9,22 <== NOT EXECUTED
ffc04018: 48 00 00 0c b ffc04024 <IMFS_unmount+0x50> <== NOT EXECUTED
rv = -1;
}
} else {
errno = ENOTDIR;
ffc0401c: 48 00 c5 91 bl ffc105ac <__errno> <== NOT EXECUTED
ffc04020: 39 20 00 14 li r9,20 <== NOT EXECUTED
ffc04024: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED
rv = -1;
ffc04028: 38 60 ff ff li r3,-1 <== NOT EXECUTED
}
return rv;
}
ffc0402c: 80 01 00 0c lwz r0,12(r1)
ffc04030: 38 21 00 08 addi r1,r1,8
ffc04034: 7c 08 03 a6 mtlr r0
ffc04038: 4e 80 00 20 blr
ffc04824 <RTEMS_Malloc_Initialize>:
void RTEMS_Malloc_Initialize(
const Heap_Area *areas,
size_t area_count,
Heap_Initialization_or_extend_handler extend
)
{
ffc04824: 94 21 ff e0 stwu r1,-32(r1)
Heap_Control *heap = RTEMS_Malloc_Heap;
ffc04828: 3d 20 00 00 lis r9,0
void RTEMS_Malloc_Initialize(
const Heap_Area *areas,
size_t area_count,
Heap_Initialization_or_extend_handler extend
)
{
ffc0482c: 7c 08 02 a6 mflr r0
ffc04830: bf 41 00 08 stmw r26,8(r1)
Heap_Control *heap = RTEMS_Malloc_Heap;
ffc04834: 83 89 27 90 lwz r28,10128(r9)
if ( !rtems_configuration_get_unified_work_area() ) {
ffc04838: 3d 20 ff c2 lis r9,-62
ffc0483c: 89 29 bf c9 lbz r9,-16439(r9)
void RTEMS_Malloc_Initialize(
const Heap_Area *areas,
size_t area_count,
Heap_Initialization_or_extend_handler extend
)
{
ffc04840: 90 01 00 24 stw r0,36(r1)
Heap_Control *heap = RTEMS_Malloc_Heap;
if ( !rtems_configuration_get_unified_work_area() ) {
ffc04844: 2f 89 00 00 cmpwi cr7,r9,0
ffc04848: 40 9e 00 74 bne- cr7,ffc048bc <RTEMS_Malloc_Initialize+0x98>
ffc0484c: 3f c0 ff c1 lis r30,-63
ffc04850: 7c 9b 23 78 mr r27,r4
ffc04854: 7c ba 2b 78 mr r26,r5
ffc04858: 7c 7f 1b 78 mr r31,r3
ffc0485c: 3b a0 00 00 li r29,0
ffc04860: 3b de 9b 50 addi r30,r30,-25776
ffc04864: 48 00 00 30 b ffc04894 <RTEMS_Malloc_Initialize+0x70>
uintptr_t page_size = CPU_HEAP_ALIGNMENT;
size_t i;
for (i = 0; i < area_count; ++i) {
const Heap_Area *area = &areas [i];
uintptr_t space_available = (*init_or_extend)(
ffc04868: 7f 83 e3 78 mr r3,r28
ffc0486c: 80 9f 00 00 lwz r4,0(r31)
ffc04870: 80 bf 00 04 lwz r5,4(r31)
ffc04874: 38 c0 00 08 li r6,8
ffc04878: 7f c9 03 a6 mtctr r30
ffc0487c: 4e 80 04 21 bctrl
area->begin,
area->size,
page_size
);
if ( space_available > 0 ) {
ffc04880: 2f 83 00 00 cmpwi cr7,r3,0
ffc04884: 41 9e 00 08 beq- cr7,ffc0488c <RTEMS_Malloc_Initialize+0x68><== NEVER TAKEN
init_or_extend = extend;
ffc04888: 7f 5e d3 78 mr r30,r26
if ( !rtems_configuration_get_unified_work_area() ) {
Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize;
uintptr_t page_size = CPU_HEAP_ALIGNMENT;
size_t i;
for (i = 0; i < area_count; ++i) {
ffc0488c: 3b bd 00 01 addi r29,r29,1
ffc04890: 3b ff 00 08 addi r31,r31,8
ffc04894: 7f 9d d8 00 cmpw cr7,r29,r27
ffc04898: 40 9e ff d0 bne+ cr7,ffc04868 <RTEMS_Malloc_Initialize+0x44>
if ( space_available > 0 ) {
init_or_extend = extend;
}
}
if ( init_or_extend == _Heap_Initialize ) {
ffc0489c: 3d 20 ff c1 lis r9,-63
ffc048a0: 39 29 9b 50 addi r9,r9,-25776
ffc048a4: 7f 9e 48 00 cmpw cr7,r30,r9
ffc048a8: 40 be 00 14 bne+ cr7,ffc048bc <RTEMS_Malloc_Initialize+0x98>
_Internal_error_Occurred(
ffc048ac: 38 60 00 00 li r3,0
ffc048b0: 38 80 00 01 li r4,1
ffc048b4: 38 a0 00 17 li r5,23
ffc048b8: 48 00 55 19 bl ffc09dd0 <_Internal_error_Occurred>
}
/*
* If configured, initialize the statistics support
*/
if ( rtems_malloc_statistics_helpers != NULL ) {
ffc048bc: 3d 20 00 00 lis r9,0
ffc048c0: 81 29 28 08 lwz r9,10248(r9)
ffc048c4: 2f 89 00 00 cmpwi cr7,r9,0
ffc048c8: 41 9e 00 10 beq- cr7,ffc048d8 <RTEMS_Malloc_Initialize+0xb4>
(*rtems_malloc_statistics_helpers->initialize)();
ffc048cc: 81 29 00 00 lwz r9,0(r9)
ffc048d0: 7d 29 03 a6 mtctr r9
ffc048d4: 4e 80 04 21 bctrl
}
MSBUMP( space_available, _Protected_heap_Get_size( heap ) );
ffc048d8: 3f e0 00 00 lis r31,0
ffc048dc: 83 df 2b 98 lwz r30,11160(r31)
ffc048e0: 7f 83 e3 78 mr r3,r28
ffc048e4: 48 00 5d e1 bl ffc0a6c4 <_Protected_heap_Get_size>
ffc048e8: 7c 63 f2 14 add r3,r3,r30
}
ffc048ec: 39 61 00 20 addi r11,r1,32
*/
if ( rtems_malloc_statistics_helpers != NULL ) {
(*rtems_malloc_statistics_helpers->initialize)();
}
MSBUMP( space_available, _Protected_heap_Get_size( heap ) );
ffc048f0: 90 7f 2b 98 stw r3,11160(r31)
}
ffc048f4: 4b ff bc bc b ffc005b0 <_restgpr_26_x>
ffc23384 <Stack_check_Dump_threads_usage>:
static rtems_printk_plugin_t print_handler;
static void Stack_check_Dump_threads_usage(
Thread_Control *the_thread
)
{
ffc23384: 94 21 ff c0 stwu r1,-64(r1)
ffc23388: 7c 08 02 a6 mflr r0
current = 0;
} else
#endif
{
stack = &the_thread->Start.Initial_stack;
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
ffc2338c: 39 23 00 c4 addi r9,r3,196
static rtems_printk_plugin_t print_handler;
static void Stack_check_Dump_threads_usage(
Thread_Control *the_thread
)
{
ffc23390: 90 01 00 44 stw r0,68(r1)
{
uintptr_t clsz = PPC_DEFAULT_CACHE_LINE_SIZE;
uintptr_t mask = clsz - 1;
uintptr_t addr = (uintptr_t) context;
return (ppc_context *) ((addr & ~mask) + clsz);
ffc23394: 55 29 00 34 rlwinm r9,r9,0,0,26
* match pattern
*/
base += PATTERN_SIZE_WORDS;
for (ebase = base + length; base < ebase; base++)
if (*base != U32_PATTERN)
ffc23398: 3c c0 a5 a5 lis r6,-23131
static rtems_printk_plugin_t print_handler;
static void Stack_check_Dump_threads_usage(
Thread_Control *the_thread
)
{
ffc2339c: be e1 00 1c stmw r23,28(r1)
* match pattern
*/
base += PATTERN_SIZE_WORDS;
for (ebase = base + length; base < ebase; base++)
if (*base != U32_PATTERN)
ffc233a0: 60 c6 a5 a5 ori r6,r6,42405
static rtems_printk_plugin_t print_handler;
static void Stack_check_Dump_threads_usage(
Thread_Control *the_thread
)
{
ffc233a4: 7c 7f 1b 78 mr r31,r3
stack = &the_thread->Start.Initial_stack;
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
}
low = Stack_check_usable_stack_start(stack);
size = Stack_check_usable_stack_size(stack);
ffc233a8: 83 63 00 b4 lwz r27,180(r3)
current = 0;
} else
#endif
{
stack = &the_thread->Start.Initial_stack;
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
ffc233ac: 83 29 00 20 lwz r25,32(r9)
}
low = Stack_check_usable_stack_start(stack);
ffc233b0: 81 23 00 b8 lwz r9,184(r3)
size = Stack_check_usable_stack_size(stack);
ffc233b4: 3b 7b ff 80 addi r27,r27,-128
* start at lower memory and find first word that does not
* match pattern
*/
base += PATTERN_SIZE_WORDS;
for (ebase = base + length; base < ebase; base++)
ffc233b8: 57 67 00 3a rlwinm r7,r27,0,0,29
{
stack = &the_thread->Start.Initial_stack;
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
}
low = Stack_check_usable_stack_start(stack);
ffc233bc: 39 09 00 80 addi r8,r9,128
/*
* start at lower memory and find first word that does not
* match pattern
*/
base += PATTERN_SIZE_WORDS;
ffc233c0: 39 29 01 00 addi r9,r9,256
for (ebase = base + length; base < ebase; base++)
ffc233c4: 7c e9 3a 14 add r7,r9,r7
ffc233c8: 48 00 00 14 b ffc233dc <Stack_check_Dump_threads_usage+0x58>
if (*base != U32_PATTERN)
ffc233cc: 81 49 00 00 lwz r10,0(r9)
ffc233d0: 7f 8a 30 00 cmpw cr7,r10,r6
ffc233d4: 40 9e 00 18 bne- cr7,ffc233ec <Stack_check_Dump_threads_usage+0x68>
* start at lower memory and find first word that does not
* match pattern
*/
base += PATTERN_SIZE_WORDS;
for (ebase = base + length; base < ebase; base++)
ffc233d8: 39 29 00 04 addi r9,r9,4
ffc233dc: 7f 89 38 40 cmplw cr7,r9,r7
ffc233e0: 41 9c ff ec blt+ cr7,ffc233cc <Stack_check_Dump_threads_usage+0x48><== ALWAYS TAKEN
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;
ffc233e4: 3b 80 00 00 li r28,0 <== NOT EXECUTED
ffc233e8: 48 00 00 18 b ffc23400 <Stack_check_Dump_threads_usage+0x7c><== 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 )
ffc233ec: 2f 89 00 00 cmpwi cr7,r9,0
used = Stack_check_Calculate_used( low, size, high_water_mark );
else
used = 0;
ffc233f0: 3b 80 00 00 li r28,0
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 )
ffc233f4: 41 9e 00 0c beq- cr7,ffc23400 <Stack_check_Dump_threads_usage+0x7c><== NEVER TAKEN
used = Stack_check_Calculate_used( low, size, high_water_mark );
ffc233f8: 7f 88 da 14 add r28,r8,r27
ffc233fc: 7f 89 e0 50 subf r28,r9,r28
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if ( the_thread )
#endif
{
(*print_handler)(
ffc23400: 3f c0 00 00 lis r30,0
ffc23404: 83 5f 00 08 lwz r26,8(r31)
ffc23408: 3b be 5d 48 addi r29,r30,23880
ffc2340c: 83 1e 5d 48 lwz r24,23880(r30)
ffc23410: 82 fd 00 04 lwz r23,4(r29)
ffc23414: 38 80 00 05 li r4,5
ffc23418: 38 a1 00 08 addi r5,r1,8
ffc2341c: 7f 43 d3 78 mr r3,r26
ffc23420: 4b fe ca f9 bl ffc0ff18 <rtems_object_get_name>
ffc23424: 3c 80 ff c6 lis r4,-58
ffc23428: 7c 66 1b 78 mr r6,r3
ffc2342c: 7f 09 03 a6 mtctr r24
ffc23430: 38 84 ae 68 addi r4,r4,-20888
ffc23434: 7f 45 d3 78 mr r5,r26
ffc23438: 7e e3 bb 78 mr r3,r23
ffc2343c: 4c c6 31 82 crclr 4*cr1+eq
ffc23440: 4e 80 04 21 bctrl
(*print_handler)(
print_context,
" %010p - %010p %010p %8" PRId32 " ",
stack->area,
stack->area + stack->size - 1,
ffc23444: 80 df 00 b4 lwz r6,180(r31)
else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
}
#endif
(*print_handler)(
ffc23448: 81 3e 5d 48 lwz r9,23880(r30)
ffc2344c: 3c 80 ff c6 lis r4,-58
print_context,
" %010p - %010p %010p %8" PRId32 " ",
stack->area,
stack->area + stack->size - 1,
ffc23450: 80 bf 00 b8 lwz r5,184(r31)
ffc23454: 38 c6 ff ff addi r6,r6,-1
else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
}
#endif
(*print_handler)(
ffc23458: 7d 29 03 a6 mtctr r9
ffc2345c: 80 7d 00 04 lwz r3,4(r29)
ffc23460: 38 84 ae 75 addi r4,r4,-20875
ffc23464: 7c c5 32 14 add r6,r5,r6
ffc23468: 7f 27 cb 78 mr r7,r25
ffc2346c: 7f 68 db 78 mr r8,r27
ffc23470: 4c c6 31 82 crclr 4*cr1+eq
ffc23474: 4e 80 04 21 bctrl
stack->area + stack->size - 1,
current,
size
);
if (Stack_check_Initialized == 0) {
ffc23478: 81 3d 00 08 lwz r9,8(r29)
(*print_handler)( print_context, "Unavailable\n" );
ffc2347c: 80 7d 00 04 lwz r3,4(r29)
stack->area + stack->size - 1,
current,
size
);
if (Stack_check_Initialized == 0) {
ffc23480: 2f 89 00 00 cmpwi cr7,r9,0
(*print_handler)( print_context, "Unavailable\n" );
ffc23484: 81 3e 5d 48 lwz r9,23880(r30)
stack->area + stack->size - 1,
current,
size
);
if (Stack_check_Initialized == 0) {
ffc23488: 40 be 00 1c bne+ cr7,ffc234a4 <Stack_check_Dump_threads_usage+0x120><== ALWAYS TAKEN
(*print_handler)( print_context, "Unavailable\n" );
ffc2348c: 3c 80 ff c6 lis r4,-58 <== NOT EXECUTED
ffc23490: 7d 29 03 a6 mtctr r9 <== NOT EXECUTED
ffc23494: 38 84 ae 93 addi r4,r4,-20845 <== NOT EXECUTED
ffc23498: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc2349c: 4e 80 04 21 bctrl <== NOT EXECUTED
ffc234a0: 48 00 00 1c b ffc234bc <Stack_check_Dump_threads_usage+0x138><== NOT EXECUTED
} else {
(*print_handler)( print_context, "%8" PRId32 "\n", used );
ffc234a4: 3c 80 ff c6 lis r4,-58
ffc234a8: 7d 29 03 a6 mtctr r9
ffc234ac: 38 84 ae a0 addi r4,r4,-20832
ffc234b0: 7f 85 e3 78 mr r5,r28
ffc234b4: 4c c6 31 82 crclr 4*cr1+eq
ffc234b8: 4e 80 04 21 bctrl
}
}
ffc234bc: 39 61 00 40 addi r11,r1,64
ffc234c0: 48 03 10 2c b ffc544ec <_restgpr_23_x>
ffc23594 <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)
{
ffc23594: 94 21 ff c8 stwu r1,-56(r1)
ffc23598: 7c 08 02 a6 mflr r0
ffc2359c: 90 01 00 3c stw r0,60(r1)
ffc235a0: bf a1 00 2c stmw r29,44(r1)
ffc235a4: 7c 7f 1b 78 mr r31,r3
ffc235a8: 7c 9d 23 78 mr r29,r4
Stack_Control *stack = &running->Start.Initial_stack;
void *pattern_area = Stack_check_Get_pattern(stack);
ffc235ac: 83 c3 00 b8 lwz r30,184(r3)
char name[32];
printk("BLOWN STACK!!!\n");
ffc235b0: 3c 60 ff c6 lis r3,-58
ffc235b4: 38 63 ae a6 addi r3,r3,-20826
ffc235b8: 4c c6 31 82 crclr 4*cr1+eq
ffc235bc: 4b fe 17 e9 bl ffc04da4 <printk>
printk("task control block: 0x%08" PRIxPTR "\n", running);
ffc235c0: 3c 60 ff c6 lis r3,-58
ffc235c4: 38 63 ae b6 addi r3,r3,-20810
ffc235c8: 7f e4 fb 78 mr r4,r31
ffc235cc: 4c c6 31 82 crclr 4*cr1+eq
ffc235d0: 4b fe 17 d5 bl ffc04da4 <printk>
printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id);
ffc235d4: 80 9f 00 08 lwz r4,8(r31)
ffc235d8: 3c 60 ff c6 lis r3,-58
ffc235dc: 38 63 ae d2 addi r3,r3,-20782
ffc235e0: 4c c6 31 82 crclr 4*cr1+eq
ffc235e4: 4b fe 17 c1 bl ffc04da4 <printk>
printk(
ffc235e8: 80 9f 00 0c lwz r4,12(r31)
ffc235ec: 3c 60 ff c6 lis r3,-58
ffc235f0: 38 63 ae e4 addi r3,r3,-20764
ffc235f4: 4c c6 31 82 crclr 4*cr1+eq
ffc235f8: 4b fe 17 ad bl ffc04da4 <printk>
"task name: 0x%08" PRIx32 "\n",
running->Object.name.name_u32
);
printk(
ffc235fc: 80 7f 00 08 lwz r3,8(r31)
ffc23600: 38 a1 00 08 addi r5,r1,8
ffc23604: 38 80 00 20 li r4,32
ffc23608: 4b fe c9 11 bl ffc0ff18 <rtems_object_get_name>
ffc2360c: 7c 64 1b 78 mr r4,r3
ffc23610: 3c 60 ff c6 lis r3,-58
ffc23614: 38 63 ae f8 addi r3,r3,-20744
ffc23618: 4c c6 31 82 crclr 4*cr1+eq
ffc2361c: 4b fe 17 89 bl ffc04da4 <printk>
);
printk(
"task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n",
(unsigned long) stack->size,
stack->area,
((char *) stack->area + stack->size)
ffc23620: 80 bf 00 b8 lwz r5,184(r31)
ffc23624: 80 9f 00 b4 lwz r4,180(r31)
);
printk(
"task name string: %s\n",
rtems_object_get_name(running->Object.id, sizeof(name), name)
);
printk(
ffc23628: 3c 60 ff c6 lis r3,-58
ffc2362c: 38 63 af 0e addi r3,r3,-20722
ffc23630: 7c c5 22 14 add r6,r5,r4
ffc23634: 4c c6 31 82 crclr 4*cr1+eq
ffc23638: 4b fe 17 6d bl ffc04da4 <printk>
"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) {
ffc2363c: 2f 9d 00 00 cmpwi cr7,r29,0
ffc23640: 40 be 00 20 bne+ cr7,ffc23660 <Stack_check_report_blown_task+0xcc><== NEVER TAKEN
printk(
ffc23644: 3c 60 ff c6 lis r3,-58
ffc23648: 38 63 af 3d addi r3,r3,-20675
ffc2364c: 38 80 00 80 li r4,128
ffc23650: 38 be 00 08 addi r5,r30,8
ffc23654: 38 de 00 88 addi r6,r30,136
ffc23658: 4c c6 31 82 crclr 4*cr1+eq
ffc2365c: 4b fe 17 49 bl ffc04da4 <printk>
rtems_configuration_get_user_multiprocessing_table()->node
);
}
#endif
rtems_fatal(
ffc23660: 80 9f 00 0c lwz r4,12(r31)
ffc23664: 38 60 00 09 li r3,9
ffc23668: 4b fe 52 b5 bl ffc0891c <rtems_fatal>
ffc0ee34 <TOD_MICROSECONDS_TO_TICKS>:
/**
* We should ensure the ticks not be truncated by integer division. We
* need to have it be greater than or equal to the requested time. It
* should not be shorter.
*/
microseconds_per_tick = rtems_configuration_get_microseconds_per_tick();
ffc0ee34: 3d 20 ff c2 lis r9,-62
ffc0ee38: 81 49 58 54 lwz r10,22612(r9)
ticks = microseconds / microseconds_per_tick;
ffc0ee3c: 7d 23 53 96 divwu r9,r3,r10
if ( (microseconds % microseconds_per_tick) != 0 )
ffc0ee40: 7d 49 51 d6 mullw r10,r9,r10
ffc0ee44: 7f 83 50 00 cmpw cr7,r3,r10
ffc0ee48: 41 9e 00 08 beq- cr7,ffc0ee50 <TOD_MICROSECONDS_TO_TICKS+0x1c><== ALWAYS TAKEN
ticks += 1;
ffc0ee4c: 39 29 00 01 addi r9,r9,1 <== NOT EXECUTED
return ticks;
}
ffc0ee50: 7d 23 4b 78 mr r3,r9
ffc0ee54: 4e 80 00 20 blr
ffc0a17c <TOD_MILLISECONDS_TO_TICKS>:
/**
* We should ensure the ticks not be truncated by integer division. We
* need to have it be greater than or equal to the requested time. It
* should not be shorter.
*/
milliseconds_per_tick = rtems_configuration_get_milliseconds_per_tick();
ffc0a17c: 3d 20 ff c2 lis r9,-62
ffc0a180: 81 49 d2 44 lwz r10,-11708(r9)
ffc0a184: 39 20 03 e8 li r9,1000
ffc0a188: 7d 4a 4b 96 divwu r10,r10,r9
ticks = milliseconds / milliseconds_per_tick;
ffc0a18c: 7d 23 53 96 divwu r9,r3,r10
if ( (milliseconds % milliseconds_per_tick) != 0 )
ffc0a190: 7d 49 51 d6 mullw r10,r9,r10
ffc0a194: 7f 83 50 00 cmpw cr7,r3,r10
ffc0a198: 41 9e 00 08 beq- cr7,ffc0a1a0 <TOD_MILLISECONDS_TO_TICKS+0x24><== ALWAYS TAKEN
ticks += 1;
ffc0a19c: 39 29 00 01 addi r9,r9,1 <== NOT EXECUTED
return ticks;
}
ffc0a1a0: 7d 23 4b 78 mr r3,r9
ffc0a1a4: 4e 80 00 20 blr
ffc0b874 <_CORE_RWLock_Release>:
#include <rtems/score/watchdog.h>
CORE_RWLock_Status _CORE_RWLock_Release(
CORE_RWLock_Control *the_rwlock
)
{
ffc0b874: 7c 2b 0b 78 mr r11,r1
ffc0b878: 7c 08 02 a6 mflr r0
ffc0b87c: 94 21 ff f0 stwu r1,-16(r1)
ISR_Level level;
Thread_Control *executing = _Thread_Executing;
ffc0b880: 3d 20 00 00 lis r9,0
#include <rtems/score/watchdog.h>
CORE_RWLock_Status _CORE_RWLock_Release(
CORE_RWLock_Control *the_rwlock
)
{
ffc0b884: 90 01 00 14 stw r0,20(r1)
ffc0b888: 48 00 c0 41 bl ffc178c8 <_savegpr_31>
ffc0b88c: 7c 7f 1b 78 mr r31,r3
ISR_Level level;
Thread_Control *executing = _Thread_Executing;
ffc0b890: 81 09 31 b0 lwz r8,12720(r9)
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0b894: 7d 20 00 a6 mfmsr r9
ffc0b898: 7d 50 42 a6 mfsprg r10,0
ffc0b89c: 7d 2a 50 78 andc r10,r9,r10
ffc0b8a0: 7d 40 01 24 mtmsr r10
* If locked for reading and no waiters, then OK to read.
* If any thread is waiting, then we wait.
*/
_ISR_Disable( level );
if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){
ffc0b8a4: 81 43 00 44 lwz r10,68(r3)
ffc0b8a8: 2f 8a 00 00 cmpwi cr7,r10,0
ffc0b8ac: 40 be 00 14 bne+ cr7,ffc0b8c0 <_CORE_RWLock_Release+0x4c>
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0b8b0: 7d 20 01 24 mtmsr r9
_ISR_Enable( level );
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
ffc0b8b4: 39 20 00 02 li r9,2
ffc0b8b8: 91 28 00 34 stw r9,52(r8)
return CORE_RWLOCK_SUCCESSFUL;
ffc0b8bc: 48 00 00 a8 b ffc0b964 <_CORE_RWLock_Release+0xf0>
}
if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) {
ffc0b8c0: 2f 8a 00 01 cmpwi cr7,r10,1
ffc0b8c4: 40 9e 00 20 bne- cr7,ffc0b8e4 <_CORE_RWLock_Release+0x70>
the_rwlock->number_of_readers -= 1;
ffc0b8c8: 81 43 00 48 lwz r10,72(r3)
ffc0b8cc: 39 4a ff ff addi r10,r10,-1
if ( the_rwlock->number_of_readers != 0 ) {
ffc0b8d0: 2f 8a 00 00 cmpwi cr7,r10,0
_ISR_Enable( level );
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
return CORE_RWLOCK_SUCCESSFUL;
}
if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) {
the_rwlock->number_of_readers -= 1;
ffc0b8d4: 91 43 00 48 stw r10,72(r3)
if ( the_rwlock->number_of_readers != 0 ) {
ffc0b8d8: 41 be 00 0c beq+ cr7,ffc0b8e4 <_CORE_RWLock_Release+0x70>
ffc0b8dc: 7d 20 01 24 mtmsr r9
/* must be unlocked again */
_ISR_Enable( level );
return CORE_RWLOCK_SUCCESSFUL;
ffc0b8e0: 48 00 00 84 b ffc0b964 <_CORE_RWLock_Release+0xf0>
}
}
/* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
ffc0b8e4: 39 40 00 00 li r10,0
ffc0b8e8: 91 48 00 34 stw r10,52(r8)
/*
* Implicitly transition to "unlocked" and find another thread interested
* in obtaining this rwlock.
*/
the_rwlock->current_state = CORE_RWLOCK_UNLOCKED;
ffc0b8ec: 91 5f 00 44 stw r10,68(r31)
ffc0b8f0: 7d 20 01 24 mtmsr r9
_ISR_Enable( level );
next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue );
ffc0b8f4: 7f e3 fb 78 mr r3,r31
ffc0b8f8: 48 00 1e 51 bl ffc0d748 <_Thread_queue_Dequeue>
if ( next ) {
ffc0b8fc: 2c 03 00 00 cmpwi r3,0
ffc0b900: 41 82 00 64 beq- ffc0b964 <_CORE_RWLock_Release+0xf0>
if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) {
ffc0b904: 81 23 00 30 lwz r9,48(r3)
ffc0b908: 2f 89 00 01 cmpwi cr7,r9,1
ffc0b90c: 40 be 00 10 bne+ cr7,ffc0b91c <_CORE_RWLock_Release+0xa8>
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING;
ffc0b910: 39 20 00 02 li r9,2
ffc0b914: 91 3f 00 44 stw r9,68(r31)
return CORE_RWLOCK_SUCCESSFUL;
ffc0b918: 48 00 00 4c b ffc0b964 <_CORE_RWLock_Release+0xf0>
}
/*
* Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING
*/
the_rwlock->number_of_readers += 1;
ffc0b91c: 81 3f 00 48 lwz r9,72(r31)
ffc0b920: 39 29 00 01 addi r9,r9,1
ffc0b924: 91 3f 00 48 stw r9,72(r31)
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING;
ffc0b928: 39 20 00 01 li r9,1
ffc0b92c: 91 3f 00 44 stw r9,68(r31)
/*
* Now see if more readers can be let go.
*/
while ( 1 ) {
next = _Thread_queue_First( &the_rwlock->Wait_queue );
ffc0b930: 7f e3 fb 78 mr r3,r31
ffc0b934: 48 00 23 6d bl ffc0dca0 <_Thread_queue_First>
if ( !next ||
ffc0b938: 7c 64 1b 79 mr. r4,r3
ffc0b93c: 41 82 00 28 beq- ffc0b964 <_CORE_RWLock_Release+0xf0>
ffc0b940: 81 24 00 30 lwz r9,48(r4)
ffc0b944: 2f 89 00 01 cmpwi cr7,r9,1
ffc0b948: 41 9e 00 1c beq- cr7,ffc0b964 <_CORE_RWLock_Release+0xf0><== NEVER TAKEN
next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE )
return CORE_RWLOCK_SUCCESSFUL;
the_rwlock->number_of_readers += 1;
ffc0b94c: 81 3f 00 48 lwz r9,72(r31)
_Thread_queue_Extract( &the_rwlock->Wait_queue, next );
ffc0b950: 7f e3 fb 78 mr r3,r31
while ( 1 ) {
next = _Thread_queue_First( &the_rwlock->Wait_queue );
if ( !next ||
next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE )
return CORE_RWLOCK_SUCCESSFUL;
the_rwlock->number_of_readers += 1;
ffc0b954: 39 29 00 01 addi r9,r9,1
ffc0b958: 91 3f 00 48 stw r9,72(r31)
_Thread_queue_Extract( &the_rwlock->Wait_queue, next );
ffc0b95c: 48 00 21 dd bl ffc0db38 <_Thread_queue_Extract>
}
ffc0b960: 4b ff ff d0 b ffc0b930 <_CORE_RWLock_Release+0xbc>
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
ffc0b964: 39 61 00 10 addi r11,r1,16
ffc0b968: 38 60 00 00 li r3,0
ffc0b96c: 4b ff 63 50 b ffc01cbc <_restgpr_31_x>
ffc0b970 <_CORE_RWLock_Timeout>:
void _CORE_RWLock_Timeout(
Objects_Id id,
void *ignored
)
{
ffc0b970: 94 21 ff e8 stwu r1,-24(r1)
ffc0b974: 7c 08 02 a6 mflr r0
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
ffc0b978: 38 81 00 08 addi r4,r1,8
void _CORE_RWLock_Timeout(
Objects_Id id,
void *ignored
)
{
ffc0b97c: 90 01 00 1c stw r0,28(r1)
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
ffc0b980: 48 00 1a 2d bl ffc0d3ac <_Thread_Get>
switch ( location ) {
ffc0b984: 81 21 00 08 lwz r9,8(r1)
ffc0b988: 2f 89 00 00 cmpwi cr7,r9,0
ffc0b98c: 40 9e 00 18 bne- cr7,ffc0b9a4 <_CORE_RWLock_Timeout+0x34><== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_queue_Process_timeout( the_thread );
ffc0b990: 48 00 24 0d bl ffc0dd9c <_Thread_queue_Process_timeout>
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
ffc0b994: 3d 20 00 00 lis r9,0
ffc0b998: 81 49 28 90 lwz r10,10384(r9)
--level;
ffc0b99c: 39 4a ff ff addi r10,r10,-1
_Thread_Dispatch_disable_level = level;
ffc0b9a0: 91 49 28 90 stw r10,10384(r9)
_Thread_Unnest_dispatch();
break;
}
}
ffc0b9a4: 80 01 00 1c lwz r0,28(r1)
ffc0b9a8: 38 21 00 18 addi r1,r1,24
ffc0b9ac: 7c 08 03 a6 mtlr r0
ffc0b9b0: 4e 80 00 20 blr
ffc09854 <_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
)
{
ffc09854: 7c 2b 0b 78 mr r11,r1
ffc09858: 7c 08 02 a6 mflr r0
ffc0985c: 94 21 ff f0 stwu r1,-16(r1)
ffc09860: 48 01 15 5d bl ffc1adbc <_savegpr_31>
ffc09864: 90 01 00 14 stw r0,20(r1)
ffc09868: 7c 7f 1b 78 mr r31,r3
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) {
ffc0986c: 48 00 1d 75 bl ffc0b5e0 <_Thread_queue_Dequeue>
ffc09870: 2f 83 00 00 cmpwi cr7,r3,0
ffc09874: 40 be 00 3c bne+ cr7,ffc098b0 <_CORE_semaphore_Surrender+0x5c>
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc09878: 7d 00 00 a6 mfmsr r8
ffc0987c: 7d 30 42 a6 mfsprg r9,0
ffc09880: 7d 09 48 78 andc r9,r8,r9
ffc09884: 7d 20 01 24 mtmsr r9
(*api_semaphore_mp_support) ( the_thread, id );
#endif
} else {
_ISR_Disable( level );
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
ffc09888: 81 3f 00 48 lwz r9,72(r31)
the_semaphore->count += 1;
else
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
ffc0988c: 38 60 00 04 li r3,4
(*api_semaphore_mp_support) ( the_thread, id );
#endif
} else {
_ISR_Disable( level );
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
ffc09890: 81 5f 00 40 lwz r10,64(r31)
ffc09894: 7f 89 50 40 cmplw cr7,r9,r10
ffc09898: 40 9c 00 10 bge- cr7,ffc098a8 <_CORE_semaphore_Surrender+0x54><== NEVER TAKEN
the_semaphore->count += 1;
ffc0989c: 39 29 00 01 addi r9,r9,1
ffc098a0: 91 3f 00 48 stw r9,72(r31)
{
Thread_Control *the_thread;
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
ffc098a4: 38 60 00 00 li r3,0
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc098a8: 7d 00 01 24 mtmsr r8
ffc098ac: 48 00 00 08 b ffc098b4 <_CORE_semaphore_Surrender+0x60>
ffc098b0: 38 60 00 00 li r3,0
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
}
return status;
}
ffc098b4: 39 61 00 10 addi r11,r1,16
ffc098b8: 4b ff 6d 0c b ffc005c4 <_restgpr_31_x>
ffc08454 <_Event_Surrender>:
rtems_event_set event_in,
Event_Control *event,
Thread_blocking_operation_States *sync_state,
States_Control wait_state
)
{
ffc08454: 7c 2b 0b 78 mr r11,r1
ffc08458: 7c 08 02 a6 mflr r0
ffc0845c: 94 21 ff f0 stwu r1,-16(r1)
ffc08460: 90 01 00 14 stw r0,20(r1)
ffc08464: 48 01 29 59 bl ffc1adbc <_savegpr_31>
ffc08468: 7c 7f 1b 78 mr r31,r3
rtems_event_set pending_events;
rtems_event_set event_condition;
rtems_event_set seized_events;
rtems_option option_set;
option_set = the_thread->Wait.option;
ffc0846c: 80 63 00 30 lwz r3,48(r3)
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc08470: 7d 20 00 a6 mfmsr r9
ffc08474: 7d 50 42 a6 mfsprg r10,0
ffc08478: 7d 2a 50 78 andc r10,r9,r10
ffc0847c: 7d 40 01 24 mtmsr r10
RTEMS_INLINE_ROUTINE void _Event_sets_Post(
rtems_event_set the_new_events,
rtems_event_set *the_event_set
)
{
*the_event_set |= the_new_events;
ffc08480: 81 45 00 00 lwz r10,0(r5)
ffc08484: 7c 84 53 78 or r4,r4,r10
ffc08488: 90 85 00 00 stw r4,0(r5)
_ISR_Disable( level );
_Event_sets_Post( event_in, &event->pending_events );
pending_events = event->pending_events;
event_condition = the_thread->Wait.count;
ffc0848c: 81 1f 00 24 lwz r8,36(r31)
seized_events = _Event_sets_Get( pending_events, event_condition );
/*
* No events were seized in this operation
*/
if ( _Event_sets_Is_empty( seized_events ) ) {
ffc08490: 7c 8a 40 39 and. r10,r4,r8
ffc08494: 40 a2 00 08 bne+ ffc0849c <_Event_Surrender+0x48>
ffc08498: 48 00 00 f0 b ffc08588 <_Event_Surrender+0x134>
/*
* 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() &&
ffc0849c: 3d 60 00 00 lis r11,0
ffc084a0: 39 6b 31 a0 addi r11,r11,12704
ffc084a4: 80 0b 00 08 lwz r0,8(r11)
ffc084a8: 2f 80 00 00 cmpwi cr7,r0,0
ffc084ac: 41 9e 00 54 beq- cr7,ffc08500 <_Event_Surrender+0xac>
ffc084b0: 81 6b 00 10 lwz r11,16(r11)
ffc084b4: 7f 9f 58 00 cmpw cr7,r31,r11
ffc084b8: 40 be 00 48 bne+ cr7,ffc08500 <_Event_Surrender+0xac>
_Thread_Is_executing( the_thread ) &&
((*sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
ffc084bc: 81 66 00 00 lwz r11,0(r6)
ffc084c0: 39 6b ff ff addi r11,r11,-1
/*
* 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 ) &&
ffc084c4: 2b 8b 00 01 cmplwi cr7,r11,1
ffc084c8: 41 bd 00 38 bgt+ cr7,ffc08500 <_Event_Surrender+0xac>
((*sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(*sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
ffc084cc: 7f 8a 40 00 cmpw cr7,r10,r8
ffc084d0: 41 9e 00 0c beq- cr7,ffc084dc <_Event_Surrender+0x88>
ffc084d4: 70 68 00 02 andi. r8,r3,2
ffc084d8: 41 82 00 b0 beq- ffc08588 <_Event_Surrender+0x134> <== 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) );
ffc084dc: 7c 84 50 78 andc r4,r4,r10
event->pending_events = _Event_sets_Clear(
pending_events,
seized_events
);
the_thread->Wait.count = 0;
ffc084e0: 39 00 00 00 li r8,0
if ( _ISR_Is_in_progress() &&
_Thread_Is_executing( the_thread ) &&
((*sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(*sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
event->pending_events = _Event_sets_Clear(
ffc084e4: 90 85 00 00 stw r4,0(r5)
pending_events,
seized_events
);
the_thread->Wait.count = 0;
ffc084e8: 91 1f 00 24 stw r8,36(r31)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
ffc084ec: 81 1f 00 28 lwz r8,40(r31)
ffc084f0: 91 48 00 00 stw r10,0(r8)
*sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
ffc084f4: 39 40 00 03 li r10,3
ffc084f8: 91 46 00 00 stw r10,0(r6)
ffc084fc: 48 00 00 8c b ffc08588 <_Event_Surrender+0x134>
RTEMS_INLINE_ROUTINE bool _States_Are_set (
States_Control the_states,
States_Control mask
)
{
return ( (the_states & mask) != STATES_READY);
ffc08500: 80 df 00 10 lwz r6,16(r31)
}
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Are_set( the_thread->current_state, wait_state ) ) {
ffc08504: 7c eb 30 39 and. r11,r7,r6
ffc08508: 41 82 00 80 beq- ffc08588 <_Event_Surrender+0x134>
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
ffc0850c: 7f 8a 40 00 cmpw cr7,r10,r8
ffc08510: 41 9e 00 0c beq- cr7,ffc0851c <_Event_Surrender+0xc8>
ffc08514: 70 68 00 02 andi. r8,r3,2
ffc08518: 41 82 00 70 beq- ffc08588 <_Event_Surrender+0x134> <== NEVER TAKEN
ffc0851c: 7c 84 50 78 andc r4,r4,r10
event->pending_events = _Event_sets_Clear(
pending_events,
seized_events
);
the_thread->Wait.count = 0;
ffc08520: 39 00 00 00 li r8,0
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Are_set( the_thread->current_state, wait_state ) ) {
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
event->pending_events = _Event_sets_Clear(
ffc08524: 90 85 00 00 stw r4,0(r5)
pending_events,
seized_events
);
the_thread->Wait.count = 0;
ffc08528: 91 1f 00 24 stw r8,36(r31)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
ffc0852c: 81 1f 00 28 lwz r8,40(r31)
ffc08530: 91 48 00 00 stw r10,0(r8)
static inline void ppc_interrupt_flash( uint32_t level )
{
uint32_t current_level;
__asm__ volatile (
ffc08534: 7d 40 00 a6 mfmsr r10
ffc08538: 7d 20 01 24 mtmsr r9
ffc0853c: 7d 40 01 24 mtmsr r10
_ISR_Flash( level );
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
ffc08540: 81 5f 00 50 lwz r10,80(r31)
ffc08544: 2f 8a 00 02 cmpwi cr7,r10,2
ffc08548: 41 9e 00 0c beq- cr7,ffc08554 <_Event_Surrender+0x100>
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0854c: 7d 20 01 24 mtmsr r9
ffc08550: 48 00 00 18 b ffc08568 <_Event_Surrender+0x114>
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
ffc08554: 39 40 00 03 li r10,3
ffc08558: 91 5f 00 50 stw r10,80(r31)
ffc0855c: 7d 20 01 24 mtmsr r9
_ISR_Enable( level );
_Thread_Unblock( the_thread );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
(void) _Watchdog_Remove( &the_thread->Timer );
ffc08560: 38 7f 00 48 addi r3,r31,72
ffc08564: 48 00 3b 8d bl ffc0c0f0 <_Watchdog_Remove>
}
return;
}
}
_ISR_Enable( level );
}
ffc08568: 80 01 00 14 lwz r0,20(r1)
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
ffc0856c: 7f e3 fb 78 mr r3,r31
ffc08570: 3c 80 10 07 lis r4,4103
ffc08574: 83 e1 00 0c lwz r31,12(r1)
ffc08578: 7c 08 03 a6 mtlr r0
ffc0857c: 60 84 ff f8 ori r4,r4,65528
ffc08580: 38 21 00 10 addi r1,r1,16
ffc08584: 48 00 28 84 b ffc0ae08 <_Thread_Clear_state>
ffc08588: 7d 20 01 24 mtmsr r9
ffc0858c: 39 61 00 10 addi r11,r1,16
ffc08590: 4b ff 80 34 b ffc005c4 <_restgpr_31_x>
ffc08594 <_Event_Timeout>:
void _Event_Timeout(
Objects_Id id,
void *arg
)
{
ffc08594: 7c 2b 0b 78 mr r11,r1
ffc08598: 94 21 ff e0 stwu r1,-32(r1)
ffc0859c: 7c 08 02 a6 mflr r0
ffc085a0: 48 01 28 1d bl ffc1adbc <_savegpr_31>
ffc085a4: 7c 9f 23 78 mr r31,r4
ISR_Level level;
Thread_blocking_operation_States *sync_state;
sync_state = arg;
the_thread = _Thread_Get( id, &location );
ffc085a8: 38 81 00 08 addi r4,r1,8
void _Event_Timeout(
Objects_Id id,
void *arg
)
{
ffc085ac: 90 01 00 24 stw r0,36(r1)
ISR_Level level;
Thread_blocking_operation_States *sync_state;
sync_state = arg;
the_thread = _Thread_Get( id, &location );
ffc085b0: 48 00 2c 95 bl ffc0b244 <_Thread_Get>
switch ( location ) {
ffc085b4: 81 21 00 08 lwz r9,8(r1)
ffc085b8: 2f 89 00 00 cmpwi cr7,r9,0
ffc085bc: 40 9e 00 64 bne- cr7,ffc08620 <_Event_Timeout+0x8c> <== NEVER TAKEN
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc085c0: 7d 40 00 a6 mfmsr r10
ffc085c4: 7d 10 42 a6 mfsprg r8,0
ffc085c8: 7d 48 40 78 andc r8,r10,r8
ffc085cc: 7d 00 01 24 mtmsr r8
_ISR_Enable( level );
return;
}
#endif
the_thread->Wait.count = 0;
ffc085d0: 91 23 00 24 stw r9,36(r3)
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Executing );
ffc085d4: 3d 20 00 00 lis r9,0
if ( _Thread_Is_executing( the_thread ) ) {
ffc085d8: 81 29 31 b0 lwz r9,12720(r9)
ffc085dc: 7f 83 48 00 cmpw cr7,r3,r9
ffc085e0: 40 be 00 18 bne+ cr7,ffc085f8 <_Event_Timeout+0x64>
if ( *sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
ffc085e4: 81 3f 00 00 lwz r9,0(r31)
ffc085e8: 2f 89 00 01 cmpwi cr7,r9,1
ffc085ec: 40 be 00 0c bne+ cr7,ffc085f8 <_Event_Timeout+0x64>
*sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
ffc085f0: 39 20 00 02 li r9,2
ffc085f4: 91 3f 00 00 stw r9,0(r31)
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
ffc085f8: 39 20 00 06 li r9,6
ffc085fc: 91 23 00 34 stw r9,52(r3)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc08600: 7d 40 01 24 mtmsr r10
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
ffc08604: 3c 80 10 07 lis r4,4103
ffc08608: 60 84 ff f8 ori r4,r4,65528
ffc0860c: 48 00 27 fd bl ffc0ae08 <_Thread_Clear_state>
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
ffc08610: 3d 20 00 00 lis r9,0
ffc08614: 81 49 28 68 lwz r10,10344(r9)
--level;
ffc08618: 39 4a ff ff addi r10,r10,-1
_Thread_Dispatch_disable_level = level;
ffc0861c: 91 49 28 68 stw r10,10344(r9)
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
ffc08620: 39 61 00 20 addi r11,r1,32
ffc08624: 4b ff 7f a0 b ffc005c4 <_restgpr_31_x>
ffc0e5dc <_Heap_Free>:
/*
* 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 ) {
ffc0e5dc: 2c 04 00 00 cmpwi r4,0
return do_free;
}
#endif
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
ffc0e5e0: 7c 08 02 a6 mflr r0
ffc0e5e4: 7c 2b 0b 78 mr r11,r1
ffc0e5e8: 94 21 ff f0 stwu r1,-16(r1)
ffc0e5ec: 90 01 00 14 stw r0,20(r1)
ffc0e5f0: 48 00 c7 cd bl ffc1adbc <_savegpr_31>
/*
* 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 ) {
ffc0e5f4: 41 82 01 e4 beq- ffc0e7d8 <_Heap_Free+0x1fc>
ffc0e5f8: 81 03 00 10 lwz r8,16(r3)
ffc0e5fc: 7c 69 1b 78 mr r9,r3
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
ffc0e600: 81 63 00 20 lwz r11,32(r3)
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
ffc0e604: 7d 44 43 96 divwu r10,r4,r8
ffc0e608: 7d 4a 41 d6 mullw r10,r10,r8
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;
ffc0e60c: 39 00 00 00 li r8,0
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
ffc0e610: 39 4a ff f8 addi r10,r10,-8
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;
ffc0e614: 7f 8a 58 40 cmplw cr7,r10,r11
ffc0e618: 41 9c 00 14 blt- cr7,ffc0e62c <_Heap_Free+0x50>
ffc0e61c: 81 03 00 24 lwz r8,36(r3)
ffc0e620: 7d 0a 40 10 subfc r8,r10,r8
ffc0e624: 39 00 00 00 li r8,0
ffc0e628: 7d 08 41 14 adde r8,r8,r8
}
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 ) ) {
ffc0e62c: 2f 88 00 00 cmpwi cr7,r8,0
return false;
ffc0e630: 38 60 00 00 li r3,0
}
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 ) ) {
ffc0e634: 41 9e 01 a8 beq- cr7,ffc0e7dc <_Heap_Free+0x200>
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
ffc0e638: 80 8a 00 04 lwz r4,4(r10)
ffc0e63c: 38 c0 00 00 li r6,0
- 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;
ffc0e640: 54 87 00 3c rlwinm r7,r4,0,0,30
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
ffc0e644: 7d 07 52 14 add r8,r7,r10
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;
ffc0e648: 7f 88 58 40 cmplw cr7,r8,r11
ffc0e64c: 41 9c 00 14 blt- cr7,ffc0e660 <_Heap_Free+0x84> <== NEVER TAKEN
ffc0e650: 80 c9 00 24 lwz r6,36(r9)
ffc0e654: 7c c8 30 10 subfc r6,r8,r6
ffc0e658: 38 c0 00 00 li r6,0
ffc0e65c: 7c c6 31 14 adde r6,r6,r6
_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 ) ) {
ffc0e660: 2f 86 00 00 cmpwi cr7,r6,0
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;
ffc0e664: 38 60 00 00 li r3,0
_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 ) ) {
ffc0e668: 41 9e 01 74 beq- cr7,ffc0e7dc <_Heap_Free+0x200> <== NEVER TAKEN
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
ffc0e66c: 80 a8 00 04 lwz r5,4(r8)
return false;
}
_Heap_Protection_block_check( heap, next_block );
if ( !_Heap_Is_prev_used( next_block ) ) {
ffc0e670: 70 a6 00 01 andi. r6,r5,1
ffc0e674: 41 82 01 68 beq- ffc0e7dc <_Heap_Free+0x200>
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
ffc0e678: 80 69 00 24 lwz r3,36(r9)
- 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;
ffc0e67c: 54 a5 00 3c rlwinm r5,r5,0,0,30
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
ffc0e680: 7f 88 18 00 cmpw cr7,r8,r3
ffc0e684: 41 9e 00 18 beq- cr7,ffc0e69c <_Heap_Free+0xc0>
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
ffc0e688: 7c c8 2a 14 add r6,r8,r5
return true;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
ffc0e68c: 80 06 00 04 lwz r0,4(r6)
ffc0e690: 68 00 00 01 xori r0,r0,1
ffc0e694: 54 00 07 fe clrlwi r0,r0,31
ffc0e698: 48 00 00 08 b ffc0e6a0 <_Heap_Free+0xc4>
ffc0e69c: 38 00 00 00 li r0,0
if ( !_Heap_Is_prev_used( block ) ) {
ffc0e6a0: 70 9f 00 01 andi. r31,r4,1
ffc0e6a4: 40 82 00 94 bne- ffc0e738 <_Heap_Free+0x15c>
uintptr_t const prev_size = block->prev_size;
ffc0e6a8: 80 8a 00 00 lwz r4,0(r10)
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;
ffc0e6ac: 39 80 00 00 li r12,0
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
ffc0e6b0: 7c c4 50 50 subf r6,r4,r10
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;
ffc0e6b4: 7f 86 58 40 cmplw cr7,r6,r11
ffc0e6b8: 41 9c 00 10 blt- cr7,ffc0e6c8 <_Heap_Free+0xec> <== NEVER TAKEN
ffc0e6bc: 7d 86 18 10 subfc r12,r6,r3
ffc0e6c0: 39 80 00 00 li r12,0
ffc0e6c4: 7d 8c 61 14 adde r12,r12,r12
Heap_Block * const prev_block = _Heap_Block_at( block, -prev_size );
if ( !_Heap_Is_block_in_heap( heap, prev_block ) ) {
ffc0e6c8: 2f 8c 00 00 cmpwi cr7,r12,0
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;
ffc0e6cc: 38 60 00 00 li r3,0
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 ) ) {
ffc0e6d0: 41 9e 01 0c beq- cr7,ffc0e7dc <_Heap_Free+0x200> <== NEVER TAKEN
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
ffc0e6d4: 81 66 00 04 lwz r11,4(r6)
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) ) {
ffc0e6d8: 71 7f 00 01 andi. r31,r11,1
ffc0e6dc: 41 82 01 00 beq- ffc0e7dc <_Heap_Free+0x200> <== NEVER TAKEN
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
ffc0e6e0: 2f 80 00 00 cmpwi cr7,r0,0
ffc0e6e4: 7c 87 22 14 add r4,r7,r4
ffc0e6e8: 41 be 00 34 beq+ cr7,ffc0e71c <_Heap_Free+0x140>
}
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
ffc0e6ec: 81 48 00 0c lwz r10,12(r8)
uintptr_t const size = block_size + prev_size + next_block_size;
ffc0e6f0: 7c a4 2a 14 add r5,r4,r5
return _Heap_Free_list_tail(heap)->prev;
}
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
ffc0e6f4: 80 88 00 08 lwz r4,8(r8)
Heap_Block *prev = block->prev;
prev->next = next;
ffc0e6f8: 90 8a 00 08 stw r4,8(r10)
next->prev = prev;
ffc0e6fc: 91 44 00 0c stw r10,12(r4)
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
ffc0e700: 81 49 00 38 lwz r10,56(r9)
ffc0e704: 39 4a ff ff addi r10,r10,-1
ffc0e708: 91 49 00 38 stw r10,56(r9)
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
ffc0e70c: 60 aa 00 01 ori r10,r5,1
ffc0e710: 91 46 00 04 stw r10,4(r6)
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
ffc0e714: 7c a5 31 2e stwx r5,r5,r6
ffc0e718: 48 00 00 9c b ffc0e7b4 <_Heap_Free+0x1d8>
} else { /* coalesce prev */
uintptr_t const size = block_size + prev_size;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
ffc0e71c: 60 85 00 01 ori r5,r4,1
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = size;
ffc0e720: 7c 87 51 2e stwx r4,r7,r10
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;
ffc0e724: 90 a6 00 04 stw r5,4(r6)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
ffc0e728: 80 c8 00 04 lwz r6,4(r8)
ffc0e72c: 54 c6 00 3c rlwinm r6,r6,0,0,30
ffc0e730: 90 c8 00 04 stw r6,4(r8)
ffc0e734: 48 00 00 80 b ffc0e7b4 <_Heap_Free+0x1d8>
next_block->prev_size = size;
}
} else if ( next_is_free ) { /* coalesce next */
ffc0e738: 2f 80 00 00 cmpwi cr7,r0,0
ffc0e73c: 41 be 00 30 beq+ cr7,ffc0e76c <_Heap_Free+0x190>
uintptr_t const size = block_size + next_block_size;
ffc0e740: 7c c5 3a 14 add r6,r5,r7
RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace(
Heap_Block *old_block,
Heap_Block *new_block
)
{
Heap_Block *next = old_block->next;
ffc0e744: 80 a8 00 08 lwz r5,8(r8)
Heap_Block *prev = old_block->prev;
ffc0e748: 81 08 00 0c lwz r8,12(r8)
new_block->next = next;
ffc0e74c: 90 aa 00 08 stw r5,8(r10)
new_block->prev = prev;
ffc0e750: 91 0a 00 0c stw r8,12(r10)
next->prev = new_block;
prev->next = new_block;
ffc0e754: 91 48 00 08 stw r10,8(r8)
_Heap_Free_list_replace( next_block, block );
block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
ffc0e758: 60 c8 00 01 ori r8,r6,1
Heap_Block *prev = old_block->prev;
new_block->next = next;
new_block->prev = prev;
next->prev = new_block;
ffc0e75c: 91 45 00 0c stw r10,12(r5)
ffc0e760: 91 0a 00 04 stw r8,4(r10)
next_block = _Heap_Block_at( block, size );
next_block->prev_size = size;
ffc0e764: 7c c6 51 2e stwx r6,r6,r10
ffc0e768: 48 00 00 4c b ffc0e7b4 <_Heap_Free+0x1d8>
RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after(
Heap_Block *block_before,
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
ffc0e76c: 80 c9 00 08 lwz r6,8(r9)
new_block->next = next;
new_block->prev = block_before;
ffc0e770: 91 2a 00 0c stw r9,12(r10)
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
new_block->next = next;
ffc0e774: 90 ca 00 08 stw r6,8(r10)
new_block->prev = block_before;
block_before->next = new_block;
next->prev = new_block;
ffc0e778: 91 46 00 0c stw r10,12(r6)
} 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;
ffc0e77c: 60 e6 00 01 ori r6,r7,1
ffc0e780: 90 ca 00 04 stw r6,4(r10)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
ffc0e784: 80 c8 00 04 lwz r6,4(r8)
next_block->prev_size = block_size;
ffc0e788: 7c e7 51 2e stwx r7,r7,r10
} else { /* no coalesce */
/* Add 'block' to the head of the free blocks list as it tends to
produce less fragmentation than adding to the tail. */
_Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block );
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
ffc0e78c: 54 c6 00 3c rlwinm r6,r6,0,0,30
{
Heap_Block *next = block_before->next;
new_block->next = next;
new_block->prev = block_before;
block_before->next = new_block;
ffc0e790: 91 49 00 08 stw r10,8(r9)
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
ffc0e794: 81 49 00 38 lwz r10,56(r9)
} else { /* no coalesce */
/* Add 'block' to the head of the free blocks list as it tends to
produce less fragmentation than adding to the tail. */
_Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block );
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
ffc0e798: 90 c8 00 04 stw r6,4(r8)
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
ffc0e79c: 39 4a 00 01 addi r10,r10,1
if ( stats->max_free_blocks < stats->free_blocks ) {
ffc0e7a0: 81 09 00 3c lwz r8,60(r9)
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
ffc0e7a4: 91 49 00 38 stw r10,56(r9)
if ( stats->max_free_blocks < stats->free_blocks ) {
ffc0e7a8: 7f 88 50 40 cmplw cr7,r8,r10
ffc0e7ac: 40 9c 00 08 bge- cr7,ffc0e7b4 <_Heap_Free+0x1d8>
stats->max_free_blocks = stats->free_blocks;
ffc0e7b0: 91 49 00 3c stw r10,60(r9)
}
}
/* Statistics */
--stats->used_blocks;
ffc0e7b4: 81 49 00 40 lwz r10,64(r9)
ffc0e7b8: 39 4a ff ff addi r10,r10,-1
ffc0e7bc: 91 49 00 40 stw r10,64(r9)
++stats->frees;
ffc0e7c0: 81 49 00 50 lwz r10,80(r9)
ffc0e7c4: 39 4a 00 01 addi r10,r10,1
ffc0e7c8: 91 49 00 50 stw r10,80(r9)
stats->free_size += block_size;
ffc0e7cc: 81 49 00 30 lwz r10,48(r9)
ffc0e7d0: 7c ea 3a 14 add r7,r10,r7
ffc0e7d4: 90 e9 00 30 stw r7,48(r9)
* 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;
ffc0e7d8: 38 60 00 01 li r3,1
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
ffc0e7dc: 39 61 00 10 addi r11,r1,16
ffc0e7e0: 4b ff 1d e4 b ffc005c4 <_restgpr_31_x>
ffc0b86c <_Heap_Greedy_allocate>:
Heap_Block *_Heap_Greedy_allocate(
Heap_Control *heap,
const uintptr_t *block_sizes,
size_t block_count
)
{
ffc0b86c: 94 21 ff e0 stwu r1,-32(r1)
ffc0b870: 7c 08 02 a6 mflr r0
ffc0b874: bf 61 00 0c stmw r27,12(r1)
ffc0b878: 7c 7f 1b 78 mr r31,r3
ffc0b87c: 7c 9c 23 78 mr r28,r4
ffc0b880: 90 01 00 24 stw r0,36(r1)
ffc0b884: 7c bb 2b 78 mr r27,r5
Heap_Block *allocated_blocks = NULL;
Heap_Block *blocks = NULL;
Heap_Block *current;
size_t i;
for (i = 0; i < block_count; ++i) {
ffc0b888: 3b c0 00 00 li r30,0
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;
ffc0b88c: 3b a0 00 00 li r29,0
Heap_Block *blocks = NULL;
Heap_Block *current;
size_t i;
for (i = 0; i < block_count; ++i) {
ffc0b890: 48 00 00 40 b ffc0b8d0 <_Heap_Greedy_allocate+0x64>
#include "config.h"
#endif
#include <rtems/score/heap.h>
Heap_Block *_Heap_Greedy_allocate(
ffc0b894: 57 c9 10 3a rlwinm r9,r30,2,0,29
* @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 );
ffc0b898: 7c 9c 48 2e lwzx r4,r28,r9
ffc0b89c: 7f e3 fb 78 mr r3,r31
ffc0b8a0: 38 a0 00 00 li r5,0
ffc0b8a4: 38 c0 00 00 li r6,0
ffc0b8a8: 48 00 76 bd bl ffc12f64 <_Heap_Allocate_aligned_with_boundary>
size_t i;
for (i = 0; i < block_count; ++i) {
void *next = _Heap_Allocate( heap, block_sizes [i] );
if ( next != NULL ) {
ffc0b8ac: 2c 03 00 00 cmpwi r3,0
ffc0b8b0: 41 82 00 1c beq- ffc0b8cc <_Heap_Greedy_allocate+0x60> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
ffc0b8b4: 81 3f 00 10 lwz r9,16(r31)
ffc0b8b8: 7c 63 4b 96 divwu r3,r3,r9
ffc0b8bc: 7d 23 49 d6 mullw r9,r3,r9
Heap_Block *next_block = _Heap_Block_of_alloc_area(
(uintptr_t) next,
heap->page_size
);
next_block->next = allocated_blocks;
ffc0b8c0: 93 a9 00 00 stw r29,0(r9)
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
ffc0b8c4: 39 29 ff f8 addi r9,r9,-8
ffc0b8c8: 7d 3d 4b 78 mr r29,r9
Heap_Block *allocated_blocks = NULL;
Heap_Block *blocks = NULL;
Heap_Block *current;
size_t i;
for (i = 0; i < block_count; ++i) {
ffc0b8cc: 3b de 00 01 addi r30,r30,1
ffc0b8d0: 7f 9e d8 00 cmpw cr7,r30,r27
ffc0b8d4: 40 9e ff c0 bne+ cr7,ffc0b894 <_Heap_Greedy_allocate+0x28>
ffc0b8d8: 3b 80 00 00 li r28,0
ffc0b8dc: 48 00 00 28 b ffc0b904 <_Heap_Greedy_allocate+0x98>
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
ffc0b8e0: 80 de 00 04 lwz r6,4(r30)
allocated_blocks = next_block;
}
}
while ( (current = _Heap_Free_list_first( heap )) != free_list_tail ) {
_Heap_Block_allocate(
ffc0b8e4: 7f e3 fb 78 mr r3,r31
ffc0b8e8: 7f c4 f3 78 mr r4,r30
ffc0b8ec: 54 c6 00 3c rlwinm r6,r6,0,0,30
ffc0b8f0: 38 be 00 08 addi r5,r30,8
ffc0b8f4: 38 c6 ff f8 addi r6,r6,-8
ffc0b8f8: 48 00 03 0d bl ffc0bc04 <_Heap_Block_allocate>
current,
_Heap_Alloc_area_of_block( current ),
_Heap_Block_size( current ) - HEAP_BLOCK_HEADER_SIZE
);
current->next = blocks;
ffc0b8fc: 93 9e 00 08 stw r28,8(r30)
ffc0b900: 7f dc f3 78 mr r28,r30
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
ffc0b904: 83 df 00 08 lwz r30,8(r31)
next_block->next = allocated_blocks;
allocated_blocks = next_block;
}
}
while ( (current = _Heap_Free_list_first( heap )) != free_list_tail ) {
ffc0b908: 7f 9e f8 00 cmpw cr7,r30,r31
ffc0b90c: 40 9e ff d4 bne+ cr7,ffc0b8e0 <_Heap_Greedy_allocate+0x74>
ffc0b910: 48 00 00 14 b ffc0b924 <_Heap_Greedy_allocate+0xb8>
blocks = current;
}
while ( allocated_blocks != NULL ) {
current = allocated_blocks;
allocated_blocks = allocated_blocks->next;
ffc0b914: 7f a4 eb 78 mr r4,r29
ffc0b918: 87 a4 00 08 lwzu r29,8(r4)
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( current ) );
ffc0b91c: 7f e3 fb 78 mr r3,r31
ffc0b920: 48 00 77 d5 bl ffc130f4 <_Heap_Free>
current->next = blocks;
blocks = current;
}
while ( allocated_blocks != NULL ) {
ffc0b924: 2f 9d 00 00 cmpwi cr7,r29,0
ffc0b928: 40 9e ff ec bne+ cr7,ffc0b914 <_Heap_Greedy_allocate+0xa8>
allocated_blocks = allocated_blocks->next;
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( current ) );
}
return blocks;
}
ffc0b92c: 39 61 00 20 addi r11,r1,32
ffc0b930: 7f 83 e3 78 mr r3,r28
ffc0b934: 4b ff 57 f0 b ffc01124 <_restgpr_27_x>
ffc12f90 <_Heap_Iterate>:
void _Heap_Iterate(
Heap_Control *heap,
Heap_Block_visitor visitor,
void *visitor_arg
)
{
ffc12f90: 94 21 ff e8 stwu r1,-24(r1)
ffc12f94: 7c 08 02 a6 mflr r0
ffc12f98: 90 01 00 1c stw r0,28(r1)
ffc12f9c: bf 81 00 08 stmw r28,8(r1)
ffc12fa0: 7c 9d 23 78 mr r29,r4
ffc12fa4: 7c bc 2b 78 mr r28,r5
Heap_Block *current = heap->first_block;
ffc12fa8: 81 23 00 20 lwz r9,32(r3)
Heap_Block *end = heap->last_block;
ffc12fac: 83 c3 00 24 lwz r30,36(r3)
ffc12fb0: 48 00 00 34 b ffc12fe4 <_Heap_Iterate+0x54>
ffc12fb4: 80 89 00 04 lwz r4,4(r9)
while ( !stop && current != end ) {
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 );
ffc12fb8: 7d 23 4b 78 mr r3,r9
ffc12fbc: 7f 86 e3 78 mr r6,r28
ffc12fc0: 7f a9 03 a6 mtctr r29
ffc12fc4: 54 84 00 3c rlwinm r4,r4,0,0,30
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
ffc12fc8: 7f e9 22 14 add r31,r9,r4
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;
ffc12fcc: 80 bf 00 04 lwz r5,4(r31)
ffc12fd0: 54 a5 07 fe clrlwi r5,r5,31
ffc12fd4: 4e 80 04 21 bctrl
ffc12fd8: 7f e9 fb 78 mr r9,r31
{
Heap_Block *current = heap->first_block;
Heap_Block *end = heap->last_block;
bool stop = false;
while ( !stop && current != end ) {
ffc12fdc: 2f 83 00 00 cmpwi cr7,r3,0
ffc12fe0: 40 9e 00 0c bne- cr7,ffc12fec <_Heap_Iterate+0x5c> <== NEVER TAKEN
ffc12fe4: 7f 89 f0 00 cmpw cr7,r9,r30
ffc12fe8: 40 9e ff cc bne+ cr7,ffc12fb4 <_Heap_Iterate+0x24>
stop = (*visitor)( current, size, used, visitor_arg );
current = next;
}
}
ffc12fec: 39 61 00 18 addi r11,r1,24
ffc12ff0: 4b ff 05 54 b ffc03544 <_restgpr_28_x>
ffc1bc64 <_Heap_Size_of_alloc_area>:
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
ffc1bc64: 81 03 00 10 lwz r8,16(r3)
bool _Heap_Size_of_alloc_area(
Heap_Control *heap,
void *alloc_begin_ptr,
uintptr_t *alloc_size
)
{
ffc1bc68: 7c 69 1b 78 mr r9,r3
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
ffc1bc6c: 80 e3 00 20 lwz r7,32(r3)
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
ffc1bc70: 7d 44 43 96 divwu r10,r4,r8
ffc1bc74: 7d 0a 41 d6 mullw r8,r10,r8
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;
ffc1bc78: 39 40 00 00 li r10,0
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
ffc1bc7c: 39 08 ff f8 addi r8,r8,-8
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;
ffc1bc80: 7f 88 38 40 cmplw cr7,r8,r7
ffc1bc84: 41 9c 00 14 blt- cr7,ffc1bc98 <_Heap_Size_of_alloc_area+0x34>
ffc1bc88: 81 43 00 24 lwz r10,36(r3)
ffc1bc8c: 7d 48 50 10 subfc r10,r8,r10
ffc1bc90: 39 40 00 00 li r10,0
ffc1bc94: 7d 4a 51 14 adde r10,r10,r10
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 ) ) {
ffc1bc98: 2f 8a 00 00 cmpwi cr7,r10,0
return false;
ffc1bc9c: 38 60 00 00 li r3,0
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 ) ) {
ffc1bca0: 4d 9e 00 20 beqlr cr7
- 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;
ffc1bca4: 81 48 00 04 lwz r10,4(r8)
ffc1bca8: 55 4a 00 3c rlwinm r10,r10,0,0,30
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
ffc1bcac: 7d 4a 42 14 add r10,r10,r8
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;
ffc1bcb0: 7f 8a 38 40 cmplw cr7,r10,r7
ffc1bcb4: 39 00 00 00 li r8,0
ffc1bcb8: 41 9c 00 14 blt- cr7,ffc1bccc <_Heap_Size_of_alloc_area+0x68><== NEVER TAKEN
ffc1bcbc: 81 09 00 24 lwz r8,36(r9)
ffc1bcc0: 7d 0a 40 10 subfc r8,r10,r8
ffc1bcc4: 39 00 00 00 li r8,0
ffc1bcc8: 7d 08 41 14 adde r8,r8,r8
}
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if (
ffc1bccc: 2f 88 00 00 cmpwi cr7,r8,0
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;
ffc1bcd0: 38 60 00 00 li r3,0
}
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if (
ffc1bcd4: 4d 9e 00 20 beqlr cr7
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;
ffc1bcd8: 81 2a 00 04 lwz r9,4(r10)
!_Heap_Is_block_in_heap( heap, next_block )
|| !_Heap_Is_prev_used( next_block )
ffc1bcdc: 71 28 00 01 andi. r8,r9,1
ffc1bce0: 4d 82 00 20 beqlr
) {
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin;
ffc1bce4: 20 84 00 04 subfic r4,r4,4
ffc1bce8: 7d 44 52 14 add r10,r4,r10
ffc1bcec: 91 45 00 00 stw r10,0(r5)
return true;
ffc1bcf0: 38 60 00 01 li r3,1
}
ffc1bcf4: 4e 80 00 20 blr
ffc0a3a4 <_Heap_Walk>:
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const first_block = heap->first_block;
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
ffc0a3a4: 2f 85 00 00 cmpwi cr7,r5,0
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
ffc0a3a8: 94 21 ff 98 stwu r1,-104(r1)
ffc0a3ac: 7c 08 02 a6 mflr r0
ffc0a3b0: bd c1 00 20 stmw r14,32(r1)
ffc0a3b4: 7c 7d 1b 78 mr r29,r3
ffc0a3b8: 7c 9e 23 78 mr r30,r4
ffc0a3bc: 90 01 00 6c stw r0,108(r1)
uintptr_t const page_size = heap->page_size;
ffc0a3c0: 83 43 00 10 lwz r26,16(r3)
uintptr_t const min_block_size = heap->min_block_size;
ffc0a3c4: 83 03 00 14 lwz r24,20(r3)
Heap_Block *const first_block = heap->first_block;
ffc0a3c8: 83 83 00 20 lwz r28,32(r3)
Heap_Block *const last_block = heap->last_block;
ffc0a3cc: 82 e3 00 24 lwz r23,36(r3)
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
ffc0a3d0: 41 9e 00 10 beq- cr7,ffc0a3e0 <_Heap_Walk+0x3c>
ffc0a3d4: 3f e0 ff c1 lis r31,-63
ffc0a3d8: 3b ff a2 f4 addi r31,r31,-23820
ffc0a3dc: 48 00 00 0c b ffc0a3e8 <_Heap_Walk+0x44>
ffc0a3e0: 3f e0 ff c1 lis r31,-63
ffc0a3e4: 3b ff a2 f0 addi r31,r31,-23824
if ( !_System_state_Is_up( _System_state_Get() ) ) {
ffc0a3e8: 3d 20 00 00 lis r9,0
ffc0a3ec: 81 29 28 6c lwz r9,10348(r9)
ffc0a3f0: 2f 89 00 03 cmpwi cr7,r9,3
ffc0a3f4: 41 9e 00 0c beq- cr7,ffc0a400 <_Heap_Walk+0x5c>
return true;
ffc0a3f8: 38 60 00 01 li r3,1
ffc0a3fc: 48 00 04 cc b ffc0a8c8 <_Heap_Walk+0x524>
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)(
ffc0a400: 81 5d 00 08 lwz r10,8(r29)
ffc0a404: 3c a0 ff c1 lis r5,-63
ffc0a408: 81 1d 00 18 lwz r8,24(r29)
ffc0a40c: 7f c3 f3 78 mr r3,r30
ffc0a410: 91 41 00 0c stw r10,12(r1)
ffc0a414: 38 80 00 00 li r4,0
ffc0a418: 38 a5 7b f8 addi r5,r5,31736
ffc0a41c: 7f e9 03 a6 mtctr r31
ffc0a420: 81 5d 00 0c lwz r10,12(r29)
ffc0a424: 7f 46 d3 78 mr r6,r26
ffc0a428: 81 3d 00 1c lwz r9,28(r29)
ffc0a42c: 7f 07 c3 78 mr r7,r24
ffc0a430: 91 41 00 10 stw r10,16(r1)
ffc0a434: 7f 8a e3 78 mr r10,r28
ffc0a438: 92 e1 00 08 stw r23,8(r1)
ffc0a43c: 4c c6 31 82 crclr 4*cr1+eq
ffc0a440: 4e 80 04 21 bctrl
heap->area_begin, heap->area_end,
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
ffc0a444: 2f 9a 00 00 cmpwi cr7,r26,0
ffc0a448: 40 be 00 18 bne+ cr7,ffc0a460 <_Heap_Walk+0xbc>
(*printer)( source, true, "page size is zero\n" );
ffc0a44c: 3c a0 ff c1 lis r5,-63
ffc0a450: 7f c3 f3 78 mr r3,r30
ffc0a454: 38 80 00 01 li r4,1
ffc0a458: 38 a5 7c 89 addi r5,r5,31881
ffc0a45c: 48 00 00 d8 b ffc0a534 <_Heap_Walk+0x190>
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
ffc0a460: 73 47 00 07 andi. r7,r26,7
ffc0a464: 41 a2 00 1c beq+ ffc0a480 <_Heap_Walk+0xdc>
(*printer)(
ffc0a468: 3c a0 ff c1 lis r5,-63
ffc0a46c: 7f c3 f3 78 mr r3,r30
ffc0a470: 38 80 00 01 li r4,1
ffc0a474: 38 a5 7c 9c addi r5,r5,31900
ffc0a478: 7f 46 d3 78 mr r6,r26
ffc0a47c: 48 00 04 3c b ffc0a8b8 <_Heap_Walk+0x514>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
ffc0a480: 7d 38 d3 96 divwu r9,r24,r26
ffc0a484: 7d 29 d1 d6 mullw r9,r9,r26
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
ffc0a488: 7f 98 48 00 cmpw cr7,r24,r9
ffc0a48c: 41 be 00 1c beq+ cr7,ffc0a4a8 <_Heap_Walk+0x104>
(*printer)(
ffc0a490: 3c a0 ff c1 lis r5,-63
ffc0a494: 7f c3 f3 78 mr r3,r30
ffc0a498: 38 80 00 01 li r4,1
ffc0a49c: 38 a5 7c ba addi r5,r5,31930
ffc0a4a0: 7f 06 c3 78 mr r6,r24
ffc0a4a4: 48 00 04 14 b ffc0a8b8 <_Heap_Walk+0x514>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
ffc0a4a8: 39 3c 00 08 addi r9,r28,8
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
ffc0a4ac: 7d 49 d3 96 divwu r10,r9,r26
ffc0a4b0: 7d 4a d1 d6 mullw r10,r10,r26
);
return false;
}
if (
ffc0a4b4: 7f 89 50 00 cmpw cr7,r9,r10
ffc0a4b8: 41 be 00 18 beq+ cr7,ffc0a4d0 <_Heap_Walk+0x12c>
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
ffc0a4bc: 3c a0 ff c1 lis r5,-63
ffc0a4c0: 7f c3 f3 78 mr r3,r30
ffc0a4c4: 38 80 00 01 li r4,1
ffc0a4c8: 38 a5 7c de addi r5,r5,31966
ffc0a4cc: 48 00 03 e8 b ffc0a8b4 <_Heap_Walk+0x510>
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;
ffc0a4d0: 81 3c 00 04 lwz r9,4(r28)
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
ffc0a4d4: 71 27 00 01 andi. r7,r9,1
ffc0a4d8: 40 a2 00 18 bne+ ffc0a4f0 <_Heap_Walk+0x14c>
(*printer)(
ffc0a4dc: 3c a0 ff c1 lis r5,-63
ffc0a4e0: 7f c3 f3 78 mr r3,r30
ffc0a4e4: 38 80 00 01 li r4,1
ffc0a4e8: 38 a5 7d 0f addi r5,r5,32015
ffc0a4ec: 48 00 00 48 b ffc0a534 <_Heap_Walk+0x190>
- 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;
ffc0a4f0: 82 d7 00 04 lwz r22,4(r23)
ffc0a4f4: 56 d6 00 3c rlwinm r22,r22,0,0,30
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
ffc0a4f8: 7e d7 b2 14 add r22,r23,r22
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;
ffc0a4fc: 81 36 00 04 lwz r9,4(r22)
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
ffc0a500: 71 27 00 01 andi. r7,r9,1
ffc0a504: 40 a2 00 18 bne+ ffc0a51c <_Heap_Walk+0x178>
(*printer)(
ffc0a508: 3c a0 ff c1 lis r5,-63
ffc0a50c: 7f c3 f3 78 mr r3,r30
ffc0a510: 38 80 00 01 li r4,1
ffc0a514: 38 a5 7d 3d addi r5,r5,32061
ffc0a518: 48 00 00 1c b ffc0a534 <_Heap_Walk+0x190>
);
return false;
}
if (
ffc0a51c: 7f 96 e0 00 cmpw cr7,r22,r28
ffc0a520: 41 9e 00 24 beq- cr7,ffc0a544 <_Heap_Walk+0x1a0>
_Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block
) {
(*printer)(
ffc0a524: 3c a0 ff c1 lis r5,-63
ffc0a528: 7f c3 f3 78 mr r3,r30
ffc0a52c: 38 80 00 01 li r4,1
ffc0a530: 38 a5 7d 52 addi r5,r5,32082
ffc0a534: 7f e9 03 a6 mtctr r31
ffc0a538: 4c c6 31 82 crclr 4*cr1+eq
ffc0a53c: 4e 80 04 21 bctrl
ffc0a540: 48 00 03 5c b ffc0a89c <_Heap_Walk+0x4f8>
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
ffc0a544: 81 3d 00 10 lwz r9,16(r29)
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
ffc0a548: 7f aa eb 78 mr r10,r29
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
ffc0a54c: 80 dd 00 08 lwz r6,8(r29)
ffc0a550: 48 00 00 bc b ffc0a60c <_Heap_Walk+0x268>
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;
ffc0a554: 80 fd 00 20 lwz r7,32(r29)
ffc0a558: 39 00 00 00 li r8,0
ffc0a55c: 7f 87 30 40 cmplw cr7,r7,r6
ffc0a560: 41 9d 00 14 bgt- cr7,ffc0a574 <_Heap_Walk+0x1d0>
ffc0a564: 81 1d 00 24 lwz r8,36(r29)
ffc0a568: 7d 06 40 10 subfc r8,r6,r8
ffc0a56c: 39 00 00 00 li r8,0
ffc0a570: 7d 08 41 14 adde r8,r8,r8
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 ) ) {
ffc0a574: 2f 88 00 00 cmpwi cr7,r8,0
ffc0a578: 40 be 00 18 bne+ cr7,ffc0a590 <_Heap_Walk+0x1ec>
(*printer)(
ffc0a57c: 3c a0 ff c1 lis r5,-63
ffc0a580: 7f c3 f3 78 mr r3,r30
ffc0a584: 38 80 00 01 li r4,1
ffc0a588: 38 a5 7d 81 addi r5,r5,32129
ffc0a58c: 48 00 03 2c b ffc0a8b8 <_Heap_Walk+0x514>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
ffc0a590: 39 06 00 08 addi r8,r6,8
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
ffc0a594: 7c e8 4b 96 divwu r7,r8,r9
ffc0a598: 7c e7 49 d6 mullw r7,r7,r9
);
return false;
}
if (
ffc0a59c: 7f 88 38 00 cmpw cr7,r8,r7
ffc0a5a0: 41 be 00 18 beq+ cr7,ffc0a5b8 <_Heap_Walk+0x214>
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
ffc0a5a4: 3c a0 ff c1 lis r5,-63
ffc0a5a8: 7f c3 f3 78 mr r3,r30
ffc0a5ac: 38 80 00 01 li r4,1
ffc0a5b0: 38 a5 7d a1 addi r5,r5,32161
ffc0a5b4: 48 00 03 04 b ffc0a8b8 <_Heap_Walk+0x514>
- 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;
ffc0a5b8: 81 06 00 04 lwz r8,4(r6)
ffc0a5bc: 55 08 00 3c rlwinm r8,r8,0,0,30
block = next_block;
} while ( block != first_block );
return true;
}
ffc0a5c0: 7d 06 42 14 add r8,r6,r8
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;
ffc0a5c4: 81 08 00 04 lwz r8,4(r8)
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
ffc0a5c8: 71 07 00 01 andi. r7,r8,1
ffc0a5cc: 41 a2 00 18 beq+ ffc0a5e4 <_Heap_Walk+0x240>
(*printer)(
ffc0a5d0: 3c a0 ff c1 lis r5,-63
ffc0a5d4: 7f c3 f3 78 mr r3,r30
ffc0a5d8: 38 80 00 01 li r4,1
ffc0a5dc: 38 a5 7d d1 addi r5,r5,32209
ffc0a5e0: 48 00 02 d8 b ffc0a8b8 <_Heap_Walk+0x514>
);
return false;
}
if ( free_block->prev != prev_block ) {
ffc0a5e4: 80 e6 00 0c lwz r7,12(r6)
ffc0a5e8: 7f 87 50 00 cmpw cr7,r7,r10
ffc0a5ec: 41 be 00 18 beq+ cr7,ffc0a604 <_Heap_Walk+0x260>
(*printer)(
ffc0a5f0: 3c a0 ff c1 lis r5,-63
ffc0a5f4: 7f c3 f3 78 mr r3,r30
ffc0a5f8: 38 80 00 01 li r4,1
ffc0a5fc: 38 a5 7d ed addi r5,r5,32237
ffc0a600: 48 00 01 38 b ffc0a738 <_Heap_Walk+0x394>
return false;
}
prev_block = free_block;
free_block = free_block->next;
ffc0a604: 7c ca 33 78 mr r10,r6
ffc0a608: 80 c6 00 08 lwz r6,8(r6)
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 ) {
ffc0a60c: 7f 86 e8 00 cmpw cr7,r6,r29
ffc0a610: 40 9e ff 44 bne+ cr7,ffc0a554 <_Heap_Walk+0x1b0>
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
ffc0a614: 3e 80 ff c1 lis r20,-63
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
}
} else if (prev_used) {
(*printer)(
ffc0a618: 3e 60 ff c1 lis r19,-63
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)(
ffc0a61c: 3e 40 ff c1 lis r18,-63
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 ) {
ffc0a620: 7e dc b3 78 mr r28,r22
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
ffc0a624: 3a 94 7f 8d addi r20,r20,32653
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
}
} else if (prev_used) {
(*printer)(
ffc0a628: 3a 73 7f 76 addi r19,r19,32630
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)(
ffc0a62c: 3a 52 7e d9 addi r18,r18,32473
ffc0a630: 3e 20 ff c1 lis r17,-63
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
ffc0a634: 3e a0 ff c1 lis r21,-63
ffc0a638: 3e 00 ff c1 lis r16,-63
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)(
ffc0a63c: 3d e0 ff c1 lis r15,-63
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
ffc0a640: 3d c0 ff c1 lis r14,-63
block = next_block;
} while ( block != first_block );
return true;
}
ffc0a644: 81 7c 00 04 lwz r11,4(r28)
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;
ffc0a648: 7f 89 ba 78 xor r9,r28,r23
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;
ffc0a64c: 81 1d 00 20 lwz r8,32(r29)
ffc0a650: 7d 29 00 34 cntlzw r9,r9
- 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;
ffc0a654: 55 7b 00 3c rlwinm r27,r11,0,0,30
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
ffc0a658: 7f 3b e2 14 add r25,r27,r28
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;
ffc0a65c: 7f 88 c8 40 cmplw cr7,r8,r25
ffc0a660: 55 29 d9 7e rlwinm r9,r9,27,5,31
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;
ffc0a664: 55 6b 07 fe clrlwi r11,r11,31
ffc0a668: 69 29 00 01 xori r9,r9,1
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;
ffc0a66c: 39 40 00 00 li r10,0
ffc0a670: 41 9d 00 14 bgt- cr7,ffc0a684 <_Heap_Walk+0x2e0> <== NEVER TAKEN
ffc0a674: 81 5d 00 24 lwz r10,36(r29)
ffc0a678: 7d 59 50 10 subfc r10,r25,r10
ffc0a67c: 39 40 00 00 li r10,0
ffc0a680: 7d 4a 51 14 adde r10,r10,r10
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
ffc0a684: 2f 8a 00 00 cmpwi cr7,r10,0
ffc0a688: 40 be 00 18 bne+ cr7,ffc0a6a0 <_Heap_Walk+0x2fc>
(*printer)(
ffc0a68c: 3c a0 ff c1 lis r5,-63
ffc0a690: 7f c3 f3 78 mr r3,r30
ffc0a694: 38 80 00 01 li r4,1
ffc0a698: 38 a5 7e 1f addi r5,r5,32287
ffc0a69c: 48 00 00 94 b ffc0a730 <_Heap_Walk+0x38c>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
ffc0a6a0: 7d 5b d3 96 divwu r10,r27,r26
ffc0a6a4: 7d 4a d1 d6 mullw r10,r10,r26
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
ffc0a6a8: 7f 9b 50 00 cmpw cr7,r27,r10
ffc0a6ac: 41 9e 00 28 beq- cr7,ffc0a6d4 <_Heap_Walk+0x330>
ffc0a6b0: 2f 89 00 00 cmpwi cr7,r9,0
ffc0a6b4: 41 be 00 94 beq+ cr7,ffc0a748 <_Heap_Walk+0x3a4>
(*printer)(
ffc0a6b8: 3c a0 ff c1 lis r5,-63
ffc0a6bc: 7f c3 f3 78 mr r3,r30
ffc0a6c0: 38 80 00 01 li r4,1
ffc0a6c4: 38 a5 7e 4c addi r5,r5,32332
ffc0a6c8: 7f 86 e3 78 mr r6,r28
ffc0a6cc: 7f 67 db 78 mr r7,r27
ffc0a6d0: 48 00 00 68 b ffc0a738 <_Heap_Walk+0x394>
);
return false;
}
if ( block_size < min_block_size && is_not_last_block ) {
ffc0a6d4: 7f 9b c0 40 cmplw cr7,r27,r24
ffc0a6d8: 40 9c 00 38 bge- cr7,ffc0a710 <_Heap_Walk+0x36c>
ffc0a6dc: 2f 89 00 00 cmpwi cr7,r9,0
ffc0a6e0: 41 be 00 68 beq+ cr7,ffc0a748 <_Heap_Walk+0x3a4> <== NEVER TAKEN
(*printer)(
ffc0a6e4: 3c a0 ff c1 lis r5,-63
ffc0a6e8: 7f e9 03 a6 mtctr r31
ffc0a6ec: 7f c3 f3 78 mr r3,r30
ffc0a6f0: 38 80 00 01 li r4,1
ffc0a6f4: 38 a5 7e 7a addi r5,r5,32378
ffc0a6f8: 7f 86 e3 78 mr r6,r28
ffc0a6fc: 7f 67 db 78 mr r7,r27
ffc0a700: 7f 08 c3 78 mr r8,r24
ffc0a704: 4c c6 31 82 crclr 4*cr1+eq
ffc0a708: 4e 80 04 21 bctrl
ffc0a70c: 48 00 01 90 b ffc0a89c <_Heap_Walk+0x4f8>
);
return false;
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
ffc0a710: 7f 99 e0 40 cmplw cr7,r25,r28
ffc0a714: 41 9d 00 34 bgt- cr7,ffc0a748 <_Heap_Walk+0x3a4>
ffc0a718: 2f 89 00 00 cmpwi cr7,r9,0
ffc0a71c: 41 be 00 2c beq+ cr7,ffc0a748 <_Heap_Walk+0x3a4>
(*printer)(
ffc0a720: 3c a0 ff c1 lis r5,-63
ffc0a724: 7f c3 f3 78 mr r3,r30
ffc0a728: 38 80 00 01 li r4,1
ffc0a72c: 38 a5 7e a5 addi r5,r5,32421
ffc0a730: 7f 86 e3 78 mr r6,r28
ffc0a734: 7f 27 cb 78 mr r7,r25
ffc0a738: 7f e9 03 a6 mtctr r31
ffc0a73c: 4c c6 31 82 crclr 4*cr1+eq
ffc0a740: 4e 80 04 21 bctrl
ffc0a744: 48 00 01 58 b ffc0a89c <_Heap_Walk+0x4f8>
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;
ffc0a748: 81 39 00 04 lwz r9,4(r25)
);
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
ffc0a74c: 71 27 00 01 andi. r7,r9,1
ffc0a750: 40 a2 00 f4 bne+ ffc0a844 <_Heap_Walk+0x4a0>
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 ?
ffc0a754: 81 1c 00 0c lwz r8,12(r28)
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)(
ffc0a758: 81 3d 00 08 lwz r9,8(r29)
return _Heap_Free_list_head(heap)->next;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap )
{
return _Heap_Free_list_tail(heap)->prev;
ffc0a75c: 80 fd 00 0c lwz r7,12(r29)
ffc0a760: 7f 88 48 00 cmpw cr7,r8,r9
ffc0a764: 41 9e 00 18 beq- cr7,ffc0a77c <_Heap_Walk+0x3d8>
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
ffc0a768: 7f 88 e8 00 cmpw cr7,r8,r29
ffc0a76c: 39 35 7a 9d addi r9,r21,31389
ffc0a770: 40 be 00 10 bne+ cr7,ffc0a780 <_Heap_Walk+0x3dc>
ffc0a774: 39 2e 7b d5 addi r9,r14,31701
ffc0a778: 48 00 00 08 b ffc0a780 <_Heap_Walk+0x3dc>
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)(
ffc0a77c: 39 2f 7b c5 addi r9,r15,31685
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
ffc0a780: 81 5c 00 08 lwz r10,8(r28)
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)(
ffc0a784: 7f 8a 38 00 cmpw cr7,r10,r7
ffc0a788: 41 9e 00 18 beq- cr7,ffc0a7a0 <_Heap_Walk+0x3fc>
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
ffc0a78c: 7f 8a e8 00 cmpw cr7,r10,r29
ffc0a790: 38 f5 7a 9d addi r7,r21,31389
ffc0a794: 40 be 00 10 bne+ cr7,ffc0a7a4 <_Heap_Walk+0x400>
ffc0a798: 38 f0 7b ee addi r7,r16,31726
ffc0a79c: 48 00 00 08 b ffc0a7a4 <_Heap_Walk+0x400>
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)(
ffc0a7a0: 38 f1 7b df addi r7,r17,31711
ffc0a7a4: 90 e1 00 08 stw r7,8(r1)
ffc0a7a8: 7f c3 f3 78 mr r3,r30
ffc0a7ac: 38 80 00 00 li r4,0
ffc0a7b0: 7f e9 03 a6 mtctr r31
ffc0a7b4: 91 61 00 18 stw r11,24(r1)
ffc0a7b8: 7e 45 93 78 mr r5,r18
ffc0a7bc: 7f 86 e3 78 mr r6,r28
ffc0a7c0: 7f 67 db 78 mr r7,r27
ffc0a7c4: 4c c6 31 82 crclr 4*cr1+eq
ffc0a7c8: 4e 80 04 21 bctrl
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
ffc0a7cc: 81 19 00 00 lwz r8,0(r25)
ffc0a7d0: 81 61 00 18 lwz r11,24(r1)
ffc0a7d4: 7f 9b 40 00 cmpw cr7,r27,r8
ffc0a7d8: 41 be 00 30 beq+ cr7,ffc0a808 <_Heap_Walk+0x464>
(*printer)(
ffc0a7dc: 3c a0 ff c1 lis r5,-63
ffc0a7e0: 7f e9 03 a6 mtctr r31
ffc0a7e4: 7f c3 f3 78 mr r3,r30
ffc0a7e8: 38 80 00 01 li r4,1
ffc0a7ec: 38 a5 7f 0e addi r5,r5,32526
ffc0a7f0: 7f 86 e3 78 mr r6,r28
ffc0a7f4: 7f 67 db 78 mr r7,r27
ffc0a7f8: 7f 29 cb 78 mr r9,r25
ffc0a7fc: 4c c6 31 82 crclr 4*cr1+eq
ffc0a800: 4e 80 04 21 bctrl
ffc0a804: 48 00 00 98 b ffc0a89c <_Heap_Walk+0x4f8>
);
return false;
}
if ( !prev_used ) {
ffc0a808: 2f 8b 00 00 cmpwi cr7,r11,0
ffc0a80c: 40 be 00 18 bne+ cr7,ffc0a824 <_Heap_Walk+0x480>
(*printer)(
ffc0a810: 3c a0 ff c1 lis r5,-63
ffc0a814: 7f c3 f3 78 mr r3,r30
ffc0a818: 38 80 00 01 li r4,1
ffc0a81c: 38 a5 7f 47 addi r5,r5,32583
ffc0a820: 48 00 00 94 b ffc0a8b4 <_Heap_Walk+0x510>
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
ffc0a824: 81 3d 00 08 lwz r9,8(r29)
ffc0a828: 48 00 00 10 b ffc0a838 <_Heap_Walk+0x494>
{
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 ) {
ffc0a82c: 7f 89 e0 00 cmpw cr7,r9,r28
ffc0a830: 41 9e 00 5c beq- cr7,ffc0a88c <_Heap_Walk+0x4e8>
return true;
}
free_block = free_block->next;
ffc0a834: 81 29 00 08 lwz r9,8(r9)
)
{
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 ) {
ffc0a838: 7f 89 e8 00 cmpw cr7,r9,r29
ffc0a83c: 40 9e ff f0 bne+ cr7,ffc0a82c <_Heap_Walk+0x488>
ffc0a840: 48 00 00 64 b ffc0a8a4 <_Heap_Walk+0x500>
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
}
} else if (prev_used) {
ffc0a844: 2f 8b 00 00 cmpwi cr7,r11,0
(*printer)(
ffc0a848: 7f c3 f3 78 mr r3,r30
ffc0a84c: 38 80 00 00 li r4,0
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
}
} else if (prev_used) {
ffc0a850: 41 9e 00 20 beq- cr7,ffc0a870 <_Heap_Walk+0x4cc>
(*printer)(
ffc0a854: 7e 65 9b 78 mr r5,r19
ffc0a858: 7f e9 03 a6 mtctr r31
ffc0a85c: 7f 86 e3 78 mr r6,r28
ffc0a860: 7f 67 db 78 mr r7,r27
ffc0a864: 4c c6 31 82 crclr 4*cr1+eq
ffc0a868: 4e 80 04 21 bctrl
ffc0a86c: 48 00 00 20 b ffc0a88c <_Heap_Walk+0x4e8>
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
ffc0a870: 7e 85 a3 78 mr r5,r20
ffc0a874: 81 1c 00 00 lwz r8,0(r28)
ffc0a878: 7f 86 e3 78 mr r6,r28
ffc0a87c: 7f e9 03 a6 mtctr r31
ffc0a880: 7f 67 db 78 mr r7,r27
ffc0a884: 4c c6 31 82 crclr 4*cr1+eq
ffc0a888: 4e 80 04 21 bctrl
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
ffc0a88c: 7f 99 b0 00 cmpw cr7,r25,r22
ffc0a890: 7f 3c cb 78 mr r28,r25
ffc0a894: 40 9e fd b0 bne+ cr7,ffc0a644 <_Heap_Walk+0x2a0>
ffc0a898: 4b ff fb 60 b ffc0a3f8 <_Heap_Walk+0x54>
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
ffc0a89c: 38 60 00 00 li r3,0
ffc0a8a0: 48 00 00 28 b ffc0a8c8 <_Heap_Walk+0x524>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
ffc0a8a4: 3c a0 ff c1 lis r5,-63
ffc0a8a8: 7f c3 f3 78 mr r3,r30
ffc0a8ac: 38 80 00 01 li r4,1
ffc0a8b0: 38 a5 7f b2 addi r5,r5,32690
ffc0a8b4: 7f 86 e3 78 mr r6,r28
ffc0a8b8: 7f e9 03 a6 mtctr r31
ffc0a8bc: 4c c6 31 82 crclr 4*cr1+eq
ffc0a8c0: 4e 80 04 21 bctrl
ffc0a8c4: 4b ff ff d8 b ffc0a89c <_Heap_Walk+0x4f8>
block = next_block;
} while ( block != first_block );
return true;
}
ffc0a8c8: 39 61 00 68 addi r11,r1,104
ffc0a8cc: 4b ff 62 9c b ffc00b68 <_restgpr_14_x>
ffc0a2f4 <_Heap_Walk_print>:
/* Do nothing */
}
static void _Heap_Walk_print( int source, bool error, const char *fmt, ... )
{
ffc0a2f4: 7c 2b 0b 78 mr r11,r1
ffc0a2f8: 7c 08 02 a6 mflr r0
ffc0a2fc: 94 21 ff 88 stwu r1,-120(r1)
ffc0a300: 4b ff 68 61 bl ffc00b60 <_savegpr_31>
ffc0a304: 90 01 00 7c stw r0,124(r1)
ffc0a308: 7c 6b 1b 78 mr r11,r3
ffc0a30c: 90 c1 00 1c stw r6,28(r1)
ffc0a310: 90 e1 00 20 stw r7,32(r1)
ffc0a314: 91 01 00 24 stw r8,36(r1)
ffc0a318: 91 21 00 28 stw r9,40(r1)
ffc0a31c: 91 41 00 2c stw r10,44(r1)
ffc0a320: 40 86 00 24 bne- cr1,ffc0a344 <_Heap_Walk_print+0x50> <== ALWAYS TAKEN
ffc0a324: d8 21 00 30 stfd f1,48(r1) <== NOT EXECUTED
ffc0a328: d8 41 00 38 stfd f2,56(r1) <== NOT EXECUTED
ffc0a32c: d8 61 00 40 stfd f3,64(r1) <== NOT EXECUTED
ffc0a330: d8 81 00 48 stfd f4,72(r1) <== NOT EXECUTED
ffc0a334: d8 a1 00 50 stfd f5,80(r1) <== NOT EXECUTED
ffc0a338: d8 c1 00 58 stfd f6,88(r1) <== NOT EXECUTED
ffc0a33c: d8 e1 00 60 stfd f7,96(r1) <== NOT EXECUTED
ffc0a340: d9 01 00 68 stfd f8,104(r1) <== NOT EXECUTED
va_list ap;
if ( error ) {
ffc0a344: 2f 84 00 00 cmpwi cr7,r4,0
{
/* Do nothing */
}
static void _Heap_Walk_print( int source, bool error, const char *fmt, ... )
{
ffc0a348: 7c bf 2b 78 mr r31,r5
va_list ap;
if ( error ) {
ffc0a34c: 41 be 00 10 beq+ cr7,ffc0a35c <_Heap_Walk_print+0x68>
printk( "FAIL[%d]: ", source );
ffc0a350: 3c 60 ff c1 lis r3,-63
ffc0a354: 38 63 7b af addi r3,r3,31663
ffc0a358: 48 00 00 0c b ffc0a364 <_Heap_Walk_print+0x70>
} else {
printk( "PASS[%d]: ", source );
ffc0a35c: 3c 60 ff c1 lis r3,-63
ffc0a360: 38 63 7b ba addi r3,r3,31674
ffc0a364: 7d 64 5b 78 mr r4,r11
ffc0a368: 4c c6 31 82 crclr 4*cr1+eq
ffc0a36c: 4b ff b3 01 bl ffc0566c <printk>
}
va_start( ap, fmt );
ffc0a370: 39 20 00 03 li r9,3
ffc0a374: 99 21 00 08 stb r9,8(r1)
ffc0a378: 39 20 00 00 li r9,0
vprintk( fmt, ap );
ffc0a37c: 7f e3 fb 78 mr r3,r31
printk( "FAIL[%d]: ", source );
} else {
printk( "PASS[%d]: ", source );
}
va_start( ap, fmt );
ffc0a380: 99 21 00 09 stb r9,9(r1)
ffc0a384: 39 21 00 80 addi r9,r1,128
vprintk( fmt, ap );
ffc0a388: 38 81 00 08 addi r4,r1,8
printk( "FAIL[%d]: ", source );
} else {
printk( "PASS[%d]: ", source );
}
va_start( ap, fmt );
ffc0a38c: 91 21 00 0c stw r9,12(r1)
ffc0a390: 39 21 00 10 addi r9,r1,16
ffc0a394: 91 21 00 10 stw r9,16(r1)
vprintk( fmt, ap );
ffc0a398: 4b ff dd 1d bl ffc080b4 <vprintk>
va_end( ap );
}
ffc0a39c: 39 61 00 78 addi r11,r1,120
ffc0a3a0: 4b ff 68 0c b ffc00bac <_restgpr_31_x>
ffc09dd0 <_Internal_error_Occurred>:
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
ffc09dd0: 94 21 ff d8 stwu r1,-40(r1)
ffc09dd4: 7c 08 02 a6 mflr r0
ffc09dd8: bf a1 00 1c stmw r29,28(r1)
ffc09ddc: 7c 9e 23 78 mr r30,r4
ffc09de0: 7c 7d 1b 78 mr r29,r3
Internal_errors_Source source,
bool is_internal,
Internal_errors_t error
)
{
User_extensions_Fatal_context ctx = { source, is_internal, error };
ffc09de4: 98 81 00 0c stb r4,12(r1)
_User_extensions_Iterate( &ctx, _User_extensions_Fatal_visitor );
ffc09de8: 3c 80 ff c1 lis r4,-63
ffc09dec: 38 84 be 4c addi r4,r4,-16820
Internal_errors_Source source,
bool is_internal,
Internal_errors_t error
)
{
User_extensions_Fatal_context ctx = { source, is_internal, error };
ffc09df0: 90 61 00 08 stw r3,8(r1)
_User_extensions_Iterate( &ctx, _User_extensions_Fatal_visitor );
ffc09df4: 38 61 00 08 addi r3,r1,8
ffc09df8: 7c bf 2b 78 mr r31,r5
ffc09dfc: 90 01 00 2c stw r0,44(r1)
Internal_errors_Source source,
bool is_internal,
Internal_errors_t error
)
{
User_extensions_Fatal_context ctx = { source, is_internal, error };
ffc09e00: 90 a1 00 10 stw r5,16(r1)
_User_extensions_Iterate( &ctx, _User_extensions_Fatal_visitor );
ffc09e04: 48 00 20 6d bl ffc0be70 <_User_extensions_Iterate>
_User_extensions_Fatal( the_source, is_internal, the_error );
_Internal_errors_What_happened.the_source = the_source;
ffc09e08: 3d 40 00 00 lis r10,0
ffc09e0c: 39 2a 31 78 addi r9,r10,12664
ffc09e10: 93 aa 31 78 stw r29,12664(r10)
_Internal_errors_What_happened.is_internal = is_internal;
_Internal_errors_What_happened.the_error = the_error;
_System_state_Set( SYSTEM_STATE_FAILED );
_CPU_Fatal_halt( the_error );
ffc09e14: 7f e3 fb 78 mr r3,r31
)
{
_User_extensions_Fatal( the_source, is_internal, the_error );
_Internal_errors_What_happened.the_source = the_source;
_Internal_errors_What_happened.is_internal = is_internal;
ffc09e18: 9b c9 00 04 stb r30,4(r9)
RTEMS_INLINE_ROUTINE void _System_state_Set (
System_state_Codes state
)
{
_System_state_Current = state;
ffc09e1c: 39 40 00 05 li r10,5
_Internal_errors_What_happened.the_error = the_error;
ffc09e20: 93 e9 00 08 stw r31,8(r9)
ffc09e24: 3d 20 00 00 lis r9,0
ffc09e28: 91 49 28 90 stw r10,10384(r9)
_System_state_Set( SYSTEM_STATE_FAILED );
_CPU_Fatal_halt( the_error );
ffc09e2c: 4b ff 99 35 bl ffc03760 <_BSP_Fatal_error>
ffc09e30: 48 00 00 00 b ffc09e30 <_Internal_error_Occurred+0x60><== NOT EXECUTED
ffc09e48 <_Objects_Allocate>:
#endif
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
ffc09e48: 94 21 ff f0 stwu r1,-16(r1)
ffc09e4c: 7c 08 02 a6 mflr r0
ffc09e50: 90 01 00 14 stw r0,20(r1)
* 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 )
ffc09e54: 81 23 00 18 lwz r9,24(r3)
#endif
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
ffc09e58: bf c1 00 08 stmw r30,8(r1)
ffc09e5c: 7c 7f 1b 78 mr r31,r3
* 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 )
ffc09e60: 2f 89 00 00 cmpwi cr7,r9,0
ffc09e64: 40 be 00 0c bne+ cr7,ffc09e70 <_Objects_Allocate+0x28> <== ALWAYS TAKEN
return NULL;
ffc09e68: 38 60 00 00 li r3,0
ffc09e6c: 48 00 00 70 b ffc09edc <_Objects_Allocate+0x94>
/*
* 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 );
ffc09e70: 3b c3 00 20 addi r30,r3,32
ffc09e74: 7f c3 f3 78 mr r3,r30
ffc09e78: 4b ff f5 b9 bl ffc09430 <_Chain_Get>
if ( information->auto_extend ) {
ffc09e7c: 89 3f 00 12 lbz r9,18(r31)
ffc09e80: 2f 89 00 00 cmpwi cr7,r9,0
ffc09e84: 41 9e 00 58 beq- cr7,ffc09edc <_Objects_Allocate+0x94>
/*
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
ffc09e88: 2f 83 00 00 cmpwi cr7,r3,0
ffc09e8c: 40 be 00 1c bne+ cr7,ffc09ea8 <_Objects_Allocate+0x60>
_Objects_Extend_information( information );
ffc09e90: 7f e3 fb 78 mr r3,r31
ffc09e94: 48 00 00 69 bl ffc09efc <_Objects_Extend_information>
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
ffc09e98: 7f c3 f3 78 mr r3,r30
ffc09e9c: 4b ff f5 95 bl ffc09430 <_Chain_Get>
}
if ( the_object ) {
ffc09ea0: 2c 03 00 00 cmpwi r3,0
ffc09ea4: 41 82 ff c4 beq+ ffc09e68 <_Objects_Allocate+0x20>
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
ffc09ea8: a1 43 00 0a lhz r10,10(r3)
ffc09eac: a1 3f 00 0a lhz r9,10(r31)
ffc09eb0: 7d 29 50 50 subf r9,r9,r10
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
ffc09eb4: a1 5f 00 14 lhz r10,20(r31)
ffc09eb8: 7d 29 53 96 divwu r9,r9,r10
information->inactive_per_block[ block ]--;
ffc09ebc: 81 5f 00 30 lwz r10,48(r31)
ffc09ec0: 55 29 10 3a rlwinm r9,r9,2,0,29
ffc09ec4: 7d 0a 48 2e lwzx r8,r10,r9
ffc09ec8: 39 08 ff ff addi r8,r8,-1
ffc09ecc: 7d 0a 49 2e stwx r8,r10,r9
information->inactive--;
ffc09ed0: a1 3f 00 2c lhz r9,44(r31)
ffc09ed4: 39 29 ff ff addi r9,r9,-1
ffc09ed8: b1 3f 00 2c sth r9,44(r31)
);
}
#endif
return the_object;
}
ffc09edc: 39 61 00 10 addi r11,r1,16
ffc09ee0: 4b ff 66 e0 b ffc005c0 <_restgpr_30_x>
ffc09efc <_Objects_Extend_information>:
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
ffc09efc: 94 21 ff b8 stwu r1,-72(r1)
ffc09f00: 7c 08 02 a6 mflr r0
ffc09f04: 90 01 00 4c stw r0,76(r1)
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
ffc09f08: 81 43 00 34 lwz r10,52(r3)
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
ffc09f0c: be a1 00 1c stmw r21,28(r1)
ffc09f10: 7c 7f 1b 78 mr r31,r3
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
ffc09f14: 2f 8a 00 00 cmpwi cr7,r10,0
/*
* 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 );
ffc09f18: a3 83 00 0a lhz r28,10(r3)
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
ffc09f1c: 41 9e 00 54 beq- cr7,ffc09f70 <_Objects_Extend_information+0x74>
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
ffc09f20: a1 03 00 14 lhz r8,20(r3)
/*
* 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 );
ffc09f24: 7f 9e e3 78 mr r30,r28
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
ffc09f28: a3 a3 00 10 lhz r29,16(r3)
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
ffc09f2c: 3b 60 00 00 li r27,0
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
ffc09f30: 7f bd 43 96 divwu r29,r29,r8
ffc09f34: 2f 9d 00 00 cmpwi cr7,r29,0
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
ffc09f38: 39 3d 00 01 addi r9,r29,1
ffc09f3c: 40 be 00 24 bne+ cr7,ffc09f60 <_Objects_Extend_information+0x64><== ALWAYS TAKEN
ffc09f40: 39 20 00 01 li r9,1 <== NOT EXECUTED
ffc09f44: 48 00 00 1c b ffc09f60 <_Objects_Extend_information+0x64><== NOT EXECUTED
* information - object information table
*
* Output parameters: NONE
*/
void _Objects_Extend_information(
ffc09f48: 57 67 10 3a rlwinm r7,r27,2,0,29
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL ) {
ffc09f4c: 7c ea 38 2e lwzx r7,r10,r7
ffc09f50: 2f 87 00 00 cmpwi cr7,r7,0
ffc09f54: 41 9e 00 30 beq- cr7,ffc09f84 <_Objects_Extend_information+0x88>
* information - object information table
*
* Output parameters: NONE
*/
void _Objects_Extend_information(
ffc09f58: 7f de 42 14 add r30,r30,r8
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
ffc09f5c: 3b 7b 00 01 addi r27,r27,1
ffc09f60: 35 29 ff ff addic. r9,r9,-1
ffc09f64: 40 82 ff e4 bne+ ffc09f48 <_Objects_Extend_information+0x4c>
/*
* 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;
ffc09f68: 3b 40 00 01 li r26,1
ffc09f6c: 48 00 00 1c b ffc09f88 <_Objects_Extend_information+0x8c>
minimum_index = _Objects_Get_index( information->minimum_id );
ffc09f70: 7f 9e e3 78 mr r30,r28
/*
* 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;
ffc09f74: 3b 40 00 01 li r26,1
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
ffc09f78: 3b 60 00 00 li r27,0
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
block_count = 0;
ffc09f7c: 3b a0 00 00 li r29,0
ffc09f80: 48 00 00 08 b ffc09f88 <_Objects_Extend_information+0x8c>
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL ) {
do_extend = false;
ffc09f84: 3b 40 00 00 li r26,0
} else
index_base += information->allocation_size;
}
}
maximum = (uint32_t) information->maximum + information->allocation_size;
ffc09f88: a1 3f 00 14 lhz r9,20(r31)
ffc09f8c: a3 3f 00 10 lhz r25,16(r31)
ffc09f90: 7f 29 ca 14 add r25,r9,r25
/*
* 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 ) {
ffc09f94: 2b 99 ff ff cmplwi cr7,r25,65535
ffc09f98: 41 9d 02 10 bgt- cr7,ffc0a1a8 <_Objects_Extend_information+0x2ac>
/*
* 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;
ffc09f9c: 80 7f 00 18 lwz r3,24(r31)
ffc09fa0: 7c 69 19 d6 mullw r3,r9,r3
if ( information->auto_extend ) {
ffc09fa4: 89 3f 00 12 lbz r9,18(r31)
ffc09fa8: 2f 89 00 00 cmpwi cr7,r9,0
ffc09fac: 41 9e 00 14 beq- cr7,ffc09fc0 <_Objects_Extend_information+0xc4>
new_object_block = _Workspace_Allocate( block_size );
ffc09fb0: 48 00 23 c9 bl ffc0c378 <_Workspace_Allocate>
if ( !new_object_block )
ffc09fb4: 7c 76 1b 79 mr. r22,r3
ffc09fb8: 40 a2 00 10 bne+ ffc09fc8 <_Objects_Extend_information+0xcc>
ffc09fbc: 48 00 01 ec b ffc0a1a8 <_Objects_Extend_information+0x2ac>
return;
} else {
new_object_block = _Workspace_Allocate_or_fatal_error( block_size );
ffc09fc0: 48 00 23 e1 bl ffc0c3a0 <_Workspace_Allocate_or_fatal_error>
ffc09fc4: 7c 76 1b 78 mr r22,r3
}
/*
* Do we need to grow the tables?
*/
if ( do_extend ) {
ffc09fc8: 2f 9a 00 00 cmpwi cr7,r26,0
ffc09fcc: 41 9e 01 58 beq- cr7,ffc0a124 <_Objects_Extend_information+0x228>
*/
/*
* Up the block count and maximum
*/
block_count++;
ffc09fd0: 3b 1d 00 01 addi r24,r29,1
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
ffc09fd4: 1d 38 00 03 mulli r9,r24,3
((maximum + minimum_index) * sizeof(Objects_Control *));
ffc09fd8: 7c 79 e2 14 add r3,r25,r28
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
ffc09fdc: 7c 63 4a 14 add r3,r3,r9
((maximum + minimum_index) * sizeof(Objects_Control *));
if ( information->auto_extend ) {
ffc09fe0: 89 3f 00 12 lbz r9,18(r31)
block_count++;
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
ffc09fe4: 54 63 10 3a rlwinm r3,r3,2,0,29
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
((maximum + minimum_index) * sizeof(Objects_Control *));
if ( information->auto_extend ) {
ffc09fe8: 2f 89 00 00 cmpwi cr7,r9,0
ffc09fec: 41 9e 00 1c beq- cr7,ffc0a008 <_Objects_Extend_information+0x10c>
object_blocks = _Workspace_Allocate( block_size );
ffc09ff0: 48 00 23 89 bl ffc0c378 <_Workspace_Allocate>
if ( !object_blocks ) {
ffc09ff4: 7c 7a 1b 79 mr. r26,r3
ffc09ff8: 40 a2 00 18 bne+ ffc0a010 <_Objects_Extend_information+0x114>
_Workspace_Free( new_object_block );
ffc09ffc: 7e c3 b3 78 mr r3,r22
ffc0a000: 48 00 23 91 bl ffc0c390 <_Workspace_Free>
ffc0a004: 48 00 01 a4 b ffc0a1a8 <_Objects_Extend_information+0x2ac>
return;
}
} else {
object_blocks = _Workspace_Allocate_or_fatal_error( block_size );
ffc0a008: 48 00 23 99 bl ffc0c3a0 <_Workspace_Allocate_or_fatal_error>
ffc0a00c: 7c 7a 1b 78 mr r26,r3
* Take the block count down. Saves all the (block_count - 1)
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
ffc0a010: a1 1f 00 10 lhz r8,16(r31)
/*
* Break the block into the various sections.
*/
inactive_per_block = (uint32_t *) _Addresses_Add_offset(
object_blocks, block_count * sizeof(void*) );
ffc0a014: 57 18 10 3a rlwinm r24,r24,2,0,29
RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset (
const void *base,
uintptr_t offset
)
{
return (void *)((uintptr_t)base + offset);
ffc0a018: 7e fa c2 14 add r23,r26,r24
* Take the block count down. Saves all the (block_count - 1)
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
ffc0a01c: 7f 88 e0 40 cmplw cr7,r8,r28
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
local_table[ index ] = NULL;
ffc0a020: 38 fc 00 01 addi r7,r28,1
ffc0a024: 7f 17 c2 14 add r24,r23,r24
ffc0a028: 7c e9 03 a6 mtctr r7
* Take the block count down. Saves all the (block_count - 1)
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
ffc0a02c: 39 20 00 00 li r9,0
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
local_table[ index ] = NULL;
ffc0a030: 39 40 00 00 li r10,0
* Take the block count down. Saves all the (block_count - 1)
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
ffc0a034: 40 bd 00 50 ble+ cr7,ffc0a084 <_Objects_Extend_information+0x188>
* separate parts as size of each block has changed.
*/
memcpy( object_blocks,
information->object_blocks,
block_count * sizeof(void*) );
ffc0a038: 57 b5 10 3a rlwinm r21,r29,2,0,29
/*
* 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,
ffc0a03c: 80 9f 00 34 lwz r4,52(r31)
ffc0a040: 7e a5 ab 78 mr r5,r21
ffc0a044: 7f 43 d3 78 mr r3,r26
ffc0a048: 48 00 72 69 bl ffc112b0 <memcpy>
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
ffc0a04c: 80 9f 00 30 lwz r4,48(r31)
ffc0a050: 7e a5 ab 78 mr r5,r21
ffc0a054: 7e e3 bb 78 mr r3,r23
ffc0a058: 48 00 72 59 bl ffc112b0 <memcpy>
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
information->local_table,
(information->maximum + minimum_index) * sizeof(Objects_Control *) );
ffc0a05c: a1 3f 00 10 lhz r9,16(r31)
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
ffc0a060: 80 9f 00 1c lwz r4,28(r31)
ffc0a064: 7f 03 c3 78 mr r3,r24
information->local_table,
(information->maximum + minimum_index) * sizeof(Objects_Control *) );
ffc0a068: 7c a9 e2 14 add r5,r9,r28
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
ffc0a06c: 54 a5 10 3a rlwinm r5,r5,2,0,29
ffc0a070: 48 00 72 41 bl ffc112b0 <memcpy>
ffc0a074: 48 00 00 14 b ffc0a088 <_Objects_Extend_information+0x18c>
* information - object information table
*
* Output parameters: NONE
*/
void _Objects_Extend_information(
ffc0a078: 55 28 10 3a rlwinm r8,r9,2,0,29
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
local_table[ index ] = NULL;
ffc0a07c: 7d 48 c1 2e stwx r10,r8,r24
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
ffc0a080: 39 29 00 01 addi r9,r9,1
ffc0a084: 42 00 ff f4 bdnz+ ffc0a078 <_Objects_Extend_information+0x17c>
}
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
ffc0a088: 39 20 00 00 li r9,0
ffc0a08c: 57 bd 10 3a rlwinm r29,r29,2,0,29
ffc0a090: 7d 3a e9 2e stwx r9,r26,r29
inactive_per_block[block_count] = 0;
for ( index=index_base ;
ffc0a094: 7f ca f3 78 mr r10,r30
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
ffc0a098: 38 e0 00 00 li r7,0
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
ffc0a09c: 7d 37 e9 2e stwx r9,r23,r29
for ( index=index_base ;
index < ( information->allocation_size + index_base );
ffc0a0a0: a1 3f 00 14 lhz r9,20(r31)
index++ ) {
local_table[ index ] = NULL;
ffc0a0a4: 7d 1e 4a 14 add r8,r30,r9
ffc0a0a8: 7f 9e 40 40 cmplw cr7,r30,r8
ffc0a0ac: 39 29 00 01 addi r9,r9,1
ffc0a0b0: 41 9d 00 0c bgt- cr7,ffc0a0bc <_Objects_Extend_information+0x1c0><== NEVER TAKEN
ffc0a0b4: 2f 88 00 00 cmpwi cr7,r8,0
ffc0a0b8: 40 be 00 18 bne+ cr7,ffc0a0d0 <_Objects_Extend_information+0x1d4><== ALWAYS TAKEN
ffc0a0bc: 39 20 00 01 li r9,1 <== NOT EXECUTED
ffc0a0c0: 48 00 00 10 b ffc0a0d0 <_Objects_Extend_information+0x1d4><== NOT EXECUTED
* information - object information table
*
* Output parameters: NONE
*/
void _Objects_Extend_information(
ffc0a0c4: 55 48 10 3a rlwinm r8,r10,2,0,29
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
ffc0a0c8: 7c e8 c1 2e stwx r7,r8,r24
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
index++ ) {
ffc0a0cc: 39 4a 00 01 addi r10,r10,1
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
ffc0a0d0: 35 29 ff ff addic. r9,r9,-1
ffc0a0d4: 40 82 ff f0 bne+ ffc0a0c4 <_Objects_Extend_information+0x1c8>
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0a0d8: 7d 40 00 a6 mfmsr r10
ffc0a0dc: 7d 30 42 a6 mfsprg r9,0
ffc0a0e0: 7d 49 48 78 andc r9,r10,r9
ffc0a0e4: 7d 20 01 24 mtmsr r9
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
ffc0a0e8: 81 3f 00 00 lwz r9,0(r31)
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = (Objects_Maximum) maximum;
information->maximum_id = _Objects_Build_id(
ffc0a0ec: a1 1f 00 04 lhz r8,4(r31)
ffc0a0f0: 55 29 c0 0e rlwinm r9,r9,24,0,7
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = (Objects_Maximum) maximum;
ffc0a0f4: b3 3f 00 10 sth r25,16(r31)
ffc0a0f8: 65 29 00 01 oris r9,r9,1
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
ffc0a0fc: 7d 39 cb 78 or r25,r9,r25
local_table[ index ] = NULL;
}
_ISR_Disable( level );
old_tables = information->object_blocks;
ffc0a100: 80 7f 00 34 lwz r3,52(r31)
ffc0a104: 55 08 d8 08 rlwinm r8,r8,27,0,4
information->object_blocks = object_blocks;
ffc0a108: 93 5f 00 34 stw r26,52(r31)
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
ffc0a10c: 7f 39 43 78 or r25,r25,r8
information->inactive_per_block = inactive_per_block;
ffc0a110: 92 ff 00 30 stw r23,48(r31)
information->local_table = local_table;
ffc0a114: 93 1f 00 1c stw r24,28(r31)
information->maximum = (Objects_Maximum) maximum;
information->maximum_id = _Objects_Build_id(
ffc0a118: 93 3f 00 0c stw r25,12(r31)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0a11c: 7d 40 01 24 mtmsr r10
information->maximum
);
_ISR_Enable( level );
_Workspace_Free( old_tables );
ffc0a120: 48 00 22 71 bl ffc0c390 <_Workspace_Free>
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
ffc0a124: 81 3f 00 34 lwz r9,52(r31)
ffc0a128: 57 7b 10 3a rlwinm r27,r27,2,0,29
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
ffc0a12c: 3b a1 00 08 addi r29,r1,8
ffc0a130: a0 bf 00 14 lhz r5,20(r31)
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
ffc0a134: 7e c9 d9 2e stwx r22,r9,r27
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
ffc0a138: 7f a3 eb 78 mr r3,r29
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
ffc0a13c: 3b 9f 00 20 addi r28,r31,32
information->object_blocks[ block ] = new_object_block;
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
ffc0a140: 81 3f 00 34 lwz r9,52(r31)
ffc0a144: 80 df 00 18 lwz r6,24(r31)
ffc0a148: 7c 89 d8 2e lwzx r4,r9,r27
ffc0a14c: 4b ff f3 25 bl ffc09470 <_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 ) {
ffc0a150: 48 00 00 30 b ffc0a180 <_Objects_Extend_information+0x284>
ffc0a154: 81 3f 00 00 lwz r9,0(r31)
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
ffc0a158: 7f 83 e3 78 mr r3,r28
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
the_object->id = _Objects_Build_id(
ffc0a15c: a1 5f 00 04 lhz r10,4(r31)
ffc0a160: 55 29 c0 0e rlwinm r9,r9,24,0,7
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
ffc0a164: 55 4a d8 08 rlwinm r10,r10,27,0,4
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
ffc0a168: 65 29 00 01 oris r9,r9,1
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
ffc0a16c: 7d 29 53 78 or r9,r9,r10
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
ffc0a170: 7d 29 f3 78 or r9,r9,r30
ffc0a174: 91 24 00 08 stw r9,8(r4)
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
ffc0a178: 3b de 00 01 addi r30,r30,1
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
ffc0a17c: 4b ff f2 85 bl ffc09400 <_Chain_Append>
/*
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
ffc0a180: 7f a3 eb 78 mr r3,r29
ffc0a184: 4b ff f2 ad bl ffc09430 <_Chain_Get>
ffc0a188: 7c 64 1b 79 mr. r4,r3
ffc0a18c: 40 82 ff c8 bne+ ffc0a154 <_Objects_Extend_information+0x258>
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
ffc0a190: a1 3f 00 14 lhz r9,20(r31)
ffc0a194: 81 5f 00 30 lwz r10,48(r31)
ffc0a198: 7d 2a d9 2e stwx r9,r10,r27
information->inactive =
(Objects_Maximum)(information->inactive + information->allocation_size);
ffc0a19c: a1 5f 00 2c lhz r10,44(r31)
ffc0a1a0: 7d 29 52 14 add r9,r9,r10
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
information->inactive =
ffc0a1a4: b1 3f 00 2c sth r9,44(r31)
(Objects_Maximum)(information->inactive + information->allocation_size);
}
ffc0a1a8: 39 61 00 48 addi r11,r1,72
ffc0a1ac: 4b ff 63 f0 b ffc0059c <_restgpr_21_x>
ffc0a258 <_Objects_Get_information>:
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint16_t the_class
)
{
ffc0a258: 94 21 ff f0 stwu r1,-16(r1)
ffc0a25c: 7c 08 02 a6 mflr r0
ffc0a260: bf c1 00 08 stmw r30,8(r1)
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
ffc0a264: 7c 9f 23 79 mr. r31,r4
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint16_t the_class
)
{
ffc0a268: 90 01 00 14 stw r0,20(r1)
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
ffc0a26c: 40 a2 00 0c bne+ ffc0a278 <_Objects_Get_information+0x20>
return NULL;
ffc0a270: 38 60 00 00 li r3,0
ffc0a274: 48 00 00 50 b ffc0a2c4 <_Objects_Get_information+0x6c>
ffc0a278: 7c 7e 1b 78 mr r30,r3
/*
* 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 );
ffc0a27c: 48 00 45 69 bl ffc0e7e4 <_Objects_API_maximum_class>
if ( the_class_api_maximum == 0 )
ffc0a280: 2c 03 00 00 cmpwi r3,0
ffc0a284: 41 a2 ff ec beq- ffc0a270 <_Objects_Get_information+0x18>
return NULL;
if ( the_class > (uint32_t) the_class_api_maximum )
ffc0a288: 7f 9f 18 40 cmplw cr7,r31,r3
ffc0a28c: 41 bd ff e4 bgt- cr7,ffc0a270 <_Objects_Get_information+0x18>
return NULL;
if ( !_Objects_Information_table[ the_api ] )
ffc0a290: 3d 20 00 00 lis r9,0
ffc0a294: 57 de 10 3a rlwinm r30,r30,2,0,29
ffc0a298: 39 29 2c 78 addi r9,r9,11384
ffc0a29c: 7d 29 f0 2e lwzx r9,r9,r30
ffc0a2a0: 2f 89 00 00 cmpwi cr7,r9,0
ffc0a2a4: 41 be ff cc beq- cr7,ffc0a270 <_Objects_Get_information+0x18><== NEVER TAKEN
return NULL;
info = _Objects_Information_table[ the_api ][ the_class ];
ffc0a2a8: 57 ff 10 3a rlwinm r31,r31,2,0,29
ffc0a2ac: 7c 69 f8 2e lwzx r3,r9,r31
if ( !info )
ffc0a2b0: 2f 83 00 00 cmpwi cr7,r3,0
ffc0a2b4: 41 be ff bc beq- cr7,ffc0a270 <_Objects_Get_information+0x18><== 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 )
ffc0a2b8: a1 23 00 10 lhz r9,16(r3)
ffc0a2bc: 2f 89 00 00 cmpwi cr7,r9,0
ffc0a2c0: 41 be ff b0 beq- cr7,ffc0a270 <_Objects_Get_information+0x18>
return NULL;
#endif
return info;
}
ffc0a2c4: 39 61 00 10 addi r11,r1,16
ffc0a2c8: 4b ff 62 f8 b ffc005c0 <_restgpr_30_x>
ffc1c818 <_Objects_Get_no_protection>:
/*
* You can't just extract the index portion or you can get tricked
* by a value between 1 and maximum.
*/
index = id - information->minimum_id + 1;
ffc1c818: 81 23 00 08 lwz r9,8(r3)
ffc1c81c: 21 29 00 01 subfic r9,r9,1
ffc1c820: 7c 89 22 14 add r4,r9,r4
if ( information->maximum >= index ) {
ffc1c824: a1 23 00 10 lhz r9,16(r3)
ffc1c828: 7f 89 20 40 cmplw cr7,r9,r4
ffc1c82c: 41 9c 00 24 blt- cr7,ffc1c850 <_Objects_Get_no_protection+0x38>
if ( (the_object = information->local_table[ index ]) != NULL ) {
ffc1c830: 81 23 00 1c lwz r9,28(r3)
ffc1c834: 54 84 10 3a rlwinm r4,r4,2,0,29
ffc1c838: 7c 69 20 2e lwzx r3,r9,r4
ffc1c83c: 2f 83 00 00 cmpwi cr7,r3,0
ffc1c840: 41 9e 00 10 beq- cr7,ffc1c850 <_Objects_Get_no_protection+0x38><== NEVER TAKEN
*location = OBJECTS_LOCAL;
ffc1c844: 39 20 00 00 li r9,0
ffc1c848: 91 25 00 00 stw r9,0(r5)
return the_object;
ffc1c84c: 4e 80 00 20 blr
/*
* This isn't supported or required yet for Global objects so
* if it isn't local, we don't find it.
*/
*location = OBJECTS_ERROR;
ffc1c850: 39 20 00 01 li r9,1
ffc1c854: 91 25 00 00 stw r9,0(r5)
return NULL;
ffc1c858: 38 60 00 00 li r3,0
}
ffc1c85c: 4e 80 00 20 blr
ffc0e280 <_Objects_Id_to_name>:
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
ffc0e280: 7c 2b 0b 78 mr r11,r1
ffc0e284: 94 21 ff e0 stwu r1,-32(r1)
ffc0e288: 7c 08 02 a6 mflr r0
ffc0e28c: 48 01 b3 2d bl ffc295b8 <_savegpr_31>
ffc0e290: 7c 9f 23 78 mr r31,r4
/*
* Caller is trusted for name != NULL.
*/
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
ffc0e294: 7c 64 1b 79 mr. r4,r3
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
ffc0e298: 90 01 00 24 stw r0,36(r1)
/*
* Caller is trusted for name != NULL.
*/
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
ffc0e29c: 40 82 00 10 bne- ffc0e2ac <_Objects_Id_to_name+0x2c>
ffc0e2a0: 3d 20 00 00 lis r9,0
ffc0e2a4: 81 29 3a f0 lwz r9,15088(r9)
ffc0e2a8: 80 89 00 08 lwz r4,8(r9)
*/
RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API(
Objects_Id id
)
{
return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS);
ffc0e2ac: 54 8a 47 7e rlwinm r10,r4,8,29,31
*/
RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid(
uint32_t the_api
)
{
if ( !the_api || the_api > OBJECTS_APIS_LAST )
ffc0e2b0: 39 0a ff ff addi r8,r10,-1
ffc0e2b4: 2b 88 00 02 cmplwi cr7,r8,2
ffc0e2b8: 40 9d 00 4c ble- cr7,ffc0e304 <_Objects_Id_to_name+0x84>
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
ffc0e2bc: 38 60 00 03 li r3,3
ffc0e2c0: 48 00 00 60 b ffc0e320 <_Objects_Id_to_name+0xa0>
if ( !_Objects_Information_table[ the_api ] )
return OBJECTS_INVALID_ID;
the_class = _Objects_Get_class( tmpId );
information = _Objects_Information_table[ the_api ][ the_class ];
ffc0e2c4: 54 88 3e 7a rlwinm r8,r4,7,25,29
ffc0e2c8: 7c 6a 40 2e lwzx r3,r10,r8
if ( !information )
ffc0e2cc: 2f 83 00 00 cmpwi cr7,r3,0
ffc0e2d0: 41 be ff ec beq- cr7,ffc0e2bc <_Objects_Id_to_name+0x3c><== NEVER TAKEN
return OBJECTS_INVALID_ID;
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string )
ffc0e2d4: 89 43 00 38 lbz r10,56(r3)
ffc0e2d8: 2f 8a 00 00 cmpwi cr7,r10,0
ffc0e2dc: 40 9e ff e0 bne+ cr7,ffc0e2bc <_Objects_Id_to_name+0x3c><== NEVER TAKEN
return OBJECTS_INVALID_ID;
#endif
the_object = _Objects_Get( information, tmpId, &ignored_location );
ffc0e2e0: 38 a1 00 08 addi r5,r1,8
ffc0e2e4: 4b ff ff 1d bl ffc0e200 <_Objects_Get>
if ( !the_object )
ffc0e2e8: 2c 03 00 00 cmpwi r3,0
ffc0e2ec: 41 a2 ff d0 beq- ffc0e2bc <_Objects_Id_to_name+0x3c>
return OBJECTS_INVALID_ID;
*name = the_object->name;
ffc0e2f0: 81 23 00 0c lwz r9,12(r3)
ffc0e2f4: 91 3f 00 00 stw r9,0(r31)
_Thread_Enable_dispatch();
ffc0e2f8: 48 00 0e 9d bl ffc0f194 <_Thread_Enable_dispatch>
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
ffc0e2fc: 38 60 00 00 li r3,0
ffc0e300: 48 00 00 20 b ffc0e320 <_Objects_Id_to_name+0xa0>
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
if ( !_Objects_Information_table[ the_api ] )
ffc0e304: 3d 00 00 00 lis r8,0
ffc0e308: 55 4a 10 3a rlwinm r10,r10,2,0,29
ffc0e30c: 39 08 35 78 addi r8,r8,13688
ffc0e310: 7d 48 50 2e lwzx r10,r8,r10
ffc0e314: 2f 8a 00 00 cmpwi cr7,r10,0
ffc0e318: 40 9e ff ac bne+ cr7,ffc0e2c4 <_Objects_Id_to_name+0x44>
ffc0e31c: 4b ff ff a0 b ffc0e2bc <_Objects_Id_to_name+0x3c>
return OBJECTS_INVALID_ID;
*name = the_object->name;
_Thread_Enable_dispatch();
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
}
ffc0e320: 39 61 00 20 addi r11,r1,32
ffc0e324: 4b ff 25 0c b ffc00830 <_restgpr_31_x>
ffc0a99c <_POSIX_Absolute_timeout_to_ticks>:
*/
POSIX_Absolute_timeout_conversion_results_t _POSIX_Absolute_timeout_to_ticks(
const struct timespec *abstime,
Watchdog_Interval *ticks_out
)
{
ffc0a99c: 94 21 ff c8 stwu r1,-56(r1)
ffc0a9a0: 7c 08 02 a6 mflr r0
/*
* Make sure there is always a value returned.
*/
*ticks_out = 0;
ffc0a9a4: 39 20 00 00 li r9,0
*/
POSIX_Absolute_timeout_conversion_results_t _POSIX_Absolute_timeout_to_ticks(
const struct timespec *abstime,
Watchdog_Interval *ticks_out
)
{
ffc0a9a8: bf 81 00 28 stmw r28,40(r1)
ffc0a9ac: 7c 7c 1b 78 mr r28,r3
ffc0a9b0: 7c 9d 23 78 mr r29,r4
ffc0a9b4: 90 01 00 3c stw r0,60(r1)
/*
* Make sure there is always a value returned.
*/
*ticks_out = 0;
ffc0a9b8: 91 24 00 00 stw r9,0(r4)
/*
* Is the absolute time even valid?
*/
if ( !_Timespec_Is_valid(abstime) )
ffc0a9bc: 48 00 44 61 bl ffc0ee1c <_Timespec_Is_valid>
return POSIX_ABSOLUTE_TIMEOUT_INVALID;
ffc0a9c0: 39 20 00 00 li r9,0
*ticks_out = 0;
/*
* Is the absolute time even valid?
*/
if ( !_Timespec_Is_valid(abstime) )
ffc0a9c4: 2f 83 00 00 cmpwi cr7,r3,0
ffc0a9c8: 41 be 00 9c beq+ cr7,ffc0aa64 <_POSIX_Absolute_timeout_to_ticks+0xc8>
)
{
Timestamp_Control tod_as_timestamp;
Timestamp_Control *tod_as_timestamp_ptr;
tod_as_timestamp_ptr =
ffc0a9cc: 3c 80 00 00 lis r4,0
ffc0a9d0: 38 84 2c c0 addi r4,r4,11456
ffc0a9d4: 38 61 00 18 addi r3,r1,24
ffc0a9d8: 48 00 1f 1d bl ffc0c8f4 <_TOD_Get_with_nanoseconds>
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
ffc0a9dc: 3c c0 3b 9a lis r6,15258
/*
* This is the case we were expecting and it took this long to
* get here.
*/
return POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE;
}
ffc0a9e0: 83 c3 00 00 lwz r30,0(r3)
ffc0a9e4: 38 a0 00 00 li r5,0
ffc0a9e8: 83 e3 00 04 lwz r31,4(r3)
ffc0a9ec: 60 c6 ca 00 ori r6,r6,51712
ffc0a9f0: 7f c3 f3 78 mr r3,r30
ffc0a9f4: 7f e4 fb 78 mr r4,r31
ffc0a9f8: 48 00 da b5 bl ffc184ac <__divdi3>
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
ffc0a9fc: 3c c0 3b 9a lis r6,15258
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
ffc0aa00: 90 81 00 10 stw r4,16(r1)
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
ffc0aa04: 38 a0 00 00 li r5,0
ffc0aa08: 60 c6 ca 00 ori r6,r6,51712
ffc0aa0c: 7f c3 f3 78 mr r3,r30
ffc0aa10: 7f e4 fb 78 mr r4,r31
ffc0aa14: 48 00 de bd bl ffc188d0 <__moddi3>
/*
* Is the absolute time in the past?
*/
_TOD_Get( ¤t_time );
if ( _Timespec_Less_than( abstime, ¤t_time ) )
ffc0aa18: 7f 83 e3 78 mr r3,r28
ffc0aa1c: 90 81 00 14 stw r4,20(r1)
ffc0aa20: 38 81 00 10 addi r4,r1,16
ffc0aa24: 48 00 44 39 bl ffc0ee5c <_Timespec_Less_than>
return POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST;
ffc0aa28: 39 20 00 01 li r9,1
/*
* Is the absolute time in the past?
*/
_TOD_Get( ¤t_time );
if ( _Timespec_Less_than( abstime, ¤t_time ) )
ffc0aa2c: 2f 83 00 00 cmpwi cr7,r3,0
ffc0aa30: 40 be 00 34 bne+ cr7,ffc0aa64 <_POSIX_Absolute_timeout_to_ticks+0xc8>
return POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST;
/*
* How long until the requested absolute time?
*/
_Timespec_Subtract( ¤t_time, abstime, &difference );
ffc0aa34: 38 61 00 10 addi r3,r1,16
ffc0aa38: 7f 84 e3 78 mr r4,r28
ffc0aa3c: 38 a1 00 08 addi r5,r1,8
ffc0aa40: 48 00 44 59 bl ffc0ee98 <_Timespec_Subtract>
/*
* Internally the SuperCore uses ticks, so convert to them.
*/
*ticks_out = _Timespec_To_ticks( &difference );
ffc0aa44: 38 61 00 08 addi r3,r1,8
ffc0aa48: 48 00 44 91 bl ffc0eed8 <_Timespec_To_ticks>
/*
* This is the case we were expecting and it took this long to
* get here.
*/
return POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE;
ffc0aa4c: 39 20 00 03 li r9,3
/*
* If the difference was 0, then the future is now. It is so bright
* we better wear shades.
*/
if ( !*ticks_out )
ffc0aa50: 2f 83 00 00 cmpwi cr7,r3,0
_Timespec_Subtract( ¤t_time, abstime, &difference );
/*
* Internally the SuperCore uses ticks, so convert to them.
*/
*ticks_out = _Timespec_To_ticks( &difference );
ffc0aa54: 90 7d 00 00 stw r3,0(r29)
/*
* If the difference was 0, then the future is now. It is so bright
* we better wear shades.
*/
if ( !*ticks_out )
ffc0aa58: 40 9e 00 0c bne- cr7,ffc0aa64 <_POSIX_Absolute_timeout_to_ticks+0xc8><== ALWAYS TAKEN
return POSIX_ABSOLUTE_TIMEOUT_IS_NOW;
ffc0aa5c: 39 20 00 02 li r9,2 <== NOT EXECUTED
ffc0aa60: 48 00 00 04 b ffc0aa64 <_POSIX_Absolute_timeout_to_ticks+0xc8><== NOT EXECUTED
/*
* This is the case we were expecting and it took this long to
* get here.
*/
return POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE;
}
ffc0aa64: 39 61 00 38 addi r11,r1,56
ffc0aa68: 7d 23 4b 78 mr r3,r9
ffc0aa6c: 4b ff 7f 0c b ffc02978 <_restgpr_28_x>
ffc0fe50 <_POSIX_Keys_Run_destructors>:
*/
void _POSIX_Keys_Run_destructors(
Thread_Control *thread
)
{
ffc0fe50: 94 21 ff e0 stwu r1,-32(r1)
ffc0fe54: 7c 08 02 a6 mflr r0
ffc0fe58: 90 01 00 24 stw r0,36(r1)
Objects_Maximum thread_index = _Objects_Get_index( thread->Object.id );
ffc0fe5c: 81 23 00 08 lwz r9,8(r3)
*/
void _POSIX_Keys_Run_destructors(
Thread_Control *thread
)
{
ffc0fe60: bf 41 00 08 stmw r26,8(r1)
*
* 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;
ffc0fe64: 3f c0 00 00 lis r30,0
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 ];
ffc0fe68: 55 3d 13 ba rlwinm r29,r9,2,14,29
ffc0fe6c: 55 29 56 fa rlwinm r9,r9,10,27,29
ffc0fe70: 3b 89 00 10 addi r28,r9,16
if ( value != NULL ) {
key->Values [ thread_api ][ thread_index ] = NULL;
ffc0fe74: 3b 60 00 00 li r27,0
*
* 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;
ffc0fe78: 39 3e 30 58 addi r9,r30,12376
ffc0fe7c: a3 49 00 10 lhz r26,16(r9)
done = true;
for ( index = 1 ; index <= max ; ++index ) {
ffc0fe80: 3b e0 00 01 li r31,1
*/
while ( !done ) {
Objects_Maximum index = 0;
Objects_Maximum max = _POSIX_Keys_Information.maximum;
done = true;
ffc0fe84: 39 40 00 01 li r10,1
for ( index = 1 ; index <= max ; ++index ) {
ffc0fe88: 48 00 00 58 b ffc0fee0 <_POSIX_Keys_Run_destructors+0x90>
POSIX_Keys_Control *key = (POSIX_Keys_Control *)
_POSIX_Keys_Information.local_table [ index ];
ffc0fe8c: 39 3e 30 58 addi r9,r30,12376
Objects_Maximum max = _POSIX_Keys_Information.maximum;
done = true;
for ( index = 1 ; index <= max ; ++index ) {
POSIX_Keys_Control *key = (POSIX_Keys_Control *)
ffc0fe90: 81 09 00 1c lwz r8,28(r9)
ffc0fe94: 57 e9 10 3a rlwinm r9,r31,2,0,29
ffc0fe98: 7d 28 48 2e lwzx r9,r8,r9
_POSIX_Keys_Information.local_table [ index ];
if ( key != NULL && key->destructor != NULL ) {
ffc0fe9c: 2f 89 00 00 cmpwi cr7,r9,0
ffc0fea0: 41 9e 00 38 beq- cr7,ffc0fed8 <_POSIX_Keys_Run_destructors+0x88>
ffc0fea4: 81 09 00 10 lwz r8,16(r9)
ffc0fea8: 2f 88 00 00 cmpwi cr7,r8,0
ffc0feac: 41 9e 00 2c beq- cr7,ffc0fed8 <_POSIX_Keys_Run_destructors+0x88>
void *value = key->Values [ thread_api ][ thread_index ];
ffc0feb0: 7d 09 e2 14 add r8,r9,r28
ffc0feb4: 81 08 00 04 lwz r8,4(r8)
ffc0feb8: 7c 68 e8 2e lwzx r3,r8,r29
if ( value != NULL ) {
ffc0febc: 2f 83 00 00 cmpwi cr7,r3,0
ffc0fec0: 41 9e 00 18 beq- cr7,ffc0fed8 <_POSIX_Keys_Run_destructors+0x88><== ALWAYS TAKEN
key->Values [ thread_api ][ thread_index ] = NULL;
ffc0fec4: 7f 68 e9 2e stwx r27,r8,r29 <== NOT EXECUTED
(*key->destructor)( value );
ffc0fec8: 81 29 00 10 lwz r9,16(r9) <== NOT EXECUTED
ffc0fecc: 7d 29 03 a6 mtctr r9 <== NOT EXECUTED
ffc0fed0: 4e 80 04 21 bctrl <== NOT EXECUTED
done = false;
ffc0fed4: 39 40 00 00 li r10,0 <== NOT EXECUTED
Objects_Maximum index = 0;
Objects_Maximum max = _POSIX_Keys_Information.maximum;
done = true;
for ( index = 1 ; index <= max ; ++index ) {
ffc0fed8: 3b ff 00 01 addi r31,r31,1
ffc0fedc: 57 ff 04 3e clrlwi r31,r31,16
ffc0fee0: 7f 9f d0 40 cmplw cr7,r31,r26
ffc0fee4: 40 bd ff a8 ble- cr7,ffc0fe8c <_POSIX_Keys_Run_destructors+0x3c>
* 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 ) {
ffc0fee8: 2f 8a 00 00 cmpwi cr7,r10,0
ffc0feec: 41 9e ff 8c beq+ cr7,ffc0fe78 <_POSIX_Keys_Run_destructors+0x28><== NEVER TAKEN
done = false;
}
}
}
}
}
ffc0fef0: 39 61 00 20 addi r11,r1,32
ffc0fef4: 4b ff 06 bc b ffc005b0 <_restgpr_26_x>
ffc0d5f0 <_POSIX_Message_queue_Receive_support>:
size_t msg_len,
unsigned int *msg_prio,
bool wait,
Watchdog_Interval timeout
)
{
ffc0d5f0: 94 21 ff c8 stwu r1,-56(r1)
ffc0d5f4: 7c 08 02 a6 mflr r0
ffc0d5f8: bf 61 00 24 stmw r27,36(r1)
ffc0d5fc: 7c 7e 1b 78 mr r30,r3
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(
ffc0d600: 3c 60 00 00 lis r3,0
ffc0d604: 7c 9d 23 78 mr r29,r4
ffc0d608: 91 01 00 18 stw r8,24(r1)
ffc0d60c: 7c bc 2b 78 mr r28,r5
ffc0d610: 38 63 36 4c addi r3,r3,13900
ffc0d614: 90 01 00 3c stw r0,60(r1)
ffc0d618: 7f c4 f3 78 mr r4,r30
ffc0d61c: 38 a1 00 0c addi r5,r1,12
ffc0d620: 7c df 33 78 mr r31,r6
ffc0d624: 7c fb 3b 78 mr r27,r7
ffc0d628: 48 00 34 dd bl ffc10b04 <_Objects_Get>
Objects_Locations location;
size_t length_out;
bool do_wait;
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
ffc0d62c: 81 21 00 0c lwz r9,12(r1)
ffc0d630: 81 01 00 18 lwz r8,24(r1)
ffc0d634: 2f 89 00 00 cmpwi cr7,r9,0
ffc0d638: 40 9e 00 d0 bne- cr7,ffc0d708 <_POSIX_Message_queue_Receive_support+0x118>
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) {
ffc0d63c: 81 43 00 14 lwz r10,20(r3)
ffc0d640: 55 49 07 be clrlwi r9,r10,30
ffc0d644: 2f 89 00 01 cmpwi cr7,r9,1
ffc0d648: 40 be 00 0c bne+ cr7,ffc0d654 <_POSIX_Message_queue_Receive_support+0x64>
_Thread_Enable_dispatch();
ffc0d64c: 48 00 43 ad bl ffc119f8 <_Thread_Enable_dispatch>
ffc0d650: 48 00 00 b8 b ffc0d708 <_POSIX_Message_queue_Receive_support+0x118>
rtems_set_errno_and_return_minus_one( EBADF );
}
the_mq = the_mq_fd->Queue;
ffc0d654: 80 63 00 10 lwz r3,16(r3)
if ( msg_len < the_mq->Message_queue.maximum_message_size ) {
ffc0d658: 81 23 00 68 lwz r9,104(r3)
ffc0d65c: 7f 9c 48 40 cmplw cr7,r28,r9
ffc0d660: 40 bc 00 14 bge+ cr7,ffc0d674 <_POSIX_Message_queue_Receive_support+0x84>
_Thread_Enable_dispatch();
ffc0d664: 48 00 43 95 bl ffc119f8 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EMSGSIZE );
ffc0d668: 48 00 9d 71 bl ffc173d8 <__errno>
ffc0d66c: 39 20 00 7a li r9,122
ffc0d670: 48 00 00 a0 b ffc0d710 <_POSIX_Message_queue_Receive_support+0x120>
length_out = -1;
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
ffc0d674: 2f 9b 00 00 cmpwi cr7,r27,0
/*
* Now if something goes wrong, we return a "length" of -1
* to indicate an error.
*/
length_out = -1;
ffc0d678: 39 20 ff ff li r9,-1
ffc0d67c: 91 21 00 08 stw r9,8(r1)
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
ffc0d680: 38 e0 00 00 li r7,0
ffc0d684: 41 9e 00 0c beq- cr7,ffc0d690 <_POSIX_Message_queue_Receive_support+0xa0>
do_wait = (the_mq_fd->oflag & O_NONBLOCK) ? false : true;
ffc0d688: 69 49 40 00 xori r9,r10,16384
ffc0d68c: 55 27 97 fe rlwinm r7,r9,18,31,31
do_wait = wait;
/*
* Now perform the actual message receive
*/
_CORE_message_queue_Seize(
ffc0d690: 38 63 00 1c addi r3,r3,28
ffc0d694: 7f c4 f3 78 mr r4,r30
ffc0d698: 7f a5 eb 78 mr r5,r29
ffc0d69c: 38 c1 00 08 addi r6,r1,8
ffc0d6a0: 48 00 22 e5 bl ffc0f984 <_CORE_message_queue_Seize>
&length_out,
do_wait,
timeout
);
_Thread_Enable_dispatch();
ffc0d6a4: 48 00 43 55 bl ffc119f8 <_Thread_Enable_dispatch>
if (msg_prio) {
ffc0d6a8: 2f 9f 00 00 cmpwi cr7,r31,0
ffc0d6ac: 41 9e 00 20 beq- cr7,ffc0d6cc <_POSIX_Message_queue_Receive_support+0xdc><== NEVER TAKEN
*msg_prio = _POSIX_Message_queue_Priority_from_core(
_Thread_Executing->Wait.count
ffc0d6b0: 3d 20 00 00 lis r9,0
ffc0d6b4: 81 29 36 f0 lwz r9,14064(r9)
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);
ffc0d6b8: 81 29 00 24 lwz r9,36(r9)
ffc0d6bc: 7d 2a fe 70 srawi r10,r9,31
ffc0d6c0: 7d 49 4a 78 xor r9,r10,r9
ffc0d6c4: 7d 2a 48 50 subf r9,r10,r9
timeout
);
_Thread_Enable_dispatch();
if (msg_prio) {
*msg_prio = _POSIX_Message_queue_Priority_from_core(
ffc0d6c8: 91 3f 00 00 stw r9,0(r31)
_Thread_Executing->Wait.count
);
}
if ( !_Thread_Executing->Wait.return_code )
ffc0d6cc: 3f e0 00 00 lis r31,0
ffc0d6d0: 3b ff 36 e0 addi r31,r31,14048
ffc0d6d4: 81 3f 00 10 lwz r9,16(r31)
ffc0d6d8: 81 29 00 34 lwz r9,52(r9)
ffc0d6dc: 2f 89 00 00 cmpwi cr7,r9,0
ffc0d6e0: 40 9e 00 0c bne- cr7,ffc0d6ec <_POSIX_Message_queue_Receive_support+0xfc>
return length_out;
ffc0d6e4: 80 61 00 08 lwz r3,8(r1)
ffc0d6e8: 48 00 00 30 b ffc0d718 <_POSIX_Message_queue_Receive_support+0x128>
rtems_set_errno_and_return_minus_one(
ffc0d6ec: 48 00 9c ed bl ffc173d8 <__errno>
ffc0d6f0: 81 3f 00 10 lwz r9,16(r31)
ffc0d6f4: 7c 7e 1b 78 mr r30,r3
ffc0d6f8: 80 69 00 34 lwz r3,52(r9)
ffc0d6fc: 48 00 02 85 bl ffc0d980 <_POSIX_Message_queue_Translate_core_message_queue_return_code>
ffc0d700: 90 7e 00 00 stw r3,0(r30)
ffc0d704: 48 00 00 10 b ffc0d714 <_POSIX_Message_queue_Receive_support+0x124>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
ffc0d708: 48 00 9c d1 bl ffc173d8 <__errno>
ffc0d70c: 39 20 00 09 li r9,9
ffc0d710: 91 23 00 00 stw r9,0(r3)
ffc0d714: 38 60 ff ff li r3,-1
}
ffc0d718: 39 61 00 38 addi r11,r1,56
ffc0d71c: 4b ff 81 80 b ffc0589c <_restgpr_27_x>
ffc0fd18 <_POSIX_Semaphore_Create_support>:
POSIX_Semaphore_Control *the_semaphore;
CORE_semaphore_Attributes *the_sem_attr;
char *name;
/* Sharing semaphores among processes is not currently supported */
if (pshared != 0)
ffc0fd18: 2f 85 00 00 cmpwi cr7,r5,0
size_t name_len,
int pshared,
unsigned int value,
POSIX_Semaphore_Control **the_sem
)
{
ffc0fd1c: 94 21 ff d8 stwu r1,-40(r1)
ffc0fd20: 7c 08 02 a6 mflr r0
ffc0fd24: bf 61 00 14 stmw r27,20(r1)
ffc0fd28: 90 01 00 2c stw r0,44(r1)
POSIX_Semaphore_Control *the_semaphore;
CORE_semaphore_Attributes *the_sem_attr;
char *name;
/* Sharing semaphores among processes is not currently supported */
if (pshared != 0)
ffc0fd2c: 41 be 00 10 beq+ cr7,ffc0fd3c <_POSIX_Semaphore_Create_support+0x24>
rtems_set_errno_and_return_minus_one( ENOSYS );
ffc0fd30: 48 00 27 e5 bl ffc12514 <__errno>
ffc0fd34: 39 20 00 58 li r9,88
ffc0fd38: 48 00 00 4c b ffc0fd84 <_POSIX_Semaphore_Create_support+0x6c>
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
ffc0fd3c: 3d 20 00 00 lis r9,0
ffc0fd40: 81 49 28 a8 lwz r10,10408(r9)
ffc0fd44: 7c 7e 1b 78 mr r30,r3
ffc0fd48: 7c db 33 78 mr r27,r6
++level;
ffc0fd4c: 39 4a 00 01 addi r10,r10,1
_Thread_Dispatch_disable_level = level;
ffc0fd50: 91 49 28 a8 stw r10,10408(r9)
ffc0fd54: 7c fc 3b 78 mr r28,r7
* _POSIX_Semaphore_Allocate
*/
RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void )
{
return (POSIX_Semaphore_Control *)
ffc0fd58: 3f a0 00 00 lis r29,0
ffc0fd5c: 90 81 00 08 stw r4,8(r1)
ffc0fd60: 3b bd 59 00 addi r29,r29,22784
ffc0fd64: 7f a3 eb 78 mr r3,r29
ffc0fd68: 4b ff bd 25 bl ffc0ba8c <_Objects_Allocate>
_Thread_Disable_dispatch();
the_semaphore = _POSIX_Semaphore_Allocate();
if ( !the_semaphore ) {
ffc0fd6c: 80 81 00 08 lwz r4,8(r1)
ffc0fd70: 7c 7f 1b 79 mr. r31,r3
ffc0fd74: 40 a2 00 1c bne+ ffc0fd90 <_POSIX_Semaphore_Create_support+0x78>
_Thread_Enable_dispatch();
ffc0fd78: 4b ff d1 51 bl ffc0cec8 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( ENOSPC );
ffc0fd7c: 48 00 27 99 bl ffc12514 <__errno>
ffc0fd80: 39 20 00 1c li r9,28
ffc0fd84: 91 23 00 00 stw r9,0(r3)
ffc0fd88: 38 60 ff ff li r3,-1
ffc0fd8c: 48 00 00 b4 b ffc0fe40 <_POSIX_Semaphore_Create_support+0x128>
/*
* Make a copy of the user's string for name just in case it was
* dynamically constructed.
*/
if ( name_arg != NULL ) {
ffc0fd90: 2f 9e 00 00 cmpwi cr7,r30,0
ffc0fd94: 41 9e 00 30 beq- cr7,ffc0fdc4 <_POSIX_Semaphore_Create_support+0xac>
name = _Workspace_String_duplicate( name_arg, name_len );
ffc0fd98: 7f c3 f3 78 mr r3,r30
ffc0fd9c: 48 00 0f a1 bl ffc10d3c <_Workspace_String_duplicate>
if ( !name ) {
ffc0fda0: 7c 7e 1b 79 mr. r30,r3
ffc0fda4: 40 a2 00 24 bne+ ffc0fdc8 <_POSIX_Semaphore_Create_support+0xb0><== ALWAYS TAKEN
RTEMS_INLINE_ROUTINE void _POSIX_Semaphore_Free (
POSIX_Semaphore_Control *the_semaphore
)
{
_Objects_Free( &_POSIX_Semaphore_Information, &the_semaphore->Object );
ffc0fda8: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED
ffc0fdac: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED
ffc0fdb0: 4b ff c0 45 bl ffc0bdf4 <_Objects_Free> <== NOT EXECUTED
_POSIX_Semaphore_Free( the_semaphore );
_Thread_Enable_dispatch();
ffc0fdb4: 4b ff d1 15 bl ffc0cec8 <_Thread_Enable_dispatch> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOMEM );
ffc0fdb8: 48 00 27 5d bl ffc12514 <__errno> <== NOT EXECUTED
ffc0fdbc: 39 20 00 0c li r9,12 <== NOT EXECUTED
ffc0fdc0: 4b ff ff c4 b ffc0fd84 <_POSIX_Semaphore_Create_support+0x6c><== NOT EXECUTED
}
} else {
name = NULL;
ffc0fdc4: 3b c0 00 00 li r30,0
}
the_semaphore->process_shared = pshared;
if ( name ) {
ffc0fdc8: 2f 9e 00 00 cmpwi cr7,r30,0
}
} else {
name = NULL;
}
the_semaphore->process_shared = pshared;
ffc0fdcc: 39 20 00 00 li r9,0
ffc0fdd0: 91 3f 00 10 stw r9,16(r31)
if ( name ) {
ffc0fdd4: 41 9e 00 1c beq- cr7,ffc0fdf0 <_POSIX_Semaphore_Create_support+0xd8>
the_semaphore->named = true;
ffc0fdd8: 39 20 00 01 li r9,1
ffc0fddc: 99 3f 00 14 stb r9,20(r31)
the_semaphore->open_count = 1;
ffc0fde0: 39 20 00 01 li r9,1
ffc0fde4: 91 3f 00 18 stw r9,24(r31)
the_semaphore->linked = true;
ffc0fde8: 99 3f 00 15 stb r9,21(r31)
ffc0fdec: 48 00 00 10 b ffc0fdfc <_POSIX_Semaphore_Create_support+0xe4>
} else {
the_semaphore->named = false;
ffc0fdf0: 9b df 00 14 stb r30,20(r31)
the_semaphore->open_count = 0;
ffc0fdf4: 93 df 00 18 stw r30,24(r31)
the_semaphore->linked = false;
ffc0fdf8: 9b df 00 15 stb r30,21(r31)
* 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;
ffc0fdfc: 39 20 00 00 li r9,0
ffc0fe00: 91 3f 00 60 stw r9,96(r31)
/*
* This effectively disables limit checking.
*/
the_sem_attr->maximum_count = 0xFFFFFFFF;
ffc0fe04: 39 20 ff ff li r9,-1
_CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value );
ffc0fe08: 38 7f 00 1c addi r3,r31,28
the_sem_attr->discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO;
/*
* This effectively disables limit checking.
*/
the_sem_attr->maximum_count = 0xFFFFFFFF;
ffc0fe0c: 91 3f 00 5c stw r9,92(r31)
_CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value );
ffc0fe10: 38 9f 00 5c addi r4,r31,92
ffc0fe14: 7f 65 db 78 mr r5,r27
ffc0fe18: 4b ff b6 35 bl ffc0b44c <_CORE_semaphore_Initialize>
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
_Objects_Set_local_object(
ffc0fe1c: a1 3f 00 0a lhz r9,10(r31)
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
ffc0fe20: 3d 40 00 00 lis r10,0
ffc0fe24: 81 4a 59 1c lwz r10,22812(r10)
ffc0fe28: 55 29 10 3a rlwinm r9,r9,2,0,29
ffc0fe2c: 7f ea 49 2e stwx r31,r10,r9
the_object
);
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
/* ASSERT: information->is_string */
the_object->name.name_p = name;
ffc0fe30: 93 df 00 0c stw r30,12(r31)
&_POSIX_Semaphore_Information,
&the_semaphore->Object,
name
);
*the_sem = the_semaphore;
ffc0fe34: 93 fc 00 00 stw r31,0(r28)
_Thread_Enable_dispatch();
ffc0fe38: 4b ff d0 91 bl ffc0cec8 <_Thread_Enable_dispatch>
return 0;
ffc0fe3c: 38 60 00 00 li r3,0
}
ffc0fe40: 39 61 00 28 addi r11,r1,40
ffc0fe44: 48 00 cf 60 b ffc1cda4 <_restgpr_27_x>
ffc0d3e8 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>:
Thread_Control *the_thread
)
{
POSIX_API_Control *thread_support;
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
ffc0d3e8: 81 23 01 50 lwz r9,336(r3)
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
ffc0d3ec: 81 49 00 d8 lwz r10,216(r9)
ffc0d3f0: 2f 8a 00 00 cmpwi cr7,r10,0
ffc0d3f4: 40 9e 00 34 bne- cr7,ffc0d428 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x40><== NEVER TAKEN
ffc0d3f8: 81 49 00 dc lwz r10,220(r9)
ffc0d3fc: 2f 8a 00 01 cmpwi cr7,r10,1
ffc0d400: 40 be 00 28 bne+ cr7,ffc0d428 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x40>
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
ffc0d404: 81 29 00 e0 lwz r9,224(r9)
ffc0d408: 2f 89 00 00 cmpwi cr7,r9,0
ffc0d40c: 41 be 00 1c beq+ cr7,ffc0d428 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x40>
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
ffc0d410: 3d 20 00 00 lis r9,0
ffc0d414: 81 49 28 70 lwz r10,10352(r9)
thread_support->cancelation_requested ) {
_Thread_Unnest_dispatch();
_POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED );
ffc0d418: 38 80 ff ff li r4,-1
--level;
ffc0d41c: 39 4a ff ff addi r10,r10,-1
_Thread_Dispatch_disable_level = level;
ffc0d420: 91 49 28 70 stw r10,10352(r9)
ffc0d424: 48 00 06 94 b ffc0dab8 <_POSIX_Thread_Exit>
} else
_Thread_Enable_dispatch();
ffc0d428: 4b ff db 3c b ffc0af64 <_Thread_Enable_dispatch>
ffc0e7e4 <_POSIX_Thread_Translate_sched_param>:
int policy,
struct sched_param *param,
Thread_CPU_budget_algorithms *budget_algorithm,
Thread_CPU_budget_algorithm_callout *budget_callout
)
{
ffc0e7e4: 94 21 ff e8 stwu r1,-24(r1)
ffc0e7e8: 7c 08 02 a6 mflr r0
ffc0e7ec: bf 81 00 08 stmw r28,8(r1)
ffc0e7f0: 7c 7e 1b 78 mr r30,r3
ffc0e7f4: 7c 9f 23 78 mr r31,r4
if ( !_POSIX_Priority_Is_valid( param->sched_priority ) )
ffc0e7f8: 80 64 00 00 lwz r3,0(r4)
int policy,
struct sched_param *param,
Thread_CPU_budget_algorithms *budget_algorithm,
Thread_CPU_budget_algorithm_callout *budget_callout
)
{
ffc0e7fc: 7c bd 2b 78 mr r29,r5
ffc0e800: 90 01 00 1c stw r0,28(r1)
ffc0e804: 7c dc 33 78 mr r28,r6
if ( !_POSIX_Priority_Is_valid( param->sched_priority ) )
ffc0e808: 4b ff ff b5 bl ffc0e7bc <_POSIX_Priority_Is_valid>
ffc0e80c: 2f 83 00 00 cmpwi cr7,r3,0
ffc0e810: 40 9e 00 0c bne- cr7,ffc0e81c <_POSIX_Thread_Translate_sched_param+0x38><== ALWAYS TAKEN
return EINVAL;
ffc0e814: 38 60 00 16 li r3,22
ffc0e818: 48 00 00 b8 b ffc0e8d0 <_POSIX_Thread_Translate_sched_param+0xec>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
*budget_callout = NULL;
if ( policy == SCHED_OTHER ) {
ffc0e81c: 2f 9e 00 00 cmpwi cr7,r30,0
)
{
if ( !_POSIX_Priority_Is_valid( param->sched_priority ) )
return EINVAL;
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
ffc0e820: 39 20 00 00 li r9,0
ffc0e824: 91 3d 00 00 stw r9,0(r29)
*budget_callout = NULL;
ffc0e828: 91 3c 00 00 stw r9,0(r28)
if ( policy == SCHED_OTHER ) {
ffc0e82c: 40 be 00 10 bne+ cr7,ffc0e83c <_POSIX_Thread_Translate_sched_param+0x58>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
ffc0e830: 39 20 00 01 li r9,1
ffc0e834: 91 3d 00 00 stw r9,0(r29)
ffc0e838: 48 00 00 94 b ffc0e8cc <_POSIX_Thread_Translate_sched_param+0xe8>
return 0;
}
if ( policy == SCHED_FIFO ) {
ffc0e83c: 2f 9e 00 01 cmpwi cr7,r30,1
ffc0e840: 41 9e 00 8c beq- cr7,ffc0e8cc <_POSIX_Thread_Translate_sched_param+0xe8>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
return 0;
}
if ( policy == SCHED_RR ) {
ffc0e844: 2f 9e 00 02 cmpwi cr7,r30,2
ffc0e848: 40 be 00 0c bne+ cr7,ffc0e854 <_POSIX_Thread_Translate_sched_param+0x70>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE;
ffc0e84c: 93 dd 00 00 stw r30,0(r29)
ffc0e850: 48 00 00 7c b ffc0e8cc <_POSIX_Thread_Translate_sched_param+0xe8>
return 0;
}
if ( policy == SCHED_SPORADIC ) {
ffc0e854: 2f 9e 00 04 cmpwi cr7,r30,4
ffc0e858: 40 9e ff bc bne+ cr7,ffc0e814 <_POSIX_Thread_Translate_sched_param+0x30>
if ( (param->sched_ss_repl_period.tv_sec == 0) &&
ffc0e85c: 81 3f 00 08 lwz r9,8(r31)
ffc0e860: 2f 89 00 00 cmpwi cr7,r9,0
ffc0e864: 40 9e 00 10 bne- cr7,ffc0e874 <_POSIX_Thread_Translate_sched_param+0x90>
ffc0e868: 81 3f 00 0c lwz r9,12(r31)
ffc0e86c: 2f 89 00 00 cmpwi cr7,r9,0
ffc0e870: 41 9e ff a4 beq+ cr7,ffc0e814 <_POSIX_Thread_Translate_sched_param+0x30>
(param->sched_ss_repl_period.tv_nsec == 0) )
return EINVAL;
if ( (param->sched_ss_init_budget.tv_sec == 0) &&
ffc0e874: 81 3f 00 10 lwz r9,16(r31)
ffc0e878: 2f 89 00 00 cmpwi cr7,r9,0
ffc0e87c: 40 9e 00 10 bne- cr7,ffc0e88c <_POSIX_Thread_Translate_sched_param+0xa8>
ffc0e880: 81 3f 00 14 lwz r9,20(r31)
ffc0e884: 2f 89 00 00 cmpwi cr7,r9,0
ffc0e888: 41 9e ff 8c beq+ cr7,ffc0e814 <_POSIX_Thread_Translate_sched_param+0x30>
(param->sched_ss_init_budget.tv_nsec == 0) )
return EINVAL;
if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) <
ffc0e88c: 38 7f 00 08 addi r3,r31,8
ffc0e890: 4b ff e0 a1 bl ffc0c930 <_Timespec_To_ticks>
ffc0e894: 7c 7e 1b 78 mr r30,r3
_Timespec_To_ticks( ¶m->sched_ss_init_budget ) )
ffc0e898: 38 7f 00 10 addi r3,r31,16
ffc0e89c: 4b ff e0 95 bl ffc0c930 <_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 ) <
ffc0e8a0: 7f 9e 18 40 cmplw cr7,r30,r3
ffc0e8a4: 41 9c ff 70 blt+ cr7,ffc0e814 <_POSIX_Thread_Translate_sched_param+0x30>
_Timespec_To_ticks( ¶m->sched_ss_init_budget ) )
return EINVAL;
if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) )
ffc0e8a8: 80 7f 00 04 lwz r3,4(r31)
ffc0e8ac: 4b ff ff 11 bl ffc0e7bc <_POSIX_Priority_Is_valid>
ffc0e8b0: 2f 83 00 00 cmpwi cr7,r3,0
ffc0e8b4: 41 9e ff 60 beq+ cr7,ffc0e814 <_POSIX_Thread_Translate_sched_param+0x30>
return EINVAL;
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT;
ffc0e8b8: 39 20 00 03 li r9,3
ffc0e8bc: 91 3d 00 00 stw r9,0(r29)
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
ffc0e8c0: 3d 20 ff c1 lis r9,-63
ffc0e8c4: 39 29 8a dc addi r9,r9,-29988
ffc0e8c8: 91 3c 00 00 stw r9,0(r28)
return 0;
}
if ( policy == SCHED_FIFO ) {
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
return 0;
ffc0e8cc: 38 60 00 00 li r3,0
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
return 0;
}
return EINVAL;
}
ffc0e8d0: 39 61 00 18 addi r11,r1,24
ffc0e8d4: 4b ff 22 d0 b ffc00ba4 <_restgpr_28_x>
ffc0db30 <_POSIX_Threads_Delete_extension>:
*/
static void _POSIX_Threads_Delete_extension(
Thread_Control *executing __attribute__((unused)),
Thread_Control *deleted
)
{
ffc0db30: 94 21 ff e8 stwu r1,-24(r1)
ffc0db34: 7c 08 02 a6 mflr r0
api = deleted->API_Extensions[ THREAD_API_POSIX ];
/*
* Run the POSIX cancellation handlers
*/
_POSIX_Threads_cancel_run( deleted );
ffc0db38: 7c 83 23 78 mr r3,r4
*/
static void _POSIX_Threads_Delete_extension(
Thread_Control *executing __attribute__((unused)),
Thread_Control *deleted
)
{
ffc0db3c: bf 81 00 08 stmw r28,8(r1)
ffc0db40: 7c 9f 23 78 mr r31,r4
Thread_Control *the_thread;
POSIX_API_Control *api;
void **value_ptr;
api = deleted->API_Extensions[ THREAD_API_POSIX ];
ffc0db44: 83 c4 01 50 lwz r30,336(r4)
*/
static void _POSIX_Threads_Delete_extension(
Thread_Control *executing __attribute__((unused)),
Thread_Control *deleted
)
{
ffc0db48: 90 01 00 1c stw r0,28(r1)
api = deleted->API_Extensions[ THREAD_API_POSIX ];
/*
* Run the POSIX cancellation handlers
*/
_POSIX_Threads_cancel_run( deleted );
ffc0db4c: 48 00 22 8d bl ffc0fdd8 <_POSIX_Threads_cancel_run>
/*
* Run all the key destructors
*/
_POSIX_Keys_Run_destructors( deleted );
ffc0db50: 7f e3 fb 78 mr r3,r31
ffc0db54: 48 00 22 fd bl ffc0fe50 <_POSIX_Keys_Run_destructors>
/*
* 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 )) )
ffc0db58: 3b be 00 44 addi r29,r30,68
_POSIX_Keys_Run_destructors( deleted );
/*
* Wakeup all the tasks which joined with this one
*/
value_ptr = (void **) deleted->Wait.return_argument;
ffc0db5c: 83 9f 00 28 lwz r28,40(r31)
while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) )
ffc0db60: 48 00 00 0c b ffc0db6c <_POSIX_Threads_Delete_extension+0x3c>
*(void **)the_thread->Wait.return_argument = value_ptr;
ffc0db64: 81 23 00 28 lwz r9,40(r3) <== NOT EXECUTED
ffc0db68: 93 89 00 00 stw r28,0(r9) <== 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 )) )
ffc0db6c: 7f a3 eb 78 mr r3,r29
ffc0db70: 4b ff da 71 bl ffc0b5e0 <_Thread_queue_Dequeue>
ffc0db74: 2c 03 00 00 cmpwi r3,0
ffc0db78: 40 82 ff ec bne+ ffc0db64 <_POSIX_Threads_Delete_extension+0x34><== NEVER TAKEN
*(void **)the_thread->Wait.return_argument = value_ptr;
if ( api->schedpolicy == SCHED_SPORADIC )
ffc0db7c: 81 3e 00 84 lwz r9,132(r30)
ffc0db80: 2f 89 00 04 cmpwi cr7,r9,4
ffc0db84: 40 be 00 0c bne+ cr7,ffc0db90 <_POSIX_Threads_Delete_extension+0x60>
(void) _Watchdog_Remove( &api->Sporadic_timer );
ffc0db88: 38 7e 00 a8 addi r3,r30,168
ffc0db8c: 4b ff e5 65 bl ffc0c0f0 <_Watchdog_Remove>
deleted->API_Extensions[ THREAD_API_POSIX ] = NULL;
_Workspace_Free( api );
}
ffc0db90: 80 01 00 1c lwz r0,28(r1)
*(void **)the_thread->Wait.return_argument = value_ptr;
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
deleted->API_Extensions[ THREAD_API_POSIX ] = NULL;
ffc0db94: 39 20 00 00 li r9,0
ffc0db98: 91 3f 01 50 stw r9,336(r31)
_Workspace_Free( api );
ffc0db9c: 7f c3 f3 78 mr r3,r30
}
ffc0dba0: 7c 08 03 a6 mtlr r0
ffc0dba4: bb 81 00 08 lmw r28,8(r1)
ffc0dba8: 38 21 00 18 addi r1,r1,24
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
deleted->API_Extensions[ THREAD_API_POSIX ] = NULL;
_Workspace_Free( api );
ffc0dbac: 4b ff e7 e4 b ffc0c390 <_Workspace_Free>
ffc08808 <_POSIX_Threads_Initialize_user_threads_body>:
#include <rtems/posix/config.h>
#include <rtems/posix/key.h>
#include <rtems/posix/time.h>
void _POSIX_Threads_Initialize_user_threads_body(void)
{
ffc08808: 94 21 ff 98 stwu r1,-104(r1)
ffc0880c: 7c 08 02 a6 mflr r0
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;
ffc08810: 3d 20 00 00 lis r9,0
#include <rtems/posix/config.h>
#include <rtems/posix/key.h>
#include <rtems/posix/time.h>
void _POSIX_Threads_Initialize_user_threads_body(void)
{
ffc08814: 90 01 00 6c stw r0,108(r1)
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;
ffc08818: 39 29 20 04 addi r9,r9,8196
#include <rtems/posix/config.h>
#include <rtems/posix/key.h>
#include <rtems/posix/time.h>
void _POSIX_Threads_Initialize_user_threads_body(void)
{
ffc0881c: bf a1 00 5c stmw r29,92(r1)
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;
ffc08820: 83 e9 00 34 lwz r31,52(r9)
maximum = Configuration_POSIX_API.number_of_initialization_threads;
ffc08824: 83 a9 00 30 lwz r29,48(r9)
if ( !user_threads || maximum == 0 )
ffc08828: 2f 9f 00 00 cmpwi cr7,r31,0
ffc0882c: 41 9e 00 68 beq- cr7,ffc08894 <_POSIX_Threads_Initialize_user_threads_body+0x8c><== NEVER TAKEN
ffc08830: 2f 9d 00 00 cmpwi cr7,r29,0
ffc08834: 41 9e 00 60 beq- cr7,ffc08894 <_POSIX_Threads_Initialize_user_threads_body+0x8c><== NEVER TAKEN
ffc08838: 3b c0 00 00 li r30,0
for ( index=0 ; index < maximum ; index++ ) {
/*
* There is no way for these calls to fail in this situation.
*/
(void) pthread_attr_init( &attr );
ffc0883c: 38 61 00 08 addi r3,r1,8
ffc08840: 48 00 60 99 bl ffc0e8d8 <pthread_attr_init>
(void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
ffc08844: 38 80 00 02 li r4,2
ffc08848: 38 61 00 08 addi r3,r1,8
ffc0884c: 48 00 60 d1 bl ffc0e91c <pthread_attr_setinheritsched>
(void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size);
ffc08850: 80 9f 00 04 lwz r4,4(r31)
ffc08854: 38 61 00 08 addi r3,r1,8
ffc08858: 48 00 61 01 bl ffc0e958 <pthread_attr_setstacksize>
status = pthread_create(
ffc0885c: 80 bf 00 00 lwz r5,0(r31)
ffc08860: 38 61 00 48 addi r3,r1,72
ffc08864: 38 81 00 08 addi r4,r1,8
ffc08868: 38 c0 00 00 li r6,0
ffc0886c: 4b ff fc 5d bl ffc084c8 <pthread_create>
ffc08870: 3b ff 00 08 addi r31,r31,8
&thread_id,
&attr,
user_threads[ index ].thread_entry,
NULL
);
if ( status )
ffc08874: 7c 65 1b 79 mr. r5,r3
ffc08878: 41 a2 00 10 beq+ ffc08888 <_POSIX_Threads_Initialize_user_threads_body+0x80>
_Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status );
ffc0887c: 38 60 00 02 li r3,2
ffc08880: 38 80 00 01 li r4,1
ffc08884: 48 00 21 51 bl ffc0a9d4 <_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++ ) {
ffc08888: 3b de 00 01 addi r30,r30,1
ffc0888c: 7f 9e e8 00 cmpw cr7,r30,r29
ffc08890: 40 9e ff ac bne+ cr7,ffc0883c <_POSIX_Threads_Initialize_user_threads_body+0x34><== NEVER TAKEN
NULL
);
if ( status )
_Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status );
}
}
ffc08894: 39 61 00 68 addi r11,r1,104
ffc08898: 4b ff 83 10 b ffc00ba8 <_restgpr_29_x>
ffc0dcb8 <_POSIX_Threads_Sporadic_budget_TSR>:
*/
void _POSIX_Threads_Sporadic_budget_TSR(
Objects_Id id __attribute__((unused)),
void *argument
)
{
ffc0dcb8: 94 21 ff f0 stwu r1,-16(r1)
ffc0dcbc: 7c 08 02 a6 mflr r0
ffc0dcc0: 90 01 00 14 stw r0,20(r1)
ffc0dcc4: bf c1 00 08 stmw r30,8(r1)
ffc0dcc8: 7c 9f 23 78 mr r31,r4
Thread_Control *the_thread;
POSIX_API_Control *api;
the_thread = argument;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
ffc0dccc: 83 c4 01 50 lwz r30,336(r4)
/* ticks is guaranteed to be at least one */
ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget );
ffc0dcd0: 38 7e 00 98 addi r3,r30,152
ffc0dcd4: 48 00 0e 51 bl ffc0eb24 <_Timespec_To_ticks>
RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core(
int priority
)
{
return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1);
ffc0dcd8: 3d 20 00 00 lis r9,0
ffc0dcdc: 88 89 27 84 lbz r4,10116(r9)
ffc0dce0: 81 3e 00 88 lwz r9,136(r30)
the_thread->cpu_time_budget = ticks;
ffc0dce4: 90 7f 00 74 stw r3,116(r31)
ffc0dce8: 7c 89 20 50 subf r4,r9,r4
*/
#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 ) {
ffc0dcec: 81 3f 00 1c lwz r9,28(r31)
ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget );
the_thread->cpu_time_budget = ticks;
new_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority );
the_thread->real_priority = new_priority;
ffc0dcf0: 90 9f 00 18 stw r4,24(r31)
*/
#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 ) {
ffc0dcf4: 2f 89 00 00 cmpwi cr7,r9,0
ffc0dcf8: 40 9e 00 1c bne- cr7,ffc0dd14 <_POSIX_Threads_Sporadic_budget_TSR+0x5c><== NEVER TAKEN
/*
* If this would make them less important, then do not change it.
*/
if ( the_thread->current_priority > new_priority ) {
ffc0dcfc: 81 3f 00 14 lwz r9,20(r31)
ffc0dd00: 7f 89 20 40 cmplw cr7,r9,r4
ffc0dd04: 40 bd 00 10 ble+ cr7,ffc0dd14 <_POSIX_Threads_Sporadic_budget_TSR+0x5c>
_Thread_Change_priority( the_thread, new_priority, true );
ffc0dd08: 7f e3 fb 78 mr r3,r31
ffc0dd0c: 38 a0 00 01 li r5,1
ffc0dd10: 4b ff cf d5 bl ffc0ace4 <_Thread_Change_priority>
#endif
}
}
/* ticks is guaranteed to be at least one */
ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period );
ffc0dd14: 38 7e 00 90 addi r3,r30,144
ffc0dd18: 48 00 0e 0d bl ffc0eb24 <_Timespec_To_ticks>
_Watchdog_Insert_ticks( &api->Sporadic_timer, ticks );
}
ffc0dd1c: 80 01 00 14 lwz r0,20(r1)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
ffc0dd20: 90 7e 00 b4 stw r3,180(r30)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc0dd24: 38 9e 00 a8 addi r4,r30,168
ffc0dd28: 7c 08 03 a6 mtlr r0
ffc0dd2c: 3c 60 00 00 lis r3,0
ffc0dd30: bb c1 00 08 lmw r30,8(r1)
ffc0dd34: 38 63 2d a8 addi r3,r3,11688
ffc0dd38: 38 21 00 10 addi r1,r1,16
ffc0dd3c: 4b ff e2 58 b ffc0bf94 <_Watchdog_Insert>
ffc085e0 <_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)
{
ffc085e0: 94 21 ff d8 stwu r1,-40(r1)
ffc085e4: 7c 08 02 a6 mflr r0
ffc085e8: 90 01 00 2c stw r0,44(r1)
bool activated;
ptimer = (POSIX_Timer_Control *)data;
/* Increment the number of expirations. */
ptimer->overrun = ptimer->overrun + 1;
ffc085ec: 81 24 00 68 lwz r9,104(r4)
* This is the operation that is run when a timer expires
*/
void _POSIX_Timer_TSR(
Objects_Id timer __attribute__((unused)),
void *data)
{
ffc085f0: bf a1 00 1c stmw r29,28(r1)
ffc085f4: 7c 9d 23 78 mr r29,r4
bool activated;
ptimer = (POSIX_Timer_Control *)data;
/* Increment the number of expirations. */
ptimer->overrun = ptimer->overrun + 1;
ffc085f8: 39 29 00 01 addi r9,r9,1
ffc085fc: 91 24 00 68 stw r9,104(r4)
/* The timer must be reprogrammed */
if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
ffc08600: 81 24 00 54 lwz r9,84(r4)
ffc08604: 2f 89 00 00 cmpwi cr7,r9,0
ffc08608: 40 9e 00 10 bne- cr7,ffc08618 <_POSIX_Timer_TSR+0x38>
ffc0860c: 81 24 00 58 lwz r9,88(r4)
ffc08610: 2f 89 00 00 cmpwi cr7,r9,0
ffc08614: 41 9e 00 80 beq- cr7,ffc08694 <_POSIX_Timer_TSR+0xb4> <== NEVER TAKEN
( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) {
activated = _POSIX_Timer_Insert_helper(
ffc08618: 80 9d 00 64 lwz r4,100(r29)
ffc0861c: 3c c0 ff c1 lis r6,-63
ffc08620: 80 bd 00 08 lwz r5,8(r29)
ffc08624: 38 7d 00 10 addi r3,r29,16
ffc08628: 38 c6 85 e0 addi r6,r6,-31264
ffc0862c: 7f a7 eb 78 mr r7,r29
ffc08630: 48 00 5f d5 bl ffc0e604 <_POSIX_Timer_Insert_helper>
ptimer->ticks,
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated )
ffc08634: 2f 83 00 00 cmpwi cr7,r3,0
ffc08638: 41 be 00 78 beq+ cr7,ffc086b0 <_POSIX_Timer_TSR+0xd0> <== NEVER TAKEN
)
{
Timestamp_Control tod_as_timestamp;
Timestamp_Control *tod_as_timestamp_ptr;
tod_as_timestamp_ptr =
ffc0863c: 3c 80 00 00 lis r4,0
ffc08640: 38 84 2c a0 addi r4,r4,11424
ffc08644: 38 61 00 08 addi r3,r1,8
ffc08648: 48 00 18 8d bl ffc09ed4 <_TOD_Get_with_nanoseconds>
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
ffc0864c: 3c c0 3b 9a lis r6,15258
/* After the signal handler returns, the count of expirations of the
* timer must be set to 0.
*/
ptimer->overrun = 0;
}
ffc08650: 83 e3 00 04 lwz r31,4(r3)
ffc08654: 38 a0 00 00 li r5,0
ffc08658: 83 c3 00 00 lwz r30,0(r3)
ffc0865c: 60 c6 ca 00 ori r6,r6,51712
ffc08660: 7f e4 fb 78 mr r4,r31
ffc08664: 7f c3 f3 78 mr r3,r30
ffc08668: 48 01 24 ad bl ffc1ab14 <__divdi3>
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
ffc0866c: 3c c0 3b 9a lis r6,15258
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
ffc08670: 90 9d 00 6c stw r4,108(r29)
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
ffc08674: 7f c3 f3 78 mr r3,r30
ffc08678: 7f e4 fb 78 mr r4,r31
ffc0867c: 38 a0 00 00 li r5,0
ffc08680: 60 c6 ca 00 ori r6,r6,51712
ffc08684: 48 01 28 b5 bl ffc1af38 <__moddi3>
/* 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;
ffc08688: 39 20 00 03 li r9,3
ffc0868c: 90 9d 00 70 stw r4,112(r29)
ffc08690: 48 00 00 08 b ffc08698 <_POSIX_Timer_TSR+0xb8>
} else {
/* Indicates that the timer is stopped */
ptimer->state = POSIX_TIMER_STATE_CREATE_STOP;
ffc08694: 39 20 00 04 li r9,4 <== NOT EXECUTED
ffc08698: 99 3d 00 3c stb r9,60(r29)
/*
* 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 ) ) {
ffc0869c: 80 7d 00 38 lwz r3,56(r29)
ffc086a0: 80 9d 00 44 lwz r4,68(r29)
ffc086a4: 48 00 5a fd bl ffc0e1a0 <pthread_kill>
}
/* After the signal handler returns, the count of expirations of the
* timer must be set to 0.
*/
ptimer->overrun = 0;
ffc086a8: 39 20 00 00 li r9,0
ffc086ac: 91 3d 00 68 stw r9,104(r29)
}
ffc086b0: 39 61 00 28 addi r11,r1,40
ffc086b4: 4b ff 7f ec b ffc006a0 <_restgpr_29_x>
ffc0fef8 <_POSIX_signals_Check_signal>:
bool _POSIX_signals_Check_signal(
POSIX_API_Control *api,
int signo,
bool is_global
)
{
ffc0fef8: 94 21 ff 98 stwu r1,-104(r1)
ffc0fefc: 7c 08 02 a6 mflr r0
ffc0ff00: 7c a6 2b 78 mr r6,r5
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,
ffc0ff04: 38 e0 00 01 li r7,1
bool _POSIX_signals_Check_signal(
POSIX_API_Control *api,
int signo,
bool is_global
)
{
ffc0ff08: bf 21 00 4c stmw r25,76(r1)
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,
ffc0ff0c: 38 a1 00 30 addi r5,r1,48
bool _POSIX_signals_Check_signal(
POSIX_API_Control *api,
int signo,
bool is_global
)
{
ffc0ff10: 90 01 00 6c stw r0,108(r1)
ffc0ff14: 7c 7f 1b 78 mr r31,r3
ffc0ff18: 7c 9e 23 78 mr r30,r4
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,
ffc0ff1c: 48 00 00 b1 bl ffc0ffcc <_POSIX_signals_Clear_signals>
ffc0ff20: 2f 83 00 00 cmpwi cr7,r3,0
ffc0ff24: 41 9e 00 9c beq- cr7,ffc0ffc0 <_POSIX_signals_Check_signal+0xc8>
#endif
/*
* Just to prevent sending a signal which is currently being ignored.
*/
if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN )
ffc0ff28: 3f 20 00 00 lis r25,0
ffc0ff2c: 1f 5e 00 0c mulli r26,r30,12
ffc0ff30: 3b 39 32 20 addi r25,r25,12832
ffc0ff34: 7d 39 d2 14 add r9,r25,r26
ffc0ff38: 83 a9 00 08 lwz r29,8(r9)
ffc0ff3c: 2f 9d 00 01 cmpwi cr7,r29,1
ffc0ff40: 41 9e 00 80 beq- cr7,ffc0ffc0 <_POSIX_signals_Check_signal+0xc8><== NEVER TAKEN
return false;
/*
* Block the signals requested in sa_mask
*/
saved_signals_blocked = api->signals_blocked;
ffc0ff44: 83 9f 00 d0 lwz r28,208(r31)
/*
* 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,
ffc0ff48: 3f 60 00 00 lis r27,0
/*
* Block the signals requested in sa_mask
*/
saved_signals_blocked = api->signals_blocked;
api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask;
ffc0ff4c: 81 29 00 04 lwz r9,4(r9)
/*
* 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,
ffc0ff50: 38 61 00 08 addi r3,r1,8
ffc0ff54: 38 a0 00 28 li r5,40
/*
* Block the signals requested in sa_mask
*/
saved_signals_blocked = api->signals_blocked;
api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask;
ffc0ff58: 7d 29 e3 78 or r9,r9,r28
ffc0ff5c: 91 3f 00 d0 stw r9,208(r31)
/*
* 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,
ffc0ff60: 39 3b 31 a0 addi r9,r27,12704
ffc0ff64: 80 89 00 10 lwz r4,16(r9)
ffc0ff68: 38 84 00 20 addi r4,r4,32
ffc0ff6c: 48 00 13 45 bl ffc112b0 <memcpy>
sizeof( Thread_Wait_information ));
/*
* Here, the signal handler function executes
*/
switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) {
ffc0ff70: 7d 39 d0 2e lwzx r9,r25,r26
case SA_SIGINFO:
(*_POSIX_signals_Vectors[ signo ].sa_sigaction)(
ffc0ff74: 7f c3 f3 78 mr r3,r30
sizeof( Thread_Wait_information ));
/*
* Here, the signal handler function executes
*/
switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) {
ffc0ff78: 2f 89 00 02 cmpwi cr7,r9,2
ffc0ff7c: 40 be 00 18 bne+ cr7,ffc0ff94 <_POSIX_signals_Check_signal+0x9c>
case SA_SIGINFO:
(*_POSIX_signals_Vectors[ signo ].sa_sigaction)(
ffc0ff80: 38 81 00 30 addi r4,r1,48
ffc0ff84: 7f a9 03 a6 mtctr r29
ffc0ff88: 38 a0 00 00 li r5,0
ffc0ff8c: 4e 80 04 21 bctrl
signo,
&siginfo_struct,
NULL /* context is undefined per 1003.1b-1993, p. 66 */
);
break;
ffc0ff90: 48 00 00 0c b ffc0ff9c <_POSIX_signals_Check_signal+0xa4>
default:
(*_POSIX_signals_Vectors[ signo ].sa_handler)( signo );
ffc0ff94: 7f a9 03 a6 mtctr r29
ffc0ff98: 4e 80 04 21 bctrl
}
/*
* Restore the blocking information
*/
memcpy( &_Thread_Executing->Wait, &stored_thread_wait_information,
ffc0ff9c: 3b 7b 31 a0 addi r27,r27,12704
ffc0ffa0: 80 7b 00 10 lwz r3,16(r27)
ffc0ffa4: 38 81 00 08 addi r4,r1,8
ffc0ffa8: 38 a0 00 28 li r5,40
ffc0ffac: 38 63 00 20 addi r3,r3,32
ffc0ffb0: 48 00 13 01 bl ffc112b0 <memcpy>
sizeof( Thread_Wait_information ));
/*
* Restore the previous set of blocked signals
*/
api->signals_blocked = saved_signals_blocked;
ffc0ffb4: 93 9f 00 d0 stw r28,208(r31)
return true;
ffc0ffb8: 38 60 00 01 li r3,1
ffc0ffbc: 48 00 00 08 b ffc0ffc4 <_POSIX_signals_Check_signal+0xcc>
sigset_t saved_signals_blocked;
Thread_Wait_information stored_thread_wait_information;
if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct,
is_global, true ) )
return false;
ffc0ffc0: 38 60 00 00 li r3,0
* Restore the previous set of blocked signals
*/
api->signals_blocked = saved_signals_blocked;
return true;
}
ffc0ffc4: 39 61 00 68 addi r11,r1,104
ffc0ffc8: 4b ff 05 e4 b ffc005ac <_restgpr_25_x>
ffc10524 <_POSIX_signals_Clear_process_signals>:
ffc10524: 39 23 ff ff addi r9,r3,-1
ffc10528: 39 00 00 01 li r8,1
ffc1052c: 7d 08 48 30 slw r8,r8,r9
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc10530: 7c e0 00 a6 mfmsr r7
ffc10534: 7d 30 42 a6 mfsprg r9,0
ffc10538: 7c e9 48 78 andc r9,r7,r9
ffc1053c: 7d 20 01 24 mtmsr r9
mask = signo_to_mask( signo );
ISR_Level level;
_ISR_Disable( level );
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
ffc10540: 3d 20 00 00 lis r9,0
ffc10544: 1c 63 00 0c mulli r3,r3,12
ffc10548: 39 29 32 20 addi r9,r9,12832
ffc1054c: 7d 29 18 2e lwzx r9,r9,r3
ffc10550: 2f 89 00 02 cmpwi cr7,r9,2
ffc10554: 40 be 00 28 bne+ cr7,ffc1057c <_POSIX_signals_Clear_process_signals+0x58>
if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) )
ffc10558: 3d 20 00 00 lis r9,0
ffc1055c: 39 29 34 14 addi r9,r9,13332
ffc10560: 7d 43 4a 14 add r10,r3,r9
ffc10564: 7d 23 48 2e lwzx r9,r3,r9
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
ffc10568: 39 4a 00 04 addi r10,r10,4
ffc1056c: 7f 89 50 00 cmpw cr7,r9,r10
ffc10570: 41 9e 00 0c beq- cr7,ffc1057c <_POSIX_signals_Clear_process_signals+0x58><== ALWAYS TAKEN
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc10574: 7c e0 01 24 mtmsr r7
ffc10578: 4e 80 00 20 blr
clear_signal = false;
}
if ( clear_signal ) {
_POSIX_signals_Pending &= ~mask;
ffc1057c: 3d 20 00 00 lis r9,0
ffc10580: 81 49 28 98 lwz r10,10392(r9)
ffc10584: 7d 4a 40 78 andc r10,r10,r8
ffc10588: 91 49 28 98 stw r10,10392(r9)
ffc1058c: 4b ff ff e8 b ffc10574 <_POSIX_signals_Clear_process_signals+0x50>
ffc090d4 <_POSIX_signals_Get_lowest>:
ffc090d4: 38 e0 00 05 li r7,5
ffc090d8: 7c e9 03 a6 mtctr r7
sigset_t set
)
{
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
ffc090dc: 39 20 00 1b li r9,27
ffc090e0: 39 40 00 01 li r10,1
#include <rtems/posix/psignalimpl.h>
#include <rtems/seterr.h>
#include <rtems/posix/time.h>
#include <rtems/score/isr.h>
static int _POSIX_signals_Get_lowest(
ffc090e4: 39 09 ff ff addi r8,r9,-1
ffc090e8: 7d 48 40 30 slw r8,r10,r8
)
{
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
if ( set & signo_to_mask( signo ) ) {
ffc090ec: 7d 07 18 39 and. r7,r8,r3
ffc090f0: 40 82 00 34 bne- ffc09124 <_POSIX_signals_Get_lowest+0x50><== NEVER TAKEN
sigset_t set
)
{
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
ffc090f4: 39 29 00 01 addi r9,r9,1
ffc090f8: 42 00 ff ec bdnz+ ffc090e4 <_POSIX_signals_Get_lowest+0x10>
ffc090fc: 39 00 00 1a li r8,26
ffc09100: 7d 09 03 a6 mtctr r8
ffc09104: 39 20 00 01 li r9,1
ffc09108: 39 40 00 01 li r10,1
#include <rtems/posix/psignalimpl.h>
#include <rtems/seterr.h>
#include <rtems/posix/time.h>
#include <rtems/score/isr.h>
static int _POSIX_signals_Get_lowest(
ffc0910c: 39 09 ff ff addi r8,r9,-1
ffc09110: 7d 48 40 30 slw r8,r10,r8
#if (SIGHUP != 1)
#error "Assumption that SIGHUP==1 violated!!"
#endif
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
if ( set & signo_to_mask( signo ) ) {
ffc09114: 7d 07 18 39 and. r7,r8,r3
ffc09118: 40 82 00 0c bne- ffc09124 <_POSIX_signals_Get_lowest+0x50>
*/
#if (SIGHUP != 1)
#error "Assumption that SIGHUP==1 violated!!"
#endif
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
ffc0911c: 39 29 00 01 addi r9,r9,1
ffc09120: 42 00 ff ec bdnz+ ffc0910c <_POSIX_signals_Get_lowest+0x38>
* a return 0. This routine will NOT be called unless a signal
* is pending in the set passed in.
*/
found_it:
return signo;
}
ffc09124: 7d 23 4b 78 mr r3,r9
ffc09128: 4e 80 00 20 blr
ffc0d8e4 <_POSIX_signals_Post_switch_hook>:
*/
static void _POSIX_signals_Post_switch_hook(
Thread_Control *the_thread
)
{
ffc0d8e4: 94 21 ff e8 stwu r1,-24(r1)
ffc0d8e8: 7c 08 02 a6 mflr r0
/*
* We need to ensure that if the signal handler executes a call
* which overwrites the unblocking status, we restore it.
*/
hold_errno = _Thread_Executing->Wait.return_code;
ffc0d8ec: 3d 20 00 00 lis r9,0
*/
static void _POSIX_signals_Post_switch_hook(
Thread_Control *the_thread
)
{
ffc0d8f0: 90 01 00 1c stw r0,28(r1)
ffc0d8f4: bf 81 00 08 stmw r28,8(r1)
POSIX_API_Control *api;
int signo;
ISR_Level level;
int hold_errno;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
ffc0d8f8: 83 e3 01 50 lwz r31,336(r3)
/*
* We need to ensure that if the signal handler executes a call
* which overwrites the unblocking status, we restore it.
*/
hold_errno = _Thread_Executing->Wait.return_code;
ffc0d8fc: 81 29 31 b0 lwz r9,12720(r9)
/*
* api may be NULL in case of a thread close in progress
*/
if ( !api )
ffc0d900: 2f 9f 00 00 cmpwi cr7,r31,0
/*
* We need to ensure that if the signal handler executes a call
* which overwrites the unblocking status, we restore it.
*/
hold_errno = _Thread_Executing->Wait.return_code;
ffc0d904: 83 a9 00 34 lwz r29,52(r9)
/*
* api may be NULL in case of a thread close in progress
*/
if ( !api )
ffc0d908: 41 9e 00 a8 beq- cr7,ffc0d9b0 <_POSIX_signals_Post_switch_hook+0xcc><== NEVER TAKEN
* processed at all. No point in doing this loop otherwise.
*/
while (1) {
_ISR_Disable( level );
if ( !(~api->signals_blocked &
(api->signals_pending | _POSIX_signals_Pending)) ) {
ffc0d90c: 3f 80 00 00 lis r28,0
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0d910: 7d 20 00 a6 mfmsr r9
ffc0d914: 7d 50 42 a6 mfsprg r10,0
ffc0d918: 7d 2a 50 78 andc r10,r9,r10
ffc0d91c: 7d 40 01 24 mtmsr r10
ffc0d920: 81 5f 00 d4 lwz r10,212(r31)
ffc0d924: 81 1c 28 98 lwz r8,10392(r28)
ffc0d928: 7d 08 53 78 or r8,r8,r10
* The first thing done is to check there are any signals to be
* processed at all. No point in doing this loop otherwise.
*/
while (1) {
_ISR_Disable( level );
if ( !(~api->signals_blocked &
ffc0d92c: 81 5f 00 d0 lwz r10,208(r31)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0d930: 7d 20 01 24 mtmsr r9
ffc0d934: 7d 07 50 79 andc. r7,r8,r10
ffc0d938: 40 a2 00 14 bne+ ffc0d94c <_POSIX_signals_Post_switch_hook+0x68>
_POSIX_signals_Check_signal( api, signo, false );
_POSIX_signals_Check_signal( api, signo, true );
}
}
_Thread_Executing->Wait.return_code = hold_errno;
ffc0d93c: 3d 20 00 00 lis r9,0
ffc0d940: 81 29 31 b0 lwz r9,12720(r9)
ffc0d944: 93 a9 00 34 stw r29,52(r9)
ffc0d948: 48 00 00 68 b ffc0d9b0 <_POSIX_signals_Post_switch_hook+0xcc>
_ISR_Enable( level );
break;
}
_ISR_Enable( level );
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
ffc0d94c: 3b c0 00 1b li r30,27
_POSIX_signals_Check_signal( api, signo, false );
ffc0d950: 7f c4 f3 78 mr r4,r30
ffc0d954: 38 a0 00 00 li r5,0
ffc0d958: 7f e3 fb 78 mr r3,r31
ffc0d95c: 48 00 25 9d bl ffc0fef8 <_POSIX_signals_Check_signal>
_POSIX_signals_Check_signal( api, signo, true );
ffc0d960: 7f c4 f3 78 mr r4,r30
ffc0d964: 7f e3 fb 78 mr r3,r31
ffc0d968: 38 a0 00 01 li r5,1
ffc0d96c: 48 00 25 8d bl ffc0fef8 <_POSIX_signals_Check_signal>
_ISR_Enable( level );
break;
}
_ISR_Enable( level );
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
ffc0d970: 2f 9e 00 1f cmpwi cr7,r30,31
ffc0d974: 3b de 00 01 addi r30,r30,1
ffc0d978: 40 9e ff d8 bne+ cr7,ffc0d950 <_POSIX_signals_Post_switch_hook+0x6c>
ffc0d97c: 3b c0 00 01 li r30,1
_POSIX_signals_Check_signal( api, signo, true );
}
/* Unfortunately - nothing like __SIGFIRSTNOTRT in newlib signal .h */
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
_POSIX_signals_Check_signal( api, signo, false );
ffc0d980: 7f c4 f3 78 mr r4,r30
ffc0d984: 38 a0 00 00 li r5,0
ffc0d988: 7f e3 fb 78 mr r3,r31
ffc0d98c: 48 00 25 6d bl ffc0fef8 <_POSIX_signals_Check_signal>
_POSIX_signals_Check_signal( api, signo, true );
ffc0d990: 7f c4 f3 78 mr r4,r30
ffc0d994: 7f e3 fb 78 mr r3,r31
ffc0d998: 38 a0 00 01 li r5,1
ffc0d99c: 48 00 25 5d bl ffc0fef8 <_POSIX_signals_Check_signal>
_POSIX_signals_Check_signal( api, signo, false );
_POSIX_signals_Check_signal( api, signo, true );
}
/* Unfortunately - nothing like __SIGFIRSTNOTRT in newlib signal .h */
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
ffc0d9a0: 2f 9e 00 1a cmpwi cr7,r30,26
ffc0d9a4: 3b de 00 01 addi r30,r30,1
ffc0d9a8: 40 9e ff d8 bne+ cr7,ffc0d980 <_POSIX_signals_Post_switch_hook+0x9c>
ffc0d9ac: 4b ff ff 64 b ffc0d910 <_POSIX_signals_Post_switch_hook+0x2c>
_POSIX_signals_Check_signal( api, signo, true );
}
}
_Thread_Executing->Wait.return_code = hold_errno;
}
ffc0d9b0: 39 61 00 18 addi r11,r1,24
ffc0d9b4: 4b ff 2c 04 b ffc005b8 <_restgpr_28_x>
ffc1b854 <_POSIX_signals_Unblock_thread>:
bool _POSIX_signals_Unblock_thread(
Thread_Control *the_thread,
int signo,
siginfo_t *info
)
{
ffc1b854: 7c 2b 0b 78 mr r11,r1
ffc1b858: 7c 08 02 a6 mflr r0
ffc1b85c: 94 21 ff f0 stwu r1,-16(r1)
ffc1b860: 7c aa 2b 78 mr r10,r5
/*
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
ffc1b864: 3c a0 10 00 lis r5,4096
bool _POSIX_signals_Unblock_thread(
Thread_Control *the_thread,
int signo,
siginfo_t *info
)
{
ffc1b868: 90 01 00 14 stw r0,20(r1)
/*
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
ffc1b86c: 60 a5 80 00 ori r5,r5,32768
bool _POSIX_signals_Unblock_thread(
Thread_Control *the_thread,
int signo,
siginfo_t *info
)
{
ffc1b870: 4b ff f5 4d bl ffc1adbc <_savegpr_31>
ffc1b874: 39 04 ff ff addi r8,r4,-1
/*
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
ffc1b878: 81 23 00 10 lwz r9,16(r3)
ffc1b87c: 38 e0 00 01 li r7,1
bool _POSIX_signals_Unblock_thread(
Thread_Control *the_thread,
int signo,
siginfo_t *info
)
{
ffc1b880: 7c 7f 1b 78 mr r31,r3
POSIX_API_Control *api;
sigset_t mask;
siginfo_t *the_info = NULL;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
ffc1b884: 80 c3 01 50 lwz r6,336(r3)
/*
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
ffc1b888: 7d 2b 28 38 and r11,r9,r5
ffc1b88c: 7f 8b 28 00 cmpw cr7,r11,r5
ffc1b890: 7c e8 40 30 slw r8,r7,r8
ffc1b894: 40 be 00 60 bne+ cr7,ffc1b8f4 <_POSIX_signals_Unblock_thread+0xa0>
if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) {
ffc1b898: 81 23 00 30 lwz r9,48(r3)
ffc1b89c: 7d 07 48 39 and. r7,r8,r9
ffc1b8a0: 40 82 00 14 bne- ffc1b8b4 <_POSIX_signals_Unblock_thread+0x60>
ffc1b8a4: 81 26 00 d0 lwz r9,208(r6)
ffc1b8a8: 7d 06 48 79 andc. r6,r8,r9
ffc1b8ac: 40 a2 00 08 bne+ ffc1b8b4 <_POSIX_signals_Unblock_thread+0x60>
ffc1b8b0: 48 00 00 c8 b ffc1b978 <_POSIX_signals_Unblock_thread+0x124>
the_thread->Wait.return_code = EINTR;
the_info = (siginfo_t *) the_thread->Wait.return_argument;
if ( !info ) {
ffc1b8b4: 2f 8a 00 00 cmpwi cr7,r10,0
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) {
the_thread->Wait.return_code = EINTR;
ffc1b8b8: 39 20 00 04 li r9,4
ffc1b8bc: 91 3f 00 34 stw r9,52(r31)
the_info = (siginfo_t *) the_thread->Wait.return_argument;
ffc1b8c0: 81 3f 00 28 lwz r9,40(r31)
if ( !info ) {
ffc1b8c4: 40 be 00 18 bne+ cr7,ffc1b8dc <_POSIX_signals_Unblock_thread+0x88>
the_info->si_signo = signo;
the_info->si_code = SI_USER;
ffc1b8c8: 39 00 00 01 li r8,1
the_thread->Wait.return_code = EINTR;
the_info = (siginfo_t *) the_thread->Wait.return_argument;
if ( !info ) {
the_info->si_signo = signo;
ffc1b8cc: 90 89 00 00 stw r4,0(r9)
the_info->si_code = SI_USER;
ffc1b8d0: 91 09 00 04 stw r8,4(r9)
the_info->si_value.sival_int = 0;
ffc1b8d4: 91 49 00 08 stw r10,8(r9)
ffc1b8d8: 48 00 00 0c b ffc1b8e4 <_POSIX_signals_Unblock_thread+0x90>
} else {
*the_info = *info;
ffc1b8dc: 7c aa 64 aa lswi r5,r10,12
ffc1b8e0: 7c a9 65 aa stswi r5,r9,12
}
_Thread_queue_Extract_with_proxy( the_thread );
ffc1b8e4: 7f e3 fb 78 mr r3,r31
ffc1b8e8: 4b ff 00 e9 bl ffc0b9d0 <_Thread_queue_Extract_with_proxy>
return true;
ffc1b8ec: 38 60 00 01 li r3,1
ffc1b8f0: 48 00 00 8c b ffc1b97c <_POSIX_signals_Unblock_thread+0x128>
}
/*
* Thread is not waiting due to a sigwait.
*/
if ( ~api->signals_blocked & mask ) {
ffc1b8f4: 81 46 00 d0 lwz r10,208(r6)
ffc1b8f8: 7d 06 50 79 andc. r6,r8,r10
ffc1b8fc: 41 82 00 7c beq- ffc1b978 <_POSIX_signals_Unblock_thread+0x124>
* 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 ) ) {
ffc1b900: 75 28 10 00 andis. r8,r9,4096
ffc1b904: 41 82 00 48 beq- ffc1b94c <_POSIX_signals_Unblock_thread+0xf8>
the_thread->Wait.return_code = EINTR;
ffc1b908: 39 40 00 04 li r10,4
ffc1b90c: 91 43 00 34 stw r10,52(r3)
/*
* 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) )
ffc1b910: 3d 40 00 03 lis r10,3
ffc1b914: 61 4a be e0 ori r10,r10,48864
ffc1b918: 7d 26 50 39 and. r6,r9,r10
ffc1b91c: 41 a2 00 0c beq+ ffc1b928 <_POSIX_signals_Unblock_thread+0xd4>
_Thread_queue_Extract_with_proxy( the_thread );
ffc1b920: 4b ff 00 b1 bl ffc0b9d0 <_Thread_queue_Extract_with_proxy>
ffc1b924: 48 00 00 54 b ffc1b978 <_POSIX_signals_Unblock_thread+0x124>
else if ( _States_Is_delaying(the_thread->current_state) ) {
ffc1b928: 71 27 00 08 andi. r7,r9,8
ffc1b92c: 41 a2 00 4c beq+ ffc1b978 <_POSIX_signals_Unblock_thread+0x124><== NEVER TAKEN
(void) _Watchdog_Remove( &the_thread->Timer );
ffc1b930: 38 63 00 48 addi r3,r3,72
ffc1b934: 4b ff 07 bd bl ffc0c0f0 <_Watchdog_Remove>
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
ffc1b938: 3c 80 10 07 lis r4,4103
ffc1b93c: 7f e3 fb 78 mr r3,r31
ffc1b940: 60 84 ff f8 ori r4,r4,65528
ffc1b944: 4b fe f4 c5 bl ffc0ae08 <_Thread_Clear_state>
ffc1b948: 48 00 00 30 b ffc1b978 <_POSIX_signals_Unblock_thread+0x124>
_Thread_Unblock( the_thread );
}
} else if ( the_thread->current_state == STATES_READY ) {
ffc1b94c: 2f 89 00 00 cmpwi cr7,r9,0
ffc1b950: 40 9e 00 28 bne- cr7,ffc1b978 <_POSIX_signals_Unblock_thread+0x124><== NEVER TAKEN
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
ffc1b954: 3d 20 00 00 lis r9,0
ffc1b958: 39 29 31 a0 addi r9,r9,12704
ffc1b95c: 81 49 00 08 lwz r10,8(r9)
ffc1b960: 2f 8a 00 00 cmpwi cr7,r10,0
ffc1b964: 41 9e 00 14 beq- cr7,ffc1b978 <_POSIX_signals_Unblock_thread+0x124>
ffc1b968: 81 49 00 10 lwz r10,16(r9)
ffc1b96c: 7f 83 50 00 cmpw cr7,r3,r10
ffc1b970: 40 be 00 08 bne+ cr7,ffc1b978 <_POSIX_signals_Unblock_thread+0x124><== NEVER TAKEN
_Thread_Dispatch_necessary = true;
ffc1b974: 98 e9 00 0c stb r7,12(r9)
}
}
return false;
ffc1b978: 38 60 00 00 li r3,0
}
ffc1b97c: 39 61 00 10 addi r11,r1,16
ffc1b980: 4b fe 4c 44 b ffc005c4 <_restgpr_31_x>
ffc0b0c0 <_RBTree_Extract_unprotected>:
*/
void _RBTree_Extract_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
ffc0b0c0: 94 21 ff e8 stwu r1,-24(r1)
ffc0b0c4: 7c 08 02 a6 mflr r0
ffc0b0c8: bf 81 00 08 stmw r28,8(r1)
RBTree_Node *leaf, *target;
RBTree_Color victim_color;
RBTree_Direction dir;
if (!the_node) return;
ffc0b0cc: 7c 9f 23 79 mr. r31,r4
*/
void _RBTree_Extract_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
ffc0b0d0: 90 01 00 1c stw r0,28(r1)
RBTree_Node *leaf, *target;
RBTree_Color victim_color;
RBTree_Direction dir;
if (!the_node) return;
ffc0b0d4: 41 82 01 9c beq- ffc0b270 <_RBTree_Extract_unprotected+0x1b0>
/* check if min needs to be updated */
if (the_node == the_rbtree->first[RBT_LEFT]) {
ffc0b0d8: 81 23 00 08 lwz r9,8(r3)
ffc0b0dc: 7c 7c 1b 78 mr r28,r3
ffc0b0e0: 7f 9f 48 00 cmpw cr7,r31,r9
ffc0b0e4: 40 be 00 14 bne+ cr7,ffc0b0f8 <_RBTree_Extract_unprotected+0x38>
*/
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Successor_unprotected(
const RBTree_Node *node
)
{
return _RBTree_Next_unprotected( node, RBT_RIGHT );
ffc0b0e8: 7f e3 fb 78 mr r3,r31
ffc0b0ec: 38 80 00 01 li r4,1
ffc0b0f0: 48 00 04 f5 bl ffc0b5e4 <_RBTree_Next_unprotected>
RBTree_Node *next;
next = _RBTree_Successor_unprotected(the_node);
the_rbtree->first[RBT_LEFT] = next;
ffc0b0f4: 90 7c 00 08 stw r3,8(r28)
}
/* 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]) {
ffc0b0f8: 81 3c 00 0c lwz r9,12(r28)
ffc0b0fc: 7f 9f 48 00 cmpw cr7,r31,r9
ffc0b100: 40 be 00 14 bne+ cr7,ffc0b114 <_RBTree_Extract_unprotected+0x54>
*/
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Predecessor_unprotected(
const RBTree_Node *node
)
{
return _RBTree_Next_unprotected( node, RBT_LEFT );
ffc0b104: 7f e3 fb 78 mr r3,r31
ffc0b108: 38 80 00 00 li r4,0
ffc0b10c: 48 00 04 d9 bl ffc0b5e4 <_RBTree_Next_unprotected>
RBTree_Node *previous;
previous = _RBTree_Predecessor_unprotected(the_node);
the_rbtree->first[RBT_RIGHT] = previous;
ffc0b110: 90 7c 00 0c stw r3,12(r28)
* 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]) {
ffc0b114: 83 df 00 04 lwz r30,4(r31)
ffc0b118: 83 bf 00 08 lwz r29,8(r31)
ffc0b11c: 2f 9e 00 00 cmpwi cr7,r30,0
ffc0b120: 41 9e 00 d0 beq- cr7,ffc0b1f0 <_RBTree_Extract_unprotected+0x130>
ffc0b124: 2f 9d 00 00 cmpwi cr7,r29,0
ffc0b128: 40 be 00 0c bne+ cr7,ffc0b134 <_RBTree_Extract_unprotected+0x74>
ffc0b12c: 48 00 00 d0 b ffc0b1fc <_RBTree_Extract_unprotected+0x13c>
target = the_node->child[RBT_LEFT]; /* find max in node->child[RBT_LEFT] */
while (target->child[RBT_RIGHT]) target = target->child[RBT_RIGHT];
ffc0b130: 7d 3e 4b 78 mr r30,r9
ffc0b134: 81 3e 00 08 lwz r9,8(r30)
ffc0b138: 2f 89 00 00 cmpwi cr7,r9,0
ffc0b13c: 40 9e ff f4 bne+ cr7,ffc0b130 <_RBTree_Extract_unprotected+0x70>
* 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];
ffc0b140: 83 be 00 04 lwz r29,4(r30)
if(leaf) {
ffc0b144: 2f 9d 00 00 cmpwi cr7,r29,0
ffc0b148: 41 9e 00 10 beq- cr7,ffc0b158 <_RBTree_Extract_unprotected+0x98>
leaf->parent = target->parent;
ffc0b14c: 81 3e 00 00 lwz r9,0(r30)
ffc0b150: 91 3d 00 00 stw r9,0(r29)
ffc0b154: 48 00 00 0c b ffc0b160 <_RBTree_Extract_unprotected+0xa0>
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(target);
ffc0b158: 7f c3 f3 78 mr r3,r30
ffc0b15c: 4b ff fd cd bl ffc0af28 <_RBTree_Extract_validate_unprotected>
}
victim_color = target->color;
dir = target != target->parent->child[0];
ffc0b160: 81 1e 00 00 lwz r8,0(r30)
leaf->parent = target->parent;
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(target);
}
victim_color = target->color;
ffc0b164: 81 5e 00 0c lwz r10,12(r30)
dir = target != target->parent->child[0];
ffc0b168: 81 28 00 04 lwz r9,4(r8)
ffc0b16c: 7f c9 4a 78 xor r9,r30,r9
ffc0b170: 7d 29 00 34 cntlzw r9,r9
ffc0b174: 55 29 d9 7e rlwinm r9,r9,27,5,31
ffc0b178: 69 29 00 01 xori r9,r9,1
target->parent->child[dir] = leaf;
ffc0b17c: 55 29 10 3a rlwinm r9,r9,2,0,29
ffc0b180: 7d 08 4a 14 add r8,r8,r9
ffc0b184: 93 a8 00 04 stw r29,4(r8)
/* now replace the_node with target */
dir = the_node != the_node->parent->child[0];
ffc0b188: 81 1f 00 00 lwz r8,0(r31)
ffc0b18c: 81 28 00 04 lwz r9,4(r8)
ffc0b190: 7f e9 4a 78 xor r9,r31,r9
ffc0b194: 7d 29 00 34 cntlzw r9,r9
ffc0b198: 55 29 d9 7e rlwinm r9,r9,27,5,31
ffc0b19c: 69 29 00 01 xori r9,r9,1
the_node->parent->child[dir] = target;
ffc0b1a0: 55 29 10 3a rlwinm r9,r9,2,0,29
ffc0b1a4: 7d 08 4a 14 add r8,r8,r9
ffc0b1a8: 93 c8 00 04 stw r30,4(r8)
/* set target's new children to the original node's children */
target->child[RBT_RIGHT] = the_node->child[RBT_RIGHT];
ffc0b1ac: 81 3f 00 08 lwz r9,8(r31)
ffc0b1b0: 91 3e 00 08 stw r9,8(r30)
if (the_node->child[RBT_RIGHT])
ffc0b1b4: 81 3f 00 08 lwz r9,8(r31)
ffc0b1b8: 2f 89 00 00 cmpwi cr7,r9,0
ffc0b1bc: 41 9e 00 08 beq- cr7,ffc0b1c4 <_RBTree_Extract_unprotected+0x104><== NEVER TAKEN
the_node->child[RBT_RIGHT]->parent = target;
ffc0b1c0: 93 c9 00 00 stw r30,0(r9)
target->child[RBT_LEFT] = the_node->child[RBT_LEFT];
ffc0b1c4: 81 3f 00 04 lwz r9,4(r31)
ffc0b1c8: 91 3e 00 04 stw r9,4(r30)
if (the_node->child[RBT_LEFT])
ffc0b1cc: 81 3f 00 04 lwz r9,4(r31)
ffc0b1d0: 2f 89 00 00 cmpwi cr7,r9,0
ffc0b1d4: 41 9e 00 08 beq- cr7,ffc0b1dc <_RBTree_Extract_unprotected+0x11c>
the_node->child[RBT_LEFT]->parent = target;
ffc0b1d8: 93 c9 00 00 stw r30,0(r9)
/* 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;
ffc0b1dc: 81 3f 00 00 lwz r9,0(r31)
ffc0b1e0: 91 3e 00 00 stw r9,0(r30)
target->color = the_node->color;
ffc0b1e4: 81 3f 00 0c lwz r9,12(r31)
ffc0b1e8: 91 3e 00 0c stw r9,12(r30)
ffc0b1ec: 48 00 00 50 b ffc0b23c <_RBTree_Extract_unprotected+0x17c>
* 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];
if( leaf ) {
ffc0b1f0: 2f 9d 00 00 cmpwi cr7,r29,0
ffc0b1f4: 40 be 00 0c bne+ cr7,ffc0b200 <_RBTree_Extract_unprotected+0x140>
ffc0b1f8: 48 00 00 14 b ffc0b20c <_RBTree_Extract_unprotected+0x14c>
* 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]) {
ffc0b1fc: 7f dd f3 78 mr r29,r30
* 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;
ffc0b200: 81 3f 00 00 lwz r9,0(r31)
ffc0b204: 91 3d 00 00 stw r9,0(r29)
ffc0b208: 48 00 00 0c b ffc0b214 <_RBTree_Extract_unprotected+0x154>
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(the_node);
ffc0b20c: 7f e3 fb 78 mr r3,r31
ffc0b210: 4b ff fd 19 bl ffc0af28 <_RBTree_Extract_validate_unprotected>
}
victim_color = the_node->color;
/* remove the_node from the tree */
dir = the_node != the_node->parent->child[0];
ffc0b214: 81 1f 00 00 lwz r8,0(r31)
leaf->parent = the_node->parent;
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(the_node);
}
victim_color = the_node->color;
ffc0b218: 81 5f 00 0c lwz r10,12(r31)
/* remove the_node from the tree */
dir = the_node != the_node->parent->child[0];
ffc0b21c: 81 28 00 04 lwz r9,4(r8)
ffc0b220: 7f e9 4a 78 xor r9,r31,r9
ffc0b224: 7d 29 00 34 cntlzw r9,r9
ffc0b228: 55 29 d9 7e rlwinm r9,r9,27,5,31
ffc0b22c: 69 29 00 01 xori r9,r9,1
the_node->parent->child[dir] = leaf;
ffc0b230: 55 29 10 3a rlwinm r9,r9,2,0,29
ffc0b234: 7d 08 4a 14 add r8,r8,r9
ffc0b238: 93 a8 00 04 stw r29,4(r8)
/* 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 */
ffc0b23c: 2f 8a 00 00 cmpwi cr7,r10,0
ffc0b240: 40 9e 00 10 bne- cr7,ffc0b250 <_RBTree_Extract_unprotected+0x190>
if (leaf) {
ffc0b244: 2f 9d 00 00 cmpwi cr7,r29,0
ffc0b248: 41 9e 00 08 beq- cr7,ffc0b250 <_RBTree_Extract_unprotected+0x190>
leaf->color = RBT_BLACK; /* case 2 */
ffc0b24c: 91 5d 00 0c stw r10,12(r29)
/* 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;
ffc0b250: 81 5c 00 04 lwz r10,4(r28)
*/
RTEMS_INLINE_ROUTINE void _RBTree_Set_off_rbtree(
RBTree_Node *node
)
{
node->parent = node->child[RBT_LEFT] = node->child[RBT_RIGHT] = NULL;
ffc0b254: 39 20 00 00 li r9,0
ffc0b258: 91 3f 00 08 stw r9,8(r31)
ffc0b25c: 2f 8a 00 00 cmpwi cr7,r10,0
ffc0b260: 91 3f 00 04 stw r9,4(r31)
ffc0b264: 91 3f 00 00 stw r9,0(r31)
ffc0b268: 41 9e 00 08 beq- cr7,ffc0b270 <_RBTree_Extract_unprotected+0x1b0>
ffc0b26c: 91 2a 00 0c stw r9,12(r10)
}
ffc0b270: 39 61 00 18 addi r11,r1,24
ffc0b274: 4b ff 5a f8 b ffc00d6c <_restgpr_28_x>
ffc0ba98 <_RBTree_Initialize>:
void *starting_address,
size_t number_nodes,
size_t node_size,
bool is_unique
)
{
ffc0ba98: 94 21 ff e8 stwu r1,-24(r1)
ffc0ba9c: 7c 08 02 a6 mflr r0
ffc0baa0: bf 81 00 08 stmw r28,8(r1)
size_t count;
RBTree_Node *next;
/* TODO: Error message? */
if (!the_rbtree) return;
ffc0baa4: 7c 7f 1b 79 mr. r31,r3
void *starting_address,
size_t number_nodes,
size_t node_size,
bool is_unique
)
{
ffc0baa8: 90 01 00 1c stw r0,28(r1)
size_t count;
RBTree_Node *next;
/* TODO: Error message? */
if (!the_rbtree) return;
ffc0baac: 41 82 00 4c beq- ffc0baf8 <_RBTree_Initialize+0x60> <== NEVER TAKEN
RBTree_Control *the_rbtree,
RBTree_Compare_function compare_function,
bool is_unique
)
{
the_rbtree->permanent_null = NULL;
ffc0bab0: 39 20 00 00 li r9,0
the_rbtree->root = NULL;
the_rbtree->first[0] = NULL;
the_rbtree->first[1] = NULL;
the_rbtree->compare_function = compare_function;
ffc0bab4: 90 9f 00 10 stw r4,16(r31)
ffc0bab8: 7c de 33 78 mr r30,r6
ffc0babc: 7c fc 3b 78 mr r28,r7
RBTree_Control *the_rbtree,
RBTree_Compare_function compare_function,
bool is_unique
)
{
the_rbtree->permanent_null = NULL;
ffc0bac0: 91 3f 00 00 stw r9,0(r31)
/* could do sanity checks here */
_RBTree_Initialize_empty(the_rbtree, compare_function, is_unique);
count = number_nodes;
next = starting_address;
ffc0bac4: 7c bd 2b 78 mr r29,r5
the_rbtree->root = NULL;
ffc0bac8: 91 3f 00 04 stw r9,4(r31)
the_rbtree->first[0] = NULL;
ffc0bacc: 91 3f 00 08 stw r9,8(r31)
the_rbtree->first[1] = NULL;
ffc0bad0: 91 3f 00 0c stw r9,12(r31)
the_rbtree->compare_function = compare_function;
the_rbtree->is_unique = is_unique;
ffc0bad4: 99 1f 00 14 stb r8,20(r31)
while ( count-- ) {
ffc0bad8: 48 00 00 18 b ffc0baf0 <_RBTree_Initialize+0x58>
_RBTree_Insert_unprotected(the_rbtree, next);
ffc0badc: 7f a4 eb 78 mr r4,r29
ffc0bae0: 7f e3 fb 78 mr r3,r31
ffc0bae4: 4b ff fc 91 bl ffc0b774 <_RBTree_Insert_unprotected>
#include <rtems/system.h>
#include <rtems/score/address.h>
#include <rtems/score/rbtree.h>
#include <rtems/score/isr.h>
void _RBTree_Initialize(
ffc0bae8: 7f bd e2 14 add r29,r29,r28
ffc0baec: 3b de ff ff addi r30,r30,-1
/* could do sanity checks here */
_RBTree_Initialize_empty(the_rbtree, compare_function, is_unique);
count = number_nodes;
next = starting_address;
while ( count-- ) {
ffc0baf0: 2f 9e 00 00 cmpwi cr7,r30,0
ffc0baf4: 40 9e ff e8 bne+ cr7,ffc0badc <_RBTree_Initialize+0x44>
_RBTree_Insert_unprotected(the_rbtree, next);
next = (RBTree_Node *)
_Addresses_Add_offset( (void *) next, node_size );
}
}
ffc0baf8: 39 61 00 18 addi r11,r1,24
ffc0bafc: 4b ff 5e 6c b ffc01968 <_restgpr_28_x>
ffc0b328 <_RBTree_Insert_unprotected>:
*/
RBTree_Node *_RBTree_Insert_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
ffc0b328: 94 21 ff e0 stwu r1,-32(r1)
ffc0b32c: 7c 08 02 a6 mflr r0
ffc0b330: bf 41 00 08 stmw r26,8(r1)
if(!the_node) return (RBTree_Node*)-1;
ffc0b334: 7c 9f 23 79 mr. r31,r4
*/
RBTree_Node *_RBTree_Insert_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
ffc0b338: 90 01 00 24 stw r0,36(r1)
if(!the_node) return (RBTree_Node*)-1;
ffc0b33c: 41 82 01 d8 beq- ffc0b514 <_RBTree_Insert_unprotected+0x1ec>
RBTree_Node *iter_node = the_rbtree->root;
ffc0b340: 83 c3 00 04 lwz r30,4(r3)
ffc0b344: 7c 7d 1b 78 mr r29,r3
int compare_result;
if (!iter_node) { /* special case: first node inserted */
ffc0b348: 2f 9e 00 00 cmpwi cr7,r30,0
ffc0b34c: 7f db f3 78 mr r27,r30
ffc0b350: 40 be 00 28 bne+ cr7,ffc0b378 <_RBTree_Insert_unprotected+0x50>
the_node->color = RBT_BLACK;
ffc0b354: 93 df 00 0c stw r30,12(r31)
the_rbtree->root = the_node;
ffc0b358: 93 e3 00 04 stw r31,4(r3)
the_rbtree->first[0] = the_rbtree->first[1] = the_node;
ffc0b35c: 93 e3 00 0c stw r31,12(r3)
ffc0b360: 93 e3 00 08 stw r31,8(r3)
the_node->parent = (RBTree_Node *) the_rbtree;
ffc0b364: 90 7f 00 00 stw r3,0(r31)
the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL;
ffc0b368: 93 df 00 08 stw r30,8(r31)
ffc0b36c: 93 df 00 04 stw r30,4(r31)
ffc0b370: 48 00 01 c0 b ffc0b530 <_RBTree_Insert_unprotected+0x208>
(dir && _RBTree_Is_greater(compare_result)) ) {
the_rbtree->first[dir] = the_node;
}
break;
} else {
iter_node = iter_node->child[dir];
ffc0b374: 7f db f3 78 mr r27,r30
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);
ffc0b378: 81 3d 00 10 lwz r9,16(r29)
ffc0b37c: 7f e3 fb 78 mr r3,r31
ffc0b380: 7f c4 f3 78 mr r4,r30
ffc0b384: 7d 29 03 a6 mtctr r9
ffc0b388: 4e 80 04 21 bctrl
if ( the_rbtree->is_unique && _RBTree_Is_equal( compare_result ) )
ffc0b38c: 89 3d 00 14 lbz r9,20(r29)
ffc0b390: 2f 89 00 00 cmpwi cr7,r9,0
ffc0b394: 41 9e 00 0c beq- cr7,ffc0b3a0 <_RBTree_Insert_unprotected+0x78>
ffc0b398: 2f 83 00 00 cmpwi cr7,r3,0
ffc0b39c: 41 9e 01 94 beq- cr7,ffc0b530 <_RBTree_Insert_unprotected+0x208>
return iter_node;
RBTree_Direction dir = !_RBTree_Is_lesser( compare_result );
ffc0b3a0: 7c 7c 18 f8 not r28,r3
ffc0b3a4: 57 9c 0f fe rlwinm r28,r28,1,31,31
if (!iter_node->child[dir]) {
ffc0b3a8: 57 89 10 3a rlwinm r9,r28,2,0,29
ffc0b3ac: 7f de 4a 14 add r30,r30,r9
ffc0b3b0: 39 5e 00 04 addi r10,r30,4
ffc0b3b4: 83 de 00 04 lwz r30,4(r30)
ffc0b3b8: 2f 9e 00 00 cmpwi cr7,r30,0
ffc0b3bc: 40 9e ff b8 bne+ cr7,ffc0b374 <_RBTree_Insert_unprotected+0x4c>
the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL;
ffc0b3c0: 93 df 00 08 stw r30,8(r31)
the_node->color = RBT_RED;
ffc0b3c4: 39 00 00 01 li r8,1
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_First(
const RBTree_Control *the_rbtree,
RBTree_Direction dir
)
{
return the_rbtree->first[dir];
ffc0b3c8: 7d 3d 4a 14 add r9,r29,r9
compare_result = the_rbtree->compare_function(the_node, iter_node);
if ( the_rbtree->is_unique && _RBTree_Is_equal( compare_result ) )
return iter_node;
RBTree_Direction dir = !_RBTree_Is_lesser( compare_result );
if (!iter_node->child[dir]) {
the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL;
ffc0b3cc: 93 df 00 04 stw r30,4(r31)
the_node->color = RBT_RED;
iter_node->child[dir] = the_node;
the_node->parent = iter_node;
/* update min/max */
compare_result = the_rbtree->compare_function(
ffc0b3d0: 7f e3 fb 78 mr r3,r31
return iter_node;
RBTree_Direction dir = !_RBTree_Is_lesser( compare_result );
if (!iter_node->child[dir]) {
the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL;
the_node->color = RBT_RED;
iter_node->child[dir] = the_node;
ffc0b3d4: 93 ea 00 00 stw r31,0(r10)
the_node->parent = iter_node;
/* update min/max */
compare_result = the_rbtree->compare_function(
ffc0b3d8: 81 5d 00 10 lwz r10,16(r29)
if ( the_rbtree->is_unique && _RBTree_Is_equal( compare_result ) )
return iter_node;
RBTree_Direction dir = !_RBTree_Is_lesser( compare_result );
if (!iter_node->child[dir]) {
the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL;
the_node->color = RBT_RED;
ffc0b3dc: 91 1f 00 0c stw r8,12(r31)
iter_node->child[dir] = the_node;
the_node->parent = iter_node;
/* update min/max */
compare_result = the_rbtree->compare_function(
ffc0b3e0: 7d 49 03 a6 mtctr r10
RBTree_Direction dir = !_RBTree_Is_lesser( compare_result );
if (!iter_node->child[dir]) {
the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL;
the_node->color = RBT_RED;
iter_node->child[dir] = the_node;
the_node->parent = iter_node;
ffc0b3e4: 93 7f 00 00 stw r27,0(r31)
/* update min/max */
compare_result = the_rbtree->compare_function(
ffc0b3e8: 80 89 00 08 lwz r4,8(r9)
ffc0b3ec: 4e 80 04 21 bctrl
the_node,
_RBTree_First(the_rbtree, dir)
);
if ( (!dir && _RBTree_Is_lesser(compare_result)) ||
ffc0b3f0: 2f 1c 00 00 cmpwi cr6,r28,0
ffc0b3f4: 2f 83 00 00 cmpwi cr7,r3,0
ffc0b3f8: 40 9a 00 0c bne- cr6,ffc0b404 <_RBTree_Insert_unprotected+0xdc>
ffc0b3fc: 40 bc 00 e4 bge+ cr7,ffc0b4e0 <_RBTree_Insert_unprotected+0x1b8>
ffc0b400: 48 00 00 08 b ffc0b408 <_RBTree_Insert_unprotected+0xe0>
(dir && _RBTree_Is_greater(compare_result)) ) {
ffc0b404: 40 9d 00 dc ble- cr7,ffc0b4e0 <_RBTree_Insert_unprotected+0x1b8>
the_rbtree->first[dir] = the_node;
ffc0b408: 57 9c 10 3a rlwinm r28,r28,2,0,29
ffc0b40c: 7f bd e2 14 add r29,r29,r28
ffc0b410: 93 fd 00 08 stw r31,8(r29)
ffc0b414: 48 00 00 cc b ffc0b4e0 <_RBTree_Insert_unprotected+0x1b8>
const RBTree_Node *the_node
)
{
if(!the_node) return NULL;
if(!(the_node->parent)) return NULL;
if(!(the_node->parent->parent)) return NULL;
ffc0b418: 41 9e 00 38 beq- cr7,ffc0b450 <_RBTree_Insert_unprotected+0x128><== NEVER TAKEN
if(!(the_node->parent->parent->parent)) return NULL;
ffc0b41c: 81 3d 00 00 lwz r9,0(r29)
ffc0b420: 2f 89 00 00 cmpwi cr7,r9,0
ffc0b424: 41 9e 00 2c beq- cr7,ffc0b450 <_RBTree_Insert_unprotected+0x128><== 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])
ffc0b428: 81 3d 00 04 lwz r9,4(r29)
ffc0b42c: 7f 83 48 00 cmpw cr7,r3,r9
ffc0b430: 40 be 00 08 bne+ cr7,ffc0b438 <_RBTree_Insert_unprotected+0x110>
return the_node->parent->child[RBT_RIGHT];
ffc0b434: 81 3d 00 08 lwz r9,8(r29)
*/
RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
const RBTree_Node *the_node
)
{
return (the_node && the_node->color == RBT_RED);
ffc0b438: 2f 89 00 00 cmpwi cr7,r9,0
ffc0b43c: 41 9e 00 18 beq- cr7,ffc0b454 <_RBTree_Insert_unprotected+0x12c>
ffc0b440: 81 49 00 0c lwz r10,12(r9)
ffc0b444: 2f 8a 00 01 cmpwi cr7,r10,1
ffc0b448: 40 be 00 0c bne+ cr7,ffc0b454 <_RBTree_Insert_unprotected+0x12c>
ffc0b44c: 48 00 00 10 b ffc0b45c <_RBTree_Insert_unprotected+0x134>
)
{
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;
ffc0b450: 39 20 00 00 li r9,0 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
const RBTree_Node *the_node
)
{
return (the_node && the_node->color == RBT_RED);
ffc0b454: 39 40 00 00 li r10,0
ffc0b458: 48 00 00 08 b ffc0b460 <_RBTree_Insert_unprotected+0x138>
ffc0b45c: 39 40 00 01 li r10,1
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)) {
ffc0b460: 2f 8a 00 00 cmpwi cr7,r10,0
ffc0b464: 41 9e 00 14 beq- cr7,ffc0b478 <_RBTree_Insert_unprotected+0x150>
the_node->parent->color = RBT_BLACK;
ffc0b468: 93 63 00 0c stw r27,12(r3)
u->color = RBT_BLACK;
ffc0b46c: 93 69 00 0c stw r27,12(r9)
g->color = RBT_RED;
ffc0b470: 93 5d 00 0c stw r26,12(r29)
ffc0b474: 48 00 00 64 b ffc0b4d8 <_RBTree_Insert_unprotected+0x1b0>
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];
ffc0b478: 80 9d 00 04 lwz r4,4(r29)
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];
ffc0b47c: 81 23 00 04 lwz r9,4(r3)
RBTree_Direction pdir = the_node->parent != g->child[0];
ffc0b480: 7c 64 22 78 xor r4,r3,r4
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];
ffc0b484: 7f e9 4a 78 xor r9,r31,r9
RBTree_Direction pdir = the_node->parent != g->child[0];
ffc0b488: 7c 84 00 34 cntlzw r4,r4
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];
ffc0b48c: 7d 29 00 34 cntlzw r9,r9
RBTree_Direction pdir = the_node->parent != g->child[0];
ffc0b490: 54 84 d9 7e rlwinm r4,r4,27,5,31
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];
ffc0b494: 55 29 d9 7e rlwinm r9,r9,27,5,31
RBTree_Direction pdir = the_node->parent != g->child[0];
ffc0b498: 68 9c 00 01 xori r28,r4,1
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];
ffc0b49c: 69 29 00 01 xori r9,r9,1
RBTree_Direction pdir = the_node->parent != g->child[0];
/* ensure node is on the same branch direction as parent */
if (dir != pdir) {
ffc0b4a0: 7f 89 e0 00 cmpw cr7,r9,r28
ffc0b4a4: 41 9e 00 18 beq- cr7,ffc0b4bc <_RBTree_Insert_unprotected+0x194>
_RBTree_Rotate(the_node->parent, pdir);
ffc0b4a8: 7f 84 e3 78 mr r4,r28
ffc0b4ac: 4b ff fe 01 bl ffc0b2ac <_RBTree_Rotate>
the_node = the_node->child[pdir];
ffc0b4b0: 57 89 10 3a rlwinm r9,r28,2,0,29
ffc0b4b4: 7f ff 4a 14 add r31,r31,r9
ffc0b4b8: 83 ff 00 04 lwz r31,4(r31)
}
the_node->parent->color = RBT_BLACK;
ffc0b4bc: 81 3f 00 00 lwz r9,0(r31)
g->color = RBT_RED;
/* now rotate grandparent in the other branch direction (toward uncle) */
_RBTree_Rotate(g, (1-pdir));
ffc0b4c0: 7f a3 eb 78 mr r3,r29
ffc0b4c4: 20 9c 00 01 subfic r4,r28,1
/* ensure node is on the same branch direction as parent */
if (dir != pdir) {
_RBTree_Rotate(the_node->parent, pdir);
the_node = the_node->child[pdir];
}
the_node->parent->color = RBT_BLACK;
ffc0b4c8: 93 69 00 0c stw r27,12(r9)
g->color = RBT_RED;
ffc0b4cc: 93 5d 00 0c stw r26,12(r29)
/* now rotate grandparent in the other branch direction (toward uncle) */
_RBTree_Rotate(g, (1-pdir));
ffc0b4d0: 7f fd fb 78 mr r29,r31
ffc0b4d4: 4b ff fd d9 bl ffc0b2ac <_RBTree_Rotate>
ffc0b4d8: 7f bf eb 78 mr r31,r29
ffc0b4dc: 48 00 00 0c b ffc0b4e8 <_RBTree_Insert_unprotected+0x1c0>
ffc0b4e0: 3b 60 00 00 li r27,0
ffc0b4e4: 3b 40 00 01 li r26,1
_ISR_Disable( level );
return_node = _RBTree_Insert_unprotected( tree, node );
_ISR_Enable( level );
return return_node;
}
ffc0b4e8: 80 7f 00 00 lwz r3,0(r31)
*/
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Parent(
const RBTree_Node *the_node
)
{
if (!the_node->parent->parent) return NULL;
ffc0b4ec: 83 a3 00 00 lwz r29,0(r3)
ffc0b4f0: 2f 9d 00 00 cmpwi cr7,r29,0
ffc0b4f4: 40 be 00 28 bne+ cr7,ffc0b51c <_RBTree_Insert_unprotected+0x1f4>
*/
RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
const RBTree_Node *the_node
)
{
return (the_node && the_node->color == RBT_RED);
ffc0b4f8: 39 20 00 00 li r9,0
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))) {
ffc0b4fc: 2f 09 00 00 cmpwi cr6,r9,0
ffc0b500: 2f 9d 00 00 cmpwi cr7,r29,0
ffc0b504: 40 9a ff 14 bne+ cr6,ffc0b418 <_RBTree_Insert_unprotected+0xf0>
/* 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;
ffc0b508: 40 be 00 28 bne+ cr7,ffc0b530 <_RBTree_Insert_unprotected+0x208>
ffc0b50c: 93 bf 00 0c stw r29,12(r31)
ffc0b510: 48 00 00 20 b ffc0b530 <_RBTree_Insert_unprotected+0x208>
RBTree_Node *_RBTree_Insert_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
if(!the_node) return (RBTree_Node*)-1;
ffc0b514: 3b c0 ff ff li r30,-1
ffc0b518: 48 00 00 18 b ffc0b530 <_RBTree_Insert_unprotected+0x208>
ffc0b51c: 81 23 00 0c lwz r9,12(r3)
ffc0b520: 69 29 00 01 xori r9,r9,1
ffc0b524: 7d 29 00 34 cntlzw r9,r9
ffc0b528: 55 29 d9 7e rlwinm r9,r9,27,5,31
ffc0b52c: 4b ff ff d0 b ffc0b4fc <_RBTree_Insert_unprotected+0x1d4>
/* verify red-black properties */
_RBTree_Validate_insert_unprotected(the_node);
}
return (RBTree_Node*)0;
}
ffc0b530: 39 61 00 20 addi r11,r1,32
ffc0b534: 7f c3 f3 78 mr r3,r30
ffc0b538: 4b ff 58 2c b ffc00d64 <_restgpr_26_x>
ffc0b570 <_RBTree_Iterate_unprotected>:
const RBTree_Control *rbtree,
RBTree_Direction dir,
RBTree_Visitor visitor,
void *visitor_arg
)
{
ffc0b570: 94 21 ff e0 stwu r1,-32(r1)
ffc0b574: 7c 08 02 a6 mflr r0
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
ffc0b578: 7c 89 00 34 cntlzw r9,r4
ffc0b57c: 55 29 d9 7e rlwinm r9,r9,27,5,31
ffc0b580: 90 01 00 24 stw r0,36(r1)
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_First(
const RBTree_Control *the_rbtree,
RBTree_Direction dir
)
{
return the_rbtree->first[dir];
ffc0b584: 55 29 10 3a rlwinm r9,r9,2,0,29
ffc0b588: 7c 63 4a 14 add r3,r3,r9
ffc0b58c: bf 61 00 0c stmw r27,12(r1)
ffc0b590: 7c bd 2b 78 mr r29,r5
ffc0b594: 7c dc 33 78 mr r28,r6
ffc0b598: 83 e3 00 08 lwz r31,8(r3)
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
ffc0b59c: 7c 9e 23 78 mr r30,r4
ffc0b5a0: 48 00 00 34 b ffc0b5d4 <_RBTree_Iterate_unprotected+0x64>
RBTree_Direction opp_dir = _RBTree_Opposite_direction( dir );
const RBTree_Node *current = _RBTree_First( rbtree, opp_dir );
bool stop = false;
while ( !stop && current != NULL ) {
stop = (*visitor)( current, dir, visitor_arg );
ffc0b5a4: 7f e3 fb 78 mr r3,r31
ffc0b5a8: 7f a9 03 a6 mtctr r29
ffc0b5ac: 7f c4 f3 78 mr r4,r30
ffc0b5b0: 7f 85 e3 78 mr r5,r28
ffc0b5b4: 4e 80 04 21 bctrl
current = _RBTree_Next_unprotected( current, dir );
ffc0b5b8: 7f c4 f3 78 mr r4,r30
RBTree_Direction opp_dir = _RBTree_Opposite_direction( dir );
const RBTree_Node *current = _RBTree_First( rbtree, opp_dir );
bool stop = false;
while ( !stop && current != NULL ) {
stop = (*visitor)( current, dir, visitor_arg );
ffc0b5bc: 7c 7b 1b 78 mr r27,r3
current = _RBTree_Next_unprotected( current, dir );
ffc0b5c0: 7f e3 fb 78 mr r3,r31
ffc0b5c4: 48 00 00 21 bl ffc0b5e4 <_RBTree_Next_unprotected>
{
RBTree_Direction opp_dir = _RBTree_Opposite_direction( dir );
const RBTree_Node *current = _RBTree_First( rbtree, opp_dir );
bool stop = false;
while ( !stop && current != NULL ) {
ffc0b5c8: 2f 9b 00 00 cmpwi cr7,r27,0
stop = (*visitor)( current, dir, visitor_arg );
current = _RBTree_Next_unprotected( current, dir );
ffc0b5cc: 7c 7f 1b 78 mr r31,r3
{
RBTree_Direction opp_dir = _RBTree_Opposite_direction( dir );
const RBTree_Node *current = _RBTree_First( rbtree, opp_dir );
bool stop = false;
while ( !stop && current != NULL ) {
ffc0b5d0: 40 9e 00 0c bne- cr7,ffc0b5dc <_RBTree_Iterate_unprotected+0x6c><== NEVER TAKEN
ffc0b5d4: 2f 9f 00 00 cmpwi cr7,r31,0
ffc0b5d8: 40 9e ff cc bne+ cr7,ffc0b5a4 <_RBTree_Iterate_unprotected+0x34>
stop = (*visitor)( current, dir, visitor_arg );
current = _RBTree_Next_unprotected( current, dir );
}
}
ffc0b5dc: 39 61 00 20 addi r11,r1,32
ffc0b5e0: 4b ff 57 88 b ffc00d68 <_restgpr_27_x>
ffc0ae70 <_RBTree_Sibling>:
*/
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling(
const RBTree_Node *the_node
)
{
if(!the_node) return NULL;
ffc0ae70: 7c 6a 1b 79 mr. r10,r3
ffc0ae74: 41 82 00 30 beq- ffc0aea4 <_RBTree_Sibling+0x34> <== NEVER TAKEN
if(!(the_node->parent)) return NULL;
ffc0ae78: 81 2a 00 00 lwz r9,0(r10)
ffc0ae7c: 2f 89 00 00 cmpwi cr7,r9,0
ffc0ae80: 41 9e 00 24 beq- cr7,ffc0aea4 <_RBTree_Sibling+0x34> <== NEVER TAKEN
if(!(the_node->parent->parent)) return NULL;
ffc0ae84: 81 09 00 00 lwz r8,0(r9)
ffc0ae88: 2f 88 00 00 cmpwi cr7,r8,0
ffc0ae8c: 41 9e 00 18 beq- cr7,ffc0aea4 <_RBTree_Sibling+0x34>
if(the_node == the_node->parent->child[RBT_LEFT])
ffc0ae90: 80 69 00 04 lwz r3,4(r9)
ffc0ae94: 7f 8a 18 00 cmpw cr7,r10,r3
ffc0ae98: 4c be 00 20 bnelr+ cr7
return the_node->parent->child[RBT_RIGHT];
ffc0ae9c: 80 69 00 08 lwz r3,8(r9)
ffc0aea0: 4e 80 00 20 blr
*/
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling(
const RBTree_Node *the_node
)
{
if(!the_node) return NULL;
ffc0aea4: 38 60 00 00 li r3,0
if(the_node == the_node->parent->child[RBT_LEFT])
return the_node->parent->child[RBT_RIGHT];
else
return the_node->parent->child[RBT_LEFT];
}
ffc0aea8: 4e 80 00 20 blr
ffc099d8 <_RTEMS_signal_Post_switch_hook>:
#include <rtems/score/thread.h>
#include <rtems/score/apiext.h>
#include <rtems/rtems/tasks.h>
static void _RTEMS_signal_Post_switch_hook( Thread_Control *executing )
{
ffc099d8: 94 21 ff e0 stwu r1,-32(r1)
ffc099dc: 7c 08 02 a6 mflr r0
ffc099e0: 90 01 00 24 stw r0,36(r1)
ffc099e4: bf c1 00 18 stmw r30,24(r1)
RTEMS_API_Control *api;
ASR_Information *asr;
rtems_signal_set signal_set;
Modes_Control prev_mode;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
ffc099e8: 83 e3 01 4c lwz r31,332(r3)
if ( !api )
ffc099ec: 2f 9f 00 00 cmpwi cr7,r31,0
ffc099f0: 41 9e 00 7c beq- cr7,ffc09a6c <_RTEMS_signal_Post_switch_hook+0x94><== NEVER TAKEN
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc099f4: 7d 20 00 a6 mfmsr r9
ffc099f8: 7d 50 42 a6 mfsprg r10,0
ffc099fc: 7d 2a 50 78 andc r10,r9,r10
ffc09a00: 7d 40 01 24 mtmsr r10
asr = &api->Signal;
_ISR_Disable( level );
signal_set = asr->signals_posted;
asr->signals_posted = 0;
ffc09a04: 39 40 00 00 li r10,0
*/
asr = &api->Signal;
_ISR_Disable( level );
signal_set = asr->signals_posted;
ffc09a08: 83 df 00 14 lwz r30,20(r31)
asr->signals_posted = 0;
ffc09a0c: 91 5f 00 14 stw r10,20(r31)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc09a10: 7d 20 01 24 mtmsr r9
_ISR_Enable( level );
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
ffc09a14: 2f 9e 00 00 cmpwi cr7,r30,0
ffc09a18: 41 be 00 54 beq+ cr7,ffc09a6c <_RTEMS_signal_Post_switch_hook+0x94>
return;
asr->nest_level += 1;
ffc09a1c: 81 3f 00 1c lwz r9,28(r31)
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
ffc09a20: 38 80 00 00 li r4,0
ffc09a24: 80 7f 00 10 lwz r3,16(r31)
ffc09a28: 60 84 ff ff ori r4,r4,65535
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
return;
asr->nest_level += 1;
ffc09a2c: 39 29 00 01 addi r9,r9,1
ffc09a30: 91 3f 00 1c stw r9,28(r31)
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
ffc09a34: 38 a1 00 08 addi r5,r1,8
ffc09a38: 48 00 04 41 bl ffc09e78 <rtems_task_mode>
(*asr->handler)( signal_set );
ffc09a3c: 81 3f 00 0c lwz r9,12(r31)
ffc09a40: 7f c3 f3 78 mr r3,r30
ffc09a44: 7d 29 03 a6 mtctr r9
ffc09a48: 4e 80 04 21 bctrl
asr->nest_level -= 1;
ffc09a4c: 81 3f 00 1c lwz r9,28(r31)
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
ffc09a50: 38 80 00 00 li r4,0
ffc09a54: 80 61 00 08 lwz r3,8(r1)
asr->nest_level += 1;
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
(*asr->handler)( signal_set );
asr->nest_level -= 1;
ffc09a58: 39 29 ff ff addi r9,r9,-1
ffc09a5c: 91 3f 00 1c stw r9,28(r31)
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
ffc09a60: 60 84 ff ff ori r4,r4,65535
ffc09a64: 38 a1 00 08 addi r5,r1,8
ffc09a68: 48 00 04 11 bl ffc09e78 <rtems_task_mode>
}
ffc09a6c: 39 61 00 20 addi r11,r1,32
ffc09a70: 4b ff 7a a0 b ffc01510 <_restgpr_30_x>
ffc3461c <_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
)
{
ffc3461c: 94 21 ff d8 stwu r1,-40(r1)
ffc34620: 7c 08 02 a6 mflr r0
ffc34624: 90 01 00 2c stw r0,44(r1)
ffc34628: bf 81 00 18 stmw r28,24(r1)
ffc3462c: 7c 9d 23 78 mr r29,r4
*/
static inline void _TOD_Get_uptime(
Timestamp_Control *time
)
{
_TOD_Get_with_nanoseconds( time, &_TOD.uptime );
ffc34630: 3c 80 00 00 lis r4,0
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
Timestamp_Control uptime;
#endif
Thread_Control *owning_thread = the_period->owner;
ffc34634: 83 c3 00 40 lwz r30,64(r3)
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
)
{
ffc34638: 7c 7f 1b 78 mr r31,r3
ffc3463c: 38 84 63 e8 addi r4,r4,25576
ffc34640: 38 61 00 08 addi r3,r1,8
ffc34644: 7c bc 2b 78 mr r28,r5
ffc34648: 4b fd 4b 35 bl ffc0917c <_TOD_Get_with_nanoseconds>
const Timestamp64_Control *_start,
const Timestamp64_Control *_end,
Timestamp64_Control *_result
)
{
*_result = *_end - *_start;
ffc3464c: 81 5f 00 50 lwz r10,80(r31)
ffc34650: 81 7f 00 54 lwz r11,84(r31)
/*
* Determine elapsed wall time since period initiated.
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_TOD_Get_uptime( &uptime );
_Timestamp_Subtract(
ffc34654: 80 c1 00 08 lwz r6,8(r1)
ffc34658: 80 e1 00 0c lwz r7,12(r1)
ffc3465c: 7d 6b 38 10 subfc r11,r11,r7
ffc34660: 7d 4a 31 10 subfe r10,r10,r6
ffc34664: 91 5d 00 00 stw r10,0(r29)
* Determine cpu usage since period initiated.
*/
used = owning_thread->cpu_time_used;
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
if (owning_thread == _Thread_Executing) {
ffc34668: 3d 40 00 00 lis r10,0
ffc3466c: 39 4a 69 20 addi r10,r10,26912
ffc34670: 91 7d 00 04 stw r11,4(r29)
ffc34674: 80 aa 00 10 lwz r5,16(r10)
#endif
/*
* Determine cpu usage since period initiated.
*/
used = owning_thread->cpu_time_used;
ffc34678: 81 1e 00 80 lwz r8,128(r30)
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
if (owning_thread == _Thread_Executing) {
ffc3467c: 7f 9e 28 00 cmpw cr7,r30,r5
#endif
/*
* Determine cpu usage since period initiated.
*/
used = owning_thread->cpu_time_used;
ffc34680: 81 3e 00 84 lwz r9,132(r30)
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
if (owning_thread == _Thread_Executing) {
ffc34684: 40 be 00 48 bne+ cr7,ffc346cc <_Rate_monotonic_Get_status+0xb0>
ffc34688: 81 6a 00 24 lwz r11,36(r10)
ffc3468c: 81 4a 00 20 lwz r10,32(r10)
ffc34690: 7c eb 38 10 subfc r7,r11,r7
ffc34694: 7c ca 31 10 subfe r6,r10,r6
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
ffc34698: 81 5f 00 48 lwz r10,72(r31)
ffc3469c: 81 7f 00 4c lwz r11,76(r31)
static inline void _Timestamp64_implementation_Add_to(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
*_time += *_add;
ffc346a0: 7d 29 38 14 addc r9,r9,r7
ffc346a4: 7d 08 31 14 adde r8,r8,r6
/*
* The cpu usage info was reset while executing. Can't
* determine a status.
*/
if (_Timestamp_Less_than(&used, &the_period->cpu_usage_period_initiated))
ffc346a8: 7f 8a 40 00 cmpw cr7,r10,r8
ffc346ac: 41 9d 00 28 bgt- cr7,ffc346d4 <_Rate_monotonic_Get_status+0xb8><== NEVER TAKEN
ffc346b0: 40 be 00 0c bne+ cr7,ffc346bc <_Rate_monotonic_Get_status+0xa0>
ffc346b4: 7f 8b 48 40 cmplw cr7,r11,r9
ffc346b8: 41 9d 00 1c bgt- cr7,ffc346d4 <_Rate_monotonic_Get_status+0xb8>
const Timestamp64_Control *_start,
const Timestamp64_Control *_end,
Timestamp64_Control *_result
)
{
*_result = *_end - *_start;
ffc346bc: 7d 6b 48 10 subfc r11,r11,r9
ffc346c0: 7d 4a 41 10 subfe r10,r10,r8
ffc346c4: 91 5c 00 00 stw r10,0(r28)
ffc346c8: 91 7c 00 04 stw r11,4(r28)
if (used < the_period->cpu_usage_period_initiated)
return false;
*cpu_since_last_period = used - the_period->cpu_usage_period_initiated;
#endif
return true;
ffc346cc: 38 60 00 01 li r3,1
ffc346d0: 48 00 00 08 b ffc346d8 <_Rate_monotonic_Get_status+0xbc>
/*
* 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;
ffc346d4: 38 60 00 00 li r3,0
return false;
*cpu_since_last_period = used - the_period->cpu_usage_period_initiated;
#endif
return true;
}
ffc346d8: 39 61 00 28 addi r11,r1,40
ffc346dc: 48 01 fe 24 b ffc54500 <_restgpr_28_x>
ffc34a78 <_Rate_monotonic_Timeout>:
void _Rate_monotonic_Timeout(
Objects_Id id,
void *ignored
)
{
ffc34a78: 7c 2b 0b 78 mr r11,r1
ffc34a7c: 94 21 ff e0 stwu r1,-32(r1)
ffc34a80: 7c 08 02 a6 mflr r0
ffc34a84: 7c 64 1b 78 mr r4,r3
ffc34a88: 3c 60 00 00 lis r3,0
ffc34a8c: 48 01 fa 35 bl ffc544c0 <_savegpr_31>
ffc34a90: 38 63 6f 3c addi r3,r3,28476
ffc34a94: 90 01 00 24 stw r0,36(r1)
ffc34a98: 38 a1 00 08 addi r5,r1,8
ffc34a9c: 4b fd 51 61 bl ffc09bfc <_Objects_Get>
/*
* When we get here, the Timer is already off the chain so we do not
* have to worry about that -- hence no _Watchdog_Remove().
*/
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
ffc34aa0: 81 21 00 08 lwz r9,8(r1)
ffc34aa4: 2f 89 00 00 cmpwi cr7,r9,0
ffc34aa8: 40 9e 00 88 bne- cr7,ffc34b30 <_Rate_monotonic_Timeout+0xb8><== NEVER TAKEN
ffc34aac: 7c 7f 1b 78 mr r31,r3
case OBJECTS_LOCAL:
the_thread = the_period->owner;
ffc34ab0: 80 63 00 40 lwz r3,64(r3)
*/
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_period (
States_Control the_states
)
{
return (the_states & STATES_WAITING_FOR_PERIOD);
ffc34ab4: 81 23 00 10 lwz r9,16(r3)
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
ffc34ab8: 71 2a 40 00 andi. r10,r9,16384
ffc34abc: 41 82 00 24 beq- ffc34ae0 <_Rate_monotonic_Timeout+0x68>
ffc34ac0: 81 43 00 20 lwz r10,32(r3)
ffc34ac4: 81 3f 00 08 lwz r9,8(r31)
ffc34ac8: 7f 8a 48 00 cmpw cr7,r10,r9
ffc34acc: 40 be 00 14 bne+ cr7,ffc34ae0 <_Rate_monotonic_Timeout+0x68>
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
ffc34ad0: 3c 80 10 07 lis r4,4103
ffc34ad4: 60 84 ff f8 ori r4,r4,65528
ffc34ad8: 4b fd 5b 59 bl ffc0a630 <_Thread_Clear_state>
ffc34adc: 48 00 00 18 b ffc34af4 <_Rate_monotonic_Timeout+0x7c>
_Thread_Unblock( the_thread );
_Rate_monotonic_Initiate_statistics( the_period );
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) {
ffc34ae0: 81 3f 00 38 lwz r9,56(r31)
ffc34ae4: 2f 89 00 01 cmpwi cr7,r9,1
ffc34ae8: 40 be 00 30 bne+ cr7,ffc34b18 <_Rate_monotonic_Timeout+0xa0>
the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING;
ffc34aec: 39 20 00 03 li r9,3
ffc34af0: 91 3f 00 38 stw r9,56(r31)
_Rate_monotonic_Initiate_statistics( the_period );
ffc34af4: 7f e3 fb 78 mr r3,r31
ffc34af8: 4b ff fd 15 bl ffc3480c <_Rate_monotonic_Initiate_statistics>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
ffc34afc: 81 3f 00 3c lwz r9,60(r31)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc34b00: 3c 60 00 00 lis r3,0
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
ffc34b04: 91 3f 00 1c stw r9,28(r31)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc34b08: 38 63 65 28 addi r3,r3,25896
ffc34b0c: 38 9f 00 10 addi r4,r31,16
ffc34b10: 4b fd 6c ad bl ffc0b7bc <_Watchdog_Insert>
ffc34b14: 48 00 00 0c b ffc34b20 <_Rate_monotonic_Timeout+0xa8>
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else
the_period->state = RATE_MONOTONIC_EXPIRED;
ffc34b18: 39 20 00 04 li r9,4
ffc34b1c: 91 3f 00 38 stw r9,56(r31)
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
ffc34b20: 3d 20 00 00 lis r9,0
ffc34b24: 81 49 34 e4 lwz r10,13540(r9)
--level;
ffc34b28: 39 4a ff ff addi r10,r10,-1
_Thread_Dispatch_disable_level = level;
ffc34b2c: 91 49 34 e4 stw r10,13540(r9)
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
ffc34b30: 39 61 00 20 addi r11,r1,32
ffc34b34: 48 01 f9 d8 b ffc5450c <_restgpr_31_x>
ffc346e0 <_Rate_monotonic_Update_statistics>:
}
static void _Rate_monotonic_Update_statistics(
Rate_monotonic_Control *the_period
)
{
ffc346e0: 7c 2b 0b 78 mr r11,r1
ffc346e4: 7c 08 02 a6 mflr r0
ffc346e8: 94 21 ff e0 stwu r1,-32(r1)
ffc346ec: 90 01 00 24 stw r0,36(r1)
ffc346f0: 48 01 fd d1 bl ffc544c0 <_savegpr_31>
ffc346f4: 7c 7f 1b 78 mr r31,r3
/*
* Update the counts.
*/
stats = &the_period->Statistics;
stats->count++;
ffc346f8: 81 23 00 58 lwz r9,88(r3)
ffc346fc: 39 29 00 01 addi r9,r9,1
ffc34700: 91 23 00 58 stw r9,88(r3)
if ( the_period->state == RATE_MONOTONIC_EXPIRED )
ffc34704: 81 23 00 38 lwz r9,56(r3)
ffc34708: 2f 89 00 04 cmpwi cr7,r9,4
ffc3470c: 40 be 00 10 bne+ cr7,ffc3471c <_Rate_monotonic_Update_statistics+0x3c>
stats->missed_count++;
ffc34710: 81 23 00 5c lwz r9,92(r3)
ffc34714: 39 29 00 01 addi r9,r9,1
ffc34718: 91 23 00 5c stw r9,92(r3)
/*
* Grab status for time statistics.
*/
valid_status =
ffc3471c: 7f e3 fb 78 mr r3,r31
ffc34720: 38 81 00 08 addi r4,r1,8
ffc34724: 38 a1 00 10 addi r5,r1,16
ffc34728: 4b ff fe f5 bl ffc3461c <_Rate_monotonic_Get_status>
_Rate_monotonic_Get_status( the_period, &since_last_period, &executed );
if (!valid_status)
ffc3472c: 2f 83 00 00 cmpwi cr7,r3,0
ffc34730: 41 9e 00 d4 beq- cr7,ffc34804 <_Rate_monotonic_Update_statistics+0x124>
/*
* Update CPU time
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Add_to( &stats->total_cpu_time, &executed );
ffc34734: 81 41 00 10 lwz r10,16(r1)
static inline void _Timestamp64_implementation_Add_to(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
*_time += *_add;
ffc34738: 81 1f 00 70 lwz r8,112(r31)
ffc3473c: 81 3f 00 74 lwz r9,116(r31)
ffc34740: 81 61 00 14 lwz r11,20(r1)
ffc34744: 7d 29 58 14 addc r9,r9,r11
ffc34748: 7d 08 51 14 adde r8,r8,r10
ffc3474c: 91 3f 00 74 stw r9,116(r31)
if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) )
ffc34750: 81 3f 00 60 lwz r9,96(r31)
ffc34754: 91 1f 00 70 stw r8,112(r31)
ffc34758: 7f 89 50 00 cmpw cr7,r9,r10
ffc3475c: 41 9d 00 14 bgt- cr7,ffc34770 <_Rate_monotonic_Update_statistics+0x90>
ffc34760: 40 9e 00 18 bne- cr7,ffc34778 <_Rate_monotonic_Update_statistics+0x98><== NEVER TAKEN
ffc34764: 81 3f 00 64 lwz r9,100(r31)
ffc34768: 7f 89 58 40 cmplw cr7,r9,r11
ffc3476c: 40 9d 00 0c ble- cr7,ffc34778 <_Rate_monotonic_Update_statistics+0x98>
stats->min_cpu_time = executed;
ffc34770: 91 5f 00 60 stw r10,96(r31)
ffc34774: 91 7f 00 64 stw r11,100(r31)
if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) )
ffc34778: 81 3f 00 68 lwz r9,104(r31)
ffc3477c: 7f 89 50 00 cmpw cr7,r9,r10
ffc34780: 41 9c 00 14 blt- cr7,ffc34794 <_Rate_monotonic_Update_statistics+0xb4><== NEVER TAKEN
ffc34784: 40 9e 00 18 bne- cr7,ffc3479c <_Rate_monotonic_Update_statistics+0xbc><== NEVER TAKEN
ffc34788: 81 3f 00 6c lwz r9,108(r31)
ffc3478c: 7f 89 58 40 cmplw cr7,r9,r11
ffc34790: 40 9c 00 0c bge- cr7,ffc3479c <_Rate_monotonic_Update_statistics+0xbc>
stats->max_cpu_time = executed;
ffc34794: 91 5f 00 68 stw r10,104(r31)
ffc34798: 91 7f 00 6c stw r11,108(r31)
/*
* Update Wall time
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Add_to( &stats->total_wall_time, &since_last_period );
ffc3479c: 81 41 00 08 lwz r10,8(r1)
ffc347a0: 81 1f 00 88 lwz r8,136(r31)
ffc347a4: 81 3f 00 8c lwz r9,140(r31)
ffc347a8: 81 61 00 0c lwz r11,12(r1)
ffc347ac: 7d 29 58 14 addc r9,r9,r11
ffc347b0: 7d 08 51 14 adde r8,r8,r10
ffc347b4: 91 3f 00 8c stw r9,140(r31)
if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) )
ffc347b8: 81 3f 00 78 lwz r9,120(r31)
ffc347bc: 91 1f 00 88 stw r8,136(r31)
ffc347c0: 7f 89 50 00 cmpw cr7,r9,r10
ffc347c4: 41 9d 00 14 bgt- cr7,ffc347d8 <_Rate_monotonic_Update_statistics+0xf8>
ffc347c8: 40 9e 00 18 bne- cr7,ffc347e0 <_Rate_monotonic_Update_statistics+0x100><== NEVER TAKEN
ffc347cc: 81 3f 00 7c lwz r9,124(r31)
ffc347d0: 7f 89 58 40 cmplw cr7,r9,r11
ffc347d4: 40 9d 00 0c ble- cr7,ffc347e0 <_Rate_monotonic_Update_statistics+0x100>
stats->min_wall_time = since_last_period;
ffc347d8: 91 5f 00 78 stw r10,120(r31)
ffc347dc: 91 7f 00 7c stw r11,124(r31)
if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) )
ffc347e0: 81 3f 00 80 lwz r9,128(r31)
ffc347e4: 7f 89 50 00 cmpw cr7,r9,r10
ffc347e8: 41 bc 00 14 blt+ cr7,ffc347fc <_Rate_monotonic_Update_statistics+0x11c><== NEVER TAKEN
ffc347ec: 40 9e 00 18 bne- cr7,ffc34804 <_Rate_monotonic_Update_statistics+0x124>
ffc347f0: 81 3f 00 84 lwz r9,132(r31)
ffc347f4: 7f 89 58 40 cmplw cr7,r9,r11
ffc347f8: 40 9c 00 0c bge- cr7,ffc34804 <_Rate_monotonic_Update_statistics+0x124>
stats->max_wall_time = since_last_period;
ffc347fc: 91 5f 00 80 stw r10,128(r31)
ffc34800: 91 7f 00 84 stw r11,132(r31)
stats->min_wall_time = since_last_period;
if ( since_last_period > stats->max_wall_time )
stats->max_wall_time = since_last_period;
#endif
}
ffc34804: 39 61 00 20 addi r11,r1,32
ffc34808: 48 01 fd 04 b ffc5450c <_restgpr_31_x>
ffc0b0c8 <_Scheduler_CBS_Allocate>:
#include <rtems/score/wkspace.h>
void *_Scheduler_CBS_Allocate(
Thread_Control *the_thread
)
{
ffc0b0c8: 7c 2b 0b 78 mr r11,r1
ffc0b0cc: 94 21 ff f0 stwu r1,-16(r1)
ffc0b0d0: 7c 08 02 a6 mflr r0
ffc0b0d4: 48 01 17 9d bl ffc1c870 <_savegpr_31>
ffc0b0d8: 7c 7f 1b 78 mr r31,r3
void *sched;
Scheduler_CBS_Per_thread *schinfo;
sched = _Workspace_Allocate(sizeof(Scheduler_CBS_Per_thread));
ffc0b0dc: 38 60 00 1c li r3,28
#include <rtems/score/wkspace.h>
void *_Scheduler_CBS_Allocate(
Thread_Control *the_thread
)
{
ffc0b0e0: 90 01 00 14 stw r0,20(r1)
void *sched;
Scheduler_CBS_Per_thread *schinfo;
sched = _Workspace_Allocate(sizeof(Scheduler_CBS_Per_thread));
ffc0b0e4: 48 00 1c c9 bl ffc0cdac <_Workspace_Allocate>
if ( sched ) {
ffc0b0e8: 2c 03 00 00 cmpwi r3,0
ffc0b0ec: 41 82 00 1c beq- ffc0b108 <_Scheduler_CBS_Allocate+0x40><== NEVER TAKEN
the_thread->scheduler_info = sched;
schinfo = (Scheduler_CBS_Per_thread *)(the_thread->scheduler_info);
schinfo->edf_per_thread.thread = the_thread;
schinfo->edf_per_thread.queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN;
ffc0b0f0: 39 40 00 02 li r10,2
void *sched;
Scheduler_CBS_Per_thread *schinfo;
sched = _Workspace_Allocate(sizeof(Scheduler_CBS_Per_thread));
if ( sched ) {
the_thread->scheduler_info = sched;
ffc0b0f4: 90 7f 00 88 stw r3,136(r31)
schinfo = (Scheduler_CBS_Per_thread *)(the_thread->scheduler_info);
schinfo->edf_per_thread.thread = the_thread;
schinfo->edf_per_thread.queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN;
ffc0b0f8: 91 43 00 14 stw r10,20(r3)
schinfo->cbs_server = NULL;
ffc0b0fc: 39 40 00 00 li r10,0
sched = _Workspace_Allocate(sizeof(Scheduler_CBS_Per_thread));
if ( sched ) {
the_thread->scheduler_info = sched;
schinfo = (Scheduler_CBS_Per_thread *)(the_thread->scheduler_info);
schinfo->edf_per_thread.thread = the_thread;
ffc0b100: 93 e3 00 00 stw r31,0(r3)
schinfo->edf_per_thread.queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN;
schinfo->cbs_server = NULL;
ffc0b104: 91 43 00 18 stw r10,24(r3)
}
return sched;
}
ffc0b108: 39 61 00 10 addi r11,r1,16
ffc0b10c: 4b ff 5a c0 b ffc00bcc <_restgpr_31_x>
ffc0c784 <_Scheduler_CBS_Budget_callout>:
Scheduler_CBS_Server **_Scheduler_CBS_Server_list;
void _Scheduler_CBS_Budget_callout(
Thread_Control *the_thread
)
{
ffc0c784: 7c 2b 0b 78 mr r11,r1
ffc0c788: 7c 08 02 a6 mflr r0
ffc0c78c: 94 21 ff e0 stwu r1,-32(r1)
ffc0c790: 90 01 00 24 stw r0,36(r1)
ffc0c794: 48 01 17 f1 bl ffc1df84 <_savegpr_31>
ffc0c798: 7c 7f 1b 78 mr r31,r3
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;
ffc0c79c: 80 83 00 ac lwz r4,172(r3)
if ( the_thread->real_priority != new_priority )
ffc0c7a0: 81 23 00 18 lwz r9,24(r3)
ffc0c7a4: 7f 89 20 00 cmpw cr7,r9,r4
ffc0c7a8: 41 9e 00 08 beq- cr7,ffc0c7b0 <_Scheduler_CBS_Budget_callout+0x2c><== NEVER TAKEN
the_thread->real_priority = new_priority;
ffc0c7ac: 90 83 00 18 stw r4,24(r3)
if ( the_thread->current_priority != new_priority )
ffc0c7b0: 81 3f 00 14 lwz r9,20(r31)
ffc0c7b4: 7f 89 20 00 cmpw cr7,r9,r4
ffc0c7b8: 41 9e 00 10 beq- cr7,ffc0c7c8 <_Scheduler_CBS_Budget_callout+0x44><== NEVER TAKEN
_Thread_Change_priority(the_thread, new_priority, true);
ffc0c7bc: 7f e3 fb 78 mr r3,r31
ffc0c7c0: 38 a0 00 01 li r5,1
ffc0c7c4: 48 00 06 69 bl ffc0ce2c <_Thread_Change_priority>
/* Invoke callback function if any. */
sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
ffc0c7c8: 83 ff 00 88 lwz r31,136(r31)
if ( sched_info->cbs_server->cbs_budget_overrun ) {
ffc0c7cc: 81 3f 00 18 lwz r9,24(r31)
ffc0c7d0: 81 49 00 0c lwz r10,12(r9)
ffc0c7d4: 2f 8a 00 00 cmpwi cr7,r10,0
ffc0c7d8: 41 9e 00 24 beq- cr7,ffc0c7fc <_Scheduler_CBS_Budget_callout+0x78><== NEVER TAKEN
_Scheduler_CBS_Get_server_id(
ffc0c7dc: 80 69 00 00 lwz r3,0(r9)
ffc0c7e0: 38 81 00 08 addi r4,r1,8
ffc0c7e4: 4b ff ff 49 bl ffc0c72c <_Scheduler_CBS_Get_server_id>
sched_info->cbs_server->task_id,
&server_id
);
sched_info->cbs_server->cbs_budget_overrun( server_id );
ffc0c7e8: 81 3f 00 18 lwz r9,24(r31)
ffc0c7ec: 80 61 00 08 lwz r3,8(r1)
ffc0c7f0: 81 29 00 0c lwz r9,12(r9)
ffc0c7f4: 7d 29 03 a6 mtctr r9
ffc0c7f8: 4e 80 04 21 bctrl
}
}
ffc0c7fc: 39 61 00 20 addi r11,r1,32
ffc0c800: 4b ff 50 b8 b ffc018b8 <_restgpr_31_x>
ffc0c340 <_Scheduler_CBS_Create_server>:
int _Scheduler_CBS_Create_server (
Scheduler_CBS_Parameters *params,
Scheduler_CBS_Budget_overrun budget_overrun_callback,
rtems_id *server_id
)
{
ffc0c340: 94 21 ff e0 stwu r1,-32(r1)
ffc0c344: 7c 08 02 a6 mflr r0
ffc0c348: 90 01 00 24 stw r0,36(r1)
unsigned int i;
Scheduler_CBS_Server *the_server;
if ( params->budget <= 0 ||
ffc0c34c: 81 23 00 04 lwz r9,4(r3)
int _Scheduler_CBS_Create_server (
Scheduler_CBS_Parameters *params,
Scheduler_CBS_Budget_overrun budget_overrun_callback,
rtems_id *server_id
)
{
ffc0c350: bf 41 00 08 stmw r26,8(r1)
ffc0c354: 7c 7f 1b 78 mr r31,r3
unsigned int i;
Scheduler_CBS_Server *the_server;
if ( params->budget <= 0 ||
ffc0c358: 2f 89 00 00 cmpwi cr7,r9,0
ffc0c35c: 40 9d 00 7c ble- cr7,ffc0c3d8 <_Scheduler_CBS_Create_server+0x98>
ffc0c360: 81 23 00 00 lwz r9,0(r3)
ffc0c364: 2f 89 00 00 cmpwi cr7,r9,0
ffc0c368: 40 9d 00 70 ble- cr7,ffc0c3d8 <_Scheduler_CBS_Create_server+0x98>
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++ ) {
ffc0c36c: 3d 20 00 00 lis r9,0
ffc0c370: 81 49 27 d4 lwz r10,10196(r9)
if ( !_Scheduler_CBS_Server_list[i] )
ffc0c374: 3d 20 00 00 lis r9,0
ffc0c378: 81 09 28 f4 lwz r8,10484(r9)
ffc0c37c: 7c 9a 23 78 mr r26,r4
ffc0c380: 39 4a 00 01 addi r10,r10,1
ffc0c384: 7c bd 2b 78 mr r29,r5
ffc0c388: 7d 49 03 a6 mtctr r10
ffc0c38c: 39 20 00 00 li r9,0
ffc0c390: 48 00 00 18 b ffc0c3a8 <_Scheduler_CBS_Create_server+0x68>
#include <rtems/system.h>
#include <rtems/config.h>
#include <rtems/score/scheduler.h>
#include <rtems/score/schedulercbs.h>
int _Scheduler_CBS_Create_server (
ffc0c394: 55 3c 10 3a rlwinm r28,r9,2,0,29
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++ ) {
if ( !_Scheduler_CBS_Server_list[i] )
ffc0c398: 7d 48 e0 2e lwzx r10,r8,r28
ffc0c39c: 2f 8a 00 00 cmpwi cr7,r10,0
ffc0c3a0: 41 9e 00 48 beq- cr7,ffc0c3e8 <_Scheduler_CBS_Create_server+0xa8>
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++ ) {
ffc0c3a4: 39 29 00 01 addi r9,r9,1
ffc0c3a8: 42 00 ff ec bdnz+ ffc0c394 <_Scheduler_CBS_Create_server+0x54>
if ( !_Scheduler_CBS_Server_list[i] )
break;
}
if ( i == _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_FULL;
ffc0c3ac: 38 60 ff e6 li r3,-26
ffc0c3b0: 48 00 00 6c b ffc0c41c <_Scheduler_CBS_Create_server+0xdc>
_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;
ffc0c3b4: 81 5f 00 00 lwz r10,0(r31)
the_server->task_id = -1;
the_server->cbs_budget_overrun = budget_overrun_callback;
return SCHEDULER_CBS_OK;
ffc0c3b8: 38 60 00 00 li r3,0
_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;
ffc0c3bc: 81 7f 00 04 lwz r11,4(r31)
ffc0c3c0: 91 49 00 04 stw r10,4(r9)
the_server->task_id = -1;
ffc0c3c4: 39 40 ff ff li r10,-1
_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;
ffc0c3c8: 91 69 00 08 stw r11,8(r9)
the_server->task_id = -1;
ffc0c3cc: 91 49 00 00 stw r10,0(r9)
the_server->cbs_budget_overrun = budget_overrun_callback;
ffc0c3d0: 93 49 00 0c stw r26,12(r9)
return SCHEDULER_CBS_OK;
ffc0c3d4: 48 00 00 48 b ffc0c41c <_Scheduler_CBS_Create_server+0xdc>
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;
ffc0c3d8: 38 60 ff ee li r3,-18
ffc0c3dc: 48 00 00 40 b ffc0c41c <_Scheduler_CBS_Create_server+0xdc>
*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;
ffc0c3e0: 38 60 ff ef li r3,-17 <== NOT EXECUTED
ffc0c3e4: 48 00 00 38 b ffc0c41c <_Scheduler_CBS_Create_server+0xdc><== NOT EXECUTED
}
if ( i == _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_FULL;
*server_id = i;
ffc0c3e8: 91 3d 00 00 stw r9,0(r29)
_Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *)
ffc0c3ec: 3f c0 00 00 lis r30,0
_Workspace_Allocate( sizeof(Scheduler_CBS_Server) );
ffc0c3f0: 38 60 00 10 li r3,16
if ( i == _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_FULL;
*server_id = i;
_Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *)
ffc0c3f4: 83 7e 28 f4 lwz r27,10484(r30)
_Workspace_Allocate( sizeof(Scheduler_CBS_Server) );
ffc0c3f8: 48 00 20 c9 bl ffc0e4c0 <_Workspace_Allocate>
the_server = _Scheduler_CBS_Server_list[*server_id];
ffc0c3fc: 81 3d 00 00 lwz r9,0(r29)
if ( i == _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_FULL;
*server_id = i;
_Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *)
ffc0c400: 7c 7b e1 2e stwx r3,r27,r28
_Workspace_Allocate( sizeof(Scheduler_CBS_Server) );
the_server = _Scheduler_CBS_Server_list[*server_id];
ffc0c404: 55 29 10 3a rlwinm r9,r9,2,0,29
ffc0c408: 81 5e 28 f4 lwz r10,10484(r30)
ffc0c40c: 7d 2a 48 2e lwzx r9,r10,r9
if ( !the_server )
ffc0c410: 2f 89 00 00 cmpwi cr7,r9,0
ffc0c414: 40 9e ff a0 bne+ cr7,ffc0c3b4 <_Scheduler_CBS_Create_server+0x74><== ALWAYS TAKEN
ffc0c418: 4b ff ff c8 b ffc0c3e0 <_Scheduler_CBS_Create_server+0xa0><== NOT EXECUTED
the_server->parameters = *params;
the_server->task_id = -1;
the_server->cbs_budget_overrun = budget_overrun_callback;
return SCHEDULER_CBS_OK;
}
ffc0c41c: 39 61 00 20 addi r11,r1,32
ffc0c420: 4b ff 54 84 b ffc018a4 <_restgpr_26_x>
ffc0c4a8 <_Scheduler_CBS_Detach_thread>:
int _Scheduler_CBS_Detach_thread (
Scheduler_CBS_Server_id server_id,
rtems_id task_id
)
{
ffc0c4a8: 94 21 ff d8 stwu r1,-40(r1)
ffc0c4ac: 7c 08 02 a6 mflr r0
ffc0c4b0: bf a1 00 1c stmw r29,28(r1)
ffc0c4b4: 7c 7d 1b 78 mr r29,r3
ffc0c4b8: 7c 9e 23 78 mr r30,r4
Objects_Locations location;
Thread_Control *the_thread;
Scheduler_CBS_Per_thread *sched_info;
the_thread = _Thread_Get(task_id, &location);
ffc0c4bc: 7c 83 23 78 mr r3,r4
int _Scheduler_CBS_Detach_thread (
Scheduler_CBS_Server_id server_id,
rtems_id task_id
)
{
ffc0c4c0: 90 01 00 2c stw r0,44(r1)
Objects_Locations location;
Thread_Control *the_thread;
Scheduler_CBS_Per_thread *sched_info;
the_thread = _Thread_Get(task_id, &location);
ffc0c4c4: 38 81 00 08 addi r4,r1,8
ffc0c4c8: 48 00 0e c5 bl ffc0d38c <_Thread_Get>
/* The routine _Thread_Get may disable dispatch and not enable again. */
if ( the_thread ) {
ffc0c4cc: 7c 7f 1b 79 mr. r31,r3
ffc0c4d0: 41 82 00 08 beq- ffc0c4d8 <_Scheduler_CBS_Detach_thread+0x30>
_Thread_Enable_dispatch();
ffc0c4d4: 48 00 0e 9d bl ffc0d370 <_Thread_Enable_dispatch>
}
if ( server_id >= _Scheduler_CBS_Maximum_servers )
ffc0c4d8: 3d 20 00 00 lis r9,0
ffc0c4dc: 81 29 27 d4 lwz r9,10196(r9)
ffc0c4e0: 7f 9d 48 40 cmplw cr7,r29,r9
ffc0c4e4: 40 9c 00 6c bge- cr7,ffc0c550 <_Scheduler_CBS_Detach_thread+0xa8>
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
if ( !the_thread )
ffc0c4e8: 2f 9f 00 00 cmpwi cr7,r31,0
ffc0c4ec: 41 9e 00 64 beq- cr7,ffc0c550 <_Scheduler_CBS_Detach_thread+0xa8>
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
/* Server is not valid. */
if ( !_Scheduler_CBS_Server_list[server_id] )
ffc0c4f0: 3d 20 00 00 lis r9,0
ffc0c4f4: 81 29 28 f4 lwz r9,10484(r9)
ffc0c4f8: 57 bd 10 3a rlwinm r29,r29,2,0,29
ffc0c4fc: 7d 29 e8 2e lwzx r9,r9,r29
ffc0c500: 2f 89 00 00 cmpwi cr7,r9,0
ffc0c504: 41 9e 00 44 beq- cr7,ffc0c548 <_Scheduler_CBS_Detach_thread+0xa0>
return SCHEDULER_CBS_ERROR_NOSERVER;
/* Thread and server are not attached. */
if ( _Scheduler_CBS_Server_list[server_id]->task_id != task_id )
ffc0c508: 81 49 00 00 lwz r10,0(r9)
ffc0c50c: 7f 8a f0 00 cmpw cr7,r10,r30
ffc0c510: 40 9e 00 40 bne- cr7,ffc0c550 <_Scheduler_CBS_Detach_thread+0xa8><== NEVER TAKEN
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
_Scheduler_CBS_Server_list[server_id]->task_id = -1;
ffc0c514: 39 40 ff ff li r10,-1
ffc0c518: 91 49 00 00 stw r10,0(r9)
sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
sched_info->cbs_server = NULL;
ffc0c51c: 39 40 00 00 li r10,0
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;
ffc0c520: 38 60 00 00 li r3,0
if ( _Scheduler_CBS_Server_list[server_id]->task_id != task_id )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
_Scheduler_CBS_Server_list[server_id]->task_id = -1;
sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
sched_info->cbs_server = NULL;
ffc0c524: 81 3f 00 88 lwz r9,136(r31)
ffc0c528: 91 49 00 18 stw r10,24(r9)
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
ffc0c52c: 81 3f 00 a0 lwz r9,160(r31)
ffc0c530: 91 3f 00 78 stw r9,120(r31)
the_thread->budget_callout = the_thread->Start.budget_callout;
ffc0c534: 81 3f 00 a4 lwz r9,164(r31)
ffc0c538: 91 3f 00 7c stw r9,124(r31)
the_thread->is_preemptible = the_thread->Start.is_preemptible;
ffc0c53c: 89 3f 00 9c lbz r9,156(r31)
ffc0c540: 99 3f 00 70 stb r9,112(r31)
ffc0c544: 48 00 00 10 b ffc0c554 <_Scheduler_CBS_Detach_thread+0xac>
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;
ffc0c548: 38 60 ff e7 li r3,-25
ffc0c54c: 48 00 00 08 b ffc0c554 <_Scheduler_CBS_Detach_thread+0xac>
if ( the_thread ) {
_Thread_Enable_dispatch();
}
if ( server_id >= _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
ffc0c550: 38 60 ff ee li r3,-18
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;
}
ffc0c554: 39 61 00 28 addi r11,r1,40
ffc0c558: 4b ff 53 58 b ffc018b0 <_restgpr_29_x>
ffc0c804 <_Scheduler_CBS_Initialize>:
int _Scheduler_CBS_Initialize(void)
{
ffc0c804: 7c 2b 0b 78 mr r11,r1
ffc0c808: 94 21 ff f0 stwu r1,-16(r1)
ffc0c80c: 7c 08 02 a6 mflr r0
ffc0c810: 48 01 17 75 bl ffc1df84 <_savegpr_31>
unsigned int i;
_Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate(
_Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) );
ffc0c814: 3f e0 00 00 lis r31,0
ffc0c818: 80 7f 27 d4 lwz r3,10196(r31)
sched_info->cbs_server->cbs_budget_overrun( server_id );
}
}
int _Scheduler_CBS_Initialize(void)
{
ffc0c81c: 90 01 00 14 stw r0,20(r1)
unsigned int i;
_Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate(
ffc0c820: 54 63 10 3a rlwinm r3,r3,2,0,29
ffc0c824: 48 00 1c 9d bl ffc0e4c0 <_Workspace_Allocate>
ffc0c828: 3d 40 00 00 lis r10,0
_Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) );
if ( !_Scheduler_CBS_Server_list )
ffc0c82c: 2f 83 00 00 cmpwi cr7,r3,0
}
int _Scheduler_CBS_Initialize(void)
{
unsigned int i;
_Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate(
ffc0c830: 90 6a 28 f4 stw r3,10484(r10)
_Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) );
if ( !_Scheduler_CBS_Server_list )
ffc0c834: 41 9e 00 38 beq- cr7,ffc0c86c <_Scheduler_CBS_Initialize+0x68><== NEVER TAKEN
return SCHEDULER_CBS_ERROR_NO_MEMORY;
for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) {
ffc0c838: 81 1f 27 d4 lwz r8,10196(r31)
ffc0c83c: 39 20 00 00 li r9,0
_Scheduler_CBS_Server_list[i] = NULL;
ffc0c840: 38 e0 00 00 li r7,0
ffc0c844: 39 08 00 01 addi r8,r8,1
ffc0c848: 7d 09 03 a6 mtctr r8
ffc0c84c: 48 00 00 14 b ffc0c860 <_Scheduler_CBS_Initialize+0x5c>
ffc0c850: 81 0a 28 f4 lwz r8,10484(r10)
ffc0c854: 55 26 10 3a rlwinm r6,r9,2,0,29
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++) {
ffc0c858: 39 29 00 01 addi r9,r9,1
_Scheduler_CBS_Server_list[i] = NULL;
ffc0c85c: 7c e8 31 2e stwx r7,r8,r6
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++) {
ffc0c860: 42 00 ff f0 bdnz+ ffc0c850 <_Scheduler_CBS_Initialize+0x4c>
_Scheduler_CBS_Server_list[i] = NULL;
}
return SCHEDULER_CBS_OK;
ffc0c864: 38 60 00 00 li r3,0
ffc0c868: 48 00 00 08 b ffc0c870 <_Scheduler_CBS_Initialize+0x6c>
{
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;
ffc0c86c: 38 60 ff ef li r3,-17 <== NOT EXECUTED
for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) {
_Scheduler_CBS_Server_list[i] = NULL;
}
return SCHEDULER_CBS_OK;
}
ffc0c870: 39 61 00 10 addi r11,r1,16
ffc0c874: 4b ff 50 44 b ffc018b8 <_restgpr_31_x>
ffc0b110 <_Scheduler_CBS_Release_job>:
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;
if (deadline) {
ffc0b110: 2c 04 00 00 cmpwi r4,0
{
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;
ffc0b114: 81 23 00 88 lwz r9,136(r3)
)
{
Priority_Control new_priority;
Scheduler_CBS_Per_thread *sched_info =
(Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
Scheduler_CBS_Server *serv_info =
ffc0b118: 81 29 00 18 lwz r9,24(r9)
ffc0b11c: 2f 89 00 00 cmpwi cr7,r9,0
(Scheduler_CBS_Server *) sched_info->cbs_server;
if (deadline) {
ffc0b120: 41 82 00 30 beq- ffc0b150 <_Scheduler_CBS_Release_job+0x40>
ffc0b124: 3d 40 00 00 lis r10,0
/* Initializing or shifting deadline. */
if (serv_info)
ffc0b128: 41 9e 00 18 beq- cr7,ffc0b140 <_Scheduler_CBS_Release_job+0x30>
new_priority = (_Watchdog_Ticks_since_boot + serv_info->parameters.deadline)
ffc0b12c: 80 8a 28 e8 lwz r4,10472(r10)
ffc0b130: 81 49 00 04 lwz r10,4(r9)
ffc0b134: 7c 84 52 14 add r4,r4,r10
ffc0b138: 54 84 00 7e clrlwi r4,r4,1
ffc0b13c: 48 00 00 1c b ffc0b158 <_Scheduler_CBS_Release_job+0x48>
& ~SCHEDULER_EDF_PRIO_MSB;
else
new_priority = (_Watchdog_Ticks_since_boot + deadline)
ffc0b140: 81 2a 28 e8 lwz r9,10472(r10)
ffc0b144: 7c 84 4a 14 add r4,r4,r9
ffc0b148: 54 84 00 7e clrlwi r4,r4,1
ffc0b14c: 48 00 00 14 b ffc0b160 <_Scheduler_CBS_Release_job+0x50>
& ~SCHEDULER_EDF_PRIO_MSB;
}
else {
/* Switch back to background priority. */
new_priority = the_thread->Start.initial_priority;
ffc0b150: 80 83 00 ac lwz r4,172(r3)
}
/* Budget replenishment for the next job. */
if (serv_info)
ffc0b154: 41 9e 00 0c beq- cr7,ffc0b160 <_Scheduler_CBS_Release_job+0x50><== NEVER TAKEN
the_thread->cpu_time_budget = serv_info->parameters.budget;
ffc0b158: 81 29 00 08 lwz r9,8(r9)
ffc0b15c: 91 23 00 74 stw r9,116(r3)
the_thread->real_priority = new_priority;
ffc0b160: 90 83 00 18 stw r4,24(r3)
_Thread_Change_priority(the_thread, new_priority, true);
ffc0b164: 38 a0 00 01 li r5,1
ffc0b168: 48 00 04 f4 b ffc0b65c <_Thread_Change_priority>
ffc0b16c <_Scheduler_CBS_Unblock>:
#include <rtems/score/schedulercbs.h>
void _Scheduler_CBS_Unblock(
Thread_Control *the_thread
)
{
ffc0b16c: 94 21 ff f0 stwu r1,-16(r1)
ffc0b170: 7c 08 02 a6 mflr r0
ffc0b174: bf c1 00 08 stmw r30,8(r1)
ffc0b178: 7c 7f 1b 78 mr r31,r3
ffc0b17c: 90 01 00 14 stw r0,20(r1)
Scheduler_CBS_Per_thread *sched_info;
Scheduler_CBS_Server *serv_info;
Priority_Control new_priority;
_Scheduler_EDF_Enqueue(the_thread);
ffc0b180: 48 00 01 1d bl ffc0b29c <_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;
ffc0b184: 81 3f 00 88 lwz r9,136(r31)
ffc0b188: 81 29 00 18 lwz r9,24(r9)
* 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) {
ffc0b18c: 2f 89 00 00 cmpwi cr7,r9,0
ffc0b190: 41 9e 00 58 beq- cr7,ffc0b1e8 <_Scheduler_CBS_Unblock+0x7c>
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 -
ffc0b194: 3d 00 00 00 lis r8,0
ffc0b198: 81 5f 00 18 lwz r10,24(r31)
ffc0b19c: 80 e8 28 e8 lwz r7,10472(r8)
_Watchdog_Ticks_since_boot;
if ( deadline*budget_left > budget*deadline_left ) {
ffc0b1a0: 81 09 00 04 lwz r8,4(r9)
*/
if (serv_info) {
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 -
ffc0b1a4: 7c e7 50 50 subf r7,r7,r10
_Watchdog_Ticks_since_boot;
if ( deadline*budget_left > budget*deadline_left ) {
ffc0b1a8: 7d 07 41 d6 mullw r8,r7,r8
ffc0b1ac: 80 e9 00 08 lwz r7,8(r9)
ffc0b1b0: 81 3f 00 74 lwz r9,116(r31)
ffc0b1b4: 7d 27 49 d6 mullw r9,r7,r9
ffc0b1b8: 7f 88 48 00 cmpw cr7,r8,r9
ffc0b1bc: 40 9d 00 2c ble- cr7,ffc0b1e8 <_Scheduler_CBS_Unblock+0x7c>
/* Put late unblocked task to background until the end of period. */
new_priority = the_thread->Start.initial_priority;
ffc0b1c0: 80 9f 00 ac lwz r4,172(r31)
if ( the_thread->real_priority != new_priority )
ffc0b1c4: 7f 8a 20 00 cmpw cr7,r10,r4
ffc0b1c8: 41 9e 00 08 beq- cr7,ffc0b1d0 <_Scheduler_CBS_Unblock+0x64>
the_thread->real_priority = new_priority;
ffc0b1cc: 90 9f 00 18 stw r4,24(r31)
if ( the_thread->current_priority != new_priority )
ffc0b1d0: 81 3f 00 14 lwz r9,20(r31)
ffc0b1d4: 7f 89 20 00 cmpw cr7,r9,r4
ffc0b1d8: 41 9e 00 10 beq- cr7,ffc0b1e8 <_Scheduler_CBS_Unblock+0x7c>
_Thread_Change_priority(the_thread, new_priority, true);
ffc0b1dc: 7f e3 fb 78 mr r3,r31
ffc0b1e0: 38 a0 00 01 li r5,1
ffc0b1e4: 48 00 04 79 bl ffc0b65c <_Thread_Change_priority>
* 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,
ffc0b1e8: 3f c0 00 00 lis r30,0
ffc0b1ec: 80 7f 00 14 lwz r3,20(r31)
ffc0b1f0: 3b de 32 40 addi r30,r30,12864
ffc0b1f4: 3d 40 00 00 lis r10,0
ffc0b1f8: 81 3e 00 14 lwz r9,20(r30)
ffc0b1fc: 81 4a 20 b0 lwz r10,8368(r10)
ffc0b200: 80 89 00 14 lwz r4,20(r9)
ffc0b204: 7d 49 03 a6 mtctr r10
ffc0b208: 4e 80 04 21 bctrl
ffc0b20c: 2f 83 00 00 cmpwi cr7,r3,0
ffc0b210: 40 9d 00 34 ble- cr7,ffc0b244 <_Scheduler_CBS_Unblock+0xd8>
_Thread_Heir->current_priority)) {
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
ffc0b214: 81 3e 00 10 lwz r9,16(r30)
* 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,
_Thread_Heir->current_priority)) {
_Thread_Heir = the_thread;
ffc0b218: 93 fe 00 14 stw r31,20(r30)
if ( _Thread_Executing->is_preemptible ||
ffc0b21c: 89 29 00 70 lbz r9,112(r9)
ffc0b220: 2f 89 00 00 cmpwi cr7,r9,0
ffc0b224: 40 9e 00 10 bne- cr7,ffc0b234 <_Scheduler_CBS_Unblock+0xc8>
ffc0b228: 81 3f 00 14 lwz r9,20(r31)
ffc0b22c: 2f 89 00 00 cmpwi cr7,r9,0
ffc0b230: 40 9e 00 14 bne- cr7,ffc0b244 <_Scheduler_CBS_Unblock+0xd8><== ALWAYS TAKEN
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
ffc0b234: 3d 20 00 00 lis r9,0
ffc0b238: 39 40 00 01 li r10,1
ffc0b23c: 39 29 32 40 addi r9,r9,12864
ffc0b240: 99 49 00 0c stb r10,12(r9)
}
}
ffc0b244: 39 61 00 10 addi r11,r1,16
ffc0b248: 4b ff 59 80 b ffc00bc8 <_restgpr_30_x>
ffc0b0c8 <_Scheduler_EDF_Allocate>:
#include <rtems/score/wkspace.h>
void *_Scheduler_EDF_Allocate(
Thread_Control *the_thread
)
{
ffc0b0c8: 7c 2b 0b 78 mr r11,r1
ffc0b0cc: 94 21 ff f0 stwu r1,-16(r1)
ffc0b0d0: 7c 08 02 a6 mflr r0
ffc0b0d4: 48 01 17 01 bl ffc1c7d4 <_savegpr_31>
ffc0b0d8: 7c 7f 1b 78 mr r31,r3
void *sched;
Scheduler_EDF_Per_thread *schinfo;
sched = _Workspace_Allocate( sizeof(Scheduler_EDF_Per_thread) );
ffc0b0dc: 38 60 00 18 li r3,24
#include <rtems/score/wkspace.h>
void *_Scheduler_EDF_Allocate(
Thread_Control *the_thread
)
{
ffc0b0e0: 90 01 00 14 stw r0,20(r1)
void *sched;
Scheduler_EDF_Per_thread *schinfo;
sched = _Workspace_Allocate( sizeof(Scheduler_EDF_Per_thread) );
ffc0b0e4: 48 00 1c 2d bl ffc0cd10 <_Workspace_Allocate>
if ( sched ) {
ffc0b0e8: 2c 03 00 00 cmpwi r3,0
ffc0b0ec: 41 82 00 14 beq- ffc0b100 <_Scheduler_EDF_Allocate+0x38><== NEVER TAKEN
the_thread->scheduler_info = sched;
schinfo = (Scheduler_EDF_Per_thread *)(the_thread->scheduler_info);
schinfo->thread = the_thread;
schinfo->queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN;
ffc0b0f0: 39 40 00 02 li r10,2
Scheduler_EDF_Per_thread *schinfo;
sched = _Workspace_Allocate( sizeof(Scheduler_EDF_Per_thread) );
if ( sched ) {
the_thread->scheduler_info = sched;
ffc0b0f4: 90 7f 00 88 stw r3,136(r31)
schinfo = (Scheduler_EDF_Per_thread *)(the_thread->scheduler_info);
schinfo->thread = the_thread;
ffc0b0f8: 93 e3 00 00 stw r31,0(r3)
schinfo->queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN;
ffc0b0fc: 91 43 00 14 stw r10,20(r3)
}
return sched;
}
ffc0b100: 39 61 00 10 addi r11,r1,16
ffc0b104: 4b ff 5a c8 b ffc00bcc <_restgpr_31_x>
ffc0b2c8 <_Scheduler_EDF_Unblock>:
#include <rtems/score/scheduleredf.h>
void _Scheduler_EDF_Unblock(
Thread_Control *the_thread
)
{
ffc0b2c8: 94 21 ff f0 stwu r1,-16(r1)
ffc0b2cc: 7c 08 02 a6 mflr r0
ffc0b2d0: bf c1 00 08 stmw r30,8(r1)
* 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(
ffc0b2d4: 3f c0 00 00 lis r30,0
#include <rtems/score/scheduleredf.h>
void _Scheduler_EDF_Unblock(
Thread_Control *the_thread
)
{
ffc0b2d8: 7c 7f 1b 78 mr r31,r3
ffc0b2dc: 90 01 00 14 stw r0,20(r1)
* 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(
ffc0b2e0: 3b de 32 40 addi r30,r30,12864
void _Scheduler_EDF_Unblock(
Thread_Control *the_thread
)
{
_Scheduler_EDF_Enqueue(the_thread);
ffc0b2e4: 4b ff fe 75 bl ffc0b158 <_Scheduler_EDF_Enqueue>
ffc0b2e8: 3d 20 00 00 lis r9,0
* 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(
ffc0b2ec: 81 5e 00 14 lwz r10,20(r30)
ffc0b2f0: 81 29 20 b0 lwz r9,8368(r9)
ffc0b2f4: 80 6a 00 14 lwz r3,20(r10)
ffc0b2f8: 80 9f 00 14 lwz r4,20(r31)
ffc0b2fc: 7d 29 03 a6 mtctr r9
ffc0b300: 4e 80 04 21 bctrl
ffc0b304: 2f 83 00 00 cmpwi cr7,r3,0
ffc0b308: 40 bc 00 34 bge+ cr7,ffc0b33c <_Scheduler_EDF_Unblock+0x74>
_Thread_Heir->current_priority,
the_thread->current_priority )) {
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
ffc0b30c: 81 3e 00 10 lwz r9,16(r30)
* a pseudo-ISR system task, we need to do a context switch.
*/
if ( _Scheduler_Is_priority_lower_than(
_Thread_Heir->current_priority,
the_thread->current_priority )) {
_Thread_Heir = the_thread;
ffc0b310: 93 fe 00 14 stw r31,20(r30)
if ( _Thread_Executing->is_preemptible ||
ffc0b314: 89 29 00 70 lbz r9,112(r9)
ffc0b318: 2f 89 00 00 cmpwi cr7,r9,0
ffc0b31c: 40 9e 00 10 bne- cr7,ffc0b32c <_Scheduler_EDF_Unblock+0x64>
ffc0b320: 81 3f 00 14 lwz r9,20(r31)
ffc0b324: 2f 89 00 00 cmpwi cr7,r9,0
ffc0b328: 40 9e 00 14 bne- cr7,ffc0b33c <_Scheduler_EDF_Unblock+0x74><== ALWAYS TAKEN
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
ffc0b32c: 3d 20 00 00 lis r9,0
ffc0b330: 39 40 00 01 li r10,1
ffc0b334: 39 29 32 40 addi r9,r9,12864
ffc0b338: 99 49 00 0c stb r10,12(r9)
}
}
ffc0b33c: 39 61 00 10 addi r11,r1,16
ffc0b340: 4b ff 58 88 b ffc00bc8 <_restgpr_30_x>
ffc0a708 <_Scheduler_priority_Block>:
)
{
Scheduler_priority_Per_thread *sched_info;
Chain_Control *ready;
sched_info = (Scheduler_priority_Per_thread *) the_thread->scheduler_info;
ffc0a708: 81 43 00 88 lwz r10,136(r3)
ready = sched_info->ready_chain;
ffc0a70c: 81 2a 00 00 lwz r9,0(r10)
if ( _Chain_Has_only_one_node( ready ) ) {
ffc0a710: 80 e9 00 00 lwz r7,0(r9)
ffc0a714: 81 09 00 08 lwz r8,8(r9)
ffc0a718: 7f 87 40 00 cmpw cr7,r7,r8
ffc0a71c: 40 be 00 4c bne+ cr7,ffc0a768 <_Scheduler_priority_Block+0x60>
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 );
ffc0a720: 39 09 00 04 addi r8,r9,4
head->next = tail;
head->previous = NULL;
tail->previous = head;
ffc0a724: 91 29 00 08 stw r9,8(r9)
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
ffc0a728: 91 09 00 00 stw r8,0(r9)
head->previous = NULL;
ffc0a72c: 39 00 00 00 li r8,0
ffc0a730: 91 09 00 04 stw r8,4(r9)
RTEMS_INLINE_ROUTINE void _Priority_bit_map_Remove (
Priority_bit_map_Information *the_priority_map
)
{
*the_priority_map->minor &= the_priority_map->block_minor;
ffc0a734: 81 0a 00 04 lwz r8,4(r10)
ffc0a738: 81 2a 00 14 lwz r9,20(r10)
ffc0a73c: 80 e8 00 00 lwz r7,0(r8)
ffc0a740: 7c e9 48 38 and r9,r7,r9
if ( *the_priority_map->minor == 0 )
ffc0a744: 2f 89 00 00 cmpwi cr7,r9,0
RTEMS_INLINE_ROUTINE void _Priority_bit_map_Remove (
Priority_bit_map_Information *the_priority_map
)
{
*the_priority_map->minor &= the_priority_map->block_minor;
ffc0a748: 91 28 00 00 stw r9,0(r8)
if ( *the_priority_map->minor == 0 )
ffc0a74c: 40 9e 00 2c bne- cr7,ffc0a778 <_Scheduler_priority_Block+0x70>
_Priority_Major_bit_map &= the_priority_map->block_major;
ffc0a750: 3d 20 00 00 lis r9,0
ffc0a754: 81 4a 00 10 lwz r10,16(r10)
ffc0a758: 81 09 28 94 lwz r8,10388(r9)
ffc0a75c: 7d 0a 50 38 and r10,r8,r10
ffc0a760: 91 49 28 94 stw r10,10388(r9)
ffc0a764: 48 00 00 14 b ffc0a778 <_Scheduler_priority_Block+0x70>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
ffc0a768: 81 23 00 00 lwz r9,0(r3)
previous = the_node->previous;
ffc0a76c: 81 43 00 04 lwz r10,4(r3)
next->previous = previous;
ffc0a770: 91 49 00 04 stw r10,4(r9)
previous->next = next;
ffc0a774: 91 2a 00 00 stw r9,0(r10)
RTEMS_INLINE_ROUTINE bool _Thread_Is_heir (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Heir );
ffc0a778: 3d 20 00 00 lis r9,0
{
_Scheduler_priority_Ready_queue_extract( the_thread );
/* TODO: flash critical section? */
if ( _Thread_Is_heir( the_thread ) )
ffc0a77c: 81 29 31 b4 lwz r9,12724(r9)
ffc0a780: 7f 83 48 00 cmpw cr7,r3,r9
ffc0a784: 40 be 00 60 bne+ cr7,ffc0a7e4 <_Scheduler_priority_Block+0xdc>
* @param[in] the_thread - pointer to thread
*/
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void)
{
_Thread_Heir = _Scheduler_priority_Ready_queue_first(
(Chain_Control *) _Scheduler.information
ffc0a788: 3d 20 00 00 lis r9,0
RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void )
{
Priority_bit_map_Control minor;
Priority_bit_map_Control major;
_Bitfield_Find_first_bit( _Priority_Major_bit_map, major );
ffc0a78c: 3c e0 00 00 lis r7,0
ffc0a790: 81 49 20 80 lwz r10,8320(r9)
ffc0a794: 81 27 28 94 lwz r9,10388(r7)
ffc0a798: 7d 28 00 34 cntlzw r8,r9
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
ffc0a79c: 3c c0 00 00 lis r6,0
RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void )
{
Priority_bit_map_Control minor;
Priority_bit_map_Control major;
_Bitfield_Find_first_bit( _Priority_Major_bit_map, major );
ffc0a7a0: 91 27 28 94 stw r9,10388(r7)
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
ffc0a7a4: 38 c6 31 e0 addi r6,r6,12768
ffc0a7a8: 55 07 10 3a rlwinm r7,r8,2,0,29
ffc0a7ac: 7d 26 38 2e lwzx r9,r6,r7
ffc0a7b0: 7d 25 00 34 cntlzw r5,r9
ffc0a7b4: 7d 26 39 2e stwx r9,r6,r7
return (_Priority_Bits_index( major ) << 4) +
ffc0a7b8: 55 09 20 36 rlwinm r9,r8,4,0,27
ffc0a7bc: 7d 29 2a 14 add r9,r9,r5
Chain_Control *the_ready_queue
)
{
Priority_Control index = _Priority_bit_map_Get_highest();
if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) )
ffc0a7c0: 1d 29 00 0c mulli r9,r9,12
ffc0a7c4: 7d 0a 4a 14 add r8,r10,r9
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
ffc0a7c8: 7d 2a 48 2e lwzx r9,r10,r9
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
ffc0a7cc: 39 48 00 04 addi r10,r8,4
ffc0a7d0: 7f 89 50 00 cmpw cr7,r9,r10
ffc0a7d4: 40 be 00 08 bne+ cr7,ffc0a7dc <_Scheduler_priority_Block+0xd4><== ALWAYS TAKEN
return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] );
return NULL;
ffc0a7d8: 39 20 00 00 li r9,0 <== NOT EXECUTED
*
* @param[in] the_thread - pointer to thread
*/
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void)
{
_Thread_Heir = _Scheduler_priority_Ready_queue_first(
ffc0a7dc: 3d 40 00 00 lis r10,0
ffc0a7e0: 91 2a 31 b4 stw r9,12724(r10)
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Executing );
ffc0a7e4: 3d 20 00 00 lis r9,0
ffc0a7e8: 39 29 31 a0 addi r9,r9,12704
_Scheduler_priority_Schedule_body();
if ( _Thread_Is_executing( the_thread ) )
ffc0a7ec: 81 49 00 10 lwz r10,16(r9)
ffc0a7f0: 7f 83 50 00 cmpw cr7,r3,r10
ffc0a7f4: 4c be 00 20 bnelr+ cr7
_Thread_Dispatch_necessary = true;
ffc0a7f8: 39 40 00 01 li r10,1
ffc0a7fc: 99 49 00 0c stb r10,12(r9)
ffc0a800: 4e 80 00 20 blr
ffc0a9b8 <_Scheduler_priority_Schedule>:
* @param[in] the_thread - pointer to thread
*/
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void)
{
_Thread_Heir = _Scheduler_priority_Ready_queue_first(
(Chain_Control *) _Scheduler.information
ffc0a9b8: 3d 20 00 00 lis r9,0
RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void )
{
Priority_bit_map_Control minor;
Priority_bit_map_Control major;
_Bitfield_Find_first_bit( _Priority_Major_bit_map, major );
ffc0a9bc: 3c e0 00 00 lis r7,0
ffc0a9c0: 81 49 20 80 lwz r10,8320(r9)
ffc0a9c4: 81 27 28 94 lwz r9,10388(r7)
ffc0a9c8: 7d 28 00 34 cntlzw r8,r9
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
ffc0a9cc: 3c c0 00 00 lis r6,0
RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void )
{
Priority_bit_map_Control minor;
Priority_bit_map_Control major;
_Bitfield_Find_first_bit( _Priority_Major_bit_map, major );
ffc0a9d0: 91 27 28 94 stw r9,10388(r7)
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
ffc0a9d4: 38 c6 31 e0 addi r6,r6,12768
ffc0a9d8: 55 07 10 3a rlwinm r7,r8,2,0,29
ffc0a9dc: 7d 26 38 2e lwzx r9,r6,r7
ffc0a9e0: 7d 25 00 34 cntlzw r5,r9
ffc0a9e4: 7d 26 39 2e stwx r9,r6,r7
return (_Priority_Bits_index( major ) << 4) +
ffc0a9e8: 55 09 20 36 rlwinm r9,r8,4,0,27
ffc0a9ec: 7d 29 2a 14 add r9,r9,r5
Chain_Control *the_ready_queue
)
{
Priority_Control index = _Priority_bit_map_Get_highest();
if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) )
ffc0a9f0: 1d 29 00 0c mulli r9,r9,12
ffc0a9f4: 7d 0a 4a 14 add r8,r10,r9
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
ffc0a9f8: 7d 2a 48 2e lwzx r9,r10,r9
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
ffc0a9fc: 39 48 00 04 addi r10,r8,4
ffc0aa00: 7f 89 50 00 cmpw cr7,r9,r10
ffc0aa04: 40 be 00 08 bne+ cr7,ffc0aa0c <_Scheduler_priority_Schedule+0x54><== ALWAYS TAKEN
return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] );
return NULL;
ffc0aa08: 39 20 00 00 li r9,0 <== NOT EXECUTED
*
* @param[in] the_thread - pointer to thread
*/
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void)
{
_Thread_Heir = _Scheduler_priority_Ready_queue_first(
ffc0aa0c: 3d 40 00 00 lis r10,0
ffc0aa10: 91 2a 31 b4 stw r9,12724(r10)
ffc0aa14: 4e 80 00 20 blr
ffc0aa18 <_Scheduler_priority_Tick>:
#include <rtems/system.h>
#include <rtems/score/schedulerpriority.h>
void _Scheduler_priority_Tick( void )
{
ffc0aa18: 7c 2b 0b 78 mr r11,r1
ffc0aa1c: 7c 08 02 a6 mflr r0
ffc0aa20: 94 21 ff f0 stwu r1,-16(r1)
Thread_Control *executing;
executing = _Thread_Executing;
ffc0aa24: 3d 20 00 00 lis r9,0
#include <rtems/system.h>
#include <rtems/score/schedulerpriority.h>
void _Scheduler_priority_Tick( void )
{
ffc0aa28: 90 01 00 14 stw r0,20(r1)
ffc0aa2c: 48 01 03 91 bl ffc1adbc <_savegpr_31>
Thread_Control *executing;
executing = _Thread_Executing;
ffc0aa30: 83 e9 31 b0 lwz r31,12720(r9)
/*
* If the thread is not preemptible or is not ready, then
* just return.
*/
if ( !executing->is_preemptible )
ffc0aa34: 89 3f 00 70 lbz r9,112(r31)
ffc0aa38: 2f 89 00 00 cmpwi cr7,r9,0
ffc0aa3c: 41 9e 00 98 beq- cr7,ffc0aad4 <_Scheduler_priority_Tick+0xbc>
return;
if ( !_States_Is_ready( executing->current_state ) )
ffc0aa40: 81 3f 00 10 lwz r9,16(r31)
ffc0aa44: 2f 89 00 00 cmpwi cr7,r9,0
ffc0aa48: 40 9e 00 8c bne- cr7,ffc0aad4 <_Scheduler_priority_Tick+0xbc>
/*
* The cpu budget algorithm determines what happens next.
*/
switch ( executing->budget_algorithm ) {
ffc0aa4c: 81 3f 00 78 lwz r9,120(r31)
ffc0aa50: 2b 89 00 01 cmplwi cr7,r9,1
ffc0aa54: 41 9c 00 80 blt- cr7,ffc0aad4 <_Scheduler_priority_Tick+0xbc>
ffc0aa58: 2b 89 00 02 cmplwi cr7,r9,2
ffc0aa5c: 40 9d 00 10 ble- cr7,ffc0aa6c <_Scheduler_priority_Tick+0x54>
ffc0aa60: 2f 89 00 03 cmpwi cr7,r9,3
ffc0aa64: 40 be 00 70 bne+ cr7,ffc0aad4 <_Scheduler_priority_Tick+0xbc><== NEVER TAKEN
ffc0aa68: 48 00 00 38 b ffc0aaa0 <_Scheduler_priority_Tick+0x88>
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 ) {
ffc0aa6c: 81 3f 00 74 lwz r9,116(r31)
ffc0aa70: 39 29 ff ff addi r9,r9,-1
ffc0aa74: 2f 89 00 00 cmpwi cr7,r9,0
ffc0aa78: 91 3f 00 74 stw r9,116(r31)
ffc0aa7c: 41 bd 00 58 bgt+ cr7,ffc0aad4 <_Scheduler_priority_Tick+0xbc>
* always operates on the scheduler that 'owns' the currently executing
* thread.
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Yield( void )
{
_Scheduler.Operations.yield();
ffc0aa80: 3d 20 00 00 lis r9,0
ffc0aa84: 81 29 20 8c lwz r9,8332(r9)
ffc0aa88: 7d 29 03 a6 mtctr r9
ffc0aa8c: 4e 80 04 21 bctrl
* 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;
ffc0aa90: 3d 20 00 00 lis r9,0
ffc0aa94: 81 29 28 64 lwz r9,10340(r9)
ffc0aa98: 91 3f 00 74 stw r9,116(r31)
ffc0aa9c: 48 00 00 38 b ffc0aad4 <_Scheduler_priority_Tick+0xbc>
}
break;
#if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT)
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
if ( --executing->cpu_time_budget == 0 )
ffc0aaa0: 81 3f 00 74 lwz r9,116(r31)
ffc0aaa4: 39 29 ff ff addi r9,r9,-1
ffc0aaa8: 2f 89 00 00 cmpwi cr7,r9,0
ffc0aaac: 91 3f 00 74 stw r9,116(r31)
ffc0aab0: 40 be 00 24 bne+ cr7,ffc0aad4 <_Scheduler_priority_Tick+0xbc>
(*executing->budget_callout)( executing );
ffc0aab4: 81 3f 00 7c lwz r9,124(r31)
ffc0aab8: 7f e3 fb 78 mr r3,r31
break;
#endif
}
}
ffc0aabc: 80 01 00 14 lwz r0,20(r1)
break;
#if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT)
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
if ( --executing->cpu_time_budget == 0 )
(*executing->budget_callout)( executing );
ffc0aac0: 7d 29 03 a6 mtctr r9
break;
#endif
}
}
ffc0aac4: 83 e1 00 0c lwz r31,12(r1)
ffc0aac8: 7c 08 03 a6 mtlr r0
ffc0aacc: 38 21 00 10 addi r1,r1,16
break;
#if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT)
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
if ( --executing->cpu_time_budget == 0 )
(*executing->budget_callout)( executing );
ffc0aad0: 4e 80 04 20 bctr
break;
#endif
}
}
ffc0aad4: 39 61 00 10 addi r11,r1,16
ffc0aad8: 4b ff 5a ec b ffc005c4 <_restgpr_31_x>
ffc095c8 <_TOD_Validate>:
{
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
ffc095c8: 3d 20 ff c2 lis r9,-62
)
{
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
ffc095cc: 81 29 e2 04 lwz r9,-7676(r9)
ffc095d0: 3d 00 00 0f lis r8,15
ffc095d4: 61 08 42 40 ori r8,r8,16960
ffc095d8: 7d 08 4b 96 divwu r8,r8,r9
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
ffc095dc: 7c 69 1b 79 mr. r9,r3
ffc095e0: 41 82 00 90 beq- ffc09670 <_TOD_Validate+0xa8> <== NEVER TAKEN
ffc095e4: 81 49 00 18 lwz r10,24(r9)
(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;
ffc095e8: 38 60 00 00 li r3,0
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) ||
ffc095ec: 7f 8a 40 40 cmplw cr7,r10,r8
ffc095f0: 4c 9c 00 20 bgelr cr7
(the_tod->ticks >= ticks_per_second) ||
ffc095f4: 81 49 00 14 lwz r10,20(r9)
ffc095f8: 2b 8a 00 3b cmplwi cr7,r10,59
ffc095fc: 4d 9d 00 20 bgtlr cr7
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
ffc09600: 81 49 00 10 lwz r10,16(r9)
ffc09604: 2b 8a 00 3b cmplwi cr7,r10,59
ffc09608: 4d 9d 00 20 bgtlr cr7
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
ffc0960c: 81 49 00 0c lwz r10,12(r9)
ffc09610: 2b 8a 00 17 cmplwi cr7,r10,23
ffc09614: 4d 9d 00 20 bgtlr cr7
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
ffc09618: 81 49 00 04 lwz r10,4(r9)
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) ||
ffc0961c: 2f 8a 00 00 cmpwi cr7,r10,0
ffc09620: 4d 9e 00 20 beqlr cr7
(the_tod->month == 0) ||
ffc09624: 2b 8a 00 0c cmplwi cr7,r10,12
ffc09628: 4d 9d 00 20 bgtlr cr7
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
ffc0962c: 81 09 00 00 lwz r8,0(r9)
(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) ||
ffc09630: 2b 88 07 c3 cmplwi cr7,r8,1987
ffc09634: 4c 9d 00 20 blelr cr7
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
ffc09638: 81 29 00 08 lwz r9,8(r9)
(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) ||
ffc0963c: 2f 89 00 00 cmpwi cr7,r9,0
ffc09640: 4d 9e 00 20 beqlr cr7
(the_tod->day == 0) )
return false;
if ( (the_tod->year % 4) == 0 )
ffc09644: 71 07 00 03 andi. r7,r8,3
ffc09648: 3c e0 ff c2 lis r7,-62
ffc0964c: 39 07 f9 48 addi r8,r7,-1720
ffc09650: 40 82 00 08 bne- ffc09658 <_TOD_Validate+0x90>
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
ffc09654: 39 4a 00 0d addi r10,r10,13
else
days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ];
ffc09658: 55 4a 10 3a rlwinm r10,r10,2,0,29
ffc0965c: 7c 68 50 2e lwzx r3,r8,r10
if ( the_tod->day > days_in_month )
ffc09660: 7c 69 18 10 subfc r3,r9,r3
ffc09664: 38 60 00 00 li r3,0
ffc09668: 7c 63 19 14 adde r3,r3,r3
ffc0966c: 4e 80 00 20 blr
(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;
ffc09670: 38 60 00 00 li r3,0 <== NOT EXECUTED
if ( the_tod->day > days_in_month )
return false;
return true;
}
ffc09674: 4e 80 00 20 blr <== NOT EXECUTED
ffc0ace4 <_Thread_Change_priority>:
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
ffc0ace4: 94 21 ff e0 stwu r1,-32(r1)
ffc0ace8: 7c 08 02 a6 mflr r0
ffc0acec: 90 01 00 24 stw r0,36(r1)
ffc0acf0: bf 81 00 10 stmw r28,16(r1)
ffc0acf4: 7c 7f 1b 78 mr r31,r3
ffc0acf8: 7c bd 2b 78 mr r29,r5
States_Control state, original_state;
/*
* Save original state
*/
original_state = the_thread->current_state;
ffc0acfc: 83 83 00 10 lwz r28,16(r3)
/*
* 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 );
ffc0ad00: 90 81 00 08 stw r4,8(r1)
ffc0ad04: 48 00 0e dd bl ffc0bbe0 <_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 )
ffc0ad08: 81 3f 00 14 lwz r9,20(r31)
ffc0ad0c: 80 81 00 08 lwz r4,8(r1)
ffc0ad10: 7f 89 20 00 cmpw cr7,r9,r4
ffc0ad14: 41 9e 00 0c beq- cr7,ffc0ad20 <_Thread_Change_priority+0x3c>
_Thread_Set_priority( the_thread, new_priority );
ffc0ad18: 7f e3 fb 78 mr r3,r31
ffc0ad1c: 48 00 0e 55 bl ffc0bb70 <_Thread_Set_priority>
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0ad20: 7f c0 00 a6 mfmsr r30
ffc0ad24: 7d 30 42 a6 mfsprg r9,0
ffc0ad28: 7f c9 48 78 andc r9,r30,r9
ffc0ad2c: 7d 20 01 24 mtmsr r9
/*
* 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;
ffc0ad30: 81 5f 00 10 lwz r10,16(r31)
ffc0ad34: 57 89 07 7a rlwinm r9,r28,0,29,29
if ( state != STATES_TRANSIENT ) {
ffc0ad38: 2f 8a 00 04 cmpwi cr7,r10,4
ffc0ad3c: 41 9e 00 44 beq- cr7,ffc0ad80 <_Thread_Change_priority+0x9c>
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
ffc0ad40: 2f 89 00 00 cmpwi cr7,r9,0
ffc0ad44: 40 9e 00 0c bne- cr7,ffc0ad50 <_Thread_Change_priority+0x6c><== NEVER TAKEN
RTEMS_INLINE_ROUTINE States_Control _States_Clear (
States_Control states_to_clear,
States_Control current_state
)
{
return (current_state & ~states_to_clear);
ffc0ad48: 55 49 07 b8 rlwinm r9,r10,0,30,28
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
ffc0ad4c: 91 3f 00 10 stw r9,16(r31)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0ad50: 7f c0 01 24 mtmsr r30
_ISR_Enable( level );
if ( _States_Is_waiting_on_thread_queue( state ) ) {
ffc0ad54: 3d 20 00 03 lis r9,3
ffc0ad58: 61 29 be e0 ori r9,r9,48864
ffc0ad5c: 7d 48 48 39 and. r8,r10,r9
ffc0ad60: 41 a2 00 a0 beq+ ffc0ae00 <_Thread_Change_priority+0x11c>
if ( !_Thread_Is_executing_also_the_heir() &&
_Thread_Executing->is_preemptible )
_Thread_Dispatch_necessary = true;
_ISR_Enable( level );
}
ffc0ad64: 80 01 00 24 lwz r0,36(r1)
/* 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 );
ffc0ad68: 7f e4 fb 78 mr r4,r31
ffc0ad6c: 80 7f 00 44 lwz r3,68(r31)
if ( !_Thread_Is_executing_also_the_heir() &&
_Thread_Executing->is_preemptible )
_Thread_Dispatch_necessary = true;
_ISR_Enable( level );
}
ffc0ad70: 7c 08 03 a6 mtlr r0
ffc0ad74: bb 81 00 10 lmw r28,16(r1)
ffc0ad78: 38 21 00 20 addi r1,r1,32
/* 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 );
ffc0ad7c: 48 00 0d 3c b ffc0bab8 <_Thread_queue_Requeue>
}
return;
}
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) ) {
ffc0ad80: 2f 89 00 00 cmpwi cr7,r9,0
ffc0ad84: 40 9e 00 30 bne- cr7,ffc0adb4 <_Thread_Change_priority+0xd0><== NEVER TAKEN
* 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 );
if ( prepend_it )
ffc0ad88: 2f 9d 00 00 cmpwi cr7,r29,0
* 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 );
ffc0ad8c: 91 3f 00 10 stw r9,16(r31)
ffc0ad90: 3d 20 00 00 lis r9,0
ffc0ad94: 39 29 20 80 addi r9,r9,8320
if ( prepend_it )
ffc0ad98: 41 9e 00 0c beq- cr7,ffc0ada4 <_Thread_Change_priority+0xc0>
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue_first(
Thread_Control *the_thread
)
{
_Scheduler.Operations.enqueue_first( the_thread );
ffc0ad9c: 81 29 00 28 lwz r9,40(r9)
ffc0ada0: 48 00 00 08 b ffc0ada8 <_Thread_Change_priority+0xc4>
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue(
Thread_Control *the_thread
)
{
_Scheduler.Operations.enqueue( the_thread );
ffc0ada4: 81 29 00 24 lwz r9,36(r9)
ffc0ada8: 7f e3 fb 78 mr r3,r31
ffc0adac: 7d 29 03 a6 mtctr r9
ffc0adb0: 4e 80 04 21 bctrl
static inline void ppc_interrupt_flash( uint32_t level )
{
uint32_t current_level;
__asm__ volatile (
ffc0adb4: 7d 20 00 a6 mfmsr r9
ffc0adb8: 7f c0 01 24 mtmsr r30
ffc0adbc: 7d 20 01 24 mtmsr r9
* 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();
ffc0adc0: 3d 20 00 00 lis r9,0
ffc0adc4: 81 29 20 88 lwz r9,8328(r9)
ffc0adc8: 7d 29 03 a6 mtctr r9
ffc0adcc: 4e 80 04 21 bctrl
* is also the heir thread, and false otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void )
{
return ( _Thread_Executing == _Thread_Heir );
ffc0add0: 3d 20 00 00 lis r9,0
ffc0add4: 39 29 31 a0 addi r9,r9,12704
ffc0add8: 81 49 00 10 lwz r10,16(r9)
* 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() &&
ffc0addc: 81 09 00 14 lwz r8,20(r9)
ffc0ade0: 7f 8a 40 00 cmpw cr7,r10,r8
ffc0ade4: 41 9e 00 18 beq- cr7,ffc0adfc <_Thread_Change_priority+0x118>
ffc0ade8: 89 4a 00 70 lbz r10,112(r10)
ffc0adec: 2f 8a 00 00 cmpwi cr7,r10,0
ffc0adf0: 41 9e 00 0c beq- cr7,ffc0adfc <_Thread_Change_priority+0x118>
_Thread_Executing->is_preemptible )
_Thread_Dispatch_necessary = true;
ffc0adf4: 39 40 00 01 li r10,1
ffc0adf8: 99 49 00 0c stb r10,12(r9)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0adfc: 7f c0 01 24 mtmsr r30
_ISR_Enable( level );
}
ffc0ae00: 39 61 00 20 addi r11,r1,32
ffc0ae04: 4b ff 57 b4 b ffc005b8 <_restgpr_28_x>
ffc0b020 <_Thread_Delay_ended>:
void _Thread_Delay_ended(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
ffc0b020: 94 21 ff e8 stwu r1,-24(r1)
ffc0b024: 7c 08 02 a6 mflr r0
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
ffc0b028: 38 81 00 08 addi r4,r1,8
void _Thread_Delay_ended(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
ffc0b02c: 90 01 00 1c stw r0,28(r1)
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
ffc0b030: 48 00 02 15 bl ffc0b244 <_Thread_Get>
switch ( location ) {
ffc0b034: 81 21 00 08 lwz r9,8(r1)
ffc0b038: 2f 89 00 00 cmpwi cr7,r9,0
ffc0b03c: 40 9e 00 20 bne- cr7,ffc0b05c <_Thread_Delay_ended+0x3c><== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_Clear_state(
ffc0b040: 3c 80 10 00 lis r4,4096
ffc0b044: 60 84 00 18 ori r4,r4,24
ffc0b048: 4b ff fd c1 bl ffc0ae08 <_Thread_Clear_state>
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
ffc0b04c: 3d 20 00 00 lis r9,0
ffc0b050: 81 49 28 68 lwz r10,10344(r9)
--level;
ffc0b054: 39 4a ff ff addi r10,r10,-1
_Thread_Dispatch_disable_level = level;
ffc0b058: 91 49 28 68 stw r10,10344(r9)
| STATES_INTERRUPTIBLE_BY_SIGNAL
);
_Thread_Unnest_dispatch();
break;
}
}
ffc0b05c: 80 01 00 1c lwz r0,28(r1)
ffc0b060: 38 21 00 18 addi r1,r1,24
ffc0b064: 7c 08 03 a6 mtlr r0
ffc0b068: 4e 80 00 20 blr
ffc0b06c <_Thread_Dispatch>:
#if defined(RTEMS_SMP)
#include <rtems/score/smp.h>
#endif
void _Thread_Dispatch( void )
{
ffc0b06c: 94 21 ff b8 stwu r1,-72(r1)
ffc0b070: 7c 08 02 a6 mflr r0
ffc0b074: be 81 00 18 stmw r20,24(r1)
#endif
/*
* Now determine if we need to perform a dispatch on the current CPU.
*/
executing = _Thread_Executing;
ffc0b078: 3f e0 00 00 lis r31,0
ffc0b07c: 39 3f 31 a0 addi r9,r31,12704
#if defined(RTEMS_SMP)
#include <rtems/score/smp.h>
#endif
void _Thread_Dispatch( void )
{
ffc0b080: 90 01 00 4c stw r0,76(r1)
#endif
/*
* Now determine if we need to perform a dispatch on the current CPU.
*/
executing = _Thread_Executing;
ffc0b084: 82 c9 00 10 lwz r22,16(r9)
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0b088: 7d 40 00 a6 mfmsr r10
ffc0b08c: 7d 30 42 a6 mfsprg r9,0
ffc0b090: 7d 49 48 78 andc r9,r10,r9
ffc0b094: 7d 20 01 24 mtmsr r9
*/
static inline void _TOD_Get_uptime(
Timestamp_Control *time
)
{
_TOD_Get_with_nanoseconds( time, &_TOD.uptime );
ffc0b098: 3f 40 00 00 lis r26,0
{
const Chain_Control *chain = &_User_extensions_Switches_list;
const Chain_Node *tail = _Chain_Immutable_tail( chain );
const Chain_Node *node = _Chain_Immutable_first( chain );
while ( node != tail ) {
ffc0b09c: 3e e0 00 00 lis r23,0
* This routine sets thread dispatch level to the
* value passed in.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_set_disable_level(uint32_t value)
{
_Thread_Dispatch_disable_level = value;
ffc0b0a0: 3f c0 00 00 lis r30,0
ffc0b0a4: 3b a0 00 01 li r29,1
while ( _Thread_Dispatch_necessary == true ) {
heir = _Thread_Heir;
#ifndef RTEMS_SMP
_Thread_Dispatch_set_disable_level( 1 );
#endif
_Thread_Dispatch_necessary = false;
ffc0b0a8: 3b 80 00 00 li r28,0
#if __RTEMS_ADA__
executing->rtems_ada_self = rtems_ada_self;
rtems_ada_self = heir->rtems_ada_self;
#endif
if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE )
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
ffc0b0ac: 3f 60 00 00 lis r27,0
ffc0b0b0: 3b 5a 2c 68 addi r26,r26,11368
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
ffc0b0b4: 3f 20 00 00 lis r25,0
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
ffc0b0b8: 3f 00 00 00 lis r24,0
ffc0b0bc: 3a f7 22 0c addi r23,r23,8716
/*
* Now determine if we need to perform a dispatch on the current CPU.
*/
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
ffc0b0c0: 48 00 01 30 b ffc0b1f0 <_Thread_Dispatch+0x184>
heir = _Thread_Heir;
ffc0b0c4: 82 a9 00 14 lwz r21,20(r9)
ffc0b0c8: 93 be 28 68 stw r29,10344(r30)
/*
* 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 )
ffc0b0cc: 7f 95 b0 00 cmpw cr7,r21,r22
while ( _Thread_Dispatch_necessary == true ) {
heir = _Thread_Heir;
#ifndef RTEMS_SMP
_Thread_Dispatch_set_disable_level( 1 );
#endif
_Thread_Dispatch_necessary = false;
ffc0b0d0: 9b 89 00 0c stb r28,12(r9)
_Thread_Executing = heir;
ffc0b0d4: 92 a9 00 10 stw r21,16(r9)
/*
* 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 )
ffc0b0d8: 40 be 00 28 bne+ cr7,ffc0b100 <_Thread_Dispatch+0x94>
ffc0b0dc: 39 00 00 00 li r8,0
ffc0b0e0: 3d 20 00 00 lis r9,0
ffc0b0e4: 91 09 28 68 stw r8,10344(r9)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0b0e8: 7d 40 01 24 mtmsr r10
ffc0b0ec: 3d 20 00 00 lis r9,0
{
const Chain_Control *chain = &_API_extensions_Post_switch_list;
const Chain_Node *tail = _Chain_Immutable_tail( chain );
const Chain_Node *node = _Chain_Immutable_first( chain );
while ( node != tail ) {
ffc0b0f0: 3f c0 00 00 lis r30,0
ffc0b0f4: 83 e9 2d 90 lwz r31,11664(r9)
ffc0b0f8: 3b de 2d 94 addi r30,r30,11668
ffc0b0fc: 48 00 01 1c b ffc0b218 <_Thread_Dispatch+0x1ac>
*/
#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 )
ffc0b100: 81 35 00 78 lwz r9,120(r21)
ffc0b104: 2f 89 00 01 cmpwi cr7,r9,1
ffc0b108: 40 be 00 0c bne+ cr7,ffc0b114 <_Thread_Dispatch+0xa8>
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
ffc0b10c: 81 3b 28 64 lwz r9,10340(r27)
ffc0b110: 91 35 00 74 stw r9,116(r21)
ffc0b114: 7d 40 01 24 mtmsr r10
ffc0b118: 38 61 00 08 addi r3,r1,8
ffc0b11c: 7f 44 d3 78 mr r4,r26
ffc0b120: 4b ff e7 9d bl ffc098bc <_TOD_Get_with_nanoseconds>
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
_Timestamp_Subtract(
ffc0b124: 38 bf 31 a0 addi r5,r31,12704
const Timestamp64_Control *_start,
const Timestamp64_Control *_end,
Timestamp64_Control *_result
)
{
*_result = *_end - *_start;
ffc0b128: 81 05 00 20 lwz r8,32(r5)
ffc0b12c: 81 25 00 24 lwz r9,36(r5)
ffc0b130: 81 41 00 08 lwz r10,8(r1)
ffc0b134: 81 61 00 0c lwz r11,12(r1)
ffc0b138: 7c e9 58 10 subfc r7,r9,r11
ffc0b13c: 7c c8 51 10 subfe r6,r8,r10
static inline void _Timestamp64_implementation_Add_to(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
*_time += *_add;
ffc0b140: 81 16 00 80 lwz r8,128(r22)
ffc0b144: 81 36 00 84 lwz r9,132(r22)
ffc0b148: 7d 29 38 14 addc r9,r9,r7
ffc0b14c: 7d 08 31 14 adde r8,r8,r6
ffc0b150: 91 36 00 84 stw r9,132(r22)
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
ffc0b154: 81 39 28 70 lwz r9,10352(r25)
ffc0b158: 91 16 00 80 stw r8,128(r22)
ffc0b15c: 2f 89 00 00 cmpwi cr7,r9,0
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
_Thread_Time_of_last_context_switch = uptime;
ffc0b160: 91 45 00 20 stw r10,32(r5)
ffc0b164: 91 65 00 24 stw r11,36(r5)
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
ffc0b168: 41 9e 00 14 beq- cr7,ffc0b17c <_Thread_Dispatch+0x110> <== NEVER TAKEN
executing->libc_reent = *_Thread_libc_reent;
ffc0b16c: 81 49 00 00 lwz r10,0(r9)
ffc0b170: 91 56 01 48 stw r10,328(r22)
*_Thread_libc_reent = heir->libc_reent;
ffc0b174: 81 55 01 48 lwz r10,328(r21)
ffc0b178: 91 49 00 00 stw r10,0(r9)
ffc0b17c: 82 98 22 08 lwz r20,8712(r24)
ffc0b180: 48 00 00 1c b ffc0b19c <_Thread_Dispatch+0x130>
const User_extensions_Switch_control *extension =
(const User_extensions_Switch_control *) node;
(*extension->thread_switch)( executing, heir );
ffc0b184: 81 34 00 08 lwz r9,8(r20)
ffc0b188: 7e c3 b3 78 mr r3,r22
ffc0b18c: 7e a4 ab 78 mr r4,r21
ffc0b190: 7d 29 03 a6 mtctr r9
ffc0b194: 4e 80 04 21 bctrl
#ifdef RTEMS_SMP
_Thread_Unnest_dispatch();
#endif
_API_extensions_Run_post_switch( executing );
}
ffc0b198: 82 94 00 00 lwz r20,0(r20)
{
const Chain_Control *chain = &_User_extensions_Switches_list;
const Chain_Node *tail = _Chain_Immutable_tail( chain );
const Chain_Node *node = _Chain_Immutable_first( chain );
while ( node != tail ) {
ffc0b19c: 7f 94 b8 00 cmpw cr7,r20,r23
ffc0b1a0: 40 9e ff e4 bne+ cr7,ffc0b184 <_Thread_Dispatch+0x118>
* operations.
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH != TRUE )
if ( executing->fp_context != NULL )
ffc0b1a4: 81 36 01 44 lwz r9,324(r22)
ffc0b1a8: 2f 89 00 00 cmpwi cr7,r9,0
ffc0b1ac: 41 9e 00 0c beq- cr7,ffc0b1b8 <_Thread_Dispatch+0x14c>
_Context_Save_fp( &executing->fp_context );
ffc0b1b0: 38 76 01 44 addi r3,r22,324
ffc0b1b4: 48 00 fc cd bl ffc1ae80 <_CPU_Context_save_fp>
#endif
#endif
_Context_Switch( &executing->Registers, &heir->Registers );
ffc0b1b8: 38 76 00 c4 addi r3,r22,196
ffc0b1bc: 38 95 00 c4 addi r4,r21,196
ffc0b1c0: 48 00 fe 41 bl ffc1b000 <_CPU_Context_switch>
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
_Context_Restore_fp( &executing->fp_context );
_Thread_Allocated_fp = executing;
}
#else
if ( executing->fp_context != NULL )
ffc0b1c4: 81 36 01 44 lwz r9,324(r22)
ffc0b1c8: 2f 89 00 00 cmpwi cr7,r9,0
ffc0b1cc: 41 9e 00 0c beq- cr7,ffc0b1d8 <_Thread_Dispatch+0x16c>
_Context_Restore_fp( &executing->fp_context );
ffc0b1d0: 38 76 01 44 addi r3,r22,324
ffc0b1d4: 48 00 fd 6d bl ffc1af40 <_CPU_Context_restore_fp>
#endif
#endif
executing = _Thread_Executing;
ffc0b1d8: 39 3f 31 a0 addi r9,r31,12704
ffc0b1dc: 82 c9 00 10 lwz r22,16(r9)
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0b1e0: 7d 40 00 a6 mfmsr r10
ffc0b1e4: 7d 30 42 a6 mfsprg r9,0
ffc0b1e8: 7d 49 48 78 andc r9,r10,r9
ffc0b1ec: 7d 20 01 24 mtmsr r9
/*
* Now determine if we need to perform a dispatch on the current CPU.
*/
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
ffc0b1f0: 39 3f 31 a0 addi r9,r31,12704
ffc0b1f4: 89 09 00 0c lbz r8,12(r9)
ffc0b1f8: 2f 88 00 00 cmpwi cr7,r8,0
ffc0b1fc: 40 9e fe c8 bne+ cr7,ffc0b0c4 <_Thread_Dispatch+0x58>
ffc0b200: 4b ff fe dc b ffc0b0dc <_Thread_Dispatch+0x70>
const API_extensions_Post_switch_control *post_switch =
(const API_extensions_Post_switch_control *) node;
(*post_switch->hook)( executing );
ffc0b204: 81 3f 00 08 lwz r9,8(r31)
ffc0b208: 7e c3 b3 78 mr r3,r22
ffc0b20c: 7d 29 03 a6 mtctr r9
ffc0b210: 4e 80 04 21 bctrl
#ifdef RTEMS_SMP
_Thread_Unnest_dispatch();
#endif
_API_extensions_Run_post_switch( executing );
}
ffc0b214: 83 ff 00 00 lwz r31,0(r31)
{
const Chain_Control *chain = &_API_extensions_Post_switch_list;
const Chain_Node *tail = _Chain_Immutable_tail( chain );
const Chain_Node *node = _Chain_Immutable_first( chain );
while ( node != tail ) {
ffc0b218: 7f 9f f0 00 cmpw cr7,r31,r30
ffc0b21c: 40 9e ff e8 bne+ cr7,ffc0b204 <_Thread_Dispatch+0x198>
ffc0b220: 39 61 00 48 addi r11,r1,72
ffc0b224: 4b ff 53 74 b ffc00598 <_restgpr_20_x>
ffc1035c <_Thread_Handler>:
#define INIT_NAME __main
#define EXECUTE_GLOBAL_CONSTRUCTORS
#endif
void _Thread_Handler( void )
{
ffc1035c: 94 21 ff f0 stwu r1,-16(r1)
ffc10360: 7c 08 02 a6 mflr r0
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
static bool doneConstructors;
bool doCons;
#endif
executing = _Thread_Executing;
ffc10364: 3d 20 00 00 lis r9,0
#define INIT_NAME __main
#define EXECUTE_GLOBAL_CONSTRUCTORS
#endif
void _Thread_Handler( void )
{
ffc10368: 90 01 00 14 stw r0,20(r1)
ffc1036c: bf c1 00 08 stmw r30,8(r1)
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
static bool doneConstructors;
bool doCons;
#endif
executing = _Thread_Executing;
ffc10370: 83 e9 31 b0 lwz r31,12720(r9)
/*
* have to put level into a register for those cpu's that use
* inline asm here
*/
level = executing->Start.isr_level;
ffc10374: 81 5f 00 a8 lwz r10,168(r31)
}
static inline void _CPU_ISR_Set_level( uint32_t level )
{
register unsigned int msr;
_CPU_MSR_GET(msr);
ffc10378: 39 20 00 00 li r9,0
ffc1037c: 7d 20 00 a6 mfmsr r9
if (!(level & CPU_MODES_INTERRUPT_MASK)) {
ffc10380: 71 48 00 01 andi. r8,r10,1
static inline uint32_t ppc_interrupt_get_disable_mask( void )
{
uint32_t mask;
__asm__ volatile (
ffc10384: 7d 50 42 a6 mfsprg r10,0
ffc10388: 40 a2 00 0c bne+ ffc10394 <_Thread_Handler+0x38>
msr |= ppc_interrupt_get_disable_mask();
ffc1038c: 7d 49 4b 78 or r9,r10,r9
ffc10390: 48 00 00 08 b ffc10398 <_Thread_Handler+0x3c>
}
else {
msr &= ~ppc_interrupt_get_disable_mask();
ffc10394: 7d 29 50 78 andc r9,r9,r10
}
_CPU_MSR_SET(msr);
ffc10398: 7d 20 01 24 mtmsr r9
doCons = !doneConstructors
&& _Objects_Get_API( executing->Object.id ) != OBJECTS_INTERNAL_API;
if (doCons)
doneConstructors = true;
#else
doCons = !doneConstructors;
ffc1039c: 3d 20 00 00 lis r9,0
ffc103a0: 8b c9 2a 3c lbz r30,10812(r9)
);
}
static inline void _User_extensions_Thread_begin( Thread_Control *executing )
{
_User_extensions_Iterate(
ffc103a4: 3c 80 ff c1 lis r4,-63
doneConstructors = true;
ffc103a8: 39 40 00 01 li r10,1
ffc103ac: 7f e3 fb 78 mr r3,r31
ffc103b0: 99 49 2a 3c stb r10,10812(r9)
ffc103b4: 38 84 be 24 addi r4,r4,-16860
ffc103b8: 4b ff ba b9 bl ffc0be70 <_User_extensions_Iterate>
_User_extensions_Thread_begin( executing );
/*
* At this point, the dispatch disable level BETTER be 1.
*/
_Thread_Enable_dispatch();
ffc103bc: 4b ff ae 6d bl ffc0b228 <_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) */ {
ffc103c0: 2f 9e 00 00 cmpwi cr7,r30,0
ffc103c4: 40 be 00 08 bne+ cr7,ffc103cc <_Thread_Handler+0x70>
INIT_NAME ();
ffc103c8: 48 00 bb 75 bl ffc1bf3c <_init>
_Thread_Enable_dispatch();
#endif
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
ffc103cc: 81 3f 00 90 lwz r9,144(r31)
ffc103d0: 2f 89 00 00 cmpwi cr7,r9,0
ffc103d4: 40 be 00 10 bne+ cr7,ffc103e4 <_Thread_Handler+0x88>
executing->Wait.return_argument =
(*(Thread_Entry_numeric) executing->Start.entry_point)(
ffc103d8: 81 3f 00 8c lwz r9,140(r31)
ffc103dc: 80 7f 00 98 lwz r3,152(r31)
ffc103e0: 48 00 00 14 b ffc103f4 <_Thread_Handler+0x98>
executing->Start.numeric_argument
);
}
#if defined(RTEMS_POSIX_API)
else if ( executing->Start.prototype == THREAD_START_POINTER ) {
ffc103e4: 2f 89 00 01 cmpwi cr7,r9,1
ffc103e8: 40 be 00 18 bne+ cr7,ffc10400 <_Thread_Handler+0xa4> <== NEVER TAKEN
executing->Wait.return_argument =
(*(Thread_Entry_pointer) executing->Start.entry_point)(
ffc103ec: 81 3f 00 8c lwz r9,140(r31)
ffc103f0: 80 7f 00 94 lwz r3,148(r31)
ffc103f4: 7d 29 03 a6 mtctr r9
ffc103f8: 4e 80 04 21 bctrl
executing->Start.numeric_argument
);
}
#if defined(RTEMS_POSIX_API)
else if ( executing->Start.prototype == THREAD_START_POINTER ) {
executing->Wait.return_argument =
ffc103fc: 90 7f 00 28 stw r3,40(r31)
}
}
static inline void _User_extensions_Thread_exitted( Thread_Control *executing )
{
_User_extensions_Iterate(
ffc10400: 3c 80 ff c1 lis r4,-63
ffc10404: 7f e3 fb 78 mr r3,r31
ffc10408: 38 84 be 38 addi r4,r4,-16840
ffc1040c: 4b ff ba 65 bl ffc0be70 <_User_extensions_Iterate>
* able to fit in a (void *).
*/
_User_extensions_Thread_exitted( executing );
_Internal_error_Occurred(
ffc10410: 38 60 00 00 li r3,0
ffc10414: 38 80 00 01 li r4,1
ffc10418: 38 a0 00 05 li r5,5
ffc1041c: 4b ff 99 b5 bl ffc09dd0 <_Internal_error_Occurred>
ffc0b518 <_Thread_Handler_initialization>:
#include <rtems/bspsmp.h>
#endif
void _Thread_Handler_initialization(void)
{
uint32_t ticks_per_timeslice =
ffc0b518: 3d 20 ff c2 lis r9,-62
#if defined(RTEMS_SMP)
#include <rtems/bspsmp.h>
#endif
void _Thread_Handler_initialization(void)
{
ffc0b51c: 94 21 ff f0 stwu r1,-16(r1)
uint32_t ticks_per_timeslice =
ffc0b520: 39 29 bf 98 addi r9,r9,-16488
#if defined(RTEMS_SMP)
#include <rtems/bspsmp.h>
#endif
void _Thread_Handler_initialization(void)
{
ffc0b524: 7c 08 02 a6 mflr r0
#if defined(RTEMS_MULTIPROCESSING)
uint32_t maximum_proxies =
_Configuration_MP_table->maximum_proxies;
#endif
if ( rtems_configuration_get_stack_allocate_hook() == NULL ||
ffc0b528: 81 09 00 28 lwz r8,40(r9)
#if defined(RTEMS_SMP)
#include <rtems/bspsmp.h>
#endif
void _Thread_Handler_initialization(void)
{
ffc0b52c: bf c1 00 08 stmw r30,8(r1)
#if defined(RTEMS_MULTIPROCESSING)
uint32_t maximum_proxies =
_Configuration_MP_table->maximum_proxies;
#endif
if ( rtems_configuration_get_stack_allocate_hook() == NULL ||
ffc0b530: 2f 88 00 00 cmpwi cr7,r8,0
#if defined(RTEMS_SMP)
#include <rtems/bspsmp.h>
#endif
void _Thread_Handler_initialization(void)
{
ffc0b534: 90 01 00 14 stw r0,20(r1)
uint32_t ticks_per_timeslice =
ffc0b538: 83 e9 00 14 lwz r31,20(r9)
rtems_configuration_get_ticks_per_timeslice();
uint32_t maximum_extensions =
ffc0b53c: 83 c9 00 08 lwz r30,8(r9)
rtems_configuration_get_maximum_extensions();
rtems_stack_allocate_init_hook stack_allocate_init_hook =
ffc0b540: 81 49 00 24 lwz r10,36(r9)
#if defined(RTEMS_MULTIPROCESSING)
uint32_t maximum_proxies =
_Configuration_MP_table->maximum_proxies;
#endif
if ( rtems_configuration_get_stack_allocate_hook() == NULL ||
ffc0b544: 41 9e 00 10 beq- cr7,ffc0b554 <_Thread_Handler_initialization+0x3c><== NEVER TAKEN
ffc0b548: 81 09 00 2c lwz r8,44(r9)
ffc0b54c: 2f 88 00 00 cmpwi cr7,r8,0
ffc0b550: 40 be 00 14 bne+ cr7,ffc0b564 <_Thread_Handler_initialization+0x4c>
rtems_configuration_get_stack_free_hook() == NULL)
_Internal_error_Occurred(
ffc0b554: 38 60 00 00 li r3,0
ffc0b558: 38 80 00 01 li r4,1
ffc0b55c: 38 a0 00 0e li r5,14
ffc0b560: 4b ff e8 71 bl ffc09dd0 <_Internal_error_Occurred>
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_BAD_STACK_HOOK
);
if ( stack_allocate_init_hook != NULL )
ffc0b564: 2f 8a 00 00 cmpwi cr7,r10,0
ffc0b568: 41 9e 00 10 beq- cr7,ffc0b578 <_Thread_Handler_initialization+0x60>
(*stack_allocate_init_hook)( rtems_configuration_get_stack_space_size() );
ffc0b56c: 80 69 00 04 lwz r3,4(r9)
ffc0b570: 7d 49 03 a6 mtctr r10
ffc0b574: 4e 80 04 21 bctrl
_Thread_Dispatch_necessary = false;
ffc0b578: 3d 40 00 00 lis r10,0
false, /* true if this is a global object class */
NULL /* Proxy extraction support callout */
#endif
);
}
ffc0b57c: 80 01 00 14 lwz r0,20(r1)
);
if ( stack_allocate_init_hook != NULL )
(*stack_allocate_init_hook)( rtems_configuration_get_stack_space_size() );
_Thread_Dispatch_necessary = false;
ffc0b580: 39 4a 31 a0 addi r10,r10,12704
ffc0b584: 39 20 00 00 li r9,0
false, /* true if this is a global object class */
NULL /* Proxy extraction support callout */
#endif
);
}
ffc0b588: 7c 08 03 a6 mtlr r0
);
if ( stack_allocate_init_hook != NULL )
(*stack_allocate_init_hook)( rtems_configuration_get_stack_space_size() );
_Thread_Dispatch_necessary = false;
ffc0b58c: 99 2a 00 0c stb r9,12(r10)
_Thread_Executing = NULL;
ffc0b590: 39 20 00 00 li r9,0
#if defined(RTEMS_MULTIPROCESSING)
if ( _System_state_Is_multiprocessing )
maximum_internal_threads += 1;
#endif
_Objects_Initialize_information(
ffc0b594: 3c 60 00 00 lis r3,0
if ( stack_allocate_init_hook != NULL )
(*stack_allocate_init_hook)( rtems_configuration_get_stack_space_size() );
_Thread_Dispatch_necessary = false;
_Thread_Executing = NULL;
ffc0b598: 91 2a 00 10 stw r9,16(r10)
#if defined(RTEMS_MULTIPROCESSING)
if ( _System_state_Is_multiprocessing )
maximum_internal_threads += 1;
#endif
_Objects_Initialize_information(
ffc0b59c: 38 63 2d f4 addi r3,r3,11764
ffc0b5a0: 38 80 00 01 li r4,1
if ( stack_allocate_init_hook != NULL )
(*stack_allocate_init_hook)( rtems_configuration_get_stack_space_size() );
_Thread_Dispatch_necessary = false;
_Thread_Executing = NULL;
_Thread_Heir = NULL;
ffc0b5a4: 91 2a 00 14 stw r9,20(r10)
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
_Thread_Allocated_fp = NULL;
ffc0b5a8: 3d 40 00 00 lis r10,0
#if defined(RTEMS_MULTIPROCESSING)
if ( _System_state_Is_multiprocessing )
maximum_internal_threads += 1;
#endif
_Objects_Initialize_information(
ffc0b5ac: 38 a0 00 01 li r5,1
_Thread_Dispatch_necessary = false;
_Thread_Executing = NULL;
_Thread_Heir = NULL;
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
_Thread_Allocated_fp = NULL;
ffc0b5b0: 91 2a 28 6c stw r9,10348(r10)
#endif
_Thread_Maximum_extensions = maximum_extensions;
ffc0b5b4: 3d 20 00 00 lis r9,0
#if defined(RTEMS_MULTIPROCESSING)
if ( _System_state_Is_multiprocessing )
maximum_internal_threads += 1;
#endif
_Objects_Initialize_information(
ffc0b5b8: 38 c0 00 01 li r6,1
_Thread_Heir = NULL;
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
_Thread_Allocated_fp = NULL;
#endif
_Thread_Maximum_extensions = maximum_extensions;
ffc0b5bc: 93 c9 28 74 stw r30,10356(r9)
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
ffc0b5c0: 3d 20 00 00 lis r9,0
#if defined(RTEMS_MULTIPROCESSING)
if ( _System_state_Is_multiprocessing )
maximum_internal_threads += 1;
#endif
_Objects_Initialize_information(
ffc0b5c4: 38 e0 01 60 li r7,352
_Thread_Allocated_fp = NULL;
#endif
_Thread_Maximum_extensions = maximum_extensions;
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
ffc0b5c8: 93 e9 28 64 stw r31,10340(r9)
#if defined(RTEMS_MULTIPROCESSING)
if ( _System_state_Is_multiprocessing )
maximum_internal_threads += 1;
#endif
_Objects_Initialize_information(
ffc0b5cc: 39 00 00 00 li r8,0
ffc0b5d0: 39 20 00 08 li r9,8
false, /* true if this is a global object class */
NULL /* Proxy extraction support callout */
#endif
);
}
ffc0b5d4: bb c1 00 08 lmw r30,8(r1)
ffc0b5d8: 38 21 00 10 addi r1,r1,16
#if defined(RTEMS_MULTIPROCESSING)
if ( _System_state_Is_multiprocessing )
maximum_internal_threads += 1;
#endif
_Objects_Initialize_information(
ffc0b5dc: 4b ff ed e0 b ffc0a3bc <_Objects_Initialize_information>
ffc0b2d8 <_Thread_Initialize>:
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
ffc0b2d8: 94 21 ff c0 stwu r1,-64(r1)
ffc0b2dc: 7c 08 02 a6 mflr r0
/*
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
ffc0b2e0: 39 60 00 00 li r11,0
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
ffc0b2e4: be e1 00 1c stmw r23,28(r1)
if ( !actual_stack_size || actual_stack_size < stack_size )
return false; /* stack allocation failed */
stack = the_thread->Start.stack;
#else
if ( !stack_area ) {
ffc0b2e8: 7c bd 2b 79 mr. r29,r5
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
ffc0b2ec: 7d 3a 4b 78 mr r26,r9
ffc0b2f0: 90 01 00 44 stw r0,68(r1)
ffc0b2f4: 7c 78 1b 78 mr r24,r3
ffc0b2f8: 7c 9f 23 78 mr r31,r4
ffc0b2fc: 81 21 00 50 lwz r9,80(r1)
ffc0b300: 7c de 33 78 mr r30,r6
ffc0b304: 7c f7 3b 78 mr r23,r7
/*
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
ffc0b308: 91 64 01 4c stw r11,332(r4)
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
ffc0b30c: 7d 1c 43 78 mr r28,r8
ffc0b310: 7d 5b 53 78 mr r27,r10
ffc0b314: 83 29 00 00 lwz r25,0(r9)
/*
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
ffc0b318: 91 64 01 50 stw r11,336(r4)
extensions_area = NULL;
the_thread->libc_reent = NULL;
ffc0b31c: 91 64 01 48 stw r11,328(r4)
if ( !actual_stack_size || actual_stack_size < stack_size )
return false; /* stack allocation failed */
stack = the_thread->Start.stack;
#else
if ( !stack_area ) {
ffc0b320: 40 a2 00 38 bne+ ffc0b358 <_Thread_Initialize+0x80>
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
ffc0b324: 7c 83 23 78 mr r3,r4
ffc0b328: 7c c4 33 78 mr r4,r6
ffc0b32c: 48 00 09 09 bl ffc0bc34 <_Thread_Stack_Allocate>
if ( !actual_stack_size || actual_stack_size < stack_size )
return false; /* stack allocation failed */
ffc0b330: 39 60 00 00 li r11,0
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 )
ffc0b334: 2c 03 00 00 cmpwi r3,0
ffc0b338: 41 82 01 d4 beq- ffc0b50c <_Thread_Initialize+0x234>
ffc0b33c: 7f 83 f0 40 cmplw cr7,r3,r30
return false; /* stack allocation failed */
ffc0b340: 7f ab eb 78 mr r11,r29
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 )
ffc0b344: 41 9c 01 c8 blt- cr7,ffc0b50c <_Thread_Initialize+0x234><== NEVER TAKEN
return false; /* stack allocation failed */
stack = the_thread->Start.stack;
the_thread->Start.core_allocated_stack = true;
ffc0b348: 39 20 00 01 li r9,1
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 */
stack = the_thread->Start.stack;
ffc0b34c: 83 bf 00 c0 lwz r29,192(r31)
the_thread->Start.core_allocated_stack = true;
ffc0b350: 99 3f 00 b0 stb r9,176(r31)
ffc0b354: 48 00 00 0c b ffc0b360 <_Thread_Initialize+0x88>
} else {
stack = stack_area;
actual_stack_size = stack_size;
the_thread->Start.core_allocated_stack = false;
ffc0b358: 99 64 00 b0 stb r11,176(r4)
ffc0b35c: 7c c3 33 78 mr r3,r6
/*
* Allocate the floating point area for this thread
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
ffc0b360: 2f 97 00 00 cmpwi cr7,r23,0
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
ffc0b364: 93 bf 00 b8 stw r29,184(r31)
extensions_area = NULL;
the_thread->libc_reent = NULL;
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
fp_area = NULL;
ffc0b368: 3b a0 00 00 li r29,0
the_stack->size = size;
ffc0b36c: 90 7f 00 b4 stw r3,180(r31)
/*
* Allocate the floating point area for this thread
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
ffc0b370: 41 be 00 14 beq+ cr7,ffc0b384 <_Thread_Initialize+0xac>
fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
ffc0b374: 38 60 01 08 li r3,264
ffc0b378: 48 00 10 01 bl ffc0c378 <_Workspace_Allocate>
if ( !fp_area )
ffc0b37c: 7c 7d 1b 79 mr. r29,r3
ffc0b380: 41 82 01 48 beq- ffc0b4c8 <_Thread_Initialize+0x1f0>
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
ffc0b384: 3d 20 00 00 lis r9,0
fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
if ( !fp_area )
goto failed;
fp_area = _Context_Fp_start( fp_area, 0 );
}
the_thread->fp_context = fp_area;
ffc0b388: 93 bf 01 44 stw r29,324(r31)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
ffc0b38c: 38 e0 00 00 li r7,0
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
ffc0b390: 80 69 28 74 lwz r3,10356(r9)
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
extensions_area = NULL;
ffc0b394: 3b c0 00 00 li r30,0
if ( !fp_area )
goto failed;
fp_area = _Context_Fp_start( fp_area, 0 );
}
the_thread->fp_context = fp_area;
the_thread->Start.fp_context = fp_area;
ffc0b398: 93 bf 00 bc stw r29,188(r31)
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
ffc0b39c: 2f 83 00 00 cmpwi cr7,r3,0
ffc0b3a0: 90 ff 00 50 stw r7,80(r31)
the_watchdog->routine = routine;
ffc0b3a4: 90 ff 00 64 stw r7,100(r31)
the_watchdog->id = id;
ffc0b3a8: 90 ff 00 68 stw r7,104(r31)
the_watchdog->user_data = user_data;
ffc0b3ac: 90 ff 00 6c stw r7,108(r31)
ffc0b3b0: 41 be 00 18 beq+ cr7,ffc0b3c8 <_Thread_Initialize+0xf0>
extensions_area = _Workspace_Allocate(
ffc0b3b4: 38 63 00 01 addi r3,r3,1
ffc0b3b8: 54 63 10 3a rlwinm r3,r3,2,0,29
ffc0b3bc: 48 00 0f bd bl ffc0c378 <_Workspace_Allocate>
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
ffc0b3c0: 7c 7e 1b 79 mr. r30,r3
ffc0b3c4: 41 82 01 08 beq- ffc0b4cc <_Thread_Initialize+0x1f4>
* 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 ) {
ffc0b3c8: 2f 9e 00 00 cmpwi cr7,r30,0
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
goto failed;
}
the_thread->extensions = (void **) extensions_area;
ffc0b3cc: 93 df 01 54 stw r30,340(r31)
* 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 ) {
ffc0b3d0: 40 be 00 20 bne+ cr7,ffc0b3f0 <_Thread_Initialize+0x118>
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
the_thread->Start.budget_callout = budget_callout;
switch ( budget_algorithm ) {
ffc0b3d4: 2f 9b 00 02 cmpwi cr7,r27,2
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
the_thread->Start.budget_callout = budget_callout;
ffc0b3d8: 81 21 00 48 lwz r9,72(r1)
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
ffc0b3dc: 9b 5f 00 9c stb r26,156(r31)
the_thread->Start.budget_algorithm = budget_algorithm;
ffc0b3e0: 93 7f 00 a0 stw r27,160(r31)
the_thread->Start.budget_callout = budget_callout;
ffc0b3e4: 91 3f 00 a4 stw r9,164(r31)
switch ( budget_algorithm ) {
ffc0b3e8: 40 be 00 44 bne+ cr7,ffc0b42c <_Thread_Initialize+0x154>
ffc0b3ec: 48 00 00 34 b ffc0b420 <_Thread_Initialize+0x148>
* 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++ )
ffc0b3f0: 3d 20 00 00 lis r9,0
ffc0b3f4: 81 49 28 74 lwz r10,10356(r9)
ffc0b3f8: 38 e0 00 00 li r7,0
the_thread->extensions[i] = NULL;
ffc0b3fc: 39 00 00 00 li r8,0
ffc0b400: 48 00 00 14 b ffc0b414 <_Thread_Initialize+0x13c>
ffc0b404: 81 3f 01 54 lwz r9,340(r31)
ffc0b408: 54 e6 10 3a rlwinm r6,r7,2,0,29
* 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++ )
ffc0b40c: 38 e7 00 01 addi r7,r7,1
the_thread->extensions[i] = NULL;
ffc0b410: 7d 09 31 2e stwx r8,r9,r6
* 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++ )
ffc0b414: 7f 87 50 40 cmplw cr7,r7,r10
ffc0b418: 40 9d ff ec ble+ cr7,ffc0b404 <_Thread_Initialize+0x12c>
ffc0b41c: 4b ff ff b8 b ffc0b3d4 <_Thread_Initialize+0xfc>
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;
ffc0b420: 3d 20 00 00 lis r9,0
ffc0b424: 81 29 28 64 lwz r9,10340(r9)
ffc0b428: 91 3f 00 74 stw r9,116(r31)
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
ffc0b42c: 81 21 00 4c lwz r9,76(r1)
the_thread->current_state = STATES_DORMANT;
ffc0b430: 3b 40 00 01 li r26,1
ffc0b434: 93 5f 00 10 stw r26,16(r31)
*/
RTEMS_INLINE_ROUTINE void* _Scheduler_Allocate(
Thread_Control *the_thread
)
{
return _Scheduler.Operations.allocate( the_thread );
ffc0b438: 7f e3 fb 78 mr r3,r31
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
ffc0b43c: 91 3f 00 a8 stw r9,168(r31)
the_thread->current_state = STATES_DORMANT;
the_thread->Wait.queue = NULL;
ffc0b440: 39 20 00 00 li r9,0
ffc0b444: 91 3f 00 44 stw r9,68(r31)
the_thread->resource_count = 0;
ffc0b448: 91 3f 00 1c stw r9,28(r31)
ffc0b44c: 3d 20 00 00 lis r9,0
ffc0b450: 81 29 20 98 lwz r9,8344(r9)
the_thread->real_priority = priority;
ffc0b454: 93 9f 00 18 stw r28,24(r31)
ffc0b458: 7d 29 03 a6 mtctr r9
the_thread->Start.initial_priority = priority;
ffc0b45c: 93 9f 00 ac stw r28,172(r31)
ffc0b460: 4e 80 04 21 bctrl
sched =_Scheduler_Allocate( the_thread );
if ( !sched )
ffc0b464: 7c 7b 1b 79 mr. r27,r3
ffc0b468: 41 82 00 68 beq- ffc0b4d0 <_Thread_Initialize+0x1f8>
goto failed;
_Thread_Set_priority( the_thread, priority );
ffc0b46c: 7f e3 fb 78 mr r3,r31
ffc0b470: 7f 84 e3 78 mr r4,r28
ffc0b474: 48 00 06 fd bl ffc0bb70 <_Thread_Set_priority>
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
ffc0b478: a1 3f 00 0a lhz r9,10(r31)
static inline void _Timestamp64_implementation_Set_to_zero(
Timestamp64_Control *_time
)
{
*_time = 0;
ffc0b47c: 39 40 00 00 li r10,0
ffc0b480: 91 5f 00 80 stw r10,128(r31)
ffc0b484: 39 60 00 00 li r11,0
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
ffc0b488: 55 29 10 3a rlwinm r9,r9,2,0,29
ffc0b48c: 81 58 00 1c lwz r10,28(r24)
static inline bool _User_extensions_Thread_create( Thread_Control *created )
{
User_extensions_Thread_create_context ctx = { created, true };
_User_extensions_Iterate( &ctx, _User_extensions_Thread_create_visitor );
ffc0b490: 3c 80 ff c1 lis r4,-63
ffc0b494: 91 7f 00 84 stw r11,132(r31)
ffc0b498: 38 61 00 08 addi r3,r1,8
ffc0b49c: 38 84 bd 94 addi r4,r4,-17004
ffc0b4a0: 7f ea 49 2e stwx r31,r10,r9
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
ffc0b4a4: 93 3f 00 0c stw r25,12(r31)
* @{
*/
static inline bool _User_extensions_Thread_create( Thread_Control *created )
{
User_extensions_Thread_create_context ctx = { created, true };
ffc0b4a8: 93 e1 00 08 stw r31,8(r1)
ffc0b4ac: 9b 41 00 0c stb r26,12(r1)
_User_extensions_Iterate( &ctx, _User_extensions_Thread_create_visitor );
ffc0b4b0: 48 00 09 c1 bl ffc0be70 <_User_extensions_Iterate>
* Mutex provides sufficient protection to let the user extensions
* run safely.
*/
extension_status = _User_extensions_Thread_create( the_thread );
if ( extension_status )
return true;
ffc0b4b4: 39 60 00 01 li r11,1
return ctx.ok;
ffc0b4b8: 89 21 00 0c lbz r9,12(r1)
* 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 )
ffc0b4bc: 2f 89 00 00 cmpwi cr7,r9,0
ffc0b4c0: 41 be 00 10 beq+ cr7,ffc0b4d0 <_Thread_Initialize+0x1f8>
ffc0b4c4: 48 00 00 48 b ffc0b50c <_Thread_Initialize+0x234>
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
extensions_area = NULL;
ffc0b4c8: 3b c0 00 00 li r30,0
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;
ffc0b4cc: 3b 60 00 00 li r27,0
extension_status = _User_extensions_Thread_create( the_thread );
if ( extension_status )
return true;
failed:
_Workspace_Free( the_thread->libc_reent );
ffc0b4d0: 80 7f 01 48 lwz r3,328(r31)
ffc0b4d4: 48 00 0e bd bl ffc0c390 <_Workspace_Free>
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
_Workspace_Free( the_thread->API_Extensions[i] );
ffc0b4d8: 80 7f 01 4c lwz r3,332(r31)
ffc0b4dc: 48 00 0e b5 bl ffc0c390 <_Workspace_Free>
ffc0b4e0: 80 7f 01 50 lwz r3,336(r31)
ffc0b4e4: 48 00 0e ad bl ffc0c390 <_Workspace_Free>
_Workspace_Free( extensions_area );
ffc0b4e8: 7f c3 f3 78 mr r3,r30
ffc0b4ec: 48 00 0e a5 bl ffc0c390 <_Workspace_Free>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
_Workspace_Free( fp_area );
ffc0b4f0: 7f a3 eb 78 mr r3,r29
ffc0b4f4: 48 00 0e 9d bl ffc0c390 <_Workspace_Free>
#endif
_Workspace_Free( sched );
ffc0b4f8: 7f 63 db 78 mr r3,r27
ffc0b4fc: 48 00 0e 95 bl ffc0c390 <_Workspace_Free>
_Thread_Stack_Free( the_thread );
ffc0b500: 7f e3 fb 78 mr r3,r31
ffc0b504: 48 00 07 8d bl ffc0bc90 <_Thread_Stack_Free>
return false;
ffc0b508: 39 60 00 00 li r11,0
}
ffc0b50c: 7d 63 5b 78 mr r3,r11
ffc0b510: 39 61 00 40 addi r11,r1,64
ffc0b514: 4b ff 50 90 b ffc005a4 <_restgpr_23_x>
ffc0c3c4 <_Thread_Restart>:
bool _Thread_Restart(
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
ffc0c3c4: 94 21 ff e8 stwu r1,-24(r1)
ffc0c3c8: 7c 08 02 a6 mflr r0
ffc0c3cc: 90 01 00 1c stw r0,28(r1)
*/
RTEMS_INLINE_ROUTINE bool _States_Is_dormant (
States_Control the_states
)
{
return (the_states & STATES_DORMANT);
ffc0c3d0: 81 23 00 10 lwz r9,16(r3)
ffc0c3d4: bf c1 00 10 stmw r30,16(r1)
ffc0c3d8: 7c 7f 1b 78 mr r31,r3
if ( !_States_Is_dormant( the_thread->current_state ) ) {
ffc0c3dc: 71 2a 00 01 andi. r10,r9,1
ffc0c3e0: 40 a2 00 7c bne+ ffc0c45c <_Thread_Restart+0x98>
_Thread_Set_transient( the_thread );
ffc0c3e4: 90 81 00 08 stw r4,8(r1)
ffc0c3e8: 90 a1 00 0c stw r5,12(r1)
ffc0c3ec: 48 00 00 ed bl ffc0c4d8 <_Thread_Set_transient>
_Thread_Reset( the_thread, pointer_argument, numeric_argument );
ffc0c3f0: 7f e3 fb 78 mr r3,r31
ffc0c3f4: 80 81 00 08 lwz r4,8(r1)
ffc0c3f8: 80 a1 00 0c lwz r5,12(r1)
ffc0c3fc: 48 00 30 21 bl ffc0f41c <_Thread_Reset>
_Thread_Load_environment( the_thread );
ffc0c400: 7f e3 fb 78 mr r3,r31
ffc0c404: 48 00 2c fd bl ffc0f100 <_Thread_Load_environment>
_Thread_Ready( the_thread );
ffc0c408: 7f e3 fb 78 mr r3,r31
ffc0c40c: 48 00 2f c9 bl ffc0f3d4 <_Thread_Ready>
);
}
static inline void _User_extensions_Thread_restart( Thread_Control *restarted )
{
_User_extensions_Iterate(
ffc0c410: 3c 80 ff c1 lis r4,-63
ffc0c414: 7f e3 fb 78 mr r3,r31
ffc0c418: 38 84 c7 08 addi r4,r4,-14584
ffc0c41c: 48 00 03 4d bl ffc0c768 <_User_extensions_Iterate>
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Executing );
ffc0c420: 3d 20 00 00 lis r9,0
ffc0c424: 39 29 31 e0 addi r9,r9,12768
_User_extensions_Thread_restart( the_thread );
if ( _Thread_Is_executing ( the_thread ) )
ffc0c428: 81 49 00 10 lwz r10,16(r9)
_Thread_Restart_self();
return true;
ffc0c42c: 38 60 00 01 li r3,1
ffc0c430: 7d 3e 4b 78 mr r30,r9
_Thread_Ready( the_thread );
_User_extensions_Thread_restart( the_thread );
if ( _Thread_Is_executing ( the_thread ) )
ffc0c434: 7f 9f 50 00 cmpw cr7,r31,r10
ffc0c438: 40 be 00 28 bne+ cr7,ffc0c460 <_Thread_Restart+0x9c>
*/
RTEMS_INLINE_ROUTINE void _Thread_Restart_self( void )
{
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( _Thread_Executing->fp_context != NULL )
ffc0c43c: 81 3f 01 44 lwz r9,324(r31)
ffc0c440: 2f 89 00 00 cmpwi cr7,r9,0
ffc0c444: 41 9e 00 0c beq- cr7,ffc0c450 <_Thread_Restart+0x8c> <== NEVER TAKEN
_Context_Restore_fp( &_Thread_Executing->fp_context );
ffc0c448: 38 7f 01 44 addi r3,r31,324
ffc0c44c: 48 00 f4 75 bl ffc1b8c0 <_CPU_Context_restore_fp>
#endif
_CPU_Context_Restart_self( &_Thread_Executing->Registers );
ffc0c450: 80 7e 00 10 lwz r3,16(r30)
ffc0c454: 38 63 00 c4 addi r3,r3,196
ffc0c458: 48 00 f5 fd bl ffc1ba54 <_CPU_Context_restore>
_Thread_Restart_self();
return true;
}
return false;
ffc0c45c: 38 60 00 00 li r3,0
}
ffc0c460: 39 61 00 18 addi r11,r1,24
ffc0c464: 4b ff 49 bc b ffc00e20 <_restgpr_30_x>
ffc0bab8 <_Thread_queue_Requeue>:
void _Thread_queue_Requeue(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
ffc0bab8: 94 21 ff d8 stwu r1,-40(r1)
ffc0babc: 7c 08 02 a6 mflr r0
ffc0bac0: bf a1 00 1c stmw r29,28(r1)
/*
* Just in case the thread really wasn't blocked on a thread queue
* when we get here.
*/
if ( !the_thread_queue )
ffc0bac4: 7c 7f 1b 79 mr. r31,r3
void _Thread_queue_Requeue(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
ffc0bac8: 90 01 00 2c stw r0,44(r1)
/*
* Just in case the thread really wasn't blocked on a thread queue
* when we get here.
*/
if ( !the_thread_queue )
ffc0bacc: 41 82 00 58 beq- ffc0bb24 <_Thread_queue_Requeue+0x6c> <== 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 ) {
ffc0bad0: 81 3f 00 34 lwz r9,52(r31)
ffc0bad4: 2f 89 00 01 cmpwi cr7,r9,1
ffc0bad8: 40 be 00 4c bne+ cr7,ffc0bb24 <_Thread_queue_Requeue+0x6c><== NEVER TAKEN
ffc0badc: 7c 9e 23 78 mr r30,r4
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0bae0: 7f a0 00 a6 mfmsr r29
ffc0bae4: 7d 50 42 a6 mfsprg r10,0
ffc0bae8: 7f aa 50 78 andc r10,r29,r10
ffc0baec: 7d 40 01 24 mtmsr r10
Thread_queue_Control *tq = the_thread_queue;
ISR_Level level;
ISR_Level level_ignored;
_ISR_Disable( level );
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
ffc0baf0: 3d 00 00 03 lis r8,3
ffc0baf4: 81 44 00 10 lwz r10,16(r4)
ffc0baf8: 61 08 be e0 ori r8,r8,48864
ffc0bafc: 7d 07 50 39 and. r7,r8,r10
ffc0bb00: 41 a2 00 20 beq+ ffc0bb20 <_Thread_queue_Requeue+0x68> <== 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;
ffc0bb04: 91 3f 00 30 stw r9,48(r31)
_Thread_queue_Enter_critical_section( tq );
_Thread_queue_Extract_priority_helper( tq, the_thread, true );
ffc0bb08: 38 a0 00 01 li r5,1
ffc0bb0c: 48 00 2e 81 bl ffc0e98c <_Thread_queue_Extract_priority_helper>
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
ffc0bb10: 7f e3 fb 78 mr r3,r31
ffc0bb14: 7f c4 f3 78 mr r4,r30
ffc0bb18: 38 a1 00 08 addi r5,r1,8
ffc0bb1c: 4b ff fd 11 bl ffc0b82c <_Thread_queue_Enqueue_priority>
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0bb20: 7f a0 01 24 mtmsr r29
}
_ISR_Enable( level );
}
}
ffc0bb24: 39 61 00 28 addi r11,r1,40
ffc0bb28: 4b ff 4a 94 b ffc005bc <_restgpr_29_x>
ffc0bb2c <_Thread_queue_Timeout>:
void _Thread_queue_Timeout(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
ffc0bb2c: 94 21 ff e8 stwu r1,-24(r1)
ffc0bb30: 7c 08 02 a6 mflr r0
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
ffc0bb34: 38 81 00 08 addi r4,r1,8
void _Thread_queue_Timeout(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
ffc0bb38: 90 01 00 1c stw r0,28(r1)
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
ffc0bb3c: 4b ff f7 09 bl ffc0b244 <_Thread_Get>
switch ( location ) {
ffc0bb40: 81 21 00 08 lwz r9,8(r1)
ffc0bb44: 2f 89 00 00 cmpwi cr7,r9,0
ffc0bb48: 40 9e 00 18 bne- cr7,ffc0bb60 <_Thread_queue_Timeout+0x34><== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_queue_Process_timeout( the_thread );
ffc0bb4c: 48 00 2f 45 bl ffc0ea90 <_Thread_queue_Process_timeout>
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
ffc0bb50: 3d 20 00 00 lis r9,0
ffc0bb54: 81 49 28 68 lwz r10,10344(r9)
--level;
ffc0bb58: 39 4a ff ff addi r10,r10,-1
_Thread_Dispatch_disable_level = level;
ffc0bb5c: 91 49 28 68 stw r10,10344(r9)
_Thread_Unnest_dispatch();
break;
}
}
ffc0bb60: 80 01 00 1c lwz r0,28(r1)
ffc0bb64: 38 21 00 18 addi r1,r1,24
ffc0bb68: 7c 08 03 a6 mtlr r0
ffc0bb6c: 4e 80 00 20 blr
ffc19d40 <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
ffc19d40: 94 21 ff a0 stwu r1,-96(r1)
ffc19d44: 7c 08 02 a6 mflr r0
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
ffc19d48: 39 20 00 00 li r9,0
ffc19d4c: be 41 00 28 stmw r18,40(r1)
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
ffc19d50: 3a c1 00 14 addi r22,r1,20
ffc19d54: 3a 61 00 18 addi r19,r1,24
ffc19d58: 3b 21 00 0c addi r25,r1,12
ffc19d5c: 90 01 00 64 stw r0,100(r1)
head->previous = NULL;
tail->previous = head;
ffc19d60: 3b a1 00 08 addi r29,r1,8
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
ffc19d64: 92 61 00 14 stw r19,20(r1)
ffc19d68: 7c 7f 1b 78 mr r31,r3
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
ffc19d6c: 3e a0 00 00 lis r21,0
head->previous = NULL;
ffc19d70: 91 21 00 18 stw r9,24(r1)
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
ffc19d74: 3b 43 00 30 addi r26,r3,48
static void _Timer_server_Process_tod_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
ffc19d78: 3e 80 00 00 lis r20,0
tail->previous = head;
ffc19d7c: 92 c1 00 1c stw r22,28(r1)
/*
* 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 );
ffc19d80: 3b 83 00 68 addi r28,r3,104
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
ffc19d84: 3a 40 00 00 li r18,0
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
ffc19d88: 93 21 00 08 stw r25,8(r1)
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
ffc19d8c: 3f 60 00 00 lis r27,0
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
ffc19d90: 3a e3 00 08 addi r23,r3,8
head->previous = NULL;
ffc19d94: 91 21 00 0c stw r9,12(r1)
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
ffc19d98: 3b 03 00 40 addi r24,r3,64
tail->previous = head;
ffc19d9c: 93 a1 00 10 stw r29,16(r1)
{
/*
* 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;
ffc19da0: 92 df 00 78 stw r22,120(r31)
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
ffc19da4: 81 35 29 5c lwz r9,10588(r21)
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
ffc19da8: 7f 43 d3 78 mr r3,r26
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
ffc19dac: 80 9f 00 3c lwz r4,60(r31)
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
ffc19db0: 7f a5 eb 78 mr r5,r29
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
ffc19db4: 91 3f 00 3c stw r9,60(r31)
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
ffc19db8: 7c 84 48 50 subf r4,r4,r9
ffc19dbc: 48 00 48 5d bl ffc1e618 <_Watchdog_Adjust_to_chain>
static void _Timer_server_Process_tod_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
ffc19dc0: 39 34 70 80 addi r9,r20,28800
ffc19dc4: 80 69 00 00 lwz r3,0(r9)
ffc19dc8: 3c c0 3b 9a lis r6,15258
ffc19dcc: 80 89 00 04 lwz r4,4(r9)
ffc19dd0: 38 a0 00 00 li r5,0
ffc19dd4: 60 c6 ca 00 ori r6,r6,51712
ffc19dd8: 48 01 46 b1 bl ffc2e488 <__divdi3>
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
ffc19ddc: 80 bf 00 74 lwz r5,116(r31)
ffc19de0: 7c 9e 23 78 mr r30,r4
/*
* 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 ) {
ffc19de4: 7f 84 28 40 cmplw cr7,r4,r5
ffc19de8: 40 bd 00 18 ble+ cr7,ffc19e00 <_Timer_server_Body+0xc0>
/*
* 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 );
ffc19dec: 7c 85 20 50 subf r4,r5,r4
ffc19df0: 7f 83 e3 78 mr r3,r28
ffc19df4: 7f a5 eb 78 mr r5,r29
ffc19df8: 48 00 48 21 bl ffc1e618 <_Watchdog_Adjust_to_chain>
ffc19dfc: 48 00 00 18 b ffc19e14 <_Timer_server_Body+0xd4>
} else if ( snapshot < last_snapshot ) {
ffc19e00: 40 bc 00 14 bge+ cr7,ffc19e14 <_Timer_server_Body+0xd4>
/*
* 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 );
ffc19e04: 7f 83 e3 78 mr r3,r28
ffc19e08: 38 80 00 01 li r4,1
ffc19e0c: 7c be 28 50 subf r5,r30,r5
ffc19e10: 48 00 47 4d bl ffc1e55c <_Watchdog_Adjust>
}
watchdogs->last_snapshot = snapshot;
ffc19e14: 93 df 00 74 stw r30,116(r31)
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
ffc19e18: 80 7f 00 78 lwz r3,120(r31)
ffc19e1c: 48 00 0b 45 bl ffc1a960 <_Chain_Get>
if ( timer == NULL ) {
ffc19e20: 7c 7e 1b 79 mr. r30,r3
ffc19e24: 41 82 00 2c beq- ffc19e50 <_Timer_server_Body+0x110>
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
ffc19e28: 81 3e 00 38 lwz r9,56(r30)
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
ffc19e2c: 7f 43 d3 78 mr r3,r26
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
ffc19e30: 2f 89 00 01 cmpwi cr7,r9,1
ffc19e34: 41 9e 00 10 beq- cr7,ffc19e44 <_Timer_server_Body+0x104>
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
ffc19e38: 2f 89 00 03 cmpwi cr7,r9,3
ffc19e3c: 40 9e ff dc bne+ cr7,ffc19e18 <_Timer_server_Body+0xd8> <== NEVER TAKEN
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
ffc19e40: 7f 83 e3 78 mr r3,r28
ffc19e44: 38 9e 00 10 addi r4,r30,16
ffc19e48: 48 00 48 6d bl ffc1e6b4 <_Watchdog_Insert>
ffc19e4c: 4b ff ff cc b ffc19e18 <_Timer_server_Body+0xd8>
* of zero it will be processed in the next iteration of the timer server
* body loop.
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
ffc19e50: 4b ff fe 05 bl ffc19c54 <ppc_interrupt_disable>
if ( _Chain_Is_empty( insert_chain ) ) {
ffc19e54: 81 21 00 14 lwz r9,20(r1)
ffc19e58: 7f 89 98 00 cmpw cr7,r9,r19
ffc19e5c: 40 be 00 1c bne+ cr7,ffc19e78 <_Timer_server_Body+0x138><== NEVER TAKEN
ts->insert_chain = NULL;
ffc19e60: 93 df 00 78 stw r30,120(r31)
ffc19e64: 7c 60 01 24 mtmsr r3
_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 ) ) {
ffc19e68: 81 21 00 08 lwz r9,8(r1)
ffc19e6c: 7f 89 c8 00 cmpw cr7,r9,r25
ffc19e70: 40 be 00 10 bne+ cr7,ffc19e80 <_Timer_server_Body+0x140>
ffc19e74: 48 00 00 50 b ffc19ec4 <_Timer_server_Body+0x184>
ffc19e78: 7c 60 01 24 mtmsr r3 <== NOT EXECUTED
ffc19e7c: 4b ff ff 28 b ffc19da4 <_Timer_server_Body+0x64> <== 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 );
ffc19e80: 4b ff fd d5 bl ffc19c54 <ppc_interrupt_disable>
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
ffc19e84: 81 21 00 08 lwz r9,8(r1)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
ffc19e88: 7f 89 c8 00 cmpw cr7,r9,r25
ffc19e8c: 41 9e 00 30 beq- cr7,ffc19ebc <_Timer_server_Body+0x17c>
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
ffc19e90: 81 49 00 00 lwz r10,0(r9)
head->next = new_first;
new_first->previous = head;
ffc19e94: 93 aa 00 04 stw r29,4(r10)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
head->next = new_first;
ffc19e98: 91 41 00 08 stw r10,8(r1)
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
ffc19e9c: 92 49 00 08 stw r18,8(r9)
ffc19ea0: 7c 60 01 24 mtmsr r3
/*
* 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 );
ffc19ea4: 81 49 00 1c lwz r10,28(r9)
ffc19ea8: 80 69 00 20 lwz r3,32(r9)
ffc19eac: 80 89 00 24 lwz r4,36(r9)
ffc19eb0: 7d 49 03 a6 mtctr r10
ffc19eb4: 4e 80 04 21 bctrl
}
ffc19eb8: 4b ff ff c8 b ffc19e80 <_Timer_server_Body+0x140>
ffc19ebc: 7c 60 01 24 mtmsr r3
ffc19ec0: 4b ff fe e0 b ffc19da0 <_Timer_server_Body+0x60>
} else {
ts->active = false;
ffc19ec4: 39 20 00 00 li r9,0
ffc19ec8: 99 3f 00 7c stb r9,124(r31)
ffc19ecc: 81 3b 29 3c lwz r9,10556(r27)
++level;
ffc19ed0: 39 29 00 01 addi r9,r9,1
_Thread_Dispatch_disable_level = level;
ffc19ed4: 91 3b 29 3c stw r9,10556(r27)
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
_Thread_Set_state( ts->thread, STATES_DELAYING );
ffc19ed8: 80 7f 00 00 lwz r3,0(r31)
ffc19edc: 38 80 00 08 li r4,8
ffc19ee0: 48 00 42 6d bl ffc1e14c <_Thread_Set_state>
_Timer_server_Reset_interval_system_watchdog( ts );
ffc19ee4: 7f e3 fb 78 mr r3,r31
ffc19ee8: 4b ff fd 81 bl ffc19c68 <_Timer_server_Reset_interval_system_watchdog>
_Timer_server_Reset_tod_system_watchdog( ts );
ffc19eec: 7f e3 fb 78 mr r3,r31
ffc19ef0: 4b ff fd e5 bl ffc19cd4 <_Timer_server_Reset_tod_system_watchdog>
_Thread_Enable_dispatch();
ffc19ef4: 48 00 38 59 bl ffc1d74c <_Thread_Enable_dispatch>
ts->active = true;
ffc19ef8: 39 20 00 01 li r9,1
ffc19efc: 99 3f 00 7c stb r9,124(r31)
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
ffc19f00: 7e e3 bb 78 mr r3,r23
ffc19f04: 48 00 49 0d bl ffc1e810 <_Watchdog_Remove>
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
ffc19f08: 7f 03 c3 78 mr r3,r24
ffc19f0c: 48 00 49 05 bl ffc1e810 <_Watchdog_Remove>
ffc19f10: 4b ff fe 90 b ffc19da0 <_Timer_server_Body+0x60>
ffc19f14 <_Timer_server_Schedule_operation_method>:
static void _Timer_server_Schedule_operation_method(
Timer_server_Control *ts,
Timer_Control *timer
)
{
ffc19f14: 94 21 ff e8 stwu r1,-24(r1)
ffc19f18: 7c 08 02 a6 mflr r0
ffc19f1c: 90 01 00 1c stw r0,28(r1)
if ( ts->insert_chain == NULL ) {
ffc19f20: 81 23 00 78 lwz r9,120(r3)
static void _Timer_server_Schedule_operation_method(
Timer_server_Control *ts,
Timer_Control *timer
)
{
ffc19f24: bf a1 00 0c stmw r29,12(r1)
ffc19f28: 7c 7f 1b 78 mr r31,r3
if ( ts->insert_chain == NULL ) {
ffc19f2c: 2f 89 00 00 cmpwi cr7,r9,0
ffc19f30: 40 be 01 3c bne+ cr7,ffc1a06c <_Timer_server_Schedule_operation_method+0x158>
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
ffc19f34: 3d 20 00 00 lis r9,0
ffc19f38: 81 49 29 3c lwz r10,10556(r9)
ffc19f3c: 7c 9e 23 78 mr r30,r4
++level;
ffc19f40: 39 4a 00 01 addi r10,r10,1
_Thread_Dispatch_disable_level = level;
ffc19f44: 91 49 29 3c stw r10,10556(r9)
* being inserted. This could result in an integer overflow.
*/
_Thread_Disable_dispatch();
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
ffc19f48: 81 24 00 38 lwz r9,56(r4)
ffc19f4c: 2f 89 00 01 cmpwi cr7,r9,1
ffc19f50: 40 be 00 6c bne+ cr7,ffc19fbc <_Timer_server_Schedule_operation_method+0xa8>
/*
* We have to advance the last known ticks value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
ffc19f54: 4b ff fd 01 bl ffc19c54 <ppc_interrupt_disable>
snapshot = _Watchdog_Ticks_since_boot;
ffc19f58: 3d 20 00 00 lis r9,0
ffc19f5c: 81 49 29 5c lwz r10,10588(r9)
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
ffc19f60: 39 1f 00 34 addi r8,r31,52
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
ffc19f64: 81 3f 00 30 lwz r9,48(r31)
last_snapshot = ts->Interval_watchdogs.last_snapshot;
ffc19f68: 80 ff 00 3c lwz r7,60(r31)
if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) {
ffc19f6c: 7f 89 40 00 cmpw cr7,r9,r8
ffc19f70: 41 9e 00 20 beq- cr7,ffc19f90 <_Timer_server_Schedule_operation_method+0x7c>
/*
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
delta_interval = first_watchdog->delta_interval;
ffc19f74: 80 c9 00 10 lwz r6,16(r9)
first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain );
/*
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
ffc19f78: 7c e7 50 50 subf r7,r7,r10
delta_interval = first_watchdog->delta_interval;
if (delta_interval > delta) {
delta_interval -= delta;
} else {
delta_interval = 0;
ffc19f7c: 39 00 00 00 li r8,0
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
delta_interval = first_watchdog->delta_interval;
if (delta_interval > delta) {
ffc19f80: 7f 86 38 40 cmplw cr7,r6,r7
ffc19f84: 40 9d 00 08 ble- cr7,ffc19f8c <_Timer_server_Schedule_operation_method+0x78>
delta_interval -= delta;
ffc19f88: 7d 07 30 50 subf r8,r7,r6
} else {
delta_interval = 0;
}
first_watchdog->delta_interval = delta_interval;
ffc19f8c: 91 09 00 10 stw r8,16(r9)
}
ts->Interval_watchdogs.last_snapshot = snapshot;
ffc19f90: 91 5f 00 3c stw r10,60(r31)
ffc19f94: 7c 60 01 24 mtmsr r3
_ISR_Enable( level );
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
ffc19f98: 38 7f 00 30 addi r3,r31,48
ffc19f9c: 38 9e 00 10 addi r4,r30,16
ffc19fa0: 48 00 47 15 bl ffc1e6b4 <_Watchdog_Insert>
if ( !ts->active ) {
ffc19fa4: 89 3f 00 7c lbz r9,124(r31)
ffc19fa8: 2f 89 00 00 cmpwi cr7,r9,0
ffc19fac: 40 be 00 ac bne+ cr7,ffc1a058 <_Timer_server_Schedule_operation_method+0x144>
_Timer_server_Reset_interval_system_watchdog( ts );
ffc19fb0: 7f e3 fb 78 mr r3,r31
ffc19fb4: 4b ff fc b5 bl ffc19c68 <_Timer_server_Reset_interval_system_watchdog>
ffc19fb8: 48 00 00 a0 b ffc1a058 <_Timer_server_Schedule_operation_method+0x144>
}
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
ffc19fbc: 2f 89 00 03 cmpwi cr7,r9,3
ffc19fc0: 40 be 00 98 bne+ cr7,ffc1a058 <_Timer_server_Schedule_operation_method+0x144>
/*
* We have to advance the last known seconds value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
ffc19fc4: 4b ff fc 91 bl ffc19c54 <ppc_interrupt_disable>
ffc19fc8: 7c 7d 1b 78 mr r29,r3
ffc19fcc: 3d 20 00 00 lis r9,0
ffc19fd0: 39 29 70 80 addi r9,r9,28800
ffc19fd4: 80 69 00 00 lwz r3,0(r9)
ffc19fd8: 3c c0 3b 9a lis r6,15258
ffc19fdc: 80 89 00 04 lwz r4,4(r9)
ffc19fe0: 38 a0 00 00 li r5,0
ffc19fe4: 60 c6 ca 00 ori r6,r6,51712
ffc19fe8: 48 01 44 a1 bl ffc2e488 <__divdi3>
ffc19fec: 81 3f 00 68 lwz r9,104(r31)
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
ffc19ff0: 39 1f 00 6c addi r8,r31,108
snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
last_snapshot = ts->TOD_watchdogs.last_snapshot;
ffc19ff4: 81 5f 00 74 lwz r10,116(r31)
if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) {
ffc19ff8: 7f 89 40 00 cmpw cr7,r9,r8
ffc19ffc: 41 9e 00 34 beq- cr7,ffc1a030 <_Timer_server_Schedule_operation_method+0x11c>
first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain );
delta_interval = first_watchdog->delta_interval;
if ( snapshot > last_snapshot ) {
ffc1a000: 7f 84 50 40 cmplw cr7,r4,r10
_ISR_Disable( level );
snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
last_snapshot = ts->TOD_watchdogs.last_snapshot;
if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) {
first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain );
delta_interval = first_watchdog->delta_interval;
ffc1a004: 81 09 00 10 lwz r8,16(r9)
if ( snapshot > last_snapshot ) {
ffc1a008: 40 9d 00 1c ble- cr7,ffc1a024 <_Timer_server_Schedule_operation_method+0x110>
/*
* We advanced in time.
*/
delta = snapshot - last_snapshot;
ffc1a00c: 7c ea 20 50 subf r7,r10,r4
if (delta_interval > delta) {
ffc1a010: 7f 88 38 40 cmplw cr7,r8,r7
delta_interval -= delta;
} else {
delta_interval = 0;
ffc1a014: 39 40 00 00 li r10,0
if ( snapshot > last_snapshot ) {
/*
* We advanced in time.
*/
delta = snapshot - last_snapshot;
if (delta_interval > delta) {
ffc1a018: 40 9d 00 14 ble- cr7,ffc1a02c <_Timer_server_Schedule_operation_method+0x118><== NEVER TAKEN
delta_interval -= delta;
ffc1a01c: 7d 47 40 50 subf r10,r7,r8
ffc1a020: 48 00 00 0c b ffc1a02c <_Timer_server_Schedule_operation_method+0x118>
}
} else {
/*
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
ffc1a024: 7d 48 52 14 add r10,r8,r10
delta_interval += delta;
ffc1a028: 7d 44 50 50 subf r10,r4,r10
}
first_watchdog->delta_interval = delta_interval;
ffc1a02c: 91 49 00 10 stw r10,16(r9)
}
ts->TOD_watchdogs.last_snapshot = snapshot;
ffc1a030: 90 9f 00 74 stw r4,116(r31)
ffc1a034: 7f a0 01 24 mtmsr r29
_ISR_Enable( level );
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
ffc1a038: 38 7f 00 68 addi r3,r31,104
ffc1a03c: 38 9e 00 10 addi r4,r30,16
ffc1a040: 48 00 46 75 bl ffc1e6b4 <_Watchdog_Insert>
if ( !ts->active ) {
ffc1a044: 89 3f 00 7c lbz r9,124(r31)
ffc1a048: 2f 89 00 00 cmpwi cr7,r9,0
ffc1a04c: 40 be 00 0c bne+ cr7,ffc1a058 <_Timer_server_Schedule_operation_method+0x144><== NEVER TAKEN
_Timer_server_Reset_tod_system_watchdog( ts );
ffc1a050: 7f e3 fb 78 mr r3,r31
ffc1a054: 4b ff fc 81 bl ffc19cd4 <_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 );
}
}
ffc1a058: 80 01 00 1c lwz r0,28(r1)
ffc1a05c: bb a1 00 0c lmw r29,12(r1)
ffc1a060: 7c 08 03 a6 mtlr r0
ffc1a064: 38 21 00 18 addi r1,r1,24
if ( !ts->active ) {
_Timer_server_Reset_tod_system_watchdog( ts );
}
}
_Thread_Enable_dispatch();
ffc1a068: 48 00 36 e4 b ffc1d74c <_Thread_Enable_dispatch>
* 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 );
}
}
ffc1a06c: 80 01 00 1c lwz r0,28(r1)
ffc1a070: bb a1 00 0c lmw r29,12(r1)
ffc1a074: 7c 08 03 a6 mtlr r0
* 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 );
ffc1a078: 80 63 00 78 lwz r3,120(r3)
}
}
ffc1a07c: 38 21 00 18 addi r1,r1,24
* 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 );
ffc1a080: 48 00 08 b0 b ffc1a930 <_Chain_Append>
ffc0d628 <_Timestamp64_Divide>:
const Timestamp64_Control *_lhs,
const Timestamp64_Control *_rhs,
uint32_t *_ival_percentage,
uint32_t *_fval_percentage
)
{
ffc0d628: 94 21 ff e8 stwu r1,-24(r1)
ffc0d62c: 7c 08 02 a6 mflr r0
ffc0d630: 90 01 00 1c stw r0,28(r1)
ffc0d634: bf 81 00 08 stmw r28,8(r1)
ffc0d638: 7c be 2b 78 mr r30,r5
ffc0d63c: 7c df 33 78 mr r31,r6
Timestamp64_Control answer;
if ( *_rhs == 0 ) {
ffc0d640: 80 a4 00 00 lwz r5,0(r4)
ffc0d644: 81 24 00 04 lwz r9,4(r4)
ffc0d648: 7c a8 4b 79 or. r8,r5,r9
ffc0d64c: 40 a2 00 10 bne+ ffc0d65c <_Timestamp64_Divide+0x34> <== ALWAYS TAKEN
*_ival_percentage = 0;
ffc0d650: 91 1e 00 00 stw r8,0(r30) <== NOT EXECUTED
*_fval_percentage = 0;
ffc0d654: 91 06 00 00 stw r8,0(r6) <== NOT EXECUTED
return;
ffc0d658: 48 00 00 5c b ffc0d6b4 <_Timestamp64_Divide+0x8c> <== 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;
ffc0d65c: 80 c3 00 04 lwz r6,4(r3)
ffc0d660: 3d 00 00 01 lis r8,1
ffc0d664: 80 e3 00 00 lwz r7,0(r3)
ffc0d668: 61 08 86 a0 ori r8,r8,34464
ffc0d66c: 7c 68 30 16 mulhwu r3,r8,r6
ffc0d670: 7c e8 39 d6 mullw r7,r8,r7
ffc0d674: 7c 88 31 d6 mullw r4,r8,r6
ffc0d678: 7c 67 1a 14 add r3,r7,r3
ffc0d67c: 7d 26 4b 78 mr r6,r9
ffc0d680: 48 00 ea 19 bl ffc1c098 <__divdi3>
*_ival_percentage = answer / 1000;
ffc0d684: 38 a0 00 00 li r5,0
ffc0d688: 38 c0 03 e8 li r6,1000
* This looks odd but gives the results the proper precision.
*
* TODO: Rounding on the last digit of the fval.
*/
answer = (*_lhs * 100000) / *_rhs;
ffc0d68c: 7c 7c 1b 78 mr r28,r3
ffc0d690: 7c 9d 23 78 mr r29,r4
*_ival_percentage = answer / 1000;
ffc0d694: 48 00 ea 05 bl ffc1c098 <__divdi3>
ffc0d698: 90 9e 00 00 stw r4,0(r30)
*_fval_percentage = answer % 1000;
ffc0d69c: 7f 83 e3 78 mr r3,r28
ffc0d6a0: 7f a4 eb 78 mr r4,r29
ffc0d6a4: 38 a0 00 00 li r5,0
ffc0d6a8: 38 c0 03 e8 li r6,1000
ffc0d6ac: 48 00 ee 11 bl ffc1c4bc <__moddi3>
ffc0d6b0: 90 9f 00 00 stw r4,0(r31)
}
ffc0d6b4: 39 61 00 18 addi r11,r1,24
ffc0d6b8: 4b ff 3c 78 b ffc01330 <_restgpr_28_x>
ffc0d91c <_Watchdog_Adjust>:
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
ffc0d91c: 94 21 ff e8 stwu r1,-24(r1)
ffc0d920: 7c 08 02 a6 mflr r0
ffc0d924: 90 01 00 1c stw r0,28(r1)
ffc0d928: bf 81 00 08 stmw r28,8(r1)
ffc0d92c: 7c 7e 1b 78 mr r30,r3
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0d930: 7d 20 00 a6 mfmsr r9
ffc0d934: 7d 50 42 a6 mfsprg r10,0
ffc0d938: 7d 2a 50 78 andc r10,r9,r10
ffc0d93c: 7d 40 01 24 mtmsr r10
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
ffc0d940: 81 43 00 00 lwz r10,0(r3)
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
ffc0d944: 3b a3 00 04 addi r29,r3,4
* hence the compiler must not assume *header to remain
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
ffc0d948: 7f 8a e8 00 cmpw cr7,r10,r29
ffc0d94c: 41 9e 00 80 beq- cr7,ffc0d9cc <_Watchdog_Adjust+0xb0>
switch ( direction ) {
ffc0d950: 2f 84 00 00 cmpwi cr7,r4,0
ffc0d954: 7c bf 2b 78 mr r31,r5
ffc0d958: 41 9e 00 68 beq- cr7,ffc0d9c0 <_Watchdog_Adjust+0xa4>
ffc0d95c: 2f 84 00 01 cmpwi cr7,r4,1
ffc0d960: 40 be 00 6c bne+ cr7,ffc0d9cc <_Watchdog_Adjust+0xb0> <== NEVER TAKEN
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
ffc0d964: 81 0a 00 10 lwz r8,16(r10)
ffc0d968: 7f e8 2a 14 add r31,r8,r5
ffc0d96c: 48 00 00 18 b ffc0d984 <_Watchdog_Adjust+0x68>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
ffc0d970: 81 5e 00 00 lwz r10,0(r30)
break;
case WATCHDOG_FORWARD:
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
ffc0d974: 81 0a 00 10 lwz r8,16(r10)
ffc0d978: 7f 9f 40 40 cmplw cr7,r31,r8
ffc0d97c: 40 bc 00 10 bge+ cr7,ffc0d98c <_Watchdog_Adjust+0x70>
_Watchdog_First( header )->delta_interval -= units;
ffc0d980: 7f ff 40 50 subf r31,r31,r8
ffc0d984: 93 ea 00 10 stw r31,16(r10)
break;
ffc0d988: 48 00 00 44 b ffc0d9cc <_Watchdog_Adjust+0xb0>
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
ffc0d98c: 93 8a 00 10 stw r28,16(r10)
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
ffc0d990: 7f e8 f8 50 subf r31,r8,r31
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0d994: 7d 20 01 24 mtmsr r9
_Watchdog_First( header )->delta_interval = 1;
_ISR_Enable( level );
_Watchdog_Tickle( header );
ffc0d998: 7f c3 f3 78 mr r3,r30
ffc0d99c: 48 00 02 41 bl ffc0dbdc <_Watchdog_Tickle>
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0d9a0: 7d 20 00 a6 mfmsr r9
ffc0d9a4: 7d 50 42 a6 mfsprg r10,0
ffc0d9a8: 7d 2a 50 78 andc r10,r9,r10
ffc0d9ac: 7d 40 01 24 mtmsr r10
_ISR_Disable( level );
if ( _Chain_Is_empty( header ) )
ffc0d9b0: 81 5e 00 00 lwz r10,0(r30)
ffc0d9b4: 7f 8a e8 00 cmpw cr7,r10,r29
ffc0d9b8: 40 be 00 0c bne+ cr7,ffc0d9c4 <_Watchdog_Adjust+0xa8>
ffc0d9bc: 48 00 00 10 b ffc0d9cc <_Watchdog_Adjust+0xb0>
if ( units < _Watchdog_First( header )->delta_interval ) {
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
ffc0d9c0: 3b 80 00 01 li r28,1
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
ffc0d9c4: 2f 9f 00 00 cmpwi cr7,r31,0
ffc0d9c8: 40 9e ff a8 bne+ cr7,ffc0d970 <_Watchdog_Adjust+0x54> <== ALWAYS TAKEN
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0d9cc: 7d 20 01 24 mtmsr r9
}
}
_ISR_Enable( level );
}
ffc0d9d0: 39 61 00 18 addi r11,r1,24
ffc0d9d4: 4b ff 39 5c b ffc01330 <_restgpr_28_x>
ffc0c0f0 <_Watchdog_Remove>:
#include <rtems/score/watchdog.h>
Watchdog_States _Watchdog_Remove(
Watchdog_Control *the_watchdog
)
{
ffc0c0f0: 7c 69 1b 78 mr r9,r3
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0c0f4: 7c c0 00 a6 mfmsr r6
ffc0c0f8: 7d 50 42 a6 mfsprg r10,0
ffc0c0fc: 7c ca 50 78 andc r10,r6,r10
ffc0c100: 7d 40 01 24 mtmsr r10
ISR_Level level;
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
previous_state = the_watchdog->state;
ffc0c104: 80 63 00 08 lwz r3,8(r3)
switch ( previous_state ) {
ffc0c108: 2f 83 00 01 cmpwi cr7,r3,1
ffc0c10c: 41 9e 00 18 beq- cr7,ffc0c124 <_Watchdog_Remove+0x34>
ffc0c110: 2b 83 00 01 cmplwi cr7,r3,1
ffc0c114: 41 9c 00 70 blt- cr7,ffc0c184 <_Watchdog_Remove+0x94>
ffc0c118: 2b 83 00 03 cmplwi cr7,r3,3
ffc0c11c: 41 9d 00 68 bgt- cr7,ffc0c184 <_Watchdog_Remove+0x94> <== NEVER TAKEN
ffc0c120: 48 00 00 10 b ffc0c130 <_Watchdog_Remove+0x40>
/*
* 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;
ffc0c124: 39 40 00 00 li r10,0
ffc0c128: 91 49 00 08 stw r10,8(r9)
break;
ffc0c12c: 48 00 00 58 b ffc0c184 <_Watchdog_Remove+0x94>
case WATCHDOG_ACTIVE:
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
ffc0c130: 39 40 00 00 li r10,0
ffc0c134: 91 49 00 08 stw r10,8(r9)
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
_ISR_Enable( level );
return( previous_state );
}
ffc0c138: 81 49 00 00 lwz r10,0(r9)
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
next_watchdog = _Watchdog_Next( the_watchdog );
if ( _Watchdog_Next(next_watchdog) )
ffc0c13c: 81 0a 00 00 lwz r8,0(r10)
ffc0c140: 2f 88 00 00 cmpwi cr7,r8,0
ffc0c144: 41 9e 00 14 beq- cr7,ffc0c158 <_Watchdog_Remove+0x68>
next_watchdog->delta_interval += the_watchdog->delta_interval;
ffc0c148: 80 ea 00 10 lwz r7,16(r10)
ffc0c14c: 81 09 00 10 lwz r8,16(r9)
ffc0c150: 7d 07 42 14 add r8,r7,r8
ffc0c154: 91 0a 00 10 stw r8,16(r10)
if ( _Watchdog_Sync_count )
ffc0c158: 3d 00 00 00 lis r8,0
ffc0c15c: 81 08 28 84 lwz r8,10372(r8)
ffc0c160: 2f 88 00 00 cmpwi cr7,r8,0
ffc0c164: 41 9e 00 14 beq- cr7,ffc0c178 <_Watchdog_Remove+0x88>
_Watchdog_Sync_level = _ISR_Nest_level;
ffc0c168: 3d 00 00 00 lis r8,0
ffc0c16c: 80 e8 31 a8 lwz r7,12712(r8)
ffc0c170: 3d 00 00 00 lis r8,0
ffc0c174: 90 e8 28 7c stw r7,10364(r8)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
ffc0c178: 81 09 00 04 lwz r8,4(r9)
next->previous = previous;
ffc0c17c: 91 0a 00 04 stw r8,4(r10)
previous->next = next;
ffc0c180: 91 48 00 00 stw r10,0(r8)
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
ffc0c184: 3d 40 00 00 lis r10,0
ffc0c188: 81 4a 28 88 lwz r10,10376(r10)
ffc0c18c: 91 49 00 18 stw r10,24(r9)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0c190: 7c c0 01 24 mtmsr r6
_ISR_Enable( level );
return( previous_state );
}
ffc0c194: 4e 80 00 20 blr
ffc0c240 <_Workspace_Handler_initialization>:
size_t area_count,
Heap_Initialization_or_extend_handler extend
)
{
Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize;
uintptr_t remaining = rtems_configuration_get_work_space_size();
ffc0c240: 3d 40 ff c2 lis r10,-62
void _Workspace_Handler_initialization(
Heap_Area *areas,
size_t area_count,
Heap_Initialization_or_extend_handler extend
)
{
ffc0c244: 7d 80 00 26 mfcr r12
Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize;
uintptr_t remaining = rtems_configuration_get_work_space_size();
ffc0c248: 39 2a bf 98 addi r9,r10,-16488
void _Workspace_Handler_initialization(
Heap_Area *areas,
size_t area_count,
Heap_Initialization_or_extend_handler extend
)
{
ffc0c24c: 94 21 ff d0 stwu r1,-48(r1)
ffc0c250: 7c 08 02 a6 mflr r0
Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize;
uintptr_t remaining = rtems_configuration_get_work_space_size();
ffc0c254: 89 09 00 32 lbz r8,50(r9)
void _Workspace_Handler_initialization(
Heap_Area *areas,
size_t area_count,
Heap_Initialization_or_extend_handler extend
)
{
ffc0c258: bf 01 00 10 stmw r24,16(r1)
ffc0c25c: 7c 99 23 78 mr r25,r4
Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize;
uintptr_t remaining = rtems_configuration_get_work_space_size();
ffc0c260: 2f 88 00 00 cmpwi cr7,r8,0
ffc0c264: 83 ca bf 98 lwz r30,-16488(r10)
void _Workspace_Handler_initialization(
Heap_Area *areas,
size_t area_count,
Heap_Initialization_or_extend_handler extend
)
{
ffc0c268: 7c ba 2b 78 mr r26,r5
ffc0c26c: 90 01 00 34 stw r0,52(r1)
Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize;
uintptr_t remaining = rtems_configuration_get_work_space_size();
ffc0c270: 39 40 00 00 li r10,0
void _Workspace_Handler_initialization(
Heap_Area *areas,
size_t area_count,
Heap_Initialization_or_extend_handler extend
)
{
ffc0c274: 91 81 00 0c stw r12,12(r1)
Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize;
uintptr_t remaining = rtems_configuration_get_work_space_size();
ffc0c278: 40 9e 00 08 bne- cr7,ffc0c280 <_Workspace_Handler_initialization+0x40>
ffc0c27c: 81 49 00 04 lwz r10,4(r9)
ffc0c280: 7f ca f2 14 add r30,r10,r30
bool do_zero = rtems_configuration_get_do_zero_of_workspace();
ffc0c284: 89 49 00 30 lbz r10,48(r9)
bool unified = rtems_configuration_get_unified_work_area();
ffc0c288: 89 29 00 31 lbz r9,49(r9)
Heap_Area *areas,
size_t area_count,
Heap_Initialization_or_extend_handler extend
)
{
Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize;
ffc0c28c: 3f 60 ff c1 lis r27,-63
} else {
size = 0;
}
}
space_available = (*init_or_extend)(
ffc0c290: 3f 00 00 00 lis r24,0
ffc0c294: 7c 7f 1b 78 mr r31,r3
bool unified = rtems_configuration_get_unified_work_area();
uintptr_t page_size = CPU_HEAP_ALIGNMENT;
uintptr_t overhead = _Heap_Area_overhead( page_size );
size_t i;
for (i = 0; i < area_count; ++i) {
ffc0c298: 3b 80 00 00 li r28,0
Heap_Area *areas,
size_t area_count,
Heap_Initialization_or_extend_handler extend
)
{
Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize;
ffc0c29c: 3b 7b 9b 50 addi r27,r27,-25776
size_t i;
for (i = 0; i < area_count; ++i) {
Heap_Area *area = &areas [i];
if ( do_zero ) {
ffc0c2a0: 2e 0a 00 00 cmpwi cr4,r10,0
if ( area->size > overhead ) {
uintptr_t space_available;
uintptr_t size;
if ( unified ) {
ffc0c2a4: 2d 89 00 00 cmpwi cr3,r9,0
} else {
size = 0;
}
}
space_available = (*init_or_extend)(
ffc0c2a8: 3b 18 2d 14 addi r24,r24,11540
bool unified = rtems_configuration_get_unified_work_area();
uintptr_t page_size = CPU_HEAP_ALIGNMENT;
uintptr_t overhead = _Heap_Area_overhead( page_size );
size_t i;
for (i = 0; i < area_count; ++i) {
ffc0c2ac: 48 00 00 9c b ffc0c348 <_Workspace_Handler_initialization+0x108>
Heap_Area *area = &areas [i];
if ( do_zero ) {
ffc0c2b0: 41 b2 00 14 beq+ cr4,ffc0c2c4 <_Workspace_Handler_initialization+0x84>
memset( area->begin, 0, area->size );
ffc0c2b4: 80 7f 00 00 lwz r3,0(r31)
ffc0c2b8: 38 80 00 00 li r4,0
ffc0c2bc: 80 bf 00 04 lwz r5,4(r31)
ffc0c2c0: 48 00 50 e5 bl ffc113a4 <memset>
}
if ( area->size > overhead ) {
ffc0c2c4: 83 bf 00 04 lwz r29,4(r31)
ffc0c2c8: 2b 9d 00 16 cmplwi cr7,r29,22
ffc0c2cc: 40 9d 00 74 ble- cr7,ffc0c340 <_Workspace_Handler_initialization+0x100>
uintptr_t space_available;
uintptr_t size;
if ( unified ) {
ffc0c2d0: 40 8e 00 24 bne- cr3,ffc0c2f4 <_Workspace_Handler_initialization+0xb4>
size = area->size;
} else {
if ( remaining > 0 ) {
ffc0c2d4: 2f 9e 00 00 cmpwi cr7,r30,0
ffc0c2d8: 41 9e 00 18 beq- cr7,ffc0c2f0 <_Workspace_Handler_initialization+0xb0><== NEVER TAKEN
size = remaining < area->size - overhead ?
ffc0c2dc: 39 3d ff ea addi r9,r29,-22
remaining + overhead : area->size;
ffc0c2e0: 7f 9e 48 40 cmplw cr7,r30,r9
ffc0c2e4: 40 9c 00 10 bge- cr7,ffc0c2f4 <_Workspace_Handler_initialization+0xb4><== NEVER TAKEN
ffc0c2e8: 3b be 00 16 addi r29,r30,22
ffc0c2ec: 48 00 00 08 b ffc0c2f4 <_Workspace_Handler_initialization+0xb4>
} else {
size = 0;
ffc0c2f0: 3b a0 00 00 li r29,0 <== NOT EXECUTED
}
}
space_available = (*init_or_extend)(
ffc0c2f4: 7f a5 eb 78 mr r5,r29
ffc0c2f8: 80 9f 00 00 lwz r4,0(r31)
ffc0c2fc: 7f 03 c3 78 mr r3,r24
ffc0c300: 7f 69 03 a6 mtctr r27
ffc0c304: 38 c0 00 08 li r6,8
ffc0c308: 4e 80 04 21 bctrl
area->begin,
size,
page_size
);
area->begin = (char *) area->begin + size;
ffc0c30c: 81 3f 00 00 lwz r9,0(r31)
area->size -= size;
if ( space_available < remaining ) {
ffc0c310: 7f 83 f0 40 cmplw cr7,r3,r30
area->begin,
size,
page_size
);
area->begin = (char *) area->begin + size;
ffc0c314: 7d 29 ea 14 add r9,r9,r29
ffc0c318: 91 3f 00 00 stw r9,0(r31)
area->size -= size;
ffc0c31c: 81 3f 00 04 lwz r9,4(r31)
ffc0c320: 7f bd 48 50 subf r29,r29,r9
ffc0c324: 93 bf 00 04 stw r29,4(r31)
if ( space_available < remaining ) {
ffc0c328: 40 9c 00 10 bge- cr7,ffc0c338 <_Workspace_Handler_initialization+0xf8><== ALWAYS TAKEN
remaining -= space_available;
ffc0c32c: 7f c3 f0 50 subf r30,r3,r30 <== NOT EXECUTED
} else {
remaining = 0;
}
init_or_extend = extend;
ffc0c330: 7f 5b d3 78 mr r27,r26 <== NOT EXECUTED
ffc0c334: 48 00 00 0c b ffc0c340 <_Workspace_Handler_initialization+0x100><== NOT EXECUTED
ffc0c338: 7f 5b d3 78 mr r27,r26
area->size -= size;
if ( space_available < remaining ) {
remaining -= space_available;
} else {
remaining = 0;
ffc0c33c: 3b c0 00 00 li r30,0
bool unified = rtems_configuration_get_unified_work_area();
uintptr_t page_size = CPU_HEAP_ALIGNMENT;
uintptr_t overhead = _Heap_Area_overhead( page_size );
size_t i;
for (i = 0; i < area_count; ++i) {
ffc0c340: 3b 9c 00 01 addi r28,r28,1
ffc0c344: 3b ff 00 08 addi r31,r31,8
ffc0c348: 7f 9c c8 00 cmpw cr7,r28,r25
ffc0c34c: 40 9e ff 64 bne+ cr7,ffc0c2b0 <_Workspace_Handler_initialization+0x70>
init_or_extend = extend;
}
}
if ( remaining > 0 ) {
ffc0c350: 2f 9e 00 00 cmpwi cr7,r30,0
ffc0c354: 41 be 00 14 beq+ cr7,ffc0c368 <_Workspace_Handler_initialization+0x128>
_Internal_error_Occurred(
ffc0c358: 38 60 00 00 li r3,0
ffc0c35c: 38 80 00 01 li r4,1
ffc0c360: 38 a0 00 02 li r5,2
ffc0c364: 4b ff da 6d bl ffc09dd0 <_Internal_error_Occurred>
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_TOO_LITTLE_WORKSPACE
);
}
}
ffc0c368: 81 81 00 0c lwz r12,12(r1)
ffc0c36c: 39 61 00 30 addi r11,r1,48
ffc0c370: 7d 81 81 20 mtcrf 24,r12
ffc0c374: 4b ff 42 34 b ffc005a8 <_restgpr_24_x>
ffc13c70 <_fat_block_read>:
uint32_t start,
uint32_t offset,
uint32_t count,
void *buff
)
{
ffc13c70: 94 21 ff c8 stwu r1,-56(r1)
ffc13c74: 7c 08 02 a6 mflr r0
ffc13c78: bf 21 00 1c stmw r25,28(r1)
ffc13c7c: 7c 7a 1b 78 mr r26,r3
ffc13c80: 7c df 33 78 mr r31,r6
ffc13c84: 90 01 00 3c stw r0,60(r1)
ffc13c88: 7c f9 3b 78 mr r25,r7
int rc = RC_OK;
ssize_t cmpltd = 0;
uint32_t sec_num = start;
uint32_t ofs = offset;
ffc13c8c: 7c bb 2b 78 mr r27,r5
void *buff
)
{
int rc = RC_OK;
ssize_t cmpltd = 0;
uint32_t sec_num = start;
ffc13c90: 7c 9c 23 78 mr r28,r4
uint32_t count,
void *buff
)
{
int rc = RC_OK;
ssize_t cmpltd = 0;
ffc13c94: 3b c0 00 00 li r30,0
uint32_t sec_num = start;
uint32_t ofs = offset;
uint8_t *sec_buf;
uint32_t c = 0;
while (count > 0)
ffc13c98: 48 00 00 58 b ffc13cf0 <_fat_block_read+0x80>
{
rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf);
ffc13c9c: 7f 43 d3 78 mr r3,r26
ffc13ca0: 7f 84 e3 78 mr r4,r28
ffc13ca4: 38 a0 00 01 li r5,1
ffc13ca8: 38 c1 00 08 addi r6,r1,8
ffc13cac: 4b ff fe fd bl ffc13ba8 <fat_buf_access>
if (rc != RC_OK)
ffc13cb0: 2f 83 00 00 cmpwi cr7,r3,0
ffc13cb4: 40 9e 00 48 bne- cr7,ffc13cfc <_fat_block_read+0x8c> <== NEVER TAKEN
return -1;
c = MIN(count, (fs_info->vol.bps - ofs));
ffc13cb8: a3 ba 00 00 lhz r29,0(r26)
ffc13cbc: 7f bb e8 50 subf r29,r27,r29
ffc13cc0: 7f 9d f8 40 cmplw cr7,r29,r31
ffc13cc4: 40 9d 00 08 ble- cr7,ffc13ccc <_fat_block_read+0x5c>
ffc13cc8: 7f fd fb 78 mr r29,r31
memcpy((buff + cmpltd), (sec_buf + ofs), c);
ffc13ccc: 80 81 00 08 lwz r4,8(r1)
ffc13cd0: 7c 79 f2 14 add r3,r25,r30
ffc13cd4: 7f a5 eb 78 mr r5,r29
ffc13cd8: 7c 84 da 14 add r4,r4,r27
ffc13cdc: 48 00 90 ed bl ffc1cdc8 <memcpy>
count -= c;
ffc13ce0: 7f fd f8 50 subf r31,r29,r31
cmpltd += c;
ffc13ce4: 7f dd f2 14 add r30,r29,r30
sec_num++;
ffc13ce8: 3b 9c 00 01 addi r28,r28,1
ofs = 0;
ffc13cec: 3b 60 00 00 li r27,0
uint32_t sec_num = start;
uint32_t ofs = offset;
uint8_t *sec_buf;
uint32_t c = 0;
while (count > 0)
ffc13cf0: 2f 9f 00 00 cmpwi cr7,r31,0
ffc13cf4: 40 9e ff a8 bne+ cr7,ffc13c9c <_fat_block_read+0x2c>
ffc13cf8: 48 00 00 08 b ffc13d00 <_fat_block_read+0x90>
{
rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf);
if (rc != RC_OK)
return -1;
ffc13cfc: 3b c0 ff ff li r30,-1 <== NOT EXECUTED
cmpltd += c;
sec_num++;
ofs = 0;
}
return cmpltd;
}
ffc13d00: 39 61 00 38 addi r11,r1,56
ffc13d04: 7f c3 f3 78 mr r3,r30
ffc13d08: 4b fe d8 dc b ffc015e4 <_restgpr_25_x>
ffc0523c <_lstat_r>:
struct _reent *ptr __attribute__((unused)),
const char *path,
struct stat *buf
)
{
return _STAT_NAME( path, buf );
ffc0523c: 7c 83 23 78 mr r3,r4 <== NOT EXECUTED
ffc05240: 7c a4 2b 78 mr r4,r5 <== NOT EXECUTED
ffc05244: 4b ff ff 8c b ffc051d0 <lstat> <== NOT EXECUTED
ffc05514 <_stat_r>:
struct _reent *ptr __attribute__((unused)),
const char *path,
struct stat *buf
)
{
return _STAT_NAME( path, buf );
ffc05514: 7c 83 23 78 mr r3,r4 <== NOT EXECUTED
ffc05518: 7c a4 2b 78 mr r4,r5 <== NOT EXECUTED
ffc0551c: 4b ff ff 8c b ffc054a8 <stat> <== NOT EXECUTED
ffc086b4 <aio_cancel>:
#include <stdlib.h>
#include <rtems/system.h>
#include <rtems/seterr.h>
int aio_cancel(int fildes, struct aiocb *aiocbp)
{
ffc086b4: 94 21 ff e0 stwu r1,-32(r1)
ffc086b8: 7c 08 02 a6 mflr r0
ffc086bc: bf 61 00 0c stmw r27,12(r1)
rtems_aio_request_chain *r_chain;
int result;
pthread_mutex_lock (&aio_request_queue.mutex);
ffc086c0: 3f e0 00 00 lis r31,0
ffc086c4: 3b ff 2b b0 addi r31,r31,11184
#include <stdlib.h>
#include <rtems/system.h>
#include <rtems/seterr.h>
int aio_cancel(int fildes, struct aiocb *aiocbp)
{
ffc086c8: 7c 7d 1b 78 mr r29,r3
ffc086cc: 90 01 00 24 stw r0,36(r1)
rtems_aio_request_chain *r_chain;
int result;
pthread_mutex_lock (&aio_request_queue.mutex);
ffc086d0: 7f e3 fb 78 mr r3,r31
#include <stdlib.h>
#include <rtems/system.h>
#include <rtems/seterr.h>
int aio_cancel(int fildes, struct aiocb *aiocbp)
{
ffc086d4: 7c 9e 23 78 mr r30,r4
rtems_aio_request_chain *r_chain;
int result;
pthread_mutex_lock (&aio_request_queue.mutex);
ffc086d8: 48 00 12 59 bl ffc09930 <pthread_mutex_lock>
if (fcntl (fildes, F_GETFD) < 0) {
ffc086dc: 7f a3 eb 78 mr r3,r29
ffc086e0: 38 80 00 01 li r4,1
ffc086e4: 4c c6 31 82 crclr 4*cr1+eq
ffc086e8: 48 00 6a 1d bl ffc0f104 <fcntl>
ffc086ec: 2f 83 00 00 cmpwi cr7,r3,0
ffc086f0: 40 bc 00 18 bge+ cr7,ffc08708 <aio_cancel+0x54>
pthread_mutex_unlock(&aio_request_queue.mutex);
ffc086f4: 7f e3 fb 78 mr r3,r31
ffc086f8: 48 00 12 c5 bl ffc099bc <pthread_mutex_unlock>
rtems_set_errno_and_return_minus_one (EBADF);
ffc086fc: 48 00 a0 35 bl ffc12730 <__errno>
ffc08700: 39 20 00 09 li r9,9
ffc08704: 48 00 01 20 b ffc08824 <aio_cancel+0x170>
}
/* if aiocbp is NULL remove all request for given file descriptor */
if (aiocbp == NULL) {
ffc08708: 2f 9e 00 00 cmpwi cr7,r30,0
ffc0870c: 40 be 00 b8 bne+ cr7,ffc087c4 <aio_cancel+0x110>
AIO_printf ("Cancel all requests\n");
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0);
ffc08710: 38 7f 00 48 addi r3,r31,72
ffc08714: 7f a4 eb 78 mr r4,r29
ffc08718: 38 a0 00 00 li r5,0
ffc0871c: 48 00 05 ad bl ffc08cc8 <rtems_aio_search_fd>
if (r_chain == NULL) {
ffc08720: 7c 7e 1b 79 mr. r30,r3
ffc08724: 40 a2 00 6c bne+ ffc08790 <aio_cancel+0xdc>
AIO_printf ("Request chain not on [WQ]\n");
if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) {
ffc08728: 81 3f 00 54 lwz r9,84(r31)
ffc0872c: 39 5f 00 58 addi r10,r31,88
ffc08730: 7f 89 50 00 cmpw cr7,r9,r10
ffc08734: 41 9e 00 1c beq- cr7,ffc08750 <aio_cancel+0x9c> <== NEVER TAKEN
r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0);
ffc08738: 38 7f 00 54 addi r3,r31,84
ffc0873c: 7f a4 eb 78 mr r4,r29
ffc08740: 38 a0 00 00 li r5,0
ffc08744: 48 00 05 85 bl ffc08cc8 <rtems_aio_search_fd>
if (r_chain == NULL) {
ffc08748: 7c 7e 1b 79 mr. r30,r3
ffc0874c: 40 a2 00 18 bne+ ffc08764 <aio_cancel+0xb0>
pthread_mutex_unlock(&aio_request_queue.mutex);
ffc08750: 3c 60 00 00 lis r3,0
ffc08754: 38 63 2b b0 addi r3,r3,11184
ffc08758: 48 00 12 65 bl ffc099bc <pthread_mutex_unlock>
return AIO_ALLDONE;
ffc0875c: 3b c0 00 02 li r30,2
ffc08760: 48 00 01 10 b ffc08870 <aio_cancel+0x1bc>
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
ffc08764: 48 00 2c d9 bl ffc0b43c <_Chain_Extract>
AIO_printf ("Request chain on [IQ]\n");
rtems_chain_extract (&r_chain->next_fd);
rtems_aio_remove_fd (r_chain);
pthread_mutex_destroy (&r_chain->mutex);
ffc08768: 3b be 00 1c addi r29,r30,28
}
AIO_printf ("Request chain on [IQ]\n");
rtems_chain_extract (&r_chain->next_fd);
rtems_aio_remove_fd (r_chain);
ffc0876c: 7f c3 f3 78 mr r3,r30
ffc08770: 48 00 06 19 bl ffc08d88 <rtems_aio_remove_fd>
pthread_mutex_destroy (&r_chain->mutex);
ffc08774: 7f a3 eb 78 mr r3,r29
ffc08778: 48 00 0e d9 bl ffc09650 <pthread_mutex_destroy>
pthread_cond_destroy (&r_chain->mutex);
ffc0877c: 7f a3 eb 78 mr r3,r29
ffc08780: 48 00 0b 19 bl ffc09298 <pthread_cond_destroy>
free (r_chain);
ffc08784: 7f c3 f3 78 mr r3,r30
ffc08788: 4b ff c1 21 bl ffc048a8 <free>
ffc0878c: 48 00 00 28 b ffc087b4 <aio_cancel+0x100>
return AIO_ALLDONE;
}
AIO_printf ("Request chain on [WQ]\n");
pthread_mutex_lock (&r_chain->mutex);
ffc08790: 3b be 00 1c addi r29,r30,28
ffc08794: 7f a3 eb 78 mr r3,r29
ffc08798: 48 00 11 99 bl ffc09930 <pthread_mutex_lock>
ffc0879c: 7f c3 f3 78 mr r3,r30
ffc087a0: 48 00 2c 9d bl ffc0b43c <_Chain_Extract>
rtems_chain_extract (&r_chain->next_fd);
rtems_aio_remove_fd (r_chain);
ffc087a4: 7f c3 f3 78 mr r3,r30
ffc087a8: 48 00 05 e1 bl ffc08d88 <rtems_aio_remove_fd>
pthread_mutex_unlock (&r_chain->mutex);
ffc087ac: 7f a3 eb 78 mr r3,r29
ffc087b0: 48 00 12 0d bl ffc099bc <pthread_mutex_unlock>
pthread_mutex_unlock (&aio_request_queue.mutex);
ffc087b4: 7f e3 fb 78 mr r3,r31
ffc087b8: 48 00 12 05 bl ffc099bc <pthread_mutex_unlock>
return AIO_CANCELED;
ffc087bc: 3b c0 00 00 li r30,0
ffc087c0: 48 00 00 b0 b ffc08870 <aio_cancel+0x1bc>
} else {
AIO_printf ("Cancel request\n");
if (aiocbp->aio_fildes != fildes) {
ffc087c4: 83 9e 00 00 lwz r28,0(r30)
ffc087c8: 7f 9c e8 00 cmpw cr7,r28,r29
ffc087cc: 41 be 00 08 beq+ cr7,ffc087d4 <aio_cancel+0x120>
ffc087d0: 48 00 00 44 b ffc08814 <aio_cancel+0x160>
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);
ffc087d4: 38 7f 00 48 addi r3,r31,72
ffc087d8: 7f 84 e3 78 mr r4,r28
ffc087dc: 38 a0 00 00 li r5,0
ffc087e0: 48 00 04 e9 bl ffc08cc8 <rtems_aio_search_fd>
if (r_chain == NULL) {
ffc087e4: 7c 7b 1b 79 mr. r27,r3
ffc087e8: 40 a2 00 5c bne+ ffc08844 <aio_cancel+0x190>
if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) {
ffc087ec: 81 3f 00 54 lwz r9,84(r31)
ffc087f0: 39 5f 00 58 addi r10,r31,88
ffc087f4: 7f 89 50 00 cmpw cr7,r9,r10
ffc087f8: 41 be ff 58 beq- cr7,ffc08750 <aio_cancel+0x9c> <== NEVER TAKEN
r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0);
ffc087fc: 38 7f 00 54 addi r3,r31,84
ffc08800: 7f 84 e3 78 mr r4,r28
ffc08804: 38 a0 00 00 li r5,0
ffc08808: 48 00 04 c1 bl ffc08cc8 <rtems_aio_search_fd>
if (r_chain == NULL) {
ffc0880c: 2c 03 00 00 cmpwi r3,0
ffc08810: 40 a2 00 20 bne+ ffc08830 <aio_cancel+0x17c>
pthread_mutex_unlock (&aio_request_queue.mutex);
ffc08814: 7f e3 fb 78 mr r3,r31
ffc08818: 48 00 11 a5 bl ffc099bc <pthread_mutex_unlock>
rtems_set_errno_and_return_minus_one (EINVAL);
ffc0881c: 48 00 9f 15 bl ffc12730 <__errno>
ffc08820: 39 20 00 16 li r9,22
ffc08824: 91 23 00 00 stw r9,0(r3)
ffc08828: 3b c0 ff ff li r30,-1
ffc0882c: 48 00 00 44 b ffc08870 <aio_cancel+0x1bc>
}
AIO_printf ("Request on [IQ]\n");
result = rtems_aio_remove_req (&r_chain->perfd, aiocbp);
ffc08830: 7f c4 f3 78 mr r4,r30
ffc08834: 38 63 00 08 addi r3,r3,8
ffc08838: 48 00 05 a9 bl ffc08de0 <rtems_aio_remove_req>
ffc0883c: 7c 7e 1b 78 mr r30,r3
ffc08840: 48 00 00 28 b ffc08868 <aio_cancel+0x1b4>
return AIO_ALLDONE;
}
}
AIO_printf ("Request on [WQ]\n");
pthread_mutex_lock (&r_chain->mutex);
ffc08844: 3b bb 00 1c addi r29,r27,28
ffc08848: 7f a3 eb 78 mr r3,r29
ffc0884c: 48 00 10 e5 bl ffc09930 <pthread_mutex_lock>
result = rtems_aio_remove_req (&r_chain->perfd, aiocbp);
ffc08850: 7f c4 f3 78 mr r4,r30
ffc08854: 38 7b 00 08 addi r3,r27,8
ffc08858: 48 00 05 89 bl ffc08de0 <rtems_aio_remove_req>
ffc0885c: 7c 7e 1b 78 mr r30,r3
pthread_mutex_unlock (&r_chain->mutex);
ffc08860: 7f a3 eb 78 mr r3,r29
ffc08864: 48 00 11 59 bl ffc099bc <pthread_mutex_unlock>
pthread_mutex_unlock (&aio_request_queue.mutex);
ffc08868: 7f e3 fb 78 mr r3,r31
ffc0886c: 48 00 11 51 bl ffc099bc <pthread_mutex_unlock>
return result;
}
return AIO_ALLDONE;
}
ffc08870: 39 61 00 20 addi r11,r1,32
ffc08874: 7f c3 f3 78 mr r3,r30
ffc08878: 4b ff 83 00 b ffc00b78 <_restgpr_27_x>
ffc08884 <aio_fsync>:
)
{
rtems_aio_request *req;
int mode;
if (op != O_SYNC)
ffc08884: 2f 83 20 00 cmpwi cr7,r3,8192
int aio_fsync(
int op,
struct aiocb *aiocbp
)
{
ffc08888: 94 21 ff f0 stwu r1,-16(r1)
ffc0888c: 7c 08 02 a6 mflr r0
ffc08890: bf c1 00 08 stmw r30,8(r1)
ffc08894: 7c 9f 23 78 mr r31,r4
rtems_aio_request *req;
int mode;
if (op != O_SYNC)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
ffc08898: 3b c0 00 16 li r30,22
int aio_fsync(
int op,
struct aiocb *aiocbp
)
{
ffc0889c: 90 01 00 14 stw r0,20(r1)
rtems_aio_request *req;
int mode;
if (op != O_SYNC)
ffc088a0: 40 9e 00 3c bne- cr7,ffc088dc <aio_fsync+0x58>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
ffc088a4: 80 64 00 00 lwz r3,0(r4)
ffc088a8: 38 80 00 03 li r4,3
if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR)))
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
ffc088ac: 3b c0 00 09 li r30,9
int mode;
if (op != O_SYNC)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
ffc088b0: 4c c6 31 82 crclr 4*cr1+eq
ffc088b4: 48 00 68 51 bl ffc0f104 <fcntl>
if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR)))
ffc088b8: 54 63 07 be clrlwi r3,r3,30
ffc088bc: 38 63 ff ff addi r3,r3,-1
ffc088c0: 2b 83 00 01 cmplwi cr7,r3,1
ffc088c4: 41 9d 00 18 bgt- cr7,ffc088dc <aio_fsync+0x58>
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
req = malloc (sizeof (rtems_aio_request));
ffc088c8: 38 60 00 18 li r3,24
ffc088cc: 4b ff c4 dd bl ffc04da8 <malloc>
if (req == NULL)
ffc088d0: 7c 69 1b 79 mr. r9,r3
ffc088d4: 40 a2 00 20 bne+ ffc088f4 <aio_fsync+0x70> <== ALWAYS TAKEN
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
ffc088d8: 3b c0 00 0b li r30,11 <== NOT EXECUTED
ffc088dc: 39 20 ff ff li r9,-1
ffc088e0: 93 df 00 34 stw r30,52(r31)
ffc088e4: 91 3f 00 38 stw r9,56(r31)
ffc088e8: 48 00 9e 49 bl ffc12730 <__errno>
ffc088ec: 93 c3 00 00 stw r30,0(r3)
ffc088f0: 48 00 00 24 b ffc08914 <aio_fsync+0x90>
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_SYNC;
return rtems_aio_enqueue (req);
}
ffc088f4: 80 01 00 14 lwz r0,20(r1)
req = malloc (sizeof (rtems_aio_request));
if (req == NULL)
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
ffc088f8: 93 e9 00 14 stw r31,20(r9)
req->aiocbp->aio_lio_opcode = LIO_SYNC;
ffc088fc: 39 20 00 03 li r9,3
return rtems_aio_enqueue (req);
}
ffc08900: 7c 08 03 a6 mtlr r0
req = malloc (sizeof (rtems_aio_request));
if (req == NULL)
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_SYNC;
ffc08904: 91 3f 00 30 stw r9,48(r31)
return rtems_aio_enqueue (req);
}
ffc08908: bb c1 00 08 lmw r30,8(r1)
ffc0890c: 38 21 00 10 addi r1,r1,16
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_SYNC;
return rtems_aio_enqueue (req);
ffc08910: 48 00 05 5c b ffc08e6c <rtems_aio_enqueue>
}
ffc08914: 39 61 00 10 addi r11,r1,16
ffc08918: 38 60 ff ff li r3,-1
ffc0891c: 4b ff 82 68 b ffc00b84 <_restgpr_30_x>
ffc09064 <aio_read>:
* 0 - otherwise
*/
int
aio_read (struct aiocb *aiocbp)
{
ffc09064: 94 21 ff f0 stwu r1,-16(r1)
ffc09068: 7c 08 02 a6 mflr r0
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
ffc0906c: 38 80 00 03 li r4,3
* 0 - otherwise
*/
int
aio_read (struct aiocb *aiocbp)
{
ffc09070: 90 01 00 14 stw r0,20(r1)
ffc09074: bf c1 00 08 stmw r30,8(r1)
ffc09078: 7c 7f 1b 78 mr r31,r3
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
ffc0907c: 80 63 00 00 lwz r3,0(r3)
ffc09080: 4c c6 31 82 crclr 4*cr1+eq
ffc09084: 48 00 60 81 bl ffc0f104 <fcntl>
if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR)))
ffc09088: 70 63 00 03 andi. r3,r3,3
ffc0908c: 41 82 00 10 beq- ffc0909c <aio_read+0x38> <== NEVER TAKEN
ffc09090: 2f 83 00 02 cmpwi cr7,r3,2
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
ffc09094: 3b c0 00 09 li r30,9
{
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR)))
ffc09098: 40 9e 00 3c bne- cr7,ffc090d4 <aio_read+0x70>
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX)
ffc0909c: 81 3f 00 18 lwz r9,24(r31)
ffc090a0: 2f 89 00 00 cmpwi cr7,r9,0
ffc090a4: 41 be 00 08 beq+ cr7,ffc090ac <aio_read+0x48>
ffc090a8: 48 00 00 10 b ffc090b8 <aio_read+0x54>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
if (aiocbp->aio_offset < 0)
ffc090ac: 81 3f 00 08 lwz r9,8(r31)
ffc090b0: 2f 89 00 00 cmpwi cr7,r9,0
ffc090b4: 40 9c 00 0c bge- cr7,ffc090c0 <aio_read+0x5c>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
ffc090b8: 3b c0 00 16 li r30,22
ffc090bc: 48 00 00 18 b ffc090d4 <aio_read+0x70>
req = malloc (sizeof (rtems_aio_request));
ffc090c0: 38 60 00 18 li r3,24
ffc090c4: 4b ff bc e5 bl ffc04da8 <malloc>
if (req == NULL)
ffc090c8: 7c 69 1b 79 mr. r9,r3
ffc090cc: 40 a2 00 20 bne+ ffc090ec <aio_read+0x88> <== ALWAYS TAKEN
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
ffc090d0: 3b c0 00 0b li r30,11 <== NOT EXECUTED
ffc090d4: 39 20 ff ff li r9,-1
ffc090d8: 93 df 00 34 stw r30,52(r31)
ffc090dc: 91 3f 00 38 stw r9,56(r31)
ffc090e0: 48 00 96 51 bl ffc12730 <__errno>
ffc090e4: 93 c3 00 00 stw r30,0(r3)
ffc090e8: 48 00 00 24 b ffc0910c <aio_read+0xa8>
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_READ;
return rtems_aio_enqueue (req);
}
ffc090ec: 80 01 00 14 lwz r0,20(r1)
req = malloc (sizeof (rtems_aio_request));
if (req == NULL)
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
ffc090f0: 93 e9 00 14 stw r31,20(r9)
req->aiocbp->aio_lio_opcode = LIO_READ;
ffc090f4: 39 20 00 01 li r9,1
return rtems_aio_enqueue (req);
}
ffc090f8: 7c 08 03 a6 mtlr r0
req = malloc (sizeof (rtems_aio_request));
if (req == NULL)
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_READ;
ffc090fc: 91 3f 00 30 stw r9,48(r31)
return rtems_aio_enqueue (req);
}
ffc09100: bb c1 00 08 lmw r30,8(r1)
ffc09104: 38 21 00 10 addi r1,r1,16
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_READ;
return rtems_aio_enqueue (req);
ffc09108: 4b ff fd 64 b ffc08e6c <rtems_aio_enqueue>
}
ffc0910c: 39 61 00 10 addi r11,r1,16
ffc09110: 38 60 ff ff li r3,-1
ffc09114: 4b ff 7a 70 b ffc00b84 <_restgpr_30_x>
ffc09120 <aio_write>:
* 0 - otherwise
*/
int
aio_write (struct aiocb *aiocbp)
{
ffc09120: 94 21 ff f0 stwu r1,-16(r1)
ffc09124: 7c 08 02 a6 mflr r0
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
ffc09128: 38 80 00 03 li r4,3
* 0 - otherwise
*/
int
aio_write (struct aiocb *aiocbp)
{
ffc0912c: 90 01 00 14 stw r0,20(r1)
ffc09130: bf c1 00 08 stmw r30,8(r1)
ffc09134: 7c 7f 1b 78 mr r31,r3
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR)))
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
ffc09138: 3b c0 00 09 li r30,9
aio_write (struct aiocb *aiocbp)
{
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
ffc0913c: 80 63 00 00 lwz r3,0(r3)
ffc09140: 4c c6 31 82 crclr 4*cr1+eq
ffc09144: 48 00 5f c1 bl ffc0f104 <fcntl>
if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR)))
ffc09148: 54 63 07 be clrlwi r3,r3,30
ffc0914c: 38 63 ff ff addi r3,r3,-1
ffc09150: 2b 83 00 01 cmplwi cr7,r3,1
ffc09154: 41 9d 00 3c bgt- cr7,ffc09190 <aio_write+0x70>
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX)
ffc09158: 81 3f 00 18 lwz r9,24(r31)
ffc0915c: 2f 89 00 00 cmpwi cr7,r9,0
ffc09160: 41 be 00 08 beq+ cr7,ffc09168 <aio_write+0x48>
ffc09164: 48 00 00 10 b ffc09174 <aio_write+0x54>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
if (aiocbp->aio_offset < 0)
ffc09168: 81 3f 00 08 lwz r9,8(r31)
ffc0916c: 2f 89 00 00 cmpwi cr7,r9,0
ffc09170: 40 9c 00 0c bge- cr7,ffc0917c <aio_write+0x5c>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
ffc09174: 3b c0 00 16 li r30,22
ffc09178: 48 00 00 18 b ffc09190 <aio_write+0x70>
req = malloc (sizeof (rtems_aio_request));
ffc0917c: 38 60 00 18 li r3,24
ffc09180: 4b ff bc 29 bl ffc04da8 <malloc>
if (req == NULL)
ffc09184: 7c 69 1b 79 mr. r9,r3
ffc09188: 40 a2 00 20 bne+ ffc091a8 <aio_write+0x88> <== ALWAYS TAKEN
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
ffc0918c: 3b c0 00 0b li r30,11 <== NOT EXECUTED
ffc09190: 39 20 ff ff li r9,-1
ffc09194: 93 df 00 34 stw r30,52(r31)
ffc09198: 91 3f 00 38 stw r9,56(r31)
ffc0919c: 48 00 95 95 bl ffc12730 <__errno>
ffc091a0: 93 c3 00 00 stw r30,0(r3)
ffc091a4: 48 00 00 24 b ffc091c8 <aio_write+0xa8>
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_WRITE;
return rtems_aio_enqueue (req);
}
ffc091a8: 80 01 00 14 lwz r0,20(r1)
req = malloc (sizeof (rtems_aio_request));
if (req == NULL)
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
ffc091ac: 93 e9 00 14 stw r31,20(r9)
req->aiocbp->aio_lio_opcode = LIO_WRITE;
ffc091b0: 39 20 00 02 li r9,2
return rtems_aio_enqueue (req);
}
ffc091b4: 7c 08 03 a6 mtlr r0
req = malloc (sizeof (rtems_aio_request));
if (req == NULL)
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_WRITE;
ffc091b8: 91 3f 00 30 stw r9,48(r31)
return rtems_aio_enqueue (req);
}
ffc091bc: bb c1 00 08 lmw r30,8(r1)
ffc091c0: 38 21 00 10 addi r1,r1,16
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_WRITE;
return rtems_aio_enqueue (req);
ffc091c4: 4b ff fc a8 b ffc08e6c <rtems_aio_enqueue>
}
ffc091c8: 39 61 00 10 addi r11,r1,16
ffc091cc: 38 60 ff ff li r3,-1
ffc091d0: 4b ff 79 b4 b ffc00b84 <_restgpr_30_x>
ffc04dec <chroot>:
#include <unistd.h>
#include <rtems/libio_.h>
int chroot( const char *path )
{
ffc04dec: 94 21 ff 90 stwu r1,-112(r1)
/*
* 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(
ffc04df0: 3c c0 00 00 lis r6,0
#include <unistd.h>
#include <rtems/libio_.h>
int chroot( const char *path )
{
ffc04df4: 7c 08 02 a6 mflr r0
/*
* 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(
ffc04df8: 38 c6 21 3c addi r6,r6,8508
#include <unistd.h>
#include <rtems/libio_.h>
int chroot( const char *path )
{
ffc04dfc: 7c 64 1b 78 mr r4,r3
ffc04e00: bf c1 00 68 stmw r30,104(r1)
/*
* 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(
ffc04e04: 38 a0 00 19 li r5,25
ffc04e08: 38 e6 ff fc addi r7,r6,-4
#include <unistd.h>
#include <rtems/libio_.h>
int chroot( const char *path )
{
ffc04e0c: 90 01 00 74 stw r0,116(r1)
/*
* 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(
ffc04e10: 38 61 00 08 addi r3,r1,8
ffc04e14: 48 00 15 51 bl ffc06364 <rtems_filesystem_eval_path_start_with_root_and_current>
ffc04e18: 38 61 00 40 addi r3,r1,64
ffc04e1c: 38 81 00 20 addi r4,r1,32
ffc04e20: 48 00 1b 45 bl ffc06964 <rtems_filesystem_location_copy_and_detach>
&rtems_global_user_env.root_directory,
&rtems_global_user_env.current_directory
);
rtems_filesystem_eval_path_extract_currentloc( &ctx, &loc );
new_current_loc = rtems_filesystem_location_transform_to_global( &loc );
ffc04e24: 38 61 00 40 addi r3,r1,64
ffc04e28: 48 00 1d 65 bl ffc06b8c <rtems_filesystem_location_transform_to_global>
if ( !rtems_filesystem_global_location_is_null( new_current_loc ) ) {
ffc04e2c: 3f c0 ff c1 lis r30,-63
ffc04e30: 81 23 00 10 lwz r9,16(r3)
ffc04e34: 3b de 3b c0 addi r30,r30,15296
&rtems_global_user_env.root_directory,
&rtems_global_user_env.current_directory
);
rtems_filesystem_eval_path_extract_currentloc( &ctx, &loc );
new_current_loc = rtems_filesystem_location_transform_to_global( &loc );
ffc04e38: 90 61 00 58 stw r3,88(r1)
if ( !rtems_filesystem_global_location_is_null( new_current_loc ) ) {
ffc04e3c: 7f 89 f0 00 cmpw cr7,r9,r30
ffc04e40: 41 9e 00 90 beq- cr7,ffc04ed0 <chroot+0xe4>
rtems_filesystem_global_location_t *new_root_loc =
ffc04e44: 38 61 00 58 addi r3,r1,88
ffc04e48: 48 00 1c 79 bl ffc06ac0 <rtems_filesystem_global_location_obtain>
rtems_filesystem_global_location_obtain( &new_current_loc );
rtems_filesystem_node_types_t type =
(*new_root_loc->location.mt_entry->ops->node_type_h)(
ffc04e4c: 81 23 00 14 lwz r9,20(r3)
);
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 =
ffc04e50: 7c 7f 1b 78 mr r31,r3
rtems_filesystem_global_location_obtain( &new_current_loc );
rtems_filesystem_node_types_t type =
(*new_root_loc->location.mt_entry->ops->node_type_h)(
ffc04e54: 81 29 00 0c lwz r9,12(r9)
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 =
ffc04e58: 81 29 00 14 lwz r9,20(r9)
ffc04e5c: 7d 29 03 a6 mtctr r9
ffc04e60: 4e 80 04 21 bctrl
(*new_root_loc->location.mt_entry->ops->node_type_h)(
&new_root_loc->location
);
if ( type == RTEMS_FILESYSTEM_DIRECTORY ) {
ffc04e64: 2f 83 00 00 cmpwi cr7,r3,0
ffc04e68: 40 9e 00 4c bne- cr7,ffc04eb4 <chroot+0xc8>
sc = rtems_libio_set_private_env();
ffc04e6c: 48 00 0d 81 bl ffc05bec <rtems_libio_set_private_env>
if (sc == RTEMS_SUCCESSFUL) {
ffc04e70: 2c 03 00 00 cmpwi r3,0
ffc04e74: 40 a2 00 2c bne+ ffc04ea0 <chroot+0xb4>
rtems_filesystem_global_location_assign(
ffc04e78: 3f c0 00 00 lis r30,0
ffc04e7c: 80 7e 27 68 lwz r3,10088(r30)
ffc04e80: 7f e4 fb 78 mr r4,r31
&rtems_filesystem_root,
new_root_loc
);
rtems_filesystem_global_location_assign(
ffc04e84: 3b e0 00 00 li r31,0
);
if ( type == RTEMS_FILESYSTEM_DIRECTORY ) {
sc = rtems_libio_set_private_env();
if (sc == RTEMS_SUCCESSFUL) {
rtems_filesystem_global_location_assign(
ffc04e88: 38 63 00 04 addi r3,r3,4
ffc04e8c: 48 00 1b f5 bl ffc06a80 <rtems_filesystem_global_location_assign>
&rtems_filesystem_root,
new_root_loc
);
rtems_filesystem_global_location_assign(
ffc04e90: 80 7e 27 68 lwz r3,10088(r30)
ffc04e94: 80 81 00 58 lwz r4,88(r1)
ffc04e98: 48 00 1b e9 bl ffc06a80 <rtems_filesystem_global_location_assign>
ffc04e9c: 48 00 00 38 b ffc04ed4 <chroot+0xe8>
&rtems_filesystem_current,
new_current_loc
);
} else {
if (sc != RTEMS_UNSATISFIED) {
ffc04ea0: 2f 83 00 0d cmpwi cr7,r3,13
ffc04ea4: 41 9e 00 4c beq- cr7,ffc04ef0 <chroot+0x104> <== NEVER TAKEN
errno = ENOMEM;
ffc04ea8: 48 00 83 05 bl ffc0d1ac <__errno>
ffc04eac: 39 20 00 0c li r9,12
ffc04eb0: 48 00 00 18 b ffc04ec8 <chroot+0xdc>
static inline void rtems_filesystem_location_error(
const rtems_filesystem_location_info_t *loc,
int eno
)
{
if ( !rtems_filesystem_location_is_null( loc ) ) {
ffc04eb4: 81 3f 00 10 lwz r9,16(r31)
ffc04eb8: 7f 89 f0 00 cmpw cr7,r9,r30
ffc04ebc: 41 9e 00 34 beq- cr7,ffc04ef0 <chroot+0x104> <== NEVER TAKEN
errno = eno;
ffc04ec0: 48 00 82 ed bl ffc0d1ac <__errno>
ffc04ec4: 39 20 00 14 li r9,20
ffc04ec8: 91 23 00 00 stw r9,0(r3)
ffc04ecc: 48 00 00 24 b ffc04ef0 <chroot+0x104>
if ( rv != 0 ) {
rtems_filesystem_global_location_release( new_root_loc );
}
} else {
rv = -1;
ffc04ed0: 3b e0 ff ff li r31,-1
}
rtems_filesystem_eval_path_cleanup( &ctx );
ffc04ed4: 38 61 00 08 addi r3,r1,8
ffc04ed8: 48 00 16 0d bl ffc064e4 <rtems_filesystem_eval_path_cleanup>
if ( rv != 0 ) {
ffc04edc: 2f 9f 00 00 cmpwi cr7,r31,0
ffc04ee0: 41 be 00 1c beq+ cr7,ffc04efc <chroot+0x110>
rtems_filesystem_global_location_release( new_current_loc );
ffc04ee4: 80 61 00 58 lwz r3,88(r1)
ffc04ee8: 48 00 1b 41 bl ffc06a28 <rtems_filesystem_global_location_release>
ffc04eec: 48 00 00 10 b ffc04efc <chroot+0x110>
rtems_filesystem_location_error( &new_root_loc->location, ENOTDIR );
rv = -1;
}
if ( rv != 0 ) {
rtems_filesystem_global_location_release( new_root_loc );
ffc04ef0: 7f e3 fb 78 mr r3,r31
ffc04ef4: 48 00 1b 35 bl ffc06a28 <rtems_filesystem_global_location_release>
ffc04ef8: 4b ff ff d8 b ffc04ed0 <chroot+0xe4>
if ( rv != 0 ) {
rtems_filesystem_global_location_release( new_current_loc );
}
return rv;
}
ffc04efc: 39 61 00 70 addi r11,r1,112
ffc04f00: 7f e3 fb 78 mr r3,r31
ffc04f04: 48 00 c7 14 b ffc11618 <_restgpr_30_x>
ffc081e8 <clock_gettime>:
int clock_gettime(
clockid_t clock_id,
struct timespec *tp
)
{
ffc081e8: 94 21 ff d8 stwu r1,-40(r1)
ffc081ec: 7c 08 02 a6 mflr r0
ffc081f0: bf a1 00 1c stmw r29,28(r1)
if ( !tp )
ffc081f4: 7c 9d 23 79 mr. r29,r4
int clock_gettime(
clockid_t clock_id,
struct timespec *tp
)
{
ffc081f8: 90 01 00 2c stw r0,44(r1)
if ( !tp )
ffc081fc: 40 a2 00 08 bne+ ffc08204 <clock_gettime+0x1c>
ffc08200: 48 00 00 94 b ffc08294 <clock_gettime+0xac>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
ffc08204: 2f 83 00 01 cmpwi cr7,r3,1
ffc08208: 40 be 00 58 bne+ cr7,ffc08260 <clock_gettime+0x78>
)
{
Timestamp_Control tod_as_timestamp;
Timestamp_Control *tod_as_timestamp_ptr;
tod_as_timestamp_ptr =
ffc0820c: 3c 80 00 00 lis r4,0
ffc08210: 38 84 2c a0 addi r4,r4,11424
ffc08214: 38 61 00 08 addi r3,r1,8
ffc08218: 48 00 20 d1 bl ffc0a2e8 <_TOD_Get_with_nanoseconds>
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
ffc0821c: 3c c0 3b 9a lis r6,15258
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
ffc08220: 83 e3 00 04 lwz r31,4(r3)
ffc08224: 38 a0 00 00 li r5,0
ffc08228: 83 c3 00 00 lwz r30,0(r3)
ffc0822c: 60 c6 ca 00 ori r6,r6,51712
ffc08230: 7f e4 fb 78 mr r4,r31
ffc08234: 7f c3 f3 78 mr r3,r30
ffc08238: 48 00 f8 a9 bl ffc17ae0 <__divdi3>
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
ffc0823c: 3c c0 3b 9a lis r6,15258
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
ffc08240: 90 9d 00 00 stw r4,0(r29)
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
ffc08244: 7f c3 f3 78 mr r3,r30
ffc08248: 7f e4 fb 78 mr r4,r31
ffc0824c: 38 a0 00 00 li r5,0
ffc08250: 60 c6 ca 00 ori r6,r6,51712
ffc08254: 48 00 fc b1 bl ffc17f04 <__moddi3>
ffc08258: 90 9d 00 04 stw r4,4(r29)
ffc0825c: 48 00 00 14 b ffc08270 <clock_gettime+0x88>
if ( clock_id == CLOCK_REALTIME ) {
_TOD_Get(tp);
return 0;
}
#ifdef CLOCK_MONOTONIC
if ( clock_id == CLOCK_MONOTONIC ) {
ffc08260: 2f 83 00 04 cmpwi cr7,r3,4
ffc08264: 40 be 00 14 bne+ cr7,ffc08278 <clock_gettime+0x90> <== ALWAYS TAKEN
_TOD_Get_uptime_as_timespec( tp );
ffc08268: 7f a3 eb 78 mr r3,r29
ffc0826c: 48 00 20 e5 bl ffc0a350 <_TOD_Get_uptime_as_timespec>
return 0;
ffc08270: 38 60 00 00 li r3,0
ffc08274: 48 00 00 30 b ffc082a4 <clock_gettime+0xbc>
}
#endif
#ifdef _POSIX_CPUTIME
if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) {
ffc08278: 2f 83 00 02 cmpwi cr7,r3,2
ffc0827c: 41 be ff ec beq- cr7,ffc08268 <clock_gettime+0x80>
return 0;
}
#endif
#ifdef _POSIX_THREAD_CPUTIME
if ( clock_id == CLOCK_THREAD_CPUTIME_ID )
ffc08280: 2f 83 00 03 cmpwi cr7,r3,3
ffc08284: 40 be 00 10 bne+ cr7,ffc08294 <clock_gettime+0xac>
rtems_set_errno_and_return_minus_one( ENOSYS );
ffc08288: 48 00 8f 49 bl ffc111d0 <__errno>
ffc0828c: 39 20 00 58 li r9,88
ffc08290: 48 00 00 0c b ffc0829c <clock_gettime+0xb4>
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
ffc08294: 48 00 8f 3d bl ffc111d0 <__errno>
ffc08298: 39 20 00 16 li r9,22
ffc0829c: 91 23 00 00 stw r9,0(r3)
ffc082a0: 38 60 ff ff li r3,-1
return 0;
}
ffc082a4: 39 61 00 28 addi r11,r1,40
ffc082a8: 4b ff 86 e8 b ffc00990 <_restgpr_29_x>
ffc26f24 <clock_settime>:
int clock_settime(
clockid_t clock_id,
const struct timespec *tp
)
{
if ( !tp )
ffc26f24: 2c 04 00 00 cmpwi r4,0
int clock_settime(
clockid_t clock_id,
const struct timespec *tp
)
{
ffc26f28: 94 21 ff e8 stwu r1,-24(r1)
ffc26f2c: 7c 08 02 a6 mflr r0
ffc26f30: 90 01 00 1c stw r0,28(r1)
if ( !tp )
ffc26f34: 40 a2 00 08 bne+ ffc26f3c <clock_settime+0x18> <== ALWAYS TAKEN
ffc26f38: 48 00 00 94 b ffc26fcc <clock_settime+0xa8> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
ffc26f3c: 2f 83 00 01 cmpwi cr7,r3,1
ffc26f40: 40 be 00 6c bne+ cr7,ffc26fac <clock_settime+0x88>
if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 )
ffc26f44: 81 24 00 00 lwz r9,0(r4)
ffc26f48: 3d 40 21 da lis r10,8666
ffc26f4c: 61 4a e4 ff ori r10,r10,58623
ffc26f50: 7f 89 50 40 cmplw cr7,r9,r10
ffc26f54: 41 bd 00 08 bgt+ cr7,ffc26f5c <clock_settime+0x38>
ffc26f58: 48 00 00 74 b ffc26fcc <clock_settime+0xa8>
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
ffc26f5c: 3d 20 00 00 lis r9,0
ffc26f60: 81 49 34 e4 lwz r10,13540(r9)
++level;
ffc26f64: 39 4a 00 01 addi r10,r10,1
_Thread_Dispatch_disable_level = level;
ffc26f68: 91 49 34 e4 stw r10,13540(r9)
Timestamp64_Control *_time,
Timestamp64_Control _seconds,
Timestamp64_Control _nanoseconds
)
{
*_time = _seconds * 1000000000L + _nanoseconds;
ffc26f6c: 3c c0 3b 9a lis r6,15258
const struct timespec *tod_as_timespec
)
{
Timestamp_Control tod_as_timestamp;
_Timestamp_Set(
ffc26f70: 81 44 00 00 lwz r10,0(r4)
ffc26f74: 60 c6 ca 00 ori r6,r6,51712
ffc26f78: 81 64 00 04 lwz r11,4(r4)
ffc26f7c: 7d 0a 30 96 mulhw r8,r10,r6
ffc26f80: 7d 2a 31 d6 mullw r9,r10,r6
ffc26f84: 7d 6a fe 70 srawi r10,r11,31
ffc26f88: 7d 6b 48 14 addc r11,r11,r9
ffc26f8c: 7d 4a 41 14 adde r10,r10,r8
ffc26f90: 7c 23 0b 78 mr r3,r1
ffc26f94: 95 43 00 08 stwu r10,8(r3)
ffc26f98: 91 63 00 04 stw r11,4(r3)
&tod_as_timestamp,
tod_as_timespec->tv_sec,
tod_as_timespec->tv_nsec
);
_TOD_Set_with_timestamp( &tod_as_timestamp );
ffc26f9c: 48 00 10 85 bl ffc28020 <_TOD_Set_with_timestamp>
rtems_set_errno_and_return_minus_one( EINVAL );
_Thread_Disable_dispatch();
_TOD_Set( tp );
_Thread_Enable_dispatch();
ffc26fa0: 4b fe 3a b1 bl ffc0aa50 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
ffc26fa4: 38 60 00 00 li r3,0
ffc26fa8: 48 00 00 34 b ffc26fdc <clock_settime+0xb8>
_Thread_Disable_dispatch();
_TOD_Set( tp );
_Thread_Enable_dispatch();
}
#ifdef _POSIX_CPUTIME
else if ( clock_id == CLOCK_PROCESS_CPUTIME_ID )
ffc26fac: 2f 83 00 02 cmpwi cr7,r3,2
ffc26fb0: 40 be 00 08 bne+ cr7,ffc26fb8 <clock_settime+0x94>
ffc26fb4: 48 00 00 0c b ffc26fc0 <clock_settime+0x9c>
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
#ifdef _POSIX_THREAD_CPUTIME
else if ( clock_id == CLOCK_THREAD_CPUTIME_ID )
ffc26fb8: 2f 83 00 03 cmpwi cr7,r3,3
ffc26fbc: 40 be 00 10 bne+ cr7,ffc26fcc <clock_settime+0xa8>
rtems_set_errno_and_return_minus_one( ENOSYS );
ffc26fc0: 48 01 14 49 bl ffc38408 <__errno>
ffc26fc4: 39 20 00 58 li r9,88
ffc26fc8: 48 00 00 0c b ffc26fd4 <clock_settime+0xb0>
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
ffc26fcc: 48 01 14 3d bl ffc38408 <__errno>
ffc26fd0: 39 20 00 16 li r9,22
ffc26fd4: 91 23 00 00 stw r9,0(r3)
ffc26fd8: 38 60 ff ff li r3,-1
return 0;
}
ffc26fdc: 80 01 00 1c lwz r0,28(r1)
ffc26fe0: 38 21 00 18 addi r1,r1,24
ffc26fe4: 7c 08 03 a6 mtlr r0
ffc26fe8: 4e 80 00 20 blr
ffc042ac <create_disk>:
dev_t dev,
const char *name,
rtems_disk_device **dd_ptr,
char **alloc_name_ptr
)
{
ffc042ac: 94 21 ff c8 stwu r1,-56(r1)
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
rtems_filesystem_split_dev_t(dev, major, minor);
if (major >= disktab_size) {
ffc042b0: 3d 20 00 00 lis r9,0
dev_t dev,
const char *name,
rtems_disk_device **dd_ptr,
char **alloc_name_ptr
)
{
ffc042b4: 7c 08 02 a6 mflr r0
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
rtems_filesystem_split_dev_t(dev, major, minor);
if (major >= disktab_size) {
ffc042b8: 39 49 28 e0 addi r10,r9,10464
dev_t dev,
const char *name,
rtems_disk_device **dd_ptr,
char **alloc_name_ptr
)
{
ffc042bc: be a1 00 0c stmw r21,12(r1)
ffc042c0: 7c 7d 1b 78 mr r29,r3
ffc042c4: 7c 9e 23 78 mr r30,r4
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
rtems_filesystem_split_dev_t(dev, major, minor);
if (major >= disktab_size) {
ffc042c8: 83 89 28 e0 lwz r28,10464(r9)
dev_t dev,
const char *name,
rtems_disk_device **dd_ptr,
char **alloc_name_ptr
)
{
ffc042cc: 7c b9 2b 78 mr r25,r5
ffc042d0: 90 01 00 3c stw r0,60(r1)
ffc042d4: 7c d7 33 78 mr r23,r6
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
rtems_filesystem_split_dev_t(dev, major, minor);
if (major >= disktab_size) {
ffc042d8: 7f 83 e0 40 cmplw cr7,r3,r28
dev_t dev,
const char *name,
rtems_disk_device **dd_ptr,
char **alloc_name_ptr
)
{
ffc042dc: 7c f6 3b 78 mr r22,r7
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
rtems_filesystem_split_dev_t(dev, major, minor);
if (major >= disktab_size) {
ffc042e0: 41 9c 00 50 blt- cr7,ffc04330 <create_disk+0x84>
rtems_disk_device_table *table = disktab;
rtems_device_major_number old_size = disktab_size;
rtems_device_major_number new_size = 2 * old_size;
ffc042e4: 57 9f 08 3c rlwinm r31,r28,1,0,30
rtems_device_minor_number minor = 0;
rtems_filesystem_split_dev_t(dev, major, minor);
if (major >= disktab_size) {
rtems_disk_device_table *table = disktab;
ffc042e8: 80 6a 00 04 lwz r3,4(r10)
rtems_device_major_number old_size = disktab_size;
rtems_device_major_number new_size = 2 * old_size;
if (major >= new_size) {
ffc042ec: 7f 9d f8 40 cmplw cr7,r29,r31
ffc042f0: 41 9c 00 08 blt- cr7,ffc042f8 <create_disk+0x4c> <== NEVER TAKEN
new_size = major + 1;
ffc042f4: 3b fd 00 01 addi r31,r29,1
}
table = realloc(table, new_size * sizeof(*table));
ffc042f8: 57 e4 18 38 rlwinm r4,r31,3,0,28
ffc042fc: 48 00 21 3d bl ffc06438 <realloc>
if (table == NULL) {
ffc04300: 7c 7b 1b 79 mr. r27,r3
ffc04304: 41 82 01 50 beq- ffc04454 <create_disk+0x1a8> <== ALWAYS TAKEN
return NULL;
}
memset(table + old_size, 0, (new_size - old_size) * sizeof(*table));
ffc04308: 7c bc f8 50 subf r5,r28,r31 <== NOT EXECUTED
ffc0430c: 57 83 18 38 rlwinm r3,r28,3,0,28 <== NOT EXECUTED
ffc04310: 7c 7b 1a 14 add r3,r27,r3 <== NOT EXECUTED
ffc04314: 38 80 00 00 li r4,0 <== NOT EXECUTED
ffc04318: 54 a5 18 38 rlwinm r5,r5,3,0,28 <== NOT EXECUTED
ffc0431c: 48 01 12 dd bl ffc155f8 <memset> <== NOT EXECUTED
disktab = table;
ffc04320: 3d 20 00 00 lis r9,0 <== NOT EXECUTED
ffc04324: 39 49 28 e0 addi r10,r9,10464 <== NOT EXECUTED
disktab_size = new_size;
ffc04328: 93 e9 28 e0 stw r31,10464(r9) <== NOT EXECUTED
if (table == NULL) {
return NULL;
}
memset(table + old_size, 0, (new_size - old_size) * sizeof(*table));
disktab = table;
ffc0432c: 93 6a 00 04 stw r27,4(r10) <== NOT EXECUTED
disktab_size = new_size;
}
if (disktab [major].minor == NULL || minor >= disktab[major].size) {
ffc04330: 3d 20 00 00 lis r9,0
ffc04334: 83 69 28 e4 lwz r27,10468(r9)
ffc04338: 57 ba 18 38 rlwinm r26,r29,3,0,28
ffc0433c: 7c 7b d0 2e lwzx r3,r27,r26
ffc04340: 7f 1b d2 14 add r24,r27,r26
ffc04344: 83 98 00 04 lwz r28,4(r24)
ffc04348: 2f 83 00 00 cmpwi cr7,r3,0
ffc0434c: 41 9e 00 0c beq- cr7,ffc04358 <create_disk+0xac>
ffc04350: 7f 9e e0 40 cmplw cr7,r30,r28
ffc04354: 41 9c 00 50 blt- cr7,ffc043a4 <create_disk+0xf8>
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) {
ffc04358: 2f 9c 00 00 cmpwi cr7,r28,0
new_size = DISKTAB_INITIAL_SIZE;
ffc0435c: 3b e0 00 08 li r31,8
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) {
ffc04360: 41 9e 00 08 beq- cr7,ffc04368 <create_disk+0xbc>
new_size = DISKTAB_INITIAL_SIZE;
} else {
new_size = 2 * old_size;
ffc04364: 57 9f 08 3c rlwinm r31,r28,1,0,30
}
if (minor >= new_size) {
ffc04368: 7f 9e f8 40 cmplw cr7,r30,r31
ffc0436c: 41 9c 00 08 blt- cr7,ffc04374 <create_disk+0xc8>
new_size = minor + 1;
ffc04370: 3b fe 00 01 addi r31,r30,1
}
table = realloc(table, new_size * sizeof(*table));
ffc04374: 57 e4 10 3a rlwinm r4,r31,2,0,29
ffc04378: 48 00 20 c1 bl ffc06438 <realloc>
if (table == NULL) {
ffc0437c: 7c 75 1b 79 mr. r21,r3
ffc04380: 41 82 00 d4 beq- ffc04454 <create_disk+0x1a8>
return NULL;
}
memset(table + old_size, 0, (new_size - old_size) * sizeof(*table));
ffc04384: 7c bc f8 50 subf r5,r28,r31
ffc04388: 57 83 10 3a rlwinm r3,r28,2,0,29
ffc0438c: 7c 75 1a 14 add r3,r21,r3
ffc04390: 38 80 00 00 li r4,0
ffc04394: 54 a5 10 3a rlwinm r5,r5,2,0,29
ffc04398: 48 01 12 61 bl ffc155f8 <memset>
disktab [major].minor = table;
ffc0439c: 7e bb d1 2e stwx r21,r27,r26
disktab [major].size = new_size;
ffc043a0: 93 f8 00 04 stw r31,4(r24)
}
return disktab [major].minor + minor;
ffc043a4: 7f 7b d0 2e lwzx r27,r27,r26
ffc043a8: 57 dc 10 3a rlwinm r28,r30,2,0,29
ffc043ac: 7d 3b e2 14 add r9,r27,r28
{
rtems_disk_device **dd_entry = create_disk_table_entry(dev);
rtems_disk_device *dd = NULL;
char *alloc_name = NULL;
if (dd_entry == NULL) {
ffc043b0: 2f 89 00 00 cmpwi cr7,r9,0
ffc043b4: 40 be 00 08 bne+ cr7,ffc043bc <create_disk+0x110> <== ALWAYS TAKEN
ffc043b8: 48 00 00 9c b ffc04454 <create_disk+0x1a8> <== NOT EXECUTED
return RTEMS_NO_MEMORY;
}
if (*dd_entry != NULL) {
ffc043bc: 7d 5b e0 2e lwzx r10,r27,r28
return RTEMS_RESOURCE_IN_USE;
ffc043c0: 38 60 00 0c li r3,12
if (dd_entry == NULL) {
return RTEMS_NO_MEMORY;
}
if (*dd_entry != NULL) {
ffc043c4: 2f 8a 00 00 cmpwi cr7,r10,0
ffc043c8: 40 be 00 90 bne+ cr7,ffc04458 <create_disk+0x1ac>
return RTEMS_RESOURCE_IN_USE;
}
dd = malloc(sizeof(*dd));
ffc043cc: 38 60 00 78 li r3,120
ffc043d0: 48 00 15 59 bl ffc05928 <malloc>
if (dd == NULL) {
ffc043d4: 7c 7f 1b 79 mr. r31,r3
ffc043d8: 41 82 00 7c beq- ffc04454 <create_disk+0x1a8> <== NEVER TAKEN
return RTEMS_NO_MEMORY;
}
if (name != NULL) {
ffc043dc: 2f 99 00 00 cmpwi cr7,r25,0
ffc043e0: 41 9e 00 40 beq- cr7,ffc04420 <create_disk+0x174>
alloc_name = strdup(name);
ffc043e4: 7f 23 cb 78 mr r3,r25
ffc043e8: 48 01 15 ad bl ffc15994 <strdup>
if (alloc_name == NULL) {
ffc043ec: 2f 83 00 00 cmpwi cr7,r3,0
if (dd == NULL) {
return RTEMS_NO_MEMORY;
}
if (name != NULL) {
alloc_name = strdup(name);
ffc043f0: 7c 7a 1b 78 mr r26,r3
ffc043f4: 7c 79 1b 78 mr r25,r3
if (alloc_name == NULL) {
ffc043f8: 40 be 00 40 bne+ cr7,ffc04438 <create_disk+0x18c> <== ALWAYS TAKEN
free(dd);
ffc043fc: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc04400: 48 00 0f 99 bl ffc05398 <free> <== NOT EXECUTED
ffc04404: 48 00 00 50 b ffc04454 <create_disk+0x1a8> <== NOT EXECUTED
}
}
if (name != NULL) {
if (mknod(alloc_name, 0777 | S_IFBLK, dev) < 0) {
free(alloc_name);
ffc04408: 7f 43 d3 78 mr r3,r26 <== NOT EXECUTED
ffc0440c: 48 00 0f 8d bl ffc05398 <free> <== NOT EXECUTED
free(dd);
ffc04410: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc04414: 48 00 0f 85 bl ffc05398 <free> <== NOT EXECUTED
return RTEMS_UNSATISFIED;
ffc04418: 38 60 00 0d li r3,13 <== NOT EXECUTED
ffc0441c: 48 00 00 3c b ffc04458 <create_disk+0x1ac> <== 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;
ffc04420: 3b 20 00 00 li r25,0
free(dd);
return RTEMS_UNSATISFIED;
}
}
*dd_entry = dd;
ffc04424: 7f fb e1 2e stwx r31,r27,r28
*dd_ptr = dd;
*alloc_name_ptr = alloc_name;
return RTEMS_SUCCESSFUL;
ffc04428: 38 60 00 00 li r3,0
return RTEMS_UNSATISFIED;
}
}
*dd_entry = dd;
*dd_ptr = dd;
ffc0442c: 93 f7 00 00 stw r31,0(r23)
*alloc_name_ptr = alloc_name;
ffc04430: 93 36 00 00 stw r25,0(r22)
return RTEMS_SUCCESSFUL;
ffc04434: 48 00 00 24 b ffc04458 <create_disk+0x1ac>
return RTEMS_NO_MEMORY;
}
}
if (name != NULL) {
if (mknod(alloc_name, 0777 | S_IFBLK, dev) < 0) {
ffc04438: 38 80 61 ff li r4,25087
ffc0443c: 7f a5 eb 78 mr r5,r29
ffc04440: 7f c6 f3 78 mr r6,r30
ffc04444: 48 00 16 89 bl ffc05acc <mknod>
ffc04448: 2f 83 00 00 cmpwi cr7,r3,0
ffc0444c: 40 9c ff d8 bge+ cr7,ffc04424 <create_disk+0x178> <== ALWAYS TAKEN
ffc04450: 4b ff ff b8 b ffc04408 <create_disk+0x15c> <== 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;
ffc04454: 38 60 00 1a li r3,26
*dd_entry = dd;
*dd_ptr = dd;
*alloc_name_ptr = alloc_name;
return RTEMS_SUCCESSFUL;
}
ffc04458: 39 61 00 38 addi r11,r1,56
ffc0445c: 48 01 52 cc b ffc19728 <_restgpr_21_x>
ffc058c8 <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)
ffc058c8: 94 21 ff e8 stwu r1,-24(r1)
ffc058cc: 7c 08 02 a6 mflr r0
if (new_part_desc == NULL)
{
return RTEMS_INTERNAL_ERROR;
}
*new_part_desc = NULL;
ffc058d0: 39 20 00 00 li r9,0
* 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)
ffc058d4: bf a1 00 0c stmw r29,12(r1)
ffc058d8: 7c 7e 1b 78 mr r30,r3
ffc058dc: 7c 9d 23 78 mr r29,r4
ffc058e0: 90 01 00 1c stw r0,28(r1)
return RTEMS_INTERNAL_ERROR;
}
*new_part_desc = NULL;
if ((part_desc = calloc(1, sizeof(rtems_part_desc_t))) == NULL)
ffc058e4: 38 60 00 01 li r3,1
if (new_part_desc == NULL)
{
return RTEMS_INTERNAL_ERROR;
}
*new_part_desc = NULL;
ffc058e8: 91 24 00 00 stw r9,0(r4)
if ((part_desc = calloc(1, sizeof(rtems_part_desc_t))) == NULL)
ffc058ec: 38 80 00 28 li r4,40
ffc058f0: 48 00 0d 59 bl ffc06648 <calloc>
ffc058f4: 7c 7f 1b 79 mr. r31,r3
ffc058f8: 41 82 00 a0 beq- ffc05998 <data_to_part_desc.part.1+0xd0><== NEVER TAKEN
{
return RTEMS_NO_MEMORY;
}
part_desc->bootable = *(data + RTEMS_IDE_PARTITION_BOOTABLE_OFFSET);
ffc058fc: 89 3e 00 00 lbz r9,0(r30)
ffc05900: 99 3f 00 00 stb r9,0(r31)
part_desc->sys_type = *(data + RTEMS_IDE_PARTITION_SYS_TYPE_OFFSET);
ffc05904: 88 9e 00 04 lbz r4,4(r30)
ffc05908: 98 9f 00 01 stb r4,1(r31)
uint32_t value
)
{
uint32_t swapped;
__asm__ volatile("rlwimi %0,%1,8,24,31;"
ffc0590c: 81 3e 00 08 lwz r9,8(r30)
ffc05910: 51 28 46 3e rlwimi r8,r9,8,24,31
ffc05914: 51 28 c4 2e rlwimi r8,r9,24,16,23
ffc05918: 51 28 42 1e rlwimi r8,r9,8,8,15
ffc0591c: 51 28 c0 0e rlwimi r8,r9,24,0,7
/* 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));
part_desc->start = LE_TO_CPU_U32(temp);
ffc05920: 91 1f 00 04 stw r8,4(r31)
ffc05924: 81 3e 00 0c lwz r9,12(r30)
ffc05928: 51 3e 46 3e rlwimi r30,r9,8,24,31
ffc0592c: 51 3e c4 2e rlwimi r30,r9,24,16,23
ffc05930: 51 3e 42 1e rlwimi r30,r9,8,8,15
ffc05934: 51 3e c0 0e rlwimi r30,r9,24,0,7
* true if partition type is extended, false otherwise
*/
static bool
is_extended(uint8_t type)
{
return ((type == EXTENDED_PARTITION) || (type == LINUX_EXTENDED));
ffc05938: 2f 84 00 05 cmpwi cr7,r4,5
/* due to incorrect data alignment one have to align data first */
memcpy(&temp, data + RTEMS_IDE_PARTITION_START_OFFSET, sizeof(uint32_t));
part_desc->start = LE_TO_CPU_U32(temp);
memcpy(&temp, data + RTEMS_IDE_PARTITION_SIZE_OFFSET, sizeof(uint32_t));
part_desc->size = LE_TO_CPU_U32(temp);
ffc0593c: 93 df 00 08 stw r30,8(r31)
* true if partition type is extended, false otherwise
*/
static bool
is_extended(uint8_t type)
{
return ((type == EXTENDED_PARTITION) || (type == LINUX_EXTENDED));
ffc05940: 41 9e 00 14 beq- cr7,ffc05954 <data_to_part_desc.part.1+0x8c>
ffc05944: 68 89 00 85 xori r9,r4,133
ffc05948: 7d 29 00 34 cntlzw r9,r9
ffc0594c: 55 29 d9 7e rlwinm r9,r9,27,5,31
ffc05950: 48 00 00 08 b ffc05958 <data_to_part_desc.part.1+0x90>
ffc05954: 39 20 00 01 li r9,1
* use partitions that are
* - extended
* or
* - FAT type and non-zero
*/
if (is_extended(part_desc->sys_type) ||
ffc05958: 2f 89 00 00 cmpwi cr7,r9,0
ffc0595c: 40 9e 00 24 bne- cr7,ffc05980 <data_to_part_desc.part.1+0xb8>
DOS_P32MB_PARTITION,
FAT32_PARTITION ,FAT32_LBA_PARTITION,
FAT16_LBA_PARTITION
};
return (NULL != memchr(fat_part_types,type,sizeof(fat_part_types)));
ffc05960: 3c 60 ff c2 lis r3,-62
ffc05964: 38 63 5d 9c addi r3,r3,23964
ffc05968: 38 a0 00 06 li r5,6
ffc0596c: 48 01 10 29 bl ffc16994 <memchr>
* use partitions that are
* - extended
* or
* - FAT type and non-zero
*/
if (is_extended(part_desc->sys_type) ||
ffc05970: 2f 83 00 00 cmpwi cr7,r3,0
ffc05974: 41 9e 00 14 beq- cr7,ffc05988 <data_to_part_desc.part.1+0xc0>
((is_fat_partition(part_desc->sys_type)) && (part_desc->size != 0))) {
ffc05978: 2f 9e 00 00 cmpwi cr7,r30,0
ffc0597c: 41 be 00 0c beq+ cr7,ffc05988 <data_to_part_desc.part.1+0xc0><== NEVER TAKEN
*new_part_desc = part_desc;
ffc05980: 93 fd 00 00 stw r31,0(r29)
ffc05984: 48 00 00 0c b ffc05990 <data_to_part_desc.part.1+0xc8>
}
else {
/* empty partition */
free(part_desc);
ffc05988: 7f e3 fb 78 mr r3,r31
ffc0598c: 48 00 0d a1 bl ffc0672c <free>
}
return RTEMS_SUCCESSFUL;
ffc05990: 38 60 00 00 li r3,0
ffc05994: 48 00 00 08 b ffc0599c <data_to_part_desc.part.1+0xd4>
*new_part_desc = NULL;
if ((part_desc = calloc(1, sizeof(rtems_part_desc_t))) == NULL)
{
return RTEMS_NO_MEMORY;
ffc05998: 38 60 00 1a li r3,26 <== NOT EXECUTED
else {
/* empty partition */
free(part_desc);
}
return RTEMS_SUCCESSFUL;
}
ffc0599c: 39 61 00 18 addi r11,r1,24
ffc059a0: 4b ff ae 4c b ffc007ec <_restgpr_29_x>
ffc0c5b4 <devFS_eval_path>:
}
void devFS_eval_path(
rtems_filesystem_eval_path_context_t *ctx
)
{
ffc0c5b4: 94 21 ff d8 stwu r1,-40(r1)
ffc0c5b8: 7c 08 02 a6 mflr r0
ffc0c5bc: 90 01 00 2c stw r0,44(r1)
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;
ffc0c5c0: 81 23 00 2c lwz r9,44(r3)
ffc0c5c4: bf 01 00 08 stmw r24,8(r1)
ffc0c5c8: 7c 7f 1b 78 mr r31,r3
)
{
size_t i = 0;
size_t n = data->count;
devFS_node *nodes = data->nodes;
devFS_node *node = NULL;
ffc0c5cc: 3b a0 00 00 li r29,0
ffc0c5d0: 81 29 00 10 lwz r9,16(r9)
devFS_node *free_node = NULL;
for (i = 0; (free_node == NULL || node == NULL) && i < n; ++i) {
ffc0c5d4: 3b 40 00 00 li r26,0
}
} else {
rtems_filesystem_eval_path_error(ctx, ENOENT);
}
}
}
ffc0c5d8: 83 23 00 00 lwz r25,0(r3)
size_t pathlen,
devFS_node **free_node_ptr
)
{
size_t i = 0;
size_t n = data->count;
ffc0c5dc: 83 09 00 04 lwz r24,4(r9)
ffc0c5e0: 83 c9 00 00 lwz r30,0(r9)
devFS_node *nodes = data->nodes;
devFS_node *node = NULL;
devFS_node *free_node = NULL;
ffc0c5e4: 39 20 00 00 li r9,0
}
} else {
rtems_filesystem_eval_path_error(ctx, ENOENT);
}
}
}
ffc0c5e8: 83 63 00 04 lwz r27,4(r3)
ffc0c5ec: 48 00 00 58 b ffc0c644 <devFS_eval_path+0x90>
devFS_node *free_node = NULL;
for (i = 0; (free_node == NULL || node == NULL) && i < n; ++i) {
devFS_node *current = nodes + i;
if (current->name != NULL) {
ffc0c5f0: 80 7e 00 00 lwz r3,0(r30)
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) {
devFS_node *current = nodes + i;
ffc0c5f4: 7f dc f3 78 mr r28,r30
if (current->name != NULL) {
ffc0c5f8: 2f 83 00 00 cmpwi cr7,r3,0
ffc0c5fc: 41 9e 00 2c beq- cr7,ffc0c628 <devFS_eval_path+0x74>
if (
ffc0c600: 81 5e 00 04 lwz r10,4(r30)
ffc0c604: 7d 3c 4b 78 mr r28,r9
ffc0c608: 7f 8a d8 00 cmpw cr7,r10,r27
ffc0c60c: 40 be 00 1c bne+ cr7,ffc0c628 <devFS_eval_path+0x74>
current->namelen == pathlen
&& memcmp(current->name, path, pathlen) == 0
ffc0c610: 7f 24 cb 78 mr r4,r25
ffc0c614: 7f 65 db 78 mr r5,r27
ffc0c618: 48 00 36 41 bl ffc0fc58 <memcmp>
ffc0c61c: 2f 83 00 00 cmpwi cr7,r3,0
ffc0c620: 40 9e 00 08 bne- cr7,ffc0c628 <devFS_eval_path+0x74>
ffc0c624: 7f dd f3 78 mr r29,r30
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) {
ffc0c628: 2f 9c 00 00 cmpwi cr7,r28,0
ffc0c62c: 3b 5a 00 01 addi r26,r26,1
ffc0c630: 41 9e 00 0c beq- cr7,ffc0c63c <devFS_eval_path+0x88> <== NEVER TAKEN
ffc0c634: 2f 9d 00 00 cmpwi cr7,r29,0
ffc0c638: 40 9e 00 18 bne- cr7,ffc0c650 <devFS_eval_path+0x9c>
ffc0c63c: 3b de 00 14 addi r30,r30,20
ffc0c640: 7f 89 e3 78 mr r9,r28
ffc0c644: 7f 9a c0 00 cmpw cr7,r26,r24
ffc0c648: 40 9e ff a8 bne+ cr7,ffc0c5f0 <devFS_eval_path+0x3c>
ffc0c64c: 48 00 00 08 b ffc0c654 <devFS_eval_path+0xa0>
ffc0c650: 7f 89 e3 78 mr r9,r28
rtems_filesystem_eval_path_get_pathlen(ctx),
&free_node
);
int eval_flags = rtems_filesystem_eval_path_get_flags(ctx);
if (node != NULL) {
ffc0c654: 2f 9d 00 00 cmpwi cr7,r29,0
}
} else {
rtems_filesystem_eval_path_error(ctx, ENOENT);
}
}
}
ffc0c658: 81 5f 00 10 lwz r10,16(r31)
rtems_filesystem_eval_path_get_pathlen(ctx),
&free_node
);
int eval_flags = rtems_filesystem_eval_path_get_flags(ctx);
if (node != NULL) {
ffc0c65c: 41 9e 00 24 beq- cr7,ffc0c680 <devFS_eval_path+0xcc>
if ((eval_flags & RTEMS_FS_EXCLUSIVE) == 0) {
ffc0c660: 71 49 00 40 andi. r9,r10,64
ffc0c664: 40 82 00 10 bne- ffc0c674 <devFS_eval_path+0xc0>
currentloc->node_access = node;
ffc0c668: 93 bf 00 20 stw r29,32(r31)
static inline void rtems_filesystem_eval_path_clear_path(
rtems_filesystem_eval_path_context_t *ctx
)
{
ctx->pathlen = 0;
ffc0c66c: 91 3f 00 04 stw r9,4(r31)
ffc0c670: 48 00 00 64 b ffc0c6d4 <devFS_eval_path+0x120>
rtems_filesystem_eval_path_clear_path(ctx);
} else {
rtems_filesystem_eval_path_error(ctx, EEXIST);
ffc0c674: 7f e3 fb 78 mr r3,r31
ffc0c678: 38 80 00 11 li r4,17
ffc0c67c: 48 00 00 44 b ffc0c6c0 <devFS_eval_path+0x10c>
}
} else {
if ((eval_flags & RTEMS_FS_MAKE) != 0) {
ffc0c680: 71 48 00 20 andi. r8,r10,32
ffc0c684: 41 82 00 34 beq- ffc0c6b8 <devFS_eval_path+0x104> <== NEVER TAKEN
if (free_node != NULL) {
ffc0c688: 2f 89 00 00 cmpwi cr7,r9,0
ffc0c68c: 41 9e 00 20 beq- cr7,ffc0c6ac <devFS_eval_path+0xf8>
free_node->mode = S_IRWXU | S_IRWXG | S_IRWXO;
ffc0c690: 39 40 01 ff li r10,511
ffc0c694: 91 49 00 10 stw r10,16(r9)
currentloc->node_access = free_node;
ffc0c698: 91 3f 00 20 stw r9,32(r31)
rtems_filesystem_eval_path_context_t *ctx,
const char *token,
size_t tokenlen
)
{
ctx->token = token;
ffc0c69c: 93 3f 00 08 stw r25,8(r31)
ctx->tokenlen = tokenlen;
ffc0c6a0: 93 7f 00 0c stw r27,12(r31)
static inline void rtems_filesystem_eval_path_clear_path(
rtems_filesystem_eval_path_context_t *ctx
)
{
ctx->pathlen = 0;
ffc0c6a4: 93 bf 00 04 stw r29,4(r31)
ffc0c6a8: 48 00 00 2c b ffc0c6d4 <devFS_eval_path+0x120>
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);
ffc0c6ac: 7f e3 fb 78 mr r3,r31
ffc0c6b0: 38 80 00 1c li r4,28
ffc0c6b4: 48 00 00 0c b ffc0c6c0 <devFS_eval_path+0x10c>
}
} else {
rtems_filesystem_eval_path_error(ctx, ENOENT);
ffc0c6b8: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc0c6bc: 38 80 00 02 li r4,2 <== NOT EXECUTED
}
}
}
ffc0c6c0: 80 01 00 2c lwz r0,44(r1)
ffc0c6c4: bb 01 00 08 lmw r24,8(r1)
ffc0c6c8: 7c 08 03 a6 mtlr r0
ffc0c6cc: 38 21 00 28 addi r1,r1,40
rtems_filesystem_eval_path_clear_path(ctx);
} else {
rtems_filesystem_eval_path_error(ctx, ENOSPC);
}
} else {
rtems_filesystem_eval_path_error(ctx, ENOENT);
ffc0c6d0: 4b ff 8e 60 b ffc05530 <rtems_filesystem_eval_path_error>
}
}
}
ffc0c6d4: 39 61 00 28 addi r11,r1,40
ffc0c6d8: 48 00 b9 b0 b ffc18088 <_restgpr_24_x>
ffc04188 <devFS_mknod>:
dev_t dev
)
{
int rv = 0;
if (namelen != 3 || name [0] != 'd' || name [1] != 'e' || name [2] != 'v') {
ffc04188: 2f 85 00 03 cmpwi cr7,r5,3
const char *name,
size_t namelen,
mode_t mode,
dev_t dev
)
{
ffc0418c: 94 21 ff e0 stwu r1,-32(r1)
ffc04190: 7c 08 02 a6 mflr r0
ffc04194: bf 81 00 10 stmw r28,16(r1)
ffc04198: 7c 7e 1b 78 mr r30,r3
ffc0419c: 7c df 33 78 mr r31,r6
ffc041a0: 90 01 00 24 stw r0,36(r1)
ffc041a4: 7c fd 3b 78 mr r29,r7
ffc041a8: 7d 1c 43 78 mr r28,r8
int rv = 0;
if (namelen != 3 || name [0] != 'd' || name [1] != 'e' || name [2] != 'v') {
ffc041ac: 40 be 00 28 bne+ cr7,ffc041d4 <devFS_mknod+0x4c>
ffc041b0: 89 24 00 00 lbz r9,0(r4)
ffc041b4: 2f 89 00 64 cmpwi cr7,r9,100
ffc041b8: 40 be 00 1c bne+ cr7,ffc041d4 <devFS_mknod+0x4c> <== NEVER TAKEN
ffc041bc: 89 24 00 01 lbz r9,1(r4)
ffc041c0: 2f 89 00 65 cmpwi cr7,r9,101
ffc041c4: 40 be 00 10 bne+ cr7,ffc041d4 <devFS_mknod+0x4c> <== NEVER TAKEN
ffc041c8: 89 24 00 02 lbz r9,2(r4)
ffc041cc: 2f 89 00 76 cmpwi cr7,r9,118
ffc041d0: 41 9e 00 68 beq- cr7,ffc04238 <devFS_mknod+0xb0> <== ALWAYS TAKEN
if (S_ISBLK(mode) || S_ISCHR(mode)) {
ffc041d4: 57 e9 04 26 rlwinm r9,r31,0,16,19
ffc041d8: 2f 89 60 00 cmpwi cr7,r9,24576
ffc041dc: 41 9e 00 0c beq- cr7,ffc041e8 <devFS_mknod+0x60>
ffc041e0: 2f 89 20 00 cmpwi cr7,r9,8192
ffc041e4: 40 9e 00 64 bne- cr7,ffc04248 <devFS_mknod+0xc0>
char *dupname = malloc(namelen);
ffc041e8: 7c a3 2b 78 mr r3,r5
ffc041ec: 90 81 00 08 stw r4,8(r1)
ffc041f0: 90 a1 00 0c stw r5,12(r1)
ffc041f4: 48 00 05 69 bl ffc0475c <malloc>
if (dupname != NULL) {
ffc041f8: 7c 6a 1b 79 mr. r10,r3
ffc041fc: 80 81 00 08 lwz r4,8(r1)
ffc04200: 80 a1 00 0c lwz r5,12(r1)
ffc04204: 41 82 00 28 beq- ffc0422c <devFS_mknod+0xa4>
devFS_node *node = parentloc->node_access;
ffc04208: 81 3e 00 08 lwz r9,8(r30)
node->name = dupname;
ffc0420c: 91 49 00 00 stw r10,0(r9)
node->namelen = namelen;
ffc04210: 90 a9 00 04 stw r5,4(r9)
node->major = rtems_filesystem_dev_major_t(dev);
ffc04214: 93 a9 00 08 stw r29,8(r9)
node->minor = rtems_filesystem_dev_minor_t(dev);
ffc04218: 93 89 00 0c stw r28,12(r9)
node->mode = mode;
ffc0421c: 93 e9 00 10 stw r31,16(r9)
memcpy(dupname, name, namelen);
ffc04220: 48 00 ba bd bl ffc0fcdc <memcpy>
size_t namelen,
mode_t mode,
dev_t dev
)
{
int rv = 0;
ffc04224: 38 60 00 00 li r3,0
ffc04228: 48 00 00 30 b ffc04258 <devFS_mknod+0xd0>
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;
ffc0422c: 48 00 a7 b5 bl ffc0e9e0 <__errno>
ffc04230: 39 20 00 0c li r9,12
ffc04234: 48 00 00 1c b ffc04250 <devFS_mknod+0xc8>
} else {
errno = ENOTSUP;
rv = -1;
}
} else {
if (!S_ISDIR(mode)) {
ffc04238: 54 df 04 26 rlwinm r31,r6,0,16,19
ffc0423c: 2f 9f 40 00 cmpwi cr7,r31,16384
size_t namelen,
mode_t mode,
dev_t dev
)
{
int rv = 0;
ffc04240: 38 60 00 00 li r3,0
} else {
errno = ENOTSUP;
rv = -1;
}
} else {
if (!S_ISDIR(mode)) {
ffc04244: 41 be 00 14 beq+ cr7,ffc04258 <devFS_mknod+0xd0> <== ALWAYS TAKEN
errno = ENOTSUP;
ffc04248: 48 00 a7 99 bl ffc0e9e0 <__errno>
ffc0424c: 39 20 00 86 li r9,134
ffc04250: 91 23 00 00 stw r9,0(r3)
rv = -1;
ffc04254: 38 60 ff ff li r3,-1
}
}
return rv;
}
ffc04258: 39 61 00 20 addi r11,r1,32
ffc0425c: 48 01 3e 3c b ffc18098 <_restgpr_28_x>
ffc04214 <disk_lock>:
*/
static volatile bool diskdevs_protected;
static rtems_status_code
disk_lock(void)
{
ffc04214: 7c 2b 0b 78 mr r11,r1
ffc04218: 7c 08 02 a6 mflr r0
ffc0421c: 94 21 ff f0 stwu r1,-16(r1)
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_semaphore_obtain(diskdevs_mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
ffc04220: 38 80 00 00 li r4,0
ffc04224: 38 a0 00 00 li r5,0
*/
static volatile bool diskdevs_protected;
static rtems_status_code
disk_lock(void)
{
ffc04228: 90 01 00 14 stw r0,20(r1)
ffc0422c: 48 01 54 d9 bl ffc19704 <_savegpr_31>
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_semaphore_obtain(diskdevs_mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
ffc04230: 3f e0 00 00 lis r31,0
ffc04234: 3b ff 28 e0 addi r31,r31,10464
ffc04238: 80 7f 00 08 lwz r3,8(r31)
ffc0423c: 48 00 57 69 bl ffc099a4 <rtems_semaphore_obtain>
if (sc == RTEMS_SUCCESSFUL) {
diskdevs_protected = true;
return RTEMS_SUCCESSFUL;
} else {
return RTEMS_NOT_CONFIGURED;
ffc04240: 39 20 00 16 li r9,22
disk_lock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_semaphore_obtain(diskdevs_mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc == RTEMS_SUCCESSFUL) {
ffc04244: 2f 83 00 00 cmpwi cr7,r3,0
ffc04248: 40 be 00 10 bne+ cr7,ffc04258 <disk_lock+0x44> <== NEVER TAKEN
diskdevs_protected = true;
ffc0424c: 39 20 00 01 li r9,1
ffc04250: 99 3f 00 0c stb r9,12(r31)
return RTEMS_SUCCESSFUL;
ffc04254: 39 20 00 00 li r9,0
} else {
return RTEMS_NOT_CONFIGURED;
}
}
ffc04258: 39 61 00 10 addi r11,r1,16
ffc0425c: 7d 23 4b 78 mr r3,r9
ffc04260: 48 01 54 f0 b ffc19750 <_restgpr_31_x>
ffc04264 <disk_unlock>:
static void
disk_unlock(void)
{
ffc04264: 94 21 ff f8 stwu r1,-8(r1)
ffc04268: 7c 08 02 a6 mflr r0
rtems_status_code sc = RTEMS_SUCCESSFUL;
diskdevs_protected = false;
ffc0426c: 3d 20 00 00 lis r9,0
}
}
static void
disk_unlock(void)
{
ffc04270: 90 01 00 0c stw r0,12(r1)
rtems_status_code sc = RTEMS_SUCCESSFUL;
diskdevs_protected = false;
ffc04274: 39 29 28 e0 addi r9,r9,10464
ffc04278: 39 40 00 00 li r10,0
sc = rtems_semaphore_release(diskdevs_mutex);
ffc0427c: 80 69 00 08 lwz r3,8(r9)
static void
disk_unlock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
diskdevs_protected = false;
ffc04280: 99 49 00 0c stb r10,12(r9)
sc = rtems_semaphore_release(diskdevs_mutex);
ffc04284: 48 00 58 45 bl ffc09ac8 <rtems_semaphore_release>
if (sc != RTEMS_SUCCESSFUL) {
ffc04288: 2f 83 00 00 cmpwi cr7,r3,0
ffc0428c: 41 be 00 10 beq+ cr7,ffc0429c <disk_unlock+0x38> <== ALWAYS TAKEN
/* FIXME: Error number */
rtems_fatal_error_occurred(0xdeadbeef);
ffc04290: 3c 60 de ad lis r3,-8531 <== NOT EXECUTED
ffc04294: 60 63 be ef ori r3,r3,48879 <== NOT EXECUTED
ffc04298: 48 00 5e 0d bl ffc0a0a4 <rtems_fatal_error_occurred> <== NOT EXECUTED
}
}
ffc0429c: 80 01 00 0c lwz r0,12(r1)
ffc042a0: 38 21 00 08 addi r1,r1,8
ffc042a4: 7c 08 03 a6 mtlr r0
ffc042a8: 4e 80 00 20 blr
ffc06340 <drainOutput.part.0>:
/*
* Drain output queue
*/
static void
drainOutput (struct rtems_termios_tty *tty)
ffc06340: 94 21 ff f0 stwu r1,-16(r1)
ffc06344: 7c 08 02 a6 mflr r0
ffc06348: bf c1 00 08 stmw r30,8(r1)
ffc0634c: 7c 7f 1b 78 mr r31,r3
ffc06350: 90 01 00 14 stw r0,20(r1)
{
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
rtems_interrupt_disable (level);
ffc06354: 4b ff fd 79 bl ffc060cc <ppc_interrupt_disable>
while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) {
tty->rawOutBufState = rob_wait;
ffc06358: 3b c0 00 02 li r30,2
ffc0635c: 48 00 00 2c b ffc06388 <drainOutput.part.0+0x48>
ffc06360: 93 df 00 94 stw r30,148(r31) <== NOT EXECUTED
ffc06364: 7c 60 01 24 mtmsr r3 <== NOT EXECUTED
rtems_interrupt_enable (level);
sc = rtems_semaphore_obtain(
ffc06368: 80 7f 00 8c lwz r3,140(r31) <== NOT EXECUTED
ffc0636c: 38 80 00 00 li r4,0 <== NOT EXECUTED
ffc06370: 38 a0 00 00 li r5,0 <== NOT EXECUTED
ffc06374: 48 00 25 39 bl ffc088ac <rtems_semaphore_obtain> <== NOT EXECUTED
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
ffc06378: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc0637c: 41 be 00 08 beq+ cr7,ffc06384 <drainOutput.part.0+0x44> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
ffc06380: 48 00 2c f5 bl ffc09074 <rtems_fatal_error_occurred> <== NOT EXECUTED
rtems_interrupt_disable (level);
ffc06384: 4b ff fd 49 bl ffc060cc <ppc_interrupt_disable> <== NOT EXECUTED
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) {
ffc06388: 81 5f 00 84 lwz r10,132(r31)
ffc0638c: 81 3f 00 80 lwz r9,128(r31)
ffc06390: 7f 8a 48 00 cmpw cr7,r10,r9
ffc06394: 40 9e ff cc bne+ cr7,ffc06360 <drainOutput.part.0+0x20> <== NEVER TAKEN
ffc06398: 7c 60 01 24 mtmsr r3
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
}
rtems_interrupt_enable (level);
}
}
ffc0639c: 39 61 00 10 addi r11,r1,16
ffc063a0: 4b ff a2 20 b ffc005c0 <_restgpr_30_x>
ffc04a90 <dup2>:
*/
int dup2(
int fildes,
int fildes2
)
{
ffc04a90: 94 21 ff a0 stwu r1,-96(r1)
ffc04a94: 7c 08 02 a6 mflr r0
ffc04a98: bf c1 00 58 stmw r30,88(r1)
ffc04a9c: 7c 9f 23 78 mr r31,r4
/*
* If fildes is not valid, then fildes2 should not be closed.
*/
status = fstat( fildes, &buf );
ffc04aa0: 38 81 00 08 addi r4,r1,8
*/
int dup2(
int fildes,
int fildes2
)
{
ffc04aa4: 90 01 00 64 stw r0,100(r1)
ffc04aa8: 7c 7e 1b 78 mr r30,r3
/*
* If fildes is not valid, then fildes2 should not be closed.
*/
status = fstat( fildes, &buf );
ffc04aac: 48 00 05 3d bl ffc04fe8 <fstat>
if ( status == -1 )
ffc04ab0: 2f 83 ff ff cmpwi cr7,r3,-1
ffc04ab4: 40 be 00 0c bne+ cr7,ffc04ac0 <dup2+0x30>
return -1;
ffc04ab8: 38 60 ff ff li r3,-1
ffc04abc: 48 00 00 2c b ffc04ae8 <dup2+0x58>
/*
* If fildes2 is not valid, then we should not do anything either.
*/
status = fstat( fildes2, &buf );
ffc04ac0: 7f e3 fb 78 mr r3,r31
ffc04ac4: 38 81 00 08 addi r4,r1,8
ffc04ac8: 48 00 05 21 bl ffc04fe8 <fstat>
if ( status == -1 )
ffc04acc: 2f 83 ff ff cmpwi cr7,r3,-1
ffc04ad0: 41 be ff e8 beq- cr7,ffc04ab8 <dup2+0x28> <== NEVER TAKEN
/*
* This fcntl handles everything else.
*/
return fcntl( fildes, F_DUPFD, fildes2 );
ffc04ad4: 7f c3 f3 78 mr r3,r30
ffc04ad8: 38 80 00 00 li r4,0
ffc04adc: 7f e5 fb 78 mr r5,r31
ffc04ae0: 4c c6 31 82 crclr 4*cr1+eq
ffc04ae4: 48 00 00 1d bl ffc04b00 <fcntl>
}
ffc04ae8: 39 61 00 60 addi r11,r1,96
ffc04aec: 4b ff c2 80 b ffc00d6c <_restgpr_30_x>
ffc070e4 <echo>:
/*
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
ffc070e4: 7c 2b 0b 78 mr r11,r1
ffc070e8: 7c 08 02 a6 mflr r0
ffc070ec: 94 21 ff e0 stwu r1,-32(r1)
ffc070f0: 90 01 00 24 stw r0,36(r1)
ffc070f4: 48 01 3c c9 bl ffc1adbc <_savegpr_31>
ffc070f8: 7c 9f 23 78 mr r31,r4
if ((tty->termios.c_lflag & ECHOCTL) &&
ffc070fc: 81 24 00 3c lwz r9,60(r4)
ffc07100: 71 2a 02 00 andi. r10,r9,512
ffc07104: 41 82 00 60 beq- ffc07164 <echo+0x80> <== NEVER TAKEN
iscntrl(c) && (c != '\t') && (c != '\n')) {
ffc07108: 3d 20 00 00 lis r9,0
ffc0710c: 81 29 27 e0 lwz r9,10208(r9)
ffc07110: 7d 29 1a 14 add r9,r9,r3
ffc07114: 89 29 00 01 lbz r9,1(r9)
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
if ((tty->termios.c_lflag & ECHOCTL) &&
ffc07118: 55 29 06 b4 rlwinm r9,r9,0,26,26
ffc0711c: 71 2a 00 ff andi. r10,r9,255
ffc07120: 41 82 00 44 beq- ffc07164 <echo+0x80>
iscntrl(c) && (c != '\t') && (c != '\n')) {
ffc07124: 2f 83 00 09 cmpwi cr7,r3,9
ffc07128: 41 9e 00 3c beq- cr7,ffc07164 <echo+0x80>
ffc0712c: 2f 83 00 0a cmpwi cr7,r3,10
ffc07130: 41 be 00 34 beq+ cr7,ffc07164 <echo+0x80>
char echobuf[2];
echobuf[0] = '^';
echobuf[1] = c ^ 0x40;
ffc07134: 68 63 00 40 xori r3,r3,64
{
if ((tty->termios.c_lflag & ECHOCTL) &&
iscntrl(c) && (c != '\t') && (c != '\n')) {
char echobuf[2];
echobuf[0] = '^';
ffc07138: 39 20 00 5e li r9,94
echobuf[1] = c ^ 0x40;
ffc0713c: 98 61 00 09 stb r3,9(r1)
rtems_termios_puts (echobuf, 2, tty);
ffc07140: 38 80 00 02 li r4,2
ffc07144: 38 61 00 08 addi r3,r1,8
{
if ((tty->termios.c_lflag & ECHOCTL) &&
iscntrl(c) && (c != '\t') && (c != '\n')) {
char echobuf[2];
echobuf[0] = '^';
ffc07148: 99 21 00 08 stb r9,8(r1)
echobuf[1] = c ^ 0x40;
rtems_termios_puts (echobuf, 2, tty);
ffc0714c: 7f e5 fb 78 mr r5,r31
ffc07150: 4b ff fc f5 bl ffc06e44 <rtems_termios_puts>
tty->column += 2;
ffc07154: 81 3f 00 28 lwz r9,40(r31)
ffc07158: 39 29 00 02 addi r9,r9,2
ffc0715c: 91 3f 00 28 stw r9,40(r31)
ffc07160: 48 00 00 0c b ffc0716c <echo+0x88>
} else {
oproc (c, tty);
ffc07164: 7f e4 fb 78 mr r4,r31
ffc07168: 4b ff fe 09 bl ffc06f70 <oproc>
}
}
ffc0716c: 39 61 00 20 addi r11,r1,32
ffc07170: 4b ff 94 54 b ffc005c4 <_restgpr_31_x>
ffc07174 <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)
ffc07174: 94 21 ff e0 stwu r1,-32(r1)
ffc07178: 7d 80 00 26 mfcr r12
ffc0717c: 7c 08 02 a6 mflr r0
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
if (tty->termios.c_lflag & ECHO) {
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
ffc07180: 2e 04 00 00 cmpwi cr4,r4,0
* 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)
ffc07184: bf 61 00 0c stmw r27,12(r1)
rtems_termios_puts ("\b \b", 3, tty);
if (tty->column)
tty->column--;
}
if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) {
rtems_termios_puts ("\b \b", 3, tty);
ffc07188: 3f 80 ff c2 lis r28,-62
/*
* Back up over the tab
*/
while (tty->column > col) {
rtems_termios_puts ("\b", 1, tty);
ffc0718c: 3f 60 ff c2 lis r27,-62
* 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)
ffc07190: 90 01 00 24 stw r0,36(r1)
ffc07194: 7c 7f 1b 78 mr r31,r3
ffc07198: 3f a0 00 00 lis r29,0
ffc0719c: 91 81 00 08 stw r12,8(r1)
rtems_termios_puts ("\b \b", 3, tty);
if (tty->column)
tty->column--;
}
if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) {
rtems_termios_puts ("\b \b", 3, tty);
ffc071a0: 3b 9c d0 fe addi r28,r28,-12034
/*
* Back up over the tab
*/
while (tty->column > col) {
rtems_termios_puts ("\b", 1, tty);
ffc071a4: 3b 7b d1 00 addi r27,r27,-12032
ffc071a8: 48 00 01 74 b ffc0731c <erase.part.2+0x1a8>
}
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
if (tty->termios.c_lflag & ECHO) {
ffc071ac: 81 3f 00 3c lwz r9,60(r31)
return;
}
}
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
ffc071b0: 39 08 ff ff addi r8,r8,-1
ffc071b4: 80 ff 00 1c lwz r7,28(r31)
if (tty->termios.c_lflag & ECHO) {
ffc071b8: 71 25 00 08 andi. r5,r9,8
return;
}
}
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
ffc071bc: 91 1f 00 20 stw r8,32(r31)
ffc071c0: 7f c7 40 ae lbzx r30,r7,r8
if (tty->termios.c_lflag & ECHO) {
ffc071c4: 41 82 01 54 beq- ffc07318 <erase.part.2+0x1a4> <== NEVER TAKEN
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
ffc071c8: 40 92 00 30 bne- cr4,ffc071f8 <erase.part.2+0x84>
ffc071cc: 71 2a 00 10 andi. r10,r9,16
ffc071d0: 40 a2 00 28 bne+ ffc071f8 <erase.part.2+0x84> <== ALWAYS TAKEN
}
}
if (!lineFlag)
break;
}
}
ffc071d4: 80 01 00 24 lwz r0,36(r1) <== 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);
ffc071d8: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED
}
}
if (!lineFlag)
break;
}
}
ffc071dc: 81 81 00 08 lwz r12,8(r1) <== NOT EXECUTED
ffc071e0: 7c 08 03 a6 mtlr r0 <== 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);
ffc071e4: 88 7f 00 43 lbz r3,67(r31) <== NOT EXECUTED
}
}
if (!lineFlag)
break;
}
}
ffc071e8: 7d 80 81 20 mtcrf 8,r12 <== NOT EXECUTED
ffc071ec: bb 61 00 0c lmw r27,12(r1) <== NOT EXECUTED
ffc071f0: 38 21 00 20 addi r1,r1,32 <== 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);
ffc071f4: 4b ff fe f0 b ffc070e4 <echo> <== NOT EXECUTED
} else if (c == '\t') {
ffc071f8: 2f 9e 00 09 cmpwi cr7,r30,9
ffc071fc: 40 be 00 94 bne+ cr7,ffc07290 <erase.part.2+0x11c>
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)
ffc07200: 39 08 00 01 addi r8,r8,1
if (tty->termios.c_lflag & ECHO) {
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
echo (tty->termios.c_cc[VERASE], tty);
} else if (c == '\t') {
int col = tty->read_start_column;
ffc07204: 83 df 00 2c lwz r30,44(r31)
*/
while (i != tty->ccount) {
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
} else if (iscntrl (c)) {
ffc07208: 80 dd 27 e0 lwz r6,10208(r29)
if (tty->termios.c_lflag & ECHO) {
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
echo (tty->termios.c_cc[VERASE], tty);
} else if (c == '\t') {
int col = tty->read_start_column;
int i = 0;
ffc0720c: 39 40 00 00 li r10,0
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)
ffc07210: 71 25 02 00 andi. r5,r9,512
ffc07214: 7d 09 03 a6 mtctr r8
ffc07218: 48 00 00 44 b ffc0725c <erase.part.2+0xe8>
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
c = tty->cbuf[i++];
ffc0721c: 7d 07 50 ae lbzx r8,r7,r10
ffc07220: 39 4a 00 01 addi r10,r10,1
if (c == '\t') {
ffc07224: 2f 88 00 09 cmpwi cr7,r8,9
ffc07228: 40 be 00 0c bne+ cr7,ffc07234 <erase.part.2+0xc0>
col = (col | 7) + 1;
ffc0722c: 63 de 00 07 ori r30,r30,7
ffc07230: 48 00 00 28 b ffc07258 <erase.part.2+0xe4>
} else if (iscntrl (c)) {
ffc07234: 7d 06 42 14 add r8,r6,r8
ffc07238: 89 08 00 01 lbz r8,1(r8)
ffc0723c: 55 08 06 b4 rlwinm r8,r8,0,26,26
ffc07240: 55 09 06 3e clrlwi r9,r8,24
ffc07244: 2f 89 00 00 cmpwi cr7,r9,0
ffc07248: 41 9e 00 10 beq- cr7,ffc07258 <erase.part.2+0xe4> <== ALWAYS TAKEN
if (tty->termios.c_lflag & ECHOCTL)
ffc0724c: 41 82 00 10 beq- ffc0725c <erase.part.2+0xe8> <== NOT EXECUTED
col += 2;
ffc07250: 3b de 00 02 addi r30,r30,2 <== NOT EXECUTED
ffc07254: 48 00 00 08 b ffc0725c <erase.part.2+0xe8> <== NOT EXECUTED
} else {
col++;
ffc07258: 3b de 00 01 addi r30,r30,1
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
ffc0725c: 42 00 ff c0 bdnz+ ffc0721c <erase.part.2+0xa8>
ffc07260: 48 00 00 20 b ffc07280 <erase.part.2+0x10c>
/*
* Back up over the tab
*/
while (tty->column > col) {
rtems_termios_puts ("\b", 1, tty);
ffc07264: 7f 63 db 78 mr r3,r27
ffc07268: 38 80 00 01 li r4,1
ffc0726c: 7f e5 fb 78 mr r5,r31
ffc07270: 4b ff fb d5 bl ffc06e44 <rtems_termios_puts>
tty->column--;
ffc07274: 81 3f 00 28 lwz r9,40(r31)
ffc07278: 39 29 ff ff addi r9,r9,-1
ffc0727c: 91 3f 00 28 stw r9,40(r31)
}
/*
* Back up over the tab
*/
while (tty->column > col) {
ffc07280: 81 3f 00 28 lwz r9,40(r31)
ffc07284: 7f 89 f0 00 cmpw cr7,r9,r30
ffc07288: 41 9d ff dc bgt+ cr7,ffc07264 <erase.part.2+0xf0>
ffc0728c: 48 00 00 8c b ffc07318 <erase.part.2+0x1a4>
rtems_termios_puts ("\b", 1, tty);
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
ffc07290: 81 5d 27 e0 lwz r10,10208(r29)
ffc07294: 3b de 00 01 addi r30,r30,1
ffc07298: 7d 4a f0 ae lbzx r10,r10,r30
ffc0729c: 55 4a 06 b4 rlwinm r10,r10,0,26,26
ffc072a0: 71 45 00 ff andi. r5,r10,255
ffc072a4: 41 82 00 30 beq- ffc072d4 <erase.part.2+0x160> <== ALWAYS TAKEN
ffc072a8: 71 28 02 00 andi. r8,r9,512 <== NOT EXECUTED
ffc072ac: 41 a2 00 28 beq+ ffc072d4 <erase.part.2+0x160> <== NOT EXECUTED
rtems_termios_puts ("\b \b", 3, tty);
ffc072b0: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED
ffc072b4: 38 80 00 03 li r4,3 <== NOT EXECUTED
ffc072b8: 7f e5 fb 78 mr r5,r31 <== NOT EXECUTED
ffc072bc: 4b ff fb 89 bl ffc06e44 <rtems_termios_puts> <== NOT EXECUTED
if (tty->column)
ffc072c0: 81 3f 00 28 lwz r9,40(r31) <== NOT EXECUTED
ffc072c4: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED
ffc072c8: 41 9e 00 0c beq- cr7,ffc072d4 <erase.part.2+0x160> <== NOT EXECUTED
tty->column--;
ffc072cc: 39 29 ff ff addi r9,r9,-1 <== NOT EXECUTED
ffc072d0: 91 3f 00 28 stw r9,40(r31) <== NOT EXECUTED
}
if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) {
ffc072d4: 81 3d 27 e0 lwz r9,10208(r29)
ffc072d8: 7d 29 f0 ae lbzx r9,r9,r30
ffc072dc: 55 29 06 b4 rlwinm r9,r9,0,26,26
ffc072e0: 71 2a 00 ff andi. r10,r9,255
ffc072e4: 41 82 00 10 beq- ffc072f4 <erase.part.2+0x180> <== ALWAYS TAKEN
ffc072e8: 81 3f 00 3c lwz r9,60(r31) <== NOT EXECUTED
ffc072ec: 71 25 02 00 andi. r5,r9,512 <== NOT EXECUTED
ffc072f0: 41 82 00 28 beq- ffc07318 <erase.part.2+0x1a4> <== NOT EXECUTED
rtems_termios_puts ("\b \b", 3, tty);
ffc072f4: 7f 83 e3 78 mr r3,r28
ffc072f8: 38 80 00 03 li r4,3
ffc072fc: 7f e5 fb 78 mr r5,r31
ffc07300: 4b ff fb 45 bl ffc06e44 <rtems_termios_puts>
if (tty->column)
ffc07304: 81 3f 00 28 lwz r9,40(r31)
ffc07308: 2f 89 00 00 cmpwi cr7,r9,0
ffc0730c: 41 9e 00 0c beq- cr7,ffc07318 <erase.part.2+0x1a4> <== NEVER TAKEN
tty->column--;
ffc07310: 39 29 ff ff addi r9,r9,-1
ffc07314: 91 3f 00 28 stw r9,40(r31)
}
}
}
if (!lineFlag)
ffc07318: 41 92 00 10 beq- cr4,ffc07328 <erase.part.2+0x1b4>
echo ('\n', tty);
return;
}
}
while (tty->ccount) {
ffc0731c: 81 1f 00 20 lwz r8,32(r31)
ffc07320: 2f 88 00 00 cmpwi cr7,r8,0
ffc07324: 40 9e fe 88 bne+ cr7,ffc071ac <erase.part.2+0x38>
}
}
if (!lineFlag)
break;
}
}
ffc07328: 81 81 00 08 lwz r12,8(r1)
ffc0732c: 39 61 00 20 addi r11,r1,32
ffc07330: 7d 80 81 20 mtcrf 8,r12
ffc07334: 4b ff 92 80 b ffc005b4 <_restgpr_27_x>
ffc13ba8 <fat_buf_access>:
int
fat_buf_access(fat_fs_info_t *fs_info,
const uint32_t sec_num,
const int op_type,
uint8_t **sec_buf)
{
ffc13ba8: 94 21 ff d8 stwu r1,-40(r1)
ffc13bac: 7c 08 02 a6 mflr r0
ffc13bb0: bf 61 00 14 stmw r27,20(r1)
ffc13bb4: 7c 9e 23 78 mr r30,r4
ffc13bb8: 7c 7f 1b 78 mr r31,r3
ffc13bbc: 90 01 00 2c stw r0,44(r1)
ffc13bc0: 7c bb 2b 78 mr r27,r5
ffc13bc4: 7c dd 33 78 mr r29,r6
static inline uint32_t
fat_sector_num_to_block_num (const fat_fs_info_t *fs_info,
const uint32_t sector_number)
{
return sector_number >> (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2);
ffc13bc8: 89 23 00 02 lbz r9,2(r3)
ffc13bcc: 89 43 00 0c lbz r10,12(r3)
ffc13bd0: 7d 49 50 50 subf r10,r9,r10
ffc13bd4: 7c 84 54 30 srw r4,r4,r10
static inline uint32_t
fat_block_num_to_sector_num (const fat_fs_info_t *fs_info,
const uint32_t block_number)
{
return block_number << (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2);
ffc13bd8: 7c 9c 50 30 slw r28,r4,r10
fat_sector_offset_to_block_offset (const fat_fs_info_t *fs_info,
const uint32_t sector,
const uint32_t sector_offset)
{
return sector_offset +
((sector -
ffc13bdc: 7f 9c f0 50 subf r28,r28,r30
fat_block_num_to_sector_num (fs_info,
fat_sector_num_to_block_num (fs_info, sector)))
<< fs_info->vol.sec_log2);
ffc13be0: 7f 9c 48 30 slw r28,r28,r9
sec_num);
uint32_t blk_ofs = fat_sector_offset_to_block_offset (fs_info,
sec_num,
0);
if (fs_info->c.state == FAT_CACHE_EMPTY || fs_info->c.blk_num != sec_num)
ffc13be4: 89 23 00 89 lbz r9,137(r3)
ffc13be8: 2f 89 00 00 cmpwi cr7,r9,0
ffc13bec: 41 9e 00 10 beq- cr7,ffc13bfc <fat_buf_access+0x54>
ffc13bf0: 81 23 00 84 lwz r9,132(r3)
ffc13bf4: 7f 89 f0 00 cmpw cr7,r9,r30
ffc13bf8: 41 9e 00 5c beq- cr7,ffc13c54 <fat_buf_access+0xac>
{
fat_buf_release(fs_info);
ffc13bfc: 7f e3 fb 78 mr r3,r31
ffc13c00: 90 81 00 08 stw r4,8(r1)
ffc13c04: 4b ff fd e5 bl ffc139e8 <fat_buf_release>
if (op_type == FAT_OP_TYPE_READ)
ffc13c08: 2f 9b 00 01 cmpwi cr7,r27,1
ffc13c0c: 80 7f 00 64 lwz r3,100(r31)
ffc13c10: 38 bf 00 8c addi r5,r31,140
ffc13c14: 80 81 00 08 lwz r4,8(r1)
ffc13c18: 40 be 00 0c bne+ cr7,ffc13c24 <fat_buf_access+0x7c>
sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &fs_info->c.buf);
ffc13c1c: 4b ff dc ad bl ffc118c8 <rtems_bdbuf_read>
ffc13c20: 48 00 00 08 b ffc13c28 <fat_buf_access+0x80>
else
sc = rtems_bdbuf_get(fs_info->vol.dd, blk, &fs_info->c.buf);
ffc13c24: 4b ff db cd bl ffc117f0 <rtems_bdbuf_get>
if (sc != RTEMS_SUCCESSFUL)
ffc13c28: 2f 83 00 00 cmpwi cr7,r3,0
ffc13c2c: 41 be 00 18 beq+ cr7,ffc13c44 <fat_buf_access+0x9c> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one(EIO);
ffc13c30: 48 00 84 b9 bl ffc1c0e8 <__errno> <== NOT EXECUTED
ffc13c34: 39 20 00 05 li r9,5 <== NOT EXECUTED
ffc13c38: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED
ffc13c3c: 38 60 ff ff li r3,-1 <== NOT EXECUTED
ffc13c40: 48 00 00 28 b ffc13c68 <fat_buf_access+0xc0> <== NOT EXECUTED
fs_info->c.blk_num = sec_num;
fs_info->c.modified = 0;
fs_info->c.state = FAT_CACHE_ACTUAL;
ffc13c44: 39 20 00 01 li r9,1
sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &fs_info->c.buf);
else
sc = rtems_bdbuf_get(fs_info->vol.dd, blk, &fs_info->c.buf);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
fs_info->c.blk_num = sec_num;
ffc13c48: 93 df 00 84 stw r30,132(r31)
fs_info->c.modified = 0;
ffc13c4c: 98 7f 00 88 stb r3,136(r31)
fs_info->c.state = FAT_CACHE_ACTUAL;
ffc13c50: 99 3f 00 89 stb r9,137(r31)
}
*sec_buf = &fs_info->c.buf->buffer[blk_ofs];
ffc13c54: 81 3f 00 8c lwz r9,140(r31)
return RC_OK;
ffc13c58: 38 60 00 00 li r3,0
rtems_set_errno_and_return_minus_one(EIO);
fs_info->c.blk_num = sec_num;
fs_info->c.modified = 0;
fs_info->c.state = FAT_CACHE_ACTUAL;
}
*sec_buf = &fs_info->c.buf->buffer[blk_ofs];
ffc13c5c: 81 29 00 1c lwz r9,28(r9)
ffc13c60: 7f 89 e2 14 add r28,r9,r28
ffc13c64: 93 9d 00 00 stw r28,0(r29)
return RC_OK;
}
ffc13c68: 39 61 00 28 addi r11,r1,40
ffc13c6c: 4b fe d9 80 b ffc015ec <_restgpr_27_x>
ffc139e8 <fat_buf_release>:
return RC_OK;
}
int
fat_buf_release(fat_fs_info_t *fs_info)
{
ffc139e8: 94 21 ff d8 stwu r1,-40(r1)
ffc139ec: 7c 08 02 a6 mflr r0
ffc139f0: bf a1 00 1c stmw r29,28(r1)
ffc139f4: 7c 7f 1b 78 mr r31,r3
ffc139f8: 90 01 00 2c stw r0,44(r1)
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (fs_info->c.state == FAT_CACHE_EMPTY)
ffc139fc: 89 23 00 89 lbz r9,137(r3)
ffc13a00: 2f 89 00 00 cmpwi cr7,r9,0
ffc13a04: 41 9e 01 98 beq- cr7,ffc13b9c <fat_buf_release+0x1b4>
return RC_OK;
if (fs_info->c.modified)
ffc13a08: 89 23 00 88 lbz r9,136(r3)
ffc13a0c: 2f 89 00 00 cmpwi cr7,r9,0
ffc13a10: 41 9e 01 60 beq- cr7,ffc13b70 <fat_buf_release+0x188>
{
uint32_t sec_num = fs_info->c.blk_num;
ffc13a14: 81 43 00 84 lwz r10,132(r3)
bool sec_of_fat = ((sec_num >= fs_info->vol.fat_loc) &&
ffc13a18: 39 20 00 00 li r9,0
ffc13a1c: a1 03 00 18 lhz r8,24(r3)
ffc13a20: 7f 8a 40 40 cmplw cr7,r10,r8
ffc13a24: 41 9c 00 14 blt- cr7,ffc13a38 <fat_buf_release+0x50>
ffc13a28: 81 23 00 20 lwz r9,32(r3)
ffc13a2c: 7d 29 50 10 subfc r9,r9,r10
ffc13a30: 7d 29 49 10 subfe r9,r9,r9
ffc13a34: 7d 29 00 d0 neg r9,r9
uint32_t blk = fat_sector_num_to_block_num(fs_info, sec_num);
uint32_t blk_ofs = fat_sector_offset_to_block_offset(fs_info,
sec_num,
0);
if (sec_of_fat && !fs_info->vol.mirror)
ffc13a38: 2f 89 00 00 cmpwi cr7,r9,0
uint32_t ino
)
{
return (ino >= fs_info->uino_base);
}
ffc13a3c: 89 1f 00 02 lbz r8,2(r31)
ffc13a40: 88 ff 00 0c lbz r7,12(r31)
uint32_t blk = fat_sector_num_to_block_num(fs_info, sec_num);
uint32_t blk_ofs = fat_sector_offset_to_block_offset(fs_info,
sec_num,
0);
if (sec_of_fat && !fs_info->vol.mirror)
ffc13a44: 7d 3e 4b 78 mr r30,r9
ffc13a48: 41 9e 00 3c beq- cr7,ffc13a84 <fat_buf_release+0x9c>
ffc13a4c: 89 3f 00 54 lbz r9,84(r31)
ffc13a50: 2f 89 00 00 cmpwi cr7,r9,0
ffc13a54: 40 be 00 30 bne+ cr7,ffc13a84 <fat_buf_release+0x9c> <== NEVER TAKEN
ffc13a58: 7c e8 38 50 subf r7,r8,r7
memcpy(fs_info->sec_buf,
fs_info->c.buf->buffer + blk_ofs,
ffc13a5c: 81 3f 00 8c lwz r9,140(r31)
ffc13a60: 7d 46 3c 30 srw r6,r10,r7
uint32_t blk_ofs = fat_sector_offset_to_block_offset(fs_info,
sec_num,
0);
if (sec_of_fat && !fs_info->vol.mirror)
memcpy(fs_info->sec_buf,
ffc13a64: 80 7f 00 90 lwz r3,144(r31)
static inline uint32_t
fat_block_num_to_sector_num (const fat_fs_info_t *fs_info,
const uint32_t block_number)
{
return block_number << (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2);
ffc13a68: 7c c7 38 30 slw r7,r6,r7
ffc13a6c: 80 89 00 1c lwz r4,28(r9)
fat_sector_offset_to_block_offset (const fat_fs_info_t *fs_info,
const uint32_t sector,
const uint32_t sector_offset)
{
return sector_offset +
((sector -
ffc13a70: 7d 47 50 50 subf r10,r7,r10
ffc13a74: a0 bf 00 00 lhz r5,0(r31)
fat_block_num_to_sector_num (fs_info,
fat_sector_num_to_block_num (fs_info, sector)))
<< fs_info->vol.sec_log2);
ffc13a78: 7d 48 40 30 slw r8,r10,r8
ffc13a7c: 7c 84 42 14 add r4,r4,r8
ffc13a80: 48 00 93 49 bl ffc1cdc8 <memcpy>
fs_info->c.buf->buffer + blk_ofs,
fs_info->vol.bps);
sc = rtems_bdbuf_release_modified(fs_info->c.buf);
ffc13a84: 80 7f 00 8c lwz r3,140(r31)
ffc13a88: 4b ff e1 15 bl ffc11b9c <rtems_bdbuf_release_modified>
if (sc != RTEMS_SUCCESSFUL)
ffc13a8c: 2c 03 00 00 cmpwi r3,0
ffc13a90: 41 a2 00 08 beq+ ffc13a98 <fat_buf_release+0xb0> <== ALWAYS TAKEN
ffc13a94: 48 00 00 ec b ffc13b80 <fat_buf_release+0x198> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
fs_info->c.modified = 0;
if (sec_of_fat && !fs_info->vol.mirror)
ffc13a98: 2f 9e 00 00 cmpwi cr7,r30,0
fs_info->vol.bps);
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;
ffc13a9c: 98 7f 00 88 stb r3,136(r31)
if (sec_of_fat && !fs_info->vol.mirror)
ffc13aa0: 41 9e 00 f4 beq- cr7,ffc13b94 <fat_buf_release+0x1ac>
ffc13aa4: 89 3f 00 54 lbz r9,84(r31)
ffc13aa8: 2f 89 00 00 cmpwi cr7,r9,0
ffc13aac: 41 9e 00 b0 beq- cr7,ffc13b5c <fat_buf_release+0x174> <== ALWAYS TAKEN
ffc13ab0: 48 00 00 e4 b ffc13b94 <fat_buf_release+0x1ac> <== NOT EXECUTED
for (i = 1; i < fs_info->vol.fats; i++)
{
rtems_bdbuf_buffer *bd;
sec_num = fs_info->c.blk_num + fs_info->vol.fat_length * i,
ffc13ab4: 81 5f 00 1c lwz r10,28(r31)
ffc13ab8: 81 3f 00 84 lwz r9,132(r31)
ffc13abc: 7d 5e 51 d6 mullw r10,r30,r10
static inline uint32_t
fat_sector_num_to_block_num (const fat_fs_info_t *fs_info,
const uint32_t sector_number)
{
return sector_number >> (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2);
ffc13ac0: 88 7f 00 0c lbz r3,12(r31)
ffc13ac4: 7d 4a 4a 14 add r10,r10,r9
ffc13ac8: 89 3f 00 02 lbz r9,2(r31)
ffc13acc: 7c 69 18 50 subf r3,r9,r3
ffc13ad0: 7d 44 1c 30 srw r4,r10,r3
static inline uint32_t
fat_block_num_to_sector_num (const fat_fs_info_t *fs_info,
const uint32_t block_number)
{
return block_number << (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2);
ffc13ad4: 7c 83 18 30 slw r3,r4,r3
fat_sector_offset_to_block_offset (const fat_fs_info_t *fs_info,
const uint32_t sector,
const uint32_t sector_offset)
{
return sector_offset +
((sector -
ffc13ad8: 7c 63 50 50 subf r3,r3,r10
blk = fat_sector_num_to_block_num(fs_info, sec_num);
blk_ofs = fat_sector_offset_to_block_offset(fs_info,
sec_num,
0);
if (blk_ofs == 0
ffc13adc: 7c 7d 48 31 slw. r29,r3,r9
ffc13ae0: 40 82 00 24 bne- ffc13b04 <fat_buf_release+0x11c>
&& fs_info->vol.bps == fs_info->vol.bytes_per_block)
ffc13ae4: a1 5f 00 00 lhz r10,0(r31)
ffc13ae8: a1 3f 00 0a lhz r9,10(r31)
ffc13aec: 7f 8a 48 00 cmpw cr7,r10,r9
ffc13af0: 40 be 00 14 bne+ cr7,ffc13b04 <fat_buf_release+0x11c>
{
sc = rtems_bdbuf_get(fs_info->vol.dd, blk, &bd);
ffc13af4: 80 7f 00 64 lwz r3,100(r31)
ffc13af8: 38 a1 00 08 addi r5,r1,8
ffc13afc: 4b ff dc f5 bl ffc117f0 <rtems_bdbuf_get>
ffc13b00: 48 00 00 10 b ffc13b10 <fat_buf_release+0x128>
}
else
{
sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &bd);
ffc13b04: 80 7f 00 64 lwz r3,100(r31)
ffc13b08: 38 a1 00 08 addi r5,r1,8
ffc13b0c: 4b ff dd bd bl ffc118c8 <rtems_bdbuf_read>
}
if ( sc != RTEMS_SUCCESSFUL)
ffc13b10: 2f 83 00 00 cmpwi cr7,r3,0
ffc13b14: 41 be 00 08 beq+ cr7,ffc13b1c <fat_buf_release+0x134> <== ALWAYS TAKEN
ffc13b18: 48 00 00 2c b ffc13b44 <fat_buf_release+0x15c> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
memcpy(bd->buffer + blk_ofs, fs_info->sec_buf, fs_info->vol.bps);
ffc13b1c: 81 21 00 08 lwz r9,8(r1)
ffc13b20: 80 9f 00 90 lwz r4,144(r31)
ffc13b24: 80 69 00 1c lwz r3,28(r9)
ffc13b28: a0 bf 00 00 lhz r5,0(r31)
ffc13b2c: 7c 63 ea 14 add r3,r3,r29
ffc13b30: 48 00 92 99 bl ffc1cdc8 <memcpy>
sc = rtems_bdbuf_release_modified(bd);
ffc13b34: 80 61 00 08 lwz r3,8(r1)
ffc13b38: 4b ff e0 65 bl ffc11b9c <rtems_bdbuf_release_modified>
if ( sc != RTEMS_SUCCESSFUL)
ffc13b3c: 2f 83 00 00 cmpwi cr7,r3,0
ffc13b40: 41 be 00 10 beq+ cr7,ffc13b50 <fat_buf_release+0x168> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one(ENOMEM);
ffc13b44: 48 00 85 a5 bl ffc1c0e8 <__errno> <== NOT EXECUTED
ffc13b48: 39 20 00 0c li r9,12 <== NOT EXECUTED
ffc13b4c: 48 00 00 3c b ffc13b88 <fat_buf_release+0x1a0> <== NOT EXECUTED
if (sec_of_fat && !fs_info->vol.mirror)
{
uint8_t i;
for (i = 1; i < fs_info->vol.fats; i++)
ffc13b50: 3b de 00 01 addi r30,r30,1
ffc13b54: 57 de 06 3e clrlwi r30,r30,24
ffc13b58: 48 00 00 08 b ffc13b60 <fat_buf_release+0x178>
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)
ffc13b5c: 3b c0 00 01 li r30,1
{
uint8_t i;
for (i = 1; i < fs_info->vol.fats; i++)
ffc13b60: 89 3f 00 0d lbz r9,13(r31)
ffc13b64: 7f 89 f0 40 cmplw cr7,r9,r30
ffc13b68: 41 9d ff 4c bgt+ cr7,ffc13ab4 <fat_buf_release+0xcc>
ffc13b6c: 48 00 00 28 b ffc13b94 <fat_buf_release+0x1ac>
}
}
}
else
{
sc = rtems_bdbuf_release(fs_info->c.buf);
ffc13b70: 80 63 00 8c lwz r3,140(r3)
ffc13b74: 4b ff df 4d bl ffc11ac0 <rtems_bdbuf_release>
if (sc != RTEMS_SUCCESSFUL)
ffc13b78: 2f 83 00 00 cmpwi cr7,r3,0
ffc13b7c: 41 be 00 18 beq+ cr7,ffc13b94 <fat_buf_release+0x1ac> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one(EIO);
ffc13b80: 48 00 85 69 bl ffc1c0e8 <__errno> <== NOT EXECUTED
ffc13b84: 39 20 00 05 li r9,5 <== NOT EXECUTED
ffc13b88: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED
ffc13b8c: 38 60 ff ff li r3,-1 <== NOT EXECUTED
ffc13b90: 48 00 00 10 b ffc13ba0 <fat_buf_release+0x1b8> <== NOT EXECUTED
}
fs_info->c.state = FAT_CACHE_EMPTY;
ffc13b94: 39 20 00 00 li r9,0
ffc13b98: 99 3f 00 89 stb r9,137(r31)
fat_buf_release(fat_fs_info_t *fs_info)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (fs_info->c.state == FAT_CACHE_EMPTY)
return RC_OK;
ffc13b9c: 38 60 00 00 li r3,0
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
}
fs_info->c.state = FAT_CACHE_EMPTY;
return RC_OK;
}
ffc13ba0: 39 61 00 28 addi r11,r1,40
ffc13ba4: 4b fe da 50 b ffc015f4 <_restgpr_29_x>
ffc13990 <fat_cluster_num_to_block_num>:
fat_cluster_num_to_block_num (const fat_fs_info_t *fs_info,
uint32_t cln)
{
uint32_t blk;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
ffc13990: 2c 04 00 00 cmpwi r4,0
ffc13994: 40 82 00 28 bne- ffc139bc <fat_cluster_num_to_block_num+0x2c>
ffc13998: 89 23 00 0e lbz r9,14(r3)
ffc1399c: 71 2a 00 03 andi. r10,r9,3
ffc139a0: 41 a2 00 1c beq+ ffc139bc <fat_cluster_num_to_block_num+0x2c><== NEVER TAKEN
static inline uint32_t
fat_sector_num_to_block_num (const fat_fs_info_t *fs_info,
const uint32_t sector_number)
{
return sector_number >> (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2);
ffc139a4: 89 43 00 0c lbz r10,12(r3)
ffc139a8: 89 23 00 02 lbz r9,2(r3)
ffc139ac: 80 63 00 20 lwz r3,32(r3)
ffc139b0: 7d 29 50 50 subf r9,r9,r10
ffc139b4: 7c 63 4c 30 srw r3,r3,r9
ffc139b8: 4e 80 00 20 blr
blk = fat_sector_num_to_block_num(fs_info, fs_info->vol.rdir_loc);
else
{
cln -= FAT_RSRVD_CLN;
blk = cln << (fs_info->vol.bpc_log2 - fs_info->vol.bytes_per_block_log2);
ffc139bc: 89 23 00 0c lbz r9,12(r3)
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
blk = fat_sector_num_to_block_num(fs_info, fs_info->vol.rdir_loc);
else
{
cln -= FAT_RSRVD_CLN;
ffc139c0: 39 44 ff fe addi r10,r4,-2
blk = cln << (fs_info->vol.bpc_log2 - fs_info->vol.bytes_per_block_log2);
ffc139c4: 89 03 00 08 lbz r8,8(r3)
ffc139c8: 7d 09 40 50 subf r8,r9,r8
ffc139cc: 7d 4a 40 30 slw r10,r10,r8
ffc139d0: 89 03 00 02 lbz r8,2(r3)
ffc139d4: 80 63 00 34 lwz r3,52(r3)
ffc139d8: 7d 28 48 50 subf r9,r8,r9
ffc139dc: 7c 63 4c 30 srw r3,r3,r9
blk += fat_sector_num_to_block_num(fs_info, fs_info->vol.data_fsec);
ffc139e0: 7c 63 52 14 add r3,r3,r10
}
return blk;
}
ffc139e4: 4e 80 00 20 blr
ffc12ca0 <fat_cluster_num_to_sector_num>:
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)) )
ffc12ca0: 2c 04 00 00 cmpwi r4,0
ffc12ca4: 40 82 00 18 bne- ffc12cbc <fat_cluster_num_to_sector_num+0x1c>
ffc12ca8: 89 23 00 0e lbz r9,14(r3)
ffc12cac: 71 2a 00 03 andi. r10,r9,3
ffc12cb0: 41 a2 00 0c beq+ ffc12cbc <fat_cluster_num_to_sector_num+0x1c><== NEVER TAKEN
return fs_info->vol.rdir_loc;
ffc12cb4: 80 63 00 20 lwz r3,32(r3)
ffc12cb8: 4e 80 00 20 blr
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
ffc12cbc: 89 23 00 05 lbz r9,5(r3)
ffc12cc0: 39 44 ff fe addi r10,r4,-2
ffc12cc4: 7d 4a 48 30 slw r10,r10,r9
ffc12cc8: 81 23 00 34 lwz r9,52(r3)
ffc12ccc: 7c 6a 4a 14 add r3,r10,r9
fs_info->vol.data_fsec);
}
ffc12cd0: 4e 80 00 20 blr
ffc13dc0 <fat_cluster_set>:
fat_fs_info_t *fs_info,
const uint32_t start_cln,
const uint32_t offset,
const uint32_t count,
const uint8_t pattern)
{
ffc13dc0: 94 21 ff c0 stwu r1,-64(r1)
ffc13dc4: 7c 08 02 a6 mflr r0
ffc13dc8: 90 01 00 44 stw r0,68(r1)
ssize_t rc = RC_OK;
uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset));
ffc13dcc: a1 23 00 06 lhz r9,6(r3)
fat_fs_info_t *fs_info,
const uint32_t start_cln,
const uint32_t offset,
const uint32_t count,
const uint8_t pattern)
{
ffc13dd0: be e1 00 1c stmw r23,28(r1)
ffc13dd4: 7c 7f 1b 78 mr r31,r3
ssize_t rc = RC_OK;
uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset));
ffc13dd8: 7d 25 48 50 subf r9,r5,r9
ffc13ddc: 7f 86 48 40 cmplw cr7,r6,r9
fat_fs_info_t *fs_info,
const uint32_t start_cln,
const uint32_t offset,
const uint32_t count,
const uint8_t pattern)
{
ffc13de0: 7c bd 2b 78 mr r29,r5
ffc13de4: 7c f8 3b 78 mr r24,r7
ssize_t rc = RC_OK;
uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset));
ffc13de8: 7c de 33 78 mr r30,r6
ffc13dec: 40 9d 00 08 ble- cr7,ffc13df4 <fat_cluster_set+0x34> <== ALWAYS TAKEN
ffc13df0: 7d 3e 4b 78 mr r30,r9 <== NOT EXECUTED
uint32_t cur_blk = fat_cluster_num_to_block_num(fs_info, start_cln);
ffc13df4: 7f e3 fb 78 mr r3,r31
ffc13df8: 4b ff fb 99 bl ffc13990 <fat_cluster_num_to_block_num>
uint32_t blocks_in_offset = offset >> fs_info->vol.bytes_per_block_log2;
ffc13dfc: 8b 3f 00 0c lbz r25,12(r31)
uint32_t ofs_blk = offset - (blocks_in_offset << fs_info->vol.bytes_per_block_log2);
ssize_t bytes_written = 0;
ffc13e00: 3b 40 00 00 li r26,0
const uint8_t pattern)
{
ssize_t rc = RC_OK;
uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset));
uint32_t cur_blk = fat_cluster_num_to_block_num(fs_info, start_cln);
uint32_t blocks_in_offset = offset >> fs_info->vol.bytes_per_block_log2;
ffc13e04: 7f bb cc 30 srw r27,r29,r25
uint32_t ofs_blk = offset - (blocks_in_offset << fs_info->vol.bytes_per_block_log2);
ffc13e08: 7f 79 c8 30 slw r25,r27,r25
ffc13e0c: 7f 39 e8 50 subf r25,r25,r29
ssize_t bytes_written = 0;
ssize_t ret;
cur_blk += blocks_in_offset;
ffc13e10: 7f 63 da 14 add r27,r3,r27
ffc13e14: 3a e0 00 01 li r23,1
ffc13e18: 48 00 00 9c b ffc13eb4 <fat_cluster_set+0xf4>
while ( (RC_OK == rc)
&& (0 < bytes_to_write))
{
uint32_t c = MIN(bytes_to_write, (fs_info->vol.bytes_per_block - ofs_blk));
ffc13e1c: a1 5f 00 0a lhz r10,10(r31)
ffc13e20: 7d 39 50 50 subf r9,r25,r10
ffc13e24: 7f 89 f0 40 cmplw cr7,r9,r30
ffc13e28: 7d 3d 4b 78 mr r29,r9
ffc13e2c: 40 9d 00 08 ble- cr7,ffc13e34 <fat_cluster_set+0x74> <== ALWAYS TAKEN
ffc13e30: 7f dd f3 78 mr r29,r30 <== NOT EXECUTED
const uint32_t offset,
const uint32_t count,
const uint8_t pattern)
{
int rc = RC_OK;
uint32_t bytes_to_write = MIN(count, (fs_info->vol.bytes_per_block - offset));
ffc13e34: 7f 9d 48 40 cmplw cr7,r29,r9
ffc13e38: 7f bc eb 78 mr r28,r29
ffc13e3c: 40 9d 00 08 ble- cr7,ffc13e44 <fat_cluster_set+0x84> <== ALWAYS TAKEN
ffc13e40: 7d 3c 4b 78 mr r28,r9 <== NOT EXECUTED
uint8_t *blk_buf;
uint32_t sec_num = fat_block_num_to_sector_num(fs_info, start_blk);
if (0 < bytes_to_write)
ffc13e44: 2f 9c 00 00 cmpwi cr7,r28,0
uint32_t ino
)
{
return (ino >= fs_info->uino_base);
}
ffc13e48: 89 3f 00 02 lbz r9,2(r31)
ffc13e4c: 88 9f 00 0c lbz r4,12(r31)
int rc = RC_OK;
uint32_t bytes_to_write = MIN(count, (fs_info->vol.bytes_per_block - offset));
uint8_t *blk_buf;
uint32_t sec_num = fat_block_num_to_sector_num(fs_info, start_blk);
if (0 < bytes_to_write)
ffc13e50: 41 9e 00 7c beq- cr7,ffc13ecc <fat_cluster_set+0x10c> <== NEVER TAKEN
{
if (bytes_to_write == fs_info->vol.bytes_per_block)
ffc13e54: 7f 9c 50 00 cmpw cr7,r28,r10
static inline uint32_t
fat_block_num_to_sector_num (const fat_fs_info_t *fs_info,
const uint32_t block_number)
{
return block_number << (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2);
ffc13e58: 7c 89 20 50 subf r4,r9,r4
ffc13e5c: 7f 64 20 30 slw r4,r27,r4
{
rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &blk_buf);
ffc13e60: 7f e3 fb 78 mr r3,r31
ffc13e64: 38 a0 00 02 li r5,2
uint8_t *blk_buf;
uint32_t sec_num = fat_block_num_to_sector_num(fs_info, start_blk);
if (0 < bytes_to_write)
{
if (bytes_to_write == fs_info->vol.bytes_per_block)
ffc13e68: 41 9e 00 08 beq- cr7,ffc13e70 <fat_cluster_set+0xb0>
{
rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &blk_buf);
}
else
rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &blk_buf);
ffc13e6c: 38 a0 00 01 li r5,1
ffc13e70: 38 c1 00 08 addi r6,r1,8
ffc13e74: 4b ff fd 35 bl ffc13ba8 <fat_buf_access>
if (RC_OK == rc)
ffc13e78: 2f 83 00 00 cmpwi cr7,r3,0
ffc13e7c: 40 be 00 20 bne+ cr7,ffc13e9c <fat_cluster_set+0xdc> <== NEVER TAKEN
{
memset(blk_buf + offset, pattern, bytes_to_write);
ffc13e80: 80 61 00 08 lwz r3,8(r1)
ffc13e84: 7f 04 c3 78 mr r4,r24
ffc13e88: 7f 85 e3 78 mr r5,r28
ffc13e8c: 7c 63 ca 14 add r3,r3,r25
ffc13e90: 48 00 90 2d bl ffc1cebc <memset>
}
static inline void
fat_buf_mark_modified(fat_fs_info_t *fs_info)
{
fs_info->c.modified = true;
ffc13e94: 9a ff 00 88 stb r23,136(r31)
ffc13e98: 48 00 00 34 b ffc13ecc <fat_cluster_set+0x10c>
fs_info,
cur_blk,
ofs_blk,
c,
pattern);
if (c != ret)
ffc13e9c: 7f 9d 18 00 cmpw cr7,r29,r3
ffc13ea0: 40 be 00 24 bne+ cr7,ffc13ec4 <fat_cluster_set+0x104> <== NEVER TAKEN
rc = -1;
else
{
bytes_to_write -= ret;
ffc13ea4: 7f dd f0 50 subf r30,r29,r30
bytes_written += ret;
ffc13ea8: 7f 5a ea 14 add r26,r26,r29
++cur_blk;
ffc13eac: 3b 7b 00 01 addi r27,r27,1
ffc13eb0: 3b 20 00 00 li r25,0
ssize_t ret;
cur_blk += blocks_in_offset;
while ( (RC_OK == rc)
&& (0 < bytes_to_write))
ffc13eb4: 2f 9e 00 00 cmpwi cr7,r30,0
ffc13eb8: 40 9e ff 64 bne+ cr7,ffc13e1c <fat_cluster_set+0x5c>
ffc13ebc: 7f 43 d3 78 mr r3,r26
ffc13ec0: 48 00 00 14 b ffc13ed4 <fat_cluster_set+0x114>
fs_info,
cur_blk,
ofs_blk,
c,
pattern);
if (c != ret)
ffc13ec4: 38 60 ff ff li r3,-1 <== NOT EXECUTED
ffc13ec8: 48 00 00 0c b ffc13ed4 <fat_cluster_set+0x114> <== NOT EXECUTED
}
}
if (RC_OK != rc)
return rc;
else
return bytes_to_write;
ffc13ecc: 7f 83 e3 78 mr r3,r28
ffc13ed0: 4b ff ff cc b ffc13e9c <fat_cluster_set+0xdc>
}
if (RC_OK != rc)
return rc;
else
return bytes_written;
}
ffc13ed4: 39 61 00 40 addi r11,r1,64
ffc13ed8: 4b fe d7 04 b ffc015dc <_restgpr_23_x>
ffc13edc <fat_cluster_write>:
const uint32_t start_cln,
const uint32_t offset,
const uint32_t count,
const void *buff,
const bool overwrite_cluster)
{
ffc13edc: 94 21 ff c0 stwu r1,-64(r1)
ffc13ee0: 7c 08 02 a6 mflr r0
ffc13ee4: 7d 80 00 26 mfcr r12
ffc13ee8: 90 01 00 44 stw r0,68(r1)
ssize_t rc = RC_OK;
uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset));
ffc13eec: a1 23 00 06 lhz r9,6(r3)
const uint32_t start_cln,
const uint32_t offset,
const uint32_t count,
const void *buff,
const bool overwrite_cluster)
{
ffc13ef0: be e1 00 1c stmw r23,28(r1)
ffc13ef4: 7c 7f 1b 78 mr r31,r3
ssize_t rc = RC_OK;
uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset));
ffc13ef8: 7d 25 48 50 subf r9,r5,r9
ffc13efc: 7f 86 48 40 cmplw cr7,r6,r9
const uint32_t start_cln,
const uint32_t offset,
const uint32_t count,
const void *buff,
const bool overwrite_cluster)
{
ffc13f00: 91 81 00 18 stw r12,24(r1)
ffc13f04: 7c bd 2b 78 mr r29,r5
ffc13f08: 7c f8 3b 78 mr r24,r7
ffc13f0c: 7d 1c 43 78 mr r28,r8
ssize_t rc = RC_OK;
uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset));
ffc13f10: 7c de 33 78 mr r30,r6
ffc13f14: 40 9d 00 08 ble- cr7,ffc13f1c <fat_cluster_write+0x40> <== ALWAYS TAKEN
ffc13f18: 7d 3e 4b 78 mr r30,r9 <== NOT EXECUTED
uint32_t cur_blk = fat_cluster_num_to_block_num(fs_info, start_cln);
ffc13f1c: 7f e3 fb 78 mr r3,r31
ffc13f20: 4b ff fa 71 bl ffc13990 <fat_cluster_num_to_block_num>
uint32_t blocks_in_offset = (offset >> fs_info->vol.bytes_per_block_log2);
ffc13f24: 8b 3f 00 0c lbz r25,12(r31)
uint32_t ofs_blk = offset - (blocks_in_offset << fs_info->vol.bytes_per_block_log2);
ssize_t bytes_written = 0;
ffc13f28: 3b 60 00 00 li r27,0
const bool overwrite_cluster)
{
ssize_t rc = RC_OK;
uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset));
uint32_t cur_blk = fat_cluster_num_to_block_num(fs_info, start_cln);
uint32_t blocks_in_offset = (offset >> fs_info->vol.bytes_per_block_log2);
ffc13f2c: 7f ba cc 30 srw r26,r29,r25
uint32_t ofs_blk = offset - (blocks_in_offset << fs_info->vol.bytes_per_block_log2);
ffc13f30: 7f 59 c8 30 slw r25,r26,r25
ffc13f34: 7f 39 e8 50 subf r25,r25,r29
ssize_t bytes_written = 0;
uint8_t *buffer = (uint8_t*)buff;
ssize_t ret;
uint32_t c;
cur_blk += blocks_in_offset;
ffc13f38: 7f 43 d2 14 add r26,r3,r26
uint8_t *blk_buf;
uint32_t sec_num = fat_block_num_to_sector_num(fs_info, start_blk);
if (0 < bytes_to_write)
{
if ( overwrite_block
ffc13f3c: 2e 1c 00 00 cmpwi cr4,r28,0
ffc13f40: 3a e0 00 01 li r23,1
ffc13f44: 48 00 00 a4 b ffc13fe8 <fat_cluster_write+0x10c>
cur_blk += blocks_in_offset;
while ( (RC_OK == rc)
&& (0 < bytes_to_write))
{
c = MIN(bytes_to_write, (fs_info->vol.bytes_per_block - ofs_blk));
ffc13f48: a1 5f 00 0a lhz r10,10(r31)
ffc13f4c: 7d 39 50 50 subf r9,r25,r10
ffc13f50: 7f 89 f0 40 cmplw cr7,r9,r30
ffc13f54: 7d 3d 4b 78 mr r29,r9
ffc13f58: 40 9d 00 08 ble- cr7,ffc13f60 <fat_cluster_write+0x84>
ffc13f5c: 7f dd f3 78 mr r29,r30
const uint32_t count,
const void *buf,
const bool overwrite_block)
{
int rc = RC_OK;
uint32_t bytes_to_write = MIN(count, (fs_info->vol.bytes_per_block - offset));
ffc13f60: 7f 9d 48 40 cmplw cr7,r29,r9
ffc13f64: 7f bc eb 78 mr r28,r29
ffc13f68: 40 9d 00 08 ble- cr7,ffc13f70 <fat_cluster_write+0x94> <== ALWAYS TAKEN
ffc13f6c: 7d 3c 4b 78 mr r28,r9 <== NOT EXECUTED
uint8_t *blk_buf;
uint32_t sec_num = fat_block_num_to_sector_num(fs_info, start_blk);
if (0 < bytes_to_write)
ffc13f70: 2f 9c 00 00 cmpwi cr7,r28,0
uint32_t ino
)
{
return (ino >= fs_info->uino_base);
}
ffc13f74: 89 3f 00 02 lbz r9,2(r31)
ffc13f78: 88 9f 00 0c lbz r4,12(r31)
int rc = RC_OK;
uint32_t bytes_to_write = MIN(count, (fs_info->vol.bytes_per_block - offset));
uint8_t *blk_buf;
uint32_t sec_num = fat_block_num_to_sector_num(fs_info, start_blk);
if (0 < bytes_to_write)
ffc13f7c: 41 9e 00 84 beq- cr7,ffc14000 <fat_cluster_write+0x124> <== NEVER TAKEN
static inline uint32_t
fat_block_num_to_sector_num (const fat_fs_info_t *fs_info,
const uint32_t block_number)
{
return block_number << (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2);
ffc13f80: 7c 89 20 50 subf r4,r9,r4
ffc13f84: 7f 44 20 30 slw r4,r26,r4
{
if ( overwrite_block
|| (bytes_to_write == fs_info->vol.bytes_per_block))
{
rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &blk_buf);
ffc13f88: 7f e3 fb 78 mr r3,r31
uint8_t *blk_buf;
uint32_t sec_num = fat_block_num_to_sector_num(fs_info, start_blk);
if (0 < bytes_to_write)
{
if ( overwrite_block
ffc13f8c: 40 92 00 10 bne- cr4,ffc13f9c <fat_cluster_write+0xc0>
|| (bytes_to_write == fs_info->vol.bytes_per_block))
ffc13f90: 7f 9c 50 00 cmpw cr7,r28,r10
{
rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &blk_buf);
}
else
rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &blk_buf);
ffc13f94: 38 a0 00 01 li r5,1
uint32_t sec_num = fat_block_num_to_sector_num(fs_info, start_blk);
if (0 < bytes_to_write)
{
if ( overwrite_block
|| (bytes_to_write == fs_info->vol.bytes_per_block))
ffc13f98: 40 9e 00 0c bne- cr7,ffc13fa4 <fat_cluster_write+0xc8>
{
rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &blk_buf);
ffc13f9c: 38 a0 00 02 li r5,2
ffc13fa0: 48 00 00 04 b ffc13fa4 <fat_cluster_write+0xc8>
}
else
rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &blk_buf);
ffc13fa4: 38 c1 00 08 addi r6,r1,8
ffc13fa8: 4b ff fc 01 bl ffc13ba8 <fat_buf_access>
if (RC_OK == rc)
ffc13fac: 2f 83 00 00 cmpwi cr7,r3,0
ffc13fb0: 40 be 00 20 bne+ cr7,ffc13fd0 <fat_cluster_write+0xf4> <== NEVER TAKEN
{
memcpy(blk_buf + offset, buf, bytes_to_write);
ffc13fb4: 80 61 00 08 lwz r3,8(r1)
ffc13fb8: 7c 98 da 14 add r4,r24,r27
ffc13fbc: 7f 85 e3 78 mr r5,r28
ffc13fc0: 7c 63 ca 14 add r3,r3,r25
ffc13fc4: 48 00 8e 05 bl ffc1cdc8 <memcpy>
}
static inline void
fat_buf_mark_modified(fat_fs_info_t *fs_info)
{
fs_info->c.modified = true;
ffc13fc8: 9a ff 00 88 stb r23,136(r31)
ffc13fcc: 48 00 00 34 b ffc14000 <fat_cluster_write+0x124>
cur_blk,
ofs_blk,
c,
&buffer[bytes_written],
overwrite_cluster);
if (c != ret)
ffc13fd0: 7f 9d 18 00 cmpw cr7,r29,r3
ffc13fd4: 40 be 00 24 bne+ cr7,ffc13ff8 <fat_cluster_write+0x11c> <== NEVER TAKEN
rc = -1;
else
{
bytes_to_write -= ret;
ffc13fd8: 7f dd f0 50 subf r30,r29,r30
bytes_written += ret;
ffc13fdc: 7f 7b ea 14 add r27,r27,r29
++cur_blk;
ffc13fe0: 3b 5a 00 01 addi r26,r26,1
ffc13fe4: 3b 20 00 00 li r25,0
uint32_t c;
cur_blk += blocks_in_offset;
while ( (RC_OK == rc)
&& (0 < bytes_to_write))
ffc13fe8: 2f 9e 00 00 cmpwi cr7,r30,0
ffc13fec: 40 9e ff 5c bne+ cr7,ffc13f48 <fat_cluster_write+0x6c>
ffc13ff0: 7f 63 db 78 mr r3,r27
ffc13ff4: 48 00 00 14 b ffc14008 <fat_cluster_write+0x12c>
cur_blk,
ofs_blk,
c,
&buffer[bytes_written],
overwrite_cluster);
if (c != ret)
ffc13ff8: 38 60 ff ff li r3,-1 <== NOT EXECUTED
ffc13ffc: 48 00 00 0c b ffc14008 <fat_cluster_write+0x12c> <== NOT EXECUTED
}
}
if (RC_OK != rc)
return rc;
else
return bytes_to_write;
ffc14000: 7f 83 e3 78 mr r3,r28
ffc14004: 4b ff ff cc b ffc13fd0 <fat_cluster_write+0xf4>
}
if (RC_OK != rc)
return rc;
else
return bytes_written;
}
ffc14008: 81 81 00 18 lwz r12,24(r1)
ffc1400c: 39 61 00 40 addi r11,r1,64
ffc14010: 7d 80 81 20 mtcrf 8,r12
ffc14014: 4b fe d5 c8 b ffc015dc <_restgpr_23_x>
ffc13254 <fat_file_close>:
int
fat_file_close(
fat_fs_info_t *fs_info,
fat_file_fd_t *fat_fd
)
{
ffc13254: 94 21 ff e8 stwu r1,-24(r1)
ffc13258: 7c 08 02 a6 mflr r0
ffc1325c: 90 01 00 1c stw r0,28(r1)
/*
* 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)
ffc13260: 81 24 00 08 lwz r9,8(r4)
int
fat_file_close(
fat_fs_info_t *fs_info,
fat_file_fd_t *fat_fd
)
{
ffc13264: bf a1 00 0c stmw r29,12(r1)
ffc13268: 7c 9f 23 78 mr r31,r4
/*
* 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)
ffc1326c: 2b 89 00 01 cmplwi cr7,r9,1
ffc13270: 40 9d 00 14 ble- cr7,ffc13284 <fat_file_close+0x30>
{
fat_fd->links_num--;
ffc13274: 39 29 ff ff addi r9,r9,-1
ffc13278: 91 24 00 08 stw r9,8(r4)
return rc;
ffc1327c: 38 60 00 00 li r3,0
ffc13280: 48 00 00 90 b ffc13310 <fat_file_close+0xbc>
}
key = fat_construct_key(fs_info, &fat_fd->dir_pos.sname);
if (fat_fd->flags & FAT_FILE_REMOVED)
ffc13284: 89 24 00 30 lbz r9,48(r4)
ffc13288: 7c 7e 1b 78 mr r30,r3
ffc1328c: 71 3d 00 01 andi. r29,r9,1
ffc13290: 41 82 00 40 beq- ffc132d0 <fat_file_close+0x7c>
{
rc = fat_file_truncate(fs_info, fat_fd, 0);
ffc13294: 38 a0 00 00 li r5,0
ffc13298: 4b ff fe a9 bl ffc13140 <fat_file_truncate>
if ( rc != RC_OK )
ffc1329c: 2c 03 00 00 cmpwi r3,0
ffc132a0: 40 a2 00 70 bne+ ffc13310 <fat_file_close+0xbc> <== NEVER TAKEN
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
ffc132a4: 7f e3 fb 78 mr r3,r31
ffc132a8: 48 00 3a e9 bl ffc16d90 <_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) )
ffc132ac: 80 9f 00 0c lwz r4,12(r31)
ffc132b0: 7f c3 f3 78 mr r3,r30
ffc132b4: 48 00 17 e5 bl ffc14a98 <fat_ino_is_unique>
ffc132b8: 2f 83 00 00 cmpwi cr7,r3,0
ffc132bc: 41 be 00 34 beq+ cr7,ffc132f0 <fat_file_close+0x9c> <== ALWAYS TAKEN
fat_free_unique_ino(fs_info, fat_fd->ino);
ffc132c0: 80 9f 00 0c lwz r4,12(r31) <== NOT EXECUTED
ffc132c4: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc132c8: 48 00 17 a5 bl ffc14a6c <fat_free_unique_ino> <== NOT EXECUTED
ffc132cc: 48 00 00 24 b ffc132f0 <fat_file_close+0x9c> <== NOT EXECUTED
free(fat_fd);
}
else
{
if (fat_ino_is_unique(fs_info, fat_fd->ino))
ffc132d0: 80 84 00 0c lwz r4,12(r4)
ffc132d4: 48 00 17 c5 bl ffc14a98 <fat_ino_is_unique>
ffc132d8: 2f 83 00 00 cmpwi cr7,r3,0
ffc132dc: 41 9e 00 0c beq- cr7,ffc132e8 <fat_file_close+0x94>
{
fat_fd->links_num = 0;
ffc132e0: 93 bf 00 08 stw r29,8(r31)
ffc132e4: 48 00 00 14 b ffc132f8 <fat_file_close+0xa4>
ffc132e8: 7f e3 fb 78 mr r3,r31
ffc132ec: 48 00 3a a5 bl ffc16d90 <_Chain_Extract>
}
else
{
_hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd);
free(fat_fd);
ffc132f0: 7f e3 fb 78 mr r3,r31
ffc132f4: 4b ff 29 e9 bl ffc05cdc <free>
* flush any modified "cached" buffer back to disk
*/
rc = fat_buf_release(fs_info);
return rc;
}
ffc132f8: 80 01 00 1c lwz r0,28(r1)
}
}
/*
* flush any modified "cached" buffer back to disk
*/
rc = fat_buf_release(fs_info);
ffc132fc: 7f c3 f3 78 mr r3,r30
return rc;
}
ffc13300: bb a1 00 0c lmw r29,12(r1)
ffc13304: 7c 08 03 a6 mtlr r0
ffc13308: 38 21 00 18 addi r1,r1,24
}
}
/*
* flush any modified "cached" buffer back to disk
*/
rc = fat_buf_release(fs_info);
ffc1330c: 48 00 06 dc b ffc139e8 <fat_buf_release>
return rc;
}
ffc13310: 39 61 00 18 addi r11,r1,24
ffc13314: 4b fe e2 e0 b ffc015f4 <_restgpr_29_x>
ffc133ec <fat_file_extend>:
fat_file_fd_t *fat_fd,
bool zero_fill,
uint32_t new_length,
uint32_t *a_length
)
{
ffc133ec: 94 21 ff c0 stwu r1,-64(r1)
ffc133f0: 7c 08 02 a6 mflr r0
int rc = RC_OK;
uint32_t chain = 0;
ffc133f4: 39 20 00 00 li r9,0
fat_file_fd_t *fat_fd,
bool zero_fill,
uint32_t new_length,
uint32_t *a_length
)
{
ffc133f8: be e1 00 1c stmw r23,28(r1)
ffc133fc: 7c f8 3b 78 mr r24,r7
ffc13400: 7c 9e 23 78 mr r30,r4
ffc13404: 90 01 00 44 stw r0,68(r1)
ffc13408: 7c dc 33 78 mr r28,r6
uint32_t last_cl = 0;
uint32_t bytes_remain = 0;
uint32_t cls_added;
ssize_t bytes_written;
*a_length = new_length;
ffc1340c: 90 d8 00 00 stw r6,0(r24)
uint32_t new_length,
uint32_t *a_length
)
{
int rc = RC_OK;
uint32_t chain = 0;
ffc13410: 91 21 00 14 stw r9,20(r1)
uint32_t bytes2add = 0;
uint32_t cls2add = 0;
uint32_t old_last_cl;
uint32_t last_cl = 0;
ffc13414: 91 21 00 0c stw r9,12(r1)
uint32_t cls_added;
ssize_t bytes_written;
*a_length = new_length;
if (new_length <= fat_fd->fat_file_size)
ffc13418: 81 24 00 18 lwz r9,24(r4)
ffc1341c: 7f 86 48 40 cmplw cr7,r6,r9
ffc13420: 41 bd 00 0c bgt+ cr7,ffc1342c <fat_file_extend+0x40>
return RC_OK;
ffc13424: 3b a0 00 00 li r29,0
ffc13428: 48 00 02 04 b ffc1362c <fat_file_extend+0x240>
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
ffc1342c: 81 44 00 20 lwz r10,32(r4)
ffc13430: 7c 7f 1b 78 mr r31,r3
ffc13434: 7c b7 2b 78 mr r23,r5
ffc13438: 2f 8a 00 01 cmpwi cr7,r10,1
ffc1343c: 40 be 00 20 bne+ cr7,ffc1345c <fat_file_extend+0x70>
ffc13440: 81 44 00 24 lwz r10,36(r4)
ffc13444: 2f 8a 00 00 cmpwi cr7,r10,0
ffc13448: 40 9e 00 14 bne- cr7,ffc1345c <fat_file_extend+0x70> <== NEVER TAKEN
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
ffc1344c: 89 43 00 0e lbz r10,14(r3)
*a_length = new_length;
if (new_length <= fat_fd->fat_file_size)
return RC_OK;
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
ffc13450: 71 48 00 03 andi. r8,r10,3
ffc13454: 41 a2 00 08 beq+ ffc1345c <fat_file_extend+0x70> <== NEVER TAKEN
ffc13458: 48 00 00 c8 b ffc13520 <fat_file_extend+0x134>
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
rtems_set_errno_and_return_minus_one( ENOSPC );
bytes_remain = (fs_info->vol.bpc -
ffc1345c: a3 7f 00 06 lhz r27,6(r31)
bytes2add = new_length - fat_fd->fat_file_size;
if (bytes2add > bytes_remain)
bytes2add -= bytes_remain;
else
bytes2add = 0;
ffc13460: 3b 40 00 00 li r26,0
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
rtems_set_errno_and_return_minus_one( ENOSPC );
bytes_remain = (fs_info->vol.bpc -
(fat_fd->fat_file_size & (fs_info->vol.bpc - 1))) &
ffc13464: 39 5b ff ff addi r10,r27,-1
ffc13468: 7d 59 48 38 and r25,r10,r9
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 -
ffc1346c: 7f 79 d8 50 subf r27,r25,r27
ffc13470: 7f 7b 50 38 and r27,r27,r10
(fat_fd->fat_file_size & (fs_info->vol.bpc - 1))) &
(fs_info->vol.bpc - 1);
bytes2add = new_length - fat_fd->fat_file_size;
ffc13474: 7d 49 e0 50 subf r10,r9,r28
if (bytes2add > bytes_remain)
ffc13478: 7f 8a d8 40 cmplw cr7,r10,r27
ffc1347c: 40 9d 00 08 ble- cr7,ffc13484 <fat_file_extend+0x98>
bytes2add -= bytes_remain;
ffc13480: 7f 5b 50 50 subf r26,r27,r10
else
bytes2add = 0;
if (zero_fill && bytes_remain > 0) {
ffc13484: 2f 97 00 00 cmpwi cr7,r23,0
ffc13488: 41 9e 00 50 beq- cr7,ffc134d8 <fat_file_extend+0xec>
ffc1348c: 2f 9b 00 00 cmpwi cr7,r27,0
ffc13490: 41 be 00 48 beq+ cr7,ffc134d8 <fat_file_extend+0xec>
uint32_t start = fat_fd->fat_file_size;
uint32_t cl_start = start >> fs_info->vol.bpc_log2;
ffc13494: 88 bf 00 08 lbz r5,8(r31)
uint32_t ofs = start & (fs_info->vol.bpc - 1);
uint32_t cur_cln;
rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln);
ffc13498: 7f e3 fb 78 mr r3,r31
ffc1349c: 7f c4 f3 78 mr r4,r30
ffc134a0: 7d 25 2c 30 srw r5,r9,r5
ffc134a4: 38 c1 00 08 addi r6,r1,8
ffc134a8: 4b ff f8 85 bl ffc12d2c <fat_file_lseek>
if (rc != RC_OK)
ffc134ac: 7c 9d 23 79 mr. r29,r4
ffc134b0: 40 a2 01 7c bne+ ffc1362c <fat_file_extend+0x240> <== NEVER TAKEN
return rc;
bytes_written = fat_cluster_set (fs_info, cur_cln, ofs, bytes_remain, 0);
ffc134b4: 80 81 00 08 lwz r4,8(r1)
ffc134b8: 7f e3 fb 78 mr r3,r31
ffc134bc: 7f 25 cb 78 mr r5,r25
ffc134c0: 7f 66 db 78 mr r6,r27
ffc134c4: 38 e0 00 00 li r7,0
ffc134c8: 48 00 08 f9 bl ffc13dc0 <fat_cluster_set>
if (bytes_remain != bytes_written)
return -1;
ffc134cc: 3b a0 ff ff li r29,-1
rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln);
if (rc != RC_OK)
return rc;
bytes_written = fat_cluster_set (fs_info, cur_cln, ofs, bytes_remain, 0);
if (bytes_remain != bytes_written)
ffc134d0: 7f 9b 18 00 cmpw cr7,r27,r3
ffc134d4: 40 be 01 58 bne+ cr7,ffc1362c <fat_file_extend+0x240> <== 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)
ffc134d8: 2f 9a 00 00 cmpwi cr7,r26,0
ffc134dc: 41 9e ff 48 beq+ cr7,ffc13424 <fat_file_extend+0x38>
return RC_OK;
cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1;
ffc134e0: 89 3f 00 08 lbz r9,8(r31)
ffc134e4: 3b 3a ff ff addi r25,r26,-1
rc = fat_scan_fat_for_free_clusters(fs_info, &chain, cls2add,
ffc134e8: 7f e3 fb 78 mr r3,r31
* file ) - return
*/
if (bytes2add == 0)
return RC_OK;
cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1;
ffc134ec: 7f 39 4c 30 srw r25,r25,r9
ffc134f0: 3b 39 00 01 addi r25,r25,1
rc = fat_scan_fat_for_free_clusters(fs_info, &chain, cls2add,
ffc134f4: 38 81 00 14 addi r4,r1,20
ffc134f8: 7f 25 cb 78 mr r5,r25
ffc134fc: 38 c1 00 08 addi r6,r1,8
ffc13500: 38 e1 00 0c addi r7,r1,12
ffc13504: 7e e8 bb 78 mr r8,r23
ffc13508: 48 00 70 b1 bl ffc1a5b8 <fat_scan_fat_for_free_clusters>
&cls_added, &last_cl, zero_fill);
/* this means that low level I/O error occured */
if (rc != RC_OK)
ffc1350c: 7c 7d 1b 79 mr. r29,r3
ffc13510: 40 82 01 1c bne- ffc1362c <fat_file_extend+0x240> <== NEVER TAKEN
return rc;
/* this means that no space left on device */
if ((cls_added == 0) && (bytes_remain == 0))
ffc13514: 81 21 00 08 lwz r9,8(r1)
ffc13518: 7f 6a 4b 79 or. r10,r27,r9
ffc1351c: 40 a2 00 18 bne+ ffc13534 <fat_file_extend+0x148> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one(ENOSPC);
ffc13520: 48 00 8b c9 bl ffc1c0e8 <__errno>
ffc13524: 39 20 00 1c li r9,28
ffc13528: 91 23 00 00 stw r9,0(r3)
ffc1352c: 3b a0 ff ff li r29,-1
ffc13530: 48 00 00 fc b ffc1362c <fat_file_extend+0x240>
/* check wether we satisfied request for 'cls2add' clusters */
if (cls2add != cls_added)
ffc13534: 7f 99 48 00 cmpw cr7,r25,r9
ffc13538: 41 9e 00 24 beq- cr7,ffc1355c <fat_file_extend+0x170> <== ALWAYS TAKEN
{
new_length -= bytes2add & (fs_info->vol.bpc - 1);
ffc1353c: a1 5f 00 06 lhz r10,6(r31) <== NOT EXECUTED
new_length -= (cls2add - cls_added) << fs_info->vol.bpc_log2;
ffc13540: 7d 29 c8 50 subf r9,r9,r25 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOSPC);
/* check wether we satisfied request for 'cls2add' clusters */
if (cls2add != cls_added)
{
new_length -= bytes2add & (fs_info->vol.bpc - 1);
ffc13544: 39 4a ff ff addi r10,r10,-1 <== NOT EXECUTED
ffc13548: 7f 5a 50 38 and r26,r26,r10 <== NOT EXECUTED
new_length -= (cls2add - cls_added) << fs_info->vol.bpc_log2;
ffc1354c: 89 5f 00 08 lbz r10,8(r31) <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOSPC);
/* check wether we satisfied request for 'cls2add' clusters */
if (cls2add != cls_added)
{
new_length -= bytes2add & (fs_info->vol.bpc - 1);
ffc13550: 7f 9a e0 50 subf r28,r26,r28 <== NOT EXECUTED
new_length -= (cls2add - cls_added) << fs_info->vol.bpc_log2;
ffc13554: 7d 29 50 30 slw r9,r9,r10 <== NOT EXECUTED
ffc13558: 7f 89 e0 50 subf r28,r9,r28 <== NOT EXECUTED
}
/* add new chain to the end of existed */
if ( fat_fd->fat_file_size == 0 )
ffc1355c: 80 de 00 18 lwz r6,24(r30)
ffc13560: 2f 86 00 00 cmpwi cr7,r6,0
ffc13564: 40 9e 00 18 bne- cr7,ffc1357c <fat_file_extend+0x190>
{
fat_fd->map.disk_cln = fat_fd->cln = chain;
ffc13568: 81 21 00 14 lwz r9,20(r1)
fat_fd->map.file_cln = 0;
ffc1356c: 90 de 00 34 stw r6,52(r30)
}
/* add new chain to the end of existed */
if ( fat_fd->fat_file_size == 0 )
{
fat_fd->map.disk_cln = fat_fd->cln = chain;
ffc13570: 91 3e 00 1c stw r9,28(r30)
ffc13574: 91 3e 00 38 stw r9,56(r30)
ffc13578: 48 00 00 64 b ffc135dc <fat_file_extend+0x1f0>
fat_fd->map.file_cln = 0;
}
else
{
if (fat_fd->map.last_cln != FAT_UNDEFINED_VALUE)
ffc1357c: 81 3e 00 3c lwz r9,60(r30)
ffc13580: 2f 89 ff ff cmpwi cr7,r9,-1
ffc13584: 41 9e 00 0c beq- cr7,ffc13590 <fat_file_extend+0x1a4> <== NEVER TAKEN
{
old_last_cl = fat_fd->map.last_cln;
ffc13588: 91 21 00 10 stw r9,16(r1)
ffc1358c: 48 00 00 2c b ffc135b8 <fat_file_extend+0x1cc>
}
else
{
rc = fat_file_ioctl(fs_info, fat_fd, F_CLU_NUM,
ffc13590: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc13594: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED
ffc13598: 38 a0 00 01 li r5,1 <== NOT EXECUTED
ffc1359c: 38 c6 ff ff addi r6,r6,-1 <== NOT EXECUTED
ffc135a0: 38 e1 00 10 addi r7,r1,16 <== NOT EXECUTED
ffc135a4: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc135a8: 4b ff fd 71 bl ffc13318 <fat_file_ioctl> <== NOT EXECUTED
(fat_fd->fat_file_size - 1), &old_last_cl);
if ( rc != RC_OK )
ffc135ac: 7c 7b 1b 79 mr. r27,r3 <== NOT EXECUTED
ffc135b0: 41 a2 00 08 beq+ ffc135b8 <fat_file_extend+0x1cc> <== NOT EXECUTED
ffc135b4: 48 00 00 5c b ffc13610 <fat_file_extend+0x224> <== NOT EXECUTED
fat_free_fat_clusters_chain(fs_info, chain);
return rc;
}
}
rc = fat_set_fat_cluster(fs_info, old_last_cl, chain);
ffc135b8: 80 81 00 10 lwz r4,16(r1)
ffc135bc: 7f e3 fb 78 mr r3,r31
ffc135c0: 80 a1 00 14 lwz r5,20(r1)
ffc135c4: 48 00 6c 85 bl ffc1a248 <fat_set_fat_cluster>
if ( rc != RC_OK )
ffc135c8: 7c 7b 1b 79 mr. r27,r3
{
fat_free_fat_clusters_chain(fs_info, chain);
ffc135cc: 7f e3 fb 78 mr r3,r31
return rc;
}
}
rc = fat_set_fat_cluster(fs_info, old_last_cl, chain);
if ( rc != RC_OK )
ffc135d0: 41 a2 00 08 beq+ ffc135d8 <fat_file_extend+0x1ec> <== ALWAYS TAKEN
ffc135d4: 48 00 00 40 b ffc13614 <fat_file_extend+0x228> <== NOT EXECUTED
{
fat_free_fat_clusters_chain(fs_info, chain);
return rc;
}
fat_buf_release(fs_info);
ffc135d8: 48 00 04 11 bl ffc139e8 <fat_buf_release>
}
/* update number of the last cluster of the file if it changed */
if (cls_added != 0)
ffc135dc: 81 21 00 08 lwz r9,8(r1)
ffc135e0: 2f 89 00 00 cmpwi cr7,r9,0
ffc135e4: 41 9e 00 40 beq- cr7,ffc13624 <fat_file_extend+0x238> <== NEVER TAKEN
{
fat_fd->map.last_cln = last_cl;
ffc135e8: 81 21 00 0c lwz r9,12(r1)
ffc135ec: 91 3e 00 3c stw r9,60(r30)
if (fat_fd->fat_file_type == FAT_DIRECTORY)
ffc135f0: 81 3e 00 10 lwz r9,16(r30)
ffc135f4: 2f 89 00 00 cmpwi cr7,r9,0
ffc135f8: 40 be 00 2c bne+ cr7,ffc13624 <fat_file_extend+0x238>
{
rc = fat_init_clusters_chain(fs_info, chain);
ffc135fc: 80 81 00 14 lwz r4,20(r1)
ffc13600: 7f e3 fb 78 mr r3,r31
ffc13604: 48 00 13 05 bl ffc14908 <fat_init_clusters_chain>
if ( rc != RC_OK )
ffc13608: 7c 7b 1b 79 mr. r27,r3
ffc1360c: 41 a2 00 18 beq+ ffc13624 <fat_file_extend+0x238> <== ALWAYS TAKEN
{
fat_free_fat_clusters_chain(fs_info, chain);
ffc13610: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc13614: 80 81 00 14 lwz r4,20(r1) <== NOT EXECUTED
ffc13618: 7f 7d db 78 mr r29,r27 <== NOT EXECUTED
ffc1361c: 48 00 6e c9 bl ffc1a4e4 <fat_free_fat_clusters_chain> <== NOT EXECUTED
ffc13620: 48 00 00 0c b ffc1362c <fat_file_extend+0x240> <== NOT EXECUTED
return rc;
}
}
}
*a_length = new_length;
ffc13624: 93 98 00 00 stw r28,0(r24)
fat_fd->fat_file_size = new_length;
ffc13628: 93 9e 00 18 stw r28,24(r30)
return RC_OK;
}
ffc1362c: 39 61 00 40 addi r11,r1,64
ffc13630: 7f a3 eb 78 mr r3,r29
ffc13634: 4b fe df a8 b ffc015dc <_restgpr_23_x>
ffc13318 <fat_file_ioctl>:
fat_file_ioctl(
fat_fs_info_t *fs_info,
fat_file_fd_t *fat_fd,
int cmd,
...)
{
ffc13318: 94 21 ff d0 stwu r1,-48(r1)
uint32_t *ret;
va_list ap;
va_start(ap, cmd);
switch (cmd)
ffc1331c: 2f 85 00 01 cmpwi cr7,r5,1
fat_file_fd_t *fat_fd,
int cmd,
...)
{
int rc = RC_OK;
uint32_t cur_cln = 0;
ffc13320: 39 20 00 00 li r9,0
fat_file_ioctl(
fat_fs_info_t *fs_info,
fat_file_fd_t *fat_fd,
int cmd,
...)
{
ffc13324: 7c 08 02 a6 mflr r0
int rc = RC_OK;
uint32_t cur_cln = 0;
ffc13328: 91 21 00 14 stw r9,20(r1)
uint32_t cl_start = 0;
uint32_t pos = 0;
uint32_t *ret;
va_list ap;
va_start(ap, cmd);
ffc1332c: 39 20 00 03 li r9,3
ffc13330: 99 21 00 08 stb r9,8(r1)
ffc13334: 39 21 00 38 addi r9,r1,56
ffc13338: 91 21 00 0c stw r9,12(r1)
ffc1333c: 39 21 00 10 addi r9,r1,16
fat_file_ioctl(
fat_fs_info_t *fs_info,
fat_file_fd_t *fat_fd,
int cmd,
...)
{
ffc13340: 90 01 00 34 stw r0,52(r1)
ffc13344: bf c1 00 28 stmw r30,40(r1)
ffc13348: 90 c1 00 1c stw r6,28(r1)
ffc1334c: 90 e1 00 20 stw r7,32(r1)
uint32_t cl_start = 0;
uint32_t pos = 0;
uint32_t *ret;
va_list ap;
va_start(ap, cmd);
ffc13350: 91 21 00 10 stw r9,16(r1)
switch (cmd)
ffc13354: 40 be 00 80 bne+ cr7,ffc133d4 <fat_file_ioctl+0xbc> <== NEVER TAKEN
case F_CLU_NUM:
pos = va_arg(ap, uint32_t);
ret = va_arg(ap, uint32_t *);
/* sanity check */
if ( pos >= fat_fd->fat_file_size ) {
ffc13358: 81 24 00 18 lwz r9,24(r4)
switch (cmd)
{
case F_CLU_NUM:
pos = va_arg(ap, uint32_t);
ret = va_arg(ap, uint32_t *);
ffc1335c: 3b c0 00 05 li r30,5
va_start(ap, cmd);
switch (cmd)
{
case F_CLU_NUM:
pos = va_arg(ap, uint32_t);
ffc13360: 7c ca 33 78 mr r10,r6
ret = va_arg(ap, uint32_t *);
ffc13364: 9b c1 00 08 stb r30,8(r1)
/* sanity check */
if ( pos >= fat_fd->fat_file_size ) {
ffc13368: 7f 86 48 40 cmplw cr7,r6,r9
switch (cmd)
{
case F_CLU_NUM:
pos = va_arg(ap, uint32_t);
ret = va_arg(ap, uint32_t *);
ffc1336c: 7c ff 3b 78 mr r31,r7
/* sanity check */
if ( pos >= fat_fd->fat_file_size ) {
ffc13370: 41 bc 00 10 blt+ cr7,ffc13380 <fat_file_ioctl+0x68> <== ALWAYS TAKEN
va_end(ap);
rtems_set_errno_and_return_minus_one( EIO );
ffc13374: 48 00 8d 75 bl ffc1c0e8 <__errno> <== NOT EXECUTED
ffc13378: 93 c3 00 00 stw r30,0(r3) <== NOT EXECUTED
ffc1337c: 48 00 00 64 b ffc133e0 <fat_file_ioctl+0xc8> <== NOT EXECUTED
}
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
ffc13380: 81 24 00 20 lwz r9,32(r4)
ffc13384: 2f 89 00 01 cmpwi cr7,r9,1
ffc13388: 40 9e 00 28 bne- cr7,ffc133b0 <fat_file_ioctl+0x98>
ffc1338c: 81 24 00 24 lwz r9,36(r4)
ffc13390: 2f 89 00 00 cmpwi cr7,r9,0
ffc13394: 40 9e 00 1c bne- cr7,ffc133b0 <fat_file_ioctl+0x98> <== NEVER TAKEN
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
ffc13398: 89 03 00 0e lbz r8,14(r3)
if ( pos >= fat_fd->fat_file_size ) {
va_end(ap);
rtems_set_errno_and_return_minus_one( EIO );
}
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
ffc1339c: 71 07 00 03 andi. r7,r8,3
ffc133a0: 41 82 00 10 beq- ffc133b0 <fat_file_ioctl+0x98>
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
{
/* cluster 0 (zero) reserved for root dir */
*ret = 0;
ffc133a4: 91 3f 00 00 stw r9,0(r31)
rc = RC_OK;
ffc133a8: 38 60 00 00 li r3,0
break;
ffc133ac: 48 00 00 38 b ffc133e4 <fat_file_ioctl+0xcc>
}
cl_start = pos >> fs_info->vol.bpc_log2;
ffc133b0: 88 a3 00 08 lbz r5,8(r3)
rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln);
ffc133b4: 38 c1 00 14 addi r6,r1,20
ffc133b8: 7d 45 2c 30 srw r5,r10,r5
ffc133bc: 4b ff f9 71 bl ffc12d2c <fat_file_lseek>
if ( rc != RC_OK )
ffc133c0: 7c 83 23 79 mr. r3,r4
ffc133c4: 40 82 00 20 bne- ffc133e4 <fat_file_ioctl+0xcc> <== NEVER TAKEN
break;
*ret = cur_cln;
ffc133c8: 81 21 00 14 lwz r9,20(r1)
ffc133cc: 91 3f 00 00 stw r9,0(r31)
break;
ffc133d0: 48 00 00 14 b ffc133e4 <fat_file_ioctl+0xcc>
default:
errno = EINVAL;
ffc133d4: 48 00 8d 15 bl ffc1c0e8 <__errno> <== NOT EXECUTED
ffc133d8: 39 20 00 16 li r9,22 <== NOT EXECUTED
ffc133dc: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED
rc = -1;
ffc133e0: 38 60 ff ff li r3,-1 <== NOT EXECUTED
break;
}
va_end(ap);
return rc;
}
ffc133e4: 39 61 00 30 addi r11,r1,48
ffc133e8: 4b fe e2 10 b ffc015f8 <_restgpr_30_x>
ffc12d2c <fat_file_lseek>:
fat_fs_info_t *fs_info,
fat_file_fd_t *fat_fd,
uint32_t file_cln,
uint32_t *disk_cln
)
{
ffc12d2c: 94 21 ff d0 stwu r1,-48(r1)
ffc12d30: 7c 08 02 a6 mflr r0
ffc12d34: 90 01 00 34 stw r0,52(r1)
int rc = RC_OK;
if (file_cln == fat_fd->map.file_cln)
ffc12d38: 81 24 00 34 lwz r9,52(r4)
fat_fs_info_t *fs_info,
fat_file_fd_t *fat_fd,
uint32_t file_cln,
uint32_t *disk_cln
)
{
ffc12d3c: bf 41 00 18 stmw r26,24(r1)
ffc12d40: 7c 9f 23 78 mr r31,r4
int rc = RC_OK;
if (file_cln == fat_fd->map.file_cln)
ffc12d44: 7f 85 48 00 cmpw cr7,r5,r9
fat_fs_info_t *fs_info,
fat_file_fd_t *fat_fd,
uint32_t file_cln,
uint32_t *disk_cln
)
{
ffc12d48: 7c be 2b 78 mr r30,r5
ffc12d4c: 7c dc 33 78 mr r28,r6
int rc = RC_OK;
if (file_cln == fat_fd->map.file_cln)
ffc12d50: 40 be 00 10 bne+ cr7,ffc12d60 <fat_file_lseek+0x34>
*disk_cln = fat_fd->map.disk_cln;
ffc12d54: 81 24 00 38 lwz r9,56(r4)
ffc12d58: 91 26 00 00 stw r9,0(r6)
ffc12d5c: 48 00 00 70 b ffc12dcc <fat_file_lseek+0xa0>
{
uint32_t cur_cln;
uint32_t count;
uint32_t i;
if (file_cln > fat_fd->map.file_cln)
ffc12d60: 7f 85 48 40 cmplw cr7,r5,r9
ffc12d64: 7c 7a 1b 78 mr r26,r3
ffc12d68: 40 9d 00 14 ble- cr7,ffc12d7c <fat_file_lseek+0x50>
{
cur_cln = fat_fd->map.disk_cln;
ffc12d6c: 81 44 00 38 lwz r10,56(r4)
count = file_cln - fat_fd->map.file_cln;
ffc12d70: 7f 69 28 50 subf r27,r9,r5
uint32_t count;
uint32_t i;
if (file_cln > fat_fd->map.file_cln)
{
cur_cln = fat_fd->map.disk_cln;
ffc12d74: 91 41 00 08 stw r10,8(r1)
ffc12d78: 48 00 00 10 b ffc12d88 <fat_file_lseek+0x5c>
count = file_cln - fat_fd->map.file_cln;
}
else
{
cur_cln = fat_fd->cln;
ffc12d7c: 81 24 00 1c lwz r9,28(r4)
ffc12d80: 7c bb 2b 78 mr r27,r5
ffc12d84: 91 21 00 08 stw r9,8(r1)
count = file_cln;
}
/* skip over the clusters */
for (i = 0; i < count; i++)
ffc12d88: 3b a0 00 00 li r29,0
ffc12d8c: 48 00 00 28 b ffc12db4 <fat_file_lseek+0x88>
{
rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln);
ffc12d90: 7f 43 d3 78 mr r3,r26
ffc12d94: 38 a1 00 08 addi r5,r1,8
ffc12d98: 48 00 72 f1 bl ffc1a088 <fat_get_fat_cluster>
if ( rc != RC_OK )
ffc12d9c: 2c 03 00 00 cmpwi r3,0
ffc12da0: 41 a2 00 10 beq+ ffc12db0 <fat_file_lseek+0x84> <== ALWAYS TAKEN
return rc;
ffc12da4: 7c 6b 1b 78 mr r11,r3 <== NOT EXECUTED
ffc12da8: 7c 6a fe 70 srawi r10,r3,31 <== NOT EXECUTED
ffc12dac: 48 00 00 28 b ffc12dd4 <fat_file_lseek+0xa8> <== NOT EXECUTED
cur_cln = fat_fd->cln;
count = file_cln;
}
/* skip over the clusters */
for (i = 0; i < count; i++)
ffc12db0: 3b bd 00 01 addi r29,r29,1
ffc12db4: 7f 9d d8 00 cmpw cr7,r29,r27
ffc12db8: 80 81 00 08 lwz r4,8(r1)
ffc12dbc: 40 9e ff d4 bne+ cr7,ffc12d90 <fat_file_lseek+0x64>
if ( rc != RC_OK )
return rc;
}
/* update cache */
fat_fd->map.file_cln = file_cln;
ffc12dc0: 93 df 00 34 stw r30,52(r31)
fat_fd->map.disk_cln = cur_cln;
ffc12dc4: 90 9f 00 38 stw r4,56(r31)
*disk_cln = cur_cln;
ffc12dc8: 90 9c 00 00 stw r4,0(r28)
}
return RC_OK;
ffc12dcc: 39 40 00 00 li r10,0
ffc12dd0: 39 60 00 00 li r11,0
}
ffc12dd4: 7d 64 5b 78 mr r4,r11
ffc12dd8: 39 61 00 30 addi r11,r1,48
ffc12ddc: 7d 43 53 78 mr r3,r10
ffc12de0: 4b fe e8 08 b ffc015e8 <_restgpr_26_x>
ffc12de4 <fat_file_open>:
fat_file_open(
fat_fs_info_t *fs_info,
fat_dir_pos_t *dir_pos,
fat_file_fd_t **fat_fd
)
{
ffc12de4: 94 21 ff d8 stwu r1,-40(r1)
ffc12de8: 7c 08 02 a6 mflr r0
ffc12dec: 7d 80 00 26 mfcr r12
ffc12df0: bf 21 00 0c stmw r25,12(r1)
ffc12df4: 7c 7d 1b 78 mr r29,r3
ffc12df8: 7c 99 23 78 mr r25,r4
ffc12dfc: 90 01 00 2c stw r0,44(r1)
ffc12e00: 7c bb 2b 78 mr r27,r5
ffc12e04: 91 81 00 08 stw r12,8(r1)
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);
ffc12e08: 4b ff fe cd bl ffc12cd4 <fat_construct_key>
uint32_t key1,
uint32_t key2,
fat_file_fd_t **ret
)
{
uint32_t mod = (key1) % FAT_HASH_MODULE;
ffc12e0c: 54 7c 07 fe clrlwi r28,r3,31
rtems_chain_node *the_node = rtems_chain_first(hash + mod);
ffc12e10: 1f 9c 00 0c mulli r28,r28,12
ffc12e14: 81 3d 00 6c lwz r9,108(r29)
ffc12e18: 7f 49 e2 14 add r26,r9,r28
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
ffc12e1c: 7f e9 e0 2e lwzx r31,r9,r28
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);
ffc12e20: 7c 7e 1b 78 mr r30,r3
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 ));
ffc12e24: 3b 5a 00 04 addi r26,r26,4
ffc12e28: 48 00 00 30 b ffc12e58 <fat_file_open+0x74>
rtems_chain_node *the_node = rtems_chain_first(hash + mod);
for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; )
{
fat_file_fd_t *ffd = (fat_file_fd_t *)the_node;
uint32_t ck = fat_construct_key(fs_info, &ffd->dir_pos.sname);
ffc12e2c: 7f a3 eb 78 mr r3,r29
ffc12e30: 38 9f 00 20 addi r4,r31,32
ffc12e34: 4b ff fe a1 bl ffc12cd4 <fat_construct_key>
if ( (key1) == ck)
ffc12e38: 7f 9e 18 00 cmpw cr7,r30,r3
ffc12e3c: 40 be 00 18 bne+ cr7,ffc12e54 <fat_file_open+0x70>
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;
lfat_fd->links_num++;
ffc12e40: 81 3f 00 08 lwz r9,8(r31)
/* 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;
ffc12e44: 93 fb 00 00 stw r31,0(r27)
lfat_fd->links_num++;
ffc12e48: 39 29 00 01 addi r9,r9,1
ffc12e4c: 91 3f 00 08 stw r9,8(r31)
ffc12e50: 48 00 00 f0 b ffc12f40 <fat_file_open+0x15c>
{
*ret = (void *)the_node;
return 0;
}
}
the_node = the_node->next;
ffc12e54: 83 ff 00 00 lwz r31,0(r31)
)
{
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) ; )
ffc12e58: 7f 9f d0 00 cmpw cr7,r31,r26
ffc12e5c: 40 9e ff d0 bne+ cr7,ffc12e2c <fat_file_open+0x48>
ffc12e60: 48 00 00 e8 b ffc12f48 <fat_file_open+0x164>
{
fat_file_fd_t *ffd = (fat_file_fd_t *)the_node;
uint32_t ck = fat_construct_key(fs_info, &ffd->dir_pos.sname);
ffc12e64: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED
ffc12e68: 38 9f 00 20 addi r4,r31,32 <== NOT EXECUTED
ffc12e6c: 4b ff fe 69 bl ffc12cd4 <fat_construct_key> <== NOT EXECUTED
if ( (key1) == ck)
ffc12e70: 7f 9e 18 00 cmpw cr7,r30,r3 <== NOT EXECUTED
ffc12e74: 40 be 00 14 bne+ cr7,ffc12e88 <fat_file_open+0xa4> <== NOT EXECUTED
{
if ( ((key2) == 0) || ((key2) == ffd->ino) )
ffc12e78: 41 92 00 24 beq- cr4,ffc12e9c <fat_file_open+0xb8> <== NOT EXECUTED
ffc12e7c: 81 3f 00 0c lwz r9,12(r31) <== NOT EXECUTED
ffc12e80: 7f 9e 48 00 cmpw cr7,r30,r9 <== NOT EXECUTED
ffc12e84: 41 9e 00 18 beq- cr7,ffc12e9c <fat_file_open+0xb8> <== NOT EXECUTED
{
*ret = (void *)the_node;
return 0;
}
}
the_node = the_node->next;
ffc12e88: 83 ff 00 00 lwz r31,0(r31) <== 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) ; )
ffc12e8c: 7f 9f d0 00 cmpw cr7,r31,r26
ffc12e90: 40 9e ff d4 bne+ cr7,ffc12e64 <fat_file_open+0x80> <== NEVER TAKEN
return 0;
}
}
the_node = the_node->next;
}
return -1;
ffc12e94: 3b 40 ff ff li r26,-1
ffc12e98: 48 00 00 08 b ffc12ea0 <fat_file_open+0xbc>
if ( (key1) == ck)
{
if ( ((key2) == 0) || ((key2) == ffd->ino) )
{
*ret = (void *)the_node;
return 0;
ffc12e9c: 3b 40 00 00 li r26,0 <== 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));
ffc12ea0: 38 60 00 44 li r3,68
ffc12ea4: 4b ff 33 e9 bl ffc0628c <malloc>
if ( lfat_fd == NULL )
ffc12ea8: 2f 83 00 00 cmpwi cr7,r3,0
}
/* 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));
ffc12eac: 90 7b 00 00 stw r3,0(r27)
ffc12eb0: 7c 7f 1b 78 mr r31,r3
if ( lfat_fd == NULL )
ffc12eb4: 40 be 00 08 bne+ cr7,ffc12ebc <fat_file_open+0xd8> <== ALWAYS TAKEN
ffc12eb8: 48 00 00 64 b ffc12f1c <fat_file_open+0x138> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOMEM );
memset(lfat_fd, 0, sizeof(fat_file_fd_t));
ffc12ebc: 38 a0 00 44 li r5,68
ffc12ec0: 38 80 00 00 li r4,0
ffc12ec4: 48 00 9f f9 bl ffc1cebc <memset>
lfat_fd->links_num = 1;
ffc12ec8: 39 20 00 01 li r9,1
ffc12ecc: 91 3f 00 08 stw r9,8(r31)
lfat_fd->flags &= ~FAT_FILE_REMOVED;
lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE;
lfat_fd->dir_pos = *dir_pos;
if ( rc != RC_OK )
ffc12ed0: 2f 9a 00 00 cmpwi cr7,r26,0
rtems_set_errno_and_return_minus_one( ENOMEM );
memset(lfat_fd, 0, sizeof(fat_file_fd_t));
lfat_fd->links_num = 1;
lfat_fd->flags &= ~FAT_FILE_REMOVED;
ffc12ed4: 89 3f 00 30 lbz r9,48(r31)
ffc12ed8: 55 29 00 3c rlwinm r9,r9,0,0,30
ffc12edc: 99 3f 00 30 stb r9,48(r31)
lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE;
ffc12ee0: 39 20 ff ff li r9,-1
ffc12ee4: 91 3f 00 3c stw r9,60(r31)
lfat_fd->dir_pos = *dir_pos;
ffc12ee8: 39 3f 00 20 addi r9,r31,32
ffc12eec: 7c b9 84 aa lswi r5,r25,16
ffc12ef0: 7c a9 85 aa stswi r5,r9,16
if ( rc != RC_OK )
ffc12ef4: 41 9e 00 0c beq- cr7,ffc12f00 <fat_file_open+0x11c> <== NEVER TAKEN
lfat_fd->ino = key;
ffc12ef8: 93 df 00 0c stw r30,12(r31)
ffc12efc: 48 00 00 34 b ffc12f30 <fat_file_open+0x14c>
else
{
lfat_fd->ino = fat_get_unique_ino(fs_info);
ffc12f00: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED
ffc12f04: 48 00 1a 89 bl ffc1498c <fat_get_unique_ino> <== NOT EXECUTED
if ( lfat_fd->ino == 0 )
ffc12f08: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
if ( rc != RC_OK )
lfat_fd->ino = key;
else
{
lfat_fd->ino = fat_get_unique_ino(fs_info);
ffc12f0c: 90 7f 00 0c stw r3,12(r31) <== NOT EXECUTED
if ( lfat_fd->ino == 0 )
ffc12f10: 40 be 00 20 bne+ cr7,ffc12f30 <fat_file_open+0x14c> <== NOT EXECUTED
{
free((*fat_fd));
ffc12f14: 80 7b 00 00 lwz r3,0(r27) <== NOT EXECUTED
ffc12f18: 4b ff 2d c5 bl ffc05cdc <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 );
ffc12f1c: 48 00 91 cd bl ffc1c0e8 <__errno> <== NOT EXECUTED
ffc12f20: 39 20 00 0c li r9,12 <== NOT EXECUTED
ffc12f24: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED
ffc12f28: 38 60 ff ff li r3,-1 <== NOT EXECUTED
ffc12f2c: 48 00 00 34 b ffc12f60 <fat_file_open+0x17c> <== NOT EXECUTED
*/
static inline void
_hash_insert(rtems_chain_control *hash, uint32_t key1, uint32_t key2,
fat_file_fd_t *el)
{
rtems_chain_append((hash) + ((key1) % FAT_HASH_MODULE), &(el)->link);
ffc12f30: 80 7d 00 6c lwz r3,108(r29)
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
ffc12f34: 7f e4 fb 78 mr r4,r31
ffc12f38: 7c 63 e2 14 add r3,r3,r28
ffc12f3c: 4b ff 81 39 bl ffc0b074 <_Chain_Append>
/*
* other fields of fat-file descriptor will be initialized on upper
* level
*/
return RC_OK;
ffc12f40: 38 60 00 00 li r3,0
ffc12f44: 48 00 00 1c b ffc12f60 <fat_file_open+0x17c>
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);
ffc12f48: 81 3d 00 70 lwz r9,112(r29)
fat_file_fd_t *ffd = (fat_file_fd_t *)the_node;
uint32_t ck = fat_construct_key(fs_info, &ffd->dir_pos.sname);
if ( (key1) == ck)
{
if ( ((key2) == 0) || ((key2) == ffd->ino) )
ffc12f4c: 2e 1e 00 00 cmpwi cr4,r30,0
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);
ffc12f50: 7f 49 e2 14 add r26,r9,r28
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
ffc12f54: 7f e9 e0 2e lwzx r31,r9,r28
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 ));
ffc12f58: 3b 5a 00 04 addi r26,r26,4
ffc12f5c: 4b ff ff 30 b ffc12e8c <fat_file_open+0xa8>
* other fields of fat-file descriptor will be initialized on upper
* level
*/
return RC_OK;
}
ffc12f60: 81 81 00 08 lwz r12,8(r1)
ffc12f64: 39 61 00 28 addi r11,r1,40
ffc12f68: 7d 80 81 20 mtcrf 8,r12
ffc12f6c: 4b fe e6 78 b ffc015e4 <_restgpr_25_x>
ffc12f84 <fat_file_read>:
fat_file_fd_t *fat_fd,
uint32_t start,
uint32_t count,
uint8_t *buf
)
{
ffc12f84: 94 21 ff c0 stwu r1,-64(r1)
ffc12f88: 7c 08 02 a6 mflr r0
int rc = RC_OK;
ssize_t ret = 0;
uint32_t cmpltd = 0;
uint32_t cur_cln = 0;
ffc12f8c: 39 20 00 00 li r9,0
fat_file_fd_t *fat_fd,
uint32_t start,
uint32_t count,
uint8_t *buf
)
{
ffc12f90: be c1 00 18 stmw r22,24(r1)
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)
ffc12f94: 7c de 33 79 mr. r30,r6
fat_file_fd_t *fat_fd,
uint32_t start,
uint32_t count,
uint8_t *buf
)
{
ffc12f98: 90 01 00 44 stw r0,68(r1)
int rc = RC_OK;
ssize_t ret = 0;
uint32_t cmpltd = 0;
uint32_t cur_cln = 0;
ffc12f9c: 91 21 00 08 stw r9,8(r1)
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)
ffc12fa0: 41 82 01 8c beq- ffc1312c <fat_file_read+0x1a8> <== NEVER TAKEN
/*
* >= because start is offset and computed from 0 and file_size
* computed from 1
*/
if ( start >= fat_fd->fat_file_size )
ffc12fa4: 81 24 00 18 lwz r9,24(r4)
ffc12fa8: 7c 7f 1b 78 mr r31,r3
ffc12fac: 7c 9d 23 78 mr r29,r4
ffc12fb0: 7f 85 48 40 cmplw cr7,r5,r9
ffc12fb4: 7c bc 2b 78 mr r28,r5
uint32_t byte = 0;
uint32_t c = 0;
/* it couldn't be removed - otherwise cache update will be broken */
if (count == 0)
return cmpltd;
ffc12fb8: 38 60 00 00 li r3,0
/*
* >= because start is offset and computed from 0 and file_size
* computed from 1
*/
if ( start >= fat_fd->fat_file_size )
ffc12fbc: 40 9c 01 7c bge- cr7,ffc13138 <fat_file_read+0x1b4>
return FAT_EOF;
if ((count > fat_fd->fat_file_size) ||
ffc12fc0: 7f 9e 48 40 cmplw cr7,r30,r9
ffc12fc4: 7c f7 3b 78 mr r23,r7
ffc12fc8: 41 9d 00 10 bgt- cr7,ffc12fd8 <fat_file_read+0x54> <== NEVER TAKEN
(start > fat_fd->fat_file_size - count))
ffc12fcc: 7d 5e 48 50 subf r10,r30,r9
* computed from 1
*/
if ( start >= fat_fd->fat_file_size )
return FAT_EOF;
if ((count > fat_fd->fat_file_size) ||
ffc12fd0: 7f 85 50 40 cmplw cr7,r5,r10
ffc12fd4: 40 9d 00 08 ble- cr7,ffc12fdc <fat_file_read+0x58>
(start > fat_fd->fat_file_size - count))
count = fat_fd->fat_file_size - start;
ffc12fd8: 7f dc 48 50 subf r30,r28,r9
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
ffc12fdc: 81 3d 00 20 lwz r9,32(r29)
ffc12fe0: 2f 89 00 01 cmpwi cr7,r9,1
ffc12fe4: 40 9e 00 5c bne- cr7,ffc13040 <fat_file_read+0xbc>
ffc12fe8: 81 3d 00 24 lwz r9,36(r29)
ffc12fec: 2f 89 00 00 cmpwi cr7,r9,0
ffc12ff0: 40 9e 00 50 bne- cr7,ffc13040 <fat_file_read+0xbc> <== NEVER TAKEN
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
ffc12ff4: 89 3f 00 0e lbz r9,14(r31)
if ((count > fat_fd->fat_file_size) ||
(start > fat_fd->fat_file_size - count))
count = fat_fd->fat_file_size - start;
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
ffc12ff8: 71 2a 00 03 andi. r10,r9,3
ffc12ffc: 41 a2 00 44 beq+ ffc13040 <fat_file_read+0xbc>
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
{
sec = fat_cluster_num_to_sector_num(fs_info, fat_fd->cln);
ffc13000: 80 9d 00 1c lwz r4,28(r29)
ffc13004: 7f e3 fb 78 mr r3,r31
ffc13008: 4b ff fc 99 bl ffc12ca0 <fat_cluster_num_to_sector_num>
sec += (start >> fs_info->vol.sec_log2);
ffc1300c: 88 9f 00 02 lbz r4,2(r31)
byte = start & (fs_info->vol.bps - 1);
ffc13010: a0 bf 00 00 lhz r5,0(r31)
ret = _fat_block_read(fs_info, sec, byte, count, buf);
ffc13014: 7f c6 f3 78 mr r6,r30
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);
ffc13018: 7f 84 24 30 srw r4,r28,r4
byte = start & (fs_info->vol.bps - 1);
ffc1301c: 38 a5 ff ff addi r5,r5,-1
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);
ffc13020: 7c 83 22 14 add r4,r3,r4
byte = start & (fs_info->vol.bps - 1);
ret = _fat_block_read(fs_info, sec, byte, count, buf);
ffc13024: 7f 85 28 38 and r5,r28,r5
ffc13028: 7f e3 fb 78 mr r3,r31
ffc1302c: 7e e7 bb 78 mr r7,r23
ffc13030: 48 00 0c 41 bl ffc13c70 <_fat_block_read>
if ( ret < 0 )
ffc13034: 2c 03 00 00 cmpwi r3,0
ffc13038: 40 a0 01 00 bge+ ffc13138 <fat_file_read+0x1b4> <== ALWAYS TAKEN
ffc1303c: 48 00 00 f8 b ffc13134 <fat_file_read+0x1b0> <== NOT EXECUTED
return -1;
return ret;
}
cl_start = start >> fs_info->vol.bpc_log2;
ffc13040: 8b 1f 00 08 lbz r24,8(r31)
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln);
ffc13044: 3a c1 00 08 addi r22,r1,8
ffc13048: 7f e3 fb 78 mr r3,r31
return ret;
}
cl_start = start >> fs_info->vol.bpc_log2;
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
ffc1304c: a3 7f 00 06 lhz r27,6(r31)
return -1;
return ret;
}
cl_start = start >> fs_info->vol.bpc_log2;
ffc13050: 7f 98 c4 30 srw r24,r28,r24
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln);
ffc13054: 7f a4 eb 78 mr r4,r29
ffc13058: 7f 05 c3 78 mr r5,r24
ffc1305c: 7e c6 b3 78 mr r6,r22
ffc13060: 4b ff fc cd bl ffc12d2c <fat_file_lseek>
if (rc != RC_OK)
ffc13064: 2f 84 00 00 cmpwi cr7,r4,0
ffc13068: 7c 83 23 78 mr r3,r4
ffc1306c: 40 9e 00 cc bne- cr7,ffc13138 <fat_file_read+0x1b4> <== NEVER TAKEN
return ret;
}
cl_start = start >> fs_info->vol.bpc_log2;
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
ffc13070: 3b 7b ff ff addi r27,r27,-1
ffc13074: 7f 9c d8 38 and r28,r28,r27
ffc13078: 7f 99 e3 78 mr r25,r28
ffc1307c: 3b 40 00 00 li r26,0
ffc13080: 3b 60 00 00 li r27,0
ffc13084: 48 00 00 7c b ffc13100 <fat_file_read+0x17c>
if (rc != RC_OK)
return rc;
while (count > 0)
{
c = MIN(count, (fs_info->vol.bpc - ofs));
ffc13088: a3 5f 00 06 lhz r26,6(r31)
ffc1308c: 7f 59 d0 50 subf r26,r25,r26
ffc13090: 7f 9a f0 40 cmplw cr7,r26,r30
ffc13094: 40 9d 00 08 ble- cr7,ffc1309c <fat_file_read+0x118>
ffc13098: 7f da f3 78 mr r26,r30
sec = fat_cluster_num_to_sector_num(fs_info, cur_cln);
ffc1309c: 80 81 00 08 lwz r4,8(r1)
ffc130a0: 7f e3 fb 78 mr r3,r31
ffc130a4: 4b ff fb fd bl ffc12ca0 <fat_cluster_num_to_sector_num>
sec += (ofs >> fs_info->vol.sec_log2);
ffc130a8: 88 9f 00 02 lbz r4,2(r31)
byte = ofs & (fs_info->vol.bps - 1);
ffc130ac: a0 bf 00 00 lhz r5,0(r31)
ret = _fat_block_read(fs_info, sec, byte, c, buf + cmpltd);
ffc130b0: 7f 46 d3 78 mr r6,r26
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);
ffc130b4: 7f 24 24 30 srw r4,r25,r4
byte = ofs & (fs_info->vol.bps - 1);
ffc130b8: 38 a5 ff ff addi r5,r5,-1
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);
ffc130bc: 7c 83 22 14 add r4,r3,r4
byte = ofs & (fs_info->vol.bps - 1);
ret = _fat_block_read(fs_info, sec, byte, c, buf + cmpltd);
ffc130c0: 7f 25 28 38 and r5,r25,r5
ffc130c4: 7f e3 fb 78 mr r3,r31
ffc130c8: 7c f7 da 14 add r7,r23,r27
ffc130cc: 48 00 0b a5 bl ffc13c70 <_fat_block_read>
if ( ret < 0 )
ffc130d0: 2f 83 00 00 cmpwi cr7,r3,0
ffc130d4: 41 9c 00 60 blt- cr7,ffc13134 <fat_file_read+0x1b0> <== NEVER TAKEN
return -1;
count -= c;
ffc130d8: 7f da f0 50 subf r30,r26,r30
cmpltd += c;
ffc130dc: 7f 7b d2 14 add r27,r27,r26
save_cln = cur_cln;
ffc130e0: 83 41 00 08 lwz r26,8(r1)
rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln);
ffc130e4: 7f e3 fb 78 mr r3,r31
ffc130e8: 7f 44 d3 78 mr r4,r26
ffc130ec: 7e c5 b3 78 mr r5,r22
ffc130f0: 48 00 6f 99 bl ffc1a088 <fat_get_fat_cluster>
if ( rc != RC_OK )
return rc;
ofs = 0;
ffc130f4: 3b 20 00 00 li r25,0
count -= c;
cmpltd += c;
save_cln = cur_cln;
rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln);
if ( rc != RC_OK )
ffc130f8: 2c 03 00 00 cmpwi r3,0
ffc130fc: 40 82 00 3c bne- ffc13138 <fat_file_read+0x1b4> <== NEVER TAKEN
rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln);
if (rc != RC_OK)
return rc;
while (count > 0)
ffc13100: 2f 9e 00 00 cmpwi cr7,r30,0
ffc13104: 40 9e ff 84 bne+ cr7,ffc13088 <fat_file_read+0x104>
}
/* 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);
ffc13108: 89 3f 00 08 lbz r9,8(r31)
ffc1310c: 3b 9c ff ff addi r28,r28,-1
ffc13110: 7f 9c da 14 add r28,r28,r27
fat_fd->map.disk_cln = save_cln;
ffc13114: 93 5d 00 38 stw r26,56(r29)
}
/* 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);
ffc13118: 7f 9c 4c 30 srw r28,r28,r9
ofs = 0;
}
/* update cache */
/* XXX: check this - I'm not sure :( */
fat_fd->map.file_cln = cl_start +
ffc1311c: 7f 1c c2 14 add r24,r28,r24
ffc13120: 93 1d 00 34 stw r24,52(r29)
((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2);
fat_fd->map.disk_cln = save_cln;
return cmpltd;
ffc13124: 7f 63 db 78 mr r3,r27
ffc13128: 48 00 00 10 b ffc13138 <fat_file_read+0x1b4>
uint32_t byte = 0;
uint32_t c = 0;
/* it couldn't be removed - otherwise cache update will be broken */
if (count == 0)
return cmpltd;
ffc1312c: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc13130: 48 00 00 08 b ffc13138 <fat_file_read+0x1b4> <== NOT EXECUTED
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;
ffc13134: 38 60 ff ff li r3,-1 <== 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;
}
ffc13138: 39 61 00 40 addi r11,r1,64
ffc1313c: 4b fe e4 9c b ffc015d8 <_restgpr_22_x>
ffc138e0 <fat_file_size>:
int
fat_file_size(
fat_fs_info_t *fs_info,
fat_file_fd_t *fat_fd
)
{
ffc138e0: 94 21 ff d8 stwu r1,-40(r1)
ffc138e4: 7c 08 02 a6 mflr r0
ffc138e8: 90 01 00 2c stw r0,44(r1)
int rc = RC_OK;
uint32_t cur_cln = fat_fd->cln;
ffc138ec: 81 24 00 1c lwz r9,28(r4)
int
fat_file_size(
fat_fs_info_t *fs_info,
fat_file_fd_t *fat_fd
)
{
ffc138f0: bf a1 00 1c stmw r29,28(r1)
ffc138f4: 7c 7e 1b 78 mr r30,r3
ffc138f8: 7c 9f 23 78 mr r31,r4
int rc = RC_OK;
uint32_t cur_cln = fat_fd->cln;
ffc138fc: 91 21 00 08 stw r9,8(r1)
uint32_t save_cln = 0;
/* Have we requested root dir size for FAT12/16? */
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
ffc13900: 81 24 00 20 lwz r9,32(r4)
ffc13904: 2f 89 00 01 cmpwi cr7,r9,1
ffc13908: 40 be 00 28 bne+ cr7,ffc13930 <fat_file_size+0x50>
ffc1390c: 81 24 00 24 lwz r9,36(r4)
ffc13910: 2f 89 00 00 cmpwi cr7,r9,0
ffc13914: 40 9e 00 1c bne- cr7,ffc13930 <fat_file_size+0x50> <== NEVER TAKEN
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
ffc13918: 89 23 00 0e lbz r9,14(r3)
int rc = RC_OK;
uint32_t cur_cln = fat_fd->cln;
uint32_t save_cln = 0;
/* Have we requested root dir size for FAT12/16? */
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
ffc1391c: 71 2a 00 03 andi. r10,r9,3
ffc13920: 41 a2 00 10 beq+ ffc13930 <fat_file_size+0x50> <== ALWAYS TAKEN
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
{
fat_fd->fat_file_size = fs_info->vol.rdir_size;
ffc13924: 81 23 00 2c lwz r9,44(r3) <== NOT EXECUTED
ffc13928: 91 24 00 18 stw r9,24(r4) <== NOT EXECUTED
ffc1392c: 48 00 00 58 b ffc13984 <fat_file_size+0xa4> <== NOT EXECUTED
return rc;
}
fat_fd->fat_file_size = 0;
ffc13930: 39 20 00 00 li r9,0
ffc13934: 91 3f 00 18 stw r9,24(r31)
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
ffc13938: 48 00 00 30 b ffc13968 <fat_file_size+0x88>
{
save_cln = cur_cln;
rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln);
ffc1393c: 7f c3 f3 78 mr r3,r30
ffc13940: 7f a4 eb 78 mr r4,r29
ffc13944: 38 a1 00 08 addi r5,r1,8
ffc13948: 48 00 67 41 bl ffc1a088 <fat_get_fat_cluster>
if ( rc != RC_OK )
ffc1394c: 2c 03 00 00 cmpwi r3,0
ffc13950: 40 82 00 38 bne- ffc13988 <fat_file_size+0xa8> <== NEVER TAKEN
return rc;
fat_fd->fat_file_size += fs_info->vol.bpc;
ffc13954: a1 5e 00 06 lhz r10,6(r30)
ffc13958: 81 3f 00 18 lwz r9,24(r31)
ffc1395c: 7d 29 52 14 add r9,r9,r10
ffc13960: 91 3f 00 18 stw r9,24(r31)
fat_fd->fat_file_size = 0;
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
{
save_cln = cur_cln;
ffc13964: 7f a9 eb 78 mr r9,r29
return rc;
}
fat_fd->fat_file_size = 0;
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
ffc13968: 81 5e 00 10 lwz r10,16(r30)
ffc1396c: 83 a1 00 08 lwz r29,8(r1)
ffc13970: 7f a8 50 38 and r8,r29,r10
ffc13974: 81 5e 00 14 lwz r10,20(r30)
ffc13978: 7f 88 50 40 cmplw cr7,r8,r10
ffc1397c: 41 9c ff c0 blt+ cr7,ffc1393c <fat_file_size+0x5c>
if ( rc != RC_OK )
return rc;
fat_fd->fat_file_size += fs_info->vol.bpc;
}
fat_fd->map.last_cln = save_cln;
ffc13980: 91 3f 00 3c stw r9,60(r31)
ffc13984: 38 60 00 00 li r3,0
return rc;
}
ffc13988: 39 61 00 28 addi r11,r1,40
ffc1398c: 4b fe dc 68 b ffc015f4 <_restgpr_29_x>
ffc13140 <fat_file_truncate>:
fat_file_truncate(
fat_fs_info_t *fs_info,
fat_file_fd_t *fat_fd,
uint32_t new_length
)
{
ffc13140: 94 21 ff d8 stwu r1,-40(r1)
ffc13144: 7c 08 02 a6 mflr r0
int rc = RC_OK;
uint32_t cur_cln = 0;
ffc13148: 39 20 00 00 li r9,0
fat_file_truncate(
fat_fs_info_t *fs_info,
fat_file_fd_t *fat_fd,
uint32_t new_length
)
{
ffc1314c: 90 01 00 2c stw r0,44(r1)
int rc = RC_OK;
uint32_t cur_cln = 0;
ffc13150: 91 21 00 0c stw r9,12(r1)
uint32_t cl_start = 0;
uint32_t new_last_cln = FAT_UNDEFINED_VALUE;
ffc13154: 39 20 ff ff li r9,-1
ffc13158: 91 21 00 08 stw r9,8(r1)
if ( new_length >= fat_fd->fat_file_size )
ffc1315c: 81 24 00 18 lwz r9,24(r4)
fat_file_truncate(
fat_fs_info_t *fs_info,
fat_file_fd_t *fat_fd,
uint32_t new_length
)
{
ffc13160: bf a1 00 1c stmw r29,28(r1)
ffc13164: 7c 9e 23 78 mr r30,r4
uint32_t cur_cln = 0;
uint32_t cl_start = 0;
uint32_t new_last_cln = FAT_UNDEFINED_VALUE;
if ( new_length >= fat_fd->fat_file_size )
ffc13168: 7f 85 48 40 cmplw cr7,r5,r9
ffc1316c: 41 bc 00 0c blt+ cr7,ffc13178 <fat_file_truncate+0x38>
return rc;
ffc13170: 38 60 00 00 li r3,0
ffc13174: 48 00 00 d8 b ffc1324c <fat_file_truncate+0x10c>
assert(fat_fd->fat_file_size);
ffc13178: 2f 89 00 00 cmpwi cr7,r9,0
ffc1317c: 40 be 00 24 bne+ cr7,ffc131a0 <fat_file_truncate+0x60> <== ALWAYS TAKEN
ffc13180: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc13184: 3c a0 ff c3 lis r5,-61 <== NOT EXECUTED
ffc13188: 3c c0 ff c3 lis r6,-61 <== NOT EXECUTED
ffc1318c: 38 63 c7 62 addi r3,r3,-14494 <== NOT EXECUTED
ffc13190: 38 80 02 d1 li r4,721 <== NOT EXECUTED
ffc13194: 38 a5 c7 50 addi r5,r5,-14512 <== NOT EXECUTED
ffc13198: 38 c6 c7 aa addi r6,r6,-14422 <== NOT EXECUTED
ffc1319c: 4b ff 29 81 bl ffc05b1c <__assert_func> <== NOT EXECUTED
cl_start = (new_length + fs_info->vol.bpc - 1) >> fs_info->vol.bpc_log2;
ffc131a0: a3 e3 00 06 lhz r31,6(r3)
ffc131a4: 7c 7d 1b 78 mr r29,r3
ffc131a8: 89 43 00 08 lbz r10,8(r3)
ffc131ac: 3b ff ff ff addi r31,r31,-1
ffc131b0: 7f ff 2a 14 add r31,r31,r5
ffc131b4: 7f ff 54 30 srw r31,r31,r10
if ((cl_start << fs_info->vol.bpc_log2) >= fat_fd->fat_file_size)
ffc131b8: 7f ea 50 30 slw r10,r31,r10
ffc131bc: 7f 8a 48 40 cmplw cr7,r10,r9
ffc131c0: 40 bc ff b0 bge- cr7,ffc13170 <fat_file_truncate+0x30>
return RC_OK;
if (cl_start != 0)
ffc131c4: 2f 9f 00 00 cmpwi cr7,r31,0
ffc131c8: 40 9e 00 24 bne- cr7,ffc131ec <fat_file_truncate+0xac>
if (rc != RC_OK)
return rc;
}
rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln);
ffc131cc: 7f a3 eb 78 mr r3,r29
ffc131d0: 7f c4 f3 78 mr r4,r30
ffc131d4: 7f e5 fb 78 mr r5,r31
ffc131d8: 38 c1 00 0c addi r6,r1,12
ffc131dc: 4b ff fb 51 bl ffc12d2c <fat_file_lseek>
if (rc != RC_OK)
ffc131e0: 7c 83 23 79 mr. r3,r4
ffc131e4: 40 a2 00 68 bne+ ffc1324c <fat_file_truncate+0x10c> <== NEVER TAKEN
ffc131e8: 48 00 00 1c b ffc13204 <fat_file_truncate+0xc4>
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);
ffc131ec: 38 bf ff ff addi r5,r31,-1
ffc131f0: 38 c1 00 08 addi r6,r1,8
ffc131f4: 4b ff fb 39 bl ffc12d2c <fat_file_lseek>
if (rc != RC_OK)
ffc131f8: 7c 83 23 79 mr. r3,r4
ffc131fc: 41 82 ff d0 beq+ ffc131cc <fat_file_truncate+0x8c> <== ALWAYS TAKEN
ffc13200: 48 00 00 4c b ffc1324c <fat_file_truncate+0x10c> <== 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);
ffc13204: 80 81 00 0c lwz r4,12(r1)
ffc13208: 7f a3 eb 78 mr r3,r29
ffc1320c: 48 00 72 d9 bl ffc1a4e4 <fat_free_fat_clusters_chain>
if (rc != RC_OK)
ffc13210: 2c 03 00 00 cmpwi r3,0
ffc13214: 40 82 00 38 bne- ffc1324c <fat_file_truncate+0x10c> <== NEVER TAKEN
return rc;
if (cl_start != 0)
ffc13218: 2f 9f 00 00 cmpwi cr7,r31,0
ffc1321c: 41 9e ff 54 beq+ cr7,ffc13170 <fat_file_truncate+0x30>
{
rc = fat_set_fat_cluster(fs_info, new_last_cln, FAT_GENFAT_EOC);
ffc13220: 80 81 00 08 lwz r4,8(r1)
ffc13224: 7f a3 eb 78 mr r3,r29
ffc13228: 38 a0 ff ff li r5,-1
ffc1322c: 48 00 70 1d bl ffc1a248 <fat_set_fat_cluster>
if ( rc != RC_OK )
ffc13230: 2c 03 00 00 cmpwi r3,0
ffc13234: 40 82 00 18 bne- ffc1324c <fat_file_truncate+0x10c> <== NEVER TAKEN
return rc;
fat_fd->map.file_cln = cl_start - 1;
fat_fd->map.disk_cln = new_last_cln;
ffc13238: 81 21 00 08 lwz r9,8(r1)
if (cl_start != 0)
{
rc = fat_set_fat_cluster(fs_info, new_last_cln, FAT_GENFAT_EOC);
if ( rc != RC_OK )
return rc;
fat_fd->map.file_cln = cl_start - 1;
ffc1323c: 3b ff ff ff addi r31,r31,-1
ffc13240: 93 fe 00 34 stw r31,52(r30)
fat_fd->map.disk_cln = new_last_cln;
ffc13244: 91 3e 00 38 stw r9,56(r30)
fat_fd->map.last_cln = new_last_cln;
ffc13248: 91 3e 00 3c stw r9,60(r30)
}
return RC_OK;
}
ffc1324c: 39 61 00 28 addi r11,r1,40
ffc13250: 4b fe e3 a4 b ffc015f4 <_restgpr_29_x>
ffc13638 <fat_file_write>:
bool zero_fill = start > fat_fd->fat_file_size;
uint32_t file_cln_initial = fat_fd->map.file_cln;
uint32_t cln;
if ( count == 0 )
ffc13638: 2c 06 00 00 cmpwi r6,0
fat_file_fd_t *fat_fd,
uint32_t start,
uint32_t count,
const uint8_t *buf
)
{
ffc1363c: 94 21 ff b0 stwu r1,-80(r1)
ffc13640: 7c 08 02 a6 mflr r0
int rc = RC_OK;
ssize_t ret;
uint32_t cmpltd = 0;
uint32_t byte;
uint32_t c = 0;
ffc13644: 39 20 00 00 li r9,0
fat_file_fd_t *fat_fd,
uint32_t start,
uint32_t count,
const uint8_t *buf
)
{
ffc13648: be 61 00 1c stmw r19,28(r1)
ffc1364c: 7c bc 2b 78 mr r28,r5
ffc13650: 7c 9e 23 78 mr r30,r4
ffc13654: 90 01 00 54 stw r0,84(r1)
int rc = RC_OK;
ssize_t ret;
uint32_t cmpltd = 0;
uint32_t byte;
uint32_t c = 0;
ffc13658: 91 21 00 0c stw r9,12(r1)
bool zero_fill = start > fat_fd->fat_file_size;
ffc1365c: 80 a4 00 18 lwz r5,24(r4)
uint32_t file_cln_initial = fat_fd->map.file_cln;
ffc13660: 82 84 00 34 lwz r20,52(r4)
uint32_t cln;
if ( count == 0 )
ffc13664: 41 82 01 f4 beq- ffc13858 <fat_file_write+0x220> <== NEVER TAKEN
return cmpltd;
if (start >= fat_fd->size_limit)
ffc13668: 83 e4 00 14 lwz r31,20(r4)
ffc1366c: 7f 9c f8 40 cmplw cr7,r28,r31
ffc13670: 41 bc 00 18 blt+ cr7,ffc13688 <fat_file_write+0x50> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one(EFBIG);
ffc13674: 48 00 8a 75 bl ffc1c0e8 <__errno> <== NOT EXECUTED
ffc13678: 39 20 00 1b li r9,27 <== NOT EXECUTED
ffc1367c: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED
ffc13680: 39 20 ff ff li r9,-1 <== NOT EXECUTED
ffc13684: 48 00 01 f8 b ffc1387c <fat_file_write+0x244> <== NOT EXECUTED
if (count > fat_fd->size_limit - start)
ffc13688: 7f fc f8 50 subf r31,r28,r31
ffc1368c: 7f 9f 30 40 cmplw cr7,r31,r6
ffc13690: 7c 7d 1b 78 mr r29,r3
ffc13694: 7c f5 3b 78 mr r21,r7
ffc13698: 40 9d 00 08 ble- cr7,ffc136a0 <fat_file_write+0x68> <== NEVER TAKEN
ffc1369c: 7c df 33 78 mr r31,r6
count = fat_fd->size_limit - start;
rc = fat_file_extend(fs_info, fat_fd, zero_fill, start + count, &c);
ffc136a0: 7f 7f e2 14 add r27,r31,r28
ffc136a4: 7c bc 28 10 subfc r5,r28,r5
ffc136a8: 7c a5 29 10 subfe r5,r5,r5
ffc136ac: 7f a3 eb 78 mr r3,r29
ffc136b0: 7f c4 f3 78 mr r4,r30
ffc136b4: 7c a5 00 d0 neg r5,r5
ffc136b8: 7f 66 db 78 mr r6,r27
ffc136bc: 38 e1 00 0c addi r7,r1,12
ffc136c0: 4b ff fd 2d bl ffc133ec <fat_file_extend>
if (RC_OK == rc)
ffc136c4: 7c 69 1b 79 mr. r9,r3
ffc136c8: 40 82 01 b4 bne- ffc1387c <fat_file_write+0x244>
{
/*
* check whether there was enough room on device to locate
* file of 'start + count' bytes
*/
if (c != (start + count))
ffc136cc: 81 21 00 0c lwz r9,12(r1)
ffc136d0: 7f 89 d8 00 cmpw cr7,r9,r27
ffc136d4: 41 9e 00 08 beq- cr7,ffc136dc <fat_file_write+0xa4> <== ALWAYS TAKEN
count = c - start;
ffc136d8: 7f fc 48 50 subf r31,r28,r9 <== NOT EXECUTED
*/
static bool
fat_is_fat12_or_fat16_root_dir (const fat_file_fd_t *fat_fd,
const uint8_t volume_type)
{
return (FAT_FD_OF_ROOT_DIR(fat_fd)) && (volume_type & (FAT_FAT12 | FAT_FAT16));
ffc136dc: 81 5e 00 20 lwz r10,32(r30)
ffc136e0: 39 20 00 00 li r9,0
*/
if (c != (start + count))
count = c - start;
/* for the root directory of FAT12 and FAT16 we need this special handling */
if (fat_is_fat12_or_fat16_root_dir(fat_fd, fs_info->vol.type))
ffc136e4: 89 1d 00 0e lbz r8,14(r29)
*/
static bool
fat_is_fat12_or_fat16_root_dir (const fat_file_fd_t *fat_fd,
const uint8_t volume_type)
{
return (FAT_FD_OF_ROOT_DIR(fat_fd)) && (volume_type & (FAT_FAT12 | FAT_FAT16));
ffc136e8: 2f 8a 00 01 cmpwi cr7,r10,1
ffc136ec: 40 be 00 1c bne+ cr7,ffc13708 <fat_file_write+0xd0>
ffc136f0: 81 5e 00 24 lwz r10,36(r30)
ffc136f4: 2f 8a 00 00 cmpwi cr7,r10,0
ffc136f8: 40 9e 00 10 bne- cr7,ffc13708 <fat_file_write+0xd0> <== NEVER TAKEN
ffc136fc: 55 09 07 be clrlwi r9,r8,30
ffc13700: 7d 29 00 d0 neg r9,r9
ffc13704: 55 29 0f fe rlwinm r9,r9,1,31,31
*/
if (c != (start + count))
count = c - start;
/* for the root directory of FAT12 and FAT16 we need this special handling */
if (fat_is_fat12_or_fat16_root_dir(fat_fd, fs_info->vol.type))
ffc13708: 2f 89 00 00 cmpwi cr7,r9,0
ffc1370c: 8b 5d 00 08 lbz r26,8(r29)
ffc13710: 41 9e 00 48 beq- cr7,ffc13758 <fat_file_write+0x120>
{
cln = fat_fd->cln;
cln += (start >> fs_info->vol.bpc_log2);
byte = start & (fs_info->vol.bpc -1);
ffc13714: a0 bd 00 06 lhz r5,6(r29)
/* for the root directory of FAT12 and FAT16 we need this special handling */
if (fat_is_fat12_or_fat16_root_dir(fat_fd, fs_info->vol.type))
{
cln = fat_fd->cln;
cln += (start >> fs_info->vol.bpc_log2);
ffc13718: 57 5a 06 3e clrlwi r26,r26,24
count = c - start;
/* for the root directory of FAT12 and FAT16 we need this special handling */
if (fat_is_fat12_or_fat16_root_dir(fat_fd, fs_info->vol.type))
{
cln = fat_fd->cln;
ffc1371c: 81 3e 00 1c lwz r9,28(r30)
cln += (start >> fs_info->vol.bpc_log2);
ffc13720: 7f 84 d4 30 srw r4,r28,r26
byte = start & (fs_info->vol.bpc -1);
ffc13724: 38 a5 ff ff addi r5,r5,-1
ret = fat_cluster_write(fs_info,
ffc13728: 7c 84 4a 14 add r4,r4,r9
ffc1372c: 7f a3 eb 78 mr r3,r29
ffc13730: 7f 85 28 38 and r5,r28,r5
ffc13734: 7f e6 fb 78 mr r6,r31
ffc13738: 7e a7 ab 78 mr r7,r21
ffc1373c: 39 00 00 00 li r8,0
ffc13740: 48 00 07 9d bl ffc13edc <fat_cluster_write>
byte,
count,
buf,
false);
if (0 > ret)
rc = -1;
ffc13744: 39 20 ff ff li r9,-1
cln,
byte,
count,
buf,
false);
if (0 > ret)
ffc13748: 2c 03 00 00 cmpwi r3,0
ffc1374c: 41 80 01 30 blt- ffc1387c <fat_file_write+0x244> <== NEVER TAKEN
rc = -1;
else
cmpltd = ret;
ffc13750: 7c 7b 1b 78 mr r27,r3
ffc13754: 48 00 01 24 b ffc13878 <fat_file_write+0x240>
const uint8_t *buf,
const uint32_t file_cln_initial)
{
int rc = RC_OK;
uint32_t cmpltd = 0;
uint32_t cur_cln = 0;
ffc13758: 7c 39 0b 78 mr r25,r1
ffc1375c: 95 39 00 08 stwu r9,8(r25)
uint32_t save_cln = 0; /* FIXME: This might be incorrect, cf. below */
uint32_t start_cln = start >> fs_info->vol.bpc_log2;
ffc13760: 57 5a 06 3e clrlwi r26,r26,24
ffc13764: 7f 98 d4 30 srw r24,r28,r26
uint32_t file_cln_cnt;
ssize_t ret;
uint32_t c;
bool overwrite_cluster = false;
rc = fat_file_lseek(fs_info, fat_fd, start_cln, &cur_cln);
ffc13768: 7f a3 eb 78 mr r3,r29
ffc1376c: 7f c4 f3 78 mr r4,r30
ffc13770: 7f 05 c3 78 mr r5,r24
ffc13774: 7f 26 cb 78 mr r6,r25
ffc13778: 4b ff f5 b5 bl ffc12d2c <fat_file_lseek>
if (RC_OK == rc)
ffc1377c: 7c 9b 23 79 mr. r27,r4
ffc13780: 40 82 00 c8 bne- ffc13848 <fat_file_write+0x210> <== NEVER TAKEN
int rc = RC_OK;
uint32_t cmpltd = 0;
uint32_t cur_cln = 0;
uint32_t save_cln = 0; /* FIXME: This might be incorrect, cf. below */
uint32_t start_cln = start >> fs_info->vol.bpc_log2;
uint32_t ofs_cln = start - (start_cln << fs_info->vol.bpc_log2);
ffc13784: 7f 1a d0 30 slw r26,r24,r26
bool overwrite_cluster = false;
rc = fat_file_lseek(fs_info, fat_fd, start_cln, &cur_cln);
if (RC_OK == rc)
{
file_cln_cnt = cur_cln - fat_fd->cln;
ffc13788: 81 3e 00 1c lwz r9,28(r30)
ffc1378c: 82 e1 00 08 lwz r23,8(r1)
int rc = RC_OK;
uint32_t cmpltd = 0;
uint32_t cur_cln = 0;
uint32_t save_cln = 0; /* FIXME: This might be incorrect, cf. below */
uint32_t start_cln = start >> fs_info->vol.bpc_log2;
uint32_t ofs_cln = start - (start_cln << fs_info->vol.bpc_log2);
ffc13790: 7f 9a e0 50 subf r28,r26,r28
ffc13794: 7f 85 e3 78 mr r5,r28
bool overwrite_cluster = false;
rc = fat_file_lseek(fs_info, fat_fd, start_cln, &cur_cln);
if (RC_OK == rc)
{
file_cln_cnt = cur_cln - fat_fd->cln;
ffc13798: 7e e9 b8 50 subf r23,r9,r23
uint32_t ofs_cln_save = ofs_cln;
uint32_t bytes_to_write = count;
uint32_t file_cln_cnt;
ssize_t ret;
uint32_t c;
bool overwrite_cluster = false;
ffc1379c: 3a 60 00 00 li r19,0
const uint32_t file_cln_initial)
{
int rc = RC_OK;
uint32_t cmpltd = 0;
uint32_t cur_cln = 0;
uint32_t save_cln = 0; /* FIXME: This might be incorrect, cf. below */
ffc137a0: 3a c0 00 00 li r22,0
const uint32_t count,
const uint8_t *buf,
const uint32_t file_cln_initial)
{
int rc = RC_OK;
uint32_t cmpltd = 0;
ffc137a4: 3b 40 00 00 li r26,0
ffc137a8: 48 00 00 60 b ffc13808 <fat_file_write+0x1d0>
{
file_cln_cnt = cur_cln - fat_fd->cln;
while ( (RC_OK == rc)
&& (bytes_to_write > 0))
{
c = MIN(bytes_to_write, (fs_info->vol.bpc - ofs_cln));
ffc137ac: a0 dd 00 06 lhz r6,6(r29)
ffc137b0: 7c c5 30 50 subf r6,r5,r6
ffc137b4: 7f 86 f8 40 cmplw cr7,r6,r31
ffc137b8: 40 9d 00 08 ble- cr7,ffc137c0 <fat_file_write+0x188>
ffc137bc: 7f e6 fb 78 mr r6,r31
if (file_cln_initial < file_cln_cnt)
ffc137c0: 7f 94 b8 40 cmplw cr7,r20,r23
ffc137c4: 40 9c 00 08 bge- cr7,ffc137cc <fat_file_write+0x194>
overwrite_cluster = true;
ffc137c8: 3a 60 00 01 li r19,1
ret = fat_cluster_write(fs_info,
ffc137cc: 80 81 00 08 lwz r4,8(r1)
ffc137d0: 7f a3 eb 78 mr r3,r29
ffc137d4: 7c f5 d2 14 add r7,r21,r26
ffc137d8: 7e 68 9b 78 mr r8,r19
ffc137dc: 48 00 07 01 bl ffc13edc <fat_cluster_write>
cur_cln,
ofs_cln,
c,
&buf[cmpltd],
overwrite_cluster);
if (0 > ret)
ffc137e0: 2c 03 00 00 cmpwi r3,0
ffc137e4: 40 a0 00 7c bge+ ffc13860 <fat_file_write+0x228> <== ALWAYS TAKEN
ffc137e8: 48 00 00 2c b ffc13814 <fat_file_write+0x1dc> <== NOT EXECUTED
++file_cln_cnt;
bytes_to_write -= ret;
cmpltd += ret;
save_cln = cur_cln;
if (0 < bytes_to_write)
rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln);
ffc137ec: 7f a3 eb 78 mr r3,r29
ffc137f0: 7e c4 b3 78 mr r4,r22
ffc137f4: 7f 25 cb 78 mr r5,r25
ffc137f8: 48 00 68 91 bl ffc1a088 <fat_get_fat_cluster>
rc = fat_file_lseek(fs_info, fat_fd, start_cln, &cur_cln);
if (RC_OK == rc)
{
file_cln_cnt = cur_cln - fat_fd->cln;
while ( (RC_OK == rc)
ffc137fc: 2c 03 00 00 cmpwi r3,0
ffc13800: 40 82 00 1c bne- ffc1381c <fat_file_write+0x1e4> <== NEVER TAKEN
ffc13804: 38 a0 00 00 li r5,0
&& (bytes_to_write > 0))
ffc13808: 2f 9f 00 00 cmpwi cr7,r31,0
ffc1380c: 40 9e ff a0 bne+ cr7,ffc137ac <fat_file_write+0x174>
ffc13810: 48 00 00 10 b ffc13820 <fat_file_write+0x1e8>
cur_cln,
ofs_cln,
c,
&buf[cmpltd],
overwrite_cluster);
if (0 > ret)
ffc13814: 3b 60 ff ff li r27,-1 <== NOT EXECUTED
ffc13818: 48 00 00 08 b ffc13820 <fat_file_write+0x1e8> <== NOT EXECUTED
rc = fat_file_lseek(fs_info, fat_fd, start_cln, &cur_cln);
if (RC_OK == rc)
{
file_cln_cnt = cur_cln - fat_fd->cln;
while ( (RC_OK == rc)
ffc1381c: 7c 7b 1b 78 mr r27,r3 <== NOT EXECUTED
fat_fd->map.file_cln = start_cln +
((ofs_cln_save + cmpltd - 1) >> fs_info->vol.bpc_log2);
fat_fd->map.disk_cln = save_cln;
}
if (RC_OK != rc)
ffc13820: 2f 9b 00 00 cmpwi cr7,r27,0
}
/* update cache */
/* XXX: check this - I'm not sure :( */
fat_fd->map.file_cln = start_cln +
((ofs_cln_save + cmpltd - 1) >> fs_info->vol.bpc_log2);
ffc13824: 89 3d 00 08 lbz r9,8(r29)
ffc13828: 3b 9c ff ff addi r28,r28,-1
fat_fd->map.disk_cln = save_cln;
ffc1382c: 92 de 00 38 stw r22,56(r30)
}
/* update cache */
/* XXX: check this - I'm not sure :( */
fat_fd->map.file_cln = start_cln +
((ofs_cln_save + cmpltd - 1) >> fs_info->vol.bpc_log2);
ffc13830: 7f 9c d2 14 add r28,r28,r26
ffc13834: 7f 9c 4c 30 srw r28,r28,r9
}
}
/* update cache */
/* XXX: check this - I'm not sure :( */
fat_fd->map.file_cln = start_cln +
ffc13838: 7f 1c c2 14 add r24,r28,r24
ffc1383c: 93 1e 00 34 stw r24,52(r30)
((ofs_cln_save + cmpltd - 1) >> fs_info->vol.bpc_log2);
fat_fd->map.disk_cln = save_cln;
}
if (RC_OK != rc)
ffc13840: 40 9e 00 08 bne- cr7,ffc13848 <fat_file_write+0x210> <== NEVER TAKEN
return rc;
else
return cmpltd;
ffc13844: 7f 5b d3 78 mr r27,r26
fat_fd,
start,
count,
buf,
file_cln_initial);
if (0 > ret)
ffc13848: 2f 9b 00 00 cmpwi cr7,r27,0
rc = -1;
ffc1384c: 39 20 ff ff li r9,-1
fat_fd,
start,
count,
buf,
file_cln_initial);
if (0 > ret)
ffc13850: 41 9c 00 2c blt- cr7,ffc1387c <fat_file_write+0x244> <== NEVER TAKEN
ffc13854: 48 00 00 24 b ffc13878 <fat_file_write+0x240>
uint32_t file_cln_initial = fat_fd->map.file_cln;
uint32_t cln;
if ( count == 0 )
return cmpltd;
ffc13858: 39 20 00 00 li r9,0 <== NOT EXECUTED
ffc1385c: 48 00 00 20 b ffc1387c <fat_file_write+0x244> <== NOT EXECUTED
{
++file_cln_cnt;
bytes_to_write -= ret;
cmpltd += ret;
save_cln = cur_cln;
if (0 < bytes_to_write)
ffc13860: 7f e3 f8 51 subf. r31,r3,r31
if (RC_OK == rc)
{
++file_cln_cnt;
bytes_to_write -= ret;
cmpltd += ret;
save_cln = cur_cln;
ffc13864: 82 c1 00 08 lwz r22,8(r1)
if (0 > ret)
rc = -1;
if (RC_OK == rc)
{
++file_cln_cnt;
ffc13868: 3a f7 00 01 addi r23,r23,1
bytes_to_write -= ret;
cmpltd += ret;
ffc1386c: 7f 5a 1a 14 add r26,r26,r3
save_cln = cur_cln;
if (0 < bytes_to_write)
ffc13870: 41 82 ff 94 beq+ ffc13804 <fat_file_write+0x1cc>
ffc13874: 4b ff ff 78 b ffc137ec <fat_file_write+0x1b4>
}
}
if (RC_OK != rc)
return rc;
else
return cmpltd;
ffc13878: 7f 69 db 78 mr r9,r27
}
ffc1387c: 39 61 00 50 addi r11,r1,80
ffc13880: 7d 23 4b 78 mr r3,r9
ffc13884: 4b fe dd 48 b ffc015cc <_restgpr_19_x>
ffc1a4e4 <fat_free_fat_clusters_chain>:
int
fat_free_fat_clusters_chain(
fat_fs_info_t *fs_info,
uint32_t chain
)
{
ffc1a4e4: 94 21 ff c8 stwu r1,-56(r1)
ffc1a4e8: 7c 08 02 a6 mflr r0
int rc = RC_OK, rc1 = RC_OK;
uint32_t cur_cln = chain;
uint32_t next_cln = 0;
ffc1a4ec: 39 20 00 00 li r9,0
int
fat_free_fat_clusters_chain(
fat_fs_info_t *fs_info,
uint32_t chain
)
{
ffc1a4f0: bf 21 00 1c stmw r25,28(r1)
int rc = RC_OK, rc1 = RC_OK;
uint32_t cur_cln = chain;
uint32_t next_cln = 0;
ffc1a4f4: 7c 3c 0b 78 mr r28,r1
int
fat_free_fat_clusters_chain(
fat_fs_info_t *fs_info,
uint32_t chain
)
{
ffc1a4f8: 7c 7f 1b 78 mr r31,r3
ffc1a4fc: 90 01 00 3c stw r0,60(r1)
ffc1a500: 7c 9a 23 78 mr r26,r4
int rc = RC_OK, rc1 = RC_OK;
uint32_t cur_cln = chain;
ffc1a504: 7c 9d 23 78 mr r29,r4
uint32_t next_cln = 0;
ffc1a508: 95 3c 00 08 stwu r9,8(r28)
uint32_t freed_cls_cnt = 0;
ffc1a50c: 3b c0 00 00 li r30,0
fat_free_fat_clusters_chain(
fat_fs_info_t *fs_info,
uint32_t chain
)
{
int rc = RC_OK, rc1 = RC_OK;
ffc1a510: 3b 60 00 00 li r27,0
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)
ffc1a514: 48 00 00 60 b ffc1a574 <fat_free_fat_clusters_chain+0x90>
{
rc = fat_get_fat_cluster(fs_info, cur_cln, &next_cln);
ffc1a518: 7f e3 fb 78 mr r3,r31
ffc1a51c: 7f a4 eb 78 mr r4,r29
ffc1a520: 7f 85 e3 78 mr r5,r28
ffc1a524: 4b ff fb 65 bl ffc1a088 <fat_get_fat_cluster>
if ( rc != RC_OK )
ffc1a528: 7c 79 1b 79 mr. r25,r3
ffc1a52c: 41 a2 00 24 beq+ ffc1a550 <fat_free_fat_clusters_chain+0x6c><== ALWAYS TAKEN
{
if(fs_info->vol.free_cls != FAT_UNDEFINED_VALUE)
ffc1a530: 81 3f 00 44 lwz r9,68(r31) <== NOT EXECUTED
ffc1a534: 2f 89 ff ff cmpwi cr7,r9,-1 <== NOT EXECUTED
ffc1a538: 41 9e 00 0c beq- cr7,ffc1a544 <fat_free_fat_clusters_chain+0x60><== NOT EXECUTED
fs_info->vol.free_cls += freed_cls_cnt;
ffc1a53c: 7f de 4a 14 add r30,r30,r9 <== NOT EXECUTED
ffc1a540: 93 df 00 44 stw r30,68(r31) <== NOT EXECUTED
fat_buf_release(fs_info);
ffc1a544: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc1a548: 4b ff 94 a1 bl ffc139e8 <fat_buf_release> <== NOT EXECUTED
ffc1a54c: 48 00 00 60 b ffc1a5ac <fat_free_fat_clusters_chain+0xc8><== NOT EXECUTED
return rc;
}
rc = fat_set_fat_cluster(fs_info, cur_cln, FAT_GENFAT_FREE);
ffc1a550: 7f e3 fb 78 mr r3,r31
ffc1a554: 7f a4 eb 78 mr r4,r29
ffc1a558: 38 a0 00 00 li r5,0
ffc1a55c: 4b ff fc ed bl ffc1a248 <fat_set_fat_cluster>
if ( rc != RC_OK )
ffc1a560: 2c 03 00 00 cmpwi r3,0
ffc1a564: 41 82 00 08 beq- ffc1a56c <fat_free_fat_clusters_chain+0x88><== ALWAYS TAKEN
ffc1a568: 7c 7b 1b 78 mr r27,r3 <== NOT EXECUTED
rc1 = rc;
freed_cls_cnt++;
cur_cln = next_cln;
ffc1a56c: 83 a1 00 08 lwz r29,8(r1)
rc = fat_set_fat_cluster(fs_info, cur_cln, FAT_GENFAT_FREE);
if ( rc != RC_OK )
rc1 = rc;
freed_cls_cnt++;
ffc1a570: 3b de 00 01 addi r30,r30,1
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)
ffc1a574: 81 3f 00 10 lwz r9,16(r31)
ffc1a578: 7f aa 48 38 and r10,r29,r9
ffc1a57c: 81 3f 00 14 lwz r9,20(r31)
ffc1a580: 7f 8a 48 40 cmplw cr7,r10,r9
ffc1a584: 41 9c ff 94 blt+ cr7,ffc1a518 <fat_free_fat_clusters_chain+0x34>
freed_cls_cnt++;
cur_cln = next_cln;
}
fs_info->vol.next_cl = chain;
if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE)
ffc1a588: 81 3f 00 44 lwz r9,68(r31)
freed_cls_cnt++;
cur_cln = next_cln;
}
fs_info->vol.next_cl = chain;
ffc1a58c: 93 5f 00 4c stw r26,76(r31)
if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE)
ffc1a590: 2f 89 ff ff cmpwi cr7,r9,-1
ffc1a594: 41 9e 00 0c beq- cr7,ffc1a5a0 <fat_free_fat_clusters_chain+0xbc><== ALWAYS TAKEN
fs_info->vol.free_cls += freed_cls_cnt;
ffc1a598: 7f de 4a 14 add r30,r30,r9 <== NOT EXECUTED
ffc1a59c: 93 df 00 44 stw r30,68(r31) <== NOT EXECUTED
fat_buf_release(fs_info);
ffc1a5a0: 7f e3 fb 78 mr r3,r31
ffc1a5a4: 4b ff 94 45 bl ffc139e8 <fat_buf_release>
ffc1a5a8: 7f 79 db 78 mr r25,r27
if (rc1 != RC_OK)
return rc1;
return RC_OK;
}
ffc1a5ac: 39 61 00 38 addi r11,r1,56
ffc1a5b0: 7f 23 cb 78 mr r3,r25
ffc1a5b4: 4b fe 70 30 b ffc015e4 <_restgpr_25_x>
ffc14a6c <fat_free_unique_ino>:
fat_free_unique_ino(
fat_fs_info_t *fs_info,
uint32_t ino
)
{
FAT_SET_UNIQ_INO_FREE((ino - fs_info->uino_base), fs_info->uino);
ffc14a6c: 81 23 00 80 lwz r9,128(r3) <== NOT EXECUTED
ffc14a70: 39 00 ff fe li r8,-2 <== NOT EXECUTED
ffc14a74: 81 43 00 74 lwz r10,116(r3) <== NOT EXECUTED
ffc14a78: 7c 89 20 50 subf r4,r9,r4 <== NOT EXECUTED
ffc14a7c: 54 89 e8 fe rlwinm r9,r4,29,3,31 <== NOT EXECUTED
ffc14a80: 54 84 07 7e clrlwi r4,r4,29 <== NOT EXECUTED
ffc14a84: 5d 04 20 3e rotlw r4,r8,r4 <== NOT EXECUTED
ffc14a88: 7d 0a 48 ae lbzx r8,r10,r9 <== NOT EXECUTED
ffc14a8c: 7c 88 40 38 and r8,r4,r8 <== NOT EXECUTED
ffc14a90: 7d 0a 49 ae stbx r8,r10,r9 <== NOT EXECUTED
ffc14a94: 4e 80 00 20 blr <== NOT EXECUTED
ffc1a088 <fat_get_fat_cluster>:
uint8_t *sec_buf;
uint32_t sec = 0;
uint32_t ofs = 0;
/* sanity check */
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
ffc1a088: 2b 84 00 01 cmplwi cr7,r4,1
fat_get_fat_cluster(
fat_fs_info_t *fs_info,
uint32_t cln,
uint32_t *ret_val
)
{
ffc1a08c: 94 21 ff c8 stwu r1,-56(r1)
ffc1a090: 7c 08 02 a6 mflr r0
ffc1a094: bf 21 00 1c stmw r25,28(r1)
ffc1a098: 7c 9f 23 78 mr r31,r4
ffc1a09c: 90 01 00 3c stw r0,60(r1)
uint8_t *sec_buf;
uint32_t sec = 0;
uint32_t ofs = 0;
/* sanity check */
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
ffc1a0a0: 40 9d 01 84 ble- cr7,ffc1a224 <fat_get_fat_cluster+0x19c><== NEVER TAKEN
ffc1a0a4: 81 23 00 38 lwz r9,56(r3)
ffc1a0a8: 7c 7d 1b 78 mr r29,r3
ffc1a0ac: 39 29 00 01 addi r9,r9,1
ffc1a0b0: 7f 84 48 40 cmplw cr7,r4,r9
ffc1a0b4: 40 bd 00 08 ble+ cr7,ffc1a0bc <fat_get_fat_cluster+0x34><== ALWAYS TAKEN
ffc1a0b8: 48 00 01 6c b ffc1a224 <fat_get_fat_cluster+0x19c> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
ffc1a0bc: 89 23 00 0e lbz r9,14(r3)
ffc1a0c0: 7c be 2b 78 mr r30,r5
ffc1a0c4: 71 27 00 01 andi. r7,r9,1
ffc1a0c8: 41 82 00 10 beq- ffc1a0d8 <fat_get_fat_cluster+0x50>
ffc1a0cc: 54 8a f8 7e rlwinm r10,r4,31,1,31
ffc1a0d0: 7d 4a 22 14 add r10,r10,r4
ffc1a0d4: 48 00 00 18 b ffc1a0ec <fat_get_fat_cluster+0x64>
ffc1a0d8: 55 28 07 bc rlwinm r8,r9,0,30,30
ffc1a0dc: 71 06 00 ff andi. r6,r8,255
ffc1a0e0: 54 8a 10 3a rlwinm r10,r4,2,0,29
ffc1a0e4: 41 82 00 08 beq- ffc1a0ec <fat_get_fat_cluster+0x64>
ffc1a0e8: 54 8a 08 3c rlwinm r10,r4,1,0,30
fs_info->vol.afat_loc;
ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1);
ffc1a0ec: 2f 87 00 00 cmpwi cr7,r7,0
/* sanity check */
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
rtems_set_errno_and_return_minus_one(EIO);
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
ffc1a0f0: 8b 5d 00 02 lbz r26,2(r29)
ffc1a0f4: 81 1d 00 58 lwz r8,88(r29)
ffc1a0f8: 7d 4a d4 30 srw r10,r10,r26
ffc1a0fc: 7f 4a 42 14 add r26,r10,r8
fs_info->vol.afat_loc;
ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1);
ffc1a100: 41 9e 00 10 beq- cr7,ffc1a110 <fat_get_fat_cluster+0x88>
ffc1a104: 57 fb f8 7e rlwinm r27,r31,31,1,31
ffc1a108: 7f 7b fa 14 add r27,r27,r31
ffc1a10c: 48 00 00 18 b ffc1a124 <fat_get_fat_cluster+0x9c>
ffc1a110: 55 29 07 bc rlwinm r9,r9,0,30,30
ffc1a114: 71 2a 00 ff andi. r10,r9,255
ffc1a118: 57 fb 10 3a rlwinm r27,r31,2,0,29
ffc1a11c: 41 82 00 08 beq- ffc1a124 <fat_get_fat_cluster+0x9c>
ffc1a120: 57 fb 08 3c rlwinm r27,r31,1,0,30
rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &sec_buf);
ffc1a124: 7f a3 eb 78 mr r3,r29
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);
ffc1a128: a3 3d 00 00 lhz r25,0(r29)
rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &sec_buf);
ffc1a12c: 7f 44 d3 78 mr r4,r26
ffc1a130: 38 a0 00 01 li r5,1
ffc1a134: 38 c1 00 08 addi r6,r1,8
ffc1a138: 4b ff 9a 71 bl ffc13ba8 <fat_buf_access>
if (rc != RC_OK)
ffc1a13c: 7c 7c 1b 79 mr. r28,r3
ffc1a140: 40 82 00 fc bne- ffc1a23c <fat_get_fat_cluster+0x1b4> <== NEVER TAKEN
return rc;
switch ( fs_info->vol.type )
ffc1a144: 89 5d 00 0e lbz r10,14(r29)
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);
ffc1a148: 39 39 ff ff addi r9,r25,-1
ffc1a14c: 7f 69 48 38 and r9,r27,r9
rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &sec_buf);
if (rc != RC_OK)
return rc;
switch ( fs_info->vol.type )
ffc1a150: 2f 8a 00 02 cmpwi cr7,r10,2
ffc1a154: 41 9e 00 98 beq- cr7,ffc1a1ec <fat_get_fat_cluster+0x164>
ffc1a158: 2f 8a 00 04 cmpwi cr7,r10,4
ffc1a15c: 41 9e 00 a8 beq- cr7,ffc1a204 <fat_get_fat_cluster+0x17c>
ffc1a160: 2f 8a 00 01 cmpwi cr7,r10,1
ffc1a164: 40 be 00 c0 bne+ cr7,ffc1a224 <fat_get_fat_cluster+0x19c><== NEVER TAKEN
/*
* we are enforced in complex computations for FAT12 to escape CPU
* align problems for some architectures
*/
*ret_val = (*(sec_buf + ofs));
if ( ofs == (fs_info->vol.bps - 1) )
ffc1a168: a0 fd 00 00 lhz r7,0(r29)
case FAT_FAT12:
/*
* we are enforced in complex computations for FAT12 to escape CPU
* align problems for some architectures
*/
*ret_val = (*(sec_buf + ofs));
ffc1a16c: 81 01 00 08 lwz r8,8(r1)
if ( ofs == (fs_info->vol.bps - 1) )
ffc1a170: 38 e7 ff ff addi r7,r7,-1
ffc1a174: 7f 89 38 00 cmpw cr7,r9,r7
case FAT_FAT12:
/*
* we are enforced in complex computations for FAT12 to escape CPU
* align problems for some architectures
*/
*ret_val = (*(sec_buf + ofs));
ffc1a178: 7d 48 48 ae lbzx r10,r8,r9
ffc1a17c: 91 5e 00 00 stw r10,0(r30)
if ( ofs == (fs_info->vol.bps - 1) )
ffc1a180: 40 be 00 3c bne+ cr7,ffc1a1bc <fat_get_fat_cluster+0x134><== ALWAYS TAKEN
{
rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ,
ffc1a184: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED
ffc1a188: 38 9a 00 01 addi r4,r26,1 <== NOT EXECUTED
ffc1a18c: 38 a0 00 01 li r5,1 <== NOT EXECUTED
ffc1a190: 38 c1 00 08 addi r6,r1,8 <== NOT EXECUTED
ffc1a194: 4b ff 9a 15 bl ffc13ba8 <fat_buf_access> <== NOT EXECUTED
&sec_buf);
if (rc != RC_OK)
ffc1a198: 2c 03 00 00 cmpwi r3,0 <== NOT EXECUTED
ffc1a19c: 40 82 00 9c bne- ffc1a238 <fat_get_fat_cluster+0x1b0> <== NOT EXECUTED
return rc;
*ret_val |= *sec_buf << 8;
ffc1a1a0: 81 21 00 08 lwz r9,8(r1) <== NOT EXECUTED
ffc1a1a4: 89 49 00 00 lbz r10,0(r9) <== NOT EXECUTED
ffc1a1a8: 81 3e 00 00 lwz r9,0(r30) <== NOT EXECUTED
ffc1a1ac: 55 4a 40 2e rlwinm r10,r10,8,0,23 <== NOT EXECUTED
ffc1a1b0: 7d 29 53 78 or r9,r9,r10 <== NOT EXECUTED
ffc1a1b4: 91 3e 00 00 stw r9,0(r30) <== NOT EXECUTED
ffc1a1b8: 48 00 00 18 b ffc1a1d0 <fat_get_fat_cluster+0x148> <== NOT EXECUTED
}
else
{
*ret_val |= *(sec_buf + ofs + 1) << 8;
ffc1a1bc: 7d 28 4a 14 add r9,r8,r9
ffc1a1c0: 89 29 00 01 lbz r9,1(r9)
ffc1a1c4: 55 29 40 2e rlwinm r9,r9,8,0,23
ffc1a1c8: 7d 2a 53 78 or r10,r9,r10
ffc1a1cc: 91 5e 00 00 stw r10,0(r30)
}
if ( FAT_CLUSTER_IS_ODD(cln) )
ffc1a1d0: 73 e6 00 01 andi. r6,r31,1
ffc1a1d4: 81 3e 00 00 lwz r9,0(r30)
ffc1a1d8: 41 82 00 0c beq- ffc1a1e4 <fat_get_fat_cluster+0x15c>
*ret_val = (*ret_val) >> FAT12_SHIFT;
ffc1a1dc: 55 29 e1 3e rlwinm r9,r9,28,4,31
ffc1a1e0: 48 00 00 3c b ffc1a21c <fat_get_fat_cluster+0x194>
else
*ret_val = (*ret_val) & FAT_FAT12_MASK;
ffc1a1e4: 55 29 05 3e clrlwi r9,r9,20
ffc1a1e8: 48 00 00 34 b ffc1a21c <fat_get_fat_cluster+0x194>
break;
case FAT_FAT16:
*ret_val = *((uint16_t *)(sec_buf + ofs));
ffc1a1ec: 81 41 00 08 lwz r10,8(r1)
ffc1a1f0: 7d 2a 4a 2e lhzx r9,r10,r9
*ret_val = CF_LE_W(*ret_val);
ffc1a1f4: 55 2a c2 3e rlwinm r10,r9,24,8,31
ffc1a1f8: 55 29 44 2e rlwinm r9,r9,8,16,23
ffc1a1fc: 7d 49 4b 78 or r9,r10,r9
ffc1a200: 48 00 00 1c b ffc1a21c <fat_get_fat_cluster+0x194>
break;
case FAT_FAT32:
*ret_val = *((uint32_t *)(sec_buf + ofs));
ffc1a204: 81 41 00 08 lwz r10,8(r1)
ffc1a208: 7d 4a 48 2e lwzx r10,r10,r9
ffc1a20c: 51 49 46 3e rlwimi r9,r10,8,24,31
ffc1a210: 51 49 c4 2e rlwimi r9,r10,24,16,23
ffc1a214: 51 49 42 1e rlwimi r9,r10,8,8,15
ffc1a218: 51 49 c0 0e rlwimi r9,r10,24,0,7
*ret_val = CF_LE_L(*ret_val);
ffc1a21c: 91 3e 00 00 stw r9,0(r30)
break;
ffc1a220: 48 00 00 1c b ffc1a23c <fat_get_fat_cluster+0x1b4>
default:
rtems_set_errno_and_return_minus_one(EIO);
ffc1a224: 48 00 1e c5 bl ffc1c0e8 <__errno> <== NOT EXECUTED
ffc1a228: 39 20 00 05 li r9,5 <== NOT EXECUTED
ffc1a22c: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED
ffc1a230: 3b 80 ff ff li r28,-1 <== NOT EXECUTED
ffc1a234: 48 00 00 08 b ffc1a23c <fat_get_fat_cluster+0x1b4> <== NOT EXECUTED
*ret_val = (*(sec_buf + ofs));
if ( ofs == (fs_info->vol.bps - 1) )
{
rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ,
&sec_buf);
if (rc != RC_OK)
ffc1a238: 7c 7c 1b 78 mr r28,r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
break;
}
return RC_OK;
}
ffc1a23c: 39 61 00 38 addi r11,r1,56
ffc1a240: 7f 83 e3 78 mr r3,r28
ffc1a244: 4b fe 73 a0 b ffc015e4 <_restgpr_25_x>
ffc1498c <fat_get_unique_ino>:
* 0 means FAILED !!!
*
*/
uint32_t
fat_get_unique_ino(fat_fs_info_t *fs_info)
{
ffc1498c: 94 21 ff e8 stwu r1,-24(r1) <== NOT EXECUTED
ffc14990: 7c 08 02 a6 mflr r0 <== NOT EXECUTED
ffc14994: bf a1 00 0c stmw r29,12(r1) <== 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))
ffc14998: 3f a0 0f ff lis r29,4095 <== NOT EXECUTED
* 0 means FAILED !!!
*
*/
uint32_t
fat_get_unique_ino(fat_fs_info_t *fs_info)
{
ffc1499c: 7c 7f 1b 78 mr r31,r3 <== NOT EXECUTED
ffc149a0: 90 01 00 1c stw r0,28(r1) <== NOT EXECUTED
uint32_t j = 0;
bool resrc_unsuff = false;
while (!resrc_unsuff)
{
for (j = 0; j < fs_info->uino_pool_size; j++)
ffc149a4: 3b c0 00 00 li r30,0 <== 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))
ffc149a8: 63 bd ff ff ori r29,r29,65535 <== NOT EXECUTED
fat_get_unique_ino(fat_fs_info_t *fs_info)
{
uint32_t j = 0;
bool resrc_unsuff = false;
while (!resrc_unsuff)
ffc149ac: 48 00 00 a4 b ffc14a50 <fat_get_unique_ino+0xc4> <== NOT EXECUTED
{
for (j = 0; j < fs_info->uino_pool_size; j++)
{
if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino))
ffc149b0: 81 3f 00 78 lwz r9,120(r31) <== NOT EXECUTED
ffc149b4: 81 5f 00 74 lwz r10,116(r31) <== NOT EXECUTED
ffc149b8: 55 27 e8 fe rlwinm r7,r9,29,3,31 <== NOT EXECUTED
ffc149bc: 7c ca 3a 14 add r6,r10,r7 <== NOT EXECUTED
ffc149c0: 7d 4a 38 ae lbzx r10,r10,r7 <== NOT EXECUTED
ffc149c4: 55 27 07 7e clrlwi r7,r9,29 <== NOT EXECUTED
ffc149c8: 7d 45 3e 30 sraw r5,r10,r7 <== NOT EXECUTED
ffc149cc: 70 a3 00 01 andi. r3,r5,1 <== NOT EXECUTED
ffc149d0: 40 a2 00 24 bne+ ffc149f4 <fat_get_unique_ino+0x68> <== NOT EXECUTED
{
FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino);
ffc149d4: 39 20 00 01 li r9,1 <== NOT EXECUTED
ffc149d8: 7d 27 38 30 slw r7,r9,r7 <== NOT EXECUTED
ffc149dc: 7c ea 53 78 or r10,r7,r10 <== NOT EXECUTED
ffc149e0: 99 46 00 00 stb r10,0(r6) <== NOT EXECUTED
return (fs_info->uino_base + fs_info->index);
ffc149e4: 80 7f 00 78 lwz r3,120(r31) <== NOT EXECUTED
ffc149e8: 81 3f 00 80 lwz r9,128(r31) <== NOT EXECUTED
ffc149ec: 7c 63 4a 14 add r3,r3,r9 <== NOT EXECUTED
ffc149f0: 48 00 00 74 b ffc14a64 <fat_get_unique_ino+0xd8> <== NOT EXECUTED
}
fs_info->index++;
ffc149f4: 39 29 00 01 addi r9,r9,1 <== NOT EXECUTED
if (fs_info->index >= fs_info->uino_pool_size)
ffc149f8: 7f 89 40 40 cmplw cr7,r9,r8 <== NOT EXECUTED
ffc149fc: 40 9c 00 0c bge- cr7,ffc14a08 <fat_get_unique_ino+0x7c> <== 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++;
ffc14a00: 91 3f 00 78 stw r9,120(r31) <== NOT EXECUTED
ffc14a04: 48 00 00 08 b ffc14a0c <fat_get_unique_ino+0x80> <== NOT EXECUTED
if (fs_info->index >= fs_info->uino_pool_size)
fs_info->index = 0;
ffc14a08: 93 df 00 78 stw r30,120(r31) <== NOT EXECUTED
uint32_t j = 0;
bool resrc_unsuff = false;
while (!resrc_unsuff)
{
for (j = 0; j < fs_info->uino_pool_size; j++)
ffc14a0c: 38 84 00 01 addi r4,r4,1 <== NOT EXECUTED
ffc14a10: 42 00 ff a0 bdnz+ ffc149b0 <fat_get_unique_ino+0x24> <== 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))
ffc14a14: 81 3f 00 80 lwz r9,128(r31) <== NOT EXECUTED
ffc14a18: 54 84 08 3c rlwinm r4,r4,1,0,30 <== NOT EXECUTED
ffc14a1c: 7d 29 e8 50 subf r9,r9,r29 <== NOT EXECUTED
ffc14a20: 7f 84 48 40 cmplw cr7,r4,r9 <== NOT EXECUTED
ffc14a24: 41 9c 00 0c blt- cr7,ffc14a30 <fat_get_unique_ino+0xa4> <== NOT EXECUTED
resrc_unsuff = true;
}
else
resrc_unsuff = true;
}
return 0;
ffc14a28: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc14a2c: 48 00 00 38 b ffc14a64 <fat_get_unique_ino+0xd8> <== NOT EXECUTED
fs_info->index = 0;
}
if ((fs_info->uino_pool_size << 1) < (0x0FFFFFFF - fs_info->uino_base))
{
fs_info->uino_pool_size <<= 1;
ffc14a30: 90 9f 00 7c stw r4,124(r31) <== NOT EXECUTED
fs_info->uino = realloc(fs_info->uino, fs_info->uino_pool_size);
ffc14a34: 80 7f 00 74 lwz r3,116(r31) <== NOT EXECUTED
ffc14a38: 4b ff 23 65 bl ffc06d9c <realloc> <== NOT EXECUTED
if (fs_info->uino != NULL)
ffc14a3c: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
}
if ((fs_info->uino_pool_size << 1) < (0x0FFFFFFF - fs_info->uino_base))
{
fs_info->uino_pool_size <<= 1;
fs_info->uino = realloc(fs_info->uino, fs_info->uino_pool_size);
ffc14a40: 90 7f 00 74 stw r3,116(r31) <== NOT EXECUTED
if (fs_info->uino != NULL)
ffc14a44: 41 9e ff e4 beq+ cr7,ffc14a28 <fat_get_unique_ino+0x9c> <== NOT EXECUTED
fs_info->index = fs_info->uino_pool_size;
ffc14a48: 81 3f 00 7c lwz r9,124(r31) <== NOT EXECUTED
ffc14a4c: 91 3f 00 78 stw r9,120(r31) <== NOT EXECUTED
uint32_t j = 0;
bool resrc_unsuff = false;
while (!resrc_unsuff)
{
for (j = 0; j < fs_info->uino_pool_size; j++)
ffc14a50: 81 1f 00 7c lwz r8,124(r31) <== NOT EXECUTED
ffc14a54: 38 80 00 00 li r4,0 <== NOT EXECUTED
FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino);
return (fs_info->uino_base + fs_info->index);
}
fs_info->index++;
if (fs_info->index >= fs_info->uino_pool_size)
fs_info->index = 0;
ffc14a58: 39 28 00 01 addi r9,r8,1 <== NOT EXECUTED
ffc14a5c: 7d 29 03 a6 mtctr r9 <== NOT EXECUTED
ffc14a60: 4b ff ff b0 b ffc14a10 <fat_get_unique_ino+0x84> <== NOT EXECUTED
}
else
resrc_unsuff = true;
}
return 0;
}
ffc14a64: 39 61 00 18 addi r11,r1,24 <== NOT EXECUTED
ffc14a68: 4b fe cb 8c b ffc015f4 <_restgpr_29_x> <== NOT EXECUTED
ffc14908 <fat_init_clusters_chain>:
int
fat_init_clusters_chain(
fat_fs_info_t *fs_info,
uint32_t start_cln
)
{
ffc14908: 94 21 ff e0 stwu r1,-32(r1)
ffc1490c: 7c 08 02 a6 mflr r0
ffc14910: bf c1 00 18 stmw r30,24(r1)
int rc = RC_OK;
ssize_t ret = 0;
uint32_t cur_cln = start_cln;
ffc14914: 7c 3e 0b 78 mr r30,r1
int
fat_init_clusters_chain(
fat_fs_info_t *fs_info,
uint32_t start_cln
)
{
ffc14918: 7c 7f 1b 78 mr r31,r3
ffc1491c: 90 01 00 24 stw r0,36(r1)
int rc = RC_OK;
ssize_t ret = 0;
uint32_t cur_cln = start_cln;
ffc14920: 94 9e 00 08 stwu r4,8(r30)
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
ffc14924: 48 00 00 3c b ffc14960 <fat_init_clusters_chain+0x58>
{
ret = fat_cluster_set(fs_info, cur_cln, 0, fs_info->vol.bpc, 0);
ffc14928: a0 df 00 06 lhz r6,6(r31)
ffc1492c: 7f e3 fb 78 mr r3,r31
ffc14930: 38 a0 00 00 li r5,0
ffc14934: 38 e0 00 00 li r7,0
ffc14938: 4b ff f4 89 bl ffc13dc0 <fat_cluster_set>
if ( ret != fs_info->vol.bpc )
ffc1493c: a1 3f 00 06 lhz r9,6(r31)
ffc14940: 7f 83 48 00 cmpw cr7,r3,r9
ffc14944: 40 9e 00 3c bne- cr7,ffc14980 <fat_init_clusters_chain+0x78><== NEVER TAKEN
{
return -1;
}
rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln);
ffc14948: 80 81 00 08 lwz r4,8(r1)
ffc1494c: 7f e3 fb 78 mr r3,r31
ffc14950: 7f c5 f3 78 mr r5,r30
ffc14954: 48 00 57 35 bl ffc1a088 <fat_get_fat_cluster>
if ( rc != RC_OK )
ffc14958: 2c 03 00 00 cmpwi r3,0
ffc1495c: 40 82 00 28 bne- ffc14984 <fat_init_clusters_chain+0x7c><== NEVER TAKEN
{
int rc = RC_OK;
ssize_t ret = 0;
uint32_t cur_cln = start_cln;
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
ffc14960: 81 3f 00 10 lwz r9,16(r31)
ffc14964: 80 81 00 08 lwz r4,8(r1)
ffc14968: 7c 8a 48 38 and r10,r4,r9
ffc1496c: 81 3f 00 14 lwz r9,20(r31)
ffc14970: 7f 8a 48 40 cmplw cr7,r10,r9
ffc14974: 41 9c ff b4 blt+ cr7,ffc14928 <fat_init_clusters_chain+0x20>
return rc;
}
}
return rc;
ffc14978: 38 60 00 00 li r3,0
ffc1497c: 48 00 00 08 b ffc14984 <fat_init_clusters_chain+0x7c>
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
{
ret = fat_cluster_set(fs_info, cur_cln, 0, fs_info->vol.bpc, 0);
if ( ret != fs_info->vol.bpc )
{
return -1;
ffc14980: 38 60 ff ff li r3,-1 <== NOT EXECUTED
}
}
return rc;
}
ffc14984: 39 61 00 20 addi r11,r1,32
ffc14988: 4b fe cc 70 b ffc015f8 <_restgpr_30_x>
ffc14018 <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)
{
ffc14018: 94 21 ff 28 stwu r1,-216(r1)
ffc1401c: 7c 08 02 a6 mflr r0
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;
ffc14020: 39 20 00 00 li r9,0
* 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)
{
ffc14024: bd c1 00 90 stmw r14,144(r1)
ffc14028: 7c 7f 1b 78 mr r31,r3
ssize_t ret = 0;
struct stat stat_buf;
int i = 0;
rtems_bdbuf_buffer *block = NULL;
vol->fd = open(device, O_RDWR);
ffc1402c: 7c 83 23 78 mr r3,r4
ffc14030: 38 80 00 02 li r4,2
* 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)
{
ffc14034: 90 01 00 dc stw r0,220(r1)
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;
ffc14038: 91 21 00 5c stw r9,92(r1)
vol->fd = open(device, O_RDWR);
ffc1403c: 4c c6 31 82 crclr 4*cr1+eq
ffc14040: 4b ff 2a b5 bl ffc06af4 <open>
if (vol->fd < 0)
ffc14044: 2f 83 00 00 cmpwi cr7,r3,0
ssize_t ret = 0;
struct stat stat_buf;
int i = 0;
rtems_bdbuf_buffer *block = NULL;
vol->fd = open(device, O_RDWR);
ffc14048: 90 7f 00 60 stw r3,96(r31)
if (vol->fd < 0)
ffc1404c: 40 bc 00 08 bge+ cr7,ffc14054 <fat_init_volume_info+0x3c><== ALWAYS TAKEN
ffc14050: 48 00 00 1c b ffc1406c <fat_init_volume_info+0x54> <== NOT EXECUTED
{
rtems_set_errno_and_return_minus_one(ENXIO);
}
rc = fstat(vol->fd, &stat_buf);
ffc14054: 38 81 00 08 addi r4,r1,8
ffc14058: 4b ff 1d 55 bl ffc05dac <fstat>
if (rc != 0)
ffc1405c: 2f 83 00 00 cmpwi cr7,r3,0
ffc14060: 80 7f 00 60 lwz r3,96(r31)
ffc14064: 41 be 00 14 beq+ cr7,ffc14078 <fat_init_volume_info+0x60><== ALWAYS TAKEN
{
close(vol->fd);
ffc14068: 4b ff 1b ed bl ffc05c54 <close> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENXIO);
ffc1406c: 48 00 80 7d bl ffc1c0e8 <__errno> <== NOT EXECUTED
ffc14070: 39 20 00 06 li r9,6 <== NOT EXECUTED
ffc14074: 48 00 06 54 b ffc146c8 <fat_init_volume_info+0x6b0> <== NOT EXECUTED
}
/* Must be a block device. */
if (!S_ISBLK(stat_buf.st_mode))
ffc14078: 81 21 00 14 lwz r9,20(r1)
ffc1407c: 55 29 04 26 rlwinm r9,r9,0,16,19
ffc14080: 2f 89 60 00 cmpwi cr7,r9,24576
ffc14084: 41 be 00 08 beq+ cr7,ffc1408c <fat_init_volume_info+0x74><== ALWAYS TAKEN
ffc14088: 4b ff ff e0 b ffc14068 <fat_init_volume_info+0x50> <== 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);
ffc1408c: 3c 80 40 04 lis r4,16388
ffc14090: 60 84 42 09 ori r4,r4,16905
ffc14094: 38 bf 00 64 addi r5,r31,100
ffc14098: 4c c6 31 82 crclr 4*cr1+eq
ffc1409c: 48 00 15 e5 bl ffc15680 <ioctl>
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);
if (rc != 0) {
ffc140a0: 2f 83 00 00 cmpwi cr7,r3,0
ffc140a4: 41 be 00 0c beq+ cr7,ffc140b0 <fat_init_volume_info+0x98><== ALWAYS TAKEN
close(vol->fd);
ffc140a8: 80 7f 00 60 lwz r3,96(r31) <== NOT EXECUTED
ffc140ac: 4b ff ff bc b ffc14068 <fat_init_volume_info+0x50> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENXIO);
}
/* Read boot record */
/* FIXME: Asserts FAT_MAX_BPB_SIZE < bdbuf block size */
sc = rtems_bdbuf_read( vol->dd, 0, &block);
ffc140b0: 80 7f 00 64 lwz r3,100(r31)
ffc140b4: 38 80 00 00 li r4,0
ffc140b8: 38 a1 00 5c addi r5,r1,92
ffc140bc: 4b ff d8 0d bl ffc118c8 <rtems_bdbuf_read>
if (sc != RTEMS_SUCCESSFUL)
ffc140c0: 2f 83 00 00 cmpwi cr7,r3,0
ffc140c4: 41 be 00 08 beq+ cr7,ffc140cc <fat_init_volume_info+0xb4><== ALWAYS TAKEN
ffc140c8: 48 00 00 cc b ffc14194 <fat_init_volume_info+0x17c> <== NOT EXECUTED
{
close(vol->fd);
rtems_set_errno_and_return_minus_one( EIO);
}
memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE);
ffc140cc: 80 61 00 5c lwz r3,92(r1)
ffc140d0: 81 23 00 1c lwz r9,28(r3)
ffc140d4: 89 09 00 0c lbz r8,12(r9)
ffc140d8: 89 89 00 0b lbz r12,11(r9)
ffc140dc: 89 69 00 0e lbz r11,14(r9)
ffc140e0: 88 c9 00 11 lbz r6,17(r9)
ffc140e4: 88 e9 00 17 lbz r7,23(r9)
ffc140e8: 88 09 00 0f lbz r0,15(r9)
ffc140ec: 88 a9 00 12 lbz r5,18(r9)
ffc140f0: 89 49 00 25 lbz r10,37(r9)
ffc140f4: 88 89 00 31 lbz r4,49(r9)
ffc140f8: 91 01 00 6c stw r8,108(r1)
ffc140fc: 89 09 00 16 lbz r8,22(r9)
ffc14100: 8b c9 00 0d lbz r30,13(r9)
ffc14104: 8b 89 00 10 lbz r28,16(r9)
ffc14108: 8a 49 00 13 lbz r18,19(r9)
ffc1410c: 8a 29 00 14 lbz r17,20(r9)
ffc14110: 8a a9 00 20 lbz r21,32(r9)
ffc14114: 8a 69 00 21 lbz r19,33(r9)
ffc14118: 8a 89 00 22 lbz r20,34(r9)
ffc1411c: 8a c9 00 23 lbz r22,35(r9)
ffc14120: 89 e9 00 24 lbz r15,36(r9)
ffc14124: 89 c9 00 26 lbz r14,38(r9)
ffc14128: 8a 09 00 27 lbz r16,39(r9)
ffc1412c: 8b a9 00 28 lbz r29,40(r9)
ffc14130: 8b 29 00 2c lbz r25,44(r9)
ffc14134: 8a e9 00 2d lbz r23,45(r9)
ffc14138: 8b 09 00 2e lbz r24,46(r9)
ffc1413c: 8b 49 00 2f lbz r26,47(r9)
ffc14140: 8b 69 00 30 lbz r27,48(r9)
ffc14144: 91 41 00 68 stw r10,104(r1)
sc = rtems_bdbuf_release( block);
ffc14148: 90 01 00 8c stw r0,140(r1)
ffc1414c: 90 81 00 70 stw r4,112(r1)
ffc14150: 90 a1 00 78 stw r5,120(r1)
ffc14154: 90 c1 00 74 stw r6,116(r1)
ffc14158: 90 e1 00 80 stw r7,128(r1)
ffc1415c: 91 01 00 7c stw r8,124(r1)
ffc14160: 91 61 00 84 stw r11,132(r1)
ffc14164: 91 81 00 88 stw r12,136(r1)
ffc14168: 4b ff d9 59 bl ffc11ac0 <rtems_bdbuf_release>
if (sc != RTEMS_SUCCESSFUL)
ffc1416c: 2f 83 00 00 cmpwi cr7,r3,0
ffc14170: 80 01 00 8c lwz r0,140(r1)
ffc14174: 80 81 00 70 lwz r4,112(r1)
ffc14178: 80 a1 00 78 lwz r5,120(r1)
ffc1417c: 80 c1 00 74 lwz r6,116(r1)
ffc14180: 80 e1 00 80 lwz r7,128(r1)
ffc14184: 81 01 00 7c lwz r8,124(r1)
ffc14188: 81 61 00 84 lwz r11,132(r1)
ffc1418c: 81 81 00 88 lwz r12,136(r1)
ffc14190: 41 be 00 18 beq+ cr7,ffc141a8 <fat_init_volume_info+0x190><== ALWAYS TAKEN
{
close(vol->fd);
ffc14194: 80 7f 00 60 lwz r3,96(r31) <== NOT EXECUTED
ffc14198: 4b ff 1a bd bl ffc05c54 <close> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EIO );
ffc1419c: 48 00 7f 4d bl ffc1c0e8 <__errno> <== NOT EXECUTED
ffc141a0: 39 20 00 05 li r9,5 <== NOT EXECUTED
ffc141a4: 48 00 05 24 b ffc146c8 <fat_init_volume_info+0x6b0> <== NOT EXECUTED
}
/* Evaluate boot record */
vol->bps = FAT_GET_BR_BYTES_PER_SECTOR(boot_rec);
ffc141a8: 81 41 00 6c lwz r10,108(r1)
ffc141ac: 55 49 40 2e rlwinm r9,r10,8,0,23
ffc141b0: 7d 2c 63 78 or r12,r9,r12
if ( (vol->bps != 512) &&
ffc141b4: 2f 8c 02 00 cmpwi cr7,r12,512
close(vol->fd);
rtems_set_errno_and_return_minus_one( EIO );
}
/* Evaluate boot record */
vol->bps = FAT_GET_BR_BYTES_PER_SECTOR(boot_rec);
ffc141b8: b1 9f 00 00 sth r12,0(r31)
if ( (vol->bps != 512) &&
ffc141bc: 41 9e 00 20 beq- cr7,ffc141dc <fat_init_volume_info+0x1c4><== ALWAYS TAKEN
ffc141c0: 2f 8c 04 00 cmpwi cr7,r12,1024 <== NOT EXECUTED
ffc141c4: 41 9e 00 18 beq- cr7,ffc141dc <fat_init_volume_info+0x1c4><== NOT EXECUTED
(vol->bps != 1024) &&
ffc141c8: 2f 8c 08 00 cmpwi cr7,r12,2048 <== NOT EXECUTED
ffc141cc: 41 9e 00 10 beq- cr7,ffc141dc <fat_init_volume_info+0x1c4><== NOT EXECUTED
(vol->bps != 2048) &&
ffc141d0: 2f 8c 10 00 cmpwi cr7,r12,4096 <== NOT EXECUTED
ffc141d4: 41 be 00 08 beq+ cr7,ffc141dc <fat_init_volume_info+0x1c4><== NOT EXECUTED
ffc141d8: 48 00 02 e0 b ffc144b8 <fat_init_volume_info+0x4a0> <== NOT EXECUTED
(vol->bps != 4096))
{
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;
ffc141dc: 39 20 00 00 li r9,0
ffc141e0: 99 3f 00 03 stb r9,3(r31)
ffc141e4: 55 83 ba 7e rlwinm r3,r12,23,9,31
ffc141e8: 48 00 00 14 b ffc141fc <fat_init_volume_info+0x1e4>
i >>= 1, vol->sec_mul++);
ffc141ec: 89 3f 00 03 lbz r9,3(r31) <== NOT EXECUTED
ffc141f0: 7c 63 0e 70 srawi r3,r3,1 <== NOT EXECUTED
ffc141f4: 39 29 00 01 addi r9,r9,1 <== NOT EXECUTED
ffc141f8: 99 3f 00 03 stb r9,3(r31) <== NOT EXECUTED
(vol->bps != 4096))
{
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;
ffc141fc: 70 69 00 01 andi. r9,r3,1
ffc14200: 41 82 ff ec beq+ ffc141ec <fat_init_volume_info+0x1d4> <== NEVER TAKEN
i >>= 1, vol->sec_mul++);
for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0;
ffc14204: 39 20 00 00 li r9,0
ffc14208: 99 3f 00 02 stb r9,2(r31)
ffc1420c: 7d 89 63 78 mr r9,r12
ffc14210: 48 00 00 10 b ffc14220 <fat_init_volume_info+0x208>
i >>= 1, vol->sec_log2++);
ffc14214: 38 63 00 01 addi r3,r3,1
ffc14218: 98 7f 00 02 stb r3,2(r31)
ffc1421c: 7d 29 0e 70 srawi r9,r9,1
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;
i >>= 1, vol->sec_mul++);
for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0;
ffc14220: 71 2a 00 01 andi. r10,r9,1
ffc14224: 88 7f 00 02 lbz r3,2(r31)
ffc14228: 41 82 ff ec beq+ ffc14214 <fat_init_volume_info+0x1fc>
vol->spc = FAT_GET_BR_SECTORS_PER_CLUSTER(boot_rec);
/*
* "sectors per cluster" of zero is invalid
* (and would hang the following loop)
*/
if (vol->spc == 0)
ffc1422c: 2f 9e 00 00 cmpwi cr7,r30,0
for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0;
i >>= 1, vol->sec_mul++);
for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0;
i >>= 1, vol->sec_log2++);
vol->bytes_per_block = vol->bps;
ffc14230: b1 9f 00 0a sth r12,10(r31)
vol->bytes_per_block_log2 = vol->sec_log2;
ffc14234: 54 6a 06 3e clrlwi r10,r3,24
vol->sectors_per_block = 1;
ffc14238: 39 20 00 01 li r9,1
i >>= 1, vol->sec_mul++);
for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0;
i >>= 1, vol->sec_log2++);
vol->bytes_per_block = vol->bps;
vol->bytes_per_block_log2 = vol->sec_log2;
ffc1423c: 99 5f 00 0c stb r10,12(r31)
vol->sectors_per_block = 1;
ffc14240: 99 3f 00 09 stb r9,9(r31)
vol->spc = FAT_GET_BR_SECTORS_PER_CLUSTER(boot_rec);
ffc14244: 9b df 00 04 stb r30,4(r31)
/*
* "sectors per cluster" of zero is invalid
* (and would hang the following loop)
*/
if (vol->spc == 0)
ffc14248: 40 be 00 08 bne+ cr7,ffc14250 <fat_init_volume_info+0x238><== ALWAYS TAKEN
ffc1424c: 48 00 02 6c b ffc144b8 <fat_init_volume_info+0x4a0> <== NOT EXECUTED
{
close(vol->fd);
rtems_set_errno_and_return_minus_one(EINVAL);
}
for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0;
ffc14250: 39 20 00 00 li r9,0
ffc14254: 99 3f 00 05 stb r9,5(r31)
ffc14258: 7f c9 f3 78 mr r9,r30
ffc1425c: 48 00 00 10 b ffc1426c <fat_init_volume_info+0x254>
i >>= 1, vol->spc_log2++);
ffc14260: 38 63 00 01 addi r3,r3,1
ffc14264: 98 7f 00 05 stb r3,5(r31)
ffc14268: 7d 29 0e 70 srawi r9,r9,1
{
close(vol->fd);
rtems_set_errno_and_return_minus_one(EINVAL);
}
for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0;
ffc1426c: 71 23 00 01 andi. r3,r9,1
ffc14270: 88 7f 00 05 lbz r3,5(r31)
ffc14274: 41 82 ff ec beq+ ffc14260 <fat_init_volume_info+0x248>
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)
ffc14278: 54 63 06 3e clrlwi r3,r3,24
ffc1427c: 7d 83 18 30 slw r3,r12,r3
ffc14280: 54 69 04 3e clrlwi r9,r3,16
ffc14284: 2b 89 80 00 cmplwi cr7,r9,32768
ffc14288: b1 3f 00 06 sth r9,6(r31)
ffc1428c: 40 bd 00 08 ble+ cr7,ffc14294 <fat_init_volume_info+0x27c><== ALWAYS TAKEN
ffc14290: 48 00 02 28 b ffc144b8 <fat_init_volume_info+0x4a0> <== NOT EXECUTED
{
close(vol->fd);
rtems_set_errno_and_return_minus_one(EINVAL);
}
for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0;
ffc14294: 39 20 00 00 li r9,0
ffc14298: 99 3f 00 08 stb r9,8(r31)
ffc1429c: 54 63 04 3e clrlwi r3,r3,16
ffc142a0: 48 00 00 14 b ffc142b4 <fat_init_volume_info+0x29c>
i >>= 1, vol->bpc_log2++);
ffc142a4: 89 3f 00 08 lbz r9,8(r31)
ffc142a8: 7c 63 0e 70 srawi r3,r3,1
ffc142ac: 39 29 00 01 addi r9,r9,1
ffc142b0: 99 3f 00 08 stb r9,8(r31)
{
close(vol->fd);
rtems_set_errno_and_return_minus_one(EINVAL);
}
for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0;
ffc142b4: 70 69 00 01 andi. r9,r3,1
ffc142b8: 41 82 ff ec beq+ ffc142a4 <fat_init_volume_info+0x28c>
i >>= 1, vol->bpc_log2++);
vol->fats = FAT_GET_BR_FAT_NUM(boot_rec);
vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec);
vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec);
ffc142bc: 54 a5 40 2e rlwinm r5,r5,8,0,23
}
for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0;
i >>= 1, vol->bpc_log2++);
vol->fats = FAT_GET_BR_FAT_NUM(boot_rec);
ffc142c0: 9b 9f 00 0d stb r28,13(r31)
vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec);
vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec);
ffc142c4: 7c a6 33 78 or r6,r5,r6
/* calculate the count of sectors occupied by the root directory */
vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) /
ffc142c8: 39 2c ff ff addi r9,r12,-1
i >>= 1, vol->bpc_log2++);
vol->fats = FAT_GET_BR_FAT_NUM(boot_rec);
vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec);
vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec);
ffc142cc: b0 df 00 24 sth r6,36(r31)
/* calculate the count of sectors occupied by the root directory */
vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) /
ffc142d0: 54 c6 28 34 rlwinm r6,r6,5,0,26
ffc142d4: 7c c6 4a 14 add r6,r6,r9
ffc142d8: 7d 86 63 d6 divw r12,r6,r12
vol->bps;
vol->rdir_size = vol->rdir_secs << vol->sec_log2;
if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0)
ffc142dc: 54 e7 40 2e rlwinm r7,r7,8,0,23
vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec);
vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec);
/* calculate the count of sectors occupied by the root directory */
vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) /
ffc142e0: 91 9f 00 28 stw r12,40(r31)
vol->bps;
vol->rdir_size = vol->rdir_secs << vol->sec_log2;
ffc142e4: 7d 89 50 30 slw r9,r12,r10
if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0)
ffc142e8: 7c e8 43 78 or r8,r7,r8
/* calculate the count of sectors occupied by the root directory */
vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) /
vol->bps;
vol->rdir_size = vol->rdir_secs << vol->sec_log2;
ffc142ec: 91 3f 00 2c stw r9,44(r31)
if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0)
ffc142f0: 7d 09 07 35 extsh. r9,r8
for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0;
i >>= 1, vol->bpc_log2++);
vol->fats = FAT_GET_BR_FAT_NUM(boot_rec);
vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec);
ffc142f4: 54 00 40 2e rlwinm r0,r0,8,0,23
ffc142f8: 7c 0b 5b 78 or r11,r0,r11
ffc142fc: b1 7f 00 18 sth r11,24(r31)
vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) /
vol->bps;
vol->rdir_size = vol->rdir_secs << vol->sec_log2;
if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0)
ffc14300: 41 82 00 10 beq- ffc14310 <fat_init_volume_info+0x2f8>
vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec);
ffc14304: 55 28 04 3e clrlwi r8,r9,16
ffc14308: 91 1f 00 1c stw r8,28(r31)
ffc1430c: 48 00 00 24 b ffc14330 <fat_init_volume_info+0x318>
else
vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec);
ffc14310: 81 01 00 68 lwz r8,104(r1)
ffc14314: 55 ce 80 1e rlwinm r14,r14,16,0,15
ffc14318: 56 10 c0 0e rlwinm r16,r16,24,0,7
ffc1431c: 55 0a 40 2e rlwinm r10,r8,8,0,23
ffc14320: 7d 4a 73 78 or r10,r10,r14
ffc14324: 7d 4f 7b 78 or r15,r10,r15
ffc14328: 7d f0 83 78 or r16,r15,r16
ffc1432c: 92 1f 00 1c stw r16,28(r31)
vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length +
ffc14330: 81 3f 00 1c lwz r9,28(r31)
vol->rdir_secs;
/* for FAT12/16 root dir starts at(sector) */
vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length;
if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0)
ffc14334: 56 31 40 2e rlwinm r17,r17,8,0,23
ffc14338: 7e 32 93 78 or r18,r17,r18
if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0)
vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec);
else
vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec);
vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length +
ffc1433c: 7f 9c 49 d6 mullw r28,r28,r9
vol->rdir_secs;
/* for FAT12/16 root dir starts at(sector) */
vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length;
if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0)
ffc14340: 7e 49 07 35 extsh. r9,r18
if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0)
vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec);
else
vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec);
vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length +
ffc14344: 7f 8b e2 14 add r28,r11,r28
ffc14348: 7d 8c e2 14 add r12,r12,r28
vol->rdir_secs;
/* for FAT12/16 root dir starts at(sector) */
vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length;
ffc1434c: 93 9f 00 20 stw r28,32(r31)
if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0)
vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec);
else
vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec);
vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length +
ffc14350: 91 9f 00 34 stw r12,52(r31)
vol->rdir_secs;
/* for FAT12/16 root dir starts at(sector) */
vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length;
if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0)
ffc14354: 41 82 00 10 beq- ffc14364 <fat_init_volume_info+0x34c>
vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec);
ffc14358: 55 32 04 3e clrlwi r18,r9,16
ffc1435c: 92 5f 00 30 stw r18,48(r31)
ffc14360: 48 00 00 20 b ffc14380 <fat_init_volume_info+0x368>
else
vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM32(boot_rec);
ffc14364: 56 73 40 2e rlwinm r19,r19,8,0,23
ffc14368: 56 94 80 1e rlwinm r20,r20,16,0,15
ffc1436c: 7e 74 a3 78 or r20,r19,r20
ffc14370: 7e 95 ab 78 or r21,r20,r21
ffc14374: 56 d6 c0 0e rlwinm r22,r22,24,0,7
ffc14378: 7e b6 b3 78 or r22,r21,r22
ffc1437c: 92 df 00 30 stw r22,48(r31)
data_secs = vol->tot_secs - vol->data_fsec;
ffc14380: 81 3f 00 30 lwz r9,48(r31)
ffc14384: 7d 8c 48 50 subf r12,r12,r9
vol->data_cls = data_secs / vol->spc;
ffc14388: 7f cc f3 96 divwu r30,r12,r30
/* determine FAT type at least */
if ( vol->data_cls < FAT_FAT12_MAX_CLN)
ffc1438c: 2b 9e 0f f4 cmplwi cr7,r30,4084
else
vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM32(boot_rec);
data_secs = vol->tot_secs - vol->data_fsec;
vol->data_cls = data_secs / vol->spc;
ffc14390: 93 df 00 38 stw r30,56(r31)
/* determine FAT type at least */
if ( vol->data_cls < FAT_FAT12_MAX_CLN)
ffc14394: 41 9d 00 1c bgt- cr7,ffc143b0 <fat_init_volume_info+0x398>
{
vol->type = FAT_FAT12;
ffc14398: 39 20 00 01 li r9,1
ffc1439c: 99 3f 00 0e stb r9,14(r31)
vol->mask = FAT_FAT12_MASK;
ffc143a0: 39 20 0f ff li r9,4095
ffc143a4: 91 3f 00 10 stw r9,16(r31)
vol->eoc_val = FAT_FAT12_EOC;
ffc143a8: 39 20 0f f8 li r9,4088
ffc143ac: 48 00 00 44 b ffc143f0 <fat_init_volume_info+0x3d8>
}
else
{
if ( vol->data_cls < FAT_FAT16_MAX_CLN)
ffc143b0: 2b 9e ff f4 cmplwi cr7,r30,65524
ffc143b4: 41 9d 00 20 bgt- cr7,ffc143d4 <fat_init_volume_info+0x3bc>
{
vol->type = FAT_FAT16;
ffc143b8: 39 20 00 02 li r9,2
ffc143bc: 99 3f 00 0e stb r9,14(r31)
vol->mask = FAT_FAT16_MASK;
ffc143c0: 39 20 00 00 li r9,0
ffc143c4: 61 29 ff ff ori r9,r9,65535
ffc143c8: 91 3f 00 10 stw r9,16(r31)
vol->eoc_val = FAT_FAT16_EOC;
ffc143cc: 39 20 00 00 li r9,0
ffc143d0: 48 00 00 1c b ffc143ec <fat_init_volume_info+0x3d4>
}
else
{
vol->type = FAT_FAT32;
ffc143d4: 39 20 00 04 li r9,4
ffc143d8: 99 3f 00 0e stb r9,14(r31)
vol->mask = FAT_FAT32_MASK;
ffc143dc: 3d 20 0f ff lis r9,4095
ffc143e0: 61 29 ff ff ori r9,r9,65535
ffc143e4: 91 3f 00 10 stw r9,16(r31)
vol->eoc_val = FAT_FAT32_EOC;
ffc143e8: 3d 20 0f ff lis r9,4095
ffc143ec: 61 29 ff f8 ori r9,r9,65528
ffc143f0: 91 3f 00 14 stw r9,20(r31)
}
}
if (vol->type == FAT_FAT32)
ffc143f4: 89 3f 00 0e lbz r9,14(r31)
ffc143f8: 2f 89 00 04 cmpwi cr7,r9,4
ffc143fc: 40 be 01 60 bne+ cr7,ffc1455c <fat_init_volume_info+0x544>
{
vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec);
vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR;
ffc14400: 57 a9 00 30 rlwinm r9,r29,0,0,24
ffc14404: 55 29 06 3e clrlwi r9,r9,24
if (vol->mirror)
ffc14408: 2f 89 00 00 cmpwi cr7,r9,0
if (vol->type == FAT_FAT32)
{
vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec);
vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR;
ffc1440c: 99 3f 00 54 stb r9,84(r31)
}
}
if (vol->type == FAT_FAT32)
{
vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec);
ffc14410: 56 f7 40 2e rlwinm r23,r23,8,0,23
ffc14414: 57 18 80 1e rlwinm r24,r24,16,0,15
ffc14418: 7e f8 c3 78 or r24,r23,r24
ffc1441c: 7f 19 cb 78 or r25,r24,r25
ffc14420: 57 5a c0 0e rlwinm r26,r26,24,0,7
ffc14424: 7f 3a d3 78 or r26,r25,r26
ffc14428: 93 5f 00 3c stw r26,60(r31)
vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR;
if (vol->mirror)
ffc1442c: 41 9e 00 10 beq- cr7,ffc1443c <fat_init_volume_info+0x424><== ALWAYS TAKEN
vol->afat = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_FAT_NUM;
ffc14430: 57 bd 07 3e clrlwi r29,r29,28 <== NOT EXECUTED
ffc14434: 9b bf 00 5c stb r29,92(r31) <== NOT EXECUTED
ffc14438: 48 00 00 08 b ffc14440 <fat_init_volume_info+0x428> <== NOT EXECUTED
else
vol->afat = 0;
ffc1443c: 99 3f 00 5c stb r9,92(r31)
vol->info_sec = FAT_GET_BR_FAT32_FS_INFO_SECTOR(boot_rec);
ffc14440: 54 84 40 2e rlwinm r4,r4,8,0,23
ffc14444: 7c 84 db 78 or r4,r4,r27
if( vol->info_sec == 0 )
ffc14448: 2f 84 00 00 cmpwi cr7,r4,0
if (vol->mirror)
vol->afat = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_FAT_NUM;
else
vol->afat = 0;
vol->info_sec = FAT_GET_BR_FAT32_FS_INFO_SECTOR(boot_rec);
ffc1444c: b0 9f 00 40 sth r4,64(r31)
if( vol->info_sec == 0 )
ffc14450: 40 be 00 08 bne+ cr7,ffc14458 <fat_init_volume_info+0x440><== ALWAYS TAKEN
ffc14454: 48 00 00 64 b ffc144b8 <fat_init_volume_info+0x4a0> <== NOT EXECUTED
close(vol->fd);
rtems_set_errno_and_return_minus_one( EINVAL );
}
else
{
ret = _fat_block_read(fs_info, vol->info_sec , 0,
ffc14458: 7f e3 fb 78 mr r3,r31
ffc1445c: 38 a0 00 00 li r5,0
ffc14460: 38 c0 00 04 li r6,4
ffc14464: 38 e1 00 50 addi r7,r1,80
ffc14468: 4b ff f8 09 bl ffc13c70 <_fat_block_read>
FAT_FSI_LEADSIG_SIZE, fs_info_sector);
if ( ret < 0 )
ffc1446c: 2f 83 00 00 cmpwi cr7,r3,0
ffc14470: 40 bc 00 08 bge+ cr7,ffc14478 <fat_init_volume_info+0x460><== ALWAYS TAKEN
ffc14474: 48 00 00 7c b ffc144f0 <fat_init_volume_info+0x4d8> <== NOT EXECUTED
{
close(vol->fd);
return -1;
}
if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) !=
ffc14478: 89 41 00 51 lbz r10,81(r1)
* 0 on success, or -1 if error occured and errno set appropriately
*/
int
_fat_block_release(fat_fs_info_t *fs_info)
{
return fat_buf_release(fs_info);
ffc1447c: 7f e3 fb 78 mr r3,r31
{
close(vol->fd);
return -1;
}
if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) !=
ffc14480: 89 21 00 52 lbz r9,82(r1)
ffc14484: 55 4a 40 2e rlwinm r10,r10,8,0,23
ffc14488: 55 29 80 1e rlwinm r9,r9,16,0,15
ffc1448c: 7d 4a 4b 78 or r10,r10,r9
ffc14490: 89 21 00 50 lbz r9,80(r1)
ffc14494: 7d 4a 4b 78 or r10,r10,r9
ffc14498: 89 21 00 53 lbz r9,83(r1)
ffc1449c: 55 29 c0 0e rlwinm r9,r9,24,0,7
ffc144a0: 7d 4a 4b 78 or r10,r10,r9
ffc144a4: 3d 20 41 61 lis r9,16737
ffc144a8: 61 29 52 52 ori r9,r9,21074
ffc144ac: 7f 8a 48 00 cmpw cr7,r10,r9
ffc144b0: 41 be 00 1c beq+ cr7,ffc144cc <fat_init_volume_info+0x4b4><== ALWAYS TAKEN
* 0 on success, or -1 if error occured and errno set appropriately
*/
int
_fat_block_release(fat_fs_info_t *fs_info)
{
return fat_buf_release(fs_info);
ffc144b4: 4b ff f5 35 bl ffc139e8 <fat_buf_release> <== NOT EXECUTED
if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) !=
FAT_FSINFO_LEAD_SIGNATURE_VALUE)
{
_fat_block_release(fs_info);
close(vol->fd);
ffc144b8: 80 7f 00 60 lwz r3,96(r31) <== NOT EXECUTED
ffc144bc: 4b ff 17 99 bl ffc05c54 <close> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
ffc144c0: 48 00 7c 29 bl ffc1c0e8 <__errno> <== NOT EXECUTED
ffc144c4: 39 20 00 16 li r9,22 <== NOT EXECUTED
ffc144c8: 48 00 02 00 b ffc146c8 <fat_init_volume_info+0x6b0> <== NOT EXECUTED
}
else
{
ret = _fat_block_read(fs_info, vol->info_sec , FAT_FSI_INFO,
ffc144cc: a0 9f 00 40 lhz r4,64(r31)
ffc144d0: 38 a0 01 e4 li r5,484
ffc144d4: 38 c0 00 0c li r6,12
ffc144d8: 38 e1 00 50 addi r7,r1,80
ffc144dc: 4b ff f7 95 bl ffc13c70 <_fat_block_read>
FAT_USEFUL_INFO_SIZE, fs_info_sector);
if ( ret < 0 )
ffc144e0: 2f 83 00 00 cmpwi cr7,r3,0
ffc144e4: 40 bc 00 18 bge+ cr7,ffc144fc <fat_init_volume_info+0x4e4><== ALWAYS TAKEN
* 0 on success, or -1 if error occured and errno set appropriately
*/
int
_fat_block_release(fat_fs_info_t *fs_info)
{
return fat_buf_release(fs_info);
ffc144e8: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc144ec: 4b ff f4 fd bl ffc139e8 <fat_buf_release> <== NOT EXECUTED
ret = _fat_block_read(fs_info, vol->info_sec , FAT_FSI_INFO,
FAT_USEFUL_INFO_SIZE, fs_info_sector);
if ( ret < 0 )
{
_fat_block_release(fs_info);
close(vol->fd);
ffc144f0: 80 7f 00 60 lwz r3,96(r31) <== NOT EXECUTED
ffc144f4: 4b ff 17 61 bl ffc05c54 <close> <== NOT EXECUTED
ffc144f8: 48 00 01 d4 b ffc146cc <fat_init_volume_info+0x6b4> <== NOT EXECUTED
return -1;
}
vol->free_cls_in_fs_info =
FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector);
ffc144fc: 89 41 00 55 lbz r10,85(r1)
ffc14500: 89 21 00 56 lbz r9,86(r1)
ffc14504: 55 4a 40 2e rlwinm r10,r10,8,0,23
ffc14508: 55 29 80 1e rlwinm r9,r9,16,0,15
ffc1450c: 7d 49 4b 78 or r9,r10,r9
ffc14510: 89 41 00 54 lbz r10,84(r1)
ffc14514: 7d 29 53 78 or r9,r9,r10
ffc14518: 89 41 00 57 lbz r10,87(r1)
ffc1451c: 55 4a c0 0e rlwinm r10,r10,24,0,7
ffc14520: 7d 29 53 78 or r9,r9,r10
vol->free_cls = vol->free_cls_in_fs_info;
vol->next_cl_in_fs_info =
FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector);
ffc14524: 89 41 00 59 lbz r10,89(r1)
_fat_block_release(fs_info);
close(vol->fd);
return -1;
}
vol->free_cls_in_fs_info =
ffc14528: 91 3f 00 48 stw r9,72(r31)
FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector);
vol->free_cls = vol->free_cls_in_fs_info;
vol->next_cl_in_fs_info =
FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector);
ffc1452c: 55 4a 40 2e rlwinm r10,r10,8,0,23
return -1;
}
vol->free_cls_in_fs_info =
FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector);
vol->free_cls = vol->free_cls_in_fs_info;
ffc14530: 91 3f 00 44 stw r9,68(r31)
vol->next_cl_in_fs_info =
FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector);
ffc14534: 89 21 00 5a lbz r9,90(r1)
ffc14538: 55 29 80 1e rlwinm r9,r9,16,0,15
ffc1453c: 7d 49 4b 78 or r9,r10,r9
ffc14540: 89 41 00 58 lbz r10,88(r1)
ffc14544: 7d 29 53 78 or r9,r9,r10
ffc14548: 89 41 00 5b lbz r10,91(r1)
ffc1454c: 55 4a c0 0e rlwinm r10,r10,24,0,7
ffc14550: 7d 29 53 78 or r9,r9,r10
}
vol->free_cls_in_fs_info =
FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector);
vol->free_cls = vol->free_cls_in_fs_info;
vol->next_cl_in_fs_info =
ffc14554: 91 3f 00 50 stw r9,80(r31)
ffc14558: 48 00 00 1c b ffc14574 <fat_init_volume_info+0x55c>
}
}
}
else
{
vol->rdir_cl = 0;
ffc1455c: 39 20 00 00 li r9,0
ffc14560: 91 3f 00 3c stw r9,60(r31)
vol->mirror = 0;
ffc14564: 99 3f 00 54 stb r9,84(r31)
vol->afat = 0;
ffc14568: 99 3f 00 5c stb r9,92(r31)
vol->free_cls = FAT_UNDEFINED_VALUE;
ffc1456c: 39 20 ff ff li r9,-1
ffc14570: 91 3f 00 44 stw r9,68(r31)
vol->next_cl = FAT_UNDEFINED_VALUE;
ffc14574: 91 3f 00 4c stw r9,76(r31)
* 0 on success, or -1 if error occured and errno set appropriately
*/
int
_fat_block_release(fat_fs_info_t *fs_info)
{
return fat_buf_release(fs_info);
ffc14578: 7f e3 fb 78 mr r3,r31
ffc1457c: 4b ff f4 6d bl ffc139e8 <fat_buf_release>
vol->next_cl = FAT_UNDEFINED_VALUE;
}
_fat_block_release(fs_info);
vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat;
ffc14580: 89 5f 00 5c lbz r10,92(r31)
ffc14584: 81 3f 00 1c lwz r9,28(r31)
/* set up collection of fat-files fd */
fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control));
ffc14588: 38 60 00 02 li r3,2
ffc1458c: 38 80 00 0c li r4,12
vol->next_cl = FAT_UNDEFINED_VALUE;
}
_fat_block_release(fs_info);
vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat;
ffc14590: 7d 2a 49 d6 mullw r9,r10,r9
ffc14594: a1 5f 00 18 lhz r10,24(r31)
ffc14598: 7d 29 52 14 add r9,r9,r10
ffc1459c: 91 3f 00 58 stw r9,88(r31)
/* set up collection of fat-files fd */
fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control));
ffc145a0: 4b ff 16 59 bl ffc05bf8 <calloc>
if ( fs_info->vhash == NULL )
ffc145a4: 2f 83 00 00 cmpwi cr7,r3,0
_fat_block_release(fs_info);
vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat;
/* set up collection of fat-files fd */
fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control));
ffc145a8: 90 7f 00 6c stw r3,108(r31)
if ( fs_info->vhash == NULL )
ffc145ac: 41 9e 00 48 beq- cr7,ffc145f4 <fat_init_volume_info+0x5dc><== 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 );
ffc145b0: 39 23 00 04 addi r9,r3,4
head->next = tail;
head->previous = NULL;
tail->previous = head;
ffc145b4: 90 63 00 08 stw r3,8(r3)
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 );
ffc145b8: 39 43 00 10 addi r10,r3,16
head->next = tail;
ffc145bc: 91 23 00 00 stw r9,0(r3)
head->previous = NULL;
ffc145c0: 3b c0 00 00 li r30,0
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 );
ffc145c4: 39 23 00 0c addi r9,r3,12
head->next = tail;
head->previous = NULL;
ffc145c8: 93 c3 00 04 stw r30,4(r3)
}
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));
ffc145cc: 38 80 00 0c li r4,12
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
ffc145d0: 91 43 00 0c stw r10,12(r3)
head->previous = NULL;
ffc145d4: 93 c3 00 10 stw r30,16(r3)
tail->previous = head;
ffc145d8: 91 23 00 14 stw r9,20(r3)
ffc145dc: 38 60 00 02 li r3,2
ffc145e0: 4b ff 16 19 bl ffc05bf8 <calloc>
if ( fs_info->rhash == NULL )
ffc145e4: 2f 83 00 00 cmpwi cr7,r3,0
}
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));
ffc145e8: 90 7f 00 70 stw r3,112(r31)
if ( fs_info->rhash == NULL )
ffc145ec: 40 be 00 14 bne+ cr7,ffc14600 <fat_init_volume_info+0x5e8><== ALWAYS TAKEN
ffc145f0: 48 00 00 70 b ffc14660 <fat_init_volume_info+0x648> <== 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);
ffc145f4: 80 7f 00 60 lwz r3,96(r31) <== NOT EXECUTED
ffc145f8: 4b ff 16 5d bl ffc05c54 <close> <== NOT EXECUTED
ffc145fc: 48 00 00 c4 b ffc146c0 <fat_init_volume_info+0x6a8> <== 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 );
ffc14600: 39 23 00 04 addi r9,r3,4
head->next = tail;
head->previous = NULL;
ffc14604: 93 c3 00 04 stw r30,4(r3)
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 );
ffc14608: 39 43 00 10 addi r10,r3,16
head->next = tail;
ffc1460c: 91 23 00 00 stw r9,0(r3)
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 );
ffc14610: 39 23 00 0c addi r9,r3,12
rtems_chain_initialize_empty(fs_info->rhash + i);
fs_info->uino_pool_size = FAT_UINO_POOL_INIT_SIZE;
fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4;
fs_info->index = 0;
fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char));
ffc14614: 38 80 00 01 li r4,1
head->next = tail;
head->previous = NULL;
tail->previous = head;
ffc14618: 91 23 00 14 stw r9,20(r3)
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;
ffc1461c: 39 20 01 00 li r9,256
ffc14620: 90 63 00 08 stw r3,8(r3)
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
ffc14624: 91 43 00 0c stw r10,12(r3)
head->previous = NULL;
ffc14628: 93 c3 00 10 stw r30,16(r3)
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));
ffc1462c: 38 60 01 00 li r3,256
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;
ffc14630: 91 3f 00 7c stw r9,124(r31)
fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4;
ffc14634: 89 5f 00 03 lbz r10,3(r31)
ffc14638: 81 3f 00 30 lwz r9,48(r31)
fs_info->index = 0;
ffc1463c: 93 df 00 78 stw r30,120(r31)
}
for (i = 0; i < FAT_HASH_SIZE; i++)
rtems_chain_initialize_empty(fs_info->rhash + i);
fs_info->uino_pool_size = FAT_UINO_POOL_INIT_SIZE;
fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4;
ffc14640: 7d 29 50 30 slw r9,r9,r10
ffc14644: 55 29 20 36 rlwinm r9,r9,4,0,27
ffc14648: 91 3f 00 80 stw r9,128(r31)
fs_info->index = 0;
fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char));
ffc1464c: 4b ff 15 ad bl ffc05bf8 <calloc>
if ( fs_info->uino == NULL )
ffc14650: 2f 83 00 00 cmpwi cr7,r3,0
rtems_chain_initialize_empty(fs_info->rhash + i);
fs_info->uino_pool_size = FAT_UINO_POOL_INIT_SIZE;
fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4;
fs_info->index = 0;
fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char));
ffc14654: 90 7f 00 74 stw r3,116(r31)
if ( fs_info->uino == NULL )
ffc14658: 40 be 00 30 bne+ cr7,ffc14688 <fat_init_volume_info+0x670><== ALWAYS TAKEN
ffc1465c: 48 00 00 14 b ffc14670 <fat_init_volume_info+0x658> <== 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);
ffc14660: 80 7f 00 60 lwz r3,96(r31) <== NOT EXECUTED
ffc14664: 4b ff 15 f1 bl ffc05c54 <close> <== NOT EXECUTED
free(fs_info->vhash);
ffc14668: 80 7f 00 6c lwz r3,108(r31) <== NOT EXECUTED
ffc1466c: 48 00 00 50 b ffc146bc <fat_init_volume_info+0x6a4> <== 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);
ffc14670: 80 7f 00 60 lwz r3,96(r31) <== NOT EXECUTED
ffc14674: 4b ff 15 e1 bl ffc05c54 <close> <== NOT EXECUTED
free(fs_info->vhash);
ffc14678: 80 7f 00 6c lwz r3,108(r31) <== NOT EXECUTED
ffc1467c: 4b ff 16 61 bl ffc05cdc <free> <== NOT EXECUTED
free(fs_info->rhash);
ffc14680: 80 7f 00 70 lwz r3,112(r31) <== NOT EXECUTED
ffc14684: 48 00 00 38 b ffc146bc <fat_init_volume_info+0x6a4> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOMEM );
}
fs_info->sec_buf = (uint8_t *)calloc(vol->bps, sizeof(uint8_t));
ffc14688: a0 7f 00 00 lhz r3,0(r31)
ffc1468c: 38 80 00 01 li r4,1
ffc14690: 4b ff 15 69 bl ffc05bf8 <calloc>
if (fs_info->sec_buf == NULL)
ffc14694: 2f 83 00 00 cmpwi cr7,r3,0
close(vol->fd);
free(fs_info->vhash);
free(fs_info->rhash);
rtems_set_errno_and_return_minus_one( ENOMEM );
}
fs_info->sec_buf = (uint8_t *)calloc(vol->bps, sizeof(uint8_t));
ffc14698: 90 7f 00 90 stw r3,144(r31)
if (fs_info->sec_buf == NULL)
ffc1469c: 40 be 00 38 bne+ cr7,ffc146d4 <fat_init_volume_info+0x6bc><== ALWAYS TAKEN
{
close(vol->fd);
ffc146a0: 80 7f 00 60 lwz r3,96(r31) <== NOT EXECUTED
ffc146a4: 4b ff 15 b1 bl ffc05c54 <close> <== NOT EXECUTED
free(fs_info->vhash);
ffc146a8: 80 7f 00 6c lwz r3,108(r31) <== NOT EXECUTED
ffc146ac: 4b ff 16 31 bl ffc05cdc <free> <== NOT EXECUTED
free(fs_info->rhash);
ffc146b0: 80 7f 00 70 lwz r3,112(r31) <== NOT EXECUTED
ffc146b4: 4b ff 16 29 bl ffc05cdc <free> <== NOT EXECUTED
free(fs_info->uino);
ffc146b8: 80 7f 00 74 lwz r3,116(r31) <== NOT EXECUTED
ffc146bc: 4b ff 16 21 bl ffc05cdc <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOMEM );
ffc146c0: 48 00 7a 29 bl ffc1c0e8 <__errno> <== NOT EXECUTED
ffc146c4: 39 20 00 0c li r9,12 <== NOT EXECUTED
ffc146c8: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED
ffc146cc: 38 60 ff ff li r3,-1 <== NOT EXECUTED
ffc146d0: 48 00 00 68 b ffc14738 <fat_init_volume_info+0x720> <== NOT EXECUTED
return bytes_written;
}
static bool is_cluster_aligned(const fat_vol_t *vol, uint32_t sec_num)
{
return (sec_num & (vol->spc - 1)) == 0;
ffc146d4: 89 3f 00 04 lbz r9,4(r31)
ffc146d8: 81 5f 00 34 lwz r10,52(r31)
ffc146dc: 39 29 ff ff addi r9,r9,-1
/*
* If possible we will use the cluster size as bdbuf block size for faster
* file access. This requires that certain sectors are aligned to cluster
* borders.
*/
if (is_cluster_aligned(vol, vol->data_fsec)
ffc146e0: 7d 23 50 39 and. r3,r9,r10
ffc146e4: 41 a2 00 0c beq+ ffc146f0 <fat_init_volume_info+0x6d8> <== ALWAYS TAKEN
vol->bytes_per_block_log2 = vol->bpc_log2;
vol->sectors_per_block = vol->spc;
}
}
return RC_OK;
ffc146e8: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc146ec: 48 00 00 4c b ffc14738 <fat_init_volume_info+0x720> <== NOT EXECUTED
* If possible we will use the cluster size as bdbuf block size for faster
* file access. This requires that certain sectors are aligned to cluster
* borders.
*/
if (is_cluster_aligned(vol, vol->data_fsec)
&& (FAT_FAT32 == vol->type || is_cluster_aligned(vol, vol->rdir_loc)))
ffc146f0: 89 5f 00 0e lbz r10,14(r31)
ffc146f4: 2f 8a 00 04 cmpwi cr7,r10,4
ffc146f8: 41 9e 00 10 beq- cr7,ffc14708 <fat_init_volume_info+0x6f0>
return bytes_written;
}
static bool is_cluster_aligned(const fat_vol_t *vol, uint32_t sec_num)
{
return (sec_num & (vol->spc - 1)) == 0;
ffc146fc: 81 5f 00 20 lwz r10,32(r31)
* If possible we will use the cluster size as bdbuf block size for faster
* file access. This requires that certain sectors are aligned to cluster
* borders.
*/
if (is_cluster_aligned(vol, vol->data_fsec)
&& (FAT_FAT32 == vol->type || is_cluster_aligned(vol, vol->rdir_loc)))
ffc14700: 7d 28 50 39 and. r8,r9,r10
ffc14704: 40 a2 ff e4 bne- ffc146e8 <fat_init_volume_info+0x6d0> <== NEVER TAKEN
{
sc = rtems_bdbuf_set_block_size (vol->dd, vol->bpc, true);
ffc14708: 80 7f 00 64 lwz r3,100(r31)
ffc1470c: 38 a0 00 01 li r5,1
ffc14710: a0 9f 00 06 lhz r4,6(r31)
ffc14714: 4b ff d8 49 bl ffc11f5c <rtems_bdbuf_set_block_size>
if (sc == RTEMS_SUCCESSFUL)
ffc14718: 2f 83 00 00 cmpwi cr7,r3,0
ffc1471c: 40 be ff cc bne- cr7,ffc146e8 <fat_init_volume_info+0x6d0><== NEVER TAKEN
{
vol->bytes_per_block = vol->bpc;
ffc14720: a1 3f 00 06 lhz r9,6(r31)
ffc14724: b1 3f 00 0a sth r9,10(r31)
vol->bytes_per_block_log2 = vol->bpc_log2;
ffc14728: 89 3f 00 08 lbz r9,8(r31)
ffc1472c: 99 3f 00 0c stb r9,12(r31)
vol->sectors_per_block = vol->spc;
ffc14730: 89 3f 00 04 lbz r9,4(r31)
ffc14734: 99 3f 00 09 stb r9,9(r31)
}
}
return RC_OK;
}
ffc14738: 39 61 00 d8 addi r11,r1,216
ffc1473c: 4b fe ce 7c b ffc015b8 <_restgpr_14_x>
ffc1a5b8 <fat_scan_fat_for_free_clusters>:
uint32_t count,
uint32_t *cls_added,
uint32_t *last_cl,
bool zero_fill
)
{
ffc1a5b8: 94 21 ff b8 stwu r1,-72(r1)
ffc1a5bc: 7d 80 00 26 mfcr r12
ffc1a5c0: 7c 08 02 a6 mflr r0
int rc = RC_OK;
uint32_t cl4find = 2;
uint32_t next_cln = 0;
ffc1a5c4: 39 20 00 00 li r9,0
uint32_t count,
uint32_t *cls_added,
uint32_t *last_cl,
bool zero_fill
)
{
ffc1a5c8: be a1 00 1c stmw r21,28(r1)
uint32_t i = 2;
ssize_t bytes_written;
*cls_added = 0;
if (count == 0)
ffc1a5cc: 7c b6 2b 79 mr. r22,r5
uint32_t count,
uint32_t *cls_added,
uint32_t *last_cl,
bool zero_fill
)
{
ffc1a5d0: 7c 7f 1b 78 mr r31,r3
ffc1a5d4: 90 01 00 4c stw r0,76(r1)
ffc1a5d8: 7c dd 33 78 mr r29,r6
ffc1a5dc: 91 81 00 18 stw r12,24(r1)
int rc = RC_OK;
uint32_t cl4find = 2;
uint32_t next_cln = 0;
uint32_t save_cln = 0;
uint32_t data_cls_val = fs_info->vol.data_cls + 2;
ffc1a5e0: 82 e3 00 38 lwz r23,56(r3)
bool zero_fill
)
{
int rc = RC_OK;
uint32_t cl4find = 2;
uint32_t next_cln = 0;
ffc1a5e4: 91 21 00 08 stw r9,8(r1)
uint32_t save_cln = 0;
uint32_t data_cls_val = fs_info->vol.data_cls + 2;
uint32_t i = 2;
ssize_t bytes_written;
*cls_added = 0;
ffc1a5e8: 91 26 00 00 stw r9,0(r6)
if (count == 0)
ffc1a5ec: 41 82 01 cc beq- ffc1a7b8 <fat_scan_fat_for_free_clusters+0x200><== NEVER TAKEN
return rc;
if (fs_info->vol.next_cl != FAT_UNDEFINED_VALUE)
ffc1a5f0: 83 c3 00 4c lwz r30,76(r3)
ffc1a5f4: 7c 9b 23 78 mr r27,r4
ffc1a5f8: 7c f8 3b 78 mr r24,r7
ffc1a5fc: 2f 9e ff ff cmpwi cr7,r30,-1
ffc1a600: 40 be 00 08 bne+ cr7,ffc1a608 <fat_scan_fat_for_free_clusters+0x50>
uint32_t *last_cl,
bool zero_fill
)
{
int rc = RC_OK;
uint32_t cl4find = 2;
ffc1a604: 3b c0 00 02 li r30,2
uint32_t next_cln = 0;
uint32_t save_cln = 0;
uint32_t data_cls_val = fs_info->vol.data_cls + 2;
ffc1a608: 3a f7 00 02 addi r23,r23,2
ffc1a60c: 3b 20 00 02 li r25,2
ffc1a610: 3b 40 00 00 li r26,0
rc = fat_set_fat_cluster(fs_info, save_cln, cl4find);
if ( rc != RC_OK )
goto cleanup;
}
if (zero_fill)
ffc1a614: 2e 08 00 00 cmpwi cr4,r8,0
ffc1a618: 48 00 01 3c b ffc1a754 <fat_scan_fat_for_free_clusters+0x19c>
* 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);
ffc1a61c: 7f e3 fb 78 mr r3,r31
ffc1a620: 7f c4 f3 78 mr r4,r30
ffc1a624: 38 a1 00 08 addi r5,r1,8
ffc1a628: 4b ff fa 61 bl ffc1a088 <fat_get_fat_cluster>
if ( rc != RC_OK )
ffc1a62c: 7c 7c 1b 79 mr. r28,r3
ffc1a630: 41 a2 00 20 beq+ ffc1a650 <fat_scan_fat_for_free_clusters+0x98><== ALWAYS TAKEN
{
if (*cls_added != 0)
ffc1a634: 81 3d 00 00 lwz r9,0(r29) <== NOT EXECUTED
ffc1a638: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED
ffc1a63c: 41 be 01 88 beq+ cr7,ffc1a7c4 <fat_scan_fat_for_free_clusters+0x20c><== NOT EXECUTED
fat_free_fat_clusters_chain(fs_info, (*chain));
ffc1a640: 80 9b 00 00 lwz r4,0(r27) <== NOT EXECUTED
ffc1a644: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc1a648: 4b ff fe 9d bl ffc1a4e4 <fat_free_fat_clusters_chain> <== NOT EXECUTED
ffc1a64c: 48 00 01 78 b ffc1a7c4 <fat_scan_fat_for_free_clusters+0x20c><== NOT EXECUTED
return rc;
}
if (next_cln == FAT_GENFAT_FREE)
ffc1a650: 81 21 00 08 lwz r9,8(r1)
ffc1a654: 2f 89 00 00 cmpwi cr7,r9,0
ffc1a658: 40 9e 00 e8 bne- cr7,ffc1a740 <fat_scan_fat_for_free_clusters+0x188>
/*
* 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)
ffc1a65c: 81 3d 00 00 lwz r9,0(r29)
ffc1a660: 2f 89 00 00 cmpwi cr7,r9,0
ffc1a664: 40 9e 00 28 bne- cr7,ffc1a68c <fat_scan_fat_for_free_clusters+0xd4>
{
*chain = cl4find;
ffc1a668: 93 db 00 00 stw r30,0(r27)
rc = fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_EOC);
ffc1a66c: 7f e3 fb 78 mr r3,r31
ffc1a670: 7f c4 f3 78 mr r4,r30
ffc1a674: 38 a0 ff ff li r5,-1
ffc1a678: 4b ff fb d1 bl ffc1a248 <fat_set_fat_cluster>
if ( rc != RC_OK )
ffc1a67c: 2c 03 00 00 cmpwi r3,0
ffc1a680: 40 82 01 40 bne- ffc1a7c0 <fat_scan_fat_for_free_clusters+0x208><== NEVER TAKEN
rc = fat_set_fat_cluster(fs_info, save_cln, cl4find);
if ( rc != RC_OK )
goto cleanup;
}
if (zero_fill)
ffc1a684: 41 b2 00 4c beq+ cr4,ffc1a6d0 <fat_scan_fat_for_free_clusters+0x118>
ffc1a688: 48 00 00 64 b ffc1a6ec <fat_scan_fat_for_free_clusters+0x134>
}
}
else
{
/* set EOC value to new allocated cluster */
rc = fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_EOC);
ffc1a68c: 7f e3 fb 78 mr r3,r31
ffc1a690: 7f c4 f3 78 mr r4,r30
ffc1a694: 38 a0 ff ff li r5,-1
ffc1a698: 4b ff fb b1 bl ffc1a248 <fat_set_fat_cluster>
if ( rc != RC_OK )
ffc1a69c: 7c 75 1b 79 mr. r21,r3
{
/* cleanup activity */
fat_free_fat_clusters_chain(fs_info, (*chain));
ffc1a6a0: 7f e3 fb 78 mr r3,r31
}
else
{
/* set EOC value to new allocated cluster */
rc = fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_EOC);
if ( rc != RC_OK )
ffc1a6a4: 41 a2 00 14 beq+ ffc1a6b8 <fat_scan_fat_for_free_clusters+0x100><== ALWAYS TAKEN
{
/* cleanup activity */
fat_free_fat_clusters_chain(fs_info, (*chain));
ffc1a6a8: 80 9b 00 00 lwz r4,0(r27) <== NOT EXECUTED
}
}
else
{
/* set EOC value to new allocated cluster */
rc = fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_EOC);
ffc1a6ac: 7e bc ab 78 mr r28,r21 <== NOT EXECUTED
if ( rc != RC_OK )
{
/* cleanup activity */
fat_free_fat_clusters_chain(fs_info, (*chain));
ffc1a6b0: 4b ff fe 35 bl ffc1a4e4 <fat_free_fat_clusters_chain> <== NOT EXECUTED
ffc1a6b4: 48 00 01 10 b ffc1a7c4 <fat_scan_fat_for_free_clusters+0x20c><== NOT EXECUTED
return rc;
}
rc = fat_set_fat_cluster(fs_info, save_cln, cl4find);
ffc1a6b8: 7f 44 d3 78 mr r4,r26
ffc1a6bc: 7f c5 f3 78 mr r5,r30
ffc1a6c0: 4b ff fb 89 bl ffc1a248 <fat_set_fat_cluster>
if ( rc != RC_OK )
ffc1a6c4: 7c 7a 1b 79 mr. r26,r3
ffc1a6c8: 41 82 ff bc beq+ ffc1a684 <fat_scan_fat_for_free_clusters+0xcc><== ALWAYS TAKEN
ffc1a6cc: 48 00 00 c0 b ffc1a78c <fat_scan_fat_for_free_clusters+0x1d4><== NOT EXECUTED
goto cleanup;
}
}
save_cln = cl4find;
(*cls_added)++;
ffc1a6d0: 81 3d 00 00 lwz r9,0(r29)
ffc1a6d4: 39 29 00 01 addi r9,r9,1
/* have we satisfied request ? */
if (*cls_added == count)
ffc1a6d8: 7f 89 b0 00 cmpw cr7,r9,r22
goto cleanup;
}
}
save_cln = cl4find;
(*cls_added)++;
ffc1a6dc: 91 3d 00 00 stw r9,0(r29)
/* have we satisfied request ? */
if (*cls_added == count)
ffc1a6e0: 41 9e 00 34 beq- cr7,ffc1a714 <fat_scan_fat_for_free_clusters+0x15c>
ffc1a6e4: 7f da f3 78 mr r26,r30
ffc1a6e8: 48 00 00 58 b ffc1a740 <fat_scan_fat_for_free_clusters+0x188>
goto cleanup;
}
if (zero_fill)
{
bytes_written = fat_cluster_set (fs_info, cl4find, 0, fs_info->vol.bpc, 0);
ffc1a6ec: a0 df 00 06 lhz r6,6(r31)
ffc1a6f0: 7f e3 fb 78 mr r3,r31
ffc1a6f4: 7f c4 f3 78 mr r4,r30
ffc1a6f8: 38 a0 00 00 li r5,0
ffc1a6fc: 38 e0 00 00 li r7,0
ffc1a700: 4b ff 96 c1 bl ffc13dc0 <fat_cluster_set>
if (fs_info->vol.bpc != bytes_written)
ffc1a704: a1 3f 00 06 lhz r9,6(r31)
ffc1a708: 7f 89 18 00 cmpw cr7,r9,r3
ffc1a70c: 41 9e ff c4 beq+ cr7,ffc1a6d0 <fat_scan_fat_for_free_clusters+0x118><== ALWAYS TAKEN
ffc1a710: 48 00 00 78 b ffc1a788 <fat_scan_fat_for_free_clusters+0x1d0><== NOT EXECUTED
/* have we satisfied request ? */
if (*cls_added == count)
{
fs_info->vol.next_cl = save_cln;
if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE)
ffc1a714: 81 3f 00 44 lwz r9,68(r31)
(*cls_added)++;
/* have we satisfied request ? */
if (*cls_added == count)
{
fs_info->vol.next_cl = save_cln;
ffc1a718: 93 df 00 4c stw r30,76(r31)
if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE)
ffc1a71c: 2f 89 ff ff cmpwi cr7,r9,-1
ffc1a720: 41 9e 00 10 beq- cr7,ffc1a730 <fat_scan_fat_for_free_clusters+0x178><== ALWAYS TAKEN
fs_info->vol.free_cls -= (*cls_added);
ffc1a724: 81 5d 00 00 lwz r10,0(r29) <== NOT EXECUTED
ffc1a728: 7d 2a 48 50 subf r9,r10,r9 <== NOT EXECUTED
ffc1a72c: 91 3f 00 44 stw r9,68(r31) <== NOT EXECUTED
*last_cl = save_cln;
ffc1a730: 93 d8 00 00 stw r30,0(r24)
fat_buf_release(fs_info);
ffc1a734: 7f e3 fb 78 mr r3,r31
ffc1a738: 4b ff 92 b1 bl ffc139e8 <fat_buf_release>
ffc1a73c: 48 00 00 88 b ffc1a7c4 <fat_scan_fat_for_free_clusters+0x20c>
return rc;
}
}
i++;
cl4find++;
ffc1a740: 3b de 00 01 addi r30,r30,1
if (cl4find >= data_cls_val)
ffc1a744: 7f 9e b8 40 cmplw cr7,r30,r23
*last_cl = save_cln;
fat_buf_release(fs_info);
return rc;
}
}
i++;
ffc1a748: 3b 39 00 01 addi r25,r25,1
cl4find++;
if (cl4find >= data_cls_val)
ffc1a74c: 41 9c 00 08 blt- cr7,ffc1a754 <fat_scan_fat_for_free_clusters+0x19c><== ALWAYS TAKEN
cl4find = 2;
ffc1a750: 3b c0 00 02 li r30,2 <== 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)
ffc1a754: 7f 99 b8 40 cmplw cr7,r25,r23
ffc1a758: 41 9c fe c4 blt+ cr7,ffc1a61c <fat_scan_fat_for_free_clusters+0x64><== ALWAYS TAKEN
if (cl4find >= data_cls_val)
cl4find = 2;
}
fs_info->vol.next_cl = save_cln;
if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE)
ffc1a75c: 81 3f 00 44 lwz r9,68(r31) <== NOT EXECUTED
cl4find++;
if (cl4find >= data_cls_val)
cl4find = 2;
}
fs_info->vol.next_cl = save_cln;
ffc1a760: 93 5f 00 4c stw r26,76(r31) <== NOT EXECUTED
if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE)
ffc1a764: 2f 89 ff ff cmpwi cr7,r9,-1 <== NOT EXECUTED
ffc1a768: 41 9e 00 10 beq- cr7,ffc1a778 <fat_scan_fat_for_free_clusters+0x1c0><== NOT EXECUTED
fs_info->vol.free_cls -= (*cls_added);
ffc1a76c: 81 5d 00 00 lwz r10,0(r29) <== NOT EXECUTED
ffc1a770: 7d 2a 48 50 subf r9,r10,r9 <== NOT EXECUTED
ffc1a774: 91 3f 00 44 stw r9,68(r31) <== NOT EXECUTED
*last_cl = save_cln;
ffc1a778: 93 58 00 00 stw r26,0(r24) <== NOT EXECUTED
fat_buf_release(fs_info);
ffc1a77c: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc1a780: 4b ff 92 69 bl ffc139e8 <fat_buf_release> <== NOT EXECUTED
ffc1a784: 48 00 00 34 b ffc1a7b8 <fat_scan_fat_for_free_clusters+0x200><== NOT EXECUTED
if (zero_fill)
{
bytes_written = fat_cluster_set (fs_info, cl4find, 0, fs_info->vol.bpc, 0);
if (fs_info->vol.bpc != bytes_written)
{
rc = -1;
ffc1a788: 3b 40 ff ff li r26,-1 <== NOT EXECUTED
return RC_OK;
cleanup:
/* cleanup activity */
fat_free_fat_clusters_chain(fs_info, (*chain));
ffc1a78c: 80 9b 00 00 lwz r4,0(r27) <== NOT EXECUTED
ffc1a790: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
/* 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;
ffc1a794: 7f 5c d3 78 mr r28,r26 <== NOT EXECUTED
return RC_OK;
cleanup:
/* cleanup activity */
fat_free_fat_clusters_chain(fs_info, (*chain));
ffc1a798: 4b ff fd 4d bl ffc1a4e4 <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);
ffc1a79c: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED
ffc1a7a0: 38 a0 00 00 li r5,0 <== NOT EXECUTED
ffc1a7a4: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc1a7a8: 4b ff fa a1 bl ffc1a248 <fat_set_fat_cluster> <== NOT EXECUTED
fat_buf_release(fs_info);
ffc1a7ac: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc1a7b0: 4b ff 92 39 bl ffc139e8 <fat_buf_release> <== NOT EXECUTED
ffc1a7b4: 48 00 00 10 b ffc1a7c4 <fat_scan_fat_for_free_clusters+0x20c><== NOT EXECUTED
ssize_t bytes_written;
*cls_added = 0;
if (count == 0)
return rc;
ffc1a7b8: 3b 80 00 00 li r28,0 <== NOT EXECUTED
ffc1a7bc: 48 00 00 08 b ffc1a7c4 <fat_scan_fat_for_free_clusters+0x20c><== NOT EXECUTED
* wouldn't work properly
*/
if (*cls_added == 0)
{
*chain = cl4find;
rc = fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_EOC);
ffc1a7c0: 7c 7c 1b 78 mr r28,r3 <== 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;
}
ffc1a7c4: 81 81 00 18 lwz r12,24(r1)
ffc1a7c8: 39 61 00 48 addi r11,r1,72
ffc1a7cc: 7f 83 e3 78 mr r3,r28
ffc1a7d0: 7d 80 81 20 mtcrf 8,r12
ffc1a7d4: 4b fe 6e 00 b ffc015d4 <_restgpr_21_x>
ffc13d0c <fat_sector_write>:
fat_fs_info_t *fs_info,
uint32_t start,
uint32_t offset,
uint32_t count,
const void *buff)
{
ffc13d0c: 94 21 ff c8 stwu r1,-56(r1)
ffc13d10: 7c 08 02 a6 mflr r0
ffc13d14: bf 01 00 18 stmw r24,24(r1)
ffc13d18: 7c 7e 1b 78 mr r30,r3
ffc13d1c: 7c dd 33 78 mr r29,r6
ffc13d20: 90 01 00 3c stw r0,60(r1)
ffc13d24: 7c f9 3b 78 mr r25,r7
int rc = RC_OK;
ssize_t cmpltd = 0;
uint32_t sec_num = start;
uint32_t ofs = offset;
ffc13d28: 7c ba 2b 78 mr r26,r5
uint32_t count,
const void *buff)
{
int rc = RC_OK;
ssize_t cmpltd = 0;
uint32_t sec_num = start;
ffc13d2c: 7c 9b 23 78 mr r27,r4
uint32_t offset,
uint32_t count,
const void *buff)
{
int rc = RC_OK;
ssize_t cmpltd = 0;
ffc13d30: 3b 80 00 00 li r28,0
}
static inline void
fat_buf_mark_modified(fat_fs_info_t *fs_info)
{
fs_info->c.modified = true;
ffc13d34: 3b 00 00 01 li r24,1
uint32_t sec_num = start;
uint32_t ofs = offset;
uint8_t *sec_buf;
uint32_t c = 0;
while(count > 0)
ffc13d38: 48 00 00 6c b ffc13da4 <fat_sector_write+0x98>
{
c = MIN(count, (fs_info->vol.bps - ofs));
ffc13d3c: a3 fe 00 00 lhz r31,0(r30)
ffc13d40: 7f fa f8 50 subf r31,r26,r31
ffc13d44: 7f 9f e8 40 cmplw cr7,r31,r29
ffc13d48: 40 9d 00 08 ble- cr7,ffc13d50 <fat_sector_write+0x44>
ffc13d4c: 7f bf eb 78 mr r31,r29
if (c == fs_info->vol.bytes_per_block)
ffc13d50: a1 3e 00 0a lhz r9,10(r30)
rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &sec_buf);
ffc13d54: 7f c3 f3 78 mr r3,r30
ffc13d58: 7f 64 db 78 mr r4,r27
while(count > 0)
{
c = MIN(count, (fs_info->vol.bps - ofs));
if (c == fs_info->vol.bytes_per_block)
ffc13d5c: 7f 9f 48 00 cmpw cr7,r31,r9
rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &sec_buf);
ffc13d60: 38 a0 00 02 li r5,2
while(count > 0)
{
c = MIN(count, (fs_info->vol.bps - ofs));
if (c == fs_info->vol.bytes_per_block)
ffc13d64: 41 9e 00 08 beq- cr7,ffc13d6c <fat_sector_write+0x60> <== NEVER TAKEN
rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &sec_buf);
else
rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf);
ffc13d68: 38 a0 00 01 li r5,1
ffc13d6c: 38 c1 00 08 addi r6,r1,8
ffc13d70: 4b ff fe 39 bl ffc13ba8 <fat_buf_access>
if (rc != RC_OK)
ffc13d74: 2f 83 00 00 cmpwi cr7,r3,0
ffc13d78: 40 9e 00 38 bne- cr7,ffc13db0 <fat_sector_write+0xa4> <== NEVER TAKEN
return -1;
memcpy((sec_buf + ofs), (buff + cmpltd), c);
ffc13d7c: 80 61 00 08 lwz r3,8(r1)
ffc13d80: 7c 99 e2 14 add r4,r25,r28
ffc13d84: 7f e5 fb 78 mr r5,r31
ffc13d88: 7c 63 d2 14 add r3,r3,r26
ffc13d8c: 48 00 90 3d bl ffc1cdc8 <memcpy>
ffc13d90: 9b 1e 00 88 stb r24,136(r30)
fat_buf_mark_modified(fs_info);
count -= c;
ffc13d94: 7f bf e8 50 subf r29,r31,r29
cmpltd +=c;
ffc13d98: 7f 9f e2 14 add r28,r31,r28
sec_num++;
ffc13d9c: 3b 7b 00 01 addi r27,r27,1
ofs = 0;
ffc13da0: 3b 40 00 00 li r26,0
uint32_t sec_num = start;
uint32_t ofs = offset;
uint8_t *sec_buf;
uint32_t c = 0;
while(count > 0)
ffc13da4: 2f 9d 00 00 cmpwi cr7,r29,0
ffc13da8: 40 9e ff 94 bne+ cr7,ffc13d3c <fat_sector_write+0x30>
ffc13dac: 48 00 00 08 b ffc13db4 <fat_sector_write+0xa8>
if (c == fs_info->vol.bytes_per_block)
rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &sec_buf);
else
rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf);
if (rc != RC_OK)
return -1;
ffc13db0: 3b 80 ff ff li r28,-1 <== NOT EXECUTED
cmpltd +=c;
sec_num++;
ofs = 0;
}
return cmpltd;
}
ffc13db4: 39 61 00 38 addi r11,r1,56
ffc13db8: 7f 83 e3 78 mr r3,r28
ffc13dbc: 4b fe d8 24 b ffc015e0 <_restgpr_24_x>
ffc1a248 <fat_set_fat_cluster>:
uint16_t fat16_clv = 0;
uint32_t fat32_clv = 0;
uint8_t *sec_buf = NULL;
/* sanity check */
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
ffc1a248: 2b 84 00 01 cmplwi cr7,r4,1
fat_set_fat_cluster(
fat_fs_info_t *fs_info,
uint32_t cln,
uint32_t in_val
)
{
ffc1a24c: 94 21 ff d0 stwu r1,-48(r1)
ffc1a250: 7c 08 02 a6 mflr r0
int rc = RC_OK;
uint32_t sec = 0;
uint32_t ofs = 0;
uint16_t fat16_clv = 0;
uint32_t fat32_clv = 0;
uint8_t *sec_buf = NULL;
ffc1a254: 39 20 00 00 li r9,0
fat_set_fat_cluster(
fat_fs_info_t *fs_info,
uint32_t cln,
uint32_t in_val
)
{
ffc1a258: bf 41 00 18 stmw r26,24(r1)
ffc1a25c: 7c 9e 23 78 mr r30,r4
ffc1a260: 90 01 00 34 stw r0,52(r1)
int rc = RC_OK;
uint32_t sec = 0;
uint32_t ofs = 0;
uint16_t fat16_clv = 0;
uint32_t fat32_clv = 0;
uint8_t *sec_buf = NULL;
ffc1a264: 91 21 00 08 stw r9,8(r1)
/* sanity check */
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
ffc1a268: 40 9d 02 64 ble- cr7,ffc1a4cc <fat_set_fat_cluster+0x284><== NEVER TAKEN
ffc1a26c: 81 23 00 38 lwz r9,56(r3)
ffc1a270: 7c 7f 1b 78 mr r31,r3
ffc1a274: 39 29 00 01 addi r9,r9,1
ffc1a278: 7f 84 48 40 cmplw cr7,r4,r9
ffc1a27c: 40 bd 00 08 ble+ cr7,ffc1a284 <fat_set_fat_cluster+0x3c><== ALWAYS TAKEN
ffc1a280: 48 00 02 4c b ffc1a4cc <fat_set_fat_cluster+0x284> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
ffc1a284: 89 23 00 0e lbz r9,14(r3)
ffc1a288: 7c bc 2b 78 mr r28,r5
ffc1a28c: 71 28 00 01 andi. r8,r9,1
ffc1a290: 41 82 00 10 beq- ffc1a2a0 <fat_set_fat_cluster+0x58>
ffc1a294: 54 9b f8 7e rlwinm r27,r4,31,1,31
ffc1a298: 7f 7b 22 14 add r27,r27,r4
ffc1a29c: 48 00 00 18 b ffc1a2b4 <fat_set_fat_cluster+0x6c>
ffc1a2a0: 55 2a 07 bc rlwinm r10,r9,0,30,30
ffc1a2a4: 71 47 00 ff andi. r7,r10,255
ffc1a2a8: 54 9b 10 3a rlwinm r27,r4,2,0,29
ffc1a2ac: 41 82 00 08 beq- ffc1a2b4 <fat_set_fat_cluster+0x6c>
ffc1a2b0: 54 9b 08 3c rlwinm r27,r4,1,0,30
fs_info->vol.afat_loc;
ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1);
ffc1a2b4: 2f 88 00 00 cmpwi cr7,r8,0
/* sanity check */
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
rtems_set_errno_and_return_minus_one(EIO);
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
ffc1a2b8: 89 5f 00 02 lbz r10,2(r31)
ffc1a2bc: 7f 7b 54 30 srw r27,r27,r10
ffc1a2c0: 81 5f 00 58 lwz r10,88(r31)
ffc1a2c4: 7f 7b 52 14 add r27,r27,r10
fs_info->vol.afat_loc;
ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1);
ffc1a2c8: 41 9e 00 10 beq- cr7,ffc1a2d8 <fat_set_fat_cluster+0x90>
ffc1a2cc: 57 dd f8 7e rlwinm r29,r30,31,1,31
ffc1a2d0: 7f bd f2 14 add r29,r29,r30
ffc1a2d4: 48 00 00 18 b ffc1a2ec <fat_set_fat_cluster+0xa4>
ffc1a2d8: 55 29 07 bc rlwinm r9,r9,0,30,30
ffc1a2dc: 71 2a 00 ff andi. r10,r9,255
ffc1a2e0: 57 dd 10 3a rlwinm r29,r30,2,0,29
ffc1a2e4: 41 82 00 08 beq- ffc1a2ec <fat_set_fat_cluster+0xa4>
ffc1a2e8: 57 dd 08 3c rlwinm r29,r30,1,0,30
rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &sec_buf);
ffc1a2ec: 7f e3 fb 78 mr r3,r31
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);
ffc1a2f0: a3 5f 00 00 lhz r26,0(r31)
rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &sec_buf);
ffc1a2f4: 7f 64 db 78 mr r4,r27
ffc1a2f8: 38 a0 00 01 li r5,1
ffc1a2fc: 38 c1 00 08 addi r6,r1,8
ffc1a300: 4b ff 98 a9 bl ffc13ba8 <fat_buf_access>
if (rc != RC_OK)
ffc1a304: 2c 03 00 00 cmpwi r3,0
ffc1a308: 40 82 01 d4 bne- ffc1a4dc <fat_set_fat_cluster+0x294> <== 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);
ffc1a30c: 39 3a ff ff addi r9,r26,-1
ffc1a310: 7f a9 48 38 and r9,r29,r9
rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &sec_buf);
if (rc != RC_OK)
return rc;
switch ( fs_info->vol.type )
ffc1a314: 8b bf 00 0e lbz r29,14(r31)
ffc1a318: 2f 9d 00 02 cmpwi cr7,r29,2
ffc1a31c: 41 9e 01 50 beq- cr7,ffc1a46c <fat_set_fat_cluster+0x224>
ffc1a320: 2f 9d 00 04 cmpwi cr7,r29,4
ffc1a324: 41 9e 01 60 beq- cr7,ffc1a484 <fat_set_fat_cluster+0x23c>
ffc1a328: 2f 9d 00 01 cmpwi cr7,r29,1
ffc1a32c: 40 be 01 a0 bne+ cr7,ffc1a4cc <fat_set_fat_cluster+0x284><== NEVER TAKEN
{
case FAT_FAT12:
if ( FAT_CLUSTER_IS_ODD(cln) )
ffc1a330: 73 c7 00 01 andi. r7,r30,1
ffc1a334: 81 41 00 08 lwz r10,8(r1)
ffc1a338: 41 82 00 90 beq- ffc1a3c8 <fat_set_fat_cluster+0x180>
{
fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT;
*(sec_buf + ofs) &= 0x0F;
ffc1a33c: 7d 0a 48 ae lbzx r8,r10,r9
switch ( fs_info->vol.type )
{
case FAT_FAT12:
if ( FAT_CLUSTER_IS_ODD(cln) )
{
fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT;
ffc1a340: 57 9c 24 36 rlwinm r28,r28,4,16,27
*(sec_buf + ofs) &= 0x0F;
ffc1a344: 55 08 07 3e clrlwi r8,r8,28
ffc1a348: 7d 0a 49 ae stbx r8,r10,r9
*(sec_buf + ofs) |= (uint8_t)(fat16_clv & 0x00F0);
ffc1a34c: 81 41 00 08 lwz r10,8(r1)
ffc1a350: 7d 0a 48 ae lbzx r8,r10,r9
ffc1a354: 7f 88 43 78 or r8,r28,r8
ffc1a358: 7d 0a 49 ae stbx r8,r10,r9
fat_buf_mark_modified(fs_info);
if ( ofs == (fs_info->vol.bps - 1) )
ffc1a35c: a1 5f 00 00 lhz r10,0(r31)
}
static inline void
fat_buf_mark_modified(fat_fs_info_t *fs_info)
{
fs_info->c.modified = true;
ffc1a360: 9b bf 00 88 stb r29,136(r31)
ffc1a364: 39 4a ff ff addi r10,r10,-1
ffc1a368: 7f 89 50 00 cmpw cr7,r9,r10
ffc1a36c: 40 be 00 3c bne+ cr7,ffc1a3a8 <fat_set_fat_cluster+0x160><== ALWAYS TAKEN
{
rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ,
ffc1a370: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc1a374: 38 9b 00 01 addi r4,r27,1 <== NOT EXECUTED
ffc1a378: 38 a0 00 01 li r5,1 <== NOT EXECUTED
ffc1a37c: 38 c1 00 08 addi r6,r1,8 <== NOT EXECUTED
ffc1a380: 4b ff 98 29 bl ffc13ba8 <fat_buf_access> <== NOT EXECUTED
&sec_buf);
if (rc != RC_OK)
ffc1a384: 2c 03 00 00 cmpwi r3,0 <== NOT EXECUTED
ffc1a388: 40 82 01 54 bne- ffc1a4dc <fat_set_fat_cluster+0x294> <== NOT EXECUTED
return rc;
*sec_buf &= 0x00;
ffc1a38c: 81 21 00 08 lwz r9,8(r1) <== NOT EXECUTED
*sec_buf |= (uint8_t)((fat16_clv & 0xFF00)>>8);
ffc1a390: 57 9c c2 3e rlwinm r28,r28,24,8,31 <== NOT EXECUTED
rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ,
&sec_buf);
if (rc != RC_OK)
return rc;
*sec_buf &= 0x00;
ffc1a394: 98 69 00 00 stb r3,0(r9) <== NOT EXECUTED
*sec_buf |= (uint8_t)((fat16_clv & 0xFF00)>>8);
ffc1a398: 81 21 00 08 lwz r9,8(r1) <== NOT EXECUTED
ffc1a39c: 89 49 00 00 lbz r10,0(r9) <== NOT EXECUTED
ffc1a3a0: 7f 8a 53 78 or r10,r28,r10 <== NOT EXECUTED
ffc1a3a4: 48 00 00 90 b ffc1a434 <fat_set_fat_cluster+0x1ec> <== NOT EXECUTED
fat_buf_mark_modified(fs_info);
}
else
{
*(sec_buf + ofs + 1) &= 0x00;
ffc1a3a8: 81 41 00 08 lwz r10,8(r1)
ffc1a3ac: 39 29 00 01 addi r9,r9,1
*(sec_buf + ofs + 1) |= (uint8_t )((fat16_clv & 0xFF00)>>8);
ffc1a3b0: 57 9c c2 3e rlwinm r28,r28,24,8,31
fat_buf_mark_modified(fs_info);
}
else
{
*(sec_buf + ofs + 1) &= 0x00;
ffc1a3b4: 7c 6a 49 ae stbx r3,r10,r9
*(sec_buf + ofs + 1) |= (uint8_t )((fat16_clv & 0xFF00)>>8);
ffc1a3b8: 81 41 00 08 lwz r10,8(r1)
ffc1a3bc: 7d 0a 48 ae lbzx r8,r10,r9
ffc1a3c0: 7d 08 e3 78 or r8,r8,r28
ffc1a3c4: 48 00 00 a0 b ffc1a464 <fat_set_fat_cluster+0x21c>
}
}
else
{
fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK;
*(sec_buf + ofs) &= 0x00;
ffc1a3c8: 7c 6a 49 ae stbx r3,r10,r9
*(sec_buf + ofs + 1) |= (uint8_t )((fat16_clv & 0xFF00)>>8);
}
}
else
{
fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK;
ffc1a3cc: 57 9c 05 3e clrlwi r28,r28,20
ffc1a3d0: 57 9e 04 3e clrlwi r30,r28,16
*(sec_buf + ofs) &= 0x00;
*(sec_buf + ofs) |= (uint8_t)(fat16_clv & 0x00FF);
ffc1a3d4: 81 41 00 08 lwz r10,8(r1)
ffc1a3d8: 7d 0a 48 ae lbzx r8,r10,r9
ffc1a3dc: 7d 1c e3 78 or r28,r8,r28
ffc1a3e0: 7f 8a 49 ae stbx r28,r10,r9
fat_buf_mark_modified(fs_info);
if ( ofs == (fs_info->vol.bps - 1) )
ffc1a3e4: a1 5f 00 00 lhz r10,0(r31)
ffc1a3e8: 9b bf 00 88 stb r29,136(r31)
ffc1a3ec: 39 4a ff ff addi r10,r10,-1
ffc1a3f0: 7f 89 50 00 cmpw cr7,r9,r10
ffc1a3f4: 40 be 00 4c bne+ cr7,ffc1a440 <fat_set_fat_cluster+0x1f8><== ALWAYS TAKEN
{
rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ,
ffc1a3f8: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc1a3fc: 38 9b 00 01 addi r4,r27,1 <== NOT EXECUTED
ffc1a400: 38 a0 00 01 li r5,1 <== NOT EXECUTED
ffc1a404: 38 c1 00 08 addi r6,r1,8 <== NOT EXECUTED
ffc1a408: 4b ff 97 a1 bl ffc13ba8 <fat_buf_access> <== NOT EXECUTED
&sec_buf);
if (rc != RC_OK)
ffc1a40c: 2c 03 00 00 cmpwi r3,0 <== NOT EXECUTED
ffc1a410: 40 82 00 cc bne- ffc1a4dc <fat_set_fat_cluster+0x294> <== NOT EXECUTED
return rc;
*sec_buf &= 0xF0;
ffc1a414: 81 21 00 08 lwz r9,8(r1) <== NOT EXECUTED
*sec_buf |= (uint8_t)((fat16_clv & 0xFF00)>>8);
ffc1a418: 57 de c2 3e rlwinm r30,r30,24,8,31 <== NOT EXECUTED
rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ,
&sec_buf);
if (rc != RC_OK)
return rc;
*sec_buf &= 0xF0;
ffc1a41c: 89 49 00 00 lbz r10,0(r9) <== NOT EXECUTED
ffc1a420: 55 4a 00 36 rlwinm r10,r10,0,0,27 <== NOT EXECUTED
ffc1a424: 99 49 00 00 stb r10,0(r9) <== NOT EXECUTED
*sec_buf |= (uint8_t)((fat16_clv & 0xFF00)>>8);
ffc1a428: 81 21 00 08 lwz r9,8(r1) <== NOT EXECUTED
ffc1a42c: 89 49 00 00 lbz r10,0(r9) <== NOT EXECUTED
ffc1a430: 7f ca 53 78 or r10,r30,r10 <== NOT EXECUTED
ffc1a434: 99 49 00 00 stb r10,0(r9) <== NOT EXECUTED
ffc1a438: 9b bf 00 88 stb r29,136(r31) <== NOT EXECUTED
ffc1a43c: 48 00 00 a0 b ffc1a4dc <fat_set_fat_cluster+0x294> <== NOT EXECUTED
fat_buf_mark_modified(fs_info);
}
else
{
*(sec_buf + ofs + 1) &= 0xF0;
ffc1a440: 81 41 00 08 lwz r10,8(r1)
ffc1a444: 39 29 00 01 addi r9,r9,1
*(sec_buf + ofs+1) |= (uint8_t)((fat16_clv & 0xFF00)>>8);
ffc1a448: 57 de c2 3e rlwinm r30,r30,24,8,31
fat_buf_mark_modified(fs_info);
}
else
{
*(sec_buf + ofs + 1) &= 0xF0;
ffc1a44c: 7d 0a 48 ae lbzx r8,r10,r9
ffc1a450: 55 08 00 36 rlwinm r8,r8,0,0,27
ffc1a454: 7d 0a 49 ae stbx r8,r10,r9
*(sec_buf + ofs+1) |= (uint8_t)((fat16_clv & 0xFF00)>>8);
ffc1a458: 81 41 00 08 lwz r10,8(r1)
ffc1a45c: 7d 0a 48 ae lbzx r8,r10,r9
ffc1a460: 7d 08 f3 78 or r8,r8,r30
ffc1a464: 7d 0a 49 ae stbx r8,r10,r9
ffc1a468: 48 00 00 74 b ffc1a4dc <fat_set_fat_cluster+0x294>
}
break;
case FAT_FAT16:
*((uint16_t *)(sec_buf + ofs)) =
(uint16_t )(CT_LE_W(in_val));
ffc1a46c: 57 8a 42 2e rlwinm r10,r28,8,8,23
ffc1a470: 57 9c c6 3e rlwinm r28,r28,24,24,31
ffc1a474: 7d 5c e3 78 or r28,r10,r28
}
}
break;
case FAT_FAT16:
*((uint16_t *)(sec_buf + ofs)) =
ffc1a478: 81 41 00 08 lwz r10,8(r1)
ffc1a47c: 7f 8a 4b 2e sthx r28,r10,r9
ffc1a480: 48 00 00 40 b ffc1a4c0 <fat_set_fat_cluster+0x278>
(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));
ffc1a484: 57 9c 01 3e clrlwi r28,r28,4
ffc1a488: 53 87 46 3e rlwimi r7,r28,8,24,31
ffc1a48c: 53 87 c4 2e rlwimi r7,r28,24,16,23
ffc1a490: 53 87 42 1e rlwimi r7,r28,8,8,15
ffc1a494: 53 87 c0 0e rlwimi r7,r28,24,0,7
ffc1a498: 3d 00 f0 00 lis r8,-4096
*((uint32_t *)(sec_buf + ofs)) &= CT_LE_L(0xF0000000);
ffc1a49c: 81 41 00 08 lwz r10,8(r1)
ffc1a4a0: 51 06 46 3e rlwimi r6,r8,8,24,31
ffc1a4a4: 51 06 c4 2e rlwimi r6,r8,24,16,23
ffc1a4a8: 51 06 42 1e rlwimi r6,r8,8,8,15
ffc1a4ac: 51 06 c0 0e rlwimi r6,r8,24,0,7
ffc1a4b0: 7d 0a 48 2e lwzx r8,r10,r9
ffc1a4b4: 7c c8 40 38 and r8,r6,r8
*((uint32_t *)(sec_buf + ofs)) |= fat32_clv;
ffc1a4b8: 7d 08 3b 78 or r8,r8,r7
ffc1a4bc: 7d 0a 49 2e stwx r8,r10,r9
ffc1a4c0: 39 20 00 01 li r9,1
ffc1a4c4: 99 3f 00 88 stb r9,136(r31)
ffc1a4c8: 48 00 00 14 b ffc1a4dc <fat_set_fat_cluster+0x294>
fat_buf_mark_modified(fs_info);
break;
default:
rtems_set_errno_and_return_minus_one(EIO);
ffc1a4cc: 48 00 1c 1d bl ffc1c0e8 <__errno> <== NOT EXECUTED
ffc1a4d0: 39 20 00 05 li r9,5 <== NOT EXECUTED
ffc1a4d4: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED
ffc1a4d8: 38 60 ff ff li r3,-1 <== NOT EXECUTED
break;
}
return RC_OK;
}
ffc1a4dc: 39 61 00 30 addi r11,r1,48
ffc1a4e0: 4b fe 71 08 b ffc015e8 <_restgpr_26_x>
ffc1483c <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)
{
ffc1483c: 94 21 ff e8 stwu r1,-24(r1)
ffc14840: 7c 08 02 a6 mflr r0
ffc14844: bf 81 00 08 stmw r28,8(r1)
ffc14848: 7c 7f 1b 78 mr r31,r3
ffc1484c: 90 01 00 1c stw r0,28(r1)
int rc = RC_OK;
int i = 0;
rc = fat_sync(fs_info);
ffc14850: 4b ff fe f1 bl ffc14740 <fat_sync>
if ( rc != RC_OK )
ffc14854: 7c 7d 1b 79 mr. r29,r3
ffc14858: 41 a2 00 08 beq+ ffc14860 <fat_shutdown_drive+0x24> <== ALWAYS TAKEN
rc = -1;
ffc1485c: 3b a0 ff ff li r29,-1 <== NOT EXECUTED
ffc14860: 3b c0 00 00 li r30,0
for (i = 0; i < FAT_HASH_SIZE; i++)
{
rtems_chain_node *node = NULL;
rtems_chain_control *the_chain = fs_info->vhash + i;
ffc14864: 83 9f 00 6c lwz r28,108(r31)
ffc14868: 7f 9c f2 14 add r28,r28,r30
while ( (node = rtems_chain_get(the_chain)) != NULL )
ffc1486c: 48 00 00 08 b ffc14874 <fat_shutdown_drive+0x38>
free(node);
ffc14870: 4b ff 14 6d bl ffc05cdc <free>
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
ffc14874: 7f 83 e3 78 mr r3,r28
ffc14878: 4b ff 68 2d bl ffc0b0a4 <_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 )
ffc1487c: 2f 83 00 00 cmpwi cr7,r3,0
ffc14880: 40 9e ff f0 bne+ cr7,ffc14870 <fat_shutdown_drive+0x34>
rc = fat_sync(fs_info);
if ( rc != RC_OK )
rc = -1;
for (i = 0; i < FAT_HASH_SIZE; i++)
ffc14884: 2f 9e 00 0c cmpwi cr7,r30,12
ffc14888: 3b de 00 0c addi r30,r30,12
ffc1488c: 40 be ff d8 bne- cr7,ffc14864 <fat_shutdown_drive+0x28>
ffc14890: 3b c0 00 00 li r30,0
}
for (i = 0; i < FAT_HASH_SIZE; i++)
{
rtems_chain_node *node = NULL;
rtems_chain_control *the_chain = fs_info->rhash + i;
ffc14894: 83 9f 00 70 lwz r28,112(r31)
ffc14898: 7f 9c f2 14 add r28,r28,r30
while ( (node = rtems_chain_get(the_chain)) != NULL )
ffc1489c: 48 00 00 08 b ffc148a4 <fat_shutdown_drive+0x68>
free(node);
ffc148a0: 4b ff 14 3d bl ffc05cdc <free> <== NOT EXECUTED
ffc148a4: 7f 83 e3 78 mr r3,r28
ffc148a8: 4b ff 67 fd bl ffc0b0a4 <_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 )
ffc148ac: 2f 83 00 00 cmpwi cr7,r3,0
ffc148b0: 40 9e ff f0 bne+ cr7,ffc148a0 <fat_shutdown_drive+0x64> <== NEVER TAKEN
while ( (node = rtems_chain_get(the_chain)) != NULL )
free(node);
}
for (i = 0; i < FAT_HASH_SIZE; i++)
ffc148b4: 2f 9e 00 0c cmpwi cr7,r30,12
ffc148b8: 3b de 00 0c addi r30,r30,12
ffc148bc: 40 be ff d8 bne- cr7,ffc14894 <fat_shutdown_drive+0x58>
while ( (node = rtems_chain_get(the_chain)) != NULL )
free(node);
}
free(fs_info->vhash);
ffc148c0: 80 7f 00 6c lwz r3,108(r31)
ffc148c4: 4b ff 14 19 bl ffc05cdc <free>
free(fs_info->rhash);
ffc148c8: 80 7f 00 70 lwz r3,112(r31)
ffc148cc: 4b ff 14 11 bl ffc05cdc <free>
free(fs_info->uino);
ffc148d0: 80 7f 00 74 lwz r3,116(r31)
ffc148d4: 4b ff 14 09 bl ffc05cdc <free>
free(fs_info->sec_buf);
ffc148d8: 80 7f 00 90 lwz r3,144(r31)
ffc148dc: 4b ff 14 01 bl ffc05cdc <free>
close(fs_info->vol.fd);
ffc148e0: 80 7f 00 60 lwz r3,96(r31)
ffc148e4: 4b ff 13 71 bl ffc05c54 <close>
if (rc)
ffc148e8: 2f 9d 00 00 cmpwi cr7,r29,0
ffc148ec: 41 be 00 10 beq+ cr7,ffc148fc <fat_shutdown_drive+0xc0> <== ALWAYS TAKEN
errno = EIO;
ffc148f0: 48 00 77 f9 bl ffc1c0e8 <__errno> <== NOT EXECUTED
ffc148f4: 39 20 00 05 li r9,5 <== NOT EXECUTED
ffc148f8: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED
return rc;
}
ffc148fc: 39 61 00 18 addi r11,r1,24
ffc14900: 7f a3 eb 78 mr r3,r29
ffc14904: 4b fe cc ec b ffc015f0 <_restgpr_28_x>
ffc14740 <fat_sync>:
return RC_OK;
}
int
fat_sync(fat_fs_info_t *fs_info)
{
ffc14740: 94 21 ff d8 stwu r1,-40(r1)
ffc14744: 7c 08 02 a6 mflr r0
ffc14748: bf a1 00 1c stmw r29,28(r1)
ffc1474c: 7c 7f 1b 78 mr r31,r3
ffc14750: 90 01 00 2c stw r0,44(r1)
static int
fat_fat32_update_fsinfo_sector(fat_fs_info_t *fs_info)
{
ssize_t ret1 = 0, ret2 = 0;
if (fs_info->vol.type == FAT_FAT32)
ffc14754: 89 23 00 0e lbz r9,14(r3)
ffc14758: 2f 89 00 04 cmpwi cr7,r9,4
ffc1475c: 41 9e 00 0c beq- cr7,ffc14768 <fat_sync+0x28>
* RC_OK on success, or -1 if error occured (errno set appropriately)
*/
static int
fat_fat32_update_fsinfo_sector(fat_fs_info_t *fs_info)
{
ssize_t ret1 = 0, ret2 = 0;
ffc14760: 3b c0 00 00 li r30,0
ffc14764: 48 00 00 a0 b ffc14804 <fat_sync+0xc4>
if (fs_info->vol.type == FAT_FAT32)
{
uint32_t free_count = fs_info->vol.free_cls;
ffc14768: 81 23 00 44 lwz r9,68(r3)
* RC_OK on success, or -1 if error occured (errno set appropriately)
*/
static int
fat_fat32_update_fsinfo_sector(fat_fs_info_t *fs_info)
{
ssize_t ret1 = 0, ret2 = 0;
ffc1476c: 3b c0 00 00 li r30,0
if (fs_info->vol.type == FAT_FAT32)
{
uint32_t free_count = fs_info->vol.free_cls;
uint32_t next_free = fs_info->vol.next_cl;
if (free_count != fs_info->vol.free_cls_in_fs_info)
ffc14770: 81 43 00 48 lwz r10,72(r3)
ssize_t ret1 = 0, ret2 = 0;
if (fs_info->vol.type == FAT_FAT32)
{
uint32_t free_count = fs_info->vol.free_cls;
uint32_t next_free = fs_info->vol.next_cl;
ffc14774: 83 a3 00 4c lwz r29,76(r3)
if (free_count != fs_info->vol.free_cls_in_fs_info)
ffc14778: 7f 89 50 00 cmpw cr7,r9,r10
ffc1477c: 41 9e 00 34 beq- cr7,ffc147b0 <fat_sync+0x70> <== ALWAYS TAKEN
uint32_t value
)
{
uint32_t swapped;
__asm__ volatile("rlwimi %0,%1,8,24,31;"
ffc14780: 51 2a 46 3e rlwimi r10,r9,8,24,31 <== NOT EXECUTED
ffc14784: 51 2a c4 2e rlwimi r10,r9,24,16,23 <== NOT EXECUTED
ffc14788: 51 2a 42 1e rlwimi r10,r9,8,8,15 <== NOT EXECUTED
ffc1478c: 51 2a c0 0e rlwimi r10,r9,24,0,7 <== NOT EXECUTED
{
uint32_t le_free_count = CT_LE_L(free_count);
ffc14790: 7c 27 0b 78 mr r7,r1 <== NOT EXECUTED
fs_info->vol.free_cls_in_fs_info = free_count;
ffc14794: 91 23 00 48 stw r9,72(r3) <== NOT EXECUTED
ret1 = fat_sector_write(fs_info,
ffc14798: 38 a0 01 e8 li r5,488 <== NOT EXECUTED
uint32_t free_count = fs_info->vol.free_cls;
uint32_t next_free = fs_info->vol.next_cl;
if (free_count != fs_info->vol.free_cls_in_fs_info)
{
uint32_t le_free_count = CT_LE_L(free_count);
ffc1479c: 95 47 00 08 stwu r10,8(r7) <== NOT EXECUTED
fs_info->vol.free_cls_in_fs_info = free_count;
ret1 = fat_sector_write(fs_info,
ffc147a0: 38 c0 00 04 li r6,4 <== NOT EXECUTED
ffc147a4: a0 83 00 40 lhz r4,64(r3) <== NOT EXECUTED
ffc147a8: 4b ff f5 65 bl ffc13d0c <fat_sector_write> <== NOT EXECUTED
ffc147ac: 7c 7e 1b 78 mr r30,r3 <== NOT EXECUTED
FAT_FSINFO_FREE_CLUSTER_COUNT_OFFSET,
sizeof(le_free_count),
&le_free_count);
}
if (next_free != fs_info->vol.next_cl_in_fs_info)
ffc147b0: 81 3f 00 50 lwz r9,80(r31)
ffc147b4: 7f 9d 48 00 cmpw cr7,r29,r9
ffc147b8: 41 9e 00 6c beq- cr7,ffc14824 <fat_sync+0xe4> <== NEVER TAKEN
ffc147bc: 53 a9 46 3e rlwimi r9,r29,8,24,31
ffc147c0: 53 a9 c4 2e rlwimi r9,r29,24,16,23
ffc147c4: 53 a9 42 1e rlwimi r9,r29,8,8,15
ffc147c8: 53 a9 c0 0e rlwimi r9,r29,24,0,7
{
uint32_t le_next_free = CT_LE_L(next_free);
ffc147cc: 7c 27 0b 78 mr r7,r1
fs_info->vol.next_cl_in_fs_info = next_free;
ffc147d0: 93 bf 00 50 stw r29,80(r31)
ret2 = fat_sector_write(fs_info,
ffc147d4: 7f e3 fb 78 mr r3,r31
&le_free_count);
}
if (next_free != fs_info->vol.next_cl_in_fs_info)
{
uint32_t le_next_free = CT_LE_L(next_free);
ffc147d8: 95 27 00 08 stwu r9,8(r7)
fs_info->vol.next_cl_in_fs_info = next_free;
ret2 = fat_sector_write(fs_info,
ffc147dc: 38 a0 01 ec li r5,492
ffc147e0: 38 c0 00 04 li r6,4
ffc147e4: a0 9f 00 40 lhz r4,64(r31)
ffc147e8: 4b ff f5 25 bl ffc13d0c <fat_sector_write>
sizeof(le_next_free),
&le_next_free);
}
}
if ( (ret1 < 0) || (ret2 < 0) )
ffc147ec: 2f 9e 00 00 cmpwi cr7,r30,0
ffc147f0: 40 bc 00 0c bge+ cr7,ffc147fc <fat_sync+0xbc> <== ALWAYS TAKEN
{
int rc = RC_OK;
rc = fat_fat32_update_fsinfo_sector(fs_info);
if ( rc != RC_OK )
rc = -1;
ffc147f4: 3b c0 ff ff li r30,-1 <== NOT EXECUTED
ffc147f8: 48 00 00 0c b ffc14804 <fat_sync+0xc4> <== NOT EXECUTED
sizeof(le_next_free),
&le_next_free);
}
}
if ( (ret1 < 0) || (ret2 < 0) )
ffc147fc: 2f 83 00 00 cmpwi cr7,r3,0
ffc14800: 48 00 00 28 b ffc14828 <fat_sync+0xe8>
rc = fat_fat32_update_fsinfo_sector(fs_info);
if ( rc != RC_OK )
rc = -1;
fat_buf_release(fs_info);
ffc14804: 7f e3 fb 78 mr r3,r31
ffc14808: 4b ff f1 e1 bl ffc139e8 <fat_buf_release>
if (rtems_bdbuf_syncdev(fs_info->vol.dd) != RTEMS_SUCCESSFUL)
ffc1480c: 80 7f 00 64 lwz r3,100(r31)
ffc14810: 4b ff d5 31 bl ffc11d40 <rtems_bdbuf_syncdev>
ffc14814: 2f 83 00 00 cmpwi cr7,r3,0
ffc14818: 41 be 00 18 beq+ cr7,ffc14830 <fat_sync+0xf0> <== ALWAYS TAKEN
rc = -1;
ffc1481c: 3b c0 ff ff li r30,-1 <== NOT EXECUTED
ffc14820: 48 00 00 10 b ffc14830 <fat_sync+0xf0> <== NOT EXECUTED
sizeof(le_next_free),
&le_next_free);
}
}
if ( (ret1 < 0) || (ret2 < 0) )
ffc14824: 2f 9e 00 00 cmpwi cr7,r30,0 <== NOT EXECUTED
ffc14828: 40 9c ff 38 bge+ cr7,ffc14760 <fat_sync+0x20> <== ALWAYS TAKEN
ffc1482c: 4b ff ff c8 b ffc147f4 <fat_sync+0xb4> <== NOT EXECUTED
if (rtems_bdbuf_syncdev(fs_info->vol.dd) != RTEMS_SUCCESSFUL)
rc = -1;
return rc;
}
ffc14830: 39 61 00 28 addi r11,r1,40
ffc14834: 7f c3 f3 78 mr r3,r30
ffc14838: 4b fe cd bc b ffc015f4 <_restgpr_29_x>
ffc33de4 <fchdir>:
/**
* compatible with SVr4, 4.4BSD and X/OPEN - Change Directory
*/
int fchdir( int fd )
{
ffc33de4: 94 21 ff 88 stwu r1,-120(r1)
int rv = 0;
rtems_libio_t *iop;
struct stat st;
rtems_filesystem_location_info_t loc;
st.st_mode = 0;
ffc33de8: 39 20 00 00 li r9,0
/**
* compatible with SVr4, 4.4BSD and X/OPEN - Change Directory
*/
int fchdir( int fd )
{
ffc33dec: 7c 08 02 a6 mflr r0
int rv = 0;
rtems_libio_t *iop;
struct stat st;
rtems_filesystem_location_info_t loc;
st.st_mode = 0;
ffc33df0: 91 21 00 14 stw r9,20(r1)
st.st_uid = 0;
ffc33df4: b1 21 00 1a sth r9,26(r1)
st.st_gid = 0;
ffc33df8: b1 21 00 1c sth r9,28(r1)
rtems_libio_check_fd( fd );
ffc33dfc: 3d 20 00 00 lis r9,0
ffc33e00: 81 29 33 d8 lwz r9,13272(r9)
/**
* compatible with SVr4, 4.4BSD and X/OPEN - Change Directory
*/
int fchdir( int fd )
{
ffc33e04: 90 01 00 7c stw r0,124(r1)
st.st_mode = 0;
st.st_uid = 0;
st.st_gid = 0;
rtems_libio_check_fd( fd );
ffc33e08: 7f 83 48 40 cmplw cr7,r3,r9
/**
* compatible with SVr4, 4.4BSD and X/OPEN - Change Directory
*/
int fchdir( int fd )
{
ffc33e0c: bf a1 00 6c stmw r29,108(r1)
st.st_mode = 0;
st.st_uid = 0;
st.st_gid = 0;
rtems_libio_check_fd( fd );
ffc33e10: 41 bc 00 08 blt+ cr7,ffc33e18 <fchdir+0x34>
ffc33e14: 48 00 00 20 b ffc33e34 <fchdir+0x50>
iop = rtems_libio_iop( fd );
ffc33e18: 3d 20 00 00 lis r9,0
ffc33e1c: 83 c9 34 c8 lwz r30,13512(r9)
ffc33e20: 1c 63 00 38 mulli r3,r3,56
ffc33e24: 7f de 1a 14 add r30,r30,r3
rtems_libio_check_is_open( iop );
ffc33e28: 81 3e 00 10 lwz r9,16(r30)
ffc33e2c: 71 2a 01 00 andi. r10,r9,256
ffc33e30: 40 a2 00 18 bne+ ffc33e48 <fchdir+0x64>
ffc33e34: 48 00 45 d5 bl ffc38408 <__errno>
ffc33e38: 39 20 00 09 li r9,9
ffc33e3c: 91 23 00 00 stw r9,0(r3)
ffc33e40: 3b e0 ff ff li r31,-1
ffc33e44: 48 00 00 a0 b ffc33ee4 <fchdir+0x100>
if ( rv == 0 ) {
rv = rtems_filesystem_chdir( &loc );
}
return rv;
}
ffc33e48: 80 7e 00 28 lwz r3,40(r30)
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 );
ffc33e4c: 3b be 00 14 addi r29,r30,20
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 );
ffc33e50: 81 23 00 0c lwz r9,12(r3)
ffc33e54: 81 29 00 00 lwz r9,0(r9)
ffc33e58: 7d 29 03 a6 mtctr r9
ffc33e5c: 4e 80 04 21 bctrl
ffc33e60: 81 3e 00 24 lwz r9,36(r30)
ffc33e64: 7f a3 eb 78 mr r3,r29
ffc33e68: 81 29 00 18 lwz r9,24(r9)
ffc33e6c: 38 81 00 08 addi r4,r1,8
ffc33e70: 7d 29 03 a6 mtctr r9
ffc33e74: 4e 80 04 21 bctrl
if ( rv == 0 ) {
ffc33e78: 7c 7f 1b 79 mr. r31,r3
ffc33e7c: 40 a2 00 40 bne+ ffc33ebc <fchdir+0xd8> <== NEVER TAKEN
bool access_ok = rtems_filesystem_check_access(
ffc33e80: 80 81 00 14 lwz r4,20(r1)
ffc33e84: 38 60 00 01 li r3,1
ffc33e88: a0 a1 00 1a lhz r5,26(r1)
ffc33e8c: a0 c1 00 1c lhz r6,28(r1)
ffc33e90: 4b fd b4 a9 bl ffc0f338 <rtems_filesystem_check_access>
st.st_mode,
st.st_uid,
st.st_gid
);
if ( access_ok ) {
ffc33e94: 2f 83 00 00 cmpwi cr7,r3,0
ffc33e98: 41 9e 00 14 beq- cr7,ffc33eac <fchdir+0xc8>
rtems_filesystem_location_clone( &loc, &iop->pathinfo );
ffc33e9c: 38 61 00 50 addi r3,r1,80
ffc33ea0: 7f a4 eb 78 mr r4,r29
ffc33ea4: 4b fd ad ad bl ffc0ec50 <rtems_filesystem_location_clone>
ffc33ea8: 48 00 00 14 b ffc33ebc <fchdir+0xd8>
} else {
errno = EACCES;
ffc33eac: 48 00 45 5d bl ffc38408 <__errno>
ffc33eb0: 39 20 00 0d li r9,13
ffc33eb4: 91 23 00 00 stw r9,0(r3)
rv = -1;
ffc33eb8: 3b e0 ff ff li r31,-1
if ( rv == 0 ) {
rv = rtems_filesystem_chdir( &loc );
}
return rv;
}
ffc33ebc: 80 7e 00 28 lwz r3,40(r30)
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 );
ffc33ec0: 81 23 00 0c lwz r9,12(r3)
ffc33ec4: 81 29 00 04 lwz r9,4(r9)
ffc33ec8: 7d 29 03 a6 mtctr r9
ffc33ecc: 4e 80 04 21 bctrl
rv = -1;
}
}
rtems_filesystem_instance_unlock( &iop->pathinfo );
if ( rv == 0 ) {
ffc33ed0: 2f 9f 00 00 cmpwi cr7,r31,0
ffc33ed4: 40 be 00 10 bne+ cr7,ffc33ee4 <fchdir+0x100>
rv = rtems_filesystem_chdir( &loc );
ffc33ed8: 38 61 00 50 addi r3,r1,80
ffc33edc: 4b ff 09 e5 bl ffc248c0 <rtems_filesystem_chdir>
ffc33ee0: 7c 7f 1b 78 mr r31,r3
}
return rv;
}
ffc33ee4: 39 61 00 78 addi r11,r1,120
ffc33ee8: 7f e3 fb 78 mr r3,r31
ffc33eec: 48 02 06 18 b ffc54504 <_restgpr_29_x>
ffc24eec <fchmod>:
int fchmod( int fd, mode_t mode )
{
int rv;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
ffc24eec: 3d 20 00 00 lis r9,0
/**
* POSIX 1003.1b 5.6.4 - Change File Modes
*/
int fchmod( int fd, mode_t mode )
{
ffc24ef0: 94 21 ff e8 stwu r1,-24(r1)
ffc24ef4: 7c 08 02 a6 mflr r0
int rv;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
ffc24ef8: 81 29 33 d8 lwz r9,13272(r9)
/**
* POSIX 1003.1b 5.6.4 - Change File Modes
*/
int fchmod( int fd, mode_t mode )
{
ffc24efc: 90 01 00 1c stw r0,28(r1)
int rv;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
ffc24f00: 7f 83 48 40 cmplw cr7,r3,r9
/**
* POSIX 1003.1b 5.6.4 - Change File Modes
*/
int fchmod( int fd, mode_t mode )
{
ffc24f04: bf c1 00 10 stmw r30,16(r1)
int rv;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
ffc24f08: 41 bc 00 08 blt+ cr7,ffc24f10 <fchmod+0x24>
ffc24f0c: 48 00 00 20 b ffc24f2c <fchmod+0x40>
iop = rtems_libio_iop( fd );
ffc24f10: 3d 20 00 00 lis r9,0
ffc24f14: 83 e9 34 c8 lwz r31,13512(r9)
ffc24f18: 1c 63 00 38 mulli r3,r3,56
ffc24f1c: 7f ff 1a 14 add r31,r31,r3
rtems_libio_check_is_open(iop);
ffc24f20: 81 3f 00 10 lwz r9,16(r31)
ffc24f24: 71 2a 01 00 andi. r10,r9,256
ffc24f28: 40 a2 00 10 bne+ ffc24f38 <fchmod+0x4c>
ffc24f2c: 48 01 34 dd bl ffc38408 <__errno>
ffc24f30: 39 20 00 09 li r9,9
ffc24f34: 48 00 00 68 b ffc24f9c <fchmod+0xb0>
if (iop->pathinfo.mt_entry->writeable) {
ffc24f38: 80 7f 00 28 lwz r3,40(r31)
ffc24f3c: 89 23 00 29 lbz r9,41(r3)
ffc24f40: 2f 89 00 00 cmpwi cr7,r9,0
ffc24f44: 41 9e 00 50 beq- cr7,ffc24f94 <fchmod+0xa8> <== 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 );
ffc24f48: 81 23 00 0c lwz r9,12(r3)
ffc24f4c: 81 29 00 00 lwz r9,0(r9)
ffc24f50: 90 81 00 08 stw r4,8(r1)
ffc24f54: 7d 29 03 a6 mtctr r9
ffc24f58: 4e 80 04 21 bctrl
rtems_filesystem_instance_lock( &iop->pathinfo );
rv = (*iop->pathinfo.mt_entry->ops->fchmod_h)( &iop->pathinfo, mode );
ffc24f5c: 81 3f 00 28 lwz r9,40(r31)
ffc24f60: 38 7f 00 14 addi r3,r31,20
ffc24f64: 80 81 00 08 lwz r4,8(r1)
ffc24f68: 81 29 00 0c lwz r9,12(r9)
ffc24f6c: 81 29 00 20 lwz r9,32(r9)
ffc24f70: 7d 29 03 a6 mtctr r9
ffc24f74: 4e 80 04 21 bctrl
ffc24f78: 7c 7e 1b 78 mr r30,r3
errno = EROFS;
rv = -1;
}
return rv;
}
ffc24f7c: 80 7f 00 28 lwz r3,40(r31)
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 );
ffc24f80: 81 23 00 0c lwz r9,12(r3)
ffc24f84: 81 29 00 04 lwz r9,4(r9)
ffc24f88: 7d 29 03 a6 mtctr r9
ffc24f8c: 4e 80 04 21 bctrl
ffc24f90: 48 00 00 14 b ffc24fa4 <fchmod+0xb8>
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;
ffc24f94: 48 01 34 75 bl ffc38408 <__errno> <== NOT EXECUTED
ffc24f98: 39 20 00 1e li r9,30 <== NOT EXECUTED
ffc24f9c: 91 23 00 00 stw r9,0(r3)
rv = -1;
ffc24fa0: 3b c0 ff ff li r30,-1
}
return rv;
}
ffc24fa4: 39 61 00 18 addi r11,r1,24
ffc24fa8: 7f c3 f3 78 mr r3,r30
ffc24fac: 48 02 f5 5c b ffc54508 <_restgpr_30_x>
ffc24fb0 <fchown>:
int fchown( int fd, uid_t owner, gid_t group )
{
int rv = 0;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
ffc24fb0: 3d 20 00 00 lis r9,0
/**
* POSIX 1003.1b 5.6.5 - Change Owner and Group of a File
*/
int fchown( int fd, uid_t owner, gid_t group )
{
ffc24fb4: 94 21 ff e8 stwu r1,-24(r1)
ffc24fb8: 7c 08 02 a6 mflr r0
int rv = 0;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
ffc24fbc: 81 29 33 d8 lwz r9,13272(r9)
/**
* POSIX 1003.1b 5.6.5 - Change Owner and Group of a File
*/
int fchown( int fd, uid_t owner, gid_t group )
{
ffc24fc0: 90 01 00 1c stw r0,28(r1)
int rv = 0;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
ffc24fc4: 7f 83 48 40 cmplw cr7,r3,r9
/**
* POSIX 1003.1b 5.6.5 - Change Owner and Group of a File
*/
int fchown( int fd, uid_t owner, gid_t group )
{
ffc24fc8: bf c1 00 10 stmw r30,16(r1)
int rv = 0;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
ffc24fcc: 41 bc 00 08 blt+ cr7,ffc24fd4 <fchown+0x24>
ffc24fd0: 48 00 00 20 b ffc24ff0 <fchown+0x40>
iop = rtems_libio_iop( fd );
ffc24fd4: 3d 20 00 00 lis r9,0
ffc24fd8: 83 e9 34 c8 lwz r31,13512(r9)
ffc24fdc: 1c 63 00 38 mulli r3,r3,56
ffc24fe0: 7f ff 1a 14 add r31,r31,r3
rtems_libio_check_is_open(iop);
ffc24fe4: 81 3f 00 10 lwz r9,16(r31)
ffc24fe8: 71 2a 01 00 andi. r10,r9,256
ffc24fec: 40 a2 00 10 bne+ ffc24ffc <fchown+0x4c>
ffc24ff0: 48 01 34 19 bl ffc38408 <__errno>
ffc24ff4: 39 20 00 09 li r9,9
ffc24ff8: 48 00 00 70 b ffc25068 <fchown+0xb8>
if (iop->pathinfo.mt_entry->writeable) {
ffc24ffc: 80 7f 00 28 lwz r3,40(r31)
ffc25000: 89 23 00 29 lbz r9,41(r3)
ffc25004: 2f 89 00 00 cmpwi cr7,r9,0
ffc25008: 41 9e 00 58 beq- cr7,ffc25060 <fchown+0xb0> <== 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 );
ffc2500c: 81 23 00 0c lwz r9,12(r3)
ffc25010: 81 29 00 00 lwz r9,0(r9)
ffc25014: 90 81 00 08 stw r4,8(r1)
ffc25018: 7d 29 03 a6 mtctr r9
ffc2501c: 90 a1 00 0c stw r5,12(r1)
ffc25020: 4e 80 04 21 bctrl
rtems_filesystem_instance_lock( &iop->pathinfo );
rv = (*iop->pathinfo.mt_entry->ops->chown_h)(
ffc25024: 81 3f 00 28 lwz r9,40(r31)
ffc25028: 38 7f 00 14 addi r3,r31,20
ffc2502c: 80 81 00 08 lwz r4,8(r1)
ffc25030: 81 29 00 0c lwz r9,12(r9)
ffc25034: 80 a1 00 0c lwz r5,12(r1)
ffc25038: 81 29 00 24 lwz r9,36(r9)
ffc2503c: 7d 29 03 a6 mtctr r9
ffc25040: 4e 80 04 21 bctrl
ffc25044: 7c 7e 1b 78 mr r30,r3
errno = EROFS;
rv = -1;
}
return rv;
}
ffc25048: 80 7f 00 28 lwz r3,40(r31)
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 );
ffc2504c: 81 23 00 0c lwz r9,12(r3)
ffc25050: 81 29 00 04 lwz r9,4(r9)
ffc25054: 7d 29 03 a6 mtctr r9
ffc25058: 4e 80 04 21 bctrl
ffc2505c: 48 00 00 14 b ffc25070 <fchown+0xc0>
owner,
group
);
rtems_filesystem_instance_unlock( &iop->pathinfo );
} else {
errno = EROFS;
ffc25060: 48 01 33 a9 bl ffc38408 <__errno> <== NOT EXECUTED
ffc25064: 39 20 00 1e li r9,30 <== NOT EXECUTED
ffc25068: 91 23 00 00 stw r9,0(r3)
rv = -1;
ffc2506c: 3b c0 ff ff li r30,-1
}
return rv;
}
ffc25070: 39 61 00 18 addi r11,r1,24
ffc25074: 7f c3 f3 78 mr r3,r30
ffc25078: 48 02 f4 90 b ffc54508 <_restgpr_30_x>
ffc31d68 <fcntl>:
int fcntl(
int fd,
int cmd,
...
)
{
ffc31d68: 94 21 ff c0 stwu r1,-64(r1)
int ret;
va_list ap;
va_start( ap, cmd );
ffc31d6c: 39 20 00 02 li r9,2
int fcntl(
int fd,
int cmd,
...
)
{
ffc31d70: 7c 08 02 a6 mflr r0
int ret;
va_list ap;
va_start( ap, cmd );
ffc31d74: 99 21 00 08 stb r9,8(r1)
ffc31d78: 39 21 00 48 addi r9,r1,72
ffc31d7c: 91 21 00 0c stw r9,12(r1)
ffc31d80: 39 21 00 10 addi r9,r1,16
ffc31d84: 91 21 00 10 stw r9,16(r1)
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
ffc31d88: 3d 20 00 00 lis r9,0
ffc31d8c: 81 29 27 b8 lwz r9,10168(r9)
int fcntl(
int fd,
int cmd,
...
)
{
ffc31d90: 90 01 00 44 stw r0,68(r1)
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
ffc31d94: 7f 83 48 40 cmplw cr7,r3,r9
int fcntl(
int fd,
int cmd,
...
)
{
ffc31d98: bf 61 00 2c stmw r27,44(r1)
ffc31d9c: 90 a1 00 18 stw r5,24(r1)
ffc31da0: 90 c1 00 1c stw r6,28(r1)
ffc31da4: 90 e1 00 20 stw r7,32(r1)
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
ffc31da8: 41 bc 00 08 blt+ cr7,ffc31db0 <fcntl+0x48>
ffc31dac: 48 00 00 20 b ffc31dcc <fcntl+0x64>
iop = rtems_libio_iop( fd );
ffc31db0: 3d 20 00 00 lis r9,0
ffc31db4: 1c 63 00 38 mulli r3,r3,56
ffc31db8: 83 c9 28 68 lwz r30,10344(r9)
ffc31dbc: 7f de 1a 14 add r30,r30,r3
rtems_libio_check_is_open(iop);
ffc31dc0: 80 7e 00 10 lwz r3,16(r30)
ffc31dc4: 70 69 01 00 andi. r9,r3,256
ffc31dc8: 40 a2 00 10 bne+ ffc31dd8 <fcntl+0x70>
ffc31dcc: 4b ff 02 1d bl ffc21fe8 <__errno>
ffc31dd0: 39 20 00 09 li r9,9
ffc31dd4: 48 00 01 d4 b ffc31fa8 <fcntl+0x240>
/*
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
ffc31dd8: 2b 84 00 09 cmplwi cr7,r4,9
ffc31ddc: 7c 9c 23 78 mr r28,r4
ffc31de0: 41 9d 01 c0 bgt- cr7,ffc31fa0 <fcntl+0x238>
ffc31de4: 3d 20 ff c4 lis r9,-60
ffc31de8: 39 29 84 f8 addi r9,r9,-31496
ffc31dec: 54 8a 10 3a rlwinm r10,r4,2,0,29
ffc31df0: 7d 49 50 2e lwzx r10,r9,r10
ffc31df4: 7d 2a 4a 14 add r9,r10,r9
ffc31df8: 7d 29 03 a6 mtctr r9
ffc31dfc: 4e 80 04 20 bctr
case F_DUPFD: /* dup */
fd2 = va_arg( ap, int );
ffc31e00: 89 21 00 08 lbz r9,8(r1)
ffc31e04: 2b 89 00 07 cmplwi cr7,r9,7
ffc31e08: 41 9d 00 10 bgt- cr7,ffc31e18 <fcntl+0xb0> <== NEVER TAKEN
ffc31e0c: 39 29 00 01 addi r9,r9,1
ffc31e10: 99 21 00 08 stb r9,8(r1)
ffc31e14: 48 00 00 10 b ffc31e24 <fcntl+0xbc>
ffc31e18: 81 21 00 0c lwz r9,12(r1) <== NOT EXECUTED
ffc31e1c: 39 29 00 04 addi r9,r9,4 <== NOT EXECUTED
ffc31e20: 91 21 00 0c stw r9,12(r1) <== NOT EXECUTED
/*
* FIXME: We ignore the start value fd2 for the file descriptor search. This
* is not POSIX conform.
*/
rtems_libio_t *diop = rtems_libio_allocate();
ffc31e24: 4b fd 71 11 bl ffc08f34 <rtems_libio_allocate>
if (diop != NULL) {
ffc31e28: 7c 7d 1b 79 mr. r29,r3
ffc31e2c: 41 82 01 b4 beq- ffc31fe0 <fcntl+0x278>
int oflag = rtems_libio_to_fcntl_flags( iop->flags );
ffc31e30: 80 7e 00 10 lwz r3,16(r30)
ffc31e34: 4b fd 70 b5 bl ffc08ee8 <rtems_libio_to_fcntl_flags>
oflag &= ~O_CREAT;
diop->flags |= rtems_libio_fcntl_flags( oflag );
ffc31e38: 83 7d 00 10 lwz r27,16(r29)
rtems_libio_t *diop = rtems_libio_allocate();
if (diop != NULL) {
int oflag = rtems_libio_to_fcntl_flags( iop->flags );
oflag &= ~O_CREAT;
ffc31e3c: 54 7f 05 ea rlwinm r31,r3,0,23,21
diop->flags |= rtems_libio_fcntl_flags( oflag );
ffc31e40: 7f e3 fb 78 mr r3,r31
ffc31e44: 4b fd 70 61 bl ffc08ea4 <rtems_libio_fcntl_flags>
ffc31e48: 7c 63 db 78 or r3,r3,r27
ffc31e4c: 90 7d 00 10 stw r3,16(r29)
int cmd,
int arg
)
{
return fcntl( fd, cmd, arg );
}
ffc31e50: 80 7e 00 28 lwz r3,40(r30)
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 );
ffc31e54: 81 23 00 0c lwz r9,12(r3)
ffc31e58: 81 29 00 00 lwz r9,0(r9)
ffc31e5c: 7d 29 03 a6 mtctr r9
ffc31e60: 4e 80 04 21 bctrl
oflag &= ~O_CREAT;
diop->flags |= rtems_libio_fcntl_flags( oflag );
rtems_filesystem_instance_lock( &iop->pathinfo );
rtems_filesystem_location_clone( &diop->pathinfo, &iop->pathinfo );
ffc31e64: 38 9e 00 14 addi r4,r30,20
ffc31e68: 38 7d 00 14 addi r3,r29,20
ffc31e6c: 4b fe 5c 4d bl ffc17ab8 <rtems_filesystem_location_clone>
int cmd,
int arg
)
{
return fcntl( fd, cmd, arg );
}
ffc31e70: 80 7e 00 28 lwz r3,40(r30)
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 );
ffc31e74: 81 23 00 0c lwz r9,12(r3)
ffc31e78: 81 29 00 04 lwz r9,4(r9)
ffc31e7c: 7d 29 03 a6 mtctr r9
ffc31e80: 4e 80 04 21 bctrl
/*
* 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 );
ffc31e84: 81 3d 00 24 lwz r9,36(r29)
ffc31e88: 7f e5 fb 78 mr r5,r31
ffc31e8c: 81 29 00 00 lwz r9,0(r9)
ffc31e90: 7f a3 eb 78 mr r3,r29
ffc31e94: 38 80 00 00 li r4,0
ffc31e98: 38 c0 00 00 li r6,0
ffc31e9c: 7d 29 03 a6 mtctr r9
ffc31ea0: 4e 80 04 21 bctrl
if ( rv == 0 ) {
ffc31ea4: 7c 7f 1b 79 mr. r31,r3
ffc31ea8: 40 82 00 24 bne- ffc31ecc <fcntl+0x164> <== NEVER TAKEN
rv = diop - rtems_libio_iops;
ffc31eac: 3d 20 00 00 lis r9,0
ffc31eb0: 83 e9 28 68 lwz r31,10344(r9)
ffc31eb4: 3d 20 b6 db lis r9,-18725
ffc31eb8: 61 29 6d b7 ori r9,r9,28087
ffc31ebc: 7f ff e8 50 subf r31,r31,r29
ffc31ec0: 7f ff 1e 70 srawi r31,r31,3
ffc31ec4: 7f ff 49 d6 mullw r31,r31,r9
ffc31ec8: 48 00 00 e8 b ffc31fb0 <fcntl+0x248>
} else {
rtems_libio_free( diop );
ffc31ecc: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED
ffc31ed0: 4b fd 70 d5 bl ffc08fa4 <rtems_libio_free> <== NOT EXECUTED
ffc31ed4: 48 00 00 dc b ffc31fb0 <fcntl+0x248> <== 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);
ffc31ed8: 54 7f af fe rlwinm r31,r3,21,31,31
ffc31edc: 48 00 00 dc b ffc31fb8 <fcntl+0x250>
* 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 ) )
ffc31ee0: 89 41 00 08 lbz r10,8(r1)
ffc31ee4: 2b 8a 00 07 cmplwi cr7,r10,7
ffc31ee8: 41 9d 00 1c bgt- cr7,ffc31f04 <fcntl+0x19c> <== NEVER TAKEN
ffc31eec: 81 21 00 10 lwz r9,16(r1)
ffc31ef0: 55 48 10 3a rlwinm r8,r10,2,0,29
ffc31ef4: 39 4a 00 01 addi r10,r10,1
ffc31ef8: 7d 29 42 14 add r9,r9,r8
ffc31efc: 99 41 00 08 stb r10,8(r1)
ffc31f00: 48 00 00 10 b ffc31f10 <fcntl+0x1a8>
ffc31f04: 81 21 00 0c lwz r9,12(r1) <== NOT EXECUTED
ffc31f08: 39 49 00 04 addi r10,r9,4 <== NOT EXECUTED
ffc31f0c: 91 41 00 0c stw r10,12(r1) <== NOT EXECUTED
ffc31f10: 81 29 00 00 lwz r9,0(r9)
ffc31f14: 2f 89 00 00 cmpwi cr7,r9,0
ffc31f18: 41 9e 00 0c beq- cr7,ffc31f24 <fcntl+0x1bc>
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
ffc31f1c: 60 63 08 00 ori r3,r3,2048
ffc31f20: 48 00 00 08 b ffc31f28 <fcntl+0x1c0>
else
iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
ffc31f24: 54 63 05 66 rlwinm r3,r3,0,21,19
ffc31f28: 90 7e 00 10 stw r3,16(r30)
ffc31f2c: 48 00 00 60 b ffc31f8c <fcntl+0x224>
break;
case F_GETFL: /* more flags (cloexec) */
ret = rtems_libio_to_fcntl_flags( iop->flags );
ffc31f30: 4b fd 6f b9 bl ffc08ee8 <rtems_libio_to_fcntl_flags>
ffc31f34: 7c 7f 1b 78 mr r31,r3
ffc31f38: 48 00 00 78 b ffc31fb0 <fcntl+0x248>
break;
case F_SETFL:
flags = rtems_libio_fcntl_flags( va_arg( ap, int ) );
ffc31f3c: 89 41 00 08 lbz r10,8(r1)
ffc31f40: 2b 8a 00 07 cmplwi cr7,r10,7
ffc31f44: 41 9d 00 1c bgt- cr7,ffc31f60 <fcntl+0x1f8> <== NEVER TAKEN
ffc31f48: 81 21 00 10 lwz r9,16(r1)
ffc31f4c: 55 48 10 3a rlwinm r8,r10,2,0,29
ffc31f50: 39 4a 00 01 addi r10,r10,1
ffc31f54: 7d 29 42 14 add r9,r9,r8
ffc31f58: 99 41 00 08 stb r10,8(r1)
ffc31f5c: 48 00 00 10 b ffc31f6c <fcntl+0x204>
ffc31f60: 81 21 00 0c lwz r9,12(r1) <== NOT EXECUTED
ffc31f64: 39 49 00 04 addi r10,r9,4 <== NOT EXECUTED
ffc31f68: 91 41 00 0c stw r10,12(r1) <== NOT EXECUTED
ffc31f6c: 80 69 00 00 lwz r3,0(r9)
ffc31f70: 4b fd 6f 35 bl ffc08ea4 <rtems_libio_fcntl_flags>
/*
* XXX If we are turning on append, should we seek to the end?
*/
iop->flags = (iop->flags & ~mask) | (flags & mask);
ffc31f74: 81 3e 00 10 lwz r9,16(r30)
ffc31f78: 70 63 02 01 andi. r3,r3,513
ffc31f7c: 39 40 fd fe li r10,-514
ffc31f80: 7d 49 48 38 and r9,r10,r9
ffc31f84: 7c 69 4b 78 or r9,r3,r9
ffc31f88: 91 3e 00 10 stw r9,16(r30)
{
rtems_libio_t *iop;
int fd2;
int flags;
int mask;
int ret = 0;
ffc31f8c: 3b e0 00 00 li r31,0
ffc31f90: 48 00 00 28 b ffc31fb8 <fcntl+0x250>
errno = ENOTSUP;
ret = -1;
break;
case F_GETOWN: /* for sockets. */
errno = ENOTSUP;
ffc31f94: 4b ff 00 55 bl ffc21fe8 <__errno>
ffc31f98: 39 20 00 86 li r9,134
ffc31f9c: 48 00 00 0c b ffc31fa8 <fcntl+0x240>
ret = -1;
break;
default:
errno = EINVAL;
ffc31fa0: 4b ff 00 49 bl ffc21fe8 <__errno>
ffc31fa4: 39 20 00 16 li r9,22
ffc31fa8: 91 23 00 00 stw r9,0(r3)
ffc31fac: 48 00 00 34 b ffc31fe0 <fcntl+0x278>
/*
* If we got this far successfully, then we give the optional
* filesystem specific handler a chance to process this.
*/
if (ret >= 0) {
ffc31fb0: 2f 9f 00 00 cmpwi cr7,r31,0
ffc31fb4: 41 9c 00 30 blt- cr7,ffc31fe4 <fcntl+0x27c> <== NEVER TAKEN
int err = (*iop->pathinfo.handlers->fcntl_h)( iop, cmd );
ffc31fb8: 81 3e 00 24 lwz r9,36(r30)
ffc31fbc: 7f c3 f3 78 mr r3,r30
ffc31fc0: 7f 84 e3 78 mr r4,r28
ffc31fc4: 81 29 00 28 lwz r9,40(r9)
ffc31fc8: 7d 29 03 a6 mtctr r9
ffc31fcc: 4e 80 04 21 bctrl
if (err) {
ffc31fd0: 7c 7e 1b 79 mr. r30,r3
ffc31fd4: 41 a2 00 10 beq+ ffc31fe4 <fcntl+0x27c> <== ALWAYS TAKEN
errno = err;
ffc31fd8: 4b ff 00 11 bl ffc21fe8 <__errno> <== NOT EXECUTED
ffc31fdc: 93 c3 00 00 stw r30,0(r3) <== NOT EXECUTED
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
ffc31fe0: 3b e0 ff ff li r31,-1
va_list ap;
va_start( ap, cmd );
ret = vfcntl(fd,cmd,ap);
va_end(ap);
return ret;
}
ffc31fe4: 39 61 00 40 addi r11,r1,64
ffc31fe8: 7f e3 fb 78 mr r3,r31
ffc31fec: 4b fc f5 70 b ffc0155c <_restgpr_27_x>
ffc0eadc <fifo_open>:
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
ffc0eadc: 94 21 ff d0 stwu r1,-48(r1)
ffc0eae0: 7c 08 02 a6 mflr r0
ffc0eae4: bf 61 00 1c stmw r27,28(r1)
static int pipe_lock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (pipe_semaphore == RTEMS_ID_NONE) {
ffc0eae8: 3f e0 00 00 lis r31,0
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
ffc0eaec: 7c 7d 1b 78 mr r29,r3
static int pipe_lock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (pipe_semaphore == RTEMS_ID_NONE) {
ffc0eaf0: 81 3f 2a 1c lwz r9,10780(r31)
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
ffc0eaf4: 7c 9c 23 78 mr r28,r4
ffc0eaf8: 90 01 00 34 stw r0,52(r1)
static int pipe_lock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (pipe_semaphore == RTEMS_ID_NONE) {
ffc0eafc: 3b df 2a 1c addi r30,r31,10780
ffc0eb00: 2f 89 00 00 cmpwi cr7,r9,0
ffc0eb04: 41 9e 00 24 beq- cr7,ffc0eb28 <fifo_open+0x4c>
rtems_libio_unlock();
}
if (sc == RTEMS_SUCCESSFUL) {
sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
ffc0eb08: 3d 20 00 00 lis r9,0
ffc0eb0c: 80 69 2a 1c lwz r3,10780(r9)
ffc0eb10: 38 80 00 00 li r4,0
ffc0eb14: 38 a0 00 00 li r5,0
ffc0eb18: 4b ff b4 4d bl ffc09f64 <rtems_semaphore_obtain>
}
if (sc == RTEMS_SUCCESSFUL) {
ffc0eb1c: 2f 83 00 00 cmpwi cr7,r3,0
ffc0eb20: 41 be 03 b0 beq+ cr7,ffc0eed0 <fifo_open+0x3f4> <== ALWAYS TAKEN
ffc0eb24: 48 00 00 5c b ffc0eb80 <fifo_open+0xa4> <== NOT EXECUTED
*/
#include <rtems/userenv.h>
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
ffc0eb28: 3d 20 00 00 lis r9,0
ffc0eb2c: 80 69 28 30 lwz r3,10288(r9)
ffc0eb30: 38 80 00 00 li r4,0
ffc0eb34: 38 a0 00 00 li r5,0
ffc0eb38: 4b ff b4 2d bl ffc09f64 <rtems_semaphore_obtain>
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (pipe_semaphore == RTEMS_ID_NONE) {
rtems_libio_lock();
if (pipe_semaphore == RTEMS_ID_NONE) {
ffc0eb3c: 81 3f 2a 1c lwz r9,10780(r31)
free(pipe);
}
static int pipe_lock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
ffc0eb40: 3b e0 00 00 li r31,0
if (pipe_semaphore == RTEMS_ID_NONE) {
rtems_libio_lock();
if (pipe_semaphore == RTEMS_ID_NONE) {
ffc0eb44: 2f 89 00 00 cmpwi cr7,r9,0
ffc0eb48: 40 be 00 24 bne+ cr7,ffc0eb6c <fifo_open+0x90> <== NEVER TAKEN
sc = rtems_semaphore_create(
ffc0eb4c: 3c 60 50 49 lis r3,20553
ffc0eb50: 60 63 50 45 ori r3,r3,20549
ffc0eb54: 38 80 00 01 li r4,1
ffc0eb58: 38 a0 00 54 li r5,84
ffc0eb5c: 38 c0 00 00 li r6,0
ffc0eb60: 7f c7 f3 78 mr r7,r30
ffc0eb64: 4b ff b1 7d bl ffc09ce0 <rtems_semaphore_create>
ffc0eb68: 7c 7f 1b 78 mr r31,r3
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
ffc0eb6c: 3d 20 00 00 lis r9,0
ffc0eb70: 80 69 28 30 lwz r3,10288(r9)
ffc0eb74: 4b ff b5 15 bl ffc0a088 <rtems_semaphore_release>
}
rtems_libio_unlock();
}
if (sc == RTEMS_SUCCESSFUL) {
ffc0eb78: 2f 9f 00 00 cmpwi cr7,r31,0
ffc0eb7c: 41 be ff 8c beq- cr7,ffc0eb08 <fifo_open+0x2c>
}
if (sc == RTEMS_SUCCESSFUL) {
return 0;
} else {
return -ENOMEM;
ffc0eb80: 3b c0 ff f4 li r30,-12
ffc0eb84: 48 00 03 70 b ffc0eef4 <fifo_open+0x418>
{
static char c = 'a';
pipe_control_t *pipe;
int err = -ENOMEM;
pipe = malloc(sizeof(pipe_control_t));
ffc0eb88: 38 60 00 34 li r3,52
ffc0eb8c: 4b ff 6f 09 bl ffc05a94 <malloc>
if (pipe == NULL)
ffc0eb90: 7c 7f 1b 79 mr. r31,r3
ffc0eb94: 41 82 03 4c beq- ffc0eee0 <fifo_open+0x404> <== NEVER TAKEN
return err;
memset(pipe, 0, sizeof(pipe_control_t));
ffc0eb98: 38 80 00 00 li r4,0
ffc0eb9c: 38 a0 00 34 li r5,52
ffc0eba0: 48 00 4d 8d bl ffc1392c <memset>
pipe->Size = PIPE_BUF;
ffc0eba4: 39 20 02 00 li r9,512
ffc0eba8: 91 3f 00 04 stw r9,4(r31)
pipe->Buffer = malloc(pipe->Size);
ffc0ebac: 38 60 02 00 li r3,512
ffc0ebb0: 4b ff 6e e5 bl ffc05a94 <malloc>
if (! pipe->Buffer)
ffc0ebb4: 2f 83 00 00 cmpwi cr7,r3,0
if (pipe == NULL)
return err;
memset(pipe, 0, sizeof(pipe_control_t));
pipe->Size = PIPE_BUF;
pipe->Buffer = malloc(pipe->Size);
ffc0ebb8: 90 7f 00 00 stw r3,0(r31)
if (! pipe->Buffer)
ffc0ebbc: 41 9e 00 ec beq- cr7,ffc0eca8 <fifo_open+0x1cc> <== NEVER TAKEN
goto err_buf;
err = -ENOMEM;
if (rtems_barrier_create(
rtems_build_name ('P', 'I', 'r', c),
ffc0ebc0: 3f c0 00 00 lis r30,0
ffc0ebc4: 88 7e 22 14 lbz r3,8724(r30)
if (! pipe->Buffer)
goto err_buf;
err = -ENOMEM;
if (rtems_barrier_create(
ffc0ebc8: 38 80 00 00 li r4,0
ffc0ebcc: 38 a0 00 00 li r5,0
ffc0ebd0: 64 63 50 49 oris r3,r3,20553
ffc0ebd4: 60 63 72 00 ori r3,r3,29184
ffc0ebd8: 38 df 00 2c addi r6,r31,44
ffc0ebdc: 48 00 18 25 bl ffc10400 <rtems_barrier_create>
ffc0ebe0: 2f 83 00 00 cmpwi cr7,r3,0
ffc0ebe4: 40 9e 00 bc bne- cr7,ffc0eca0 <fifo_open+0x1c4>
rtems_build_name ('P', 'I', 'r', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->readBarrier) != RTEMS_SUCCESSFUL)
goto err_rbar;
if (rtems_barrier_create(
rtems_build_name ('P', 'I', 'w', c),
ffc0ebe8: 88 7e 22 14 lbz r3,8724(r30)
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(
ffc0ebec: 38 80 00 00 li r4,0
ffc0ebf0: 38 a0 00 00 li r5,0
ffc0ebf4: 64 63 50 49 oris r3,r3,20553
ffc0ebf8: 60 63 77 00 ori r3,r3,30464
ffc0ebfc: 38 df 00 30 addi r6,r31,48
ffc0ec00: 48 00 18 01 bl ffc10400 <rtems_barrier_create>
ffc0ec04: 2f 83 00 00 cmpwi cr7,r3,0
ffc0ec08: 40 9e 00 90 bne- cr7,ffc0ec98 <fifo_open+0x1bc>
rtems_build_name ('P', 'I', 'w', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->writeBarrier) != RTEMS_SUCCESSFUL)
goto err_wbar;
if (rtems_semaphore_create(
rtems_build_name ('P', 'I', 's', c), 1,
ffc0ec0c: 88 7e 22 14 lbz r3,8724(r30)
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(
ffc0ec10: 38 80 00 01 li r4,1
ffc0ec14: 38 a0 00 10 li r5,16
ffc0ec18: 64 63 50 49 oris r3,r3,20553
ffc0ec1c: 60 63 73 00 ori r3,r3,29440
ffc0ec20: 38 c0 00 00 li r6,0
ffc0ec24: 38 ff 00 28 addi r7,r31,40
ffc0ec28: 4b ff b0 b9 bl ffc09ce0 <rtems_semaphore_create>
ffc0ec2c: 2f 83 00 00 cmpwi cr7,r3,0
ffc0ec30: 40 9e 00 60 bne- cr7,ffc0ec90 <fifo_open+0x1b4>
RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Barrier_Control *)
ffc0ec34: 3f 60 00 00 lis r27,0
ffc0ec38: 80 9f 00 2c lwz r4,44(r31)
ffc0ec3c: 3b 7b 35 9c addi r27,r27,13724
ffc0ec40: 38 a1 00 08 addi r5,r1,8
ffc0ec44: 7f 63 db 78 mr r3,r27
ffc0ec48: 4b ff cd e9 bl ffc0ba30 <_Objects_Get>
static void pipe_interruptible(pipe_control_t *pipe)
{
Objects_Locations location;
_Barrier_Get(pipe->readBarrier, &location)->Barrier.Wait_queue.state
|= STATES_INTERRUPTIBLE_BY_SIGNAL;
ffc0ec4c: 81 23 00 4c lwz r9,76(r3)
ffc0ec50: 65 29 10 00 oris r9,r9,4096
ffc0ec54: 91 23 00 4c stw r9,76(r3)
_Thread_Enable_dispatch();
ffc0ec58: 4b ff dc 2d bl ffc0c884 <_Thread_Enable_dispatch>
ffc0ec5c: 80 9f 00 30 lwz r4,48(r31)
ffc0ec60: 38 a1 00 08 addi r5,r1,8
ffc0ec64: 7f 63 db 78 mr r3,r27
ffc0ec68: 4b ff cd c9 bl ffc0ba30 <_Objects_Get>
_Barrier_Get(pipe->writeBarrier, &location)->Barrier.Wait_queue.state
|= STATES_INTERRUPTIBLE_BY_SIGNAL;
ffc0ec6c: 81 23 00 4c lwz r9,76(r3)
ffc0ec70: 65 29 10 00 oris r9,r9,4096
ffc0ec74: 91 23 00 4c stw r9,76(r3)
_Thread_Enable_dispatch();
ffc0ec78: 4b ff dc 0d bl ffc0c884 <_Thread_Enable_dispatch>
#ifdef RTEMS_POSIX_API
pipe_interruptible(pipe);
#endif
*pipep = pipe;
if (c ++ == 'z')
ffc0ec7c: 89 3e 22 14 lbz r9,8724(r30)
ffc0ec80: 2f 89 00 7a cmpwi cr7,r9,122
ffc0ec84: 40 be 02 64 bne+ cr7,ffc0eee8 <fifo_open+0x40c>
c = 'a';
ffc0ec88: 39 20 00 61 li r9,97
ffc0ec8c: 48 00 02 60 b ffc0eeec <fifo_open+0x410>
return 0;
err_sem:
rtems_barrier_delete(pipe->writeBarrier);
ffc0ec90: 80 7f 00 30 lwz r3,48(r31)
ffc0ec94: 48 00 18 39 bl ffc104cc <rtems_barrier_delete>
err_wbar:
rtems_barrier_delete(pipe->readBarrier);
ffc0ec98: 80 7f 00 2c lwz r3,44(r31)
ffc0ec9c: 48 00 18 31 bl ffc104cc <rtems_barrier_delete>
err_rbar:
free(pipe->Buffer);
ffc0eca0: 80 7f 00 00 lwz r3,0(r31)
ffc0eca4: 4b ff 69 29 bl ffc055cc <free>
err_buf:
free(pipe);
ffc0eca8: 7f e3 fb 78 mr r3,r31
ffc0ecac: 4b ff 69 21 bl ffc055cc <free>
ffc0ecb0: 48 00 02 30 b ffc0eee0 <fifo_open+0x404>
err = pipe_alloc(&pipe);
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
ffc0ecb4: 80 7f 00 28 lwz r3,40(r31)
ffc0ecb8: 38 80 00 00 li r4,0
ffc0ecbc: 38 a0 00 00 li r5,0
ffc0ecc0: 4b ff b2 a5 bl ffc09f64 <rtems_semaphore_obtain>
err = -EINTR;
ffc0ecc4: 3b c0 ff fc li r30,-4
err = pipe_alloc(&pipe);
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
ffc0ecc8: 2f 83 00 00 cmpwi cr7,r3,0
ffc0eccc: 40 9e 00 08 bne- cr7,ffc0ecd4 <fifo_open+0x1f8> <== NEVER TAKEN
ffc0ecd0: 3b c0 00 00 li r30,0
err = -EINTR;
if (*pipep == NULL) {
ffc0ecd4: 81 3d 00 00 lwz r9,0(r29)
ffc0ecd8: 2f 89 00 00 cmpwi cr7,r9,0
ffc0ecdc: 40 be 00 1c bne+ cr7,ffc0ecf8 <fifo_open+0x21c>
if (err)
ffc0ece0: 2f 9e 00 00 cmpwi cr7,r30,0
ffc0ece4: 41 be 00 10 beq+ cr7,ffc0ecf4 <fifo_open+0x218> <== ALWAYS TAKEN
pipe_free(pipe);
ffc0ece8: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc0ecec: 4b ff fc e5 bl ffc0e9d0 <pipe_free> <== NOT EXECUTED
ffc0ecf0: 48 00 00 08 b ffc0ecf8 <fifo_open+0x21c> <== NOT EXECUTED
else
*pipep = pipe;
ffc0ecf4: 93 fd 00 00 stw r31,0(r29)
#ifdef RTEMS_DEBUG
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc =
#endif
rtems_semaphore_release(pipe_semaphore);
ffc0ecf8: 3d 20 00 00 lis r9,0
ffc0ecfc: 80 69 2a 1c lwz r3,10780(r9)
ffc0ed00: 4b ff b3 89 bl ffc0a088 <rtems_semaphore_release>
pipe_control_t *pipe;
unsigned int prevCounter;
int err;
err = pipe_new(pipep);
if (err)
ffc0ed04: 2f 9e 00 00 cmpwi cr7,r30,0
ffc0ed08: 40 9e 01 ec bne- cr7,ffc0eef4 <fifo_open+0x418>
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
ffc0ed0c: 81 3c 00 10 lwz r9,16(r28)
int err;
err = pipe_new(pipep);
if (err)
return err;
pipe = *pipep;
ffc0ed10: 83 fd 00 00 lwz r31,0(r29)
switch (LIBIO_ACCMODE(iop)) {
ffc0ed14: 55 29 07 7c rlwinm r9,r9,0,29,30
ffc0ed18: 2f 89 00 04 cmpwi cr7,r9,4
ffc0ed1c: 41 9e 00 a0 beq- cr7,ffc0edbc <fifo_open+0x2e0>
ffc0ed20: 2f 89 00 06 cmpwi cr7,r9,6
ffc0ed24: 41 9e 01 34 beq- cr7,ffc0ee58 <fifo_open+0x37c>
ffc0ed28: 2f 89 00 02 cmpwi cr7,r9,2
ffc0ed2c: 40 be 01 84 bne+ cr7,ffc0eeb0 <fifo_open+0x3d4> <== NEVER TAKEN
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
ffc0ed30: 81 3f 00 20 lwz r9,32(r31)
ffc0ed34: 39 29 00 01 addi r9,r9,1
ffc0ed38: 91 3f 00 20 stw r9,32(r31)
if (pipe->Readers ++ == 0)
ffc0ed3c: 81 3f 00 10 lwz r9,16(r31)
ffc0ed40: 2f 89 00 00 cmpwi cr7,r9,0
ffc0ed44: 39 49 00 01 addi r10,r9,1
ffc0ed48: 91 5f 00 10 stw r10,16(r31)
ffc0ed4c: 40 be 00 10 bne+ cr7,ffc0ed5c <fifo_open+0x280> <== NEVER TAKEN
PIPE_WAKEUPWRITERS(pipe);
ffc0ed50: 80 7f 00 30 lwz r3,48(r31)
ffc0ed54: 38 81 00 0c addi r4,r1,12
ffc0ed58: 48 00 18 15 bl ffc1056c <rtems_barrier_release>
if (pipe->Writers == 0) {
ffc0ed5c: 81 3f 00 14 lwz r9,20(r31)
ffc0ed60: 2f 89 00 00 cmpwi cr7,r9,0
ffc0ed64: 40 9e 01 4c bne- cr7,ffc0eeb0 <fifo_open+0x3d4>
/* Not an error */
if (LIBIO_NODELAY(iop))
ffc0ed68: 81 3c 00 10 lwz r9,16(r28)
ffc0ed6c: 71 2a 00 01 andi. r10,r9,1
ffc0ed70: 40 82 01 40 bne- ffc0eeb0 <fifo_open+0x3d4>
break;
prevCounter = pipe->writerCounter;
ffc0ed74: 83 7f 00 24 lwz r27,36(r31)
err = -EINTR;
/* Wait until a writer opens the pipe */
do {
PIPE_UNLOCK(pipe);
ffc0ed78: 80 7f 00 28 lwz r3,40(r31)
ffc0ed7c: 4b ff b3 0d bl ffc0a088 <rtems_semaphore_release>
if (! PIPE_READWAIT(pipe))
ffc0ed80: 80 7f 00 2c lwz r3,44(r31)
ffc0ed84: 38 80 00 00 li r4,0
ffc0ed88: 48 00 18 55 bl ffc105dc <rtems_barrier_wait>
ffc0ed8c: 2f 83 00 00 cmpwi cr7,r3,0
ffc0ed90: 40 9e 01 2c bne- cr7,ffc0eebc <fifo_open+0x3e0> <== NEVER TAKEN
goto out_error;
if (! PIPE_LOCK(pipe))
ffc0ed94: 80 7f 00 28 lwz r3,40(r31)
ffc0ed98: 38 80 00 00 li r4,0
ffc0ed9c: 38 a0 00 00 li r5,0
ffc0eda0: 4b ff b1 c5 bl ffc09f64 <rtems_semaphore_obtain>
ffc0eda4: 2f 83 00 00 cmpwi cr7,r3,0
ffc0eda8: 40 9e 01 14 bne- cr7,ffc0eebc <fifo_open+0x3e0> <== NEVER TAKEN
goto out_error;
} while (prevCounter == pipe->writerCounter);
ffc0edac: 81 3f 00 24 lwz r9,36(r31)
ffc0edb0: 7f 9b 48 00 cmpw cr7,r27,r9
ffc0edb4: 41 9e ff c4 beq+ cr7,ffc0ed78 <fifo_open+0x29c> <== NEVER TAKEN
ffc0edb8: 48 00 00 f8 b ffc0eeb0 <fifo_open+0x3d4>
}
break;
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
ffc0edbc: 81 3f 00 24 lwz r9,36(r31)
ffc0edc0: 39 29 00 01 addi r9,r9,1
ffc0edc4: 91 3f 00 24 stw r9,36(r31)
if (pipe->Writers ++ == 0)
ffc0edc8: 81 3f 00 14 lwz r9,20(r31)
ffc0edcc: 2f 89 00 00 cmpwi cr7,r9,0
ffc0edd0: 39 49 00 01 addi r10,r9,1
ffc0edd4: 91 5f 00 14 stw r10,20(r31)
ffc0edd8: 40 be 00 10 bne+ cr7,ffc0ede8 <fifo_open+0x30c> <== NEVER TAKEN
PIPE_WAKEUPREADERS(pipe);
ffc0eddc: 80 7f 00 2c lwz r3,44(r31)
ffc0ede0: 38 81 00 0c addi r4,r1,12
ffc0ede4: 48 00 17 89 bl ffc1056c <rtems_barrier_release>
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
ffc0ede8: 81 3f 00 10 lwz r9,16(r31)
ffc0edec: 2f 89 00 00 cmpwi cr7,r9,0
ffc0edf0: 40 9e 00 c0 bne- cr7,ffc0eeb0 <fifo_open+0x3d4>
ffc0edf4: 81 3c 00 10 lwz r9,16(r28)
ffc0edf8: 71 2a 00 01 andi. r10,r9,1
ffc0edfc: 41 a2 00 14 beq+ ffc0ee10 <fifo_open+0x334>
PIPE_UNLOCK(pipe);
ffc0ee00: 80 7f 00 28 lwz r3,40(r31)
err = -ENXIO;
ffc0ee04: 3b c0 ff fa li r30,-6
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
PIPE_UNLOCK(pipe);
ffc0ee08: 4b ff b2 81 bl ffc0a088 <rtems_semaphore_release>
err = -ENXIO;
goto out_error;
ffc0ee0c: 48 00 00 b4 b ffc0eec0 <fifo_open+0x3e4>
}
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
ffc0ee10: 83 7f 00 20 lwz r27,32(r31)
err = -EINTR;
do {
PIPE_UNLOCK(pipe);
ffc0ee14: 80 7f 00 28 lwz r3,40(r31)
ffc0ee18: 4b ff b2 71 bl ffc0a088 <rtems_semaphore_release>
if (! PIPE_WRITEWAIT(pipe))
ffc0ee1c: 80 7f 00 30 lwz r3,48(r31)
ffc0ee20: 38 80 00 00 li r4,0
ffc0ee24: 48 00 17 b9 bl ffc105dc <rtems_barrier_wait>
ffc0ee28: 2f 83 00 00 cmpwi cr7,r3,0
ffc0ee2c: 40 9e 00 90 bne- cr7,ffc0eebc <fifo_open+0x3e0> <== NEVER TAKEN
goto out_error;
if (! PIPE_LOCK(pipe))
ffc0ee30: 80 7f 00 28 lwz r3,40(r31)
ffc0ee34: 38 80 00 00 li r4,0
ffc0ee38: 38 a0 00 00 li r5,0
ffc0ee3c: 4b ff b1 29 bl ffc09f64 <rtems_semaphore_obtain>
ffc0ee40: 2f 83 00 00 cmpwi cr7,r3,0
ffc0ee44: 40 9e 00 78 bne- cr7,ffc0eebc <fifo_open+0x3e0> <== NEVER TAKEN
goto out_error;
} while (prevCounter == pipe->readerCounter);
ffc0ee48: 81 3f 00 20 lwz r9,32(r31)
ffc0ee4c: 7f 9b 48 00 cmpw cr7,r27,r9
ffc0ee50: 41 9e ff c4 beq+ cr7,ffc0ee14 <fifo_open+0x338> <== NEVER TAKEN
ffc0ee54: 48 00 00 5c b ffc0eeb0 <fifo_open+0x3d4>
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
ffc0ee58: 81 3f 00 20 lwz r9,32(r31)
ffc0ee5c: 39 29 00 01 addi r9,r9,1
ffc0ee60: 91 3f 00 20 stw r9,32(r31)
if (pipe->Readers ++ == 0)
ffc0ee64: 81 3f 00 10 lwz r9,16(r31)
ffc0ee68: 2f 89 00 00 cmpwi cr7,r9,0
ffc0ee6c: 39 49 00 01 addi r10,r9,1
ffc0ee70: 91 5f 00 10 stw r10,16(r31)
ffc0ee74: 40 be 00 10 bne+ cr7,ffc0ee84 <fifo_open+0x3a8> <== NEVER TAKEN
PIPE_WAKEUPWRITERS(pipe);
ffc0ee78: 80 7f 00 30 lwz r3,48(r31)
ffc0ee7c: 38 81 00 0c addi r4,r1,12
ffc0ee80: 48 00 16 ed bl ffc1056c <rtems_barrier_release>
pipe->writerCounter ++;
ffc0ee84: 81 3f 00 24 lwz r9,36(r31)
ffc0ee88: 39 29 00 01 addi r9,r9,1
ffc0ee8c: 91 3f 00 24 stw r9,36(r31)
if (pipe->Writers ++ == 0)
ffc0ee90: 81 3f 00 14 lwz r9,20(r31)
ffc0ee94: 2f 89 00 00 cmpwi cr7,r9,0
ffc0ee98: 39 49 00 01 addi r10,r9,1
ffc0ee9c: 91 5f 00 14 stw r10,20(r31)
ffc0eea0: 40 be 00 10 bne+ cr7,ffc0eeb0 <fifo_open+0x3d4> <== NEVER TAKEN
PIPE_WAKEUPREADERS(pipe);
ffc0eea4: 80 7f 00 2c lwz r3,44(r31)
ffc0eea8: 38 81 00 0c addi r4,r1,12
ffc0eeac: 48 00 16 c1 bl ffc1056c <rtems_barrier_release>
break;
}
PIPE_UNLOCK(pipe);
ffc0eeb0: 80 7f 00 28 lwz r3,40(r31)
ffc0eeb4: 4b ff b1 d5 bl ffc0a088 <rtems_semaphore_release>
return 0;
ffc0eeb8: 48 00 00 3c b ffc0eef4 <fifo_open+0x418>
/* Not an error */
if (LIBIO_NODELAY(iop))
break;
prevCounter = pipe->writerCounter;
err = -EINTR;
ffc0eebc: 3b c0 ff fc li r30,-4 <== NOT EXECUTED
PIPE_UNLOCK(pipe);
return 0;
out_error:
pipe_release(pipep, iop);
ffc0eec0: 7f a3 eb 78 mr r3,r29
ffc0eec4: 7f 84 e3 78 mr r4,r28
ffc0eec8: 4b ff fb 59 bl ffc0ea20 <pipe_release>
return err;
ffc0eecc: 48 00 00 28 b ffc0eef4 <fifo_open+0x418>
err = pipe_lock();
if (err)
return err;
pipe = *pipep;
ffc0eed0: 83 fd 00 00 lwz r31,0(r29)
if (pipe == NULL) {
ffc0eed4: 2f 9f 00 00 cmpwi cr7,r31,0
ffc0eed8: 40 9e fd dc bne+ cr7,ffc0ecb4 <fifo_open+0x1d8>
ffc0eedc: 4b ff fc ac b ffc0eb88 <fifo_open+0xac>
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
err = -EINTR;
ffc0eee0: 3b c0 ff f4 li r30,-12
ffc0eee4: 4b ff fe 14 b ffc0ecf8 <fifo_open+0x21c>
#ifdef RTEMS_POSIX_API
pipe_interruptible(pipe);
#endif
*pipep = pipe;
if (c ++ == 'z')
ffc0eee8: 39 29 00 01 addi r9,r9,1
ffc0eeec: 99 3e 22 14 stb r9,8724(r30)
ffc0eef0: 4b ff fd c4 b ffc0ecb4 <fifo_open+0x1d8>
return 0;
out_error:
pipe_release(pipep, iop);
return err;
}
ffc0eef4: 39 61 00 30 addi r11,r1,48
ffc0eef8: 7f c3 f3 78 mr r3,r30
ffc0eefc: 48 01 1c 14 b ffc20b10 <_restgpr_27_x>
ffc0ace0 <fpathconf>:
{
long return_value;
rtems_libio_t *iop;
const rtems_filesystem_limits_and_options_t *the_limits;
rtems_libio_check_fd(fd);
ffc0ace0: 3d 20 00 00 lis r9,0
*/
long fpathconf(
int fd,
int name
)
{
ffc0ace4: 94 21 ff f8 stwu r1,-8(r1)
ffc0ace8: 7c 08 02 a6 mflr r0
long return_value;
rtems_libio_t *iop;
const rtems_filesystem_limits_and_options_t *the_limits;
rtems_libio_check_fd(fd);
ffc0acec: 81 29 27 3c lwz r9,10044(r9)
*/
long fpathconf(
int fd,
int name
)
{
ffc0acf0: 90 01 00 0c stw r0,12(r1)
long return_value;
rtems_libio_t *iop;
const rtems_filesystem_limits_and_options_t *the_limits;
rtems_libio_check_fd(fd);
ffc0acf4: 7f 83 48 40 cmplw cr7,r3,r9
ffc0acf8: 41 bc 00 08 blt+ cr7,ffc0ad00 <fpathconf+0x20>
ffc0acfc: 48 00 00 20 b ffc0ad1c <fpathconf+0x3c>
iop = rtems_libio_iop(fd);
ffc0ad00: 3d 20 00 00 lis r9,0
ffc0ad04: 81 29 27 ec lwz r9,10220(r9)
ffc0ad08: 1c 63 00 38 mulli r3,r3,56
ffc0ad0c: 7c 69 1a 14 add r3,r9,r3
rtems_libio_check_is_open(iop);
ffc0ad10: 81 23 00 10 lwz r9,16(r3)
ffc0ad14: 71 2a 01 00 andi. r10,r9,256
ffc0ad18: 40 a2 00 10 bne+ ffc0ad28 <fpathconf+0x48> <== ALWAYS TAKEN
ffc0ad1c: 48 00 24 91 bl ffc0d1ac <__errno>
ffc0ad20: 39 20 00 09 li r9,9
ffc0ad24: 48 00 00 98 b ffc0adbc <fpathconf+0xdc>
* Now process the information request.
*/
the_limits = iop->pathinfo.mt_entry->pathconf_limits_and_options;
switch ( name ) {
ffc0ad28: 2b 84 00 0b cmplwi cr7,r4,11
/*
* Now process the information request.
*/
the_limits = iop->pathinfo.mt_entry->pathconf_limits_and_options;
ffc0ad2c: 81 23 00 28 lwz r9,40(r3)
ffc0ad30: 81 29 00 2c lwz r9,44(r9)
switch ( name ) {
ffc0ad34: 41 9d 00 80 bgt- cr7,ffc0adb4 <fpathconf+0xd4>
ffc0ad38: 3d 40 ff c1 lis r10,-63
ffc0ad3c: 39 4a 3c d0 addi r10,r10,15568
ffc0ad40: 54 84 10 3a rlwinm r4,r4,2,0,29
ffc0ad44: 7d 0a 20 2e lwzx r8,r10,r4
ffc0ad48: 7d 48 52 14 add r10,r8,r10
ffc0ad4c: 7d 49 03 a6 mtctr r10
ffc0ad50: 4e 80 04 20 bctr
case _PC_LINK_MAX:
return_value = the_limits->link_max;
ffc0ad54: 80 69 00 00 lwz r3,0(r9)
break;
ffc0ad58: 48 00 00 6c b ffc0adc4 <fpathconf+0xe4>
case _PC_MAX_CANON:
return_value = the_limits->max_canon;
ffc0ad5c: 80 69 00 04 lwz r3,4(r9)
break;
ffc0ad60: 48 00 00 64 b ffc0adc4 <fpathconf+0xe4>
case _PC_MAX_INPUT:
return_value = the_limits->max_input;
ffc0ad64: 80 69 00 08 lwz r3,8(r9)
break;
ffc0ad68: 48 00 00 5c b ffc0adc4 <fpathconf+0xe4>
case _PC_NAME_MAX:
return_value = the_limits->name_max;
ffc0ad6c: 80 69 00 0c lwz r3,12(r9)
break;
ffc0ad70: 48 00 00 54 b ffc0adc4 <fpathconf+0xe4>
case _PC_PATH_MAX:
return_value = the_limits->path_max;
ffc0ad74: 80 69 00 10 lwz r3,16(r9)
break;
ffc0ad78: 48 00 00 4c b ffc0adc4 <fpathconf+0xe4>
case _PC_PIPE_BUF:
return_value = the_limits->pipe_buf;
ffc0ad7c: 80 69 00 14 lwz r3,20(r9)
break;
ffc0ad80: 48 00 00 44 b ffc0adc4 <fpathconf+0xe4>
case _PC_CHOWN_RESTRICTED:
return_value = the_limits->posix_chown_restrictions;
ffc0ad84: 80 69 00 1c lwz r3,28(r9)
break;
ffc0ad88: 48 00 00 3c b ffc0adc4 <fpathconf+0xe4>
case _PC_NO_TRUNC:
return_value = the_limits->posix_no_trunc;
ffc0ad8c: 80 69 00 20 lwz r3,32(r9)
break;
ffc0ad90: 48 00 00 34 b ffc0adc4 <fpathconf+0xe4>
case _PC_VDISABLE:
return_value = the_limits->posix_vdisable;
ffc0ad94: 80 69 00 2c lwz r3,44(r9)
break;
ffc0ad98: 48 00 00 2c b ffc0adc4 <fpathconf+0xe4>
case _PC_ASYNC_IO:
return_value = the_limits->posix_async_io;
ffc0ad9c: 80 69 00 18 lwz r3,24(r9)
break;
ffc0ada0: 48 00 00 24 b ffc0adc4 <fpathconf+0xe4>
case _PC_PRIO_IO:
return_value = the_limits->posix_prio_io;
ffc0ada4: 80 69 00 24 lwz r3,36(r9)
break;
ffc0ada8: 48 00 00 1c b ffc0adc4 <fpathconf+0xe4>
case _PC_SYNC_IO:
return_value = the_limits->posix_sync_io;
ffc0adac: 80 69 00 28 lwz r3,40(r9)
break;
ffc0adb0: 48 00 00 14 b ffc0adc4 <fpathconf+0xe4>
default:
rtems_set_errno_and_return_minus_one( EINVAL );
ffc0adb4: 48 00 23 f9 bl ffc0d1ac <__errno>
ffc0adb8: 39 20 00 16 li r9,22
ffc0adbc: 91 23 00 00 stw r9,0(r3)
ffc0adc0: 38 60 ff ff li r3,-1
break;
}
return return_value;
}
ffc0adc4: 80 01 00 0c lwz r0,12(r1)
ffc0adc8: 38 21 00 08 addi r1,r1,8
ffc0adcc: 7c 08 03 a6 mtlr r0
ffc0add0: 4e 80 00 20 blr
ffc0455c <free>:
#include <stdlib.h>
void free(
void *ptr
)
{
ffc0455c: 94 21 ff f0 stwu r1,-16(r1)
ffc04560: 7c 08 02 a6 mflr r0
MSBUMP(free_calls, 1);
ffc04564: 3d 20 00 00 lis r9,0
#include <stdlib.h>
void free(
void *ptr
)
{
ffc04568: 90 01 00 14 stw r0,20(r1)
MSBUMP(free_calls, 1);
ffc0456c: 39 29 2b 98 addi r9,r9,11160
#include <stdlib.h>
void free(
void *ptr
)
{
ffc04570: bf c1 00 08 stmw r30,8(r1)
MSBUMP(free_calls, 1);
if ( !ptr )
ffc04574: 7c 7f 1b 79 mr. r31,r3
void free(
void *ptr
)
{
MSBUMP(free_calls, 1);
ffc04578: 81 49 00 0c lwz r10,12(r9)
ffc0457c: 39 4a 00 01 addi r10,r10,1
ffc04580: 91 49 00 0c stw r10,12(r9)
if ( !ptr )
ffc04584: 41 82 00 a0 beq- ffc04624 <free+0xc8>
return;
/*
* Do not attempt to free memory if in a critical section or ISR.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
ffc04588: 3d 20 00 00 lis r9,0
ffc0458c: 81 29 28 90 lwz r9,10384(r9)
ffc04590: 2f 89 00 03 cmpwi cr7,r9,3
ffc04594: 40 be 00 28 bne+ cr7,ffc045bc <free+0x60> <== NEVER TAKEN
!malloc_is_system_state_OK() ) {
ffc04598: 48 00 02 15 bl ffc047ac <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()) &&
ffc0459c: 2f 83 00 00 cmpwi cr7,r3,0
ffc045a0: 40 be 00 1c bne+ cr7,ffc045bc <free+0x60>
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
);
}
}
ffc045a4: 80 01 00 14 lwz r0,20(r1)
/*
* 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);
ffc045a8: 7f e3 fb 78 mr r3,r31
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
);
}
}
ffc045ac: bb c1 00 08 lmw r30,8(r1)
ffc045b0: 7c 08 03 a6 mtlr r0
ffc045b4: 38 21 00 10 addi r1,r1,16
/*
* 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);
ffc045b8: 48 00 02 5c b ffc04814 <malloc_deferred_free>
}
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
ffc045bc: 3d 20 00 00 lis r9,0
ffc045c0: 81 29 28 08 lwz r9,10248(r9)
ffc045c4: 2f 89 00 00 cmpwi cr7,r9,0
ffc045c8: 41 9e 00 14 beq- cr7,ffc045dc <free+0x80>
(*rtems_malloc_statistics_helpers->at_free)(ptr);
ffc045cc: 81 29 00 08 lwz r9,8(r9)
ffc045d0: 7f e3 fb 78 mr r3,r31
ffc045d4: 7d 29 03 a6 mtctr r9
ffc045d8: 4e 80 04 21 bctrl
if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) {
ffc045dc: 3f c0 00 00 lis r30,0
ffc045e0: 80 7e 27 90 lwz r3,10128(r30)
ffc045e4: 7f e4 fb 78 mr r4,r31
ffc045e8: 48 00 60 95 bl ffc0a67c <_Protected_heap_Free>
ffc045ec: 2f 83 00 00 cmpwi cr7,r3,0
ffc045f0: 40 be 00 34 bne+ cr7,ffc04624 <free+0xc8>
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
);
}
}
ffc045f4: 80 01 00 14 lwz r0,20(r1)
*/
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",
ffc045f8: 3c 60 ff c2 lis r3,-62
ptr,
RTEMS_Malloc_Heap->area_begin,
ffc045fc: 81 3e 27 90 lwz r9,10128(r30)
*/
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",
ffc04600: 7f e4 fb 78 mr r4,r31
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
);
}
}
ffc04604: 7c 08 03 a6 mtlr r0
ffc04608: bb c1 00 08 lmw r30,8(r1)
*/
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",
ffc0460c: 80 a9 00 18 lwz r5,24(r9)
ffc04610: 38 63 d0 90 addi r3,r3,-12144
ffc04614: 80 c9 00 1c lwz r6,28(r9)
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
);
}
}
ffc04618: 38 21 00 10 addi r1,r1,16
*/
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",
ffc0461c: 4c c6 31 82 crclr 4*cr1+eq
ffc04620: 48 00 0d fc b ffc0541c <printk>
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
);
}
}
ffc04624: 39 61 00 10 addi r11,r1,16
ffc04628: 4b ff bf 98 b ffc005c0 <_restgpr_30_x>
ffc1b178 <fstat>:
int fstat(
int fd,
struct stat *sbuf
)
{
ffc1b178: 94 21 ff f0 stwu r1,-16(r1)
ffc1b17c: 7c 08 02 a6 mflr r0
ffc1b180: bf c1 00 08 stmw r30,8(r1)
rtems_libio_t *iop;
/*
* Check to see if we were passed a valid pointer.
*/
if ( !sbuf )
ffc1b184: 7c 9e 23 79 mr. r30,r4
int fstat(
int fd,
struct stat *sbuf
)
{
ffc1b188: 90 01 00 14 stw r0,20(r1)
rtems_libio_t *iop;
/*
* Check to see if we were passed a valid pointer.
*/
if ( !sbuf )
ffc1b18c: 40 a2 00 10 bne+ ffc1b19c <fstat+0x24> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EFAULT );
ffc1b190: 4b ff 54 1d bl ffc105ac <__errno> <== NOT EXECUTED
ffc1b194: 39 20 00 0e li r9,14 <== NOT EXECUTED
ffc1b198: 48 00 00 38 b ffc1b1d0 <fstat+0x58> <== NOT EXECUTED
/*
* Now process the stat() request.
*/
iop = rtems_libio_iop( fd );
ffc1b19c: 3d 20 00 00 lis r9,0
ffc1b1a0: 81 29 27 98 lwz r9,10136(r9)
ffc1b1a4: 7f 83 48 40 cmplw cr7,r3,r9
ffc1b1a8: 40 9c 00 20 bge- cr7,ffc1b1c8 <fstat+0x50>
ffc1b1ac: 3d 20 00 00 lis r9,0
ffc1b1b0: 83 e9 28 4c lwz r31,10316(r9)
ffc1b1b4: 1c 63 00 38 mulli r3,r3,56
ffc1b1b8: 7f ff 1a 14 add r31,r31,r3
rtems_libio_check_fd( fd );
rtems_libio_check_is_open(iop);
ffc1b1bc: 81 3f 00 10 lwz r9,16(r31)
ffc1b1c0: 71 2a 01 00 andi. r10,r9,256
ffc1b1c4: 40 a2 00 14 bne+ ffc1b1d8 <fstat+0x60>
ffc1b1c8: 4b ff 53 e5 bl ffc105ac <__errno>
ffc1b1cc: 39 20 00 09 li r9,9
ffc1b1d0: 91 23 00 00 stw r9,0(r3)
ffc1b1d4: 48 00 00 3c b ffc1b210 <fstat+0x98>
/*
* Zero out the stat structure so the various support
* versions of stat don't have to.
*/
memset( sbuf, 0, sizeof(struct stat) );
ffc1b1d8: 7f c3 f3 78 mr r3,r30
ffc1b1dc: 38 80 00 00 li r4,0
ffc1b1e0: 38 a0 00 48 li r5,72
ffc1b1e4: 4b ff 61 c1 bl ffc113a4 <memset>
return (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf );
ffc1b1e8: 81 3f 00 24 lwz r9,36(r31)
}
ffc1b1ec: 80 01 00 14 lwz r0,20(r1)
* 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 );
ffc1b1f0: 38 7f 00 14 addi r3,r31,20
ffc1b1f4: 81 29 00 18 lwz r9,24(r9)
ffc1b1f8: 7f c4 f3 78 mr r4,r30
}
ffc1b1fc: 7c 08 03 a6 mtlr r0
ffc1b200: bb c1 00 08 lmw r30,8(r1)
* 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 );
ffc1b204: 7d 29 03 a6 mtctr r9
}
ffc1b208: 38 21 00 10 addi r1,r1,16
* 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 );
ffc1b20c: 4e 80 04 20 bctr
}
ffc1b210: 39 61 00 10 addi r11,r1,16
ffc1b214: 38 60 ff ff li r3,-1
ffc1b218: 4b fe 53 a8 b ffc005c0 <_restgpr_30_x>
ffc04124 <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) {
ffc04124: 3d 20 00 00 lis r9,0
ffc04128: 39 49 28 e0 addi r10,r9,10464
ffc0412c: 81 29 28 e0 lwz r9,10464(r9)
ffc04130: 7f 83 48 40 cmplw cr7,r3,r9
ffc04134: 40 9c 00 64 bge- cr7,ffc04198 <get_disk_entry+0x74> <== NEVER TAKEN
ffc04138: 81 2a 00 04 lwz r9,4(r10)
ffc0413c: 2f 89 00 00 cmpwi cr7,r9,0
ffc04140: 41 9e 00 58 beq- cr7,ffc04198 <get_disk_entry+0x74> <== NEVER TAKEN
rtems_disk_device_table *dtab = disktab + major;
ffc04144: 54 63 18 38 rlwinm r3,r3,3,0,28
ffc04148: 7d 49 1a 14 add r10,r9,r3
if (minor < dtab->size && dtab->minor != NULL) {
ffc0414c: 81 4a 00 04 lwz r10,4(r10)
ffc04150: 7f 84 50 40 cmplw cr7,r4,r10
ffc04154: 40 9c 00 44 bge- cr7,ffc04198 <get_disk_entry+0x74> <== NEVER TAKEN
ffc04158: 7d 29 18 2e lwzx r9,r9,r3
ffc0415c: 2f 89 00 00 cmpwi cr7,r9,0
ffc04160: 41 9e 00 38 beq- cr7,ffc04198 <get_disk_entry+0x74> <== NEVER TAKEN
rtems_disk_device *dd = dtab->minor [minor];
ffc04164: 54 84 10 3a rlwinm r4,r4,2,0,29
ffc04168: 7c 69 20 2e lwzx r3,r9,r4
if (dd != NULL && !lookup_only) {
ffc0416c: 2f 83 00 00 cmpwi cr7,r3,0
ffc04170: 4d 9e 00 20 beqlr cr7
ffc04174: 2f 85 00 00 cmpwi cr7,r5,0
ffc04178: 4c 9e 00 20 bnelr cr7
if (!dd->deleted) {
ffc0417c: 89 23 00 40 lbz r9,64(r3)
ffc04180: 2f 89 00 00 cmpwi cr7,r9,0
ffc04184: 40 9e 00 14 bne- cr7,ffc04198 <get_disk_entry+0x74>
++dd->uses;
ffc04188: 81 23 00 14 lwz r9,20(r3)
ffc0418c: 39 29 00 01 addi r9,r9,1
ffc04190: 91 23 00 14 stw r9,20(r3)
ffc04194: 4e 80 00 20 blr
return dd;
}
}
return NULL;
ffc04198: 38 60 00 00 li r3,0
}
ffc0419c: 4e 80 00 20 blr
ffc05790 <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,
ffc05790: 94 21 ff e8 stwu r1,-24(r1)
ffc05794: 7c 08 02 a6 mflr r0
ffc05798: bf 81 00 08 stmw r28,8(r1)
ffc0579c: 7c 7c 1b 78 mr r28,r3
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);
ffc057a0: 38 60 02 04 li r3,516
* 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,
ffc057a4: 90 01 00 1c stw r0,28(r1)
ffc057a8: 7c 9d 23 78 mr r29,r4
ffc057ac: 7c be 2b 78 mr r30,r5
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);
ffc057b0: 48 00 16 45 bl ffc06df4 <malloc>
if (s == NULL)
ffc057b4: 7c 7f 1b 79 mr. r31,r3
ffc057b8: 41 82 00 3c beq- ffc057f4 <get_sector.part.0+0x64> <== NEVER TAKEN
{
return RTEMS_NO_MEMORY;
}
n = read(fd, s->data, RTEMS_IDE_SECTOR_SIZE);
ffc057bc: 7f 83 e3 78 mr r3,r28
ffc057c0: 38 9f 00 04 addi r4,r31,4
ffc057c4: 38 a0 02 00 li r5,512
ffc057c8: 48 00 21 3d bl ffc07904 <read>
if (n != RTEMS_IDE_SECTOR_SIZE)
ffc057cc: 2f 83 02 00 cmpwi cr7,r3,512
ffc057d0: 41 9e 00 14 beq- cr7,ffc057e4 <get_sector.part.0+0x54> <== ALWAYS TAKEN
{
free(s);
ffc057d4: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc057d8: 48 00 0f 55 bl ffc0672c <free> <== NOT EXECUTED
return RTEMS_IO_ERROR;
ffc057dc: 38 60 00 1b li r3,27 <== NOT EXECUTED
ffc057e0: 48 00 00 18 b ffc057f8 <get_sector.part.0+0x68> <== NOT EXECUTED
}
s->sector_num = sector_num;
ffc057e4: 93 bf 00 00 stw r29,0(r31)
*sector = s;
return RTEMS_SUCCESSFUL;
ffc057e8: 38 60 00 00 li r3,0
return RTEMS_IO_ERROR;
}
s->sector_num = sector_num;
*sector = s;
ffc057ec: 93 fe 00 00 stw r31,0(r30)
ffc057f0: 48 00 00 08 b ffc057f8 <get_sector.part.0+0x68>
}
s = (rtems_sector_data_t *) malloc(sizeof(rtems_sector_data_t) + RTEMS_IDE_SECTOR_SIZE);
if (s == NULL)
{
return RTEMS_NO_MEMORY;
ffc057f4: 38 60 00 1a li r3,26 <== NOT EXECUTED
s->sector_num = sector_num;
*sector = s;
return RTEMS_SUCCESSFUL;
}
ffc057f8: 39 61 00 18 addi r11,r1,24
ffc057fc: 4b ff af ec b ffc007e8 <_restgpr_28_x>
ffc3200c <getdents>:
rtems_filesystem_node_types_t type;
/*
* Get the file control block structure associated with the file descriptor
*/
iop = rtems_libio_iop( dd_fd );
ffc3200c: 3d 20 00 00 lis r9,0
int getdents(
int dd_fd,
char *dd_buf,
int dd_len
)
{
ffc32010: 7c 08 02 a6 mflr r0
rtems_filesystem_node_types_t type;
/*
* Get the file control block structure associated with the file descriptor
*/
iop = rtems_libio_iop( dd_fd );
ffc32014: 81 29 27 b8 lwz r9,10168(r9)
int getdents(
int dd_fd,
char *dd_buf,
int dd_len
)
{
ffc32018: 7c 2b 0b 78 mr r11,r1
ffc3201c: 94 21 ff e8 stwu r1,-24(r1)
rtems_filesystem_node_types_t type;
/*
* Get the file control block structure associated with the file descriptor
*/
iop = rtems_libio_iop( dd_fd );
ffc32020: 7f 83 48 40 cmplw cr7,r3,r9
int getdents(
int dd_fd,
char *dd_buf,
int dd_len
)
{
ffc32024: 4b fc f4 fd bl ffc01520 <_savegpr_31>
ffc32028: 90 01 00 1c stw r0,28(r1)
rtems_filesystem_node_types_t type;
/*
* Get the file control block structure associated with the file descriptor
*/
iop = rtems_libio_iop( dd_fd );
ffc3202c: 3b e0 00 00 li r31,0
ffc32030: 40 9c 00 14 bge- cr7,ffc32044 <getdents+0x38> <== NEVER TAKEN
ffc32034: 3d 20 00 00 lis r9,0
ffc32038: 1c 63 00 38 mulli r3,r3,56
ffc3203c: 83 e9 28 68 lwz r31,10344(r9)
ffc32040: 7f ff 1a 14 add r31,r31,r3
/*
* Make sure we are working on a directory
*/
type = rtems_filesystem_node_type( &iop->pathinfo );
ffc32044: 38 7f 00 14 addi r3,r31,20
ffc32048: 90 81 00 08 stw r4,8(r1)
ffc3204c: 90 a1 00 0c stw r5,12(r1)
ffc32050: 4b fd 8d 45 bl ffc0ad94 <rtems_filesystem_node_type>
if ( type != RTEMS_FILESYSTEM_DIRECTORY )
ffc32054: 2f 83 00 00 cmpwi cr7,r3,0
ffc32058: 80 81 00 08 lwz r4,8(r1)
ffc3205c: 80 a1 00 0c lwz r5,12(r1)
ffc32060: 40 9e 00 28 bne- cr7,ffc32088 <getdents+0x7c>
/*
* 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 );
ffc32064: 81 3f 00 24 lwz r9,36(r31)
ffc32068: 7f e3 fb 78 mr r3,r31
}
ffc3206c: 80 01 00 1c lwz r0,28(r1)
/*
* 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 );
ffc32070: 81 29 00 08 lwz r9,8(r9)
}
ffc32074: 7c 08 03 a6 mtlr r0
ffc32078: 83 e1 00 14 lwz r31,20(r1)
/*
* 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 );
ffc3207c: 7d 29 03 a6 mtctr r9
}
ffc32080: 38 21 00 18 addi r1,r1,24
/*
* 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 );
ffc32084: 4e 80 04 20 bctr
/*
* 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 );
ffc32088: 4b fe ff 61 bl ffc21fe8 <__errno>
ffc3208c: 39 20 00 14 li r9,20
ffc32090: 91 23 00 00 stw r9,0(r3)
/*
* 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 );
}
ffc32094: 39 61 00 18 addi r11,r1,24
ffc32098: 38 60 ff ff li r3,-1
ffc3209c: 4b fc f4 d0 b ffc0156c <_restgpr_31_x>
ffc25628 <init_etc_passwd_group>:
void init_etc_passwd_group(void)
{
FILE *fp;
static char etc_passwd_initted = 0;
if (etc_passwd_initted)
ffc25628: 3d 20 00 00 lis r9,0
ffc2562c: 89 49 5d 64 lbz r10,23908(r9)
ffc25630: 2f 8a 00 00 cmpwi cr7,r10,0
ffc25634: 4c be 00 20 bnelr+ cr7
/**
* Initialize useable but dummy databases
*/
void init_etc_passwd_group(void)
{
ffc25638: 7c 2b 0b 78 mr r11,r1
ffc2563c: 94 21 ff f0 stwu r1,-16(r1)
ffc25640: 7c 08 02 a6 mflr r0
static char etc_passwd_initted = 0;
if (etc_passwd_initted)
return;
etc_passwd_initted = 1;
mkdir("/etc", 0777);
ffc25644: 3c 60 ff c6 lis r3,-58
/**
* Initialize useable but dummy databases
*/
void init_etc_passwd_group(void)
{
ffc25648: 48 02 ee 79 bl ffc544c0 <_savegpr_31>
FILE *fp;
static char etc_passwd_initted = 0;
if (etc_passwd_initted)
return;
etc_passwd_initted = 1;
ffc2564c: 39 40 00 01 li r10,1
mkdir("/etc", 0777);
ffc25650: 38 80 01 ff li r4,511
/**
* Initialize useable but dummy databases
*/
void init_etc_passwd_group(void)
{
ffc25654: 90 01 00 14 stw r0,20(r1)
static char etc_passwd_initted = 0;
if (etc_passwd_initted)
return;
etc_passwd_initted = 1;
mkdir("/etc", 0777);
ffc25658: 38 63 b6 d0 addi r3,r3,-18736
/*
* Initialize /etc/passwd
*/
if ((fp = fopen("/etc/passwd", "r")) != NULL) {
ffc2565c: 3f e0 ff c6 lis r31,-58
FILE *fp;
static char etc_passwd_initted = 0;
if (etc_passwd_initted)
return;
etc_passwd_initted = 1;
ffc25660: 99 49 5d 64 stb r10,23908(r9)
mkdir("/etc", 0777);
/*
* Initialize /etc/passwd
*/
if ((fp = fopen("/etc/passwd", "r")) != NULL) {
ffc25664: 3b ff b6 d5 addi r31,r31,-18731
static char etc_passwd_initted = 0;
if (etc_passwd_initted)
return;
etc_passwd_initted = 1;
mkdir("/etc", 0777);
ffc25668: 4b fd ed ad bl ffc04414 <mkdir>
/*
* Initialize /etc/passwd
*/
if ((fp = fopen("/etc/passwd", "r")) != NULL) {
ffc2566c: 3c 80 ff c5 lis r4,-59
ffc25670: 7f e3 fb 78 mr r3,r31
ffc25674: 38 84 78 7c addi r4,r4,30844
ffc25678: 48 01 3b 35 bl ffc391ac <fopen>
ffc2567c: 2f 83 00 00 cmpwi cr7,r3,0
ffc25680: 41 9e 00 08 beq- cr7,ffc25688 <init_etc_passwd_group+0x60>
ffc25684: 48 00 00 30 b ffc256b4 <init_etc_passwd_group+0x8c>
fclose(fp);
}
else if ((fp = fopen("/etc/passwd", "w")) != NULL) {
ffc25688: 3c 80 ff c5 lis r4,-59
ffc2568c: 7f e3 fb 78 mr r3,r31
ffc25690: 38 84 78 79 addi r4,r4,30841
ffc25694: 48 01 3b 19 bl ffc391ac <fopen>
ffc25698: 7c 7f 1b 79 mr. r31,r3
ffc2569c: 41 82 00 1c beq- ffc256b8 <init_etc_passwd_group+0x90> <== NEVER TAKEN
fprintf(fp, "root:*:0:0:root::/:/bin/sh\n"
ffc256a0: 3c 60 ff c6 lis r3,-58
ffc256a4: 38 63 b6 e1 addi r3,r3,-18719
ffc256a8: 7f e4 fb 78 mr r4,r31
ffc256ac: 48 01 3d 91 bl ffc3943c <fputs>
"rtems:*:1:1:RTEMS Application::/:/bin/sh\n"
"tty:!:2:2:tty owner::/:/bin/false\n" );
fclose(fp);
ffc256b0: 7f e3 fb 78 mr r3,r31
ffc256b4: 48 01 2e e1 bl ffc38594 <fclose>
}
/*
* Initialize /etc/group
*/
if ((fp = fopen("/etc/group", "r")) != NULL) {
ffc256b8: 3f e0 ff c6 lis r31,-58
ffc256bc: 3b ff b7 48 addi r31,r31,-18616
ffc256c0: 3c 80 ff c5 lis r4,-59
ffc256c4: 7f e3 fb 78 mr r3,r31
ffc256c8: 38 84 78 7c addi r4,r4,30844
ffc256cc: 48 01 3a e1 bl ffc391ac <fopen>
ffc256d0: 2f 83 00 00 cmpwi cr7,r3,0
ffc256d4: 41 9e 00 08 beq- cr7,ffc256dc <init_etc_passwd_group+0xb4>
ffc256d8: 48 00 00 30 b ffc25708 <init_etc_passwd_group+0xe0>
fclose(fp);
}
else if ((fp = fopen("/etc/group", "w")) != NULL) {
ffc256dc: 3c 80 ff c5 lis r4,-59
ffc256e0: 7f e3 fb 78 mr r3,r31
ffc256e4: 38 84 78 79 addi r4,r4,30841
ffc256e8: 48 01 3a c5 bl ffc391ac <fopen>
ffc256ec: 7c 7f 1b 79 mr. r31,r3
ffc256f0: 41 82 00 2c beq- ffc2571c <init_etc_passwd_group+0xf4> <== NEVER TAKEN
fprintf( fp, "root:x:0:root\n"
ffc256f4: 3c 60 ff c6 lis r3,-58
ffc256f8: 38 63 b7 53 addi r3,r3,-18605
ffc256fc: 7f e4 fb 78 mr r4,r31
ffc25700: 48 01 3d 3d bl ffc3943c <fputs>
"rtems:x:1:rtems\n"
"tty:x:2:tty\n" );
fclose(fp);
ffc25704: 7f e3 fb 78 mr r3,r31
}
}
ffc25708: 80 01 00 14 lwz r0,20(r1)
ffc2570c: 83 e1 00 0c lwz r31,12(r1)
ffc25710: 7c 08 03 a6 mtlr r0
ffc25714: 38 21 00 10 addi r1,r1,16
}
else if ((fp = fopen("/etc/group", "w")) != NULL) {
fprintf( fp, "root:x:0:root\n"
"rtems:x:1:rtems\n"
"tty:x:2:tty\n" );
fclose(fp);
ffc25718: 48 01 2e 7c b ffc38594 <fclose>
}
}
ffc2571c: 39 61 00 10 addi r11,r1,16 <== NOT EXECUTED
ffc25720: 48 02 ed ec b ffc5450c <_restgpr_31_x> <== NOT EXECUTED
ffc07338 <iproc>:
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
ffc07338: 94 21 ff f0 stwu r1,-16(r1)
ffc0733c: 7c 08 02 a6 mflr r0
ffc07340: 90 01 00 14 stw r0,20(r1)
if (tty->termios.c_iflag & ISTRIP)
ffc07344: 81 24 00 30 lwz r9,48(r4)
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
ffc07348: bf c1 00 08 stmw r30,8(r1)
ffc0734c: 7c 7e 1b 78 mr r30,r3
if (tty->termios.c_iflag & ISTRIP)
ffc07350: 71 2a 00 20 andi. r10,r9,32
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
ffc07354: 7c 9f 23 78 mr r31,r4
if (tty->termios.c_iflag & ISTRIP)
ffc07358: 41 82 00 08 beq- ffc07360 <iproc+0x28> <== ALWAYS TAKEN
c &= 0x7f;
ffc0735c: 54 7e 06 7e clrlwi r30,r3,25 <== NOT EXECUTED
if (tty->termios.c_iflag & IUCLC)
ffc07360: 71 2a 02 00 andi. r10,r9,512
ffc07364: 41 82 00 28 beq- ffc0738c <iproc+0x54>
c = tolower (c);
ffc07368: 3d 40 00 00 lis r10,0
ffc0736c: 81 4a 27 e0 lwz r10,10208(r10)
ffc07370: 7d 4a f2 14 add r10,r10,r30
ffc07374: 89 4a 00 01 lbz r10,1(r10)
ffc07378: 55 4a 07 be clrlwi r10,r10,30
ffc0737c: 2f 8a 00 01 cmpwi cr7,r10,1
ffc07380: 40 be 00 08 bne+ cr7,ffc07388 <iproc+0x50>
ffc07384: 3b de 00 20 addi r30,r30,32
ffc07388: 57 de 06 3e clrlwi r30,r30,24
if (c == '\r') {
ffc0738c: 2f 9e 00 0d cmpwi cr7,r30,13
ffc07390: 40 be 00 20 bne+ cr7,ffc073b0 <iproc+0x78>
if (tty->termios.c_iflag & IGNCR)
ffc07394: 71 2a 00 80 andi. r10,r9,128
ffc07398: 41 a2 00 08 beq+ ffc073a0 <iproc+0x68> <== ALWAYS TAKEN
ffc0739c: 48 00 01 94 b ffc07530 <iproc+0x1f8> <== NOT EXECUTED
return 0;
if (tty->termios.c_iflag & ICRNL)
ffc073a0: 71 2a 01 00 andi. r10,r9,256
ffc073a4: 41 82 00 2c beq- ffc073d0 <iproc+0x98> <== NEVER TAKEN
c = '\n';
ffc073a8: 3b c0 00 0a li r30,10
ffc073ac: 48 00 00 24 b ffc073d0 <iproc+0x98>
} else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
ffc073b0: 2f 9e 00 0a cmpwi cr7,r30,10
ffc073b4: 40 be 00 14 bne+ cr7,ffc073c8 <iproc+0x90>
ffc073b8: 71 2a 00 40 andi. r10,r9,64
ffc073bc: 41 82 00 14 beq- ffc073d0 <iproc+0x98> <== ALWAYS TAKEN
c = '\r';
ffc073c0: 3b c0 00 0d li r30,13 <== NOT EXECUTED
ffc073c4: 48 00 00 0c b ffc073d0 <iproc+0x98> <== NOT EXECUTED
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
ffc073c8: 2f 9e 00 00 cmpwi cr7,r30,0
ffc073cc: 41 be 01 20 beq+ cr7,ffc074ec <iproc+0x1b4> <== NEVER TAKEN
ffc073d0: 81 3f 00 3c lwz r9,60(r31)
ffc073d4: 71 2a 00 02 andi. r10,r9,2
ffc073d8: 41 82 01 14 beq- ffc074ec <iproc+0x1b4>
if (c == tty->termios.c_cc[VERASE]) {
ffc073dc: 89 5f 00 43 lbz r10,67(r31)
ffc073e0: 7f 8a f0 00 cmpw cr7,r10,r30
ffc073e4: 40 be 00 1c bne+ cr7,ffc07400 <iproc+0xc8>
* FIXME: Some of the tests should check for IEXTEN, too.
*/
static void
erase (struct rtems_termios_tty *tty, int lineFlag)
{
if (tty->ccount == 0)
ffc073e8: 81 3f 00 20 lwz r9,32(r31)
ffc073ec: 2f 89 00 00 cmpwi cr7,r9,0
ffc073f0: 41 9e 01 40 beq- cr7,ffc07530 <iproc+0x1f8>
ffc073f4: 7f e3 fb 78 mr r3,r31
ffc073f8: 38 80 00 00 li r4,0
ffc073fc: 48 00 00 68 b ffc07464 <iproc+0x12c>
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]) {
ffc07400: 89 5f 00 44 lbz r10,68(r31)
ffc07404: 7f 8a f0 00 cmpw cr7,r10,r30
ffc07408: 40 be 00 64 bne+ cr7,ffc0746c <iproc+0x134>
* FIXME: Some of the tests should check for IEXTEN, too.
*/
static void
erase (struct rtems_termios_tty *tty, int lineFlag)
{
if (tty->ccount == 0)
ffc0740c: 81 5f 00 20 lwz r10,32(r31)
ffc07410: 2f 8a 00 00 cmpwi cr7,r10,0
ffc07414: 41 9e 01 1c beq- cr7,ffc07530 <iproc+0x1f8> <== NEVER TAKEN
return;
if (lineFlag) {
if (!(tty->termios.c_lflag & ECHO)) {
ffc07418: 71 2a 00 08 andi. r10,r9,8
ffc0741c: 40 a2 00 0c bne+ ffc07428 <iproc+0xf0> <== ALWAYS TAKEN
tty->ccount = 0;
ffc07420: 91 5f 00 20 stw r10,32(r31) <== NOT EXECUTED
ffc07424: 48 00 01 0c b ffc07530 <iproc+0x1f8> <== NOT EXECUTED
return;
}
if (!(tty->termios.c_lflag & ECHOE)) {
ffc07428: 71 2a 00 10 andi. r10,r9,16
ffc0742c: 7f e3 fb 78 mr r3,r31
ffc07430: 38 80 00 01 li r4,1
ffc07434: 40 a2 00 30 bne+ ffc07464 <iproc+0x12c> <== ALWAYS TAKEN
tty->ccount = 0;
ffc07438: 91 5f 00 20 stw r10,32(r31) <== NOT EXECUTED
echo (tty->termios.c_cc[VKILL], tty);
ffc0743c: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc07440: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED
ffc07444: 4b ff fc a1 bl ffc070e4 <echo> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOK)
ffc07448: 81 3f 00 3c lwz r9,60(r31) <== NOT EXECUTED
ffc0744c: 71 2a 00 20 andi. r10,r9,32 <== NOT EXECUTED
ffc07450: 41 a2 00 e0 beq+ ffc07530 <iproc+0x1f8> <== NOT EXECUTED
echo ('\n', tty);
ffc07454: 38 60 00 0a li r3,10 <== NOT EXECUTED
ffc07458: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED
ffc0745c: 4b ff fc 89 bl ffc070e4 <echo> <== NOT EXECUTED
ffc07460: 48 00 00 d0 b ffc07530 <iproc+0x1f8> <== NOT EXECUTED
ffc07464: 4b ff fd 11 bl ffc07174 <erase.part.2>
ffc07468: 48 00 00 c8 b ffc07530 <iproc+0x1f8>
}
else if (c == tty->termios.c_cc[VKILL]) {
erase (tty, 1);
return 0;
}
else if (c == tty->termios.c_cc[VEOF]) {
ffc0746c: 89 5f 00 45 lbz r10,69(r31)
ffc07470: 7f 8a f0 00 cmpw cr7,r10,r30
ffc07474: 41 9e 00 c4 beq- cr7,ffc07538 <iproc+0x200> <== NEVER TAKEN
return 1;
} else if (c == '\n') {
ffc07478: 2f 9e 00 0a cmpwi cr7,r30,10
ffc0747c: 40 be 00 2c bne+ cr7,ffc074a8 <iproc+0x170>
if (tty->termios.c_lflag & (ECHO | ECHONL))
ffc07480: 71 2a 00 48 andi. r10,r9,72
ffc07484: 41 a2 00 10 beq+ ffc07494 <iproc+0x15c> <== NEVER TAKEN
echo (c, tty);
ffc07488: 38 60 00 0a li r3,10
ffc0748c: 7f e4 fb 78 mr r4,r31
ffc07490: 4b ff fc 55 bl ffc070e4 <echo>
tty->cbuf[tty->ccount++] = c;
ffc07494: 81 3f 00 20 lwz r9,32(r31)
ffc07498: 39 00 00 0a li r8,10
ffc0749c: 81 5f 00 1c lwz r10,28(r31)
ffc074a0: 7d 0a 49 ae stbx r8,r10,r9
ffc074a4: 48 00 00 3c b ffc074e0 <iproc+0x1a8>
return 1;
} else if ((c == tty->termios.c_cc[VEOL]) ||
ffc074a8: 89 5f 00 4c lbz r10,76(r31)
ffc074ac: 7f 8a f0 00 cmpw cr7,r10,r30
ffc074b0: 41 9e 00 10 beq- cr7,ffc074c0 <iproc+0x188> <== NEVER TAKEN
ffc074b4: 89 5f 00 51 lbz r10,81(r31)
ffc074b8: 7f 8a f0 00 cmpw cr7,r10,r30
ffc074bc: 40 be 00 30 bne+ cr7,ffc074ec <iproc+0x1b4> <== ALWAYS TAKEN
(c == tty->termios.c_cc[VEOL2])) {
if (tty->termios.c_lflag & ECHO)
ffc074c0: 71 2a 00 08 andi. r10,r9,8 <== NOT EXECUTED
ffc074c4: 41 a2 00 10 beq+ ffc074d4 <iproc+0x19c> <== NOT EXECUTED
echo (c, tty);
ffc074c8: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc074cc: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED
ffc074d0: 4b ff fc 15 bl ffc070e4 <echo> <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
ffc074d4: 81 3f 00 20 lwz r9,32(r31) <== NOT EXECUTED
ffc074d8: 81 5f 00 1c lwz r10,28(r31) <== NOT EXECUTED
ffc074dc: 7f ca 49 ae stbx r30,r10,r9 <== NOT EXECUTED
ffc074e0: 39 29 00 01 addi r9,r9,1
ffc074e4: 91 3f 00 20 stw r9,32(r31)
ffc074e8: 48 00 00 50 b ffc07538 <iproc+0x200>
}
/*
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
ffc074ec: 3d 20 00 00 lis r9,0
ffc074f0: 81 49 21 64 lwz r10,8548(r9)
ffc074f4: 81 3f 00 20 lwz r9,32(r31)
ffc074f8: 39 4a ff ff addi r10,r10,-1
ffc074fc: 7f 89 50 40 cmplw cr7,r9,r10
ffc07500: 40 9c 00 30 bge- cr7,ffc07530 <iproc+0x1f8> <== NEVER TAKEN
if (tty->termios.c_lflag & ECHO)
ffc07504: 81 3f 00 3c lwz r9,60(r31)
ffc07508: 71 2a 00 08 andi. r10,r9,8
ffc0750c: 41 a2 00 10 beq+ ffc0751c <iproc+0x1e4> <== NEVER TAKEN
echo (c, tty);
ffc07510: 7f c3 f3 78 mr r3,r30
ffc07514: 7f e4 fb 78 mr r4,r31
ffc07518: 4b ff fb cd bl ffc070e4 <echo>
tty->cbuf[tty->ccount++] = c;
ffc0751c: 81 3f 00 20 lwz r9,32(r31)
ffc07520: 81 5f 00 1c lwz r10,28(r31)
ffc07524: 7f ca 49 ae stbx r30,r10,r9
ffc07528: 39 29 00 01 addi r9,r9,1
ffc0752c: 91 3f 00 20 stw r9,32(r31)
}
return 0;
ffc07530: 38 60 00 00 li r3,0
ffc07534: 48 00 00 08 b ffc0753c <iproc+0x204>
else if (c == tty->termios.c_cc[VKILL]) {
erase (tty, 1);
return 0;
}
else if (c == tty->termios.c_cc[VEOF]) {
return 1;
ffc07538: 38 60 00 01 li r3,1
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
}
return 0;
}
ffc0753c: 39 61 00 10 addi r11,r1,16
ffc07540: 4b ff 90 80 b ffc005c0 <_restgpr_30_x>
ffc1b59c <killinfo>:
int killinfo(
pid_t pid,
int sig,
const union sigval *value
)
{
ffc1b59c: 94 21 ff d8 stwu r1,-40(r1)
ffc1b5a0: 7c 08 02 a6 mflr r0
ffc1b5a4: bf 81 00 18 stmw r28,24(r1)
ffc1b5a8: 7c 7e 1b 78 mr r30,r3
ffc1b5ac: 7c 9f 23 78 mr r31,r4
ffc1b5b0: 90 01 00 2c stw r0,44(r1)
ffc1b5b4: 7c bd 2b 78 mr r29,r5
POSIX_signals_Siginfo_node *psiginfo;
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid != getpid() )
ffc1b5b8: 4b ff fc 71 bl ffc1b228 <getpid>
ffc1b5bc: 7f 9e 18 00 cmpw cr7,r30,r3
ffc1b5c0: 41 be 00 10 beq+ cr7,ffc1b5d0 <killinfo+0x34>
rtems_set_errno_and_return_minus_one( ESRCH );
ffc1b5c4: 4b ff 4f e9 bl ffc105ac <__errno>
ffc1b5c8: 39 20 00 03 li r9,3
ffc1b5cc: 48 00 02 24 b ffc1b7f0 <killinfo+0x254>
/*
* Validate the signal passed.
*/
if ( !sig )
ffc1b5d0: 2f 9f 00 00 cmpwi cr7,r31,0
ffc1b5d4: 40 be 00 08 bne+ cr7,ffc1b5dc <killinfo+0x40>
ffc1b5d8: 48 00 00 10 b ffc1b5e8 <killinfo+0x4c>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
ffc1b5dc: 3b df ff ff addi r30,r31,-1
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
ffc1b5e0: 2b 9e 00 1f cmplwi cr7,r30,31
ffc1b5e4: 40 bd 00 10 ble+ cr7,ffc1b5f4 <killinfo+0x58>
rtems_set_errno_and_return_minus_one( EINVAL );
ffc1b5e8: 4b ff 4f c5 bl ffc105ac <__errno>
ffc1b5ec: 39 20 00 16 li r9,22
ffc1b5f0: 48 00 02 00 b ffc1b7f0 <killinfo+0x254>
/*
* If the signal is being ignored, then we are out of here.
*/
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN )
ffc1b5f4: 1d 5f 00 0c mulli r10,r31,12
ffc1b5f8: 3d 20 00 00 lis r9,0
ffc1b5fc: 39 29 32 20 addi r9,r9,12832
ffc1b600: 7d 29 52 14 add r9,r9,r10
ffc1b604: 81 29 00 08 lwz r9,8(r9)
ffc1b608: 2f 89 00 01 cmpwi cr7,r9,1
ffc1b60c: 41 9e 02 14 beq- cr7,ffc1b820 <killinfo+0x284>
/*
* 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 ) )
ffc1b610: 2f 9f 00 08 cmpwi cr7,r31,8
ffc1b614: 41 9e 00 14 beq- cr7,ffc1b628 <killinfo+0x8c>
ffc1b618: 2f 9f 00 04 cmpwi cr7,r31,4
ffc1b61c: 41 9e 00 0c beq- cr7,ffc1b628 <killinfo+0x8c>
ffc1b620: 2f 9f 00 0b cmpwi cr7,r31,11
ffc1b624: 40 be 00 14 bne+ cr7,ffc1b638 <killinfo+0x9c>
return pthread_kill( pthread_self(), sig );
ffc1b628: 48 00 04 45 bl ffc1ba6c <pthread_self>
ffc1b62c: 7f e4 fb 78 mr r4,r31
ffc1b630: 48 00 03 55 bl ffc1b984 <pthread_kill>
ffc1b634: 48 00 01 f0 b ffc1b824 <killinfo+0x288>
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
siginfo->si_code = SI_USER;
if ( !value ) {
ffc1b638: 2f 9d 00 00 cmpwi cr7,r29,0
/*
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
ffc1b63c: 93 e1 00 08 stw r31,8(r1)
static inline sigset_t signo_to_mask(
uint32_t sig
)
{
return 1u << (sig - 1);
ffc1b640: 39 20 00 01 li r9,1
ffc1b644: 7d 3e f0 30 slw r30,r9,r30
siginfo->si_code = SI_USER;
ffc1b648: 91 21 00 0c stw r9,12(r1)
if ( !value ) {
ffc1b64c: 40 be 00 0c bne+ cr7,ffc1b658 <killinfo+0xbc>
siginfo->si_value.sival_int = 0;
ffc1b650: 93 a1 00 10 stw r29,16(r1)
ffc1b654: 48 00 00 0c b ffc1b660 <killinfo+0xc4>
} else {
siginfo->si_value = *value;
ffc1b658: 81 3d 00 00 lwz r9,0(r29)
ffc1b65c: 91 21 00 10 stw r9,16(r1)
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
ffc1b660: 3d 20 00 00 lis r9,0
ffc1b664: 81 49 28 68 lwz r10,10344(r9)
++level;
ffc1b668: 39 4a 00 01 addi r10,r10,1
_Thread_Dispatch_disable_level = level;
ffc1b66c: 91 49 28 68 stw r10,10344(r9)
*/
void _POSIX_signals_Manager_Initialization(void);
static inline void _POSIX_signals_Add_post_switch_extension(void)
{
_API_extensions_Add_post_switch( &_POSIX_signals_Post_switch );
ffc1b670: 3c 60 00 00 lis r3,0
ffc1b674: 38 63 22 20 addi r3,r3,8736
ffc1b678: 4b fe db fd bl ffc09274 <_API_extensions_Add_post_switch>
/*
* 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;
ffc1b67c: 3d 20 00 00 lis r9,0
ffc1b680: 80 69 31 b0 lwz r3,12720(r9)
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( _POSIX_signals_Is_interested( api, mask ) ) {
ffc1b684: 81 43 01 50 lwz r10,336(r3)
ffc1b688: 81 4a 00 d0 lwz r10,208(r10)
ffc1b68c: 7f c6 50 79 andc. r6,r30,r10
ffc1b690: 40 82 01 04 bne- ffc1b794 <killinfo+0x1f8>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
ffc1b694: 3d 20 00 00 lis r9,0
/* 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 );
ffc1b698: 3d 00 00 00 lis r8,0
ffc1b69c: 81 29 33 ac lwz r9,13228(r9)
ffc1b6a0: 39 08 33 b0 addi r8,r8,13232
ffc1b6a4: 48 00 00 24 b ffc1b6c8 <killinfo+0x12c>
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
ffc1b6a8: 81 49 00 30 lwz r10,48(r9)
for ( the_node = _Chain_First( the_chain );
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
the_thread = (Thread_Control *)the_node;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
ffc1b6ac: 80 e9 01 50 lwz r7,336(r9)
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
ffc1b6b0: 7f dc 50 39 and. r28,r30,r10
ffc1b6b4: 40 82 00 dc bne- ffc1b790 <killinfo+0x1f4>
/*
* Is this thread is blocked waiting for another signal but has
* not blocked this one?
*/
if (~api->signals_blocked & mask)
ffc1b6b8: 81 47 00 d0 lwz r10,208(r7)
ffc1b6bc: 7f c3 50 79 andc. r3,r30,r10
ffc1b6c0: 40 82 00 d0 bne- ffc1b790 <killinfo+0x1f4>
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 ) {
ffc1b6c4: 81 29 00 00 lwz r9,0(r9)
/* 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 );
ffc1b6c8: 7f 89 40 00 cmpw cr7,r9,r8
ffc1b6cc: 40 9e ff dc bne+ cr7,ffc1b6a8 <killinfo+0x10c>
* NOTES:
*
* + rtems internal threads do not receive signals.
*/
interested = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
ffc1b6d0: 3d 20 00 00 lis r9,0
ffc1b6d4: 88 e9 27 84 lbz r7,10116(r9)
ffc1b6d8: 3d 00 00 00 lis r8,0
ffc1b6dc: 39 08 2c 7c addi r8,r8,11388
ffc1b6e0: 38 e7 00 01 addi r7,r7,1
*/
#define _POSIX_signals_Is_interested( _api, _mask ) \
( ~(_api)->signals_blocked & (_mask) )
int killinfo(
ffc1b6e4: 39 68 00 08 addi r11,r8,8
*
* NOTES:
*
* + rtems internal threads do not receive signals.
*/
interested = NULL;
ffc1b6e8: 39 20 00 00 li r9,0
for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) {
/*
* This can occur when no one is interested and an API is not configured.
*/
if ( !_Objects_Information_table[ the_api ] )
ffc1b6ec: 85 48 00 04 lwzu r10,4(r8)
ffc1b6f0: 2f 8a 00 00 cmpwi cr7,r10,0
ffc1b6f4: 41 9e 00 8c beq- cr7,ffc1b780 <killinfo+0x1e4> <== NEVER TAKEN
continue;
the_info = _Objects_Information_table[ the_api ][ 1 ];
ffc1b6f8: 81 4a 00 04 lwz r10,4(r10)
#endif
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
ffc1b6fc: 38 c0 00 01 li r6,1
*/
if ( !the_info )
continue;
#endif
maximum = the_info->maximum;
ffc1b700: a0 0a 00 10 lhz r0,16(r10)
object_table = the_info->local_table;
ffc1b704: 83 aa 00 1c lwz r29,28(r10)
for ( index = 1 ; index <= maximum ; index++ ) {
ffc1b708: 48 00 00 70 b ffc1b778 <killinfo+0x1dc>
*/
#define _POSIX_signals_Is_interested( _api, _mask ) \
( ~(_api)->signals_blocked & (_mask) )
int killinfo(
ffc1b70c: 54 ca 10 3a rlwinm r10,r6,2,0,29
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
the_thread = (Thread_Control *) object_table[ index ];
ffc1b710: 7d 5d 50 2e lwzx r10,r29,r10
if ( !the_thread )
ffc1b714: 2f 8a 00 00 cmpwi cr7,r10,0
ffc1b718: 41 9e 00 5c beq- cr7,ffc1b774 <killinfo+0x1d8>
/*
* If this thread is of lower priority than the interested thread,
* go on to the next thread.
*/
if ( the_thread->current_priority > interested_priority )
ffc1b71c: 80 aa 00 14 lwz r5,20(r10)
ffc1b720: 7f 85 38 40 cmplw cr7,r5,r7
ffc1b724: 41 9d 00 50 bgt- cr7,ffc1b774 <killinfo+0x1d8>
#if defined(RTEMS_DEBUG)
if ( !api )
continue;
#endif
if ( !_POSIX_signals_Is_interested( api, mask ) )
ffc1b728: 80 8a 01 50 lwz r4,336(r10)
ffc1b72c: 80 84 00 d0 lwz r4,208(r4)
ffc1b730: 7f dc 20 79 andc. r28,r30,r4
ffc1b734: 41 82 00 40 beq- ffc1b774 <killinfo+0x1d8>
*
* 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 ) {
ffc1b738: 41 9c 00 34 blt- cr7,ffc1b76c <killinfo+0x1d0>
* and blocking interruptibutable by signal.
*
* If the interested thread is ready, don't think about changing.
*/
if ( interested && !_States_Is_ready( interested->current_state ) ) {
ffc1b73c: 2f 89 00 00 cmpwi cr7,r9,0
ffc1b740: 41 9e 00 34 beq- cr7,ffc1b774 <killinfo+0x1d8> <== NEVER TAKEN
ffc1b744: 80 69 00 10 lwz r3,16(r9)
ffc1b748: 2f 83 00 00 cmpwi cr7,r3,0
ffc1b74c: 41 9e 00 28 beq- cr7,ffc1b774 <killinfo+0x1d8>
/* preferred ready over blocked */
DEBUG_STEP("5");
if ( _States_Is_ready( the_thread->current_state ) ) {
ffc1b750: 80 8a 00 10 lwz r4,16(r10)
ffc1b754: 2f 84 00 00 cmpwi cr7,r4,0
ffc1b758: 41 9e 00 14 beq- cr7,ffc1b76c <killinfo+0x1d0>
continue;
}
DEBUG_STEP("6");
/* prefer blocked/interruptible over blocked/not interruptible */
if ( !_States_Is_interruptible_by_signal(interested->current_state) ) {
ffc1b75c: 74 7c 10 00 andis. r28,r3,4096
ffc1b760: 40 82 00 14 bne- ffc1b774 <killinfo+0x1d8>
DEBUG_STEP("7");
if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) {
ffc1b764: 74 83 10 00 andis. r3,r4,4096
ffc1b768: 41 82 00 0c beq- ffc1b774 <killinfo+0x1d8>
*/
if ( interested && !_States_Is_ready( interested->current_state ) ) {
/* preferred ready over blocked */
DEBUG_STEP("5");
if ( _States_Is_ready( the_thread->current_state ) ) {
ffc1b76c: 7c a7 2b 78 mr r7,r5
ffc1b770: 7d 49 53 78 mr r9,r10
#endif
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
ffc1b774: 38 c6 00 01 addi r6,r6,1
ffc1b778: 7f 86 00 40 cmplw cr7,r6,r0
ffc1b77c: 40 9d ff 90 ble+ cr7,ffc1b70c <killinfo+0x170>
* + 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++) {
ffc1b780: 7f 88 58 00 cmpw cr7,r8,r11
ffc1b784: 40 be ff 68 bne- cr7,ffc1b6ec <killinfo+0x150>
}
}
}
}
if ( interested ) {
ffc1b788: 2f 89 00 00 cmpwi cr7,r9,0
ffc1b78c: 41 9e 00 24 beq- cr7,ffc1b7b0 <killinfo+0x214>
/*
* Is this thread is blocked waiting for another signal but has
* not blocked this one?
*/
if (~api->signals_blocked & mask)
ffc1b790: 7d 23 4b 78 mr r3,r9
/*
* 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 ) ) {
ffc1b794: 7f e4 fb 78 mr r4,r31
ffc1b798: 38 a1 00 08 addi r5,r1,8
ffc1b79c: 48 00 00 b9 bl ffc1b854 <_POSIX_signals_Unblock_thread>
ffc1b7a0: 2f 83 00 00 cmpwi cr7,r3,0
ffc1b7a4: 41 be 00 0c beq+ cr7,ffc1b7b0 <killinfo+0x214>
_Thread_Enable_dispatch();
ffc1b7a8: 4b fe fa 81 bl ffc0b228 <_Thread_Enable_dispatch>
ffc1b7ac: 48 00 00 74 b ffc1b820 <killinfo+0x284>
/*
* 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 );
ffc1b7b0: 7f c3 f3 78 mr r3,r30
ffc1b7b4: 48 00 00 79 bl ffc1b82c <_POSIX_signals_Set_process_signals>
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
ffc1b7b8: 1f ff 00 0c mulli r31,r31,12
ffc1b7bc: 3d 20 00 00 lis r9,0
ffc1b7c0: 39 29 32 20 addi r9,r9,12832
ffc1b7c4: 7d 29 f8 2e lwzx r9,r9,r31
ffc1b7c8: 2f 89 00 02 cmpwi cr7,r9,2
ffc1b7cc: 40 9e ff dc bne+ cr7,ffc1b7a8 <killinfo+0x20c>
psiginfo = (POSIX_signals_Siginfo_node *)
ffc1b7d0: 3c 60 00 00 lis r3,0
ffc1b7d4: 38 63 33 a0 addi r3,r3,13216
ffc1b7d8: 4b fe dc 59 bl ffc09430 <_Chain_Get>
_Chain_Get( &_POSIX_signals_Inactive_siginfo );
if ( !psiginfo ) {
ffc1b7dc: 7c 64 1b 79 mr. r4,r3
ffc1b7e0: 40 a2 00 1c bne+ ffc1b7fc <killinfo+0x260>
_Thread_Enable_dispatch();
ffc1b7e4: 4b fe fa 45 bl ffc0b228 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EAGAIN );
ffc1b7e8: 4b ff 4d c5 bl ffc105ac <__errno>
ffc1b7ec: 39 20 00 0b li r9,11
ffc1b7f0: 91 23 00 00 stw r9,0(r3)
ffc1b7f4: 38 60 ff ff li r3,-1
ffc1b7f8: 48 00 00 2c b ffc1b824 <killinfo+0x288>
}
psiginfo->Info = *siginfo;
ffc1b7fc: 39 24 00 08 addi r9,r4,8
ffc1b800: 39 41 00 08 addi r10,r1,8
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
ffc1b804: 3c 60 00 00 lis r3,0
if ( !psiginfo ) {
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EAGAIN );
}
psiginfo->Info = *siginfo;
ffc1b808: 7c aa 64 aa lswi r5,r10,12
ffc1b80c: 7c a9 65 aa stswi r5,r9,12
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
ffc1b810: 38 63 34 14 addi r3,r3,13332
ffc1b814: 7c 63 fa 14 add r3,r3,r31
ffc1b818: 4b fe db e9 bl ffc09400 <_Chain_Append>
ffc1b81c: 4b ff ff 8c b ffc1b7a8 <killinfo+0x20c>
/*
* If the signal is being ignored, then we are out of here.
*/
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN )
return 0;
ffc1b820: 38 60 00 00 li r3,0
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
return 0;
}
ffc1b824: 39 61 00 28 addi r11,r1,40
ffc1b828: 4b fe 4d 90 b ffc005b8 <_restgpr_28_x>
ffc048f8 <malloc>:
#include "malloc_p.h"
void *malloc(
size_t size
)
{
ffc048f8: 94 21 ff e8 stwu r1,-24(r1)
ffc048fc: 7c 08 02 a6 mflr r0
void *return_this;
MSBUMP(malloc_calls, 1);
ffc04900: 3d 20 00 00 lis r9,0
#include "malloc_p.h"
void *malloc(
size_t size
)
{
ffc04904: 90 01 00 1c stw r0,28(r1)
void *return_this;
MSBUMP(malloc_calls, 1);
ffc04908: 39 29 2b 98 addi r9,r9,11160
ffc0490c: 81 49 00 04 lwz r10,4(r9)
#include "malloc_p.h"
void *malloc(
size_t size
)
{
ffc04910: bf a1 00 0c stmw r29,12(r1)
ffc04914: 7c 7e 1b 78 mr r30,r3
void *return_this;
MSBUMP(malloc_calls, 1);
ffc04918: 39 4a 00 01 addi r10,r10,1
ffc0491c: 91 49 00 04 stw r10,4(r9)
/*
* If some free's have been deferred, then do them now.
*/
malloc_deferred_frees_process();
ffc04920: 4b ff fe b9 bl ffc047d8 <malloc_deferred_frees_process>
/*
* Validate the parameters
*/
if ( !size )
ffc04924: 2f 9e 00 00 cmpwi cr7,r30,0
ffc04928: 40 be 00 0c bne+ cr7,ffc04934 <malloc+0x3c>
return (void *) 0;
ffc0492c: 3b e0 00 00 li r31,0
ffc04930: 48 00 00 b8 b ffc049e8 <malloc+0xf0>
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
ffc04934: 3d 20 00 00 lis r9,0
ffc04938: 81 29 28 90 lwz r9,10384(r9)
ffc0493c: 2f 89 00 03 cmpwi cr7,r9,3
ffc04940: 41 9e 00 28 beq- cr7,ffc04968 <malloc+0x70>
RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate(
Heap_Control *heap,
uintptr_t size
)
{
return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 );
ffc04944: 3f a0 00 00 lis r29,0
ffc04948: 80 7d 27 90 lwz r3,10128(r29)
ffc0494c: 7f c4 f3 78 mr r4,r30
ffc04950: 38 a0 00 00 li r5,0
ffc04954: 38 c0 00 00 li r6,0
ffc04958: 48 00 5c cd bl ffc0a624 <_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 ) {
ffc0495c: 7c 7f 1b 79 mr. r31,r3
ffc04960: 40 a2 00 48 bne+ ffc049a8 <malloc+0xb0>
ffc04964: 48 00 00 14 b ffc04978 <malloc+0x80>
/*
* 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() )
ffc04968: 4b ff fe 45 bl ffc047ac <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()) &&
ffc0496c: 2f 83 00 00 cmpwi cr7,r3,0
ffc04970: 40 9e ff d4 bne+ cr7,ffc04944 <malloc+0x4c> <== ALWAYS TAKEN
ffc04974: 4b ff ff b8 b ffc0492c <malloc+0x34> <== NOT EXECUTED
*/
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
if ( !return_this ) {
return_this = (*rtems_malloc_extend_handler)( RTEMS_Malloc_Heap, size );
ffc04978: 3d 20 00 00 lis r9,0
ffc0497c: 80 7d 27 90 lwz r3,10128(r29)
ffc04980: 81 29 27 8c lwz r9,10124(r9)
ffc04984: 7f c4 f3 78 mr r4,r30
ffc04988: 7d 29 03 a6 mtctr r9
ffc0498c: 4e 80 04 21 bctrl
if ( !return_this ) {
ffc04990: 7c 7f 1b 79 mr. r31,r3
ffc04994: 40 a2 00 14 bne+ ffc049a8 <malloc+0xb0> <== NEVER TAKEN
errno = ENOMEM;
ffc04998: 48 00 bc 15 bl ffc105ac <__errno>
ffc0499c: 39 20 00 0c li r9,12
ffc049a0: 91 23 00 00 stw r9,0(r3)
return (void *) 0;
ffc049a4: 48 00 00 44 b ffc049e8 <malloc+0xf0>
}
/*
* If the user wants us to dirty the allocated memory, then do it.
*/
if ( rtems_malloc_dirty_helper )
ffc049a8: 3d 20 00 00 lis r9,0
ffc049ac: 81 29 28 04 lwz r9,10244(r9)
ffc049b0: 2f 89 00 00 cmpwi cr7,r9,0
ffc049b4: 41 9e 00 14 beq- cr7,ffc049c8 <malloc+0xd0>
(*rtems_malloc_dirty_helper)( return_this, size );
ffc049b8: 7f e3 fb 78 mr r3,r31
ffc049bc: 7d 29 03 a6 mtctr r9
ffc049c0: 7f c4 f3 78 mr r4,r30
ffc049c4: 4e 80 04 21 bctrl
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
ffc049c8: 3d 20 00 00 lis r9,0
ffc049cc: 81 29 28 08 lwz r9,10248(r9)
ffc049d0: 2f 89 00 00 cmpwi cr7,r9,0
ffc049d4: 41 9e 00 14 beq- cr7,ffc049e8 <malloc+0xf0>
(*rtems_malloc_statistics_helpers->at_malloc)(return_this);
ffc049d8: 81 29 00 04 lwz r9,4(r9)
ffc049dc: 7f e3 fb 78 mr r3,r31
ffc049e0: 7d 29 03 a6 mtctr r9
ffc049e4: 4e 80 04 21 bctrl
return return_this;
}
ffc049e8: 39 61 00 18 addi r11,r1,24
ffc049ec: 7f e3 fb 78 mr r3,r31
ffc049f0: 4b ff bb cc b ffc005bc <_restgpr_29_x>
ffc0ebe8 <memfile_alloc_block>:
void *memfile_alloc_block(void)
{
void *memory;
memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK);
ffc0ebe8: 3d 20 00 00 lis r9,0
* Allocate a block for an in-memory file.
*/
int memfile_blocks_allocated = 0;
void *memfile_alloc_block(void)
{
ffc0ebec: 94 21 ff f8 stwu r1,-8(r1)
ffc0ebf0: 7c 08 02 a6 mflr r0
void *memory;
memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK);
ffc0ebf4: 38 60 00 01 li r3,1
ffc0ebf8: 80 89 28 44 lwz r4,10308(r9)
* Allocate a block for an in-memory file.
*/
int memfile_blocks_allocated = 0;
void *memfile_alloc_block(void)
{
ffc0ebfc: 90 01 00 0c stw r0,12(r1)
void *memory;
memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK);
ffc0ec00: 4b ff 56 01 bl ffc04200 <calloc>
if ( memory )
ffc0ec04: 2c 03 00 00 cmpwi r3,0
ffc0ec08: 41 82 00 14 beq- ffc0ec1c <memfile_alloc_block+0x34> <== NEVER TAKEN
memfile_blocks_allocated++;
ffc0ec0c: 3d 20 00 00 lis r9,0
ffc0ec10: 81 49 28 ac lwz r10,10412(r9)
ffc0ec14: 39 4a 00 01 addi r10,r10,1
ffc0ec18: 91 49 28 ac stw r10,10412(r9)
return memory;
}
ffc0ec1c: 80 01 00 0c lwz r0,12(r1)
ffc0ec20: 38 21 00 08 addi r1,r1,8
ffc0ec24: 7c 08 03 a6 mtlr r0
ffc0ec28: 4e 80 00 20 blr
ffc0f768 <memfile_ftruncate>:
int memfile_ftruncate(
rtems_libio_t *iop,
off_t length
)
{
ffc0f768: 7c 2b 0b 78 mr r11,r1
ffc0f76c: 7c 08 02 a6 mflr r0
ffc0f770: 94 21 ff e0 stwu r1,-32(r1)
ffc0f774: 90 01 00 24 stw r0,36(r1)
ffc0f778: 48 00 b6 45 bl ffc1adbc <_savegpr_31>
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
ffc0f77c: 83 e3 00 1c lwz r31,28(r3)
* 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 )
ffc0f780: 81 3f 00 50 lwz r9,80(r31)
ffc0f784: 7f 89 28 00 cmpw cr7,r9,r5
ffc0f788: 41 9c 00 14 blt- cr7,ffc0f79c <memfile_ftruncate+0x34> <== NEVER TAKEN
ffc0f78c: 40 be 00 20 bne+ cr7,ffc0f7ac <memfile_ftruncate+0x44> <== NEVER TAKEN
ffc0f790: 81 3f 00 54 lwz r9,84(r31)
ffc0f794: 7f 89 30 40 cmplw cr7,r9,r6
ffc0f798: 40 bc 00 14 bge+ cr7,ffc0f7ac <memfile_ftruncate+0x44>
return IMFS_memfile_extend( the_jnode, true, length );
ffc0f79c: 7f e3 fb 78 mr r3,r31
ffc0f7a0: 38 80 00 01 li r4,1
ffc0f7a4: 4b ff fb 31 bl ffc0f2d4 <IMFS_memfile_extend>
ffc0f7a8: 48 00 00 24 b ffc0f7cc <memfile_ftruncate+0x64>
/*
* 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;
ffc0f7ac: 90 bf 00 50 stw r5,80(r31)
IMFS_update_atime( the_jnode );
ffc0f7b0: 38 61 00 08 addi r3,r1,8
ffc0f7b4: 38 80 00 00 li r4,0
/*
* 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;
ffc0f7b8: 90 df 00 54 stw r6,84(r31)
IMFS_update_atime( the_jnode );
ffc0f7bc: 4b ff 4e 71 bl ffc0462c <gettimeofday>
ffc0f7c0: 81 21 00 08 lwz r9,8(r1)
return 0;
ffc0f7c4: 38 60 00 00 li r3,0
* deleted. So we leave the previously allocated blocks in place for
* future use and just set the length.
*/
the_jnode->info.file.size = length;
IMFS_update_atime( the_jnode );
ffc0f7c8: 91 3f 00 40 stw r9,64(r31)
return 0;
}
ffc0f7cc: 39 61 00 20 addi r11,r1,32
ffc0f7d0: 4b ff 0d f4 b ffc005c4 <_restgpr_31_x>
ffc0f6c0 <memfile_open>:
the_jnode = iop->pathinfo.node_access;
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & LIBIO_FLAGS_WRITE)
ffc0f6c0: 81 43 00 10 lwz r10,16(r3)
mode_t mode
)
{
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
ffc0f6c4: 81 23 00 1c lwz r9,28(r3)
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & LIBIO_FLAGS_WRITE)
ffc0f6c8: 71 48 00 04 andi. r8,r10,4
ffc0f6cc: 40 a2 00 10 bne+ ffc0f6dc <memfile_open+0x1c>
if ((count != 0)
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
return -1;
}
return 0;
ffc0f6d0: 39 20 00 00 li r9,0
}
ffc0f6d4: 7d 23 4b 78 mr r3,r9
ffc0f6d8: 4e 80 00 20 blr
ffc0f6dc: 81 49 00 4c lwz r10,76(r9)
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & LIBIO_FLAGS_WRITE)
&& (IMFS_type( the_jnode ) == IMFS_LINEAR_FILE)) {
ffc0f6e0: 81 4a 00 00 lwz r10,0(r10)
ffc0f6e4: 2f 8a 00 05 cmpwi cr7,r10,5
ffc0f6e8: 40 9e ff e8 bne+ cr7,ffc0f6d0 <memfile_open+0x10> <== ALWAYS TAKEN
uint32_t count = the_jnode->info.linearfile.size;
ffc0f6ec: 81 09 00 54 lwz r8,84(r9) <== NOT EXECUTED
const unsigned char *buffer = the_jnode->info.linearfile.direct;
the_jnode->control = &IMFS_node_control_memfile;
ffc0f6f0: 3d 40 ff c2 lis r10,-62 <== NOT EXECUTED
ffc0f6f4: 39 4a d3 60 addi r10,r10,-11424 <== NOT EXECUTED
* Perform 'copy on write' for linear files
*/
if ((iop->flags & LIBIO_FLAGS_WRITE)
&& (IMFS_type( the_jnode ) == IMFS_LINEAR_FILE)) {
uint32_t count = the_jnode->info.linearfile.size;
const unsigned char *buffer = the_jnode->info.linearfile.direct;
ffc0f6f8: 80 e9 00 58 lwz r7,88(r9) <== NOT EXECUTED
the_jnode->control = &IMFS_node_control_memfile;
the_jnode->info.file.size = 0;
the_jnode->info.file.indirect = 0;
the_jnode->info.file.doubly_indirect = 0;
the_jnode->info.file.triply_indirect = 0;
if ((count != 0)
ffc0f6fc: 2f 88 00 00 cmpwi cr7,r8,0 <== NOT EXECUTED
if ((iop->flags & LIBIO_FLAGS_WRITE)
&& (IMFS_type( the_jnode ) == IMFS_LINEAR_FILE)) {
uint32_t count = the_jnode->info.linearfile.size;
const unsigned char *buffer = the_jnode->info.linearfile.direct;
the_jnode->control = &IMFS_node_control_memfile;
ffc0f700: 91 49 00 4c stw r10,76(r9) <== NOT EXECUTED
the_jnode->info.file.size = 0;
ffc0f704: 39 40 00 00 li r10,0 <== NOT EXECUTED
ffc0f708: 39 60 00 00 li r11,0 <== NOT EXECUTED
ffc0f70c: 91 49 00 50 stw r10,80(r9) <== NOT EXECUTED
the_jnode->info.file.indirect = 0;
ffc0f710: 39 40 00 00 li r10,0 <== NOT EXECUTED
&& (IMFS_type( the_jnode ) == IMFS_LINEAR_FILE)) {
uint32_t count = the_jnode->info.linearfile.size;
const unsigned char *buffer = the_jnode->info.linearfile.direct;
the_jnode->control = &IMFS_node_control_memfile;
the_jnode->info.file.size = 0;
ffc0f714: 91 69 00 54 stw r11,84(r9) <== NOT EXECUTED
the_jnode->info.file.indirect = 0;
ffc0f718: 91 49 00 58 stw r10,88(r9) <== NOT EXECUTED
the_jnode->info.file.doubly_indirect = 0;
ffc0f71c: 91 49 00 5c stw r10,92(r9) <== NOT EXECUTED
the_jnode->info.file.triply_indirect = 0;
ffc0f720: 91 49 00 60 stw r10,96(r9) <== NOT EXECUTED
if ((count != 0)
ffc0f724: 41 9e ff ac beq+ cr7,ffc0f6d0 <memfile_open+0x10> <== NOT EXECUTED
rtems_libio_t *iop,
const char *pathname,
int oflag,
mode_t mode
)
{
ffc0f728: 94 21 ff f8 stwu r1,-8(r1) <== NOT EXECUTED
ffc0f72c: 7c 08 02 a6 mflr r0 <== NOT EXECUTED
the_jnode->info.file.size = 0;
the_jnode->info.file.indirect = 0;
the_jnode->info.file.doubly_indirect = 0;
the_jnode->info.file.triply_indirect = 0;
if ((count != 0)
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
ffc0f730: 7d 23 4b 78 mr r3,r9 <== NOT EXECUTED
ffc0f734: 38 a0 00 00 li r5,0 <== NOT EXECUTED
rtems_libio_t *iop,
const char *pathname,
int oflag,
mode_t mode
)
{
ffc0f738: 90 01 00 0c stw r0,12(r1) <== NOT EXECUTED
the_jnode->info.file.size = 0;
the_jnode->info.file.indirect = 0;
the_jnode->info.file.doubly_indirect = 0;
the_jnode->info.file.triply_indirect = 0;
if ((count != 0)
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
ffc0f73c: 38 c0 00 00 li r6,0 <== NOT EXECUTED
ffc0f740: 4b ff fd 35 bl ffc0f474 <IMFS_memfile_write> <== NOT EXECUTED
return -1;
}
return 0;
ffc0f744: 39 20 00 00 li r9,0 <== NOT EXECUTED
the_jnode->info.file.size = 0;
the_jnode->info.file.indirect = 0;
the_jnode->info.file.doubly_indirect = 0;
the_jnode->info.file.triply_indirect = 0;
if ((count != 0)
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
ffc0f748: 2f 83 ff ff cmpwi cr7,r3,-1 <== NOT EXECUTED
ffc0f74c: 40 be 00 08 bne+ cr7,ffc0f754 <memfile_open+0x94> <== NOT EXECUTED
return -1;
ffc0f750: 39 20 ff ff li r9,-1 <== NOT EXECUTED
}
return 0;
}
ffc0f754: 80 01 00 0c lwz r0,12(r1) <== NOT EXECUTED
ffc0f758: 7d 23 4b 78 mr r3,r9 <== NOT EXECUTED
ffc0f75c: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED
ffc0f760: 38 21 00 08 addi r1,r1,8 <== NOT EXECUTED
ffc0f764: 4e 80 00 20 blr <== NOT EXECUTED
ffc04b0c <mount>:
const void *data
)
{
int rv = 0;
if (
ffc04b0c: 2b 86 00 01 cmplwi cr7,r6,1
const char *target,
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
ffc04b10: 94 21 ff 70 stwu r1,-144(r1)
ffc04b14: 7c 08 02 a6 mflr r0
ffc04b18: be 61 00 5c stmw r19,92(r1)
ffc04b1c: 7c d8 33 78 mr r24,r6
ffc04b20: 90 01 00 94 stw r0,148(r1)
int rv = 0;
if (
ffc04b24: 41 9d 02 dc bgt- cr7,ffc04e00 <mount+0x2f4>
ffc04b28: 7c 7b 1b 78 mr r27,r3
options == RTEMS_FILESYSTEM_READ_ONLY
|| options == RTEMS_FILESYSTEM_READ_WRITE
) {
rtems_filesystem_fsmount_me_t fsmount_me_h =
ffc04b2c: 7c a3 2b 78 mr r3,r5
ffc04b30: 7c 9d 23 78 mr r29,r4
ffc04b34: 7c b9 2b 78 mr r25,r5
ffc04b38: 7c f3 3b 78 mr r19,r7
ffc04b3c: 48 00 86 d1 bl ffc0d20c <rtems_filesystem_get_mount_handler>
rtems_filesystem_get_mount_handler( filesystemtype );
if ( fsmount_me_h != NULL ) {
ffc04b40: 7c 74 1b 79 mr. r20,r3
ffc04b44: 41 82 02 bc beq- ffc04e00 <mount+0x2f4>
const char *target_or_null,
const char *filesystemtype,
size_t *target_length_ptr
)
{
const char *target = target_or_null != NULL ? target_or_null : "/";
ffc04b48: 2f 9d 00 00 cmpwi cr7,r29,0
ffc04b4c: 7f ba eb 78 mr r26,r29
ffc04b50: 40 be 00 0c bne+ cr7,ffc04b5c <mount+0x50>
ffc04b54: 3f 40 ff c2 lis r26,-62
ffc04b58: 3b 5a d0 f8 addi r26,r26,-12040
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
ffc04b5c: 7f 23 cb 78 mr r3,r25
ffc04b60: 48 00 d3 11 bl ffc11e70 <strlen>
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
ffc04b64: 2f 9b 00 00 cmpwi cr7,r27,0
const char *filesystemtype,
size_t *target_length_ptr
)
{
const char *target = target_or_null != NULL ? target_or_null : "/";
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
ffc04b68: 7c 7f 1b 78 mr r31,r3
ffc04b6c: 3a a3 00 01 addi r21,r3,1
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
ffc04b70: 41 9e 00 14 beq- cr7,ffc04b84 <mount+0x78>
ffc04b74: 7f 63 db 78 mr r3,r27
ffc04b78: 48 00 d2 f9 bl ffc11e70 <strlen>
ffc04b7c: 3b 83 00 01 addi r28,r3,1
ffc04b80: 48 00 00 08 b ffc04b88 <mount+0x7c>
ffc04b84: 3b 80 00 00 li r28,0
size_t target_size = strlen( target ) + 1;
ffc04b88: 7f 43 d3 78 mr r3,r26
ffc04b8c: 48 00 d2 e5 bl ffc11e70 <strlen>
size_t size = sizeof( rtems_filesystem_mount_table_entry_t )
+ filesystemtype_size + source_size + target_size
ffc04b90: 3b ff 00 65 addi r31,r31,101
{
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;
ffc04b94: 3a c3 00 01 addi r22,r3,1
size_t size = sizeof( rtems_filesystem_mount_table_entry_t )
+ filesystemtype_size + source_size + target_size
ffc04b98: 7c 9f e2 14 add r4,r31,r28
+ sizeof( rtems_filesystem_global_location_t );
rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size );
ffc04b9c: 38 60 00 01 li r3,1
ffc04ba0: 7c 84 b2 14 add r4,r4,r22
ffc04ba4: 4b ff f6 5d bl ffc04200 <calloc>
if ( mt_entry != NULL ) {
ffc04ba8: 7c 7f 1b 79 mr. r31,r3
ffc04bac: 41 82 02 6c beq- ffc04e18 <mount+0x30c> <== NEVER TAKEN
rtems_filesystem_global_location_t *mt_fs_root =
(rtems_filesystem_global_location_t *)
((char *) mt_entry + sizeof( *mt_entry ));
char *str = (char *) mt_fs_root + sizeof( *mt_fs_root );
ffc04bb0: 3b df 00 64 addi r30,r31,100
memcpy( str, filesystemtype, filesystemtype_size );
ffc04bb4: 7f c3 f3 78 mr r3,r30
ffc04bb8: 7f 24 cb 78 mr r4,r25
ffc04bbc: 7e a5 ab 78 mr r5,r21
ffc04bc0: 48 00 c6 f1 bl ffc112b0 <memcpy>
mt_entry->type = str;
str += filesystemtype_size;
if ( source_or_null != NULL ) {
ffc04bc4: 2f 9b 00 00 cmpwi cr7,r27,0
(rtems_filesystem_global_location_t *)
((char *) mt_entry + sizeof( *mt_entry ));
char *str = (char *) mt_fs_root + sizeof( *mt_fs_root );
memcpy( str, filesystemtype, filesystemtype_size );
mt_entry->type = str;
ffc04bc8: 93 df 00 34 stw r30,52(r31)
+ filesystemtype_size + source_size + target_size
+ sizeof( rtems_filesystem_global_location_t );
rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size );
if ( mt_entry != NULL ) {
rtems_filesystem_global_location_t *mt_fs_root =
ffc04bcc: 3a ff 00 40 addi r23,r31,64
((char *) mt_entry + sizeof( *mt_entry ));
char *str = (char *) mt_fs_root + sizeof( *mt_fs_root );
memcpy( str, filesystemtype, filesystemtype_size );
mt_entry->type = str;
str += filesystemtype_size;
ffc04bd0: 7f de aa 14 add r30,r30,r21
if ( source_or_null != NULL ) {
ffc04bd4: 41 9e 00 1c beq- cr7,ffc04bf0 <mount+0xe4>
memcpy( str, source_or_null, source_size );
ffc04bd8: 7f c3 f3 78 mr r3,r30
ffc04bdc: 7f 64 db 78 mr r4,r27
ffc04be0: 7f 85 e3 78 mr r5,r28
ffc04be4: 48 00 c6 cd bl ffc112b0 <memcpy>
mt_entry->dev = str;
ffc04be8: 93 df 00 38 stw r30,56(r31)
str += source_size;
ffc04bec: 7f de e2 14 add r30,r30,r28
}
memcpy( str, target, target_size );
ffc04bf0: 7f c3 f3 78 mr r3,r30
ffc04bf4: 7f 44 d3 78 mr r4,r26
ffc04bf8: 7e c5 b3 78 mr r5,r22
ffc04bfc: 48 00 c6 b5 bl ffc112b0 <memcpy>
mt_entry->target = str;
str += target_size;
mt_entry->mounted = true;
ffc04c00: 39 20 00 01 li r9,1
ffc04c04: 99 3f 00 28 stb r9,40(r31)
mt_entry->mt_fs_root = mt_fs_root;
mt_entry->pathconf_limits_and_options = &rtems_filesystem_default_pathconf;
ffc04c08: 3d 20 ff c2 lis r9,-62
ffc04c0c: 39 29 d0 c8 addi r9,r9,-12088
ffc04c10: 91 3f 00 2c stw r9,44(r31)
mt_fs_root->location.mt_entry = mt_entry;
mt_fs_root->reference_count = 1;
ffc04c14: 39 20 00 01 li r9,1
void *starting_address,
size_t number_nodes,
size_t node_size
)
{
_Chain_Initialize( the_chain, starting_address, number_nodes, node_size );
ffc04c18: 38 7f 00 14 addi r3,r31,20
mt_entry->dev = str;
str += source_size;
}
memcpy( str, target, target_size );
mt_entry->target = str;
ffc04c1c: 93 df 00 30 stw r30,48(r31)
ffc04c20: 7e e4 bb 78 mr r4,r23
ffc04c24: 38 a0 00 01 li r5,1
mt_entry->mounted = true;
mt_entry->mt_fs_root = mt_fs_root;
mt_entry->pathconf_limits_and_options = &rtems_filesystem_default_pathconf;
mt_fs_root->location.mt_entry = mt_entry;
mt_fs_root->reference_count = 1;
ffc04c28: 91 3f 00 58 stw r9,88(r31)
ffc04c2c: 38 c0 00 24 li r6,36
filesystemtype,
&target_length
);
if ( mt_entry != NULL ) {
mt_entry->writeable = options == RTEMS_FILESYSTEM_READ_WRITE;
ffc04c30: 57 18 07 fe clrlwi r24,r24,31
memcpy( str, target, target_size );
mt_entry->target = str;
str += target_size;
mt_entry->mounted = true;
mt_entry->mt_fs_root = mt_fs_root;
ffc04c34: 92 ff 00 24 stw r23,36(r31)
mt_entry->pathconf_limits_and_options = &rtems_filesystem_default_pathconf;
mt_fs_root->location.mt_entry = mt_entry;
ffc04c38: 93 ff 00 54 stw r31,84(r31)
ffc04c3c: 48 00 48 35 bl ffc09470 <_Chain_Initialize>
filesystemtype,
&target_length
);
if ( mt_entry != NULL ) {
mt_entry->writeable = options == RTEMS_FILESYSTEM_READ_WRITE;
ffc04c40: 9b 1f 00 29 stb r24,41(r31)
rv = (*fsmount_me_h)( mt_entry, data );
ffc04c44: 7f e3 fb 78 mr r3,r31
ffc04c48: 7e 89 03 a6 mtctr r20
ffc04c4c: 7e 64 9b 78 mr r4,r19
ffc04c50: 4e 80 04 21 bctrl
if ( rv == 0 ) {
ffc04c54: 7c 7e 1b 79 mr. r30,r3
ffc04c58: 40 82 01 b4 bne- ffc04e0c <mount+0x300>
if ( target != NULL ) {
ffc04c5c: 2f 9d 00 00 cmpwi cr7,r29,0
ffc04c60: 41 9e 00 d8 beq- cr7,ffc04d38 <mount+0x22c>
{
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 =
ffc04c64: 7f a4 eb 78 mr r4,r29
ffc04c68: 38 a0 00 1f li r5,31
ffc04c6c: 38 61 00 08 addi r3,r1,8
ffc04c70: 48 00 0c 29 bl ffc05898 <rtems_filesystem_eval_path_start>
static inline bool rtems_filesystem_location_is_instance_root(
const rtems_filesystem_location_info_t *loc
)
{
const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry;
ffc04c74: 81 23 00 14 lwz r9,20(r3)
return (*mt_entry->ops->are_nodes_equal_h)(
ffc04c78: 81 49 00 0c lwz r10,12(r9)
ffc04c7c: 80 89 00 24 lwz r4,36(r9)
ffc04c80: 81 4a 00 10 lwz r10,16(r10)
ffc04c84: 7d 49 03 a6 mtctr r10
ffc04c88: 4e 80 04 21 bctrl
rtems_filesystem_eval_path_start( &ctx, target, eval_flags );
if ( !rtems_filesystem_location_is_instance_root( currentloc ) ) {
ffc04c8c: 2f 83 00 00 cmpwi cr7,r3,0
ffc04c90: 40 9e 00 8c bne- cr7,ffc04d1c <mount+0x210>
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(
ffc04c94: 38 81 00 20 addi r4,r1,32
ffc04c98: 38 61 00 40 addi r3,r1,64
ffc04c9c: 48 00 11 39 bl ffc05dd4 <rtems_filesystem_location_copy_and_detach>
rtems_filesystem_location_info_t targetloc;
rtems_filesystem_global_location_t *mt_point_node;
rtems_filesystem_eval_path_extract_currentloc( &ctx, &targetloc );
mt_point_node = rtems_filesystem_location_transform_to_global( &targetloc );
ffc04ca0: 38 61 00 40 addi r3,r1,64
ffc04ca4: 48 00 13 59 bl ffc05ffc <rtems_filesystem_location_transform_to_global>
mt_entry->mt_point_node = mt_point_node;
rv = (*mt_point_node->location.mt_entry->ops->mount_h)( mt_entry );
ffc04ca8: 81 23 00 14 lwz r9,20(r3)
if ( !rtems_filesystem_location_is_instance_root( currentloc ) ) {
rtems_filesystem_location_info_t targetloc;
rtems_filesystem_global_location_t *mt_point_node;
rtems_filesystem_eval_path_extract_currentloc( &ctx, &targetloc );
mt_point_node = rtems_filesystem_location_transform_to_global( &targetloc );
ffc04cac: 7c 7d 1b 78 mr r29,r3
mt_entry->mt_point_node = mt_point_node;
ffc04cb0: 90 7f 00 20 stw r3,32(r31)
rv = (*mt_point_node->location.mt_entry->ops->mount_h)( mt_entry );
ffc04cb4: 7f e3 fb 78 mr r3,r31
ffc04cb8: 81 29 00 0c lwz r9,12(r9)
ffc04cbc: 81 29 00 30 lwz r9,48(r9)
ffc04cc0: 7d 29 03 a6 mtctr r9
ffc04cc4: 4e 80 04 21 bctrl
if ( rv == 0 ) {
ffc04cc8: 7c 7e 1b 79 mr. r30,r3
ffc04ccc: 40 82 00 44 bne- ffc04d10 <mount+0x204>
*/
#include <rtems/userenv.h>
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
ffc04cd0: 3f a0 00 00 lis r29,0
ffc04cd4: 80 7d 28 54 lwz r3,10324(r29)
ffc04cd8: 38 80 00 00 li r4,0
ffc04cdc: 38 a0 00 00 li r5,0
ffc04ce0: 48 00 3b cd bl ffc088ac <rtems_semaphore_obtain>
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
ffc04ce4: 3d 20 00 00 lis r9,0
ffc04ce8: 39 29 21 50 addi r9,r9,8528
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
ffc04cec: 80 7d 28 54 lwz r3,10324(r29)
ffc04cf0: 81 49 00 08 lwz r10,8(r9)
the_node->next = tail;
ffc04cf4: 39 09 00 04 addi r8,r9,4
ffc04cf8: 91 1f 00 00 stw r8,0(r31)
tail->previous = the_node;
ffc04cfc: 93 e9 00 08 stw r31,8(r9)
old_last->next = the_node;
ffc04d00: 93 ea 00 00 stw r31,0(r10)
the_node->previous = old_last;
ffc04d04: 91 5f 00 04 stw r10,4(r31)
ffc04d08: 48 00 3c c9 bl ffc089d0 <rtems_semaphore_release>
ffc04d0c: 48 00 00 20 b ffc04d2c <mount+0x220>
&rtems_filesystem_mount_table,
&mt_entry->mt_node
);
rtems_filesystem_mt_unlock();
} else {
rtems_filesystem_global_location_release( mt_point_node );
ffc04d10: 7f a3 eb 78 mr r3,r29
ffc04d14: 48 00 11 85 bl ffc05e98 <rtems_filesystem_global_location_release>
ffc04d18: 48 00 00 14 b ffc04d2c <mount+0x220>
}
} else {
rtems_filesystem_eval_path_error( &ctx, EBUSY );
ffc04d1c: 38 61 00 08 addi r3,r1,8
ffc04d20: 38 80 00 10 li r4,16
ffc04d24: 48 00 08 55 bl ffc05578 <rtems_filesystem_eval_path_error>
rv = -1;
ffc04d28: 3b c0 ff ff li r30,-1
}
rtems_filesystem_eval_path_cleanup( &ctx );
ffc04d2c: 38 61 00 08 addi r3,r1,8
ffc04d30: 48 00 0c 91 bl ffc059c0 <rtems_filesystem_eval_path_cleanup>
ffc04d34: 48 00 00 ac b ffc04de0 <mount+0x2d4>
*/
#include <rtems/userenv.h>
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
ffc04d38: 3d 20 00 00 lis r9,0
ffc04d3c: 80 69 28 54 lwz r3,10324(r9)
ffc04d40: 38 80 00 00 li r4,0
ffc04d44: 38 a0 00 00 li r5,0
ffc04d48: 48 00 3b 65 bl ffc088ac <rtems_semaphore_obtain>
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
ffc04d4c: 3d 40 00 00 lis r10,0
ffc04d50: 39 2a 21 50 addi r9,r10,8528
)
{
int rv = 0;
rtems_filesystem_mt_lock();
if ( rtems_chain_is_empty( &rtems_filesystem_mount_table ) ) {
ffc04d54: 81 0a 21 50 lwz r8,8528(r10)
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
ffc04d58: 38 e9 00 04 addi r7,r9,4
ffc04d5c: 7f 88 38 00 cmpw cr7,r8,r7
ffc04d60: 40 9e 00 1c bne- cr7,ffc04d7c <mount+0x270> <== NEVER TAKEN
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
ffc04d64: 81 49 00 08 lwz r10,8(r9)
the_node->next = tail;
ffc04d68: 91 1f 00 00 stw r8,0(r31)
tail->previous = the_node;
ffc04d6c: 93 e9 00 08 stw r31,8(r9)
old_last->next = the_node;
ffc04d70: 93 ea 00 00 stw r31,0(r10)
the_node->previous = old_last;
ffc04d74: 91 5f 00 04 stw r10,4(r31)
ffc04d78: 48 00 00 14 b ffc04d8c <mount+0x280>
rtems_chain_append_unprotected(
&rtems_filesystem_mount_table,
&mt_entry->mt_node
);
} else {
errno = EINVAL;
ffc04d7c: 48 00 b8 31 bl ffc105ac <__errno> <== NOT EXECUTED
ffc04d80: 39 20 00 16 li r9,22 <== NOT EXECUTED
ffc04d84: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED
rv = -1;
ffc04d88: 3b c0 ff ff li r30,-1 <== NOT EXECUTED
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
ffc04d8c: 3d 20 00 00 lis r9,0
ffc04d90: 80 69 28 54 lwz r3,10324(r9)
ffc04d94: 48 00 3c 3d bl ffc089d0 <rtems_semaphore_release>
}
rtems_filesystem_mt_unlock();
if ( rv == 0 ) {
ffc04d98: 2f 9e 00 00 cmpwi cr7,r30,0
ffc04d9c: 40 be 00 44 bne+ cr7,ffc04de0 <mount+0x2d4> <== NEVER TAKEN
rtems_filesystem_global_location_t *new_fs_root =
rtems_filesystem_global_location_obtain( &mt_entry->mt_fs_root );
ffc04da0: 3b ff 00 24 addi r31,r31,36
rv = -1;
}
rtems_filesystem_mt_unlock();
if ( rv == 0 ) {
rtems_filesystem_global_location_t *new_fs_root =
ffc04da4: 7f e3 fb 78 mr r3,r31
ffc04da8: 48 00 11 89 bl ffc05f30 <rtems_filesystem_global_location_obtain>
ffc04dac: 7c 7c 1b 78 mr r28,r3
rtems_filesystem_global_location_obtain( &mt_entry->mt_fs_root );
rtems_filesystem_global_location_t *new_fs_current =
ffc04db0: 7f e3 fb 78 mr r3,r31
ffc04db4: 48 00 11 7d bl ffc05f30 <rtems_filesystem_global_location_obtain>
rtems_filesystem_global_location_obtain( &mt_entry->mt_fs_root );
rtems_filesystem_global_location_assign(
ffc04db8: 3f e0 00 00 lis r31,0
rtems_filesystem_mt_unlock();
if ( rv == 0 ) {
rtems_filesystem_global_location_t *new_fs_root =
rtems_filesystem_global_location_obtain( &mt_entry->mt_fs_root );
rtems_filesystem_global_location_t *new_fs_current =
ffc04dbc: 7c 7d 1b 78 mr r29,r3
rtems_filesystem_global_location_obtain( &mt_entry->mt_fs_root );
rtems_filesystem_global_location_assign(
ffc04dc0: 80 7f 27 d8 lwz r3,10200(r31)
ffc04dc4: 7f 84 e3 78 mr r4,r28
ffc04dc8: 38 63 00 04 addi r3,r3,4
ffc04dcc: 48 00 11 25 bl ffc05ef0 <rtems_filesystem_global_location_assign>
&rtems_filesystem_root,
new_fs_root
);
rtems_filesystem_global_location_assign(
ffc04dd0: 80 7f 27 d8 lwz r3,10200(r31)
ffc04dd4: 7f a4 eb 78 mr r4,r29
ffc04dd8: 48 00 11 19 bl ffc05ef0 <rtems_filesystem_global_location_assign>
ffc04ddc: 48 00 00 4c b ffc04e28 <mount+0x31c>
rv = register_subordinate_file_system( mt_entry, target );
} else {
rv = register_root_file_system( mt_entry );
}
if ( rv != 0 ) {
ffc04de0: 2f 9e 00 00 cmpwi cr7,r30,0
ffc04de4: 41 be 00 44 beq+ cr7,ffc04e28 <mount+0x31c>
(*mt_entry->ops->fsunmount_me_h)( mt_entry );
ffc04de8: 81 3f 00 0c lwz r9,12(r31)
ffc04dec: 7f e3 fb 78 mr r3,r31
ffc04df0: 81 29 00 3c lwz r9,60(r9)
ffc04df4: 7d 29 03 a6 mtctr r9
ffc04df8: 4e 80 04 21 bctrl
ffc04dfc: 48 00 00 10 b ffc04e0c <mount+0x300>
} else {
errno = EINVAL;
rv = -1;
}
} else {
errno = EINVAL;
ffc04e00: 48 00 b7 ad bl ffc105ac <__errno>
ffc04e04: 39 20 00 16 li r9,22
ffc04e08: 48 00 00 18 b ffc04e20 <mount+0x314>
(*mt_entry->ops->fsunmount_me_h)( mt_entry );
}
}
if ( rv != 0 ) {
free( mt_entry );
ffc04e0c: 7f e3 fb 78 mr r3,r31
ffc04e10: 4b ff f7 4d bl ffc0455c <free>
ffc04e14: 48 00 00 14 b ffc04e28 <mount+0x31c>
}
} else {
errno = ENOMEM;
ffc04e18: 48 00 b7 95 bl ffc105ac <__errno> <== NOT EXECUTED
ffc04e1c: 39 20 00 0c li r9,12 <== NOT EXECUTED
ffc04e20: 91 23 00 00 stw r9,0(r3)
rv = -1;
ffc04e24: 3b c0 ff ff li r30,-1
errno = EINVAL;
rv = -1;
}
return rv;
}
ffc04e28: 39 61 00 90 addi r11,r1,144
ffc04e2c: 7f c3 f3 78 mr r3,r30
ffc04e30: 4b ff b7 64 b ffc00594 <_restgpr_19_x>
ffc093f0 <mount_and_make_target_path>:
const char *target,
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
ffc093f0: 94 21 ff e0 stwu r1,-32(r1)
ffc093f4: 7c 08 02 a6 mflr r0
ffc093f8: bf c1 00 18 stmw r30,24(r1)
int rv = -1;
if (target != NULL) {
ffc093fc: 7c 9f 23 79 mr. r31,r4
const char *target,
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
ffc09400: 90 01 00 24 stw r0,36(r1)
int rv = -1;
if (target != NULL) {
ffc09404: 41 82 00 50 beq- ffc09454 <mount_and_make_target_path+0x64>
ffc09408: 7c 7e 1b 78 mr r30,r3
rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO);
ffc0940c: 90 a1 00 08 stw r5,8(r1)
ffc09410: 7f e3 fb 78 mr r3,r31
ffc09414: 38 80 01 ff li r4,511
ffc09418: 90 c1 00 0c stw r6,12(r1)
ffc0941c: 90 e1 00 10 stw r7,16(r1)
ffc09420: 48 00 0c 05 bl ffc0a024 <rtems_mkdir>
if (rv == 0) {
ffc09424: 2c 03 00 00 cmpwi r3,0
ffc09428: 80 a1 00 08 lwz r5,8(r1)
ffc0942c: 80 c1 00 0c lwz r6,12(r1)
ffc09430: 80 e1 00 10 lwz r7,16(r1)
ffc09434: 40 a2 00 30 bne+ ffc09464 <mount_and_make_target_path+0x74><== NEVER TAKEN
} else {
errno = EINVAL;
}
return rv;
}
ffc09438: 80 01 00 24 lwz r0,36(r1)
int rv = -1;
if (target != NULL) {
rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO);
if (rv == 0) {
rv = mount(
ffc0943c: 7f c3 f3 78 mr r3,r30
ffc09440: 7f e4 fb 78 mr r4,r31
} else {
errno = EINVAL;
}
return rv;
}
ffc09444: bb c1 00 18 lmw r30,24(r1)
ffc09448: 7c 08 03 a6 mtlr r0
ffc0944c: 38 21 00 20 addi r1,r1,32
int rv = -1;
if (target != NULL) {
rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO);
if (rv == 0) {
rv = mount(
ffc09450: 48 00 00 1c b ffc0946c <mount>
options,
data
);
}
} else {
errno = EINVAL;
ffc09454: 48 01 8b 95 bl ffc21fe8 <__errno>
ffc09458: 39 20 00 16 li r9,22
ffc0945c: 91 23 00 00 stw r9,0(r3)
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
int rv = -1;
ffc09460: 38 60 ff ff li r3,-1
} else {
errno = EINVAL;
}
return rv;
}
ffc09464: 39 61 00 20 addi r11,r1,32
ffc09468: 4b ff 81 00 b ffc01568 <_restgpr_30_x>
ffc1845c <msdos_creat_node>:
msdos_node_type_t type,
const char *name,
int name_len,
mode_t mode,
const fat_file_fd_t *link_fd)
{
ffc1845c: 94 21 ff 30 stwu r1,-208(r1)
ffc18460: 7c 08 02 a6 mflr r0
ffc18464: 90 01 00 d4 stw r0,212(r1)
int rc = RC_OK;
ssize_t ret = 0;
msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info;
ffc18468: 81 23 00 14 lwz r9,20(r3)
msdos_node_type_t type,
const char *name,
int name_len,
mode_t mode,
const fat_file_fd_t *link_fd)
{
ffc1846c: be e1 00 ac stmw r23,172(r1)
int rc = RC_OK;
ssize_t ret = 0;
msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info;
fat_file_fd_t *parent_fat_fd = parent_loc->node_access;
fat_file_fd_t *fat_fd = NULL;
ffc18470: 3b a0 00 00 li r29,0
msdos_node_type_t type,
const char *name,
int name_len,
mode_t mode,
const fat_file_fd_t *link_fd)
{
ffc18474: 7c 7c 1b 78 mr r28,r3
int rc = RC_OK;
ssize_t ret = 0;
msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info;
ffc18478: 83 e9 00 08 lwz r31,8(r9)
msdos_node_type_t type,
const char *name,
int name_len,
mode_t mode,
const fat_file_fd_t *link_fd)
{
ffc1847c: 7c 9e 23 78 mr r30,r4
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
dir_pos->sname.ofs = 0;
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
ffc18480: 39 20 ff ff li r9,-1
int rc = RC_OK;
ssize_t ret = 0;
msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info;
fat_file_fd_t *parent_fat_fd = parent_loc->node_access;
ffc18484: 83 63 00 08 lwz r27,8(r3)
uint32_t sec = 0;
uint32_t byte = 0;
fat_dir_pos_init(&dir_pos);
memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
ffc18488: 38 80 00 00 li r4,0
ffc1848c: 91 21 00 90 stw r9,144(r1)
msdos_node_type_t type,
const char *name,
int name_len,
mode_t mode,
const fat_file_fd_t *link_fd)
{
ffc18490: 7c b8 2b 78 mr r24,r5
uint32_t sec = 0;
uint32_t byte = 0;
fat_dir_pos_init(&dir_pos);
memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
ffc18494: 38 61 00 68 addi r3,r1,104
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
ffc18498: 91 21 00 94 stw r9,148(r1)
ffc1849c: 38 a0 00 20 li r5,32
msdos_node_type_t type,
const char *name,
int name_len,
mode_t mode,
const fat_file_fd_t *link_fd)
{
ffc184a0: 7c d9 33 78 mr r25,r6
int rc = RC_OK;
ssize_t ret = 0;
msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info;
fat_file_fd_t *parent_fat_fd = parent_loc->node_access;
fat_file_fd_t *fat_fd = NULL;
ffc184a4: 93 a1 00 98 stw r29,152(r1)
msdos_node_type_t type,
const char *name,
int name_len,
mode_t mode,
const fat_file_fd_t *link_fd)
{
ffc184a8: 7d 1a 43 78 mr r26,r8
ssize_t ret = 0;
msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info;
fat_file_fd_t *parent_fat_fd = parent_loc->node_access;
fat_file_fd_t *fat_fd = NULL;
time_t time_ret = 0;
uint16_t time_val = 0;
ffc184ac: b3 a1 00 9e sth r29,158(r1)
uint16_t date = 0;
ffc184b0: b3 a1 00 9c sth r29,156(r1)
static inline void
fat_dir_pos_init(
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
ffc184b4: 93 a1 00 88 stw r29,136(r1)
dir_pos->sname.ofs = 0;
ffc184b8: 93 a1 00 8c stw r29,140(r1)
uint32_t sec = 0;
uint32_t byte = 0;
fat_dir_pos_init(&dir_pos);
memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
ffc184bc: 48 00 4a 01 bl ffc1cebc <memset>
memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2);
ffc184c0: 38 61 00 08 addi r3,r1,8
ffc184c4: 38 80 00 00 li r4,0
ffc184c8: 38 a0 00 40 li r5,64
ffc184cc: 48 00 49 f1 bl ffc1cebc <memset>
if (name_len > MSDOS_NAME_MAX_LFN_WITH_DOT) {
ffc184d0: 2f 99 01 04 cmpwi cr7,r25,260
ffc184d4: 40 bd 00 10 ble+ cr7,ffc184e4 <msdos_creat_node+0x88> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one(ENAMETOOLONG);
ffc184d8: 48 00 3c 11 bl ffc1c0e8 <__errno> <== NOT EXECUTED
ffc184dc: 39 20 00 5b li r9,91 <== NOT EXECUTED
ffc184e0: 48 00 00 28 b ffc18508 <msdos_creat_node+0xac> <== NOT EXECUTED
}
name_type = msdos_long_to_short (name, name_len,
ffc184e4: 7f 03 c3 78 mr r3,r24
ffc184e8: 7f 24 cb 78 mr r4,r25
ffc184ec: 38 a1 00 68 addi r5,r1,104
ffc184f0: 38 c0 00 0b li r6,11
ffc184f4: 48 00 04 8d bl ffc18980 <msdos_long_to_short>
MSDOS_DIR_NAME(short_node),
MSDOS_NAME_MAX);
if (name_type == MSDOS_NAME_INVALID) {
ffc184f8: 7c 77 1b 79 mr. r23,r3
ffc184fc: 40 a2 00 18 bne+ ffc18514 <msdos_creat_node+0xb8> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one(EINVAL);
ffc18500: 48 00 3b e9 bl ffc1c0e8 <__errno> <== NOT EXECUTED
ffc18504: 39 20 00 16 li r9,22 <== NOT EXECUTED
ffc18508: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED
ffc1850c: 3b a0 ff ff li r29,-1 <== NOT EXECUTED
ffc18510: 48 00 02 dc b ffc187ec <msdos_creat_node+0x390> <== NOT EXECUTED
}
/* fill reserved field */
*MSDOS_DIR_NT_RES(short_node) = MSDOS_RES_NT_VALUE;
ffc18514: 39 20 00 00 li r9,0
/* set up last write date and time */
time_ret = time(NULL);
ffc18518: 38 60 00 00 li r3,0
if (name_type == MSDOS_NAME_INVALID) {
rtems_set_errno_and_return_minus_one(EINVAL);
}
/* fill reserved field */
*MSDOS_DIR_NT_RES(short_node) = MSDOS_RES_NT_VALUE;
ffc1851c: 99 21 00 74 stb r9,116(r1)
/* set up last write date and time */
time_ret = time(NULL);
ffc18520: 48 00 87 ed bl ffc20d0c <time>
if ( time_ret == -1 )
ffc18524: 2f 83 ff ff cmpwi cr7,r3,-1
ffc18528: 40 be 00 08 bne+ cr7,ffc18530 <msdos_creat_node+0xd4> <== ALWAYS TAKEN
ffc1852c: 4b ff ff e0 b ffc1850c <msdos_creat_node+0xb0> <== NOT EXECUTED
return -1;
msdos_date_unix2dos(time_ret, &date, &time_val);
ffc18530: 38 81 00 9c addi r4,r1,156
ffc18534: 38 a1 00 9e addi r5,r1,158
ffc18538: 48 00 2c 81 bl ffc1b1b8 <msdos_date_unix2dos>
*MSDOS_DIR_CRT_TIME(short_node) = CT_LE_W(time_val);
ffc1853c: a1 21 00 9e lhz r9,158(r1)
*MSDOS_DIR_LAST_ACCESS_DATE(short_node) = CT_LE_W(date);
/* initialize directory/file size */
*MSDOS_DIR_FILE_SIZE(short_node) = MSDOS_INIT_DIR_SIZE;
if (type == MSDOS_DIRECTORY) {
ffc18540: 2f 9e 00 00 cmpwi cr7,r30,0
*MSDOS_DIR_WRITE_TIME(short_node) = CT_LE_W(time_val);
*MSDOS_DIR_WRITE_DATE(short_node) = CT_LE_W(date);
*MSDOS_DIR_LAST_ACCESS_DATE(short_node) = CT_LE_W(date);
/* initialize directory/file size */
*MSDOS_DIR_FILE_SIZE(short_node) = MSDOS_INIT_DIR_SIZE;
ffc18544: 93 a1 00 84 stw r29,132(r1)
time_ret = time(NULL);
if ( time_ret == -1 )
return -1;
msdos_date_unix2dos(time_ret, &date, &time_val);
*MSDOS_DIR_CRT_TIME(short_node) = CT_LE_W(time_val);
ffc18548: 55 28 c2 3e rlwinm r8,r9,24,8,31
ffc1854c: 55 2a 44 2e rlwinm r10,r9,8,16,23
ffc18550: 7d 4a 43 78 or r10,r10,r8
*MSDOS_DIR_CRT_DATE(short_node) = CT_LE_W(date);
ffc18554: a1 01 00 9c lhz r8,156(r1)
time_ret = time(NULL);
if ( time_ret == -1 )
return -1;
msdos_date_unix2dos(time_ret, &date, &time_val);
*MSDOS_DIR_CRT_TIME(short_node) = CT_LE_W(time_val);
ffc18558: b1 41 00 76 sth r10,118(r1)
*MSDOS_DIR_CRT_DATE(short_node) = CT_LE_W(date);
ffc1855c: 55 07 c2 3e rlwinm r7,r8,24,8,31
ffc18560: 55 09 44 2e rlwinm r9,r8,8,16,23
*MSDOS_DIR_WRITE_TIME(short_node) = CT_LE_W(time_val);
ffc18564: b1 41 00 7e sth r10,126(r1)
if ( time_ret == -1 )
return -1;
msdos_date_unix2dos(time_ret, &date, &time_val);
*MSDOS_DIR_CRT_TIME(short_node) = CT_LE_W(time_val);
*MSDOS_DIR_CRT_DATE(short_node) = CT_LE_W(date);
ffc18568: 7d 29 3b 78 or r9,r9,r7
ffc1856c: b1 21 00 78 sth r9,120(r1)
*MSDOS_DIR_WRITE_TIME(short_node) = CT_LE_W(time_val);
*MSDOS_DIR_WRITE_DATE(short_node) = CT_LE_W(date);
ffc18570: b1 21 00 80 sth r9,128(r1)
*MSDOS_DIR_LAST_ACCESS_DATE(short_node) = CT_LE_W(date);
ffc18574: b1 21 00 7a sth r9,122(r1)
/* initialize directory/file size */
*MSDOS_DIR_FILE_SIZE(short_node) = MSDOS_INIT_DIR_SIZE;
if (type == MSDOS_DIRECTORY) {
ffc18578: 40 9e 00 10 bne- cr7,ffc18588 <msdos_creat_node+0x12c>
*MSDOS_DIR_ATTR(short_node) |= MSDOS_ATTR_DIRECTORY;
ffc1857c: 89 21 00 73 lbz r9,115(r1)
ffc18580: 61 29 00 10 ori r9,r9,16
ffc18584: 48 00 00 b8 b ffc1863c <msdos_creat_node+0x1e0>
}
else if (type == MSDOS_HARD_LINK) {
ffc18588: 2f 9e 00 02 cmpwi cr7,r30,2
* set "archive bit" due to changes
*/
*MSDOS_DIR_ATTR(short_node) |= MSDOS_ATTR_ARCHIVE;
}
else { /* regular file... */
*MSDOS_DIR_ATTR(short_node) |= MSDOS_ATTR_ARCHIVE;
ffc1858c: 89 21 00 73 lbz r9,115(r1)
ffc18590: 61 29 00 20 ori r9,r9,32
*MSDOS_DIR_FILE_SIZE(short_node) = MSDOS_INIT_DIR_SIZE;
if (type == MSDOS_DIRECTORY) {
*MSDOS_DIR_ATTR(short_node) |= MSDOS_ATTR_DIRECTORY;
}
else if (type == MSDOS_HARD_LINK) {
ffc18594: 40 be 00 a8 bne+ cr7,ffc1863c <msdos_creat_node+0x1e0> <== ALWAYS TAKEN
* node to the newly created
*/
/*
* read the original directory entry
*/
sec = fat_cluster_num_to_sector_num(&fs_info->fat,
ffc18598: 81 5a 00 20 lwz r10,32(r26) <== 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)) )
ffc1859c: 2f 8a 00 00 cmpwi cr7,r10,0 <== NOT EXECUTED
ffc185a0: 40 9e 00 18 bne- cr7,ffc185b8 <msdos_creat_node+0x15c> <== NOT EXECUTED
ffc185a4: 89 3f 00 0e lbz r9,14(r31) <== NOT EXECUTED
ffc185a8: 71 28 00 03 andi. r8,r9,3 <== NOT EXECUTED
ffc185ac: 41 a2 00 0c beq+ ffc185b8 <msdos_creat_node+0x15c> <== NOT EXECUTED
return fs_info->vol.rdir_loc;
ffc185b0: 81 5f 00 20 lwz r10,32(r31) <== NOT EXECUTED
ffc185b4: 48 00 00 18 b ffc185cc <msdos_creat_node+0x170> <== NOT EXECUTED
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
ffc185b8: 89 3f 00 05 lbz r9,5(r31) <== NOT EXECUTED
ffc185bc: 39 4a ff fe addi r10,r10,-2 <== NOT EXECUTED
ffc185c0: 7d 4a 48 30 slw r10,r10,r9 <== NOT EXECUTED
ffc185c4: 81 3f 00 34 lwz r9,52(r31) <== NOT EXECUTED
ffc185c8: 7d 4a 4a 14 add r10,r10,r9 <== NOT EXECUTED
link_fd->dir_pos.sname.cln);
sec += (link_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
ffc185cc: 81 3a 00 24 lwz r9,36(r26) <== NOT EXECUTED
byte = (link_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1));
ret = _fat_block_read(&fs_info->fat,
ffc185d0: 7f e3 fb 78 mr r3,r31 <== 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);
ffc185d4: 88 9f 00 02 lbz r4,2(r31) <== NOT EXECUTED
byte = (link_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1));
ret = _fat_block_read(&fs_info->fat,
ffc185d8: 38 c0 00 20 li r6,32 <== 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));
ffc185dc: a0 bf 00 00 lhz r5,0(r31) <== NOT EXECUTED
ret = _fat_block_read(&fs_info->fat,
ffc185e0: 38 e1 00 48 addi r7,r1,72 <== 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);
ffc185e4: 7d 24 24 30 srw r4,r9,r4 <== NOT EXECUTED
byte = (link_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1));
ffc185e8: 38 a5 ff ff addi r5,r5,-1 <== NOT EXECUTED
ret = _fat_block_read(&fs_info->fat,
ffc185ec: 7c 8a 22 14 add r4,r10,r4 <== NOT EXECUTED
ffc185f0: 7c a5 48 38 and r5,r5,r9 <== NOT EXECUTED
ffc185f4: 4b ff b6 7d bl ffc13c70 <_fat_block_read> <== NOT EXECUTED
sec, byte, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE,
link_node);
if (ret < 0) {
ffc185f8: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc185fc: 41 bc ff 10 blt- cr7,ffc1850c <msdos_creat_node+0xb0> <== NOT EXECUTED
}
/*
* copy various attributes
*/
*MSDOS_DIR_ATTR(short_node) =*MSDOS_DIR_ATTR(link_node);
*MSDOS_DIR_CRT_TIME_TENTH(short_node)=*MSDOS_DIR_CRT_TIME_TENTH(link_node);
ffc18600: 89 21 00 55 lbz r9,85(r1) <== NOT EXECUTED
return -1;
}
/*
* copy various attributes
*/
*MSDOS_DIR_ATTR(short_node) =*MSDOS_DIR_ATTR(link_node);
ffc18604: 89 41 00 53 lbz r10,83(r1) <== NOT EXECUTED
*MSDOS_DIR_CRT_TIME_TENTH(short_node)=*MSDOS_DIR_CRT_TIME_TENTH(link_node);
ffc18608: 99 21 00 75 stb r9,117(r1) <== NOT EXECUTED
*MSDOS_DIR_CRT_TIME(short_node) =*MSDOS_DIR_CRT_TIME(link_node);
ffc1860c: a1 21 00 56 lhz r9,86(r1) <== NOT EXECUTED
ffc18610: b1 21 00 76 sth r9,118(r1) <== NOT EXECUTED
*MSDOS_DIR_CRT_DATE(short_node) =*MSDOS_DIR_CRT_DATE(link_node);
ffc18614: a1 21 00 58 lhz r9,88(r1) <== NOT EXECUTED
ffc18618: b1 21 00 78 sth r9,120(r1) <== NOT EXECUTED
/*
* copy/set "file size", "first cluster"
*/
*MSDOS_DIR_FILE_SIZE(short_node) =*MSDOS_DIR_FILE_SIZE(link_node);
ffc1861c: 81 21 00 64 lwz r9,100(r1) <== NOT EXECUTED
ffc18620: 91 21 00 84 stw r9,132(r1) <== NOT EXECUTED
*MSDOS_DIR_FIRST_CLUSTER_LOW(short_node) =
ffc18624: a1 21 00 62 lhz r9,98(r1) <== NOT EXECUTED
ffc18628: b1 21 00 82 sth r9,130(r1) <== NOT EXECUTED
*MSDOS_DIR_FIRST_CLUSTER_LOW(link_node);
*MSDOS_DIR_FIRST_CLUSTER_HI(short_node) =
ffc1862c: a1 21 00 5c lhz r9,92(r1) <== NOT EXECUTED
ffc18630: b1 21 00 7c sth r9,124(r1) <== NOT EXECUTED
*MSDOS_DIR_FIRST_CLUSTER_HI(link_node);
/*
* set "archive bit" due to changes
*/
*MSDOS_DIR_ATTR(short_node) |= MSDOS_ATTR_ARCHIVE;
ffc18634: 61 49 00 20 ori r9,r10,32 <== NOT EXECUTED
ffc18638: 48 00 00 04 b ffc1863c <msdos_creat_node+0x1e0> <== NOT EXECUTED
/*
* 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,
name_type, &dir_pos, short_node);
ffc1863c: 3b 41 00 68 addi r26,r1,104
* set "archive bit" due to changes
*/
*MSDOS_DIR_ATTR(short_node) |= MSDOS_ATTR_ARCHIVE;
}
else { /* regular file... */
*MSDOS_DIR_ATTR(short_node) |= MSDOS_ATTR_ARCHIVE;
ffc18640: 99 21 00 73 stb r9,115(r1)
/*
* 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,
ffc18644: 7f 83 e3 78 mr r3,r28
ffc18648: 38 80 00 01 li r4,1
ffc1864c: 7f 05 c3 78 mr r5,r24
ffc18650: 7f 26 cb 78 mr r6,r25
ffc18654: 7e e7 bb 78 mr r7,r23
ffc18658: 39 01 00 88 addi r8,r1,136
ffc1865c: 7f 49 d3 78 mr r9,r26
ffc18660: 48 00 15 e5 bl ffc19c44 <msdos_get_name_node>
name_type, &dir_pos, short_node);
if ( rc != RC_OK )
ffc18664: 7c 7d 1b 79 mr. r29,r3
ffc18668: 40 82 01 84 bne- ffc187ec <msdos_creat_node+0x390>
/*
* if we create a new file we are done, if directory there are more steps
* to do
*/
if (type == MSDOS_DIRECTORY)
ffc1866c: 2f 9e 00 00 cmpwi cr7,r30,0
ffc18670: 40 be 01 7c bne+ cr7,ffc187ec <msdos_creat_node+0x390>
{
/* open new directory as fat-file */
rc = fat_file_open(&fs_info->fat, &dir_pos, &fat_fd);
ffc18674: 7f e3 fb 78 mr r3,r31
ffc18678: 38 81 00 88 addi r4,r1,136
ffc1867c: 38 a1 00 98 addi r5,r1,152
ffc18680: 4b ff a7 65 bl ffc12de4 <fat_file_open>
if (rc != RC_OK)
ffc18684: 7c 7d 1b 79 mr. r29,r3
ffc18688: 40 82 01 54 bne- ffc187dc <msdos_creat_node+0x380> <== NEVER TAKEN
/*
* we opened fat-file for node we just created, so initialize fat-file
* descritor
*/
fat_fd->fat_file_size = 0;
ffc1868c: 80 81 00 98 lwz r4,152(r1)
fat_fd->fat_file_type = FAT_DIRECTORY;
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
ffc18690: 3d 20 00 20 lis r9,32
/*
* dot and dotdot entries are identical to new node except the
* names
*/
memcpy(DOT_NODE_P(dot_dotdot), short_node,
ffc18694: 3b a1 00 08 addi r29,r1,8
* we opened fat-file for node we just created, so initialize fat-file
* descritor
*/
fat_fd->fat_file_size = 0;
fat_fd->fat_file_type = FAT_DIRECTORY;
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
ffc18698: 91 24 00 14 stw r9,20(r4)
* dot and dotdot entries are identical to new node except the
* names
*/
memcpy(DOT_NODE_P(dot_dotdot), short_node,
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
memcpy(DOTDOT_NODE_P(dot_dotdot), short_node,
ffc1869c: 38 61 00 28 addi r3,r1,40
/*
* we opened fat-file for node we just created, so initialize fat-file
* descritor
*/
fat_fd->fat_file_size = 0;
ffc186a0: 93 c4 00 18 stw r30,24(r4)
fat_fd->fat_file_type = FAT_DIRECTORY;
ffc186a4: 93 c4 00 10 stw r30,16(r4)
/*
* dot and dotdot entries are identical to new node except the
* names
*/
memcpy(DOT_NODE_P(dot_dotdot), short_node,
ffc186a8: 7c ba 04 aa lswi r5,r26,32
ffc186ac: 7c bd 05 aa stswi r5,r29,32
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
memcpy(DOTDOT_NODE_P(dot_dotdot), short_node,
ffc186b0: 7c ba 04 aa lswi r5,r26,32
ffc186b4: 7c a3 05 aa stswi r5,r3,32
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
memcpy(MSDOS_DIR_NAME(DOT_NODE_P(dot_dotdot)), MSDOS_DOT_NAME,
ffc186b8: 3d 20 00 00 lis r9,0
ffc186bc: 81 29 27 e4 lwz r9,10212(r9)
ffc186c0: 7c a9 5c aa lswi r5,r9,11
ffc186c4: 7c bd 5d aa stswi r5,r29,11
MSDOS_NAME_MAX);
memcpy(MSDOS_DIR_NAME(DOTDOT_NODE_P(dot_dotdot)), MSDOS_DOTDOT_NAME,
ffc186c8: 3d 20 00 00 lis r9,0
ffc186cc: 81 29 27 e0 lwz r9,10208(r9)
ffc186d0: 7c a9 5c aa lswi r5,r9,11
ffc186d4: 7c a3 5d aa stswi r5,r3,11
/*
* 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)) &&
ffc186d8: 81 3b 00 20 lwz r9,32(r27)
ffc186dc: 2f 89 00 01 cmpwi cr7,r9,1
ffc186e0: 40 be 00 2c bne+ cr7,ffc1870c <msdos_creat_node+0x2b0>
ffc186e4: 81 3b 00 24 lwz r9,36(r27)
ffc186e8: 2f 89 00 00 cmpwi cr7,r9,0
ffc186ec: 40 9e 00 20 bne- cr7,ffc1870c <msdos_creat_node+0x2b0> <== NEVER TAKEN
(fs_info->fat.vol.type & FAT_FAT32))
ffc186f0: 89 3f 00 0e lbz r9,14(r31)
/*
* 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)) &&
ffc186f4: 55 29 07 7a rlwinm r9,r9,0,29,29
ffc186f8: 71 2a 00 ff andi. r10,r9,255
ffc186fc: 41 82 00 10 beq- ffc1870c <msdos_creat_node+0x2b0> <== ALWAYS TAKEN
(fs_info->fat.vol.type & FAT_FAT32))
{
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOTDOT_NODE_P(dot_dotdot)) = 0x0000;
ffc18700: b3 c1 00 42 sth r30,66(r1) <== NOT EXECUTED
*MSDOS_DIR_FIRST_CLUSTER_HI(DOTDOT_NODE_P(dot_dotdot)) = 0x0000;
ffc18704: b3 c1 00 3c sth r30,60(r1) <== NOT EXECUTED
ffc18708: 48 00 00 2c b ffc18734 <msdos_creat_node+0x2d8> <== NOT EXECUTED
}
else
{
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOTDOT_NODE_P(dot_dotdot)) =
CT_LE_W((uint16_t )((parent_fat_fd->cln) & 0x0000FFFF));
ffc1870c: 81 3b 00 1c lwz r9,28(r27)
ffc18710: 55 28 42 2e rlwinm r8,r9,8,8,23
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOTDOT_NODE_P(dot_dotdot)) = 0x0000;
*MSDOS_DIR_FIRST_CLUSTER_HI(DOTDOT_NODE_P(dot_dotdot)) = 0x0000;
}
else
{
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOTDOT_NODE_P(dot_dotdot)) =
ffc18714: 55 2a c6 3e rlwinm r10,r9,24,24,31
ffc18718: 7d 0a 53 78 or r10,r8,r10
CT_LE_W((uint16_t )((parent_fat_fd->cln) & 0x0000FFFF));
*MSDOS_DIR_FIRST_CLUSTER_HI(DOTDOT_NODE_P(dot_dotdot)) =
CT_LE_W((uint16_t )(((parent_fat_fd->cln) & 0xFFFF0000)>>16));
ffc1871c: 55 29 84 3e rlwinm r9,r9,16,16,31
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOTDOT_NODE_P(dot_dotdot)) = 0x0000;
*MSDOS_DIR_FIRST_CLUSTER_HI(DOTDOT_NODE_P(dot_dotdot)) = 0x0000;
}
else
{
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOTDOT_NODE_P(dot_dotdot)) =
ffc18720: b1 41 00 42 sth r10,66(r1)
CT_LE_W((uint16_t )((parent_fat_fd->cln) & 0x0000FFFF));
*MSDOS_DIR_FIRST_CLUSTER_HI(DOTDOT_NODE_P(dot_dotdot)) =
CT_LE_W((uint16_t )(((parent_fat_fd->cln) & 0xFFFF0000)>>16));
ffc18724: 55 2a 40 2e rlwinm r10,r9,8,0,23
}
else
{
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOTDOT_NODE_P(dot_dotdot)) =
CT_LE_W((uint16_t )((parent_fat_fd->cln) & 0x0000FFFF));
*MSDOS_DIR_FIRST_CLUSTER_HI(DOTDOT_NODE_P(dot_dotdot)) =
ffc18728: 55 29 c2 3e rlwinm r9,r9,24,8,31
ffc1872c: 7d 49 4b 78 or r9,r10,r9
ffc18730: b1 21 00 3c sth r9,60(r1)
/*
* 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,
ffc18734: 7f e3 fb 78 mr r3,r31
ffc18738: 38 a0 00 00 li r5,0
ffc1873c: 38 c0 00 40 li r6,64
ffc18740: 38 e1 00 08 addi r7,r1,8
ffc18744: 4b ff ae f5 bl ffc13638 <fat_file_write>
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2,
(uint8_t *)dot_dotdot);
if (ret < 0)
ffc18748: 2f 83 00 00 cmpwi cr7,r3,0
ffc1874c: 41 9c 00 80 blt- cr7,ffc187cc <msdos_creat_node+0x370> <== NEVER TAKEN
rc = -1;
goto error;
}
/* increment fat-file size by cluster size */
fat_fd->fat_file_size += fs_info->fat.vol.bpc;
ffc18750: 80 81 00 98 lwz r4,152(r1)
CT_LE_W((uint16_t )((fat_fd->cln) & 0x0000FFFF));
*MSDOS_DIR_FIRST_CLUSTER_HI(DOT_NODE_P(dot_dotdot)) =
CT_LE_W((uint16_t )(((fat_fd->cln) & 0xFFFF0000) >> 16));
/* rewrite dot entry */
ret = fat_file_write(&fs_info->fat, fat_fd, 0,
ffc18754: 7f e3 fb 78 mr r3,r31
rc = -1;
goto error;
}
/* increment fat-file size by cluster size */
fat_fd->fat_file_size += fs_info->fat.vol.bpc;
ffc18758: a1 5f 00 06 lhz r10,6(r31)
CT_LE_W((uint16_t )((fat_fd->cln) & 0x0000FFFF));
*MSDOS_DIR_FIRST_CLUSTER_HI(DOT_NODE_P(dot_dotdot)) =
CT_LE_W((uint16_t )(((fat_fd->cln) & 0xFFFF0000) >> 16));
/* rewrite dot entry */
ret = fat_file_write(&fs_info->fat, fat_fd, 0,
ffc1875c: 38 a0 00 00 li r5,0
rc = -1;
goto error;
}
/* increment fat-file size by cluster size */
fat_fd->fat_file_size += fs_info->fat.vol.bpc;
ffc18760: 81 24 00 18 lwz r9,24(r4)
CT_LE_W((uint16_t )((fat_fd->cln) & 0x0000FFFF));
*MSDOS_DIR_FIRST_CLUSTER_HI(DOT_NODE_P(dot_dotdot)) =
CT_LE_W((uint16_t )(((fat_fd->cln) & 0xFFFF0000) >> 16));
/* rewrite dot entry */
ret = fat_file_write(&fs_info->fat, fat_fd, 0,
ffc18764: 38 c0 00 20 li r6,32
ffc18768: 38 e1 00 08 addi r7,r1,8
rc = -1;
goto error;
}
/* increment fat-file size by cluster size */
fat_fd->fat_file_size += fs_info->fat.vol.bpc;
ffc1876c: 7d 29 52 14 add r9,r9,r10
ffc18770: 91 24 00 18 stw r9,24(r4)
/* 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));
ffc18774: 81 24 00 1c lwz r9,28(r4)
ffc18778: 55 28 42 2e rlwinm r8,r9,8,8,23
/* increment fat-file size by cluster size */
fat_fd->fat_file_size += fs_info->fat.vol.bpc;
/* set up cluster num for dot entry */
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOT_NODE_P(dot_dotdot)) =
ffc1877c: 55 2a c6 3e rlwinm r10,r9,24,24,31
ffc18780: 7d 0a 53 78 or r10,r8,r10
CT_LE_W((uint16_t )((fat_fd->cln) & 0x0000FFFF));
*MSDOS_DIR_FIRST_CLUSTER_HI(DOT_NODE_P(dot_dotdot)) =
CT_LE_W((uint16_t )(((fat_fd->cln) & 0xFFFF0000) >> 16));
ffc18784: 55 29 84 3e rlwinm r9,r9,16,16,31
/* increment fat-file size by cluster size */
fat_fd->fat_file_size += fs_info->fat.vol.bpc;
/* set up cluster num for dot entry */
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOT_NODE_P(dot_dotdot)) =
ffc18788: b1 41 00 22 sth r10,34(r1)
CT_LE_W((uint16_t )((fat_fd->cln) & 0x0000FFFF));
*MSDOS_DIR_FIRST_CLUSTER_HI(DOT_NODE_P(dot_dotdot)) =
CT_LE_W((uint16_t )(((fat_fd->cln) & 0xFFFF0000) >> 16));
ffc1878c: 55 2a 40 2e rlwinm r10,r9,8,0,23
fat_fd->fat_file_size += fs_info->fat.vol.bpc;
/* 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));
*MSDOS_DIR_FIRST_CLUSTER_HI(DOT_NODE_P(dot_dotdot)) =
ffc18790: 55 29 c2 3e rlwinm r9,r9,24,8,31
ffc18794: 7d 49 4b 78 or r9,r10,r9
ffc18798: b1 21 00 1c sth r9,28(r1)
CT_LE_W((uint16_t )(((fat_fd->cln) & 0xFFFF0000) >> 16));
/* rewrite dot entry */
ret = fat_file_write(&fs_info->fat, fat_fd, 0,
ffc1879c: 4b ff ae 9d bl ffc13638 <fat_file_write>
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE,
(uint8_t *)DOT_NODE_P(dot_dotdot));
if (ret < 0)
ffc187a0: 2f 83 00 00 cmpwi cr7,r3,0
ffc187a4: 41 9c 00 28 blt- cr7,ffc187cc <msdos_creat_node+0x370> <== 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);
ffc187a8: 80 7c 00 14 lwz r3,20(r28)
ffc187ac: 80 81 00 98 lwz r4,152(r1)
ffc187b0: 48 00 04 d1 bl ffc18c80 <msdos_set_first_cluster_num>
if (rc != RC_OK)
ffc187b4: 7c 7d 1b 79 mr. r29,r3
ffc187b8: 40 a2 00 18 bne+ ffc187d0 <msdos_creat_node+0x374> <== NEVER TAKEN
goto error;
fat_file_close(&fs_info->fat, fat_fd);
ffc187bc: 80 81 00 98 lwz r4,152(r1)
ffc187c0: 7f e3 fb 78 mr r3,r31
ffc187c4: 4b ff aa 91 bl ffc13254 <fat_file_close>
ffc187c8: 48 00 00 24 b ffc187ec <msdos_creat_node+0x390>
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;
ffc187cc: 3b a0 ff ff li r29,-1 <== NOT EXECUTED
fat_file_close(&fs_info->fat, fat_fd);
}
return RC_OK;
error:
fat_file_close(&fs_info->fat, fat_fd);
ffc187d0: 80 81 00 98 lwz r4,152(r1) <== NOT EXECUTED
ffc187d4: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc187d8: 4b ff aa 7d bl ffc13254 <fat_file_close> <== 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);
ffc187dc: 80 7c 00 14 lwz r3,20(r28) <== NOT EXECUTED
ffc187e0: 38 81 00 88 addi r4,r1,136 <== NOT EXECUTED
ffc187e4: 38 a0 00 e5 li r5,229 <== NOT EXECUTED
ffc187e8: 48 00 05 e5 bl ffc18dcc <msdos_set_first_char4file_name><== NOT EXECUTED
return rc;
}
ffc187ec: 39 61 00 d0 addi r11,r1,208
ffc187f0: 7f a3 eb 78 mr r3,r29
ffc187f4: 4b fe 8d e8 b ffc015dc <_restgpr_23_x>
ffc1b2ec <msdos_date_dos2unix>:
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;
ffc1b2ec: 54 8a ae fe rlwinm r10,r4,21,27,31
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
ffc1b2f0: 54 89 de be rlwinm r9,r4,27,26,31
+ ((dt & MSDOS_DT_HOURS_MASK) >> MSDOS_DT_HOURS_SHIFT) * 3600;
ffc1b2f4: 1d 4a 07 08 mulli r10,r10,1800
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
ffc1b2f8: 1d 29 00 1e mulli r9,r9,30
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)
ffc1b2fc: 54 84 06 fe clrlwi r4,r4,27
+ ((dt & MSDOS_DT_MINUTES_MASK) >> MSDOS_DT_MINUTES_SHIFT) * 60
+ ((dt & MSDOS_DT_HOURS_MASK) >> MSDOS_DT_HOURS_SHIFT) * 3600;
ffc1b300: 7d 2a 4a 14 add r9,r10,r9
ffc1b304: 7c 89 22 14 add r4,r9,r4
/*
* If the year, month, and day from the last conversion are the
* same then use the saved value.
*/
if (lastdosdate != dd) {
ffc1b308: 3d 20 00 00 lis r9,0
ffc1b30c: 39 29 2a e8 addi r9,r9,10984
ffc1b310: a1 49 00 0e lhz r10,14(r9)
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)
ffc1b314: 54 84 08 3c rlwinm r4,r4,1,0,30
+ ((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) {
ffc1b318: 7f 8a 18 00 cmpw cr7,r10,r3
ffc1b31c: 41 9e 00 ac beq- cr7,ffc1b3c8 <msdos_date_dos2unix+0xdc>
lastdosdate = dd;
days = 0;
year = (dd & MSDOS_DD_YEAR_MASK) >> MSDOS_DD_YEAR_SHIFT;
ffc1b320: 54 68 be 7e rlwinm r8,r3,23,25,31
/*
* If the year, month, and day from the last conversion are the
* same then use the saved value.
*/
if (lastdosdate != dd) {
lastdosdate = dd;
ffc1b324: b0 69 00 0e sth r3,14(r9)
days = 0;
year = (dd & MSDOS_DD_YEAR_MASK) >> MSDOS_DD_YEAR_SHIFT;
for (y = 0; y < year; y++)
ffc1b328: 39 08 00 01 addi r8,r8,1
* 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;
ffc1b32c: 39 20 00 00 li r9,0
year = (dd & MSDOS_DD_YEAR_MASK) >> MSDOS_DD_YEAR_SHIFT;
for (y = 0; y < year; y++)
ffc1b330: 7d 09 03 a6 mtctr r8
ffc1b334: 39 40 00 00 li r10,0
ffc1b338: 48 00 00 18 b ffc1b350 <msdos_date_dos2unix+0x64>
days += y & 0x03 ? 365 : 366;
ffc1b33c: 7d 08 00 34 cntlzw r8,r8
ffc1b340: 55 08 d9 7e rlwinm r8,r8,27,5,31
ffc1b344: 39 08 01 6d addi r8,r8,365
ffc1b348: 7d 29 42 14 add r9,r9,r8
*/
if (lastdosdate != dd) {
lastdosdate = dd;
days = 0;
year = (dd & MSDOS_DD_YEAR_MASK) >> MSDOS_DD_YEAR_SHIFT;
for (y = 0; y < year; y++)
ffc1b34c: 39 4a 00 01 addi r10,r10,1
ffc1b350: 55 48 07 be clrlwi r8,r10,30
ffc1b354: 42 00 ff e8 bdnz+ ffc1b33c <msdos_date_dos2unix+0x50>
days += y & 0x03 ? 365 : 366;
months = year & 0x03 ? regyear : leapyear;
ffc1b358: 2f 88 00 00 cmpwi cr7,r8,0
ffc1b35c: 3d 40 00 00 lis r10,0
ffc1b360: 39 4a 22 ac addi r10,r10,8876
ffc1b364: 41 9e 00 0c beq- cr7,ffc1b370 <msdos_date_dos2unix+0x84><== ALWAYS TAKEN
ffc1b368: 7d 48 53 78 mr r8,r10 <== NOT EXECUTED
ffc1b36c: 48 00 00 08 b ffc1b374 <msdos_date_dos2unix+0x88> <== NOT EXECUTED
ffc1b370: 39 0a 00 18 addi r8,r10,24
/*
* Prevent going from 0 to 0xffffffff in the following
* loop.
*/
month = (dd & MSDOS_DD_MONTH_MASK) >> MSDOS_DD_MONTH_SHIFT;
if (month == 0) {
ffc1b374: 54 67 df 3f rlwinm. r7,r3,27,28,31
ffc1b378: 40 82 00 08 bne- ffc1b380 <msdos_date_dos2unix+0x94> <== ALWAYS TAKEN
month = 1;
ffc1b37c: 38 e0 00 01 li r7,1 <== NOT EXECUTED
}
for (m = 0; m < month - 1; m++)
ffc1b380: 39 40 00 00 li r10,0
ffc1b384: 7c e9 03 a6 mtctr r7
ffc1b388: 48 00 00 14 b ffc1b39c <msdos_date_dos2unix+0xb0>
* Convert from dos' idea of time to unix'. This will probably only be
* 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)
ffc1b38c: 55 47 08 3c rlwinm r7,r10,1,0,30 <== NOT EXECUTED
month = (dd & MSDOS_DD_MONTH_MASK) >> MSDOS_DD_MONTH_SHIFT;
if (month == 0) {
month = 1;
}
for (m = 0; m < month - 1; m++)
days += months[m];
ffc1b390: 7c e8 3a 2e lhzx r7,r8,r7 <== NOT EXECUTED
*/
month = (dd & MSDOS_DD_MONTH_MASK) >> MSDOS_DD_MONTH_SHIFT;
if (month == 0) {
month = 1;
}
for (m = 0; m < month - 1; m++)
ffc1b394: 39 4a 00 01 addi r10,r10,1 <== NOT EXECUTED
days += months[m];
ffc1b398: 7d 29 3a 14 add r9,r9,r7 <== NOT EXECUTED
*/
month = (dd & MSDOS_DD_MONTH_MASK) >> MSDOS_DD_MONTH_SHIFT;
if (month == 0) {
month = 1;
}
for (m = 0; m < month - 1; m++)
ffc1b39c: 42 00 ff f0 bdnz+ ffc1b38c <msdos_date_dos2unix+0xa0>
days += months[m];
days += ((dd & MSDOS_DD_DAY_MASK) >> MSDOS_DD_DAY_SHIFT) - 1;
ffc1b3a0: 54 63 06 fe clrlwi r3,r3,27
ffc1b3a4: 38 63 ff ff addi r3,r3,-1
lastseconds = (days + DAYSTO1980) * SECONDSPERDAY;
ffc1b3a8: 3d 40 00 01 lis r10,1
ffc1b3ac: 61 4a 51 80 ori r10,r10,20864
if (month == 0) {
month = 1;
}
for (m = 0; m < month - 1; m++)
days += months[m];
days += ((dd & MSDOS_DD_DAY_MASK) >> MSDOS_DD_DAY_SHIFT) - 1;
ffc1b3b0: 7d 23 4a 14 add r9,r3,r9
lastseconds = (days + DAYSTO1980) * SECONDSPERDAY;
ffc1b3b4: 7d 29 51 d6 mullw r9,r9,r10
ffc1b3b8: 3d 40 00 00 lis r10,0
ffc1b3bc: 3d 29 12 cf addis r9,r9,4815
ffc1b3c0: 39 29 a6 00 addi r9,r9,-23040
ffc1b3c4: 91 2a 2a f8 stw r9,11000(r10)
}
return seconds + lastseconds;
ffc1b3c8: 3d 20 00 00 lis r9,0
ffc1b3cc: 80 69 2a f8 lwz r3,11000(r9)
}
ffc1b3d0: 7c 64 1a 14 add r3,r4,r3
ffc1b3d4: 4e 80 00 20 blr
ffc1b1b8 <msdos_date_unix2dos>:
/*
* If the time from the last conversion is the same as now, then
* skip the computations and use the saved result.
*/
if (lasttime != t) {
ffc1b1b8: 3d 40 00 00 lis r10,0
ffc1b1bc: 81 0a 2a e8 lwz r8,10984(r10)
ffc1b1c0: 39 2a 2a e8 addi r9,r10,10984
ffc1b1c4: 7f 88 18 00 cmpw cr7,r8,r3
ffc1b1c8: 41 9e 01 08 beq- cr7,ffc1b2d0 <msdos_date_unix2dos+0x118>
lasttime = t;
lastdtime = (((t % 60) >> 1) << MSDOS_DT_2SECONDS_SHIFT)
+ (((t / 60) % 60) << MSDOS_DT_MINUTES_SHIFT)
ffc1b1cc: 39 00 00 3c li r8,60
/*
* 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;
ffc1b1d0: 90 6a 2a e8 stw r3,10984(r10)
lastdtime = (((t % 60) >> 1) << MSDOS_DT_2SECONDS_SHIFT)
+ (((t / 60) % 60) << MSDOS_DT_MINUTES_SHIFT)
ffc1b1d4: 7d 43 43 96 divwu r10,r3,r8
ffc1b1d8: 7c ea 43 96 divwu r7,r10,r8
+ (((t / 3600) % 24) << MSDOS_DT_HOURS_SHIFT);
ffc1b1dc: 39 00 0e 10 li r8,3600
ffc1b1e0: 7d 03 43 96 divwu r8,r3,r8
ffc1b1e4: 38 c0 00 18 li r6,24
ffc1b1e8: 7c c8 33 96 divwu r6,r8,r6
* skip the computations and use the saved result.
*/
if (lasttime != t) {
lasttime = t;
lastdtime = (((t % 60) >> 1) << MSDOS_DT_2SECONDS_SHIFT)
+ (((t / 60) % 60) << MSDOS_DT_MINUTES_SHIFT)
ffc1b1ec: 1c e7 00 3c mulli r7,r7,60
+ (((t / 3600) % 24) << MSDOS_DT_HOURS_SHIFT);
ffc1b1f0: 1c c6 00 18 mulli r6,r6,24
* skip the computations and use the saved result.
*/
if (lasttime != t) {
lasttime = t;
lastdtime = (((t % 60) >> 1) << MSDOS_DT_2SECONDS_SHIFT)
+ (((t / 60) % 60) << MSDOS_DT_MINUTES_SHIFT)
ffc1b1f4: 7c e7 50 50 subf r7,r7,r10
* 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)
ffc1b1f8: 1d 4a 00 3c mulli r10,r10,60
+ (((t / 60) % 60) << MSDOS_DT_MINUTES_SHIFT)
+ (((t / 3600) % 24) << MSDOS_DT_HOURS_SHIFT);
ffc1b1fc: 7d 06 40 50 subf r8,r6,r8
* 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)
ffc1b200: 7d 4a 18 50 subf r10,r10,r3
ffc1b204: 54 e7 28 34 rlwinm r7,r7,5,0,26
ffc1b208: 55 08 58 28 rlwinm r8,r8,11,0,20
ffc1b20c: 7d 07 42 14 add r8,r7,r8
ffc1b210: 55 4a f8 7e rlwinm r10,r10,31,1,31
ffc1b214: 7d 48 52 14 add r10,r8,r10
ffc1b218: b1 49 00 04 sth r10,4(r9)
/*
* 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);
ffc1b21c: 3d 40 00 01 lis r10,1
ffc1b220: 61 4a 51 80 ori r10,r10,20864
ffc1b224: 7c 63 53 96 divwu r3,r3,r10
if (days != lastday) {
ffc1b228: 81 49 00 08 lwz r10,8(r9)
ffc1b22c: 7f 83 50 00 cmpw cr7,r3,r10
ffc1b230: 41 9e 00 a0 beq- cr7,ffc1b2d0 <msdos_date_unix2dos+0x118>
lastday = days;
ffc1b234: 90 69 00 08 stw r3,8(r9)
for (year = 1970;; year++) {
ffc1b238: 39 20 07 b2 li r9,1970
inc = year & 0x03 ? 365 : 366;
ffc1b23c: 71 28 00 03 andi. r8,r9,3
ffc1b240: 7d 40 00 26 mfcr r10
ffc1b244: 55 4a 1f fe rlwinm r10,r10,3,31,31
ffc1b248: 39 4a 01 6d addi r10,r10,365
if (days < inc)
ffc1b24c: 7f 83 50 40 cmplw cr7,r3,r10
ffc1b250: 41 9c 00 10 blt- cr7,ffc1b260 <msdos_date_unix2dos+0xa8>
break;
days -= inc;
ffc1b254: 7c 6a 18 50 subf r3,r10,r3
* and month stuff.
*/
days = t / (SECONDSPERDAY);
if (days != lastday) {
lastday = days;
for (year = 1970;; year++) {
ffc1b258: 39 29 00 01 addi r9,r9,1
inc = year & 0x03 ? 365 : 366;
if (days < inc)
break;
days -= inc;
}
ffc1b25c: 4b ff ff e0 b ffc1b23c <msdos_date_unix2dos+0x84>
ffc1b260: 3c e0 00 00 lis r7,0
ffc1b264: 38 e7 22 ac addi r7,r7,8876
months = year & 0x03 ? regyear : leapyear;
ffc1b268: 40 82 00 08 bne- ffc1b270 <msdos_date_unix2dos+0xb8> <== NEVER TAKEN
ffc1b26c: 38 e7 00 18 addi r7,r7,24
for (month = 0; month < 12; month++) {
ffc1b270: 39 00 00 0c li r8,12
ffc1b274: 7d 09 03 a6 mtctr r8
ffc1b278: 39 40 00 00 li r10,0
/*
* Convert the unix version of time to dos's idea of time to be used in
* file timestamps. The passed in unix time is assumed to be in GMT.
*/
void
msdos_date_unix2dos(unsigned int t, uint16_t *ddp,
ffc1b27c: 55 48 08 3c rlwinm r8,r10,1,0,30
break;
days -= inc;
}
months = year & 0x03 ? regyear : leapyear;
for (month = 0; month < 12; month++) {
if (days < months[month])
ffc1b280: 7d 07 42 2e lhzx r8,r7,r8
ffc1b284: 7f 83 40 40 cmplw cr7,r3,r8
ffc1b288: 41 9c 00 10 blt- cr7,ffc1b298 <msdos_date_unix2dos+0xe0><== ALWAYS TAKEN
break;
days -= months[month];
ffc1b28c: 7c 68 18 50 subf r3,r8,r3 <== NOT EXECUTED
if (days < inc)
break;
days -= inc;
}
months = year & 0x03 ? regyear : leapyear;
for (month = 0; month < 12; month++) {
ffc1b290: 39 4a 00 01 addi r10,r10,1 <== NOT EXECUTED
ffc1b294: 42 00 ff e8 bdnz+ ffc1b27c <msdos_date_unix2dos+0xc4> <== NOT EXECUTED
* 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)
ffc1b298: 2b 89 07 bc cmplwi cr7,r9,1980
for (month = 0; month < 12; month++) {
if (days < months[month])
break;
days -= months[month];
}
lastddate = ((days + 1) << MSDOS_DD_DAY_SHIFT)
ffc1b29c: 39 4a 00 01 addi r10,r10,1
ffc1b2a0: 38 63 00 01 addi r3,r3,1
ffc1b2a4: 55 4a 28 34 rlwinm r10,r10,5,0,26
ffc1b2a8: 7c 63 52 14 add r3,r3,r10
ffc1b2ac: 3d 00 00 00 lis r8,0
ffc1b2b0: 54 63 04 3e clrlwi r3,r3,16
ffc1b2b4: 39 08 2a e8 addi r8,r8,10984
ffc1b2b8: b0 68 00 0c sth r3,12(r8)
* 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)
ffc1b2bc: 40 9d 00 14 ble- cr7,ffc1b2d0 <msdos_date_unix2dos+0x118><== NEVER TAKEN
lastddate += (year - 1980) <<
ffc1b2c0: 39 29 f8 44 addi r9,r9,-1980
ffc1b2c4: 55 29 48 2c rlwinm r9,r9,9,0,22
ffc1b2c8: 7c 63 4a 14 add r3,r3,r9
ffc1b2cc: b0 68 00 0c sth r3,12(r8)
MSDOS_DD_YEAR_SHIFT;
}
}
*dtp = lastdtime;
ffc1b2d0: 3d 20 00 00 lis r9,0
ffc1b2d4: 39 29 2a e8 addi r9,r9,10984
ffc1b2d8: a1 49 00 04 lhz r10,4(r9)
*ddp = lastddate;
ffc1b2dc: a1 29 00 0c lhz r9,12(r9)
if (year > 1980)
lastddate += (year - 1980) <<
MSDOS_DD_YEAR_SHIFT;
}
}
*dtp = lastdtime;
ffc1b2e0: b1 45 00 00 sth r10,0(r5)
*ddp = lastddate;
ffc1b2e4: b1 24 00 00 sth r9,0(r4)
ffc1b2e8: 4e 80 00 20 blr
ffc18eec <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
)
{
ffc18eec: 94 21 ff d0 stwu r1,-48(r1)
ffc18ef0: 7c 08 02 a6 mflr r0
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t j = 0, i = 0;
/* dir is not empty */
*ret_val = false;
ffc18ef4: 39 20 00 00 li r9,0
msdos_dir_is_empty(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd,
bool *ret_val
)
{
ffc18ef8: 90 01 00 34 stw r0,52(r1)
ffc18efc: be c1 00 08 stmw r22,8(r1)
*/
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,
ffc18f00: 3e e0 ff c3 lis r23,-61
MSDOS_SHORT_NAME_LEN) == 0) ||
(strncmp(MSDOS_DIR_NAME((entry)),
ffc18f04: 3e c0 ff c3 lis r22,-61
fat_file_fd_t *fat_fd,
bool *ret_val
)
{
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
ffc18f08: 83 e3 00 08 lwz r31,8(r3)
msdos_dir_is_empty(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd,
bool *ret_val
)
{
ffc18f0c: 7c 98 23 78 mr r24,r4
ffc18f10: 7c bd 2b 78 mr r29,r5
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t j = 0, i = 0;
/* dir is not empty */
*ret_val = false;
ffc18f14: 99 25 00 00 stb r9,0(r5)
bool *ret_val
)
{
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t j = 0, i = 0;
ffc18f18: 3b 80 00 00 li r28,0
*/
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,
ffc18f1c: 3a f7 cc 32 addi r23,r23,-13262
MSDOS_SHORT_NAME_LEN) == 0) ||
(strncmp(MSDOS_DIR_NAME((entry)),
ffc18f20: 3a d6 cc 3e addi r22,r22,-13250
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,
ffc18f24: 48 00 00 bc b ffc18fe0 <msdos_dir_is_empty+0xf4>
fs_info->fat.vol.bps,
fs_info->cl_buf)) != FAT_EOF)
{
if (ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
ffc18f28: 2f 83 00 1f cmpwi cr7,r3,31
ffc18f2c: 40 9d 00 e4 ble- cr7,ffc19010 <msdos_dir_is_empty+0x124><== NEVER TAKEN
return -1;
assert(ret == fs_info->fat.vol.bps);
ffc18f30: a3 5f 00 00 lhz r26,0(r31)
ffc18f34: 7f 83 d0 00 cmpw cr7,r3,r26
ffc18f38: 41 be 00 98 beq+ cr7,ffc18fd0 <msdos_dir_is_empty+0xe4> <== ALWAYS TAKEN
ffc18f3c: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc18f40: 3c a0 ff c3 lis r5,-61 <== NOT EXECUTED
ffc18f44: 3c c0 ff c3 lis r6,-61 <== NOT EXECUTED
ffc18f48: 38 63 cb cc addi r3,r3,-13364 <== NOT EXECUTED
ffc18f4c: 38 80 03 65 li r4,869 <== NOT EXECUTED
ffc18f50: 38 a5 cb 58 addi r5,r5,-13480 <== NOT EXECUTED
ffc18f54: 38 c6 cc 16 addi r6,r6,-13290 <== NOT EXECUTED
ffc18f58: 4b fe cb c5 bl ffc05b1c <__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;
ffc18f5c: 81 3f 00 a0 lwz r9,160(r31)
* 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)) ==
ffc18f60: 7f 29 f0 ae lbzx r25,r9,r30
/* 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;
ffc18f64: 7f 69 f2 14 add r27,r9,r30
* 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)) ==
ffc18f68: 2f 99 00 e5 cmpwi cr7,r25,229
ffc18f6c: 41 9e 00 44 beq- cr7,ffc18fb0 <msdos_dir_is_empty+0xc4> <== NEVER TAKEN
MSDOS_THIS_DIR_ENTRY_EMPTY) ||
((*MSDOS_DIR_ATTR(entry) & MSDOS_ATTR_LFN_MASK) ==
ffc18f70: 89 3b 00 0b lbz r9,11(r27)
*
* 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) ||
ffc18f74: 55 29 06 be clrlwi r9,r9,26
ffc18f78: 2f 89 00 0f cmpwi cr7,r9,15
ffc18f7c: 41 9e 00 34 beq- cr7,ffc18fb0 <msdos_dir_is_empty+0xc4> <== NEVER TAKEN
((*MSDOS_DIR_ATTR(entry) & MSDOS_ATTR_LFN_MASK) ==
MSDOS_ATTR_LFN) ||
(strncmp(MSDOS_DIR_NAME((entry)), MSDOS_DOT_NAME,
ffc18f80: 7f 63 db 78 mr r3,r27
ffc18f84: 7e e4 bb 78 mr r4,r23
ffc18f88: 38 a0 00 0b li r5,11
ffc18f8c: 48 00 51 b5 bl ffc1e140 <strncmp>
* be valid.
*/
if (((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
MSDOS_THIS_DIR_ENTRY_EMPTY) ||
((*MSDOS_DIR_ATTR(entry) & MSDOS_ATTR_LFN_MASK) ==
MSDOS_ATTR_LFN) ||
ffc18f90: 2f 83 00 00 cmpwi cr7,r3,0
ffc18f94: 41 9e 00 1c beq- cr7,ffc18fb0 <msdos_dir_is_empty+0xc4>
(strncmp(MSDOS_DIR_NAME((entry)), MSDOS_DOT_NAME,
MSDOS_SHORT_NAME_LEN) == 0) ||
(strncmp(MSDOS_DIR_NAME((entry)),
ffc18f98: 7f 63 db 78 mr r3,r27
ffc18f9c: 7e c4 b3 78 mr r4,r22
ffc18fa0: 38 a0 00 0b li r5,11
ffc18fa4: 48 00 51 9d bl ffc1e140 <strncmp>
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) ||
ffc18fa8: 2f 83 00 00 cmpwi cr7,r3,0
ffc18fac: 40 9e 00 0c bne- cr7,ffc18fb8 <msdos_dir_is_empty+0xcc>
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)
ffc18fb0: 3b de 00 20 addi r30,r30,32
ffc18fb4: 48 00 00 20 b ffc18fd4 <msdos_dir_is_empty+0xe8>
continue;
/*
* Nothing more to look at.
*/
if ((*MSDOS_DIR_NAME(entry)) ==
ffc18fb8: 2f 99 00 00 cmpwi cr7,r25,0
}
/*
* Short file name entries mean not empty.
*/
return RC_OK;
ffc18fbc: 38 60 00 00 li r3,0
continue;
/*
* Nothing more to look at.
*/
if ((*MSDOS_DIR_NAME(entry)) ==
ffc18fc0: 40 9e 00 54 bne- cr7,ffc19014 <msdos_dir_is_empty+0x128>
MSDOS_THIS_DIR_ENTRY_AND_REST_EMPTY)
{
*ret_val = true;
ffc18fc4: 39 20 00 01 li r9,1
ffc18fc8: 99 3d 00 00 stb r9,0(r29)
return RC_OK;
ffc18fcc: 48 00 00 48 b ffc19014 <msdos_dir_is_empty+0x128>
fs_info->cl_buf)) != FAT_EOF)
{
if (ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
return -1;
assert(ret == fs_info->fat.vol.bps);
ffc18fd0: 3b c0 00 00 li r30,0
/* have to look at the DIR_NAME as "raw" 8-bit data */
for (i = 0;
ffc18fd4: 7f 9e d0 40 cmplw cr7,r30,r26
ffc18fd8: 41 9c ff 84 blt+ cr7,ffc18f5c <msdos_dir_is_empty+0x70> <== ALWAYS TAKEN
/*
* Short file name entries mean not empty.
*/
return RC_OK;
}
j++;
ffc18fdc: 3b 9c 00 01 addi r28,r28,1 <== 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,
ffc18fe0: a0 df 00 00 lhz r6,0(r31)
ffc18fe4: 7f e3 fb 78 mr r3,r31
ffc18fe8: 80 ff 00 a0 lwz r7,160(r31)
ffc18fec: 7f 04 c3 78 mr r4,r24
ffc18ff0: 7c bc 31 d6 mullw r5,r28,r6
ffc18ff4: 4b ff 9f 91 bl ffc12f84 <fat_file_read>
ffc18ff8: 2c 03 00 00 cmpwi r3,0
ffc18ffc: 40 82 ff 2c bne+ ffc18f28 <msdos_dir_is_empty+0x3c> <== ALWAYS TAKEN
*/
return RC_OK;
}
j++;
}
*ret_val = true;
ffc19000: 39 20 00 01 li r9,1 <== NOT EXECUTED
ffc19004: 99 3d 00 00 stb r9,0(r29) <== NOT EXECUTED
return RC_OK;
ffc19008: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc1900c: 48 00 00 08 b ffc19014 <msdos_dir_is_empty+0x128> <== NOT EXECUTED
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;
ffc19010: 38 60 ff ff li r3,-1 <== NOT EXECUTED
}
j++;
}
*ret_val = true;
return RC_OK;
}
ffc19014: 39 61 00 30 addi r11,r1,48
ffc19018: 4b fe 85 c0 b ffc015d8 <_restgpr_22_x>
ffc1b528 <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)
{
ffc1b528: 94 21 fe 78 stwu r1,-392(r1) <== NOT EXECUTED
ffc1b52c: 7c 08 02 a6 mflr r0 <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
fat_file_fd_t *tmp_fat_fd = NULL;
ffc1b530: 39 40 00 00 li r10,0 <== NOT EXECUTED
* 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)
{
ffc1b534: bd c1 01 40 stmw r14,320(r1) <== NOT EXECUTED
ffc1b538: 7c bf 2b 78 mr r31,r5 <== NOT EXECUTED
* 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);
count = (count / sizeof(struct dirent)) * sizeof(struct dirent);
ffc1b53c: 3b 00 01 18 li r24,280 <== NOT EXECUTED
ffc1b540: 7f 1f c3 96 divwu r24,r31,r24 <== NOT EXECUTED
* 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)
{
ffc1b544: 90 01 01 8c stw r0,396(r1) <== NOT EXECUTED
ffc1b548: 90 81 01 38 stw r4,312(r1) <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
ffc1b54c: 81 23 00 28 lwz r9,40(r3) <== NOT EXECUTED
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
ffc1b550: 83 63 00 1c lwz r27,28(r3) <== NOT EXECUTED
fat_file_fd_t *tmp_fat_fd = NULL;
ffc1b554: 91 41 01 34 stw r10,308(r1) <== NOT EXECUTED
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;
ffc1b558: 91 41 01 30 stw r10,304(r1) <== NOT EXECUTED
ssize_t
msdos_dir_read(rtems_libio_t *iop, void *buffer, size_t count)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
ffc1b55c: 82 09 00 08 lwz r16,8(r9) <== NOT EXECUTED
* 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)
{
ffc1b560: 7c 79 1b 78 mr r25,r3 <== NOT EXECUTED
/*
* 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);
ffc1b564: 80 63 00 08 lwz r3,8(r3) <== NOT EXECUTED
ffc1b568: 80 99 00 0c lwz r4,12(r25) <== NOT EXECUTED
ffc1b56c: 38 a0 00 00 li r5,0 <== NOT EXECUTED
ffc1b570: 38 c0 01 18 li r6,280 <== NOT EXECUTED
ffc1b574: 4b fe 5c 21 bl ffc01194 <__divdi3> <== 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 :
ffc1b578: 81 5b 00 20 lwz r10,32(r27) <== NOT EXECUTED
/*
* 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);
ffc1b57c: 7c 97 23 78 mr r23,r4 <== 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 :
ffc1b580: 2f 8a 00 01 cmpwi cr7,r10,1 <== NOT EXECUTED
* 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);
count = (count / sizeof(struct dirent)) * sizeof(struct dirent);
ffc1b584: 1f 18 01 18 mulli r24,r24,280 <== 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 :
ffc1b588: 40 be 00 24 bne+ cr7,ffc1b5ac <msdos_dir_read+0x84> <== 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) &&
ffc1b58c: 81 5b 00 24 lwz r10,36(r27) <== NOT EXECUTED
ffc1b590: 2f 8a 00 00 cmpwi cr7,r10,0 <== NOT EXECUTED
ffc1b594: 40 9e 00 18 bne- cr7,ffc1b5ac <msdos_dir_read+0x84> <== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16))) ?
ffc1b598: 89 50 00 0e lbz r10,14(r16) <== 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) &&
ffc1b59c: 71 49 00 03 andi. r9,r10,3 <== NOT EXECUTED
ffc1b5a0: 41 82 00 0c beq- ffc1b5ac <msdos_dir_read+0x84> <== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16))) ?
fat_fd->fat_file_size :
ffc1b5a4: 82 bb 00 18 lwz r21,24(r27) <== NOT EXECUTED
ffc1b5a8: 48 00 00 08 b ffc1b5b0 <msdos_dir_read+0x88> <== NOT EXECUTED
ffc1b5ac: a2 b0 00 06 lhz r21,6(r16) <== NOT EXECUTED
fs_info->fat.vol.bpc;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
ffc1b5b0: 80 70 00 9c lwz r3,156(r16) <== NOT EXECUTED
ffc1b5b4: 38 80 00 00 li r4,0 <== NOT EXECUTED
ffc1b5b8: 38 a0 00 00 li r5,0 <== NOT EXECUTED
ffc1b5bc: 4b fe ef 9d bl ffc0a558 <rtems_semaphore_obtain> <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
ffc1b5c0: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc1b5c4: 41 be 03 98 beq+ cr7,ffc1b95c <msdos_dir_read+0x434> <== NOT EXECUTED
ffc1b5c8: 48 00 00 30 b ffc1b5f8 <msdos_dir_read+0xd0> <== 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),
ffc1b5cc: 80 f0 00 a0 lwz r7,160(r16) <== NOT EXECUTED
ffc1b5d0: 7e 03 83 78 mr r3,r16 <== NOT EXECUTED
ffc1b5d4: 7f 64 db 78 mr r4,r27 <== NOT EXECUTED
ffc1b5d8: 7f 45 d3 78 mr r5,r26 <== NOT EXECUTED
ffc1b5dc: 7e a6 ab 78 mr r6,r21 <== NOT EXECUTED
ffc1b5e0: 4b ff 79 a5 bl ffc12f84 <fat_file_read> <== NOT EXECUTED
bts2rd, fs_info->cl_buf);
if (ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
ffc1b5e4: 2f 83 00 1f cmpwi cr7,r3,31 <== 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),
ffc1b5e8: 7c 73 1b 78 mr r19,r3 <== NOT EXECUTED
bts2rd, fs_info->cl_buf);
if (ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
ffc1b5ec: 41 bd 03 5c bgt+ cr7,ffc1b948 <msdos_dir_read+0x420> <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
ffc1b5f0: 80 70 00 9c lwz r3,156(r16) <== NOT EXECUTED
ffc1b5f4: 4b fe f0 89 bl ffc0a67c <rtems_semaphore_release> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
ffc1b5f8: 48 00 0a f1 bl ffc1c0e8 <__errno> <== NOT EXECUTED
ffc1b5fc: 39 20 00 05 li r9,5 <== NOT EXECUTED
ffc1b600: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED
ffc1b604: 3a 20 ff ff li r17,-1 <== NOT EXECUTED
ffc1b608: 48 00 03 dc b ffc1b9e4 <msdos_dir_read+0x4bc> <== NOT EXECUTED
}
for (i = 0; i < ret; i += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
{
char* entry = (char*) fs_info->cl_buf + i;
ffc1b60c: 81 10 00 a0 lwz r8,160(r16) <== NOT EXECUTED
ffc1b610: 7d e8 fa 14 add r15,r8,r31 <== NOT EXECUTED
/*
* Is this directory from here on empty ?
*/
if ((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
ffc1b614: 7d 08 f8 ae lbzx r8,r8,r31 <== NOT EXECUTED
ffc1b618: 2f 88 00 00 cmpwi cr7,r8,0 <== NOT EXECUTED
ffc1b61c: 40 be 00 08 bne+ cr7,ffc1b624 <msdos_dir_read+0xfc> <== NOT EXECUTED
ffc1b620: 48 00 03 64 b ffc1b984 <msdos_dir_read+0x45c> <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
return cmpltd;
}
/* Is the directory entry empty */
if ((*MSDOS_DIR_ENTRY_TYPE(entry)) == MSDOS_THIS_DIR_ENTRY_EMPTY)
ffc1b624: 2f 88 00 e5 cmpwi cr7,r8,229 <== NOT EXECUTED
ffc1b628: 41 9e 03 18 beq- cr7,ffc1b940 <msdos_dir_read+0x418> <== NOT EXECUTED
continue;
/* Is the directory entry empty a volume label */
if (((*MSDOS_DIR_ATTR(entry)) & MSDOS_ATTR_VOLUME_ID) &&
ffc1b62c: 88 ef 00 0b lbz r7,11(r15) <== NOT EXECUTED
ffc1b630: 54 e6 07 38 rlwinm r6,r7,0,28,28 <== NOT EXECUTED
ffc1b634: 70 c9 00 ff andi. r9,r6,255 <== NOT EXECUTED
ffc1b638: 41 82 00 10 beq- ffc1b648 <msdos_dir_read+0x120> <== NOT EXECUTED
ffc1b63c: 54 e6 06 be clrlwi r6,r7,26 <== NOT EXECUTED
ffc1b640: 2f 86 00 0f cmpwi cr7,r6,15 <== NOT EXECUTED
ffc1b644: 40 be 02 fc bne+ cr7,ffc1b940 <msdos_dir_read+0x418> <== 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) ==
ffc1b648: 54 e7 06 be clrlwi r7,r7,26 <== NOT EXECUTED
ffc1b64c: 2f 87 00 0f cmpwi cr7,r7,15 <== NOT EXECUTED
ffc1b650: 40 be 00 cc bne+ cr7,ffc1b71c <msdos_dir_read+0x1f4> <== NOT EXECUTED
int q;
/*
* Is this is the first entry of a LFN ?
*/
if (lfn_start == FAT_FILE_SHORT_NAME)
ffc1b654: 2f 9e ff ff cmpwi cr7,r30,-1 <== NOT EXECUTED
ffc1b658: 40 be 00 30 bne+ cr7,ffc1b688 <msdos_dir_read+0x160> <== NOT EXECUTED
{
/*
* The first entry must have the last long entry flag set.
*/
if ((*MSDOS_DIR_ENTRY_TYPE(entry) &
ffc1b65c: 55 07 06 72 rlwinm r7,r8,0,25,25 <== NOT EXECUTED
ffc1b660: 70 e9 00 ff andi. r9,r7,255 <== NOT EXECUTED
ffc1b664: 41 a2 02 dc beq+ ffc1b940 <msdos_dir_read+0x418> <== 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)
ffc1b668: 7f df d2 14 add r30,r31,r26 <== 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) &
MSDOS_LAST_LONG_ENTRY_MASK);
lfn_checksum = *MSDOS_DIR_LFN_CHECKSUM(entry);
ffc1b66c: 8a cf 00 0d lbz r22,13(r15) <== NOT EXECUTED
memset (tmp_dirent.d_name, 0, sizeof(tmp_dirent.d_name));
ffc1b670: 38 61 00 1c addi r3,r1,28 <== NOT EXECUTED
ffc1b674: 38 80 00 00 li r4,0 <== NOT EXECUTED
ffc1b678: 38 a0 01 00 li r5,256 <== NOT EXECUTED
continue;
/*
* Remember the start location of the long file name.
*/
lfn_start =
ffc1b67c: 57 de d9 7e rlwinm r30,r30,27,5,31 <== 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) &
ffc1b680: 55 1c 06 be clrlwi r28,r8,26 <== NOT EXECUTED
MSDOS_LAST_LONG_ENTRY_MASK);
lfn_checksum = *MSDOS_DIR_LFN_CHECKSUM(entry);
memset (tmp_dirent.d_name, 0, sizeof(tmp_dirent.d_name));
ffc1b684: 48 00 18 39 bl ffc1cebc <memset> <== 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) &
ffc1b688: 89 0f 00 00 lbz r8,0(r15) <== NOT EXECUTED
ffc1b68c: 55 08 06 be clrlwi r8,r8,26 <== NOT EXECUTED
ffc1b690: 7f 9c 40 00 cmpw cr7,r28,r8 <== NOT EXECUTED
ffc1b694: 40 be 02 a8 bne+ cr7,ffc1b93c <msdos_dir_read+0x414> <== NOT EXECUTED
MSDOS_LAST_LONG_ENTRY_MASK)) ||
ffc1b698: 89 0f 00 0d lbz r8,13(r15) <== NOT EXECUTED
ffc1b69c: 7f 88 b0 00 cmpw cr7,r8,r22 <== NOT EXECUTED
ffc1b6a0: 40 be 02 9c bne+ cr7,ffc1b93c <msdos_dir_read+0x414> <== 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--;
ffc1b6a4: 3b 9c ff ff addi r28,r28,-1 <== NOT EXECUTED
p = entry + 1;
o = lfn_entries * MSDOS_LFN_LEN_PER_ENTRY;
ffc1b6a8: 1c fc 00 0d mulli r7,r28,13 <== 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)
ffc1b6ac: 39 21 00 08 addi r9,r1,8 <== NOT EXECUTED
ffc1b6b0: 7c c9 3a 14 add r6,r9,r7 <== NOT EXECUTED
ffc1b6b4: 39 20 00 0d li r9,13 <== NOT EXECUTED
ffc1b6b8: 7d 29 03 a6 mtctr r9 <== NOT EXECUTED
* trailing nul character. We need to range check the length to
* fit in the directory entry name field.
*/
lfn_entries--;
p = entry + 1;
ffc1b6bc: 39 4f 00 01 addi r10,r15,1 <== NOT EXECUTED
o = lfn_entries * MSDOS_LFN_LEN_PER_ENTRY;
for (q = 0; q < MSDOS_LFN_LEN_PER_ENTRY; q++)
ffc1b6c0: 39 00 00 00 li r8,0 <== NOT EXECUTED
{
if (o >= (sizeof(tmp_dirent.d_name) - 1))
ffc1b6c4: 7c a8 3a 14 add r5,r8,r7 <== NOT EXECUTED
ffc1b6c8: 2b 85 00 fe cmplwi cr7,r5,254 <== NOT EXECUTED
ffc1b6cc: 41 9d 02 64 bgt- cr7,ffc1b930 <msdos_dir_read+0x408> <== NOT EXECUTED
break;
tmp_dirent.d_name[o++] = *p;
ffc1b6d0: 88 8a 00 00 lbz r4,0(r10) <== 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)
ffc1b6d4: 7c a6 42 14 add r5,r6,r8 <== NOT EXECUTED
for (q = 0; q < MSDOS_LFN_LEN_PER_ENTRY; q++)
{
if (o >= (sizeof(tmp_dirent.d_name) - 1))
break;
tmp_dirent.d_name[o++] = *p;
ffc1b6d8: 98 85 00 14 stb r4,20(r5) <== NOT EXECUTED
if (*p == '\0')
ffc1b6dc: 88 aa 00 00 lbz r5,0(r10) <== NOT EXECUTED
ffc1b6e0: 2f 85 00 00 cmpwi cr7,r5,0 <== NOT EXECUTED
ffc1b6e4: 41 9e 02 4c beq- cr7,ffc1b930 <msdos_dir_read+0x408> <== NOT EXECUTED
break;
switch (q)
ffc1b6e8: 2f 88 00 04 cmpwi cr7,r8,4 <== NOT EXECUTED
ffc1b6ec: 41 9e 00 10 beq- cr7,ffc1b6fc <msdos_dir_read+0x1d4> <== NOT EXECUTED
ffc1b6f0: 2f 88 00 0a cmpwi cr7,r8,10 <== NOT EXECUTED
ffc1b6f4: 40 be 00 18 bne+ cr7,ffc1b70c <msdos_dir_read+0x1e4> <== NOT EXECUTED
ffc1b6f8: 48 00 00 0c b ffc1b704 <msdos_dir_read+0x1dc> <== NOT EXECUTED
{
case 4:
p += 5;
ffc1b6fc: 39 4a 00 05 addi r10,r10,5 <== NOT EXECUTED
break;
ffc1b700: 48 00 00 10 b ffc1b710 <msdos_dir_read+0x1e8> <== NOT EXECUTED
case 10:
p += 4;
ffc1b704: 39 4a 00 04 addi r10,r10,4 <== NOT EXECUTED
break;
ffc1b708: 48 00 00 08 b ffc1b710 <msdos_dir_read+0x1e8> <== NOT EXECUTED
default:
p += 2;
ffc1b70c: 39 4a 00 02 addi r10,r10,2 <== 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++)
ffc1b710: 39 08 00 01 addi r8,r8,1 <== NOT EXECUTED
ffc1b714: 42 00 ff b0 bdnz+ ffc1b6c4 <msdos_dir_read+0x19c> <== NOT EXECUTED
ffc1b718: 48 00 02 18 b ffc1b930 <msdos_dir_read+0x408> <== NOT EXECUTED
fat_dir_pos_t dir_pos;
/*
* Skip active entries until get the entry to start from.
*/
if (start)
ffc1b71c: 2f 97 00 00 cmpwi cr7,r23,0 <== NOT EXECUTED
ffc1b720: 41 9e 00 0c beq- cr7,ffc1b72c <msdos_dir_read+0x204> <== NOT EXECUTED
{
lfn_start = FAT_FILE_SHORT_NAME;
start--;
ffc1b724: 3a f7 ff ff addi r23,r23,-1 <== NOT EXECUTED
ffc1b728: 48 00 02 14 b ffc1b93c <msdos_dir_read+0x414> <== 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,
ffc1b72c: 7e 03 83 78 mr r3,r16 <== NOT EXECUTED
ffc1b730: 7f 64 db 78 mr r4,r27 <== NOT EXECUTED
ffc1b734: 38 a0 00 01 li r5,1 <== NOT EXECUTED
ffc1b738: 7f 46 d3 78 mr r6,r26 <== NOT EXECUTED
ffc1b73c: 38 e1 01 30 addi r7,r1,304 <== NOT EXECUTED
ffc1b740: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1b744: 4b ff 7b d5 bl ffc13318 <fat_file_ioctl> <== NOT EXECUTED
j * bts2rd, &cur_cln);
if (rc != RC_OK)
ffc1b748: 7c 71 1b 79 mr. r17,r3 <== NOT EXECUTED
ffc1b74c: 41 a2 00 08 beq+ ffc1b754 <msdos_dir_read+0x22c> <== NOT EXECUTED
ffc1b750: 48 00 01 d4 b ffc1b924 <msdos_dir_read+0x3fc> <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
fat_dir_pos_init(&dir_pos);
dir_pos.sname.cln = cur_cln;
ffc1b754: 81 01 01 30 lwz r8,304(r1) <== NOT EXECUTED
dir_pos.sname.ofs = i;
rc = fat_file_open(&fs_info->fat, &dir_pos, &tmp_fat_fd);
ffc1b758: 7e 03 83 78 mr r3,r16 <== NOT EXECUTED
ffc1b75c: 38 81 01 20 addi r4,r1,288 <== 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;
ffc1b760: 92 41 01 28 stw r18,296(r1) <== NOT EXECUTED
ffc1b764: 38 a1 01 34 addi r5,r1,308 <== NOT EXECUTED
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
ffc1b768: 92 41 01 2c stw r18,300(r1) <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
fat_dir_pos_init(&dir_pos);
dir_pos.sname.cln = cur_cln;
ffc1b76c: 91 01 01 20 stw r8,288(r1) <== NOT EXECUTED
dir_pos.sname.ofs = i;
ffc1b770: 93 e1 01 24 stw r31,292(r1) <== NOT EXECUTED
rc = fat_file_open(&fs_info->fat, &dir_pos, &tmp_fat_fd);
ffc1b774: 4b ff 76 71 bl ffc12de4 <fat_file_open> <== NOT EXECUTED
if (rc != RC_OK)
ffc1b778: 7c 71 1b 79 mr. r17,r3 <== NOT EXECUTED
ffc1b77c: 41 a2 00 08 beq+ ffc1b784 <msdos_dir_read+0x25c> <== NOT EXECUTED
ffc1b780: 48 00 01 a4 b ffc1b924 <msdos_dir_read+0x3fc> <== 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)
ffc1b784: 2f 9e ff ff cmpwi cr7,r30,-1 <== NOT EXECUTED
/* fill in dirent structure */
/* XXX: from what and in what d_off should be computed ?! */
tmp_dirent.d_off = start + cmpltd;
tmp_dirent.d_reclen = sizeof(struct dirent);
tmp_dirent.d_ino = tmp_fat_fd->ino;
ffc1b788: 81 01 01 34 lwz r8,308(r1) <== NOT EXECUTED
}
/* fill in dirent structure */
/* XXX: from what and in what d_off should be computed ?! */
tmp_dirent.d_off = start + cmpltd;
tmp_dirent.d_reclen = sizeof(struct dirent);
ffc1b78c: 39 20 01 18 li r9,280 <== 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;
ffc1b790: 93 a1 00 14 stw r29,20(r1) <== NOT EXECUTED
tmp_dirent.d_reclen = sizeof(struct dirent);
tmp_dirent.d_ino = tmp_fat_fd->ino;
ffc1b794: 81 08 00 0c lwz r8,12(r8) <== 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;
ffc1b798: 92 e1 00 10 stw r23,16(r1) <== NOT EXECUTED
tmp_dirent.d_reclen = sizeof(struct dirent);
ffc1b79c: b1 21 00 18 sth r9,24(r1) <== NOT EXECUTED
tmp_dirent.d_ino = tmp_fat_fd->ino;
ffc1b7a0: 91 01 00 08 stw r8,8(r1) <== 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)
ffc1b7a4: 41 9e 01 f0 beq- cr7,ffc1b994 <msdos_dir_read+0x46c> <== 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;
ffc1b7a8: 39 20 00 0b li r9,11 <== NOT EXECUTED
ffc1b7ac: 7d 29 03 a6 mtctr r9 <== 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)
ffc1b7b0: 38 e0 00 00 li r7,0 <== NOT EXECUTED
ffc1b7b4: 39 00 00 00 li r8,0 <== 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;
ffc1b7b8: 71 09 00 01 andi. r9,r8,1 <== NOT EXECUTED
ffc1b7bc: 38 c0 00 00 li r6,0 <== NOT EXECUTED
ffc1b7c0: 41 82 00 08 beq- ffc1b7c8 <msdos_dir_read+0x2a0> <== NOT EXECUTED
ffc1b7c4: 38 c0 00 80 li r6,128 <== NOT EXECUTED
ffc1b7c8: 7c af 38 ae lbzx r5,r15,r7 <== NOT EXECUTED
ffc1b7cc: 55 08 f8 7e rlwinm r8,r8,31,1,31 <== NOT EXECUTED
{
uint8_t cs = 0;
uint8_t* p = (uint8_t*) entry;
int i;
for (i = 0; i < 11; i++, p++)
ffc1b7d0: 38 e7 00 01 addi r7,r7,1 <== NOT EXECUTED
cs = ((cs & 1) ? 0x80 : 0) + (cs >> 1) + *p;
ffc1b7d4: 7d 05 42 14 add r8,r5,r8 <== NOT EXECUTED
ffc1b7d8: 7d 08 32 14 add r8,r8,r6 <== NOT EXECUTED
ffc1b7dc: 55 08 06 3e clrlwi r8,r8,24 <== NOT EXECUTED
{
uint8_t cs = 0;
uint8_t* p = (uint8_t*) entry;
int i;
for (i = 0; i < 11; i++, p++)
ffc1b7e0: 42 00 ff d8 bdnz+ ffc1b7b8 <msdos_dir_read+0x290> <== NOT EXECUTED
cs = ((cs & 1) ? 0x80 : 0) + (cs >> 1) + *p;
if (lfn_entries || (lfn_checksum != cs))
ffc1b7e4: 2f 9c 00 00 cmpwi cr7,r28,0 <== NOT EXECUTED
ffc1b7e8: 40 9e 01 ac bne- cr7,ffc1b994 <msdos_dir_read+0x46c> <== NOT EXECUTED
ffc1b7ec: 7f 96 40 00 cmpw cr7,r22,r8 <== NOT EXECUTED
ffc1b7f0: 40 be 01 a4 bne+ cr7,ffc1b994 <msdos_dir_read+0x46c> <== NOT EXECUTED
ffc1b7f4: 48 00 01 b0 b ffc1b9a4 <msdos_dir_read+0x47c> <== NOT EXECUTED
const char *src_tmp;
/*
* find last non-blank character of base name
*/
for ((i = MSDOS_SHORT_BASE_LEN ,
ffc1b7f8: 42 40 00 18 bdz- ffc1b810 <msdos_dir_read+0x2e8> <== 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)
ffc1b7fc: 7c ef 40 50 subf r7,r15,r8 <== NOT EXECUTED
/*
* find last non-blank character of base name
*/
for ((i = MSDOS_SHORT_BASE_LEN ,
src_tmp = src + MSDOS_SHORT_BASE_LEN-1);
((i > 0) &&
ffc1b800: 8c c8 ff ff lbzu r6,-1(r8) <== NOT EXECUTED
ffc1b804: 2f 86 00 20 cmpwi cr7,r6,32 <== NOT EXECUTED
ffc1b808: 41 9e ff f0 beq+ cr7,ffc1b7f8 <msdos_dir_read+0x2d0> <== NOT EXECUTED
ffc1b80c: 48 00 00 08 b ffc1b814 <msdos_dir_read+0x2ec> <== NOT EXECUTED
const char *src_tmp;
/*
* find last non-blank character of base name
*/
for ((i = MSDOS_SHORT_BASE_LEN ,
ffc1b810: 38 e0 00 00 li r7,0 <== NOT EXECUTED
ffc1b814: 2f 87 00 00 cmpwi cr7,r7,0 <== NOT EXECUTED
* copy base name to destination
*/
src_tmp = src;
len = i;
while (i-- > 0) {
*dst++ = tolower((unsigned char)(*src_tmp++));
ffc1b818: 80 74 27 e8 lwz r3,10216(r20) <== 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)
ffc1b81c: 38 8f ff ff addi r4,r15,-1 <== 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(
ffc1b820: 39 01 00 1c addi r8,r1,28 <== 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)
ffc1b824: 38 c7 00 01 addi r6,r7,1 <== NOT EXECUTED
ffc1b828: 40 bc 00 30 bge+ cr7,ffc1b858 <msdos_dir_read+0x330> <== NOT EXECUTED
ffc1b82c: 38 c0 00 01 li r6,1 <== NOT EXECUTED
ffc1b830: 48 00 00 28 b ffc1b858 <msdos_dir_read+0x330> <== NOT EXECUTED
* copy base name to destination
*/
src_tmp = src;
len = i;
while (i-- > 0) {
*dst++ = tolower((unsigned char)(*src_tmp++));
ffc1b834: 8c a4 00 01 lbzu r5,1(r4) <== NOT EXECUTED
ffc1b838: 7d 63 2a 14 add r11,r3,r5 <== NOT EXECUTED
ffc1b83c: 89 6b 00 01 lbz r11,1(r11) <== NOT EXECUTED
ffc1b840: 55 6b 07 be clrlwi r11,r11,30 <== NOT EXECUTED
ffc1b844: 2f 8b 00 01 cmpwi cr7,r11,1 <== NOT EXECUTED
ffc1b848: 40 be 00 08 bne+ cr7,ffc1b850 <msdos_dir_read+0x328> <== NOT EXECUTED
ffc1b84c: 38 a5 00 20 addi r5,r5,32 <== NOT EXECUTED
ffc1b850: 98 a8 00 00 stb r5,0(r8) <== NOT EXECUTED
ffc1b854: 39 08 00 01 addi r8,r8,1 <== NOT EXECUTED
/*
* copy base name to destination
*/
src_tmp = src;
len = i;
while (i-- > 0) {
ffc1b858: 34 c6 ff ff addic. r6,r6,-1 <== NOT EXECUTED
ffc1b85c: 40 82 ff d8 bne+ ffc1b834 <msdos_dir_read+0x30c> <== 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) &&
ffc1b860: 88 cf 00 0a lbz r6,10(r15) <== NOT EXECUTED
ffc1b864: 2f 86 00 20 cmpwi cr7,r6,32 <== NOT EXECUTED
ffc1b868: 40 9e 01 4c bne- cr7,ffc1b9b4 <msdos_dir_read+0x48c> <== NOT EXECUTED
ffc1b86c: 88 cf 00 09 lbz r6,9(r15) <== NOT EXECUTED
ffc1b870: 2f 86 00 20 cmpwi cr7,r6,32 <== NOT EXECUTED
ffc1b874: 40 9e 01 48 bne- cr7,ffc1b9bc <msdos_dir_read+0x494> <== NOT EXECUTED
ffc1b878: 88 cf 00 08 lbz r6,8(r15) <== NOT EXECUTED
ffc1b87c: 2f 86 00 20 cmpwi cr7,r6,32 <== NOT EXECUTED
ffc1b880: 41 be 00 50 beq+ cr7,ffc1b8d0 <msdos_dir_read+0x3a8> <== NOT EXECUTED
ffc1b884: 38 c0 00 01 li r6,1 <== NOT EXECUTED
ffc1b888: 48 00 01 38 b ffc1b9c0 <msdos_dir_read+0x498> <== 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)
ffc1b88c: 7c 8f 2a 14 add r4,r15,r5 <== 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++));
ffc1b890: 88 84 00 08 lbz r4,8(r4) <== NOT EXECUTED
ffc1b894: 7f c3 22 14 add r30,r3,r4 <== NOT EXECUTED
ffc1b898: 88 1e 00 01 lbz r0,1(r30) <== NOT EXECUTED
ffc1b89c: 54 00 07 be clrlwi r0,r0,30 <== NOT EXECUTED
ffc1b8a0: 2f 80 00 01 cmpwi cr7,r0,1 <== NOT EXECUTED
ffc1b8a4: 40 be 00 08 bne+ cr7,ffc1b8ac <msdos_dir_read+0x384> <== NOT EXECUTED
ffc1b8a8: 38 84 00 20 addi r4,r4,32 <== 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)
ffc1b8ac: 7f c8 2a 14 add r30,r8,r5 <== 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++));
ffc1b8b0: 98 9e 00 01 stb r4,1(r30) <== NOT EXECUTED
ffc1b8b4: 38 a5 00 01 addi r5,r5,1 <== NOT EXECUTED
*/
if (i > 0) {
*dst++ = '.'; /* append dot */
len += i + 1; /* extension + dot */
src_tmp = src + MSDOS_SHORT_BASE_LEN;
while (i-- > 0) {
ffc1b8b8: 42 00 ff d4 bdnz+ ffc1b88c <msdos_dir_read+0x364> <== 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)
ffc1b8bc: 7c ca 30 f8 not r10,r6 <== NOT EXECUTED
ffc1b8c0: 7d 4a fe 70 srawi r10,r10,31 <== NOT EXECUTED
ffc1b8c4: 7c c6 50 38 and r6,r6,r10 <== NOT EXECUTED
ffc1b8c8: 7d 0b 32 14 add r8,r11,r6 <== NOT EXECUTED
ffc1b8cc: 7c e7 32 14 add r7,r7,r6 <== NOT EXECUTED
while (i-- > 0) {
*dst++ = tolower((unsigned char)(*src_tmp++));
len++;
}
}
*dst = '\0'; /* terminate string */
ffc1b8d0: 99 c8 00 00 stb r14,0(r8) <== 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(
ffc1b8d4: 3b c0 ff ff li r30,-1 <== NOT EXECUTED
ffc1b8d8: b0 e1 00 1a sth r7,26(r1) <== NOT EXECUTED
else
{
tmp_dirent.d_namlen = strlen(tmp_dirent.d_name);
}
memcpy(buffer + cmpltd, &tmp_dirent, sizeof(struct dirent));
ffc1b8dc: 81 21 01 38 lwz r9,312(r1) <== NOT EXECUTED
ffc1b8e0: 38 81 00 08 addi r4,r1,8 <== NOT EXECUTED
ffc1b8e4: 38 a0 01 18 li r5,280 <== NOT EXECUTED
ffc1b8e8: 7c 69 ea 14 add r3,r9,r29 <== NOT EXECUTED
ffc1b8ec: 48 00 14 dd bl ffc1cdc8 <memcpy> <== NOT EXECUTED
iop->offset = iop->offset + sizeof(struct dirent);
ffc1b8f0: 81 59 00 08 lwz r10,8(r25) <== NOT EXECUTED
ffc1b8f4: 81 79 00 0c lwz r11,12(r25) <== NOT EXECUTED
cmpltd += (sizeof(struct dirent));
count -= (sizeof(struct dirent));
/* inode number extracted, close fat-file */
rc = fat_file_close(&fs_info->fat, tmp_fat_fd);
ffc1b8f8: 7e 03 83 78 mr r3,r16 <== NOT EXECUTED
ffc1b8fc: 80 81 01 34 lwz r4,308(r1) <== NOT EXECUTED
}
memcpy(buffer + cmpltd, &tmp_dirent, sizeof(struct dirent));
iop->offset = iop->offset + sizeof(struct dirent);
cmpltd += (sizeof(struct dirent));
ffc1b900: 3b bd 01 18 addi r29,r29,280 <== NOT EXECUTED
tmp_dirent.d_namlen = strlen(tmp_dirent.d_name);
}
memcpy(buffer + cmpltd, &tmp_dirent, sizeof(struct dirent));
iop->offset = iop->offset + sizeof(struct dirent);
ffc1b904: 31 6b 01 18 addic r11,r11,280 <== NOT EXECUTED
ffc1b908: 7d 4a 01 94 addze r10,r10 <== NOT EXECUTED
ffc1b90c: 91 59 00 08 stw r10,8(r25) <== NOT EXECUTED
cmpltd += (sizeof(struct dirent));
count -= (sizeof(struct dirent));
ffc1b910: 3b 18 fe e8 addi r24,r24,-280 <== NOT EXECUTED
tmp_dirent.d_namlen = strlen(tmp_dirent.d_name);
}
memcpy(buffer + cmpltd, &tmp_dirent, sizeof(struct dirent));
iop->offset = iop->offset + sizeof(struct dirent);
ffc1b914: 91 79 00 0c stw r11,12(r25) <== NOT EXECUTED
cmpltd += (sizeof(struct dirent));
count -= (sizeof(struct dirent));
/* inode number extracted, close fat-file */
rc = fat_file_close(&fs_info->fat, tmp_fat_fd);
ffc1b918: 4b ff 79 3d bl ffc13254 <fat_file_close> <== NOT EXECUTED
if (rc != RC_OK)
ffc1b91c: 7c 71 1b 79 mr. r17,r3 <== NOT EXECUTED
ffc1b920: 41 a2 00 10 beq+ ffc1b930 <msdos_dir_read+0x408> <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
ffc1b924: 80 70 00 9c lwz r3,156(r16) <== NOT EXECUTED
ffc1b928: 4b fe ed 55 bl ffc0a67c <rtems_semaphore_release> <== NOT EXECUTED
ffc1b92c: 48 00 00 b8 b ffc1b9e4 <msdos_dir_read+0x4bc> <== NOT EXECUTED
return rc;
}
}
if (count <= 0)
ffc1b930: 2f 98 00 00 cmpwi cr7,r24,0 <== NOT EXECUTED
ffc1b934: 40 be 00 0c bne+ cr7,ffc1b940 <msdos_dir_read+0x418> <== NOT EXECUTED
ffc1b938: 48 00 00 1c b ffc1b954 <msdos_dir_read+0x42c> <== 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;
ffc1b93c: 3b c0 ff ff li r30,-1 <== NOT EXECUTED
{
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)
ffc1b940: 3b ff 00 20 addi r31,r31,32 <== NOT EXECUTED
ffc1b944: 48 00 00 08 b ffc1b94c <msdos_dir_read+0x424> <== 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)
ffc1b948: 3b e0 00 00 li r31,0 <== NOT EXECUTED
{
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)
ffc1b94c: 7f 9f 98 40 cmplw cr7,r31,r19 <== NOT EXECUTED
ffc1b950: 41 9c fc bc blt+ cr7,ffc1b60c <msdos_dir_read+0xe4> <== NOT EXECUTED
ffc1b954: 7f 5a aa 14 add r26,r26,r21 <== NOT EXECUTED
ffc1b958: 48 00 00 24 b ffc1b97c <msdos_dir_read+0x454> <== 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)
ffc1b95c: 3b 40 00 00 li r26,0 <== NOT EXECUTED
ffc1b960: 3b 80 00 00 li r28,0 <== NOT EXECUTED
ffc1b964: 3a c0 00 00 li r22,0 <== NOT EXECUTED
ffc1b968: 3b c0 ff ff li r30,-1 <== NOT EXECUTED
ffc1b96c: 3b a0 00 00 li r29,0 <== 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;
ffc1b970: 3a 40 ff ff li r18,-1 <== NOT EXECUTED
* copy base name to destination
*/
src_tmp = src;
len = i;
while (i-- > 0) {
*dst++ = tolower((unsigned char)(*src_tmp++));
ffc1b974: 3e 80 00 00 lis r20,0 <== NOT EXECUTED
while (i-- > 0) {
*dst++ = tolower((unsigned char)(*src_tmp++));
len++;
}
}
*dst = '\0'; /* terminate string */
ffc1b978: 39 c0 00 00 li r14,0 <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
while (count > 0)
ffc1b97c: 2f 98 00 00 cmpwi cr7,r24,0 <== NOT EXECUTED
ffc1b980: 40 9e fc 4c bne+ cr7,ffc1b5cc <msdos_dir_read+0xa4> <== NOT EXECUTED
break;
}
j++;
}
rtems_semaphore_release(fs_info->vol_sema);
ffc1b984: 80 70 00 9c lwz r3,156(r16) <== NOT EXECUTED
return cmpltd;
ffc1b988: 7f b1 eb 78 mr r17,r29 <== NOT EXECUTED
break;
}
j++;
}
rtems_semaphore_release(fs_info->vol_sema);
ffc1b98c: 4b fe ec f1 bl ffc0a67c <rtems_semaphore_release> <== NOT EXECUTED
ffc1b990: 48 00 00 54 b ffc1b9e4 <msdos_dir_read+0x4bc> <== 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)
ffc1b994: 39 20 00 08 li r9,8 <== NOT EXECUTED
ffc1b998: 39 0f 00 08 addi r8,r15,8 <== NOT EXECUTED
ffc1b99c: 7d 29 03 a6 mtctr r9 <== NOT EXECUTED
ffc1b9a0: 4b ff fe 5c b ffc1b7fc <msdos_dir_read+0x2d4> <== 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);
ffc1b9a4: 38 61 00 1c addi r3,r1,28 <== NOT EXECUTED
ffc1b9a8: 48 00 26 fd bl ffc1e0a4 <strlen> <== NOT EXECUTED
ffc1b9ac: b0 61 00 1a sth r3,26(r1) <== NOT EXECUTED
ffc1b9b0: 4b ff ff 2c b ffc1b8dc <msdos_dir_read+0x3b4> <== NOT EXECUTED
*dst++ = tolower((unsigned char)(*src_tmp++));
}
/*
* find last non-blank character of extension
*/
for ((i = MSDOS_SHORT_EXT_LEN ,
ffc1b9b4: 38 c0 00 03 li r6,3 <== NOT EXECUTED
ffc1b9b8: 48 00 00 08 b ffc1b9c0 <msdos_dir_read+0x498> <== NOT EXECUTED
src_tmp = src + MSDOS_SHORT_BASE_LEN+MSDOS_SHORT_EXT_LEN-1);
((i > 0) &&
(*src_tmp == ' '));
i--,src_tmp--)
ffc1b9bc: 38 c0 00 02 li r6,2 <== NOT EXECUTED
/*
* extension is not empty
*/
if (i > 0) {
*dst++ = '.'; /* append dot */
len += i + 1; /* extension + dot */
ffc1b9c0: 38 86 00 01 addi r4,r6,1 <== NOT EXECUTED
src_tmp = src + MSDOS_SHORT_BASE_LEN;
while (i-- > 0) {
*dst++ = tolower((unsigned char)(*src_tmp++));
ffc1b9c4: 80 74 27 e8 lwz r3,10216(r20) <== NOT EXECUTED
{};
/*
* extension is not empty
*/
if (i > 0) {
*dst++ = '.'; /* append dot */
ffc1b9c8: 39 20 00 2e li r9,46 <== NOT EXECUTED
len += i + 1; /* extension + dot */
src_tmp = src + MSDOS_SHORT_BASE_LEN;
while (i-- > 0) {
*dst++ = tolower((unsigned char)(*src_tmp++));
ffc1b9cc: 7c 89 03 a6 mtctr r4 <== NOT EXECUTED
{};
/*
* extension is not empty
*/
if (i > 0) {
*dst++ = '.'; /* append dot */
ffc1b9d0: 99 28 00 00 stb r9,0(r8) <== NOT EXECUTED
ffc1b9d4: 39 68 00 01 addi r11,r8,1 <== NOT EXECUTED
len += i + 1; /* extension + dot */
ffc1b9d8: 7c e7 22 14 add r7,r7,r4 <== NOT EXECUTED
src_tmp = src + MSDOS_SHORT_BASE_LEN;
while (i-- > 0) {
*dst++ = tolower((unsigned char)(*src_tmp++));
ffc1b9dc: 38 a0 00 00 li r5,0 <== NOT EXECUTED
ffc1b9e0: 4b ff fe d8 b ffc1b8b8 <msdos_dir_read+0x390> <== NOT EXECUTED
j++;
}
rtems_semaphore_release(fs_info->vol_sema);
return cmpltd;
}
ffc1b9e4: 39 61 01 88 addi r11,r1,392 <== NOT EXECUTED
ffc1b9e8: 7e 23 8b 78 mr r3,r17 <== NOT EXECUTED
ffc1b9ec: 4b fe 5b cc b ffc015b8 <_restgpr_14_x> <== NOT EXECUTED
ffc1b9f0 <msdos_dir_stat>:
int
msdos_dir_stat(
const rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
ffc1b9f0: 94 21 ff e8 stwu r1,-24(r1)
ffc1b9f4: 7c 08 02 a6 mflr r0
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
fat_file_fd_t *fat_fd = loc->node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
ffc1b9f8: 38 a0 00 00 li r5,0
int
msdos_dir_stat(
const rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
ffc1b9fc: 90 01 00 1c stw r0,28(r1)
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
ffc1ba00: 81 23 00 14 lwz r9,20(r3)
int
msdos_dir_stat(
const rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
ffc1ba04: bf a1 00 0c stmw r29,12(r1)
ffc1ba08: 7c 9f 23 78 mr r31,r4
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
fat_file_fd_t *fat_fd = loc->node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
ffc1ba0c: 38 80 00 00 li r4,0
const rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
ffc1ba10: 83 c9 00 08 lwz r30,8(r9)
fat_file_fd_t *fat_fd = loc->node_access;
ffc1ba14: 83 a3 00 08 lwz r29,8(r3)
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
ffc1ba18: 80 7e 00 9c lwz r3,156(r30)
ffc1ba1c: 4b fe eb 3d bl ffc0a558 <rtems_semaphore_obtain>
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
ffc1ba20: 2c 03 00 00 cmpwi r3,0
ffc1ba24: 41 a2 00 18 beq+ ffc1ba3c <msdos_dir_stat+0x4c> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one(EIO);
ffc1ba28: 48 00 06 c1 bl ffc1c0e8 <__errno> <== NOT EXECUTED
ffc1ba2c: 39 20 00 05 li r9,5 <== NOT EXECUTED
ffc1ba30: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED
ffc1ba34: 38 60 ff ff li r3,-1 <== NOT EXECUTED
ffc1ba38: 48 00 00 68 b ffc1baa0 <msdos_dir_stat+0xb0> <== NOT EXECUTED
static inline dev_t rtems_disk_get_device_identifier(
const rtems_disk_device *dd
)
{
return dd->dev;
ffc1ba3c: 81 3e 00 64 lwz r9,100(r30)
buf->st_dev = rtems_disk_get_device_identifier(fs_info->fat.vol.dd);
ffc1ba40: 81 49 00 00 lwz r10,0(r9)
ffc1ba44: 81 69 00 04 lwz r11,4(r9)
buf->st_ino = fat_fd->ino;
ffc1ba48: 81 3d 00 0c lwz r9,12(r29)
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
buf->st_dev = rtems_disk_get_device_identifier(fs_info->fat.vol.dd);
ffc1ba4c: 91 5f 00 00 stw r10,0(r31)
buf->st_ino = fat_fd->ino;
buf->st_mode = S_IFDIR | S_IRWXU | S_IRWXG | S_IRWXO;
buf->st_rdev = 0ll;
ffc1ba50: 39 40 00 00 li r10,0
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
buf->st_dev = rtems_disk_get_device_identifier(fs_info->fat.vol.dd);
buf->st_ino = fat_fd->ino;
ffc1ba54: 91 3f 00 08 stw r9,8(r31)
buf->st_mode = S_IFDIR | S_IRWXU | S_IRWXG | S_IRWXO;
ffc1ba58: 39 20 41 ff li r9,16895
ffc1ba5c: 91 3f 00 0c stw r9,12(r31)
buf->st_rdev = 0ll;
buf->st_size = fat_fd->fat_file_size;
ffc1ba60: 81 3d 00 18 lwz r9,24(r29)
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
buf->st_dev = rtems_disk_get_device_identifier(fs_info->fat.vol.dd);
ffc1ba64: 91 7f 00 04 stw r11,4(r31)
buf->st_ino = fat_fd->ino;
buf->st_mode = S_IFDIR | S_IRWXU | S_IRWXG | S_IRWXO;
buf->st_rdev = 0ll;
ffc1ba68: 39 60 00 00 li r11,0
buf->st_size = fat_fd->fat_file_size;
ffc1ba6c: 91 3f 00 24 stw r9,36(r31)
buf->st_blocks = fat_fd->fat_file_size >> FAT_SECTOR512_BITS;
ffc1ba70: 55 29 ba 7e rlwinm r9,r9,23,9,31
ffc1ba74: 91 3f 00 44 stw r9,68(r31)
buf->st_blksize = fs_info->fat.vol.bps;
ffc1ba78: a1 3e 00 00 lhz r9,0(r30)
buf->st_dev = rtems_disk_get_device_identifier(fs_info->fat.vol.dd);
buf->st_ino = fat_fd->ino;
buf->st_mode = S_IFDIR | S_IRWXU | S_IRWXG | S_IRWXO;
buf->st_rdev = 0ll;
buf->st_size = fat_fd->fat_file_size;
ffc1ba7c: 90 7f 00 20 stw r3,32(r31)
buf->st_blocks = fat_fd->fat_file_size >> FAT_SECTOR512_BITS;
buf->st_blksize = fs_info->fat.vol.bps;
ffc1ba80: 91 3f 00 40 stw r9,64(r31)
buf->st_mtime = fat_fd->mtime;
ffc1ba84: 81 3d 00 40 lwz r9,64(r29)
rtems_set_errno_and_return_minus_one(EIO);
buf->st_dev = rtems_disk_get_device_identifier(fs_info->fat.vol.dd);
buf->st_ino = fat_fd->ino;
buf->st_mode = S_IFDIR | S_IRWXU | S_IRWXG | S_IRWXO;
buf->st_rdev = 0ll;
ffc1ba88: 91 5f 00 18 stw r10,24(r31)
ffc1ba8c: 91 7f 00 1c stw r11,28(r31)
buf->st_size = fat_fd->fat_file_size;
buf->st_blocks = fat_fd->fat_file_size >> FAT_SECTOR512_BITS;
buf->st_blksize = fs_info->fat.vol.bps;
buf->st_mtime = fat_fd->mtime;
ffc1ba90: 91 3f 00 30 stw r9,48(r31)
rtems_semaphore_release(fs_info->vol_sema);
ffc1ba94: 80 7e 00 9c lwz r3,156(r30)
ffc1ba98: 4b fe eb e5 bl ffc0a67c <rtems_semaphore_release>
return RC_OK;
ffc1ba9c: 38 60 00 00 li r3,0
}
ffc1baa0: 39 61 00 18 addi r11,r1,24
ffc1baa4: 4b fe 5b 50 b ffc015f4 <_restgpr_29_x>
ffc1880c <msdos_eval_token>:
static inline bool rtems_filesystem_is_current_directory(
const char *token,
size_t tokenlen
)
{
return tokenlen == 1 && token [0] == '.';
ffc1880c: 2f 86 00 01 cmpwi cr7,r6,1
rtems_filesystem_eval_path_context_t *ctx,
void *arg,
const char *token,
size_t tokenlen
)
{
ffc18810: 7c 08 02 a6 mflr r0
ffc18814: 7c 2b 0b 78 mr r11,r1
ffc18818: 94 21 ff f0 stwu r1,-16(r1)
ffc1881c: 39 20 00 00 li r9,0
ffc18820: 48 01 24 3d bl ffc2ac5c <_savegpr_31>
ffc18824: 90 01 00 14 stw r0,20(r1)
ffc18828: 7c 7f 1b 78 mr r31,r3
ffc1882c: 40 be 00 14 bne+ cr7,ffc18840 <msdos_eval_token+0x34>
ffc18830: 89 25 00 00 lbz r9,0(r5)
ffc18834: 69 29 00 2e xori r9,r9,46
ffc18838: 7d 29 00 34 cntlzw r9,r9
ffc1883c: 55 29 d9 7e rlwinm r9,r9,27,5,31
rtems_filesystem_eval_path_generic_status status =
RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_DONE;
if (rtems_filesystem_is_current_directory(token, tokenlen)) {
ffc18840: 2f 89 00 00 cmpwi cr7,r9,0
ffc18844: 41 9e 00 14 beq- cr7,ffc18858 <msdos_eval_token+0x4c>
static inline void rtems_filesystem_eval_path_clear_token(
rtems_filesystem_eval_path_context_t *ctx
)
{
ctx->tokenlen = 0;
ffc18848: 39 20 00 00 li r9,0
ffc1884c: 91 3f 00 0c stw r9,12(r31)
rtems_filesystem_eval_path_clear_token(ctx);
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_CONTINUE;
ffc18850: 38 60 00 00 li r3,0
ffc18854: 48 00 00 74 b ffc188c8 <msdos_eval_token+0xbc>
} else {
rtems_filesystem_location_info_t *currentloc =
rtems_filesystem_eval_path_get_currentloc(ctx);
int rc = msdos_find_name(currentloc, token, tokenlen);
ffc18858: 7c a4 2b 78 mr r4,r5
ffc1885c: 38 7f 00 18 addi r3,r31,24
ffc18860: 7c c5 33 78 mr r5,r6
ffc18864: 48 00 14 d5 bl ffc19d38 <msdos_find_name>
if (rc == RC_OK) {
ffc18868: 7c 69 1b 79 mr. r9,r3
ffc1886c: 40 a2 00 40 bne+ ffc188ac <msdos_eval_token+0xa0>
msdos_set_handlers(rtems_filesystem_location_info_t *loc)
{
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
fat_file_fd_t *fat_fd = loc->node_access;
if (fat_fd->fat_file_type == FAT_DIRECTORY)
ffc18870: 81 5f 00 20 lwz r10,32(r31)
ffc18874: 91 3f 00 0c stw r9,12(r31)
ffc18878: 81 4a 00 10 lwz r10,16(r10)
* None
*/
static void
msdos_set_handlers(rtems_filesystem_location_info_t *loc)
{
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
ffc1887c: 81 3f 00 2c lwz r9,44(r31)
fat_file_fd_t *fat_fd = loc->node_access;
if (fat_fd->fat_file_type == FAT_DIRECTORY)
ffc18880: 2f 8a 00 00 cmpwi cr7,r10,0
* None
*/
static void
msdos_set_handlers(rtems_filesystem_location_info_t *loc)
{
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
ffc18884: 81 29 00 08 lwz r9,8(r9)
fat_file_fd_t *fat_fd = loc->node_access;
if (fat_fd->fat_file_type == FAT_DIRECTORY)
ffc18888: 40 be 00 0c bne+ cr7,ffc18894 <msdos_eval_token+0x88>
loc->handlers = fs_info->directory_handlers;
ffc1888c: 81 29 00 94 lwz r9,148(r9)
ffc18890: 48 00 00 08 b ffc18898 <msdos_eval_token+0x8c>
else
loc->handlers = fs_info->file_handlers;
ffc18894: 81 29 00 98 lwz r9,152(r9)
int rc = msdos_find_name(currentloc, token, tokenlen);
if (rc == RC_OK) {
rtems_filesystem_eval_path_clear_token(ctx);
msdos_set_handlers(currentloc);
if (rtems_filesystem_eval_path_has_path(ctx)) {
ffc18898: 80 7f 00 04 lwz r3,4(r31)
fat_file_fd_t *fat_fd = loc->node_access;
if (fat_fd->fat_file_type == FAT_DIRECTORY)
loc->handlers = fs_info->directory_handlers;
else
loc->handlers = fs_info->file_handlers;
ffc1889c: 91 3f 00 28 stw r9,40(r31)
int rc = msdos_find_name(currentloc, token, tokenlen);
if (rc == RC_OK) {
rtems_filesystem_eval_path_clear_token(ctx);
msdos_set_handlers(currentloc);
if (rtems_filesystem_eval_path_has_path(ctx)) {
ffc188a0: 7c 63 00 34 cntlzw r3,r3
ffc188a4: 54 63 d9 7e rlwinm r3,r3,27,5,31
ffc188a8: 48 00 00 20 b ffc188c8 <msdos_eval_token+0xbc>
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_CONTINUE;
}
} else if (rc == MSDOS_NAME_NOT_FOUND_ERR) {
ffc188ac: 2f 89 7d 01 cmpwi cr7,r9,32001
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY;
ffc188b0: 38 60 00 02 li r3,2
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) {
ffc188b4: 41 be 00 14 beq+ cr7,ffc188c8 <msdos_eval_token+0xbc> <== ALWAYS TAKEN
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY;
} else {
rtems_filesystem_eval_path_error(ctx, 0);
ffc188b8: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc188bc: 38 80 00 00 li r4,0 <== NOT EXECUTED
ffc188c0: 4b fe e6 f5 bl ffc06fb4 <rtems_filesystem_eval_path_error><== NOT EXECUTED
void *arg,
const char *token,
size_t tokenlen
)
{
rtems_filesystem_eval_path_generic_status status =
ffc188c4: 38 60 00 01 li r3,1 <== NOT EXECUTED
rtems_filesystem_eval_path_error(ctx, 0);
}
}
return status;
}
ffc188c8: 39 61 00 10 addi r11,r1,16
ffc188cc: 4b fe 8d 30 b ffc015fc <_restgpr_31_x>
ffc1bb1c <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)
{
ffc1bb1c: 94 21 ff f0 stwu r1,-16(r1)
ffc1bb20: 7c 08 02 a6 mflr r0
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
ffc1bb24: 38 80 00 00 li r4,0
* RC_OK, if file closed successfully, or -1 if error occured (errno set
* appropriately)
*/
int
msdos_file_close(rtems_libio_t *iop)
{
ffc1bb28: 90 01 00 14 stw r0,20(r1)
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
ffc1bb2c: 38 a0 00 00 li r5,0
int
msdos_file_close(rtems_libio_t *iop)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
ffc1bb30: 81 23 00 28 lwz r9,40(r3)
* RC_OK, if file closed successfully, or -1 if error occured (errno set
* appropriately)
*/
int
msdos_file_close(rtems_libio_t *iop)
{
ffc1bb34: bf c1 00 08 stmw r30,8(r1)
ffc1bb38: 7c 7e 1b 78 mr r30,r3
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
ffc1bb3c: 83 e9 00 08 lwz r31,8(r9)
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
ffc1bb40: 80 7f 00 9c lwz r3,156(r31)
ffc1bb44: 4b fe ea 15 bl ffc0a558 <rtems_semaphore_obtain>
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
ffc1bb48: 2f 83 00 00 cmpwi cr7,r3,0
ffc1bb4c: 41 be 00 18 beq+ cr7,ffc1bb64 <msdos_file_close+0x48> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one(EIO);
ffc1bb50: 48 00 05 99 bl ffc1c0e8 <__errno> <== NOT EXECUTED
ffc1bb54: 39 20 00 05 li r9,5 <== NOT EXECUTED
ffc1bb58: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED
ffc1bb5c: 3b c0 ff ff li r30,-1 <== NOT EXECUTED
ffc1bb60: 48 00 00 18 b ffc1bb78 <msdos_file_close+0x5c> <== NOT EXECUTED
rc = msdos_file_update(iop);
ffc1bb64: 7f c3 f3 78 mr r3,r30
ffc1bb68: 4b ff ff 41 bl ffc1baa8 <msdos_file_update>
ffc1bb6c: 7c 7e 1b 78 mr r30,r3
rtems_semaphore_release(fs_info->vol_sema);
ffc1bb70: 80 7f 00 9c lwz r3,156(r31)
ffc1bb74: 4b fe eb 09 bl ffc0a67c <rtems_semaphore_release>
return rc;
}
ffc1bb78: 39 61 00 10 addi r11,r1,16
ffc1bb7c: 7f c3 f3 78 mr r3,r30
ffc1bb80: 4b fe 5a 78 b ffc015f8 <_restgpr_30_x>
ffc1bde0 <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)
{
ffc1bde0: 94 21 ff d0 stwu r1,-48(r1)
ffc1bde4: 7c 08 02 a6 mflr r0
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
uint32_t old_length;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
ffc1bde8: 38 80 00 00 li r4,0
* RETURNS:
* RC_OK on success, or -1 if error occured (errno set appropriately).
*/
int
msdos_file_ftruncate(rtems_libio_t *iop, off_t length)
{
ffc1bdec: 90 01 00 34 stw r0,52(r1)
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
ffc1bdf0: 81 23 00 28 lwz r9,40(r3)
* RETURNS:
* RC_OK on success, or -1 if error occured (errno set appropriately).
*/
int
msdos_file_ftruncate(rtems_libio_t *iop, off_t length)
{
ffc1bdf4: bf 41 00 18 stmw r26,24(r1)
ffc1bdf8: 7c bb 2b 78 mr r27,r5
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
uint32_t old_length;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
ffc1bdfc: 38 a0 00 00 li r5,0
int
msdos_file_ftruncate(rtems_libio_t *iop, off_t length)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
ffc1be00: 83 e9 00 08 lwz r31,8(r9)
* RETURNS:
* RC_OK on success, or -1 if error occured (errno set appropriately).
*/
int
msdos_file_ftruncate(rtems_libio_t *iop, off_t length)
{
ffc1be04: 7c dd 33 78 mr r29,r6
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
ffc1be08: 83 c3 00 1c lwz r30,28(r3)
uint32_t old_length;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
ffc1be0c: 80 7f 00 9c lwz r3,156(r31)
ffc1be10: 4b fe e7 49 bl ffc0a558 <rtems_semaphore_obtain>
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
ffc1be14: 2c 03 00 00 cmpwi r3,0
ffc1be18: 41 a2 00 18 beq+ ffc1be30 <msdos_file_ftruncate+0x50> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one(EIO);
ffc1be1c: 48 00 02 cd bl ffc1c0e8 <__errno> <== NOT EXECUTED
ffc1be20: 39 20 00 05 li r9,5 <== NOT EXECUTED
ffc1be24: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED
ffc1be28: 3b 80 ff ff li r28,-1 <== NOT EXECUTED
ffc1be2c: 48 00 00 a0 b ffc1becc <msdos_file_ftruncate+0xec> <== NOT EXECUTED
old_length = fat_fd->fat_file_size;
if (length < old_length) {
ffc1be30: 7f 83 d8 00 cmpw cr7,r3,r27
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
old_length = fat_fd->fat_file_size;
ffc1be34: 83 5e 00 18 lwz r26,24(r30)
if (length < old_length) {
ffc1be38: 41 9d 00 10 bgt- cr7,ffc1be48 <msdos_file_ftruncate+0x68><== NEVER TAKEN
ffc1be3c: 40 9e 00 24 bne- cr7,ffc1be60 <msdos_file_ftruncate+0x80><== NEVER TAKEN
ffc1be40: 7f 9a e8 40 cmplw cr7,r26,r29
ffc1be44: 40 9d 00 1c ble- cr7,ffc1be60 <msdos_file_ftruncate+0x80>
rc = fat_file_truncate(&fs_info->fat, fat_fd, length);
ffc1be48: 7f e3 fb 78 mr r3,r31
ffc1be4c: 7f c4 f3 78 mr r4,r30
ffc1be50: 7f a5 eb 78 mr r5,r29
ffc1be54: 4b ff 72 ed bl ffc13140 <fat_file_truncate>
ffc1be58: 7c 7c 1b 78 mr r28,r3
ffc1be5c: 48 00 00 5c b ffc1beb8 <msdos_file_ftruncate+0xd8>
} else {
uint32_t new_length;
rc = fat_file_extend(&fs_info->fat,
ffc1be60: 7f e3 fb 78 mr r3,r31
ffc1be64: 7f c4 f3 78 mr r4,r30
ffc1be68: 38 a0 00 01 li r5,1
ffc1be6c: 7f a6 eb 78 mr r6,r29
ffc1be70: 38 e1 00 08 addi r7,r1,8
ffc1be74: 4b ff 75 79 bl ffc133ec <fat_file_extend>
fat_fd,
true,
length,
&new_length);
if (rc == RC_OK && length != new_length) {
ffc1be78: 7c 7c 1b 79 mr. r28,r3
ffc1be7c: 40 82 00 3c bne- ffc1beb8 <msdos_file_ftruncate+0xd8> <== NEVER TAKEN
ffc1be80: 2f 9b 00 00 cmpwi cr7,r27,0
ffc1be84: 81 21 00 08 lwz r9,8(r1)
ffc1be88: 40 9e 00 0c bne- cr7,ffc1be94 <msdos_file_ftruncate+0xb4><== NEVER TAKEN
ffc1be8c: 7f 9d 48 00 cmpw cr7,r29,r9
ffc1be90: 41 9e 00 30 beq- cr7,ffc1bec0 <msdos_file_ftruncate+0xe0><== ALWAYS TAKEN
fat_file_truncate(&fs_info->fat, fat_fd, old_length);
ffc1be94: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED
ffc1be98: 7f 45 d3 78 mr r5,r26 <== NOT EXECUTED
ffc1be9c: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc1bea0: 4b ff 72 a1 bl ffc13140 <fat_file_truncate> <== NOT EXECUTED
errno = ENOSPC;
rc = -1;
ffc1bea4: 3b 80 ff ff li r28,-1 <== NOT EXECUTED
true,
length,
&new_length);
if (rc == RC_OK && length != new_length) {
fat_file_truncate(&fs_info->fat, fat_fd, old_length);
errno = ENOSPC;
ffc1bea8: 48 00 02 41 bl ffc1c0e8 <__errno> <== NOT EXECUTED
ffc1beac: 39 20 00 1c li r9,28 <== NOT EXECUTED
ffc1beb0: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED
ffc1beb4: 48 00 00 10 b ffc1bec4 <msdos_file_ftruncate+0xe4> <== NOT EXECUTED
rc = -1;
}
}
if (rc == RC_OK) {
ffc1beb8: 2f 9c 00 00 cmpwi cr7,r28,0
ffc1bebc: 40 9e 00 08 bne- cr7,ffc1bec4 <msdos_file_ftruncate+0xe4><== NEVER TAKEN
fat_fd->fat_file_size = length;
ffc1bec0: 93 be 00 18 stw r29,24(r30)
}
rtems_semaphore_release(fs_info->vol_sema);
ffc1bec4: 80 7f 00 9c lwz r3,156(r31)
ffc1bec8: 4b fe e7 b5 bl ffc0a67c <rtems_semaphore_release>
return rc;
}
ffc1becc: 39 61 00 30 addi r11,r1,48
ffc1bed0: 7f 83 e3 78 mr r3,r28
ffc1bed4: 4b fe 57 14 b ffc015e8 <_restgpr_26_x>
ffc1bb84 <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)
{
ffc1bb84: 94 21 ff e0 stwu r1,-32(r1)
ffc1bb88: 7c 08 02 a6 mflr r0
ffc1bb8c: 90 01 00 24 stw r0,36(r1)
ssize_t ret = 0;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
ffc1bb90: 81 23 00 28 lwz r9,40(r3)
* 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)
{
ffc1bb94: bf 61 00 0c stmw r27,12(r1)
ffc1bb98: 7c 7f 1b 78 mr r31,r3
ffc1bb9c: 7c 9e 23 78 mr r30,r4
ssize_t ret = 0;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
ffc1bba0: 83 a9 00 08 lwz r29,8(r9)
* 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)
{
ffc1bba4: 7c bc 2b 78 mr r28,r5
ssize_t ret = 0;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
ffc1bba8: 83 63 00 1c lwz r27,28(r3)
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
ffc1bbac: 38 80 00 00 li r4,0
ffc1bbb0: 80 7d 00 9c lwz r3,156(r29)
ffc1bbb4: 38 a0 00 00 li r5,0
ffc1bbb8: 4b fe e9 a1 bl ffc0a558 <rtems_semaphore_obtain>
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
ffc1bbbc: 2f 83 00 00 cmpwi cr7,r3,0
ffc1bbc0: 41 be 00 18 beq+ cr7,ffc1bbd8 <msdos_file_read+0x54> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one(EIO);
ffc1bbc4: 48 00 05 25 bl ffc1c0e8 <__errno> <== NOT EXECUTED
ffc1bbc8: 39 20 00 05 li r9,5 <== NOT EXECUTED
ffc1bbcc: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED
ffc1bbd0: 3b c0 ff ff li r30,-1 <== NOT EXECUTED
ffc1bbd4: 48 00 00 4c b ffc1bc20 <msdos_file_read+0x9c> <== NOT EXECUTED
ret = fat_file_read(&fs_info->fat, fat_fd, iop->offset, count,
ffc1bbd8: 80 bf 00 0c lwz r5,12(r31)
ffc1bbdc: 7f c7 f3 78 mr r7,r30
ffc1bbe0: 7f a3 eb 78 mr r3,r29
ffc1bbe4: 7f 64 db 78 mr r4,r27
ffc1bbe8: 7f 86 e3 78 mr r6,r28
ffc1bbec: 4b ff 73 99 bl ffc12f84 <fat_file_read>
buffer);
if (ret > 0)
ffc1bbf0: 7c 7e 1b 79 mr. r30,r3
ffc1bbf4: 40 81 00 24 ble- ffc1bc18 <msdos_file_read+0x94>
iop->offset += ret;
ffc1bbf8: 81 1f 00 08 lwz r8,8(r31)
ffc1bbfc: 7f cb f3 78 mr r11,r30
ffc1bc00: 81 3f 00 0c lwz r9,12(r31)
ffc1bc04: 7f ca fe 70 srawi r10,r30,31
ffc1bc08: 7d 6b 48 14 addc r11,r11,r9
ffc1bc0c: 7d 4a 41 14 adde r10,r10,r8
ffc1bc10: 91 5f 00 08 stw r10,8(r31)
ffc1bc14: 91 7f 00 0c stw r11,12(r31)
rtems_semaphore_release(fs_info->vol_sema);
ffc1bc18: 80 7d 00 9c lwz r3,156(r29)
ffc1bc1c: 4b fe ea 61 bl ffc0a67c <rtems_semaphore_release>
return ret;
}
ffc1bc20: 39 61 00 20 addi r11,r1,32
ffc1bc24: 7f c3 f3 78 mr r3,r30
ffc1bc28: 4b fe 59 c4 b ffc015ec <_restgpr_27_x>
ffc1bd14 <msdos_file_stat>:
int
msdos_file_stat(
const rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
ffc1bd14: 94 21 ff e8 stwu r1,-24(r1)
ffc1bd18: 7c 08 02 a6 mflr r0
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
fat_file_fd_t *fat_fd = loc->node_access;
uint32_t cl_mask = fs_info->fat.vol.bpc - 1;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
ffc1bd1c: 38 a0 00 00 li r5,0
int
msdos_file_stat(
const rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
ffc1bd20: 90 01 00 1c stw r0,28(r1)
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
ffc1bd24: 81 23 00 14 lwz r9,20(r3)
int
msdos_file_stat(
const rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
ffc1bd28: bf 81 00 08 stmw r28,8(r1)
ffc1bd2c: 7c 9f 23 78 mr r31,r4
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
fat_file_fd_t *fat_fd = loc->node_access;
uint32_t cl_mask = fs_info->fat.vol.bpc - 1;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
ffc1bd30: 38 80 00 00 li r4,0
const rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
ffc1bd34: 83 c9 00 08 lwz r30,8(r9)
fat_file_fd_t *fat_fd = loc->node_access;
ffc1bd38: 83 a3 00 08 lwz r29,8(r3)
uint32_t cl_mask = fs_info->fat.vol.bpc - 1;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
ffc1bd3c: 80 7e 00 9c lwz r3,156(r30)
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
fat_file_fd_t *fat_fd = loc->node_access;
uint32_t cl_mask = fs_info->fat.vol.bpc - 1;
ffc1bd40: a3 9e 00 06 lhz r28,6(r30)
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
ffc1bd44: 4b fe e8 15 bl ffc0a558 <rtems_semaphore_obtain>
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
ffc1bd48: 2c 03 00 00 cmpwi r3,0
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
fat_file_fd_t *fat_fd = loc->node_access;
uint32_t cl_mask = fs_info->fat.vol.bpc - 1;
ffc1bd4c: 3b 9c ff ff addi r28,r28,-1
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
ffc1bd50: 41 a2 00 18 beq+ ffc1bd68 <msdos_file_stat+0x54> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one(EIO);
ffc1bd54: 48 00 03 95 bl ffc1c0e8 <__errno> <== NOT EXECUTED
ffc1bd58: 39 20 00 05 li r9,5 <== NOT EXECUTED
ffc1bd5c: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED
ffc1bd60: 38 60 ff ff li r3,-1 <== NOT EXECUTED
ffc1bd64: 48 00 00 74 b ffc1bdd8 <msdos_file_stat+0xc4> <== NOT EXECUTED
ffc1bd68: 81 3e 00 64 lwz r9,100(r30)
buf->st_dev = rtems_disk_get_device_identifier(fs_info->fat.vol.dd);
ffc1bd6c: 81 49 00 00 lwz r10,0(r9)
ffc1bd70: 81 69 00 04 lwz r11,4(r9)
buf->st_ino = fat_fd->ino;
ffc1bd74: 81 3d 00 0c lwz r9,12(r29)
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
buf->st_dev = rtems_disk_get_device_identifier(fs_info->fat.vol.dd);
ffc1bd78: 91 5f 00 00 stw r10,0(r31)
buf->st_ino = fat_fd->ino;
buf->st_mode = S_IFREG | S_IRWXU | S_IRWXG | S_IRWXO;
buf->st_rdev = 0ll;
ffc1bd7c: 39 40 00 00 li r10,0
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
buf->st_dev = rtems_disk_get_device_identifier(fs_info->fat.vol.dd);
buf->st_ino = fat_fd->ino;
ffc1bd80: 91 3f 00 08 stw r9,8(r31)
buf->st_mode = S_IFREG | S_IRWXU | S_IRWXG | S_IRWXO;
ffc1bd84: 39 20 00 00 li r9,0
ffc1bd88: 61 29 81 ff ori r9,r9,33279
ffc1bd8c: 91 3f 00 0c stw r9,12(r31)
buf->st_rdev = 0ll;
buf->st_size = fat_fd->fat_file_size;
ffc1bd90: 81 3d 00 18 lwz r9,24(r29)
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
buf->st_dev = rtems_disk_get_device_identifier(fs_info->fat.vol.dd);
ffc1bd94: 91 7f 00 04 stw r11,4(r31)
buf->st_ino = fat_fd->ino;
buf->st_mode = S_IFREG | S_IRWXU | S_IRWXG | S_IRWXO;
buf->st_rdev = 0ll;
ffc1bd98: 39 60 00 00 li r11,0
buf->st_size = fat_fd->fat_file_size;
ffc1bd9c: 91 3f 00 24 stw r9,36(r31)
buf->st_blocks = ((fat_fd->fat_file_size + cl_mask) & ~cl_mask)
ffc1bda0: 7d 3c 4a 14 add r9,r28,r9
ffc1bda4: 7d 3c e0 78 andc r28,r9,r28
>> FAT_SECTOR512_BITS;
buf->st_blksize = fs_info->fat.vol.bpc;
ffc1bda8: a1 3e 00 06 lhz r9,6(r30)
buf->st_ino = fat_fd->ino;
buf->st_mode = S_IFREG | S_IRWXU | S_IRWXG | S_IRWXO;
buf->st_rdev = 0ll;
buf->st_size = fat_fd->fat_file_size;
buf->st_blocks = ((fat_fd->fat_file_size + cl_mask) & ~cl_mask)
>> FAT_SECTOR512_BITS;
ffc1bdac: 57 9c ba 7e rlwinm r28,r28,23,9,31
buf->st_dev = rtems_disk_get_device_identifier(fs_info->fat.vol.dd);
buf->st_ino = fat_fd->ino;
buf->st_mode = S_IFREG | S_IRWXU | S_IRWXG | S_IRWXO;
buf->st_rdev = 0ll;
buf->st_size = fat_fd->fat_file_size;
ffc1bdb0: 90 7f 00 20 stw r3,32(r31)
buf->st_blocks = ((fat_fd->fat_file_size + cl_mask) & ~cl_mask)
>> FAT_SECTOR512_BITS;
buf->st_blksize = fs_info->fat.vol.bpc;
ffc1bdb4: 91 3f 00 40 stw r9,64(r31)
buf->st_mtime = fat_fd->mtime;
ffc1bdb8: 81 3d 00 40 lwz r9,64(r29)
rtems_set_errno_and_return_minus_one(EIO);
buf->st_dev = rtems_disk_get_device_identifier(fs_info->fat.vol.dd);
buf->st_ino = fat_fd->ino;
buf->st_mode = S_IFREG | S_IRWXU | S_IRWXG | S_IRWXO;
buf->st_rdev = 0ll;
ffc1bdbc: 91 5f 00 18 stw r10,24(r31)
ffc1bdc0: 91 7f 00 1c stw r11,28(r31)
buf->st_size = fat_fd->fat_file_size;
buf->st_blocks = ((fat_fd->fat_file_size + cl_mask) & ~cl_mask)
ffc1bdc4: 93 9f 00 44 stw r28,68(r31)
>> FAT_SECTOR512_BITS;
buf->st_blksize = fs_info->fat.vol.bpc;
buf->st_mtime = fat_fd->mtime;
ffc1bdc8: 91 3f 00 30 stw r9,48(r31)
rtems_semaphore_release(fs_info->vol_sema);
ffc1bdcc: 80 7e 00 9c lwz r3,156(r30)
ffc1bdd0: 4b fe e8 ad bl ffc0a67c <rtems_semaphore_release>
return RC_OK;
ffc1bdd4: 38 60 00 00 li r3,0
}
ffc1bdd8: 39 61 00 18 addi r11,r1,24
ffc1bddc: 4b fe 58 14 b ffc015f0 <_restgpr_28_x>
ffc1bed8 <msdos_file_sync>:
* RETURNS:
* RC_OK on success, or -1 if error occured (errno set appropriately)
*/
int
msdos_file_sync(rtems_libio_t *iop)
{
ffc1bed8: 94 21 ff f0 stwu r1,-16(r1)
ffc1bedc: 7c 08 02 a6 mflr r0
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
ffc1bee0: 38 80 00 00 li r4,0
* RETURNS:
* RC_OK on success, or -1 if error occured (errno set appropriately)
*/
int
msdos_file_sync(rtems_libio_t *iop)
{
ffc1bee4: 90 01 00 14 stw r0,20(r1)
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
ffc1bee8: 38 a0 00 00 li r5,0
int
msdos_file_sync(rtems_libio_t *iop)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
ffc1beec: 81 23 00 28 lwz r9,40(r3)
* RETURNS:
* RC_OK on success, or -1 if error occured (errno set appropriately)
*/
int
msdos_file_sync(rtems_libio_t *iop)
{
ffc1bef0: bf c1 00 08 stmw r30,8(r1)
ffc1bef4: 7c 7e 1b 78 mr r30,r3
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
ffc1bef8: 83 e9 00 08 lwz r31,8(r9)
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
ffc1befc: 80 7f 00 9c lwz r3,156(r31)
ffc1bf00: 4b fe e6 59 bl ffc0a558 <rtems_semaphore_obtain>
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
ffc1bf04: 2f 83 00 00 cmpwi cr7,r3,0
ffc1bf08: 41 be 00 18 beq+ cr7,ffc1bf20 <msdos_file_sync+0x48> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one(EIO);
ffc1bf0c: 48 00 01 dd bl ffc1c0e8 <__errno> <== NOT EXECUTED
ffc1bf10: 39 20 00 05 li r9,5 <== NOT EXECUTED
ffc1bf14: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED
ffc1bf18: 3b c0 ff ff li r30,-1 <== NOT EXECUTED
ffc1bf1c: 48 00 00 28 b ffc1bf44 <msdos_file_sync+0x6c> <== NOT EXECUTED
rc = msdos_file_update(iop);
ffc1bf20: 7f c3 f3 78 mr r3,r30
ffc1bf24: 4b ff fb 85 bl ffc1baa8 <msdos_file_update>
if (rc != RC_OK)
ffc1bf28: 7c 7e 1b 79 mr. r30,r3
ffc1bf2c: 41 a2 00 08 beq+ ffc1bf34 <msdos_file_sync+0x5c> <== ALWAYS TAKEN
ffc1bf30: 48 00 00 0c b ffc1bf3c <msdos_file_sync+0x64> <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
rc = fat_sync(&fs_info->fat);
ffc1bf34: 7f e3 fb 78 mr r3,r31
ffc1bf38: 4b ff 88 09 bl ffc14740 <fat_sync>
rtems_semaphore_release(fs_info->vol_sema);
ffc1bf3c: 80 7f 00 9c lwz r3,156(r31)
ffc1bf40: 4b fe e7 3d bl ffc0a67c <rtems_semaphore_release>
return RC_OK;
}
ffc1bf44: 39 61 00 10 addi r11,r1,16
ffc1bf48: 7f c3 f3 78 mr r3,r30
ffc1bf4c: 4b fe 56 ac b ffc015f8 <_restgpr_30_x>
ffc1baa8 <msdos_file_update>:
#include "msdos.h"
static int
msdos_file_update(rtems_libio_t *iop)
{
ffc1baa8: 94 21 ff f0 stwu r1,-16(r1)
ffc1baac: 7c 08 02 a6 mflr r0
ffc1bab0: 90 01 00 14 stw r0,20(r1)
ffc1bab4: bf c1 00 08 stmw r30,8(r1)
ffc1bab8: 7c 7f 1b 78 mr r31,r3
int rc = RC_OK;
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
ffc1babc: 83 c3 00 1c lwz r30,28(r3)
#include "msdos.h"
static int
msdos_file_update(rtems_libio_t *iop)
{
int rc = RC_OK;
ffc1bac0: 38 60 00 00 li r3,0
/*
* 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))
ffc1bac4: 89 3e 00 30 lbz r9,48(r30)
ffc1bac8: 71 2a 00 01 andi. r10,r9,1
ffc1bacc: 40 a2 00 48 bne+ ffc1bb14 <msdos_file_update+0x6c> <== NEVER TAKEN
{
rc = msdos_set_first_cluster_num(iop->pathinfo.mt_entry, fat_fd);
ffc1bad0: 80 7f 00 28 lwz r3,40(r31)
ffc1bad4: 7f c4 f3 78 mr r4,r30
ffc1bad8: 4b ff d1 a9 bl ffc18c80 <msdos_set_first_cluster_num>
if (rc != RC_OK)
ffc1badc: 2c 03 00 00 cmpwi r3,0
ffc1bae0: 40 a2 00 34 bne+ ffc1bb14 <msdos_file_update+0x6c> <== NEVER TAKEN
{
return rc;
}
rc = msdos_set_file_size(iop->pathinfo.mt_entry, fat_fd);
ffc1bae4: 80 7f 00 28 lwz r3,40(r31)
ffc1bae8: 7f c4 f3 78 mr r4,r30
ffc1baec: 4b ff d2 61 bl ffc18d4c <msdos_set_file_size>
if (rc != RC_OK)
ffc1baf0: 2c 03 00 00 cmpwi r3,0
ffc1baf4: 40 a2 00 20 bne+ ffc1bb14 <msdos_file_update+0x6c> <== NEVER TAKEN
return rc;
}
}
return rc;
}
ffc1baf8: 80 01 00 14 lwz r0,20(r1)
if (rc != RC_OK)
{
return rc;
}
rc = msdos_set_dir_wrt_time_and_date(iop->pathinfo.mt_entry, fat_fd);
ffc1bafc: 7f c4 f3 78 mr r4,r30
ffc1bb00: 80 7f 00 28 lwz r3,40(r31)
return rc;
}
}
return rc;
}
ffc1bb04: 7c 08 03 a6 mtlr r0
ffc1bb08: bb c1 00 08 lmw r30,8(r1)
ffc1bb0c: 38 21 00 10 addi r1,r1,16
if (rc != RC_OK)
{
return rc;
}
rc = msdos_set_dir_wrt_time_and_date(iop->pathinfo.mt_entry, fat_fd);
ffc1bb10: 4b ff d0 7c b ffc18b8c <msdos_set_dir_wrt_time_and_date>
return rc;
}
}
return rc;
}
ffc1bb14: 39 61 00 10 addi r11,r1,16 <== NOT EXECUTED
ffc1bb18: 4b fe 5a e0 b ffc015f8 <_restgpr_30_x> <== NOT EXECUTED
ffc1bc2c <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)
{
ffc1bc2c: 94 21 ff e0 stwu r1,-32(r1)
ffc1bc30: 7c 08 02 a6 mflr r0
ffc1bc34: 90 01 00 24 stw r0,36(r1)
ssize_t ret = 0;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
ffc1bc38: 81 23 00 28 lwz r9,40(r3)
* 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)
{
ffc1bc3c: bf 61 00 0c stmw r27,12(r1)
ffc1bc40: 7c 7f 1b 78 mr r31,r3
ffc1bc44: 7c 9e 23 78 mr r30,r4
ssize_t ret = 0;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
ffc1bc48: 83 a9 00 08 lwz r29,8(r9)
* 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)
{
ffc1bc4c: 7c bb 2b 78 mr r27,r5
ssize_t ret = 0;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
ffc1bc50: 83 83 00 1c lwz r28,28(r3)
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
ffc1bc54: 38 80 00 00 li r4,0
ffc1bc58: 80 7d 00 9c lwz r3,156(r29)
ffc1bc5c: 38 a0 00 00 li r5,0
ffc1bc60: 4b fe e8 f9 bl ffc0a558 <rtems_semaphore_obtain>
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
ffc1bc64: 2c 03 00 00 cmpwi r3,0
ffc1bc68: 41 a2 00 14 beq+ ffc1bc7c <msdos_file_write+0x50> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one(EIO);
ffc1bc6c: 48 00 04 7d bl ffc1c0e8 <__errno> <== NOT EXECUTED
ffc1bc70: 39 20 00 05 li r9,5 <== NOT EXECUTED
ffc1bc74: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED
ffc1bc78: 48 00 00 44 b ffc1bcbc <msdos_file_write+0x90> <== NOT EXECUTED
if ((iop->flags & LIBIO_FLAGS_APPEND) != 0)
ffc1bc7c: 81 3f 00 10 lwz r9,16(r31)
ffc1bc80: 71 2a 02 00 andi. r10,r9,512
ffc1bc84: 41 82 00 10 beq- ffc1bc94 <msdos_file_write+0x68>
iop->offset = fat_fd->fat_file_size;
ffc1bc88: 81 3c 00 18 lwz r9,24(r28)
ffc1bc8c: 90 7f 00 08 stw r3,8(r31)
ffc1bc90: 91 3f 00 0c stw r9,12(r31)
ret = fat_file_write(&fs_info->fat, fat_fd, iop->offset, count,
ffc1bc94: 80 bf 00 0c lwz r5,12(r31)
ffc1bc98: 7f c7 f3 78 mr r7,r30
ffc1bc9c: 7f a3 eb 78 mr r3,r29
ffc1bca0: 7f 84 e3 78 mr r4,r28
ffc1bca4: 7f 66 db 78 mr r6,r27
ffc1bca8: 4b ff 79 91 bl ffc13638 <fat_file_write>
buffer);
if (ret < 0)
ffc1bcac: 7c 7e 1b 79 mr. r30,r3
ffc1bcb0: 40 a0 00 14 bge+ ffc1bcc4 <msdos_file_write+0x98> <== ALWAYS TAKEN
{
rtems_semaphore_release(fs_info->vol_sema);
ffc1bcb4: 80 7d 00 9c lwz r3,156(r29) <== NOT EXECUTED
ffc1bcb8: 4b fe e9 c5 bl ffc0a67c <rtems_semaphore_release> <== NOT EXECUTED
return -1;
ffc1bcbc: 3b c0 ff ff li r30,-1 <== NOT EXECUTED
ffc1bcc0: 48 00 00 48 b ffc1bd08 <msdos_file_write+0xdc> <== NOT EXECUTED
/*
* update file size in both fat-file descriptor and file control block if
* file was extended
*/
iop->offset += ret;
ffc1bcc4: 81 3f 00 0c lwz r9,12(r31)
ffc1bcc8: 7f cb f3 78 mr r11,r30
ffc1bccc: 81 1f 00 08 lwz r8,8(r31)
ffc1bcd0: 7f ca fe 70 srawi r10,r30,31
ffc1bcd4: 7d 6b 48 14 addc r11,r11,r9
ffc1bcd8: 7d 4a 41 14 adde r10,r10,r8
if (iop->offset > fat_fd->fat_file_size)
ffc1bcdc: 81 3c 00 18 lwz r9,24(r28)
/*
* update file size in both fat-file descriptor and file control block if
* file was extended
*/
iop->offset += ret;
ffc1bce0: 91 5f 00 08 stw r10,8(r31)
if (iop->offset > fat_fd->fat_file_size)
ffc1bce4: 2f 8a 00 00 cmpwi cr7,r10,0
/*
* update file size in both fat-file descriptor and file control block if
* file was extended
*/
iop->offset += ret;
ffc1bce8: 91 7f 00 0c stw r11,12(r31)
if (iop->offset > fat_fd->fat_file_size)
ffc1bcec: 41 9d 00 10 bgt- cr7,ffc1bcfc <msdos_file_write+0xd0> <== NEVER TAKEN
ffc1bcf0: 40 9e 00 10 bne- cr7,ffc1bd00 <msdos_file_write+0xd4> <== NEVER TAKEN
ffc1bcf4: 7f 8b 48 40 cmplw cr7,r11,r9
ffc1bcf8: 40 9d 00 08 ble- cr7,ffc1bd00 <msdos_file_write+0xd4>
fat_fd->fat_file_size = iop->offset;
ffc1bcfc: 91 7c 00 18 stw r11,24(r28)
rtems_semaphore_release(fs_info->vol_sema);
ffc1bd00: 80 7d 00 9c lwz r3,156(r29)
ffc1bd04: 4b fe e9 79 bl ffc0a67c <rtems_semaphore_release>
return ret;
}
ffc1bd08: 39 61 00 20 addi r11,r1,32
ffc1bd0c: 7f c3 f3 78 mr r3,r30
ffc1bd10: 4b fe 58 dc b ffc015ec <_restgpr_27_x>
ffc1b3d8 <msdos_filename_unix2dos>:
/*
* Fill the dos filename string with blanks. These are DOS's pad
* characters.
*/
for (i = 0; i <= 10; i++)
dn[i] = ' ';
ffc1b3d8: 39 00 00 0b li r8,11
ffc1b3dc: 7d 09 03 a6 mtctr r8
/*
* Fill the dos filename string with blanks. These are DOS's pad
* characters.
*/
for (i = 0; i <= 10; i++)
ffc1b3e0: 39 20 00 00 li r9,0
dn[i] = ' ';
ffc1b3e4: 39 40 00 20 li r10,32
ffc1b3e8: 7d 45 49 ae stbx r10,r5,r9
/*
* Fill the dos filename string with blanks. These are DOS's pad
* characters.
*/
for (i = 0; i <= 10; i++)
ffc1b3ec: 39 29 00 01 addi r9,r9,1
ffc1b3f0: 42 00 ff f8 bdnz+ ffc1b3e8 <msdos_filename_unix2dos+0x10>
/*
* The filenames "." and ".." are handled specially, since they
* don't follow dos filename rules.
*/
if (un[0] == '.' && unlen == 1) {
ffc1b3f4: 89 23 00 00 lbz r9,0(r3)
ffc1b3f8: 2f 89 00 2e cmpwi cr7,r9,46
ffc1b3fc: 40 be 00 40 bne+ cr7,ffc1b43c <msdos_filename_unix2dos+0x64><== ALWAYS TAKEN
ffc1b400: 2f 84 00 01 cmpwi cr7,r4,1 <== NOT EXECUTED
ffc1b404: 40 be 00 0c bne+ cr7,ffc1b410 <msdos_filename_unix2dos+0x38><== NOT EXECUTED
dn[0] = '.';
ffc1b408: 99 25 00 00 stb r9,0(r5) <== NOT EXECUTED
return 0;
ffc1b40c: 48 00 01 14 b ffc1b520 <msdos_filename_unix2dos+0x148><== NOT EXECUTED
}
if (un[0] == '.' && un[1] == '.' && unlen == 2) {
ffc1b410: 89 23 00 01 lbz r9,1(r3) <== NOT EXECUTED
ffc1b414: 2f 89 00 2e cmpwi cr7,r9,46 <== NOT EXECUTED
ffc1b418: 40 be 00 24 bne+ cr7,ffc1b43c <msdos_filename_unix2dos+0x64><== NOT EXECUTED
ffc1b41c: 2f 84 00 02 cmpwi cr7,r4,2 <== NOT EXECUTED
ffc1b420: 40 be 00 1c bne+ cr7,ffc1b43c <msdos_filename_unix2dos+0x64><== NOT EXECUTED
dn[0] = '.';
ffc1b424: 99 25 00 00 stb r9,0(r5) <== NOT EXECUTED
dn[1] = '.';
ffc1b428: 99 25 00 01 stb r9,1(r5) <== NOT EXECUTED
return 0;
ffc1b42c: 48 00 00 f4 b ffc1b520 <msdos_filename_unix2dos+0x148><== NOT EXECUTED
/*
* Remove any dots from the start of a file name.
*/
while (unlen && (*un == '.')) {
un++;
ffc1b430: 38 63 00 01 addi r3,r3,1 <== NOT EXECUTED
unlen--;
ffc1b434: 38 84 ff ff addi r4,r4,-1 <== NOT EXECUTED
ffc1b438: 48 00 00 0c b ffc1b444 <msdos_filename_unix2dos+0x6c><== NOT EXECUTED
ffc1b43c: 39 24 00 01 addi r9,r4,1
ffc1b440: 7d 29 03 a6 mtctr r9
}
/*
* Remove any dots from the start of a file name.
*/
while (unlen && (*un == '.')) {
ffc1b444: 42 00 00 18 bdnz- ffc1b45c <msdos_filename_unix2dos+0x84>
* 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)
ffc1b448: 39 20 00 08 li r9,8
/*
* Fill the dos filename string with blanks. These are DOS's pad
* characters.
*/
for (i = 0; i <= 10; i++)
ffc1b44c: 39 40 00 00 li r10,0
* 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)
ffc1b450: 7d 29 03 a6 mtctr r9
ffc1b454: 3d 00 ff c3 lis r8,-61
ffc1b458: 48 00 00 38 b ffc1b490 <msdos_filename_unix2dos+0xb8>
}
/*
* Remove any dots from the start of a file name.
*/
while (unlen && (*un == '.')) {
ffc1b45c: 89 23 00 00 lbz r9,0(r3)
ffc1b460: 2f 89 00 2e cmpwi cr7,r9,46
ffc1b464: 41 9e ff cc beq+ cr7,ffc1b430 <msdos_filename_unix2dos+0x58><== NEVER TAKEN
ffc1b468: 4b ff ff e0 b ffc1b448 <msdos_filename_unix2dos+0x70>
* 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)
ffc1b46c: 38 e8 cc 68 addi r7,r8,-13208
ffc1b470: 7d 27 48 ae lbzx r9,r7,r9
ffc1b474: 2f 89 00 00 cmpwi cr7,r9,0
ffc1b478: 41 9e 00 4c beq- cr7,ffc1b4c4 <msdos_filename_unix2dos+0xec>
break;
dn[i] = msdos_map[c];
ffc1b47c: 7d 25 51 ae stbx r9,r5,r10
un++;
ffc1b480: 38 63 00 01 addi r3,r3,1
unlen--;
ffc1b484: 38 84 ff ff addi r4,r4,-1
* 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++) {
ffc1b488: 39 4a 00 01 addi r10,r10,1
ffc1b48c: 42 40 00 38 bdz- ffc1b4c4 <msdos_filename_unix2dos+0xec>
ffc1b490: 2f 84 00 00 cmpwi cr7,r4,0
ffc1b494: 41 9e 00 30 beq- cr7,ffc1b4c4 <msdos_filename_unix2dos+0xec>
ffc1b498: 89 23 00 00 lbz r9,0(r3)
ffc1b49c: 2f 89 00 00 cmpwi cr7,r9,0
ffc1b4a0: 41 9e 00 24 beq- cr7,ffc1b4c4 <msdos_filename_unix2dos+0xec><== NEVER TAKEN
ffc1b4a4: 2f 89 00 2e cmpwi cr7,r9,46
ffc1b4a8: 40 9e ff c4 bne+ cr7,ffc1b46c <msdos_filename_unix2dos+0x94>
ffc1b4ac: 48 00 00 18 b ffc1b4c4 <msdos_filename_unix2dos+0xec>
*/
while (unlen && (c = *un)) {
un++;
unlen--;
/* Make sure we've skipped over the dot before stopping. */
if (c == '.')
ffc1b4b0: 2f 89 00 2e cmpwi cr7,r9,46
/*
* Strip any further characters up to a '.' or the end of the
* string.
*/
while (unlen && (c = *un)) {
un++;
ffc1b4b4: 38 63 00 01 addi r3,r3,1
unlen--;
ffc1b4b8: 38 84 ff ff addi r4,r4,-1
/* Make sure we've skipped over the dot before stopping. */
if (c == '.')
ffc1b4bc: 40 be 00 10 bne+ cr7,ffc1b4cc <msdos_filename_unix2dos+0xf4>
ffc1b4c0: 48 00 00 1c b ffc1b4dc <msdos_filename_unix2dos+0x104>
ffc1b4c4: 39 04 00 01 addi r8,r4,1
ffc1b4c8: 7d 09 03 a6 mtctr r8
/*
* Strip any further characters up to a '.' or the end of the
* string.
*/
while (unlen && (c = *un)) {
ffc1b4cc: 42 40 00 10 bdz- ffc1b4dc <msdos_filename_unix2dos+0x104>
ffc1b4d0: 89 23 00 00 lbz r9,0(r3)
ffc1b4d4: 2f 89 00 00 cmpwi cr7,r9,0
ffc1b4d8: 40 9e ff d8 bne+ cr7,ffc1b4b0 <msdos_filename_unix2dos+0xd8><== ALWAYS TAKEN
/*
* 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)
ffc1b4dc: 39 20 00 00 li r9,0
* 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)
ffc1b4e0: 3d 00 ff c3 lis r8,-61
ffc1b4e4: 48 00 00 28 b ffc1b50c <msdos_filename_unix2dos+0x134>
ffc1b4e8: 38 e8 cc 68 addi r7,r8,-13208
ffc1b4ec: 7d 47 50 ae lbzx r10,r7,r10
ffc1b4f0: 2f 8a 00 00 cmpwi cr7,r10,0
ffc1b4f4: 41 9e 00 2c beq- cr7,ffc1b520 <msdos_filename_unix2dos+0x148>
/*
* 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++) {
ffc1b4f8: 2f 89 00 02 cmpwi cr7,r9,2
/*
* 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)
ffc1b4fc: 7c e5 4a 14 add r7,r5,r9
* Filenames in this form are probably inaccessable under dos.
*/
for (i = 8; i <= 10 && unlen && (c = *un); i++) {
if (msdos_map[c] == 0)
break;
dn[i] = msdos_map[c];
ffc1b500: 99 47 00 08 stb r10,8(r7)
/*
* 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++) {
ffc1b504: 39 29 00 01 addi r9,r9,1
ffc1b508: 41 9e 00 18 beq- cr7,ffc1b520 <msdos_filename_unix2dos+0x148>
ffc1b50c: 7f 89 20 00 cmpw cr7,r9,r4
ffc1b510: 41 9e 00 10 beq- cr7,ffc1b520 <msdos_filename_unix2dos+0x148>
ffc1b514: 7d 43 48 ae lbzx r10,r3,r9
ffc1b518: 2f 8a 00 00 cmpwi cr7,r10,0
ffc1b51c: 40 9e ff cc bne+ cr7,ffc1b4e8 <msdos_filename_unix2dos+0x110><== ALWAYS TAKEN
dn[i] = msdos_map[c];
un++;
unlen--;
}
return 0;
}
ffc1b520: 38 60 00 00 li r3,0
ffc1b524: 4e 80 00 20 blr
ffc19d38 <msdos_find_name>:
msdos_find_name(
rtems_filesystem_location_info_t *parent_loc,
const char *name,
int name_len
)
{
ffc19d38: 94 21 ff a0 stwu r1,-96(r1)
ffc19d3c: 7c 08 02 a6 mflr r0
ffc19d40: 90 01 00 64 stw r0,100(r1)
int rc = RC_OK;
msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info;
ffc19d44: 81 23 00 14 lwz r9,20(r3)
msdos_find_name(
rtems_filesystem_location_info_t *parent_loc,
const char *name,
int name_len
)
{
ffc19d48: bf 61 00 4c stmw r27,76(r1)
ffc19d4c: 7c be 2b 78 mr r30,r5
ffc19d50: 7c 9c 23 78 mr r28,r4
ffc19d54: 7c 7d 1b 78 mr r29,r3
int rc = RC_OK;
msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info;
ffc19d58: 83 e9 00 08 lwz r31,8(r9)
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);
ffc19d5c: 38 80 00 00 li r4,0
int name_len
)
{
int rc = RC_OK;
msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info;
fat_file_fd_t *fat_fd = NULL;
ffc19d60: 39 20 00 00 li r9,0
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);
ffc19d64: 38 a0 00 20 li r5,32
int name_len
)
{
int rc = RC_OK;
msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info;
fat_file_fd_t *fat_fd = NULL;
ffc19d68: 91 21 00 38 stw r9,56(r1)
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);
ffc19d6c: 38 61 00 08 addi r3,r1,8
ffc19d70: 48 00 31 4d bl ffc1cebc <memset>
name_type = msdos_long_to_short (name,
ffc19d74: 7f c4 f3 78 mr r4,r30
ffc19d78: 38 a1 00 08 addi r5,r1,8
ffc19d7c: 38 c0 00 0b li r6,11
ffc19d80: 7f 83 e3 78 mr r3,r28
ffc19d84: 4b ff eb fd bl ffc18980 <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,
ffc19d88: 3b 61 00 28 addi r27,r1,40
unsigned short date = 0;
char node_entry[MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE];
memset(node_entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
name_type = msdos_long_to_short (name,
ffc19d8c: 7c 67 1b 78 mr r7,r3
/*
* 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,
ffc19d90: 7f c6 f3 78 mr r6,r30
ffc19d94: 7f a3 eb 78 mr r3,r29
ffc19d98: 38 80 00 00 li r4,0
ffc19d9c: 7f 85 e3 78 mr r5,r28
ffc19da0: 7f 68 db 78 mr r8,r27
ffc19da4: 39 21 00 08 addi r9,r1,8
ffc19da8: 4b ff fe 9d bl ffc19c44 <msdos_get_name_node>
&dir_pos, node_entry);
if (rc != RC_OK)
ffc19dac: 7c 7e 1b 79 mr. r30,r3
ffc19db0: 40 82 01 70 bne- ffc19f20 <msdos_find_name+0x1e8>
return rc;
if (((*MSDOS_DIR_ATTR(node_entry)) & MSDOS_ATTR_VOLUME_ID) ||
ffc19db4: 89 21 00 13 lbz r9,19(r1)
((*MSDOS_DIR_ATTR(node_entry) & MSDOS_ATTR_LFN_MASK) == MSDOS_ATTR_LFN))
return MSDOS_NAME_NOT_FOUND_ERR;
ffc19db8: 3b c0 7d 01 li r30,32001
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) ||
ffc19dbc: 55 2a 07 38 rlwinm r10,r9,0,28,28
ffc19dc0: 71 48 00 ff andi. r8,r10,255
ffc19dc4: 40 a2 01 5c bne+ ffc19f20 <msdos_find_name+0x1e8> <== NEVER TAKEN
ffc19dc8: 55 29 06 be clrlwi r9,r9,26
ffc19dcc: 2f 89 00 0f cmpwi cr7,r9,15
ffc19dd0: 41 be 01 50 beq+ cr7,ffc19f20 <msdos_find_name+0x1e8> <== 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);
ffc19dd4: 7f e3 fb 78 mr r3,r31
ffc19dd8: 7f 64 db 78 mr r4,r27
ffc19ddc: 38 a1 00 38 addi r5,r1,56
ffc19de0: 4b ff 90 05 bl ffc12de4 <fat_file_open>
if (rc != RC_OK)
ffc19de4: 7c 7e 1b 79 mr. r30,r3
ffc19de8: 40 82 01 38 bne- ffc19f20 <msdos_find_name+0x1e8> <== NEVER TAKEN
return rc;
fat_fd->dir_pos = dir_pos;
ffc19dec: 83 81 00 38 lwz r28,56(r1)
ffc19df0: 39 3c 00 20 addi r9,r28,32
ffc19df4: 7c bb 84 aa lswi r5,r27,16
ffc19df8: 7c a9 85 aa stswi r5,r9,16
* 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)
ffc19dfc: 81 3c 00 08 lwz r9,8(r28)
ffc19e00: 2f 89 00 01 cmpwi cr7,r9,1
ffc19e04: 40 be 00 f4 bne+ cr7,ffc19ef8 <msdos_find_name+0x1c0>
{
fat_fd->cln = MSDOS_EXTRACT_CLUSTER_NUM(node_entry);
ffc19e08: a1 41 00 1c lhz r10,28(r1)
ffc19e0c: a1 21 00 22 lhz r9,34(r1)
ffc19e10: 55 48 c2 3e rlwinm r8,r10,24,8,31
ffc19e14: 55 4a 44 2e rlwinm r10,r10,8,16,23
ffc19e18: 7d 0a 53 78 or r10,r8,r10
ffc19e1c: 55 28 c2 3e rlwinm r8,r9,24,8,31
ffc19e20: 55 29 44 2e rlwinm r9,r9,8,16,23
ffc19e24: 55 4a 80 1e rlwinm r10,r10,16,0,15
ffc19e28: 7d 09 4b 78 or r9,r8,r9
ffc19e2c: 7d 49 4b 78 or r9,r10,r9
time_val = *MSDOS_DIR_WRITE_TIME(node_entry);
date = *MSDOS_DIR_WRITE_DATE(node_entry);
ffc19e30: a1 41 00 20 lhz r10,32(r1)
* 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)
{
fat_fd->cln = MSDOS_EXTRACT_CLUSTER_NUM(node_entry);
ffc19e34: 91 3c 00 1c stw r9,28(r28)
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));
ffc19e38: 55 43 c2 3e rlwinm r3,r10,24,8,31
*/
if (fat_fd->links_num == 1)
{
fat_fd->cln = MSDOS_EXTRACT_CLUSTER_NUM(node_entry);
time_val = *MSDOS_DIR_WRITE_TIME(node_entry);
ffc19e3c: a1 21 00 1e lhz r9,30(r1)
date = *MSDOS_DIR_WRITE_DATE(node_entry);
fat_fd->mtime = msdos_date_dos2unix(CF_LE_W(date), CF_LE_W(time_val));
ffc19e40: 55 4a 44 2e rlwinm r10,r10,8,16,23
ffc19e44: 7c 63 53 78 or r3,r3,r10
ffc19e48: 55 24 c2 3e rlwinm r4,r9,24,8,31
ffc19e4c: 55 29 44 2e rlwinm r9,r9,8,16,23
ffc19e50: 7c 84 4b 78 or r4,r4,r9
ffc19e54: 48 00 14 99 bl ffc1b2ec <msdos_date_dos2unix>
if ((*MSDOS_DIR_ATTR(node_entry)) & MSDOS_ATTR_DIRECTORY)
ffc19e58: 89 21 00 13 lbz r9,19(r1)
fat_fd->cln = MSDOS_EXTRACT_CLUSTER_NUM(node_entry);
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));
ffc19e5c: 90 7c 00 40 stw r3,64(r28)
if ((*MSDOS_DIR_ATTR(node_entry)) & MSDOS_ATTR_DIRECTORY)
ffc19e60: 55 29 06 f6 rlwinm r9,r9,0,27,27
ffc19e64: 71 2a 00 ff andi. r10,r9,255
ffc19e68: 80 81 00 38 lwz r4,56(r1)
ffc19e6c: 41 82 00 2c beq- ffc19e98 <msdos_find_name+0x160>
{
fat_fd->fat_file_type = FAT_DIRECTORY;
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
ffc19e70: 3d 20 00 20 lis r9,32
fat_fd->mtime = msdos_date_dos2unix(CF_LE_W(date), CF_LE_W(time_val));
if ((*MSDOS_DIR_ATTR(node_entry)) & MSDOS_ATTR_DIRECTORY)
{
fat_fd->fat_file_type = FAT_DIRECTORY;
ffc19e74: 93 c4 00 10 stw r30,16(r4)
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
rc = fat_file_size(&fs_info->fat, fat_fd);
ffc19e78: 7f e3 fb 78 mr r3,r31
fat_fd->mtime = msdos_date_dos2unix(CF_LE_W(date), CF_LE_W(time_val));
if ((*MSDOS_DIR_ATTR(node_entry)) & MSDOS_ATTR_DIRECTORY)
{
fat_fd->fat_file_type = FAT_DIRECTORY;
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
ffc19e7c: 91 24 00 14 stw r9,20(r4)
rc = fat_file_size(&fs_info->fat, fat_fd);
ffc19e80: 4b ff 9a 61 bl ffc138e0 <fat_file_size>
if (rc != RC_OK)
ffc19e84: 7c 7e 1b 79 mr. r30,r3
ffc19e88: 41 a2 00 38 beq+ ffc19ec0 <msdos_find_name+0x188> <== ALWAYS TAKEN
{
fat_file_close(&fs_info->fat, fat_fd);
ffc19e8c: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc19e90: 80 81 00 38 lwz r4,56(r1) <== NOT EXECUTED
ffc19e94: 48 00 00 80 b ffc19f14 <msdos_find_name+0x1dc> <== NOT EXECUTED
ffc19e98: 81 21 00 24 lwz r9,36(r1)
ffc19e9c: 51 2a 46 3e rlwimi r10,r9,8,24,31
ffc19ea0: 51 2a c4 2e rlwimi r10,r9,24,16,23
ffc19ea4: 51 2a 42 1e rlwimi r10,r9,8,8,15
ffc19ea8: 51 2a c0 0e rlwimi r10,r9,24,0,7
}
}
else
{
fat_fd->fat_file_size = CF_LE_L(*MSDOS_DIR_FILE_SIZE(node_entry));
fat_fd->fat_file_type = FAT_FILE;
ffc19eac: 39 20 00 04 li r9,4
return rc;
}
}
else
{
fat_fd->fat_file_size = CF_LE_L(*MSDOS_DIR_FILE_SIZE(node_entry));
ffc19eb0: 91 44 00 18 stw r10,24(r4)
fat_fd->fat_file_type = FAT_FILE;
ffc19eb4: 91 24 00 10 stw r9,16(r4)
fat_fd->size_limit = MSDOS_MAX_FILE_SIZE;
ffc19eb8: 39 20 ff ff li r9,-1
ffc19ebc: 91 24 00 14 stw r9,20(r4)
}
/* these data is not actual for zero-length fat-file */
fat_fd->map.file_cln = 0;
ffc19ec0: 81 21 00 38 lwz r9,56(r1)
ffc19ec4: 39 40 00 00 li r10,0
fat_fd->map.disk_cln = fat_fd->cln;
if ((fat_fd->fat_file_size != 0) &&
ffc19ec8: 81 09 00 18 lwz r8,24(r9)
fat_fd->fat_file_type = FAT_FILE;
fat_fd->size_limit = MSDOS_MAX_FILE_SIZE;
}
/* these data is not actual for zero-length fat-file */
fat_fd->map.file_cln = 0;
ffc19ecc: 91 49 00 34 stw r10,52(r9)
fat_fd->map.disk_cln = fat_fd->cln;
if ((fat_fd->fat_file_size != 0) &&
ffc19ed0: 2f 88 00 00 cmpwi cr7,r8,0
fat_fd->size_limit = MSDOS_MAX_FILE_SIZE;
}
/* these data is not actual for zero-length fat-file */
fat_fd->map.file_cln = 0;
fat_fd->map.disk_cln = fat_fd->cln;
ffc19ed4: 81 49 00 1c lwz r10,28(r9)
ffc19ed8: 91 49 00 38 stw r10,56(r9)
if ((fat_fd->fat_file_size != 0) &&
ffc19edc: 41 9e 00 14 beq- cr7,ffc19ef0 <msdos_find_name+0x1b8>
(fat_fd->fat_file_size <= fs_info->fat.vol.bpc))
ffc19ee0: a0 ff 00 06 lhz r7,6(r31)
/* 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) &&
ffc19ee4: 7f 88 38 40 cmplw cr7,r8,r7
ffc19ee8: 41 9d 00 08 bgt- cr7,ffc19ef0 <msdos_find_name+0x1b8>
ffc19eec: 48 00 00 08 b ffc19ef4 <msdos_find_name+0x1bc>
{
fat_fd->map.last_cln = fat_fd->cln;
}
else
{
fat_fd->map.last_cln = FAT_UNDEFINED_VALUE;
ffc19ef0: 39 40 ff ff li r10,-1
ffc19ef4: 91 49 00 3c stw r10,60(r9)
}
}
/* close fat-file corresponded to the node we searched in */
rc = fat_file_close(&fs_info->fat, parent_loc->node_access);
ffc19ef8: 80 9d 00 08 lwz r4,8(r29)
ffc19efc: 7f e3 fb 78 mr r3,r31
ffc19f00: 4b ff 93 55 bl ffc13254 <fat_file_close>
ffc19f04: 80 81 00 38 lwz r4,56(r1)
if (rc != RC_OK)
ffc19f08: 7c 7e 1b 79 mr. r30,r3
ffc19f0c: 41 a2 00 10 beq+ ffc19f1c <msdos_find_name+0x1e4> <== ALWAYS TAKEN
{
fat_file_close(&fs_info->fat, fat_fd);
ffc19f10: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc19f14: 4b ff 93 41 bl ffc13254 <fat_file_close> <== NOT EXECUTED
ffc19f18: 48 00 00 08 b ffc19f20 <msdos_find_name+0x1e8> <== NOT EXECUTED
return rc;
}
/* update node_info_ptr field */
parent_loc->node_access = fat_fd;
ffc19f1c: 90 9d 00 08 stw r4,8(r29)
return rc;
}
ffc19f20: 39 61 00 60 addi r11,r1,96
ffc19f24: 7f c3 f3 78 mr r3,r30
ffc19f28: 4b fe 76 c4 b ffc015ec <_restgpr_27_x>
ffc1901c <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
)
{
ffc1901c: 7d 80 00 26 mfcr r12
uint32_t empty_space_count = 0;
bool empty_space_found = false;
uint32_t entries_per_block;
bool read_cluster = false;
assert(name_len > 0);
ffc19020: 7c eb 3b 79 mr. r11,r7
int name_len,
msdos_name_type_t name_type,
fat_dir_pos_t *dir_pos,
char *name_dir_entry
)
{
ffc19024: 94 21 ff 80 stwu r1,-128(r1)
ffc19028: 7c 08 02 a6 mflr r0
ffc1902c: 90 01 00 84 stw r0,132(r1)
ffc19030: bd c1 00 38 stmw r14,56(r1)
ffc19034: 91 81 00 34 stw r12,52(r1)
ffc19038: 90 c1 00 18 stw r6,24(r1)
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
ffc1903c: 83 e3 00 08 lwz r31,8(r3)
uint32_t empty_space_count = 0;
bool empty_space_found = false;
uint32_t entries_per_block;
bool read_cluster = false;
assert(name_len > 0);
ffc19040: 41 a1 00 28 bgt+ ffc19068 <msdos_find_name_in_fat_file+0x4c><== ALWAYS TAKEN
ffc19044: 3c a0 ff c3 lis r5,-61 <== NOT EXECUTED
ffc19048: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1904c: 38 a5 cb 58 addi r5,r5,-13480 <== NOT EXECUTED
ffc19050: 3c c0 ff c3 lis r6,-61 <== NOT EXECUTED
ffc19054: 38 63 cb cc addi r3,r3,-13364 <== NOT EXECUTED
ffc19058: 38 80 03 c9 li r4,969 <== NOT EXECUTED
ffc1905c: 38 a5 00 14 addi r5,r5,20 <== NOT EXECUTED
ffc19060: 38 c6 cc 4a addi r6,r6,-13238 <== NOT EXECUTED
ffc19064: 48 00 00 f4 b ffc19158 <msdos_find_name_in_fat_file+0x13c><== NOT EXECUTED
* 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))
ffc19068: 2f 85 00 00 cmpwi cr7,r5,0
ffc1906c: 7d 3c 4b 78 mr r28,r9
static inline void
fat_dir_pos_init(
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
ffc19070: 39 20 00 00 li r9,0
ffc19074: 91 3c 00 00 stw r9,0(r28)
ffc19078: 7c 9d 23 78 mr r29,r4
ffc1907c: 7c ae 2b 78 mr r14,r5
dir_pos->sname.ofs = 0;
ffc19080: 91 3c 00 04 stw r9,4(r28)
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
ffc19084: 39 20 ff ff li r9,-1
ffc19088: 7d 5b 53 78 mr r27,r10
ffc1908c: 91 3c 00 08 stw r9,8(r28)
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
ffc19090: 91 3c 00 0c stw r9,12(r28)
assert(name_len > 0);
fat_dir_pos_init(dir_pos);
lfn_start.cln = lfn_start.ofs = FAT_FILE_SHORT_NAME;
ffc19094: 91 21 00 0c stw r9,12(r1)
ffc19098: 91 21 00 08 stw r9,8(r1)
* 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))
ffc1909c: 41 9e 00 10 beq- cr7,ffc190ac <msdos_find_name_in_fat_file+0x90>
ffc190a0: 2f 88 00 01 cmpwi cr7,r8,1
lfn_entries = 0;
ffc190a4: 3b 20 00 00 li r25,0
* 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))
ffc190a8: 41 9e 00 10 beq- cr7,ffc190b8 <msdos_find_name_in_fat_file+0x9c>
lfn_entries = 0;
else
lfn_entries =
((name_len - 1) + MSDOS_LFN_LEN_PER_ENTRY) / MSDOS_LFN_LEN_PER_ENTRY;
ffc190ac: 3b 2b 00 0c addi r25,r11,12
* test this make this test always fail, ie add "0 &&".
*/
if (create_node && (name_type == MSDOS_NAME_SHORT))
lfn_entries = 0;
else
lfn_entries =
ffc190b0: 39 20 00 0d li r9,13
ffc190b4: 7f 39 4b d6 divw r25,r25,r9
((name_len - 1) + MSDOS_LFN_LEN_PER_ENTRY) / MSDOS_LFN_LEN_PER_ENTRY;
if (FAT_FD_OF_ROOT_DIR(fat_fd) &&
ffc190b8: 81 3d 00 20 lwz r9,32(r29)
ffc190bc: 2f 89 00 01 cmpwi cr7,r9,1
ffc190c0: 40 be 00 24 bne+ cr7,ffc190e4 <msdos_find_name_in_fat_file+0xc8>
ffc190c4: 81 3d 00 24 lwz r9,36(r29)
ffc190c8: 2f 89 00 00 cmpwi cr7,r9,0
ffc190cc: 40 9e 00 18 bne- cr7,ffc190e4 <msdos_find_name_in_fat_file+0xc8><== NEVER TAKEN
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
ffc190d0: 89 3f 00 0e lbz r9,14(r31)
lfn_entries = 0;
else
lfn_entries =
((name_len - 1) + MSDOS_LFN_LEN_PER_ENTRY) / MSDOS_LFN_LEN_PER_ENTRY;
if (FAT_FD_OF_ROOT_DIR(fat_fd) &&
ffc190d4: 71 23 00 03 andi. r3,r9,3
ffc190d8: 41 82 00 0c beq- ffc190e4 <msdos_find_name_in_fat_file+0xc8>
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
bts2rd = fat_fd->fat_file_size;
ffc190dc: 83 dd 00 18 lwz r30,24(r29)
ffc190e0: 48 00 00 08 b ffc190e8 <msdos_find_name_in_fat_file+0xcc>
else
bts2rd = fs_info->fat.vol.bpc;
ffc190e4: a3 df 00 06 lhz r30,6(r31)
/*
* Remainder is not empty so is this entry empty ?
*/
empty_space_count++;
if (empty_space_count == (lfn_entries + 1))
ffc190e8: 39 59 00 01 addi r10,r25,1
/*
* 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),
ffc190ec: 3a 40 00 00 li r18,0
/*
* Remainder is not empty so is this entry empty ?
*/
empty_space_count++;
if (empty_space_count == (lfn_entries + 1))
ffc190f0: 91 41 00 1c stw r10,28(r1)
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;
ffc190f4: 3a 20 00 00 li r17,0
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;
ffc190f8: 3a c0 00 00 li r22,0
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;
ffc190fc: 3a e0 00 00 li r23,0
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;
ffc19100: 3b 00 00 00 li r24,0
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;
ffc19104: 3a 60 00 00 li r19,0
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;
ffc19108: 3a 00 00 00 li r16,0
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;
ffc1910c: 39 20 00 00 li r9,0
char *name_dir_entry
)
{
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t dir_offset = 0;
ffc19110: 3a 80 00 00 li r20,0
ffc19114: 2e 0e 00 00 cmpwi cr4,r14,0
* 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 ||
ffc19118: 2d 88 00 01 cmpwi cr3,r8,1
memcpy(name_dir_entry, entry,
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
return RC_OK;
}
lfn_start.cln = FAT_FILE_SHORT_NAME;
ffc1911c: 39 e0 ff ff li r15,-1
/*
* 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),
ffc19120: 48 00 03 14 b ffc19434 <msdos_find_name_in_fat_file+0x418>
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)
ffc19124: 2f 83 00 1f cmpwi cr7,r3,31
ffc19128: 41 bd 00 08 bgt+ cr7,ffc19130 <msdos_find_name_in_fat_file+0x114><== ALWAYS TAKEN
ffc1912c: 48 00 06 d0 b ffc197fc <msdos_find_name_in_fat_file+0x7e0><== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
assert(ret == bts2rd);
ffc19130: 7f 83 f0 00 cmpw cr7,r3,r30
ffc19134: 41 be 00 28 beq+ cr7,ffc1915c <msdos_find_name_in_fat_file+0x140><== ALWAYS TAKEN
ffc19138: 3c a0 ff c3 lis r5,-61 <== NOT EXECUTED
ffc1913c: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc19140: 38 a5 cb 58 addi r5,r5,-13480 <== NOT EXECUTED
ffc19144: 3c c0 ff c3 lis r6,-61 <== NOT EXECUTED
ffc19148: 38 63 cb cc addi r3,r3,-13364 <== NOT EXECUTED
ffc1914c: 38 80 03 f9 li r4,1017 <== NOT EXECUTED
ffc19150: 38 a5 00 14 addi r5,r5,20 <== NOT EXECUTED
ffc19154: 38 c6 cc 57 addi r6,r6,-13225 <== NOT EXECUTED
ffc19158: 4b fe c9 c5 bl ffc05b1c <__assert_func> <== NOT EXECUTED
ffc1915c: 83 5f 00 a0 lwz r26,160(r31)
/* 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;
ffc19160: 3a a0 00 00 li r21,0
* 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)
ffc19164: 2f 96 00 00 cmpwi cr7,r22,0
/*
* 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) ==
ffc19168: 89 5a 00 00 lbz r10,0(r26)
* 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)
ffc1916c: 40 9e 00 0c bne- cr7,ffc19178 <msdos_find_name_in_fat_file+0x15c>
ffc19170: 7e b7 ab 78 mr r23,r21
ffc19174: 7e 98 a3 78 mr r24,r20
{
empty_space_entry = dir_entry;
empty_space_offset = dir_offset;
}
if (remainder_empty)
ffc19178: 2f 8a 00 00 cmpwi cr7,r10,0
ffc1917c: 40 be 00 2c bne+ cr7,ffc191a8 <msdos_find_name_in_fat_file+0x18c>
#endif
/*
* If just looking and there is no more entries in the
* directory - return name-not-found
*/
if (!create_node)
ffc19180: 40 b2 00 0c bne+ cr4,ffc1918c <msdos_find_name_in_fat_file+0x170>
return MSDOS_NAME_NOT_FOUND_ERR;
ffc19184: 3b 20 7d 01 li r25,32001
ffc19188: 48 00 06 b8 b ffc19840 <msdos_find_name_in_fat_file+0x824>
* 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)
ffc1918c: 2f 91 00 00 cmpwi cr7,r17,0
ffc19190: 40 9e 02 e4 bne- cr7,ffc19474 <msdos_find_name_in_fat_file+0x458>
(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;
ffc19194: 57 c9 d9 7e rlwinm r9,r30,27,5,31
* 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);
ffc19198: 7e d6 4a 14 add r22,r22,r9
ffc1919c: 56 b5 d9 7e rlwinm r21,r21,27,5,31
* 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 +=
ffc191a0: 7e d5 b0 50 subf r22,r21,r22
ffc191a4: 48 00 02 d0 b ffc19474 <msdos_find_name_in_fat_file+0x458>
printf ("MSFS:[3.2] esf:%i esc%i\n", empty_space_found, empty_space_count);
#endif
}
break;
}
else if (entry_empty)
ffc191a8: 2f 8a 00 e5 cmpwi cr7,r10,229
ffc191ac: 40 be 00 1c bne+ cr7,ffc191c8 <msdos_find_name_in_fat_file+0x1ac>
{
if (create_node)
ffc191b0: 41 92 02 6c beq- cr4,ffc1941c <msdos_find_name_in_fat_file+0x400>
/*
* Remainder is not empty so is this entry empty ?
*/
empty_space_count++;
if (empty_space_count == (lfn_entries + 1))
ffc191b4: 81 41 00 1c lwz r10,28(r1)
if (create_node)
{
/*
* Remainder is not empty so is this entry empty ?
*/
empty_space_count++;
ffc191b8: 3a d6 00 01 addi r22,r22,1
if (empty_space_count == (lfn_entries + 1))
ffc191bc: 7f 96 50 00 cmpw cr7,r22,r10
ffc191c0: 40 be 02 5c bne+ cr7,ffc1941c <msdos_find_name_in_fat_file+0x400>
ffc191c4: 48 00 02 54 b ffc19418 <msdos_find_name_in_fat_file+0x3fc>
* 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)
ffc191c8: 41 92 00 14 beq- cr4,ffc191dc <msdos_find_name_in_fat_file+0x1c0>
ffc191cc: 2f 91 00 00 cmpwi cr7,r17,0
ffc191d0: 40 9e 00 0c bne- cr7,ffc191dc <msdos_find_name_in_fat_file+0x1c0><== NEVER TAKEN
{
empty_space_entry = 0;
empty_space_count = 0;
ffc191d4: 3a c0 00 00 li r22,0
* If empty space has not been found we need to start the
* count again.
*/
if (create_node && !empty_space_found)
{
empty_space_entry = 0;
ffc191d8: 3a e0 00 00 li r23,0
/*
* Check the attribute to see if the entry is for a long
* file name.
*/
if ((*MSDOS_DIR_ATTR(entry) & MSDOS_ATTR_LFN_MASK) ==
ffc191dc: 88 fa 00 0b lbz r7,11(r26)
ffc191e0: 54 e7 06 be clrlwi r7,r7,26
ffc191e4: 2f 87 00 0f cmpwi cr7,r7,15
ffc191e8: 40 be 01 1c bne+ cr7,ffc19304 <msdos_find_name_in_fat_file+0x2e8>
#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)
ffc191ec: 80 e1 00 08 lwz r7,8(r1)
ffc191f0: 2f 87 ff ff cmpwi cr7,r7,-1
ffc191f4: 40 be 00 30 bne+ cr7,ffc19224 <msdos_find_name_in_fat_file+0x208>
/*
* The first entry must have the last long entry
* flag set.
*/
if ((*MSDOS_DIR_ENTRY_TYPE(entry) &
ffc191f8: 55 47 06 72 rlwinm r7,r10,0,25,25
ffc191fc: 70 e3 00 ff andi. r3,r7,255
* 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)
{
lfn_matched = false;
ffc19200: 39 20 00 00 li r9,0
/*
* The first entry must have the last long entry
* flag set.
*/
if ((*MSDOS_DIR_ENTRY_TYPE(entry) &
ffc19204: 41 82 02 18 beq- ffc1941c <msdos_find_name_in_fat_file+0x400>
* 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) &
ffc19208: 55 4a 06 be clrlwi r10,r10,26
ffc1920c: 7f 99 50 00 cmpw cr7,r25,r10
ffc19210: 40 be 02 0c bne+ cr7,ffc1941c <msdos_find_name_in_fat_file+0x400>
continue;
/*
* Get the checksum of the short entry.
*/
lfn_start.cln = dir_offset;
ffc19214: 92 81 00 08 stw r20,8(r1)
lfn_start.ofs = dir_entry;
lfn_entry = lfn_entries;
lfn_checksum = *MSDOS_DIR_LFN_CHECKSUM(entry);
ffc19218: 7f 33 cb 78 mr r19,r25
/*
* Get the checksum of the short entry.
*/
lfn_start.cln = dir_offset;
lfn_start.ofs = dir_entry;
ffc1921c: 92 a1 00 0c stw r21,12(r1)
lfn_entry = lfn_entries;
lfn_checksum = *MSDOS_DIR_LFN_CHECKSUM(entry);
ffc19220: 8a 1a 00 0d lbz r16,13(r26)
* 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) &
ffc19224: 89 5a 00 00 lbz r10,0(r26)
ffc19228: 55 4a 06 be clrlwi r10,r10,26
ffc1922c: 7f 93 50 00 cmpw cr7,r19,r10
ffc19230: 40 be 00 10 bne+ cr7,ffc19240 <msdos_find_name_in_fat_file+0x224><== NEVER TAKEN
MSDOS_LAST_LONG_ENTRY_MASK)) ||
ffc19234: 89 5a 00 0d lbz r10,13(r26)
ffc19238: 7f 8a 80 00 cmpw cr7,r10,r16
ffc1923c: 41 9e 00 0c beq- cr7,ffc19248 <msdos_find_name_in_fat_file+0x22c><== 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;
ffc19240: 91 e1 00 08 stw r15,8(r1) <== NOT EXECUTED
continue;
ffc19244: 48 00 01 d8 b ffc1941c <msdos_find_name_in_fat_file+0x400><== NOT EXECUTED
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++)
ffc19248: 38 a0 00 0d li r5,13
ffc1924c: 7c a9 03 a6 mtctr r5
#endif
lfn_start.cln = FAT_FILE_SHORT_NAME;
continue;
}
lfn_entry--;
ffc19250: 38 f3 ff ff addi r7,r19,-1
o = lfn_entry * MSDOS_LFN_LEN_PER_ENTRY;
ffc19254: 1c c7 00 0d mulli r6,r7,13
* 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(
ffc19258: 39 5a 00 01 addi r10,r26,1
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++)
ffc1925c: 39 20 00 00 li r9,0
{
#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')
ffc19260: 88 aa 00 00 lbz r5,0(r10)
ffc19264: 2f 85 00 00 cmpwi cr7,r5,0
ffc19268: 40 be 00 1c bne+ cr7,ffc19284 <msdos_find_name_in_fat_file+0x268>
/*
* 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) &&
ffc1926c: 7f 93 c8 00 cmpw cr7,r19,r25
ffc19270: 40 be 00 6c bne+ cr7,ffc192dc <msdos_find_name_in_fat_file+0x2c0><== NEVER TAKEN
((o + i) != name_len))
ffc19274: 7d 26 4a 14 add r9,r6,r9
/*
* 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) &&
ffc19278: 7f 89 58 00 cmpw cr7,r9,r11
ffc1927c: 41 9e 00 60 beq- cr7,ffc192dc <msdos_find_name_in_fat_file+0x2c0><== ALWAYS TAKEN
ffc19280: 48 00 00 24 b ffc192a4 <msdos_find_name_in_fat_file+0x288><== 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(
ffc19284: 7c 89 32 14 add r4,r9,r6
((o + i) != name_len))
lfn_start.cln = FAT_FILE_SHORT_NAME;
break;
}
if (((o + i) >= name_len) || (*p != name[o + i]))
ffc19288: 7f 84 58 00 cmpw cr7,r4,r11
ffc1928c: 40 9c 00 18 bge- cr7,ffc192a4 <msdos_find_name_in_fat_file+0x288>
* 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(
ffc19290: 80 61 00 18 lwz r3,24(r1)
ffc19294: 7c 83 32 14 add r4,r3,r6
((o + i) != name_len))
lfn_start.cln = FAT_FILE_SHORT_NAME;
break;
}
if (((o + i) >= name_len) || (*p != name[o + i]))
ffc19298: 7c 84 48 ae lbzx r4,r4,r9
ffc1929c: 7f 84 28 00 cmpw cr7,r4,r5
ffc192a0: 41 be 00 0c beq+ cr7,ffc192ac <msdos_find_name_in_fat_file+0x290>
{
lfn_start.cln = FAT_FILE_SHORT_NAME;
ffc192a4: 91 e1 00 08 stw r15,8(r1)
break;
ffc192a8: 48 00 00 34 b ffc192dc <msdos_find_name_in_fat_file+0x2c0>
}
switch (i)
ffc192ac: 2f 89 00 04 cmpwi cr7,r9,4
ffc192b0: 41 9e 00 10 beq- cr7,ffc192c0 <msdos_find_name_in_fat_file+0x2a4>
ffc192b4: 2f 89 00 0a cmpwi cr7,r9,10
ffc192b8: 40 be 00 18 bne+ cr7,ffc192d0 <msdos_find_name_in_fat_file+0x2b4>
ffc192bc: 48 00 00 0c b ffc192c8 <msdos_find_name_in_fat_file+0x2ac>
{
case 4:
p += 5;
ffc192c0: 39 4a 00 05 addi r10,r10,5
break;
ffc192c4: 48 00 00 10 b ffc192d4 <msdos_find_name_in_fat_file+0x2b8>
case 10:
p += 4;
ffc192c8: 39 4a 00 04 addi r10,r10,4
break;
ffc192cc: 48 00 00 08 b ffc192d4 <msdos_find_name_in_fat_file+0x2b8>
default:
p += 2;
ffc192d0: 39 4a 00 02 addi r10,r10,2
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++)
ffc192d4: 39 29 00 01 addi r9,r9,1
ffc192d8: 42 00 ff 88 bdnz+ ffc19260 <msdos_find_name_in_fat_file+0x244>
p += 2;
break;
}
}
lfn_matched = ((lfn_entry == 0) &&
ffc192dc: 2f 87 00 00 cmpwi cr7,r7,0
ffc192e0: 39 20 00 00 li r9,0
ffc192e4: 40 9e 00 18 bne- cr7,ffc192fc <msdos_find_name_in_fat_file+0x2e0>
ffc192e8: 81 21 00 08 lwz r9,8(r1)
ffc192ec: 39 29 00 01 addi r9,r9,1
ffc192f0: 7d 29 00 34 cntlzw r9,r9
ffc192f4: 55 29 d9 7e rlwinm r9,r9,27,5,31
ffc192f8: 69 29 00 01 xori r9,r9,1
#endif
lfn_start.cln = FAT_FILE_SHORT_NAME;
continue;
}
lfn_entry--;
ffc192fc: 7c f3 3b 78 mr r19,r7
ffc19300: 48 00 01 1c b ffc1941c <msdos_find_name_in_fat_file+0x400>
* 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)
ffc19304: 2f 89 00 00 cmpwi cr7,r9,0
ffc19308: 41 9e 05 30 beq- cr7,ffc19838 <msdos_find_name_in_fat_file+0x81c>
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;
ffc1930c: 38 a0 00 0b li r5,11
ffc19310: 7c a9 03 a6 mtctr r5
* 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)
ffc19314: 39 40 00 00 li r10,0
ffc19318: 39 20 00 00 li r9,0
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;
ffc1931c: 71 26 00 01 andi. r6,r9,1
ffc19320: 38 e0 00 00 li r7,0
ffc19324: 41 82 00 08 beq- ffc1932c <msdos_find_name_in_fat_file+0x310>
ffc19328: 38 e0 00 80 li r7,128
ffc1932c: 7c da 50 ae lbzx r6,r26,r10
ffc19330: 55 29 f8 7e rlwinm r9,r9,31,1,31
{
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++)
ffc19334: 39 4a 00 01 addi r10,r10,1
cs = ((cs & 1) ? 0x80 : 0) + (cs >> 1) + *p;
ffc19338: 7d 26 4a 14 add r9,r6,r9
ffc1933c: 7d 29 3a 14 add r9,r9,r7
ffc19340: 55 29 06 3e clrlwi r9,r9,24
{
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++)
ffc19344: 42 00 ff d8 bdnz+ ffc1931c <msdos_find_name_in_fat_file+0x300>
cs = ((cs & 1) ? 0x80 : 0) + (cs >> 1) + *p;
if (lfn_entry || (lfn_checksum != cs))
ffc19348: 2f 93 00 00 cmpwi cr7,r19,0
ffc1934c: 40 9e 04 ec bne- cr7,ffc19838 <msdos_find_name_in_fat_file+0x81c><== NEVER TAKEN
ffc19350: 7f 90 48 00 cmpw cr7,r16,r9
ffc19354: 40 be 04 e4 bne+ cr7,ffc19838 <msdos_find_name_in_fat_file+0x81c><== 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,
ffc19358: 7f e3 fb 78 mr r3,r31
ffc1935c: 7f a4 eb 78 mr r4,r29
ffc19360: 38 a0 00 01 li r5,1
ffc19364: 7e 46 93 78 mr r6,r18
ffc19368: 7f 87 e3 78 mr r7,r28
ffc1936c: 4c c6 31 82 crclr 4*cr1+eq
ffc19370: 4b ff 9f a9 bl ffc13318 <fat_file_ioctl>
dir_offset * bts2rd,
&dir_pos->sname.cln);
if (rc != RC_OK)
ffc19374: 7c 79 1b 79 mr. r25,r3
ffc19378: 41 a2 00 40 beq+ ffc193b8 <msdos_find_name_in_fat_file+0x39c><== ALWAYS TAKEN
ffc1937c: 48 00 04 c4 b ffc19840 <msdos_find_name_in_fat_file+0x824><== 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) &&
ffc19380: 81 21 00 08 lwz r9,8(r1)
ffc19384: 2f 89 ff ff cmpwi cr7,r9,-1
ffc19388: 40 be 00 84 bne+ cr7,ffc1940c <msdos_find_name_in_fat_file+0x3f0><== NEVER TAKEN
(lfn_start.cln == FAT_FILE_SHORT_NAME) &&
(memcmp(MSDOS_DIR_NAME(entry),
ffc1938c: 7f 43 d3 78 mr r3,r26
ffc19390: 91 01 00 28 stw r8,40(r1)
ffc19394: 7f 64 db 78 mr r4,r27
ffc19398: 38 a0 00 0b li r5,11
ffc1939c: 91 61 00 24 stw r11,36(r1)
ffc193a0: 48 00 39 a5 bl ffc1cd44 <memcmp>
* 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) &&
ffc193a4: 2f 83 00 00 cmpwi cr7,r3,0
ffc193a8: 81 01 00 28 lwz r8,40(r1)
ffc193ac: 81 61 00 24 lwz r11,36(r1)
ffc193b0: 40 be 00 5c bne+ cr7,ffc1940c <msdos_find_name_in_fat_file+0x3f0>
ffc193b4: 4b ff ff a4 b ffc19358 <msdos_find_name_in_fat_file+0x33c>
if (rc != RC_OK)
return rc;
dir_pos->sname.ofs = dir_entry;
if (lfn_start.cln != FAT_FILE_SHORT_NAME)
ffc193b8: 80 c1 00 08 lwz r6,8(r1)
dir_offset * bts2rd,
&dir_pos->sname.cln);
if (rc != RC_OK)
return rc;
dir_pos->sname.ofs = dir_entry;
ffc193bc: 92 bc 00 04 stw r21,4(r28)
if (lfn_start.cln != FAT_FILE_SHORT_NAME)
ffc193c0: 2f 86 ff ff cmpwi cr7,r6,-1
ffc193c4: 40 be 00 20 bne+ cr7,ffc193e4 <msdos_find_name_in_fat_file+0x3c8>
&lfn_start.cln);
if (rc != RC_OK)
return rc;
}
dir_pos->lname.cln = lfn_start.cln;
ffc193c8: 81 21 00 08 lwz r9,8(r1)
ffc193cc: 91 3c 00 08 stw r9,8(r28)
dir_pos->lname.ofs = lfn_start.ofs;
ffc193d0: 81 21 00 0c lwz r9,12(r1)
ffc193d4: 91 3c 00 0c stw r9,12(r28)
memcpy(name_dir_entry, entry,
ffc193d8: 7c ba 04 aa lswi r5,r26,32
ffc193dc: 7c bb 05 aa stswi r5,r27,32
ffc193e0: 48 00 04 60 b ffc19840 <msdos_find_name_in_fat_file+0x824>
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,
ffc193e4: 7c de 31 d6 mullw r6,r30,r6
ffc193e8: 7f e3 fb 78 mr r3,r31
ffc193ec: 7f a4 eb 78 mr r4,r29
ffc193f0: 38 a0 00 01 li r5,1
ffc193f4: 38 e1 00 08 addi r7,r1,8
ffc193f8: 4c c6 31 82 crclr 4*cr1+eq
ffc193fc: 4b ff 9f 1d bl ffc13318 <fat_file_ioctl>
lfn_start.cln * bts2rd,
&lfn_start.cln);
if (rc != RC_OK)
ffc19400: 2c 03 00 00 cmpwi r3,0
ffc19404: 40 82 04 24 bne- ffc19828 <msdos_find_name_in_fat_file+0x80c><== NEVER TAKEN
ffc19408: 4b ff ff c0 b ffc193c8 <msdos_find_name_in_fat_file+0x3ac>
memcpy(name_dir_entry, entry,
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
return RC_OK;
}
lfn_start.cln = FAT_FILE_SHORT_NAME;
ffc1940c: 91 e1 00 08 stw r15,8(r1)
lfn_matched = false;
ffc19410: 39 20 00 00 li r9,0
ffc19414: 48 00 00 08 b ffc1941c <msdos_find_name_in_fat_file+0x400>
* Remainder is not empty so is this entry empty ?
*/
empty_space_count++;
if (empty_space_count == (lfn_entries + 1))
empty_space_found = true;
ffc19418: 3a 20 00 01 li r17,1
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)
ffc1941c: 3a b5 00 20 addi r21,r21,32
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;
ffc19420: 7f 95 f0 40 cmplw cr7,r21,r30
ffc19424: 3b 5a 00 20 addi r26,r26,32
ffc19428: 41 9c fd 3c blt+ cr7,ffc19164 <msdos_find_name_in_fat_file+0x148>
}
if (remainder_empty)
break;
dir_offset++;
ffc1942c: 3a 94 00 01 addi r20,r20,1
ffc19430: 7e 52 f2 14 add r18,r18,r30
/*
* 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),
ffc19434: 80 ff 00 a0 lwz r7,160(r31)
ffc19438: 7f e3 fb 78 mr r3,r31
ffc1943c: 7f a4 eb 78 mr r4,r29
ffc19440: 91 01 00 28 stw r8,40(r1)
ffc19444: 7e 45 93 78 mr r5,r18
ffc19448: 7f c6 f3 78 mr r6,r30
ffc1944c: 91 21 00 20 stw r9,32(r1)
ffc19450: 91 61 00 24 stw r11,36(r1)
ffc19454: 4b ff 9b 31 bl ffc12f84 <fat_file_read>
ffc19458: 2c 03 00 00 cmpwi r3,0
ffc1945c: 81 01 00 28 lwz r8,40(r1)
ffc19460: 81 21 00 20 lwz r9,32(r1)
ffc19464: 81 61 00 24 lwz r11,36(r1)
ffc19468: 40 82 fc bc bne+ ffc19124 <msdos_find_name_in_fat_file+0x108>
}
/*
* If we are not to create the entry return a not found error.
*/
if (!create_node)
ffc1946c: 2f 8e 00 00 cmpwi cr7,r14,0
ffc19470: 41 9e fd 14 beq+ cr7,ffc19184 <msdos_find_name_in_fat_file+0x168>
* 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)
ffc19474: 2f 88 00 02 cmpwi cr7,r8,2
ffc19478: 40 be 00 a0 bne+ cr7,ffc19518 <msdos_find_name_in_fat_file+0x4fc>
{
int slot = (((empty_space_offset * bts2rd) + empty_space_entry) /
ffc1947c: 7c b8 f1 d6 mullw r5,r24,r30
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE) + lfn_entries + 1;
ffc19480: 39 39 00 01 addi r9,r25,1
* in this directory.
*/
lfn_checksum = 0;
if (name_type == MSDOS_NAME_LONG)
{
int slot = (((empty_space_offset * bts2rd) + empty_space_entry) /
ffc19484: 7c a5 ba 14 add r5,r5,r23
ffc19488: 54 a5 d9 7e rlwinm r5,r5,27,5,31
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE) + lfn_entries + 1;
ffc1948c: 7c a9 2a 14 add r5,r9,r5
{
static const char* hex = "0123456789ABCDEF";
char* c = MSDOS_DIR_NAME(sfn);
int i;
for (i = 0; i < 2; i++, c++)
if ((*c == ' ') || (*c == '.'))
ffc19490: 89 3b 00 00 lbz r9,0(r27)
ffc19494: 2f 89 00 20 cmpwi cr7,r9,32
ffc19498: 40 be 00 10 bne+ cr7,ffc194a8 <msdos_find_name_in_fat_file+0x48c>
*c = '_';
ffc1949c: 39 20 00 5f li r9,95
ffc194a0: 99 3b 00 00 stb r9,0(r27)
ffc194a4: 48 00 00 0c b ffc194b0 <msdos_find_name_in_fat_file+0x494>
{
static const char* hex = "0123456789ABCDEF";
char* c = MSDOS_DIR_NAME(sfn);
int i;
for (i = 0; i < 2; i++, c++)
if ((*c == ' ') || (*c == '.'))
ffc194a8: 2f 89 00 2e cmpwi cr7,r9,46
ffc194ac: 41 be ff f0 beq- cr7,ffc1949c <msdos_find_name_in_fat_file+0x480><== NEVER TAKEN
ffc194b0: 89 3b 00 01 lbz r9,1(r27)
ffc194b4: 2f 89 00 20 cmpwi cr7,r9,32
ffc194b8: 40 be 00 10 bne+ cr7,ffc194c8 <msdos_find_name_in_fat_file+0x4ac>
*c = '_';
ffc194bc: 39 20 00 5f li r9,95
ffc194c0: 99 3b 00 01 stb r9,1(r27)
ffc194c4: 48 00 00 0c b ffc194d0 <msdos_find_name_in_fat_file+0x4b4>
{
static const char* hex = "0123456789ABCDEF";
char* c = MSDOS_DIR_NAME(sfn);
int i;
for (i = 0; i < 2; i++, c++)
if ((*c == ' ') || (*c == '.'))
ffc194c8: 2f 89 00 2e cmpwi cr7,r9,46
ffc194cc: 41 be ff f0 beq- cr7,ffc194bc <msdos_find_name_in_fat_file+0x4a0><== NEVER TAKEN
*c = '_';
for (i = 0; i < 4; i++, c++)
*c = hex[(num >> ((3 - i) * 4)) & 0xf];
ffc194d0: 38 e0 00 04 li r7,4
ffc194d4: 7c e9 03 a6 mtctr r7
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++)
ffc194d8: 39 1b 00 02 addi r8,r27,2
ffc194dc: 39 20 00 00 li r9,0
if ((*c == ' ') || (*c == '.'))
*c = '_';
for (i = 0; i < 4; i++, c++)
*c = hex[(num >> ((3 - i) * 4)) & 0xf];
ffc194e0: 3c c0 ff c3 lis r6,-61
* 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(
ffc194e4: 1d 49 ff fc mulli r10,r9,-4
ffc194e8: 39 4a 00 0c addi r10,r10,12
int i;
for (i = 0; i < 2; i++, c++)
if ((*c == ' ') || (*c == '.'))
*c = '_';
for (i = 0; i < 4; i++, c++)
*c = hex[(num >> ((3 - i) * 4)) & 0xf];
ffc194ec: 7c aa 56 30 sraw r10,r5,r10
ffc194f0: 55 4a 07 3e clrlwi r10,r10,28
ffc194f4: 38 e6 c4 48 addi r7,r6,-15288
ffc194f8: 7d 47 50 ae lbzx r10,r7,r10
ffc194fc: 7d 48 49 ae stbx r10,r8,r9
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++)
ffc19500: 39 29 00 01 addi r9,r9,1
ffc19504: 42 00 ff e0 bdnz+ ffc194e4 <msdos_find_name_in_fat_file+0x4c8>
*c = hex[(num >> ((3 - i) * 4)) & 0xf];
*c++ = '~';
ffc19508: 39 20 00 7e li r9,126
ffc1950c: 99 3b 00 06 stb r9,6(r27)
*c++ = '1';
ffc19510: 39 20 00 31 li r9,49
ffc19514: 99 3b 00 07 stb r9,7(r27)
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)
ffc19518: 2f 99 00 00 cmpwi cr7,r25,0
* 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;
ffc1951c: 3a 40 00 00 li r18,0
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)
ffc19520: 41 9e 00 3c beq- cr7,ffc1955c <msdos_find_name_in_fat_file+0x540>
{
uint8_t* p = (uint8_t*) MSDOS_DIR_NAME(name_dir_entry);
int i;
for (i = 0; i < 11; i++, p++)
lfn_checksum =
ffc19524: 39 00 00 0b li r8,11
ffc19528: 7d 09 03 a6 mtctr r8
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)
ffc1952c: 39 20 00 00 li r9,0
{
uint8_t* p = (uint8_t*) MSDOS_DIR_NAME(name_dir_entry);
int i;
for (i = 0; i < 11; i++, p++)
lfn_checksum =
ffc19530: 72 43 00 01 andi. r3,r18,1
ffc19534: 39 40 00 00 li r10,0
ffc19538: 41 82 00 08 beq- ffc19540 <msdos_find_name_in_fat_file+0x524>
ffc1953c: 39 40 00 80 li r10,128
ffc19540: 7d 1b 48 ae lbzx r8,r27,r9
ffc19544: 56 52 f8 7e rlwinm r18,r18,31,1,31
if (lfn_entries)
{
uint8_t* p = (uint8_t*) MSDOS_DIR_NAME(name_dir_entry);
int i;
for (i = 0; i < 11; i++, p++)
ffc19548: 39 29 00 01 addi r9,r9,1
lfn_checksum =
ffc1954c: 7e 48 92 14 add r18,r8,r18
ffc19550: 7e 52 52 14 add r18,r18,r10
ffc19554: 56 52 06 3e clrlwi r18,r18,24
if (lfn_entries)
{
uint8_t* p = (uint8_t*) MSDOS_DIR_NAME(name_dir_entry);
int i;
for (i = 0; i < 11; i++, p++)
ffc19558: 42 00 ff d8 bdnz+ ffc19530 <msdos_find_name_in_fat_file+0x514>
* 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)
ffc1955c: 2f 96 00 00 cmpwi cr7,r22,0
ffc19560: 41 9e 00 18 beq- cr7,ffc19578 <msdos_find_name_in_fat_file+0x55c>
}
/*
* Have we read past the empty block ? If so go back and read it again.
*/
if (dir_offset != empty_space_offset)
ffc19564: 7f 94 c0 00 cmpw cr7,r20,r24
read_cluster = true;
ffc19568: 39 20 00 01 li r9,1
}
/*
* Have we read past the empty block ? If so go back and read it again.
*/
if (dir_offset != empty_space_offset)
ffc1956c: 40 be 00 18 bne+ cr7,ffc19584 <msdos_find_name_in_fat_file+0x568><== 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;
ffc19570: 39 20 00 00 li r9,0
ffc19574: 48 00 00 10 b ffc19584 <msdos_find_name_in_fat_file+0x568>
* 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)
ffc19578: 7e 98 a3 78 mr r24,r20
{
read_cluster = true;
ffc1957c: 39 20 00 01 li r9,1
empty_space_offset = dir_offset;
empty_space_entry = 0;
ffc19580: 3a e0 00 00 li r23,0
read_cluster = true;
/*
* Handle the entry writes.
*/
lfn_start.cln = lfn_start.ofs = FAT_FILE_SHORT_NAME;
ffc19584: 39 40 ff ff li r10,-1
* 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(
ffc19588: 80 a1 00 18 lwz r5,24(r1)
read_cluster = true;
/*
* Handle the entry writes.
*/
lfn_start.cln = lfn_start.ofs = FAT_FILE_SHORT_NAME;
ffc1958c: 91 41 00 0c stw r10,12(r1)
ffc19590: 7f 58 f1 d6 mullw r26,r24,r30
ffc19594: 91 41 00 08 stw r10,8(r1)
* 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(
ffc19598: 1d 59 00 0d mulli r10,r25,13
/*
* Handle the entry writes.
*/
lfn_start.cln = lfn_start.ofs = FAT_FILE_SHORT_NAME;
lfn_entry = 0;
ffc1959c: 39 e0 00 00 li r15,0
* 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(
ffc195a0: 7e 25 52 14 add r17,r5,r10
length, lfn_entry);
#endif
/*
* Time to write the short file name entry.
*/
if (lfn_entry == (lfn_entries + 1))
ffc195a4: 3a 19 00 01 addi r16,r25,1
#endif
/*
* The one more is the short entry.
*/
while (lfn_entry < (lfn_entries + 1))
ffc195a8: 48 00 02 70 b ffc19818 <msdos_find_name_in_fat_file+0x7fc>
{
int length = 0;
if (read_cluster)
ffc195ac: 2f 89 00 00 cmpwi cr7,r9,0
ffc195b0: 41 be 00 ac beq+ cr7,ffc1965c <msdos_find_name_in_fat_file+0x640>
{
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,
ffc195b4: 80 ff 00 a0 lwz r7,160(r31)
ffc195b8: 7f e3 fb 78 mr r3,r31
ffc195bc: 7f a4 eb 78 mr r4,r29
ffc195c0: 7f 45 d3 78 mr r5,r26
ffc195c4: 7f c6 f3 78 mr r6,r30
ffc195c8: 4b ff 99 bd bl ffc12f84 <fat_file_read>
(empty_space_offset * bts2rd), bts2rd,
fs_info->cl_buf);
if (ret != bts2rd)
ffc195cc: 7f 83 f0 00 cmpw cr7,r3,r30
ffc195d0: 41 9e 00 8c beq- cr7,ffc1965c <msdos_find_name_in_fat_file+0x640><== NEVER TAKEN
{
if (ret != FAT_EOF)
ffc195d4: 2f 83 00 00 cmpwi cr7,r3,0
ffc195d8: 41 be 00 08 beq+ cr7,ffc195e0 <msdos_find_name_in_fat_file+0x5c4><== ALWAYS TAKEN
ffc195dc: 48 00 00 6c b ffc19648 <msdos_find_name_in_fat_file+0x62c><== 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,
ffc195e0: 7f e3 fb 78 mr r3,r31
ffc195e4: 7f a4 eb 78 mr r4,r29
ffc195e8: 38 a0 00 00 li r5,0
ffc195ec: 7f 46 d3 78 mr r6,r26
ffc195f0: 38 e1 00 10 addi r7,r1,16
ffc195f4: 4b ff 9d f9 bl ffc133ec <fat_file_extend>
empty_space_offset * bts2rd, &new_length);
if (ret != RC_OK)
ffc195f8: 2c 03 00 00 cmpwi r3,0
ffc195fc: 40 82 02 2c bne- ffc19828 <msdos_find_name_in_fat_file+0x80c><== NEVER TAKEN
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))
ffc19600: 81 21 00 10 lwz r9,16(r1)
ffc19604: 7f 89 d0 00 cmpw cr7,r9,r26
ffc19608: 41 be 00 08 beq+ cr7,ffc19610 <msdos_find_name_in_fat_file+0x5f4><== ALWAYS TAKEN
ffc1960c: 48 00 00 3c b ffc19648 <msdos_find_name_in_fat_file+0x62c><== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
memset(fs_info->cl_buf, 0, bts2rd);
ffc19610: 80 7f 00 a0 lwz r3,160(r31)
ffc19614: 38 80 00 00 li r4,0
ffc19618: 7f c5 f3 78 mr r5,r30
ffc1961c: 48 00 38 a1 bl ffc1cebc <memset>
ret = fat_file_write(&fs_info->fat, fat_fd,
ffc19620: 80 ff 00 a0 lwz r7,160(r31)
ffc19624: 7f e3 fb 78 mr r3,r31
ffc19628: 7f a4 eb 78 mr r4,r29
ffc1962c: 7f 45 d3 78 mr r5,r26
ffc19630: 7f c6 f3 78 mr r6,r30
ffc19634: 4b ff a0 05 bl ffc13638 <fat_file_write>
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)
ffc19638: 2f 83 ff ff cmpwi cr7,r3,-1
ffc1963c: 41 9e 01 ec beq- cr7,ffc19828 <msdos_find_name_in_fat_file+0x80c><== ALWAYS TAKEN
return ret;
else if (ret != bts2rd)
ffc19640: 7f 83 f0 00 cmpw cr7,r3,r30 <== NOT EXECUTED
ffc19644: 41 be 00 18 beq+ cr7,ffc1965c <msdos_find_name_in_fat_file+0x640><== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
ffc19648: 48 00 2a a1 bl ffc1c0e8 <__errno> <== NOT EXECUTED
ffc1964c: 39 20 00 05 li r9,5 <== NOT EXECUTED
ffc19650: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED
ffc19654: 38 60 ff ff li r3,-1 <== NOT EXECUTED
ffc19658: 48 00 01 d0 b ffc19828 <msdos_find_name_in_fat_file+0x80c><== 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(
ffc1965c: 3a cf 00 01 addi r22,r15,1
ffc19660: 3a 60 00 00 li r19,0
ffc19664: 48 00 01 58 b ffc197bc <msdos_find_name_in_fat_file+0x7a0>
length, lfn_entry);
#endif
/*
* Time to write the short file name entry.
*/
if (lfn_entry == (lfn_entries + 1))
ffc19668: 7f 96 80 00 cmpw cr7,r22,r16
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;
ffc1966c: 81 df 00 a0 lwz r14,160(r31)
char* p;
const char* n;
int i;
char fill = 0;
length += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
ffc19670: 3a 73 00 20 addi r19,r19,32
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;
ffc19674: 7e ae a2 14 add r21,r14,r20
const char* n;
int i;
char fill = 0;
length += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
lfn_entry++;
ffc19678: 7e cf b3 78 mr r15,r22
length, lfn_entry);
#endif
/*
* Time to write the short file name entry.
*/
if (lfn_entry == (lfn_entries + 1))
ffc1967c: 40 be 00 7c bne+ cr7,ffc196f8 <msdos_find_name_in_fat_file+0x6dc>
{
/* get current cluster number */
int rc = fat_file_ioctl(&fs_info->fat, fat_fd, F_CLU_NUM,
ffc19680: 7f e3 fb 78 mr r3,r31
ffc19684: 7f a4 eb 78 mr r4,r29
ffc19688: 38 a0 00 01 li r5,1
ffc1968c: 7f 46 d3 78 mr r6,r26
ffc19690: 7f 87 e3 78 mr r7,r28
ffc19694: 4c c6 31 82 crclr 4*cr1+eq
ffc19698: 4b ff 9c 81 bl ffc13318 <fat_file_ioctl>
empty_space_offset * bts2rd,
&dir_pos->sname.cln);
if (rc != RC_OK)
ffc1969c: 2c 03 00 00 cmpwi r3,0
ffc196a0: 40 82 01 88 bne- ffc19828 <msdos_find_name_in_fat_file+0x80c><== NEVER TAKEN
return rc;
dir_pos->sname.ofs = dir_entry;
if (lfn_start.cln != FAT_FILE_SHORT_NAME)
ffc196a4: 80 c1 00 08 lwz r6,8(r1)
empty_space_offset * bts2rd,
&dir_pos->sname.cln);
if (rc != RC_OK)
return rc;
dir_pos->sname.ofs = dir_entry;
ffc196a8: 92 9c 00 04 stw r20,4(r28)
if (lfn_start.cln != FAT_FILE_SHORT_NAME)
ffc196ac: 2f 86 ff ff cmpwi cr7,r6,-1
ffc196b0: 40 be 00 20 bne+ cr7,ffc196d0 <msdos_find_name_in_fat_file+0x6b4>
&lfn_start.cln);
if (rc != RC_OK)
return rc;
}
dir_pos->lname.cln = lfn_start.cln;
ffc196b4: 81 21 00 08 lwz r9,8(r1)
ffc196b8: 91 3c 00 08 stw r9,8(r28)
dir_pos->lname.ofs = lfn_start.ofs;
ffc196bc: 81 21 00 0c lwz r9,12(r1)
ffc196c0: 91 3c 00 0c stw r9,12(r28)
/* write new node entry */
memcpy (entry, (uint8_t *) name_dir_entry,
ffc196c4: 7c bb 04 aa lswi r5,r27,32
ffc196c8: 7c b5 05 aa stswi r5,r21,32
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
break;
ffc196cc: 48 00 01 00 b ffc197cc <msdos_find_name_in_fat_file+0x7b0>
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,
ffc196d0: 7c de 31 d6 mullw r6,r30,r6
ffc196d4: 7f e3 fb 78 mr r3,r31
ffc196d8: 7f a4 eb 78 mr r4,r29
ffc196dc: 38 a0 00 01 li r5,1
ffc196e0: 38 e1 00 08 addi r7,r1,8
ffc196e4: 4c c6 31 82 crclr 4*cr1+eq
ffc196e8: 4b ff 9c 31 bl ffc13318 <fat_file_ioctl>
lfn_start.cln * bts2rd,
&lfn_start.cln);
if (rc != RC_OK)
ffc196ec: 2c 03 00 00 cmpwi r3,0
ffc196f0: 41 82 ff c4 beq+ ffc196b4 <msdos_find_name_in_fat_file+0x698><== ALWAYS TAKEN
ffc196f4: 48 00 01 34 b ffc19828 <msdos_find_name_in_fat_file+0x80c><== 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)
ffc196f8: 81 21 00 08 lwz r9,8(r1)
ffc196fc: 2f 89 ff ff cmpwi cr7,r9,-1
ffc19700: 40 be 00 0c bne+ cr7,ffc1970c <msdos_find_name_in_fat_file+0x6f0>
{
lfn_start.cln = empty_space_offset;
ffc19704: 93 01 00 08 stw r24,8(r1)
lfn_start.ofs = dir_entry;
ffc19708: 92 81 00 0c stw r20,12(r1)
}
/*
* Clear the entry before loading the data.
*/
memset (entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
ffc1970c: 7e a3 ab 78 mr r3,r21
ffc19710: 38 80 00 00 li r4,0
ffc19714: 38 a0 00 20 li r5,32
ffc19718: 48 00 37 a5 bl ffc1cebc <memset>
}
else
{
p [0] = fill;
p [1] = fill;
fill = 0xff;
ffc1971c: 38 c0 00 0d li r6,13
ffc19720: 7c c9 03 a6 mtctr r6
* 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(
ffc19724: 1d 16 00 0d mulli r8,r22,13
/*
* Clear the entry before loading the data.
*/
memset (entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
*MSDOS_DIR_LFN_CHECKSUM(entry) = lfn_checksum;
ffc19728: 9a 55 00 0d stb r18,13(r21)
p = entry + 1;
ffc1972c: 39 35 00 01 addi r9,r21,1
* 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(
ffc19730: 7d 08 88 50 subf r8,r8,r17
{
char* entry = (char*) fs_info->cl_buf + dir_entry;
char* p;
const char* n;
int i;
char fill = 0;
ffc19734: 38 e0 00 00 li r7,0
*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++)
ffc19738: 39 40 00 00 li r10,0
{
if (*n != 0)
ffc1973c: 88 c8 00 00 lbz r6,0(r8)
ffc19740: 2f 86 00 00 cmpwi cr7,r6,0
ffc19744: 41 9e 00 10 beq- cr7,ffc19754 <msdos_find_name_in_fat_file+0x738>
{
*p = *n;
ffc19748: 98 c9 00 00 stb r6,0(r9)
n++;
ffc1974c: 39 08 00 01 addi r8,r8,1
ffc19750: 48 00 00 10 b ffc19760 <msdos_find_name_in_fat_file+0x744>
}
else
{
p [0] = fill;
ffc19754: 98 e9 00 00 stb r7,0(r9)
p [1] = fill;
ffc19758: 98 e9 00 01 stb r7,1(r9)
fill = 0xff;
ffc1975c: 38 e0 00 ff li r7,255
}
switch (i)
ffc19760: 2f 8a 00 04 cmpwi cr7,r10,4
ffc19764: 41 9e 00 10 beq- cr7,ffc19774 <msdos_find_name_in_fat_file+0x758>
ffc19768: 2f 8a 00 0a cmpwi cr7,r10,10
ffc1976c: 40 be 00 18 bne+ cr7,ffc19784 <msdos_find_name_in_fat_file+0x768>
ffc19770: 48 00 00 0c b ffc1977c <msdos_find_name_in_fat_file+0x760>
{
case 4:
p += 5;
ffc19774: 39 29 00 05 addi r9,r9,5
break;
ffc19778: 48 00 00 10 b ffc19788 <msdos_find_name_in_fat_file+0x76c>
case 10:
p += 4;
ffc1977c: 39 29 00 04 addi r9,r9,4
break;
ffc19780: 48 00 00 08 b ffc19788 <msdos_find_name_in_fat_file+0x76c>
default:
p += 2;
ffc19784: 39 29 00 02 addi r9,r9,2
*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++)
ffc19788: 39 4a 00 01 addi r10,r10,1
ffc1978c: 42 00 ff b0 bdnz+ ffc1973c <msdos_find_name_in_fat_file+0x720>
break;
}
}
*MSDOS_DIR_ENTRY_TYPE(entry) = (lfn_entries - lfn_entry) + 1;
if (lfn_entry == 1)
ffc19790: 2f 96 00 01 cmpwi cr7,r22,1
* 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(
ffc19794: 7d 36 80 50 subf r9,r22,r16
ffc19798: 55 29 06 3e clrlwi r9,r9,24
break;
}
}
*MSDOS_DIR_ENTRY_TYPE(entry) = (lfn_entries - lfn_entry) + 1;
if (lfn_entry == 1)
ffc1979c: 41 9e 00 08 beq- cr7,ffc197a4 <msdos_find_name_in_fat_file+0x788>
ffc197a0: 48 00 00 08 b ffc197a8 <msdos_find_name_in_fat_file+0x78c>
*MSDOS_DIR_ENTRY_TYPE(entry) |= MSDOS_LAST_LONG_ENTRY;
ffc197a4: 61 29 00 40 ori r9,r9,64
ffc197a8: 7d 2e a1 ae stbx r9,r14,r20
ffc197ac: 3a d6 00 01 addi r22,r22,1
*MSDOS_DIR_ATTR(entry) |= MSDOS_ATTR_LFN;
ffc197b0: 89 35 00 0b lbz r9,11(r21)
ffc197b4: 61 29 00 0f ori r9,r9,15
ffc197b8: 99 35 00 0b stb r9,11(r21)
* 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(
ffc197bc: 7e 93 ba 14 add r20,r19,r23
#if MSDOS_FIND_PRINT
printf ("MSFS:[10] eso:%li\n", empty_space_offset);
#endif
for (dir_entry = empty_space_entry;
ffc197c0: 7f 94 f0 40 cmplw cr7,r20,r30
* 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(
ffc197c4: 39 f6 ff ff addi r15,r22,-1
#if MSDOS_FIND_PRINT
printf ("MSFS:[10] eso:%li\n", empty_space_offset);
#endif
for (dir_entry = empty_space_entry;
ffc197c8: 41 9c fe a0 blt+ cr7,ffc19668 <msdos_find_name_in_fat_file+0x64c><== 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,
ffc197cc: 80 ff 00 a0 lwz r7,160(r31)
ffc197d0: 7f e3 fb 78 mr r3,r31
ffc197d4: 7f a4 eb 78 mr r4,r29
ffc197d8: 7c ba ba 14 add r5,r26,r23
ffc197dc: 7e 66 9b 78 mr r6,r19
ffc197e0: 7c e7 ba 14 add r7,r7,r23
ffc197e4: 4b ff 9e 55 bl ffc13638 <fat_file_write>
(empty_space_offset * bts2rd) + empty_space_entry,
length, fs_info->cl_buf + empty_space_entry);
if (ret == -1)
ffc197e8: 2f 83 ff ff cmpwi cr7,r3,-1
ffc197ec: 41 9e 00 44 beq- cr7,ffc19830 <msdos_find_name_in_fat_file+0x814><== NEVER TAKEN
return ret;
else if (ret != length)
ffc197f0: 7f 83 98 00 cmpw cr7,r3,r19
ffc197f4: 7f 5a f2 14 add r26,r26,r30
ffc197f8: 41 be 00 14 beq+ cr7,ffc1980c <msdos_find_name_in_fat_file+0x7f0><== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one(EIO);
ffc197fc: 48 00 28 ed bl ffc1c0e8 <__errno> <== NOT EXECUTED
ffc19800: 39 20 00 05 li r9,5 <== NOT EXECUTED
ffc19804: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED
ffc19808: 48 00 00 28 b ffc19830 <msdos_find_name_in_fat_file+0x814><== NOT EXECUTED
empty_space_offset++;
ffc1980c: 3b 18 00 01 addi r24,r24,1
empty_space_entry = 0;
ffc19810: 3a e0 00 00 li r23,0
read_cluster = true;
ffc19814: 39 20 00 01 li r9,1
#endif
/*
* The one more is the short entry.
*/
while (lfn_entry < (lfn_entries + 1))
ffc19818: 7f 99 78 00 cmpw cr7,r25,r15
ffc1981c: 40 9c fd 90 bge+ cr7,ffc195ac <msdos_find_name_in_fat_file+0x590>
empty_space_offset++;
empty_space_entry = 0;
read_cluster = true;
}
return 0;
ffc19820: 3b 20 00 00 li r25,0
ffc19824: 48 00 00 1c b ffc19840 <msdos_find_name_in_fat_file+0x824>
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,
ffc19828: 7c 79 1b 78 mr r25,r3
ffc1982c: 48 00 00 14 b ffc19840 <msdos_find_name_in_fat_file+0x824>
}
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)
ffc19830: 3b 20 ff ff li r25,-1 <== NOT EXECUTED
ffc19834: 48 00 00 0c b ffc19840 <msdos_find_name_in_fat_file+0x824><== 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 ||
ffc19838: 40 8e fb d4 bne+ cr3,ffc1940c <msdos_find_name_in_fat_file+0x3f0>
ffc1983c: 4b ff fb 44 b ffc19380 <msdos_find_name_in_fat_file+0x364>
empty_space_entry = 0;
read_cluster = true;
}
return 0;
}
ffc19840: 81 81 00 34 lwz r12,52(r1)
ffc19844: 39 61 00 80 addi r11,r1,128
ffc19848: 7f 23 cb 78 mr r3,r25
ffc1984c: 7d 81 81 20 mtcrf 24,r12
ffc19850: 4b fe 7d 68 b ffc015b8 <_restgpr_14_x>
ffc19854 <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
)
{
ffc19854: 94 21 ff d0 stwu r1,-48(r1)
ffc19858: 7c 08 02 a6 mflr r0
ffc1985c: 90 01 00 34 stw r0,52(r1)
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t bts2rd = 0;
uint32_t i = 0, j = 0;
if (FAT_FD_OF_ROOT_DIR(fat_fd) &&
ffc19860: 81 24 00 20 lwz r9,32(r4)
fat_file_fd_t *fat_fd,
uint32_t cl4find,
fat_dir_pos_t *dir_pos,
char *dir_entry
)
{
ffc19864: be e1 00 0c stmw r23,12(r1)
ffc19868: 7c 9c 23 78 mr r28,r4
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t bts2rd = 0;
uint32_t i = 0, j = 0;
if (FAT_FD_OF_ROOT_DIR(fat_fd) &&
ffc1986c: 2f 89 00 01 cmpwi cr7,r9,1
fat_file_fd_t *fat_fd,
uint32_t cl4find,
fat_dir_pos_t *dir_pos,
char *dir_entry
)
{
ffc19870: 7c b7 2b 78 mr r23,r5
int rc = RC_OK;
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
ffc19874: 83 c3 00 08 lwz r30,8(r3)
fat_file_fd_t *fat_fd,
uint32_t cl4find,
fat_dir_pos_t *dir_pos,
char *dir_entry
)
{
ffc19878: 7c db 33 78 mr r27,r6
ffc1987c: 7c f8 3b 78 mr r24,r7
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t bts2rd = 0;
uint32_t i = 0, j = 0;
if (FAT_FD_OF_ROOT_DIR(fat_fd) &&
ffc19880: 40 be 00 28 bne+ cr7,ffc198a8 <msdos_find_node_by_cluster_num_in_fat_file+0x54><== ALWAYS TAKEN
ffc19884: 81 24 00 24 lwz r9,36(r4) <== NOT EXECUTED
ffc19888: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED
ffc1988c: 40 9e 00 1c bne- cr7,ffc198a8 <msdos_find_node_by_cluster_num_in_fat_file+0x54><== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
ffc19890: 89 3e 00 0e lbz r9,14(r30) <== NOT EXECUTED
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t bts2rd = 0;
uint32_t i = 0, j = 0;
if (FAT_FD_OF_ROOT_DIR(fat_fd) &&
ffc19894: 71 2a 00 03 andi. r10,r9,3 <== NOT EXECUTED
ffc19898: 41 82 00 10 beq- ffc198a8 <msdos_find_node_by_cluster_num_in_fat_file+0x54><== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
bts2rd = fat_fd->fat_file_size;
ffc1989c: 83 a4 00 18 lwz r29,24(r4) <== NOT EXECUTED
assert(ret == bts2rd);
for (i = 0; i < bts2rd; i += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
{
char* entry = (char*) fs_info->cl_buf + i;
ffc198a0: 3b 40 00 00 li r26,0
ffc198a4: 48 00 00 f4 b ffc19998 <msdos_find_node_by_cluster_num_in_fat_file+0x144>
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;
ffc198a8: a3 be 00 06 lhz r29,6(r30)
ffc198ac: 4b ff ff f4 b ffc198a0 <msdos_find_node_by_cluster_num_in_fat_file+0x4c>
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 )
ffc198b0: 2f 83 00 1f cmpwi cr7,r3,31
ffc198b4: 41 bd 00 18 bgt+ cr7,ffc198cc <msdos_find_node_by_cluster_num_in_fat_file+0x78><== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EIO );
ffc198b8: 48 00 28 31 bl ffc1c0e8 <__errno> <== NOT EXECUTED
ffc198bc: 39 20 00 05 li r9,5 <== NOT EXECUTED
ffc198c0: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED
ffc198c4: 38 60 ff ff li r3,-1 <== NOT EXECUTED
ffc198c8: 48 00 00 f4 b ffc199bc <msdos_find_node_by_cluster_num_in_fat_file+0x168><== NOT EXECUTED
assert(ret == bts2rd);
ffc198cc: 7f 83 e8 00 cmpw cr7,r3,r29
ffc198d0: 41 be 00 28 beq+ cr7,ffc198f8 <msdos_find_node_by_cluster_num_in_fat_file+0xa4><== ALWAYS TAKEN
ffc198d4: 3c a0 ff c3 lis r5,-61 <== NOT EXECUTED
ffc198d8: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc198dc: 38 a5 cb 58 addi r5,r5,-13480 <== NOT EXECUTED
ffc198e0: 3c c0 ff c3 lis r6,-61 <== NOT EXECUTED
ffc198e4: 38 63 cb cc addi r3,r3,-13364 <== NOT EXECUTED
ffc198e8: 38 80 06 4e li r4,1614 <== NOT EXECUTED
ffc198ec: 38 a5 00 30 addi r5,r5,48 <== NOT EXECUTED
ffc198f0: 38 c6 cc 57 addi r6,r6,-13225 <== NOT EXECUTED
ffc198f4: 4b fe c2 29 bl ffc05b1c <__assert_func> <== NOT EXECUTED
ffc198f8: 83 fe 00 a0 lwz r31,160(r30)
for (i = 0; i < bts2rd; i += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
{
char* entry = (char*) fs_info->cl_buf + i;
ffc198fc: 3b 20 00 00 li r25,0
/* if this and all rest entries are empty - return not-found */
if ((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
ffc19900: 89 3f 00 00 lbz r9,0(r31)
ffc19904: 2f 89 00 00 cmpwi cr7,r9,0
ffc19908: 41 9e 00 b0 beq- cr7,ffc199b8 <msdos_find_node_by_cluster_num_in_fat_file+0x164><== 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)) ==
ffc1990c: 2f 89 00 e5 cmpwi cr7,r9,229
ffc19910: 41 9e 00 74 beq- cr7,ffc19984 <msdos_find_node_by_cluster_num_in_fat_file+0x130><== NEVER TAKEN
MSDOS_THIS_DIR_ENTRY_EMPTY)
continue;
/* if get a non-empty entry - compare clusters num */
if (MSDOS_EXTRACT_CLUSTER_NUM(entry) == cl4find)
ffc19914: a1 5f 00 14 lhz r10,20(r31)
ffc19918: a1 3f 00 1a lhz r9,26(r31)
ffc1991c: 55 48 c2 3e rlwinm r8,r10,24,8,31
ffc19920: 55 4a 44 2e rlwinm r10,r10,8,16,23
ffc19924: 7d 0a 53 78 or r10,r8,r10
ffc19928: 55 28 c2 3e rlwinm r8,r9,24,8,31
ffc1992c: 55 29 44 2e rlwinm r9,r9,8,16,23
ffc19930: 55 4a 80 1e rlwinm r10,r10,16,0,15
ffc19934: 7d 09 4b 78 or r9,r8,r9
ffc19938: 7d 49 4b 78 or r9,r10,r9
ffc1993c: 7f 89 b8 00 cmpw cr7,r9,r23
ffc19940: 40 be 00 44 bne+ cr7,ffc19984 <msdos_find_node_by_cluster_num_in_fat_file+0x130>
{
/* on success fill aux structure and copy all 32 bytes */
rc = fat_file_ioctl(&fs_info->fat, fat_fd, F_CLU_NUM, j * bts2rd,
ffc19944: 7f c3 f3 78 mr r3,r30
ffc19948: 7f 84 e3 78 mr r4,r28
ffc1994c: 38 a0 00 01 li r5,1
ffc19950: 7f 46 d3 78 mr r6,r26
ffc19954: 7f 67 db 78 mr r7,r27
ffc19958: 4c c6 31 82 crclr 4*cr1+eq
ffc1995c: 4b ff 99 bd bl ffc13318 <fat_file_ioctl>
&dir_pos->sname.cln);
if (rc != RC_OK)
ffc19960: 2c 03 00 00 cmpwi r3,0
ffc19964: 40 a2 00 58 bne+ ffc199bc <msdos_find_node_by_cluster_num_in_fat_file+0x168><== NEVER TAKEN
return rc;
dir_pos->sname.ofs = i;
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
ffc19968: 39 20 ff ff li r9,-1
rc = fat_file_ioctl(&fs_info->fat, fat_fd, F_CLU_NUM, j * bts2rd,
&dir_pos->sname.cln);
if (rc != RC_OK)
return rc;
dir_pos->sname.ofs = i;
ffc1996c: 93 3b 00 04 stw r25,4(r27)
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
ffc19970: 91 3b 00 08 stw r9,8(r27)
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
ffc19974: 91 3b 00 0c stw r9,12(r27)
memcpy(dir_entry, entry,
ffc19978: 7c bf 04 aa lswi r5,r31,32
ffc1997c: 7c b8 05 aa stswi r5,r24,32
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
return RC_OK;
ffc19980: 48 00 00 3c b ffc199bc <msdos_find_node_by_cluster_num_in_fat_file+0x168>
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)
ffc19984: 3b 39 00 20 addi r25,r25,32
ffc19988: 7f 99 e8 40 cmplw cr7,r25,r29
ffc1998c: 3b ff 00 20 addi r31,r31,32
ffc19990: 41 9c ff 70 blt+ cr7,ffc19900 <msdos_find_node_by_cluster_num_in_fat_file+0xac><== ALWAYS TAKEN
ffc19994: 7f 5a ea 14 add r26,r26,r29 <== 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,
ffc19998: 80 fe 00 a0 lwz r7,160(r30)
ffc1999c: 7f c3 f3 78 mr r3,r30
ffc199a0: 7f 84 e3 78 mr r4,r28
ffc199a4: 7f 45 d3 78 mr r5,r26
ffc199a8: 7f a6 eb 78 mr r6,r29
ffc199ac: 4b ff 95 d9 bl ffc12f84 <fat_file_read>
ffc199b0: 2c 03 00 00 cmpwi r3,0
ffc199b4: 40 82 fe fc bne+ ffc198b0 <msdos_find_node_by_cluster_num_in_fat_file+0x5c><== 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;
ffc199b8: 38 60 7d 01 li r3,32001 <== NOT EXECUTED
}
}
j++;
}
return MSDOS_NAME_NOT_FOUND_ERR;
}
ffc199bc: 39 61 00 30 addi r11,r1,48
ffc199c0: 4b fe 7c 1c b ffc015dc <_restgpr_23_x>
ffc0e340 <msdos_format>:
)
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
ffc0e340: 94 21 fd 08 stwu r1,-760(r1)
ffc0e344: 7d 80 00 26 mfcr r12
ffc0e348: 7c 08 02 a6 mflr r0
msdos_format_param_t fmt_params;
/*
* open device for writing
*/
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL, "open device\n");
ffc0e34c: 3c a0 ff c3 lis r5,-61
)
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
ffc0e350: bd c1 02 b0 stmw r14,688(r1)
msdos_format_param_t fmt_params;
/*
* open device for writing
*/
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL, "open device\n");
ffc0e354: 38 a5 c5 21 addi r5,r5,-15071
)
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
ffc0e358: 7c 7c 1b 78 mr r28,r3
ffc0e35c: 7c 9f 23 78 mr r31,r4
ffc0e360: 90 01 02 fc stw r0,764(r1)
msdos_format_param_t fmt_params;
/*
* open device for writing
*/
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL, "open device\n");
ffc0e364: 7c 83 23 78 mr r3,r4
ffc0e368: 38 80 00 02 li r4,2
)
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
ffc0e36c: 91 81 02 ac stw r12,684(r1)
msdos_format_param_t fmt_params;
/*
* open device for writing
*/
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL, "open device\n");
ffc0e370: 4c c6 31 82 crclr 4*cr1+eq
ffc0e374: 4b ff fc fd bl ffc0e070 <msdos_format_printf>
fd = open(devname, O_RDWR);
ffc0e378: 38 80 00 02 li r4,2
ffc0e37c: 7f 83 e3 78 mr r3,r28
ffc0e380: 4c c6 31 82 crclr 4*cr1+eq
ffc0e384: 4b ff 87 71 bl ffc06af4 <open>
}
/*
* sanity check on device
*/
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
ffc0e388: 3c a0 ff c3 lis r5,-61
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
char tmp_sec[FAT_TOTAL_MBR_SIZE];
struct stat stat_buf;
int ret_val = 0;
ffc0e38c: 3b 63 00 01 addi r27,r3,1
/*
* open device for writing
*/
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL, "open device\n");
fd = open(devname, O_RDWR);
ffc0e390: 7c 7d 1b 78 mr r29,r3
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
char tmp_sec[FAT_TOTAL_MBR_SIZE];
struct stat stat_buf;
int ret_val = 0;
ffc0e394: 33 7b ff ff addic r27,r27,-1
ffc0e398: 7f 7b d9 10 subfe r27,r27,r27
}
/*
* sanity check on device
*/
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
ffc0e39c: 7f e3 fb 78 mr r3,r31
ffc0e3a0: 38 80 00 02 li r4,2
ffc0e3a4: 38 a5 c5 2e addi r5,r5,-15058
ffc0e3a8: 7f 86 e3 78 mr r6,r28
ffc0e3ac: 4c c6 31 82 crclr 4*cr1+eq
ffc0e3b0: 4b ff fc c1 bl ffc0e070 <msdos_format_printf>
"stat check: %s\n", devname);
if (ret_val == 0) {
ffc0e3b4: 2f 9b 00 00 cmpwi cr7,r27,0
ffc0e3b8: 3b c0 ff ff li r30,-1
ffc0e3bc: 40 be 00 14 bne+ cr7,ffc0e3d0 <msdos_format+0x90> <== NEVER TAKEN
ret_val = fstat(fd, &stat_buf);
ffc0e3c0: 7f a3 eb 78 mr r3,r29
ffc0e3c4: 38 81 02 60 addi r4,r1,608
ffc0e3c8: 4b ff 79 e5 bl ffc05dac <fstat>
ffc0e3cc: 7c 7e 1b 78 mr r30,r3
}
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_INFO,
ffc0e3d0: 3c a0 ff c3 lis r5,-61
ffc0e3d4: 7f e3 fb 78 mr r3,r31
ffc0e3d8: 38 80 00 01 li r4,1
ffc0e3dc: 38 a5 c5 3e addi r5,r5,-15042
ffc0e3e0: 7f 86 e3 78 mr r6,r28
ffc0e3e4: 4c c6 31 82 crclr 4*cr1+eq
ffc0e3e8: 4b ff fc 89 bl ffc0e070 <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))) {
ffc0e3ec: 2f 9e 00 00 cmpwi cr7,r30,0
ffc0e3f0: 40 9e 0c ec bne- cr7,ffc0f0dc <msdos_format+0xd9c> <== NEVER TAKEN
ffc0e3f4: 81 21 02 6c lwz r9,620(r1)
ffc0e3f8: 55 29 04 26 rlwinm r9,r9,0,16,19
ffc0e3fc: 2f 89 60 00 cmpwi cr7,r9,24576
ffc0e400: 41 9e 0c 44 beq- cr7,ffc0f044 <msdos_format+0xd04> <== ALWAYS TAKEN
errno = ENOTTY;
ffc0e404: 48 00 dc e5 bl ffc1c0e8 <__errno> <== NOT EXECUTED
ffc0e408: 39 20 00 19 li r9,25 <== NOT EXECUTED
ffc0e40c: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED
ffc0e410: 48 00 0d 00 b ffc0f110 <msdos_format+0xdd0> <== 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);
ffc0e414: 3c 80 40 04 lis r4,16388
ffc0e418: 7f a3 eb 78 mr r3,r29
ffc0e41c: 60 84 42 05 ori r4,r4,16901
ffc0e420: 38 a1 02 0c addi r5,r1,524
ffc0e424: 4c c6 31 82 crclr 4*cr1+eq
ffc0e428: 48 00 72 59 bl ffc15680 <ioctl>
ret_val = rtems_disk_fd_get_media_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);
}
if (ret_val == 0) {
ffc0e42c: 7c 7e 1b 79 mr. r30,r3
ffc0e430: 40 82 04 54 bne- ffc0e884 <msdos_format+0x544> <== NEVER TAKEN
total_size = fmt_params->bytes_per_sector * fmt_params->totl_sector_cnt;
ffc0e434: 80 c1 02 08 lwz r6,520(r1)
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
ffc0e438: 3c a0 ff c3 lis r5,-61
}
if (ret_val == 0) {
ret_val = rtems_disk_fd_get_block_count(fd, &fmt_params->totl_sector_cnt);
}
if (ret_val == 0) {
total_size = fmt_params->bytes_per_sector * fmt_params->totl_sector_cnt;
ffc0e43c: 80 e1 02 0c lwz r7,524(r1)
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
ffc0e440: 7f e3 fb 78 mr r3,r31
ffc0e444: 38 80 00 02 li r4,2
}
if (ret_val == 0) {
ret_val = rtems_disk_fd_get_block_count(fd, &fmt_params->totl_sector_cnt);
}
if (ret_val == 0) {
total_size = fmt_params->bytes_per_sector * fmt_params->totl_sector_cnt;
ffc0e448: 7f 87 31 d6 mullw r28,r7,r6
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
ffc0e44c: 38 a5 c5 4d addi r5,r5,-15027
ffc0e450: 39 20 00 00 li r9,0
ffc0e454: 7f 8a e3 78 mr r10,r28
ffc0e458: 4c c6 31 82 crclr 4*cr1+eq
ffc0e45c: 4b ff fc 15 bl ffc0e070 <msdos_format_printf>
/*
* determine number of FATs
*/
if (ret_val == 0) {
if ((rqdata == NULL) ||
ffc0e460: 2f 9f 00 00 cmpwi cr7,r31,0
ffc0e464: 41 9e 00 10 beq- cr7,ffc0e474 <msdos_format+0x134>
(rqdata->fat_num == 0)) {
ffc0e468: 81 3f 00 0c lwz r9,12(r31)
/*
* determine number of FATs
*/
if (ret_val == 0) {
if ((rqdata == NULL) ||
ffc0e46c: 2f 89 00 00 cmpwi cr7,r9,0
ffc0e470: 40 9e 00 0c bne- cr7,ffc0e47c <msdos_format+0x13c>
(rqdata->fat_num == 0)) {
fmt_params->fat_num = 2;
ffc0e474: 39 20 00 02 li r9,2
ffc0e478: 48 00 00 0c b ffc0e484 <msdos_format+0x144>
}
else if (rqdata->fat_num <= 6) {
ffc0e47c: 2b 89 00 06 cmplwi cr7,r9,6
ffc0e480: 41 9d 00 0c bgt- cr7,ffc0e48c <msdos_format+0x14c>
fmt_params->fat_num = rqdata->fat_num;
ffc0e484: 99 21 02 38 stb r9,568(r1)
ffc0e488: 48 00 0b f0 b ffc0f078 <msdos_format+0xd38>
}
else {
errno = EINVAL;
ffc0e48c: 48 00 dc 5d bl ffc1c0e8 <__errno>
ffc0e490: 39 20 00 16 li r9,22
ffc0e494: 91 23 00 00 stw r9,0(r3)
ret_val = -1;
ffc0e498: 3b c0 ff ff li r30,-1
ffc0e49c: 48 00 03 e8 b ffc0e884 <msdos_format+0x544>
* 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) {
ffc0e4a0: 81 3f 00 08 lwz r9,8(r31)
ffc0e4a4: 2f 89 00 00 cmpwi cr7,r9,0
ffc0e4a8: 7d 2a 4b 78 mr r10,r9
ffc0e4ac: 40 9e 00 0c bne- cr7,ffc0e4b8 <msdos_format+0x178>
* 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;
ffc0e4b0: 39 40 00 20 li r10,32
/*
* 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;
ffc0e4b4: 39 20 00 08 li r9,8
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 < FAT_FAT12_MAX_CLN * fat12_sect_per_clust) {
ffc0e4b8: 81 01 02 0c lwz r8,524(r1)
ffc0e4bc: 1d 29 0f f5 mulli r9,r9,4085
ffc0e4c0: 7f 88 48 40 cmplw cr7,r8,r9
ffc0e4c4: 40 9c 00 0c bge- cr7,ffc0e4d0 <msdos_format+0x190>
fmt_params->fattype = FAT_FAT12;
ffc0e4c8: 39 20 00 01 li r9,1
ffc0e4cc: 48 00 00 1c b ffc0e4e8 <msdos_format+0x1a8>
/* 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) {
ffc0e4d0: 39 20 00 00 li r9,0
ffc0e4d4: 61 29 ff f5 ori r9,r9,65525
ffc0e4d8: 7d 4a 49 d6 mullw r10,r10,r9
ffc0e4dc: 7f 88 50 40 cmplw cr7,r8,r10
ffc0e4e0: 40 9c 00 14 bge- cr7,ffc0e4f4 <msdos_format+0x1b4>
fmt_params->fattype = FAT_FAT16;
ffc0e4e4: 39 20 00 02 li r9,2
ffc0e4e8: 99 21 02 3a stb r9,570(r1)
/* start trying with small clusters */
fmt_params->sectors_per_cluster = 2;
ffc0e4ec: 39 20 00 02 li r9,2
ffc0e4f0: 48 00 00 50 b ffc0e540 <msdos_format+0x200>
}
else {
#define ONE_GB (1024L * 1024L * 1024L)
uint32_t gigs = (total_size + ONE_GB) / ONE_GB;
ffc0e4f4: 3d 5c 40 00 addis r10,r28,16384
ffc0e4f8: 7d 3c 50 10 subfc r9,r28,r10
ffc0e4fc: 7d 29 49 10 subfe r9,r9,r9
ffc0e500: 7d 29 00 d0 neg r9,r9
ffc0e504: 55 29 10 3a rlwinm r9,r9,2,0,29
ffc0e508: 55 4a 17 be rlwinm r10,r10,2,30,31
ffc0e50c: 7d 2a 53 78 or r10,r9,r10
int b;
fmt_params->fattype = FAT_FAT32;
ffc0e510: 39 20 00 04 li r9,4
ffc0e514: 99 21 02 3a stb r9,570(r1)
/* scale with the size of disk... */
for (b = 31; b > 0; b--)
ffc0e518: 39 20 00 1f li r9,31
if ((gigs & (1 << b)) != 0)
ffc0e51c: 7d 29 03 a6 mtctr r9
ffc0e520: 39 00 00 01 li r8,1
ffc0e524: 7d 07 48 30 slw r7,r8,r9
ffc0e528: 7c e6 50 39 and. r6,r7,r10
ffc0e52c: 40 82 00 0c bne- ffc0e538 <msdos_format+0x1f8>
#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--)
ffc0e530: 39 29 ff ff addi r9,r9,-1
ffc0e534: 42 00 ff f0 bdnz+ ffc0e524 <msdos_format+0x1e4>
if ((gigs & (1 << b)) != 0)
break;
fmt_params->sectors_per_cluster = 1 << b;
ffc0e538: 39 40 00 01 li r10,1
ffc0e53c: 7d 49 48 30 slw r9,r10,r9
/*
* compute formatting parameters
*/
if (ret_val == 0) {
ret_val = msdos_format_determine_fmt_params(fd,rqdata,&fmt_params);
ffc0e540: 3a 41 02 08 addi r18,r1,520
fmt_params->fattype = FAT_FAT32;
/* scale with the size of disk... */
for (b = 31; b > 0; b--)
if ((gigs & (1 << b)) != 0)
break;
fmt_params->sectors_per_cluster = 1 << b;
ffc0e544: 91 21 02 14 stw r9,532(r1)
}
ret_val = msdos_set_sectors_per_cluster_from_request( rqdata, fmt_params );
ffc0e548: 7f e3 fb 78 mr r3,r31
ffc0e54c: 7e 44 93 78 mr r4,r18
ffc0e550: 4b ff fd 65 bl ffc0e2b4 <msdos_set_sectors_per_cluster_from_request>
/* start trying with small clusters */
fmt_params->sectors_per_cluster = 2;
}
else {
#define ONE_GB ( 1024L * 1024L * 1024L )
uint32_t gigs = ( total_size + ONE_GB ) / ONE_GB;
ffc0e554: 3d 3c 40 00 addis r9,r28,16384
ffc0e558: 7f 9c 48 10 subfc r28,r28,r9
ffc0e55c: 7f 9c e1 10 subfe r28,r28,r28
ffc0e560: 7f 9c 00 d0 neg r28,r28
ffc0e564: 57 9c 10 3a rlwinm r28,r28,2,0,29
ffc0e568: 55 29 17 be rlwinm r9,r9,2,30,31
*/
if (ret_val == 0 && rqdata != NULL)
fmt_params->skip_alignment = rqdata->skip_alignment;
if (ret_val == 0) {
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
ffc0e56c: 3f 40 ff c3 lis r26,-61
uint32_t fatdata_sect_cnt;
uint32_t fat_sectors_cnt;
/*
* ensure, that maximum cluster size (32KByte) is not exceeded
*/
while (MS_BYTES_PER_CLUSTER_LIMIT / bytes_per_sector < sectors_per_cluster) {
ffc0e570: 3a 80 00 00 li r20,0
const uint32_t sectors_per_cluster,
const uint32_t number_of_clusters )
{
uint32_t ms_sectors_per_cluster_limit_FAT12 =
( MS_BYTES_PER_CLUSTER_LIMIT_FAT12 +1 ) / bytes_per_sector;
uint32_t ms_sectors_per_cluster_limit_FAT16 =
ffc0e574: 3a 60 00 00 li r19,0
/* start trying with small clusters */
fmt_params->sectors_per_cluster = 2;
}
else {
#define ONE_GB ( 1024L * 1024L * 1024L )
uint32_t gigs = ( total_size + ONE_GB ) / ONE_GB;
ffc0e578: 7f 9b 4b 78 or r27,r28,r9
if ((gigs & (1 << b)) != 0)
break;
fmt_params->sectors_per_cluster = 1 << b;
}
ret_val = msdos_set_sectors_per_cluster_from_request( rqdata, fmt_params );
ffc0e57c: 7c 7e 1b 78 mr r30,r3
/* start trying with small clusters */
fmt_params->sectors_per_cluster = 2;
}
else {
#define ONE_GB ( 1024L * 1024L * 1024L )
uint32_t gigs = ( total_size + ONE_GB ) / ONE_GB;
ffc0e580: 3b 80 00 ff li r28,255
ffc0e584: 3a 00 00 00 li r16,0
&& fmt_params->fattype != fat_type
&& fmt_params->totl_sector_cnt > 0 ) {
/*
* Skip aligning structures or d align them
*/
if (ret_val == 0 && rqdata != NULL)
ffc0e588: 2e 1f 00 00 cmpwi cr4,r31,0
fmt_params->skip_alignment = rqdata->skip_alignment;
if (ret_val == 0) {
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
ffc0e58c: 3b 5a c5 88 addi r26,r26,-14968
fmt_params->fsinfo_sec = 1;
}
else {
/* recommended: for FAT12/FAT16, always set reserved sector count to 1 */
fmt_params->rsvd_sector_cnt = 1;
ffc0e590: 3a 20 00 01 li r17,1
else {
if (fmt_params->fattype == FAT_FAT16) {
fmt_params->files_per_root_dir = 512;
}
else {
fmt_params->files_per_root_dir = 64;
ffc0e594: 3b 20 00 40 li r25,64
(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;
ffc0e598: 3b 00 02 00 li r24,512
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
"sectors per cluster: %d\n", fmt_params->sectors_per_cluster);
if (fmt_params->fattype == FAT_FAT32) {
/* recommended: for FAT32, always set reserved sector count to 32 */
fmt_params->rsvd_sector_cnt = 32;
ffc0e59c: 3a e0 00 20 li r23,32
/* for FAT32, always set files per root directory 0 */
fmt_params->files_per_root_dir = 0;
ffc0e5a0: 3a c0 00 00 li r22,0
/* location of copy of MBR */
fmt_params->mbr_copy_sec = 6;
ffc0e5a4: 3a a0 00 06 li r21,6
uint32_t fatdata_sect_cnt;
uint32_t fat_sectors_cnt;
/*
* ensure, that maximum cluster size (32KByte) is not exceeded
*/
while (MS_BYTES_PER_CLUSTER_LIMIT / bytes_per_sector < sectors_per_cluster) {
ffc0e5a8: 62 94 80 00 ori r20,r20,32768
const uint32_t sectors_per_cluster,
const uint32_t number_of_clusters )
{
uint32_t ms_sectors_per_cluster_limit_FAT12 =
( MS_BYTES_PER_CLUSTER_LIMIT_FAT12 +1 ) / bytes_per_sector;
uint32_t ms_sectors_per_cluster_limit_FAT16 =
ffc0e5ac: 62 73 80 01 ori r19,r19,32769
ffc0e5b0: 48 00 02 b4 b ffc0e864 <msdos_format+0x524>
&& fmt_params->fattype != fat_type
&& fmt_params->totl_sector_cnt > 0 ) {
/*
* Skip aligning structures or d align them
*/
if (ret_val == 0 && rqdata != NULL)
ffc0e5b4: 41 92 00 0c beq- cr4,ffc0e5c0 <msdos_format+0x280>
fmt_params->skip_alignment = rqdata->skip_alignment;
ffc0e5b8: 89 3f 00 16 lbz r9,22(r31)
ffc0e5bc: 99 21 02 58 stb r9,600(r1)
if (ret_val == 0) {
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
ffc0e5c0: 80 c1 02 14 lwz r6,532(r1)
ffc0e5c4: 7f e3 fb 78 mr r3,r31
ffc0e5c8: 38 80 00 02 li r4,2
ffc0e5cc: 7f 45 d3 78 mr r5,r26
ffc0e5d0: 4c c6 31 82 crclr 4*cr1+eq
ffc0e5d4: 4b ff fa 9d bl ffc0e070 <msdos_format_printf>
"sectors per cluster: %d\n", fmt_params->sectors_per_cluster);
if (fmt_params->fattype == FAT_FAT32) {
ffc0e5d8: 8b 81 02 3a lbz r28,570(r1)
ffc0e5dc: 2f 9c 00 04 cmpwi cr7,r28,4
ffc0e5e0: 40 be 00 18 bne+ cr7,ffc0e5f8 <msdos_format+0x2b8>
/* recommended: for FAT32, always set reserved sector count to 32 */
fmt_params->rsvd_sector_cnt = 32;
ffc0e5e4: 92 e1 02 10 stw r23,528(r1)
/* for FAT32, always set files per root directory 0 */
fmt_params->files_per_root_dir = 0;
ffc0e5e8: 92 c1 02 20 stw r22,544(r1)
/* location of copy of MBR */
fmt_params->mbr_copy_sec = 6;
ffc0e5ec: 92 a1 02 30 stw r21,560(r1)
/* location of fsinfo sector */
fmt_params->fsinfo_sec = 1;
ffc0e5f0: 92 21 02 34 stw r17,564(r1)
ffc0e5f4: 48 00 00 54 b ffc0e648 <msdos_format+0x308>
}
else {
/* recommended: for FAT12/FAT16, always set reserved sector count to 1 */
fmt_params->rsvd_sector_cnt = 1;
ffc0e5f8: 92 21 02 10 stw r17,528(r1)
/* 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) &&
ffc0e5fc: 41 92 00 18 beq- cr4,ffc0e614 <msdos_format+0x2d4>
(rqdata->files_per_root_dir > 0)) {
ffc0e600: 81 3f 00 10 lwz r9,16(r31)
/* 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) &&
ffc0e604: 2f 89 00 00 cmpwi cr7,r9,0
ffc0e608: 41 9e 00 0c beq- cr7,ffc0e614 <msdos_format+0x2d4>
(rqdata->files_per_root_dir > 0)) {
fmt_params->files_per_root_dir = rqdata->files_per_root_dir;
ffc0e60c: 91 21 02 20 stw r9,544(r1)
ffc0e610: 48 00 00 18 b ffc0e628 <msdos_format+0x2e8>
}
else {
if (fmt_params->fattype == FAT_FAT16) {
ffc0e614: 2f 9c 00 02 cmpwi cr7,r28,2
ffc0e618: 40 be 00 0c bne+ cr7,ffc0e624 <msdos_format+0x2e4>
fmt_params->files_per_root_dir = 512;
ffc0e61c: 93 01 02 20 stw r24,544(r1)
ffc0e620: 48 00 00 08 b ffc0e628 <msdos_format+0x2e8>
}
else {
fmt_params->files_per_root_dir = 64;
ffc0e624: 93 21 02 20 stw r25,544(r1)
}
}
fmt_params->files_per_root_dir = (fmt_params->files_per_root_dir +
ffc0e628: 81 41 02 20 lwz r10,544(r1)
(2*fmt_params->bytes_per_sector/
ffc0e62c: 81 21 02 08 lwz r9,520(r1)
}
else {
fmt_params->files_per_root_dir = 64;
}
}
fmt_params->files_per_root_dir = (fmt_params->files_per_root_dir +
ffc0e630: 39 4a ff ff addi r10,r10,-1
(2*fmt_params->bytes_per_sector/
ffc0e634: 55 29 e1 7e rlwinm r9,r9,28,5,31
}
else {
fmt_params->files_per_root_dir = 64;
}
}
fmt_params->files_per_root_dir = (fmt_params->files_per_root_dir +
ffc0e638: 7d 4a 4a 14 add r10,r10,r9
(2*fmt_params->bytes_per_sector/
FAT_DIRENTRY_SIZE-1));
fmt_params->files_per_root_dir -= (fmt_params->files_per_root_dir %
ffc0e63c: 7d 4a 4b 96 divwu r10,r10,r9
ffc0e640: 7d 2a 49 d6 mullw r9,r10,r9
ffc0e644: 91 21 02 20 stw r9,544(r1)
/FAT_DIRENTRY_SIZE));
}
fmt_params->root_dir_sectors =
(((fmt_params->files_per_root_dir * FAT_DIRENTRY_SIZE)
+ fmt_params->bytes_per_sector - 1)
ffc0e648: 81 41 02 08 lwz r10,520(r1)
(2*fmt_params->bytes_per_sector
/FAT_DIRENTRY_SIZE));
}
fmt_params->root_dir_sectors =
(((fmt_params->files_per_root_dir * FAT_DIRENTRY_SIZE)
ffc0e64c: 80 a1 02 20 lwz r5,544(r1)
+ fmt_params->bytes_per_sector - 1)
ffc0e650: 38 6a ff ff addi r3,r10,-1
if (ret_val == 0) {
/*
* check values to get legal arrangement of FAT type and cluster count
*/
ret_val = msdos_format_eval_sectors_per_cluster(fmt_params->fattype,
ffc0e654: 81 81 02 0c lwz r12,524(r1)
(2*fmt_params->bytes_per_sector
/FAT_DIRENTRY_SIZE));
}
fmt_params->root_dir_sectors =
(((fmt_params->files_per_root_dir * FAT_DIRENTRY_SIZE)
ffc0e658: 54 a5 28 34 rlwinm r5,r5,5,0,26
if (ret_val == 0) {
/*
* check values to get legal arrangement of FAT type and cluster count
*/
ret_val = msdos_format_eval_sectors_per_cluster(fmt_params->fattype,
ffc0e65c: 81 61 02 10 lwz r11,528(r1)
/FAT_DIRENTRY_SIZE));
}
fmt_params->root_dir_sectors =
(((fmt_params->files_per_root_dir * FAT_DIRENTRY_SIZE)
+ fmt_params->bytes_per_sector - 1)
ffc0e660: 7c a3 2a 14 add r5,r3,r5
if (ret_val == 0) {
/*
* check values to get legal arrangement of FAT type and cluster count
*/
ret_val = msdos_format_eval_sectors_per_cluster(fmt_params->fattype,
ffc0e664: 88 81 02 38 lbz r4,568(r1)
}
fmt_params->root_dir_sectors =
(((fmt_params->files_per_root_dir * FAT_DIRENTRY_SIZE)
+ fmt_params->bytes_per_sector - 1)
/ fmt_params->bytes_per_sector);
ffc0e668: 7c a5 53 96 divwu r5,r5,r10
if (ret_val == 0) {
/*
* check values to get legal arrangement of FAT type and cluster count
*/
ret_val = msdos_format_eval_sectors_per_cluster(fmt_params->fattype,
ffc0e66c: 81 21 02 14 lwz r9,532(r1)
ffc0e670: 89 01 02 58 lbz r8,600(r1)
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 =
ffc0e674: 90 a1 02 24 stw r5,548(r1)
uint32_t fatdata_sect_cnt;
uint32_t fat_sectors_cnt;
/*
* ensure, that maximum cluster size (32KByte) is not exceeded
*/
while (MS_BYTES_PER_CLUSTER_LIMIT / bytes_per_sector < sectors_per_cluster) {
ffc0e678: 7c f4 53 96 divwu r7,r20,r10
ffc0e67c: 48 00 00 08 b ffc0e684 <msdos_format+0x344>
sectors_per_cluster /= 2;
ffc0e680: 55 29 f8 7e rlwinm r9,r9,31,1,31 <== NOT EXECUTED
uint32_t fatdata_sect_cnt;
uint32_t fat_sectors_cnt;
/*
* ensure, that maximum cluster size (32KByte) is not exceeded
*/
while (MS_BYTES_PER_CLUSTER_LIMIT / bytes_per_sector < sectors_per_cluster) {
ffc0e684: 7f 87 48 40 cmplw cr7,r7,r9
ffc0e688: 41 9c ff f8 blt+ cr7,ffc0e680 <msdos_format+0x340> <== NEVER TAKEN
static uint32_t
loc_align_object (const uint32_t sectors,
const uint32_t clustersize,
const bool skip_alignment)
{
if (! skip_alignment)
ffc0e68c: 2f 88 00 00 cmpwi cr7,r8,0
* - compute storage size for FAT
* - subtract from total cluster count
*/
fatdata_sect_cnt = total_sector_cnt
- loc_align_object (rsvd_sector_cnt, sectors_per_cluster, skip_alignment);
if (fattype == FAT_FAT12) {
ffc0e690: 2f 1c 00 01 cmpwi cr6,r28,1
fatdata_sect_cnt = fatdata_sect_cnt
- loc_align_object (root_dir_sector_cnt, sectors_per_cluster, skip_alignment);
fatdata_cluster_cnt = fatdata_sect_cnt/sectors_per_cluster;
fat_capacity = fatdata_cluster_cnt * 3 / 2;
}
else if (fattype == FAT_FAT16) {
ffc0e694: 2c 9c 00 02 cmpwi cr1,r28,2
loc_align_object (const uint32_t sectors,
const uint32_t clustersize,
const bool skip_alignment)
{
if (! skip_alignment)
return (sectors + clustersize - 1) & ~(clustersize - 1);
ffc0e698: 39 eb ff ff addi r15,r11,-1
ffc0e69c: 38 05 ff ff addi r0,r5,-1
else
return sectors;
ffc0e6a0: 7d 68 5b 78 mr r8,r11
static uint32_t
loc_align_object (const uint32_t sectors,
const uint32_t clustersize,
const bool skip_alignment)
{
if (! skip_alignment)
ffc0e6a4: 40 9e 00 10 bne- cr7,ffc0e6b4 <msdos_format+0x374>
return (sectors + clustersize - 1) & ~(clustersize - 1);
ffc0e6a8: 7d 0f 4a 14 add r8,r15,r9
ffc0e6ac: 7c e9 00 d0 neg r7,r9
ffc0e6b0: 7c e8 40 38 and r8,r7,r8
* 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_sect_cnt = total_sector_cnt
ffc0e6b4: 7d 08 60 50 subf r8,r8,r12
- loc_align_object (rsvd_sector_cnt, sectors_per_cluster, skip_alignment);
if (fattype == FAT_FAT12) {
ffc0e6b8: 40 ba 00 30 bne+ cr6,ffc0e6e8 <msdos_format+0x3a8>
static uint32_t
loc_align_object (const uint32_t sectors,
const uint32_t clustersize,
const bool skip_alignment)
{
if (! skip_alignment)
ffc0e6bc: 40 9e 00 14 bne- cr7,ffc0e6d0 <msdos_format+0x390>
return (sectors + clustersize - 1) & ~(clustersize - 1);
ffc0e6c0: 7c e0 4a 14 add r7,r0,r9
ffc0e6c4: 7c c9 00 d0 neg r6,r9
ffc0e6c8: 7c c7 38 38 and r7,r6,r7
ffc0e6cc: 48 00 00 08 b ffc0e6d4 <msdos_format+0x394>
else
return sectors;
ffc0e6d0: 7c a7 2b 78 mr r7,r5
* - subtract from total cluster count
*/
fatdata_sect_cnt = total_sector_cnt
- loc_align_object (rsvd_sector_cnt, sectors_per_cluster, skip_alignment);
if (fattype == FAT_FAT12) {
fatdata_sect_cnt = fatdata_sect_cnt
ffc0e6d4: 7d 07 40 50 subf r8,r7,r8
- loc_align_object (root_dir_sector_cnt, sectors_per_cluster, skip_alignment);
fatdata_cluster_cnt = fatdata_sect_cnt/sectors_per_cluster;
ffc0e6d8: 7d 08 4b 96 divwu r8,r8,r9
fat_capacity = fatdata_cluster_cnt * 3 / 2;
ffc0e6dc: 1c c8 00 03 mulli r6,r8,3
ffc0e6e0: 54 c6 f8 7e rlwinm r6,r6,31,1,31
ffc0e6e4: 48 00 00 38 b ffc0e71c <msdos_format+0x3dc>
}
else if (fattype == FAT_FAT16) {
ffc0e6e8: 40 a6 00 2c bne+ cr1,ffc0e714 <msdos_format+0x3d4>
static uint32_t
loc_align_object (const uint32_t sectors,
const uint32_t clustersize,
const bool skip_alignment)
{
if (! skip_alignment)
ffc0e6ec: 40 9e 00 14 bne- cr7,ffc0e700 <msdos_format+0x3c0>
return (sectors + clustersize - 1) & ~(clustersize - 1);
ffc0e6f0: 7c e0 4a 14 add r7,r0,r9
ffc0e6f4: 7c c9 00 d0 neg r6,r9
ffc0e6f8: 7c c7 38 38 and r7,r6,r7
ffc0e6fc: 48 00 00 08 b ffc0e704 <msdos_format+0x3c4>
else
return sectors;
ffc0e700: 7c a7 2b 78 mr r7,r5
- loc_align_object (root_dir_sector_cnt, sectors_per_cluster, skip_alignment);
fatdata_cluster_cnt = fatdata_sect_cnt/sectors_per_cluster;
fat_capacity = fatdata_cluster_cnt * 3 / 2;
}
else if (fattype == FAT_FAT16) {
fatdata_sect_cnt = fatdata_sect_cnt
ffc0e704: 7d 07 40 50 subf r8,r7,r8
- loc_align_object (root_dir_sector_cnt, sectors_per_cluster, skip_alignment);
fatdata_cluster_cnt = fatdata_sect_cnt/sectors_per_cluster;
ffc0e708: 7d 08 4b 96 divwu r8,r8,r9
fat_capacity = fatdata_cluster_cnt * 2;
ffc0e70c: 55 06 08 3c rlwinm r6,r8,1,0,30
ffc0e710: 48 00 00 0c b ffc0e71c <msdos_format+0x3dc>
}
else { /* FAT32 */
fatdata_cluster_cnt = fatdata_sect_cnt/sectors_per_cluster;
ffc0e714: 7d 08 4b 96 divwu r8,r8,r9
fat_capacity = fatdata_cluster_cnt * 4;
ffc0e718: 55 06 10 3a rlwinm r6,r8,2,0,29
}
sectors_per_fat = ((fat_capacity
+ (bytes_per_sector - 1))
ffc0e71c: 7c e6 1a 14 add r7,r6,r3
else { /* FAT32 */
fatdata_cluster_cnt = fatdata_sect_cnt/sectors_per_cluster;
fat_capacity = fatdata_cluster_cnt * 4;
}
sectors_per_fat = ((fat_capacity
ffc0e720: 7c e7 53 96 divwu r7,r7,r10
+ (bytes_per_sector - 1))
/ bytes_per_sector);
fat_sectors_cnt = loc_align_object (sectors_per_fat * fat_num,
ffc0e724: 7c e7 21 d6 mullw r7,r7,r4
static uint32_t
loc_align_object (const uint32_t sectors,
const uint32_t clustersize,
const bool skip_alignment)
{
if (! skip_alignment)
ffc0e728: 40 9e 00 14 bne- cr7,ffc0e73c <msdos_format+0x3fc>
return (sectors + clustersize - 1) & ~(clustersize - 1);
ffc0e72c: 38 c9 ff ff addi r6,r9,-1
ffc0e730: 7c e6 3a 14 add r7,r6,r7
ffc0e734: 7c c9 00 d0 neg r6,r9
ffc0e738: 7c e7 30 38 and r7,r7,r6
sectors_per_cluster,
skip_alignment);
*data_cluster_cnt = (fatdata_cluster_cnt -
((fat_sectors_cnt
+ (sectors_per_cluster - 1))
ffc0e73c: 38 c9 ff ff addi r6,r9,-1
ffc0e740: 7c c6 3a 14 add r6,r6,r7
/ sectors_per_cluster));
ffc0e744: 7c c6 4b 96 divwu r6,r6,r9
fat_sectors_cnt = loc_align_object (sectors_per_fat * fat_num,
sectors_per_cluster,
skip_alignment);
*data_cluster_cnt = (fatdata_cluster_cnt -
ffc0e748: 7d 06 40 50 subf r8,r6,r8
+ (sectors_per_cluster - 1))
/ sectors_per_cluster));
/*
* data cluster count too big? Then make clusters bigger
*/
if (((fattype == FAT_FAT12) && (*data_cluster_cnt > FAT_FAT12_MAX_CLN)) ||
ffc0e74c: 40 ba 00 14 bne+ cr6,ffc0e760 <msdos_format+0x420>
ffc0e750: 28 08 0f f5 cmplwi r8,4085
((fattype == FAT_FAT16) && (*data_cluster_cnt > FAT_FAT16_MAX_CLN))) {
sectors_per_cluster *= 2;
}
else {
finished = true;
ffc0e754: 38 c0 00 01 li r6,1
+ (sectors_per_cluster - 1))
/ sectors_per_cluster));
/*
* data cluster count too big? Then make clusters bigger
*/
if (((fattype == FAT_FAT12) && (*data_cluster_cnt > FAT_FAT12_MAX_CLN)) ||
ffc0e758: 40 81 00 24 ble- ffc0e77c <msdos_format+0x43c>
ffc0e75c: 48 00 00 14 b ffc0e770 <msdos_format+0x430>
((fattype == FAT_FAT16) && (*data_cluster_cnt > FAT_FAT16_MAX_CLN))) {
sectors_per_cluster *= 2;
}
else {
finished = true;
ffc0e760: 38 c0 00 01 li r6,1
+ (sectors_per_cluster - 1))
/ sectors_per_cluster));
/*
* data cluster count too big? Then make clusters bigger
*/
if (((fattype == FAT_FAT12) && (*data_cluster_cnt > FAT_FAT12_MAX_CLN)) ||
ffc0e764: 40 a6 00 24 bne+ cr1,ffc0e788 <msdos_format+0x448>
((fattype == FAT_FAT16) && (*data_cluster_cnt > FAT_FAT16_MAX_CLN))) {
ffc0e768: 28 08 ff f5 cmplwi r8,65525
ffc0e76c: 40 81 00 1c ble- ffc0e788 <msdos_format+0x448>
sectors_per_cluster *= 2;
ffc0e770: 55 29 08 3c rlwinm r9,r9,1,0,30
finished = true;
}
/*
* when maximum cluster size is exceeded, we have invalid data, abort...
*/
if (fattype == FAT_FAT12) {
ffc0e774: 38 c0 00 00 li r6,0
ffc0e778: 40 9a 00 10 bne- cr6,ffc0e788 <msdos_format+0x448>
if (MS_BYTES_PER_CLUSTER_LIMIT_FAT12 < (sectors_per_cluster * bytes_per_sector)) {
ffc0e77c: 7d c9 51 d6 mullw r14,r9,r10
ffc0e780: 28 0e 10 00 cmplwi r14,4096
ffc0e784: 48 00 00 0c b ffc0e790 <msdos_format+0x450>
finished = true;
}
} else if ((sectors_per_cluster * bytes_per_sector)
ffc0e788: 7d c9 51 d6 mullw r14,r9,r10
ffc0e78c: 28 0e 80 00 cmplwi r14,32768
ffc0e790: 41 81 00 0c bgt- ffc0e79c <msdos_format+0x45c>
> MS_BYTES_PER_CLUSTER_LIMIT) {
finished = true;
}
} while (!finished);
ffc0e794: 2c 06 00 00 cmpwi r6,0
ffc0e798: 41 82 ff 08 beq+ ffc0e6a0 <msdos_format+0x360>
*sectors_per_cluster_adj = sectors_per_cluster;
*sectors_per_fat_ptr = fat_sectors_cnt / fat_num;
ffc0e79c: 7c e7 23 96 divwu r7,r7,r4
fmt_params->sectors_per_cluster,
fmt_params->skip_alignment,
§ors_per_cluster_adj,
&fmt_params->sectors_per_fat,
&data_clusters_cnt);
fmt_params->sectors_per_cluster = sectors_per_cluster_adj;
ffc0e7a0: 91 21 02 14 stw r9,532(r1)
( MS_BYTES_PER_CLUSTER_LIMIT_FAT12 +1 ) / bytes_per_sector;
uint32_t ms_sectors_per_cluster_limit_FAT16 =
( MS_BYTES_PER_CLUSTER_LIMIT +1 ) / bytes_per_sector;
uint8_t fattype = FAT_FAT32;
if ( number_of_clusters < FAT_FAT12_MAX_CLN
ffc0e7a4: 2b 88 0f f4 cmplwi cr7,r8,4084
finished = true;
}
} while (!finished);
*sectors_per_cluster_adj = sectors_per_cluster;
*sectors_per_fat_ptr = fat_sectors_cnt / fat_num;
ffc0e7a8: 90 e1 02 18 stw r7,536(r1)
( MS_BYTES_PER_CLUSTER_LIMIT_FAT12 +1 ) / bytes_per_sector;
uint32_t ms_sectors_per_cluster_limit_FAT16 =
( MS_BYTES_PER_CLUSTER_LIMIT +1 ) / bytes_per_sector;
uint8_t fattype = FAT_FAT32;
if ( number_of_clusters < FAT_FAT12_MAX_CLN
ffc0e7ac: 41 9d 00 1c bgt- cr7,ffc0e7c8 <msdos_format+0x488>
static uint8_t
msdos_get_fat_type( const uint32_t bytes_per_sector,
const uint32_t sectors_per_cluster,
const uint32_t number_of_clusters )
{
uint32_t ms_sectors_per_cluster_limit_FAT12 =
ffc0e7b0: 38 e0 10 01 li r7,4097
ffc0e7b4: 7c e7 53 96 divwu r7,r7,r10
uint32_t ms_sectors_per_cluster_limit_FAT16 =
( MS_BYTES_PER_CLUSTER_LIMIT +1 ) / bytes_per_sector;
uint8_t fattype = FAT_FAT32;
if ( number_of_clusters < FAT_FAT12_MAX_CLN
&& sectors_per_cluster <= ms_sectors_per_cluster_limit_FAT12 ) {
ffc0e7b8: 7f 89 38 40 cmplw cr7,r9,r7
fattype = FAT_FAT12;
ffc0e7bc: 39 00 00 01 li r8,1
uint32_t ms_sectors_per_cluster_limit_FAT16 =
( MS_BYTES_PER_CLUSTER_LIMIT +1 ) / bytes_per_sector;
uint8_t fattype = FAT_FAT32;
if ( number_of_clusters < FAT_FAT12_MAX_CLN
&& sectors_per_cluster <= ms_sectors_per_cluster_limit_FAT12 ) {
ffc0e7c0: 41 bd 00 18 bgt+ cr7,ffc0e7d8 <msdos_format+0x498>
ffc0e7c4: 48 00 00 24 b ffc0e7e8 <msdos_format+0x4a8>
fattype = FAT_FAT12;
}
else if ( number_of_clusters < FAT_FAT16_MAX_CLN
ffc0e7c8: 2b 88 ff f4 cmplwi cr7,r8,65524
ffc0e7cc: 40 9d 00 0c ble- cr7,ffc0e7d8 <msdos_format+0x498>
{
uint32_t ms_sectors_per_cluster_limit_FAT12 =
( MS_BYTES_PER_CLUSTER_LIMIT_FAT12 +1 ) / bytes_per_sector;
uint32_t ms_sectors_per_cluster_limit_FAT16 =
( MS_BYTES_PER_CLUSTER_LIMIT +1 ) / bytes_per_sector;
uint8_t fattype = FAT_FAT32;
ffc0e7d0: 39 00 00 04 li r8,4
ffc0e7d4: 48 00 00 14 b ffc0e7e8 <msdos_format+0x4a8>
const uint32_t sectors_per_cluster,
const uint32_t number_of_clusters )
{
uint32_t ms_sectors_per_cluster_limit_FAT12 =
( MS_BYTES_PER_CLUSTER_LIMIT_FAT12 +1 ) / bytes_per_sector;
uint32_t ms_sectors_per_cluster_limit_FAT16 =
ffc0e7d8: 7d 53 53 96 divwu r10,r19,r10
if ( number_of_clusters < FAT_FAT12_MAX_CLN
&& sectors_per_cluster <= ms_sectors_per_cluster_limit_FAT12 ) {
fattype = FAT_FAT12;
}
else if ( number_of_clusters < FAT_FAT16_MAX_CLN
&& sectors_per_cluster <= ms_sectors_per_cluster_limit_FAT16 ) {
ffc0e7dc: 7f 89 50 40 cmplw cr7,r9,r10
ffc0e7e0: 41 bd ff f0 bgt- cr7,ffc0e7d0 <msdos_format+0x490> <== NEVER TAKEN
fattype = FAT_FAT16;
ffc0e7e4: 39 00 00 02 li r8,2
fmt_params->fattype = msdos_get_fat_type(
fmt_params->bytes_per_sector,
fmt_params->sectors_per_cluster,
data_clusters_cnt );
/* Correct sectors per cluster to the fat type specific default value */
if (fat_type != fmt_params->fattype) {
ffc0e7e8: 7f 9c 40 00 cmpw cr7,r28,r8
fmt_params->sectors_per_cluster = sectors_per_cluster_adj;
fat_type = fmt_params->fattype;
/* Correct the FAT type according to the new data cluster count */
if ( ret_val == 0 ) {
fmt_params->fattype = msdos_get_fat_type(
ffc0e7ec: 99 01 02 3a stb r8,570(r1)
fmt_params->bytes_per_sector,
fmt_params->sectors_per_cluster,
data_clusters_cnt );
/* Correct sectors per cluster to the fat type specific default value */
if (fat_type != fmt_params->fattype) {
ffc0e7f0: 41 9e 00 4c beq- cr7,ffc0e83c <msdos_format+0x4fc>
static void
msdos_set_default_sectors_per_cluster_for_fattype(
msdos_format_param_t *fmt_params,
const uint64_t total_size )
{
if ( fmt_params->fattype == FAT_FAT12
ffc0e7f4: 39 08 ff ff addi r8,r8,-1
ffc0e7f8: 2b 88 00 01 cmplwi cr7,r8,1
ffc0e7fc: 39 20 00 1f li r9,31
#define ONE_GB ( 1024L * 1024L * 1024L )
uint32_t gigs = ( total_size + ONE_GB ) / ONE_GB;
int b;
/* scale with the size of disk... */
for ( b = 31; b > 0; b-- ) {
if ( (gigs & ( 1 << b) ) != 0 )
ffc0e800: 7d 29 03 a6 mtctr r9
static void
msdos_set_default_sectors_per_cluster_for_fattype(
msdos_format_param_t *fmt_params,
const uint64_t total_size )
{
if ( fmt_params->fattype == FAT_FAT12
ffc0e804: 41 bd 00 0c bgt+ cr7,ffc0e810 <msdos_format+0x4d0>
|| fmt_params->fattype == FAT_FAT16 ) {
/* start trying with small clusters */
fmt_params->sectors_per_cluster = 2;
ffc0e808: 39 20 00 02 li r9,2
ffc0e80c: 48 00 00 1c b ffc0e828 <msdos_format+0x4e8>
#define ONE_GB ( 1024L * 1024L * 1024L )
uint32_t gigs = ( total_size + ONE_GB ) / ONE_GB;
int b;
/* scale with the size of disk... */
for ( b = 31; b > 0; b-- ) {
if ( (gigs & ( 1 << b) ) != 0 )
ffc0e810: 7e 2a 48 30 slw r10,r17,r9
ffc0e814: 7d 47 d8 39 and. r7,r10,r27
ffc0e818: 40 82 00 0c bne- ffc0e824 <msdos_format+0x4e4>
else {
#define ONE_GB ( 1024L * 1024L * 1024L )
uint32_t gigs = ( total_size + ONE_GB ) / ONE_GB;
int b;
/* scale with the size of disk... */
for ( b = 31; b > 0; b-- ) {
ffc0e81c: 39 29 ff ff addi r9,r9,-1
ffc0e820: 42 00 ff f0 bdnz+ ffc0e810 <msdos_format+0x4d0>
if ( (gigs & ( 1 << b) ) != 0 )
break;
}
fmt_params->sectors_per_cluster = 1 << b;
ffc0e824: 7e 29 48 30 slw r9,r17,r9
data_clusters_cnt );
/* Correct sectors per cluster to the fat type specific default value */
if (fat_type != fmt_params->fattype) {
msdos_set_default_sectors_per_cluster_for_fattype( fmt_params,
total_size );
ret_val = msdos_set_sectors_per_cluster_from_request( rqdata,
ffc0e828: 7f e3 fb 78 mr r3,r31
/* scale with the size of disk... */
for ( b = 31; b > 0; b-- ) {
if ( (gigs & ( 1 << b) ) != 0 )
break;
}
fmt_params->sectors_per_cluster = 1 << b;
ffc0e82c: 91 21 02 14 stw r9,532(r1)
data_clusters_cnt );
/* Correct sectors per cluster to the fat type specific default value */
if (fat_type != fmt_params->fattype) {
msdos_set_default_sectors_per_cluster_for_fattype( fmt_params,
total_size );
ret_val = msdos_set_sectors_per_cluster_from_request( rqdata,
ffc0e830: 7e 44 93 78 mr r4,r18
ffc0e834: 4b ff fa 81 bl ffc0e2b4 <msdos_set_sectors_per_cluster_from_request>
ffc0e838: 7c 7e 1b 78 mr r30,r3
fmt_params );
}
}
if (fat_type != fmt_params->fattype && 1 < iteration_cnt) {
ffc0e83c: 89 21 02 3a lbz r9,570(r1)
ffc0e840: 7f 89 e0 00 cmpw cr7,r9,r28
ffc0e844: 41 9e 00 18 beq- cr7,ffc0e85c <msdos_format+0x51c>
ffc0e848: 2b 90 00 01 cmplwi cr7,r16,1
ffc0e84c: 40 9d 00 10 ble- cr7,ffc0e85c <msdos_format+0x51c>
--fmt_params->totl_sector_cnt;
ffc0e850: 81 21 02 0c lwz r9,524(r1)
ffc0e854: 39 29 ff ff addi r9,r9,-1
ffc0e858: 91 21 02 0c stw r9,524(r1)
}
}
++iteration_cnt;
ffc0e85c: 3a 10 00 01 addi r16,r16,1
ffc0e860: 56 10 06 3e clrlwi r16,r16,24
if (ret_val == 0) {
data_clusters_cnt =
fmt_params->totl_sector_cnt / fmt_params->sectors_per_cluster;
}
while( ret_val == 0
ffc0e864: 2f 9e 00 00 cmpwi cr7,r30,0
ffc0e868: 40 9e 00 1c bne- cr7,ffc0e884 <msdos_format+0x544> <== NEVER TAKEN
&& fmt_params->fattype != fat_type
ffc0e86c: 89 21 02 3a lbz r9,570(r1)
ffc0e870: 7f 89 e0 00 cmpw cr7,r9,r28
ffc0e874: 41 9e 00 10 beq- cr7,ffc0e884 <msdos_format+0x544>
&& fmt_params->totl_sector_cnt > 0 ) {
ffc0e878: 81 21 02 0c lwz r9,524(r1)
ffc0e87c: 2f 89 00 00 cmpwi cr7,r9,0
ffc0e880: 40 9e fd 34 bne+ cr7,ffc0e5b4 <msdos_format+0x274> <== ALWAYS TAKEN
}
++iteration_cnt;
}
}
if ( fmt_params->totl_sector_cnt == 0 )
ffc0e884: 81 21 02 0c lwz r9,524(r1)
ffc0e888: 2f 89 00 00 cmpwi cr7,r9,0
ffc0e88c: 40 be 00 08 bne+ cr7,ffc0e894 <msdos_format+0x554> <== ALWAYS TAKEN
ffc0e890: 48 00 00 b0 b ffc0e940 <msdos_format+0x600> <== NOT EXECUTED
{
errno = EINVAL;
ret_val = -1;
}
if (0 == ret_val)
ffc0e894: 2f 9e 00 00 cmpwi cr7,r30,0
ffc0e898: 40 9e 00 cc bne- cr7,ffc0e964 <msdos_format+0x624>
{
if (FAT_FAT32 != fmt_params->fattype)
ffc0e89c: 89 21 02 3a lbz r9,570(r1)
ffc0e8a0: 2f 89 00 04 cmpwi cr7,r9,4
ffc0e8a4: 41 9e 00 38 beq- cr7,ffc0e8dc <msdos_format+0x59c>
static uint32_t
loc_align_object (const uint32_t sectors,
const uint32_t clustersize,
const bool skip_alignment)
{
if (! skip_alignment)
ffc0e8a8: 89 01 02 58 lbz r8,600(r1)
if (0 == ret_val)
{
if (FAT_FAT32 != fmt_params->fattype)
{
fmt_params->files_per_root_dir = loc_align_object (fmt_params->root_dir_sectors,
ffc0e8ac: 81 21 02 24 lwz r9,548(r1)
static uint32_t
loc_align_object (const uint32_t sectors,
const uint32_t clustersize,
const bool skip_alignment)
{
if (! skip_alignment)
ffc0e8b0: 2f 88 00 00 cmpwi cr7,r8,0
if (0 == ret_val)
{
if (FAT_FAT32 != fmt_params->fattype)
{
fmt_params->files_per_root_dir = loc_align_object (fmt_params->root_dir_sectors,
ffc0e8b4: 81 41 02 14 lwz r10,532(r1)
static uint32_t
loc_align_object (const uint32_t sectors,
const uint32_t clustersize,
const bool skip_alignment)
{
if (! skip_alignment)
ffc0e8b8: 40 9e 00 14 bne- cr7,ffc0e8cc <msdos_format+0x58c>
return (sectors + clustersize - 1) & ~(clustersize - 1);
ffc0e8bc: 7d 29 52 14 add r9,r9,r10
ffc0e8c0: 39 29 ff ff addi r9,r9,-1
ffc0e8c4: 7d 4a 00 d0 neg r10,r10
ffc0e8c8: 7d 29 50 38 and r9,r9,r10
if (FAT_FAT32 != fmt_params->fattype)
{
fmt_params->files_per_root_dir = loc_align_object (fmt_params->root_dir_sectors,
fmt_params->sectors_per_cluster,
fmt_params->skip_alignment)
* (fmt_params->bytes_per_sector / FAT_DIRENTRY_SIZE);
ffc0e8cc: 81 41 02 08 lwz r10,520(r1)
ffc0e8d0: 55 4a d9 7e rlwinm r10,r10,27,5,31
ffc0e8d4: 7d 29 51 d6 mullw r9,r9,r10
if (0 == ret_val)
{
if (FAT_FAT32 != fmt_params->fattype)
{
fmt_params->files_per_root_dir = loc_align_object (fmt_params->root_dir_sectors,
ffc0e8d8: 91 21 02 20 stw r9,544(r1)
static uint32_t
loc_align_object (const uint32_t sectors,
const uint32_t clustersize,
const bool skip_alignment)
{
if (! skip_alignment)
ffc0e8dc: 89 01 02 58 lbz r8,600(r1)
fmt_params->sectors_per_cluster,
fmt_params->skip_alignment)
* (fmt_params->bytes_per_sector / FAT_DIRENTRY_SIZE);
}
fmt_params->rsvd_sector_cnt = loc_align_object (fmt_params->rsvd_sector_cnt,
ffc0e8e0: 81 21 02 10 lwz r9,528(r1)
static uint32_t
loc_align_object (const uint32_t sectors,
const uint32_t clustersize,
const bool skip_alignment)
{
if (! skip_alignment)
ffc0e8e4: 2f 88 00 00 cmpwi cr7,r8,0
fmt_params->sectors_per_cluster,
fmt_params->skip_alignment)
* (fmt_params->bytes_per_sector / FAT_DIRENTRY_SIZE);
}
fmt_params->rsvd_sector_cnt = loc_align_object (fmt_params->rsvd_sector_cnt,
ffc0e8e8: 81 41 02 14 lwz r10,532(r1)
static uint32_t
loc_align_object (const uint32_t sectors,
const uint32_t clustersize,
const bool skip_alignment)
{
if (! skip_alignment)
ffc0e8ec: 40 9e 00 14 bne- cr7,ffc0e900 <msdos_format+0x5c0>
return (sectors + clustersize - 1) & ~(clustersize - 1);
ffc0e8f0: 7d 29 52 14 add r9,r9,r10
ffc0e8f4: 39 29 ff ff addi r9,r9,-1
ffc0e8f8: 7d 4a 00 d0 neg r10,r10
ffc0e8fc: 7d 29 50 38 and r9,r9,r10
/*
* determine media code
*/
if (ret_val == 0) {
if ((rqdata != NULL) &&
ffc0e900: 2f 9f 00 00 cmpwi cr7,r31,0
fmt_params->sectors_per_cluster,
fmt_params->skip_alignment)
* (fmt_params->bytes_per_sector / FAT_DIRENTRY_SIZE);
}
fmt_params->rsvd_sector_cnt = loc_align_object (fmt_params->rsvd_sector_cnt,
ffc0e904: 91 21 02 10 stw r9,528(r1)
/*
* determine media code
*/
if (ret_val == 0) {
if ((rqdata != NULL) &&
ffc0e908: 41 9e 00 54 beq- cr7,ffc0e95c <msdos_format+0x61c>
(rqdata->media != 0)) {
ffc0e90c: 8b 9f 00 14 lbz r28,20(r31)
/*
* determine media code
*/
if (ret_val == 0) {
if ((rqdata != NULL) &&
ffc0e910: 2f 9c 00 00 cmpwi cr7,r28,0
ffc0e914: 41 9e 00 48 beq- cr7,ffc0e95c <msdos_format+0x61c>
(rqdata->media != 0)) {
const char valid_media_codes[] =
ffc0e918: 3d 20 ff c3 lis r9,-61
ffc0e91c: 38 61 00 08 addi r3,r1,8
ffc0e920: 39 29 c4 d8 addi r9,r9,-15144
ffc0e924: 7c a9 4c aa lswi r5,r9,9
ffc0e928: 7c a3 4d aa stswi r5,r3,9
{0xF0,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF};
if (NULL==memchr(valid_media_codes,
ffc0e92c: 7f 84 e3 78 mr r4,r28
ffc0e930: 38 a0 00 09 li r5,9
ffc0e934: 48 00 e3 25 bl ffc1cc58 <memchr>
ffc0e938: 2f 83 00 00 cmpwi cr7,r3,0
ffc0e93c: 40 be 00 18 bne+ cr7,ffc0e954 <msdos_format+0x614> <== NEVER TAKEN
rqdata->media,
sizeof(valid_media_codes))) {
ret_val = -1;
errno = EINVAL;
ffc0e940: 48 00 d7 a9 bl ffc1c0e8 <__errno>
ffc0e944: 39 20 00 16 li r9,22
ffc0e948: 91 23 00 00 stw r9,0(r3)
const char valid_media_codes[] =
{0xF0,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF};
if (NULL==memchr(valid_media_codes,
rqdata->media,
sizeof(valid_media_codes))) {
ret_val = -1;
ffc0e94c: 3b c0 ff ff li r30,-1
ffc0e950: 48 00 00 14 b ffc0e964 <msdos_format+0x624>
errno = EINVAL;
}
else {
fmt_params->media_code = rqdata->media;
ffc0e954: 9b 81 02 39 stb r28,569(r1) <== NOT EXECUTED
ffc0e958: 48 00 00 0c b ffc0e964 <msdos_format+0x624> <== NOT EXECUTED
}
}
else {
fmt_params->media_code = FAT_BR_MEDIA_FIXED;
ffc0e95c: 39 20 ff f8 li r9,-8
ffc0e960: 99 21 02 39 stb r9,569(r1)
}
/*
* determine location and size of root directory
* for formatting
*/
if (fmt_params->root_dir_sectors > 0) {
ffc0e964: 80 e1 02 24 lwz r7,548(r1)
ffc0e968: 89 01 02 38 lbz r8,568(r1)
ffc0e96c: 81 41 02 18 lwz r10,536(r1)
ffc0e970: 2f 87 00 00 cmpwi cr7,r7,0
fmt_params->root_dir_start_sec =
fmt_params->rsvd_sector_cnt
+ (fmt_params-> fat_num*fmt_params->sectors_per_fat);
ffc0e974: 55 08 06 3e clrlwi r8,r8,24
ffc0e978: 81 21 02 10 lwz r9,528(r1)
ffc0e97c: 7d 48 51 d6 mullw r10,r8,r10
ffc0e980: 7d 2a 4a 14 add r9,r10,r9
/*
* determine location and size of root directory
* for formatting
*/
if (fmt_params->root_dir_sectors > 0) {
fmt_params->root_dir_start_sec =
ffc0e984: 91 21 02 28 stw r9,552(r1)
}
/*
* determine location and size of root directory
* for formatting
*/
if (fmt_params->root_dir_sectors > 0) {
ffc0e988: 41 9e 00 0c beq- cr7,ffc0e994 <msdos_format+0x654>
fmt_params->root_dir_start_sec =
fmt_params->rsvd_sector_cnt
+ (fmt_params-> fat_num*fmt_params->sectors_per_fat);
fmt_params->root_dir_fmt_sec_cnt = fmt_params->root_dir_sectors;
ffc0e98c: 90 e1 02 2c stw r7,556(r1)
ffc0e990: 48 00 00 0c b ffc0e99c <msdos_format+0x65c>
* 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);
fmt_params->root_dir_fmt_sec_cnt = fmt_params->sectors_per_cluster;
ffc0e994: 81 21 02 14 lwz r9,532(r1)
ffc0e998: 91 21 02 2c stw r9,556(r1)
}
/*
* determine usable OEMName
*/
if (ret_val == 0) {
ffc0e99c: 2f 9e 00 00 cmpwi cr7,r30,0
ffc0e9a0: 40 9e 07 3c bne- cr7,ffc0f0dc <msdos_format+0xd9c>
const char *from;
char *to = fmt_params->OEMName;
int cnt;
from = "RTEMS"; /* default: make "from" point to OS Name */
if ((rqdata != NULL) &&
ffc0e9a4: 2f 9f 00 00 cmpwi cr7,r31,0
ffc0e9a8: 41 9e 00 10 beq- cr7,ffc0e9b8 <msdos_format+0x678>
(rqdata->OEMName != NULL)) {
ffc0e9ac: 81 3f 00 00 lwz r9,0(r31)
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) &&
ffc0e9b0: 2f 89 00 00 cmpwi cr7,r9,0
ffc0e9b4: 40 be 00 0c bne+ cr7,ffc0e9c0 <msdos_format+0x680>
*/
if (ret_val == 0) {
const char *from;
char *to = fmt_params->OEMName;
int cnt;
from = "RTEMS"; /* default: make "from" point to OS Name */
ffc0e9b8: 3d 20 ff c3 lis r9,-61
ffc0e9bc: 39 29 c5 09 addi r9,r9,-15095
from = rqdata->OEMName;
}
for (cnt = 0;
cnt < (sizeof(fmt_params->OEMName)-1);
cnt++) {
if (isprint((unsigned char)*from)) {
ffc0e9c0: 3d 40 00 00 lis r10,0
* at that character and replace all following characters
* with a ' '
*/
*to++=' ';
}
*to = '\0';
ffc0e9c4: 39 00 00 09 li r8,9
from = rqdata->OEMName;
}
for (cnt = 0;
cnt < (sizeof(fmt_params->OEMName)-1);
cnt++) {
if (isprint((unsigned char)*from)) {
ffc0e9c8: 80 ca 27 e8 lwz r6,10216(r10)
ffc0e9cc: 38 a0 ff 97 li r5,-105
* at that character and replace all following characters
* with a ' '
*/
*to++=' ';
}
*to = '\0';
ffc0e9d0: 7d 09 03 a6 mtctr r8
/*
* determine usable OEMName
*/
if (ret_val == 0) {
const char *from;
char *to = fmt_params->OEMName;
ffc0e9d4: 39 41 02 3b addi r10,r1,571
/*
* non-printable character in given name, so keep stuck
* at that character and replace all following characters
* with a ' '
*/
*to++=' ';
ffc0e9d8: 38 80 00 20 li r4,32
}
*to = '\0';
ffc0e9dc: 38 60 00 00 li r3,0
ffc0e9e0: 48 00 00 38 b ffc0ea18 <msdos_format+0x6d8>
from = rqdata->OEMName;
}
for (cnt = 0;
cnt < (sizeof(fmt_params->OEMName)-1);
cnt++) {
if (isprint((unsigned char)*from)) {
ffc0e9e4: 88 e9 00 00 lbz r7,0(r9)
ffc0e9e8: 7d 06 3a 14 add r8,r6,r7
ffc0e9ec: 89 08 00 01 lbz r8,1(r8)
ffc0e9f0: 7d 0b 28 39 and. r11,r8,r5
ffc0e9f4: 39 0a 00 01 addi r8,r10,1
ffc0e9f8: 41 82 00 14 beq- ffc0ea0c <msdos_format+0x6cc>
*to++ = *from++;
ffc0e9fc: 98 ea 00 00 stb r7,0(r10)
ffc0ea00: 39 29 00 01 addi r9,r9,1
ffc0ea04: 7d 0a 43 78 mr r10,r8
ffc0ea08: 48 00 00 0c b ffc0ea14 <msdos_format+0x6d4>
/*
* non-printable character in given name, so keep stuck
* at that character and replace all following characters
* with a ' '
*/
*to++=' ';
ffc0ea0c: 98 8a 00 00 stb r4,0(r10)
ffc0ea10: 7d 0a 43 78 mr r10,r8
}
*to = '\0';
ffc0ea14: 98 68 00 00 stb r3,0(r8)
from = "RTEMS"; /* default: make "from" point to OS Name */
if ((rqdata != NULL) &&
(rqdata->OEMName != NULL)) {
from = rqdata->OEMName;
}
for (cnt = 0;
ffc0ea18: 42 00 ff cc bdnz+ ffc0e9e4 <msdos_format+0x6a4>
ffc0ea1c: 48 00 06 84 b ffc0f0a0 <msdos_format+0xd60>
const char *from;
char *to = fmt_params->VolLabel;
int cnt;
from = ""; /* default: make "from" point to empty string */
if ((rqdata != NULL) &&
(rqdata->VolLabel != NULL)) {
ffc0ea20: 81 3f 00 04 lwz r9,4(r31)
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) &&
ffc0ea24: 2f 89 00 00 cmpwi cr7,r9,0
ffc0ea28: 41 9e 00 10 beq- cr7,ffc0ea38 <msdos_format+0x6f8>
(rqdata->VolLabel != NULL)) {
from = rqdata->VolLabel;
fmt_params->VolLabel_present = true;
ffc0ea2c: 39 40 00 01 li r10,1
ffc0ea30: 99 41 02 50 stb r10,592(r1)
ffc0ea34: 48 00 00 0c b ffc0ea40 <msdos_format+0x700>
*/
if (ret_val == 0) {
const char *from;
char *to = fmt_params->VolLabel;
int cnt;
from = ""; /* default: make "from" point to empty string */
ffc0ea38: 3d 20 ff c3 lis r9,-61
ffc0ea3c: 39 29 c3 c5 addi r9,r9,-15419
fmt_params->VolLabel_present = true;
}
for (cnt = 0;
cnt < (sizeof(fmt_params->VolLabel)-1);
cnt++) {
if (isprint((unsigned char)*from)) {
ffc0ea40: 3d 40 00 00 lis r10,0
* at that character and replace all following characters
* with a ' '
*/
*to++=' ';
}
*to = '\0';
ffc0ea44: 38 e0 00 0c li r7,12
fmt_params->VolLabel_present = true;
}
for (cnt = 0;
cnt < (sizeof(fmt_params->VolLabel)-1);
cnt++) {
if (isprint((unsigned char)*from)) {
ffc0ea48: 80 ca 27 e8 lwz r6,10216(r10)
ffc0ea4c: 38 a0 ff 97 li r5,-105
* at that character and replace all following characters
* with a ' '
*/
*to++=' ';
}
*to = '\0';
ffc0ea50: 7c e9 03 a6 mtctr r7
/*
* determine usable Volume Label
*/
if (ret_val == 0) {
const char *from;
char *to = fmt_params->VolLabel;
ffc0ea54: 39 41 02 44 addi r10,r1,580
/*
* non-printable character in given name, so keep stuck
* at that character and replace all following characters
* with a ' '
*/
*to++=' ';
ffc0ea58: 38 80 00 20 li r4,32
}
*to = '\0';
ffc0ea5c: 38 60 00 00 li r3,0
ffc0ea60: 48 00 00 38 b ffc0ea98 <msdos_format+0x758>
fmt_params->VolLabel_present = true;
}
for (cnt = 0;
cnt < (sizeof(fmt_params->VolLabel)-1);
cnt++) {
if (isprint((unsigned char)*from)) {
ffc0ea64: 88 e9 00 00 lbz r7,0(r9)
ffc0ea68: 7d 06 3a 14 add r8,r6,r7
ffc0ea6c: 89 08 00 01 lbz r8,1(r8)
ffc0ea70: 7d 0b 28 39 and. r11,r8,r5
ffc0ea74: 39 0a 00 01 addi r8,r10,1
ffc0ea78: 41 82 00 14 beq- ffc0ea8c <msdos_format+0x74c>
*to++ = *from++;
ffc0ea7c: 98 ea 00 00 stb r7,0(r10)
ffc0ea80: 39 29 00 01 addi r9,r9,1
ffc0ea84: 7d 0a 43 78 mr r10,r8
ffc0ea88: 48 00 00 0c b ffc0ea94 <msdos_format+0x754>
/*
* non-printable character in given name, so keep stuck
* at that character and replace all following characters
* with a ' '
*/
*to++=' ';
ffc0ea8c: 98 8a 00 00 stb r4,0(r10)
ffc0ea90: 7d 0a 43 78 mr r10,r8
}
*to = '\0';
ffc0ea94: 98 68 00 00 stb r3,0(r8)
if ((rqdata != NULL) &&
(rqdata->VolLabel != NULL)) {
from = rqdata->VolLabel;
fmt_params->VolLabel_present = true;
}
for (cnt = 0;
ffc0ea98: 42 00 ff cc bdnz+ ffc0ea64 <msdos_format+0x724>
ffc0ea9c: 48 00 06 10 b ffc0f0ac <msdos_format+0xd6c>
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;
ffc0eaa0: 81 21 00 08 lwz r9,8(r1) <== NOT EXECUTED
ffc0eaa4: 55 29 08 3c rlwinm r9,r9,1,0,30 <== NOT EXECUTED
ffc0eaa8: 91 21 02 54 stw r9,596(r1) <== NOT EXECUTED
ffc0eaac: 48 00 00 0c b ffc0eab8 <msdos_format+0x778> <== NOT EXECUTED
}
else {
*volid_ptr = rand();
ffc0eab0: 48 00 ef 15 bl ffc1d9c4 <rand>
ffc0eab4: 90 61 02 54 stw r3,596(r1)
ret_val = msdos_format_determine_fmt_params(fd,rqdata,&fmt_params);
}
/*
* if requested, write whole disk/partition with 0xe5
*/
if ((ret_val == 0) &&
ffc0eab8: 2f 9f 00 00 cmpwi cr7,r31,0
ffc0eabc: 40 be 00 40 bne+ cr7,ffc0eafc <msdos_format+0x7bc>
*/
if (ret_val == 0) {
/*
* Read the current MBR to obtain the partition table.
*/
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
ffc0eac0: 3c a0 ff c3 lis r5,-61
ffc0eac4: 7f e3 fb 78 mr r3,r31
ffc0eac8: 38 80 00 02 li r4,2
ffc0eacc: 38 a5 c5 a1 addi r5,r5,-14943
ffc0ead0: 4c c6 31 82 crclr 4*cr1+eq
ffc0ead4: 4b ff f5 9d bl ffc0e070 <msdos_format_printf>
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
int ret_val = 0;
if (0 > lseek(fd,((off_t)start_sector)*sector_size,SEEK_SET)) {
ffc0ead8: 7f a3 eb 78 mr r3,r29
ffc0eadc: 38 a0 00 00 li r5,0
/*
* Read the current MBR to obtain the partition table.
*/
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
"read MRB sector\n");
ret_val = msdos_format_read_sec(fd,
ffc0eae0: 83 c1 02 08 lwz r30,520(r1)
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
int ret_val = 0;
if (0 > lseek(fd,((off_t)start_sector)*sector_size,SEEK_SET)) {
ffc0eae4: 38 c0 00 00 li r6,0
ffc0eae8: 38 e0 00 00 li r7,0
ffc0eaec: 48 00 6c 25 bl ffc15710 <lseek>
ffc0eaf0: 2f 83 00 00 cmpwi cr7,r3,0
ffc0eaf4: 40 bc 05 cc bge+ cr7,ffc0f0c0 <msdos_format+0xd80> <== ALWAYS TAKEN
ffc0eaf8: 48 00 06 18 b ffc0f110 <msdos_format+0xdd0> <== NOT EXECUTED
}
/*
* if requested, write whole disk/partition with 0xe5
*/
if ((ret_val == 0) &&
(rqdata != NULL) &&
ffc0eafc: 89 3f 00 15 lbz r9,21(r31)
ffc0eb00: 2f 89 00 00 cmpwi cr7,r9,0
ffc0eb04: 40 9e ff bc bne+ cr7,ffc0eac0 <msdos_format+0x780>
!(rqdata->quick_format)) {
ret_val = msdos_format_fill_sectors
ffc0eb08: 80 c1 02 0c lwz r6,524(r1)
ffc0eb0c: 7f e3 fb 78 mr r3,r31
ffc0eb10: 80 e1 02 08 lwz r7,520(r1)
ffc0eb14: 7f a4 eb 78 mr r4,r29
ffc0eb18: 38 a0 00 00 li r5,0
ffc0eb1c: 39 00 00 e5 li r8,229
ffc0eb20: 4b ff f6 55 bl ffc0e174 <msdos_format_fill_sectors>
}
/*
* create master boot record
*/
if (ret_val == 0) {
ffc0eb24: 7c 7e 1b 79 mr. r30,r3
ffc0eb28: 40 a2 05 b4 bne+ ffc0f0dc <msdos_format+0xd9c> <== NEVER TAKEN
ffc0eb2c: 4b ff ff 94 b ffc0eac0 <msdos_format+0x780>
{
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) {
ffc0eb30: 7f dc f3 78 mr r28,r30
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
uint32_t total_sectors_num16 = 0;
uint32_t total_sectors_num32 = 0;
ffc0eb34: 3b c0 00 00 li r30,0
* 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);
ffc0eb38: 38 61 00 08 addi r3,r1,8
ffc0eb3c: 38 80 00 00 li r4,0
ffc0eb40: 38 a0 01 be li r5,446
ffc0eb44: 48 00 e3 79 bl ffc1cebc <memset>
memset(mbr + RTEMS_IDE_PARTITION_TABLE_OFFSET + RTEMS_IDE_PARTITION_TABLE_SIZE,
ffc0eb48: 39 00 00 00 li r8,0
ffc0eb4c: b1 01 02 06 sth r8,518(r1)
*/
/*
* fill OEMName
*/
memcpy(FAT_GET_ADDR_BR_OEMNAME(mbr),
fmt_params->OEMName,
ffc0eb50: 39 41 02 3b addi r10,r1,571
* with 0xEB,....
*/
/*
* fill OEMName
*/
memcpy(FAT_GET_ADDR_BR_OEMNAME(mbr),
ffc0eb54: 39 21 00 0b addi r9,r1,11
ffc0eb58: 7c ca 44 aa lswi r6,r10,8
ffc0eb5c: 7c c9 45 aa stswi r6,r9,8
FAT_SET_BR_BYTES_PER_SECTOR(mbr , fmt_params->bytes_per_sector);
FAT_SET_BR_SECTORS_PER_CLUSTER(mbr , fmt_params->sectors_per_cluster);
FAT_SET_BR_RESERVED_SECTORS_NUM(mbr, fmt_params->rsvd_sector_cnt);
/* number of FATs on medium */
FAT_SET_BR_FAT_NUM(mbr , 2); /* standard/recommended value */
ffc0eb60: 38 c0 00 02 li r6,2
FAT_SET_BR_TOTAL_SECTORS_NUM16(mbr , total_sectors_num16);
FAT_SET_BR_MEDIA(mbr , fmt_params->media_code);
FAT_SET_BR_SECTORS_PER_TRACK(mbr , 255); /* only needed for INT13... */
FAT_SET_BR_NUMBER_OF_HEADS(mbr , 6); /* only needed for INT13... */
FAT_SET_BR_HIDDEN_SECTORS(mbr , 1); /* only needed for INT13... */
ffc0eb64: 38 e0 00 01 li r7,1
* fill OEMName
*/
memcpy(FAT_GET_ADDR_BR_OEMNAME(mbr),
fmt_params->OEMName,
FAT_BR_OEMNAME_SIZE);
FAT_SET_BR_BYTES_PER_SECTOR(mbr , fmt_params->bytes_per_sector);
ffc0eb68: 81 21 02 08 lwz r9,520(r1)
FAT_SET_BR_SECTORS_PER_TRACK(mbr , 255); /* only needed for INT13... */
FAT_SET_BR_NUMBER_OF_HEADS(mbr , 6); /* only needed for INT13... */
FAT_SET_BR_HIDDEN_SECTORS(mbr , 1); /* only needed for INT13... */
FAT_SET_BR_TOTAL_SECTORS_NUM32(mbr , total_sectors_num32);
if (fmt_params->fattype != FAT_FAT32) {
ffc0eb6c: 89 41 02 3a lbz r10,570(r1)
* fill OEMName
*/
memcpy(FAT_GET_ADDR_BR_OEMNAME(mbr),
fmt_params->OEMName,
FAT_BR_OEMNAME_SIZE);
FAT_SET_BR_BYTES_PER_SECTOR(mbr , fmt_params->bytes_per_sector);
ffc0eb70: 99 21 00 13 stb r9,19(r1)
ffc0eb74: 55 29 c2 3e rlwinm r9,r9,24,8,31
FAT_SET_BR_SECTORS_PER_TRACK(mbr , 255); /* only needed for INT13... */
FAT_SET_BR_NUMBER_OF_HEADS(mbr , 6); /* only needed for INT13... */
FAT_SET_BR_HIDDEN_SECTORS(mbr , 1); /* only needed for INT13... */
FAT_SET_BR_TOTAL_SECTORS_NUM32(mbr , total_sectors_num32);
if (fmt_params->fattype != FAT_FAT32) {
ffc0eb78: 2f 8a 00 04 cmpwi cr7,r10,4
* fill OEMName
*/
memcpy(FAT_GET_ADDR_BR_OEMNAME(mbr),
fmt_params->OEMName,
FAT_BR_OEMNAME_SIZE);
FAT_SET_BR_BYTES_PER_SECTOR(mbr , fmt_params->bytes_per_sector);
ffc0eb7c: 99 21 00 14 stb r9,20(r1)
FAT_SET_BR_SECTORS_PER_CLUSTER(mbr , fmt_params->sectors_per_cluster);
ffc0eb80: 81 21 02 14 lwz r9,532(r1)
FAT_SET_BR_RESERVED_SECTORS_NUM(mbr, fmt_params->rsvd_sector_cnt);
/* number of FATs on medium */
FAT_SET_BR_FAT_NUM(mbr , 2); /* standard/recommended value */
FAT_SET_BR_FILES_PER_ROOT_DIR(mbr , fmt_params->files_per_root_dir);
FAT_SET_BR_TOTAL_SECTORS_NUM16(mbr , total_sectors_num16);
ffc0eb84: 9b 81 00 1b stb r28,27(r1)
ffc0eb88: 57 9c c2 3e rlwinm r28,r28,24,8,31
*/
memcpy(FAT_GET_ADDR_BR_OEMNAME(mbr),
fmt_params->OEMName,
FAT_BR_OEMNAME_SIZE);
FAT_SET_BR_BYTES_PER_SECTOR(mbr , fmt_params->bytes_per_sector);
FAT_SET_BR_SECTORS_PER_CLUSTER(mbr , fmt_params->sectors_per_cluster);
ffc0eb8c: 99 21 00 15 stb r9,21(r1)
FAT_SET_BR_RESERVED_SECTORS_NUM(mbr, fmt_params->rsvd_sector_cnt);
ffc0eb90: 81 21 02 10 lwz r9,528(r1)
FAT_SET_BR_SECTORS_PER_TRACK(mbr , 255); /* only needed for INT13... */
FAT_SET_BR_NUMBER_OF_HEADS(mbr , 6); /* only needed for INT13... */
FAT_SET_BR_HIDDEN_SECTORS(mbr , 1); /* only needed for INT13... */
FAT_SET_BR_TOTAL_SECTORS_NUM32(mbr , total_sectors_num32);
ffc0eb94: 9b c1 00 28 stb r30,40(r1)
memcpy(FAT_GET_ADDR_BR_OEMNAME(mbr),
fmt_params->OEMName,
FAT_BR_OEMNAME_SIZE);
FAT_SET_BR_BYTES_PER_SECTOR(mbr , fmt_params->bytes_per_sector);
FAT_SET_BR_SECTORS_PER_CLUSTER(mbr , fmt_params->sectors_per_cluster);
FAT_SET_BR_RESERVED_SECTORS_NUM(mbr, fmt_params->rsvd_sector_cnt);
ffc0eb98: 99 21 00 16 stb r9,22(r1)
ffc0eb9c: 55 29 c2 3e rlwinm r9,r9,24,8,31
ffc0eba0: 99 21 00 17 stb r9,23(r1)
/* number of FATs on medium */
FAT_SET_BR_FAT_NUM(mbr , 2); /* standard/recommended value */
FAT_SET_BR_FILES_PER_ROOT_DIR(mbr , fmt_params->files_per_root_dir);
ffc0eba4: 81 21 02 20 lwz r9,544(r1)
FAT_SET_BR_BYTES_PER_SECTOR(mbr , fmt_params->bytes_per_sector);
FAT_SET_BR_SECTORS_PER_CLUSTER(mbr , fmt_params->sectors_per_cluster);
FAT_SET_BR_RESERVED_SECTORS_NUM(mbr, fmt_params->rsvd_sector_cnt);
/* number of FATs on medium */
FAT_SET_BR_FAT_NUM(mbr , 2); /* standard/recommended value */
ffc0eba8: 98 c1 00 18 stb r6,24(r1)
FAT_SET_BR_FILES_PER_ROOT_DIR(mbr , fmt_params->files_per_root_dir);
ffc0ebac: 99 21 00 19 stb r9,25(r1)
ffc0ebb0: 55 29 c2 3e rlwinm r9,r9,24,8,31
ffc0ebb4: 99 21 00 1a stb r9,26(r1)
FAT_SET_BR_TOTAL_SECTORS_NUM16(mbr , total_sectors_num16);
FAT_SET_BR_MEDIA(mbr , fmt_params->media_code);
ffc0ebb8: 89 21 02 39 lbz r9,569(r1)
FAT_SET_BR_RESERVED_SECTORS_NUM(mbr, fmt_params->rsvd_sector_cnt);
/* number of FATs on medium */
FAT_SET_BR_FAT_NUM(mbr , 2); /* standard/recommended value */
FAT_SET_BR_FILES_PER_ROOT_DIR(mbr , fmt_params->files_per_root_dir);
FAT_SET_BR_TOTAL_SECTORS_NUM16(mbr , total_sectors_num16);
ffc0ebbc: 9b 81 00 1c stb r28,28(r1)
FAT_SET_BR_MEDIA(mbr , fmt_params->media_code);
ffc0ebc0: 99 21 00 1d stb r9,29(r1)
FAT_SET_BR_SECTORS_PER_TRACK(mbr , 255); /* only needed for INT13... */
ffc0ebc4: 39 20 ff ff li r9,-1
ffc0ebc8: 99 21 00 20 stb r9,32(r1)
FAT_SET_BR_NUMBER_OF_HEADS(mbr , 6); /* only needed for INT13... */
ffc0ebcc: 39 20 00 06 li r9,6
ffc0ebd0: 99 21 00 22 stb r9,34(r1)
FAT_SET_BR_HIDDEN_SECTORS(mbr , 1); /* only needed for INT13... */
FAT_SET_BR_TOTAL_SECTORS_NUM32(mbr , total_sectors_num32);
ffc0ebd4: 57 c9 c6 3e rlwinm r9,r30,24,24,31
ffc0ebd8: 99 21 00 29 stb r9,41(r1)
ffc0ebdc: 57 c9 84 3e rlwinm r9,r30,16,16,31
ffc0ebe0: 57 de 46 3e rlwinm r30,r30,8,24,31
ffc0ebe4: 99 21 00 2a stb r9,42(r1)
FAT_SET_BR_TOTAL_SECTORS_NUM16(mbr , total_sectors_num16);
FAT_SET_BR_MEDIA(mbr , fmt_params->media_code);
FAT_SET_BR_SECTORS_PER_TRACK(mbr , 255); /* only needed for INT13... */
FAT_SET_BR_NUMBER_OF_HEADS(mbr , 6); /* only needed for INT13... */
FAT_SET_BR_HIDDEN_SECTORS(mbr , 1); /* only needed for INT13... */
ffc0ebe8: 98 e1 00 24 stb r7,36(r1)
FAT_SET_BR_TOTAL_SECTORS_NUM32(mbr , total_sectors_num32);
ffc0ebec: 9b c1 00 2b stb r30,43(r1)
ffc0ebf0: 81 21 02 18 lwz r9,536(r1)
if (fmt_params->fattype != FAT_FAT32) {
ffc0ebf4: 41 9e 00 74 beq- cr7,ffc0ec68 <msdos_format+0x928>
FAT_SET_BR_SECTORS_PER_FAT(mbr ,fmt_params->sectors_per_fat);
ffc0ebf8: 99 21 00 1e stb r9,30(r1)
ffc0ebfc: 55 29 c2 3e rlwinm r9,r9,24,8,31
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),
fmt_params->VolLabel,
FAT_BR_VOLLAB_SIZE);
memcpy(FAT_GET_ADDR_BR_FILSYSTYPE(mbr),
ffc0ec00: 2f 8a 00 01 cmpwi cr7,r10,1
FAT_SET_BR_NUMBER_OF_HEADS(mbr , 6); /* only needed for INT13... */
FAT_SET_BR_HIDDEN_SECTORS(mbr , 1); /* only needed for INT13... */
FAT_SET_BR_TOTAL_SECTORS_NUM32(mbr , total_sectors_num32);
if (fmt_params->fattype != FAT_FAT32) {
FAT_SET_BR_SECTORS_PER_FAT(mbr ,fmt_params->sectors_per_fat);
ffc0ec04: 99 21 00 1f stb r9,31(r1)
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);
ffc0ec08: 39 20 00 29 li r9,41
FAT_SET_BR_VOLID(mbr , fmt_params->vol_id); /* volume id */
memcpy(FAT_GET_ADDR_BR_VOLLAB(mbr),
fmt_params->VolLabel,
ffc0ec0c: 38 81 02 44 addi r4,r1,580
FAT_SET_BR_TOTAL_SECTORS_NUM32(mbr , total_sectors_num32);
if (fmt_params->fattype != FAT_FAT32) {
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);
ffc0ec10: 99 21 00 2e stb r9,46(r1)
FAT_SET_BR_VOLID(mbr , fmt_params->vol_id); /* volume id */
ffc0ec14: 81 21 02 54 lwz r9,596(r1)
ffc0ec18: 55 28 c6 3e rlwinm r8,r9,24,24,31
ffc0ec1c: 99 21 00 2f stb r9,47(r1)
ffc0ec20: 99 01 00 30 stb r8,48(r1)
ffc0ec24: 55 28 84 3e rlwinm r8,r9,16,16,31
ffc0ec28: 55 29 46 3e rlwinm r9,r9,8,24,31
ffc0ec2c: 99 21 00 32 stb r9,50(r1)
memcpy(FAT_GET_ADDR_BR_VOLLAB(mbr),
ffc0ec30: 39 21 00 33 addi r9,r1,51
if (fmt_params->fattype != FAT_FAT32) {
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 */
ffc0ec34: 99 01 00 31 stb r8,49(r1)
memcpy(FAT_GET_ADDR_BR_VOLLAB(mbr),
ffc0ec38: 7c a4 5c aa lswi r5,r4,11
ffc0ec3c: 7c a9 5d aa stswi r5,r9,11
fmt_params->VolLabel,
FAT_BR_VOLLAB_SIZE);
memcpy(FAT_GET_ADDR_BR_FILSYSTYPE(mbr),
ffc0ec40: 40 be 00 10 bne+ cr7,ffc0ec50 <msdos_format+0x910>
ffc0ec44: 3d 20 ff c3 lis r9,-61
ffc0ec48: 39 29 c5 0f addi r9,r9,-15089
ffc0ec4c: 48 00 00 0c b ffc0ec58 <msdos_format+0x918>
ffc0ec50: 3d 20 ff c3 lis r9,-61
ffc0ec54: 39 29 c5 18 addi r9,r9,-15080
ffc0ec58: 39 41 00 3e addi r10,r1,62
ffc0ec5c: 7c e9 44 aa lswi r7,r9,8
ffc0ec60: 7c ea 45 aa stswi r7,r10,8
ffc0ec64: 48 00 00 74 b ffc0ecd8 <msdos_format+0x998>
? "FAT12 "
: "FAT16 ",
FAT_BR_FILSYSTYPE_SIZE);
}
else {
FAT_SET_BR_SECTORS_PER_FAT32(mbr ,fmt_params->sectors_per_fat);
ffc0ec68: 55 2a c6 3e rlwinm r10,r9,24,24,31
ffc0ec6c: 99 21 00 2c stb r9,44(r1)
ffc0ec70: 99 41 00 2d stb r10,45(r1)
ffc0ec74: 55 2a 84 3e rlwinm r10,r9,16,16,31
ffc0ec78: 55 29 46 3e rlwinm r9,r9,8,24,31
ffc0ec7c: 99 21 00 2f stb r9,47(r1)
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 */
FAT_SET_BR_FAT32_FS_INFO_SECTOR(mbr, 1); /* Put fsinfo to rsrvd sec 1*/
FAT_SET_BR_FAT32_BK_BOOT_SECTOR(mbr, fmt_params->mbr_copy_sec ); /* Put MBR copy to rsrvd sec */
ffc0ec80: 81 21 02 30 lwz r9,560(r1)
? "FAT12 "
: "FAT16 ",
FAT_BR_FILSYSTYPE_SIZE);
}
else {
FAT_SET_BR_SECTORS_PER_FAT32(mbr ,fmt_params->sectors_per_fat);
ffc0ec84: 99 41 00 2e stb r10,46(r1)
FAT_SET_BR_FAT32_BK_BOOT_SECTOR(mbr, fmt_params->mbr_copy_sec ); /* Put MBR copy to rsrvd sec */
memset(FAT_GET_ADDR_BR_FAT32_RESERVED(mbr),0,FAT_BR_FAT32_RESERVED_SIZE);
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);
ffc0ec88: 39 40 00 29 li r10,41
FAT_SET_BR_SECTORS_PER_FAT32(mbr ,fmt_params->sectors_per_fat);
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 */
FAT_SET_BR_FAT32_FS_INFO_SECTOR(mbr, 1); /* Put fsinfo to rsrvd sec 1*/
FAT_SET_BR_FAT32_BK_BOOT_SECTOR(mbr, fmt_params->mbr_copy_sec ); /* Put MBR copy to rsrvd sec */
ffc0ec8c: 99 21 00 3a stb r9,58(r1)
ffc0ec90: 55 29 c2 3e rlwinm r9,r9,24,8,31
ffc0ec94: 99 21 00 3b stb r9,59(r1)
memset(FAT_GET_ADDR_BR_FAT32_RESERVED(mbr),0,FAT_BR_FAT32_RESERVED_SIZE);
ffc0ec98: 39 20 00 00 li r9,0
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);
ffc0ec9c: 99 41 00 4a stb r10,74(r1)
FAT_SET_BR_FAT32_VOLID(mbr , 0); /* not set */
memset(FAT_GET_ADDR_BR_FAT32_VOLLAB(mbr) ,0,FAT_BR_VOLLAB_SIZE);
memcpy(FAT_GET_ADDR_BR_FAT32_FILSYSTYPE(mbr),
ffc0eca0: 3d 40 ff c3 lis r10,-61
ffc0eca4: 39 4a c5 b2 addi r10,r10,-14926
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 */
FAT_SET_BR_FAT32_FS_INFO_SECTOR(mbr, 1); /* Put fsinfo to rsrvd sec 1*/
FAT_SET_BR_FAT32_BK_BOOT_SECTOR(mbr, fmt_params->mbr_copy_sec ); /* Put MBR copy to rsrvd sec */
memset(FAT_GET_ADDR_BR_FAT32_RESERVED(mbr),0,FAT_BR_FAT32_RESERVED_SIZE);
ffc0eca8: 91 21 00 3c stw r9,60(r1)
ffc0ecac: 91 21 00 40 stw r9,64(r1)
ffc0ecb0: 91 21 00 44 stw r9,68(r1)
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);
FAT_SET_BR_FAT32_VOLID(mbr , 0); /* not set */
memset(FAT_GET_ADDR_BR_FAT32_VOLLAB(mbr) ,0,FAT_BR_VOLLAB_SIZE);
ffc0ecb4: 91 21 00 4f stw r9,79(r1)
ffc0ecb8: 91 21 00 53 stw r9,83(r1)
ffc0ecbc: b1 21 00 57 sth r9,87(r1)
memcpy(FAT_GET_ADDR_BR_FAT32_FILSYSTYPE(mbr),
ffc0ecc0: 39 21 00 5a addi r9,r1,90
}
else {
FAT_SET_BR_SECTORS_PER_FAT32(mbr ,fmt_params->sectors_per_fat);
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 */
ffc0ecc4: 98 c1 00 34 stb r6,52(r1)
FAT_SET_BR_FAT32_FS_INFO_SECTOR(mbr, 1); /* Put fsinfo to rsrvd sec 1*/
ffc0ecc8: 98 e1 00 38 stb r7,56(r1)
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);
FAT_SET_BR_FAT32_VOLID(mbr , 0); /* not set */
memset(FAT_GET_ADDR_BR_FAT32_VOLLAB(mbr) ,0,FAT_BR_VOLLAB_SIZE);
ffc0eccc: 99 01 00 59 stb r8,89(r1)
memcpy(FAT_GET_ADDR_BR_FAT32_FILSYSTYPE(mbr),
ffc0ecd0: 7c ca 44 aa lswi r6,r10,8
ffc0ecd4: 7c c9 45 aa stswi r6,r9,8
FAT_BR_FILSYSTYPE_SIZE);
}
/*
* add boot record signature
*/
FAT_SET_BR_SIGNATURE(mbr, FAT_BR_SIGNATURE_VAL);
ffc0ecd8: 39 20 00 55 li r9,85
ffc0ecdc: 99 21 02 06 stb r9,518(r1)
ffc0ece0: 39 20 ff aa li r9,-86
/*
* 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,
ffc0ece4: 3c a0 ff c3 lis r5,-61
FAT_BR_FILSYSTYPE_SIZE);
}
/*
* add boot record signature
*/
FAT_SET_BR_SIGNATURE(mbr, FAT_BR_SIGNATURE_VAL);
ffc0ece8: 99 21 02 07 stb r9,519(r1)
/*
* add jump to boot loader at start of sector
*/
FAT_SET_VAL8(mbr,0,0xeb);
ffc0ecec: 39 20 ff eb li r9,-21
/*
* 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,
ffc0ecf0: 7f e3 fb 78 mr r3,r31
FAT_SET_BR_SIGNATURE(mbr, FAT_BR_SIGNATURE_VAL);
/*
* add jump to boot loader at start of sector
*/
FAT_SET_VAL8(mbr,0,0xeb);
ffc0ecf4: 99 21 00 08 stb r9,8(r1)
FAT_SET_VAL8(mbr,1,0x3c);
ffc0ecf8: 39 20 00 3c li r9,60
/*
* 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,
ffc0ecfc: 38 80 00 02 li r4,2
/*
* add jump to boot loader at start of sector
*/
FAT_SET_VAL8(mbr,0,0xeb);
FAT_SET_VAL8(mbr,1,0x3c);
ffc0ed00: 99 21 00 09 stb r9,9(r1)
/*
* 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,
ffc0ed04: 38 a5 c5 bb addi r5,r5,-14917
/*
* add jump to boot loader at start of sector
*/
FAT_SET_VAL8(mbr,0,0xeb);
FAT_SET_VAL8(mbr,1,0x3c);
FAT_SET_VAL8(mbr,2,0x90);
ffc0ed08: 39 20 ff 90 li r9,-112
ffc0ed0c: 99 21 00 0a stb r9,10(r1)
/*
* 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,
ffc0ed10: 4c c6 31 82 crclr 4*cr1+eq
ffc0ed14: 4b ff f3 5d bl ffc0e070 <msdos_format_printf>
"write MRB sector\n");
ret_val = msdos_format_write_sec(fd,
ffc0ed18: 7f a3 eb 78 mr r3,r29
ffc0ed1c: 80 a1 02 08 lwz r5,520(r1)
ffc0ed20: 38 80 00 00 li r4,0
ffc0ed24: 38 c1 00 08 addi r6,r1,8
ffc0ed28: 4b ff f3 f5 bl ffc0e11c <msdos_format_write_sec>
0,
fmt_params.bytes_per_sector,
tmp_sec);
}
if ((ret_val == 0) &&
ffc0ed2c: 7c 7e 1b 79 mr. r30,r3
ffc0ed30: 40 82 03 ac bne- ffc0f0dc <msdos_format+0xd9c> <== NEVER TAKEN
ffc0ed34: 81 21 02 30 lwz r9,560(r1)
ffc0ed38: 2f 89 00 00 cmpwi cr7,r9,0
ffc0ed3c: 40 9e 00 14 bne- cr7,ffc0ed50 <msdos_format+0xa10>
}
/*
* for FAT32: initialize info sector on disk
*/
if ((ret_val == 0) &&
(fmt_params.fsinfo_sec != 0)) {
ffc0ed40: 83 c1 02 34 lwz r30,564(r1)
}
}
/*
* for FAT32: initialize info sector on disk
*/
if ((ret_val == 0) &&
ffc0ed44: 2f 9e 00 00 cmpwi cr7,r30,0
ffc0ed48: 41 be 00 d0 beq+ cr7,ffc0ee18 <msdos_format+0xad8>
ffc0ed4c: 48 00 00 3c b ffc0ed88 <msdos_format+0xa48>
if ((ret_val == 0) &&
(fmt_params.mbr_copy_sec != 0)) {
/*
* write copy of MBR
*/
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
ffc0ed50: 3c a0 ff c3 lis r5,-61
ffc0ed54: 7f e3 fb 78 mr r3,r31
ffc0ed58: 38 80 00 02 li r4,2
ffc0ed5c: 38 a5 c5 cd addi r5,r5,-14899
ffc0ed60: 4c c6 31 82 crclr 4*cr1+eq
ffc0ed64: 4b ff f3 0d bl ffc0e070 <msdos_format_printf>
"write back up MRB sector\n");
ret_val = msdos_format_write_sec(fd,
ffc0ed68: 80 81 02 30 lwz r4,560(r1)
ffc0ed6c: 80 a1 02 08 lwz r5,520(r1)
ffc0ed70: 7f a3 eb 78 mr r3,r29
ffc0ed74: 38 c1 00 08 addi r6,r1,8
ffc0ed78: 4b ff f3 a5 bl ffc0e11c <msdos_format_write_sec>
}
}
/*
* for FAT32: initialize info sector on disk
*/
if ((ret_val == 0) &&
ffc0ed7c: 7c 7e 1b 79 mr. r30,r3
ffc0ed80: 41 82 ff c0 beq+ ffc0ed40 <msdos_format+0xa00> <== ALWAYS TAKEN
ffc0ed84: 48 00 03 58 b ffc0f0dc <msdos_format+0xd9c> <== NOT EXECUTED
\*=========================================================================*/
{
/*
* clear fsinfo sector data
*/
memset(fsinfo,0,FAT_TOTAL_FSINFO_SIZE);
ffc0ed88: 38 80 00 00 li r4,0
ffc0ed8c: 38 a0 02 00 li r5,512
ffc0ed90: 38 61 00 08 addi r3,r1,8
ffc0ed94: 48 00 e1 29 bl ffc1cebc <memset>
/*
* write LEADSIG, STRUCTSIG, TRAILSIG
*/
FAT_SET_FSINFO_LEAD_SIGNATURE (fsinfo,FAT_FSINFO_LEAD_SIGNATURE_VALUE );
ffc0ed98: 39 20 00 52 li r9,82
ffc0ed9c: 99 21 00 08 stb r9,8(r1)
ffc0eda0: 39 40 00 41 li r10,65
FAT_SET_FSINFO_STRUC_SIGNATURE(fsinfo,FAT_FSINFO_STRUC_SIGNATURE_VALUE);
ffc0eda4: 39 00 00 72 li r8,114
*/
memset(fsinfo,0,FAT_TOTAL_FSINFO_SIZE);
/*
* write LEADSIG, STRUCTSIG, TRAILSIG
*/
FAT_SET_FSINFO_LEAD_SIGNATURE (fsinfo,FAT_FSINFO_LEAD_SIGNATURE_VALUE );
ffc0eda8: 99 21 00 09 stb r9,9(r1)
ffc0edac: 39 20 00 61 li r9,97
/*
* write fsinfo sector
*/
if ((ret_val == 0) &&
(fmt_params.fsinfo_sec != 0)) {
ret_val = msdos_format_write_sec(fd,
ffc0edb0: 7f c4 f3 78 mr r4,r30
*/
memset(fsinfo,0,FAT_TOTAL_FSINFO_SIZE);
/*
* write LEADSIG, STRUCTSIG, TRAILSIG
*/
FAT_SET_FSINFO_LEAD_SIGNATURE (fsinfo,FAT_FSINFO_LEAD_SIGNATURE_VALUE );
ffc0edb4: 99 21 00 0a stb r9,10(r1)
/*
* write fsinfo sector
*/
if ((ret_val == 0) &&
(fmt_params.fsinfo_sec != 0)) {
ret_val = msdos_format_write_sec(fd,
ffc0edb8: 7f a3 eb 78 mr r3,r29
ffc0edbc: 38 c1 00 08 addi r6,r1,8
memset(fsinfo,0,FAT_TOTAL_FSINFO_SIZE);
/*
* write LEADSIG, STRUCTSIG, TRAILSIG
*/
FAT_SET_FSINFO_LEAD_SIGNATURE (fsinfo,FAT_FSINFO_LEAD_SIGNATURE_VALUE );
FAT_SET_FSINFO_STRUC_SIGNATURE(fsinfo,FAT_FSINFO_STRUC_SIGNATURE_VALUE);
ffc0edc0: 99 21 01 ef stb r9,495(r1)
FAT_SET_FSINFO_TRAIL_SIGNATURE(fsinfo,FAT_FSINFO_TRAIL_SIGNATURE_VALUE);
ffc0edc4: 39 20 00 55 li r9,85
ffc0edc8: 99 21 02 06 stb r9,518(r1)
ffc0edcc: 39 20 ff aa li r9,-86
/*
* write fsinfo sector
*/
if ((ret_val == 0) &&
(fmt_params.fsinfo_sec != 0)) {
ret_val = msdos_format_write_sec(fd,
ffc0edd0: 80 a1 02 08 lwz r5,520(r1)
/*
* write LEADSIG, STRUCTSIG, TRAILSIG
*/
FAT_SET_FSINFO_LEAD_SIGNATURE (fsinfo,FAT_FSINFO_LEAD_SIGNATURE_VALUE );
FAT_SET_FSINFO_STRUC_SIGNATURE(fsinfo,FAT_FSINFO_STRUC_SIGNATURE_VALUE);
FAT_SET_FSINFO_TRAIL_SIGNATURE(fsinfo,FAT_FSINFO_TRAIL_SIGNATURE_VALUE);
ffc0edd4: 99 21 02 07 stb r9,519(r1)
/*
* write "empty" values for free cluster count and next cluster number
*/
FAT_SET_FSINFO_FREE_CLUSTER_COUNT(fsinfo+FAT_FSI_INFO,
ffc0edd8: 39 20 ff ff li r9,-1
*/
memset(fsinfo,0,FAT_TOTAL_FSINFO_SIZE);
/*
* write LEADSIG, STRUCTSIG, TRAILSIG
*/
FAT_SET_FSINFO_LEAD_SIGNATURE (fsinfo,FAT_FSINFO_LEAD_SIGNATURE_VALUE );
ffc0eddc: 99 41 00 0b stb r10,11(r1)
FAT_SET_FSINFO_STRUC_SIGNATURE(fsinfo,FAT_FSINFO_STRUC_SIGNATURE_VALUE);
ffc0ede0: 99 01 01 ec stb r8,492(r1)
ffc0ede4: 99 01 01 ed stb r8,493(r1)
ffc0ede8: 99 41 01 ee stb r10,494(r1)
FAT_SET_FSINFO_TRAIL_SIGNATURE(fsinfo,FAT_FSINFO_TRAIL_SIGNATURE_VALUE);
/*
* write "empty" values for free cluster count and next cluster number
*/
FAT_SET_FSINFO_FREE_CLUSTER_COUNT(fsinfo+FAT_FSI_INFO,
ffc0edec: 99 21 01 f0 stb r9,496(r1)
ffc0edf0: 99 21 01 f1 stb r9,497(r1)
ffc0edf4: 99 21 01 f2 stb r9,498(r1)
ffc0edf8: 99 21 01 f3 stb r9,499(r1)
0xffffffff);
FAT_SET_FSINFO_NEXT_FREE_CLUSTER (fsinfo+FAT_FSI_INFO,
ffc0edfc: 99 21 01 f4 stb r9,500(r1)
ffc0ee00: 99 21 01 f5 stb r9,501(r1)
ffc0ee04: 99 21 01 f6 stb r9,502(r1)
ffc0ee08: 99 21 01 f7 stb r9,503(r1)
/*
* write fsinfo sector
*/
if ((ret_val == 0) &&
(fmt_params.fsinfo_sec != 0)) {
ret_val = msdos_format_write_sec(fd,
ffc0ee0c: 4b ff f3 11 bl ffc0e11c <msdos_format_write_sec>
}
/*
* write FAT as all empty
* -> write all FAT sectors as zero
*/
if (ret_val == 0) {
ffc0ee10: 7c 7e 1b 79 mr. r30,r3
ffc0ee14: 40 a2 02 c8 bne+ ffc0f0dc <msdos_format+0xd9c> <== NEVER TAKEN
ret_val = msdos_format_fill_sectors
(rqdata,
ffc0ee18: 88 c1 02 38 lbz r6,568(r1)
/*
* write FAT as all empty
* -> write all FAT sectors as zero
*/
if (ret_val == 0) {
ret_val = msdos_format_fill_sectors
ffc0ee1c: 7f e3 fb 78 mr r3,r31
ffc0ee20: 81 21 02 18 lwz r9,536(r1)
ffc0ee24: 7f a4 eb 78 mr r4,r29
ffc0ee28: 80 a1 02 10 lwz r5,528(r1)
ffc0ee2c: 39 00 00 00 li r8,0
ffc0ee30: 7c c6 49 d6 mullw r6,r6,r9
ffc0ee34: 80 e1 02 08 lwz r7,520(r1)
ffc0ee38: 4b ff f3 3d bl ffc0e174 <msdos_format_fill_sectors>
}
/*
* clear/init root directory
* -> write all directory sectors as 0x00
*/
if (ret_val == 0) {
ffc0ee3c: 7c 7e 1b 79 mr. r30,r3
ffc0ee40: 40 82 02 9c bne- ffc0f0dc <msdos_format+0xd9c> <== NEVER TAKEN
ret_val = msdos_format_fill_sectors
ffc0ee44: 80 a1 02 28 lwz r5,552(r1)
ffc0ee48: 7f e3 fb 78 mr r3,r31
ffc0ee4c: 80 c1 02 2c lwz r6,556(r1)
ffc0ee50: 7f a4 eb 78 mr r4,r29
ffc0ee54: 80 e1 02 08 lwz r7,520(r1)
ffc0ee58: 39 00 00 00 li r8,0
ffc0ee5c: 4b ff f3 19 bl ffc0e174 <msdos_format_fill_sectors>
0x00);
}
/*
* write volume label to first entry of directory
*/
if ((ret_val == 0) && fmt_params.VolLabel_present) {
ffc0ee60: 7c 7e 1b 79 mr. r30,r3
ffc0ee64: 40 82 02 78 bne- ffc0f0dc <msdos_format+0xd9c> <== NEVER TAKEN
ffc0ee68: 89 21 02 50 lbz r9,592(r1)
ffc0ee6c: 2f 89 00 00 cmpwi cr7,r9,0
ffc0ee70: 40 9e 00 34 bne- cr7,ffc0eea4 <msdos_format+0xb64>
uint32_t start_sector;
/*
* empty sector: all clusters are free/do not link further on
*/
memset(tmp_sec,0,sizeof(tmp_sec));
ffc0ee74: 38 61 00 08 addi r3,r1,8
ffc0ee78: 38 80 00 00 li r4,0
ffc0ee7c: 38 a0 02 00 li r5,512
ffc0ee80: 48 00 e0 3d bl ffc1cebc <memset>
switch(fmt_params.fattype) {
ffc0ee84: 89 21 02 3a lbz r9,570(r1)
ffc0ee88: 2f 89 00 02 cmpwi cr7,r9,2
ffc0ee8c: 41 9e 00 7c beq- cr7,ffc0ef08 <msdos_format+0xbc8>
ffc0ee90: 2f 89 00 04 cmpwi cr7,r9,4
ffc0ee94: 41 9e 00 94 beq- cr7,ffc0ef28 <msdos_format+0xbe8>
ffc0ee98: 2f 89 00 01 cmpwi cr7,r9,1
ffc0ee9c: 40 be 00 c0 bne+ cr7,ffc0ef5c <msdos_format+0xc1c> <== NEVER TAKEN
ffc0eea0: 48 00 00 4c b ffc0eeec <msdos_format+0xbac>
}
/*
* write volume label to first entry of directory
*/
if ((ret_val == 0) && fmt_params.VolLabel_present) {
memset(tmp_sec,0,sizeof(tmp_sec));
ffc0eea4: 3b 81 00 08 addi r28,r1,8
ffc0eea8: 38 a0 02 00 li r5,512
ffc0eeac: 38 80 00 00 li r4,0
ffc0eeb0: 7f 83 e3 78 mr r3,r28
ffc0eeb4: 48 00 e0 09 bl ffc1cebc <memset>
memcpy(MSDOS_DIR_NAME(tmp_sec),fmt_params.VolLabel,MSDOS_SHORT_NAME_LEN);
ffc0eeb8: 39 21 02 44 addi r9,r1,580
ffc0eebc: 7c a9 5c aa lswi r5,r9,11
ffc0eec0: 7c bc 5d aa stswi r5,r28,11
*MSDOS_DIR_ATTR(tmp_sec) = MSDOS_ATTR_VOLUME_ID;
ret_val = msdos_format_write_sec
ffc0eec4: 7f a3 eb 78 mr r3,r29
* write volume label to first entry of directory
*/
if ((ret_val == 0) && fmt_params.VolLabel_present) {
memset(tmp_sec,0,sizeof(tmp_sec));
memcpy(MSDOS_DIR_NAME(tmp_sec),fmt_params.VolLabel,MSDOS_SHORT_NAME_LEN);
*MSDOS_DIR_ATTR(tmp_sec) = MSDOS_ATTR_VOLUME_ID;
ffc0eec8: 39 20 00 08 li r9,8
ret_val = msdos_format_write_sec
ffc0eecc: 80 81 02 28 lwz r4,552(r1)
ffc0eed0: 7f 86 e3 78 mr r6,r28
ffc0eed4: 80 a1 02 08 lwz r5,520(r1)
* write volume label to first entry of directory
*/
if ((ret_val == 0) && fmt_params.VolLabel_present) {
memset(tmp_sec,0,sizeof(tmp_sec));
memcpy(MSDOS_DIR_NAME(tmp_sec),fmt_params.VolLabel,MSDOS_SHORT_NAME_LEN);
*MSDOS_DIR_ATTR(tmp_sec) = MSDOS_ATTR_VOLUME_ID;
ffc0eed8: 99 21 00 13 stb r9,19(r1)
ret_val = msdos_format_write_sec
ffc0eedc: 4b ff f2 41 bl ffc0e11c <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) {
ffc0eee0: 2c 03 00 00 cmpwi r3,0
ffc0eee4: 40 a2 01 48 bne+ ffc0f02c <msdos_format+0xcec> <== NEVER TAKEN
ffc0eee8: 4b ff ff 8c b ffc0ee74 <msdos_format+0xb34>
memset(tmp_sec,0,sizeof(tmp_sec));
switch(fmt_params.fattype) {
case FAT_FAT12:
/* LSBits of FAT entry 0: media_type */
FAT_SET_VAL8(tmp_sec,0,(fmt_params.media_code));
ffc0eeec: 89 21 02 39 lbz r9,569(r1)
ffc0eef0: 99 21 00 08 stb r9,8(r1)
/* 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)));
ffc0eef4: 39 20 ff 8f li r9,-113
ffc0eef8: 99 21 00 09 stb r9,9(r1)
/* MSBits of FAT entry 1: MSBits of EOC */
FAT_SET_VAL8(tmp_sec,2,(FAT_FAT12_EOC >> 4));
ffc0eefc: 39 20 ff ff li r9,-1
ffc0ef00: 99 21 00 0a stb r9,10(r1)
break;
ffc0ef04: 48 00 00 68 b ffc0ef6c <msdos_format+0xc2c>
case FAT_FAT16:
/* FAT entry 0: 0xff00|media_type */
FAT_SET_VAL8(tmp_sec,0,fmt_params.media_code);
ffc0ef08: 89 21 02 39 lbz r9,569(r1)
FAT_SET_VAL8(tmp_sec,1,0xff);
/* FAT entry 1: EOC */
FAT_SET_VAL16(tmp_sec,2,FAT_FAT16_EOC);
ffc0ef0c: 39 40 ff f8 li r10,-8
ffc0ef10: 99 41 00 0a stb r10,10(r1)
FAT_SET_VAL8(tmp_sec,2,(FAT_FAT12_EOC >> 4));
break;
case FAT_FAT16:
/* FAT entry 0: 0xff00|media_type */
FAT_SET_VAL8(tmp_sec,0,fmt_params.media_code);
ffc0ef14: 99 21 00 08 stb r9,8(r1)
FAT_SET_VAL8(tmp_sec,1,0xff);
ffc0ef18: 39 20 ff ff li r9,-1
ffc0ef1c: 99 21 00 09 stb r9,9(r1)
/* FAT entry 1: EOC */
FAT_SET_VAL16(tmp_sec,2,FAT_FAT16_EOC);
ffc0ef20: 99 21 00 0b stb r9,11(r1)
break;
ffc0ef24: 48 00 00 48 b ffc0ef6c <msdos_format+0xc2c>
case FAT_FAT32:
/* FAT entry 0: 0xffffff00|media_type */
FAT_SET_VAL32(tmp_sec,0,0xffffff00|fmt_params.media_code);
ffc0ef28: 89 21 02 39 lbz r9,569(r1)
/* FAT entry 1: EOC */
FAT_SET_VAL32(tmp_sec,4,FAT_FAT32_EOC);
ffc0ef2c: 39 40 ff f8 li r10,-8
ffc0ef30: 99 41 00 0c stb r10,12(r1)
FAT_SET_VAL16(tmp_sec,2,FAT_FAT16_EOC);
break;
case FAT_FAT32:
/* FAT entry 0: 0xffffff00|media_type */
FAT_SET_VAL32(tmp_sec,0,0xffffff00|fmt_params.media_code);
ffc0ef34: 99 21 00 08 stb r9,8(r1)
ffc0ef38: 39 20 ff ff li r9,-1
ffc0ef3c: 99 21 00 09 stb r9,9(r1)
ffc0ef40: 99 21 00 0a stb r9,10(r1)
ffc0ef44: 99 21 00 0b stb r9,11(r1)
/* FAT entry 1: EOC */
FAT_SET_VAL32(tmp_sec,4,FAT_FAT32_EOC);
ffc0ef48: 99 21 00 0d stb r9,13(r1)
ffc0ef4c: 99 21 00 0e stb r9,14(r1)
ffc0ef50: 39 20 00 0f li r9,15
ffc0ef54: 99 21 00 0f stb r9,15(r1)
break;
ffc0ef58: 48 00 00 14 b ffc0ef6c <msdos_format+0xc2c>
default:
ret_val = -1;
errno = EINVAL;
ffc0ef5c: 48 00 d1 8d bl ffc1c0e8 <__errno> <== NOT EXECUTED
ffc0ef60: 39 20 00 16 li r9,22 <== NOT EXECUTED
ffc0ef64: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED
/* FAT entry 1: EOC */
FAT_SET_VAL32(tmp_sec,4,FAT_FAT32_EOC);
break;
default:
ret_val = -1;
ffc0ef68: 3b c0 ff ff li r30,-1 <== NOT EXECUTED
errno = EINVAL;
}
if (fmt_params.fattype == FAT_FAT32) {
ffc0ef6c: 89 21 02 3a lbz r9,570(r1)
ffc0ef70: 2f 89 00 04 cmpwi cr7,r9,4
ffc0ef74: 40 be 00 20 bne+ cr7,ffc0ef94 <msdos_format+0xc54>
/*
* 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);
ffc0ef78: 39 20 ff f8 li r9,-8
ffc0ef7c: 99 21 00 10 stb r9,16(r1)
ffc0ef80: 39 20 ff ff li r9,-1
ffc0ef84: 99 21 00 11 stb r9,17(r1)
ffc0ef88: 99 21 00 12 stb r9,18(r1)
ffc0ef8c: 39 20 00 0f li r9,15
ffc0ef90: 99 21 00 13 stb r9,19(r1)
static uint32_t
loc_align_object (const uint32_t sectors,
const uint32_t clustersize,
const bool skip_alignment)
{
if (! skip_alignment)
ffc0ef94: 89 41 02 58 lbz r10,600(r1)
* mark this in every copy of the FAT
*/
FAT_SET_VAL32(tmp_sec,8,FAT_FAT32_EOC);
}
start_sector = loc_align_object (fmt_params.rsvd_sector_cnt,
ffc0ef98: 83 81 02 10 lwz r28,528(r1)
static uint32_t
loc_align_object (const uint32_t sectors,
const uint32_t clustersize,
const bool skip_alignment)
{
if (! skip_alignment)
ffc0ef9c: 2f 8a 00 00 cmpwi cr7,r10,0
* mark this in every copy of the FAT
*/
FAT_SET_VAL32(tmp_sec,8,FAT_FAT32_EOC);
}
start_sector = loc_align_object (fmt_params.rsvd_sector_cnt,
ffc0efa0: 81 21 02 14 lwz r9,532(r1)
static uint32_t
loc_align_object (const uint32_t sectors,
const uint32_t clustersize,
const bool skip_alignment)
{
if (! skip_alignment)
ffc0efa4: 40 9e 00 14 bne- cr7,ffc0efb8 <msdos_format+0xc78>
return (sectors + clustersize - 1) & ~(clustersize - 1);
ffc0efa8: 7f 9c 4a 14 add r28,r28,r9
ffc0efac: 3b 9c ff ff addi r28,r28,-1
ffc0efb0: 7d 29 00 d0 neg r9,r9
ffc0efb4: 7f 9c 48 38 and r28,r28,r9
}
start_sector = loc_align_object (fmt_params.rsvd_sector_cnt,
fmt_params.sectors_per_cluster,
fmt_params.skip_alignment);
for (i = 0;
ffc0efb8: 7f c3 f3 78 mr r3,r30
ffc0efbc: 3b c0 00 00 li r30,0
ffc0efc0: 48 00 00 24 b ffc0efe4 <msdos_format+0xca4>
(i < fmt_params.fat_num) && (ret_val == 0);
i++) {
ret_val = msdos_format_write_sec
(fd,
start_sector
+ (i * fmt_params.sectors_per_fat),
ffc0efc4: 80 81 02 18 lwz r4,536(r1)
fmt_params.sectors_per_cluster,
fmt_params.skip_alignment);
for (i = 0;
(i < fmt_params.fat_num) && (ret_val == 0);
i++) {
ret_val = msdos_format_write_sec
ffc0efc8: 7f a3 eb 78 mr r3,r29
ffc0efcc: 80 a1 02 08 lwz r5,520(r1)
ffc0efd0: 38 c1 00 08 addi r6,r1,8
(fd,
start_sector
+ (i * fmt_params.sectors_per_fat),
ffc0efd4: 7c 9e 21 d6 mullw r4,r30,r4
start_sector = loc_align_object (fmt_params.rsvd_sector_cnt,
fmt_params.sectors_per_cluster,
fmt_params.skip_alignment);
for (i = 0;
(i < fmt_params.fat_num) && (ret_val == 0);
i++) {
ffc0efd8: 3b de 00 01 addi r30,r30,1
ret_val = msdos_format_write_sec
ffc0efdc: 7c 84 e2 14 add r4,r4,r28
ffc0efe0: 4b ff f1 3d bl ffc0e11c <msdos_format_write_sec>
start_sector = loc_align_object (fmt_params.rsvd_sector_cnt,
fmt_params.sectors_per_cluster,
fmt_params.skip_alignment);
for (i = 0;
(i < fmt_params.fat_num) && (ret_val == 0);
ffc0efe4: 89 21 02 38 lbz r9,568(r1)
ffc0efe8: 2f 83 00 00 cmpwi cr7,r3,0
}
start_sector = loc_align_object (fmt_params.rsvd_sector_cnt,
fmt_params.sectors_per_cluster,
fmt_params.skip_alignment);
for (i = 0;
ffc0efec: 7f 1e 48 00 cmpw cr6,r30,r9
ffc0eff0: 40 98 00 0c bge- cr6,ffc0effc <msdos_format+0xcbc>
(i < fmt_params.fat_num) && (ret_val == 0);
ffc0eff4: 41 9e ff d0 beq+ cr7,ffc0efc4 <msdos_format+0xc84> <== ALWAYS TAKEN
ffc0eff8: 48 00 00 34 b ffc0f02c <msdos_format+0xcec> <== NOT EXECUTED
}
start_sector = loc_align_object (fmt_params.rsvd_sector_cnt,
fmt_params.sectors_per_cluster,
fmt_params.skip_alignment);
for (i = 0;
ffc0effc: 7c 7e 1b 78 mr r30,r3
fmt_params.bytes_per_sector,
tmp_sec);
}
}
if (ret_val == 0 && rqdata != NULL && rqdata->sync_device) {
ffc0f000: 40 9e 00 30 bne- cr7,ffc0f030 <msdos_format+0xcf0> <== NEVER TAKEN
ffc0f004: 2f 9f 00 00 cmpwi cr7,r31,0
ffc0f008: 41 9e 00 28 beq- cr7,ffc0f030 <msdos_format+0xcf0>
ffc0f00c: 89 3f 00 17 lbz r9,23(r31)
ffc0f010: 2f 89 00 00 cmpwi cr7,r9,0
ffc0f014: 41 be 00 1c beq+ cr7,ffc0f030 <msdos_format+0xcf0>
return ioctl(fd, RTEMS_BLKIO_GETDISKDEV, dd_ptr);
}
static inline int rtems_disk_fd_sync(int fd)
{
return ioctl(fd, RTEMS_BLKIO_SYNCDEV);
ffc0f018: 3c 80 20 00 lis r4,8192
ffc0f01c: 7f a3 eb 78 mr r3,r29
ffc0f020: 60 84 42 06 ori r4,r4,16902
ffc0f024: 4c c6 31 82 crclr 4*cr1+eq
ffc0f028: 48 00 66 59 bl ffc15680 <ioctl>
ffc0f02c: 7c 7e 1b 78 mr r30,r3
/*
* cleanup:
* sync and unlock disk
* free any data structures (not needed now)
*/
if (fd != -1) {
ffc0f030: 2f 9d ff ff cmpwi cr7,r29,-1
ffc0f034: 41 9e 00 e4 beq- cr7,ffc0f118 <msdos_format+0xdd8> <== NEVER TAKEN
close(fd);
ffc0f038: 7f a3 eb 78 mr r3,r29
ffc0f03c: 4b ff 6c 19 bl ffc05c54 <close>
ffc0f040: 48 00 00 d8 b ffc0f118 <msdos_format+0xdd8>
uint64_t total_size = 0;
uint32_t data_clusters_cnt;
uint8_t iteration_cnt = 0;
uint8_t fat_type = UINT8_MAX;
memset(fmt_params,0,sizeof(*fmt_params));
ffc0f044: 38 80 00 00 li r4,0
ffc0f048: 38 a0 00 54 li r5,84
ffc0f04c: 38 61 02 08 addi r3,r1,520
ffc0f050: 48 00 de 6d bl ffc1cebc <memset>
static inline int rtems_disk_fd_get_media_block_size(
int fd,
uint32_t *media_block_size
)
{
return ioctl(fd, RTEMS_BLKIO_GETMEDIABLKSIZE, media_block_size);
ffc0f054: 3c 80 40 04 lis r4,16388
ffc0f058: 7f a3 eb 78 mr r3,r29
ffc0f05c: 60 84 42 02 ori r4,r4,16898
ffc0f060: 38 a1 02 08 addi r5,r1,520
ffc0f064: 4c c6 31 82 crclr 4*cr1+eq
ffc0f068: 48 00 66 19 bl ffc15680 <ioctl>
* At least one thing we don't have to magically guess...
*/
if (ret_val == 0) {
ret_val = rtems_disk_fd_get_media_block_size(fd, &fmt_params->bytes_per_sector);
}
if (ret_val == 0) {
ffc0f06c: 7c 7e 1b 79 mr. r30,r3
ffc0f070: 40 82 f8 14 bne+ ffc0e884 <msdos_format+0x544> <== NEVER TAKEN
ffc0f074: 4b ff f3 a0 b ffc0e414 <msdos_format+0xd4>
ret_val = -1;
}
}
if (ret_val == 0)
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
ffc0f078: 3c a0 ff c3 lis r5,-61
ffc0f07c: 88 c1 02 38 lbz r6,568(r1)
ffc0f080: 7f e3 fb 78 mr r3,r31
ffc0f084: 38 80 00 02 li r4,2
ffc0f088: 38 a5 c5 e7 addi r5,r5,-14873
ffc0f08c: 4c c6 31 82 crclr 4*cr1+eq
ffc0f090: 4b ff ef e1 bl ffc0e070 <msdos_format_printf>
* 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) {
ffc0f094: 2f 9f 00 00 cmpwi cr7,r31,0
ffc0f098: 40 9e f4 08 bne+ cr7,ffc0e4a0 <msdos_format+0x160>
ffc0f09c: 4b ff f4 14 b ffc0e4b0 <msdos_format+0x170>
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) &&
ffc0f0a0: 2f 9f 00 00 cmpwi cr7,r31,0
ffc0f0a4: 40 9e f9 7c bne+ cr7,ffc0ea20 <msdos_format+0x6e0>
ffc0f0a8: 4b ff f9 90 b ffc0ea38 <msdos_format+0x6f8>
{
int ret_val = 0;
int rc;
struct timeval time_value;
rc = rtems_clock_get_tod_timeval(&time_value);
ffc0f0ac: 38 61 00 08 addi r3,r1,8
ffc0f0b0: 48 00 76 05 bl ffc166b4 <rtems_clock_get_tod_timeval>
if (rc == RTEMS_SUCCESSFUL) {
ffc0f0b4: 2f 83 00 00 cmpwi cr7,r3,0
ffc0f0b8: 41 9e f9 e8 beq+ cr7,ffc0eaa0 <msdos_format+0x760> <== NEVER TAKEN
ffc0f0bc: 4b ff f9 f4 b ffc0eab0 <msdos_format+0x770>
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)) {
ffc0f0c0: 7f a3 eb 78 mr r3,r29
ffc0f0c4: 38 81 00 08 addi r4,r1,8
ffc0f0c8: 7f c5 f3 78 mr r5,r30
ffc0f0cc: 48 00 69 71 bl ffc15a3c <read>
ffc0f0d0: 2f 83 00 00 cmpwi cr7,r3,0
ffc0f0d4: 40 bc 00 10 bge+ cr7,ffc0f0e4 <msdos_format+0xda4> <== ALWAYS TAKEN
ffc0f0d8: 48 00 00 38 b ffc0f110 <msdos_format+0xdd0> <== NOT EXECUTED
}
}
if ( fmt_params->totl_sector_cnt == 0 )
{
errno = EINVAL;
ret_val = -1;
ffc0f0dc: 7f c3 f3 78 mr r3,r30
ffc0f0e0: 4b ff ff 4c b ffc0f02c <msdos_format+0xcec>
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,
ffc0f0e4: 3c a0 ff c3 lis r5,-61
ffc0f0e8: 7f e3 fb 78 mr r3,r31
ffc0f0ec: 38 80 00 02 li r4,2
ffc0f0f0: 38 a5 c5 fb addi r5,r5,-14853
ffc0f0f4: 4c c6 31 82 crclr 4*cr1+eq
ffc0f0f8: 4b ff ef 79 bl ffc0e070 <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) {
ffc0f0fc: 83 c1 02 0c lwz r30,524(r1)
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
uint32_t total_sectors_num16 = 0;
ffc0f100: 3b 80 00 00 li r28,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) {
ffc0f104: 2b 9e ff ff cmplwi cr7,r30,65535
ffc0f108: 41 bd fa 30 bgt- cr7,ffc0eb38 <msdos_format+0x7f8>
ffc0f10c: 4b ff fa 24 b ffc0eb30 <msdos_format+0x7f0>
}
}
if ( fmt_params->totl_sector_cnt == 0 )
{
errno = EINVAL;
ret_val = -1;
ffc0f110: 3b c0 ff ff li r30,-1 <== NOT EXECUTED
ffc0f114: 4b ff ff c8 b ffc0f0dc <msdos_format+0xd9c> <== NOT EXECUTED
if (fd != -1) {
close(fd);
}
return ret_val;
}
ffc0f118: 81 81 02 ac lwz r12,684(r1)
ffc0f11c: 39 61 02 f8 addi r11,r1,760
ffc0f120: 7f c3 f3 78 mr r3,r30
ffc0f124: 7d 80 81 20 mtcrf 8,r12
ffc0f128: 4b ff 24 90 b ffc015b8 <_restgpr_14_x>
ffc0e174 <msdos_format_fill_sectors>:
)
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
ffc0e174: 94 21 ff c8 stwu r1,-56(r1)
ffc0e178: 7c 08 02 a6 mflr r0
ffc0e17c: be a1 00 0c stmw r21,12(r1)
ffc0e180: 7c 7d 1b 78 mr r29,r3
/*
* allocate and fill buffer
*/
if (ret_val == 0) {
fill_buffer = malloc(sector_size);
ffc0e184: 7c e3 3b 78 mr r3,r7
)
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
ffc0e188: 90 01 00 3c stw r0,60(r1)
ffc0e18c: 7c 96 23 78 mr r22,r4
ffc0e190: 7c bf 2b 78 mr r31,r5
ffc0e194: 7c db 33 78 mr r27,r6
ffc0e198: 7c fa 3b 78 mr r26,r7
ffc0e19c: 7d 1e 43 78 mr r30,r8
/*
* allocate and fill buffer
*/
if (ret_val == 0) {
fill_buffer = malloc(sector_size);
ffc0e1a0: 4b ff 80 ed bl ffc0628c <malloc>
if (fill_buffer == NULL) {
ffc0e1a4: 7c 7c 1b 79 mr. r28,r3
ffc0e1a8: 40 a2 00 18 bne+ ffc0e1c0 <msdos_format_fill_sectors+0x4c><== ALWAYS TAKEN
errno = ENOMEM;
ffc0e1ac: 48 00 df 3d bl ffc1c0e8 <__errno> <== NOT EXECUTED
ffc0e1b0: 39 20 00 0c li r9,12 <== NOT EXECUTED
ffc0e1b4: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED
ret_val = -1;
ffc0e1b8: 3b c0 ff ff li r30,-1 <== NOT EXECUTED
ffc0e1bc: 48 00 00 14 b ffc0e1d0 <msdos_format_fill_sectors+0x5c><== NOT EXECUTED
}
else {
memset(fill_buffer,fill_byte,sector_size);
ffc0e1c0: 7f c4 f3 78 mr r4,r30
ffc0e1c4: 7f 45 d3 78 mr r5,r26
ffc0e1c8: 48 00 ec f5 bl ffc1cebc <memset>
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
int ret_val = 0;
ffc0e1cc: 3b c0 00 00 li r30,0
else {
memset(fill_buffer,fill_byte,sector_size);
}
}
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
ffc0e1d0: 3c a0 ff c3 lis r5,-61
ffc0e1d4: 7f a3 eb 78 mr r3,r29
ffc0e1d8: 38 80 00 02 li r4,2
ffc0e1dc: 38 a5 c4 e1 addi r5,r5,-15135
while ((ret_val == 0) &&
(sector_cnt > 0)) {
int percent = (sector_cnt * 100) / total_sectors;
if (percent != last_percent) {
if ((percent & 1) == 0)
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL, ".");
ffc0e1e0: 3e a0 ff c3 lis r21,-61
else {
memset(fill_buffer,fill_byte,sector_size);
}
}
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
ffc0e1e4: 4c c6 31 82 crclr 4*cr1+eq
ffc0e1e8: 4b ff fe 89 bl ffc0e070 <msdos_format_printf>
ffc0e1ec: 1f 3b 00 64 mulli r25,r27,100
}
/*=========================================================================* \
| Function: |
\*-------------------------------------------------------------------------*/
static int msdos_format_fill_sectors
ffc0e1f0: 7e fb fa 14 add r23,r27,r31
\*=========================================================================*/
{
int ret_val = 0;
char *fill_buffer = NULL;
uint32_t total_sectors = sector_cnt;
int last_percent = -1;
ffc0e1f4: 3b 00 ff ff li r24,-1
while ((ret_val == 0) &&
(sector_cnt > 0)) {
int percent = (sector_cnt * 100) / total_sectors;
if (percent != last_percent) {
if ((percent & 1) == 0)
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL, ".");
ffc0e1f8: 3a b5 c9 31 addi r21,r21,-14031
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
"Filling : ");
/*
* write to consecutive sectors
*/
while ((ret_val == 0) &&
ffc0e1fc: 48 00 00 50 b ffc0e24c <msdos_format_fill_sectors+0xd8>
(sector_cnt > 0)) {
int percent = (sector_cnt * 100) / total_sectors;
ffc0e200: 7d 39 db 96 divwu r9,r25,r27
if (percent != last_percent) {
ffc0e204: 7f 89 c0 00 cmpw cr7,r9,r24
ffc0e208: 41 9e 00 24 beq- cr7,ffc0e22c <msdos_format_fill_sectors+0xb8>
if ((percent & 1) == 0)
ffc0e20c: 7d 38 4b 78 mr r24,r9
ffc0e210: 73 09 00 01 andi. r9,r24,1
ffc0e214: 40 a2 00 18 bne+ ffc0e22c <msdos_format_fill_sectors+0xb8>
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL, ".");
ffc0e218: 7f a3 eb 78 mr r3,r29
ffc0e21c: 38 80 00 02 li r4,2
ffc0e220: 7e a5 ab 78 mr r5,r21
ffc0e224: 4c c6 31 82 crclr 4*cr1+eq
ffc0e228: 4b ff fe 49 bl ffc0e070 <msdos_format_printf>
last_percent = percent;
}
ret_val = msdos_format_write_sec(fd,start_sector,sector_size,fill_buffer);
ffc0e22c: 7f e4 fb 78 mr r4,r31
ffc0e230: 7e c3 b3 78 mr r3,r22
ffc0e234: 7f 45 d3 78 mr r5,r26
ffc0e238: 7f 86 e3 78 mr r6,r28
ffc0e23c: 4b ff fe e1 bl ffc0e11c <msdos_format_write_sec>
start_sector++;
ffc0e240: 3b ff 00 01 addi r31,r31,1
if (percent != last_percent) {
if ((percent & 1) == 0)
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL, ".");
last_percent = percent;
}
ret_val = msdos_format_write_sec(fd,start_sector,sector_size,fill_buffer);
ffc0e244: 7c 7e 1b 78 mr r30,r3
ffc0e248: 3b 39 ff 9c addi r25,r25,-100
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
"Filling : ");
/*
* write to consecutive sectors
*/
while ((ret_val == 0) &&
ffc0e24c: 2f 9e 00 00 cmpwi cr7,r30,0
ffc0e250: 40 9e 00 0c bne- cr7,ffc0e25c <msdos_format_fill_sectors+0xe8><== NEVER TAKEN
ffc0e254: 7f 9f b8 00 cmpw cr7,r31,r23
ffc0e258: 40 9e ff a8 bne+ cr7,ffc0e200 <msdos_format_fill_sectors+0x8c>
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");
ffc0e25c: 3c a0 ff c3 lis r5,-61
ffc0e260: 7f a3 eb 78 mr r3,r29
ffc0e264: 38 80 00 02 li r4,2
ffc0e268: 38 a5 c2 ff addi r5,r5,-15617
ffc0e26c: 4c c6 31 82 crclr 4*cr1+eq
ffc0e270: 4b ff fe 01 bl ffc0e070 <msdos_format_printf>
if (ret_val)
ffc0e274: 2f 9e 00 00 cmpwi cr7,r30,0
ffc0e278: 41 be 00 20 beq+ cr7,ffc0e298 <msdos_format_fill_sectors+0x124><== ALWAYS TAKEN
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_INFO,
ffc0e27c: 3c a0 ff c3 lis r5,-61 <== NOT EXECUTED
ffc0e280: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED
ffc0e284: 38 80 00 01 li r4,1 <== NOT EXECUTED
ffc0e288: 38 a5 c4 ec addi r5,r5,-15124 <== NOT EXECUTED
ffc0e28c: 7f e6 fb 78 mr r6,r31 <== NOT EXECUTED
ffc0e290: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc0e294: 4b ff fd dd bl ffc0e070 <msdos_format_printf> <== NOT EXECUTED
"filling error on sector: %d\n", start_sector);
/*
* cleanup
*/
if (fill_buffer != NULL) {
ffc0e298: 2f 9c 00 00 cmpwi cr7,r28,0
ffc0e29c: 41 9e 00 0c beq- cr7,ffc0e2a8 <msdos_format_fill_sectors+0x134><== NEVER TAKEN
free(fill_buffer);
ffc0e2a0: 7f 83 e3 78 mr r3,r28
ffc0e2a4: 4b ff 7a 39 bl ffc05cdc <free>
fill_buffer = NULL;
}
return ret_val;
}
ffc0e2a8: 39 61 00 38 addi r11,r1,56
ffc0e2ac: 7f c3 f3 78 mr r3,r30
ffc0e2b0: 4b ff 33 24 b ffc015d4 <_restgpr_21_x>
ffc0e070 <msdos_format_printf>:
*/
static void
msdos_format_printf (const msdos_format_request_param_t *rqdata,
int info_level,
const char *format, ...)
{
ffc0e070: 7c 2b 0b 78 mr r11,r1
ffc0e074: 7c 08 02 a6 mflr r0
ffc0e078: 94 21 ff 88 stwu r1,-120(r1)
ffc0e07c: 90 01 00 7c stw r0,124(r1)
ffc0e080: 48 01 cb dd bl ffc2ac5c <_savegpr_31>
ffc0e084: 90 c1 00 1c stw r6,28(r1)
ffc0e088: 90 e1 00 20 stw r7,32(r1)
ffc0e08c: 91 01 00 24 stw r8,36(r1)
ffc0e090: 91 21 00 28 stw r9,40(r1)
ffc0e094: 91 41 00 2c stw r10,44(r1)
ffc0e098: 40 86 00 24 bne- cr1,ffc0e0bc <msdos_format_printf+0x4c><== ALWAYS TAKEN
ffc0e09c: d8 21 00 30 stfd f1,48(r1) <== NOT EXECUTED
ffc0e0a0: d8 41 00 38 stfd f2,56(r1) <== NOT EXECUTED
ffc0e0a4: d8 61 00 40 stfd f3,64(r1) <== NOT EXECUTED
ffc0e0a8: d8 81 00 48 stfd f4,72(r1) <== NOT EXECUTED
ffc0e0ac: d8 a1 00 50 stfd f5,80(r1) <== NOT EXECUTED
ffc0e0b0: d8 c1 00 58 stfd f6,88(r1) <== NOT EXECUTED
ffc0e0b4: d8 e1 00 60 stfd f7,96(r1) <== NOT EXECUTED
ffc0e0b8: d9 01 00 68 stfd f8,104(r1) <== NOT EXECUTED
va_list args;
va_start (args, format);
if (rqdata != NULL && rqdata->info_level >= info_level)
ffc0e0bc: 2f 83 00 00 cmpwi cr7,r3,0
msdos_format_printf (const msdos_format_request_param_t *rqdata,
int info_level,
const char *format, ...)
{
va_list args;
va_start (args, format);
ffc0e0c0: 39 20 00 03 li r9,3
ffc0e0c4: 99 21 00 08 stb r9,8(r1)
ffc0e0c8: 39 20 00 00 li r9,0
ffc0e0cc: 99 21 00 09 stb r9,9(r1)
ffc0e0d0: 39 21 00 80 addi r9,r1,128
ffc0e0d4: 91 21 00 0c stw r9,12(r1)
ffc0e0d8: 39 21 00 10 addi r9,r1,16
ffc0e0dc: 91 21 00 10 stw r9,16(r1)
if (rqdata != NULL && rqdata->info_level >= info_level)
ffc0e0e0: 41 9e 00 34 beq- cr7,ffc0e114 <msdos_format_printf+0xa4>
ffc0e0e4: 81 23 00 18 lwz r9,24(r3)
ffc0e0e8: 7f 89 20 00 cmpw cr7,r9,r4
ffc0e0ec: 41 bc 00 28 blt+ cr7,ffc0e114 <msdos_format_printf+0xa4><== ALWAYS TAKEN
{
vfprintf (stdout, format, args);
ffc0e0f0: 3f e0 00 00 lis r31,0 <== NOT EXECUTED
ffc0e0f4: 81 3f 27 f0 lwz r9,10224(r31) <== NOT EXECUTED
ffc0e0f8: 7c a4 2b 78 mr r4,r5 <== NOT EXECUTED
ffc0e0fc: 38 a1 00 08 addi r5,r1,8 <== NOT EXECUTED
ffc0e100: 80 69 00 08 lwz r3,8(r9) <== NOT EXECUTED
ffc0e104: 48 01 6e 01 bl ffc24f04 <vfprintf> <== NOT EXECUTED
fflush (stdout);
ffc0e108: 81 3f 27 f0 lwz r9,10224(r31) <== NOT EXECUTED
ffc0e10c: 80 69 00 08 lwz r3,8(r9) <== NOT EXECUTED
ffc0e110: 48 00 e4 a1 bl ffc1c5b0 <fflush> <== NOT EXECUTED
}
va_end (args);
}
ffc0e114: 39 61 00 78 addi r11,r1,120
ffc0e118: 4b ff 34 e4 b ffc015fc <_restgpr_31_x>
ffc0e11c <msdos_format_write_sec>:
)
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
ffc0e11c: 94 21 ff e8 stwu r1,-24(r1)
ffc0e120: 7c 08 02 a6 mflr r0
int ret_val = 0;
if (0 > lseek(fd,((off_t)start_sector)*sector_size,SEEK_SET)) {
ffc0e124: 38 e0 00 00 li r7,0
)
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
ffc0e128: bf a1 00 0c stmw r29,12(r1)
ffc0e12c: 7c bf 2b 78 mr r31,r5
ffc0e130: 7c de 33 78 mr r30,r6
int ret_val = 0;
if (0 > lseek(fd,((off_t)start_sector)*sector_size,SEEK_SET)) {
ffc0e134: 7c a4 28 16 mulhwu r5,r4,r5
)
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
ffc0e138: 90 01 00 1c stw r0,28(r1)
int ret_val = 0;
if (0 > lseek(fd,((off_t)start_sector)*sector_size,SEEK_SET)) {
ffc0e13c: 7c c4 f9 d6 mullw r6,r4,r31
)
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
ffc0e140: 7c 7d 1b 78 mr r29,r3
int ret_val = 0;
if (0 > lseek(fd,((off_t)start_sector)*sector_size,SEEK_SET)) {
ffc0e144: 48 00 75 cd bl ffc15710 <lseek>
ffc0e148: 2f 83 00 00 cmpwi cr7,r3,0
ffc0e14c: 40 9c 00 0c bge- cr7,ffc0e158 <msdos_format_write_sec+0x3c><== ALWAYS TAKEN
ffc0e150: 38 60 ff ff li r3,-1 <== NOT EXECUTED
ffc0e154: 48 00 00 18 b ffc0e16c <msdos_format_write_sec+0x50> <== NOT EXECUTED
ret_val = -1;
}
if (ret_val == 0) {
if (0 > write(fd,buffer,sector_size)) {
ffc0e158: 7f a3 eb 78 mr r3,r29
ffc0e15c: 7f c4 f3 78 mr r4,r30
ffc0e160: 7f e5 fb 78 mr r5,r31
ffc0e164: 4b ff bc 4d bl ffc09db0 <write>
ffc0e168: 7c 63 fe 70 srawi r3,r3,31
ret_val = -1;
}
}
return ret_val;
}
ffc0e16c: 39 61 00 18 addi r11,r1,24
ffc0e170: 4b ff 34 84 b ffc015f4 <_restgpr_29_x>
ffc199c4 <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
)
{
ffc199c4: 94 21 ff 88 stwu r1,-120(r1)
ffc199c8: 7c 08 02 a6 mflr r0
int rc = RC_OK;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
fat_file_fd_t *fat_fd = NULL;
ffc199cc: 39 20 00 00 li r9,0
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t cln,
fat_dir_pos_t *dir_pos,
char *dir_entry
)
{
ffc199d0: 90 01 00 7c stw r0,124(r1)
ffc199d4: bf 21 00 5c stmw r25,92(r1)
ffc199d8: 7c bd 2b 78 mr r29,r5
int rc = RC_OK;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
fat_file_fd_t *fat_fd = NULL;
ffc199dc: 7c 25 0b 78 mr r5,r1
fat_dir_pos_t *dir_pos,
char *dir_entry
)
{
int rc = RC_OK;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
ffc199e0: 83 e3 00 08 lwz r31,8(r3)
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t cln,
fat_dir_pos_t *dir_pos,
char *dir_entry
)
{
ffc199e4: 7c 7c 1b 78 mr r28,r3
int rc = RC_OK;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
fat_file_fd_t *fat_fd = NULL;
ffc199e8: 95 25 00 48 stwu r9,72(r5)
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t cln,
fat_dir_pos_t *dir_pos,
char *dir_entry
)
{
ffc199ec: 7c 9b 23 78 mr r27,r4
uint32_t cl4find = 0;
/*
* open fat-file corresponded to ".."
*/
rc = fat_file_open(&fs_info->fat, dir_pos, &fat_fd);
ffc199f0: 7f e3 fb 78 mr r3,r31
ffc199f4: 7f a4 eb 78 mr r4,r29
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t cln,
fat_dir_pos_t *dir_pos,
char *dir_entry
)
{
ffc199f8: 7c d9 33 78 mr r25,r6
uint32_t cl4find = 0;
/*
* open fat-file corresponded to ".."
*/
rc = fat_file_open(&fs_info->fat, dir_pos, &fat_fd);
ffc199fc: 4b ff 93 e9 bl ffc12de4 <fat_file_open>
if (rc != RC_OK)
ffc19a00: 7c 7e 1b 79 mr. r30,r3
ffc19a04: 40 a2 02 34 bne+ ffc19c38 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x274><== NEVER TAKEN
return rc;
fat_fd->cln = cln;
ffc19a08: 80 81 00 48 lwz r4,72(r1)
fat_fd->fat_file_type = FAT_DIRECTORY;
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
ffc19a0c: 3d 40 00 20 lis r10,32
fat_fd->map.file_cln = 0;
fat_fd->map.disk_cln = fat_fd->cln;
rc = fat_file_size(&fs_info->fat, fat_fd);
ffc19a10: 7f e3 fb 78 mr r3,r31
rc = fat_file_open(&fs_info->fat, dir_pos, &fat_fd);
if (rc != RC_OK)
return rc;
fat_fd->cln = cln;
fat_fd->fat_file_type = FAT_DIRECTORY;
ffc19a14: 93 c4 00 10 stw r30,16(r4)
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
fat_fd->map.file_cln = 0;
ffc19a18: 93 c4 00 34 stw r30,52(r4)
*/
rc = fat_file_open(&fs_info->fat, dir_pos, &fat_fd);
if (rc != RC_OK)
return rc;
fat_fd->cln = cln;
ffc19a1c: 93 64 00 1c stw r27,28(r4)
fat_fd->fat_file_type = FAT_DIRECTORY;
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
ffc19a20: 91 44 00 14 stw r10,20(r4)
fat_fd->map.file_cln = 0;
fat_fd->map.disk_cln = fat_fd->cln;
ffc19a24: 93 64 00 38 stw r27,56(r4)
rc = fat_file_size(&fs_info->fat, fat_fd);
ffc19a28: 4b ff 9e b9 bl ffc138e0 <fat_file_size>
if (rc != RC_OK)
ffc19a2c: 7c 7e 1b 79 mr. r30,r3
ffc19a30: 41 a2 00 08 beq+ ffc19a38 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x74><== ALWAYS TAKEN
ffc19a34: 48 00 00 5c b ffc19a90 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0xcc><== NOT EXECUTED
return rc;
}
/* find "." node in opened directory */
memset(dot_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
msdos_long_to_short(".", 1, dot_node, MSDOS_SHORT_NAME_LEN);
ffc19a38: 3f c0 ff c3 lis r30,-61
ffc19a3c: 3b de c9 31 addi r30,r30,-14031
fat_file_close(&fs_info->fat, fat_fd);
return rc;
}
/* find "." node in opened directory */
memset(dot_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
ffc19a40: 38 80 00 00 li r4,0
ffc19a44: 38 a0 00 20 li r5,32
ffc19a48: 38 61 00 28 addi r3,r1,40
ffc19a4c: 48 00 34 71 bl ffc1cebc <memset>
msdos_long_to_short(".", 1, dot_node, MSDOS_SHORT_NAME_LEN);
ffc19a50: 7f c3 f3 78 mr r3,r30
ffc19a54: 38 80 00 01 li r4,1
ffc19a58: 38 a1 00 28 addi r5,r1,40
ffc19a5c: 38 c0 00 0b li r6,11
ffc19a60: 4b ff ef 21 bl ffc18980 <msdos_long_to_short>
rc = msdos_find_name_in_fat_file(mt_entry, fat_fd, false, ".", 1,
ffc19a64: 80 81 00 48 lwz r4,72(r1)
ffc19a68: 7f c6 f3 78 mr r6,r30
ffc19a6c: 7f 83 e3 78 mr r3,r28
ffc19a70: 38 a0 00 00 li r5,0
ffc19a74: 38 e0 00 01 li r7,1
ffc19a78: 39 00 00 01 li r8,1
ffc19a7c: 7f a9 eb 78 mr r9,r29
ffc19a80: 39 41 00 28 addi r10,r1,40
ffc19a84: 4b ff f5 99 bl ffc1901c <msdos_find_name_in_fat_file>
MSDOS_NAME_SHORT, dir_pos, dot_node);
if (rc != RC_OK)
ffc19a88: 7c 7e 1b 79 mr. r30,r3
ffc19a8c: 41 a2 00 10 beq+ ffc19a9c <msdos_get_dotdot_dir_info_cluster_num_and_offset+0xd8><== ALWAYS TAKEN
{
fat_file_close(&fs_info->fat, fat_fd);
ffc19a90: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc19a94: 80 81 00 48 lwz r4,72(r1) <== NOT EXECUTED
ffc19a98: 48 00 01 90 b ffc19c28 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x264><== NOT EXECUTED
return rc;
}
/* find ".." node in opened directory */
memset(dotdot_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
msdos_long_to_short("..", 2, dotdot_node, MSDOS_SHORT_NAME_LEN);
ffc19a9c: 3f c0 ff c3 lis r30,-61
ffc19aa0: 3b de c9 30 addi r30,r30,-14032
fat_file_close(&fs_info->fat, fat_fd);
return rc;
}
/* find ".." node in opened directory */
memset(dotdot_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
ffc19aa4: 38 80 00 00 li r4,0
ffc19aa8: 38 a0 00 20 li r5,32
ffc19aac: 38 61 00 08 addi r3,r1,8
ffc19ab0: 48 00 34 0d bl ffc1cebc <memset>
msdos_long_to_short("..", 2, dotdot_node, MSDOS_SHORT_NAME_LEN);
ffc19ab4: 7f c3 f3 78 mr r3,r30
ffc19ab8: 38 80 00 02 li r4,2
ffc19abc: 38 a1 00 08 addi r5,r1,8
ffc19ac0: 38 c0 00 0b li r6,11
ffc19ac4: 4b ff ee bd bl ffc18980 <msdos_long_to_short>
rc = msdos_find_name_in_fat_file(mt_entry, fat_fd, false, "..", 2,
ffc19ac8: 80 81 00 48 lwz r4,72(r1)
ffc19acc: 7f c6 f3 78 mr r6,r30
ffc19ad0: 7f 83 e3 78 mr r3,r28
ffc19ad4: 38 a0 00 00 li r5,0
ffc19ad8: 38 e0 00 02 li r7,2
ffc19adc: 39 00 00 01 li r8,1
ffc19ae0: 7f a9 eb 78 mr r9,r29
ffc19ae4: 39 41 00 08 addi r10,r1,8
ffc19ae8: 4b ff f5 35 bl ffc1901c <msdos_find_name_in_fat_file>
ffc19aec: 80 81 00 48 lwz r4,72(r1)
MSDOS_NAME_SHORT, dir_pos,
dotdot_node);
if (rc != RC_OK)
ffc19af0: 7c 7e 1b 79 mr. r30,r3
ffc19af4: 41 a2 00 08 beq+ ffc19afc <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x138><== ALWAYS TAKEN
ffc19af8: 48 00 00 e8 b ffc19be0 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x21c><== NOT EXECUTED
}
cl4find = MSDOS_EXTRACT_CLUSTER_NUM(dot_node);
/* close fat-file corresponded to ".." directory */
rc = fat_file_close(&fs_info->fat, fat_fd);
ffc19afc: 7f e3 fb 78 mr r3,r31
{
fat_file_close(&fs_info->fat, fat_fd);
return rc;
}
cl4find = MSDOS_EXTRACT_CLUSTER_NUM(dot_node);
ffc19b00: a3 61 00 42 lhz r27,66(r1)
ffc19b04: a3 41 00 3c lhz r26,60(r1)
/* close fat-file corresponded to ".." directory */
rc = fat_file_close(&fs_info->fat, fat_fd);
ffc19b08: 4b ff 97 4d bl ffc13254 <fat_file_close>
if ( rc != RC_OK )
ffc19b0c: 7c 7e 1b 79 mr. r30,r3
ffc19b10: 40 82 01 28 bne- ffc19c38 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x274><== NEVER TAKEN
return rc;
if ( (MSDOS_EXTRACT_CLUSTER_NUM(dotdot_node)) == 0)
ffc19b14: a0 e1 00 1c lhz r7,28(r1)
ffc19b18: a1 01 00 22 lhz r8,34(r1)
ffc19b1c: 54 ea c2 3e rlwinm r10,r7,24,8,31
ffc19b20: 54 e7 44 2e rlwinm r7,r7,8,16,23
ffc19b24: 55 09 c2 3e rlwinm r9,r8,24,8,31
ffc19b28: 7d 4a 3b 78 or r10,r10,r7
ffc19b2c: 55 08 44 2e rlwinm r8,r8,8,16,23
ffc19b30: 55 4a 80 1e rlwinm r10,r10,16,0,15
ffc19b34: 7d 29 43 78 or r9,r9,r8
ffc19b38: 7d 48 4b 79 or. r8,r10,r9
ffc19b3c: 40 82 00 1c bne- ffc19b58 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x194><== ALWAYS TAKEN
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
dir_pos->sname.ofs = 0;
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
ffc19b40: 39 20 ff ff li r9,-1 <== NOT EXECUTED
fat_dir_pos_init(
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
dir_pos->sname.ofs = 0;
ffc19b44: 91 1d 00 04 stw r8,4(r29) <== NOT EXECUTED
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
ffc19b48: 91 3d 00 08 stw r9,8(r29) <== NOT EXECUTED
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
ffc19b4c: 91 3d 00 0c stw r9,12(r29) <== 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;
ffc19b50: 39 20 00 01 li r9,1 <== NOT EXECUTED
ffc19b54: 91 3d 00 00 stw r9,0(r29) <== NOT EXECUTED
}
/* open fat-file corresponded to second ".." */
rc = fat_file_open(&fs_info->fat, dir_pos, &fat_fd);
ffc19b58: 7f e3 fb 78 mr r3,r31
ffc19b5c: 7f a4 eb 78 mr r4,r29
ffc19b60: 38 a1 00 48 addi r5,r1,72
ffc19b64: 4b ff 92 81 bl ffc12de4 <fat_file_open>
if (rc != RC_OK)
ffc19b68: 7c 7e 1b 79 mr. r30,r3
ffc19b6c: 40 82 00 cc bne- ffc19c38 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x274><== NEVER TAKEN
return rc;
if ((MSDOS_EXTRACT_CLUSTER_NUM(dotdot_node)) == 0)
ffc19b70: a0 e1 00 1c lhz r7,28(r1)
ffc19b74: a1 01 00 22 lhz r8,34(r1)
ffc19b78: 54 ea c2 3e rlwinm r10,r7,24,8,31
ffc19b7c: 80 81 00 48 lwz r4,72(r1)
ffc19b80: 54 e7 44 2e rlwinm r7,r7,8,16,23
ffc19b84: 55 09 c2 3e rlwinm r9,r8,24,8,31
ffc19b88: 7d 4a 3b 78 or r10,r10,r7
ffc19b8c: 55 08 44 2e rlwinm r8,r8,8,16,23
ffc19b90: 55 4a 80 1e rlwinm r10,r10,16,0,15
ffc19b94: 7d 29 43 78 or r9,r9,r8
ffc19b98: 7d 48 4b 79 or. r8,r10,r9
ffc19b9c: 40 82 00 10 bne- ffc19bac <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x1e8><== ALWAYS TAKEN
fat_fd->cln = fs_info->fat.vol.rdir_cl;
ffc19ba0: 81 3f 00 3c lwz r9,60(r31) <== NOT EXECUTED
ffc19ba4: 91 24 00 1c stw r9,28(r4) <== NOT EXECUTED
ffc19ba8: 48 00 00 08 b ffc19bb0 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x1ec><== NOT EXECUTED
else
fat_fd->cln = MSDOS_EXTRACT_CLUSTER_NUM(dotdot_node);
ffc19bac: 91 04 00 1c stw r8,28(r4)
fat_fd->fat_file_type = FAT_DIRECTORY;
ffc19bb0: 39 20 00 00 li r9,0
ffc19bb4: 91 24 00 10 stw r9,16(r4)
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
ffc19bb8: 3d 40 00 20 lis r10,32
fat_fd->map.file_cln = 0;
fat_fd->map.disk_cln = fat_fd->cln;
rc = fat_file_size(&fs_info->fat, fat_fd);
ffc19bbc: 7f e3 fb 78 mr r3,r31
fat_fd->cln = MSDOS_EXTRACT_CLUSTER_NUM(dotdot_node);
fat_fd->fat_file_type = FAT_DIRECTORY;
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
fat_fd->map.file_cln = 0;
ffc19bc0: 91 24 00 34 stw r9,52(r4)
fat_fd->map.disk_cln = fat_fd->cln;
ffc19bc4: 81 24 00 1c lwz r9,28(r4)
fat_fd->cln = fs_info->fat.vol.rdir_cl;
else
fat_fd->cln = MSDOS_EXTRACT_CLUSTER_NUM(dotdot_node);
fat_fd->fat_file_type = FAT_DIRECTORY;
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
ffc19bc8: 91 44 00 14 stw r10,20(r4)
fat_fd->map.file_cln = 0;
fat_fd->map.disk_cln = fat_fd->cln;
ffc19bcc: 91 24 00 38 stw r9,56(r4)
rc = fat_file_size(&fs_info->fat, fat_fd);
ffc19bd0: 4b ff 9d 11 bl ffc138e0 <fat_file_size>
ffc19bd4: 80 81 00 48 lwz r4,72(r1)
if (rc != RC_OK)
ffc19bd8: 7c 7e 1b 79 mr. r30,r3
ffc19bdc: 41 a2 00 0c beq+ ffc19be8 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x224><== ALWAYS TAKEN
{
fat_file_close(&fs_info->fat, fat_fd);
ffc19be0: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc19be4: 48 00 00 44 b ffc19c28 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x264><== NOT EXECUTED
{
fat_file_close(&fs_info->fat, fat_fd);
return rc;
}
cl4find = MSDOS_EXTRACT_CLUSTER_NUM(dot_node);
ffc19be8: 57 45 c2 3e rlwinm r5,r26,24,8,31
ffc19bec: 57 5a 44 2e rlwinm r26,r26,8,16,23
ffc19bf0: 57 69 c2 3e rlwinm r9,r27,24,8,31
ffc19bf4: 7c a5 d3 78 or r5,r5,r26
ffc19bf8: 57 7b 44 2e rlwinm r27,r27,8,16,23
ffc19bfc: 7d 3b db 78 or r27,r9,r27
ffc19c00: 54 a5 80 1e rlwinm r5,r5,16,0,15
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,
ffc19c04: 7f 83 e3 78 mr r3,r28
ffc19c08: 7c a5 db 78 or r5,r5,r27
ffc19c0c: 7f a6 eb 78 mr r6,r29
ffc19c10: 7f 27 cb 78 mr r7,r25
ffc19c14: 4b ff fc 41 bl ffc19854 <msdos_find_node_by_cluster_num_in_fat_file>
ffc19c18: 80 81 00 48 lwz r4,72(r1)
dir_pos, dir_entry);
if (rc != RC_OK)
ffc19c1c: 7c 7e 1b 79 mr. r30,r3
{
fat_file_close(&fs_info->fat, fat_fd);
ffc19c20: 7f e3 fb 78 mr r3,r31
}
/* in this directory find slot with specified cluster num */
rc = msdos_find_node_by_cluster_num_in_fat_file(mt_entry, fat_fd, cl4find,
dir_pos, dir_entry);
if (rc != RC_OK)
ffc19c24: 41 a2 00 0c beq+ ffc19c30 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x26c><== ALWAYS TAKEN
{
fat_file_close(&fs_info->fat, fat_fd);
ffc19c28: 4b ff 96 2d bl ffc13254 <fat_file_close> <== NOT EXECUTED
ffc19c2c: 48 00 00 0c b ffc19c38 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x274><== NOT EXECUTED
return rc;
}
rc = fat_file_close(&fs_info->fat, fat_fd);
ffc19c30: 4b ff 96 25 bl ffc13254 <fat_file_close>
ffc19c34: 7c 7e 1b 78 mr r30,r3
return rc;
}
ffc19c38: 39 61 00 78 addi r11,r1,120
ffc19c3c: 7f c3 f3 78 mr r3,r30
ffc19c40: 4b fe 79 a4 b ffc015e4 <_restgpr_25_x>
ffc0f1d0 <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
)
{
ffc0f1d0: 94 21 ff c0 stwu r1,-64(r1)
ffc0f1d4: 7c 08 02 a6 mflr r0
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = NULL;
fat_file_fd_t *fat_fd = NULL;
ffc0f1d8: 39 20 00 00 li r9,0
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
)
{
ffc0f1dc: bf 41 00 28 stmw r26,40(r1)
ffc0f1e0: 7c 7d 1b 78 mr r29,r3
ffc0f1e4: 7c 9b 23 78 mr r27,r4
msdos_fs_info_t *fs_info = NULL;
fat_file_fd_t *fat_fd = NULL;
fat_dir_pos_t root_pos;
uint32_t cl_buf_size;
fs_info = (msdos_fs_info_t *)calloc(1, sizeof(msdos_fs_info_t));
ffc0f1e8: 38 60 00 01 li r3,1
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
)
{
ffc0f1ec: 90 01 00 44 stw r0,68(r1)
msdos_fs_info_t *fs_info = NULL;
fat_file_fd_t *fat_fd = NULL;
fat_dir_pos_t root_pos;
uint32_t cl_buf_size;
fs_info = (msdos_fs_info_t *)calloc(1, sizeof(msdos_fs_info_t));
ffc0f1f0: 38 80 00 a4 li r4,164
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
)
{
ffc0f1f4: 7c ba 2b 78 mr r26,r5
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = NULL;
fat_file_fd_t *fat_fd = NULL;
ffc0f1f8: 91 21 00 18 stw r9,24(r1)
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
)
{
ffc0f1fc: 7c dc 33 78 mr r28,r6
msdos_fs_info_t *fs_info = NULL;
fat_file_fd_t *fat_fd = NULL;
fat_dir_pos_t root_pos;
uint32_t cl_buf_size;
fs_info = (msdos_fs_info_t *)calloc(1, sizeof(msdos_fs_info_t));
ffc0f200: 4b ff 69 f9 bl ffc05bf8 <calloc>
if (!fs_info)
ffc0f204: 7c 7f 1b 79 mr. r31,r3
ffc0f208: 40 a2 00 08 bne+ ffc0f210 <msdos_initialize_support+0x40><== ALWAYS TAKEN
ffc0f20c: 48 00 01 14 b ffc0f320 <msdos_initialize_support+0x150><== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
temp_mt_entry->fs_info = fs_info;
ffc0f210: 93 fd 00 08 stw r31,8(r29)
rc = fat_init_volume_info(&fs_info->fat, temp_mt_entry->dev);
ffc0f214: 80 9d 00 38 lwz r4,56(r29)
ffc0f218: 48 00 4e 01 bl ffc14018 <fat_init_volume_info>
if (rc != RC_OK)
ffc0f21c: 7c 7e 1b 79 mr. r30,r3
ffc0f220: 41 a2 00 08 beq+ ffc0f228 <msdos_initialize_support+0x58><== ALWAYS TAKEN
ffc0f224: 48 00 00 44 b ffc0f268 <msdos_initialize_support+0x98><== 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;
ffc0f228: 39 20 ff ff li r9,-1
{
free(fs_info);
return rc;
}
fs_info->file_handlers = file_handlers;
ffc0f22c: 93 5f 00 98 stw r26,152(r31)
* 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;
rc = fat_file_open(&fs_info->fat, &root_pos, &fat_fd);
ffc0f230: 7f e3 fb 78 mr r3,r31
free(fs_info);
return rc;
}
fs_info->file_handlers = file_handlers;
fs_info->directory_handlers = directory_handlers;
ffc0f234: 93 9f 00 94 stw r28,148(r31)
* 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;
rc = fat_file_open(&fs_info->fat, &root_pos, &fat_fd);
ffc0f238: 38 81 00 08 addi r4,r1,8
ffc0f23c: 38 a1 00 18 addi r5,r1,24
ffc0f240: 91 21 00 10 stw r9,16(r1)
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
ffc0f244: 91 21 00 14 stw r9,20(r1)
/*
* 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;
ffc0f248: 39 20 00 01 li r9,1
fat_dir_pos_init(
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
dir_pos->sname.ofs = 0;
ffc0f24c: 93 c1 00 0c stw r30,12(r1)
ffc0f250: 91 21 00 08 stw r9,8(r1)
rc = fat_file_open(&fs_info->fat, &root_pos, &fat_fd);
ffc0f254: 48 00 3b 91 bl ffc12de4 <fat_file_open>
if (rc != RC_OK)
ffc0f258: 7c 7e 1b 79 mr. r30,r3
ffc0f25c: 41 a2 00 18 beq+ ffc0f274 <msdos_initialize_support+0xa4><== ALWAYS TAKEN
{
fat_shutdown_drive(&fs_info->fat);
ffc0f260: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc0f264: 48 00 55 d9 bl ffc1483c <fat_shutdown_drive> <== NOT EXECUTED
free(fs_info);
ffc0f268: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc0f26c: 4b ff 6a 71 bl ffc05cdc <free> <== NOT EXECUTED
ffc0f270: 48 00 01 24 b ffc0f394 <msdos_initialize_support+0x1c4><== NOT EXECUTED
return rc;
}
/* again: unfortunately "fat-file" is just almost fat file :( */
fat_fd->fat_file_type = FAT_DIRECTORY;
ffc0f274: 80 81 00 18 lwz r4,24(r1)
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
ffc0f278: 3d 40 00 20 lis r10,32
ffc0f27c: 91 44 00 14 stw r10,20(r4)
fat_fd->cln = fs_info->fat.vol.rdir_cl;
ffc0f280: 81 5f 00 3c lwz r10,60(r31)
free(fs_info);
return rc;
}
/* again: unfortunately "fat-file" is just almost fat file :( */
fat_fd->fat_file_type = FAT_DIRECTORY;
ffc0f284: 93 c4 00 10 stw r30,16(r4)
fat_fd->map.file_cln = 0;
fat_fd->map.disk_cln = fat_fd->cln;
/* if we have FAT12/16 */
if ( fat_fd->cln == 0 )
ffc0f288: 2f 8a 00 00 cmpwi cr7,r10,0
}
/* again: unfortunately "fat-file" is just almost fat file :( */
fat_fd->fat_file_type = FAT_DIRECTORY;
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
fat_fd->cln = fs_info->fat.vol.rdir_cl;
ffc0f28c: 91 44 00 1c stw r10,28(r4)
fat_fd->map.file_cln = 0;
ffc0f290: 93 c4 00 34 stw r30,52(r4)
fat_fd->map.disk_cln = fat_fd->cln;
ffc0f294: 91 44 00 38 stw r10,56(r4)
/* if we have FAT12/16 */
if ( fat_fd->cln == 0 )
ffc0f298: 40 9e 00 20 bne- cr7,ffc0f2b8 <msdos_initialize_support+0xe8>
{
fat_fd->fat_file_size = fs_info->fat.vol.rdir_size;
ffc0f29c: 81 5f 00 2c lwz r10,44(r31)
cl_buf_size = (fs_info->fat.vol.bpc > fs_info->fat.vol.rdir_size) ?
fs_info->fat.vol.bpc :
ffc0f2a0: a0 7f 00 06 lhz r3,6(r31)
fat_fd->map.disk_cln = fat_fd->cln;
/* if we have FAT12/16 */
if ( fat_fd->cln == 0 )
{
fat_fd->fat_file_size = fs_info->fat.vol.rdir_size;
ffc0f2a4: 91 44 00 18 stw r10,24(r4)
cl_buf_size = (fs_info->fat.vol.bpc > fs_info->fat.vol.rdir_size) ?
ffc0f2a8: 7f 83 50 40 cmplw cr7,r3,r10
ffc0f2ac: 40 9c 00 44 bge- cr7,ffc0f2f0 <msdos_initialize_support+0x120>
ffc0f2b0: 7d 43 53 78 mr r3,r10
ffc0f2b4: 48 00 00 3c b ffc0f2f0 <msdos_initialize_support+0x120>
fs_info->fat.vol.bpc :
fs_info->fat.vol.rdir_size;
}
else
{
rc = fat_file_size(&fs_info->fat, fat_fd);
ffc0f2b8: 7f e3 fb 78 mr r3,r31
ffc0f2bc: 48 00 46 25 bl ffc138e0 <fat_file_size>
if ( rc != RC_OK )
ffc0f2c0: 7c 7a 1b 79 mr. r26,r3
ffc0f2c4: 41 a2 00 28 beq+ ffc0f2ec <msdos_initialize_support+0x11c><== ALWAYS TAKEN
{
fat_file_close(&fs_info->fat, fat_fd);
ffc0f2c8: 80 81 00 18 lwz r4,24(r1) <== NOT EXECUTED
ffc0f2cc: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
fat_shutdown_drive(&fs_info->fat);
free(fs_info);
ffc0f2d0: 7f 5e d3 78 mr r30,r26 <== NOT EXECUTED
else
{
rc = fat_file_size(&fs_info->fat, fat_fd);
if ( rc != RC_OK )
{
fat_file_close(&fs_info->fat, fat_fd);
ffc0f2d4: 48 00 3f 81 bl ffc13254 <fat_file_close> <== NOT EXECUTED
fat_shutdown_drive(&fs_info->fat);
ffc0f2d8: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc0f2dc: 48 00 55 61 bl ffc1483c <fat_shutdown_drive> <== NOT EXECUTED
free(fs_info);
ffc0f2e0: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc0f2e4: 4b ff 69 f9 bl ffc05cdc <free> <== NOT EXECUTED
ffc0f2e8: 48 00 00 ac b ffc0f394 <msdos_initialize_support+0x1c4><== NOT EXECUTED
return rc;
}
cl_buf_size = fs_info->fat.vol.bpc;
ffc0f2ec: a0 7f 00 06 lhz r3,6(r31)
}
fs_info->cl_buf = (uint8_t *)calloc(cl_buf_size, sizeof(char));
ffc0f2f0: 38 80 00 01 li r4,1
ffc0f2f4: 4b ff 69 05 bl ffc05bf8 <calloc>
if (fs_info->cl_buf == NULL)
ffc0f2f8: 2f 83 00 00 cmpwi cr7,r3,0
return rc;
}
cl_buf_size = fs_info->fat.vol.bpc;
}
fs_info->cl_buf = (uint8_t *)calloc(cl_buf_size, sizeof(char));
ffc0f2fc: 90 7f 00 a0 stw r3,160(r31)
if (fs_info->cl_buf == NULL)
ffc0f300: 40 be 00 34 bne+ cr7,ffc0f334 <msdos_initialize_support+0x164><== ALWAYS TAKEN
{
fat_file_close(&fs_info->fat, fat_fd);
ffc0f304: 80 81 00 18 lwz r4,24(r1) <== NOT EXECUTED
ffc0f308: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc0f30c: 48 00 3f 49 bl ffc13254 <fat_file_close> <== NOT EXECUTED
fat_shutdown_drive(&fs_info->fat);
ffc0f310: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc0f314: 48 00 55 29 bl ffc1483c <fat_shutdown_drive> <== NOT EXECUTED
free(fs_info);
ffc0f318: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc0f31c: 4b ff 69 c1 bl ffc05cdc <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
ffc0f320: 48 00 cd c9 bl ffc1c0e8 <__errno> <== NOT EXECUTED
ffc0f324: 39 20 00 0c li r9,12 <== NOT EXECUTED
ffc0f328: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED
ffc0f32c: 3b c0 ff ff li r30,-1 <== NOT EXECUTED
ffc0f330: 48 00 00 64 b ffc0f394 <msdos_initialize_support+0x1c4><== NOT EXECUTED
}
sc = rtems_semaphore_create(3,
ffc0f334: 38 80 00 01 li r4,1
ffc0f338: 38 60 00 03 li r3,3
ffc0f33c: 38 a0 00 10 li r5,16
ffc0f340: 38 c0 00 00 li r6,0
ffc0f344: 38 ff 00 9c addi r7,r31,156
ffc0f348: 4b ff af 8d bl ffc0a2d4 <rtems_semaphore_create>
ffc0f34c: 80 81 00 18 lwz r4,24(r1)
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_FIFO,
0,
&fs_info->vol_sema);
if (sc != RTEMS_SUCCESSFUL)
ffc0f350: 2f 83 00 00 cmpwi cr7,r3,0
ffc0f354: 41 be 00 30 beq+ cr7,ffc0f384 <msdos_initialize_support+0x1b4><== ALWAYS TAKEN
{
fat_file_close(&fs_info->fat, fat_fd);
ffc0f358: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc0f35c: 48 00 3e f9 bl ffc13254 <fat_file_close> <== NOT EXECUTED
fat_shutdown_drive(&fs_info->fat);
ffc0f360: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc0f364: 48 00 54 d9 bl ffc1483c <fat_shutdown_drive> <== NOT EXECUTED
free(fs_info->cl_buf);
ffc0f368: 80 7f 00 a0 lwz r3,160(r31) <== NOT EXECUTED
ffc0f36c: 4b ff 69 71 bl ffc05cdc <free> <== NOT EXECUTED
free(fs_info);
ffc0f370: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc0f374: 4b ff 69 69 bl ffc05cdc <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EIO );
ffc0f378: 48 00 cd 71 bl ffc1c0e8 <__errno> <== NOT EXECUTED
ffc0f37c: 39 20 00 05 li r9,5 <== NOT EXECUTED
ffc0f380: 4b ff ff a8 b ffc0f328 <msdos_initialize_support+0x158><== NOT EXECUTED
}
temp_mt_entry->mt_fs_root->location.node_access = fat_fd;
ffc0f384: 81 3d 00 24 lwz r9,36(r29)
ffc0f388: 90 89 00 08 stw r4,8(r9)
temp_mt_entry->mt_fs_root->location.handlers = directory_handlers;
ffc0f38c: 93 89 00 10 stw r28,16(r9)
temp_mt_entry->ops = op_table;
ffc0f390: 93 7d 00 0c stw r27,12(r29)
return rc;
}
ffc0f394: 39 61 00 40 addi r11,r1,64
ffc0f398: 7f c3 f3 78 mr r3,r30
ffc0f39c: 4b ff 22 4c b ffc015e8 <_restgpr_26_x>
ffc0f18c <msdos_lock>:
.rename_h = msdos_rename,
.statvfs_h = rtems_filesystem_default_statvfs
};
void msdos_lock(const rtems_filesystem_mount_table_entry_t *mt_entry)
{
ffc0f18c: 94 21 ff f8 stwu r1,-8(r1)
ffc0f190: 7c 08 02 a6 mflr r0
msdos_fs_info_t *fs_info = mt_entry->fs_info;
rtems_status_code sc = rtems_semaphore_obtain(
ffc0f194: 38 80 00 00 li r4,0
.rename_h = msdos_rename,
.statvfs_h = rtems_filesystem_default_statvfs
};
void msdos_lock(const rtems_filesystem_mount_table_entry_t *mt_entry)
{
ffc0f198: 90 01 00 0c stw r0,12(r1)
msdos_fs_info_t *fs_info = mt_entry->fs_info;
rtems_status_code sc = rtems_semaphore_obtain(
ffc0f19c: 38 a0 00 00 li r5,0
fs_info->vol_sema,
ffc0f1a0: 81 23 00 08 lwz r9,8(r3)
};
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(
ffc0f1a4: 80 69 00 9c lwz r3,156(r9)
ffc0f1a8: 4b ff b3 b1 bl ffc0a558 <rtems_semaphore_obtain>
fs_info->vol_sema,
RTEMS_WAIT,
RTEMS_NO_TIMEOUT
);
if (sc != RTEMS_SUCCESSFUL) {
ffc0f1ac: 2f 83 00 00 cmpwi cr7,r3,0
ffc0f1b0: 41 be 00 10 beq+ cr7,ffc0f1c0 <msdos_lock+0x34> <== ALWAYS TAKEN
rtems_fatal_error_occurred(0xdeadbeef);
ffc0f1b4: 3c 60 de ad lis r3,-8531 <== NOT EXECUTED
ffc0f1b8: 60 63 be ef ori r3,r3,48879 <== NOT EXECUTED
ffc0f1bc: 4b ff bb 2d bl ffc0ace8 <rtems_fatal_error_occurred> <== NOT EXECUTED
}
}
ffc0f1c0: 80 01 00 0c lwz r0,12(r1)
ffc0f1c4: 38 21 00 08 addi r1,r1,8
ffc0f1c8: 7c 08 03 a6 mtlr r0
ffc0f1cc: 4e 80 00 20 blr
ffc18980 <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)
{
ffc18980: 94 21 ff c8 stwu r1,-56(r1)
ffc18984: 7c 08 02 a6 mflr r0
ffc18988: be 81 00 08 stmw r20,8(r1)
ffc1898c: 7c 7b 1b 78 mr r27,r3
ffc18990: 7c 9e 23 78 mr r30,r4
int i;
/*
* Fill with spaces. This is how a short directory entry is padded.
*/
memset (sfn, ' ', sfn_len);
ffc18994: 7c a3 2b 78 mr r3,r5
*
*/
#define MSDOS_L2S_PRINT 0
msdos_name_type_t
msdos_long_to_short(const char *lfn, int lfn_len, char* sfn, int sfn_len)
{
ffc18998: 90 01 00 3c stw r0,60(r1)
ffc1899c: 7c ba 2b 78 mr r26,r5
int i;
/*
* Fill with spaces. This is how a short directory entry is padded.
*/
memset (sfn, ' ', sfn_len);
ffc189a0: 38 80 00 20 li r4,32
ffc189a4: 7c c5 33 78 mr r5,r6
ffc189a8: 48 00 45 15 bl ffc1cebc <memset>
/*
* Handle '.' and '..' specially.
*/
if ((lfn[0] == '.') && (lfn_len == 1))
ffc189ac: 89 5b 00 00 lbz r10,0(r27)
ffc189b0: 39 20 00 00 li r9,0
ffc189b4: 2f 8a 00 2e cmpwi cr7,r10,46
ffc189b8: 40 be 00 7c bne+ cr7,ffc18a34 <msdos_long_to_short+0xb4>
ffc189bc: 2f 9e 00 01 cmpwi cr7,r30,1
ffc189c0: 40 be 00 08 bne+ cr7,ffc189c8 <msdos_long_to_short+0x48>
ffc189c4: 48 00 00 1c b ffc189e0 <msdos_long_to_short+0x60>
printf ("MSDOS_L2S: SHORT[1]: lfn:'%s' SFN:'%s'\n", lfn, sfn);
#endif
return MSDOS_NAME_SHORT;
}
if ((lfn[0] == '.') && (lfn[1] == '.') && (lfn_len == 2))
ffc189c8: 89 5b 00 01 lbz r10,1(r27)
ffc189cc: 2f 8a 00 2e cmpwi cr7,r10,46
ffc189d0: 40 be 00 64 bne+ cr7,ffc18a34 <msdos_long_to_short+0xb4><== NEVER TAKEN
ffc189d4: 2f 9e 00 02 cmpwi cr7,r30,2
ffc189d8: 40 be 00 5c bne+ cr7,ffc18a34 <msdos_long_to_short+0xb4><== NEVER TAKEN
{
sfn[0] = sfn[1] = '.';
ffc189dc: 99 5a 00 01 stb r10,1(r26)
ffc189e0: 99 5a 00 00 stb r10,0(r26)
#if MSDOS_L2S_PRINT
printf ("MSDOS_L2S: SHORT[2]: lfn:'%s' SFN:'%s'\n", lfn, sfn);
#endif
return MSDOS_NAME_SHORT;
ffc189e4: 3b e0 00 01 li r31,1
ffc189e8: 48 00 01 98 b ffc18b80 <msdos_long_to_short+0x200>
/*
* Filenames with only blanks and dots are not allowed!
*/
for (i = 0; i < lfn_len; i++)
if ((lfn[i] != ' ') && (lfn[i] != '.'))
ffc189ec: 7d 1b 48 ae lbzx r8,r27,r9
ffc189f0: 2f 88 00 20 cmpwi cr7,r8,32
ffc189f4: 41 9e 00 38 beq- cr7,ffc18a2c <msdos_long_to_short+0xac>
ffc189f8: 2f 88 00 2e cmpwi cr7,r8,46
ffc189fc: 41 be 00 30 beq+ cr7,ffc18a2c <msdos_long_to_short+0xac><== NEVER TAKEN
msdos_is_valid_name_char(const char ch)
{
if (strchr(" +,;=[]", ch) != NULL)
return MSDOS_NAME_LONG;
if ((ch == '.') || isalnum((unsigned char)ch) ||
ffc18a00: 3d 20 00 00 lis r9,0
*
*/
static msdos_name_type_t
msdos_is_valid_name_char(const char ch)
{
if (strchr(" +,;=[]", ch) != NULL)
ffc18a04: 3e a0 ff c3 lis r21,-61
return MSDOS_NAME_LONG;
if ((ch == '.') || isalnum((unsigned char)ch) ||
ffc18a08: 82 c9 27 e8 lwz r22,10216(r9)
(strchr("$%'-_@~`!(){}^#&", ch) != NULL))
ffc18a0c: 3e 80 ff c3 lis r20,-61
msdos_is_valid_name_char(const char ch)
{
if (strchr(" +,;=[]", ch) != NULL)
return MSDOS_NAME_LONG;
if ((ch == '.') || isalnum((unsigned char)ch) ||
ffc18a10: 3b a0 00 00 li r29,0
ffc18a14: 3b 20 ff ff li r25,-1
ffc18a18: 3a e0 00 00 li r23,0
ffc18a1c: 3b 00 00 00 li r24,0
*
*/
static msdos_name_type_t
msdos_is_valid_name_char(const char ch)
{
if (strchr(" +,;=[]", ch) != NULL)
ffc18a20: 3a b5 cb b3 addi r21,r21,-13389
return MSDOS_NAME_LONG;
if ((ch == '.') || isalnum((unsigned char)ch) ||
(strchr("$%'-_@~`!(){}^#&", ch) != NULL))
ffc18a24: 3a 94 cb bb addi r20,r20,-13381
ffc18a28: 48 00 00 ec b ffc18b14 <msdos_long_to_short+0x194>
}
/*
* Filenames with only blanks and dots are not allowed!
*/
for (i = 0; i < lfn_len; i++)
ffc18a2c: 39 29 00 01 addi r9,r9,1
ffc18a30: 48 00 00 20 b ffc18a50 <msdos_long_to_short+0xd0>
ffc18a34: 7f 89 f0 00 cmpw cr7,r9,r30
ffc18a38: 39 5e 00 01 addi r10,r30,1
ffc18a3c: 41 9d 00 10 bgt- cr7,ffc18a4c <msdos_long_to_short+0xcc><== NEVER TAKEN
ffc18a40: 3d 00 80 00 lis r8,-32768
ffc18a44: 7f 9e 40 00 cmpw cr7,r30,r8
ffc18a48: 40 be 00 08 bne+ cr7,ffc18a50 <msdos_long_to_short+0xd0><== ALWAYS TAKEN
ffc18a4c: 39 40 00 01 li r10,1 <== NOT EXECUTED
ffc18a50: 35 4a ff ff addic. r10,r10,-1
ffc18a54: 7f 89 f0 00 cmpw cr7,r9,r30
ffc18a58: 40 82 ff 94 bne+ ffc189ec <msdos_long_to_short+0x6c> <== ALWAYS TAKEN
if ((lfn[i] != ' ') && (lfn[i] != '.'))
break;
if (i == lfn_len)
ffc18a5c: 40 9e ff a4 bne+ cr7,ffc18a00 <msdos_long_to_short+0x80><== NOT EXECUTED
ffc18a60: 48 00 00 e8 b ffc18b48 <msdos_long_to_short+0x1c8> <== NOT EXECUTED
*
*/
static msdos_name_type_t
msdos_is_valid_name_char(const char ch)
{
if (strchr(" +,;=[]", ch) != NULL)
ffc18a64: 7e a3 ab 78 mr r3,r21
ffc18a68: 7f e4 fb 78 mr r4,r31
ffc18a6c: 48 00 53 31 bl ffc1dd9c <strchr>
ffc18a70: 2f 83 00 00 cmpwi cr7,r3,0
ffc18a74: 40 be 00 dc bne+ cr7,ffc18b50 <msdos_long_to_short+0x1d0>
return MSDOS_NAME_LONG;
if ((ch == '.') || isalnum((unsigned char)ch) ||
ffc18a78: 6b fc 00 2e xori r28,r31,46
ffc18a7c: 7f 9c 00 34 cntlzw r28,r28
ffc18a80: 57 9c d9 7f rlwinm. r28,r28,27,5,31
ffc18a84: 40 82 00 f0 bne- ffc18b74 <msdos_long_to_short+0x1f4>
ffc18a88: 7d 36 fa 14 add r9,r22,r31
ffc18a8c: 89 29 00 01 lbz r9,1(r9)
ffc18a90: 71 2a 00 07 andi. r10,r9,7
ffc18a94: 40 82 00 d4 bne- ffc18b68 <msdos_long_to_short+0x1e8>
(strchr("$%'-_@~`!(){}^#&", ch) != NULL))
ffc18a98: 7e 83 a3 78 mr r3,r20
ffc18a9c: 7f e4 fb 78 mr r4,r31
ffc18aa0: 48 00 52 fd bl ffc1dd9c <strchr>
#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))
ffc18aa4: 2f 83 00 00 cmpwi cr7,r3,0
ffc18aa8: 40 be 00 c0 bne+ cr7,ffc18b68 <msdos_long_to_short+0x1e8><== ALWAYS TAKEN
ffc18aac: 48 00 00 9c b ffc18b48 <msdos_long_to_short+0x1c8> <== NOT EXECUTED
return type;
if (dot_at >= 0)
{
if (is_dot || ((count - dot_at) > 3))
ffc18ab0: 7d 39 e8 50 subf r9,r25,r29
ffc18ab4: 2f 89 00 03 cmpwi cr7,r9,3
ffc18ab8: 40 bd 00 20 ble+ cr7,ffc18ad8 <msdos_long_to_short+0x158><== ALWAYS TAKEN
ffc18abc: 48 00 00 94 b ffc18b50 <msdos_long_to_short+0x1d0> <== NOT EXECUTED
return MSDOS_NAME_LONG;
}
}
else
{
if (count == 8 && !is_dot)
ffc18ac0: 2f 9d 00 08 cmpwi cr7,r29,8
ffc18ac4: 2f 1c 00 00 cmpwi cr6,r28,0
ffc18ac8: 40 be 00 0c bne+ cr7,ffc18ad4 <msdos_long_to_short+0x154>
ffc18acc: 40 ba 00 28 bne+ cr6,ffc18af4 <msdos_long_to_short+0x174><== NEVER TAKEN
ffc18ad0: 48 00 00 80 b ffc18b50 <msdos_long_to_short+0x1d0>
#endif
return MSDOS_NAME_LONG;
}
}
if (is_dot)
ffc18ad4: 40 ba 00 28 bne+ cr6,ffc18afc <msdos_long_to_short+0x17c>
dot_at = count;
else if ((*name >= 'A') && (*name <= 'Z'))
ffc18ad8: 39 3f ff bf addi r9,r31,-65
ffc18adc: 2b 89 00 19 cmplwi cr7,r9,25
ffc18ae0: 40 9d 00 24 ble- cr7,ffc18b04 <msdos_long_to_short+0x184>
uppercase = true;
else if ((*name >= 'a') && (*name <= 'z'))
ffc18ae4: 3b ff ff 9f addi r31,r31,-97
ffc18ae8: 2b 9f 00 19 cmplwi cr7,r31,25
ffc18aec: 40 9d 00 20 ble- cr7,ffc18b0c <msdos_long_to_short+0x18c>
ffc18af0: 48 00 00 20 b ffc18b10 <msdos_long_to_short+0x190>
return MSDOS_NAME_LONG;
}
}
else
{
if (count == 8 && !is_dot)
ffc18af4: 3b 20 00 08 li r25,8 <== NOT EXECUTED
ffc18af8: 48 00 00 18 b ffc18b10 <msdos_long_to_short+0x190> <== NOT EXECUTED
#endif
return MSDOS_NAME_LONG;
}
}
if (is_dot)
ffc18afc: 7f b9 eb 78 mr r25,r29
ffc18b00: 48 00 00 10 b ffc18b10 <msdos_long_to_short+0x190>
dot_at = count;
else if ((*name >= 'A') && (*name <= 'Z'))
uppercase = true;
ffc18b04: 3a e0 00 01 li r23,1
ffc18b08: 48 00 00 08 b ffc18b10 <msdos_long_to_short+0x190>
else if ((*name >= 'a') && (*name <= 'z'))
lowercase = true;
ffc18b0c: 3b 00 00 01 li r24,1
count++;
ffc18b10: 3b bd 00 01 addi r29,r29,1
bool lowercase = false;
bool uppercase = false;
int dot_at = -1;
int count = 0;
while (*name && (count < name_len))
ffc18b14: 7f fb e8 ae lbzx r31,r27,r29
ffc18b18: 2f 9f 00 00 cmpwi cr7,r31,0
ffc18b1c: 41 9e 00 0c beq- cr7,ffc18b28 <msdos_long_to_short+0x1a8>
ffc18b20: 7f 9d f0 00 cmpw cr7,r29,r30
ffc18b24: 41 9c ff 40 blt+ cr7,ffc18a64 <msdos_long_to_short+0xe4>
count++;
name++;
}
if (lowercase && uppercase)
ffc18b28: 2f 98 00 00 cmpwi cr7,r24,0
}
#if MSDOS_NAME_TYPE_PRINT
printf ("MSDOS_NAME_TYPE: SHORT[1]\n");
#endif
return MSDOS_NAME_SHORT;
ffc18b2c: 3b e0 00 01 li r31,1
count++;
name++;
}
if (lowercase && uppercase)
ffc18b30: 41 9e 00 24 beq- cr7,ffc18b54 <msdos_long_to_short+0x1d4>
ffc18b34: 2f 97 00 00 cmpwi cr7,r23,0
{
#if MSDOS_NAME_TYPE_PRINT
printf ("MSDOS_NAME_TYPE: LONG[3]\n");
#endif
return MSDOS_NAME_LONG;
ffc18b38: 3b e0 00 02 li r31,2
count++;
name++;
}
if (lowercase && uppercase)
ffc18b3c: 40 be 00 18 bne+ cr7,ffc18b54 <msdos_long_to_short+0x1d4><== NEVER TAKEN
}
#if MSDOS_NAME_TYPE_PRINT
printf ("MSDOS_NAME_TYPE: SHORT[1]\n");
#endif
return MSDOS_NAME_SHORT;
ffc18b40: 3b e0 00 01 li r31,1
ffc18b44: 48 00 00 10 b ffc18b54 <msdos_long_to_short+0x1d4>
if (type == MSDOS_NAME_INVALID)
{
#if MSDOS_L2S_PRINT
printf ("MSDOS_L2S: INVALID[2]: lfn:'%s' SFN:'%s'\n", lfn, sfn);
#endif
return MSDOS_NAME_INVALID;
ffc18b48: 3b e0 00 00 li r31,0 <== NOT EXECUTED
ffc18b4c: 48 00 00 34 b ffc18b80 <msdos_long_to_short+0x200> <== NOT EXECUTED
{
#if MSDOS_NAME_TYPE_PRINT
printf ("MSDOS_NAME_TYPE: LONG[1]: is_dot:%d, at:%d cnt\n",
is_dot, dot_at, count);
#endif
return MSDOS_NAME_LONG;
ffc18b50: 3b e0 00 02 li r31,2
printf ("MSDOS_L2S: INVALID[2]: lfn:'%s' SFN:'%s'\n", lfn, sfn);
#endif
return MSDOS_NAME_INVALID;
}
msdos_filename_unix2dos (lfn, lfn_len, sfn);
ffc18b54: 7f 63 db 78 mr r3,r27
ffc18b58: 7f c4 f3 78 mr r4,r30
ffc18b5c: 7f 45 d3 78 mr r5,r26
ffc18b60: 48 00 28 79 bl ffc1b3d8 <msdos_filename_unix2dos>
#if MSDOS_L2S_PRINT
printf ("MSDOS_L2S: TYPE:%d lfn:'%s' SFN:'%s'\n", type, lfn, sfn);
#endif
return type;
ffc18b64: 48 00 00 1c b ffc18b80 <msdos_long_to_short+0x200>
#endif
if ((type == MSDOS_NAME_INVALID) || (type == MSDOS_NAME_LONG))
return type;
if (dot_at >= 0)
ffc18b68: 2f 99 ff ff cmpwi cr7,r25,-1
ffc18b6c: 40 9e ff 44 bne+ cr7,ffc18ab0 <msdos_long_to_short+0x130>
ffc18b70: 4b ff ff 50 b ffc18ac0 <msdos_long_to_short+0x140>
ffc18b74: 2f 99 ff ff cmpwi cr7,r25,-1
ffc18b78: 40 9e ff d8 bne+ cr7,ffc18b50 <msdos_long_to_short+0x1d0>
ffc18b7c: 4b ff ff 44 b ffc18ac0 <msdos_long_to_short+0x140>
#if MSDOS_L2S_PRINT
printf ("MSDOS_L2S: TYPE:%d lfn:'%s' SFN:'%s'\n", type, lfn, sfn);
#endif
return type;
}
ffc18b80: 39 61 00 38 addi r11,r1,56
ffc18b84: 7f e3 fb 78 mr r3,r31
ffc18b88: 4b fe 8a 48 b ffc015d0 <_restgpr_20_x>
ffc0f3a0 <msdos_mknod>:
msdos_node_type_t type = 0;
/*
* Figure out what type of msdos node this is.
*/
if (S_ISDIR(mode))
ffc0f3a0: 54 ca 04 26 rlwinm r10,r6,0,16,19
ffc0f3a4: 2f 8a 40 00 cmpwi cr7,r10,16384
const char *name,
size_t namelen,
mode_t mode,
dev_t dev
)
{
ffc0f3a8: 7c 8b 23 78 mr r11,r4
ffc0f3ac: 7c a8 2b 78 mr r8,r5
ffc0f3b0: 7c c7 33 78 mr r7,r6
msdos_node_type_t type = 0;
/*
* Figure out what type of msdos node this is.
*/
if (S_ISDIR(mode))
ffc0f3b4: 41 9e 00 24 beq- cr7,ffc0f3d8 <msdos_mknod+0x38>
{
type = MSDOS_DIRECTORY;
}
else if (S_ISREG(mode))
ffc0f3b8: 6d 46 ff ff xoris r6,r10,65535
ffc0f3bc: 2f 86 80 00 cmpwi cr7,r6,-32768
{
type = MSDOS_REGULAR_FILE;
ffc0f3c0: 38 80 00 04 li r4,4
*/
if (S_ISDIR(mode))
{
type = MSDOS_DIRECTORY;
}
else if (S_ISREG(mode))
ffc0f3c4: 41 9e 00 18 beq- cr7,ffc0f3dc <msdos_mknod+0x3c> <== ALWAYS TAKEN
const char *name,
size_t namelen,
mode_t mode,
dev_t dev
)
{
ffc0f3c8: 94 21 ff f8 stwu r1,-8(r1) <== NOT EXECUTED
ffc0f3cc: 7c 08 02 a6 mflr r0 <== NOT EXECUTED
ffc0f3d0: 90 01 00 0c stw r0,12(r1) <== NOT EXECUTED
ffc0f3d4: 48 00 00 18 b ffc0f3ec <msdos_mknod+0x4c> <== NOT EXECUTED
/*
* Figure out what type of msdos node this is.
*/
if (S_ISDIR(mode))
{
type = MSDOS_DIRECTORY;
ffc0f3d8: 38 80 00 00 li r4,0
}
else
rtems_set_errno_and_return_minus_one(EINVAL);
/* Create an MSDOS node */
rc = msdos_creat_node(parentloc, type, name, namelen, mode, NULL);
ffc0f3dc: 7d 06 43 78 mr r6,r8
ffc0f3e0: 7d 65 5b 78 mr r5,r11
ffc0f3e4: 39 00 00 00 li r8,0
ffc0f3e8: 48 00 90 74 b ffc1845c <msdos_creat_node>
else if (S_ISREG(mode))
{
type = MSDOS_REGULAR_FILE;
}
else
rtems_set_errno_and_return_minus_one(EINVAL);
ffc0f3ec: 48 00 cc fd bl ffc1c0e8 <__errno> <== NOT EXECUTED
/* Create an MSDOS node */
rc = msdos_creat_node(parentloc, type, name, namelen, mode, NULL);
return rc;
}
ffc0f3f0: 80 01 00 0c lwz r0,12(r1) <== NOT EXECUTED
else if (S_ISREG(mode))
{
type = MSDOS_REGULAR_FILE;
}
else
rtems_set_errno_and_return_minus_one(EINVAL);
ffc0f3f4: 39 20 00 16 li r9,22 <== NOT EXECUTED
/* Create an MSDOS node */
rc = msdos_creat_node(parentloc, type, name, namelen, mode, NULL);
return rc;
}
ffc0f3f8: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED
else if (S_ISREG(mode))
{
type = MSDOS_REGULAR_FILE;
}
else
rtems_set_errno_and_return_minus_one(EINVAL);
ffc0f3fc: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED
/* Create an MSDOS node */
rc = msdos_creat_node(parentloc, type, name, namelen, mode, NULL);
return rc;
}
ffc0f400: 38 60 ff ff li r3,-1 <== NOT EXECUTED
ffc0f404: 38 21 00 08 addi r1,r1,8 <== NOT EXECUTED
ffc0f408: 4e 80 00 20 blr <== NOT EXECUTED
ffc0f418 <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
)
{
ffc0f418: 94 21 ff f0 stwu r1,-16(r1) <== NOT EXECUTED
ffc0f41c: 7c 08 02 a6 mflr r0 <== NOT EXECUTED
/*
* create new directory entry as "hard link", copying relevant info from
* existing file
*/
rc = msdos_creat_node(new_parent_loc,
ffc0f420: 7c a3 2b 78 mr r3,r5 <== NOT EXECUTED
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
)
{
ffc0f424: 90 01 00 14 stw r0,20(r1) <== NOT EXECUTED
/*
* create new directory entry as "hard link", copying relevant info from
* existing file
*/
rc = msdos_creat_node(new_parent_loc,
ffc0f428: 7c c5 33 78 mr r5,r6 <== NOT EXECUTED
ffc0f42c: 7c e6 3b 78 mr r6,r7 <== NOT EXECUTED
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
)
{
ffc0f430: bf c1 00 08 stmw r30,8(r1) <== NOT EXECUTED
/*
* create new directory entry as "hard link", copying relevant info from
* existing file
*/
rc = msdos_creat_node(new_parent_loc,
ffc0f434: 38 e0 00 00 li r7,0 <== NOT EXECUTED
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
)
{
ffc0f438: 7c 9e 23 78 mr r30,r4 <== NOT EXECUTED
int rc = RC_OK;
fat_file_fd_t *old_fat_fd = old_loc->node_access;
ffc0f43c: 83 e4 00 08 lwz r31,8(r4) <== NOT EXECUTED
/*
* create new directory entry as "hard link", copying relevant info from
* existing file
*/
rc = msdos_creat_node(new_parent_loc,
ffc0f440: 60 e7 80 00 ori r7,r7,32768 <== NOT EXECUTED
ffc0f444: 38 80 00 02 li r4,2 <== NOT EXECUTED
ffc0f448: 7f e8 fb 78 mr r8,r31 <== NOT EXECUTED
ffc0f44c: 48 00 90 11 bl ffc1845c <msdos_creat_node> <== NOT EXECUTED
MSDOS_HARD_LINK,new_name,new_namelen,S_IFREG,
old_fat_fd);
if (rc != RC_OK)
ffc0f450: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc0f454: 40 be 00 24 bne+ cr7,ffc0f478 <msdos_rename+0x60> <== NOT EXECUTED
rc = msdos_set_first_char4file_name(old_loc->mt_entry,
&old_fat_fd->dir_pos,
MSDOS_THIS_DIR_ENTRY_EMPTY);
return rc;
}
ffc0f458: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED
}
/*
* mark file removed
*/
rc = msdos_set_first_char4file_name(old_loc->mt_entry,
ffc0f45c: 38 9f 00 20 addi r4,r31,32 <== NOT EXECUTED
ffc0f460: 80 7e 00 14 lwz r3,20(r30) <== NOT EXECUTED
ffc0f464: 38 a0 00 e5 li r5,229 <== NOT EXECUTED
&old_fat_fd->dir_pos,
MSDOS_THIS_DIR_ENTRY_EMPTY);
return rc;
}
ffc0f468: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED
ffc0f46c: bb c1 00 08 lmw r30,8(r1) <== NOT EXECUTED
ffc0f470: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED
}
/*
* mark file removed
*/
rc = msdos_set_first_char4file_name(old_loc->mt_entry,
ffc0f474: 48 00 99 58 b ffc18dcc <msdos_set_first_char4file_name><== NOT EXECUTED
&old_fat_fd->dir_pos,
MSDOS_THIS_DIR_ENTRY_EMPTY);
return rc;
}
ffc0f478: 39 61 00 10 addi r11,r1,16 <== NOT EXECUTED
ffc0f47c: 4b ff 21 7c b ffc015f8 <_restgpr_30_x> <== NOT EXECUTED
ffc0f480 <msdos_rmnod>:
#include "msdos.h"
int
msdos_rmnod(const rtems_filesystem_location_info_t *parent_pathloc,
const rtems_filesystem_location_info_t *pathloc)
{
ffc0f480: 94 21 ff d8 stwu r1,-40(r1)
ffc0f484: 7c 08 02 a6 mflr r0
ffc0f488: 90 01 00 2c stw r0,44(r1)
ffc0f48c: bf 81 00 18 stmw r28,24(r1)
ffc0f490: 7c 9d 23 78 mr r29,r4
int rc = RC_OK;
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
fat_file_fd_t *fat_fd = pathloc->node_access;
ffc0f494: 83 e4 00 08 lwz r31,8(r4)
int
msdos_rmnod(const rtems_filesystem_location_info_t *parent_pathloc,
const rtems_filesystem_location_info_t *pathloc)
{
int rc = RC_OK;
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
ffc0f498: 80 64 00 14 lwz r3,20(r4)
fat_file_fd_t *fat_fd = pathloc->node_access;
if (fat_fd->fat_file_type == MSDOS_DIRECTORY)
ffc0f49c: 81 5f 00 10 lwz r10,16(r31)
int
msdos_rmnod(const rtems_filesystem_location_info_t *parent_pathloc,
const rtems_filesystem_location_info_t *pathloc)
{
int rc = RC_OK;
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
ffc0f4a0: 83 83 00 08 lwz r28,8(r3)
fat_file_fd_t *fat_fd = pathloc->node_access;
if (fat_fd->fat_file_type == MSDOS_DIRECTORY)
ffc0f4a4: 2f 8a 00 00 cmpwi cr7,r10,0
ffc0f4a8: 40 9e 00 54 bne- cr7,ffc0f4fc <msdos_rmnod+0x7c>
{
bool is_empty = false;
ffc0f4ac: 7c 25 0b 78 mr r5,r1
ffc0f4b0: 9d 45 00 08 stbu r10,8(r5)
/*
* You cannot remove a node that still has children
*/
rc = msdos_dir_is_empty(pathloc->mt_entry, fat_fd, &is_empty);
ffc0f4b4: 7f e4 fb 78 mr r4,r31
ffc0f4b8: 48 00 9a 35 bl ffc18eec <msdos_dir_is_empty>
if (rc != RC_OK)
ffc0f4bc: 7c 7e 1b 79 mr. r30,r3
ffc0f4c0: 40 82 00 60 bne- ffc0f520 <msdos_rmnod+0xa0> <== NEVER TAKEN
{
return rc;
}
if (!is_empty)
ffc0f4c4: 89 21 00 08 lbz r9,8(r1)
ffc0f4c8: 2f 89 00 00 cmpwi cr7,r9,0
ffc0f4cc: 40 be 00 10 bne+ cr7,ffc0f4dc <msdos_rmnod+0x5c>
{
rtems_set_errno_and_return_minus_one(ENOTEMPTY);
ffc0f4d0: 48 00 cc 19 bl ffc1c0e8 <__errno>
ffc0f4d4: 39 20 00 5a li r9,90
ffc0f4d8: 48 00 00 18 b ffc0f4f0 <msdos_rmnod+0x70>
/*
* We deny attempts to delete open directory (if directory is current
* directory we assume it is open one)
*/
if (fat_fd->links_num > 1)
ffc0f4dc: 81 3f 00 08 lwz r9,8(r31)
ffc0f4e0: 2b 89 00 01 cmplwi cr7,r9,1
ffc0f4e4: 40 9d 00 18 ble- cr7,ffc0f4fc <msdos_rmnod+0x7c> <== ALWAYS TAKEN
{
rtems_set_errno_and_return_minus_one(EBUSY);
ffc0f4e8: 48 00 cc 01 bl ffc1c0e8 <__errno> <== NOT EXECUTED
ffc0f4ec: 39 20 00 10 li r9,16 <== NOT EXECUTED
ffc0f4f0: 91 23 00 00 stw r9,0(r3)
ffc0f4f4: 3b c0 ff ff li r30,-1
ffc0f4f8: 48 00 00 28 b ffc0f520 <msdos_rmnod+0xa0>
* not used - mount() not implemenetd yet.
*/
}
/* mark file removed */
rc = msdos_set_first_char4file_name(pathloc->mt_entry, &fat_fd->dir_pos,
ffc0f4fc: 80 7d 00 14 lwz r3,20(r29)
ffc0f500: 38 9f 00 20 addi r4,r31,32
ffc0f504: 38 a0 00 e5 li r5,229
ffc0f508: 48 00 98 c5 bl ffc18dcc <msdos_set_first_char4file_name>
MSDOS_THIS_DIR_ENTRY_EMPTY);
if (rc != RC_OK)
ffc0f50c: 7c 7e 1b 79 mr. r30,r3
ffc0f510: 40 a2 00 10 bne+ ffc0f520 <msdos_rmnod+0xa0> <== NEVER TAKEN
{
return rc;
}
fat_file_mark_removed(&fs_info->fat, fat_fd);
ffc0f514: 7f 83 e3 78 mr r3,r28
ffc0f518: 7f e4 fb 78 mr r4,r31
ffc0f51c: 48 00 43 6d bl ffc13888 <fat_file_mark_removed>
return rc;
}
ffc0f520: 39 61 00 28 addi r11,r1,40
ffc0f524: 7f c3 f3 78 mr r3,r30
ffc0f528: 4b ff 20 c8 b ffc015f0 <_restgpr_28_x>
ffc18b8c <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
)
{
ffc18b8c: 94 21 ff d0 stwu r1,-48(r1)
ffc18b90: 7c 08 02 a6 mflr r0
ffc18b94: 90 01 00 34 stw r0,52(r1)
uint16_t time_val;
uint16_t date;
uint32_t sec = 0;
uint32_t byte = 0;
msdos_date_unix2dos(fat_fd->mtime, &date, &time_val);
ffc18b98: 38 a1 00 0a addi r5,r1,10
int
msdos_set_dir_wrt_time_and_date(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
ffc18b9c: bf 61 00 1c stmw r27,28(r1)
ffc18ba0: 7c 9e 23 78 mr r30,r4
ssize_t ret1 = 0, ret2 = 0, ret3 = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
ffc18ba4: 83 e3 00 08 lwz r31,8(r3)
uint16_t time_val;
uint16_t date;
uint32_t sec = 0;
uint32_t byte = 0;
msdos_date_unix2dos(fat_fd->mtime, &date, &time_val);
ffc18ba8: 80 64 00 40 lwz r3,64(r4)
ffc18bac: 38 81 00 08 addi r4,r1,8
ffc18bb0: 48 00 26 09 bl ffc1b1b8 <msdos_date_unix2dos>
/*
* calculate input for fat_sector_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);
ffc18bb4: 80 9e 00 20 lwz r4,32(r30)
ffc18bb8: 7f e3 fb 78 mr r3,r31
ffc18bbc: 4b ff fd 91 bl ffc1894c <fat_cluster_num_to_sector_num>
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
ffc18bc0: 81 3e 00 24 lwz r9,36(r30)
/* byte points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
ffc18bc4: a3 df 00 00 lhz r30,0(r31)
time_val = CT_LE_W(time_val);
ret1 = fat_sector_write(&fs_info->fat, sec, byte + MSDOS_FILE_WTIME_OFFSET,
ffc18bc8: 38 c0 00 02 li r6,2
/*
* calculate input for fat_sector_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);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
ffc18bcc: 8b bf 00 02 lbz r29,2(r31)
/* byte points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
time_val = CT_LE_W(time_val);
ret1 = fat_sector_write(&fs_info->fat, sec, byte + MSDOS_FILE_WTIME_OFFSET,
ffc18bd0: 38 e1 00 0a addi r7,r1,10
* (sector num, new offset)
*/
sec = fat_cluster_num_to_sector_num(&fs_info->fat, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
/* byte points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
ffc18bd4: 3b de ff ff addi r30,r30,-1
ffc18bd8: 7f de 48 38 and r30,r30,r9
/*
* calculate input for fat_sector_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);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
ffc18bdc: 7d 3d ec 30 srw r29,r9,r29
/* byte points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
time_val = CT_LE_W(time_val);
ffc18be0: a1 21 00 0a lhz r9,10(r1)
/*
* calculate input for fat_sector_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);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
ffc18be4: 7f a3 ea 14 add r29,r3,r29
/* byte points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
time_val = CT_LE_W(time_val);
ffc18be8: 55 2a 40 2e rlwinm r10,r9,8,0,23
ffc18bec: 55 29 c2 3e rlwinm r9,r9,24,8,31
ffc18bf0: 7d 49 4b 78 or r9,r10,r9
ret1 = fat_sector_write(&fs_info->fat, sec, byte + MSDOS_FILE_WTIME_OFFSET,
ffc18bf4: 7f a4 eb 78 mr r4,r29
sec = fat_cluster_num_to_sector_num(&fs_info->fat, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
/* byte points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
time_val = CT_LE_W(time_val);
ffc18bf8: b1 21 00 0a sth r9,10(r1)
ret1 = fat_sector_write(&fs_info->fat, sec, byte + MSDOS_FILE_WTIME_OFFSET,
ffc18bfc: 38 be 00 16 addi r5,r30,22
ffc18c00: 7f e3 fb 78 mr r3,r31
ffc18c04: 4b ff b1 09 bl ffc13d0c <fat_sector_write>
2, (char *)(&time_val));
date = CT_LE_W(date);
ffc18c08: a1 21 00 08 lhz r9,8(r1)
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
/* byte points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
time_val = CT_LE_W(time_val);
ret1 = fat_sector_write(&fs_info->fat, sec, byte + MSDOS_FILE_WTIME_OFFSET,
ffc18c0c: 7c 7b 1b 78 mr r27,r3
2, (char *)(&time_val));
date = CT_LE_W(date);
ffc18c10: 55 2a 40 2e rlwinm r10,r9,8,0,23
ffc18c14: 55 29 c2 3e rlwinm r9,r9,24,8,31
ffc18c18: 7d 49 4b 78 or r9,r10,r9
ret2 = fat_sector_write(&fs_info->fat, sec, byte + MSDOS_FILE_WDATE_OFFSET,
ffc18c1c: 7f a4 eb 78 mr r4,r29
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
time_val = CT_LE_W(time_val);
ret1 = fat_sector_write(&fs_info->fat, sec, byte + MSDOS_FILE_WTIME_OFFSET,
2, (char *)(&time_val));
date = CT_LE_W(date);
ffc18c20: b1 21 00 08 sth r9,8(r1)
ret2 = fat_sector_write(&fs_info->fat, sec, byte + MSDOS_FILE_WDATE_OFFSET,
ffc18c24: 38 be 00 18 addi r5,r30,24
ffc18c28: 38 c0 00 02 li r6,2
ffc18c2c: 38 e1 00 08 addi r7,r1,8
ffc18c30: 7f e3 fb 78 mr r3,r31
ffc18c34: 4b ff b0 d9 bl ffc13d0c <fat_sector_write>
2, (char *)(&date));
ret3 = fat_sector_write(&fs_info->fat, sec, byte + MSDOS_FILE_ADATE_OFFSET,
ffc18c38: 7f a4 eb 78 mr r4,r29
time_val = CT_LE_W(time_val);
ret1 = fat_sector_write(&fs_info->fat, sec, byte + MSDOS_FILE_WTIME_OFFSET,
2, (char *)(&time_val));
date = CT_LE_W(date);
ret2 = fat_sector_write(&fs_info->fat, sec, byte + MSDOS_FILE_WDATE_OFFSET,
ffc18c3c: 7c 7c 1b 78 mr r28,r3
2, (char *)(&date));
ret3 = fat_sector_write(&fs_info->fat, sec, byte + MSDOS_FILE_ADATE_OFFSET,
ffc18c40: 38 be 00 12 addi r5,r30,18
ffc18c44: 7f e3 fb 78 mr r3,r31
ffc18c48: 38 c0 00 02 li r6,2
ffc18c4c: 38 e1 00 08 addi r7,r1,8
ffc18c50: 4b ff b0 bd bl ffc13d0c <fat_sector_write>
2, (char *)(&date));
if ( (ret1 < 0) || (ret2 < 0) || (ret3 < 0) )
ffc18c54: 2f 9b 00 00 cmpwi cr7,r27,0
ffc18c58: 40 bc 00 0c bge+ cr7,ffc18c64 <msdos_set_dir_wrt_time_and_date+0xd8><== ALWAYS TAKEN
return -1;
ffc18c5c: 38 60 ff ff li r3,-1 <== NOT EXECUTED
ffc18c60: 48 00 00 18 b ffc18c78 <msdos_set_dir_wrt_time_and_date+0xec><== NOT EXECUTED
ret2 = fat_sector_write(&fs_info->fat, sec, byte + MSDOS_FILE_WDATE_OFFSET,
2, (char *)(&date));
ret3 = fat_sector_write(&fs_info->fat, sec, byte + MSDOS_FILE_ADATE_OFFSET,
2, (char *)(&date));
if ( (ret1 < 0) || (ret2 < 0) || (ret3 < 0) )
ffc18c64: 2f 9c 00 00 cmpwi cr7,r28,0
ffc18c68: 41 bc ff f4 blt- cr7,ffc18c5c <msdos_set_dir_wrt_time_and_date+0xd0><== NEVER TAKEN
ffc18c6c: 2f 83 00 00 cmpwi cr7,r3,0
ffc18c70: 41 bc ff ec blt- cr7,ffc18c5c <msdos_set_dir_wrt_time_and_date+0xd0><== NEVER TAKEN
return -1;
return RC_OK;
ffc18c74: 38 60 00 00 li r3,0
}
ffc18c78: 39 61 00 30 addi r11,r1,48
ffc18c7c: 4b fe 89 70 b ffc015ec <_restgpr_27_x>
ffc18dcc <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
)
{
ffc18dcc: 94 21 ff d0 stwu r1,-48(r1)
ffc18dd0: 7c 08 02 a6 mflr r0
ffc18dd4: 90 01 00 34 stw r0,52(r1)
ffc18dd8: bf 81 00 20 stmw r28,32(r1)
ssize_t ret;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t dir_block_size;
fat_pos_t start = dir_pos->lname;
ffc18ddc: 81 24 00 08 lwz r9,8(r4)
fat_dir_pos_t *dir_pos,
unsigned char fchar
)
{
ssize_t ret;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
ffc18de0: 83 e3 00 08 lwz r31,8(r3)
uint32_t dir_block_size;
fat_pos_t start = dir_pos->lname;
ffc18de4: 91 21 00 08 stw r9,8(r1)
fat_pos_t end = dir_pos->sname;
ffc18de8: 83 c4 00 00 lwz r30,0(r4)
if ((end.cln == fs_info->fat.vol.rdir_cl) &&
ffc18dec: 81 3f 00 3c lwz r9,60(r31)
)
{
ssize_t ret;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t dir_block_size;
fat_pos_t start = dir_pos->lname;
ffc18df0: 81 44 00 0c lwz r10,12(r4)
fat_pos_t end = dir_pos->sname;
if ((end.cln == fs_info->fat.vol.rdir_cl) &&
ffc18df4: 7f 9e 48 00 cmpw cr7,r30,r9
msdos_set_first_char4file_name(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_dir_pos_t *dir_pos,
unsigned char fchar
)
{
ffc18df8: 98 a1 00 18 stb r5,24(r1)
ssize_t ret;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t dir_block_size;
fat_pos_t start = dir_pos->lname;
ffc18dfc: 91 41 00 0c stw r10,12(r1)
fat_pos_t end = dir_pos->sname;
ffc18e00: 83 84 00 04 lwz r28,4(r4)
if ((end.cln == fs_info->fat.vol.rdir_cl) &&
ffc18e04: 40 be 00 18 bne+ cr7,ffc18e1c <msdos_set_first_char4file_name+0x50><== NEVER TAKEN
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
ffc18e08: 89 3f 00 0e lbz r9,14(r31)
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t dir_block_size;
fat_pos_t start = dir_pos->lname;
fat_pos_t end = dir_pos->sname;
if ((end.cln == fs_info->fat.vol.rdir_cl) &&
ffc18e0c: 71 2a 00 03 andi. r10,r9,3
ffc18e10: 41 82 00 0c beq- ffc18e1c <msdos_set_first_char4file_name+0x50><== NEVER TAKEN
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
dir_block_size = fs_info->fat.vol.rdir_size;
ffc18e14: 83 bf 00 2c lwz r29,44(r31)
ffc18e18: 48 00 00 08 b ffc18e20 <msdos_set_first_char4file_name+0x54>
else
dir_block_size = fs_info->fat.vol.bpc;
ffc18e1c: a3 bf 00 06 lhz r29,6(r31) <== NOT EXECUTED
if (dir_pos->lname.cln == FAT_FILE_SHORT_NAME)
ffc18e20: 81 24 00 08 lwz r9,8(r4)
ffc18e24: 2f 89 ff ff cmpwi cr7,r9,-1
ffc18e28: 40 be 00 14 bne+ cr7,ffc18e3c <msdos_set_first_char4file_name+0x70>
start = dir_pos->sname;
ffc18e2c: 81 24 00 00 lwz r9,0(r4)
ffc18e30: 81 44 00 04 lwz r10,4(r4)
ffc18e34: 91 21 00 08 stw r9,8(r1)
ffc18e38: 91 41 00 0c stw r10,12(r1)
* 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) +
ffc18e3c: 80 81 00 08 lwz r4,8(r1)
ffc18e40: 7f e3 fb 78 mr r3,r31
ffc18e44: 4b ff fb 09 bl ffc1894c <fat_cluster_num_to_sector_num>
(start.ofs >> fs_info->fat.vol.sec_log2));
ffc18e48: 81 21 00 0c lwz r9,12(r1)
ffc18e4c: 88 9f 00 02 lbz r4,2(r31)
uint32_t byte = (start.ofs & (fs_info->fat.vol.bps - 1));
ret = fat_sector_write(&fs_info->fat, sec, byte + MSDOS_FILE_NAME_OFFSET,
ffc18e50: 38 c0 00 01 li r6,1
*/
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));
ffc18e54: a0 bf 00 00 lhz r5,0(r31)
ret = fat_sector_write(&fs_info->fat, sec, byte + MSDOS_FILE_NAME_OFFSET,
ffc18e58: 38 e1 00 18 addi r7,r1,24
* 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));
ffc18e5c: 7d 24 24 30 srw r4,r9,r4
uint32_t byte = (start.ofs & (fs_info->fat.vol.bps - 1));
ffc18e60: 38 a5 ff ff addi r5,r5,-1
* 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) +
ffc18e64: 7c 83 22 14 add r4,r3,r4
(start.ofs >> fs_info->fat.vol.sec_log2));
uint32_t byte = (start.ofs & (fs_info->fat.vol.bps - 1));
ret = fat_sector_write(&fs_info->fat, sec, byte + MSDOS_FILE_NAME_OFFSET,
ffc18e68: 7c a5 48 38 and r5,r5,r9
ffc18e6c: 7f e3 fb 78 mr r3,r31
ffc18e70: 4b ff ae 9d bl ffc13d0c <fat_sector_write>
1, &fchar);
if (ret < 0)
ffc18e74: 2f 83 00 00 cmpwi cr7,r3,0
ffc18e78: 41 9c 00 68 blt- cr7,ffc18ee0 <msdos_set_first_char4file_name+0x114><== NEVER TAKEN
return -1;
if ((start.cln == end.cln) && (start.ofs == end.ofs))
ffc18e7c: 80 81 00 08 lwz r4,8(r1)
ffc18e80: 81 21 00 0c lwz r9,12(r1)
ffc18e84: 7f 84 f0 00 cmpw cr7,r4,r30
ffc18e88: 40 be 00 14 bne+ cr7,ffc18e9c <msdos_set_first_char4file_name+0xd0><== NEVER TAKEN
ffc18e8c: 7f 89 e0 00 cmpw cr7,r9,r28
ffc18e90: 40 be 00 0c bne+ cr7,ffc18e9c <msdos_set_first_char4file_name+0xd0>
return rc;
start.ofs = 0;
}
}
return RC_OK;
ffc18e94: 38 60 00 00 li r3,0
ffc18e98: 48 00 00 4c b ffc18ee4 <msdos_set_first_char4file_name+0x118>
return -1;
if ((start.cln == end.cln) && (start.ofs == end.ofs))
break;
start.ofs += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
ffc18e9c: 39 29 00 20 addi r9,r9,32
if (start.ofs >= dir_block_size)
ffc18ea0: 7f 89 e8 40 cmplw cr7,r9,r29
return -1;
if ((start.cln == end.cln) && (start.ofs == end.ofs))
break;
start.ofs += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
ffc18ea4: 91 21 00 0c stw r9,12(r1)
if (start.ofs >= dir_block_size)
ffc18ea8: 41 9c ff 94 blt+ cr7,ffc18e3c <msdos_set_first_char4file_name+0x70><== ALWAYS TAKEN
{
int rc;
if ((end.cln == fs_info->fat.vol.rdir_cl) &&
ffc18eac: 81 3f 00 3c lwz r9,60(r31) <== NOT EXECUTED
ffc18eb0: 7f 9e 48 00 cmpw cr7,r30,r9 <== NOT EXECUTED
ffc18eb4: 40 9e 00 10 bne- cr7,ffc18ec4 <msdos_set_first_char4file_name+0xf8><== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
ffc18eb8: 89 3f 00 0e lbz r9,14(r31) <== NOT EXECUTED
start.ofs += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
if (start.ofs >= dir_block_size)
{
int rc;
if ((end.cln == fs_info->fat.vol.rdir_cl) &&
ffc18ebc: 71 2a 00 03 andi. r10,r9,3 <== NOT EXECUTED
ffc18ec0: 40 a2 ff d4 bne- ffc18e94 <msdos_set_first_char4file_name+0xc8><== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
break;
rc = fat_get_fat_cluster(&fs_info->fat, start.cln, &start.cln);
ffc18ec4: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc18ec8: 38 a1 00 08 addi r5,r1,8 <== NOT EXECUTED
ffc18ecc: 48 00 11 bd bl ffc1a088 <fat_get_fat_cluster> <== NOT EXECUTED
if ( rc != RC_OK )
ffc18ed0: 2c 03 00 00 cmpwi r3,0 <== NOT EXECUTED
ffc18ed4: 40 82 00 10 bne- ffc18ee4 <msdos_set_first_char4file_name+0x118><== NOT EXECUTED
return rc;
start.ofs = 0;
ffc18ed8: 90 61 00 0c stw r3,12(r1) <== NOT EXECUTED
ffc18edc: 4b ff ff 60 b ffc18e3c <msdos_set_first_char4file_name+0x70><== NOT EXECUTED
uint32_t byte = (start.ofs & (fs_info->fat.vol.bps - 1));
ret = fat_sector_write(&fs_info->fat, sec, byte + MSDOS_FILE_NAME_OFFSET,
1, &fchar);
if (ret < 0)
return -1;
ffc18ee0: 38 60 ff ff li r3,-1 <== NOT EXECUTED
start.ofs = 0;
}
}
return RC_OK;
}
ffc18ee4: 39 61 00 30 addi r11,r1,48
ffc18ee8: 4b fe 87 08 b ffc015f0 <_restgpr_28_x>
ffc18c80 <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
)
{
ffc18c80: 94 21 ff d0 stwu r1,-48(r1)
ffc18c84: 7c 08 02 a6 mflr r0
ssize_t ret1 = 0, ret2 = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t new_cln = fat_fd->cln;
uint16_t le_cl_low = 0;
ffc18c88: 39 20 00 00 li r9,0
int
msdos_set_first_cluster_num(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
ffc18c8c: 90 01 00 34 stw r0,52(r1)
ffc18c90: bf 61 00 1c stmw r27,28(r1)
ffc18c94: 7c 9d 23 78 mr r29,r4
ssize_t ret1 = 0, ret2 = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
ffc18c98: 83 e3 00 08 lwz r31,8(r3)
uint32_t new_cln = fat_fd->cln;
ffc18c9c: 83 c4 00 1c lwz r30,28(r4)
/*
* calculate input for fat_sector_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);
ffc18ca0: 80 84 00 20 lwz r4,32(r4)
ffc18ca4: 7f e3 fb 78 mr r3,r31
)
{
ssize_t ret1 = 0, ret2 = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t new_cln = fat_fd->cln;
uint16_t le_cl_low = 0;
ffc18ca8: b1 21 00 0a sth r9,10(r1)
uint16_t le_cl_hi = 0;
ffc18cac: b1 21 00 08 sth r9,8(r1)
/*
* calculate input for fat_sector_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);
ffc18cb0: 4b ff fc 9d bl ffc1894c <fat_cluster_num_to_sector_num>
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));
ffc18cb4: 57 ca 42 2e rlwinm r10,r30,8,8,23
/*
* calculate input for fat_sector_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);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
ffc18cb8: 81 3d 00 24 lwz r9,36(r29)
/* 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));
ffc18cbc: 7c 27 0b 78 mr r7,r1
* (sector num, new offset)
*/
sec = fat_cluster_num_to_sector_num(&fs_info->fat, fat_fd->dir_pos.sname.cln);
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);
ffc18cc0: a3 bf 00 00 lhz r29,0(r31)
le_cl_low = CT_LE_W((uint16_t )(new_cln & 0x0000FFFF));
ret1 = fat_sector_write(&fs_info->fat, sec,
ffc18cc4: 38 c0 00 02 li r6,2
/*
* calculate input for fat_sector_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);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
ffc18cc8: 8b 9f 00 02 lbz r28,2(r31)
/* byte from points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
ffc18ccc: 3b bd ff ff addi r29,r29,-1
ffc18cd0: 7f bd 48 38 and r29,r29,r9
/*
* calculate input for fat_sector_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);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
ffc18cd4: 7d 3c e4 30 srw r28,r9,r28
/* 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));
ffc18cd8: 57 c9 c6 3e rlwinm r9,r30,24,24,31
ffc18cdc: 7d 49 4b 78 or r9,r10,r9
/*
* calculate input for fat_sector_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);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
ffc18ce0: 7f 83 e2 14 add r28,r3,r28
/* 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));
ffc18ce4: b5 27 00 0a sthu r9,10(r7)
ret1 = fat_sector_write(&fs_info->fat, sec,
ffc18ce8: 7f 84 e3 78 mr r4,r28
ffc18cec: 38 bd 00 1a addi r5,r29,26
byte + MSDOS_FIRST_CLUSTER_LOW_OFFSET, 2,
(char *)(&le_cl_low));
le_cl_hi = CT_LE_W((uint16_t )((new_cln & 0xFFFF0000) >> 16));
ffc18cf0: 57 de 84 3e rlwinm r30,r30,16,16,31
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_sector_write(&fs_info->fat, sec,
ffc18cf4: 7f e3 fb 78 mr r3,r31
ffc18cf8: 4b ff b0 15 bl ffc13d0c <fat_sector_write>
byte + MSDOS_FIRST_CLUSTER_LOW_OFFSET, 2,
(char *)(&le_cl_low));
le_cl_hi = CT_LE_W((uint16_t )((new_cln & 0xFFFF0000) >> 16));
ffc18cfc: 57 c9 40 2e rlwinm r9,r30,8,0,23
ffc18d00: 57 de c2 3e rlwinm r30,r30,24,8,31
ffc18d04: 7d 3e f3 78 or r30,r9,r30
ffc18d08: 7c 27 0b 78 mr r7,r1
ffc18d0c: b7 c7 00 08 sthu r30,8(r7)
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_sector_write(&fs_info->fat, sec,
ffc18d10: 7c 7b 1b 78 mr r27,r3
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_sector_write(&fs_info->fat, sec,
ffc18d14: 7f 84 e3 78 mr r4,r28
ffc18d18: 7f e3 fb 78 mr r3,r31
ffc18d1c: 38 bd 00 14 addi r5,r29,20
ffc18d20: 38 c0 00 02 li r6,2
ffc18d24: 4b ff af e9 bl ffc13d0c <fat_sector_write>
byte + MSDOS_FIRST_CLUSTER_HI_OFFSET, 2,
(char *)(&le_cl_hi));
if ( (ret1 < 0) || (ret2 < 0) )
ffc18d28: 2f 9b 00 00 cmpwi cr7,r27,0
ffc18d2c: 40 bc 00 0c bge+ cr7,ffc18d38 <msdos_set_first_cluster_num+0xb8><== ALWAYS TAKEN
return -1;
ffc18d30: 38 60 ff ff li r3,-1 <== NOT EXECUTED
ffc18d34: 48 00 00 10 b ffc18d44 <msdos_set_first_cluster_num+0xc4><== NOT EXECUTED
(char *)(&le_cl_low));
le_cl_hi = CT_LE_W((uint16_t )((new_cln & 0xFFFF0000) >> 16));
ret2 = fat_sector_write(&fs_info->fat, sec,
byte + MSDOS_FIRST_CLUSTER_HI_OFFSET, 2,
(char *)(&le_cl_hi));
if ( (ret1 < 0) || (ret2 < 0) )
ffc18d38: 2f 83 00 00 cmpwi cr7,r3,0
ffc18d3c: 41 bc ff f4 blt- cr7,ffc18d30 <msdos_set_first_cluster_num+0xb0><== NEVER TAKEN
return -1;
return RC_OK;
ffc18d40: 38 60 00 00 li r3,0
}
ffc18d44: 39 61 00 30 addi r11,r1,48
ffc18d48: 4b fe 88 a4 b ffc015ec <_restgpr_27_x>
ffc0e2b4 <msdos_set_sectors_per_cluster_from_request>:
msdos_format_param_t *fmt_params )
{
int ret_val = -1;
uint32_t onebit;
if ( rqdata != NULL && rqdata->sectors_per_cluster > 0 ) {
ffc0e2b4: 2c 03 00 00 cmpwi r3,0
static int
msdos_set_sectors_per_cluster_from_request(
const msdos_format_request_param_t *rqdata,
msdos_format_param_t *fmt_params )
{
ffc0e2b8: 7c 08 02 a6 mflr r0
ffc0e2bc: 7c 2b 0b 78 mr r11,r1
ffc0e2c0: 94 21 ff f0 stwu r1,-16(r1)
ffc0e2c4: 90 01 00 14 stw r0,20(r1)
ffc0e2c8: 48 01 c9 95 bl ffc2ac5c <_savegpr_31>
int ret_val = -1;
uint32_t onebit;
if ( rqdata != NULL && rqdata->sectors_per_cluster > 0 ) {
ffc0e2cc: 41 82 00 14 beq- ffc0e2e0 <msdos_set_sectors_per_cluster_from_request+0x2c>
ffc0e2d0: 81 23 00 08 lwz r9,8(r3)
ffc0e2d4: 2f 89 00 00 cmpwi cr7,r9,0
ffc0e2d8: 41 9e 00 08 beq- cr7,ffc0e2e0 <msdos_set_sectors_per_cluster_from_request+0x2c>
fmt_params->sectors_per_cluster = rqdata->sectors_per_cluster;
ffc0e2dc: 91 24 00 0c stw r9,12(r4)
*/
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 ) {
ffc0e2e0: 39 00 00 00 li r8,0
static int
msdos_set_sectors_per_cluster_from_request(
const msdos_format_request_param_t *rqdata,
msdos_format_param_t *fmt_params )
{
ffc0e2e4: 39 20 00 80 li r9,128
ffc0e2e8: 3b e0 ff ff li r31,-1
*/
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 ) {
ffc0e2ec: 61 08 80 00 ori r8,r8,32768
* 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 ) {
ffc0e2f0: 81 44 00 0c lwz r10,12(r4)
ffc0e2f4: 7f 8a 48 40 cmplw cr7,r10,r9
ffc0e2f8: 41 9c 00 20 blt- cr7,ffc0e318 <msdos_set_sectors_per_cluster_from_request+0x64>
fmt_params->sectors_per_cluster = onebit;
if ( fmt_params->sectors_per_cluster
<= 32768L / fmt_params->bytes_per_sector ) {
ffc0e2fc: 81 44 00 00 lwz r10,0(r4)
* 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 ) {
fmt_params->sectors_per_cluster = onebit;
ffc0e300: 91 24 00 0c stw r9,12(r4)
if ( fmt_params->sectors_per_cluster
<= 32768L / fmt_params->bytes_per_sector ) {
ffc0e304: 7d 48 53 96 divwu r10,r8,r10
* 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
ffc0e308: 7f 89 50 40 cmplw cr7,r9,r10
ffc0e30c: 41 9d 00 0c bgt- cr7,ffc0e318 <msdos_set_sectors_per_cluster_from_request+0x64><== NEVER TAKEN
<= 32768L / fmt_params->bytes_per_sector ) {
/* value is small enough so this value is ok */
onebit = 1;
ffc0e310: 39 20 00 01 li r9,1
ret_val = 0;
ffc0e314: 3b e0 00 00 li r31,0
* 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 ) {
ffc0e318: 55 29 f8 7f rlwinm. r9,r9,31,1,31
ffc0e31c: 40 82 ff d4 bne+ ffc0e2f0 <msdos_set_sectors_per_cluster_from_request+0x3c>
ret_val = 0;
}
}
}
if (ret_val != 0) {
ffc0e320: 2f 9f 00 00 cmpwi cr7,r31,0
ffc0e324: 41 be 00 10 beq+ cr7,ffc0e334 <msdos_set_sectors_per_cluster_from_request+0x80><== ALWAYS TAKEN
errno = EINVAL;
ffc0e328: 48 00 dd c1 bl ffc1c0e8 <__errno> <== NOT EXECUTED
ffc0e32c: 39 20 00 16 li r9,22 <== NOT EXECUTED
ffc0e330: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED
}
return ret_val;
}
ffc0e334: 39 61 00 10 addi r11,r1,16
ffc0e338: 7f e3 fb 78 mr r3,r31
ffc0e33c: 4b ff 32 c0 b ffc015fc <_restgpr_31_x>
ffc19f2c <msdos_sync>:
return MSDOS_NAME_NOT_FOUND_ERR;
}
int
msdos_sync(rtems_libio_t *iop)
{
ffc19f2c: 94 21 ff f0 stwu r1,-16(r1)
ffc19f30: 7c 08 02 a6 mflr r0
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
ffc19f34: 38 80 00 00 li r4,0
return MSDOS_NAME_NOT_FOUND_ERR;
}
int
msdos_sync(rtems_libio_t *iop)
{
ffc19f38: 90 01 00 14 stw r0,20(r1)
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
ffc19f3c: 38 a0 00 00 li r5,0
int
msdos_sync(rtems_libio_t *iop)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
ffc19f40: 81 23 00 28 lwz r9,40(r3)
return MSDOS_NAME_NOT_FOUND_ERR;
}
int
msdos_sync(rtems_libio_t *iop)
{
ffc19f44: bf c1 00 08 stmw r30,8(r1)
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
ffc19f48: 83 e9 00 08 lwz r31,8(r9)
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
ffc19f4c: 80 7f 00 9c lwz r3,156(r31)
ffc19f50: 4b ff 06 09 bl ffc0a558 <rtems_semaphore_obtain>
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
ffc19f54: 2f 83 00 00 cmpwi cr7,r3,0
ffc19f58: 41 be 00 18 beq+ cr7,ffc19f70 <msdos_sync+0x44> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one(EIO);
ffc19f5c: 48 00 21 8d bl ffc1c0e8 <__errno> <== NOT EXECUTED
ffc19f60: 39 20 00 05 li r9,5 <== NOT EXECUTED
ffc19f64: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED
ffc19f68: 3b c0 ff ff li r30,-1 <== NOT EXECUTED
ffc19f6c: 48 00 00 18 b ffc19f84 <msdos_sync+0x58> <== NOT EXECUTED
rc = fat_sync(&fs_info->fat);
ffc19f70: 7f e3 fb 78 mr r3,r31
ffc19f74: 4b ff a7 cd bl ffc14740 <fat_sync>
ffc19f78: 7c 7e 1b 78 mr r30,r3
rtems_semaphore_release(fs_info->vol_sema);
ffc19f7c: 80 7f 00 9c lwz r3,156(r31)
ffc19f80: 4b ff 06 fd bl ffc0a67c <rtems_semaphore_release>
return rc;
}
ffc19f84: 39 61 00 10 addi r11,r1,16
ffc19f88: 7f c3 f3 78 mr r3,r30
ffc19f8c: 4b fe 76 6c b ffc015f8 <_restgpr_30_x>
ffc0f150 <msdos_unlock>:
rtems_fatal_error_occurred(0xdeadbeef);
}
}
void msdos_unlock(const rtems_filesystem_mount_table_entry_t *mt_entry)
{
ffc0f150: 94 21 ff f8 stwu r1,-8(r1)
ffc0f154: 7c 08 02 a6 mflr r0
ffc0f158: 90 01 00 0c stw r0,12(r1)
msdos_fs_info_t *fs_info = mt_entry->fs_info;
rtems_status_code sc = rtems_semaphore_release(fs_info->vol_sema);
ffc0f15c: 81 23 00 08 lwz r9,8(r3)
ffc0f160: 80 69 00 9c lwz r3,156(r9)
ffc0f164: 4b ff b5 19 bl ffc0a67c <rtems_semaphore_release>
if (sc != RTEMS_SUCCESSFUL) {
ffc0f168: 2f 83 00 00 cmpwi cr7,r3,0
ffc0f16c: 41 be 00 10 beq+ cr7,ffc0f17c <msdos_unlock+0x2c> <== ALWAYS TAKEN
rtems_fatal_error_occurred(0xdeadbeef);
ffc0f170: 3c 60 de ad lis r3,-8531 <== NOT EXECUTED
ffc0f174: 60 63 be ef ori r3,r3,48879 <== NOT EXECUTED
ffc0f178: 4b ff bb 71 bl ffc0ace8 <rtems_fatal_error_occurred> <== NOT EXECUTED
}
}
ffc0f17c: 80 01 00 0c lwz r0,12(r1)
ffc0f180: 38 21 00 08 addi r1,r1,8
ffc0f184: 7c 08 03 a6 mtlr r0
ffc0f188: 4e 80 00 20 blr
ffc050ec <newlib_delete_hook>:
/*
* The reentrancy structure was allocated by newlib using malloc()
*/
if (current_task == deleted_task) {
ffc050ec: 7f 83 20 00 cmpw cr7,r3,r4
void newlib_delete_hook(
rtems_tcb *current_task,
rtems_tcb *deleted_task
)
{
ffc050f0: 94 21 ff e8 stwu r1,-24(r1)
ffc050f4: 7c 08 02 a6 mflr r0
/*
* The reentrancy structure was allocated by newlib using malloc()
*/
if (current_task == deleted_task) {
ptr = _REENT;
ffc050f8: 3d 20 00 00 lis r9,0
void newlib_delete_hook(
rtems_tcb *current_task,
rtems_tcb *deleted_task
)
{
ffc050fc: bf a1 00 0c stmw r29,12(r1)
ffc05100: 7c 7d 1b 78 mr r29,r3
ffc05104: 7c 9e 23 78 mr r30,r4
ffc05108: 90 01 00 1c stw r0,28(r1)
/*
* The reentrancy structure was allocated by newlib using malloc()
*/
if (current_task == deleted_task) {
ptr = _REENT;
ffc0510c: 83 e9 27 e8 lwz r31,10216(r9)
/*
* The reentrancy structure was allocated by newlib using malloc()
*/
if (current_task == deleted_task) {
ffc05110: 41 9e 00 08 beq- cr7,ffc05118 <newlib_delete_hook+0x2c>
ptr = _REENT;
} else {
ptr = deleted_task->libc_reent;
ffc05114: 83 e4 01 48 lwz r31,328(r4)
}
if (ptr && ptr != _global_impure_ptr) {
ffc05118: 2f 9f 00 00 cmpwi cr7,r31,0
ffc0511c: 41 9e 00 2c beq- cr7,ffc05148 <newlib_delete_hook+0x5c> <== NEVER TAKEN
ffc05120: 3d 20 00 00 lis r9,0
ffc05124: 81 29 27 e4 lwz r9,10212(r9)
ffc05128: 7f 9f 48 00 cmpw cr7,r31,r9
ffc0512c: 41 9e 00 1c beq- cr7,ffc05148 <newlib_delete_hook+0x5c>
_reclaim_reent(ptr);
*/
/*
* Just in case there are some buffers lying around.
*/
_fwalk(ptr, newlib_free_buffers);
ffc05130: 3c 80 ff c0 lis r4,-64
ffc05134: 7f e3 fb 78 mr r3,r31
ffc05138: 38 84 4e d0 addi r4,r4,20176
ffc0513c: 48 00 bf 15 bl ffc11050 <_fwalk>
#if REENT_MALLOCED
free(ptr);
#else
_Workspace_Free(ptr);
ffc05140: 7f e3 fb 78 mr r3,r31
ffc05144: 48 00 72 4d bl ffc0c390 <_Workspace_Free>
/*
* Require the switch back to another task to install its own
*/
if ( current_task == deleted_task ) {
ffc05148: 7f 9d f0 00 cmpw cr7,r29,r30
#else
_Workspace_Free(ptr);
#endif
}
deleted_task->libc_reent = NULL;
ffc0514c: 39 20 00 00 li r9,0
ffc05150: 91 3e 01 48 stw r9,328(r30)
/*
* Require the switch back to another task to install its own
*/
if ( current_task == deleted_task ) {
ffc05154: 40 be 00 0c bne+ cr7,ffc05160 <newlib_delete_hook+0x74>
_REENT = 0;
ffc05158: 3d 40 00 00 lis r10,0
ffc0515c: 91 2a 27 e8 stw r9,10216(r10)
}
}
ffc05160: 39 61 00 18 addi r11,r1,24
ffc05164: 4b ff b4 58 b ffc005bc <_restgpr_29_x>
ffc04ed0 <newlib_free_buffers>:
* task.
*/
int newlib_free_buffers(
FILE *fp
)
{
ffc04ed0: 7c 2b 0b 78 mr r11,r1
ffc04ed4: 7c 08 02 a6 mflr r0
ffc04ed8: 94 21 ff f0 stwu r1,-16(r1)
ffc04edc: 48 01 5e e1 bl ffc1adbc <_savegpr_31>
ffc04ee0: 90 01 00 14 stw r0,20(r1)
ffc04ee4: 7c 7f 1b 78 mr r31,r3
switch ( fileno(fp) ) {
ffc04ee8: 48 00 bb b5 bl ffc10a9c <fileno>
ffc04eec: 2b 83 00 02 cmplwi cr7,r3,2
ffc04ef0: 41 9d 00 38 bgt- cr7,ffc04f28 <newlib_free_buffers+0x58><== NEVER TAKEN
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
ffc04ef4: a1 3f 00 0c lhz r9,12(r31)
ffc04ef8: 55 29 06 30 rlwinm r9,r9,0,24,24
ffc04efc: 7d 2a 07 35 extsh. r10,r9
ffc04f00: 41 a2 00 30 beq+ ffc04f30 <newlib_free_buffers+0x60> <== ALWAYS TAKEN
free( fp->_bf._base );
ffc04f04: 80 7f 00 10 lwz r3,16(r31) <== NOT EXECUTED
ffc04f08: 4b ff f6 55 bl ffc0455c <free> <== NOT EXECUTED
fp->_flags &= ~__SMBF;
ffc04f0c: a1 3f 00 0c lhz r9,12(r31) <== NOT EXECUTED
ffc04f10: 55 29 06 6e rlwinm r9,r9,0,25,23 <== NOT EXECUTED
ffc04f14: b1 3f 00 0c sth r9,12(r31) <== NOT EXECUTED
fp->_bf._base = fp->_p = (unsigned char *) NULL;
ffc04f18: 39 20 00 00 li r9,0 <== NOT EXECUTED
ffc04f1c: 91 3f 00 00 stw r9,0(r31) <== NOT EXECUTED
ffc04f20: 91 3f 00 10 stw r9,16(r31) <== NOT EXECUTED
ffc04f24: 48 00 00 0c b ffc04f30 <newlib_free_buffers+0x60> <== NOT EXECUTED
}
break;
default:
fclose(fp);
ffc04f28: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc04f2c: 48 00 b8 0d bl ffc10738 <fclose> <== NOT EXECUTED
}
return 0;
}
ffc04f30: 39 61 00 10 addi r11,r1,16
ffc04f34: 38 60 00 00 li r3,0
ffc04f38: 4b ff b6 8c b ffc005c4 <_restgpr_31_x>
ffc00ba8 <notify>:
void
notify (s)
char *s;
{
ffc00ba8: 94 21 ff f8 stwu r1,-8(r1) <== NOT EXECUTED
ffc00bac: 7c 08 02 a6 mflr r0 <== NOT EXECUTED
ffc00bb0: 7c 64 1b 78 mr r4,r3 <== NOT EXECUTED
printf ("%s test appears to be inconsistent...\n", s);
ffc00bb4: 3c 60 ff c2 lis r3,-62 <== NOT EXECUTED
}
void
notify (s)
char *s;
{
ffc00bb8: 90 01 00 0c stw r0,12(r1) <== NOT EXECUTED
printf ("%s test appears to be inconsistent...\n", s);
ffc00bbc: 38 63 29 16 addi r3,r3,10518 <== NOT EXECUTED
ffc00bc0: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc00bc4: 48 01 71 7d bl ffc17d40 <printf> <== NOT EXECUTED
printf (" PLEASE NOTIFY KARPINKSI!\n");
}
ffc00bc8: 80 01 00 0c lwz r0,12(r1) <== NOT EXECUTED
void
notify (s)
char *s;
{
printf ("%s test appears to be inconsistent...\n", s);
printf (" PLEASE NOTIFY KARPINKSI!\n");
ffc00bcc: 3c 60 ff c2 lis r3,-62 <== NOT EXECUTED
}
ffc00bd0: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED
void
notify (s)
char *s;
{
printf ("%s test appears to be inconsistent...\n", s);
printf (" PLEASE NOTIFY KARPINKSI!\n");
ffc00bd4: 38 63 29 3d addi r3,r3,10557 <== NOT EXECUTED
}
ffc00bd8: 38 21 00 08 addi r1,r1,8 <== NOT EXECUTED
void
notify (s)
char *s;
{
printf ("%s test appears to be inconsistent...\n", s);
printf (" PLEASE NOTIFY KARPINKSI!\n");
ffc00bdc: 48 01 72 e0 b ffc17ebc <puts> <== NOT EXECUTED
ffc07e28 <null_op_fsmount_me>:
rtems_filesystem_mount_table_entry_t *mt_entry,
const void *data
)
{
return -1;
}
ffc07e28: 38 60 ff ff li r3,-1 <== NOT EXECUTED
ffc07e2c: 4e 80 00 20 blr <== NOT EXECUTED
ffc07e38 <null_op_fsunmount_me>:
static void null_op_fsunmount_me(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
ffc07e38: 4e 80 00 20 blr <== NOT EXECUTED
ffc07e00 <null_op_link>:
const char *name,
size_t namelen
)
{
return -1;
}
ffc07e00: 38 60 ff ff li r3,-1 <== NOT EXECUTED
ffc07e04: 4e 80 00 20 blr <== NOT EXECUTED
ffc07e20 <null_op_mount>:
static int null_op_mount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
return -1;
}
ffc07e20: 38 60 ff ff li r3,-1 <== NOT EXECUTED
ffc07e24: 4e 80 00 20 blr <== NOT EXECUTED
ffc07e4c <null_op_readlink>:
char *buf,
size_t bufsize
)
{
return -1;
}
ffc07e4c: 38 60 ff ff li r3,-1 <== NOT EXECUTED
ffc07e50: 4e 80 00 20 blr <== NOT EXECUTED
ffc07e54 <null_op_rename>:
const char *name,
size_t namelen
)
{
return -1;
}
ffc07e54: 38 60 ff ff li r3,-1 <== NOT EXECUTED
ffc07e58: 4e 80 00 20 blr <== NOT EXECUTED
ffc07df8 <null_op_rmnod>:
const rtems_filesystem_location_info_t *parentloc,
const rtems_filesystem_location_info_t *loc
)
{
return -1;
}
ffc07df8: 38 60 ff ff li r3,-1 <== NOT EXECUTED
ffc07dfc: 4e 80 00 20 blr <== NOT EXECUTED
ffc06f70 <oproc>:
/*
* Handle output processing
*/
static void
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
ffc06f70: 7c 2b 0b 78 mr r11,r1
ffc06f74: 7c 08 02 a6 mflr r0
ffc06f78: 94 21 ff e8 stwu r1,-24(r1)
ffc06f7c: 90 01 00 1c stw r0,28(r1)
ffc06f80: 48 01 3e 3d bl ffc1adbc <_savegpr_31>
ffc06f84: 7c 9f 23 78 mr r31,r4
int i;
if (tty->termios.c_oflag & OPOST) {
ffc06f88: 81 24 00 34 lwz r9,52(r4)
/*
* Handle output processing
*/
static void
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
ffc06f8c: 98 61 00 08 stb r3,8(r1)
int i;
if (tty->termios.c_oflag & OPOST) {
ffc06f90: 71 2a 00 01 andi. r10,r9,1
ffc06f94: 41 82 01 38 beq- ffc070cc <oproc+0x15c> <== NEVER TAKEN
switch (c) {
ffc06f98: 2f 83 00 09 cmpwi cr7,r3,9
ffc06f9c: 41 9e 00 98 beq- cr7,ffc07034 <oproc+0xc4>
ffc06fa0: 2b 83 00 09 cmplwi cr7,r3,9
ffc06fa4: 41 9d 00 10 bgt- cr7,ffc06fb4 <oproc+0x44> <== ALWAYS TAKEN
ffc06fa8: 2f 83 00 08 cmpwi cr7,r3,8 <== NOT EXECUTED
ffc06fac: 40 be 00 c8 bne+ cr7,ffc07074 <oproc+0x104> <== NOT EXECUTED
ffc06fb0: 48 00 00 b0 b ffc07060 <oproc+0xf0> <== NOT EXECUTED
ffc06fb4: 2f 83 00 0a cmpwi cr7,r3,10
ffc06fb8: 41 9e 00 10 beq- cr7,ffc06fc8 <oproc+0x58>
ffc06fbc: 2f 83 00 0d cmpwi cr7,r3,13
ffc06fc0: 40 be 00 b4 bne+ cr7,ffc07074 <oproc+0x104> <== ALWAYS TAKEN
ffc06fc4: 48 00 00 34 b ffc06ff8 <oproc+0x88> <== NOT EXECUTED
case '\n':
if (tty->termios.c_oflag & ONLRET)
ffc06fc8: 71 2a 00 20 andi. r10,r9,32
ffc06fcc: 41 82 00 0c beq- ffc06fd8 <oproc+0x68> <== ALWAYS TAKEN
tty->column = 0;
ffc06fd0: 39 40 00 00 li r10,0 <== NOT EXECUTED
ffc06fd4: 91 44 00 28 stw r10,40(r4) <== NOT EXECUTED
if (tty->termios.c_oflag & ONLCR) {
ffc06fd8: 71 2a 00 04 andi. r10,r9,4
ffc06fdc: 41 a2 00 f0 beq+ ffc070cc <oproc+0x15c> <== NEVER TAKEN
rtems_termios_puts ("\r", 1, tty);
ffc06fe0: 3c 60 ff c2 lis r3,-62
ffc06fe4: 38 63 d0 fc addi r3,r3,-12036
ffc06fe8: 38 80 00 01 li r4,1
ffc06fec: 7f e5 fb 78 mr r5,r31
ffc06ff0: 4b ff fe 55 bl ffc06e44 <rtems_termios_puts>
ffc06ff4: 48 00 00 30 b ffc07024 <oproc+0xb4>
tty->column = 0;
}
break;
case '\r':
if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0))
ffc06ff8: 71 2a 00 10 andi. r10,r9,16 <== NOT EXECUTED
ffc06ffc: 41 82 00 10 beq- ffc0700c <oproc+0x9c> <== NOT EXECUTED
ffc07000: 81 44 00 28 lwz r10,40(r4) <== NOT EXECUTED
ffc07004: 2f 8a 00 00 cmpwi cr7,r10,0 <== NOT EXECUTED
ffc07008: 41 9e 00 d4 beq- cr7,ffc070dc <oproc+0x16c> <== NOT EXECUTED
return;
if (tty->termios.c_oflag & OCRNL) {
ffc0700c: 71 2a 00 08 andi. r10,r9,8 <== NOT EXECUTED
ffc07010: 41 82 00 1c beq- ffc0702c <oproc+0xbc> <== NOT EXECUTED
c = '\n';
ffc07014: 39 40 00 0a li r10,10 <== NOT EXECUTED
ffc07018: 99 41 00 08 stb r10,8(r1) <== NOT EXECUTED
if (tty->termios.c_oflag & ONLRET)
ffc0701c: 71 2a 00 20 andi. r10,r9,32 <== NOT EXECUTED
ffc07020: 41 82 00 ac beq- ffc070cc <oproc+0x15c> <== NOT EXECUTED
tty->column = 0;
ffc07024: 39 20 00 00 li r9,0
ffc07028: 48 00 00 a0 b ffc070c8 <oproc+0x158>
break;
}
tty->column = 0;
ffc0702c: 91 5f 00 28 stw r10,40(r31) <== NOT EXECUTED
break;
ffc07030: 48 00 00 9c b ffc070cc <oproc+0x15c> <== NOT EXECUTED
case '\t':
i = 8 - (tty->column & 7);
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
ffc07034: 55 29 04 e8 rlwinm r9,r9,0,19,20
}
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
ffc07038: 81 44 00 28 lwz r10,40(r4)
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
ffc0703c: 2f 89 18 00 cmpwi cr7,r9,6144
}
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
ffc07040: 55 44 07 7e clrlwi r4,r10,29
ffc07044: 20 84 00 08 subfic r4,r4,8
ffc07048: 7d 4a 22 14 add r10,r10,r4
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
tty->column += i;
ffc0704c: 91 5f 00 28 stw r10,40(r31)
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
ffc07050: 40 be 00 7c bne+ cr7,ffc070cc <oproc+0x15c> <== NEVER TAKEN
tty->column += i;
rtems_termios_puts ( " ", i, tty);
ffc07054: 3c 60 ff c2 lis r3,-62
ffc07058: 38 63 c8 71 addi r3,r3,-14223
ffc0705c: 48 00 00 78 b ffc070d4 <oproc+0x164>
}
tty->column += i;
break;
case '\b':
if (tty->column > 0)
ffc07060: 81 24 00 28 lwz r9,40(r4) <== NOT EXECUTED
ffc07064: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED
ffc07068: 40 9d 00 64 ble- cr7,ffc070cc <oproc+0x15c> <== NOT EXECUTED
tty->column--;
ffc0706c: 39 29 ff ff addi r9,r9,-1 <== NOT EXECUTED
ffc07070: 48 00 00 58 b ffc070c8 <oproc+0x158> <== NOT EXECUTED
break;
default:
if (tty->termios.c_oflag & OLCUC)
ffc07074: 71 2a 00 02 andi. r10,r9,2
ffc07078: 41 82 00 28 beq- ffc070a0 <oproc+0x130> <== ALWAYS TAKEN
c = toupper(c);
ffc0707c: 3d 20 00 00 lis r9,0 <== NOT EXECUTED
ffc07080: 81 29 27 e0 lwz r9,10208(r9) <== NOT EXECUTED
ffc07084: 7d 29 1a 14 add r9,r9,r3 <== NOT EXECUTED
ffc07088: 89 29 00 01 lbz r9,1(r9) <== NOT EXECUTED
ffc0708c: 55 29 07 be clrlwi r9,r9,30 <== NOT EXECUTED
ffc07090: 2f 89 00 02 cmpwi cr7,r9,2 <== NOT EXECUTED
ffc07094: 40 be 00 08 bne+ cr7,ffc0709c <oproc+0x12c> <== NOT EXECUTED
ffc07098: 38 63 ff e0 addi r3,r3,-32 <== NOT EXECUTED
ffc0709c: 98 61 00 08 stb r3,8(r1) <== NOT EXECUTED
if (!iscntrl(c))
ffc070a0: 3d 40 00 00 lis r10,0
ffc070a4: 89 21 00 08 lbz r9,8(r1)
ffc070a8: 81 4a 27 e0 lwz r10,10208(r10)
ffc070ac: 7d 2a 4a 14 add r9,r10,r9
ffc070b0: 89 29 00 01 lbz r9,1(r9)
ffc070b4: 55 29 06 b4 rlwinm r9,r9,0,26,26
ffc070b8: 71 2a 00 ff andi. r10,r9,255
ffc070bc: 40 82 00 10 bne- ffc070cc <oproc+0x15c> <== NEVER TAKEN
tty->column++;
ffc070c0: 81 3f 00 28 lwz r9,40(r31)
ffc070c4: 39 29 00 01 addi r9,r9,1
ffc070c8: 91 3f 00 28 stw r9,40(r31)
break;
}
}
rtems_termios_puts (&c, 1, tty);
ffc070cc: 38 61 00 08 addi r3,r1,8
ffc070d0: 38 80 00 01 li r4,1
ffc070d4: 7f e5 fb 78 mr r5,r31
ffc070d8: 4b ff fd 6d bl ffc06e44 <rtems_termios_puts>
}
ffc070dc: 39 61 00 18 addi r11,r1,24
ffc070e0: 4b ff 94 e4 b ffc005c4 <_restgpr_31_x>
ffc05800 <partition_free>:
* RETURNS:
* N/A
*/
static void
partition_free(rtems_part_desc_t *part_desc)
{
ffc05800: 94 21 ff f0 stwu r1,-16(r1)
ffc05804: 7c 08 02 a6 mflr r0
ffc05808: bf c1 00 08 stmw r30,8(r1)
int part_num;
if (part_desc == NULL)
ffc0580c: 7c 7e 1b 79 mr. r30,r3
* RETURNS:
* N/A
*/
static void
partition_free(rtems_part_desc_t *part_desc)
{
ffc05810: 90 01 00 14 stw r0,20(r1)
int part_num;
if (part_desc == NULL)
ffc05814: 41 82 00 64 beq- ffc05878 <partition_free+0x78>
return;
if (is_extended(part_desc->sys_type))
ffc05818: 89 3e 00 01 lbz r9,1(r30)
* true if partition type is extended, false otherwise
*/
static bool
is_extended(uint8_t type)
{
return ((type == EXTENDED_PARTITION) || (type == LINUX_EXTENDED));
ffc0581c: 2f 89 00 05 cmpwi cr7,r9,5
ffc05820: 41 9e 00 14 beq- cr7,ffc05834 <partition_free+0x34> <== NEVER TAKEN
ffc05824: 69 29 00 85 xori r9,r9,133
ffc05828: 7d 29 00 34 cntlzw r9,r9
ffc0582c: 55 29 d9 7e rlwinm r9,r9,27,5,31
ffc05830: 48 00 00 08 b ffc05838 <partition_free+0x38>
ffc05834: 39 20 00 01 li r9,1 <== NOT EXECUTED
int part_num;
if (part_desc == NULL)
return;
if (is_extended(part_desc->sys_type))
ffc05838: 2f 89 00 00 cmpwi cr7,r9,0
ffc0583c: 40 9e 00 1c bne- cr7,ffc05858 <partition_free+0x58> <== NEVER TAKEN
partition_free(part_desc->sub_part[part_num]);
}
}
free(part_desc);
}
ffc05840: 80 01 00 14 lwz r0,20(r1)
{
partition_free(part_desc->sub_part[part_num]);
}
}
free(part_desc);
ffc05844: 7f c3 f3 78 mr r3,r30
}
ffc05848: bb c1 00 08 lmw r30,8(r1)
ffc0584c: 7c 08 03 a6 mtlr r0
ffc05850: 38 21 00 10 addi r1,r1,16
{
partition_free(part_desc->sub_part[part_num]);
}
}
free(part_desc);
ffc05854: 48 00 0e d8 b ffc0672c <free>
int part_num;
if (part_desc == NULL)
return;
if (is_extended(part_desc->sys_type))
ffc05858: 3b e0 00 00 li r31,0 <== NOT EXECUTED
*
* RETURNS:
* N/A
*/
static void
partition_free(rtems_part_desc_t *part_desc)
ffc0585c: 7d 3e fa 14 add r9,r30,r31 <== NOT EXECUTED
{
for (part_num = 0;
part_num < RTEMS_IDE_PARTITION_MAX_SUB_PARTITION_NUMBER;
part_num++)
{
partition_free(part_desc->sub_part[part_num]);
ffc05860: 80 69 00 18 lwz r3,24(r9) <== NOT EXECUTED
ffc05864: 4b ff ff 9d bl ffc05800 <partition_free> <== NOT EXECUTED
if (part_desc == NULL)
return;
if (is_extended(part_desc->sys_type))
{
for (part_num = 0;
ffc05868: 2f 9f 00 0c cmpwi cr7,r31,12 <== NOT EXECUTED
ffc0586c: 3b ff 00 04 addi r31,r31,4 <== NOT EXECUTED
ffc05870: 40 9e ff ec bne+ cr7,ffc0585c <partition_free+0x5c> <== NOT EXECUTED
ffc05874: 4b ff ff cc b ffc05840 <partition_free+0x40> <== NOT EXECUTED
partition_free(part_desc->sub_part[part_num]);
}
}
free(part_desc);
}
ffc05878: 39 61 00 10 addi r11,r1,16
ffc0587c: 4b ff af 74 b ffc007f0 <_restgpr_30_x>
ffc05b5c <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)
{
ffc05b5c: 94 21 ff 90 stwu r1,-112(r1)
ffc05b60: 7c 08 02 a6 mflr r0
ffc05b64: bf 41 00 58 stmw r26,88(r1)
ffc05b68: 7c 9e 23 78 mr r30,r4
struct stat dev_stat;
rtems_status_code rc;
int fd;
fd = open(dev_name, O_RDONLY);
ffc05b6c: 38 80 00 00 li r4,0
* 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)
{
ffc05b70: 90 01 00 74 stw r0,116(r1)
ffc05b74: 7c 7f 1b 78 mr r31,r3
struct stat dev_stat;
rtems_status_code rc;
int fd;
fd = open(dev_name, O_RDONLY);
ffc05b78: 4c c6 31 82 crclr 4*cr1+eq
ffc05b7c: 48 00 1a e1 bl ffc0765c <open>
if (fd < 0)
ffc05b80: 7c 7c 1b 79 mr. r28,r3
ffc05b84: 41 a0 01 d8 blt+ ffc05d5c <partition_table_get+0x200> <== NEVER TAKEN
{
return RTEMS_INTERNAL_ERROR;
}
rc = fstat(fd, &dev_stat);
ffc05b88: 38 81 00 08 addi r4,r1,8
ffc05b8c: 48 00 0c 71 bl ffc067fc <fstat>
if (rc != RTEMS_SUCCESSFUL)
ffc05b90: 2f 83 00 00 cmpwi cr7,r3,0
ffc05b94: 41 9e 00 10 beq- cr7,ffc05ba4 <partition_table_get+0x48><== ALWAYS TAKEN
{
close(fd);
ffc05b98: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED
ffc05b9c: 48 00 0b 09 bl ffc066a4 <close> <== NOT EXECUTED
ffc05ba0: 48 00 01 bc b ffc05d5c <partition_table_get+0x200> <== NOT EXECUTED
return RTEMS_INTERNAL_ERROR;
}
strncpy (disk_desc->dev_name, dev_name, 15);
ffc05ba4: 38 7e 00 08 addi r3,r30,8
ffc05ba8: 7f e4 fb 78 mr r4,r31
ffc05bac: 38 a0 00 0f li r5,15
ffc05bb0: 48 01 1b cd bl ffc1777c <strncpy>
disk_desc->dev = dev_stat.st_rdev;
ffc05bb4: 81 41 00 24 lwz r10,36(r1)
ffc05bb8: 81 21 00 20 lwz r9,32(r1)
ffc05bbc: 91 5e 00 04 stw r10,4(r30)
disk_desc->sector_size = (dev_stat.st_blksize) ? dev_stat.st_blksize :
ffc05bc0: 81 41 00 48 lwz r10,72(r1)
close(fd);
return RTEMS_INTERNAL_ERROR;
}
strncpy (disk_desc->dev_name, dev_name, 15);
disk_desc->dev = dev_stat.st_rdev;
ffc05bc4: 91 3e 00 00 stw r9,0(r30)
disk_desc->sector_size = (dev_stat.st_blksize) ? dev_stat.st_blksize :
ffc05bc8: 39 20 02 00 li r9,512
ffc05bcc: 2f 8a 00 00 cmpwi cr7,r10,0
ffc05bd0: 41 9e 00 08 beq- cr7,ffc05bd8 <partition_table_get+0x7c><== ALWAYS TAKEN
ffc05bd4: 7d 49 53 78 mr r9,r10 <== NOT EXECUTED
ffc05bd8: 91 3e 00 18 stw r9,24(r30)
{
return RTEMS_INTERNAL_ERROR;
}
off = sector_num * RTEMS_IDE_SECTOR_SIZE;
new_off = lseek(fd, off, SEEK_SET);
ffc05bdc: 7f 83 e3 78 mr r3,r28
*/
static rtems_status_code
read_mbr(int fd, rtems_disk_desc_t *disk_desc)
{
int part_num;
rtems_sector_data_t *sector = NULL;
ffc05be0: 39 20 00 00 li r9,0
{
return RTEMS_INTERNAL_ERROR;
}
off = sector_num * RTEMS_IDE_SECTOR_SIZE;
new_off = lseek(fd, off, SEEK_SET);
ffc05be4: 38 a0 00 00 li r5,0
*/
static rtems_status_code
read_mbr(int fd, rtems_disk_desc_t *disk_desc)
{
int part_num;
rtems_sector_data_t *sector = NULL;
ffc05be8: 91 21 00 54 stw r9,84(r1)
{
return RTEMS_INTERNAL_ERROR;
}
off = sector_num * RTEMS_IDE_SECTOR_SIZE;
new_off = lseek(fd, off, SEEK_SET);
ffc05bec: 38 c0 00 00 li r6,0
ffc05bf0: 38 e0 00 00 li r7,0
ffc05bf4: 48 00 10 2d bl ffc06c20 <lseek>
if (new_off != off) {
return RTEMS_IO_ERROR;
ffc05bf8: 3b e0 00 1b li r31,27
return RTEMS_INTERNAL_ERROR;
}
off = sector_num * RTEMS_IDE_SECTOR_SIZE;
new_off = lseek(fd, off, SEEK_SET);
if (new_off != off) {
ffc05bfc: 7c 6a 23 79 or. r10,r3,r4
ffc05c00: 40 a2 00 1c bne+ ffc05c1c <partition_table_get+0xc0> <== NEVER TAKEN
ffc05c04: 7f 83 e3 78 mr r3,r28
ffc05c08: 38 80 00 00 li r4,0
ffc05c0c: 38 a1 00 54 addi r5,r1,84
ffc05c10: 4b ff fb 81 bl ffc05790 <get_sector.part.0>
uint8_t *data;
rtems_status_code rc;
/* get MBR sector */
rc = get_sector(fd, 0, §or);
if (rc != RTEMS_SUCCESSFUL)
ffc05c14: 7c 7f 1b 79 mr. r31,r3
ffc05c18: 41 a2 00 14 beq+ ffc05c2c <partition_table_get+0xd0> <== ALWAYS TAKEN
{
if (sector)
ffc05c1c: 80 61 00 54 lwz r3,84(r1) <== NOT EXECUTED
ffc05c20: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc05c24: 41 9e 01 2c beq- cr7,ffc05d50 <partition_table_get+0x1f4><== NOT EXECUTED
ffc05c28: 48 00 00 64 b ffc05c8c <partition_table_get+0x130> <== NOT EXECUTED
free(sector);
return rc;
}
/* check if the partition table structure is MS-DOS style */
if (!msdos_signature_check(sector))
ffc05c2c: 80 61 00 54 lwz r3,84(r1)
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) &&
ffc05c30: 39 20 00 00 li r9,0
ffc05c34: 89 43 02 02 lbz r10,514(r3)
ffc05c38: 2f 8a 00 55 cmpwi cr7,r10,85
ffc05c3c: 40 be 00 14 bne+ cr7,ffc05c50 <partition_table_get+0xf4><== NEVER TAKEN
ffc05c40: 89 23 02 03 lbz r9,515(r3)
ffc05c44: 69 29 00 aa xori r9,r9,170
ffc05c48: 7d 29 00 34 cntlzw r9,r9
ffc05c4c: 55 29 d9 7e rlwinm r9,r9,27,5,31
free(sector);
return rc;
}
/* check if the partition table structure is MS-DOS style */
if (!msdos_signature_check(sector))
ffc05c50: 2f 89 00 00 cmpwi cr7,r9,0
ffc05c54: 40 9e 00 10 bne- cr7,ffc05c64 <partition_table_get+0x108><== ALWAYS TAKEN
{
free(sector);
ffc05c58: 48 00 0a d5 bl ffc0672c <free> <== NOT EXECUTED
return RTEMS_INTERNAL_ERROR;
ffc05c5c: 3b e0 00 19 li r31,25 <== NOT EXECUTED
ffc05c60: 48 00 00 f0 b ffc05d50 <partition_table_get+0x1f4> <== NOT EXECUTED
}
/* read and process 4 primary partition descriptors */
data = sector->data + RTEMS_IDE_PARTITION_TABLE_OFFSET;
ffc05c64: 3b 43 01 c2 addi r26,r3,450
ffc05c68: 7f db f3 78 mr r27,r30
for (part_num = 0;
ffc05c6c: 3b a0 00 00 li r29,0
* RETURNS:
* 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)
ffc05c70: 57 a3 20 36 rlwinm r3,r29,4,0,27
ffc05c74: 7c 7a 1a 14 add r3,r26,r3
ffc05c78: 38 81 00 50 addi r4,r1,80
ffc05c7c: 4b ff fc 4d bl ffc058c8 <data_to_part_desc.part.1>
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)
ffc05c80: 7c 7f 1b 79 mr. r31,r3
ffc05c84: 41 a2 00 10 beq+ ffc05c94 <partition_table_get+0x138> <== ALWAYS TAKEN
{
free(sector);
ffc05c88: 80 61 00 54 lwz r3,84(r1) <== NOT EXECUTED
ffc05c8c: 48 00 0a a1 bl ffc0672c <free> <== NOT EXECUTED
ffc05c90: 48 00 00 c0 b ffc05d50 <partition_table_get+0x1f4> <== NOT EXECUTED
return rc;
}
if (part_desc != NULL)
ffc05c94: 81 21 00 50 lwz r9,80(r1)
ffc05c98: 2f 89 00 00 cmpwi cr7,r9,0
ffc05c9c: 41 9e 00 2c beq- cr7,ffc05cc8 <partition_table_get+0x16c><== NEVER TAKEN
* RETURNS:
* 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)
ffc05ca0: 39 5d 00 01 addi r10,r29,1
if (part_desc != NULL)
{
part_desc->log_id = part_num + 1;
part_desc->disk_desc = disk_desc;
part_desc->end = part_desc->start + part_desc->size - 1;
ffc05ca4: 81 09 00 04 lwz r8,4(r9)
return rc;
}
if (part_desc != NULL)
{
part_desc->log_id = part_num + 1;
ffc05ca8: 99 49 00 02 stb r10,2(r9)
part_desc->disk_desc = disk_desc;
part_desc->end = part_desc->start + part_desc->size - 1;
ffc05cac: 81 49 00 08 lwz r10,8(r9)
}
if (part_desc != NULL)
{
part_desc->log_id = part_num + 1;
part_desc->disk_desc = disk_desc;
ffc05cb0: 93 c9 00 10 stw r30,16(r9)
part_desc->end = part_desc->start + part_desc->size - 1;
ffc05cb4: 7d 48 52 14 add r10,r8,r10
ffc05cb8: 39 4a ff ff addi r10,r10,-1
ffc05cbc: 91 49 00 0c stw r10,12(r9)
disk_desc->partitions[part_num] = part_desc;
ffc05cc0: 91 3b 00 28 stw r9,40(r27)
ffc05cc4: 48 00 00 08 b ffc05ccc <partition_table_get+0x170>
}
else
{
disk_desc->partitions[part_num] = NULL;
ffc05cc8: 93 fb 00 28 stw r31,40(r27) <== NOT EXECUTED
/* read and process 4 primary partition descriptors */
data = sector->data + RTEMS_IDE_PARTITION_TABLE_OFFSET;
for (part_num = 0;
ffc05ccc: 2f 9d 00 03 cmpwi cr7,r29,3
ffc05cd0: 3b 7b 00 04 addi r27,r27,4
ffc05cd4: 3b bd 00 01 addi r29,r29,1
ffc05cd8: 40 9e ff 98 bne+ cr7,ffc05c70 <partition_table_get+0x114>
}
data += RTEMS_IDE_PARTITION_DESCRIPTOR_SIZE;
}
free(sector);
ffc05cdc: 80 61 00 54 lwz r3,84(r1)
part_desc = disk_desc->partitions[part_num];
if (part_desc != NULL && is_extended(part_desc->sys_type))
{
read_extended_partition(fd, part_desc->start, part_desc);
free(part_desc);
disk_desc->partitions[part_num] = NULL;
ffc05ce0: 3b 40 00 00 li r26,0
}
data += RTEMS_IDE_PARTITION_DESCRIPTOR_SIZE;
}
free(sector);
ffc05ce4: 48 00 0a 49 bl ffc0672c <free>
disk_desc->last_log_id = RTEMS_IDE_PARTITION_MAX_SUB_PARTITION_NUMBER;
ffc05ce8: 93 be 00 24 stw r29,36(r30)
ffc05cec: 3b a0 00 00 li r29,0
* RETURNS:
* 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)
ffc05cf0: 7f 7e ea 14 add r27,r30,r29
but we are to process each primary partition */
for (part_num = 0;
part_num < RTEMS_IDE_PARTITION_MAX_SUB_PARTITION_NUMBER;
part_num++)
{
part_desc = disk_desc->partitions[part_num];
ffc05cf4: 80 bb 00 28 lwz r5,40(r27)
if (part_desc != NULL && is_extended(part_desc->sys_type))
ffc05cf8: 2f 85 00 00 cmpwi cr7,r5,0
but we are to process each primary partition */
for (part_num = 0;
part_num < RTEMS_IDE_PARTITION_MAX_SUB_PARTITION_NUMBER;
part_num++)
{
part_desc = disk_desc->partitions[part_num];
ffc05cfc: 90 a1 00 50 stw r5,80(r1)
if (part_desc != NULL && is_extended(part_desc->sys_type))
ffc05d00: 41 9e 00 44 beq- cr7,ffc05d44 <partition_table_get+0x1e8><== NEVER TAKEN
ffc05d04: 89 25 00 01 lbz r9,1(r5)
* true if partition type is extended, false otherwise
*/
static bool
is_extended(uint8_t type)
{
return ((type == EXTENDED_PARTITION) || (type == LINUX_EXTENDED));
ffc05d08: 2f 89 00 05 cmpwi cr7,r9,5
ffc05d0c: 41 9e 00 14 beq- cr7,ffc05d20 <partition_table_get+0x1c4>
ffc05d10: 69 29 00 85 xori r9,r9,133
ffc05d14: 7d 29 00 34 cntlzw r9,r9
ffc05d18: 55 29 d9 7e rlwinm r9,r9,27,5,31
ffc05d1c: 48 00 00 08 b ffc05d24 <partition_table_get+0x1c8>
ffc05d20: 39 20 00 01 li r9,1
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))
ffc05d24: 2f 89 00 00 cmpwi cr7,r9,0
ffc05d28: 41 be 00 1c beq+ cr7,ffc05d44 <partition_table_get+0x1e8>
{
read_extended_partition(fd, part_desc->start, part_desc);
ffc05d2c: 80 85 00 04 lwz r4,4(r5)
ffc05d30: 7f 83 e3 78 mr r3,r28
ffc05d34: 4b ff fc 71 bl ffc059a4 <read_extended_partition>
free(part_desc);
ffc05d38: 80 61 00 50 lwz r3,80(r1)
ffc05d3c: 48 00 09 f1 bl ffc0672c <free>
disk_desc->partitions[part_num] = NULL;
ffc05d40: 93 5b 00 28 stw r26,40(r27)
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;
ffc05d44: 2f 9d 00 0c cmpwi cr7,r29,12
ffc05d48: 3b bd 00 04 addi r29,r29,4
ffc05d4c: 40 9e ff a4 bne+ cr7,ffc05cf0 <partition_table_get+0x194>
disk_desc->sector_size = (dev_stat.st_blksize) ? dev_stat.st_blksize :
RTEMS_IDE_SECTOR_SIZE;
rc = read_mbr(fd, disk_desc);
close(fd);
ffc05d50: 7f 83 e3 78 mr r3,r28
ffc05d54: 48 00 09 51 bl ffc066a4 <close>
ffc05d58: 48 00 00 08 b ffc05d60 <partition_table_get+0x204>
int fd;
fd = open(dev_name, O_RDONLY);
if (fd < 0)
{
return RTEMS_INTERNAL_ERROR;
ffc05d5c: 3b e0 00 19 li r31,25 <== NOT EXECUTED
rc = read_mbr(fd, disk_desc);
close(fd);
return rc;
}
ffc05d60: 39 61 00 70 addi r11,r1,112
ffc05d64: 7f e3 fb 78 mr r3,r31
ffc05d68: 4b ff aa 78 b ffc007e0 <_restgpr_26_x>
ffc05a78 <pathconf>:
*/
long pathconf(
const char *path,
int name
)
{
ffc05a78: 94 21 ff f0 stwu r1,-16(r1)
ffc05a7c: 7c 08 02 a6 mflr r0
ffc05a80: bf c1 00 08 stmw r30,8(r1)
ffc05a84: 7c 9e 23 78 mr r30,r4
int status;
int fd;
fd = open( path, O_RDONLY );
ffc05a88: 38 80 00 00 li r4,0
*/
long pathconf(
const char *path,
int name
)
{
ffc05a8c: 90 01 00 14 stw r0,20(r1)
int status;
int fd;
fd = open( path, O_RDONLY );
ffc05a90: 4c c6 31 82 crclr 4*cr1+eq
ffc05a94: 4b ff fd c1 bl ffc05854 <open>
if ( fd == -1 )
ffc05a98: 2f 83 ff ff cmpwi cr7,r3,-1
)
{
int status;
int fd;
fd = open( path, O_RDONLY );
ffc05a9c: 7c 7f 1b 78 mr r31,r3
if ( fd == -1 )
ffc05aa0: 41 9e 00 1c beq- cr7,ffc05abc <pathconf+0x44> <== ALWAYS TAKEN
return -1;
status = fpathconf( fd, name );
ffc05aa4: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED
ffc05aa8: 48 00 52 39 bl ffc0ace0 <fpathconf> <== NOT EXECUTED
ffc05aac: 7c 7e 1b 78 mr r30,r3 <== NOT EXECUTED
(void) close( fd );
ffc05ab0: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc05ab4: 48 00 51 a5 bl ffc0ac58 <close> <== NOT EXECUTED
return status;
ffc05ab8: 48 00 00 08 b ffc05ac0 <pathconf+0x48> <== NOT EXECUTED
int status;
int fd;
fd = open( path, O_RDONLY );
if ( fd == -1 )
return -1;
ffc05abc: 3b c0 ff ff li r30,-1
status = fpathconf( fd, name );
(void) close( fd );
return status;
}
ffc05ac0: 39 61 00 10 addi r11,r1,16
ffc05ac4: 7f c3 f3 78 mr r3,r30
ffc05ac8: 48 00 bb 50 b ffc11618 <_restgpr_30_x>
ffc0dc48 <pipe_create>:
static uint16_t rtems_pipe_no = 0;
int pipe_create(
int filsdes[2]
)
{
ffc0dc48: 94 21 ff d8 stwu r1,-40(r1)
ffc0dc4c: 7c 08 02 a6 mflr r0
rtems_libio_t *iop;
int err = 0;
if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0)
ffc0dc50: 38 80 01 ff li r4,511
static uint16_t rtems_pipe_no = 0;
int pipe_create(
int filsdes[2]
)
{
ffc0dc54: bf a1 00 1c stmw r29,28(r1)
ffc0dc58: 7c 7d 1b 78 mr r29,r3
rtems_libio_t *iop;
int err = 0;
if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0)
ffc0dc5c: 3c 60 ff c2 lis r3,-62
ffc0dc60: 38 63 f1 f3 addi r3,r3,-3597
static uint16_t rtems_pipe_no = 0;
int pipe_create(
int filsdes[2]
)
{
ffc0dc64: 90 01 00 2c stw r0,44(r1)
rtems_libio_t *iop;
int err = 0;
if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0)
ffc0dc68: 48 00 15 81 bl ffc0f1e8 <rtems_mkdir>
ffc0dc6c: 2f 83 00 00 cmpwi cr7,r3,0
ffc0dc70: 40 9e 01 00 bne- cr7,ffc0dd70 <pipe_create+0x128>
return -1;
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
ffc0dc74: 3d 20 ff c2 lis r9,-62
ffc0dc78: 3b c1 00 08 addi r30,r1,8
ffc0dc7c: 39 29 f1 f8 addi r9,r9,-3592
ffc0dc80: 7c a9 54 aa lswi r5,r9,10
ffc0dc84: 7c be 55 aa stswi r5,r30,10
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
ffc0dc88: 3d 20 00 00 lis r9,0
ffc0dc8c: 3c 80 ff c2 lis r4,-62
ffc0dc90: a0 a9 2a 1c lhz r5,10780(r9)
ffc0dc94: 38 84 f2 03 addi r4,r4,-3581
ffc0dc98: 38 61 00 12 addi r3,r1,18
ffc0dc9c: 39 45 00 01 addi r10,r5,1
ffc0dca0: b1 49 2a 1c sth r10,10780(r9)
ffc0dca4: 4c c6 31 82 crclr 4*cr1+eq
ffc0dca8: 48 00 4c 29 bl ffc128d0 <sprintf>
/* Try creating FIFO file until find an available file name */
while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) {
ffc0dcac: 7f c3 f3 78 mr r3,r30
ffc0dcb0: 38 80 01 80 li r4,384
ffc0dcb4: 48 00 12 81 bl ffc0ef34 <mkfifo>
ffc0dcb8: 2f 83 00 00 cmpwi cr7,r3,0
ffc0dcbc: 41 be 00 0c beq+ cr7,ffc0dcc8 <pipe_create+0x80> <== ALWAYS TAKEN
if (errno != EEXIST){
ffc0dcc0: 48 00 3d 55 bl ffc11a14 <__errno> <== NOT EXECUTED
ffc0dcc4: 48 00 00 ac b ffc0dd70 <pipe_create+0x128> <== 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);
ffc0dcc8: 7f c3 f3 78 mr r3,r30
ffc0dccc: 38 80 40 00 li r4,16384
ffc0dcd0: 4c c6 31 82 crclr 4*cr1+eq
ffc0dcd4: 4b ff 7c b5 bl ffc05988 <open>
if (filsdes[0] < 0) {
ffc0dcd8: 2f 83 00 00 cmpwi cr7,r3,0
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);
ffc0dcdc: 90 7d 00 00 stw r3,0(r29)
if (filsdes[0] < 0) {
ffc0dce0: 40 bc 00 14 bge+ cr7,ffc0dcf4 <pipe_create+0xac>
err = errno;
ffc0dce4: 48 00 3d 31 bl ffc11a14 <__errno>
ffc0dce8: 83 e3 00 00 lwz r31,0(r3)
/* 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);
ffc0dcec: 7f c3 f3 78 mr r3,r30
ffc0dcf0: 48 00 00 68 b ffc0dd58 <pipe_create+0x110>
}
else {
/* Reset open file to blocking mode */
iop = rtems_libio_iop(filsdes[0]);
ffc0dcf4: 3d 40 00 00 lis r10,0
ffc0dcf8: 81 0a 27 78 lwz r8,10104(r10)
ffc0dcfc: 39 40 00 00 li r10,0
ffc0dd00: 7f 83 40 40 cmplw cr7,r3,r8
ffc0dd04: 40 9c 00 14 bge- cr7,ffc0dd18 <pipe_create+0xd0> <== NEVER TAKEN
ffc0dd08: 3d 40 00 00 lis r10,0
ffc0dd0c: 1d 23 00 38 mulli r9,r3,56
ffc0dd10: 81 4a 28 28 lwz r10,10280(r10)
ffc0dd14: 7d 4a 4a 14 add r10,r10,r9
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
ffc0dd18: 81 2a 00 10 lwz r9,16(r10)
filsdes[1] = open(fifopath, O_WRONLY);
ffc0dd1c: 38 61 00 08 addi r3,r1,8
ffc0dd20: 38 80 00 01 li r4,1
unlink(fifopath);
}
else {
/* Reset open file to blocking mode */
iop = rtems_libio_iop(filsdes[0]);
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
ffc0dd24: 55 29 00 3c rlwinm r9,r9,0,0,30
ffc0dd28: 91 2a 00 10 stw r9,16(r10)
int pipe_create(
int filsdes[2]
)
{
rtems_libio_t *iop;
int err = 0;
ffc0dd2c: 3b e0 00 00 li r31,0
else {
/* Reset open file to blocking mode */
iop = rtems_libio_iop(filsdes[0]);
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
filsdes[1] = open(fifopath, O_WRONLY);
ffc0dd30: 4c c6 31 82 crclr 4*cr1+eq
ffc0dd34: 4b ff 7c 55 bl ffc05988 <open>
if (filsdes[1] < 0) {
ffc0dd38: 2f 83 00 00 cmpwi cr7,r3,0
else {
/* Reset open file to blocking mode */
iop = rtems_libio_iop(filsdes[0]);
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
filsdes[1] = open(fifopath, O_WRONLY);
ffc0dd3c: 90 7d 00 04 stw r3,4(r29)
if (filsdes[1] < 0) {
ffc0dd40: 40 bc 00 14 bge+ cr7,ffc0dd54 <pipe_create+0x10c>
err = errno;
ffc0dd44: 48 00 3c d1 bl ffc11a14 <__errno>
ffc0dd48: 83 e3 00 00 lwz r31,0(r3)
close(filsdes[0]);
ffc0dd4c: 80 7d 00 00 lwz r3,0(r29)
ffc0dd50: 4b ff 6e 39 bl ffc04b88 <close>
}
unlink(fifopath);
ffc0dd54: 38 61 00 08 addi r3,r1,8
ffc0dd58: 4b ff ac b1 bl ffc08a08 <unlink>
}
if(err != 0)
ffc0dd5c: 2f 9f 00 00 cmpwi cr7,r31,0
rtems_set_errno_and_return_minus_one(err);
return 0;
ffc0dd60: 38 60 00 00 li r3,0
err = errno;
close(filsdes[0]);
}
unlink(fifopath);
}
if(err != 0)
ffc0dd64: 41 be 00 10 beq+ cr7,ffc0dd74 <pipe_create+0x12c>
rtems_set_errno_and_return_minus_one(err);
ffc0dd68: 48 00 3c ad bl ffc11a14 <__errno>
ffc0dd6c: 93 e3 00 00 stw r31,0(r3)
{
rtems_libio_t *iop;
int err = 0;
if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0)
return -1;
ffc0dd70: 38 60 ff ff li r3,-1
unlink(fifopath);
}
if(err != 0)
rtems_set_errno_and_return_minus_one(err);
return 0;
}
ffc0dd74: 39 61 00 28 addi r11,r1,40
ffc0dd78: 48 00 f4 f0 b ffc1d268 <_restgpr_29_x>
ffc0f29c <pipe_ioctl>:
ioctl_command_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
if (cmd == FIONREAD) {
ffc0f29c: 6c 89 40 04 xoris r9,r4,16388
ffc0f2a0: 2f 89 66 7f cmpwi cr7,r9,26239
ffc0f2a4: 40 9e 00 54 bne- cr7,ffc0f2f8 <pipe_ioctl+0x5c>
if (buffer == NULL)
ffc0f2a8: 2f 85 00 00 cmpwi cr7,r5,0
pipe_control_t *pipe,
ioctl_command_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
ffc0f2ac: 94 21 ff f0 stwu r1,-16(r1)
ffc0f2b0: 7c 08 02 a6 mflr r0
ffc0f2b4: bf c1 00 08 stmw r30,8(r1)
ffc0f2b8: 7c be 2b 78 mr r30,r5
ffc0f2bc: 90 01 00 14 stw r0,20(r1)
if (cmd == FIONREAD) {
if (buffer == NULL)
ffc0f2c0: 41 9e 00 40 beq- cr7,ffc0f300 <pipe_ioctl+0x64>
ffc0f2c4: 7c 7f 1b 78 mr r31,r3
return -EFAULT;
if (! PIPE_LOCK(pipe))
ffc0f2c8: 80 63 00 28 lwz r3,40(r3)
ffc0f2cc: 38 80 00 00 li r4,0
ffc0f2d0: 38 a0 00 00 li r5,0
ffc0f2d4: 4b ff ac 91 bl ffc09f64 <rtems_semaphore_obtain>
ffc0f2d8: 2f 83 00 00 cmpwi cr7,r3,0
ffc0f2dc: 40 9e 00 2c bne- cr7,ffc0f308 <pipe_ioctl+0x6c> <== NEVER TAKEN
return -EINTR;
/* Return length of pipe */
*(unsigned int *)buffer = pipe->Length;
ffc0f2e0: 81 3f 00 0c lwz r9,12(r31)
PIPE_UNLOCK(pipe);
ffc0f2e4: 80 7f 00 28 lwz r3,40(r31)
if (! PIPE_LOCK(pipe))
return -EINTR;
/* Return length of pipe */
*(unsigned int *)buffer = pipe->Length;
ffc0f2e8: 91 3e 00 00 stw r9,0(r30)
PIPE_UNLOCK(pipe);
ffc0f2ec: 4b ff ad 9d bl ffc0a088 <rtems_semaphore_release>
return 0;
ffc0f2f0: 38 60 00 00 li r3,0
ffc0f2f4: 48 00 00 18 b ffc0f30c <pipe_ioctl+0x70>
}
return -EINVAL;
ffc0f2f8: 38 60 ff ea li r3,-22
}
ffc0f2fc: 4e 80 00 20 blr
rtems_libio_t *iop
)
{
if (cmd == FIONREAD) {
if (buffer == NULL)
return -EFAULT;
ffc0f300: 38 60 ff f2 li r3,-14
ffc0f304: 48 00 00 08 b ffc0f30c <pipe_ioctl+0x70>
if (! PIPE_LOCK(pipe))
return -EINTR;
ffc0f308: 38 60 ff fc li r3,-4 <== NOT EXECUTED
PIPE_UNLOCK(pipe);
return 0;
}
return -EINVAL;
}
ffc0f30c: 39 61 00 10 addi r11,r1,16
ffc0f310: 48 01 18 0c b ffc20b1c <_restgpr_30_x>
ffc0ef00 <pipe_read>:
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
ffc0ef00: 94 21 ff c8 stwu r1,-56(r1)
ffc0ef04: 7c 08 02 a6 mflr r0
ffc0ef08: 90 01 00 3c stw r0,60(r1)
ffc0ef0c: bf 21 00 1c stmw r25,28(r1)
ffc0ef10: 7c 7f 1b 78 mr r31,r3
ffc0ef14: 7c 9a 23 78 mr r26,r4
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
ffc0ef18: 80 63 00 28 lwz r3,40(r3)
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
ffc0ef1c: 7c bb 2b 78 mr r27,r5
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
ffc0ef20: 38 80 00 00 li r4,0
ffc0ef24: 38 a0 00 00 li r5,0
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
ffc0ef28: 7c d9 33 78 mr r25,r6
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
ffc0ef2c: 4b ff b0 39 bl ffc09f64 <rtems_semaphore_obtain>
ffc0ef30: 2f 83 00 00 cmpwi cr7,r3,0
ffc0ef34: 40 9e 01 64 bne- cr7,ffc0f098 <pipe_read+0x198> <== NEVER TAKEN
ffc0ef38: 3b c0 00 00 li r30,0
ffc0ef3c: 48 00 01 30 b ffc0f06c <pipe_read+0x16c>
return -EINTR;
while (read < count) {
while (PIPE_EMPTY(pipe)) {
/* Not an error */
if (pipe->Writers == 0)
ffc0ef40: 81 3f 00 14 lwz r9,20(r31)
ffc0ef44: 2f 89 00 00 cmpwi cr7,r9,0
ffc0ef48: 40 be 00 0c bne+ cr7,ffc0ef54 <pipe_read+0x54>
rtems_libio_t *iop
)
{
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
ffc0ef4c: 3b a0 00 00 li r29,0
ffc0ef50: 48 00 01 2c b ffc0f07c <pipe_read+0x17c>
while (PIPE_EMPTY(pipe)) {
/* Not an error */
if (pipe->Writers == 0)
goto out_locked;
if (LIBIO_NODELAY(iop)) {
ffc0ef54: 81 39 00 10 lwz r9,16(r25)
ffc0ef58: 71 2a 00 01 andi. r10,r9,1
ffc0ef5c: 40 82 01 1c bne- ffc0f078 <pipe_read+0x178>
ret = -EAGAIN;
goto out_locked;
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
ffc0ef60: 81 3f 00 18 lwz r9,24(r31)
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
ret = -EINTR;
ffc0ef64: 3b a0 ff fc li r29,-4
goto out_locked;
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
PIPE_UNLOCK(pipe);
ffc0ef68: 80 7f 00 28 lwz r3,40(r31)
ret = -EAGAIN;
goto out_locked;
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
ffc0ef6c: 39 29 00 01 addi r9,r9,1
ffc0ef70: 91 3f 00 18 stw r9,24(r31)
PIPE_UNLOCK(pipe);
ffc0ef74: 4b ff b1 15 bl ffc0a088 <rtems_semaphore_release>
if (! PIPE_READWAIT(pipe))
ffc0ef78: 80 7f 00 2c lwz r3,44(r31)
ffc0ef7c: 38 80 00 00 li r4,0
ffc0ef80: 48 00 16 5d bl ffc105dc <rtems_barrier_wait>
ffc0ef84: 2f 83 00 00 cmpwi cr7,r3,0
ffc0ef88: 40 9e 00 08 bne- cr7,ffc0ef90 <pipe_read+0x90> <== NEVER TAKEN
ffc0ef8c: 3b a0 00 00 li r29,0
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
ffc0ef90: 80 7f 00 28 lwz r3,40(r31)
ffc0ef94: 38 80 00 00 li r4,0
ffc0ef98: 38 a0 00 00 li r5,0
ffc0ef9c: 4b ff af c9 bl ffc09f64 <rtems_semaphore_obtain>
ffc0efa0: 2f 83 00 00 cmpwi cr7,r3,0
ffc0efa4: 40 9e 00 e4 bne- cr7,ffc0f088 <pipe_read+0x188> <== NEVER TAKEN
/* WARN waitingReaders not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingReaders --;
if (ret != 0)
ffc0efa8: 2f 9d 00 00 cmpwi cr7,r29,0
if (! PIPE_LOCK(pipe)) {
/* WARN waitingReaders not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingReaders --;
ffc0efac: 81 3f 00 18 lwz r9,24(r31)
ffc0efb0: 39 29 ff ff addi r9,r9,-1
ffc0efb4: 91 3f 00 18 stw r9,24(r31)
if (ret != 0)
ffc0efb8: 40 9e 00 c4 bne- cr7,ffc0f07c <pipe_read+0x17c> <== NEVER TAKEN
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
while (PIPE_EMPTY(pipe)) {
ffc0efbc: 83 bf 00 0c lwz r29,12(r31)
ffc0efc0: 2f 9d 00 00 cmpwi cr7,r29,0
ffc0efc4: 41 9e ff 7c beq+ cr7,ffc0ef40 <pipe_read+0x40>
if (ret != 0)
goto out_locked;
}
/* Read chunk bytes */
chunk = MIN(count - read, pipe->Length);
ffc0efc8: 7d 3e d8 50 subf r9,r30,r27
ffc0efcc: 7f 9d 48 40 cmplw cr7,r29,r9
ffc0efd0: 40 9d 00 08 ble- cr7,ffc0efd8 <pipe_read+0xd8>
ffc0efd4: 7d 3d 4b 78 mr r29,r9
chunk1 = pipe->Size - pipe->Start;
ffc0efd8: 81 3f 00 08 lwz r9,8(r31)
if (chunk > chunk1) {
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1);
memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1);
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
ffc0efdc: 7f a5 eb 78 mr r5,r29
goto out_locked;
}
/* Read chunk bytes */
chunk = MIN(count - read, pipe->Length);
chunk1 = pipe->Size - pipe->Start;
ffc0efe0: 83 9f 00 04 lwz r28,4(r31)
ffc0efe4: 7c 7a f2 14 add r3,r26,r30
ffc0efe8: 80 9f 00 00 lwz r4,0(r31)
ffc0efec: 7f 89 e0 50 subf r28,r9,r28
if (chunk > chunk1) {
ffc0eff0: 7f 9d e0 00 cmpw cr7,r29,r28
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1);
ffc0eff4: 7c 84 4a 14 add r4,r4,r9
}
/* Read chunk bytes */
chunk = MIN(count - read, pipe->Length);
chunk1 = pipe->Size - pipe->Start;
if (chunk > chunk1) {
ffc0eff8: 40 9d 00 20 ble- cr7,ffc0f018 <pipe_read+0x118>
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1);
ffc0effc: 7f 85 e3 78 mr r5,r28
ffc0f000: 48 00 46 fd bl ffc136fc <memcpy>
memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1);
ffc0f004: 7c 7e e2 14 add r3,r30,r28
ffc0f008: 7c 7a 1a 14 add r3,r26,r3
ffc0f00c: 80 9f 00 00 lwz r4,0(r31)
ffc0f010: 7c bc e8 50 subf r5,r28,r29
ffc0f014: 48 00 00 04 b ffc0f018 <pipe_read+0x118>
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
ffc0f018: 48 00 46 e5 bl ffc136fc <memcpy>
pipe->Start += chunk;
ffc0f01c: 81 5f 00 08 lwz r10,8(r31)
pipe->Start %= pipe->Size;
ffc0f020: 81 3f 00 04 lwz r9,4(r31)
memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1);
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
pipe->Start += chunk;
ffc0f024: 7d 5d 52 14 add r10,r29,r10
pipe->Start %= pipe->Size;
ffc0f028: 7d 0a 4b 96 divwu r8,r10,r9
ffc0f02c: 7d 28 49 d6 mullw r9,r8,r9
ffc0f030: 7d 49 50 50 subf r10,r9,r10
pipe->Length -= chunk;
ffc0f034: 81 3f 00 0c lwz r9,12(r31)
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
pipe->Start += chunk;
pipe->Start %= pipe->Size;
ffc0f038: 91 5f 00 08 stw r10,8(r31)
pipe->Length -= chunk;
ffc0f03c: 7d 3d 48 50 subf r9,r29,r9
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
ffc0f040: 2f 89 00 00 cmpwi cr7,r9,0
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
pipe->Start += chunk;
pipe->Start %= pipe->Size;
pipe->Length -= chunk;
ffc0f044: 91 3f 00 0c stw r9,12(r31)
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
ffc0f048: 40 9e 00 08 bne- cr7,ffc0f050 <pipe_read+0x150>
pipe->Start = 0;
ffc0f04c: 91 3f 00 08 stw r9,8(r31)
if (pipe->waitingWriters > 0)
ffc0f050: 81 3f 00 1c lwz r9,28(r31)
ffc0f054: 2f 89 00 00 cmpwi cr7,r9,0
ffc0f058: 41 be 00 10 beq+ cr7,ffc0f068 <pipe_read+0x168>
PIPE_WAKEUPWRITERS(pipe);
ffc0f05c: 80 7f 00 30 lwz r3,48(r31)
ffc0f060: 38 81 00 08 addi r4,r1,8
ffc0f064: 48 00 15 09 bl ffc1056c <rtems_barrier_release>
read += chunk;
ffc0f068: 7f de ea 14 add r30,r30,r29
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
ffc0f06c: 7f 9e d8 40 cmplw cr7,r30,r27
ffc0f070: 41 9c ff 4c blt+ cr7,ffc0efbc <pipe_read+0xbc>
ffc0f074: 4b ff fe d8 b ffc0ef4c <pipe_read+0x4c>
/* Not an error */
if (pipe->Writers == 0)
goto out_locked;
if (LIBIO_NODELAY(iop)) {
ret = -EAGAIN;
ffc0f078: 3b a0 ff f5 li r29,-11
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
}
out_locked:
PIPE_UNLOCK(pipe);
ffc0f07c: 80 7f 00 28 lwz r3,40(r31)
ffc0f080: 4b ff b0 09 bl ffc0a088 <rtems_semaphore_release>
ffc0f084: 48 00 00 08 b ffc0f08c <pipe_read+0x18c>
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
/* WARN waitingReaders not restored! */
ret = -EINTR;
ffc0f088: 3b a0 ff fc li r29,-4 <== NOT EXECUTED
out_locked:
PIPE_UNLOCK(pipe);
out_nolock:
if (read > 0)
ffc0f08c: 2f 9e 00 00 cmpwi cr7,r30,0
ffc0f090: 41 bd 00 14 bgt+ cr7,ffc0f0a4 <pipe_read+0x1a4>
ffc0f094: 48 00 00 0c b ffc0f0a0 <pipe_read+0x1a0>
)
{
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
ffc0f098: 3b c0 ff fc li r30,-4 <== NOT EXECUTED
ffc0f09c: 48 00 00 08 b ffc0f0a4 <pipe_read+0x1a4> <== NOT EXECUTED
PIPE_UNLOCK(pipe);
out_nolock:
if (read > 0)
return read;
return ret;
ffc0f0a0: 7f be eb 78 mr r30,r29
}
ffc0f0a4: 39 61 00 38 addi r11,r1,56
ffc0f0a8: 7f c3 f3 78 mr r3,r30
ffc0f0ac: 48 01 1a 5c b ffc20b08 <_restgpr_25_x>
ffc0ea20 <pipe_release>:
void pipe_release(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
ffc0ea20: 94 21 ff d8 stwu r1,-40(r1)
ffc0ea24: 7c 08 02 a6 mflr r0
ffc0ea28: 90 01 00 2c stw r0,44(r1)
/* WARN pipe not released! */
if (!PIPE_LOCK(pipe))
rtems_fatal_error_occurred(0xdeadbeef);
#endif
mode = LIBIO_ACCMODE(iop);
ffc0ea2c: 81 24 00 10 lwz r9,16(r4)
void pipe_release(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
ffc0ea30: bf 81 00 18 stmw r28,24(r1)
ffc0ea34: 7c 7e 1b 78 mr r30,r3
if (!PIPE_LOCK(pipe))
rtems_fatal_error_occurred(0xdeadbeef);
#endif
mode = LIBIO_ACCMODE(iop);
if (mode & LIBIO_FLAGS_READ)
ffc0ea38: 71 2a 00 02 andi. r10,r9,2
void pipe_release(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
pipe_control_t *pipe = *pipep;
ffc0ea3c: 83 e3 00 00 lwz r31,0(r3)
/* WARN pipe not released! */
if (!PIPE_LOCK(pipe))
rtems_fatal_error_occurred(0xdeadbeef);
#endif
mode = LIBIO_ACCMODE(iop);
ffc0ea40: 55 3d 07 7c rlwinm r29,r9,0,29,30
if (mode & LIBIO_FLAGS_READ)
ffc0ea44: 41 82 00 10 beq- ffc0ea54 <pipe_release+0x34>
pipe->Readers --;
ffc0ea48: 81 5f 00 10 lwz r10,16(r31)
ffc0ea4c: 39 4a ff ff addi r10,r10,-1
ffc0ea50: 91 5f 00 10 stw r10,16(r31)
if (mode & LIBIO_FLAGS_WRITE)
ffc0ea54: 71 2a 00 04 andi. r10,r9,4
ffc0ea58: 41 82 00 10 beq- ffc0ea68 <pipe_release+0x48>
pipe->Writers --;
ffc0ea5c: 81 3f 00 14 lwz r9,20(r31)
ffc0ea60: 39 29 ff ff addi r9,r9,-1
ffc0ea64: 91 3f 00 14 stw r9,20(r31)
PIPE_UNLOCK(pipe);
ffc0ea68: 80 7f 00 28 lwz r3,40(r31)
ffc0ea6c: 4b ff b6 1d bl ffc0a088 <rtems_semaphore_release>
if (pipe->Readers == 0 && pipe->Writers == 0) {
ffc0ea70: 81 3f 00 10 lwz r9,16(r31)
ffc0ea74: 2f 89 00 00 cmpwi cr7,r9,0
ffc0ea78: 40 9e 00 30 bne- cr7,ffc0eaa8 <pipe_release+0x88>
ffc0ea7c: 83 9f 00 14 lwz r28,20(r31)
ffc0ea80: 2f 9c 00 00 cmpwi cr7,r28,0
ffc0ea84: 40 be 00 14 bne+ cr7,ffc0ea98 <pipe_release+0x78>
#if 0
/* To delete an anonymous pipe file when all users closed it */
if (pipe->Anonymous)
delfile = TRUE;
#endif
pipe_free(pipe);
ffc0ea88: 7f e3 fb 78 mr r3,r31
ffc0ea8c: 4b ff ff 45 bl ffc0e9d0 <pipe_free>
*pipep = NULL;
ffc0ea90: 93 9e 00 00 stw r28,0(r30)
ffc0ea94: 48 00 00 34 b ffc0eac8 <pipe_release+0xa8>
}
else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE)
ffc0ea98: 2f 9d 00 04 cmpwi cr7,r29,4
ffc0ea9c: 41 be 00 0c beq+ cr7,ffc0eaa8 <pipe_release+0x88> <== NEVER TAKEN
/* Notify waiting Writers that all their partners left */
PIPE_WAKEUPWRITERS(pipe);
ffc0eaa0: 80 7f 00 30 lwz r3,48(r31)
ffc0eaa4: 48 00 00 1c b ffc0eac0 <pipe_release+0xa0>
else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ)
ffc0eaa8: 81 3f 00 14 lwz r9,20(r31)
ffc0eaac: 2f 89 00 00 cmpwi cr7,r9,0
ffc0eab0: 40 9e 00 18 bne- cr7,ffc0eac8 <pipe_release+0xa8> <== NEVER TAKEN
ffc0eab4: 2f 9d 00 02 cmpwi cr7,r29,2
ffc0eab8: 41 9e 00 10 beq- cr7,ffc0eac8 <pipe_release+0xa8> <== NEVER TAKEN
PIPE_WAKEUPREADERS(pipe);
ffc0eabc: 80 7f 00 2c lwz r3,44(r31)
ffc0eac0: 38 81 00 08 addi r4,r1,8
ffc0eac4: 48 00 1a a9 bl ffc1056c <rtems_barrier_release>
#ifdef RTEMS_DEBUG
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc =
#endif
rtems_semaphore_release(pipe_semaphore);
ffc0eac8: 3d 20 00 00 lis r9,0
ffc0eacc: 80 69 2a 1c lwz r3,10780(r9)
ffc0ead0: 4b ff b5 b9 bl ffc0a088 <rtems_semaphore_release>
iop->flags &= ~LIBIO_FLAGS_OPEN;
if(iop->pathinfo.ops->unlink_h(&iop->pathinfo))
return;
#endif
}
ffc0ead4: 39 61 00 28 addi r11,r1,40
ffc0ead8: 48 01 20 3c b ffc20b14 <_restgpr_28_x>
ffc0f0b0 <pipe_write>:
pipe_control_t *pipe,
const void *buffer,
size_t count,
rtems_libio_t *iop
)
{
ffc0f0b0: 94 21 ff c8 stwu r1,-56(r1)
ffc0f0b4: 7c 08 02 a6 mflr r0
ffc0f0b8: bf 01 00 18 stmw r24,24(r1)
int chunk, chunk1, written = 0, ret = 0;
/* Write nothing */
if (count == 0)
ffc0f0bc: 7c bc 2b 79 mr. r28,r5
return 0;
ffc0f0c0: 3b c0 00 00 li r30,0
pipe_control_t *pipe,
const void *buffer,
size_t count,
rtems_libio_t *iop
)
{
ffc0f0c4: 90 01 00 3c stw r0,60(r1)
int chunk, chunk1, written = 0, ret = 0;
/* Write nothing */
if (count == 0)
ffc0f0c8: 41 a2 01 c8 beq+ ffc0f290 <pipe_write+0x1e0> <== NEVER TAKEN
ffc0f0cc: 7c 7f 1b 78 mr r31,r3
return 0;
if (! PIPE_LOCK(pipe))
ffc0f0d0: 80 63 00 28 lwz r3,40(r3)
ffc0f0d4: 7c 99 23 78 mr r25,r4
ffc0f0d8: 38 a0 00 00 li r5,0
ffc0f0dc: 38 80 00 00 li r4,0
ffc0f0e0: 7c d8 33 78 mr r24,r6
ffc0f0e4: 4b ff ae 81 bl ffc09f64 <rtems_semaphore_obtain>
ffc0f0e8: 2f 83 00 00 cmpwi cr7,r3,0
ffc0f0ec: 40 9e 01 98 bne- cr7,ffc0f284 <pipe_write+0x1d4> <== NEVER TAKEN
return -EINTR;
if (pipe->Readers == 0) {
ffc0f0f0: 81 3f 00 10 lwz r9,16(r31)
ffc0f0f4: 2f 89 00 00 cmpwi cr7,r9,0
ffc0f0f8: 41 9e 01 44 beq- cr7,ffc0f23c <pipe_write+0x18c>
ret = -EPIPE;
goto out_locked;
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
ffc0f0fc: 81 3f 00 04 lwz r9,4(r31)
ffc0f100: 3b 40 00 01 li r26,1
ffc0f104: 7f 9c 48 40 cmplw cr7,r28,r9
ffc0f108: 41 9d 00 08 bgt- cr7,ffc0f110 <pipe_write+0x60> <== NEVER TAKEN
ffc0f10c: 7f 9a e3 78 mr r26,r28
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
ret = -EINTR;
ffc0f110: 3b c0 00 00 li r30,0
ffc0f114: 48 00 01 18 b ffc0f22c <pipe_write+0x17c>
/* 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)) {
ffc0f118: 81 38 00 10 lwz r9,16(r24)
ffc0f11c: 71 2a 00 01 andi. r10,r9,1
ffc0f120: 40 82 01 28 bne- ffc0f248 <pipe_write+0x198>
ret = -EAGAIN;
goto out_locked;
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
ffc0f124: 81 3f 00 1c lwz r9,28(r31)
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
ret = -EINTR;
ffc0f128: 3b a0 ff fc li r29,-4
goto out_locked;
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
PIPE_UNLOCK(pipe);
ffc0f12c: 80 7f 00 28 lwz r3,40(r31)
ret = -EAGAIN;
goto out_locked;
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
ffc0f130: 39 29 00 01 addi r9,r9,1
ffc0f134: 91 3f 00 1c stw r9,28(r31)
PIPE_UNLOCK(pipe);
ffc0f138: 4b ff af 51 bl ffc0a088 <rtems_semaphore_release>
if (! PIPE_WRITEWAIT(pipe))
ffc0f13c: 80 7f 00 30 lwz r3,48(r31)
ffc0f140: 38 80 00 00 li r4,0
ffc0f144: 48 00 14 99 bl ffc105dc <rtems_barrier_wait>
ffc0f148: 2f 83 00 00 cmpwi cr7,r3,0
ffc0f14c: 40 9e 00 08 bne- cr7,ffc0f154 <pipe_write+0xa4> <== NEVER TAKEN
ffc0f150: 3b a0 00 00 li r29,0
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
ffc0f154: 80 7f 00 28 lwz r3,40(r31)
ffc0f158: 38 80 00 00 li r4,0
ffc0f15c: 38 a0 00 00 li r5,0
ffc0f160: 4b ff ae 05 bl ffc09f64 <rtems_semaphore_obtain>
ffc0f164: 2f 83 00 00 cmpwi cr7,r3,0
ffc0f168: 40 9e 01 0c bne- cr7,ffc0f274 <pipe_write+0x1c4> <== NEVER TAKEN
/* WARN waitingWriters not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingWriters --;
if (ret != 0)
ffc0f16c: 2f 9d 00 00 cmpwi cr7,r29,0
if (! PIPE_LOCK(pipe)) {
/* WARN waitingWriters not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingWriters --;
ffc0f170: 81 3f 00 1c lwz r9,28(r31)
ffc0f174: 39 29 ff ff addi r9,r9,-1
ffc0f178: 91 3f 00 1c stw r9,28(r31)
if (ret != 0)
ffc0f17c: 40 9e 00 d8 bne- cr7,ffc0f254 <pipe_write+0x1a4> <== NEVER TAKEN
goto out_locked;
if (pipe->Readers == 0) {
ffc0f180: 81 3f 00 10 lwz r9,16(r31)
ffc0f184: 2f 89 00 00 cmpwi cr7,r9,0
ffc0f188: 41 9e 00 c8 beq- cr7,ffc0f250 <pipe_write+0x1a0> <== 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) {
ffc0f18c: 83 7f 00 04 lwz r27,4(r31)
ffc0f190: 81 3f 00 0c lwz r9,12(r31)
ffc0f194: 7f a9 d8 50 subf r29,r9,r27
ffc0f198: 7f 9d d0 40 cmplw cr7,r29,r26
ffc0f19c: 41 9c ff 7c blt+ cr7,ffc0f118 <pipe_write+0x68>
ret = -EPIPE;
goto out_locked;
}
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
ffc0f1a0: 7d 5e e0 50 subf r10,r30,r28
ffc0f1a4: 7f 9d 50 40 cmplw cr7,r29,r10
ffc0f1a8: 40 9d 00 08 ble- cr7,ffc0f1b0 <pipe_write+0x100>
ffc0f1ac: 7d 5d 53 78 mr r29,r10
chunk1 = pipe->Size - PIPE_WSTART(pipe);
ffc0f1b0: 81 5f 00 08 lwz r10,8(r31)
if (chunk > chunk1) {
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1);
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
ffc0f1b4: 7f a5 eb 78 mr r5,r29
ffc0f1b8: 80 7f 00 00 lwz r3,0(r31)
ffc0f1bc: 7c 99 f2 14 add r4,r25,r30
goto out_locked;
}
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
chunk1 = pipe->Size - PIPE_WSTART(pipe);
ffc0f1c0: 7d 49 52 14 add r10,r9,r10
ffc0f1c4: 7d 2a db 96 divwu r9,r10,r27
ffc0f1c8: 7d 29 d9 d6 mullw r9,r9,r27
ffc0f1cc: 7d 29 50 50 subf r9,r9,r10
ffc0f1d0: 7f 69 d8 50 subf r27,r9,r27
if (chunk > chunk1) {
ffc0f1d4: 7f 9d d8 00 cmpw cr7,r29,r27
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1);
ffc0f1d8: 7c 63 4a 14 add r3,r3,r9
}
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
chunk1 = pipe->Size - PIPE_WSTART(pipe);
if (chunk > chunk1) {
ffc0f1dc: 40 9d 00 20 ble- cr7,ffc0f1fc <pipe_write+0x14c>
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1);
ffc0f1e0: 7f 65 db 78 mr r5,r27
ffc0f1e4: 48 00 45 19 bl ffc136fc <memcpy>
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
ffc0f1e8: 7c 9b f2 14 add r4,r27,r30
ffc0f1ec: 80 7f 00 00 lwz r3,0(r31)
ffc0f1f0: 7c 99 22 14 add r4,r25,r4
ffc0f1f4: 7c bb e8 50 subf r5,r27,r29
ffc0f1f8: 48 00 00 04 b ffc0f1fc <pipe_write+0x14c>
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
ffc0f1fc: 48 00 45 01 bl ffc136fc <memcpy>
pipe->Length += chunk;
ffc0f200: 81 3f 00 0c lwz r9,12(r31)
ffc0f204: 7d 29 ea 14 add r9,r9,r29
ffc0f208: 91 3f 00 0c stw r9,12(r31)
if (pipe->waitingReaders > 0)
ffc0f20c: 81 3f 00 18 lwz r9,24(r31)
ffc0f210: 2f 89 00 00 cmpwi cr7,r9,0
ffc0f214: 41 be 00 10 beq+ cr7,ffc0f224 <pipe_write+0x174>
PIPE_WAKEUPREADERS(pipe);
ffc0f218: 80 7f 00 2c lwz r3,44(r31)
ffc0f21c: 38 81 00 08 addi r4,r1,8
ffc0f220: 48 00 13 4d bl ffc1056c <rtems_barrier_release>
written += chunk;
ffc0f224: 7f de ea 14 add r30,r30,r29
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
ffc0f228: 3b 40 00 01 li r26,1
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
ffc0f22c: 7f 9e e0 40 cmplw cr7,r30,r28
ffc0f230: 41 9c ff 5c blt+ cr7,ffc0f18c <pipe_write+0xdc>
ffc0f234: 3b a0 00 00 li r29,0
ffc0f238: 48 00 00 1c b ffc0f254 <pipe_write+0x1a4>
if (! PIPE_LOCK(pipe))
return -EINTR;
if (pipe->Readers == 0) {
ret = -EPIPE;
ffc0f23c: 3b a0 ff e0 li r29,-32
const void *buffer,
size_t count,
rtems_libio_t *iop
)
{
int chunk, chunk1, written = 0, ret = 0;
ffc0f240: 3b c0 00 00 li r30,0
ffc0f244: 48 00 00 10 b ffc0f254 <pipe_write+0x1a4>
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
while (PIPE_SPACE(pipe) < chunk) {
if (LIBIO_NODELAY(iop)) {
ret = -EAGAIN;
ffc0f248: 3b a0 ff f5 li r29,-11
ffc0f24c: 48 00 00 08 b ffc0f254 <pipe_write+0x1a4>
pipe->waitingWriters --;
if (ret != 0)
goto out_locked;
if (pipe->Readers == 0) {
ret = -EPIPE;
ffc0f250: 3b a0 ff e0 li r29,-32 <== NOT EXECUTED
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
}
out_locked:
PIPE_UNLOCK(pipe);
ffc0f254: 80 7f 00 28 lwz r3,40(r31)
ffc0f258: 4b ff ae 31 bl ffc0a088 <rtems_semaphore_release>
out_nolock:
#ifdef RTEMS_POSIX_API
/* Signal SIGPIPE */
if (ret == -EPIPE)
ffc0f25c: 2f 9d ff e0 cmpwi cr7,r29,-32
ffc0f260: 40 be 00 18 bne+ cr7,ffc0f278 <pipe_write+0x1c8>
kill(getpid(), SIGPIPE);
ffc0f264: 48 00 04 75 bl ffc0f6d8 <getpid>
ffc0f268: 38 80 00 0d li r4,13
ffc0f26c: 48 00 0a d1 bl ffc0fd3c <kill>
ffc0f270: 48 00 00 08 b ffc0f278 <pipe_write+0x1c8>
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
/* WARN waitingWriters not restored! */
ret = -EINTR;
ffc0f274: 3b a0 ff fc li r29,-4 <== NOT EXECUTED
/* Signal SIGPIPE */
if (ret == -EPIPE)
kill(getpid(), SIGPIPE);
#endif
if (written > 0)
ffc0f278: 2f 9e 00 00 cmpwi cr7,r30,0
ffc0f27c: 41 bd 00 14 bgt+ cr7,ffc0f290 <pipe_write+0x1e0>
ffc0f280: 48 00 00 0c b ffc0f28c <pipe_write+0x1dc>
/* Write nothing */
if (count == 0)
return 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
ffc0f284: 3b c0 ff fc li r30,-4 <== NOT EXECUTED
ffc0f288: 48 00 00 08 b ffc0f290 <pipe_write+0x1e0> <== NOT EXECUTED
/* Signal SIGPIPE */
if (ret == -EPIPE)
kill(getpid(), SIGPIPE);
#endif
if (written > 0)
ffc0f28c: 7f be eb 78 mr r30,r29
return written;
return ret;
}
ffc0f290: 39 61 00 38 addi r11,r1,56
ffc0f294: 7f c3 f3 78 mr r3,r30
ffc0f298: 48 01 18 6c b ffc20b04 <_restgpr_24_x>
ffc08608 <posix_memalign>:
)
{
/*
* Update call statistics
*/
MSBUMP(memalign_calls, 1);
ffc08608: 3d 40 00 00 lis r10,0
ffc0860c: 39 4a 34 a0 addi r10,r10,13472
ffc08610: 81 0a 00 08 lwz r8,8(r10)
ffc08614: 39 08 00 01 addi r8,r8,1
ffc08618: 91 0a 00 08 stw r8,8(r10)
if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *)))
ffc0861c: 39 44 ff ff addi r10,r4,-1
ffc08620: 7d 48 20 39 and. r8,r10,r4
ffc08624: 40 a2 00 10 bne+ ffc08634 <posix_memalign+0x2c> <== NEVER TAKEN
ffc08628: 2b 84 00 03 cmplwi cr7,r4,3
ffc0862c: 40 bd 00 08 ble+ cr7,ffc08634 <posix_memalign+0x2c>
/*
* rtems_memalign does all of the error checking work EXCEPT
* for adding restrictionso on the alignment.
*/
return rtems_memalign( pointer, alignment, size );
ffc08630: 48 00 02 d8 b ffc08908 <rtems_memalign>
}
ffc08634: 38 60 00 16 li r3,22
ffc08638: 4e 80 00 20 blr
ffc0541c <printk>:
/**
* Kernel printf function requiring minimal infrastructure.
*/
void printk(const char *fmt, ...)
{
ffc0541c: 94 21 ff 88 stwu r1,-120(r1)
ffc05420: 7c 08 02 a6 mflr r0
ffc05424: 90 81 00 1c stw r4,28(r1)
ffc05428: 90 01 00 7c stw r0,124(r1)
ffc0542c: 90 a1 00 20 stw r5,32(r1)
ffc05430: 90 c1 00 24 stw r6,36(r1)
ffc05434: 90 e1 00 28 stw r7,40(r1)
ffc05438: 91 01 00 2c stw r8,44(r1)
ffc0543c: 91 21 00 30 stw r9,48(r1)
ffc05440: 91 41 00 34 stw r10,52(r1)
ffc05444: 40 86 00 24 bne- cr1,ffc05468 <printk+0x4c> <== ALWAYS TAKEN
ffc05448: d8 21 00 38 stfd f1,56(r1) <== NOT EXECUTED
ffc0544c: d8 41 00 40 stfd f2,64(r1) <== NOT EXECUTED
ffc05450: d8 61 00 48 stfd f3,72(r1) <== NOT EXECUTED
ffc05454: d8 81 00 50 stfd f4,80(r1) <== NOT EXECUTED
ffc05458: d8 a1 00 58 stfd f5,88(r1) <== NOT EXECUTED
ffc0545c: d8 c1 00 60 stfd f6,96(r1) <== NOT EXECUTED
ffc05460: d8 e1 00 68 stfd f7,104(r1) <== NOT EXECUTED
ffc05464: d9 01 00 70 stfd f8,112(r1) <== NOT EXECUTED
va_list ap; /* points to each unnamed argument in turn */
va_start(ap, fmt); /* make ap point to 1st unnamed arg */
ffc05468: 39 20 00 01 li r9,1
ffc0546c: 99 21 00 08 stb r9,8(r1)
ffc05470: 39 20 00 00 li r9,0
vprintk(fmt, ap);
ffc05474: 38 81 00 08 addi r4,r1,8
*/
void printk(const char *fmt, ...)
{
va_list ap; /* points to each unnamed argument in turn */
va_start(ap, fmt); /* make ap point to 1st unnamed arg */
ffc05478: 99 21 00 09 stb r9,9(r1)
ffc0547c: 39 21 00 80 addi r9,r1,128
ffc05480: 91 21 00 0c stw r9,12(r1)
ffc05484: 39 21 00 18 addi r9,r1,24
ffc05488: 91 21 00 10 stw r9,16(r1)
vprintk(fmt, ap);
ffc0548c: 48 00 29 d9 bl ffc07e64 <vprintk>
va_end(ap); /* clean up when done */
}
ffc05490: 80 01 00 7c lwz r0,124(r1)
ffc05494: 38 21 00 78 addi r1,r1,120
ffc05498: 7c 08 03 a6 mtlr r0
ffc0549c: 4e 80 00 20 blr
ffc064f8 <printk_plugin>:
int printk_plugin(
void *ignored __attribute__((unused)),
const char *format,
...
)
{
ffc064f8: 94 21 ff 90 stwu r1,-112(r1)
ffc064fc: 7c 08 02 a6 mflr r0
ffc06500: 90 a1 00 18 stw r5,24(r1)
ffc06504: 90 01 00 74 stw r0,116(r1)
ffc06508: 90 c1 00 1c stw r6,28(r1)
ffc0650c: 90 e1 00 20 stw r7,32(r1)
ffc06510: 91 01 00 24 stw r8,36(r1)
ffc06514: 91 21 00 28 stw r9,40(r1)
ffc06518: 91 41 00 2c stw r10,44(r1)
ffc0651c: 40 86 00 24 bne- cr1,ffc06540 <printk_plugin+0x48> <== ALWAYS TAKEN
ffc06520: d8 21 00 30 stfd f1,48(r1) <== NOT EXECUTED
ffc06524: d8 41 00 38 stfd f2,56(r1) <== NOT EXECUTED
ffc06528: d8 61 00 40 stfd f3,64(r1) <== NOT EXECUTED
ffc0652c: d8 81 00 48 stfd f4,72(r1) <== NOT EXECUTED
ffc06530: d8 a1 00 50 stfd f5,80(r1) <== NOT EXECUTED
ffc06534: d8 c1 00 58 stfd f6,88(r1) <== NOT EXECUTED
ffc06538: d8 e1 00 60 stfd f7,96(r1) <== NOT EXECUTED
ffc0653c: d9 01 00 68 stfd f8,104(r1) <== NOT EXECUTED
va_list arg_pointer;
va_start (arg_pointer, format);
ffc06540: 39 20 00 02 li r9,2
ffc06544: 99 21 00 08 stb r9,8(r1)
ffc06548: 39 20 00 00 li r9,0
vprintk( format, arg_pointer );
ffc0654c: 7c 83 23 78 mr r3,r4
...
)
{
va_list arg_pointer;
va_start (arg_pointer, format);
ffc06550: 99 21 00 09 stb r9,9(r1)
ffc06554: 39 21 00 78 addi r9,r1,120
vprintk( format, arg_pointer );
ffc06558: 38 81 00 08 addi r4,r1,8
...
)
{
va_list arg_pointer;
va_start (arg_pointer, format);
ffc0655c: 91 21 00 0c stw r9,12(r1)
ffc06560: 39 21 00 10 addi r9,r1,16
ffc06564: 91 21 00 10 stw r9,16(r1)
vprintk( format, arg_pointer );
ffc06568: 48 00 29 dd bl ffc08f44 <vprintk>
va_end(arg_pointer); /* clean up when done */
return 0;
}
ffc0656c: 38 60 00 00 li r3,0
ffc06570: 80 01 00 74 lwz r0,116(r1)
ffc06574: 38 21 00 70 addi r1,r1,112
ffc06578: 7c 08 03 a6 mtlr r0
ffc0657c: 4e 80 00 20 blr
ffc0d6a8 <pthread_attr_setschedpolicy>:
int pthread_attr_setschedpolicy(
pthread_attr_t *attr,
int policy
)
{
if ( !attr || !attr->is_initialized )
ffc0d6a8: 7c 69 1b 79 mr. r9,r3
ffc0d6ac: 41 82 00 38 beq- ffc0d6e4 <pthread_attr_setschedpolicy+0x3c>
ffc0d6b0: 81 49 00 00 lwz r10,0(r9)
return EINVAL;
ffc0d6b4: 38 60 00 16 li r3,22
int pthread_attr_setschedpolicy(
pthread_attr_t *attr,
int policy
)
{
if ( !attr || !attr->is_initialized )
ffc0d6b8: 2f 8a 00 00 cmpwi cr7,r10,0
ffc0d6bc: 4d be 00 20 beqlr+ cr7
return EINVAL;
switch ( policy ) {
ffc0d6c0: 2b 84 00 04 cmplwi cr7,r4,4
ffc0d6c4: 41 9d 00 28 bgt- cr7,ffc0d6ec <pthread_attr_setschedpolicy+0x44>
ffc0d6c8: 39 40 00 01 li r10,1
ffc0d6cc: 7d 4a 20 30 slw r10,r10,r4
ffc0d6d0: 71 48 00 17 andi. r8,r10,23
ffc0d6d4: 41 82 00 18 beq- ffc0d6ec <pthread_attr_setschedpolicy+0x44><== NEVER TAKEN
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
case SCHED_SPORADIC:
attr->schedpolicy = policy;
ffc0d6d8: 90 89 00 14 stw r4,20(r9)
return 0;
ffc0d6dc: 38 60 00 00 li r3,0
ffc0d6e0: 4e 80 00 20 blr
pthread_attr_t *attr,
int policy
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
ffc0d6e4: 38 60 00 16 li r3,22
ffc0d6e8: 4e 80 00 20 blr
case SCHED_SPORADIC:
attr->schedpolicy = policy;
return 0;
default:
return ENOTSUP;
ffc0d6ec: 38 60 00 86 li r3,134
}
}
ffc0d6f0: 4e 80 00 20 blr
ffc08858 <pthread_barrier_init>:
int pthread_barrier_init(
pthread_barrier_t *barrier,
const pthread_barrierattr_t *attr,
unsigned int count
)
{
ffc08858: 94 21 ff d8 stwu r1,-40(r1)
ffc0885c: 7c 08 02 a6 mflr r0
ffc08860: bf 81 00 18 stmw r28,24(r1)
const pthread_barrierattr_t *the_attr;
/*
* Error check parameters
*/
if ( !barrier )
ffc08864: 7c 7c 1b 79 mr. r28,r3
int pthread_barrier_init(
pthread_barrier_t *barrier,
const pthread_barrierattr_t *attr,
unsigned int count
)
{
ffc08868: 90 01 00 2c stw r0,44(r1)
const pthread_barrierattr_t *the_attr;
/*
* Error check parameters
*/
if ( !barrier )
ffc0886c: 40 a2 00 08 bne+ ffc08874 <pthread_barrier_init+0x1c>
ffc08870: 48 00 00 ac b ffc0891c <pthread_barrier_init+0xc4>
return EINVAL;
if ( count == 0 )
ffc08874: 2f 85 00 00 cmpwi cr7,r5,0
ffc08878: 7c bf 2b 78 mr r31,r5
ffc0887c: 41 be 00 a0 beq+ cr7,ffc0891c <pthread_barrier_init+0xc4>
return EINVAL;
/*
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
ffc08880: 2f 84 00 00 cmpwi cr7,r4,0
ffc08884: 7c 89 23 78 mr r9,r4
ffc08888: 40 be 00 10 bne+ cr7,ffc08898 <pthread_barrier_init+0x40>
the_attr = attr;
} else {
(void) pthread_barrierattr_init( &my_attr );
ffc0888c: 38 61 00 08 addi r3,r1,8
ffc08890: 4b ff fe dd bl ffc0876c <pthread_barrierattr_init>
the_attr = &my_attr;
ffc08894: 39 21 00 08 addi r9,r1,8
}
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
ffc08898: 81 49 00 00 lwz r10,0(r9)
ffc0889c: 2f 8a 00 00 cmpwi cr7,r10,0
ffc088a0: 41 be 00 7c beq+ cr7,ffc0891c <pthread_barrier_init+0xc4>
return EINVAL;
switch ( the_attr->process_shared ) {
ffc088a4: 83 c9 00 04 lwz r30,4(r9)
ffc088a8: 2f 9e 00 00 cmpwi cr7,r30,0
ffc088ac: 40 9e 00 70 bne- cr7,ffc0891c <pthread_barrier_init+0xc4><== NEVER TAKEN
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
ffc088b0: 3d 20 00 00 lis r9,0
}
/*
* Convert from POSIX attributes to Core Barrier attributes
*/
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
ffc088b4: 93 c1 00 10 stw r30,16(r1)
ffc088b8: 81 49 28 90 lwz r10,10384(r9)
the_attributes.maximum_count = count;
ffc088bc: 93 e1 00 14 stw r31,20(r1)
++level;
ffc088c0: 39 4a 00 01 addi r10,r10,1
_Thread_Dispatch_disable_level = level;
ffc088c4: 91 49 28 90 stw r10,10384(r9)
* 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 *)
ffc088c8: 3f a0 00 00 lis r29,0
ffc088cc: 3b bd 30 00 addi r29,r29,12288
ffc088d0: 7f a3 eb 78 mr r3,r29
ffc088d4: 48 00 22 69 bl ffc0ab3c <_Objects_Allocate>
*/
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _POSIX_Barrier_Allocate();
if ( !the_barrier ) {
ffc088d8: 7c 7f 1b 79 mr. r31,r3
ffc088dc: 40 a2 00 10 bne+ ffc088ec <pthread_barrier_init+0x94>
_Thread_Enable_dispatch();
ffc088e0: 48 00 35 a5 bl ffc0be84 <_Thread_Enable_dispatch>
return EAGAIN;
ffc088e4: 38 60 00 0b li r3,11
ffc088e8: 48 00 00 38 b ffc08920 <pthread_barrier_init+0xc8>
}
_CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes );
ffc088ec: 38 7f 00 10 addi r3,r31,16
ffc088f0: 38 81 00 10 addi r4,r1,16
ffc088f4: 48 00 18 09 bl ffc0a0fc <_CORE_barrier_Initialize>
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
ffc088f8: 81 3f 00 08 lwz r9,8(r31)
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
ffc088fc: 81 1d 00 1c lwz r8,28(r29)
ffc08900: 55 2a 13 ba rlwinm r10,r9,2,14,29
ffc08904: 7f e8 51 2e stwx r31,r8,r10
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
ffc08908: 93 df 00 0c stw r30,12(r31)
);
/*
* Exit the critical section and return the user an operational barrier
*/
*barrier = the_barrier->Object.id;
ffc0890c: 91 3c 00 00 stw r9,0(r28)
_Thread_Enable_dispatch();
ffc08910: 48 00 35 75 bl ffc0be84 <_Thread_Enable_dispatch>
return 0;
ffc08914: 38 60 00 00 li r3,0
ffc08918: 48 00 00 08 b ffc08920 <pthread_barrier_init+0xc8>
switch ( the_attr->process_shared ) {
case PTHREAD_PROCESS_PRIVATE: /* only supported values */
break;
case PTHREAD_PROCESS_SHARED:
default:
return EINVAL;
ffc0891c: 38 60 00 16 li r3,22
* Exit the critical section and return the user an operational barrier
*/
*barrier = the_barrier->Object.id;
_Thread_Enable_dispatch();
return 0;
}
ffc08920: 39 61 00 28 addi r11,r1,40
ffc08924: 4b ff 85 8c b ffc00eb0 <_restgpr_28_x>
ffc0802c <pthread_cleanup_push>:
void pthread_cleanup_push(
void (*routine)( void * ),
void *arg
)
{
ffc0802c: 94 21 ff f0 stwu r1,-16(r1)
ffc08030: 7c 08 02 a6 mflr r0
ffc08034: bf c1 00 08 stmw r30,8(r1)
/*
* 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 )
ffc08038: 7c 7e 1b 79 mr. r30,r3
void pthread_cleanup_push(
void (*routine)( void * ),
void *arg
)
{
ffc0803c: 90 01 00 14 stw r0,20(r1)
/*
* 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 )
ffc08040: 41 82 00 58 beq- ffc08098 <pthread_cleanup_push+0x6c>
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
ffc08044: 3d 20 00 00 lis r9,0
ffc08048: 81 49 28 68 lwz r10,10344(r9)
ffc0804c: 7c 9f 23 78 mr r31,r4
++level;
ffc08050: 39 4a 00 01 addi r10,r10,1
_Thread_Dispatch_disable_level = level;
ffc08054: 91 49 28 68 stw r10,10344(r9)
return;
_Thread_Disable_dispatch();
handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) );
ffc08058: 38 60 00 10 li r3,16
ffc0805c: 48 00 49 25 bl ffc0c980 <_Workspace_Allocate>
if ( handler ) {
ffc08060: 7c 64 1b 79 mr. r4,r3
ffc08064: 41 82 00 20 beq- ffc08084 <pthread_cleanup_push+0x58> <== NEVER TAKEN
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
ffc08068: 3d 40 00 00 lis r10,0
ffc0806c: 81 4a 31 70 lwz r10,12656(r10)
handler_stack = &thread_support->Cancellation_Handlers;
ffc08070: 80 6a 01 50 lwz r3,336(r10)
handler->routine = routine;
ffc08074: 93 c4 00 08 stw r30,8(r4)
handler->arg = arg;
_Chain_Append( handler_stack, &handler->Node );
ffc08078: 38 63 00 e4 addi r3,r3,228
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
handler_stack = &thread_support->Cancellation_Handlers;
handler->routine = routine;
handler->arg = arg;
ffc0807c: 93 e4 00 0c stw r31,12(r4)
_Chain_Append( handler_stack, &handler->Node );
ffc08080: 48 00 19 5d bl ffc099dc <_Chain_Append>
}
_Thread_Enable_dispatch();
}
ffc08084: 80 01 00 14 lwz r0,20(r1)
ffc08088: bb c1 00 08 lmw r30,8(r1)
ffc0808c: 7c 08 03 a6 mtlr r0
ffc08090: 38 21 00 10 addi r1,r1,16
handler->routine = routine;
handler->arg = arg;
_Chain_Append( handler_stack, &handler->Node );
}
_Thread_Enable_dispatch();
ffc08094: 48 00 36 d8 b ffc0b76c <_Thread_Enable_dispatch>
}
ffc08098: 39 61 00 10 addi r11,r1,16
ffc0809c: 48 00 df 58 b ffc15ff4 <_restgpr_30_x>
ffc0923c <pthread_cond_init>:
*/
int pthread_cond_init(
pthread_cond_t *cond,
const pthread_condattr_t *attr
)
{
ffc0923c: 94 21 ff e8 stwu r1,-24(r1)
ffc09240: 7c 08 02 a6 mflr r0
ffc09244: bf 81 00 08 stmw r28,8(r1)
POSIX_Condition_variables_Control *the_cond;
const pthread_condattr_t *the_attr;
if ( attr ) the_attr = attr;
ffc09248: 7c 9e 23 79 mr. r30,r4
*/
int pthread_cond_init(
pthread_cond_t *cond,
const pthread_condattr_t *attr
)
{
ffc0924c: 7c 7c 1b 78 mr r28,r3
ffc09250: 90 01 00 1c stw r0,28(r1)
POSIX_Condition_variables_Control *the_cond;
const pthread_condattr_t *the_attr;
if ( attr ) the_attr = attr;
ffc09254: 40 a2 00 0c bne+ ffc09260 <pthread_cond_init+0x24>
else the_attr = &_POSIX_Condition_variables_Default_attributes;
ffc09258: 3f c0 00 00 lis r30,0
ffc0925c: 3b de 27 e4 addi r30,r30,10212
/*
* Be careful about attributes when global!!!
*/
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
ffc09260: 81 5e 00 04 lwz r10,4(r30)
return EINVAL;
ffc09264: 38 60 00 16 li r3,22
else the_attr = &_POSIX_Condition_variables_Default_attributes;
/*
* Be careful about attributes when global!!!
*/
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
ffc09268: 2f 8a 00 01 cmpwi cr7,r10,1
ffc0926c: 41 9e 00 8c beq- cr7,ffc092f8 <pthread_cond_init+0xbc> <== NEVER TAKEN
return EINVAL;
if ( !the_attr->is_initialized )
ffc09270: 81 5e 00 00 lwz r10,0(r30)
ffc09274: 2f 8a 00 00 cmpwi cr7,r10,0
ffc09278: 41 be 00 80 beq+ cr7,ffc092f8 <pthread_cond_init+0xbc>
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
ffc0927c: 3d 20 00 00 lis r9,0
ffc09280: 81 49 28 9c lwz r10,10396(r9)
++level;
ffc09284: 39 4a 00 01 addi r10,r10,1
_Thread_Dispatch_disable_level = level;
ffc09288: 91 49 28 9c stw r10,10396(r9)
*/
RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control
*_POSIX_Condition_variables_Allocate( void )
{
return (POSIX_Condition_variables_Control *)
ffc0928c: 3f a0 00 00 lis r29,0
ffc09290: 3b bd 30 98 addi r29,r29,12440
ffc09294: 7f a3 eb 78 mr r3,r29
ffc09298: 48 00 29 9d bl ffc0bc34 <_Objects_Allocate>
_Thread_Disable_dispatch();
the_cond = _POSIX_Condition_variables_Allocate();
if ( !the_cond ) {
ffc0929c: 7c 7f 1b 79 mr. r31,r3
ffc092a0: 40 a2 00 10 bne+ ffc092b0 <pthread_cond_init+0x74>
_Thread_Enable_dispatch();
ffc092a4: 48 00 3c d9 bl ffc0cf7c <_Thread_Enable_dispatch>
return ENOMEM;
ffc092a8: 38 60 00 0c li r3,12
ffc092ac: 48 00 00 4c b ffc092f8 <pthread_cond_init+0xbc>
}
the_cond->process_shared = the_attr->process_shared;
ffc092b0: 81 3e 00 04 lwz r9,4(r30)
the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
ffc092b4: 3b c0 00 00 li r30,0
ffc092b8: 93 df 00 14 stw r30,20(r31)
_Thread_queue_Initialize(
ffc092bc: 3c a0 10 00 lis r5,4096
ffc092c0: 38 7f 00 18 addi r3,r31,24
if ( !the_cond ) {
_Thread_Enable_dispatch();
return ENOMEM;
}
the_cond->process_shared = the_attr->process_shared;
ffc092c4: 91 3f 00 10 stw r9,16(r31)
the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
_Thread_queue_Initialize(
ffc092c8: 38 80 00 00 li r4,0
ffc092cc: 60 a5 08 00 ori r5,r5,2048
ffc092d0: 38 c0 00 74 li r6,116
ffc092d4: 48 00 45 35 bl ffc0d808 <_Thread_queue_Initialize>
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
ffc092d8: 81 3f 00 08 lwz r9,8(r31)
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
ffc092dc: 81 1d 00 1c lwz r8,28(r29)
ffc092e0: 55 2a 13 ba rlwinm r10,r9,2,14,29
ffc092e4: 7f e8 51 2e stwx r31,r8,r10
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
ffc092e8: 93 df 00 0c stw r30,12(r31)
&_POSIX_Condition_variables_Information,
&the_cond->Object,
0
);
*cond = the_cond->Object.id;
ffc092ec: 91 3c 00 00 stw r9,0(r28)
_Thread_Enable_dispatch();
ffc092f0: 48 00 3c 8d bl ffc0cf7c <_Thread_Enable_dispatch>
return 0;
ffc092f4: 38 60 00 00 li r3,0
}
ffc092f8: 39 61 00 18 addi r11,r1,24
ffc092fc: 4b ff 84 80 b ffc0177c <_restgpr_28_x>
ffc084c8 <pthread_create>:
pthread_t *thread,
const pthread_attr_t *attr,
void *(*start_routine)( void * ),
void *arg
)
{
ffc084c8: 94 21 ff 80 stwu r1,-128(r1)
ffc084cc: 7c 08 02 a6 mflr r0
ffc084d0: be a1 00 54 stmw r21,84(r1)
int schedpolicy = SCHED_RR;
struct sched_param schedparam;
Objects_Name name;
int rc;
if ( !start_routine )
ffc084d4: 7c b7 2b 79 mr. r23,r5
return EFAULT;
ffc084d8: 3b c0 00 0e li r30,14
pthread_t *thread,
const pthread_attr_t *attr,
void *(*start_routine)( void * ),
void *arg
)
{
ffc084dc: 90 01 00 84 stw r0,132(r1)
int schedpolicy = SCHED_RR;
struct sched_param schedparam;
Objects_Name name;
int rc;
if ( !start_routine )
ffc084e0: 41 82 02 10 beq- ffc086f0 <pthread_create+0x228>
return EFAULT;
the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes;
ffc084e4: 2f 84 00 00 cmpwi cr7,r4,0
ffc084e8: 7c 79 1b 78 mr r25,r3
ffc084ec: 7c d8 33 78 mr r24,r6
ffc084f0: 7c 9f 23 78 mr r31,r4
ffc084f4: 40 be 00 0c bne+ cr7,ffc08500 <pthread_create+0x38>
ffc084f8: 3f e0 ff c2 lis r31,-62
ffc084fc: 3b ff e8 d4 addi r31,r31,-5932
if ( !the_attr->is_initialized )
ffc08500: 81 3f 00 00 lwz r9,0(r31)
ffc08504: 2f 89 00 00 cmpwi cr7,r9,0
ffc08508: 40 9e 00 08 bne- cr7,ffc08510 <pthread_create+0x48>
ffc0850c: 48 00 01 e0 b ffc086ec <pthread_create+0x224>
* 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) )
ffc08510: 81 3f 00 04 lwz r9,4(r31)
ffc08514: 2f 89 00 00 cmpwi cr7,r9,0
ffc08518: 41 9e 00 18 beq- cr7,ffc08530 <pthread_create+0x68>
ffc0851c: 3d 40 00 00 lis r10,0
ffc08520: 81 3f 00 08 lwz r9,8(r31)
ffc08524: 81 4a 27 88 lwz r10,10120(r10)
ffc08528: 7f 89 50 40 cmplw cr7,r9,r10
ffc0852c: 41 bc 01 c0 blt+ cr7,ffc086ec <pthread_create+0x224>
* 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 ) {
ffc08530: 81 3f 00 10 lwz r9,16(r31)
ffc08534: 2f 89 00 01 cmpwi cr7,r9,1
ffc08538: 41 9e 00 10 beq- cr7,ffc08548 <pthread_create+0x80>
ffc0853c: 2f 89 00 02 cmpwi cr7,r9,2
ffc08540: 40 be 01 ac bne+ cr7,ffc086ec <pthread_create+0x224>
ffc08544: 48 00 00 1c b ffc08560 <pthread_create+0x98>
case PTHREAD_INHERIT_SCHED:
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
ffc08548: 3d 20 00 00 lis r9,0
ffc0854c: 81 29 31 90 lwz r9,12688(r9)
ffc08550: 81 29 01 50 lwz r9,336(r9)
schedpolicy = api->schedpolicy;
ffc08554: 83 69 00 84 lwz r27,132(r9)
schedparam = api->schedparam;
ffc08558: 38 69 00 88 addi r3,r9,136
ffc0855c: 48 00 00 0c b ffc08568 <pthread_create+0xa0>
break;
case PTHREAD_EXPLICIT_SCHED:
schedpolicy = the_attr->schedpolicy;
ffc08560: 83 7f 00 14 lwz r27,20(r31)
schedparam = the_attr->schedparam;
ffc08564: 38 7f 00 18 addi r3,r31,24
ffc08568: 38 81 00 18 addi r4,r1,24
ffc0856c: 7c a3 e4 aa lswi r5,r3,28
ffc08570: 7c a4 e5 aa stswi r5,r4,28
/*
* 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;
ffc08574: 3b c0 00 86 li r30,134
/*
* Check the contentionscope since rtems only supports PROCESS wide
* contention (i.e. no system wide contention).
*/
if ( the_attr->contentionscope != PTHREAD_SCOPE_PROCESS )
ffc08578: 81 3f 00 0c lwz r9,12(r31)
ffc0857c: 2f 89 00 00 cmpwi cr7,r9,0
ffc08580: 40 be 01 70 bne+ cr7,ffc086f0 <pthread_create+0x228>
return ENOTSUP;
/*
* Interpret the scheduling parameters.
*/
if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) )
ffc08584: 80 61 00 18 lwz r3,24(r1)
ffc08588: 48 00 62 35 bl ffc0e7bc <_POSIX_Priority_Is_valid>
ffc0858c: 2f 83 00 00 cmpwi cr7,r3,0
ffc08590: 41 be 01 5c beq+ cr7,ffc086ec <pthread_create+0x224> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core(
int priority
)
{
return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1);
ffc08594: 3d 20 00 00 lis r9,0
return EINVAL;
core_priority = _POSIX_Priority_To_core( schedparam.sched_priority );
ffc08598: 82 c1 00 18 lwz r22,24(r1)
/*
* Set the core scheduling policy information.
*/
rc = _POSIX_Thread_Translate_sched_param(
ffc0859c: 7f 63 db 78 mr r3,r27
ffc085a0: 8a a9 27 84 lbz r21,10116(r9)
ffc085a4: 38 81 00 18 addi r4,r1,24
ffc085a8: 38 a1 00 38 addi r5,r1,56
ffc085ac: 38 c1 00 34 addi r6,r1,52
ffc085b0: 48 00 62 35 bl ffc0e7e4 <_POSIX_Thread_Translate_sched_param>
schedpolicy,
&schedparam,
&budget_algorithm,
&budget_callout
);
if ( rc )
ffc085b4: 7c 7e 1b 79 mr. r30,r3
ffc085b8: 40 a2 01 38 bne+ ffc086f0 <pthread_create+0x228>
#endif
/*
* Lock the allocator mutex for protection
*/
_RTEMS_Lock_allocator();
ffc085bc: 3f 40 00 00 lis r26,0
ffc085c0: 80 7a 28 7c lwz r3,10364(r26)
* _POSIX_Threads_Allocate
*/
RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void )
{
return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information );
ffc085c4: 3f a0 00 00 lis r29,0
ffc085c8: 3b bd 2e 60 addi r29,r29,11872
ffc085cc: 48 00 19 ad bl ffc09f78 <_API_Mutex_Lock>
ffc085d0: 7f a3 eb 78 mr r3,r29
ffc085d4: 48 00 24 79 bl ffc0aa4c <_Objects_Allocate>
* Allocate the thread control block.
*
* NOTE: Global threads are not currently supported.
*/
the_thread = _POSIX_Threads_Allocate();
if ( !the_thread ) {
ffc085d8: 7c 7c 1b 79 mr. r28,r3
ffc085dc: 40 a2 00 0c bne+ ffc085e8 <pthread_create+0x120>
_RTEMS_Unlock_allocator();
ffc085e0: 80 7a 28 7c lwz r3,10364(r26)
ffc085e4: 48 00 00 78 b ffc0865c <pthread_create+0x194>
static inline size_t _POSIX_Threads_Ensure_minimum_stack (
size_t size
)
{
if ( size >= PTHREAD_MINIMUM_STACK_SIZE )
ffc085e8: 3d 20 00 00 lis r9,0
/*
* Initialize the core thread for this task.
*/
name.name_p = NULL; /* posix threads don't have a name by default */
status = _Thread_Initialize(
ffc085ec: 81 5f 00 08 lwz r10,8(r31)
static inline size_t _POSIX_Threads_Ensure_minimum_stack (
size_t size
)
{
if ( size >= PTHREAD_MINIMUM_STACK_SIZE )
ffc085f0: 81 29 27 88 lwz r9,10120(r9)
/*
* Initialize the core thread for this task.
*/
name.name_p = NULL; /* posix threads don't have a name by default */
status = _Thread_Initialize(
ffc085f4: 93 c1 00 48 stw r30,72(r1)
ffc085f8: 55 26 08 3c rlwinm r6,r9,1,0,30
ffc085fc: 7f 86 50 40 cmplw cr7,r6,r10
ffc08600: 80 bf 00 04 lwz r5,4(r31)
ffc08604: 40 9c 00 08 bge- cr7,ffc0860c <pthread_create+0x144>
ffc08608: 7d 46 53 78 mr r6,r10
ffc0860c: 81 41 00 34 lwz r10,52(r1)
ffc08610: 7f a3 eb 78 mr r3,r29
ffc08614: 7f 84 e3 78 mr r4,r28
ffc08618: 91 41 00 08 stw r10,8(r1)
ffc0861c: 39 40 00 00 li r10,0
ffc08620: 38 e0 00 01 li r7,1
ffc08624: 91 41 00 0c stw r10,12(r1)
ffc08628: 39 41 00 48 addi r10,r1,72
ffc0862c: 7d 16 a8 50 subf r8,r22,r21
ffc08630: 91 41 00 10 stw r10,16(r1)
ffc08634: 39 20 00 01 li r9,1
ffc08638: 81 41 00 38 lwz r10,56(r1)
ffc0863c: 48 00 38 09 bl ffc0be44 <_Thread_Initialize>
budget_callout,
0, /* isr level */
name /* posix threads don't have a name */
);
if ( !status ) {
ffc08640: 2f 83 00 00 cmpwi cr7,r3,0
ffc08644: 40 9e 00 24 bne- cr7,ffc08668 <pthread_create+0x1a0>
RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free (
Thread_Control *the_pthread
)
{
_Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object );
ffc08648: 7f a3 eb 78 mr r3,r29
ffc0864c: 7f 84 e3 78 mr r4,r28
ffc08650: 48 00 27 65 bl ffc0adb4 <_Objects_Free>
_POSIX_Threads_Free( the_thread );
_RTEMS_Unlock_allocator();
ffc08654: 3d 20 00 00 lis r9,0
ffc08658: 80 69 28 7c lwz r3,10364(r9)
ffc0865c: 48 00 19 69 bl ffc09fc4 <_API_Mutex_Unlock>
return EAGAIN;
ffc08660: 3b c0 00 0b li r30,11
ffc08664: 48 00 00 8c b ffc086f0 <pthread_create+0x228>
}
/*
* finish initializing the per API structure
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
ffc08668: 83 bc 01 50 lwz r29,336(r28)
api->Attributes = *the_attr;
ffc0866c: 38 a0 00 40 li r5,64
ffc08670: 7f e4 fb 78 mr r4,r31
ffc08674: 7f a3 eb 78 mr r3,r29
ffc08678: 48 00 93 dd bl ffc11a54 <memcpy>
api->detachstate = the_attr->detachstate;
ffc0867c: 81 3f 00 3c lwz r9,60(r31)
api->schedpolicy = schedpolicy;
ffc08680: 93 7d 00 84 stw r27,132(r29)
api->schedparam = schedparam;
ffc08684: 38 9d 00 88 addi r4,r29,136
ffc08688: 38 61 00 18 addi r3,r1,24
* finish initializing the per API structure
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
api->Attributes = *the_attr;
api->detachstate = the_attr->detachstate;
ffc0868c: 91 3d 00 40 stw r9,64(r29)
api->schedpolicy = schedpolicy;
api->schedparam = schedparam;
ffc08690: 7c a3 e4 aa lswi r5,r3,28
ffc08694: 7c a4 e5 aa stswi r5,r4,28
/*
* POSIX threads are allocated and started in one operation.
*/
status = _Thread_Start(
ffc08698: 7f 83 e3 78 mr r3,r28
ffc0869c: 38 80 00 01 li r4,1
ffc086a0: 7e e5 bb 78 mr r5,r23
ffc086a4: 7f 06 c3 78 mr r6,r24
ffc086a8: 38 e0 00 00 li r7,0
ffc086ac: 48 00 41 f1 bl ffc0c89c <_Thread_Start>
_RTEMS_Unlock_allocator();
return EINVAL;
}
#endif
if ( schedpolicy == SCHED_SPORADIC ) {
ffc086b0: 2f 9b 00 04 cmpwi cr7,r27,4
ffc086b4: 40 be 00 20 bne+ cr7,ffc086d4 <pthread_create+0x20c>
_Watchdog_Insert_ticks(
ffc086b8: 38 7d 00 90 addi r3,r29,144
ffc086bc: 48 00 42 75 bl ffc0c930 <_Timespec_To_ticks>
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc086c0: 38 9d 00 a8 addi r4,r29,168
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
ffc086c4: 90 7d 00 b4 stw r3,180(r29)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc086c8: 3c 60 00 00 lis r3,0
ffc086cc: 38 63 2d 88 addi r3,r3,11656
ffc086d0: 48 00 45 25 bl ffc0cbf4 <_Watchdog_Insert>
}
/*
* Return the id and indicate we successfully created the thread
*/
*thread = the_thread->Object.id;
ffc086d4: 81 3c 00 08 lwz r9,8(r28)
ffc086d8: 91 39 00 00 stw r9,0(r25)
_RTEMS_Unlock_allocator();
ffc086dc: 3d 20 00 00 lis r9,0
ffc086e0: 80 69 28 7c lwz r3,10364(r9)
ffc086e4: 48 00 18 e1 bl ffc09fc4 <_API_Mutex_Unlock>
ffc086e8: 48 00 00 08 b ffc086f0 <pthread_create+0x228>
schedpolicy = the_attr->schedpolicy;
schedparam = the_attr->schedparam;
break;
default:
return EINVAL;
ffc086ec: 3b c0 00 16 li r30,22
*/
*thread = the_thread->Object.id;
_RTEMS_Unlock_allocator();
return 0;
}
ffc086f0: 39 61 00 80 addi r11,r1,128
ffc086f4: 7f c3 f3 78 mr r3,r30
ffc086f8: 4b ff 84 90 b ffc00b88 <_restgpr_21_x>
ffc1b984 <pthread_kill>:
int pthread_kill(
pthread_t thread,
int sig
)
{
ffc1b984: 94 21 ff d8 stwu r1,-40(r1)
ffc1b988: 7c 08 02 a6 mflr r0
ffc1b98c: bf 81 00 18 stmw r28,24(r1)
POSIX_API_Control *api;
Thread_Control *the_thread;
Objects_Locations location;
if ( !sig )
ffc1b990: 7c 9e 23 79 mr. r30,r4
int pthread_kill(
pthread_t thread,
int sig
)
{
ffc1b994: 90 01 00 2c stw r0,44(r1)
POSIX_API_Control *api;
Thread_Control *the_thread;
Objects_Locations location;
if ( !sig )
ffc1b998: 40 a2 00 08 bne+ ffc1b9a0 <pthread_kill+0x1c>
ffc1b99c: 48 00 00 10 b ffc1b9ac <pthread_kill+0x28>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
ffc1b9a0: 3b be ff ff addi r29,r30,-1
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
ffc1b9a4: 2b 9d 00 1f cmplwi cr7,r29,31
ffc1b9a8: 40 bd 00 10 ble+ cr7,ffc1b9b8 <pthread_kill+0x34>
rtems_set_errno_and_return_minus_one( EINVAL );
ffc1b9ac: 4b ff 4c 01 bl ffc105ac <__errno>
ffc1b9b0: 39 20 00 16 li r9,22
ffc1b9b4: 48 00 00 a8 b ffc1ba5c <pthread_kill+0xd8>
the_thread = _Thread_Get( thread, &location );
ffc1b9b8: 38 81 00 08 addi r4,r1,8
ffc1b9bc: 4b fe f8 89 bl ffc0b244 <_Thread_Get>
switch ( location ) {
ffc1b9c0: 81 21 00 08 lwz r9,8(r1)
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
rtems_set_errno_and_return_minus_one( EINVAL );
the_thread = _Thread_Get( thread, &location );
ffc1b9c4: 7c 7f 1b 78 mr r31,r3
switch ( location ) {
ffc1b9c8: 2f 89 00 00 cmpwi cr7,r9,0
ffc1b9cc: 40 9e 00 88 bne- cr7,ffc1ba54 <pthread_kill+0xd0> <== NEVER TAKEN
ffc1b9d0: 3c 60 00 00 lis r3,0
ffc1b9d4: 38 63 22 20 addi r3,r3,8736
ffc1b9d8: 4b fe d8 9d bl ffc09274 <_API_extensions_Add_post_switch>
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( sig ) {
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) {
ffc1b9dc: 1d 1e 00 0c mulli r8,r30,12
* If sig == 0 then just validate arguments
*/
_POSIX_signals_Add_post_switch_extension();
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
ffc1b9e0: 81 3f 01 50 lwz r9,336(r31)
if ( sig ) {
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) {
ffc1b9e4: 3d 40 00 00 lis r10,0
ffc1b9e8: 39 4a 32 20 addi r10,r10,12832
ffc1b9ec: 7d 4a 42 14 add r10,r10,r8
ffc1b9f0: 81 4a 00 08 lwz r10,8(r10)
ffc1b9f4: 2f 8a 00 01 cmpwi cr7,r10,1
ffc1b9f8: 40 be 00 10 bne+ cr7,ffc1ba08 <pthread_kill+0x84>
_Thread_Enable_dispatch();
ffc1b9fc: 4b fe f8 2d bl ffc0b228 <_Thread_Enable_dispatch>
return 0;
ffc1ba00: 38 60 00 00 li r3,0
ffc1ba04: 48 00 00 60 b ffc1ba64 <pthread_kill+0xe0>
}
/* XXX critical section */
api->signals_pending |= signo_to_mask( sig );
ffc1ba08: 81 49 00 d4 lwz r10,212(r9)
static inline sigset_t signo_to_mask(
uint32_t sig
)
{
return 1u << (sig - 1);
ffc1ba0c: 3b 80 00 01 li r28,1
ffc1ba10: 7f 9d e8 30 slw r29,r28,r29
ffc1ba14: 7d 4a eb 78 or r10,r10,r29
ffc1ba18: 91 49 00 d4 stw r10,212(r9)
(void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL );
ffc1ba1c: 7f e3 fb 78 mr r3,r31
ffc1ba20: 7f c4 f3 78 mr r4,r30
ffc1ba24: 38 a0 00 00 li r5,0
ffc1ba28: 4b ff fe 2d bl ffc1b854 <_POSIX_signals_Unblock_thread>
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
ffc1ba2c: 3d 20 00 00 lis r9,0
ffc1ba30: 39 29 31 a0 addi r9,r9,12704
ffc1ba34: 81 49 00 08 lwz r10,8(r9)
ffc1ba38: 2f 8a 00 00 cmpwi cr7,r10,0
ffc1ba3c: 41 be ff c0 beq- cr7,ffc1b9fc <pthread_kill+0x78>
ffc1ba40: 81 49 00 10 lwz r10,16(r9)
ffc1ba44: 7f 9f 50 00 cmpw cr7,r31,r10
ffc1ba48: 40 9e ff b4 bne+ cr7,ffc1b9fc <pthread_kill+0x78>
_Thread_Dispatch_necessary = true;
ffc1ba4c: 9b 89 00 0c stb r28,12(r9)
ffc1ba50: 4b ff ff ac b ffc1b9fc <pthread_kill+0x78>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( ESRCH );
ffc1ba54: 4b ff 4b 59 bl ffc105ac <__errno> <== NOT EXECUTED
ffc1ba58: 39 20 00 03 li r9,3 <== NOT EXECUTED
ffc1ba5c: 91 23 00 00 stw r9,0(r3)
ffc1ba60: 38 60 ff ff li r3,-1
}
ffc1ba64: 39 61 00 28 addi r11,r1,40
ffc1ba68: 4b fe 4b 50 b ffc005b8 <_restgpr_28_x>
ffc0a8a8 <pthread_mutex_timedlock>:
*/
int pthread_mutex_timedlock(
pthread_mutex_t *mutex,
const struct timespec *abstime
)
{
ffc0a8a8: 94 21 ff d8 stwu r1,-40(r1)
ffc0a8ac: 7c 08 02 a6 mflr r0
ffc0a8b0: bf a1 00 1c stmw r29,28(r1)
ffc0a8b4: 7c 7d 1b 78 mr r29,r3
*
* 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 );
ffc0a8b8: 7c 83 23 78 mr r3,r4
ffc0a8bc: 38 81 00 08 addi r4,r1,8
*/
int pthread_mutex_timedlock(
pthread_mutex_t *mutex,
const struct timespec *abstime
)
{
ffc0a8c0: 90 01 00 2c stw r0,44(r1)
*
* 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 );
ffc0a8c4: 48 00 00 d9 bl ffc0a99c <_POSIX_Absolute_timeout_to_ticks>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
ffc0a8c8: 68 7f 00 03 xori r31,r3,3
do_wait = false;
lock_status = _POSIX_Mutex_Lock_support( mutex, do_wait, ticks );
ffc0a8cc: 80 a1 00 08 lwz r5,8(r1)
* 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 )
ffc0a8d0: 7f ff 00 34 cntlzw r31,r31
ffc0a8d4: 57 ff d9 7e rlwinm r31,r31,27,5,31
*
* 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 );
ffc0a8d8: 7c 7e 1b 78 mr r30,r3
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
lock_status = _POSIX_Mutex_Lock_support( mutex, do_wait, ticks );
ffc0a8dc: 7f e4 fb 78 mr r4,r31
ffc0a8e0: 7f a3 eb 78 mr r3,r29
ffc0a8e4: 4b ff fe b9 bl ffc0a79c <_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) ) {
ffc0a8e8: 2f 9f 00 00 cmpwi cr7,r31,0
ffc0a8ec: 40 9e 00 2c bne- cr7,ffc0a918 <pthread_mutex_timedlock+0x70>
ffc0a8f0: 2f 83 00 10 cmpwi cr7,r3,16
ffc0a8f4: 40 be 00 24 bne+ cr7,ffc0a918 <pthread_mutex_timedlock+0x70>
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
ffc0a8f8: 2f 9e 00 00 cmpwi cr7,r30,0
ffc0a8fc: 41 be 00 18 beq+ cr7,ffc0a914 <pthread_mutex_timedlock+0x6c><== NEVER TAKEN
return EINVAL;
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
ffc0a900: 3b de ff ff addi r30,r30,-1
ffc0a904: 2b 9e 00 01 cmplwi cr7,r30,1
ffc0a908: 41 bd 00 10 bgt+ cr7,ffc0a918 <pthread_mutex_timedlock+0x70><== NEVER TAKEN
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
ffc0a90c: 38 60 00 74 li r3,116
ffc0a910: 48 00 00 08 b ffc0a918 <pthread_mutex_timedlock+0x70>
* 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 )
return EINVAL;
ffc0a914: 38 60 00 16 li r3,22 <== NOT EXECUTED
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
return lock_status;
}
ffc0a918: 39 61 00 28 addi r11,r1,40
ffc0a91c: 4b ff 80 60 b ffc0297c <_restgpr_29_x>
ffc08b80 <pthread_once>:
int pthread_once(
pthread_once_t *once_control,
void (*init_routine)(void)
)
{
ffc08b80: 94 21 ff e0 stwu r1,-32(r1)
ffc08b84: 7c 08 02 a6 mflr r0
ffc08b88: bf c1 00 18 stmw r30,24(r1)
if ( !once_control || !init_routine )
ffc08b8c: 7c 7f 1b 79 mr. r31,r3
int pthread_once(
pthread_once_t *once_control,
void (*init_routine)(void)
)
{
ffc08b90: 90 01 00 24 stw r0,36(r1)
if ( !once_control || !init_routine )
ffc08b94: 41 82 00 6c beq- ffc08c00 <pthread_once+0x80>
ffc08b98: 2f 84 00 00 cmpwi cr7,r4,0
ffc08b9c: 7c 9e 23 78 mr r30,r4
return EINVAL;
ffc08ba0: 38 60 00 16 li r3,22
int pthread_once(
pthread_once_t *once_control,
void (*init_routine)(void)
)
{
if ( !once_control || !init_routine )
ffc08ba4: 41 9e 00 60 beq- cr7,ffc08c04 <pthread_once+0x84>
return EINVAL;
if ( !once_control->init_executed ) {
ffc08ba8: 81 3f 00 04 lwz r9,4(r31)
once_control->init_executed = true;
(*init_routine)();
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
}
return 0;
ffc08bac: 38 60 00 00 li r3,0
)
{
if ( !once_control || !init_routine )
return EINVAL;
if ( !once_control->init_executed ) {
ffc08bb0: 2f 89 00 00 cmpwi cr7,r9,0
ffc08bb4: 40 be 00 50 bne+ cr7,ffc08c04 <pthread_once+0x84>
rtems_mode saveMode;
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
ffc08bb8: 38 60 01 00 li r3,256
ffc08bbc: 38 80 01 00 li r4,256
ffc08bc0: 38 a1 00 08 addi r5,r1,8
ffc08bc4: 48 00 0c a5 bl ffc09868 <rtems_task_mode>
if ( !once_control->init_executed ) {
ffc08bc8: 81 3f 00 04 lwz r9,4(r31)
ffc08bcc: 2f 89 00 00 cmpwi cr7,r9,0
ffc08bd0: 40 be 00 18 bne+ cr7,ffc08be8 <pthread_once+0x68> <== NEVER TAKEN
once_control->is_initialized = true;
ffc08bd4: 39 20 00 01 li r9,1
once_control->init_executed = true;
(*init_routine)();
ffc08bd8: 7f c9 03 a6 mtctr r30
if ( !once_control->init_executed ) {
rtems_mode saveMode;
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
if ( !once_control->init_executed ) {
once_control->is_initialized = true;
ffc08bdc: 91 3f 00 00 stw r9,0(r31)
once_control->init_executed = true;
ffc08be0: 91 3f 00 04 stw r9,4(r31)
(*init_routine)();
ffc08be4: 4e 80 04 21 bctrl
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
ffc08be8: 7c 25 0b 78 mr r5,r1
ffc08bec: 84 65 00 08 lwzu r3,8(r5)
ffc08bf0: 38 80 01 00 li r4,256
ffc08bf4: 48 00 0c 75 bl ffc09868 <rtems_task_mode>
}
return 0;
ffc08bf8: 38 60 00 00 li r3,0
ffc08bfc: 48 00 00 08 b ffc08c04 <pthread_once+0x84>
pthread_once_t *once_control,
void (*init_routine)(void)
)
{
if ( !once_control || !init_routine )
return EINVAL;
ffc08c00: 38 60 00 16 li r3,22
(*init_routine)();
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
}
return 0;
}
ffc08c04: 39 61 00 20 addi r11,r1,32
ffc08c08: 4b ff 7f a4 b ffc00bac <_restgpr_30_x>
ffc08eec <pthread_rwlock_init>:
int pthread_rwlock_init(
pthread_rwlock_t *rwlock,
const pthread_rwlockattr_t *attr
)
{
ffc08eec: 94 21 ff d8 stwu r1,-40(r1)
ffc08ef0: 7c 08 02 a6 mflr r0
ffc08ef4: bf 81 00 18 stmw r28,24(r1)
const pthread_rwlockattr_t *the_attr;
/*
* Error check parameters
*/
if ( !rwlock )
ffc08ef8: 7c 7c 1b 79 mr. r28,r3
int pthread_rwlock_init(
pthread_rwlock_t *rwlock,
const pthread_rwlockattr_t *attr
)
{
ffc08efc: 90 01 00 2c stw r0,44(r1)
const pthread_rwlockattr_t *the_attr;
/*
* Error check parameters
*/
if ( !rwlock )
ffc08f00: 40 a2 00 08 bne+ ffc08f08 <pthread_rwlock_init+0x1c>
ffc08f04: 48 00 00 9c b ffc08fa0 <pthread_rwlock_init+0xb4>
return EINVAL;
/*
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
ffc08f08: 2f 84 00 00 cmpwi cr7,r4,0
ffc08f0c: 7c 89 23 78 mr r9,r4
ffc08f10: 40 be 00 10 bne+ cr7,ffc08f20 <pthread_rwlock_init+0x34>
the_attr = attr;
} else {
(void) pthread_rwlockattr_init( &default_attr );
ffc08f14: 38 61 00 08 addi r3,r1,8
ffc08f18: 48 00 06 fd bl ffc09614 <pthread_rwlockattr_init>
the_attr = &default_attr;
ffc08f1c: 39 21 00 08 addi r9,r1,8
}
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
ffc08f20: 81 49 00 00 lwz r10,0(r9)
ffc08f24: 2f 8a 00 00 cmpwi cr7,r10,0
ffc08f28: 41 be 00 78 beq+ cr7,ffc08fa0 <pthread_rwlock_init+0xb4><== NEVER TAKEN
return EINVAL;
switch ( the_attr->process_shared ) {
ffc08f2c: 83 c9 00 04 lwz r30,4(r9)
ffc08f30: 2f 9e 00 00 cmpwi cr7,r30,0
ffc08f34: 40 9e 00 6c bne- cr7,ffc08fa0 <pthread_rwlock_init+0xb4><== NEVER TAKEN
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
ffc08f38: 3d 20 00 00 lis r9,0
*/
RTEMS_INLINE_ROUTINE void _CORE_RWLock_Initialize_attributes(
CORE_RWLock_Attributes *the_attributes
)
{
the_attributes->XXX = 0;
ffc08f3c: 93 c1 00 10 stw r30,16(r1)
ffc08f40: 81 49 28 a8 lwz r10,10408(r9)
++level;
ffc08f44: 39 4a 00 01 addi r10,r10,1
_Thread_Dispatch_disable_level = level;
ffc08f48: 91 49 28 a8 stw r10,10408(r9)
* 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 *)
ffc08f4c: 3f a0 00 00 lis r29,0
ffc08f50: 3b bd 58 40 addi r29,r29,22592
ffc08f54: 7f a3 eb 78 mr r3,r29
ffc08f58: 48 00 2b 35 bl ffc0ba8c <_Objects_Allocate>
*/
_Thread_Disable_dispatch(); /* prevents deletion */
the_rwlock = _POSIX_RWLock_Allocate();
if ( !the_rwlock ) {
ffc08f5c: 7c 7f 1b 79 mr. r31,r3
ffc08f60: 40 a2 00 10 bne+ ffc08f70 <pthread_rwlock_init+0x84>
_Thread_Enable_dispatch();
ffc08f64: 48 00 3f 65 bl ffc0cec8 <_Thread_Enable_dispatch>
return EAGAIN;
ffc08f68: 38 60 00 0b li r3,11
ffc08f6c: 48 00 00 38 b ffc08fa4 <pthread_rwlock_init+0xb8>
}
_CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes );
ffc08f70: 38 7f 00 10 addi r3,r31,16
ffc08f74: 38 81 00 10 addi r4,r1,16
ffc08f78: 48 00 24 ad bl ffc0b424 <_CORE_RWLock_Initialize>
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
ffc08f7c: 81 3f 00 08 lwz r9,8(r31)
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
ffc08f80: 81 1d 00 1c lwz r8,28(r29)
ffc08f84: 55 2a 13 ba rlwinm r10,r9,2,14,29
ffc08f88: 7f e8 51 2e stwx r31,r8,r10
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
ffc08f8c: 93 df 00 0c stw r30,12(r31)
&_POSIX_RWLock_Information,
&the_rwlock->Object,
0
);
*rwlock = the_rwlock->Object.id;
ffc08f90: 91 3c 00 00 stw r9,0(r28)
_Thread_Enable_dispatch();
ffc08f94: 48 00 3f 35 bl ffc0cec8 <_Thread_Enable_dispatch>
return 0;
ffc08f98: 38 60 00 00 li r3,0
ffc08f9c: 48 00 00 08 b ffc08fa4 <pthread_rwlock_init+0xb8>
switch ( the_attr->process_shared ) {
case PTHREAD_PROCESS_PRIVATE: /* only supported values */
break;
case PTHREAD_PROCESS_SHARED:
default:
return EINVAL;
ffc08fa0: 38 60 00 16 li r3,22
*rwlock = the_rwlock->Object.id;
_Thread_Enable_dispatch();
return 0;
}
ffc08fa4: 39 61 00 28 addi r11,r1,40
ffc08fa8: 48 01 3e 00 b ffc1cda8 <_restgpr_28_x>
ffc0979c <pthread_rwlock_timedrdlock>:
int pthread_rwlock_timedrdlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
ffc0979c: 94 21 ff d8 stwu r1,-40(r1)
ffc097a0: 7c 08 02 a6 mflr r0
ffc097a4: bf a1 00 1c stmw r29,28(r1)
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
ffc097a8: 7c 7d 1b 79 mr. r29,r3
int pthread_rwlock_timedrdlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
ffc097ac: 90 01 00 2c stw r0,44(r1)
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
ffc097b0: 40 82 00 08 bne- ffc097b8 <pthread_rwlock_timedrdlock+0x1c>
ffc097b4: 48 00 00 a4 b ffc09858 <pthread_rwlock_timedrdlock+0xbc>
*
* 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 );
ffc097b8: 7c 83 23 78 mr r3,r4
ffc097bc: 38 81 00 08 addi r4,r1,8
ffc097c0: 48 00 65 4d bl ffc0fd0c <_POSIX_Absolute_timeout_to_ticks>
ffc097c4: 80 9d 00 00 lwz r4,0(r29)
ffc097c8: 7c 7e 1b 78 mr r30,r3
ffc097cc: 3c 60 00 00 lis r3,0
ffc097d0: 38 63 2e 40 addi r3,r3,11840
ffc097d4: 38 a1 00 0c addi r5,r1,12
ffc097d8: 48 00 2d 65 bl ffc0c53c <_Objects_Get>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
ffc097dc: 81 21 00 0c lwz r9,12(r1)
ffc097e0: 2f 89 00 00 cmpwi cr7,r9,0
ffc097e4: 40 9e 00 74 bne- cr7,ffc09858 <pthread_rwlock_timedrdlock+0xbc>
* 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 )
ffc097e8: 6b df 00 03 xori r31,r30,3
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_reading(
ffc097ec: 80 9d 00 00 lwz r4,0(r29)
* 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 )
ffc097f0: 7f ff 00 34 cntlzw r31,r31
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_reading(
ffc097f4: 80 c1 00 08 lwz r6,8(r1)
* 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 )
ffc097f8: 57 ff d9 7e rlwinm r31,r31,27,5,31
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_reading(
ffc097fc: 38 63 00 10 addi r3,r3,16
ffc09800: 7f e5 fb 78 mr r5,r31
ffc09804: 38 e0 00 00 li r7,0
ffc09808: 48 00 1f 09 bl ffc0b710 <_CORE_RWLock_Obtain_for_reading>
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
ffc0980c: 48 00 3b 85 bl ffc0d390 <_Thread_Enable_dispatch>
if ( !do_wait ) {
ffc09810: 2f 9f 00 00 cmpwi cr7,r31,0
ffc09814: 40 9e 00 30 bne- cr7,ffc09844 <pthread_rwlock_timedrdlock+0xa8>
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
ffc09818: 3d 20 00 00 lis r9,0
ffc0981c: 81 29 31 b0 lwz r9,12720(r9)
ffc09820: 81 29 00 34 lwz r9,52(r9)
ffc09824: 2f 89 00 02 cmpwi cr7,r9,2
ffc09828: 40 be 00 1c bne+ cr7,ffc09844 <pthread_rwlock_timedrdlock+0xa8>
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
ffc0982c: 2f 9e 00 00 cmpwi cr7,r30,0
ffc09830: 41 be 00 28 beq+ cr7,ffc09858 <pthread_rwlock_timedrdlock+0xbc><== NEVER TAKEN
return EINVAL;
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
ffc09834: 3b de ff ff addi r30,r30,-1
ffc09838: 2b 9e 00 01 cmplwi cr7,r30,1
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
ffc0983c: 38 60 00 74 li r3,116
_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 ||
ffc09840: 40 9d 00 1c ble- cr7,ffc0985c <pthread_rwlock_timedrdlock+0xc0><== ALWAYS TAKEN
return ETIMEDOUT;
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
(CORE_RWLock_Status) _Thread_Executing->Wait.return_code
ffc09844: 3d 20 00 00 lis r9,0
ffc09848: 81 29 31 b0 lwz r9,12720(r9)
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
ffc0984c: 80 69 00 34 lwz r3,52(r9)
ffc09850: 48 00 00 dd bl ffc0992c <_POSIX_RWLock_Translate_core_RWLock_return_code>
ffc09854: 48 00 00 08 b ffc0985c <pthread_rwlock_timedrdlock+0xc0>
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
ffc09858: 38 60 00 16 li r3,22
}
ffc0985c: 39 61 00 28 addi r11,r1,40
ffc09860: 4b ff 84 54 b ffc01cb4 <_restgpr_29_x>
ffc09864 <pthread_rwlock_timedwrlock>:
int pthread_rwlock_timedwrlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
ffc09864: 94 21 ff d8 stwu r1,-40(r1)
ffc09868: 7c 08 02 a6 mflr r0
ffc0986c: bf a1 00 1c stmw r29,28(r1)
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
ffc09870: 7c 7d 1b 79 mr. r29,r3
int pthread_rwlock_timedwrlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
ffc09874: 90 01 00 2c stw r0,44(r1)
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
ffc09878: 40 82 00 08 bne- ffc09880 <pthread_rwlock_timedwrlock+0x1c>
ffc0987c: 48 00 00 a4 b ffc09920 <pthread_rwlock_timedwrlock+0xbc>
*
* 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 );
ffc09880: 7c 83 23 78 mr r3,r4
ffc09884: 38 81 00 08 addi r4,r1,8
ffc09888: 48 00 64 85 bl ffc0fd0c <_POSIX_Absolute_timeout_to_ticks>
ffc0988c: 80 9d 00 00 lwz r4,0(r29)
ffc09890: 7c 7e 1b 78 mr r30,r3
ffc09894: 3c 60 00 00 lis r3,0
ffc09898: 38 63 2e 40 addi r3,r3,11840
ffc0989c: 38 a1 00 0c addi r5,r1,12
ffc098a0: 48 00 2c 9d bl ffc0c53c <_Objects_Get>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
ffc098a4: 81 21 00 0c lwz r9,12(r1)
ffc098a8: 2f 89 00 00 cmpwi cr7,r9,0
ffc098ac: 40 9e 00 74 bne- cr7,ffc09920 <pthread_rwlock_timedwrlock+0xbc>
* 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 )
ffc098b0: 6b df 00 03 xori r31,r30,3
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_writing(
ffc098b4: 80 9d 00 00 lwz r4,0(r29)
* 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 )
ffc098b8: 7f ff 00 34 cntlzw r31,r31
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_writing(
ffc098bc: 80 c1 00 08 lwz r6,8(r1)
* 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 )
ffc098c0: 57 ff d9 7e rlwinm r31,r31,27,5,31
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_writing(
ffc098c4: 38 63 00 10 addi r3,r3,16
ffc098c8: 7f e5 fb 78 mr r5,r31
ffc098cc: 38 e0 00 00 li r7,0
ffc098d0: 48 00 1f 25 bl ffc0b7f4 <_CORE_RWLock_Obtain_for_writing>
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
ffc098d4: 48 00 3a bd bl ffc0d390 <_Thread_Enable_dispatch>
if ( !do_wait &&
ffc098d8: 2f 9f 00 00 cmpwi cr7,r31,0
ffc098dc: 40 9e 00 30 bne- cr7,ffc0990c <pthread_rwlock_timedwrlock+0xa8>
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
ffc098e0: 3d 20 00 00 lis r9,0
ffc098e4: 81 29 31 b0 lwz r9,12720(r9)
ticks,
NULL
);
_Thread_Enable_dispatch();
if ( !do_wait &&
ffc098e8: 81 29 00 34 lwz r9,52(r9)
ffc098ec: 2f 89 00 02 cmpwi cr7,r9,2
ffc098f0: 40 be 00 1c bne+ cr7,ffc0990c <pthread_rwlock_timedwrlock+0xa8>
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
ffc098f4: 2f 9e 00 00 cmpwi cr7,r30,0
ffc098f8: 41 be 00 28 beq+ cr7,ffc09920 <pthread_rwlock_timedwrlock+0xbc><== NEVER TAKEN
return EINVAL;
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
ffc098fc: 3b de ff ff addi r30,r30,-1
ffc09900: 2b 9e 00 01 cmplwi cr7,r30,1
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
ffc09904: 38 60 00 74 li r3,116
_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 ||
ffc09908: 40 9d 00 1c ble- cr7,ffc09924 <pthread_rwlock_timedwrlock+0xc0><== ALWAYS TAKEN
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
(CORE_RWLock_Status) _Thread_Executing->Wait.return_code
ffc0990c: 3d 20 00 00 lis r9,0
ffc09910: 81 29 31 b0 lwz r9,12720(r9)
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
ffc09914: 80 69 00 34 lwz r3,52(r9)
ffc09918: 48 00 00 15 bl ffc0992c <_POSIX_RWLock_Translate_core_RWLock_return_code>
ffc0991c: 48 00 00 08 b ffc09924 <pthread_rwlock_timedwrlock+0xc0>
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
ffc09920: 38 60 00 16 li r3,22
}
ffc09924: 39 61 00 28 addi r11,r1,40
ffc09928: 4b ff 83 8c b ffc01cb4 <_restgpr_29_x>
ffc0b1d8 <pthread_setschedparam>:
int pthread_setschedparam(
pthread_t thread,
int policy,
struct sched_param *param
)
{
ffc0b1d8: 94 21 ff d0 stwu r1,-48(r1)
ffc0b1dc: 7c 08 02 a6 mflr r0
ffc0b1e0: bf 61 00 1c stmw r27,28(r1)
int rc;
/*
* Check all the parameters
*/
if ( !param )
ffc0b1e4: 7c bb 2b 79 mr. r27,r5
return EINVAL;
ffc0b1e8: 3b 80 00 16 li r28,22
int pthread_setschedparam(
pthread_t thread,
int policy,
struct sched_param *param
)
{
ffc0b1ec: 90 01 00 34 stw r0,52(r1)
int rc;
/*
* Check all the parameters
*/
if ( !param )
ffc0b1f0: 41 82 00 f0 beq- ffc0b2e0 <pthread_setschedparam+0x108>
ffc0b1f4: 7c 7f 1b 78 mr r31,r3
ffc0b1f8: 7c 9d 23 78 mr r29,r4
return EINVAL;
rc = _POSIX_Thread_Translate_sched_param(
ffc0b1fc: 7c 83 23 78 mr r3,r4
ffc0b200: 38 a1 00 10 addi r5,r1,16
ffc0b204: 7f 64 db 78 mr r4,r27
ffc0b208: 38 c1 00 0c addi r6,r1,12
ffc0b20c: 48 00 5c 15 bl ffc10e20 <_POSIX_Thread_Translate_sched_param>
policy,
param,
&budget_algorithm,
&budget_callout
);
if ( rc )
ffc0b210: 7c 7c 1b 79 mr. r28,r3
ffc0b214: 40 a2 00 cc bne+ ffc0b2e0 <pthread_setschedparam+0x108>
return rc;
/*
* Actually change the scheduling policy and parameters
*/
the_thread = _Thread_Get( thread, &location );
ffc0b218: 7f e3 fb 78 mr r3,r31
ffc0b21c: 38 81 00 08 addi r4,r1,8
ffc0b220: 48 00 30 ad bl ffc0e2cc <_Thread_Get>
switch ( location ) {
ffc0b224: 81 21 00 08 lwz r9,8(r1)
return rc;
/*
* Actually change the scheduling policy and parameters
*/
the_thread = _Thread_Get( thread, &location );
ffc0b228: 7c 7e 1b 78 mr r30,r3
switch ( location ) {
ffc0b22c: 2f 89 00 00 cmpwi cr7,r9,0
ffc0b230: 40 9e 00 ac bne- cr7,ffc0b2dc <pthread_setschedparam+0x104>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
ffc0b234: 83 e3 01 50 lwz r31,336(r3)
if ( api->schedpolicy == SCHED_SPORADIC )
ffc0b238: 81 3f 00 84 lwz r9,132(r31)
ffc0b23c: 2f 89 00 04 cmpwi cr7,r9,4
ffc0b240: 40 be 00 0c bne+ cr7,ffc0b24c <pthread_setschedparam+0x74>
(void) _Watchdog_Remove( &api->Sporadic_timer );
ffc0b244: 38 7f 00 a8 addi r3,r31,168
ffc0b248: 48 00 41 6d bl ffc0f3b4 <_Watchdog_Remove>
api->schedpolicy = policy;
ffc0b24c: 93 bf 00 84 stw r29,132(r31)
api->schedparam = *param;
ffc0b250: 38 9f 00 88 addi r4,r31,136
the_thread->budget_algorithm = budget_algorithm;
the_thread->budget_callout = budget_callout;
switch ( api->schedpolicy ) {
ffc0b254: 2f 9d 00 00 cmpwi cr7,r29,0
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
api->schedpolicy = policy;
api->schedparam = *param;
ffc0b258: 7c bb e4 aa lswi r5,r27,28
ffc0b25c: 7c a4 e5 aa stswi r5,r4,28
the_thread->budget_algorithm = budget_algorithm;
ffc0b260: 81 21 00 10 lwz r9,16(r1)
ffc0b264: 91 3e 00 78 stw r9,120(r30)
the_thread->budget_callout = budget_callout;
ffc0b268: 81 21 00 0c lwz r9,12(r1)
ffc0b26c: 91 3e 00 7c stw r9,124(r30)
switch ( api->schedpolicy ) {
ffc0b270: 41 9c 00 64 blt- cr7,ffc0b2d4 <pthread_setschedparam+0xfc><== NEVER TAKEN
ffc0b274: 2f 9d 00 02 cmpwi cr7,r29,2
ffc0b278: 40 9d 00 10 ble- cr7,ffc0b288 <pthread_setschedparam+0xb0>
ffc0b27c: 2f 9d 00 04 cmpwi cr7,r29,4
ffc0b280: 40 be 00 54 bne+ cr7,ffc0b2d4 <pthread_setschedparam+0xfc><== NEVER TAKEN
ffc0b284: 48 00 00 34 b ffc0b2b8 <pthread_setschedparam+0xe0>
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
ffc0b288: 3d 20 00 00 lis r9,0
ffc0b28c: 81 29 28 e0 lwz r9,10464(r9)
the_thread->real_priority =
_POSIX_Priority_To_core( api->schedparam.sched_priority );
_Thread_Change_priority(
ffc0b290: 7f c3 f3 78 mr r3,r30
ffc0b294: 38 a0 00 01 li r5,1
switch ( api->schedpolicy ) {
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
ffc0b298: 91 3e 00 74 stw r9,116(r30)
ffc0b29c: 3d 20 00 00 lis r9,0
ffc0b2a0: 88 89 27 c4 lbz r4,10180(r9)
ffc0b2a4: 81 3f 00 88 lwz r9,136(r31)
ffc0b2a8: 7c 89 20 50 subf r4,r9,r4
the_thread->real_priority =
ffc0b2ac: 90 9e 00 18 stw r4,24(r30)
_POSIX_Priority_To_core( api->schedparam.sched_priority );
_Thread_Change_priority(
ffc0b2b0: 48 00 2a bd bl ffc0dd6c <_Thread_Change_priority>
the_thread,
the_thread->real_priority,
true
);
break;
ffc0b2b4: 48 00 00 20 b ffc0b2d4 <pthread_setschedparam+0xfc>
case SCHED_SPORADIC:
api->ss_high_priority = api->schedparam.sched_priority;
ffc0b2b8: 81 3f 00 88 lwz r9,136(r31)
_Watchdog_Remove( &api->Sporadic_timer );
ffc0b2bc: 38 7f 00 a8 addi r3,r31,168
true
);
break;
case SCHED_SPORADIC:
api->ss_high_priority = api->schedparam.sched_priority;
ffc0b2c0: 91 3f 00 a4 stw r9,164(r31)
_Watchdog_Remove( &api->Sporadic_timer );
ffc0b2c4: 48 00 40 f1 bl ffc0f3b4 <_Watchdog_Remove>
_POSIX_Threads_Sporadic_budget_TSR( 0, the_thread );
ffc0b2c8: 38 60 00 00 li r3,0
ffc0b2cc: 7f c4 f3 78 mr r4,r30
ffc0b2d0: 4b ff fd cd bl ffc0b09c <_POSIX_Threads_Sporadic_budget_TSR>
break;
}
_Thread_Enable_dispatch();
ffc0b2d4: 48 00 2f dd bl ffc0e2b0 <_Thread_Enable_dispatch>
ffc0b2d8: 48 00 00 08 b ffc0b2e0 <pthread_setschedparam+0x108>
#endif
case OBJECTS_ERROR:
break;
}
return ESRCH;
ffc0b2dc: 3b 80 00 03 li r28,3
}
ffc0b2e0: 39 61 00 30 addi r11,r1,48
ffc0b2e4: 7f 83 e3 78 mr r3,r28
ffc0b2e8: 4b ff 76 8c b ffc02974 <_restgpr_27_x>
ffc08850 <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() )
ffc08850: 3d 20 00 00 lis r9,0
ffc08854: 39 29 31 60 addi r9,r9,12640
ffc08858: 81 49 00 08 lwz r10,8(r9)
ffc0885c: 2f 8a 00 00 cmpwi cr7,r10,0
ffc08860: 4c be 00 20 bnelr+ cr7
/*
* 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183
*/
void pthread_testcancel( void )
{
ffc08864: 7c 2b 0b 78 mr r11,r1
ffc08868: 7c 08 02 a6 mflr r0
ffc0886c: 94 21 ff f0 stwu r1,-16(r1)
ffc08870: 90 01 00 14 stw r0,20(r1)
ffc08874: 48 00 d7 39 bl ffc15fac <_savegpr_31>
*/
if ( _ISR_Is_in_progress() )
return;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
ffc08878: 81 29 00 10 lwz r9,16(r9)
ffc0887c: 81 49 01 50 lwz r10,336(r9)
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
ffc08880: 3d 20 00 00 lis r9,0
ffc08884: 81 09 28 68 lwz r8,10344(r9)
++level;
ffc08888: 39 08 00 01 addi r8,r8,1
_Thread_Dispatch_disable_level = level;
ffc0888c: 91 09 28 68 stw r8,10344(r9)
_Thread_Disable_dispatch();
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
ffc08890: 81 0a 00 d8 lwz r8,216(r10)
*/
void pthread_testcancel( void )
{
POSIX_API_Control *thread_support;
bool cancel = false;
ffc08894: 3b e0 00 00 li r31,0
return;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
_Thread_Disable_dispatch();
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
ffc08898: 2f 88 00 00 cmpwi cr7,r8,0
ffc0889c: 40 9e 00 14 bne- cr7,ffc088b0 <pthread_testcancel+0x60> <== NEVER TAKEN
ffc088a0: 81 2a 00 e0 lwz r9,224(r10)
ffc088a4: 7d 29 00 34 cntlzw r9,r9
ffc088a8: 55 29 d9 7e rlwinm r9,r9,27,5,31
ffc088ac: 69 3f 00 01 xori r31,r9,1
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
ffc088b0: 48 00 2e bd bl ffc0b76c <_Thread_Enable_dispatch>
if ( cancel )
ffc088b4: 2f 9f 00 00 cmpwi cr7,r31,0
ffc088b8: 41 be 00 24 beq+ cr7,ffc088dc <pthread_testcancel+0x8c>
_POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED );
}
ffc088bc: 80 01 00 14 lwz r0,20(r1)
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
if ( cancel )
_POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED );
ffc088c0: 3d 20 00 00 lis r9,0
}
ffc088c4: 83 e1 00 0c lwz r31,12(r1)
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
if ( cancel )
_POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED );
ffc088c8: 38 80 ff ff li r4,-1
}
ffc088cc: 7c 08 03 a6 mtlr r0
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
if ( cancel )
_POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED );
ffc088d0: 80 69 31 70 lwz r3,12656(r9)
}
ffc088d4: 38 21 00 10 addi r1,r1,16
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
if ( cancel )
_POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED );
ffc088d8: 48 00 5a b4 b ffc0e38c <_POSIX_Thread_Exit>
}
ffc088dc: 39 61 00 10 addi r11,r1,16
ffc088e0: 48 00 d7 18 b ffc15ff8 <_restgpr_31_x>
ffc0d630 <ramdisk_allocate>:
void *area_begin,
uint32_t media_block_size,
rtems_blkdev_bnum media_block_count,
bool trace
)
{
ffc0d630: 94 21 ff e0 stwu r1,-32(r1)
ffc0d634: 7c 08 02 a6 mflr r0
ffc0d638: bf 61 00 0c stmw r27,12(r1)
ffc0d63c: 7c 7e 1b 78 mr r30,r3
struct ramdisk *rd = malloc(sizeof(struct ramdisk));
ffc0d640: 38 60 00 10 li r3,16
void *area_begin,
uint32_t media_block_size,
rtems_blkdev_bnum media_block_count,
bool trace
)
{
ffc0d644: 90 01 00 24 stw r0,36(r1)
ffc0d648: 7c 9d 23 78 mr r29,r4
ffc0d64c: 7c bc 2b 78 mr r28,r5
ffc0d650: 7c db 33 78 mr r27,r6
struct ramdisk *rd = malloc(sizeof(struct ramdisk));
ffc0d654: 4b ff 82 d5 bl ffc05928 <malloc>
if (rd == NULL) {
ffc0d658: 7c 7f 1b 79 mr. r31,r3
ffc0d65c: 41 82 00 54 beq- ffc0d6b0 <ramdisk_allocate+0x80> <== NEVER TAKEN
return NULL;
}
if (area_begin == NULL) {
ffc0d660: 2f 9e 00 00 cmpwi cr7,r30,0
return NULL;
}
rd->malloced = true;
} else {
rd->malloced = false;
ffc0d664: 39 20 00 00 li r9,0
if (rd == NULL) {
return NULL;
}
if (area_begin == NULL) {
ffc0d668: 40 be 00 2c bne+ cr7,ffc0d694 <ramdisk_allocate+0x64>
area_begin = calloc(media_block_count, media_block_size);
ffc0d66c: 7f 83 e3 78 mr r3,r28
ffc0d670: 7f a4 eb 78 mr r4,r29
ffc0d674: 4b ff 7c 41 bl ffc052b4 <calloc>
if (area_begin == NULL) {
free(rd);
return NULL;
}
rd->malloced = true;
ffc0d678: 39 20 00 01 li r9,1
return NULL;
}
if (area_begin == NULL) {
area_begin = calloc(media_block_count, media_block_size);
if (area_begin == NULL) {
ffc0d67c: 7c 7e 1b 79 mr. r30,r3
ffc0d680: 40 a2 00 14 bne+ ffc0d694 <ramdisk_allocate+0x64> <== ALWAYS TAKEN
free(rd);
ffc0d684: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc0d688: 4b ff 7d 11 bl ffc05398 <free> <== NOT EXECUTED
return NULL;
ffc0d68c: 3b e0 00 00 li r31,0 <== NOT EXECUTED
ffc0d690: 48 00 00 20 b ffc0d6b0 <ramdisk_allocate+0x80> <== NOT EXECUTED
}
rd->malloced = true;
} else {
rd->malloced = false;
ffc0d694: 99 3f 00 0d stb r9,13(r31)
}
rd->block_size = media_block_size;
rd->block_num = media_block_count;
rd->area = area_begin;
rd->trace = trace;
rd->initialized = true;
ffc0d698: 39 20 00 01 li r9,1
}
rd->malloced = true;
} else {
rd->malloced = false;
}
rd->block_size = media_block_size;
ffc0d69c: 93 bf 00 00 stw r29,0(r31)
rd->block_num = media_block_count;
ffc0d6a0: 93 9f 00 04 stw r28,4(r31)
rd->area = area_begin;
ffc0d6a4: 93 df 00 08 stw r30,8(r31)
rd->trace = trace;
ffc0d6a8: 9b 7f 00 0e stb r27,14(r31)
rd->initialized = true;
ffc0d6ac: 99 3f 00 0c stb r9,12(r31)
return rd;
}
ffc0d6b0: 39 61 00 20 addi r11,r1,32
ffc0d6b4: 7f e3 fb 78 mr r3,r31
ffc0d6b8: 48 00 c0 88 b ffc19740 <_restgpr_27_x>
ffc0d6bc <ramdisk_free>:
void ramdisk_free(ramdisk *rd)
{
ffc0d6bc: 7c 2b 0b 78 mr r11,r1
ffc0d6c0: 94 21 ff f0 stwu r1,-16(r1)
ffc0d6c4: 7c 08 02 a6 mflr r0
ffc0d6c8: 48 00 c0 3d bl ffc19704 <_savegpr_31>
if (rd != NULL) {
ffc0d6cc: 7c 7f 1b 79 mr. r31,r3
return rd;
}
void ramdisk_free(ramdisk *rd)
{
ffc0d6d0: 90 01 00 14 stw r0,20(r1)
if (rd != NULL) {
ffc0d6d4: 41 82 00 30 beq- ffc0d704 <ramdisk_free+0x48> <== NEVER TAKEN
if (rd->malloced) {
ffc0d6d8: 89 3f 00 0d lbz r9,13(r31)
ffc0d6dc: 2f 89 00 00 cmpwi cr7,r9,0
ffc0d6e0: 41 be 00 0c beq+ cr7,ffc0d6ec <ramdisk_free+0x30>
free(rd->area);
ffc0d6e4: 80 7f 00 08 lwz r3,8(r31)
ffc0d6e8: 4b ff 7c b1 bl ffc05398 <free>
}
free(rd);
}
}
ffc0d6ec: 80 01 00 14 lwz r0,20(r1)
{
if (rd != NULL) {
if (rd->malloced) {
free(rd->area);
}
free(rd);
ffc0d6f0: 7f e3 fb 78 mr r3,r31
}
}
ffc0d6f4: 83 e1 00 0c lwz r31,12(r1)
ffc0d6f8: 7c 08 03 a6 mtlr r0
ffc0d6fc: 38 21 00 10 addi r1,r1,16
{
if (rd != NULL) {
if (rd->malloced) {
free(rd->area);
}
free(rd);
ffc0d700: 4b ff 7c 98 b ffc05398 <free>
}
}
ffc0d704: 39 61 00 10 addi r11,r1,16 <== NOT EXECUTED
ffc0d708: 48 00 c0 48 b ffc19750 <_restgpr_31_x> <== NOT EXECUTED
ffc0ea34 <ramdisk_initialize>:
rtems_device_driver
ramdisk_initialize(
rtems_device_major_number major,
rtems_device_minor_number minor __attribute__((unused)),
void *arg __attribute__((unused)))
{
ffc0ea34: 94 21 ff b8 stwu r1,-72(r1)
ffc0ea38: 7c 08 02 a6 mflr r0
ffc0ea3c: be a1 00 1c stmw r21,28(r1)
ffc0ea40: 7c 77 1b 78 mr r23,r3
ffc0ea44: 90 01 00 4c stw r0,76(r1)
rtems_device_minor_number i;
rtems_ramdisk_config *c = rtems_ramdisk_configuration;
struct ramdisk *r;
rtems_status_code rc;
rc = rtems_disk_io_initialize();
ffc0ea48: 4b ff 6b f9 bl ffc05640 <rtems_disk_io_initialize>
if (rc != RTEMS_SUCCESSFUL)
ffc0ea4c: 7c 7e 1b 79 mr. r30,r3
ffc0ea50: 40 a2 01 08 bne+ ffc0eb58 <ramdisk_initialize+0x124> <== 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));
ffc0ea54: 3f 80 00 00 lis r28,0
ffc0ea58: 80 7c 27 a8 lwz r3,10152(r28)
ffc0ea5c: 38 80 00 10 li r4,16
ffc0ea60: 3f a0 00 00 lis r29,0
ffc0ea64: 4b ff 7b e5 bl ffc06648 <calloc>
{
r->malloced = false;
r->initialized = true;
r->area = c->location;
}
rc = rtems_disk_create_phys(dev, c->block_size, c->block_num,
ffc0ea68: 3e a0 ff c1 lis r21,-63
* 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));
r->trace = false;
ffc0ea6c: 9b c3 00 0e stb r30,14(r3)
for (i = 0; i < rtems_ramdisk_configuration_size; i++, c++, r++)
ffc0ea70: 7f 98 e3 78 mr r24,r28
* 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));
ffc0ea74: 7c 7f 1b 78 mr r31,r3
ffc0ea78: 3b bd 20 e0 addi r29,r29,8416
r->trace = false;
for (i = 0; i < rtems_ramdisk_configuration_size; i++, c++, r++)
ffc0ea7c: 3b c0 00 00 li r30,0
{
dev_t dev = rtems_filesystem_make_dev_t(major, i);
char name [] = RAMDISK_DEVICE_BASE_NAME "a";
ffc0ea80: 3e c0 ff c2 lis r22,-62
{
r->malloced = false;
r->initialized = true;
r->area = c->location;
}
rc = rtems_disk_create_phys(dev, c->block_size, c->block_num,
ffc0ea84: 3a b5 eb 64 addi r21,r21,-5276
{
if (r->malloced)
{
free(r->area);
}
r->initialized = false;
ffc0ea88: 3b 20 00 00 li r25,0
}
}
else
{
r->malloced = false;
r->initialized = true;
ffc0ea8c: 3b 80 00 01 li r28,1
* 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++)
ffc0ea90: 48 00 00 b4 b ffc0eb44 <ramdisk_initialize+0x110>
{
dev_t dev = rtems_filesystem_make_dev_t(major, i);
char name [] = RAMDISK_DEVICE_BASE_NAME "a";
ffc0ea94: 39 21 00 08 addi r9,r1,8
ffc0ea98: 39 56 60 a3 addi r10,r22,24739
ffc0ea9c: 7c aa 4c aa lswi r5,r10,9
ffc0eaa0: 7c a9 4d aa stswi r5,r9,9
name [sizeof(RAMDISK_DEVICE_BASE_NAME)] += i;
r->block_size = c->block_size;
r->block_num = c->block_num;
if (c->location == NULL)
ffc0eaa4: 81 3d ff fc lwz r9,-4(r29)
for (i = 0; i < rtems_ramdisk_configuration_size; i++, c++, r++)
{
dev_t dev = rtems_filesystem_make_dev_t(major, i);
char name [] = RAMDISK_DEVICE_BASE_NAME "a";
name [sizeof(RAMDISK_DEVICE_BASE_NAME)] += i;
r->block_size = c->block_size;
ffc0eaa8: 83 5d ff f4 lwz r26,-12(r29)
r->block_num = c->block_num;
if (c->location == NULL)
ffc0eaac: 2f 89 00 00 cmpwi cr7,r9,0
{
dev_t dev = rtems_filesystem_make_dev_t(major, i);
char name [] = RAMDISK_DEVICE_BASE_NAME "a";
name [sizeof(RAMDISK_DEVICE_BASE_NAME)] += i;
r->block_size = c->block_size;
r->block_num = c->block_num;
ffc0eab0: 83 7d ff f8 lwz r27,-8(r29)
r->trace = false;
for (i = 0; i < rtems_ramdisk_configuration_size; i++, c++, r++)
{
dev_t dev = rtems_filesystem_make_dev_t(major, i);
char name [] = RAMDISK_DEVICE_BASE_NAME "a";
name [sizeof(RAMDISK_DEVICE_BASE_NAME)] += i;
ffc0eab4: 9b c1 00 10 stb r30,16(r1)
r->block_size = c->block_size;
ffc0eab8: 93 5f 00 00 stw r26,0(r31)
r->block_num = c->block_num;
ffc0eabc: 93 7f 00 04 stw r27,4(r31)
if (c->location == NULL)
ffc0eac0: 40 be 00 2c bne+ cr7,ffc0eaec <ramdisk_initialize+0xb8> <== NEVER TAKEN
{
r->malloced = true;
r->area = malloc(r->block_size * r->block_num);
ffc0eac4: 7c 7b d1 d6 mullw r3,r27,r26
name [sizeof(RAMDISK_DEVICE_BASE_NAME)] += i;
r->block_size = c->block_size;
r->block_num = c->block_num;
if (c->location == NULL)
{
r->malloced = true;
ffc0eac8: 9b 9f 00 0d stb r28,13(r31)
r->area = malloc(r->block_size * r->block_num);
ffc0eacc: 4b ff 83 29 bl ffc06df4 <malloc>
if (r->area == NULL) /* No enough memory for this disk */
ffc0ead0: 2f 83 00 00 cmpwi cr7,r3,0
r->block_size = c->block_size;
r->block_num = c->block_num;
if (c->location == NULL)
{
r->malloced = true;
r->area = malloc(r->block_size * r->block_num);
ffc0ead4: 90 7f 00 08 stw r3,8(r31)
if (r->area == NULL) /* No enough memory for this disk */
ffc0ead8: 40 be 00 0c bne+ cr7,ffc0eae4 <ramdisk_initialize+0xb0> <== ALWAYS TAKEN
{
r->initialized = false;
ffc0eadc: 98 7f 00 0c stb r3,12(r31) <== NOT EXECUTED
ffc0eae0: 48 00 00 58 b ffc0eb38 <ramdisk_initialize+0x104> <== NOT EXECUTED
continue;
}
else
{
r->initialized = true;
ffc0eae4: 9b 9f 00 0c stb r28,12(r31)
ffc0eae8: 48 00 00 10 b ffc0eaf8 <ramdisk_initialize+0xc4>
}
}
else
{
r->malloced = false;
ffc0eaec: 9b 3f 00 0d stb r25,13(r31) <== NOT EXECUTED
r->initialized = true;
ffc0eaf0: 9b 9f 00 0c stb r28,12(r31) <== NOT EXECUTED
r->area = c->location;
ffc0eaf4: 91 3f 00 08 stw r9,8(r31) <== NOT EXECUTED
}
rc = rtems_disk_create_phys(dev, c->block_size, c->block_num,
ffc0eaf8: 7e e3 bb 78 mr r3,r23
ffc0eafc: 7f c4 f3 78 mr r4,r30
ffc0eb00: 7f 45 d3 78 mr r5,r26
ffc0eb04: 7f 66 db 78 mr r6,r27
ffc0eb08: 7e a7 ab 78 mr r7,r21
ffc0eb0c: 7f e8 fb 78 mr r8,r31
ffc0eb10: 39 21 00 08 addi r9,r1,8
ffc0eb14: 4b ff 68 79 bl ffc0538c <rtems_disk_create_phys>
ramdisk_ioctl, r, name);
if (rc != RTEMS_SUCCESSFUL)
ffc0eb18: 2f 83 00 00 cmpwi cr7,r3,0
ffc0eb1c: 41 9e 00 1c beq- cr7,ffc0eb38 <ramdisk_initialize+0x104><== ALWAYS TAKEN
{
if (r->malloced)
ffc0eb20: 89 3f 00 0d lbz r9,13(r31) <== NOT EXECUTED
ffc0eb24: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED
ffc0eb28: 41 be 00 0c beq+ cr7,ffc0eb34 <ramdisk_initialize+0x100><== NOT EXECUTED
{
free(r->area);
ffc0eb2c: 80 7f 00 08 lwz r3,8(r31) <== NOT EXECUTED
ffc0eb30: 4b ff 7b fd bl ffc0672c <free> <== NOT EXECUTED
}
r->initialized = false;
ffc0eb34: 9b 3f 00 0c stb r25,12(r31) <== 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++)
ffc0eb38: 3b de 00 01 addi r30,r30,1
ffc0eb3c: 3b ff 00 10 addi r31,r31,16
ffc0eb40: 3b bd 00 0c addi r29,r29,12
ffc0eb44: 81 38 27 a8 lwz r9,10152(r24)
ffc0eb48: 7f 9e 48 40 cmplw cr7,r30,r9
ffc0eb4c: 41 9c ff 48 blt+ cr7,ffc0ea94 <ramdisk_initialize+0x60>
free(r->area);
}
r->initialized = false;
}
}
return RTEMS_SUCCESSFUL;
ffc0eb50: 38 60 00 00 li r3,0
ffc0eb54: 48 00 00 08 b ffc0eb5c <ramdisk_initialize+0x128>
rtems_ramdisk_config *c = rtems_ramdisk_configuration;
struct ramdisk *r;
rtems_status_code rc;
rc = rtems_disk_io_initialize();
if (rc != RTEMS_SUCCESSFUL)
ffc0eb58: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
}
r->initialized = false;
}
}
return RTEMS_SUCCESSFUL;
}
ffc0eb5c: 39 61 00 48 addi r11,r1,72
ffc0eb60: 4b ff 1c 6c b ffc007cc <_restgpr_21_x>
ffc0d504 <ramdisk_ioctl>:
int
ramdisk_ioctl(rtems_disk_device *dd, uint32_t req, void *argp)
{
struct ramdisk *rd = rtems_disk_get_driver_data(dd);
switch (req)
ffc0d504: 6c 8a 20 00 xoris r10,r4,8192
return 0;
}
int
ramdisk_ioctl(rtems_disk_device *dd, uint32_t req, void *argp)
{
ffc0d508: 94 21 ff e0 stwu r1,-32(r1)
struct ramdisk *rd = rtems_disk_get_driver_data(dd);
switch (req)
ffc0d50c: 2f 8a 42 07 cmpwi cr7,r10,16903
return 0;
}
int
ramdisk_ioctl(rtems_disk_device *dd, uint32_t req, void *argp)
{
ffc0d510: 7c 08 02 a6 mflr r0
ffc0d514: bf 61 00 0c stmw r27,12(r1)
ffc0d518: 90 01 00 24 stw r0,36(r1)
break;
}
errno = EINVAL;
return -1;
}
ffc0d51c: 83 c3 00 3c lwz r30,60(r3)
int
ramdisk_ioctl(rtems_disk_device *dd, uint32_t req, void *argp)
{
struct ramdisk *rd = rtems_disk_get_driver_data(dd);
switch (req)
ffc0d520: 41 9e 00 cc beq- cr7,ffc0d5ec <ramdisk_ioctl+0xe8>
ffc0d524: 6c 8a c0 18 xoris r10,r4,49176
ffc0d528: 2f 8a 42 01 cmpwi cr7,r10,16897
ffc0d52c: 40 9e 00 d8 bne- cr7,ffc0d604 <ramdisk_ioctl+0x100>
{
case RTEMS_BLKIO_REQUEST:
{
rtems_blkdev_request *r = argp;
switch (r->req)
ffc0d530: 81 25 00 00 lwz r9,0(r5)
ffc0d534: 7c bf 2b 78 mr r31,r5
ffc0d538: 2f 89 00 00 cmpwi cr7,r9,0
ffc0d53c: 41 9e 00 10 beq- cr7,ffc0d54c <ramdisk_ioctl+0x48>
ffc0d540: 2f 89 00 01 cmpwi cr7,r9,1
ffc0d544: 40 be 00 d4 bne+ cr7,ffc0d618 <ramdisk_ioctl+0x114> <== NEVER TAKEN
ffc0d548: 48 00 00 48 b ffc0d590 <ramdisk_ioctl+0x8c>
#endif
static int
ramdisk_read(struct ramdisk *rd, rtems_blkdev_request *req)
{
uint8_t *from = rd->area;
ffc0d54c: 83 7e 00 08 lwz r27,8(r30)
#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++)
ffc0d550: 3b a5 00 18 addi r29,r5,24
ffc0d554: 3b 80 00 00 li r28,0
ffc0d558: 48 00 00 28 b ffc0d580 <ramdisk_ioctl+0x7c>
#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);
ffc0d55c: 80 9d 00 00 lwz r4,0(r29)
#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++)
ffc0d560: 3b 9c 00 01 addi r28,r28,1
#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);
ffc0d564: 81 3e 00 00 lwz r9,0(r30)
ffc0d568: 80 7d 00 08 lwz r3,8(r29)
ffc0d56c: 7c 84 49 d6 mullw r4,r4,r9
ffc0d570: 80 bd 00 04 lwz r5,4(r29)
#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++)
ffc0d574: 3b bd 00 10 addi r29,r29,16
#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);
ffc0d578: 7c 9b 22 14 add r4,r27,r4
ffc0d57c: 48 00 7f 89 bl ffc15504 <memcpy>
#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++)
ffc0d580: 81 3f 00 10 lwz r9,16(r31)
ffc0d584: 7f 9c 48 40 cmplw cr7,r28,r9
ffc0d588: 41 9c ff d4 blt+ cr7,ffc0d55c <ramdisk_ioctl+0x58>
ffc0d58c: 48 00 00 44 b ffc0d5d0 <ramdisk_ioctl+0xcc>
}
static int
ramdisk_write(struct ramdisk *rd, rtems_blkdev_request *req)
{
uint8_t *to = rd->area;
ffc0d590: 83 7e 00 08 lwz r27,8(r30)
#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++)
ffc0d594: 3b a5 00 18 addi r29,r5,24
ffc0d598: 3b 80 00 00 li r28,0
ffc0d59c: 48 00 00 28 b ffc0d5c4 <ramdisk_ioctl+0xc0>
#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);
ffc0d5a0: 80 7d 00 00 lwz r3,0(r29)
#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++)
ffc0d5a4: 3b 9c 00 01 addi r28,r28,1
#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);
ffc0d5a8: 81 3e 00 00 lwz r9,0(r30)
ffc0d5ac: 80 9d 00 08 lwz r4,8(r29)
ffc0d5b0: 7c 63 49 d6 mullw r3,r3,r9
ffc0d5b4: 80 bd 00 04 lwz r5,4(r29)
#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++)
ffc0d5b8: 3b bd 00 10 addi r29,r29,16
#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);
ffc0d5bc: 7c 7b 1a 14 add r3,r27,r3
ffc0d5c0: 48 00 7f 45 bl ffc15504 <memcpy>
#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++)
ffc0d5c4: 81 3f 00 10 lwz r9,16(r31)
ffc0d5c8: 7f 9c 48 40 cmplw cr7,r28,r9
ffc0d5cc: 41 9c ff d4 blt+ cr7,ffc0d5a0 <ramdisk_ioctl+0x9c>
static inline void rtems_blkdev_request_done(
rtems_blkdev_request *req,
rtems_status_code status
)
{
(*req->done)(req, status);
ffc0d5d0: 81 3f 00 04 lwz r9,4(r31)
ffc0d5d4: 7f e3 fb 78 mr r3,r31
ffc0d5d8: 38 80 00 00 li r4,0
ffc0d5dc: 7d 29 03 a6 mtctr r9
ffc0d5e0: 4e 80 04 21 bctrl
{
case RTEMS_BLKDEV_REQ_READ:
return ramdisk_read(rd, r);
case RTEMS_BLKDEV_REQ_WRITE:
return ramdisk_write(rd, r);
ffc0d5e4: 38 60 00 00 li r3,0
ffc0d5e8: 48 00 00 40 b ffc0d628 <ramdisk_ioctl+0x124>
}
break;
}
case RTEMS_BLKIO_DELETED:
if (rd->free_at_delete_request) {
ffc0d5ec: 89 3e 00 0f lbz r9,15(r30)
ffc0d5f0: 2f 89 00 00 cmpwi cr7,r9,0
ffc0d5f4: 41 be 00 24 beq+ cr7,ffc0d618 <ramdisk_ioctl+0x114>
ramdisk_free(rd);
ffc0d5f8: 7f c3 f3 78 mr r3,r30
ffc0d5fc: 48 00 00 c1 bl ffc0d6bc <ramdisk_free>
ffc0d600: 48 00 00 18 b ffc0d618 <ramdisk_ioctl+0x114>
break;
}
errno = EINVAL;
return -1;
}
ffc0d604: 80 01 00 24 lwz r0,36(r1)
ffc0d608: bb 61 00 0c lmw r27,12(r1)
ffc0d60c: 7c 08 03 a6 mtlr r0
ffc0d610: 38 21 00 20 addi r1,r1,32
ramdisk_free(rd);
}
break;
default:
return rtems_blkdev_ioctl (dd, req, argp);
ffc0d614: 48 00 29 28 b ffc0ff3c <rtems_blkdev_ioctl>
break;
}
errno = EINVAL;
ffc0d618: 48 00 72 f9 bl ffc14910 <__errno>
ffc0d61c: 39 20 00 16 li r9,22
ffc0d620: 91 23 00 00 stw r9,0(r3)
return -1;
ffc0d624: 38 60 ff ff li r3,-1
}
ffc0d628: 39 61 00 20 addi r11,r1,32
ffc0d62c: 48 00 c1 14 b ffc19740 <_restgpr_27_x>
ffc0d70c <ramdisk_register>:
rtems_blkdev_bnum media_block_count,
bool trace,
const char *disk,
dev_t *dev_ptr
)
{
ffc0d70c: 94 21 ff d0 stwu r1,-48(r1)
ffc0d710: 7c 08 02 a6 mflr r0
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_device_major_number major = 0;
ffc0d714: 39 20 00 00 li r9,0
rtems_blkdev_bnum media_block_count,
bool trace,
const char *disk,
dev_t *dev_ptr
)
{
ffc0d718: bf 41 00 18 stmw r26,24(r1)
ffc0d71c: 7c bf 2b 78 mr r31,r5
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_device_major_number major = 0;
ffc0d720: 7c 25 0b 78 mr r5,r1
rtems_blkdev_bnum media_block_count,
bool trace,
const char *disk,
dev_t *dev_ptr
)
{
ffc0d724: 90 01 00 34 stw r0,52(r1)
ffc0d728: 7c 9d 23 78 mr r29,r4
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_device_major_number major = 0;
ramdisk *rd = NULL;
dev_t dev = 0;
sc = rtems_io_register_driver(0, &ramdisk_ops, &major);
ffc0d72c: 3c 80 ff c2 lis r4,-62
const char *disk,
dev_t *dev_ptr
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_device_major_number major = 0;
ffc0d730: 95 25 00 08 stwu r9,8(r5)
rtems_blkdev_bnum media_block_count,
bool trace,
const char *disk,
dev_t *dev_ptr
)
{
ffc0d734: 7c 7c 1b 78 mr r28,r3
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_device_major_number major = 0;
ramdisk *rd = NULL;
dev_t dev = 0;
sc = rtems_io_register_driver(0, &ramdisk_ops, &major);
ffc0d738: 38 84 b1 cc addi r4,r4,-20020
ffc0d73c: 38 60 00 00 li r3,0
rtems_blkdev_bnum media_block_count,
bool trace,
const char *disk,
dev_t *dev_ptr
)
{
ffc0d740: 7c da 33 78 mr r26,r6
ffc0d744: 7c fe 3b 78 mr r30,r7
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_device_major_number major = 0;
ramdisk *rd = NULL;
dev_t dev = 0;
sc = rtems_io_register_driver(0, &ramdisk_ops, &major);
ffc0d748: 4b ff ca 6d bl ffc0a1b4 <rtems_io_register_driver>
if (sc != RTEMS_SUCCESSFUL) {
ffc0d74c: 2f 83 00 00 cmpwi cr7,r3,0
ffc0d750: 40 be 00 74 bne+ cr7,ffc0d7c4 <ramdisk_register+0xb8> <== NEVER TAKEN
return RTEMS_UNSATISFIED;
}
rd = ramdisk_allocate(NULL, media_block_size, media_block_count, trace);
ffc0d754: 7f e6 fb 78 mr r6,r31
ffc0d758: 7f 84 e3 78 mr r4,r28
ffc0d75c: 7f a5 eb 78 mr r5,r29
ffc0d760: 4b ff fe d1 bl ffc0d630 <ramdisk_allocate>
ffc0d764: 83 e1 00 08 lwz r31,8(r1)
if (rd == NULL) {
ffc0d768: 7c 7b 1b 79 mr. r27,r3
rtems_io_unregister_driver(major);
ffc0d76c: 7f e3 fb 78 mr r3,r31
if (sc != RTEMS_SUCCESSFUL) {
return RTEMS_UNSATISFIED;
}
rd = ramdisk_allocate(NULL, media_block_size, media_block_count, trace);
if (rd == NULL) {
ffc0d770: 40 a2 00 08 bne+ ffc0d778 <ramdisk_register+0x6c> <== ALWAYS TAKEN
ffc0d774: 48 00 00 38 b ffc0d7ac <ramdisk_register+0xa0> <== NOT EXECUTED
return RTEMS_UNSATISFIED;
}
dev = rtems_filesystem_make_dev_t(major, 0);
sc = rtems_disk_create_phys(
ffc0d778: 3c e0 ff c1 lis r7,-63
ffc0d77c: 38 80 00 00 li r4,0
ffc0d780: 7f 85 e3 78 mr r5,r28
ffc0d784: 7f a6 eb 78 mr r6,r29
ffc0d788: 38 e7 d5 04 addi r7,r7,-11004
ffc0d78c: 7f 68 db 78 mr r8,r27
ffc0d790: 7f 49 d3 78 mr r9,r26
ffc0d794: 4b ff 6f 4d bl ffc046e0 <rtems_disk_create_phys>
media_block_count,
ramdisk_ioctl,
rd,
disk
);
if (sc != RTEMS_SUCCESSFUL) {
ffc0d798: 2c 03 00 00 cmpwi r3,0
ffc0d79c: 41 82 00 18 beq- ffc0d7b4 <ramdisk_register+0xa8> <== ALWAYS TAKEN
ramdisk_free(rd);
ffc0d7a0: 7f 63 db 78 mr r3,r27 <== NOT EXECUTED
ffc0d7a4: 4b ff ff 19 bl ffc0d6bc <ramdisk_free> <== NOT EXECUTED
rtems_io_unregister_driver(major);
ffc0d7a8: 80 61 00 08 lwz r3,8(r1) <== NOT EXECUTED
ffc0d7ac: 4b ff cb 91 bl ffc0a33c <rtems_io_unregister_driver> <== NOT EXECUTED
ffc0d7b0: 48 00 00 14 b ffc0d7c4 <ramdisk_register+0xb8> <== NOT EXECUTED
return RTEMS_UNSATISFIED;
}
*dev_ptr = dev;
ffc0d7b4: 90 7e 00 04 stw r3,4(r30)
return RTEMS_SUCCESSFUL;
ffc0d7b8: 38 60 00 00 li r3,0
rtems_io_unregister_driver(major);
return RTEMS_UNSATISFIED;
}
*dev_ptr = dev;
ffc0d7bc: 93 fe 00 00 stw r31,0(r30)
ffc0d7c0: 48 00 00 08 b ffc0d7c8 <ramdisk_register+0xbc>
ramdisk *rd = NULL;
dev_t dev = 0;
sc = rtems_io_register_driver(0, &ramdisk_ops, &major);
if (sc != RTEMS_SUCCESSFUL) {
return RTEMS_UNSATISFIED;
ffc0d7c4: 38 60 00 0d li r3,13 <== NOT EXECUTED
}
*dev_ptr = dev;
return RTEMS_SUCCESSFUL;
}
ffc0d7c8: 39 61 00 30 addi r11,r1,48
ffc0d7cc: 48 00 bf 70 b ffc1973c <_restgpr_26_x>
ffc1b2d0 <read>:
size_t count
)
{
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
ffc1b2d0: 3d 20 00 00 lis r9,0
ssize_t read(
int fd,
void *buffer,
size_t count
)
{
ffc1b2d4: 94 21 ff f8 stwu r1,-8(r1)
ffc1b2d8: 7c 08 02 a6 mflr r0
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
ffc1b2dc: 81 29 27 98 lwz r9,10136(r9)
ssize_t read(
int fd,
void *buffer,
size_t count
)
{
ffc1b2e0: 90 01 00 0c stw r0,12(r1)
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
ffc1b2e4: 7f 83 48 40 cmplw cr7,r3,r9
ffc1b2e8: 41 bc 00 08 blt+ cr7,ffc1b2f0 <read+0x20>
ffc1b2ec: 48 00 00 48 b ffc1b334 <read+0x64>
iop = rtems_libio_iop( fd );
ffc1b2f0: 3d 20 00 00 lis r9,0
ffc1b2f4: 81 29 28 4c lwz r9,10316(r9)
ffc1b2f8: 1c 63 00 38 mulli r3,r3,56
ffc1b2fc: 7c 69 1a 14 add r3,r9,r3
rtems_libio_check_is_open( iop );
ffc1b300: 81 23 00 10 lwz r9,16(r3)
ffc1b304: 71 27 01 00 andi. r7,r9,256
ffc1b308: 40 a2 00 08 bne+ ffc1b310 <read+0x40>
ffc1b30c: 48 00 00 28 b ffc1b334 <read+0x64>
rtems_libio_check_buffer( buffer );
ffc1b310: 2f 84 00 00 cmpwi cr7,r4,0
ffc1b314: 40 be 00 10 bne+ cr7,ffc1b324 <read+0x54> <== ALWAYS TAKEN
ffc1b318: 4b ff 52 95 bl ffc105ac <__errno> <== NOT EXECUTED
ffc1b31c: 39 20 00 16 li r9,22 <== NOT EXECUTED
ffc1b320: 48 00 00 1c b ffc1b33c <read+0x6c> <== NOT EXECUTED
rtems_libio_check_count( count );
ffc1b324: 2f 85 00 00 cmpwi cr7,r5,0
ffc1b328: 41 9e 00 3c beq- cr7,ffc1b364 <read+0x94>
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_READ, EBADF );
ffc1b32c: 71 2a 00 02 andi. r10,r9,2
ffc1b330: 40 a2 00 18 bne+ ffc1b348 <read+0x78>
ffc1b334: 4b ff 52 79 bl ffc105ac <__errno>
ffc1b338: 39 20 00 09 li r9,9
ffc1b33c: 91 23 00 00 stw r9,0(r3)
ffc1b340: 38 60 ff ff li r3,-1
ffc1b344: 48 00 00 24 b ffc1b368 <read+0x98>
/*
* Now process the read().
*/
return (*iop->pathinfo.handlers->read_h)( iop, buffer, count );
ffc1b348: 81 23 00 24 lwz r9,36(r3)
}
ffc1b34c: 80 01 00 0c lwz r0,12(r1)
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_READ, EBADF );
/*
* Now process the read().
*/
return (*iop->pathinfo.handlers->read_h)( iop, buffer, count );
ffc1b350: 81 29 00 08 lwz r9,8(r9)
}
ffc1b354: 7c 08 03 a6 mtlr r0
ffc1b358: 38 21 00 08 addi r1,r1,8
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_READ, EBADF );
/*
* Now process the read().
*/
return (*iop->pathinfo.handlers->read_h)( iop, buffer, count );
ffc1b35c: 7d 29 03 a6 mtctr r9
ffc1b360: 4e 80 04 20 bctr
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 );
ffc1b364: 38 60 00 00 li r3,0
/*
* Now process the read().
*/
return (*iop->pathinfo.handlers->read_h)( iop, buffer, count );
}
ffc1b368: 80 01 00 0c lwz r0,12(r1)
ffc1b36c: 38 21 00 08 addi r1,r1,8
ffc1b370: 7c 08 03 a6 mtlr r0
ffc1b374: 4e 80 00 20 blr
ffc059a4 <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)
{
ffc059a4: 94 21 ff c0 stwu r1,-64(r1)
ffc059a8: 7c 08 02 a6 mflr r0
int i;
rtems_sector_data_t *sector = NULL;
ffc059ac: 39 20 00 00 li r9,0
* 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)
{
ffc059b0: be e1 00 1c stmw r23,28(r1)
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))
ffc059b4: 7c be 2b 79 mr. r30,r5
* 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)
{
ffc059b8: 90 01 00 44 stw r0,68(r1)
int i;
rtems_sector_data_t *sector = NULL;
ffc059bc: 91 21 00 0c stw r9,12(r1)
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))
ffc059c0: 41 82 01 8c beq- ffc05b4c <read_extended_partition+0x1a8><== NEVER TAKEN
ffc059c4: 81 3e 00 10 lwz r9,16(r30)
{
return RTEMS_INTERNAL_ERROR;
ffc059c8: 3b e0 00 19 li r31,25
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))
ffc059cc: 2f 89 00 00 cmpwi cr7,r9,0
ffc059d0: 41 9e 01 80 beq- cr7,ffc05b50 <read_extended_partition+0x1ac><== NEVER TAKEN
{
return RTEMS_INTERNAL_ERROR;
}
/* get start sector of current extended partition */
here = ext_part->start;
ffc059d4: 83 9e 00 04 lwz r28,4(r30)
{
return RTEMS_INTERNAL_ERROR;
}
off = sector_num * RTEMS_IDE_SECTOR_SIZE;
new_off = lseek(fd, off, SEEK_SET);
ffc059d8: 38 a0 00 00 li r5,0
ffc059dc: 38 e0 00 00 li r7,0
if (sector == NULL)
{
return RTEMS_INTERNAL_ERROR;
}
off = sector_num * RTEMS_IDE_SECTOR_SIZE;
ffc059e0: 57 9f 48 2c rlwinm r31,r28,9,0,22
new_off = lseek(fd, off, SEEK_SET);
ffc059e4: 7f e6 fb 78 mr r6,r31
ffc059e8: 7c 7a 1b 78 mr r26,r3
ffc059ec: 7c 99 23 78 mr r25,r4
ffc059f0: 48 00 12 31 bl ffc06c20 <lseek>
if (new_off != off) {
ffc059f4: 2f 83 00 00 cmpwi cr7,r3,0
ffc059f8: 40 be 00 28 bne+ cr7,ffc05a20 <read_extended_partition+0x7c><== NEVER TAKEN
ffc059fc: 7f 84 f8 00 cmpw cr7,r4,r31
ffc05a00: 40 be 00 20 bne+ cr7,ffc05a20 <read_extended_partition+0x7c><== NEVER TAKEN
ffc05a04: 7f 43 d3 78 mr r3,r26
ffc05a08: 7f 84 e3 78 mr r4,r28
ffc05a0c: 38 a1 00 0c addi r5,r1,12
ffc05a10: 4b ff fd 81 bl ffc05790 <get_sector.part.0>
here = ext_part->start;
/* get first extended partition sector */
rc = get_sector(fd, here, §or);
if (rc != RTEMS_SUCCESSFUL)
ffc05a14: 7c 7f 1b 79 mr. r31,r3
ffc05a18: 41 a2 00 1c beq+ ffc05a34 <read_extended_partition+0x90><== ALWAYS TAKEN
ffc05a1c: 48 00 00 08 b ffc05a24 <read_extended_partition+0x80><== NOT EXECUTED
}
off = sector_num * RTEMS_IDE_SECTOR_SIZE;
new_off = lseek(fd, off, SEEK_SET);
if (new_off != off) {
return RTEMS_IO_ERROR;
ffc05a20: 3b e0 00 1b li r31,27 <== NOT EXECUTED
/* get first extended partition sector */
rc = get_sector(fd, here, §or);
if (rc != RTEMS_SUCCESSFUL)
{
if (sector)
ffc05a24: 80 61 00 0c lwz r3,12(r1) <== NOT EXECUTED
ffc05a28: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc05a2c: 41 9e 01 24 beq- cr7,ffc05b50 <read_extended_partition+0x1ac><== NOT EXECUTED
ffc05a30: 48 00 00 60 b ffc05a90 <read_extended_partition+0xec><== NOT EXECUTED
free(sector);
return rc;
}
if (!msdos_signature_check(sector))
ffc05a34: 80 61 00 0c lwz r3,12(r1)
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) &&
ffc05a38: 39 20 00 00 li r9,0
ffc05a3c: 89 03 02 02 lbz r8,514(r3)
ffc05a40: 2f 88 00 55 cmpwi cr7,r8,85
ffc05a44: 40 be 00 14 bne+ cr7,ffc05a58 <read_extended_partition+0xb4><== NEVER TAKEN
ffc05a48: 89 23 02 03 lbz r9,515(r3)
ffc05a4c: 69 29 00 aa xori r9,r9,170
ffc05a50: 7d 29 00 34 cntlzw r9,r9
ffc05a54: 55 29 d9 7e rlwinm r9,r9,27,5,31
if (sector)
free(sector);
return rc;
}
if (!msdos_signature_check(sector))
ffc05a58: 2f 89 00 00 cmpwi cr7,r9,0
ffc05a5c: 40 9e 00 0c bne- cr7,ffc05a68 <read_extended_partition+0xc4><== ALWAYS TAKEN
{
free(sector);
ffc05a60: 48 00 0c cd bl ffc0672c <free> <== NOT EXECUTED
ffc05a64: 48 00 00 e8 b ffc05b4c <read_extended_partition+0x1a8><== 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)
ffc05a68: 3b 63 01 d2 addi r27,r3,466
ffc05a6c: 7f dd f3 78 mr r29,r30
ffc05a70: 3b 1e 00 10 addi r24,r30,16
new_part_desc->ext_part = ext_part;
new_part_desc->disk_desc = ext_part->disk_desc;
if (is_extended(new_part_desc->sys_type))
{
new_part_desc->log_id = EMPTY_PARTITION;
ffc05a74: 3a e0 00 00 li r23,0
ffc05a78: 38 7b ff f0 addi r3,r27,-16
ffc05a7c: 38 81 00 08 addi r4,r1,8
ffc05a80: 4b ff fe 49 bl ffc058c8 <data_to_part_desc.part.1>
{
/* 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)
ffc05a84: 7c 7f 1b 79 mr. r31,r3
ffc05a88: 41 a2 00 10 beq+ ffc05a98 <read_extended_partition+0xf4><== ALWAYS TAKEN
{
free(sector);
ffc05a8c: 80 61 00 0c lwz r3,12(r1)
ffc05a90: 48 00 0c 9d bl ffc0672c <free>
ffc05a94: 48 00 00 bc b ffc05b50 <read_extended_partition+0x1ac>
return rc;
}
if (new_part_desc == NULL)
ffc05a98: 80 a1 00 08 lwz r5,8(r1)
ffc05a9c: 2f 85 00 00 cmpwi cr7,r5,0
ffc05aa0: 41 9e 00 98 beq- cr7,ffc05b38 <read_extended_partition+0x194>
{
data += RTEMS_IDE_PARTITION_DESCRIPTOR_SIZE;
continue;
}
ext_part->sub_part[i] = new_part_desc;
ffc05aa4: 90 bd 00 18 stw r5,24(r29)
new_part_desc->ext_part = ext_part;
new_part_desc->disk_desc = ext_part->disk_desc;
if (is_extended(new_part_desc->sys_type))
ffc05aa8: 89 25 00 01 lbz r9,1(r5)
continue;
}
ext_part->sub_part[i] = new_part_desc;
new_part_desc->ext_part = ext_part;
new_part_desc->disk_desc = ext_part->disk_desc;
ffc05aac: 81 5e 00 10 lwz r10,16(r30)
* true if partition type is extended, false otherwise
*/
static bool
is_extended(uint8_t type)
{
return ((type == EXTENDED_PARTITION) || (type == LINUX_EXTENDED));
ffc05ab0: 2f 89 00 05 cmpwi cr7,r9,5
data += RTEMS_IDE_PARTITION_DESCRIPTOR_SIZE;
continue;
}
ext_part->sub_part[i] = new_part_desc;
new_part_desc->ext_part = ext_part;
ffc05ab4: 93 c5 00 14 stw r30,20(r5)
new_part_desc->disk_desc = ext_part->disk_desc;
ffc05ab8: 91 45 00 10 stw r10,16(r5)
* true if partition type is extended, false otherwise
*/
static bool
is_extended(uint8_t type)
{
return ((type == EXTENDED_PARTITION) || (type == LINUX_EXTENDED));
ffc05abc: 41 9e 00 14 beq- cr7,ffc05ad0 <read_extended_partition+0x12c>
ffc05ac0: 69 29 00 85 xori r9,r9,133
ffc05ac4: 7d 29 00 34 cntlzw r9,r9
ffc05ac8: 55 29 d9 7e rlwinm r9,r9,27,5,31
ffc05acc: 48 00 00 08 b ffc05ad4 <read_extended_partition+0x130>
ffc05ad0: 39 20 00 01 li r9,1
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))
ffc05ad4: 2f 89 00 00 cmpwi cr7,r9,0
ffc05ad8: 41 be 00 24 beq+ cr7,ffc05afc <read_extended_partition+0x158>
{
new_part_desc->log_id = EMPTY_PARTITION;
new_part_desc->start += start;
ffc05adc: 81 25 00 04 lwz r9,4(r5)
read_extended_partition(fd, start, new_part_desc);
ffc05ae0: 7f 43 d3 78 mr r3,r26
new_part_desc->ext_part = ext_part;
new_part_desc->disk_desc = ext_part->disk_desc;
if (is_extended(new_part_desc->sys_type))
{
new_part_desc->log_id = EMPTY_PARTITION;
ffc05ae4: 9a e5 00 02 stb r23,2(r5)
new_part_desc->start += start;
read_extended_partition(fd, start, new_part_desc);
ffc05ae8: 7f 24 cb 78 mr r4,r25
new_part_desc->disk_desc = ext_part->disk_desc;
if (is_extended(new_part_desc->sys_type))
{
new_part_desc->log_id = EMPTY_PARTITION;
new_part_desc->start += start;
ffc05aec: 7d 29 ca 14 add r9,r9,r25
ffc05af0: 91 25 00 04 stw r9,4(r5)
read_extended_partition(fd, start, new_part_desc);
ffc05af4: 4b ff fe b1 bl ffc059a4 <read_extended_partition>
ffc05af8: 48 00 00 40 b ffc05b38 <read_extended_partition+0x194>
}
else
{
rtems_disk_desc_t *disk_desc = new_part_desc->disk_desc;
disk_desc->partitions[disk_desc->last_log_id] = new_part_desc;
ffc05afc: 81 2a 00 24 lwz r9,36(r10)
ffc05b00: 39 09 00 08 addi r8,r9,8
ffc05b04: 55 08 10 3a rlwinm r8,r8,2,0,29
new_part_desc->log_id = ++disk_desc->last_log_id;
ffc05b08: 39 29 00 01 addi r9,r9,1
read_extended_partition(fd, start, new_part_desc);
}
else
{
rtems_disk_desc_t *disk_desc = new_part_desc->disk_desc;
disk_desc->partitions[disk_desc->last_log_id] = new_part_desc;
ffc05b0c: 7d 0a 42 14 add r8,r10,r8
new_part_desc->log_id = ++disk_desc->last_log_id;
ffc05b10: 91 2a 00 24 stw r9,36(r10)
read_extended_partition(fd, start, new_part_desc);
}
else
{
rtems_disk_desc_t *disk_desc = new_part_desc->disk_desc;
disk_desc->partitions[disk_desc->last_log_id] = new_part_desc;
ffc05b14: 90 a8 00 08 stw r5,8(r8)
new_part_desc->log_id = ++disk_desc->last_log_id;
new_part_desc->start += here;
new_part_desc->end = new_part_desc->start + new_part_desc->size - 1;
ffc05b18: 81 45 00 08 lwz r10,8(r5)
}
else
{
rtems_disk_desc_t *disk_desc = new_part_desc->disk_desc;
disk_desc->partitions[disk_desc->last_log_id] = new_part_desc;
new_part_desc->log_id = ++disk_desc->last_log_id;
ffc05b1c: 99 25 00 02 stb r9,2(r5)
new_part_desc->start += here;
new_part_desc->end = new_part_desc->start + new_part_desc->size - 1;
ffc05b20: 39 4a ff ff addi r10,r10,-1
else
{
rtems_disk_desc_t *disk_desc = new_part_desc->disk_desc;
disk_desc->partitions[disk_desc->last_log_id] = new_part_desc;
new_part_desc->log_id = ++disk_desc->last_log_id;
new_part_desc->start += here;
ffc05b24: 81 25 00 04 lwz r9,4(r5)
ffc05b28: 7d 3c 4a 14 add r9,r28,r9
ffc05b2c: 91 25 00 04 stw r9,4(r5)
new_part_desc->end = new_part_desc->start + new_part_desc->size - 1;
ffc05b30: 7d 2a 4a 14 add r9,r10,r9
ffc05b34: 91 25 00 0c stw r9,12(r5)
ffc05b38: 3b bd 00 04 addi r29,r29,4
/* 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++)
ffc05b3c: 7f 9d c0 00 cmpw cr7,r29,r24
ffc05b40: 3b 7b 00 10 addi r27,r27,16
ffc05b44: 40 9e ff 34 bne+ cr7,ffc05a78 <read_extended_partition+0xd4>
ffc05b48: 4b ff ff 44 b ffc05a8c <read_extended_partition+0xe8>
rtems_part_desc_t *new_part_desc;
rtems_status_code rc;
if ((ext_part == NULL) || (ext_part->disk_desc == NULL))
{
return RTEMS_INTERNAL_ERROR;
ffc05b4c: 3b e0 00 19 li r31,25 <== NOT EXECUTED
}
free(sector);
return RTEMS_SUCCESSFUL;
}
ffc05b50: 39 61 00 40 addi r11,r1,64
ffc05b54: 7f e3 fb 78 mr r3,r31
ffc05b58: 4b ff ac 7c b ffc007d4 <_restgpr_23_x>
ffc05f34 <readv>:
int v;
int bytes;
rtems_libio_t *iop;
bool all_zeros;
rtems_libio_check_fd( fd );
ffc05f34: 3d 20 00 00 lis r9,0
ssize_t readv(
int fd,
const struct iovec *iov,
int iovcnt
)
{
ffc05f38: 94 21 ff e0 stwu r1,-32(r1)
ffc05f3c: 7c 08 02 a6 mflr r0
int v;
int bytes;
rtems_libio_t *iop;
bool all_zeros;
rtems_libio_check_fd( fd );
ffc05f40: 81 29 27 78 lwz r9,10104(r9)
ssize_t readv(
int fd,
const struct iovec *iov,
int iovcnt
)
{
ffc05f44: 90 01 00 24 stw r0,36(r1)
int v;
int bytes;
rtems_libio_t *iop;
bool all_zeros;
rtems_libio_check_fd( fd );
ffc05f48: 7f 83 48 40 cmplw cr7,r3,r9
ssize_t readv(
int fd,
const struct iovec *iov,
int iovcnt
)
{
ffc05f4c: bf 41 00 08 stmw r26,8(r1)
int v;
int bytes;
rtems_libio_t *iop;
bool all_zeros;
rtems_libio_check_fd( fd );
ffc05f50: 41 bc 00 08 blt+ cr7,ffc05f58 <readv+0x24>
ffc05f54: 48 00 00 2c b ffc05f80 <readv+0x4c>
iop = rtems_libio_iop( fd );
ffc05f58: 3d 20 00 00 lis r9,0
ffc05f5c: 83 89 28 28 lwz r28,10280(r9)
ffc05f60: 1c 63 00 38 mulli r3,r3,56
ffc05f64: 7f 9c 1a 14 add r28,r28,r3
rtems_libio_check_is_open( iop );
ffc05f68: 81 3c 00 10 lwz r9,16(r28)
ffc05f6c: 71 2a 01 00 andi. r10,r9,256
ffc05f70: 40 a2 00 08 bne+ ffc05f78 <readv+0x44>
ffc05f74: 48 00 00 0c b ffc05f80 <readv+0x4c>
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_READ, EBADF );
ffc05f78: 71 2a 00 02 andi. r10,r9,2
ffc05f7c: 40 a2 00 10 bne+ ffc05f8c <readv+0x58> <== ALWAYS TAKEN
ffc05f80: 48 00 af e1 bl ffc10f60 <__errno>
ffc05f84: 39 20 00 09 li r9,9
ffc05f88: 48 00 00 80 b ffc06008 <readv+0xd4>
/*
* Argument validation on IO vector
*/
if ( !iov )
ffc05f8c: 2f 84 00 00 cmpwi cr7,r4,0
ffc05f90: 7c 9d 23 78 mr r29,r4
ffc05f94: 40 be 00 08 bne+ cr7,ffc05f9c <readv+0x68>
ffc05f98: 48 00 00 68 b ffc06000 <readv+0xcc>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
ffc05f9c: 2f 85 00 00 cmpwi cr7,r5,0
ffc05fa0: 41 bd 00 08 bgt+ cr7,ffc05fa8 <readv+0x74>
ffc05fa4: 48 00 00 5c b ffc06000 <readv+0xcc>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
ffc05fa8: 2f 85 04 00 cmpwi cr7,r5,1024
ffc05fac: 40 bd 00 08 ble+ cr7,ffc05fb4 <readv+0x80> <== ALWAYS TAKEN
ffc05fb0: 48 00 00 50 b ffc06000 <readv+0xcc> <== NOT EXECUTED
*
* OpenGroup URL:
*
* http://www.opengroup.org/onlinepubs/009695399/functions/readv.html
*/
ssize_t readv(
ffc05fb4: 54 bb 18 38 rlwinm r27,r5,3,0,28
ffc05fb8: 38 fb ff f8 addi r7,r27,-8
ffc05fbc: 54 e7 e8 fe rlwinm r7,r7,29,3,31
ffc05fc0: 38 e7 00 01 addi r7,r7,1
ffc05fc4: 39 20 00 00 li r9,0
ffc05fc8: 7c e9 03 a6 mtctr r7
ffc05fcc: 39 40 00 01 li r10,1
ffc05fd0: 39 00 00 00 li r8,0
ffc05fd4: 48 00 00 08 b ffc05fdc <readv+0xa8>
if ( iov[v].iov_base == 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
/* check for wrap */
old = total;
total += iov[v].iov_len;
ffc05fd8: 7c c8 33 78 mr r8,r6
/*
* 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 )
ffc05fdc: 7c fd 48 2e lwzx r7,r29,r9
ffc05fe0: 2f 87 00 00 cmpwi cr7,r7,0
ffc05fe4: 40 be 00 08 bne+ cr7,ffc05fec <readv+0xb8>
ffc05fe8: 48 00 00 18 b ffc06000 <readv+0xcc>
*
* OpenGroup URL:
*
* http://www.opengroup.org/onlinepubs/009695399/functions/readv.html
*/
ssize_t readv(
ffc05fec: 7c fd 4a 14 add r7,r29,r9
if ( iov[v].iov_base == 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
/* check for wrap */
old = total;
total += iov[v].iov_len;
ffc05ff0: 80 e7 00 04 lwz r7,4(r7)
ffc05ff4: 7c c7 42 14 add r6,r7,r8
if ( total < old )
ffc05ff8: 7f 86 40 00 cmpw cr7,r6,r8
ffc05ffc: 40 bc 00 14 bge+ cr7,ffc06010 <readv+0xdc>
rtems_set_errno_and_return_minus_one( EINVAL );
ffc06000: 48 00 af 61 bl ffc10f60 <__errno>
ffc06004: 39 20 00 16 li r9,22
ffc06008: 91 23 00 00 stw r9,0(r3)
ffc0600c: 48 00 00 74 b ffc06080 <readv+0x14c>
if ( iov[v].iov_len )
all_zeros = false;
ffc06010: 30 e7 ff ff addic r7,r7,-1
ffc06014: 7c e7 39 10 subfe r7,r7,r7
ffc06018: 7d 4a 38 38 and r10,r10,r7
ffc0601c: 39 29 00 08 addi r9,r9,8
* 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++ ) {
ffc06020: 42 00 ff b8 bdnz+ ffc05fd8 <readv+0xa4>
/*
* 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 ) {
ffc06024: 2f 8a 00 00 cmpwi cr7,r10,0
return 0;
ffc06028: 3b e0 00 00 li r31,0
/*
* 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 ) {
ffc0602c: 40 9e 00 58 bne- cr7,ffc06084 <readv+0x150>
ffc06030: 3b c0 00 00 li r30,0
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
bytes = (*iop->pathinfo.handlers->read_h)(
ffc06034: 81 3c 00 24 lwz r9,36(r28)
*
* OpenGroup URL:
*
* http://www.opengroup.org/onlinepubs/009695399/functions/readv.html
*/
ssize_t readv(
ffc06038: 7f 5d f2 14 add r26,r29,r30
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
bytes = (*iop->pathinfo.handlers->read_h)(
ffc0603c: 7f 83 e3 78 mr r3,r28
ffc06040: 7c 9d f0 2e lwzx r4,r29,r30
ffc06044: 81 29 00 08 lwz r9,8(r9)
ffc06048: 80 ba 00 04 lwz r5,4(r26)
ffc0604c: 7d 29 03 a6 mtctr r9
ffc06050: 4e 80 04 21 bctrl
iop,
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
ffc06054: 2c 03 00 00 cmpwi r3,0
ffc06058: 41 80 00 28 blt- ffc06080 <readv+0x14c> <== NEVER TAKEN
return -1;
if ( bytes > 0 ) {
ffc0605c: 41 82 00 08 beq- ffc06064 <readv+0x130> <== NEVER TAKEN
total += bytes;
ffc06060: 7f ff 1a 14 add r31,r31,r3
}
if (bytes != iov[ v ].iov_len)
ffc06064: 81 5a 00 04 lwz r10,4(r26)
ffc06068: 7f 83 50 00 cmpw cr7,r3,r10
ffc0606c: 40 9e 00 18 bne- cr7,ffc06084 <readv+0x150> <== NEVER TAKEN
ffc06070: 3b de 00 08 addi r30,r30,8
}
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
ffc06074: 7f 9e d8 00 cmpw cr7,r30,r27
ffc06078: 40 9e ff bc bne+ cr7,ffc06034 <readv+0x100>
ffc0607c: 48 00 00 08 b ffc06084 <readv+0x150>
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
return -1;
ffc06080: 3b e0 ff ff li r31,-1
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
ffc06084: 39 61 00 20 addi r11,r1,32
ffc06088: 7f e3 fb 78 mr r3,r31
ffc0608c: 4b ff ab 64 b ffc00bf0 <_restgpr_26_x>
ffc1b3b4 <realloc>:
void *realloc(
void *ptr,
size_t size
)
{
ffc1b3b4: 94 21 ff d8 stwu r1,-40(r1)
ffc1b3b8: 7c 08 02 a6 mflr r0
uintptr_t old_size;
char *new_area;
MSBUMP(realloc_calls, 1);
ffc1b3bc: 3d 20 00 00 lis r9,0
void *realloc(
void *ptr,
size_t size
)
{
ffc1b3c0: 90 01 00 2c stw r0,44(r1)
uintptr_t old_size;
char *new_area;
MSBUMP(realloc_calls, 1);
ffc1b3c4: 39 29 2b 98 addi r9,r9,11160
ffc1b3c8: 81 49 00 10 lwz r10,16(r9)
void *realloc(
void *ptr,
size_t size
)
{
ffc1b3cc: bf a1 00 1c stmw r29,28(r1)
ffc1b3d0: 7c 7f 1b 78 mr r31,r3
uintptr_t old_size;
char *new_area;
MSBUMP(realloc_calls, 1);
ffc1b3d4: 39 4a 00 01 addi r10,r10,1
ffc1b3d8: 91 49 00 10 stw r10,16(r9)
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
ffc1b3dc: 3d 20 00 00 lis r9,0
void *realloc(
void *ptr,
size_t size
)
{
ffc1b3e0: 7c 9e 23 78 mr r30,r4
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
ffc1b3e4: 81 29 28 90 lwz r9,10384(r9)
ffc1b3e8: 2f 89 00 03 cmpwi cr7,r9,3
ffc1b3ec: 40 be 00 18 bne+ cr7,ffc1b404 <realloc+0x50>
* 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 )
ffc1b3f0: 3d 20 00 00 lis r9,0
ffc1b3f4: 81 29 28 68 lwz r9,10344(r9)
ffc1b3f8: 2f 89 00 00 cmpwi cr7,r9,0
ffc1b3fc: 41 9e 00 d8 beq- cr7,ffc1b4d4 <realloc+0x120> <== ALWAYS TAKEN
ffc1b400: 48 00 00 60 b ffc1b460 <realloc+0xac> <== NOT EXECUTED
}
/*
* Continue with realloc().
*/
if ( !ptr )
ffc1b404: 2f 9f 00 00 cmpwi cr7,r31,0
ffc1b408: 40 be 00 1c bne+ cr7,ffc1b424 <realloc+0x70>
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
}
ffc1b40c: 80 01 00 2c lwz r0,44(r1)
/*
* Continue with realloc().
*/
if ( !ptr )
return malloc( size );
ffc1b410: 7f c3 f3 78 mr r3,r30
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
}
ffc1b414: bb a1 00 1c lmw r29,28(r1)
ffc1b418: 7c 08 03 a6 mtlr r0
ffc1b41c: 38 21 00 28 addi r1,r1,40
/*
* Continue with realloc().
*/
if ( !ptr )
return malloc( size );
ffc1b420: 4b fe 94 d8 b ffc048f8 <malloc>
if ( !size ) {
ffc1b424: 2f 9e 00 00 cmpwi cr7,r30,0
ffc1b428: 40 be 00 10 bne+ cr7,ffc1b438 <realloc+0x84> <== ALWAYS TAKEN
free( ptr );
ffc1b42c: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc1b430: 4b fe 91 2d bl ffc0455c <free> <== NOT EXECUTED
ffc1b434: 48 00 00 2c b ffc1b460 <realloc+0xac> <== NOT EXECUTED
return (void *) 0;
}
if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) {
ffc1b438: 3f a0 00 00 lis r29,0
ffc1b43c: 80 7d 27 90 lwz r3,10128(r29)
ffc1b440: 7f e4 fb 78 mr r4,r31
ffc1b444: 38 a1 00 08 addi r5,r1,8
ffc1b448: 48 00 06 35 bl ffc1ba7c <_Protected_heap_Get_block_size>
ffc1b44c: 2f 83 00 00 cmpwi cr7,r3,0
ffc1b450: 40 be 00 18 bne+ cr7,ffc1b468 <realloc+0xb4>
errno = EINVAL;
ffc1b454: 4b ff 51 59 bl ffc105ac <__errno>
ffc1b458: 39 20 00 16 li r9,22
ffc1b45c: 91 23 00 00 stw r9,0(r3)
return (void *) 0;
ffc1b460: 3b e0 00 00 li r31,0
ffc1b464: 48 00 00 84 b ffc1b4e8 <realloc+0x134>
}
/*
* Now resize it.
*/
if ( _Protected_heap_Resize_block( RTEMS_Malloc_Heap, ptr, size ) ) {
ffc1b468: 80 7d 27 90 lwz r3,10128(r29)
ffc1b46c: 7f e4 fb 78 mr r4,r31
ffc1b470: 7f c5 f3 78 mr r5,r30
ffc1b474: 48 00 06 59 bl ffc1bacc <_Protected_heap_Resize_block>
ffc1b478: 2f 83 00 00 cmpwi cr7,r3,0
ffc1b47c: 40 be 00 6c bne+ cr7,ffc1b4e8 <realloc+0x134>
* 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 );
ffc1b480: 7f c3 f3 78 mr r3,r30
ffc1b484: 4b fe 94 75 bl ffc048f8 <malloc>
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
ffc1b488: 3d 20 00 00 lis r9,0
if ( !new_area ) {
ffc1b48c: 7c 7d 1b 79 mr. r29,r3
* and the C Standard.
*/
new_area = malloc( size );
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
ffc1b490: 39 29 2b 98 addi r9,r9,11160
ffc1b494: 81 49 00 04 lwz r10,4(r9)
ffc1b498: 39 4a ff ff addi r10,r10,-1
ffc1b49c: 91 49 00 04 stw r10,4(r9)
if ( !new_area ) {
ffc1b4a0: 41 a2 ff c0 beq- ffc1b460 <realloc+0xac>
return (void *) 0;
}
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
ffc1b4a4: 81 21 00 08 lwz r9,8(r1)
ffc1b4a8: 7f c5 f3 78 mr r5,r30
ffc1b4ac: 7f 9e 48 40 cmplw cr7,r30,r9
ffc1b4b0: 40 9d 00 08 ble- cr7,ffc1b4b8 <realloc+0x104> <== NEVER TAKEN
ffc1b4b4: 7d 25 4b 78 mr r5,r9
ffc1b4b8: 7f e4 fb 78 mr r4,r31
ffc1b4bc: 7f a3 eb 78 mr r3,r29
ffc1b4c0: 4b ff 5d f1 bl ffc112b0 <memcpy>
free( ptr );
ffc1b4c4: 7f e3 fb 78 mr r3,r31
ffc1b4c8: 4b fe 90 95 bl ffc0455c <free>
ffc1b4cc: 7f bf eb 78 mr r31,r29
ffc1b4d0: 48 00 00 18 b ffc1b4e8 <realloc+0x134>
if (_System_state_Is_up(_System_state_Get())) {
if (_Thread_Dispatch_in_critical_section())
return (void *) 0;
if (_ISR_Nest_level > 0)
ffc1b4d4: 3d 20 00 00 lis r9,0
ffc1b4d8: 81 29 31 a8 lwz r9,12712(r9)
ffc1b4dc: 2f 89 00 00 cmpwi cr7,r9,0
ffc1b4e0: 41 9e ff 24 beq+ cr7,ffc1b404 <realloc+0x50> <== ALWAYS TAKEN
ffc1b4e4: 4b ff ff 7c b ffc1b460 <realloc+0xac> <== NOT EXECUTED
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
}
ffc1b4e8: 39 61 00 28 addi r11,r1,40
ffc1b4ec: 7f e3 fb 78 mr r3,r31
ffc1b4f0: 4b fe 50 cc b ffc005bc <_restgpr_29_x>
ffc08e6c <rtems_aio_enqueue>:
* errno - otherwise
*/
int
rtems_aio_enqueue (rtems_aio_request *req)
{
ffc08e6c: 94 21 ff b0 stwu r1,-80(r1)
ffc08e70: 7c 08 02 a6 mflr r0
ffc08e74: bf 61 00 3c stmw r27,60(r1)
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);
ffc08e78: 3f c0 00 00 lis r30,0
ffc08e7c: 3b de 2b b0 addi r30,r30,11184
* errno - otherwise
*/
int
rtems_aio_enqueue (rtems_aio_request *req)
{
ffc08e80: 7c 7f 1b 78 mr r31,r3
ffc08e84: 90 01 00 54 stw r0,84(r1)
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);
ffc08e88: 7f c3 f3 78 mr r3,r30
ffc08e8c: 48 00 0a a5 bl ffc09930 <pthread_mutex_lock>
if (result != 0) {
ffc08e90: 7c 7c 1b 79 mr. r28,r3
ffc08e94: 41 a2 00 10 beq+ ffc08ea4 <rtems_aio_enqueue+0x38> <== ALWAYS TAKEN
free (req);
ffc08e98: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc08e9c: 4b ff ba 0d bl ffc048a8 <free> <== NOT EXECUTED
ffc08ea0: 48 00 01 b8 b ffc09058 <rtems_aio_enqueue+0x1ec> <== 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);
ffc08ea4: 48 00 13 4d bl ffc0a1f0 <pthread_self>
ffc08ea8: 38 81 00 24 addi r4,r1,36
ffc08eac: 38 a1 00 08 addi r5,r1,8
ffc08eb0: 48 00 0f 41 bl ffc09df0 <pthread_getschedparam>
ffc08eb4: 3b 7e 00 48 addi r27,r30,72
req->caller_thread = pthread_self ();
ffc08eb8: 48 00 13 39 bl ffc0a1f0 <pthread_self>
req->priority = param.sched_priority - req->aiocbp->aio_reqprio;
ffc08ebc: 81 3f 00 14 lwz r9,20(r31)
ffc08ec0: 81 01 00 08 lwz r8,8(r1)
ffc08ec4: 81 49 00 18 lwz r10,24(r9)
/* _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);
req->caller_thread = pthread_self ();
ffc08ec8: 90 7f 00 10 stw r3,16(r31)
if ((aio_request_queue.idle_threads == 0) &&
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);
ffc08ecc: 7f 63 db 78 mr r3,r27
/* _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);
req->caller_thread = pthread_self ();
req->priority = param.sched_priority - req->aiocbp->aio_reqprio;
ffc08ed0: 7d 4a 40 50 subf r10,r10,r8
ffc08ed4: 91 5f 00 0c stw r10,12(r31)
req->policy = policy;
ffc08ed8: 81 41 00 24 lwz r10,36(r1)
if ((aio_request_queue.idle_threads == 0) &&
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);
ffc08edc: 80 89 00 00 lwz r4,0(r9)
we can use aio_reqprio to lower the priority of the request */
pthread_getschedparam (pthread_self(), &policy, ¶m);
req->caller_thread = pthread_self ();
req->priority = param.sched_priority - req->aiocbp->aio_reqprio;
req->policy = policy;
ffc08ee0: 91 5f 00 08 stw r10,8(r31)
req->aiocbp->error_code = EINPROGRESS;
ffc08ee4: 39 40 00 77 li r10,119
ffc08ee8: 91 49 00 34 stw r10,52(r9)
req->aiocbp->return_value = 0;
if ((aio_request_queue.idle_threads == 0) &&
ffc08eec: 81 5e 00 68 lwz r10,104(r30)
req->caller_thread = pthread_self ();
req->priority = param.sched_priority - req->aiocbp->aio_reqprio;
req->policy = policy;
req->aiocbp->error_code = EINPROGRESS;
req->aiocbp->return_value = 0;
ffc08ef0: 93 89 00 38 stw r28,56(r9)
if ((aio_request_queue.idle_threads == 0) &&
ffc08ef4: 2f 8a 00 00 cmpwi cr7,r10,0
ffc08ef8: 40 9e 00 a8 bne- cr7,ffc08fa0 <rtems_aio_enqueue+0x134> <== NEVER TAKEN
ffc08efc: 81 5e 00 64 lwz r10,100(r30)
ffc08f00: 2f 8a 00 04 cmpwi cr7,r10,4
ffc08f04: 41 bd 00 9c bgt+ cr7,ffc08fa0 <rtems_aio_enqueue+0x134>
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);
ffc08f08: 38 a0 00 01 li r5,1
ffc08f0c: 4b ff fd bd bl ffc08cc8 <rtems_aio_search_fd>
if (r_chain->new_fd == 1) {
ffc08f10: 81 23 00 18 lwz r9,24(r3)
if ((aio_request_queue.idle_threads == 0) &&
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);
ffc08f14: 7c 7d 1b 78 mr r29,r3
ffc08f18: 3b 63 00 08 addi r27,r3,8
if (r_chain->new_fd == 1) {
ffc08f1c: 2f 89 00 01 cmpwi cr7,r9,1
ffc08f20: 40 be 00 6c bne+ cr7,ffc08f8c <rtems_aio_enqueue+0x120>
RTEMS_INLINE_ROUTINE void _Chain_Prepend(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
_Chain_Insert(_Chain_Head(the_chain), the_node);
ffc08f24: 7f e4 fb 78 mr r4,r31
ffc08f28: 7f 63 db 78 mr r3,r27
ffc08f2c: 48 00 25 79 bl ffc0b4a4 <_Chain_Insert>
rtems_chain_prepend (&r_chain->perfd, &req->next_prio);
r_chain->new_fd = 0;
ffc08f30: 93 9d 00 18 stw r28,24(r29)
pthread_mutex_init (&r_chain->mutex, NULL);
ffc08f34: 38 80 00 00 li r4,0
ffc08f38: 38 7d 00 1c addi r3,r29,28
ffc08f3c: 48 00 08 95 bl ffc097d0 <pthread_mutex_init>
pthread_cond_init (&r_chain->cond, NULL);
ffc08f40: 38 80 00 00 li r4,0
ffc08f44: 38 7d 00 20 addi r3,r29,32
ffc08f48: 48 00 04 45 bl ffc0938c <pthread_cond_init>
AIO_printf ("New thread \n");
result = pthread_create (&thid, &aio_request_queue.attr,
ffc08f4c: 3c a0 ff c1 lis r5,-63
ffc08f50: 38 61 00 28 addi r3,r1,40
ffc08f54: 38 9e 00 08 addi r4,r30,8
ffc08f58: 38 a5 89 20 addi r5,r5,-30432
ffc08f5c: 7f a6 eb 78 mr r6,r29
ffc08f60: 48 00 0c 5d bl ffc09bbc <pthread_create>
rtems_aio_handle, (void *) r_chain);
if (result != 0) {
ffc08f64: 7c 7f 1b 79 mr. r31,r3
ffc08f68: 41 a2 00 14 beq+ ffc08f7c <rtems_aio_enqueue+0x110> <== ALWAYS TAKEN
pthread_mutex_unlock (&aio_request_queue.mutex);
ffc08f6c: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc08f70: 48 00 0a 4d bl ffc099bc <pthread_mutex_unlock> <== NOT EXECUTED
ffc08f74: 7f fc fb 78 mr r28,r31 <== NOT EXECUTED
ffc08f78: 48 00 00 e0 b ffc09058 <rtems_aio_enqueue+0x1ec> <== NOT EXECUTED
return result;
}
++aio_request_queue.active_threads;
ffc08f7c: 81 3e 00 64 lwz r9,100(r30)
ffc08f80: 39 29 00 01 addi r9,r9,1
ffc08f84: 91 3e 00 64 stw r9,100(r30)
ffc08f88: 48 00 00 c4 b ffc0904c <rtems_aio_enqueue+0x1e0>
}
else {
/* put request in the fd chain it belongs to */
pthread_mutex_lock (&r_chain->mutex);
ffc08f8c: 3b c3 00 1c addi r30,r3,28
ffc08f90: 7f c3 f3 78 mr r3,r30
ffc08f94: 48 00 09 9d bl ffc09930 <pthread_mutex_lock>
rtems_aio_insert_prio (&r_chain->perfd, req);
ffc08f98: 7f 63 db 78 mr r3,r27
ffc08f9c: 48 00 00 24 b ffc08fc0 <rtems_aio_enqueue+0x154>
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,
ffc08fa0: 38 a0 00 00 li r5,0
ffc08fa4: 4b ff fd 25 bl ffc08cc8 <rtems_aio_search_fd>
req->aiocbp->aio_fildes, 0);
if (r_chain != NULL)
ffc08fa8: 7c 7d 1b 79 mr. r29,r3
ffc08fac: 41 82 00 30 beq- ffc08fdc <rtems_aio_enqueue+0x170>
{
pthread_mutex_lock (&r_chain->mutex);
ffc08fb0: 3b dd 00 1c addi r30,r29,28
ffc08fb4: 7f c3 f3 78 mr r3,r30
ffc08fb8: 48 00 09 79 bl ffc09930 <pthread_mutex_lock>
rtems_aio_insert_prio (&r_chain->perfd, req);
ffc08fbc: 38 7d 00 08 addi r3,r29,8
ffc08fc0: 7f e4 fb 78 mr r4,r31
ffc08fc4: 4b ff fb c9 bl ffc08b8c <rtems_aio_insert_prio>
pthread_cond_signal (&r_chain->cond);
ffc08fc8: 38 7d 00 20 addi r3,r29,32
ffc08fcc: 48 00 04 85 bl ffc09450 <pthread_cond_signal>
pthread_mutex_unlock (&r_chain->mutex);
ffc08fd0: 7f c3 f3 78 mr r3,r30
ffc08fd4: 48 00 09 e9 bl ffc099bc <pthread_mutex_unlock>
ffc08fd8: 48 00 00 74 b ffc0904c <rtems_aio_enqueue+0x1e0>
} else {
/* or to the idle chain */
chain = &aio_request_queue.idle_req;
r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1);
ffc08fdc: 81 3f 00 14 lwz r9,20(r31)
ffc08fe0: 38 7b 00 0c addi r3,r27,12
ffc08fe4: 38 a0 00 01 li r5,1
ffc08fe8: 80 89 00 00 lwz r4,0(r9)
ffc08fec: 4b ff fc dd bl ffc08cc8 <rtems_aio_search_fd>
ffc08ff0: 7f e4 fb 78 mr r4,r31
if (r_chain->new_fd == 1) {
ffc08ff4: 81 23 00 18 lwz r9,24(r3)
} else {
/* or to the idle chain */
chain = &aio_request_queue.idle_req;
r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1);
ffc08ff8: 7c 7e 1b 78 mr r30,r3
ffc08ffc: 38 63 00 08 addi r3,r3,8
if (r_chain->new_fd == 1) {
ffc09000: 2f 89 00 01 cmpwi cr7,r9,1
ffc09004: 40 be 00 28 bne+ cr7,ffc0902c <rtems_aio_enqueue+0x1c0>
ffc09008: 48 00 24 9d bl ffc0b4a4 <_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;
ffc0900c: 93 be 00 18 stw r29,24(r30)
pthread_mutex_init (&r_chain->mutex, NULL);
ffc09010: 38 7e 00 1c addi r3,r30,28
ffc09014: 38 80 00 00 li r4,0
ffc09018: 48 00 07 b9 bl ffc097d0 <pthread_mutex_init>
pthread_cond_init (&r_chain->cond, NULL);
ffc0901c: 38 7e 00 20 addi r3,r30,32
ffc09020: 38 80 00 00 li r4,0
ffc09024: 48 00 03 69 bl ffc0938c <pthread_cond_init>
ffc09028: 48 00 00 08 b ffc09030 <rtems_aio_enqueue+0x1c4>
} else
/* just insert the request in the existing fd chain */
rtems_aio_insert_prio (&r_chain->perfd, req);
ffc0902c: 4b ff fb 61 bl ffc08b8c <rtems_aio_insert_prio>
if (aio_request_queue.idle_threads > 0)
ffc09030: 3c 60 00 00 lis r3,0
ffc09034: 38 63 2b b0 addi r3,r3,11184
ffc09038: 81 23 00 68 lwz r9,104(r3)
ffc0903c: 2f 89 00 00 cmpwi cr7,r9,0
ffc09040: 40 9d 00 0c ble- cr7,ffc0904c <rtems_aio_enqueue+0x1e0> <== ALWAYS TAKEN
pthread_cond_signal (&aio_request_queue.new_req);
ffc09044: 38 63 00 04 addi r3,r3,4 <== NOT EXECUTED
ffc09048: 48 00 04 09 bl ffc09450 <pthread_cond_signal> <== NOT EXECUTED
}
}
pthread_mutex_unlock (&aio_request_queue.mutex);
ffc0904c: 3c 60 00 00 lis r3,0
ffc09050: 38 63 2b b0 addi r3,r3,11184
ffc09054: 48 00 09 69 bl ffc099bc <pthread_mutex_unlock>
return 0;
}
ffc09058: 39 61 00 50 addi r11,r1,80
ffc0905c: 7f 83 e3 78 mr r3,r28
ffc09060: 4b ff 7b 18 b ffc00b78 <_restgpr_27_x>
ffc08920 <rtems_aio_handle>:
* NULL - if error
*/
static void *
rtems_aio_handle (void *arg)
{
ffc08920: 94 21 ff a0 stwu r1,-96(r1)
ffc08924: 7c 08 02 a6 mflr r0
ffc08928: be c1 00 38 stmw r22,56(r1)
struct timespec timeout;
AIO_printf ("Chain is empty [WQ], wait for work\n");
pthread_mutex_unlock (&r_chain->mutex);
pthread_mutex_lock (&aio_request_queue.mutex);
ffc0892c: 3f e0 00 00 lis r31,0
ffc08930: 3b ff 2b b0 addi r31,r31,11184
* NULL - if error
*/
static void *
rtems_aio_handle (void *arg)
{
ffc08934: 90 01 00 64 stw r0,100(r1)
ffc08938: 7c 7e 1b 78 mr r30,r3
pthread_cond_destroy (&r_chain->cond);
free (r_chain);
/* 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)) {
ffc0893c: 3b 5f 00 58 addi r26,r31,88
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 &&
ffc08940: 3b 3f 00 4c addi r25,r31,76
--aio_request_queue.active_threads;
clock_gettime (CLOCK_REALTIME, &timeout);
timeout.tv_sec += 3;
timeout.tv_nsec = 0;
result = pthread_cond_timedwait (&aio_request_queue.new_req,
ffc08944: 3b 1f 00 04 addi r24,r31,4
default:
result = -1;
}
if (result == -1) {
req->aiocbp->return_value = -1;
ffc08948: 3a e0 ff ff li r23,-1
req->aiocbp->error_code = errno;
} else {
req->aiocbp->return_value = result;
req->aiocbp->error_code = 0;
ffc0894c: 3a c0 00 00 li r22,0
/* 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);
ffc08950: 3b 9e 00 1c addi r28,r30,28
ffc08954: 7f 83 e3 78 mr r3,r28
ffc08958: 48 00 0f d9 bl ffc09930 <pthread_mutex_lock>
if (result != 0)
ffc0895c: 7c 7b 1b 79 mr. r27,r3
ffc08960: 40 82 02 20 bne- ffc08b80 <rtems_aio_handle+0x260> <== NEVER TAKEN
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
ffc08964: 83 be 00 08 lwz r29,8(r30)
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
ffc08968: 39 3e 00 0c addi r9,r30,12
/* 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)) {
ffc0896c: 7f 9d 48 00 cmpw cr7,r29,r9
ffc08970: 41 9e 00 cc beq- cr7,ffc08a3c <rtems_aio_handle+0x11c>
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);
ffc08974: 48 00 18 7d bl ffc0a1f0 <pthread_self>
ffc08978: 38 81 00 2c addi r4,r1,44
ffc0897c: 38 a1 00 08 addi r5,r1,8
ffc08980: 48 00 14 71 bl ffc09df0 <pthread_getschedparam>
param.sched_priority = req->priority;
ffc08984: 81 3d 00 0c lwz r9,12(r29)
ffc08988: 91 21 00 08 stw r9,8(r1)
pthread_setschedparam (pthread_self(), req->policy, ¶m);
ffc0898c: 48 00 18 65 bl ffc0a1f0 <pthread_self>
ffc08990: 38 a1 00 08 addi r5,r1,8
ffc08994: 80 9d 00 08 lwz r4,8(r29)
ffc08998: 48 00 18 69 bl ffc0a200 <pthread_setschedparam>
ffc0899c: 7f a3 eb 78 mr r3,r29
ffc089a0: 48 00 2a 9d bl ffc0b43c <_Chain_Extract>
rtems_chain_extract (node);
pthread_mutex_unlock (&r_chain->mutex);
ffc089a4: 7f 83 e3 78 mr r3,r28
ffc089a8: 48 00 10 15 bl ffc099bc <pthread_mutex_unlock>
switch (req->aiocbp->aio_lio_opcode) {
ffc089ac: 81 3d 00 14 lwz r9,20(r29)
ffc089b0: 81 49 00 30 lwz r10,48(r9)
ffc089b4: 2f 8a 00 02 cmpwi cr7,r10,2
ffc089b8: 41 9e 00 30 beq- cr7,ffc089e8 <rtems_aio_handle+0xc8>
ffc089bc: 2f 8a 00 03 cmpwi cr7,r10,3
ffc089c0: 41 9e 00 44 beq- cr7,ffc08a04 <rtems_aio_handle+0xe4> <== NEVER TAKEN
ffc089c4: 2f 8a 00 01 cmpwi cr7,r10,1
ffc089c8: 40 be 00 4c bne+ cr7,ffc08a14 <rtems_aio_handle+0xf4> <== NEVER TAKEN
case LIO_READ:
AIO_printf ("read\n");
result = pread (req->aiocbp->aio_fildes,
ffc089cc: 80 69 00 00 lwz r3,0(r9)
ffc089d0: 80 89 00 10 lwz r4,16(r9)
ffc089d4: 80 a9 00 14 lwz r5,20(r9)
ffc089d8: 80 e9 00 08 lwz r7,8(r9)
ffc089dc: 81 09 00 0c lwz r8,12(r9)
ffc089e0: 48 00 ac 6d bl ffc1364c <pread>
(void *) req->aiocbp->aio_buf,
req->aiocbp->aio_nbytes, req->aiocbp->aio_offset);
break;
ffc089e4: 48 00 00 28 b ffc08a0c <rtems_aio_handle+0xec>
case LIO_WRITE:
AIO_printf ("write\n");
result = pwrite (req->aiocbp->aio_fildes,
ffc089e8: 80 69 00 00 lwz r3,0(r9)
ffc089ec: 80 89 00 10 lwz r4,16(r9)
ffc089f0: 80 a9 00 14 lwz r5,20(r9)
ffc089f4: 80 e9 00 08 lwz r7,8(r9)
ffc089f8: 81 09 00 0c lwz r8,12(r9)
ffc089fc: 48 00 ad 8d bl ffc13788 <pwrite>
(void *) req->aiocbp->aio_buf,
req->aiocbp->aio_nbytes, req->aiocbp->aio_offset);
break;
ffc08a00: 48 00 00 0c b ffc08a0c <rtems_aio_handle+0xec>
case LIO_SYNC:
AIO_printf ("sync\n");
result = fsync (req->aiocbp->aio_fildes);
ffc08a04: 80 69 00 00 lwz r3,0(r9) <== NOT EXECUTED
ffc08a08: 48 00 6a 09 bl ffc0f410 <fsync> <== NOT EXECUTED
break;
default:
result = -1;
}
if (result == -1) {
ffc08a0c: 2f 83 ff ff cmpwi cr7,r3,-1
ffc08a10: 40 be 00 1c bne+ cr7,ffc08a2c <rtems_aio_handle+0x10c> <== ALWAYS TAKEN
req->aiocbp->return_value = -1;
ffc08a14: 83 bd 00 14 lwz r29,20(r29) <== NOT EXECUTED
ffc08a18: 92 fd 00 38 stw r23,56(r29) <== NOT EXECUTED
req->aiocbp->error_code = errno;
ffc08a1c: 48 00 9d 15 bl ffc12730 <__errno> <== NOT EXECUTED
ffc08a20: 81 23 00 00 lwz r9,0(r3) <== NOT EXECUTED
ffc08a24: 91 3d 00 34 stw r9,52(r29) <== NOT EXECUTED
ffc08a28: 4b ff ff 28 b ffc08950 <rtems_aio_handle+0x30> <== NOT EXECUTED
} else {
req->aiocbp->return_value = result;
ffc08a2c: 81 3d 00 14 lwz r9,20(r29)
ffc08a30: 90 69 00 38 stw r3,56(r9)
req->aiocbp->error_code = 0;
ffc08a34: 92 c9 00 34 stw r22,52(r9)
ffc08a38: 4b ff ff 18 b ffc08950 <rtems_aio_handle+0x30>
struct timespec timeout;
AIO_printf ("Chain is empty [WQ], wait for work\n");
pthread_mutex_unlock (&r_chain->mutex);
ffc08a3c: 7f 83 e3 78 mr r3,r28
ffc08a40: 48 00 0f 7d bl ffc099bc <pthread_mutex_unlock>
pthread_mutex_lock (&aio_request_queue.mutex);
ffc08a44: 7f e3 fb 78 mr r3,r31
ffc08a48: 48 00 0e e9 bl ffc09930 <pthread_mutex_lock>
if (rtems_chain_is_empty (chain))
ffc08a4c: 81 3e 00 08 lwz r9,8(r30)
ffc08a50: 7f 89 e8 00 cmpw cr7,r9,r29
ffc08a54: 40 be 01 20 bne+ cr7,ffc08b74 <rtems_aio_handle+0x254> <== NEVER TAKEN
{
clock_gettime (CLOCK_REALTIME, &timeout);
ffc08a58: 38 81 00 24 addi r4,r1,36
ffc08a5c: 38 60 00 01 li r3,1
ffc08a60: 48 00 07 75 bl ffc091d4 <clock_gettime>
timeout.tv_sec += 3;
ffc08a64: 81 21 00 24 lwz r9,36(r1)
timeout.tv_nsec = 0;
result = pthread_cond_timedwait (&r_chain->cond,
ffc08a68: 3b be 00 20 addi r29,r30,32
if (rtems_chain_is_empty (chain))
{
clock_gettime (CLOCK_REALTIME, &timeout);
timeout.tv_sec += 3;
timeout.tv_nsec = 0;
ffc08a6c: 93 61 00 28 stw r27,40(r1)
pthread_mutex_lock (&aio_request_queue.mutex);
if (rtems_chain_is_empty (chain))
{
clock_gettime (CLOCK_REALTIME, &timeout);
timeout.tv_sec += 3;
ffc08a70: 39 29 00 03 addi r9,r9,3
timeout.tv_nsec = 0;
result = pthread_cond_timedwait (&r_chain->cond,
ffc08a74: 7f a3 eb 78 mr r3,r29
pthread_mutex_lock (&aio_request_queue.mutex);
if (rtems_chain_is_empty (chain))
{
clock_gettime (CLOCK_REALTIME, &timeout);
timeout.tv_sec += 3;
ffc08a78: 91 21 00 24 stw r9,36(r1)
timeout.tv_nsec = 0;
result = pthread_cond_timedwait (&r_chain->cond,
ffc08a7c: 7f e4 fb 78 mr r4,r31
ffc08a80: 38 a1 00 24 addi r5,r1,36
ffc08a84: 48 00 0a 51 bl ffc094d4 <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) {
ffc08a88: 2f 83 00 74 cmpwi cr7,r3,116
ffc08a8c: 40 be 00 e8 bne+ cr7,ffc08b74 <rtems_aio_handle+0x254> <== NEVER TAKEN
ffc08a90: 7f c3 f3 78 mr r3,r30
ffc08a94: 48 00 29 a9 bl ffc0b43c <_Chain_Extract>
rtems_chain_extract (&r_chain->next_fd);
pthread_mutex_destroy (&r_chain->mutex);
ffc08a98: 7f 83 e3 78 mr r3,r28
ffc08a9c: 48 00 0b b5 bl ffc09650 <pthread_mutex_destroy>
pthread_cond_destroy (&r_chain->cond);
ffc08aa0: 7f a3 eb 78 mr r3,r29
ffc08aa4: 48 00 07 f5 bl ffc09298 <pthread_cond_destroy>
free (r_chain);
ffc08aa8: 7f c3 f3 78 mr r3,r30
ffc08aac: 4b ff bd fd bl ffc048a8 <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)) {
ffc08ab0: 81 3f 00 54 lwz r9,84(r31)
ffc08ab4: 7f 89 d0 00 cmpw cr7,r9,r26
ffc08ab8: 40 be 00 68 bne+ cr7,ffc08b20 <rtems_aio_handle+0x200>
AIO_printf ("Chain is empty [IQ], wait for work\n");
++aio_request_queue.idle_threads;
ffc08abc: 81 3f 00 68 lwz r9,104(r31)
--aio_request_queue.active_threads;
clock_gettime (CLOCK_REALTIME, &timeout);
ffc08ac0: 38 81 00 24 addi r4,r1,36
ffc08ac4: 38 60 00 01 li r3,1
/* 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)) {
AIO_printf ("Chain is empty [IQ], wait for work\n");
++aio_request_queue.idle_threads;
ffc08ac8: 39 29 00 01 addi r9,r9,1
ffc08acc: 91 3f 00 68 stw r9,104(r31)
--aio_request_queue.active_threads;
ffc08ad0: 81 3f 00 64 lwz r9,100(r31)
ffc08ad4: 39 29 ff ff addi r9,r9,-1
ffc08ad8: 91 3f 00 64 stw r9,100(r31)
clock_gettime (CLOCK_REALTIME, &timeout);
ffc08adc: 48 00 06 f9 bl ffc091d4 <clock_gettime>
timeout.tv_sec += 3;
timeout.tv_nsec = 0;
result = pthread_cond_timedwait (&aio_request_queue.new_req,
ffc08ae0: 7f 03 c3 78 mr r3,r24
AIO_printf ("Chain is empty [IQ], wait for work\n");
++aio_request_queue.idle_threads;
--aio_request_queue.active_threads;
clock_gettime (CLOCK_REALTIME, &timeout);
timeout.tv_sec += 3;
ffc08ae4: 81 21 00 24 lwz r9,36(r1)
timeout.tv_nsec = 0;
result = pthread_cond_timedwait (&aio_request_queue.new_req,
ffc08ae8: 7f e4 fb 78 mr r4,r31
ffc08aec: 38 a1 00 24 addi r5,r1,36
++aio_request_queue.idle_threads;
--aio_request_queue.active_threads;
clock_gettime (CLOCK_REALTIME, &timeout);
timeout.tv_sec += 3;
timeout.tv_nsec = 0;
ffc08af0: 93 61 00 28 stw r27,40(r1)
AIO_printf ("Chain is empty [IQ], wait for work\n");
++aio_request_queue.idle_threads;
--aio_request_queue.active_threads;
clock_gettime (CLOCK_REALTIME, &timeout);
timeout.tv_sec += 3;
ffc08af4: 39 29 00 03 addi r9,r9,3
ffc08af8: 91 21 00 24 stw r9,36(r1)
timeout.tv_nsec = 0;
result = pthread_cond_timedwait (&aio_request_queue.new_req,
ffc08afc: 48 00 09 d9 bl ffc094d4 <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) {
ffc08b00: 2f 83 00 74 cmpwi cr7,r3,116
ffc08b04: 40 be 00 1c bne+ cr7,ffc08b20 <rtems_aio_handle+0x200> <== NEVER TAKEN
AIO_printf ("Etimeout\n");
--aio_request_queue.idle_threads;
ffc08b08: 81 3f 00 68 lwz r9,104(r31)
pthread_mutex_unlock (&aio_request_queue.mutex);
ffc08b0c: 7f e3 fb 78 mr r3,r31
/* If no new fd chain was added in the idle requests
then this thread is finished */
if (result == ETIMEDOUT) {
AIO_printf ("Etimeout\n");
--aio_request_queue.idle_threads;
ffc08b10: 39 29 ff ff addi r9,r9,-1
ffc08b14: 91 3f 00 68 stw r9,104(r31)
pthread_mutex_unlock (&aio_request_queue.mutex);
ffc08b18: 48 00 0e a5 bl ffc099bc <pthread_mutex_unlock>
ffc08b1c: 48 00 00 64 b ffc08b80 <rtems_aio_handle+0x260>
}
}
/* 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;
ffc08b20: 81 3f 00 68 lwz r9,104(r31)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
ffc08b24: 83 df 00 54 lwz r30,84(r31)
ffc08b28: 39 29 ff ff addi r9,r9,-1
ffc08b2c: 91 3f 00 68 stw r9,104(r31)
ffc08b30: 7f c3 f3 78 mr r3,r30
++aio_request_queue.active_threads;
ffc08b34: 81 3f 00 64 lwz r9,100(r31)
ffc08b38: 39 29 00 01 addi r9,r9,1
ffc08b3c: 91 3f 00 64 stw r9,100(r31)
ffc08b40: 48 00 28 fd bl ffc0b43c <_Chain_Extract>
ffc08b44: 81 3f 00 48 lwz r9,72(r31)
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 &&
ffc08b48: 81 1e 00 14 lwz r8,20(r30)
ffc08b4c: 48 00 00 08 b ffc08b54 <rtems_aio_handle+0x234>
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
ffc08b50: 81 29 00 00 lwz r9,0(r9)
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 &&
ffc08b54: 81 49 00 14 lwz r10,20(r9)
ffc08b58: 7f 8a 40 00 cmpw cr7,r10,r8
ffc08b5c: 40 9c 00 0c bge- cr7,ffc08b68 <rtems_aio_handle+0x248>
ffc08b60: 7f 89 c8 00 cmpw cr7,r9,r25
ffc08b64: 40 9e ff ec bne+ cr7,ffc08b50 <rtems_aio_handle+0x230> <== 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 );
ffc08b68: 80 69 00 04 lwz r3,4(r9)
ffc08b6c: 7f c4 f3 78 mr r4,r30
ffc08b70: 48 00 29 35 bl ffc0b4a4 <_Chain_Insert>
}
}
/* 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);
ffc08b74: 7f e3 fb 78 mr r3,r31
ffc08b78: 48 00 0e 45 bl ffc099bc <pthread_mutex_unlock>
ffc08b7c: 4b ff fd d4 b ffc08950 <rtems_aio_handle+0x30>
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
ffc08b80: 39 61 00 60 addi r11,r1,96
ffc08b84: 38 60 00 00 li r3,0
ffc08b88: 4b ff 7f dc b ffc00b64 <_restgpr_22_x>
ffc08be4 <rtems_aio_init>:
* 0 - if initialization succeeded
*/
int
rtems_aio_init (void)
{
ffc08be4: 94 21 ff f0 stwu r1,-16(r1)
ffc08be8: 7c 08 02 a6 mflr r0
ffc08bec: bf c1 00 08 stmw r30,8(r1)
int result = 0;
result = pthread_attr_init (&aio_request_queue.attr);
ffc08bf0: 3f e0 00 00 lis r31,0
ffc08bf4: 3b ff 2b b8 addi r31,r31,11192
ffc08bf8: 7f e3 fb 78 mr r3,r31
* 0 - if initialization succeeded
*/
int
rtems_aio_init (void)
{
ffc08bfc: 90 01 00 14 stw r0,20(r1)
int result = 0;
result = pthread_attr_init (&aio_request_queue.attr);
ffc08c00: 48 00 0f 45 bl ffc09b44 <pthread_attr_init>
if (result != 0)
ffc08c04: 7c 7e 1b 79 mr. r30,r3
ffc08c08: 40 a2 00 b4 bne+ ffc08cbc <rtems_aio_init+0xd8> <== NEVER TAKEN
return result;
result =
ffc08c0c: 7f e3 fb 78 mr r3,r31
ffc08c10: 38 80 00 00 li r4,0
ffc08c14: 48 00 0f 75 bl ffc09b88 <pthread_attr_setdetachstate>
pthread_attr_setdetachstate (&aio_request_queue.attr,
PTHREAD_CREATE_DETACHED);
if (result != 0)
ffc08c18: 2f 83 00 00 cmpwi cr7,r3,0
ffc08c1c: 41 be 00 0c beq+ cr7,ffc08c28 <rtems_aio_init+0x44> <== ALWAYS TAKEN
pthread_attr_destroy (&aio_request_queue.attr);
ffc08c20: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc08c24: 48 00 0e f1 bl ffc09b14 <pthread_attr_destroy> <== NOT EXECUTED
result = pthread_mutex_init (&aio_request_queue.mutex, NULL);
ffc08c28: 3f e0 00 00 lis r31,0
ffc08c2c: 3b ff 2b b0 addi r31,r31,11184
ffc08c30: 7f e3 fb 78 mr r3,r31
ffc08c34: 38 80 00 00 li r4,0
ffc08c38: 48 00 0b 99 bl ffc097d0 <pthread_mutex_init>
if (result != 0)
ffc08c3c: 2f 83 00 00 cmpwi cr7,r3,0
ffc08c40: 41 be 00 0c beq+ cr7,ffc08c4c <rtems_aio_init+0x68> <== ALWAYS TAKEN
pthread_attr_destroy (&aio_request_queue.attr);
ffc08c44: 38 7f 00 08 addi r3,r31,8 <== NOT EXECUTED
ffc08c48: 48 00 0e cd bl ffc09b14 <pthread_attr_destroy> <== NOT EXECUTED
result = pthread_cond_init (&aio_request_queue.new_req, NULL);
ffc08c4c: 3f e0 00 00 lis r31,0
ffc08c50: 3b ff 2b b4 addi r31,r31,11188
ffc08c54: 7f e3 fb 78 mr r3,r31
ffc08c58: 38 80 00 00 li r4,0
ffc08c5c: 48 00 07 31 bl ffc0938c <pthread_cond_init>
if (result != 0) {
ffc08c60: 7c 7e 1b 79 mr. r30,r3
ffc08c64: 41 a2 00 14 beq+ ffc08c78 <rtems_aio_init+0x94> <== ALWAYS TAKEN
pthread_mutex_destroy (&aio_request_queue.mutex);
ffc08c68: 38 7f ff fc addi r3,r31,-4 <== NOT EXECUTED
ffc08c6c: 48 00 09 e5 bl ffc09650 <pthread_mutex_destroy> <== NOT EXECUTED
pthread_attr_destroy (&aio_request_queue.attr);
ffc08c70: 38 7f 00 04 addi r3,r31,4 <== NOT EXECUTED
ffc08c74: 48 00 0e a1 bl ffc09b14 <pthread_attr_destroy> <== NOT EXECUTED
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
ffc08c78: 3d 20 00 00 lis r9,0
ffc08c7c: 39 29 2b b0 addi r9,r9,11184
ffc08c80: 39 49 00 4c addi r10,r9,76
head->previous = NULL;
tail->previous = head;
ffc08c84: 39 09 00 48 addi r8,r9,72
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
ffc08c88: 91 49 00 48 stw r10,72(r9)
head->previous = NULL;
ffc08c8c: 39 40 00 00 li r10,0
tail->previous = head;
ffc08c90: 91 09 00 50 stw r8,80(r9)
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
ffc08c94: 39 09 00 58 addi r8,r9,88
head->previous = NULL;
ffc08c98: 91 49 00 4c stw r10,76(r9)
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
ffc08c9c: 91 09 00 54 stw r8,84(r9)
head->previous = NULL;
tail->previous = head;
ffc08ca0: 39 09 00 54 addi r8,r9,84
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
ffc08ca4: 91 49 00 58 stw r10,88(r9)
}
rtems_chain_initialize_empty (&aio_request_queue.work_req);
rtems_chain_initialize_empty (&aio_request_queue.idle_req);
aio_request_queue.active_threads = 0;
ffc08ca8: 91 49 00 64 stw r10,100(r9)
aio_request_queue.idle_threads = 0;
ffc08cac: 91 49 00 68 stw r10,104(r9)
aio_request_queue.initialized = AIO_QUEUE_INITIALIZED;
ffc08cb0: 61 4a b0 0b ori r10,r10,45067
tail->previous = head;
ffc08cb4: 91 09 00 5c stw r8,92(r9)
ffc08cb8: 91 49 00 60 stw r10,96(r9)
return result;
}
ffc08cbc: 39 61 00 10 addi r11,r1,16
ffc08cc0: 7f c3 f3 78 mr r3,r30
ffc08cc4: 4b ff 7e c0 b ffc00b84 <_restgpr_30_x>
ffc08b8c <rtems_aio_insert_prio>:
ffc08b8c: 81 23 00 00 lwz r9,0(r3)
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
ffc08b90: 39 03 00 04 addi r8,r3,4
* NONE
*/
static void
rtems_aio_insert_prio (rtems_chain_control *chain, rtems_aio_request *req)
{
ffc08b94: 7c 8a 23 78 mr r10,r4
rtems_chain_node *node;
AIO_printf ("FD exists \n");
node = rtems_chain_first (chain);
if (rtems_chain_is_empty (chain)) {
ffc08b98: 7f 89 40 00 cmpw cr7,r9,r8
ffc08b9c: 40 be 00 08 bne+ cr7,ffc08ba4 <rtems_aio_insert_prio+0x18><== ALWAYS TAKEN
ffc08ba0: 48 00 00 34 b ffc08bd4 <rtems_aio_insert_prio+0x48> <== 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;
ffc08ba4: 80 e9 00 14 lwz r7,20(r9)
while (req->aiocbp->aio_reqprio > prio &&
ffc08ba8: 80 c4 00 14 lwz r6,20(r4)
if (rtems_chain_is_empty (chain)) {
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;
ffc08bac: 80 e7 00 18 lwz r7,24(r7)
while (req->aiocbp->aio_reqprio > prio &&
ffc08bb0: 80 c6 00 18 lwz r6,24(r6)
ffc08bb4: 48 00 00 10 b ffc08bc4 <rtems_aio_insert_prio+0x38>
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
ffc08bb8: 81 29 00 00 lwz r9,0(r9) <== 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;
ffc08bbc: 80 e9 00 14 lwz r7,20(r9) <== NOT EXECUTED
ffc08bc0: 80 e7 00 18 lwz r7,24(r7) <== 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 &&
ffc08bc4: 7f 86 38 00 cmpw cr7,r6,r7
ffc08bc8: 41 bd 00 10 bgt+ cr7,ffc08bd8 <rtems_aio_insert_prio+0x4c><== NEVER TAKEN
ffc08bcc: 80 69 00 04 lwz r3,4(r9)
ffc08bd0: 7d 44 53 78 mr r4,r10
ffc08bd4: 48 00 28 d0 b ffc0b4a4 <_Chain_Insert>
ffc08bd8: 7f 89 40 00 cmpw cr7,r9,r8 <== NOT EXECUTED
ffc08bdc: 40 9e ff dc bne+ cr7,ffc08bb8 <rtems_aio_insert_prio+0x2c><== NOT EXECUTED
ffc08be0: 4b ff ff ec b ffc08bcc <rtems_aio_insert_prio+0x40> <== NOT EXECUTED
ffc08de0 <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)
{
ffc08de0: 7c 2b 0b 78 mr r11,r1
ffc08de4: 7c 08 02 a6 mflr r0
ffc08de8: 94 21 ff f0 stwu r1,-16(r1)
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
ffc08dec: 39 23 00 04 addi r9,r3,4
ffc08df0: 90 01 00 14 stw r0,20(r1)
ffc08df4: 4b ff 7d 49 bl ffc00b3c <_savegpr_31>
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
ffc08df8: 83 e3 00 00 lwz r31,0(r3)
if (rtems_chain_is_empty (chain))
ffc08dfc: 7f 9f 48 00 cmpw cr7,r31,r9
ffc08e00: 40 be 00 1c bne+ cr7,ffc08e1c <rtems_aio_remove_req+0x3c>
ffc08e04: 48 00 00 5c b ffc08e60 <rtems_aio_remove_req+0x80>
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
ffc08e08: 83 ff 00 00 lwz r31,0(r31) <== 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) {
ffc08e0c: 7f 9f 48 00 cmpw cr7,r31,r9 <== NOT EXECUTED
ffc08e10: 40 be 00 0c bne+ cr7,ffc08e1c <rtems_aio_remove_req+0x3c><== NOT EXECUTED
node = rtems_chain_next (node);
current = (rtems_aio_request *) node;
}
if (rtems_chain_is_tail (chain, node))
return AIO_NOTCANCELED;
ffc08e14: 38 60 00 01 li r3,1 <== NOT EXECUTED
ffc08e18: 48 00 00 4c b ffc08e64 <rtems_aio_remove_req+0x84> <== 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) {
ffc08e1c: 81 5f 00 14 lwz r10,20(r31)
ffc08e20: 7f 8a 20 00 cmpw cr7,r10,r4
ffc08e24: 40 9e ff e4 bne+ cr7,ffc08e08 <rtems_aio_remove_req+0x28><== NEVER TAKEN
node = rtems_chain_next (node);
current = (rtems_aio_request *) node;
}
if (rtems_chain_is_tail (chain, node))
ffc08e28: 7f 9f 48 00 cmpw cr7,r31,r9
return AIO_NOTCANCELED;
ffc08e2c: 38 60 00 01 li r3,1
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))
ffc08e30: 41 9e 00 34 beq- cr7,ffc08e64 <rtems_aio_remove_req+0x84><== NEVER TAKEN
ffc08e34: 7f e3 fb 78 mr r3,r31
ffc08e38: 48 00 26 05 bl ffc0b43c <_Chain_Extract>
return AIO_NOTCANCELED;
else
{
rtems_chain_extract (node);
current->aiocbp->error_code = ECANCELED;
ffc08e3c: 81 3f 00 14 lwz r9,20(r31)
ffc08e40: 39 40 00 8c li r10,140
ffc08e44: 91 49 00 34 stw r10,52(r9)
current->aiocbp->return_value = -1;
ffc08e48: 39 40 ff ff li r10,-1
free (current);
ffc08e4c: 7f e3 fb 78 mr r3,r31
return AIO_NOTCANCELED;
else
{
rtems_chain_extract (node);
current->aiocbp->error_code = ECANCELED;
current->aiocbp->return_value = -1;
ffc08e50: 91 49 00 38 stw r10,56(r9)
free (current);
ffc08e54: 4b ff ba 55 bl ffc048a8 <free>
}
return AIO_CANCELED;
ffc08e58: 38 60 00 00 li r3,0
ffc08e5c: 48 00 00 08 b ffc08e64 <rtems_aio_remove_req+0x84>
*/
int rtems_aio_remove_req (rtems_chain_control *chain, struct aiocb *aiocbp)
{
if (rtems_chain_is_empty (chain))
return AIO_ALLDONE;
ffc08e60: 38 60 00 02 li r3,2
current->aiocbp->return_value = -1;
free (current);
}
return AIO_CANCELED;
}
ffc08e64: 39 61 00 10 addi r11,r1,16
ffc08e68: 4b ff 7d 20 b ffc00b88 <_restgpr_31_x>
ffc0e000 <rtems_bdbuf_add_to_modified_list_after_access>:
}
}
static void
rtems_bdbuf_add_to_modified_list_after_access (rtems_bdbuf_buffer *bd)
{
ffc0e000: 94 21 ff f0 stwu r1,-16(r1)
ffc0e004: 7c 08 02 a6 mflr r0
ffc0e008: bf c1 00 08 stmw r30,8(r1)
if (bdbuf_cache.sync_active && bdbuf_cache.sync_device == bd->dd)
ffc0e00c: 3f c0 00 00 lis r30,0
ffc0e010: 3b de 2a 00 addi r30,r30,10752
ffc0e014: 89 3e 00 30 lbz r9,48(r30)
}
}
static void
rtems_bdbuf_add_to_modified_list_after_access (rtems_bdbuf_buffer *bd)
{
ffc0e018: 7c 7f 1b 78 mr r31,r3
ffc0e01c: 90 01 00 14 stw r0,20(r1)
if (bdbuf_cache.sync_active && bdbuf_cache.sync_device == bd->dd)
ffc0e020: 2f 89 00 00 cmpwi cr7,r9,0
ffc0e024: 41 9e 00 34 beq- cr7,ffc0e058 <rtems_bdbuf_add_to_modified_list_after_access+0x58><== ALWAYS TAKEN
ffc0e028: 81 5e 00 38 lwz r10,56(r30) <== NOT EXECUTED
ffc0e02c: 81 23 00 14 lwz r9,20(r3) <== NOT EXECUTED
ffc0e030: 7f 8a 48 00 cmpw cr7,r10,r9 <== NOT EXECUTED
ffc0e034: 40 be 00 24 bne+ cr7,ffc0e058 <rtems_bdbuf_add_to_modified_list_after_access+0x58><== NOT EXECUTED
{
rtems_bdbuf_unlock_cache ();
ffc0e038: 4b ff f8 75 bl ffc0d8ac <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_BDBUF_FATAL_SYNC_LOCK);
ffc0e03c: 80 7e 00 2c lwz r3,44(r30) <== NOT EXECUTED
ffc0e040: 38 80 00 19 li r4,25 <== NOT EXECUTED
ffc0e044: 4b ff f7 d1 bl ffc0d814 <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,
ffc0e048: 80 7e 00 2c lwz r3,44(r30) <== NOT EXECUTED
ffc0e04c: 38 80 00 1a li r4,26 <== NOT EXECUTED
ffc0e050: 4b ff f8 29 bl ffc0d878 <rtems_bdbuf_unlock> <== NOT EXECUTED
* Wait for the sync lock.
*/
rtems_bdbuf_lock_sync ();
rtems_bdbuf_unlock_sync ();
rtems_bdbuf_lock_cache ();
ffc0e054: 4b ff f7 fd bl ffc0d850 <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
ffc0e058: 81 3f 00 20 lwz r9,32(r31)
ffc0e05c: 2f 89 00 03 cmpwi cr7,r9,3
ffc0e060: 41 9e 00 0c beq- cr7,ffc0e06c <rtems_bdbuf_add_to_modified_list_after_access+0x6c>
|| bd->state == RTEMS_BDBUF_STATE_ACCESS_EMPTY)
ffc0e064: 2f 89 00 05 cmpwi cr7,r9,5
ffc0e068: 40 be 00 10 bne+ cr7,ffc0e078 <rtems_bdbuf_add_to_modified_list_after_access+0x78>
bd->hold_timer = bdbuf_config.swap_block_hold;
ffc0e06c: 3d 20 ff c2 lis r9,-62
ffc0e070: 81 29 a3 8c lwz r9,-23668(r9)
ffc0e074: 91 3f 00 2c stw r9,44(r31)
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
ffc0e078: 3c 60 00 00 lis r3,0
ffc0e07c: 38 63 2a 00 addi r3,r3,10752
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
ffc0e080: 39 20 00 07 li r9,7
ffc0e084: 91 3f 00 20 stw r9,32(r31)
the_node->next = tail;
ffc0e088: 39 43 00 50 addi r10,r3,80
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
ffc0e08c: 81 23 00 54 lwz r9,84(r3)
the_node->next = tail;
ffc0e090: 91 5f 00 00 stw r10,0(r31)
tail->previous = the_node;
ffc0e094: 93 e3 00 54 stw r31,84(r3)
old_last->next = the_node;
ffc0e098: 93 e9 00 00 stw r31,0(r9)
the_node->previous = old_last;
ffc0e09c: 91 3f 00 04 stw r9,4(r31)
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)
ffc0e0a0: 81 3f 00 24 lwz r9,36(r31)
ffc0e0a4: 2f 89 00 00 cmpwi cr7,r9,0
ffc0e0a8: 41 be 00 1c beq+ cr7,ffc0e0c4 <rtems_bdbuf_add_to_modified_list_after_access+0xc4>
rtems_bdbuf_wake (&bdbuf_cache.access_waiters);
else if (rtems_bdbuf_has_buffer_waiters ())
rtems_bdbuf_wake_swapper ();
}
ffc0e0ac: 80 01 00 14 lwz r0,20(r1)
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);
ffc0e0b0: 38 63 00 64 addi r3,r3,100
else if (rtems_bdbuf_has_buffer_waiters ())
rtems_bdbuf_wake_swapper ();
}
ffc0e0b4: bb c1 00 08 lmw r30,8(r1)
ffc0e0b8: 7c 08 03 a6 mtlr r0
ffc0e0bc: 38 21 00 10 addi r1,r1,16
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);
ffc0e0c0: 4b ff fa a0 b ffc0db60 <rtems_bdbuf_wake>
else if (rtems_bdbuf_has_buffer_waiters ())
ffc0e0c4: 81 23 00 74 lwz r9,116(r3)
ffc0e0c8: 2f 89 00 00 cmpwi cr7,r9,0
ffc0e0cc: 41 be 00 18 beq+ cr7,ffc0e0e4 <rtems_bdbuf_add_to_modified_list_after_access+0xe4>
rtems_bdbuf_wake_swapper ();
}
ffc0e0d0: 80 01 00 14 lwz r0,20(r1)
ffc0e0d4: bb c1 00 08 lmw r30,8(r1)
ffc0e0d8: 7c 08 03 a6 mtlr r0
ffc0e0dc: 38 21 00 10 addi r1,r1,16
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 ();
ffc0e0e0: 4b ff f7 dc b ffc0d8bc <rtems_bdbuf_wake_swapper>
}
ffc0e0e4: 39 61 00 10 addi r11,r1,16
ffc0e0e8: 48 00 b6 64 b ffc1974c <_restgpr_30_x>
ffc0d980 <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)
{
ffc0d980: 94 21 ff f0 stwu r1,-16(r1)
ffc0d984: 7c 08 02 a6 mflr r0
ffc0d988: 90 01 00 14 stw r0,20(r1)
rtems_mode prev_mode;
/*
* Indicate we are waiting.
*/
++waiters->count;
ffc0d98c: 81 23 00 00 lwz r9,0(r3)
* 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)
{
ffc0d990: bf c1 00 08 stmw r30,8(r1)
ffc0d994: 7c 7f 1b 78 mr r31,r3
rtems_mode prev_mode;
/*
* Indicate we are waiting.
*/
++waiters->count;
ffc0d998: 39 29 00 01 addi r9,r9,1
ffc0d99c: 91 23 00 00 stw r9,0(r3)
* 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 ();
ffc0d9a0: 4b ff ff 59 bl ffc0d8f8 <rtems_bdbuf_disable_preemption>
ffc0d9a4: 7c 7e 1b 78 mr r30,r3
/*
* Unlock the cache, wait, and lock the cache when we return.
*/
rtems_bdbuf_unlock_cache ();
ffc0d9a8: 4b ff ff 05 bl ffc0d8ac <rtems_bdbuf_unlock_cache>
sc = rtems_semaphore_obtain (waiters->sema, RTEMS_WAIT, RTEMS_BDBUF_WAIT_TIMEOUT);
ffc0d9ac: 80 7f 00 04 lwz r3,4(r31)
ffc0d9b0: 38 80 00 00 li r4,0
ffc0d9b4: 38 a0 00 00 li r5,0
ffc0d9b8: 4b ff bf ed bl ffc099a4 <rtems_semaphore_obtain>
if (sc == RTEMS_TIMEOUT)
ffc0d9bc: 2f 83 00 06 cmpwi cr7,r3,6
ffc0d9c0: 40 be 00 0c bne+ cr7,ffc0d9cc <rtems_bdbuf_anonymous_wait+0x4c><== ALWAYS TAKEN
rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_CACHE_WAIT_TO);
ffc0d9c4: 38 60 00 03 li r3,3 <== NOT EXECUTED
ffc0d9c8: 48 00 00 10 b ffc0d9d8 <rtems_bdbuf_anonymous_wait+0x58><== NOT EXECUTED
if (sc != RTEMS_UNSATISFIED)
ffc0d9cc: 2f 83 00 0d cmpwi cr7,r3,13
ffc0d9d0: 41 be 00 0c beq+ cr7,ffc0d9dc <rtems_bdbuf_anonymous_wait+0x5c><== ALWAYS TAKEN
rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_CACHE_WAIT_2);
ffc0d9d4: 38 60 00 02 li r3,2 <== NOT EXECUTED
ffc0d9d8: 4b ff fe 25 bl ffc0d7fc <rtems_bdbuf_fatal> <== NOT EXECUTED
rtems_bdbuf_lock_cache ();
ffc0d9dc: 4b ff fe 75 bl ffc0d850 <rtems_bdbuf_lock_cache>
rtems_bdbuf_restore_preemption (prev_mode);
ffc0d9e0: 7f c3 f3 78 mr r3,r30
ffc0d9e4: 4b ff ff 5d bl ffc0d940 <rtems_bdbuf_restore_preemption>
--waiters->count;
ffc0d9e8: 81 3f 00 00 lwz r9,0(r31)
}
ffc0d9ec: 39 61 00 10 addi r11,r1,16
rtems_bdbuf_lock_cache ();
rtems_bdbuf_restore_preemption (prev_mode);
--waiters->count;
ffc0d9f0: 39 29 ff ff addi r9,r9,-1
ffc0d9f4: 91 3f 00 00 stw r9,0(r31)
}
ffc0d9f8: 48 00 bd 54 b ffc1974c <_restgpr_30_x>
ffc0dba0 <rtems_bdbuf_create_task.constprop.14>:
return NULL;
}
static rtems_status_code
rtems_bdbuf_create_task(
ffc0dba0: 94 21 ff e8 stwu r1,-24(r1)
rtems_task_argument arg,
rtems_id *id
)
{
rtems_status_code sc;
size_t stack_size = bdbuf_config.task_stack_size ?
ffc0dba4: 3d 20 ff c2 lis r9,-62
return NULL;
}
static rtems_status_code
rtems_bdbuf_create_task(
ffc0dba8: 7c 08 02 a6 mflr r0
ffc0dbac: bf a1 00 0c stmw r29,12(r1)
ffc0dbb0: 7c bd 2b 78 mr r29,r5
ffc0dbb4: 7c de 33 78 mr r30,r6
rtems_task_argument arg,
rtems_id *id
)
{
rtems_status_code sc;
size_t stack_size = bdbuf_config.task_stack_size ?
ffc0dbb8: 80 a9 a3 98 lwz r5,-23656(r9)
return NULL;
}
static rtems_status_code
rtems_bdbuf_create_task(
ffc0dbbc: 7c ff 3b 78 mr r31,r7
ffc0dbc0: 90 01 00 1c stw r0,28(r1)
rtems_id *id
)
{
rtems_status_code sc;
size_t stack_size = bdbuf_config.task_stack_size ?
bdbuf_config.task_stack_size : RTEMS_BDBUF_TASK_STACK_SIZE_DEFAULT;
ffc0dbc4: 2f 85 00 00 cmpwi cr7,r5,0
ffc0dbc8: 40 9e 00 08 bne- cr7,ffc0dbd0 <rtems_bdbuf_create_task.constprop.14+0x30><== ALWAYS TAKEN
ffc0dbcc: 38 a0 20 00 li r5,8192 <== NOT EXECUTED
priority = priority != 0 ? priority : default_priority;
ffc0dbd0: 2f 84 00 00 cmpwi cr7,r4,0
ffc0dbd4: 40 9e 00 08 bne- cr7,ffc0dbdc <rtems_bdbuf_create_task.constprop.14+0x3c><== ALWAYS TAKEN
ffc0dbd8: 38 80 00 0f li r4,15 <== NOT EXECUTED
sc = rtems_task_create (name,
ffc0dbdc: 38 c0 04 00 li r6,1024
ffc0dbe0: 38 e0 00 00 li r7,0
ffc0dbe4: 7f e8 fb 78 mr r8,r31
ffc0dbe8: 4b ff bf f9 bl ffc09be0 <rtems_task_create>
stack_size,
RTEMS_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR,
RTEMS_LOCAL | RTEMS_NO_FLOATING_POINT,
id);
if (sc == RTEMS_SUCCESSFUL)
ffc0dbec: 2f 83 00 00 cmpwi cr7,r3,0
ffc0dbf0: 40 be 00 24 bne+ cr7,ffc0dc14 <rtems_bdbuf_create_task.constprop.14+0x74><== NEVER TAKEN
sc = rtems_task_start (*id, entry, arg);
return sc;
}
ffc0dbf4: 80 01 00 1c lwz r0,28(r1)
RTEMS_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR,
RTEMS_LOCAL | RTEMS_NO_FLOATING_POINT,
id);
if (sc == RTEMS_SUCCESSFUL)
sc = rtems_task_start (*id, entry, arg);
ffc0dbf8: 7f a4 eb 78 mr r4,r29
ffc0dbfc: 80 7f 00 00 lwz r3,0(r31)
ffc0dc00: 7f c5 f3 78 mr r5,r30
return sc;
}
ffc0dc04: 7c 08 03 a6 mtlr r0
ffc0dc08: bb a1 00 0c lmw r29,12(r1)
ffc0dc0c: 38 21 00 18 addi r1,r1,24
RTEMS_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR,
RTEMS_LOCAL | RTEMS_NO_FLOATING_POINT,
id);
if (sc == RTEMS_SUCCESSFUL)
sc = rtems_task_start (*id, entry, arg);
ffc0dc10: 4b ff c2 24 b ffc09e34 <rtems_task_start>
return sc;
}
ffc0dc14: 39 61 00 18 addi r11,r1,24 <== NOT EXECUTED
ffc0dc18: 48 00 bb 30 b ffc19748 <_restgpr_29_x> <== NOT EXECUTED
ffc0d8f8 <rtems_bdbuf_disable_preemption>:
--bd->group->users;
}
static rtems_mode
rtems_bdbuf_disable_preemption (void)
{
ffc0d8f8: 94 21 ff e8 stwu r1,-24(r1)
ffc0d8fc: 7c 08 02 a6 mflr r0
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_mode prev_mode = 0;
ffc0d900: 39 20 00 00 li r9,0
ffc0d904: 7c 25 0b 78 mr r5,r1
--bd->group->users;
}
static rtems_mode
rtems_bdbuf_disable_preemption (void)
{
ffc0d908: 90 01 00 1c stw r0,28(r1)
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_mode prev_mode = 0;
sc = rtems_task_mode (RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &prev_mode);
ffc0d90c: 38 60 01 00 li r3,256
static rtems_mode
rtems_bdbuf_disable_preemption (void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_mode prev_mode = 0;
ffc0d910: 95 25 00 08 stwu r9,8(r5)
sc = rtems_task_mode (RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &prev_mode);
ffc0d914: 38 80 01 00 li r4,256
ffc0d918: 48 00 47 f5 bl ffc1210c <rtems_task_mode>
if (sc != RTEMS_SUCCESSFUL)
ffc0d91c: 2f 83 00 00 cmpwi cr7,r3,0
ffc0d920: 41 be 00 0c beq+ cr7,ffc0d92c <rtems_bdbuf_disable_preemption+0x34><== ALWAYS TAKEN
rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_PREEMPT_DIS);
ffc0d924: 38 60 00 05 li r3,5 <== NOT EXECUTED
ffc0d928: 4b ff fe d5 bl ffc0d7fc <rtems_bdbuf_fatal> <== NOT EXECUTED
return prev_mode;
}
ffc0d92c: 80 01 00 1c lwz r0,28(r1)
ffc0d930: 80 61 00 08 lwz r3,8(r1)
ffc0d934: 7c 08 03 a6 mtlr r0
ffc0d938: 38 21 00 18 addi r1,r1,24
ffc0d93c: 4e 80 00 20 blr
ffc0ef88 <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)
{
ffc0ef88: 94 21 ff d0 stwu r1,-48(r1)
ffc0ef8c: 7c 08 02 a6 mflr r0
/*
* 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) +
ffc0ef90: 54 a9 20 36 rlwinm r9,r5,4,0,27
static rtems_status_code
rtems_bdbuf_execute_read_request (rtems_disk_device *dd,
rtems_bdbuf_buffer *bd,
uint32_t transfer_count)
{
ffc0ef94: 90 01 00 34 stw r0,52(r1)
/*
* 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) +
ffc0ef98: 21 29 ff d0 subfic r9,r9,-48
ffc0ef9c: 81 41 00 00 lwz r10,0(r1)
static rtems_status_code
rtems_bdbuf_execute_read_request (rtems_disk_device *dd,
rtems_bdbuf_buffer *bd,
uint32_t transfer_count)
{
ffc0efa0: be c1 00 08 stmw r22,8(r1)
ffc0efa4: 7c 3f 0b 78 mr r31,r1
#define bdbuf_alloc(size) __builtin_alloca (size)
req = bdbuf_alloc (sizeof (rtems_blkdev_request) +
sizeof (rtems_blkdev_sg_buffer) * transfer_count);
req->req = RTEMS_BLKDEV_REQ_READ;
ffc0efa8: 3b 40 00 00 li r26,0
rtems_bdbuf_execute_read_request (rtems_disk_device *dd,
rtems_bdbuf_buffer *bd,
uint32_t transfer_count)
{
rtems_blkdev_request *req = NULL;
rtems_blkdev_bnum media_block = bd->block;
ffc0efac: 83 84 00 18 lwz r28,24(r4)
static rtems_status_code
rtems_bdbuf_execute_read_request (rtems_disk_device *dd,
rtems_bdbuf_buffer *bd,
uint32_t transfer_count)
{
ffc0efb0: 7c 9d 23 78 mr r29,r4
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;
ffc0efb4: 83 23 00 24 lwz r25,36(r3)
static rtems_status_code
rtems_bdbuf_execute_read_request (rtems_disk_device *dd,
rtems_bdbuf_buffer *bd,
uint32_t transfer_count)
{
ffc0efb8: 7c 7b 1b 78 mr r27,r3
rtems_blkdev_request *req = NULL;
rtems_blkdev_bnum media_block = bd->block;
uint32_t media_blocks_per_block = dd->media_blocks_per_block;
ffc0efbc: 82 e3 00 2c lwz r23,44(r3)
static rtems_status_code
rtems_bdbuf_execute_read_request (rtems_disk_device *dd,
rtems_bdbuf_buffer *bd,
uint32_t transfer_count)
{
ffc0efc0: 7c b8 2b 78 mr r24,r5
/*
* 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) +
ffc0efc4: 7d 41 49 6e stwux r10,r1,r9
sizeof (rtems_blkdev_sg_buffer) * transfer_count);
req->req = RTEMS_BLKDEV_REQ_READ;
req->done = rtems_bdbuf_transfer_done;
ffc0efc8: 3d 20 ff c1 lis r9,-63
ffc0efcc: 39 29 e8 88 addi r9,r9,-6008
/*
* 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) +
ffc0efd0: 3b c1 00 17 addi r30,r1,23
ffc0efd4: 57 de 00 36 rlwinm r30,r30,0,0,27
sizeof (rtems_blkdev_sg_buffer) * transfer_count);
req->req = RTEMS_BLKDEV_REQ_READ;
ffc0efd8: 93 5e 00 00 stw r26,0(r30)
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
ffc0efdc: 3a c0 00 09 li r22,9
req = bdbuf_alloc (sizeof (rtems_blkdev_request) +
sizeof (rtems_blkdev_sg_buffer) * transfer_count);
req->req = RTEMS_BLKDEV_REQ_READ;
req->done = rtems_bdbuf_transfer_done;
ffc0efe0: 91 3e 00 04 stw r9,4(r30)
req->io_task = rtems_task_self ();
ffc0efe4: 48 00 32 c9 bl ffc122ac <rtems_task_self>
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
ffc0efe8: 39 20 00 09 li r9,9
sizeof (rtems_blkdev_sg_buffer) * transfer_count);
req->req = RTEMS_BLKDEV_REQ_READ;
req->done = rtems_bdbuf_transfer_done;
req->io_task = rtems_task_self ();
req->bufnum = 0;
ffc0efec: 93 5e 00 10 stw r26,16(r30)
{
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;
ffc0eff0: 3b 40 00 01 li r26,1
req = bdbuf_alloc (sizeof (rtems_blkdev_request) +
sizeof (rtems_blkdev_sg_buffer) * transfer_count);
req->req = RTEMS_BLKDEV_REQ_READ;
req->done = rtems_bdbuf_transfer_done;
req->io_task = rtems_task_self ();
ffc0eff4: 90 7e 00 14 stw r3,20(r30)
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
ffc0eff8: 91 3d 00 20 stw r9,32(r29)
req->io_task = rtems_task_self ();
req->bufnum = 0;
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_TRANSFER);
req->bufs [0].user = bd;
ffc0effc: 93 be 00 24 stw r29,36(r30)
req->bufs [0].block = media_block;
req->bufs [0].length = block_size;
req->bufs [0].buffer = bd->buffer;
ffc0f000: 81 3d 00 1c lwz r9,28(r29)
ffc0f004: 7f dd f3 78 mr r29,r30
req->bufnum = 0;
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_TRANSFER);
req->bufs [0].user = bd;
req->bufs [0].block = media_block;
ffc0f008: 93 9e 00 18 stw r28,24(r30)
req->bufs [0].length = block_size;
ffc0f00c: 93 3e 00 1c stw r25,28(r30)
req->bufs [0].buffer = bd->buffer;
ffc0f010: 91 3e 00 20 stw r9,32(r30)
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_users ("read", bd);
while (transfer_index < transfer_count)
ffc0f014: 48 00 00 54 b ffc0f068 <rtems_bdbuf_execute_read_request+0xe0>
{
media_block += media_blocks_per_block;
ffc0f018: 7f 9c ba 14 add r28,r28,r23
bd = rtems_bdbuf_get_buffer_for_read_ahead (dd, media_block);
ffc0f01c: 7f 63 db 78 mr r3,r27
ffc0f020: 7f 84 e3 78 mr r4,r28
ffc0f024: 4b ff f4 b9 bl ffc0e4dc <rtems_bdbuf_get_buffer_for_read_ahead>
ffc0f028: 3b bd 00 10 addi r29,r29,16
if (bd == NULL)
ffc0f02c: 2c 03 00 00 cmpwi r3,0
ffc0f030: 40 a2 00 1c bne+ ffc0f04c <rtems_bdbuf_execute_read_request+0xc4><== ALWAYS TAKEN
rtems_bdbuf_show_users ("read", bd);
++transfer_index;
}
req->bufnum = transfer_index;
ffc0f034: 93 5e 00 10 stw r26,16(r30)
return rtems_bdbuf_execute_transfer_request (dd, req, true);
ffc0f038: 7f 63 db 78 mr r3,r27
ffc0f03c: 7f c4 f3 78 mr r4,r30
ffc0f040: 38 a0 00 01 li r5,1
ffc0f044: 4b ff f8 55 bl ffc0e898 <rtems_bdbuf_execute_transfer_request>
ffc0f048: 48 00 00 2c b ffc0f074 <rtems_bdbuf_execute_read_request+0xec>
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
ffc0f04c: 92 c3 00 20 stw r22,32(r3)
req->bufs [transfer_index].buffer = bd->buffer;
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_users ("read", bd);
++transfer_index;
ffc0f050: 3b 5a 00 01 addi r26,r26,1
if (bd == NULL)
break;
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_TRANSFER);
req->bufs [transfer_index].user = bd;
ffc0f054: 90 7d 00 24 stw r3,36(r29)
req->bufs [transfer_index].block = media_block;
ffc0f058: 93 9d 00 18 stw r28,24(r29)
req->bufs [transfer_index].length = block_size;
ffc0f05c: 93 3d 00 1c stw r25,28(r29)
req->bufs [transfer_index].buffer = bd->buffer;
ffc0f060: 81 23 00 1c lwz r9,28(r3)
ffc0f064: 91 3d 00 20 stw r9,32(r29)
req->bufs [0].buffer = bd->buffer;
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_users ("read", bd);
while (transfer_index < transfer_count)
ffc0f068: 7f 9a c0 40 cmplw cr7,r26,r24
ffc0f06c: 41 9c ff ac blt+ cr7,ffc0f018 <rtems_bdbuf_execute_read_request+0x90>
ffc0f070: 4b ff ff c4 b ffc0f034 <rtems_bdbuf_execute_read_request+0xac>
}
req->bufnum = transfer_index;
return rtems_bdbuf_execute_transfer_request (dd, req, true);
}
ffc0f074: 39 7f 00 30 addi r11,r31,48
ffc0f078: 48 00 a6 b4 b ffc1972c <_restgpr_22_x>
ffc0d7fc <rtems_bdbuf_fatal>:
#define RTEMS_BDBUF_AVL_MAX_HEIGHT (32)
#endif
static void
rtems_bdbuf_fatal (rtems_fatal_code error)
{
ffc0d7fc: 94 21 ff f8 stwu r1,-8(r1) <== NOT EXECUTED
ffc0d800: 7c 08 02 a6 mflr r0 <== NOT EXECUTED
ffc0d804: 7c 64 1b 78 mr r4,r3 <== NOT EXECUTED
rtems_fatal (RTEMS_FATAL_SOURCE_BDBUF, error);
ffc0d808: 38 60 00 03 li r3,3 <== NOT EXECUTED
#define RTEMS_BDBUF_AVL_MAX_HEIGHT (32)
#endif
static void
rtems_bdbuf_fatal (rtems_fatal_code error)
{
ffc0d80c: 90 01 00 0c stw r0,12(r1) <== NOT EXECUTED
rtems_fatal (RTEMS_FATAL_SOURCE_BDBUF, error);
ffc0d810: 4b ff c8 7d bl ffc0a08c <rtems_fatal> <== NOT EXECUTED
ffc0d860 <rtems_bdbuf_fatal_with_state>:
}
static void
rtems_bdbuf_fatal_with_state (rtems_bdbuf_buf_state state,
rtems_bdbuf_fatal_code error)
{
ffc0d860: 94 21 ff f8 stwu r1,-8(r1) <== NOT EXECUTED
ffc0d864: 7c 08 02 a6 mflr r0 <== NOT EXECUTED
rtems_bdbuf_fatal ((((uint32_t) state) << 16) | error);
ffc0d868: 54 63 80 1e rlwinm r3,r3,16,0,15 <== NOT EXECUTED
ffc0d86c: 7c 83 1b 78 or r3,r4,r3 <== NOT EXECUTED
}
static void
rtems_bdbuf_fatal_with_state (rtems_bdbuf_buf_state state,
rtems_bdbuf_fatal_code error)
{
ffc0d870: 90 01 00 0c stw r0,12(r1) <== NOT EXECUTED
rtems_bdbuf_fatal ((((uint32_t) state) << 16) | error);
ffc0d874: 4b ff ff 89 bl ffc0d7fc <rtems_bdbuf_fatal> <== NOT EXECUTED
ffc0f664 <rtems_bdbuf_get>:
rtems_status_code
rtems_bdbuf_get (rtems_disk_device *dd,
rtems_blkdev_bnum block,
rtems_bdbuf_buffer **bd_ptr)
{
ffc0f664: 94 21 ff e8 stwu r1,-24(r1)
ffc0f668: 7c 08 02 a6 mflr r0
ffc0f66c: bf a1 00 0c stmw r29,12(r1)
ffc0f670: 7c 7f 1b 78 mr r31,r3
ffc0f674: 7c 9e 23 78 mr r30,r4
ffc0f678: 90 01 00 1c stw r0,28(r1)
ffc0f67c: 7c bd 2b 78 mr r29,r5
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_bdbuf_buffer *bd = NULL;
rtems_blkdev_bnum media_block;
rtems_bdbuf_lock_cache ();
ffc0f680: 4b ff e1 d1 bl ffc0d850 <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)
ffc0f684: 81 3f 00 28 lwz r9,40(r31)
ffc0f688: 7f 9e 48 40 cmplw cr7,r30,r9
ffc0f68c: 40 bc 00 94 bge+ cr7,ffc0f720 <rtems_bdbuf_get+0xbc> <== 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)
ffc0f690: 80 9f 00 30 lwz r4,48(r31)
ffc0f694: 2f 84 00 00 cmpwi cr7,r4,0
ffc0f698: 41 9c 00 0c blt- cr7,ffc0f6a4 <rtems_bdbuf_get+0x40> <== NEVER TAKEN
return block << dd->block_to_media_block_shift;
ffc0f69c: 7f c4 20 30 slw r4,r30,r4
ffc0f6a0: 48 00 00 24 b ffc0f6c4 <rtems_bdbuf_get+0x60>
/*
* 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);
ffc0f6a4: 80 7f 00 24 lwz r3,36(r31) <== NOT EXECUTED
ffc0f6a8: 38 a0 00 00 li r5,0 <== NOT EXECUTED
ffc0f6ac: 80 df 00 20 lwz r6,32(r31) <== NOT EXECUTED
ffc0f6b0: 7d 5e 19 d6 mullw r10,r30,r3 <== NOT EXECUTED
ffc0f6b4: 7d 3e 18 16 mulhwu r9,r30,r3 <== NOT EXECUTED
ffc0f6b8: 7d 44 53 78 mr r4,r10 <== NOT EXECUTED
ffc0f6bc: 7d 23 4b 78 mr r3,r9 <== NOT EXECUTED
ffc0f6c0: 48 00 98 81 bl ffc18f40 <__udivdi3> <== 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;
ffc0f6c4: 81 3f 00 18 lwz r9,24(r31)
*/
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);
ffc0f6c8: 7f e3 fb 78 mr r3,r31
ffc0f6cc: 7c 84 4a 14 add r4,r4,r9
ffc0f6d0: 4b ff ee 75 bl ffc0e544 <rtems_bdbuf_get_buffer_for_access>
ffc0f6d4: 7c 7f 1b 78 mr r31,r3
switch (bd->state)
ffc0f6d8: 80 63 00 20 lwz r3,32(r3)
ffc0f6dc: 2f 83 00 02 cmpwi cr7,r3,2
ffc0f6e0: 41 9e 00 18 beq- cr7,ffc0f6f8 <rtems_bdbuf_get+0x94>
ffc0f6e4: 2f 83 00 07 cmpwi cr7,r3,7
ffc0f6e8: 41 9e 00 28 beq- cr7,ffc0f710 <rtems_bdbuf_get+0xac>
ffc0f6ec: 2f 83 00 01 cmpwi cr7,r3,1
ffc0f6f0: 40 be 00 28 bne+ cr7,ffc0f718 <rtems_bdbuf_get+0xb4> <== NEVER TAKEN
ffc0f6f4: 48 00 00 0c b ffc0f700 <rtems_bdbuf_get+0x9c>
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
ffc0f6f8: 39 20 00 03 li r9,3
ffc0f6fc: 48 00 00 08 b ffc0f704 <rtems_bdbuf_get+0xa0>
ffc0f700: 39 20 00 05 li r9,5
ffc0f704: 91 3f 00 20 stw r9,32(r31)
ffc0f708: 3b c0 00 00 li r30,0
ffc0f70c: 48 00 00 1c b ffc0f728 <rtems_bdbuf_get+0xc4>
ffc0f710: 39 20 00 04 li r9,4
ffc0f714: 4b ff ff f0 b ffc0f704 <rtems_bdbuf_get+0xa0>
* 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_with_state (bd->state, RTEMS_BDBUF_FATAL_STATE_2);
ffc0f718: 38 80 00 0f li r4,15 <== NOT EXECUTED
ffc0f71c: 4b ff e1 45 bl ffc0d860 <rtems_bdbuf_fatal_with_state><== NOT EXECUTED
*/
*media_block_ptr = rtems_bdbuf_media_block (dd, block) + dd->start;
}
else
{
sc = RTEMS_INVALID_ID;
ffc0f720: 3b c0 00 04 li r30,4 <== 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;
ffc0f724: 3b e0 00 00 li r31,0 <== NOT EXECUTED
rtems_bdbuf_show_users ("get", bd);
rtems_bdbuf_show_usage ();
}
}
rtems_bdbuf_unlock_cache ();
ffc0f728: 4b ff e1 85 bl ffc0d8ac <rtems_bdbuf_unlock_cache>
*bd_ptr = bd;
return sc;
}
ffc0f72c: 39 61 00 18 addi r11,r1,24
}
}
rtems_bdbuf_unlock_cache ();
*bd_ptr = bd;
ffc0f730: 93 fd 00 00 stw r31,0(r29)
return sc;
}
ffc0f734: 7f c3 f3 78 mr r3,r30
ffc0f738: 48 00 a0 10 b ffc19748 <_restgpr_29_x>
ffc0e544 <rtems_bdbuf_get_buffer_for_access>:
static rtems_bdbuf_buffer *
rtems_bdbuf_get_buffer_for_access (rtems_disk_device *dd,
rtems_blkdev_bnum block)
{
ffc0e544: 94 21 ff c8 stwu r1,-56(r1)
ffc0e548: 7c 08 02 a6 mflr r0
ffc0e54c: be a1 00 0c stmw r21,12(r1)
rtems_bdbuf_buffer *bd = NULL;
do
{
bd = rtems_bdbuf_avl_search (&bdbuf_cache.tree, dd, block);
ffc0e550: 3f c0 00 00 lis r30,0
ffc0e554: 3b de 2a 00 addi r30,r30,10752
static bool
rtems_bdbuf_wait_for_recycle (rtems_bdbuf_buffer *bd)
{
while (true)
{
switch (bd->state)
ffc0e558: 3f 40 ff c2 lis r26,-62
}
static rtems_bdbuf_buffer *
rtems_bdbuf_get_buffer_for_access (rtems_disk_device *dd,
rtems_blkdev_bnum block)
{
ffc0e55c: 90 01 00 3c stw r0,60(r1)
ffc0e560: 7c 7d 1b 78 mr r29,r3
ffc0e564: 7c 9b 23 78 mr r27,r4
static bool
rtems_bdbuf_wait_for_recycle (rtems_bdbuf_buffer *bd)
{
while (true)
{
switch (bd->state)
ffc0e568: 3b 5a b1 e4 addi r26,r26,-19996
rtems_bdbuf_wait (bd, &bdbuf_cache.access_waiters);
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);
ffc0e56c: 3b 3e 00 6c addi r25,r30,108
}
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);
ffc0e570: 3b 1e 00 64 addi r24,r30,100
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
ffc0e574: 3a e0 00 08 li r23,8
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
the_node->next = tail;
ffc0e578: 3a de 00 5c addi r22,r30,92
{
if (rtems_bdbuf_wait_for_recycle (bd))
{
rtems_bdbuf_remove_from_tree_and_lru_list (bd);
rtems_bdbuf_make_free_and_add_to_lru_list (bd);
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
ffc0e57c: 3b 9e 00 74 addi r28,r30,116
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_tail(
const Chain_Control *the_chain
)
{
return &the_chain->Tail.Node;
ffc0e580: 3a be 00 50 addi r21,r30,80
{
rtems_bdbuf_buffer *bd = NULL;
do
{
bd = rtems_bdbuf_avl_search (&bdbuf_cache.tree, dd, block);
ffc0e584: 80 7e 00 3c lwz r3,60(r30)
ffc0e588: 7f a4 eb 78 mr r4,r29
ffc0e58c: 7f 65 db 78 mr r5,r27
ffc0e590: 4b ff f5 81 bl ffc0db10 <rtems_bdbuf_avl_search.isra.1>
if (bd != NULL)
ffc0e594: 7c 7f 1b 79 mr. r31,r3
ffc0e598: 41 82 00 a4 beq- ffc0e63c <rtems_bdbuf_get_buffer_for_access+0xf8>
{
if (bd->group->bds_per_group != dd->bds_per_group)
ffc0e59c: 81 3f 00 28 lwz r9,40(r31)
ffc0e5a0: 81 49 00 08 lwz r10,8(r9)
ffc0e5a4: 81 3d 00 34 lwz r9,52(r29)
ffc0e5a8: 7f 8a 48 00 cmpw cr7,r10,r9
ffc0e5ac: 41 9e 00 b8 beq- cr7,ffc0e664 <rtems_bdbuf_get_buffer_for_access+0x120>
static bool
rtems_bdbuf_wait_for_recycle (rtems_bdbuf_buffer *bd)
{
while (true)
{
switch (bd->state)
ffc0e5b0: 80 7f 00 20 lwz r3,32(r31)
ffc0e5b4: 2b 83 00 0a cmplwi cr7,r3,10
ffc0e5b8: 41 9d 00 7c bgt- cr7,ffc0e634 <rtems_bdbuf_get_buffer_for_access+0xf0><== NEVER TAKEN
ffc0e5bc: 54 63 10 3a rlwinm r3,r3,2,0,29
ffc0e5c0: 7d 3a 18 2e lwzx r9,r26,r3
ffc0e5c4: 7d 29 d2 14 add r9,r9,r26
ffc0e5c8: 7d 29 03 a6 mtctr r9
ffc0e5cc: 4e 80 04 20 bctr
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
ffc0e5d0: 81 3f 00 00 lwz r9,0(r31) <== NOT EXECUTED
previous = the_node->previous;
ffc0e5d4: 81 5f 00 04 lwz r10,4(r31) <== NOT EXECUTED
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
ffc0e5d8: 92 ff 00 20 stw r23,32(r31) <== NOT EXECUTED
next->previous = previous;
ffc0e5dc: 91 49 00 04 stw r10,4(r9) <== NOT EXECUTED
previous->next = next;
ffc0e5e0: 91 2a 00 00 stw r9,0(r10) <== NOT EXECUTED
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
ffc0e5e4: 81 3e 00 60 lwz r9,96(r30) <== NOT EXECUTED
the_node->next = tail;
ffc0e5e8: 92 df 00 00 stw r22,0(r31) <== NOT EXECUTED
tail->previous = the_node;
ffc0e5ec: 93 fe 00 60 stw r31,96(r30) <== NOT EXECUTED
old_last->next = the_node;
ffc0e5f0: 93 e9 00 00 stw r31,0(r9) <== NOT EXECUTED
the_node->previous = old_last;
ffc0e5f4: 91 3f 00 04 stw r9,4(r31) <== 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 ();
ffc0e5f8: 4b ff f2 c5 bl ffc0d8bc <rtems_bdbuf_wake_swapper> <== NOT EXECUTED
ffc0e5fc: 4b ff ff b4 b ffc0e5b0 <rtems_bdbuf_get_buffer_for_access+0x6c><== 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)
ffc0e600: 81 3f 00 24 lwz r9,36(r31)
ffc0e604: 2f 89 00 00 cmpwi cr7,r9,0
ffc0e608: 41 be 00 e0 beq+ cr7,ffc0e6e8 <rtems_bdbuf_get_buffer_for_access+0x1a4><== 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);
ffc0e60c: 7f 83 e3 78 mr r3,r28
ffc0e610: 4b ff f3 71 bl ffc0d980 <rtems_bdbuf_anonymous_wait>
ffc0e614: 4b ff ff 70 b ffc0e584 <rtems_bdbuf_get_buffer_for_access+0x40>
}
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);
ffc0e618: 7f e3 fb 78 mr r3,r31
ffc0e61c: 7f 04 c3 78 mr r4,r24
ffc0e620: 48 00 00 0c b ffc0e62c <rtems_bdbuf_get_buffer_for_access+0xe8>
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);
ffc0e624: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc0e628: 7f 24 cb 78 mr r4,r25 <== NOT EXECUTED
ffc0e62c: 4b ff f3 d1 bl ffc0d9fc <rtems_bdbuf_wait>
ffc0e630: 4b ff ff 80 b ffc0e5b0 <rtems_bdbuf_get_buffer_for_access+0x6c>
break;
default:
rtems_bdbuf_fatal_with_state (bd->state, RTEMS_BDBUF_FATAL_STATE_8);
ffc0e634: 38 80 00 14 li r4,20 <== NOT EXECUTED
ffc0e638: 48 00 00 ac b ffc0e6e4 <rtems_bdbuf_get_buffer_for_access+0x1a0><== NOT EXECUTED
bd = NULL;
}
}
else
{
bd = rtems_bdbuf_get_buffer_from_lru_list (dd, block);
ffc0e63c: 7f a3 eb 78 mr r3,r29
ffc0e640: 7f 64 db 78 mr r4,r27
ffc0e644: 4b ff fb 01 bl ffc0e144 <rtems_bdbuf_get_buffer_from_lru_list>
if (bd == NULL)
ffc0e648: 7c 7f 1b 79 mr. r31,r3
ffc0e64c: 40 a2 00 18 bne+ ffc0e664 <rtems_bdbuf_get_buffer_for_access+0x120>
}
static void
rtems_bdbuf_wait_for_buffer (void)
{
if (!rtems_chain_is_empty (&bdbuf_cache.modified))
ffc0e650: 81 3e 00 4c lwz r9,76(r30)
ffc0e654: 7f 89 a8 00 cmpw cr7,r9,r21
ffc0e658: 41 be ff b4 beq- cr7,ffc0e60c <rtems_bdbuf_get_buffer_for_access+0xc8>
rtems_bdbuf_wake_swapper ();
ffc0e65c: 4b ff f2 61 bl ffc0d8bc <rtems_bdbuf_wake_swapper>
ffc0e660: 4b ff ff ac b ffc0e60c <rtems_bdbuf_get_buffer_for_access+0xc8>
rtems_bdbuf_wait (bd, &bdbuf_cache.access_waiters);
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);
ffc0e664: 3d 20 00 00 lis r9,0
ffc0e668: 39 29 2a 00 addi r9,r9,10752
static void
rtems_bdbuf_wait_for_access (rtems_bdbuf_buffer *bd)
{
while (true)
{
switch (bd->state)
ffc0e66c: 3f c0 ff c2 lis r30,-62
ffc0e670: 3b de b2 10 addi r30,r30,-19952
rtems_bdbuf_wait (bd, &bdbuf_cache.access_waiters);
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);
ffc0e674: 3b a9 00 6c addi r29,r9,108
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);
ffc0e678: 3b 89 00 64 addi r28,r9,100
static void
rtems_bdbuf_wait_for_access (rtems_bdbuf_buffer *bd)
{
while (true)
{
switch (bd->state)
ffc0e67c: 80 7f 00 20 lwz r3,32(r31)
ffc0e680: 39 23 ff ff addi r9,r3,-1
ffc0e684: 2b 89 00 09 cmplwi cr7,r9,9
ffc0e688: 41 9d 00 58 bgt- cr7,ffc0e6e0 <rtems_bdbuf_get_buffer_for_access+0x19c><== NEVER TAKEN
ffc0e68c: 55 29 10 3a rlwinm r9,r9,2,0,29
ffc0e690: 7d 3e 48 2e lwzx r9,r30,r9
ffc0e694: 7d 29 f2 14 add r9,r9,r30
ffc0e698: 7d 29 03 a6 mtctr r9
ffc0e69c: 4e 80 04 20 bctr
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 ();
}
ffc0e6a0: 81 3f 00 28 lwz r9,40(r31)
}
static void
rtems_bdbuf_group_release (rtems_bdbuf_buffer *bd)
{
--bd->group->users;
ffc0e6a4: 81 49 00 0c lwz r10,12(r9)
ffc0e6a8: 39 4a ff ff addi r10,r10,-1
ffc0e6ac: 91 49 00 0c stw r10,12(r9)
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
ffc0e6b0: 81 3f 00 00 lwz r9,0(r31)
previous = the_node->previous;
ffc0e6b4: 81 5f 00 04 lwz r10,4(r31)
next->previous = previous;
ffc0e6b8: 91 49 00 04 stw r10,4(r9)
previous->next = next;
ffc0e6bc: 91 2a 00 00 stw r9,0(r10)
ffc0e6c0: 48 00 00 44 b ffc0e704 <rtems_bdbuf_get_buffer_for_access+0x1c0>
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);
ffc0e6c4: 7f e3 fb 78 mr r3,r31
ffc0e6c8: 7f 84 e3 78 mr r4,r28
ffc0e6cc: 48 00 00 0c b ffc0e6d8 <rtems_bdbuf_get_buffer_for_access+0x194>
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);
ffc0e6d0: 7f e3 fb 78 mr r3,r31
ffc0e6d4: 7f a4 eb 78 mr r4,r29
ffc0e6d8: 4b ff f3 25 bl ffc0d9fc <rtems_bdbuf_wait>
ffc0e6dc: 4b ff ff a0 b ffc0e67c <rtems_bdbuf_get_buffer_for_access+0x138>
break;
default:
rtems_bdbuf_fatal_with_state (bd->state, RTEMS_BDBUF_FATAL_STATE_7);
ffc0e6e0: 38 80 00 13 li r4,19 <== NOT EXECUTED
ffc0e6e4: 4b ff f1 7d bl ffc0d860 <rtems_bdbuf_fatal_with_state><== 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);
ffc0e6e8: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc0e6ec: 4b ff fa 01 bl ffc0e0ec <rtems_bdbuf_remove_from_tree_and_lru_list><== NOT EXECUTED
rtems_bdbuf_make_free_and_add_to_lru_list (bd);
ffc0e6f0: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc0e6f4: 4b ff f8 e1 bl ffc0dfd4 <rtems_bdbuf_make_free_and_add_to_lru_list><== NOT EXECUTED
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
ffc0e6f8: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED
ffc0e6fc: 4b ff f4 65 bl ffc0db60 <rtems_bdbuf_wake> <== NOT EXECUTED
ffc0e700: 4b ff fe 84 b ffc0e584 <rtems_bdbuf_get_buffer_for_access+0x40><== 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 ();
}
ffc0e704: 81 3f 00 28 lwz r9,40(r31)
rtems_bdbuf_wait_for_access (bd);
rtems_bdbuf_group_obtain (bd);
return bd;
}
ffc0e708: 39 61 00 38 addi r11,r1,56
ffc0e70c: 7f e3 fb 78 mr r3,r31
}
static void
rtems_bdbuf_group_obtain (rtems_bdbuf_buffer *bd)
{
++bd->group->users;
ffc0e710: 81 49 00 0c lwz r10,12(r9)
ffc0e714: 39 4a 00 01 addi r10,r10,1
ffc0e718: 91 49 00 0c stw r10,12(r9)
rtems_bdbuf_wait_for_access (bd);
rtems_bdbuf_group_obtain (bd);
return bd;
}
ffc0e71c: 48 00 b0 0c b ffc19728 <_restgpr_21_x>
ffc0e4dc <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)
{
ffc0e4dc: 94 21 ff f0 stwu r1,-16(r1)
rtems_bdbuf_buffer *bd = NULL;
bd = rtems_bdbuf_avl_search (&bdbuf_cache.tree, dd, block);
ffc0e4e0: 3d 20 00 00 lis r9,0
}
static rtems_bdbuf_buffer *
rtems_bdbuf_get_buffer_for_read_ahead (rtems_disk_device *dd,
rtems_blkdev_bnum block)
{
ffc0e4e4: 7c 08 02 a6 mflr r0
ffc0e4e8: bf c1 00 08 stmw r30,8(r1)
ffc0e4ec: 7c 7e 1b 78 mr r30,r3
ffc0e4f0: 7c 9f 23 78 mr r31,r4
rtems_bdbuf_buffer *bd = NULL;
bd = rtems_bdbuf_avl_search (&bdbuf_cache.tree, dd, block);
ffc0e4f4: 80 69 2a 3c lwz r3,10812(r9)
ffc0e4f8: 7f c4 f3 78 mr r4,r30
ffc0e4fc: 7f e5 fb 78 mr r5,r31
}
static rtems_bdbuf_buffer *
rtems_bdbuf_get_buffer_for_read_ahead (rtems_disk_device *dd,
rtems_blkdev_bnum block)
{
ffc0e500: 90 01 00 14 stw r0,20(r1)
rtems_bdbuf_buffer *bd = NULL;
bd = rtems_bdbuf_avl_search (&bdbuf_cache.tree, dd, block);
ffc0e504: 4b ff f6 0d bl ffc0db10 <rtems_bdbuf_avl_search.isra.1>
if (bd == NULL)
ffc0e508: 2f 83 00 00 cmpwi cr7,r3,0
ffc0e50c: 40 be 00 2c bne+ cr7,ffc0e538 <rtems_bdbuf_get_buffer_for_read_ahead+0x5c><== NEVER TAKEN
{
bd = rtems_bdbuf_get_buffer_from_lru_list (dd, block);
ffc0e510: 7f c3 f3 78 mr r3,r30
ffc0e514: 7f e4 fb 78 mr r4,r31
ffc0e518: 4b ff fc 2d bl ffc0e144 <rtems_bdbuf_get_buffer_from_lru_list>
if (bd != NULL)
ffc0e51c: 2c 03 00 00 cmpwi r3,0
ffc0e520: 41 82 00 1c beq- ffc0e53c <rtems_bdbuf_get_buffer_for_read_ahead+0x60><== 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 ();
}
ffc0e524: 81 23 00 28 lwz r9,40(r3)
}
static void
rtems_bdbuf_group_obtain (rtems_bdbuf_buffer *bd)
{
++bd->group->users;
ffc0e528: 81 49 00 0c lwz r10,12(r9)
ffc0e52c: 39 4a 00 01 addi r10,r10,1
ffc0e530: 91 49 00 0c stw r10,12(r9)
ffc0e534: 48 00 00 08 b ffc0e53c <rtems_bdbuf_get_buffer_for_read_ahead+0x60>
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;
ffc0e538: 38 60 00 00 li r3,0 <== NOT EXECUTED
return bd;
}
ffc0e53c: 39 61 00 10 addi r11,r1,16
ffc0e540: 48 00 b2 0c b ffc1974c <_restgpr_30_x>
ffc0e144 <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)
{
ffc0e144: 94 21 ff 48 stwu r1,-184(r1)
ffc0e148: 7c 08 02 a6 mflr r0
ffc0e14c: be a1 00 8c stmw r21,140(r1)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
ffc0e150: 3f 80 00 00 lis r28,0
ffc0e154: 3b 9c 2a 00 addi r28,r28,10752
ffc0e158: 90 01 00 bc stw r0,188(r1)
ffc0e15c: 7c 7d 1b 78 mr r29,r3
ffc0e160: 7c 9a 23 78 mr r26,r4
ffc0e164: 83 dc 00 40 lwz r30,64(r28)
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_tail(
const Chain_Control *the_chain
)
{
return &the_chain->Tail.Node;
ffc0e168: 3a fc 00 44 addi r23,r28,68
b < group->bds_per_group;
b++, bd += bufs_per_bd)
rtems_bdbuf_make_free_and_add_to_lru_list (bd);
if (b > 1)
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
ffc0e16c: 3a dc 00 74 addi r22,r28,116
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))
ffc0e170: 48 00 03 54 b ffc0e4c4 <rtems_bdbuf_get_buffer_from_lru_list+0x380>
bd->group->bds_per_group, dd->bds_per_group);
/*
* If nobody waits for this BD, we may recycle it.
*/
if (bd->waiters == 0)
ffc0e174: 81 3e 00 24 lwz r9,36(r30)
ffc0e178: 2f 89 00 00 cmpwi cr7,r9,0
ffc0e17c: 40 9e 03 44 bne- cr7,ffc0e4c0 <rtems_bdbuf_get_buffer_from_lru_list+0x37c>
{
if (bd->group->bds_per_group == dd->bds_per_group)
ffc0e180: 83 fe 00 28 lwz r31,40(r30)
ffc0e184: 83 7d 00 34 lwz r27,52(r29)
ffc0e188: 81 3f 00 08 lwz r9,8(r31)
ffc0e18c: 7f 89 d8 00 cmpw cr7,r9,r27
ffc0e190: 40 be 00 14 bne+ cr7,ffc0e1a4 <rtems_bdbuf_get_buffer_from_lru_list+0x60>
{
rtems_bdbuf_remove_from_tree_and_lru_list (bd);
ffc0e194: 7f c3 f3 78 mr r3,r30
ffc0e198: 4b ff ff 55 bl ffc0e0ec <rtems_bdbuf_remove_from_tree_and_lru_list>
ffc0e19c: 7f ca f3 78 mr r10,r30
ffc0e1a0: 48 00 00 9c b ffc0e23c <rtems_bdbuf_get_buffer_from_lru_list+0xf8>
empty_bd = bd;
}
else if (bd->group->users == 0)
ffc0e1a4: 81 5f 00 0c lwz r10,12(r31)
ffc0e1a8: 2f 8a 00 00 cmpwi cr7,r10,0
ffc0e1ac: 40 be 03 14 bne+ cr7,ffc0e4c0 <rtems_bdbuf_get_buffer_from_lru_list+0x37c>
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;
ffc0e1b0: 82 bc 00 20 lwz r21,32(r28)
for (b = 0, bd = group->bdbuf;
ffc0e1b4: 3b 20 00 00 li r25,0
ffc0e1b8: 83 1f 00 10 lwz r24,16(r31)
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;
ffc0e1bc: 7e b5 4b 96 divwu r21,r21,r9
for (b = 0, bd = group->bdbuf;
b < group->bds_per_group;
b++, bd += bufs_per_bd)
ffc0e1c0: 1e b5 00 38 mulli r21,r21,56
ffc0e1c4: 48 00 00 14 b ffc0e1d8 <rtems_bdbuf_get_buffer_from_lru_list+0x94>
rtems_bdbuf_remove_from_tree_and_lru_list (bd);
ffc0e1c8: 7f 03 c3 78 mr r3,r24
ffc0e1cc: 4b ff ff 21 bl ffc0e0ec <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)
ffc0e1d0: 3b 39 00 01 addi r25,r25,1
ffc0e1d4: 7f 18 aa 14 add r24,r24,r21
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;
ffc0e1d8: 81 3f 00 08 lwz r9,8(r31)
ffc0e1dc: 7f 99 48 40 cmplw cr7,r25,r9
ffc0e1e0: 41 9c ff e8 blt+ cr7,ffc0e1c8 <rtems_bdbuf_get_buffer_from_lru_list+0x84>
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;
bufs_per_bd = bdbuf_cache.max_bds_per_group / new_bds_per_group;
ffc0e1e4: 83 1c 00 20 lwz r24,32(r28)
for (b = 1, bd = group->bdbuf + bufs_per_bd;
ffc0e1e8: 83 3f 00 10 lwz r25,16(r31)
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;
bufs_per_bd = bdbuf_cache.max_bds_per_group / new_bds_per_group;
ffc0e1ec: 7f 18 db 96 divwu r24,r24,r27
for (b = 0, bd = group->bdbuf;
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;
ffc0e1f0: 93 7f 00 08 stw r27,8(r31)
bufs_per_bd = bdbuf_cache.max_bds_per_group / new_bds_per_group;
for (b = 1, bd = group->bdbuf + bufs_per_bd;
ffc0e1f4: 1f 18 00 38 mulli r24,r24,56
ffc0e1f8: 3b 60 00 01 li r27,1
ffc0e1fc: 7f 39 c2 14 add r25,r25,r24
ffc0e200: 48 00 00 14 b ffc0e214 <rtems_bdbuf_get_buffer_from_lru_list+0xd0>
b < group->bds_per_group;
b++, bd += bufs_per_bd)
rtems_bdbuf_make_free_and_add_to_lru_list (bd);
ffc0e204: 7f 23 cb 78 mr r3,r25
ffc0e208: 4b ff fd cd bl ffc0dfd4 <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)
ffc0e20c: 3b 7b 00 01 addi r27,r27,1
ffc0e210: 7f 39 c2 14 add r25,r25,r24
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;
ffc0e214: 81 3f 00 08 lwz r9,8(r31)
ffc0e218: 7f 9b 48 40 cmplw cr7,r27,r9
ffc0e21c: 41 9c ff e8 blt+ cr7,ffc0e204 <rtems_bdbuf_get_buffer_from_lru_list+0xc0>
b < group->bds_per_group;
b++, bd += bufs_per_bd)
rtems_bdbuf_make_free_and_add_to_lru_list (bd);
if (b > 1)
ffc0e220: 2b 9b 00 01 cmplwi cr7,r27,1
ffc0e224: 40 9d 00 0c ble- cr7,ffc0e230 <rtems_bdbuf_get_buffer_from_lru_list+0xec>
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
ffc0e228: 7e c3 b3 78 mr r3,r22
ffc0e22c: 4b ff f9 35 bl ffc0db60 <rtems_bdbuf_wake>
return group->bdbuf;
ffc0e230: 81 5f 00 10 lwz r10,16(r31)
}
else if (bd->group->users == 0)
empty_bd = rtems_bdbuf_group_realloc (bd->group, dd->bds_per_group);
}
if (empty_bd != NULL)
ffc0e234: 2f 8a 00 00 cmpwi cr7,r10,0
ffc0e238: 41 be 02 88 beq+ cr7,ffc0e4c0 <rtems_bdbuf_get_buffer_from_lru_list+0x37c><== NEVER TAKEN
rtems_disk_device *dd,
rtems_blkdev_bnum block)
{
bd->dd = dd ;
bd->block = block;
bd->avl.left = NULL;
ffc0e23c: 39 20 00 00 li r9,0
static void
rtems_bdbuf_setup_empty_buffer (rtems_bdbuf_buffer *bd,
rtems_disk_device *dd,
rtems_blkdev_bnum block)
{
bd->dd = dd ;
ffc0e240: 93 aa 00 14 stw r29,20(r10)
rtems_bdbuf_buffer* node)
{
const rtems_disk_device *dd = node->dd;
rtems_blkdev_bnum block = node->block;
rtems_bdbuf_buffer* p = *root;
ffc0e244: 3d 00 00 00 lis r8,0
rtems_disk_device *dd,
rtems_blkdev_bnum block)
{
bd->dd = dd ;
bd->block = block;
bd->avl.left = NULL;
ffc0e248: 91 2a 00 08 stw r9,8(r10)
rtems_bdbuf_buffer* node)
{
const rtems_disk_device *dd = node->dd;
rtems_blkdev_bnum block = node->block;
rtems_bdbuf_buffer* p = *root;
ffc0e24c: 39 08 2a 00 addi r8,r8,10752
rtems_blkdev_bnum block)
{
bd->dd = dd ;
bd->block = block;
bd->avl.left = NULL;
bd->avl.right = NULL;
ffc0e250: 91 2a 00 0c stw r9,12(r10)
bd->waiters = 0;
ffc0e254: 91 2a 00 24 stw r9,36(r10)
rtems_bdbuf_buffer* node)
{
const rtems_disk_device *dd = node->dd;
rtems_blkdev_bnum block = node->block;
rtems_bdbuf_buffer* p = *root;
ffc0e258: 81 28 00 3c lwz r9,60(r8)
rtems_bdbuf_setup_empty_buffer (rtems_bdbuf_buffer *bd,
rtems_disk_device *dd,
rtems_blkdev_bnum block)
{
bd->dd = dd ;
bd->block = block;
ffc0e25c: 93 4a 00 18 stw r26,24(r10)
rtems_bdbuf_buffer* buf_stack[RTEMS_BDBUF_AVL_MAX_HEIGHT];
rtems_bdbuf_buffer** buf_prev = buf_stack;
bool modified = false;
if (p == NULL)
ffc0e260: 2f 89 00 00 cmpwi cr7,r9,0
ffc0e264: 41 9e 00 14 beq- cr7,ffc0e278 <rtems_bdbuf_get_buffer_from_lru_list+0x134>
rtems_bdbuf_make_empty (bd);
}
static rtems_bdbuf_buffer *
rtems_bdbuf_get_buffer_from_lru_list (rtems_disk_device *dd,
ffc0e268: 38 a1 00 04 addi r5,r1,4
*buf_prev++ = p;
if (((uintptr_t) p->dd < (uintptr_t) dd)
|| ((p->dd == dd) && (p->block < block)))
{
p->avl.cache = 1;
ffc0e26c: 38 e0 00 01 li r7,1
break;
}
}
else if ((p->dd != dd) || (p->block != block))
{
p->avl.cache = -1;
ffc0e270: 38 c0 ff ff li r6,-1
ffc0e274: 48 00 00 68 b ffc0e2dc <rtems_bdbuf_get_buffer_from_lru_list+0x198>
bool modified = false;
if (p == NULL)
{
*root = node;
ffc0e278: 91 48 00 3c stw r10,60(r8)
node->avl.left = NULL;
ffc0e27c: 91 2a 00 08 stw r9,8(r10)
node->avl.right = NULL;
ffc0e280: 91 2a 00 0c stw r9,12(r10)
node->avl.bal = 0;
ffc0e284: 99 2a 00 11 stb r9,17(r10)
ffc0e288: 48 00 02 2c b ffc0e4b4 <rtems_bdbuf_get_buffer_from_lru_list+0x370>
while (p != NULL)
{
*buf_prev++ = p;
if (((uintptr_t) p->dd < (uintptr_t) dd)
|| ((p->dd == dd) && (p->block < block)))
ffc0e28c: 7f 88 e8 00 cmpw cr7,r8,r29
ffc0e290: 40 be 00 30 bne+ cr7,ffc0e2c0 <rtems_bdbuf_get_buffer_from_lru_list+0x17c><== NEVER TAKEN
ffc0e294: 81 09 00 18 lwz r8,24(r9)
ffc0e298: 7f 88 d0 40 cmplw cr7,r8,r26
ffc0e29c: 40 9c 00 1c bge- cr7,ffc0e2b8 <rtems_bdbuf_get_buffer_from_lru_list+0x174>
{
p->avl.cache = 1;
q = p->avl.right;
ffc0e2a0: 81 09 00 0c lwz r8,12(r9)
*buf_prev++ = p;
if (((uintptr_t) p->dd < (uintptr_t) dd)
|| ((p->dd == dd) && (p->block < block)))
{
p->avl.cache = 1;
ffc0e2a4: 98 e9 00 10 stb r7,16(r9)
q = p->avl.right;
if (q == NULL)
ffc0e2a8: 2f 88 00 00 cmpwi cr7,r8,0
ffc0e2ac: 40 be 00 2c bne+ cr7,ffc0e2d8 <rtems_bdbuf_get_buffer_from_lru_list+0x194>
{
q = node;
p->avl.right = q = node;
ffc0e2b0: 91 49 00 0c stw r10,12(r9)
ffc0e2b4: 48 00 00 3c b ffc0e2f0 <rtems_bdbuf_get_buffer_from_lru_list+0x1ac>
break;
}
}
else if ((p->dd != dd) || (p->block != block))
ffc0e2b8: 7f 88 d0 00 cmpw cr7,r8,r26
ffc0e2bc: 41 9e 01 f0 beq- cr7,ffc0e4ac <rtems_bdbuf_get_buffer_from_lru_list+0x368><== NEVER TAKEN
{
p->avl.cache = -1;
q = p->avl.left;
ffc0e2c0: 81 09 00 08 lwz r8,8(r9)
break;
}
}
else if ((p->dd != dd) || (p->block != block))
{
p->avl.cache = -1;
ffc0e2c4: 98 c9 00 10 stb r6,16(r9)
q = p->avl.left;
if (q == NULL)
ffc0e2c8: 2f 88 00 00 cmpwi cr7,r8,0
ffc0e2cc: 40 be 00 0c bne+ cr7,ffc0e2d8 <rtems_bdbuf_get_buffer_from_lru_list+0x194>
{
q = node;
p->avl.left = q;
ffc0e2d0: 91 49 00 08 stw r10,8(r9)
ffc0e2d4: 48 00 00 1c b ffc0e2f0 <rtems_bdbuf_get_buffer_from_lru_list+0x1ac>
}
else if ((p->dd != dd) || (p->block != block))
{
p->avl.cache = -1;
q = p->avl.left;
if (q == NULL)
ffc0e2d8: 7d 09 43 78 mr r9,r8
while (p != NULL)
{
*buf_prev++ = p;
if (((uintptr_t) p->dd < (uintptr_t) dd)
ffc0e2dc: 81 09 00 14 lwz r8,20(r9)
return 0;
}
while (p != NULL)
{
*buf_prev++ = p;
ffc0e2e0: 95 25 00 04 stwu r9,4(r5)
if (((uintptr_t) p->dd < (uintptr_t) dd)
ffc0e2e4: 7f 88 e8 40 cmplw cr7,r8,r29
ffc0e2e8: 41 bc ff b8 blt- cr7,ffc0e2a0 <rtems_bdbuf_get_buffer_from_lru_list+0x15c><== NEVER TAKEN
ffc0e2ec: 4b ff ff a0 b ffc0e28c <rtems_bdbuf_get_buffer_from_lru_list+0x148>
}
p = q;
}
q->avl.left = q->avl.right = NULL;
ffc0e2f0: 39 00 00 00 li r8,0
ffc0e2f4: 91 0a 00 0c stw r8,12(r10)
modified = true;
buf_prev--;
while (modified)
{
if (p->avl.cache == -1)
ffc0e2f8: 38 00 ff ff li r0,-1
p->avl.bal = 0;
modified = false;
break;
case 0:
p->avl.bal = 1;
ffc0e2fc: 38 80 00 01 li r4,1
}
p = q;
}
q->avl.left = q->avl.right = NULL;
ffc0e300: 91 0a 00 08 stw r8,8(r10)
p1->avl.right = p2->avl.left;
p2->avl.left = p1;
p->avl.left = p2->avl.right;
p2->avl.right = p;
if (p2->avl.bal == -1) p->avl.bal = +1; else p->avl.bal = 0;
if (p2->avl.bal == +1) p1->avl.bal = -1; else p1->avl.bal = 0;
ffc0e304: 3b e0 ff ff li r31,-1
default:
break;
}
}
q = p;
if (buf_prev > buf_stack)
ffc0e308: 3b c1 00 08 addi r30,r1,8
p = q;
}
q->avl.left = q->avl.right = NULL;
q->avl.bal = 0;
ffc0e30c: 99 0a 00 11 stb r8,17(r10)
ffc0e310: 48 00 00 08 b ffc0e318 <rtems_bdbuf_get_buffer_from_lru_list+0x1d4>
modified = true;
buf_prev--;
while (modified)
ffc0e314: 7c c9 33 78 mr r9,r6
{
if (p->avl.cache == -1)
ffc0e318: 88 c9 00 10 lbz r6,16(r9)
ffc0e31c: 7c c7 07 74 extsb r7,r6
ffc0e320: 2f 87 ff ff cmpwi cr7,r7,-1
ffc0e324: 88 e9 00 11 lbz r7,17(r9)
ffc0e328: 40 be 00 90 bne+ cr7,ffc0e3b8 <rtems_bdbuf_get_buffer_from_lru_list+0x274>
{
switch (p->avl.bal)
ffc0e32c: 7c e3 07 75 extsb. r3,r7
ffc0e330: 41 82 00 18 beq- ffc0e348 <rtems_bdbuf_get_buffer_from_lru_list+0x204>
ffc0e334: 2f 83 00 01 cmpwi cr7,r3,1
ffc0e338: 41 9e 00 98 beq- cr7,ffc0e3d0 <rtems_bdbuf_get_buffer_from_lru_list+0x28c>
ffc0e33c: 2f 83 ff ff cmpwi cr7,r3,-1
ffc0e340: 40 be 01 24 bne+ cr7,ffc0e464 <rtems_bdbuf_get_buffer_from_lru_list+0x320><== NEVER TAKEN
ffc0e344: 48 00 00 0c b ffc0e350 <rtems_bdbuf_get_buffer_from_lru_list+0x20c>
p->avl.bal = 0;
modified = false;
break;
case 0:
p->avl.bal = -1;
ffc0e348: 98 c9 00 11 stb r6,17(r9)
ffc0e34c: 48 00 01 18 b ffc0e464 <rtems_bdbuf_get_buffer_from_lru_list+0x320>
break;
case -1:
p1 = p->avl.left;
ffc0e350: 80 e9 00 08 lwz r7,8(r9)
if (p1->avl.bal == -1) /* simple LL-turn */
ffc0e354: 88 c7 00 11 lbz r6,17(r7)
ffc0e358: 2f 86 00 ff cmpwi cr7,r6,255
ffc0e35c: 80 c7 00 0c lwz r6,12(r7)
ffc0e360: 40 be 00 10 bne+ cr7,ffc0e370 <rtems_bdbuf_get_buffer_from_lru_list+0x22c>
{
p->avl.left = p1->avl.right;
ffc0e364: 90 c9 00 08 stw r6,8(r9)
p1->avl.right = p;
ffc0e368: 91 27 00 0c stw r9,12(r7)
ffc0e36c: 48 00 00 90 b ffc0e3fc <rtems_bdbuf_get_buffer_from_lru_list+0x2b8>
p = p1;
}
else /* double LR-turn */
{
p2 = p1->avl.right;
p1->avl.right = p2->avl.left;
ffc0e370: 81 66 00 08 lwz r11,8(r6)
p->avl.bal = 0;
p = p1;
}
else /* double LR-turn */
{
p2 = p1->avl.right;
ffc0e374: 7c c3 33 78 mr r3,r6
p1->avl.right = p2->avl.left;
p2->avl.left = p1;
ffc0e378: 90 e6 00 08 stw r7,8(r6)
p = p1;
}
else /* double LR-turn */
{
p2 = p1->avl.right;
p1->avl.right = p2->avl.left;
ffc0e37c: 91 67 00 0c stw r11,12(r7)
p2->avl.left = p1;
p->avl.left = p2->avl.right;
ffc0e380: 81 66 00 0c lwz r11,12(r6)
p2->avl.right = p;
ffc0e384: 91 26 00 0c stw r9,12(r6)
else /* double LR-turn */
{
p2 = p1->avl.right;
p1->avl.right = p2->avl.left;
p2->avl.left = p1;
p->avl.left = p2->avl.right;
ffc0e388: 91 69 00 08 stw r11,8(r9)
p2->avl.right = p;
if (p2->avl.bal == -1) p->avl.bal = +1; else p->avl.bal = 0;
ffc0e38c: 89 66 00 11 lbz r11,17(r6)
ffc0e390: 2f 8b 00 ff cmpwi cr7,r11,255
ffc0e394: 40 be 00 0c bne+ cr7,ffc0e3a0 <rtems_bdbuf_get_buffer_from_lru_list+0x25c>
ffc0e398: 98 89 00 11 stb r4,17(r9)
ffc0e39c: 48 00 00 08 b ffc0e3a4 <rtems_bdbuf_get_buffer_from_lru_list+0x260>
ffc0e3a0: 99 09 00 11 stb r8,17(r9)
if (p2->avl.bal == +1) p1->avl.bal = -1; else p1->avl.bal = 0;
ffc0e3a4: 89 26 00 11 lbz r9,17(r6)
ffc0e3a8: 2f 89 00 01 cmpwi cr7,r9,1
ffc0e3ac: 40 be 00 a4 bne+ cr7,ffc0e450 <rtems_bdbuf_get_buffer_from_lru_list+0x30c>
ffc0e3b0: 9b e7 00 11 stb r31,17(r7)
ffc0e3b4: 48 00 00 a0 b ffc0e454 <rtems_bdbuf_get_buffer_from_lru_list+0x310>
break;
}
}
else
{
switch (p->avl.bal)
ffc0e3b8: 7c e6 07 75 extsb. r6,r7
ffc0e3bc: 41 82 00 1c beq- ffc0e3d8 <rtems_bdbuf_get_buffer_from_lru_list+0x294>
ffc0e3c0: 2f 86 00 01 cmpwi cr7,r6,1
ffc0e3c4: 41 9e 00 1c beq- cr7,ffc0e3e0 <rtems_bdbuf_get_buffer_from_lru_list+0x29c>
ffc0e3c8: 2f 86 ff ff cmpwi cr7,r6,-1
ffc0e3cc: 40 be 00 98 bne+ cr7,ffc0e464 <rtems_bdbuf_get_buffer_from_lru_list+0x320><== NEVER TAKEN
{
case -1:
p->avl.bal = 0;
ffc0e3d0: 99 09 00 11 stb r8,17(r9)
ffc0e3d4: 48 00 00 88 b ffc0e45c <rtems_bdbuf_get_buffer_from_lru_list+0x318>
modified = false;
break;
case 0:
p->avl.bal = 1;
ffc0e3d8: 98 89 00 11 stb r4,17(r9)
ffc0e3dc: 48 00 00 88 b ffc0e464 <rtems_bdbuf_get_buffer_from_lru_list+0x320>
break;
case 1:
p1 = p->avl.right;
ffc0e3e0: 80 e9 00 0c lwz r7,12(r9)
if (p1->avl.bal == 1) /* simple RR-turn */
ffc0e3e4: 88 c7 00 11 lbz r6,17(r7)
ffc0e3e8: 2f 86 00 01 cmpwi cr7,r6,1
ffc0e3ec: 80 c7 00 08 lwz r6,8(r7)
ffc0e3f0: 40 be 00 18 bne+ cr7,ffc0e408 <rtems_bdbuf_get_buffer_from_lru_list+0x2c4>
{
p->avl.right = p1->avl.left;
ffc0e3f4: 90 c9 00 0c stw r6,12(r9)
p1->avl.left = p;
ffc0e3f8: 91 27 00 08 stw r9,8(r7)
p->avl.bal = 0;
ffc0e3fc: 99 09 00 11 stb r8,17(r9)
ffc0e400: 7c e3 3b 78 mr r3,r7
ffc0e404: 48 00 00 50 b ffc0e454 <rtems_bdbuf_get_buffer_from_lru_list+0x310>
p = p1;
}
else /* double RL-turn */
{
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
ffc0e408: 81 66 00 0c lwz r11,12(r6)
p->avl.bal = 0;
p = p1;
}
else /* double RL-turn */
{
p2 = p1->avl.left;
ffc0e40c: 7c c3 33 78 mr r3,r6
p1->avl.left = p2->avl.right;
p2->avl.right = p1;
ffc0e410: 90 e6 00 0c stw r7,12(r6)
p = p1;
}
else /* double RL-turn */
{
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
ffc0e414: 91 67 00 08 stw r11,8(r7)
p2->avl.right = p1;
p->avl.right = p2->avl.left;
ffc0e418: 81 66 00 08 lwz r11,8(r6)
p2->avl.left = p;
ffc0e41c: 91 26 00 08 stw r9,8(r6)
else /* double RL-turn */
{
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
p2->avl.right = p1;
p->avl.right = p2->avl.left;
ffc0e420: 91 69 00 0c stw r11,12(r9)
p2->avl.left = p;
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
ffc0e424: 89 66 00 11 lbz r11,17(r6)
ffc0e428: 2f 8b 00 01 cmpwi cr7,r11,1
ffc0e42c: 40 be 00 0c bne+ cr7,ffc0e438 <rtems_bdbuf_get_buffer_from_lru_list+0x2f4><== ALWAYS TAKEN
ffc0e430: 98 09 00 11 stb r0,17(r9) <== NOT EXECUTED
ffc0e434: 48 00 00 08 b ffc0e43c <rtems_bdbuf_get_buffer_from_lru_list+0x2f8><== NOT EXECUTED
ffc0e438: 99 09 00 11 stb r8,17(r9)
if (p2->avl.bal == -1) p1->avl.bal = +1; else p1->avl.bal = 0;
ffc0e43c: 89 26 00 11 lbz r9,17(r6)
ffc0e440: 2f 89 00 ff cmpwi cr7,r9,255
ffc0e444: 40 be 00 0c bne+ cr7,ffc0e450 <rtems_bdbuf_get_buffer_from_lru_list+0x30c><== ALWAYS TAKEN
ffc0e448: 98 87 00 11 stb r4,17(r7) <== NOT EXECUTED
ffc0e44c: 48 00 00 08 b ffc0e454 <rtems_bdbuf_get_buffer_from_lru_list+0x310><== NOT EXECUTED
ffc0e450: 99 07 00 11 stb r8,17(r7)
p = p2;
}
p->avl.bal = 0;
ffc0e454: 99 03 00 11 stb r8,17(r3)
ffc0e458: 7c 69 1b 78 mr r9,r3
modified = false;
ffc0e45c: 38 e0 00 00 li r7,0
ffc0e460: 48 00 00 08 b ffc0e468 <rtems_bdbuf_get_buffer_from_lru_list+0x324>
break;
}
}
else
{
switch (p->avl.bal)
ffc0e464: 38 e0 00 01 li r7,1
default:
break;
}
}
q = p;
if (buf_prev > buf_stack)
ffc0e468: 7f 85 f0 40 cmplw cr7,r5,r30
ffc0e46c: 40 9d 00 24 ble- cr7,ffc0e490 <rtems_bdbuf_get_buffer_from_lru_list+0x34c>
{
p = *--buf_prev;
ffc0e470: 80 c5 ff fc lwz r6,-4(r5)
if (p->avl.cache == -1)
ffc0e474: 88 66 00 10 lbz r3,16(r6)
ffc0e478: 2f 83 00 ff cmpwi cr7,r3,255
ffc0e47c: 40 be 00 0c bne+ cr7,ffc0e488 <rtems_bdbuf_get_buffer_from_lru_list+0x344>
{
p->avl.left = q;
ffc0e480: 91 26 00 08 stw r9,8(r6)
ffc0e484: 48 00 00 18 b ffc0e49c <rtems_bdbuf_get_buffer_from_lru_list+0x358>
}
else
{
p->avl.right = q;
ffc0e488: 91 26 00 0c stw r9,12(r6)
ffc0e48c: 48 00 00 10 b ffc0e49c <rtems_bdbuf_get_buffer_from_lru_list+0x358>
}
}
else
{
*root = p;
ffc0e490: 3d 00 00 00 lis r8,0
ffc0e494: 91 28 2a 3c stw r9,10812(r8)
ffc0e498: 48 00 00 1c b ffc0e4b4 <rtems_bdbuf_get_buffer_from_lru_list+0x370>
q->avl.left = q->avl.right = NULL;
q->avl.bal = 0;
modified = true;
buf_prev--;
while (modified)
ffc0e49c: 2f 87 00 00 cmpwi cr7,r7,0
ffc0e4a0: 38 a5 ff fc addi r5,r5,-4
ffc0e4a4: 40 9e fe 70 bne+ cr7,ffc0e314 <rtems_bdbuf_get_buffer_from_lru_list+0x1d0>
ffc0e4a8: 48 00 00 0c b ffc0e4b4 <rtems_bdbuf_get_buffer_from_lru_list+0x370>
bd->avl.left = NULL;
bd->avl.right = NULL;
bd->waiters = 0;
if (rtems_bdbuf_avl_insert (&bdbuf_cache.tree, bd) != 0)
rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_RECYCLE);
ffc0e4ac: 38 60 00 08 li r3,8 <== NOT EXECUTED
ffc0e4b0: 4b ff f3 4d bl ffc0d7fc <rtems_bdbuf_fatal> <== NOT EXECUTED
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
ffc0e4b4: 39 20 00 01 li r9,1
ffc0e4b8: 91 2a 00 20 stw r9,32(r10)
ffc0e4bc: 48 00 00 14 b ffc0e4d0 <rtems_bdbuf_get_buffer_from_lru_list+0x38c>
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 ();
}
ffc0e4c0: 83 de 00 00 lwz r30,0(r30)
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))
ffc0e4c4: 7f 9e b8 00 cmpw cr7,r30,r23
ffc0e4c8: 40 9e fc ac bne+ cr7,ffc0e174 <rtems_bdbuf_get_buffer_from_lru_list+0x30>
}
node = rtems_chain_next (node);
}
return NULL;
ffc0e4cc: 39 40 00 00 li r10,0
}
ffc0e4d0: 39 61 00 b8 addi r11,r1,184
ffc0e4d4: 7d 43 53 78 mr r3,r10
ffc0e4d8: 48 00 b2 50 b ffc19728 <_restgpr_21_x>
ffc0f278 <rtems_bdbuf_init>:
rtems_mode prev_mode;
if (rtems_bdbuf_tracer)
printf ("bdbuf:init\n");
if (rtems_interrupt_is_in_progress())
ffc0f278: 3d 20 00 00 lis r9,0
ffc0f27c: 81 29 32 08 lwz r9,12808(r9)
return RTEMS_CALLED_FROM_ISR;
ffc0f280: 38 60 00 12 li r3,18
rtems_mode prev_mode;
if (rtems_bdbuf_tracer)
printf ("bdbuf:init\n");
if (rtems_interrupt_is_in_progress())
ffc0f284: 2f 89 00 00 cmpwi cr7,r9,0
ffc0f288: 4c be 00 20 bnelr+ cr7
*
* @return rtems_status_code The initialisation status.
*/
rtems_status_code
rtems_bdbuf_init (void)
{
ffc0f28c: 94 21 ff e0 stwu r1,-32(r1)
ffc0f290: 7c 08 02 a6 mflr r0
/*
* Check the configuration table values.
*/
if ((bdbuf_config.buffer_max % bdbuf_config.buffer_min) != 0)
return RTEMS_INVALID_NUMBER;
ffc0f294: 38 60 00 0a li r3,10
*
* @return rtems_status_code The initialisation status.
*/
rtems_status_code
rtems_bdbuf_init (void)
{
ffc0f298: bf 41 00 08 stmw r26,8(r1)
return RTEMS_CALLED_FROM_ISR;
/*
* Check the configuration table values.
*/
if ((bdbuf_config.buffer_max % bdbuf_config.buffer_min) != 0)
ffc0f29c: 3f 60 ff c2 lis r27,-62
ffc0f2a0: 3b 7b a3 7c addi r27,r27,-23684
ffc0f2a4: 81 3b 00 28 lwz r9,40(r27)
ffc0f2a8: 83 bb 00 24 lwz r29,36(r27)
*
* @return rtems_status_code The initialisation status.
*/
rtems_status_code
rtems_bdbuf_init (void)
{
ffc0f2ac: 90 01 00 24 stw r0,36(r1)
return RTEMS_CALLED_FROM_ISR;
/*
* Check the configuration table values.
*/
if ((bdbuf_config.buffer_max % bdbuf_config.buffer_min) != 0)
ffc0f2b0: 7f 89 eb 96 divwu r28,r9,r29
ffc0f2b4: 7d 5c e9 d6 mullw r10,r28,r29
ffc0f2b8: 7f 89 50 00 cmpw cr7,r9,r10
ffc0f2bc: 40 be 03 a0 bne+ cr7,ffc0f65c <rtems_bdbuf_init+0x3e4> <== 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 ();
if (bdbuf_cache.initialised)
ffc0f2c0: 3f e0 00 00 lis r31,0
/*
* 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 ();
ffc0f2c4: 4b ff e6 35 bl ffc0d8f8 <rtems_bdbuf_disable_preemption>
if (bdbuf_cache.initialised)
ffc0f2c8: 3b ff 2a 00 addi r31,r31,10752
ffc0f2cc: 8b df 00 95 lbz r30,149(r31)
/*
* 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 ();
ffc0f2d0: 7c 7a 1b 78 mr r26,r3
if (bdbuf_cache.initialised)
ffc0f2d4: 2f 9e 00 00 cmpwi cr7,r30,0
ffc0f2d8: 41 9e 00 10 beq- cr7,ffc0f2e8 <rtems_bdbuf_init+0x70> <== ALWAYS TAKEN
{
rtems_bdbuf_restore_preemption (prev_mode);
ffc0f2dc: 4b ff e6 65 bl ffc0d940 <rtems_bdbuf_restore_preemption><== NOT EXECUTED
return RTEMS_RESOURCE_IN_USE;
ffc0f2e0: 38 60 00 0c li r3,12 <== NOT EXECUTED
ffc0f2e4: 48 00 03 78 b ffc0f65c <rtems_bdbuf_init+0x3e4> <== NOT EXECUTED
}
memset(&bdbuf_cache, 0, sizeof(bdbuf_cache));
ffc0f2e8: 38 80 00 00 li r4,0
ffc0f2ec: 38 a0 00 98 li r5,152
ffc0f2f0: 7f e3 fb 78 mr r3,r31
ffc0f2f4: 48 00 63 05 bl ffc155f8 <memset>
bdbuf_cache.initialised = true;
ffc0f2f8: 39 20 00 01 li r9,1
rtems_bdbuf_restore_preemption (prev_mode);
ffc0f2fc: 7f 43 d3 78 mr r3,r26
rtems_bdbuf_restore_preemption (prev_mode);
return RTEMS_RESOURCE_IN_USE;
}
memset(&bdbuf_cache, 0, sizeof(bdbuf_cache));
bdbuf_cache.initialised = true;
ffc0f300: 99 3f 00 95 stb r9,149(r31)
rtems_bdbuf_restore_preemption (prev_mode);
ffc0f304: 4b ff e6 3d bl ffc0d940 <rtems_bdbuf_restore_preemption>
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
ffc0f308: 39 3f 00 0c addi r9,r31,12
ffc0f30c: 91 3f 00 08 stw r9,8(r31)
head->previous = NULL;
tail->previous = head;
ffc0f310: 39 3f 00 08 addi r9,r31,8
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'),
ffc0f314: 3c 60 42 44 lis r3,16964
ffc0f318: 91 3f 00 10 stw r9,16(r31)
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
ffc0f31c: 39 3f 00 44 addi r9,r31,68
ffc0f320: 60 63 43 6c ori r3,r3,17260
ffc0f324: 91 3f 00 40 stw r9,64(r31)
head->previous = NULL;
tail->previous = head;
ffc0f328: 39 3f 00 40 addi r9,r31,64
ffc0f32c: 38 80 00 01 li r4,1
ffc0f330: 91 3f 00 48 stw r9,72(r31)
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
ffc0f334: 39 3f 00 50 addi r9,r31,80
ffc0f338: 38 a0 00 54 li r5,84
ffc0f33c: 91 3f 00 4c stw r9,76(r31)
head->previous = NULL;
tail->previous = head;
ffc0f340: 39 3f 00 4c addi r9,r31,76
ffc0f344: 38 c0 00 00 li r6,0
ffc0f348: 91 3f 00 54 stw r9,84(r31)
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
ffc0f34c: 39 3f 00 5c addi r9,r31,92
ffc0f350: 38 ff 00 28 addi r7,r31,40
ffc0f354: 91 3f 00 58 stw r9,88(r31)
head->previous = NULL;
tail->previous = head;
ffc0f358: 39 3f 00 58 addi r9,r31,88
ffc0f35c: 91 3f 00 60 stw r9,96(r31)
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
ffc0f360: 39 3f 00 8c addi r9,r31,140
ffc0f364: 91 3f 00 88 stw r9,136(r31)
head->previous = NULL;
tail->previous = head;
ffc0f368: 39 3f 00 88 addi r9,r31,136
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
ffc0f36c: 93 df 00 0c stw r30,12(r31)
ffc0f370: 93 df 00 44 stw r30,68(r31)
ffc0f374: 93 df 00 50 stw r30,80(r31)
ffc0f378: 93 df 00 5c stw r30,92(r31)
ffc0f37c: 93 df 00 8c stw r30,140(r31)
tail->previous = head;
ffc0f380: 91 3f 00 90 stw r9,144(r31)
*/
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;
ffc0f384: 93 df 00 38 stw r30,56(r31)
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'),
ffc0f388: 4b ff a3 99 bl ffc09720 <rtems_semaphore_create>
1, RTEMS_BDBUF_CACHE_LOCK_ATTRIBS, 0,
&bdbuf_cache.lock);
if (sc != RTEMS_SUCCESSFUL)
ffc0f38c: 2f 83 00 00 cmpwi cr7,r3,0
ffc0f390: 40 be 02 38 bne+ cr7,ffc0f5c8 <rtems_bdbuf_init+0x350> <== NEVER TAKEN
goto error;
rtems_bdbuf_lock_cache ();
ffc0f394: 4b ff e4 bd bl ffc0d850 <rtems_bdbuf_lock_cache>
sc = rtems_semaphore_create (rtems_build_name ('B', 'D', 'C', 's'),
ffc0f398: 3c 60 42 44 lis r3,16964
ffc0f39c: 60 63 43 73 ori r3,r3,17267
ffc0f3a0: 38 80 00 01 li r4,1
ffc0f3a4: 38 a0 00 54 li r5,84
ffc0f3a8: 38 c0 00 00 li r6,0
ffc0f3ac: 38 ff 00 2c addi r7,r31,44
ffc0f3b0: 4b ff a3 71 bl ffc09720 <rtems_semaphore_create>
1, RTEMS_BDBUF_CACHE_LOCK_ATTRIBS, 0,
&bdbuf_cache.sync_lock);
if (sc != RTEMS_SUCCESSFUL)
ffc0f3b4: 2f 83 00 00 cmpwi cr7,r3,0
ffc0f3b8: 40 be 02 10 bne+ cr7,ffc0f5c8 <rtems_bdbuf_init+0x350> <== NEVER TAKEN
goto error;
sc = rtems_semaphore_create (rtems_build_name ('B', 'D', 'C', 'a'),
ffc0f3bc: 3c 60 42 44 lis r3,16964
ffc0f3c0: 60 63 43 61 ori r3,r3,17249
ffc0f3c4: 38 80 00 00 li r4,0
ffc0f3c8: 38 a0 00 24 li r5,36
ffc0f3cc: 38 c0 00 00 li r6,0
ffc0f3d0: 38 ff 00 68 addi r7,r31,104
ffc0f3d4: 4b ff a3 4d bl ffc09720 <rtems_semaphore_create>
0, RTEMS_BDBUF_CACHE_WAITER_ATTRIBS, 0,
&bdbuf_cache.access_waiters.sema);
if (sc != RTEMS_SUCCESSFUL)
ffc0f3d8: 2f 83 00 00 cmpwi cr7,r3,0
ffc0f3dc: 40 be 01 ec bne+ cr7,ffc0f5c8 <rtems_bdbuf_init+0x350> <== NEVER TAKEN
goto error;
sc = rtems_semaphore_create (rtems_build_name ('B', 'D', 'C', 't'),
ffc0f3e0: 3c 60 42 44 lis r3,16964
ffc0f3e4: 60 63 43 74 ori r3,r3,17268
ffc0f3e8: 38 80 00 00 li r4,0
ffc0f3ec: 38 a0 00 24 li r5,36
ffc0f3f0: 38 c0 00 00 li r6,0
ffc0f3f4: 38 ff 00 70 addi r7,r31,112
ffc0f3f8: 4b ff a3 29 bl ffc09720 <rtems_semaphore_create>
0, RTEMS_BDBUF_CACHE_WAITER_ATTRIBS, 0,
&bdbuf_cache.transfer_waiters.sema);
if (sc != RTEMS_SUCCESSFUL)
ffc0f3fc: 2f 83 00 00 cmpwi cr7,r3,0
ffc0f400: 40 be 01 c8 bne+ cr7,ffc0f5c8 <rtems_bdbuf_init+0x350> <== NEVER TAKEN
goto error;
sc = rtems_semaphore_create (rtems_build_name ('B', 'D', 'C', 'b'),
ffc0f404: 3c 60 42 44 lis r3,16964
ffc0f408: 60 63 43 62 ori r3,r3,17250
ffc0f40c: 38 80 00 00 li r4,0
ffc0f410: 38 a0 00 24 li r5,36
ffc0f414: 38 c0 00 00 li r6,0
ffc0f418: 38 ff 00 78 addi r7,r31,120
ffc0f41c: 4b ff a3 05 bl ffc09720 <rtems_semaphore_create>
0, RTEMS_BDBUF_CACHE_WAITER_ATTRIBS, 0,
&bdbuf_cache.buffer_waiters.sema);
if (sc != RTEMS_SUCCESSFUL)
ffc0f420: 2f 83 00 00 cmpwi cr7,r3,0
ffc0f424: 40 be 01 a4 bne+ cr7,ffc0f5c8 <rtems_bdbuf_init+0x350> <== NEVER TAKEN
/*
* Compute the various number of elements in the cache.
*/
bdbuf_cache.buffer_min_count =
bdbuf_config.size / bdbuf_config.buffer_min;
ffc0f428: 83 db 00 20 lwz r30,32(r27)
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),
ffc0f42c: 38 60 00 38 li r3,56
/*
* Compute the various number of elements in the cache.
*/
bdbuf_cache.buffer_min_count =
bdbuf_config.size / bdbuf_config.buffer_min;
bdbuf_cache.max_bds_per_group =
ffc0f430: 93 9f 00 20 stw r28,32(r31)
/*
* Compute the various number of elements in the cache.
*/
bdbuf_cache.buffer_min_count =
bdbuf_config.size / bdbuf_config.buffer_min;
ffc0f434: 7f de eb 96 divwu r30,r30,r29
bdbuf_cache.max_bds_per_group =
bdbuf_config.buffer_max / bdbuf_config.buffer_min;
bdbuf_cache.group_count =
bdbuf_cache.buffer_min_count / bdbuf_cache.max_bds_per_group;
ffc0f438: 7f 9e e3 96 divwu r28,r30,r28
goto error;
/*
* Compute the various number of elements in the cache.
*/
bdbuf_cache.buffer_min_count =
ffc0f43c: 93 df 00 1c stw r30,28(r31)
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),
ffc0f440: 7f c4 f3 78 mr r4,r30
*/
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 =
ffc0f444: 93 9f 00 7c stw r28,124(r31)
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),
ffc0f448: 4b ff 5e 6d bl ffc052b4 <calloc>
bdbuf_cache.buffer_min_count);
if (!bdbuf_cache.bds)
ffc0f44c: 2f 83 00 00 cmpwi cr7,r3,0
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),
ffc0f450: 90 7f 00 14 stw r3,20(r31)
bdbuf_cache.buffer_min_count);
if (!bdbuf_cache.bds)
ffc0f454: 41 9e 01 74 beq- cr7,ffc0f5c8 <rtems_bdbuf_init+0x350> <== NEVER TAKEN
goto error;
/*
* Allocate the memory for the buffer descriptors.
*/
bdbuf_cache.groups = calloc (sizeof (rtems_bdbuf_group),
ffc0f458: 38 60 00 14 li r3,20
ffc0f45c: 7f 84 e3 78 mr r4,r28
ffc0f460: 4b ff 5e 55 bl ffc052b4 <calloc>
bdbuf_cache.group_count);
if (!bdbuf_cache.groups)
ffc0f464: 2f 83 00 00 cmpwi cr7,r3,0
goto error;
/*
* Allocate the memory for the buffer descriptors.
*/
bdbuf_cache.groups = calloc (sizeof (rtems_bdbuf_group),
ffc0f468: 90 7f 00 80 stw r3,128(r31)
bdbuf_cache.group_count);
if (!bdbuf_cache.groups)
ffc0f46c: 41 9e 01 5c beq- cr7,ffc0f5c8 <rtems_bdbuf_init+0x350> <== 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,
ffc0f470: 3f e0 00 00 lis r31,0
ffc0f474: 7c be e9 d6 mullw r5,r30,r29
ffc0f478: 3b ff 2a 00 addi r31,r31,10752
ffc0f47c: 38 7f 00 18 addi r3,r31,24
ffc0f480: 38 80 00 20 li r4,32
ffc0f484: 48 00 1e 7d bl ffc11300 <rtems_memalign>
ffc0f488: 2f 83 00 00 cmpwi cr7,r3,0
ffc0f48c: 40 be 01 3c bne+ cr7,ffc0f5c8 <rtems_bdbuf_init+0x350> <== 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,
bd = bdbuf_cache.bds, buffer = bdbuf_cache.buffers;
b < bdbuf_cache.buffer_min_count;
ffc0f490: 80 7f 00 1c lwz r3,28(r31)
/*
* 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,
ffc0f494: 38 e0 00 00 li r7,0
ffc0f498: 81 5f 00 80 lwz r10,128(r31)
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;
ffc0f49c: 38 00 00 00 li r0,0
/*
* 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;
ffc0f4a0: 81 1f 00 14 lwz r8,20(r31)
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
the_node->next = tail;
ffc0f4a4: 38 63 00 01 addi r3,r3,1
bd->group = group;
bd->buffer = buffer;
rtems_chain_append_unprotected (&bdbuf_cache.lru, &bd->link);
if ((b % bdbuf_cache.max_bds_per_group) ==
ffc0f4a8: 80 9f 00 20 lwz r4,32(r31)
/*
* 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,
ffc0f4ac: 7d 46 53 78 mr r6,r10
bd = bdbuf_cache.bds, buffer = bdbuf_cache.buffers;
ffc0f4b0: 80 bf 00 18 lwz r5,24(r31)
ffc0f4b4: 7d 09 43 78 mr r9,r8
bd->buffer = buffer;
rtems_chain_append_unprotected (&bdbuf_cache.lru, &bd->link);
if ((b % bdbuf_cache.max_bds_per_group) ==
(bdbuf_cache.max_bds_per_group - 1))
ffc0f4b8: 39 64 ff ff addi r11,r4,-1
ffc0f4bc: 7c 69 03 a6 mtctr r3
ffc0f4c0: 3b df 00 44 addi r30,r31,68
/*
* 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,
ffc0f4c4: 48 00 00 48 b ffc0f50c <rtems_bdbuf_init+0x294>
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;
ffc0f4c8: 90 09 00 14 stw r0,20(r9)
bd->group = group;
ffc0f4cc: 90 c9 00 28 stw r6,40(r9)
bd->buffer = buffer;
ffc0f4d0: 90 a9 00 1c stw r5,28(r9)
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
ffc0f4d4: 80 7f 00 48 lwz r3,72(r31)
the_node->next = tail;
ffc0f4d8: 93 c9 00 00 stw r30,0(r9)
tail->previous = the_node;
old_last->next = the_node;
ffc0f4dc: 91 23 00 00 stw r9,0(r3)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
the_node->next = tail;
tail->previous = the_node;
ffc0f4e0: 91 3f 00 48 stw r9,72(r31)
old_last->next = the_node;
the_node->previous = old_last;
ffc0f4e4: 90 69 00 04 stw r3,4(r9)
rtems_chain_append_unprotected (&bdbuf_cache.lru, &bd->link);
if ((b % bdbuf_cache.max_bds_per_group) ==
ffc0f4e8: 7c 67 23 96 divwu r3,r7,r4
ffc0f4ec: 7c 63 21 d6 mullw r3,r3,r4
ffc0f4f0: 7c 63 38 50 subf r3,r3,r7
ffc0f4f4: 7f 83 58 00 cmpw cr7,r3,r11
ffc0f4f8: 40 be 00 08 bne+ cr7,ffc0f500 <rtems_bdbuf_init+0x288>
(bdbuf_cache.max_bds_per_group - 1))
group++;
ffc0f4fc: 38 c6 00 14 addi r6,r6,20
* 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)
ffc0f500: 38 e7 00 01 addi r7,r7,1
ffc0f504: 39 29 00 38 addi r9,r9,56
ffc0f508: 7c a5 ea 14 add r5,r5,r29
ffc0f50c: 42 00 ff bc bdnz+ ffc0f4c8 <rtems_bdbuf_init+0x250>
}
for (b = 0,
group = bdbuf_cache.groups,
bd = bdbuf_cache.bds;
b < bdbuf_cache.group_count;
ffc0f510: 3d 20 00 00 lis r9,0
ffc0f514: 39 29 2a 00 addi r9,r9,10752
ffc0f518: 80 c9 00 7c lwz r6,124(r9)
b++,
group++,
bd += bdbuf_cache.max_bds_per_group)
{
group->bds_per_group = bdbuf_cache.max_bds_per_group;
ffc0f51c: 81 29 00 20 lwz r9,32(r9)
group = bdbuf_cache.groups,
bd = bdbuf_cache.bds;
b < bdbuf_cache.group_count;
b++,
group++,
bd += bdbuf_cache.max_bds_per_group)
ffc0f520: 38 c6 00 01 addi r6,r6,1
ffc0f524: 1c e9 00 38 mulli r7,r9,56
ffc0f528: 7c c9 03 a6 mtctr r6
ffc0f52c: 48 00 00 14 b ffc0f540 <rtems_bdbuf_init+0x2c8>
{
group->bds_per_group = bdbuf_cache.max_bds_per_group;
group->bdbuf = bd;
ffc0f530: 91 0a 00 10 stw r8,16(r10)
group = bdbuf_cache.groups,
bd = bdbuf_cache.bds;
b < bdbuf_cache.group_count;
b++,
group++,
bd += bdbuf_cache.max_bds_per_group)
ffc0f534: 7d 08 3a 14 add r8,r8,r7
{
group->bds_per_group = bdbuf_cache.max_bds_per_group;
ffc0f538: 91 2a 00 08 stw r9,8(r10)
for (b = 0,
group = bdbuf_cache.groups,
bd = bdbuf_cache.bds;
b < bdbuf_cache.group_count;
b++,
group++,
ffc0f53c: 39 4a 00 14 addi r10,r10,20
if ((b % bdbuf_cache.max_bds_per_group) ==
(bdbuf_cache.max_bds_per_group - 1))
group++;
}
for (b = 0,
ffc0f540: 42 00 ff f0 bdnz+ ffc0f530 <rtems_bdbuf_init+0x2b8>
* Create and start swapout task. This task will create and manage the worker
* threads.
*/
bdbuf_cache.swapout_enabled = true;
sc = rtems_bdbuf_create_task (rtems_build_name('B', 'S', 'W', 'P'),
ffc0f544: 3f 80 ff c2 lis r28,-62
/*
* Create and start swapout task. This task will create and manage the worker
* threads.
*/
bdbuf_cache.swapout_enabled = true;
ffc0f548: 3f e0 00 00 lis r31,0
sc = rtems_bdbuf_create_task (rtems_build_name('B', 'S', 'W', 'P'),
ffc0f54c: 3b dc a3 7c addi r30,r28,-23684
/*
* Create and start swapout task. This task will create and manage the worker
* threads.
*/
bdbuf_cache.swapout_enabled = true;
ffc0f550: 3b ff 2a 00 addi r31,r31,10752
sc = rtems_bdbuf_create_task (rtems_build_name('B', 'S', 'W', 'P'),
ffc0f554: 80 9e 00 08 lwz r4,8(r30)
ffc0f558: 3c 60 42 53 lis r3,16979
ffc0f55c: 3c a0 ff c1 lis r5,-63
/*
* Create and start swapout task. This task will create and manage the worker
* threads.
*/
bdbuf_cache.swapout_enabled = true;
ffc0f560: 3b a0 00 01 li r29,1
sc = rtems_bdbuf_create_task (rtems_build_name('B', 'S', 'W', 'P'),
ffc0f564: 60 63 57 50 ori r3,r3,22352
/*
* Create and start swapout task. This task will create and manage the worker
* threads.
*/
bdbuf_cache.swapout_enabled = true;
ffc0f568: 9b bf 00 04 stb r29,4(r31)
sc = rtems_bdbuf_create_task (rtems_build_name('B', 'S', 'W', 'P'),
ffc0f56c: 38 a5 eb f4 addi r5,r5,-5132
ffc0f570: 38 c0 00 00 li r6,0
ffc0f574: 7f e7 fb 78 mr r7,r31
ffc0f578: 4b ff e6 29 bl ffc0dba0 <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)
ffc0f57c: 2f 83 00 00 cmpwi cr7,r3,0
ffc0f580: 40 be 00 48 bne+ cr7,ffc0f5c8 <rtems_bdbuf_init+0x350> <== NEVER TAKEN
goto error;
if (bdbuf_config.max_read_ahead_blocks > 0)
ffc0f584: 81 3c a3 7c lwz r9,-23684(r28)
ffc0f588: 2f 89 00 00 cmpwi cr7,r9,0
ffc0f58c: 40 be 00 10 bne+ cr7,ffc0f59c <rtems_bdbuf_init+0x324>
&bdbuf_cache.read_ahead_task);
if (sc != RTEMS_SUCCESSFUL)
goto error;
}
rtems_bdbuf_unlock_cache ();
ffc0f590: 4b ff e3 1d bl ffc0d8ac <rtems_bdbuf_unlock_cache>
return RTEMS_SUCCESSFUL;
ffc0f594: 38 60 00 00 li r3,0
ffc0f598: 48 00 00 c4 b ffc0f65c <rtems_bdbuf_init+0x3e4>
goto error;
if (bdbuf_config.max_read_ahead_blocks > 0)
{
bdbuf_cache.read_ahead_enabled = true;
sc = rtems_bdbuf_create_task (rtems_build_name('B', 'R', 'D', 'A'),
ffc0f59c: 3c 60 42 52 lis r3,16978
ffc0f5a0: 80 9e 00 2c lwz r4,44(r30)
ffc0f5a4: 3c a0 ff c1 lis r5,-63
if (sc != RTEMS_SUCCESSFUL)
goto error;
if (bdbuf_config.max_read_ahead_blocks > 0)
{
bdbuf_cache.read_ahead_enabled = true;
ffc0f5a8: 9b bf 00 94 stb r29,148(r31)
sc = rtems_bdbuf_create_task (rtems_build_name('B', 'R', 'D', 'A'),
ffc0f5ac: 60 63 44 41 ori r3,r3,17473
ffc0f5b0: 38 a5 f0 7c addi r5,r5,-3972
ffc0f5b4: 38 c0 00 00 li r6,0
ffc0f5b8: 38 ff 00 84 addi r7,r31,132
ffc0f5bc: 4b ff e5 e5 bl ffc0dba0 <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)
ffc0f5c0: 2f 83 00 00 cmpwi cr7,r3,0
ffc0f5c4: 41 be ff cc beq- cr7,ffc0f590 <rtems_bdbuf_init+0x318> <== ALWAYS TAKEN
return RTEMS_SUCCESSFUL;
error:
if (bdbuf_cache.read_ahead_task != 0)
ffc0f5c8: 3d 20 00 00 lis r9,0 <== NOT EXECUTED
ffc0f5cc: 39 49 2a 00 addi r10,r9,10752 <== NOT EXECUTED
ffc0f5d0: 80 6a 00 84 lwz r3,132(r10) <== NOT EXECUTED
ffc0f5d4: 7d 3f 4b 78 mr r31,r9 <== NOT EXECUTED
ffc0f5d8: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc0f5dc: 41 be 00 08 beq+ cr7,ffc0f5e4 <rtems_bdbuf_init+0x36c> <== NOT EXECUTED
rtems_task_delete (bdbuf_cache.read_ahead_task);
ffc0f5e0: 4b ff a7 3d bl ffc09d1c <rtems_task_delete> <== NOT EXECUTED
if (bdbuf_cache.swapout != 0)
ffc0f5e4: 80 7f 2a 00 lwz r3,10752(r31) <== NOT EXECUTED
ffc0f5e8: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc0f5ec: 41 be 00 08 beq+ cr7,ffc0f5f4 <rtems_bdbuf_init+0x37c> <== NOT EXECUTED
rtems_task_delete (bdbuf_cache.swapout);
ffc0f5f0: 4b ff a7 2d bl ffc09d1c <rtems_task_delete> <== NOT EXECUTED
free (bdbuf_cache.buffers);
ffc0f5f4: 3f c0 00 00 lis r30,0 <== NOT EXECUTED
ffc0f5f8: 3b fe 2a 00 addi r31,r30,10752 <== NOT EXECUTED
ffc0f5fc: 80 7f 00 18 lwz r3,24(r31) <== NOT EXECUTED
ffc0f600: 4b ff 5d 99 bl ffc05398 <free> <== NOT EXECUTED
free (bdbuf_cache.groups);
ffc0f604: 80 7f 00 80 lwz r3,128(r31) <== NOT EXECUTED
ffc0f608: 4b ff 5d 91 bl ffc05398 <free> <== NOT EXECUTED
free (bdbuf_cache.bds);
ffc0f60c: 80 7f 00 14 lwz r3,20(r31) <== NOT EXECUTED
ffc0f610: 4b ff 5d 89 bl ffc05398 <free> <== NOT EXECUTED
rtems_semaphore_delete (bdbuf_cache.buffer_waiters.sema);
ffc0f614: 80 7f 00 78 lwz r3,120(r31) <== NOT EXECUTED
ffc0f618: 4b ff a2 d1 bl ffc098e8 <rtems_semaphore_delete> <== NOT EXECUTED
rtems_semaphore_delete (bdbuf_cache.access_waiters.sema);
ffc0f61c: 80 7f 00 68 lwz r3,104(r31) <== NOT EXECUTED
ffc0f620: 4b ff a2 c9 bl ffc098e8 <rtems_semaphore_delete> <== NOT EXECUTED
rtems_semaphore_delete (bdbuf_cache.transfer_waiters.sema);
ffc0f624: 80 7f 00 70 lwz r3,112(r31) <== NOT EXECUTED
ffc0f628: 4b ff a2 c1 bl ffc098e8 <rtems_semaphore_delete> <== NOT EXECUTED
rtems_semaphore_delete (bdbuf_cache.sync_lock);
ffc0f62c: 80 7f 00 2c lwz r3,44(r31) <== NOT EXECUTED
ffc0f630: 4b ff a2 b9 bl ffc098e8 <rtems_semaphore_delete> <== NOT EXECUTED
if (bdbuf_cache.lock != 0)
ffc0f634: 81 3f 00 28 lwz r9,40(r31) <== NOT EXECUTED
ffc0f638: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED
ffc0f63c: 41 be 00 10 beq+ cr7,ffc0f64c <rtems_bdbuf_init+0x3d4> <== NOT EXECUTED
{
rtems_bdbuf_unlock_cache ();
ffc0f640: 4b ff e2 6d bl ffc0d8ac <rtems_bdbuf_unlock_cache> <== NOT EXECUTED
rtems_semaphore_delete (bdbuf_cache.lock);
ffc0f644: 80 7f 00 28 lwz r3,40(r31) <== NOT EXECUTED
ffc0f648: 4b ff a2 a1 bl ffc098e8 <rtems_semaphore_delete> <== NOT EXECUTED
}
bdbuf_cache.initialised = false;
ffc0f64c: 3b de 2a 00 addi r30,r30,10752 <== NOT EXECUTED
ffc0f650: 39 20 00 00 li r9,0 <== NOT EXECUTED
ffc0f654: 99 3e 00 95 stb r9,149(r30) <== NOT EXECUTED
return RTEMS_UNSATISFIED;
ffc0f658: 38 60 00 0d li r3,13 <== NOT EXECUTED
}
ffc0f65c: 39 61 00 20 addi r11,r1,32
ffc0f660: 48 00 a0 dc b ffc1973c <_restgpr_26_x>
ffc0d814 <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)
{
ffc0d814: 7c 2b 0b 78 mr r11,r1
ffc0d818: 94 21 ff f0 stwu r1,-16(r1)
ffc0d81c: 7c 08 02 a6 mflr r0
rtems_status_code sc = rtems_semaphore_obtain (lock,
ffc0d820: 38 a0 00 00 li r5,0
* @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)
{
ffc0d824: 48 00 be e1 bl ffc19704 <_savegpr_31>
ffc0d828: 7c 9f 23 78 mr r31,r4
rtems_status_code sc = rtems_semaphore_obtain (lock,
ffc0d82c: 38 80 00 00 li r4,0
* @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)
{
ffc0d830: 90 01 00 14 stw r0,20(r1)
rtems_status_code sc = rtems_semaphore_obtain (lock,
ffc0d834: 4b ff c1 71 bl ffc099a4 <rtems_semaphore_obtain>
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
ffc0d838: 2f 83 00 00 cmpwi cr7,r3,0
ffc0d83c: 41 be 00 0c beq+ cr7,ffc0d848 <rtems_bdbuf_lock+0x34> <== ALWAYS TAKEN
rtems_bdbuf_fatal (fatal_error_code);
ffc0d840: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc0d844: 4b ff ff b9 bl ffc0d7fc <rtems_bdbuf_fatal> <== NOT EXECUTED
}
ffc0d848: 39 61 00 10 addi r11,r1,16
ffc0d84c: 48 00 bf 04 b ffc19750 <_restgpr_31_x>
ffc0fc18 <rtems_bdbuf_purge_dev>:
}
}
void
rtems_bdbuf_purge_dev (rtems_disk_device *dd)
{
ffc0fc18: 94 21 ff 48 stwu r1,-184(r1)
ffc0fc1c: 7c 08 02 a6 mflr r0
ffc0fc20: bf 01 00 98 stmw r24,152(r1)
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
tail->previous = head;
ffc0fc24: 39 21 00 88 addi r9,r1,136
ffc0fc28: 7c 7d 1b 78 mr r29,r3
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
ffc0fc2c: 3b 80 00 00 li r28,0
tail->previous = head;
ffc0fc30: 91 21 00 90 stw r9,144(r1)
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
ffc0fc34: 3b 61 00 8c addi r27,r1,140
ffc0fc38: 90 01 00 bc stw r0,188(r1)
{
rtems_bdbuf_buffer *stack [RTEMS_BDBUF_AVL_MAX_HEIGHT];
rtems_bdbuf_buffer **prev = stack;
rtems_bdbuf_buffer *cur = bdbuf_cache.tree;
*prev = NULL;
ffc0fc3c: 7c 3e 0b 78 mr r30,r1
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
ffc0fc40: 3b 40 00 06 li r26,6
head->previous = NULL;
ffc0fc44: 93 81 00 8c stw r28,140(r1)
ffc0fc48: 3b 20 00 0a li r25,10
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
ffc0fc4c: 93 61 00 88 stw r27,136(r1)
rtems_bdbuf_purge_dev (rtems_disk_device *dd)
{
rtems_chain_control purge_list;
rtems_chain_initialize_empty (&purge_list);
rtems_bdbuf_lock_cache ();
ffc0fc50: 4b ff dc 01 bl ffc0d850 <rtems_bdbuf_lock_cache>
}
static void
rtems_bdbuf_read_ahead_reset (rtems_disk_device *dd)
{
rtems_bdbuf_read_ahead_cancel (dd);
ffc0fc54: 7f a3 eb 78 mr r3,r29
ffc0fc58: 4b ff f5 65 bl ffc0f1bc <rtems_bdbuf_read_ahead_cancel>
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;
ffc0fc5c: 3c 60 00 00 lis r3,0
ffc0fc60: 38 63 2a 00 addi r3,r3,10752
*prev = NULL;
ffc0fc64: 97 9e 00 08 stwu r28,8(r30)
static void
rtems_bdbuf_read_ahead_reset (rtems_disk_device *dd)
{
rtems_bdbuf_read_ahead_cancel (dd);
dd->read_ahead.trigger = RTEMS_DISK_READ_AHEAD_NO_TRIGGER;
ffc0fc68: 39 20 ff ff li r9,-1
while (cur != NULL)
{
if (cur->dd == dd)
{
switch (cur->state)
ffc0fc6c: 3f 80 ff c2 lis r28,-62
static void
rtems_bdbuf_read_ahead_reset (rtems_disk_device *dd)
{
rtems_bdbuf_read_ahead_cancel (dd);
dd->read_ahead.trigger = RTEMS_DISK_READ_AHEAD_NO_TRIGGER;
ffc0fc70: 91 3d 00 6c stw r9,108(r29)
while (cur != NULL)
{
if (cur->dd == dd)
{
switch (cur->state)
ffc0fc74: 3b 9c b2 38 addi r28,r28,-19912
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;
ffc0fc78: 83 e3 00 3c lwz r31,60(r3)
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);
ffc0fc7c: 3b 03 00 6c addi r24,r3,108
ffc0fc80: 48 00 00 e0 b ffc0fd60 <rtems_bdbuf_purge_dev+0x148>
*prev = NULL;
while (cur != NULL)
{
if (cur->dd == dd)
ffc0fc84: 81 3f 00 14 lwz r9,20(r31)
ffc0fc88: 7f 89 e8 00 cmpw cr7,r9,r29
ffc0fc8c: 40 be 00 7c bne+ cr7,ffc0fd08 <rtems_bdbuf_purge_dev+0xf0>
{
switch (cur->state)
ffc0fc90: 81 3f 00 20 lwz r9,32(r31)
ffc0fc94: 2b 89 00 0a cmplwi cr7,r9,10
ffc0fc98: 41 9d 00 68 bgt- cr7,ffc0fd00 <rtems_bdbuf_purge_dev+0xe8><== NEVER TAKEN
ffc0fc9c: 55 29 10 3a rlwinm r9,r9,2,0,29
ffc0fca0: 7d 3c 48 2e lwzx r9,r28,r9
ffc0fca4: 7d 29 e2 14 add r9,r9,r28
ffc0fca8: 7d 29 03 a6 mtctr r9
ffc0fcac: 4e 80 04 20 bctr
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);
ffc0fcb0: 7f 03 c3 78 mr r3,r24
ffc0fcb4: 4b ff de ad bl ffc0db60 <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 ();
}
ffc0fcb8: 81 3f 00 28 lwz r9,40(r31)
}
static void
rtems_bdbuf_group_release (rtems_bdbuf_buffer *bd)
{
--bd->group->users;
ffc0fcbc: 81 49 00 0c lwz r10,12(r9)
ffc0fcc0: 39 4a ff ff addi r10,r10,-1
ffc0fcc4: 91 49 00 0c stw r10,12(r9)
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
ffc0fcc8: 81 3f 00 00 lwz r9,0(r31)
previous = the_node->previous;
ffc0fccc: 81 5f 00 04 lwz r10,4(r31)
next->previous = previous;
ffc0fcd0: 91 49 00 04 stw r10,4(r9)
previous->next = next;
ffc0fcd4: 91 2a 00 00 stw r9,0(r10)
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
ffc0fcd8: 81 21 00 90 lwz r9,144(r1)
the_node->next = tail;
ffc0fcdc: 93 7f 00 00 stw r27,0(r31)
tail->previous = the_node;
ffc0fce0: 93 e1 00 90 stw r31,144(r1)
old_last->next = the_node;
ffc0fce4: 93 e9 00 00 stw r31,0(r9)
the_node->previous = old_last;
ffc0fce8: 91 3f 00 04 stw r9,4(r31)
ffc0fcec: 48 00 00 1c b ffc0fd08 <rtems_bdbuf_purge_dev+0xf0>
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
ffc0fcf0: 93 3f 00 20 stw r25,32(r31)
ffc0fcf4: 48 00 00 14 b ffc0fd08 <rtems_bdbuf_purge_dev+0xf0>
ffc0fcf8: 93 5f 00 20 stw r26,32(r31)
ffc0fcfc: 48 00 00 0c b ffc0fd08 <rtems_bdbuf_purge_dev+0xf0>
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_bdbuf_fatal (RTEMS_BDBUF_FATAL_STATE_11);
ffc0fd00: 38 60 00 17 li r3,23 <== NOT EXECUTED
ffc0fd04: 4b ff da f9 bl ffc0d7fc <rtems_bdbuf_fatal> <== NOT EXECUTED
}
}
if (cur->avl.left != NULL)
ffc0fd08: 81 3f 00 08 lwz r9,8(r31)
ffc0fd0c: 2f 89 00 00 cmpwi cr7,r9,0
ffc0fd10: 41 9e 00 08 beq- cr7,ffc0fd18 <rtems_bdbuf_purge_dev+0x100>
ffc0fd14: 48 00 00 10 b ffc0fd24 <rtems_bdbuf_purge_dev+0x10c>
/* Left */
++prev;
*prev = cur;
cur = cur->avl.left;
}
else if (cur->avl.right != NULL)
ffc0fd18: 81 3f 00 0c lwz r9,12(r31)
ffc0fd1c: 2f 89 00 00 cmpwi cr7,r9,0
ffc0fd20: 41 9e 00 18 beq- cr7,ffc0fd38 <rtems_bdbuf_purge_dev+0x120>
{
/* Right */
++prev;
*prev = cur;
ffc0fd24: 93 fe 00 04 stw r31,4(r30)
cur = cur->avl.left;
}
else if (cur->avl.right != NULL)
{
/* Right */
++prev;
ffc0fd28: 3b de 00 04 addi r30,r30,4
ffc0fd2c: 48 00 00 30 b ffc0fd5c <rtems_bdbuf_purge_dev+0x144>
while (*prev != NULL
&& (cur == (*prev)->avl.right || (*prev)->avl.right == NULL))
{
/* Up */
cur = *prev;
--prev;
ffc0fd30: 3b de ff fc addi r30,r30,-4
ffc0fd34: 7d 3f 4b 78 mr r31,r9
*prev = cur;
cur = cur->avl.right;
}
else
{
while (*prev != NULL
ffc0fd38: 81 3e 00 00 lwz r9,0(r30)
ffc0fd3c: 2f 89 00 00 cmpwi cr7,r9,0
ffc0fd40: 41 9e 00 1c beq- cr7,ffc0fd5c <rtems_bdbuf_purge_dev+0x144>
&& (cur == (*prev)->avl.right || (*prev)->avl.right == NULL))
ffc0fd44: 81 49 00 0c lwz r10,12(r9)
ffc0fd48: 7f 9f 50 00 cmpw cr7,r31,r10
ffc0fd4c: 41 be ff e4 beq- cr7,ffc0fd30 <rtems_bdbuf_purge_dev+0x118>
ffc0fd50: 2f 8a 00 00 cmpwi cr7,r10,0
ffc0fd54: 41 9e ff dc beq+ cr7,ffc0fd30 <rtems_bdbuf_purge_dev+0x118>
cur = *prev;
--prev;
}
if (*prev != NULL)
/* Right */
cur = (*prev)->avl.right;
ffc0fd58: 7d 49 53 78 mr r9,r10
ffc0fd5c: 7d 3f 4b 78 mr r31,r9
rtems_bdbuf_buffer **prev = stack;
rtems_bdbuf_buffer *cur = bdbuf_cache.tree;
*prev = NULL;
while (cur != NULL)
ffc0fd60: 2f 9f 00 00 cmpwi cr7,r31,0
ffc0fd64: 40 9e ff 20 bne+ cr7,ffc0fc84 <rtems_bdbuf_purge_dev+0x6c>
}
static void
rtems_bdbuf_purge_list (rtems_chain_control *purge_list)
{
bool wake_buffer_waiters = false;
ffc0fd68: 3b c0 00 00 li r30,0
while ((node = rtems_chain_get_unprotected (purge_list)) != NULL)
{
rtems_bdbuf_buffer *bd = (rtems_bdbuf_buffer *) node;
if (bd->waiters == 0)
wake_buffer_waiters = true;
ffc0fd6c: 3b a0 00 01 li r29,1
ffc0fd70: 48 00 00 2c b ffc0fd9c <rtems_bdbuf_purge_dev+0x184>
while ((node = rtems_chain_get_unprotected (purge_list)) != NULL)
{
rtems_bdbuf_buffer *bd = (rtems_bdbuf_buffer *) node;
if (bd->waiters == 0)
ffc0fd74: 81 3f 00 24 lwz r9,36(r31)
ffc0fd78: 2f 89 00 00 cmpwi cr7,r9,0
ffc0fd7c: 40 9e 00 08 bne- cr7,ffc0fd84 <rtems_bdbuf_purge_dev+0x16c>
wake_buffer_waiters = true;
ffc0fd80: 3b c0 00 01 li r30,1
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
ffc0fd84: 93 bf 00 20 stw r29,32(r31)
static void
rtems_bdbuf_discard_buffer (rtems_bdbuf_buffer *bd)
{
rtems_bdbuf_make_empty (bd);
if (bd->waiters == 0)
ffc0fd88: 40 be 00 14 bne+ cr7,ffc0fd9c <rtems_bdbuf_purge_dev+0x184>
{
rtems_bdbuf_remove_from_tree (bd);
ffc0fd8c: 7f e3 fb 78 mr r3,r31
ffc0fd90: 4b ff de 8d bl ffc0dc1c <rtems_bdbuf_remove_from_tree>
rtems_bdbuf_make_free_and_add_to_lru_list (bd);
ffc0fd94: 7f e3 fb 78 mr r3,r31
ffc0fd98: 4b ff e2 3d bl ffc0dfd4 <rtems_bdbuf_make_free_and_add_to_lru_list>
ffc0fd9c: 38 61 00 88 addi r3,r1,136
ffc0fda0: 4b ff da 31 bl ffc0d7d0 <_Chain_Get_unprotected>
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)
ffc0fda4: 7c 7f 1b 79 mr. r31,r3
ffc0fda8: 40 82 ff cc bne+ ffc0fd74 <rtems_bdbuf_purge_dev+0x15c>
wake_buffer_waiters = true;
rtems_bdbuf_discard_buffer (bd);
}
if (wake_buffer_waiters)
ffc0fdac: 2f 9e 00 00 cmpwi cr7,r30,0
ffc0fdb0: 41 be 00 14 beq+ cr7,ffc0fdc4 <rtems_bdbuf_purge_dev+0x1ac>
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
ffc0fdb4: 3c 60 00 00 lis r3,0
ffc0fdb8: 38 63 2a 00 addi r3,r3,10752
ffc0fdbc: 38 63 00 74 addi r3,r3,116
ffc0fdc0: 4b ff dd a1 bl ffc0db60 <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 ();
ffc0fdc4: 4b ff da e9 bl ffc0d8ac <rtems_bdbuf_unlock_cache>
}
ffc0fdc8: 39 61 00 b8 addi r11,r1,184
ffc0fdcc: 48 00 99 68 b ffc19734 <_restgpr_24_x>
ffc0f73c <rtems_bdbuf_read>:
rtems_status_code
rtems_bdbuf_read (rtems_disk_device *dd,
rtems_blkdev_bnum block,
rtems_bdbuf_buffer **bd_ptr)
{
ffc0f73c: 94 21 ff e0 stwu r1,-32(r1)
ffc0f740: 7c 08 02 a6 mflr r0
ffc0f744: bf 61 00 0c stmw r27,12(r1)
ffc0f748: 7c 7f 1b 78 mr r31,r3
ffc0f74c: 7c 9d 23 78 mr r29,r4
ffc0f750: 90 01 00 24 stw r0,36(r1)
ffc0f754: 7c bb 2b 78 mr r27,r5
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_bdbuf_buffer *bd = NULL;
rtems_blkdev_bnum media_block;
rtems_bdbuf_lock_cache ();
ffc0f758: 4b ff e0 f9 bl ffc0d850 <rtems_bdbuf_lock_cache>
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;
ffc0f75c: 3b c0 00 00 li r30,0
rtems_blkdev_bnum block,
rtems_blkdev_bnum *media_block_ptr)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (block < dd->block_count)
ffc0f760: 81 3f 00 28 lwz r9,40(r31)
*/
*media_block_ptr = rtems_bdbuf_media_block (dd, block) + dd->start;
}
else
{
sc = RTEMS_INVALID_ID;
ffc0f764: 3b 80 00 04 li r28,4
rtems_blkdev_bnum block,
rtems_blkdev_bnum *media_block_ptr)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (block < dd->block_count)
ffc0f768: 7f 9d 48 40 cmplw cr7,r29,r9
ffc0f76c: 40 bc 01 b4 bge+ cr7,ffc0f920 <rtems_bdbuf_read+0x1e4> <== 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)
ffc0f770: 80 9f 00 30 lwz r4,48(r31)
ffc0f774: 2f 84 00 00 cmpwi cr7,r4,0
ffc0f778: 41 9c 00 0c blt- cr7,ffc0f784 <rtems_bdbuf_read+0x48> <== NEVER TAKEN
return block << dd->block_to_media_block_shift;
ffc0f77c: 7f a4 20 30 slw r4,r29,r4
ffc0f780: 48 00 00 24 b ffc0f7a4 <rtems_bdbuf_read+0x68>
/*
* 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);
ffc0f784: 80 7f 00 24 lwz r3,36(r31) <== NOT EXECUTED
ffc0f788: 38 a0 00 00 li r5,0 <== NOT EXECUTED
ffc0f78c: 80 df 00 20 lwz r6,32(r31) <== NOT EXECUTED
ffc0f790: 7d 5d 19 d6 mullw r10,r29,r3 <== NOT EXECUTED
ffc0f794: 7d 3d 18 16 mulhwu r9,r29,r3 <== NOT EXECUTED
ffc0f798: 7d 44 53 78 mr r4,r10 <== NOT EXECUTED
ffc0f79c: 7d 23 4b 78 mr r3,r9 <== NOT EXECUTED
ffc0f7a0: 48 00 97 a1 bl ffc18f40 <__udivdi3> <== 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;
ffc0f7a4: 81 3f 00 18 lwz r9,24(r31)
{
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);
ffc0f7a8: 7f e3 fb 78 mr r3,r31
ffc0f7ac: 7c 84 4a 14 add r4,r4,r9
ffc0f7b0: 4b ff ed 95 bl ffc0e544 <rtems_bdbuf_get_buffer_for_access>
ffc0f7b4: 7c 7e 1b 78 mr r30,r3
switch (bd->state)
ffc0f7b8: 80 63 00 20 lwz r3,32(r3)
ffc0f7bc: 2f 83 00 02 cmpwi cr7,r3,2
ffc0f7c0: 41 9e 00 18 beq- cr7,ffc0f7d8 <rtems_bdbuf_read+0x9c>
ffc0f7c4: 2f 83 00 07 cmpwi cr7,r3,7
ffc0f7c8: 41 9e 00 24 beq- cr7,ffc0f7ec <rtems_bdbuf_read+0xb0>
ffc0f7cc: 2f 83 00 01 cmpwi cr7,r3,1
ffc0f7d0: 40 be 00 ac bne+ cr7,ffc0f87c <rtems_bdbuf_read+0x140> <== NEVER TAKEN
ffc0f7d4: 48 00 00 34 b ffc0f808 <rtems_bdbuf_read+0xcc>
{
case RTEMS_BDBUF_STATE_CACHED:
++dd->stats.read_hits;
ffc0f7d8: 81 3f 00 44 lwz r9,68(r31)
ffc0f7dc: 39 29 00 01 addi r9,r9,1
ffc0f7e0: 91 3f 00 44 stw r9,68(r31)
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
ffc0f7e4: 39 20 00 03 li r9,3
ffc0f7e8: 48 00 00 14 b ffc0f7fc <rtems_bdbuf_read+0xc0>
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;
ffc0f7ec: 81 3f 00 44 lwz r9,68(r31)
ffc0f7f0: 39 29 00 01 addi r9,r9,1
ffc0f7f4: 91 3f 00 44 stw r9,68(r31)
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
ffc0f7f8: 39 20 00 04 li r9,4
ffc0f7fc: 91 3e 00 20 stw r9,32(r30)
ffc0f800: 3b 80 00 00 li r28,0
ffc0f804: 48 00 00 84 b ffc0f888 <rtems_bdbuf_read+0x14c>
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;
ffc0f808: 81 3f 00 48 lwz r9,72(r31)
ffc0f80c: 39 29 00 01 addi r9,r9,1
ffc0f810: 91 3f 00 48 stw r9,72(r31)
static void
rtems_bdbuf_set_read_ahead_trigger (rtems_disk_device *dd,
rtems_blkdev_bnum block)
{
if (dd->read_ahead.trigger != block)
ffc0f814: 81 3f 00 6c lwz r9,108(r31)
ffc0f818: 7f 89 e8 00 cmpw cr7,r9,r29
ffc0f81c: 41 9e 00 1c beq- cr7,ffc0f838 <rtems_bdbuf_read+0xfc>
{
rtems_bdbuf_read_ahead_cancel (dd);
ffc0f820: 7f e3 fb 78 mr r3,r31
ffc0f824: 4b ff f9 99 bl ffc0f1bc <rtems_bdbuf_read_ahead_cancel>
dd->read_ahead.trigger = block + 1;
ffc0f828: 39 3d 00 01 addi r9,r29,1
ffc0f82c: 91 3f 00 6c stw r9,108(r31)
dd->read_ahead.next = block + 2;
ffc0f830: 39 3d 00 02 addi r9,r29,2
ffc0f834: 91 3f 00 70 stw r9,112(r31)
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);
ffc0f838: 7f e3 fb 78 mr r3,r31
ffc0f83c: 7f c4 f3 78 mr r4,r30
ffc0f840: 38 a0 00 01 li r5,1
ffc0f844: 4b ff f7 45 bl ffc0ef88 <rtems_bdbuf_execute_read_request>
if (sc == RTEMS_SUCCESSFUL)
ffc0f848: 7c 7c 1b 79 mr. r28,r3
ffc0f84c: 40 a2 00 38 bne+ ffc0f884 <rtems_bdbuf_read+0x148>
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
ffc0f850: 39 20 00 03 li r9,3
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
ffc0f854: 81 5e 00 04 lwz r10,4(r30)
ffc0f858: 91 3e 00 20 stw r9,32(r30)
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
ffc0f85c: 81 3e 00 00 lwz r9,0(r30)
previous = the_node->previous;
next->previous = previous;
previous->next = next;
ffc0f860: 91 2a 00 00 stw r9,0(r10)
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
ffc0f864: 91 49 00 04 stw r10,4(r9)
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 ();
}
ffc0f868: 81 3e 00 28 lwz r9,40(r30)
}
static void
rtems_bdbuf_group_obtain (rtems_bdbuf_buffer *bd)
{
++bd->group->users;
ffc0f86c: 81 49 00 0c lwz r10,12(r9)
ffc0f870: 39 4a 00 01 addi r10,r10,1
ffc0f874: 91 49 00 0c stw r10,12(r9)
ffc0f878: 48 00 00 10 b ffc0f888 <rtems_bdbuf_read+0x14c>
{
bd = NULL;
}
break;
default:
rtems_bdbuf_fatal_with_state (bd->state, RTEMS_BDBUF_FATAL_STATE_4);
ffc0f87c: 38 80 00 10 li r4,16 <== NOT EXECUTED
ffc0f880: 4b ff df e1 bl ffc0d860 <rtems_bdbuf_fatal_with_state><== NOT EXECUTED
rtems_chain_extract_unprotected (&bd->link);
rtems_bdbuf_group_obtain (bd);
}
else
{
bd = NULL;
ffc0f884: 3b c0 00 00 li r30,0
static void
rtems_bdbuf_check_read_ahead_trigger (rtems_disk_device *dd,
rtems_blkdev_bnum block)
{
if (bdbuf_cache.read_ahead_task != 0
ffc0f888: 3d 20 00 00 lis r9,0
ffc0f88c: 80 69 2a 84 lwz r3,10884(r9)
ffc0f890: 2f 83 00 00 cmpwi cr7,r3,0
ffc0f894: 41 9e 00 8c beq- cr7,ffc0f920 <rtems_bdbuf_read+0x1e4>
&& dd->read_ahead.trigger == block
ffc0f898: 81 3f 00 6c lwz r9,108(r31)
ffc0f89c: 7f 89 e8 00 cmpw cr7,r9,r29
ffc0f8a0: 40 be 00 80 bne+ cr7,ffc0f920 <rtems_bdbuf_read+0x1e4>
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_node_off_chain(
const Chain_Node *node
)
{
return (node->next == NULL) && (node->previous == NULL);
ffc0f8a4: 81 5f 00 64 lwz r10,100(r31)
ffc0f8a8: 39 20 00 00 li r9,0
ffc0f8ac: 2f 8a 00 00 cmpwi cr7,r10,0
ffc0f8b0: 40 be 00 10 bne+ cr7,ffc0f8c0 <rtems_bdbuf_read+0x184> <== NEVER TAKEN
ffc0f8b4: 81 3f 00 68 lwz r9,104(r31)
ffc0f8b8: 7d 29 00 34 cntlzw r9,r9
ffc0f8bc: 55 29 d9 7e rlwinm r9,r9,27,5,31
&& !rtems_bdbuf_is_read_ahead_active (dd))
ffc0f8c0: 2f 89 00 00 cmpwi cr7,r9,0
ffc0f8c4: 41 9e 00 5c beq- cr7,ffc0f920 <rtems_bdbuf_read+0x1e4> <== NEVER TAKEN
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
ffc0f8c8: 3d 20 00 00 lis r9,0
ffc0f8cc: 39 29 2a 00 addi r9,r9,10752
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
ffc0f8d0: 39 49 00 8c addi r10,r9,140
{
rtems_status_code sc;
rtems_chain_control *chain = &bdbuf_cache.read_ahead_chain;
if (rtems_chain_is_empty (chain))
ffc0f8d4: 81 29 00 88 lwz r9,136(r9)
ffc0f8d8: 7f 89 50 00 cmpw cr7,r9,r10
ffc0f8dc: 40 be 00 1c bne+ cr7,ffc0f8f8 <rtems_bdbuf_read+0x1bc> <== NEVER TAKEN
{
sc = rtems_event_send (bdbuf_cache.read_ahead_task,
ffc0f8e0: 38 80 00 02 li r4,2
ffc0f8e4: 4b ff 9c 0d bl ffc094f0 <rtems_event_send>
RTEMS_BDBUF_READ_AHEAD_WAKE_UP);
if (sc != RTEMS_SUCCESSFUL)
ffc0f8e8: 2f 83 00 00 cmpwi cr7,r3,0
ffc0f8ec: 41 be 00 0c beq+ cr7,ffc0f8f8 <rtems_bdbuf_read+0x1bc> <== ALWAYS TAKEN
rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_RA_WAKE_UP);
ffc0f8f0: 38 60 00 07 li r3,7 <== NOT EXECUTED
ffc0f8f4: 4b ff df 09 bl ffc0d7fc <rtems_bdbuf_fatal> <== NOT EXECUTED
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
ffc0f8f8: 3d 20 00 00 lis r9,0
ffc0f8fc: 39 29 2a 00 addi r9,r9,10752
ffc0f900: 81 49 00 90 lwz r10,144(r9)
}
rtems_chain_append_unprotected (chain, &dd->read_ahead.node);
ffc0f904: 39 1f 00 64 addi r8,r31,100
the_node->next = tail;
ffc0f908: 38 e9 00 8c addi r7,r9,140
tail->previous = the_node;
ffc0f90c: 91 09 00 90 stw r8,144(r9)
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
the_node->next = tail;
ffc0f910: 90 ff 00 64 stw r7,100(r31)
tail->previous = the_node;
old_last->next = the_node;
the_node->previous = old_last;
ffc0f914: 91 5f 00 68 stw r10,104(r31)
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
the_node->next = tail;
tail->previous = the_node;
old_last->next = the_node;
ffc0f918: 91 0a 00 00 stw r8,0(r10)
ffc0f91c: 48 00 00 04 b ffc0f920 <rtems_bdbuf_read+0x1e4>
}
rtems_bdbuf_check_read_ahead_trigger (dd, block);
}
rtems_bdbuf_unlock_cache ();
ffc0f920: 4b ff df 8d bl ffc0d8ac <rtems_bdbuf_unlock_cache>
*bd_ptr = bd;
return sc;
}
ffc0f924: 39 61 00 20 addi r11,r1,32
rtems_bdbuf_check_read_ahead_trigger (dd, block);
}
rtems_bdbuf_unlock_cache ();
*bd_ptr = bd;
ffc0f928: 93 db 00 00 stw r30,0(r27)
return sc;
}
ffc0f92c: 7f 83 e3 78 mr r3,r28
ffc0f930: 48 00 9e 10 b ffc19740 <_restgpr_27_x>
ffc0f1bc <rtems_bdbuf_read_ahead_cancel>:
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_node_off_chain(
const Chain_Node *node
)
{
return (node->next == NULL) && (node->previous == NULL);
ffc0f1bc: 81 43 00 64 lwz r10,100(r3)
ffc0f1c0: 39 20 00 00 li r9,0
ffc0f1c4: 2f 8a 00 00 cmpwi cr7,r10,0
ffc0f1c8: 40 be 00 10 bne+ cr7,ffc0f1d8 <rtems_bdbuf_read_ahead_cancel+0x1c><== NEVER TAKEN
ffc0f1cc: 81 23 00 68 lwz r9,104(r3)
ffc0f1d0: 7d 29 00 34 cntlzw r9,r9
ffc0f1d4: 55 29 d9 7e rlwinm r9,r9,27,5,31
}
static void
rtems_bdbuf_read_ahead_cancel (rtems_disk_device *dd)
{
if (rtems_bdbuf_is_read_ahead_active (dd))
ffc0f1d8: 2f 89 00 00 cmpwi cr7,r9,0
ffc0f1dc: 7d 28 4b 78 mr r8,r9
ffc0f1e0: 4c be 00 20 bnelr+ cr7
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
ffc0f1e4: 81 23 00 68 lwz r9,104(r3) <== NOT EXECUTED
next->previous = previous;
ffc0f1e8: 91 2a 00 04 stw r9,4(r10) <== NOT EXECUTED
previous->next = next;
ffc0f1ec: 91 49 00 00 stw r10,0(r9) <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Set_off_chain(
Chain_Node *node
)
{
node->next = node->previous = NULL;
ffc0f1f0: 91 03 00 68 stw r8,104(r3) <== NOT EXECUTED
ffc0f1f4: 91 03 00 64 stw r8,100(r3) <== NOT EXECUTED
ffc0f1f8: 4e 80 00 20 blr <== NOT EXECUTED
ffc0f07c <rtems_bdbuf_read_ahead_task>:
return sc;
}
static rtems_task
rtems_bdbuf_read_ahead_task (rtems_task_argument arg)
{
ffc0f07c: 94 21 ff d8 stwu r1,-40(r1)
ffc0f080: 7c 08 02 a6 mflr r0
ffc0f084: bf 01 00 08 stmw r24,8(r1)
rtems_chain_control *chain = &bdbuf_cache.read_ahead_chain;
while (bdbuf_cache.read_ahead_enabled)
ffc0f088: 3f a0 00 00 lis r29,0
ffc0f08c: 3b bd 2a 00 addi r29,r29,10752
return sc;
}
static rtems_task
rtems_bdbuf_read_ahead_task (rtems_task_argument arg)
{
ffc0f090: 90 01 00 2c stw r0,44(r1)
rtems_chain_control *chain = &bdbuf_cache.read_ahead_chain;
ffc0f094: 3b 3d 00 88 addi r25,r29,136
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;
ffc0f098: 3b 80 00 00 li r28,0
rtems_bdbuf_execute_read_request (dd, bd, transfer_count);
}
}
else
{
dd->read_ahead.trigger = RTEMS_DISK_READ_AHEAD_NO_TRIGGER;
ffc0f09c: 3b 60 ff ff li r27,-1
rtems_bdbuf_get_buffer_for_read_ahead (dd, media_block);
if (bd != NULL)
{
uint32_t transfer_count = dd->block_count - block;
uint32_t max_transfer_count = bdbuf_config.max_read_ahead_blocks;
ffc0f0a0: 3f 00 ff c2 lis r24,-62
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)
ffc0f0a4: 48 00 00 f4 b ffc0f198 <rtems_bdbuf_read_ahead_task+0x11c>
{
rtems_chain_node *node;
rtems_bdbuf_wait_for_event (RTEMS_BDBUF_READ_AHEAD_WAKE_UP);
ffc0f0a8: 38 60 00 02 li r3,2
ffc0f0ac: 4b ff e9 b1 bl ffc0da5c <rtems_bdbuf_wait_for_event>
rtems_bdbuf_lock_cache ();
ffc0f0b0: 4b ff e7 a1 bl ffc0d850 <rtems_bdbuf_lock_cache>
while ((node = rtems_chain_get_unprotected (chain)) != NULL)
ffc0f0b4: 48 00 00 d0 b ffc0f184 <rtems_bdbuf_read_ahead_task+0x108>
{
rtems_disk_device *dd = (rtems_disk_device *)
((char *) node - offsetof (rtems_disk_device, read_ahead.node));
rtems_blkdev_bnum block = dd->read_ahead.next;
ffc0f0b8: 83 df 00 0c lwz r30,12(r31)
rtems_blkdev_bnum media_block = 0;
ffc0f0bc: 38 80 00 00 li r4,0
rtems_blkdev_bnum block,
rtems_blkdev_bnum *media_block_ptr)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (block < dd->block_count)
ffc0f0c0: 81 5f ff c4 lwz r10,-60(r31)
*/
*media_block_ptr = rtems_bdbuf_media_block (dd, block) + dd->start;
}
else
{
sc = RTEMS_INVALID_ID;
ffc0f0c4: 39 20 00 04 li r9,4
rtems_blkdev_bnum block,
rtems_blkdev_bnum *media_block_ptr)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (block < dd->block_count)
ffc0f0c8: 7f 9e 50 40 cmplw cr7,r30,r10
ffc0f0cc: 40 bc 00 44 bge+ cr7,ffc0f110 <rtems_bdbuf_read_ahead_task+0x94>
}
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)
ffc0f0d0: 80 9f ff cc lwz r4,-52(r31)
ffc0f0d4: 2f 84 00 00 cmpwi cr7,r4,0
ffc0f0d8: 41 9c 00 0c blt- cr7,ffc0f0e4 <rtems_bdbuf_read_ahead_task+0x68><== NEVER TAKEN
return block << dd->block_to_media_block_shift;
ffc0f0dc: 7f c4 20 30 slw r4,r30,r4
ffc0f0e0: 48 00 00 24 b ffc0f104 <rtems_bdbuf_read_ahead_task+0x88>
/*
* 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);
ffc0f0e4: 80 7f ff c0 lwz r3,-64(r31) <== NOT EXECUTED
ffc0f0e8: 38 a0 00 00 li r5,0 <== NOT EXECUTED
ffc0f0ec: 80 df ff bc lwz r6,-68(r31) <== NOT EXECUTED
ffc0f0f0: 7d 43 f1 d6 mullw r10,r3,r30 <== NOT EXECUTED
ffc0f0f4: 7d 23 f0 16 mulhwu r9,r3,r30 <== NOT EXECUTED
ffc0f0f8: 7d 44 53 78 mr r4,r10 <== NOT EXECUTED
ffc0f0fc: 7d 23 4b 78 mr r3,r9 <== NOT EXECUTED
ffc0f100: 48 00 9e 41 bl ffc18f40 <__udivdi3> <== 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;
ffc0f104: 81 3f ff b4 lwz r9,-76(r31)
ffc0f108: 7c 84 4a 14 add r4,r4,r9
ffc0f10c: 39 20 00 00 li r9,0
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)
ffc0f110: 2f 89 00 00 cmpwi cr7,r9,0
*/
RTEMS_INLINE_ROUTINE void _Chain_Set_off_chain(
Chain_Node *node
)
{
node->next = node->previous = NULL;
ffc0f114: 93 9f 00 04 stw r28,4(r31)
ffc0f118: 93 9f 00 00 stw r28,0(r31)
ffc0f11c: 40 be 00 64 bne+ cr7,ffc0f180 <rtems_bdbuf_read_ahead_task+0x104>
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 *)
ffc0f120: 3b 5f ff 9c addi r26,r31,-100
rtems_chain_set_off_chain (&dd->read_ahead.node);
if (sc == RTEMS_SUCCESSFUL)
{
rtems_bdbuf_buffer *bd =
ffc0f124: 7f 43 d3 78 mr r3,r26
ffc0f128: 4b ff f3 b5 bl ffc0e4dc <rtems_bdbuf_get_buffer_for_read_ahead>
rtems_bdbuf_get_buffer_for_read_ahead (dd, media_block);
if (bd != NULL)
ffc0f12c: 7c 64 1b 79 mr. r4,r3
ffc0f130: 41 82 00 54 beq- ffc0f184 <rtems_bdbuf_read_ahead_task+0x108><== NEVER TAKEN
{
uint32_t transfer_count = dd->block_count - block;
ffc0f134: 80 bf ff c4 lwz r5,-60(r31)
uint32_t max_transfer_count = bdbuf_config.max_read_ahead_blocks;
ffc0f138: 81 38 a3 7c lwz r9,-23684(r24)
rtems_bdbuf_buffer *bd =
rtems_bdbuf_get_buffer_for_read_ahead (dd, media_block);
if (bd != NULL)
{
uint32_t transfer_count = dd->block_count - block;
ffc0f13c: 7c be 28 50 subf r5,r30,r5
uint32_t max_transfer_count = bdbuf_config.max_read_ahead_blocks;
if (transfer_count >= max_transfer_count)
ffc0f140: 7f 85 48 40 cmplw cr7,r5,r9
ffc0f144: 41 9c 00 20 blt- cr7,ffc0f164 <rtems_bdbuf_read_ahead_task+0xe8>
{
transfer_count = max_transfer_count;
dd->read_ahead.trigger = block + transfer_count / 2;
ffc0f148: 55 2a f8 7e rlwinm r10,r9,31,1,31
ffc0f14c: 7d 4a f2 14 add r10,r10,r30
dd->read_ahead.next = block + transfer_count;
ffc0f150: 7f c9 f2 14 add r30,r9,r30
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;
ffc0f154: 91 5f 00 08 stw r10,8(r31)
dd->read_ahead.next = block + transfer_count;
ffc0f158: 7d 25 4b 78 mr r5,r9
ffc0f15c: 93 df 00 0c stw r30,12(r31)
ffc0f160: 48 00 00 08 b ffc0f168 <rtems_bdbuf_read_ahead_task+0xec>
}
else
{
dd->read_ahead.trigger = RTEMS_DISK_READ_AHEAD_NO_TRIGGER;
ffc0f164: 93 7f 00 08 stw r27,8(r31)
}
++dd->stats.read_ahead_transfers;
ffc0f168: 81 3f ff e8 lwz r9,-24(r31)
rtems_bdbuf_execute_read_request (dd, bd, transfer_count);
ffc0f16c: 7f 43 d3 78 mr r3,r26
else
{
dd->read_ahead.trigger = RTEMS_DISK_READ_AHEAD_NO_TRIGGER;
}
++dd->stats.read_ahead_transfers;
ffc0f170: 39 29 00 01 addi r9,r9,1
ffc0f174: 91 3f ff e8 stw r9,-24(r31)
rtems_bdbuf_execute_read_request (dd, bd, transfer_count);
ffc0f178: 4b ff fe 11 bl ffc0ef88 <rtems_bdbuf_execute_read_request>
ffc0f17c: 48 00 00 08 b ffc0f184 <rtems_bdbuf_read_ahead_task+0x108>
}
}
else
{
dd->read_ahead.trigger = RTEMS_DISK_READ_AHEAD_NO_TRIGGER;
ffc0f180: 93 7f 00 08 stw r27,8(r31)
ffc0f184: 7f 23 cb 78 mr r3,r25
ffc0f188: 4b ff e6 49 bl ffc0d7d0 <_Chain_Get_unprotected>
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)
ffc0f18c: 7c 7f 1b 79 mr. r31,r3
ffc0f190: 40 82 ff 28 bne+ ffc0f0b8 <rtems_bdbuf_read_ahead_task+0x3c>
{
dd->read_ahead.trigger = RTEMS_DISK_READ_AHEAD_NO_TRIGGER;
}
}
rtems_bdbuf_unlock_cache ();
ffc0f194: 4b ff e7 19 bl ffc0d8ac <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)
ffc0f198: 89 3d 00 94 lbz r9,148(r29)
ffc0f19c: 2f 89 00 00 cmpwi cr7,r9,0
ffc0f1a0: 40 9e ff 08 bne+ cr7,ffc0f0a8 <rtems_bdbuf_read_ahead_task+0x2c><== ALWAYS TAKEN
rtems_bdbuf_unlock_cache ();
}
rtems_task_delete (RTEMS_SELF);
}
ffc0f1a4: 80 01 00 2c lwz r0,44(r1) <== NOT EXECUTED
}
rtems_bdbuf_unlock_cache ();
}
rtems_task_delete (RTEMS_SELF);
ffc0f1a8: 38 60 00 00 li r3,0 <== NOT EXECUTED
}
ffc0f1ac: bb 01 00 08 lmw r24,8(r1) <== NOT EXECUTED
ffc0f1b0: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED
ffc0f1b4: 38 21 00 28 addi r1,r1,40 <== NOT EXECUTED
}
rtems_bdbuf_unlock_cache ();
}
rtems_task_delete (RTEMS_SELF);
ffc0f1b8: 4b ff ab 64 b ffc09d1c <rtems_task_delete> <== NOT EXECUTED
ffc0f934 <rtems_bdbuf_release>:
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_bdbuf_release (rtems_bdbuf_buffer *bd)
{
ffc0f934: 7c 2b 0b 78 mr r11,r1
ffc0f938: 94 21 ff f0 stwu r1,-16(r1)
ffc0f93c: 7c 08 02 a6 mflr r0
ffc0f940: 48 00 9d c5 bl ffc19704 <_savegpr_31>
}
static rtems_status_code
rtems_bdbuf_check_bd_and_lock_cache (rtems_bdbuf_buffer *bd, const char *kind)
{
if (bd == NULL)
ffc0f944: 7c 7f 1b 79 mr. r31,r3
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_bdbuf_release (rtems_bdbuf_buffer *bd)
{
ffc0f948: 90 01 00 14 stw r0,20(r1)
}
static rtems_status_code
rtems_bdbuf_check_bd_and_lock_cache (rtems_bdbuf_buffer *bd, const char *kind)
{
if (bd == NULL)
ffc0f94c: 41 82 00 b8 beq- ffc0fa04 <rtems_bdbuf_release+0xd0> <== NEVER TAKEN
if (rtems_bdbuf_tracer)
{
printf ("bdbuf:%s: %" PRIu32 "\n", kind, bd->block);
rtems_bdbuf_show_users (kind, bd);
}
rtems_bdbuf_lock_cache();
ffc0f950: 4b ff df 01 bl ffc0d850 <rtems_bdbuf_lock_cache>
sc = rtems_bdbuf_check_bd_and_lock_cache (bd, "release");
if (sc != RTEMS_SUCCESSFUL)
return sc;
switch (bd->state)
ffc0f954: 80 7f 00 20 lwz r3,32(r31)
ffc0f958: 2f 83 00 04 cmpwi cr7,r3,4
ffc0f95c: 41 9e 00 88 beq- cr7,ffc0f9e4 <rtems_bdbuf_release+0xb0>
ffc0f960: 2b 83 00 04 cmplwi cr7,r3,4
ffc0f964: 41 9d 00 10 bgt- cr7,ffc0f974 <rtems_bdbuf_release+0x40>
ffc0f968: 2f 83 00 03 cmpwi cr7,r3,3
ffc0f96c: 40 be 00 84 bne+ cr7,ffc0f9f0 <rtems_bdbuf_release+0xbc><== NEVER TAKEN
ffc0f970: 48 00 00 10 b ffc0f980 <rtems_bdbuf_release+0x4c>
ffc0f974: 2b 83 00 06 cmplwi cr7,r3,6
ffc0f978: 41 9d 00 78 bgt- cr7,ffc0f9f0 <rtems_bdbuf_release+0xbc><== NEVER TAKEN
ffc0f97c: 48 00 00 5c b ffc0f9d8 <rtems_bdbuf_release+0xa4>
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 ();
}
ffc0f980: 81 3f 00 28 lwz r9,40(r31)
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
ffc0f984: 3c 60 00 00 lis r3,0
ffc0f988: 38 63 2a 00 addi r3,r3,10752
}
static void
rtems_bdbuf_group_release (rtems_bdbuf_buffer *bd)
{
--bd->group->users;
ffc0f98c: 81 49 00 0c lwz r10,12(r9)
ffc0f990: 39 4a ff ff addi r10,r10,-1
ffc0f994: 91 49 00 0c stw r10,12(r9)
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
ffc0f998: 39 20 00 02 li r9,2
the_node->next = tail;
ffc0f99c: 39 43 00 44 addi r10,r3,68
ffc0f9a0: 91 3f 00 20 stw r9,32(r31)
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
ffc0f9a4: 81 23 00 48 lwz r9,72(r3)
the_node->next = tail;
ffc0f9a8: 91 5f 00 00 stw r10,0(r31)
tail->previous = the_node;
ffc0f9ac: 93 e3 00 48 stw r31,72(r3)
old_last->next = the_node;
ffc0f9b0: 93 e9 00 00 stw r31,0(r9)
the_node->previous = old_last;
ffc0f9b4: 91 3f 00 04 stw r9,4(r31)
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)
ffc0f9b8: 81 3f 00 24 lwz r9,36(r31)
ffc0f9bc: 2f 89 00 00 cmpwi cr7,r9,0
ffc0f9c0: 41 be 00 0c beq+ cr7,ffc0f9cc <rtems_bdbuf_release+0x98>
rtems_bdbuf_wake (&bdbuf_cache.access_waiters);
ffc0f9c4: 38 63 00 64 addi r3,r3,100
ffc0f9c8: 48 00 00 08 b ffc0f9d0 <rtems_bdbuf_release+0x9c>
else
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
ffc0f9cc: 38 63 00 74 addi r3,r3,116
ffc0f9d0: 4b ff e1 91 bl ffc0db60 <rtems_bdbuf_wake>
ffc0f9d4: 48 00 00 24 b ffc0f9f8 <rtems_bdbuf_release+0xc4>
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);
ffc0f9d8: 7f e3 fb 78 mr r3,r31
ffc0f9dc: 4b ff f8 21 bl ffc0f1fc <rtems_bdbuf_discard_buffer_after_access>
break;
ffc0f9e0: 48 00 00 18 b ffc0f9f8 <rtems_bdbuf_release+0xc4>
case RTEMS_BDBUF_STATE_ACCESS_MODIFIED:
rtems_bdbuf_add_to_modified_list_after_access (bd);
ffc0f9e4: 7f e3 fb 78 mr r3,r31
ffc0f9e8: 4b ff e6 19 bl ffc0e000 <rtems_bdbuf_add_to_modified_list_after_access>
break;
ffc0f9ec: 48 00 00 0c b ffc0f9f8 <rtems_bdbuf_release+0xc4>
default:
rtems_bdbuf_fatal_with_state (bd->state, RTEMS_BDBUF_FATAL_STATE_0);
ffc0f9f0: 38 80 00 0e li r4,14 <== NOT EXECUTED
ffc0f9f4: 4b ff de 6d bl ffc0d860 <rtems_bdbuf_fatal_with_state><== NOT EXECUTED
}
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_usage ();
rtems_bdbuf_unlock_cache ();
ffc0f9f8: 4b ff de b5 bl ffc0d8ac <rtems_bdbuf_unlock_cache>
return RTEMS_SUCCESSFUL;
ffc0f9fc: 38 60 00 00 li r3,0
ffc0fa00: 48 00 00 08 b ffc0fa08 <rtems_bdbuf_release+0xd4>
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;
ffc0fa04: 38 60 00 09 li r3,9 <== NOT EXECUTED
rtems_bdbuf_show_usage ();
rtems_bdbuf_unlock_cache ();
return RTEMS_SUCCESSFUL;
}
ffc0fa08: 39 61 00 10 addi r11,r1,16
ffc0fa0c: 48 00 9d 44 b ffc19750 <_restgpr_31_x>
ffc0fa10 <rtems_bdbuf_release_modified>:
rtems_status_code
rtems_bdbuf_release_modified (rtems_bdbuf_buffer *bd)
{
ffc0fa10: 7c 2b 0b 78 mr r11,r1
ffc0fa14: 94 21 ff f0 stwu r1,-16(r1)
ffc0fa18: 7c 08 02 a6 mflr r0
ffc0fa1c: 48 00 9c e9 bl ffc19704 <_savegpr_31>
}
static rtems_status_code
rtems_bdbuf_check_bd_and_lock_cache (rtems_bdbuf_buffer *bd, const char *kind)
{
if (bd == NULL)
ffc0fa20: 7c 7f 1b 79 mr. r31,r3
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_bdbuf_release_modified (rtems_bdbuf_buffer *bd)
{
ffc0fa24: 90 01 00 14 stw r0,20(r1)
}
static rtems_status_code
rtems_bdbuf_check_bd_and_lock_cache (rtems_bdbuf_buffer *bd, const char *kind)
{
if (bd == NULL)
ffc0fa28: 41 82 00 54 beq- ffc0fa7c <rtems_bdbuf_release_modified+0x6c><== NEVER TAKEN
if (rtems_bdbuf_tracer)
{
printf ("bdbuf:%s: %" PRIu32 "\n", kind, bd->block);
rtems_bdbuf_show_users (kind, bd);
}
rtems_bdbuf_lock_cache();
ffc0fa2c: 4b ff de 25 bl ffc0d850 <rtems_bdbuf_lock_cache>
sc = rtems_bdbuf_check_bd_and_lock_cache (bd, "release modified");
if (sc != RTEMS_SUCCESSFUL)
return sc;
switch (bd->state)
ffc0fa30: 80 7f 00 20 lwz r3,32(r31)
ffc0fa34: 2b 83 00 03 cmplwi cr7,r3,3
ffc0fa38: 41 9c 00 30 blt- cr7,ffc0fa68 <rtems_bdbuf_release_modified+0x58><== NEVER TAKEN
ffc0fa3c: 2b 83 00 05 cmplwi cr7,r3,5
ffc0fa40: 40 9d 00 10 ble- cr7,ffc0fa50 <rtems_bdbuf_release_modified+0x40>
ffc0fa44: 2f 83 00 06 cmpwi cr7,r3,6
ffc0fa48: 40 be 00 20 bne+ cr7,ffc0fa68 <rtems_bdbuf_release_modified+0x58><== NEVER TAKEN
ffc0fa4c: 48 00 00 10 b ffc0fa5c <rtems_bdbuf_release_modified+0x4c>
{
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);
ffc0fa50: 7f e3 fb 78 mr r3,r31
ffc0fa54: 4b ff e5 ad bl ffc0e000 <rtems_bdbuf_add_to_modified_list_after_access>
break;
ffc0fa58: 48 00 00 18 b ffc0fa70 <rtems_bdbuf_release_modified+0x60>
case RTEMS_BDBUF_STATE_ACCESS_PURGED:
rtems_bdbuf_discard_buffer_after_access (bd);
ffc0fa5c: 7f e3 fb 78 mr r3,r31
ffc0fa60: 4b ff f7 9d bl ffc0f1fc <rtems_bdbuf_discard_buffer_after_access>
break;
ffc0fa64: 48 00 00 0c b ffc0fa70 <rtems_bdbuf_release_modified+0x60>
default:
rtems_bdbuf_fatal_with_state (bd->state, RTEMS_BDBUF_FATAL_STATE_6);
ffc0fa68: 38 80 00 12 li r4,18 <== NOT EXECUTED
ffc0fa6c: 4b ff dd f5 bl ffc0d860 <rtems_bdbuf_fatal_with_state><== NOT EXECUTED
}
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_usage ();
rtems_bdbuf_unlock_cache ();
ffc0fa70: 4b ff de 3d bl ffc0d8ac <rtems_bdbuf_unlock_cache>
return RTEMS_SUCCESSFUL;
ffc0fa74: 38 60 00 00 li r3,0
ffc0fa78: 48 00 00 08 b ffc0fa80 <rtems_bdbuf_release_modified+0x70>
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;
ffc0fa7c: 38 60 00 09 li r3,9 <== NOT EXECUTED
rtems_bdbuf_show_usage ();
rtems_bdbuf_unlock_cache ();
return RTEMS_SUCCESSFUL;
}
ffc0fa80: 39 61 00 10 addi r11,r1,16
ffc0fa84: 48 00 9c cc b ffc19750 <_restgpr_31_x>
ffc0dc1c <rtems_bdbuf_remove_from_tree>:
return bdbuf_cache.buffer_waiters.count;
}
static void
rtems_bdbuf_remove_from_tree (rtems_bdbuf_buffer *bd)
{
ffc0dc1c: 94 21 ff 68 stwu r1,-152(r1)
ffc0dc20: 7c 08 02 a6 mflr r0
const rtems_bdbuf_buffer* node)
{
const rtems_disk_device *dd = node->dd;
rtems_blkdev_bnum block = node->block;
rtems_bdbuf_buffer* p = *root;
ffc0dc24: 3d 20 00 00 lis r9,0
return bdbuf_cache.buffer_waiters.count;
}
static void
rtems_bdbuf_remove_from_tree (rtems_bdbuf_buffer *bd)
{
ffc0dc28: 90 01 00 9c stw r0,156(r1)
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));
ffc0dc2c: 38 80 00 00 li r4,0
ffc0dc30: 38 a0 00 80 li r5,128
return bdbuf_cache.buffer_waiters.count;
}
static void
rtems_bdbuf_remove_from_tree (rtems_bdbuf_buffer *bd)
{
ffc0dc34: bf 81 00 88 stmw r28,136(r1)
ffc0dc38: 7c 7e 1b 78 mr r30,r3
*/
static int
rtems_bdbuf_avl_remove(rtems_bdbuf_buffer** root,
const rtems_bdbuf_buffer* node)
{
const rtems_disk_device *dd = node->dd;
ffc0dc3c: 83 a3 00 14 lwz r29,20(r3)
rtems_blkdev_bnum block = node->block;
ffc0dc40: 83 83 00 18 lwz r28,24(r3)
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));
ffc0dc44: 38 61 00 08 addi r3,r1,8
const rtems_bdbuf_buffer* node)
{
const rtems_disk_device *dd = node->dd;
rtems_blkdev_bnum block = node->block;
rtems_bdbuf_buffer* p = *root;
ffc0dc48: 83 e9 2a 3c lwz r31,10812(r9)
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));
ffc0dc4c: 48 00 79 ad bl ffc155f8 <memset>
rtems_bdbuf_buffer* r;
rtems_bdbuf_buffer* s;
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;
ffc0dc50: 39 01 00 08 addi r8,r1,8
*buf_prev++ = p;
if (((uintptr_t) p->dd < (uintptr_t) dd)
|| ((p->dd == dd) && (p->block < block)))
{
p->avl.cache = 1;
ffc0dc54: 39 40 00 01 li r10,1
p = p->avl.right;
}
else if ((p->dd != dd) || (p->block != block))
{
p->avl.cache = -1;
ffc0dc58: 38 c0 ff ff li r6,-1
ffc0dc5c: 48 00 00 4c b ffc0dca8 <rtems_bdbuf_remove_from_tree+0x8c>
while (p != NULL)
{
*buf_prev++ = p;
if (((uintptr_t) p->dd < (uintptr_t) dd)
ffc0dc60: 81 3f 00 14 lwz r9,20(r31)
memset (buf_stack, 0, sizeof(buf_stack));
while (p != NULL)
{
*buf_prev++ = p;
ffc0dc64: 38 e8 00 04 addi r7,r8,4
ffc0dc68: 93 e8 00 00 stw r31,0(r8)
if (((uintptr_t) p->dd < (uintptr_t) dd)
ffc0dc6c: 7f 89 e8 40 cmplw cr7,r9,r29
ffc0dc70: 41 9c 00 18 blt- cr7,ffc0dc88 <rtems_bdbuf_remove_from_tree+0x6c><== NEVER TAKEN
|| ((p->dd == dd) && (p->block < block)))
ffc0dc74: 7f 89 e8 00 cmpw cr7,r9,r29
ffc0dc78: 40 be 00 24 bne+ cr7,ffc0dc9c <rtems_bdbuf_remove_from_tree+0x80><== NEVER TAKEN
ffc0dc7c: 81 3f 00 18 lwz r9,24(r31)
ffc0dc80: 7f 89 e0 40 cmplw cr7,r9,r28
ffc0dc84: 40 9c 00 10 bge- cr7,ffc0dc94 <rtems_bdbuf_remove_from_tree+0x78>
{
p->avl.cache = 1;
ffc0dc88: 99 5f 00 10 stb r10,16(r31)
p = p->avl.right;
ffc0dc8c: 83 ff 00 0c lwz r31,12(r31)
ffc0dc90: 48 00 00 14 b ffc0dca4 <rtems_bdbuf_remove_from_tree+0x88>
}
else if ((p->dd != dd) || (p->block != block))
ffc0dc94: 7f 89 e0 00 cmpw cr7,r9,r28
ffc0dc98: 41 9e 02 e0 beq- cr7,ffc0df78 <rtems_bdbuf_remove_from_tree+0x35c>
{
p->avl.cache = -1;
ffc0dc9c: 98 df 00 10 stb r6,16(r31)
p = p->avl.left;
ffc0dca0: 83 ff 00 08 lwz r31,8(r31)
memset (buf_stack, 0, sizeof(buf_stack));
while (p != NULL)
{
*buf_prev++ = p;
ffc0dca4: 7c e8 3b 78 mr r8,r7
bool modified = false;
memset (buf_stack, 0, sizeof(buf_stack));
while (p != NULL)
ffc0dca8: 2f 9f 00 00 cmpwi cr7,r31,0
ffc0dcac: 40 9e ff b4 bne+ cr7,ffc0dc60 <rtems_bdbuf_remove_from_tree+0x44><== ALWAYS TAKEN
ffc0dcb0: 48 00 02 bc b ffc0df6c <rtems_bdbuf_remove_from_tree+0x350><== NOT EXECUTED
q = p;
buf_prev--;
if (buf_prev > buf_stack)
{
p = *(buf_prev - 1);
ffc0dcb4: 80 c7 ff f8 lwz r6,-8(r7)
{
p = NULL;
}
/* at this moment q - is a node to delete, p is q's parent */
if (q->avl.right == NULL)
ffc0dcb8: 81 3f 00 0c lwz r9,12(r31)
ffc0dcbc: 2f 89 00 00 cmpwi cr7,r9,0
ffc0dcc0: 40 be 00 1c bne+ cr7,ffc0dcdc <rtems_bdbuf_remove_from_tree+0xc0>
{
r = q->avl.left;
ffc0dcc4: 81 3f 00 08 lwz r9,8(r31)
if (r != NULL)
ffc0dcc8: 2f 89 00 00 cmpwi cr7,r9,0
ffc0dccc: 41 9e 00 a0 beq- cr7,ffc0dd6c <rtems_bdbuf_remove_from_tree+0x150>
{
r->avl.bal = 0;
ffc0dcd0: 39 40 00 00 li r10,0
ffc0dcd4: 99 49 00 11 stb r10,17(r9)
ffc0dcd8: 48 00 00 94 b ffc0dd6c <rtems_bdbuf_remove_from_tree+0x150>
{
rtems_bdbuf_buffer **t;
r = q->avl.right;
if (r->avl.left == NULL)
ffc0dcdc: 81 49 00 08 lwz r10,8(r9)
ffc0dce0: 2f 8a 00 00 cmpwi cr7,r10,0
ffc0dce4: 41 9e 00 18 beq- cr7,ffc0dcfc <rtems_bdbuf_remove_from_tree+0xe0>
ffc0dce8: 7d 2a 4b 78 mr r10,r9
ffc0dcec: 7d 25 4b 78 mr r5,r9
ffc0dcf0: 7c e8 3b 78 mr r8,r7
while (s->avl.left != NULL)
{
*buf_prev++ = r = s;
s = r->avl.left;
r->avl.cache = -1;
ffc0dcf4: 38 60 ff ff li r3,-1
ffc0dcf8: 48 00 00 3c b ffc0dd34 <rtems_bdbuf_remove_from_tree+0x118>
r = q->avl.right;
if (r->avl.left == NULL)
{
r->avl.left = q->avl.left;
ffc0dcfc: 81 5f 00 08 lwz r10,8(r31)
r->avl.bal = q->avl.bal;
r->avl.cache = 1;
*buf_prev++ = q = r;
ffc0dd00: 7c e8 3b 78 mr r8,r7
ffc0dd04: 91 27 ff fc stw r9,-4(r7)
r = q->avl.right;
if (r->avl.left == NULL)
{
r->avl.left = q->avl.left;
ffc0dd08: 91 49 00 08 stw r10,8(r9)
r->avl.bal = q->avl.bal;
ffc0dd0c: 89 5f 00 11 lbz r10,17(r31)
ffc0dd10: 99 49 00 11 stb r10,17(r9)
r->avl.cache = 1;
ffc0dd14: 39 40 00 01 li r10,1
ffc0dd18: 99 49 00 10 stb r10,16(r9)
ffc0dd1c: 48 00 00 50 b ffc0dd6c <rtems_bdbuf_remove_from_tree+0x150>
t = buf_prev++;
s = r;
while (s->avl.left != NULL)
{
*buf_prev++ = r = s;
ffc0dd20: 91 48 00 00 stw r10,0(r8)
s = r->avl.left;
ffc0dd24: 7d 45 53 78 mr r5,r10
t = buf_prev++;
s = r;
while (s->avl.left != NULL)
{
*buf_prev++ = r = s;
ffc0dd28: 39 08 00 04 addi r8,r8,4
s = r->avl.left;
r->avl.cache = -1;
ffc0dd2c: 98 6a 00 10 stb r3,16(r10)
s = r;
while (s->avl.left != NULL)
{
*buf_prev++ = r = s;
s = r->avl.left;
ffc0dd30: 7c 8a 23 78 mr r10,r4
else
{
t = buf_prev++;
s = r;
while (s->avl.left != NULL)
ffc0dd34: 80 8a 00 08 lwz r4,8(r10)
ffc0dd38: 2f 84 00 00 cmpwi cr7,r4,0
ffc0dd3c: 40 9e ff e4 bne+ cr7,ffc0dd20 <rtems_bdbuf_remove_from_tree+0x104>
*buf_prev++ = r = s;
s = r->avl.left;
r->avl.cache = -1;
}
s->avl.left = q->avl.left;
ffc0dd40: 80 9f 00 08 lwz r4,8(r31)
r->avl.left = s->avl.right;
s->avl.right = q->avl.right;
s->avl.bal = q->avl.bal;
s->avl.cache = 1;
*t = q = s;
ffc0dd44: 91 47 ff fc stw r10,-4(r7)
*buf_prev++ = r = s;
s = r->avl.left;
r->avl.cache = -1;
}
s->avl.left = q->avl.left;
ffc0dd48: 90 8a 00 08 stw r4,8(r10)
r->avl.left = s->avl.right;
ffc0dd4c: 80 8a 00 0c lwz r4,12(r10)
s->avl.right = q->avl.right;
ffc0dd50: 91 2a 00 0c stw r9,12(r10)
s->avl.bal = q->avl.bal;
ffc0dd54: 89 3f 00 11 lbz r9,17(r31)
s = r->avl.left;
r->avl.cache = -1;
}
s->avl.left = q->avl.left;
r->avl.left = s->avl.right;
ffc0dd58: 90 85 00 08 stw r4,8(r5)
s->avl.right = q->avl.right;
s->avl.bal = q->avl.bal;
ffc0dd5c: 99 2a 00 11 stb r9,17(r10)
s->avl.cache = 1;
ffc0dd60: 39 20 00 01 li r9,1
ffc0dd64: 99 2a 00 10 stb r9,16(r10)
*t = q = s;
ffc0dd68: 7d 49 53 78 mr r9,r10
}
}
if (p != NULL)
ffc0dd6c: 2f 86 00 00 cmpwi cr7,r6,0
ffc0dd70: 41 9e 00 30 beq- cr7,ffc0dda0 <rtems_bdbuf_remove_from_tree+0x184>
{
if (p->avl.cache == -1)
ffc0dd74: 89 46 00 10 lbz r10,16(r6)
ffc0dd78: 2f 8a 00 ff cmpwi cr7,r10,255
ffc0dd7c: 40 be 00 1c bne+ cr7,ffc0dd98 <rtems_bdbuf_remove_from_tree+0x17c>
{
p->avl.left = q;
ffc0dd80: 91 26 00 08 stw r9,8(r6)
modified = true;
while (modified)
{
if (buf_prev > buf_stack)
ffc0dd84: 39 21 00 08 addi r9,r1,8
ffc0dd88: 7f 88 48 40 cmplw cr7,r8,r9
ffc0dd8c: 7d 06 43 78 mr r6,r8
ffc0dd90: 41 bd 00 1c bgt+ cr7,ffc0ddac <rtems_bdbuf_remove_from_tree+0x190>
ffc0dd94: 48 00 01 f8 b ffc0df8c <rtems_bdbuf_remove_from_tree+0x370>
{
p->avl.left = q;
}
else
{
p->avl.right = q;
ffc0dd98: 91 26 00 0c stw r9,12(r6)
ffc0dd9c: 4b ff ff e8 b ffc0dd84 <rtems_bdbuf_remove_from_tree+0x168>
}
}
else
{
*root = q;
ffc0dda0: 3d 40 00 00 lis r10,0
ffc0dda4: 91 2a 2a 3c stw r9,10812(r10)
ffc0dda8: 4b ff ff dc b ffc0dd84 <rtems_bdbuf_remove_from_tree+0x168>
else
{
break;
}
if (p->avl.cache == -1)
ffc0ddac: 39 60 ff ff li r11,-1
{
case -1:
p->avl.bal = 0;
break;
case 0:
p->avl.bal = 1;
ffc0ddb0: 38 a0 00 01 li r5,1
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
if (p2->avl.bal == -1) p1->avl.bal = 1; else p1->avl.bal = 0;
p = p2;
p2->avl.bal = 0;
ffc0ddb4: 39 00 00 00 li r8,0
p2->avl.left = p1;
p->avl.left = p2->avl.right;
p2->avl.right = p;
if (p2->avl.bal == -1) p->avl.bal = 1; else p->avl.bal = 0;
if (p2->avl.bal == +1) p1->avl.bal = -1; else p1->avl.bal = 0;
ffc0ddb8: 38 00 ff ff li r0,-1
default:
break;
}
}
if (buf_prev > buf_stack)
ffc0ddbc: 7d 3f 4b 78 mr r31,r9
while (modified)
{
if (buf_prev > buf_stack)
{
p = *--buf_prev;
ffc0ddc0: 81 26 ff fc lwz r9,-4(r6)
else
{
break;
}
if (p->avl.cache == -1)
ffc0ddc4: 88 89 00 10 lbz r4,16(r9)
ffc0ddc8: 7c 8a 07 74 extsb r10,r4
ffc0ddcc: 2f 8a ff ff cmpwi cr7,r10,-1
ffc0ddd0: 89 49 00 11 lbz r10,17(r9)
{
/* rebalance left branch */
switch (p->avl.bal)
ffc0ddd4: 7d 47 07 75 extsb. r7,r10
else
{
break;
}
if (p->avl.cache == -1)
ffc0ddd8: 40 be 00 98 bne+ cr7,ffc0de70 <rtems_bdbuf_remove_from_tree+0x254>
{
/* rebalance left branch */
switch (p->avl.bal)
ffc0dddc: 41 82 00 18 beq- ffc0ddf4 <rtems_bdbuf_remove_from_tree+0x1d8>
ffc0dde0: 2f 87 00 01 cmpwi cr7,r7,1
ffc0dde4: 41 9e 00 18 beq- cr7,ffc0ddfc <rtems_bdbuf_remove_from_tree+0x1e0>
ffc0dde8: 2f 87 ff ff cmpwi cr7,r7,-1
ffc0ddec: 40 be 01 34 bne+ cr7,ffc0df20 <rtems_bdbuf_remove_from_tree+0x304><== NEVER TAKEN
ffc0ddf0: 48 00 00 98 b ffc0de88 <rtems_bdbuf_remove_from_tree+0x26c>
{
case -1:
p->avl.bal = 0;
break;
case 0:
p->avl.bal = 1;
ffc0ddf4: 98 a9 00 11 stb r5,17(r9)
ffc0ddf8: 48 00 00 2c b ffc0de24 <rtems_bdbuf_remove_from_tree+0x208>
modified = false;
break;
case +1:
p1 = p->avl.right;
ffc0ddfc: 81 49 00 0c lwz r10,12(r9)
if (p1->avl.bal >= 0) /* simple RR-turn */
ffc0de00: 88 ea 00 11 lbz r7,17(r10)
ffc0de04: 7c e3 07 75 extsb. r3,r7
ffc0de08: 80 ea 00 08 lwz r7,8(r10)
ffc0de0c: 41 80 00 20 blt- ffc0de2c <rtems_bdbuf_remove_from_tree+0x210>
{
p->avl.right = p1->avl.left;
ffc0de10: 90 e9 00 0c stw r7,12(r9)
p1->avl.left = p;
ffc0de14: 91 2a 00 08 stw r9,8(r10)
if (p1->avl.bal == 0)
ffc0de18: 40 82 00 a8 bne- ffc0dec0 <rtems_bdbuf_remove_from_tree+0x2a4>
{
p1->avl.bal = -1;
ffc0de1c: 98 8a 00 11 stb r4,17(r10)
ffc0de20: 7d 49 53 78 mr r9,r10
modified = false;
ffc0de24: 39 40 00 00 li r10,0
ffc0de28: 48 00 00 fc b ffc0df24 <rtems_bdbuf_remove_from_tree+0x308>
}
else /* double RL-turn */
{
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
ffc0de2c: 80 67 00 0c lwz r3,12(r7)
p2->avl.right = p1;
ffc0de30: 91 47 00 0c stw r10,12(r7)
}
else /* double RL-turn */
{
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
ffc0de34: 90 6a 00 08 stw r3,8(r10)
p2->avl.right = p1;
p->avl.right = p2->avl.left;
ffc0de38: 80 67 00 08 lwz r3,8(r7)
p2->avl.left = p;
ffc0de3c: 91 27 00 08 stw r9,8(r7)
{
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
p2->avl.right = p1;
p->avl.right = p2->avl.left;
ffc0de40: 90 69 00 0c stw r3,12(r9)
p2->avl.left = p;
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
ffc0de44: 88 67 00 11 lbz r3,17(r7)
ffc0de48: 2f 83 00 01 cmpwi cr7,r3,1
ffc0de4c: 40 be 00 0c bne+ cr7,ffc0de58 <rtems_bdbuf_remove_from_tree+0x23c>
ffc0de50: 98 89 00 11 stb r4,17(r9)
ffc0de54: 48 00 00 08 b ffc0de5c <rtems_bdbuf_remove_from_tree+0x240>
ffc0de58: 99 09 00 11 stb r8,17(r9)
if (p2->avl.bal == -1) p1->avl.bal = 1; else p1->avl.bal = 0;
ffc0de5c: 89 27 00 11 lbz r9,17(r7)
ffc0de60: 2f 89 00 ff cmpwi cr7,r9,255
ffc0de64: 40 be 00 b0 bne+ cr7,ffc0df14 <rtems_bdbuf_remove_from_tree+0x2f8><== ALWAYS TAKEN
ffc0de68: 98 aa 00 11 stb r5,17(r10) <== NOT EXECUTED
ffc0de6c: 48 00 00 ac b ffc0df18 <rtems_bdbuf_remove_from_tree+0x2fc><== NOT EXECUTED
}
}
else
{
/* rebalance right branch */
switch (p->avl.bal)
ffc0de70: 41 82 00 20 beq- ffc0de90 <rtems_bdbuf_remove_from_tree+0x274>
ffc0de74: 2f 87 00 01 cmpwi cr7,r7,1
ffc0de78: 41 9e 00 10 beq- cr7,ffc0de88 <rtems_bdbuf_remove_from_tree+0x26c>
ffc0de7c: 2f 87 ff ff cmpwi cr7,r7,-1
ffc0de80: 40 be 00 a0 bne+ cr7,ffc0df20 <rtems_bdbuf_remove_from_tree+0x304><== NEVER TAKEN
ffc0de84: 48 00 00 14 b ffc0de98 <rtems_bdbuf_remove_from_tree+0x27c>
{
case +1:
p->avl.bal = 0;
ffc0de88: 99 09 00 11 stb r8,17(r9)
ffc0de8c: 48 00 00 94 b ffc0df20 <rtems_bdbuf_remove_from_tree+0x304>
break;
case 0:
p->avl.bal = -1;
ffc0de90: 99 69 00 11 stb r11,17(r9)
ffc0de94: 4b ff ff 90 b ffc0de24 <rtems_bdbuf_remove_from_tree+0x208>
modified = false;
break;
case -1:
p1 = p->avl.left;
ffc0de98: 81 49 00 08 lwz r10,8(r9)
if (p1->avl.bal <= 0) /* simple LL-turn */
ffc0de9c: 88 ea 00 11 lbz r7,17(r10)
ffc0dea0: 7c e4 07 75 extsb. r4,r7
ffc0dea4: 80 ea 00 0c lwz r7,12(r10)
ffc0dea8: 41 a1 00 28 bgt+ ffc0ded0 <rtems_bdbuf_remove_from_tree+0x2b4>
{
p->avl.left = p1->avl.right;
ffc0deac: 90 e9 00 08 stw r7,8(r9)
p1->avl.right = p;
ffc0deb0: 91 2a 00 0c stw r9,12(r10)
if (p1->avl.bal == 0)
ffc0deb4: 40 82 00 0c bne- ffc0dec0 <rtems_bdbuf_remove_from_tree+0x2a4>
{
p1->avl.bal = 1;
ffc0deb8: 98 aa 00 11 stb r5,17(r10)
ffc0debc: 4b ff ff 64 b ffc0de20 <rtems_bdbuf_remove_from_tree+0x204>
modified = false;
}
else
{
p->avl.bal = 0;
ffc0dec0: 99 09 00 11 stb r8,17(r9)
p1->avl.bal = 0;
ffc0dec4: 7d 49 53 78 mr r9,r10
ffc0dec8: 99 0a 00 11 stb r8,17(r10)
ffc0decc: 48 00 00 54 b ffc0df20 <rtems_bdbuf_remove_from_tree+0x304>
}
else /* double LR-turn */
{
p2 = p1->avl.right;
p1->avl.right = p2->avl.left;
ffc0ded0: 80 87 00 08 lwz r4,8(r7)
p2->avl.left = p1;
ffc0ded4: 91 47 00 08 stw r10,8(r7)
}
else /* double LR-turn */
{
p2 = p1->avl.right;
p1->avl.right = p2->avl.left;
ffc0ded8: 90 8a 00 0c stw r4,12(r10)
p2->avl.left = p1;
p->avl.left = p2->avl.right;
ffc0dedc: 80 87 00 0c lwz r4,12(r7)
p2->avl.right = p;
ffc0dee0: 91 27 00 0c stw r9,12(r7)
{
p2 = p1->avl.right;
p1->avl.right = p2->avl.left;
p2->avl.left = p1;
p->avl.left = p2->avl.right;
ffc0dee4: 90 89 00 08 stw r4,8(r9)
p2->avl.right = p;
if (p2->avl.bal == -1) p->avl.bal = 1; else p->avl.bal = 0;
ffc0dee8: 88 87 00 11 lbz r4,17(r7)
ffc0deec: 2f 84 00 ff cmpwi cr7,r4,255
ffc0def0: 40 be 00 0c bne+ cr7,ffc0defc <rtems_bdbuf_remove_from_tree+0x2e0>
ffc0def4: 98 a9 00 11 stb r5,17(r9)
ffc0def8: 48 00 00 08 b ffc0df00 <rtems_bdbuf_remove_from_tree+0x2e4>
ffc0defc: 99 09 00 11 stb r8,17(r9)
if (p2->avl.bal == +1) p1->avl.bal = -1; else p1->avl.bal = 0;
ffc0df00: 89 27 00 11 lbz r9,17(r7)
ffc0df04: 2f 89 00 01 cmpwi cr7,r9,1
ffc0df08: 40 be 00 0c bne+ cr7,ffc0df14 <rtems_bdbuf_remove_from_tree+0x2f8>
ffc0df0c: 98 0a 00 11 stb r0,17(r10)
ffc0df10: 48 00 00 08 b ffc0df18 <rtems_bdbuf_remove_from_tree+0x2fc>
ffc0df14: 99 0a 00 11 stb r8,17(r10)
p = p2;
p2->avl.bal = 0;
ffc0df18: 99 07 00 11 stb r8,17(r7)
ffc0df1c: 7c e9 3b 78 mr r9,r7
}
}
else
{
/* rebalance right branch */
switch (p->avl.bal)
ffc0df20: 39 40 00 01 li r10,1
{
return bdbuf_cache.buffer_waiters.count;
}
static void
rtems_bdbuf_remove_from_tree (rtems_bdbuf_buffer *bd)
ffc0df24: 38 e6 ff fc addi r7,r6,-4
default:
break;
}
}
if (buf_prev > buf_stack)
ffc0df28: 7f 9f 38 40 cmplw cr7,r31,r7
ffc0df2c: 40 9c 00 24 bge- cr7,ffc0df50 <rtems_bdbuf_remove_from_tree+0x334>
{
q = *(buf_prev - 1);
ffc0df30: 80 e6 ff f8 lwz r7,-8(r6)
if (q->avl.cache == -1)
ffc0df34: 88 87 00 10 lbz r4,16(r7)
ffc0df38: 2f 84 00 ff cmpwi cr7,r4,255
ffc0df3c: 40 be 00 0c bne+ cr7,ffc0df48 <rtems_bdbuf_remove_from_tree+0x32c>
{
q->avl.left = p;
ffc0df40: 91 27 00 08 stw r9,8(r7)
ffc0df44: 48 00 00 18 b ffc0df5c <rtems_bdbuf_remove_from_tree+0x340>
}
else
{
q->avl.right = p;
ffc0df48: 91 27 00 0c stw r9,12(r7)
ffc0df4c: 48 00 00 10 b ffc0df5c <rtems_bdbuf_remove_from_tree+0x340>
}
}
else
{
*root = p;
ffc0df50: 3d 40 00 00 lis r10,0
ffc0df54: 91 2a 2a 3c stw r9,10812(r10)
ffc0df58: 48 00 00 34 b ffc0df8c <rtems_bdbuf_remove_from_tree+0x370>
*root = q;
}
modified = true;
while (modified)
ffc0df5c: 2f 8a 00 00 cmpwi cr7,r10,0
ffc0df60: 38 c6 ff fc addi r6,r6,-4
ffc0df64: 40 9e fe 5c bne+ cr7,ffc0ddc0 <rtems_bdbuf_remove_from_tree+0x1a4>
ffc0df68: 48 00 00 24 b ffc0df8c <rtems_bdbuf_remove_from_tree+0x370>
static void
rtems_bdbuf_remove_from_tree (rtems_bdbuf_buffer *bd)
{
if (rtems_bdbuf_avl_remove (&bdbuf_cache.tree, bd) != 0)
rtems_bdbuf_fatal_with_state (bd->state, RTEMS_BDBUF_FATAL_TREE_RM);
ffc0df6c: 80 7e 00 20 lwz r3,32(r30) <== NOT EXECUTED
ffc0df70: 38 80 00 1b li r4,27 <== NOT EXECUTED
ffc0df74: 4b ff f8 ed bl ffc0d860 <rtems_bdbuf_fatal_with_state><== NOT EXECUTED
}
q = p;
buf_prev--;
if (buf_prev > buf_stack)
ffc0df78: 39 21 00 08 addi r9,r1,8
ffc0df7c: 7f 88 48 40 cmplw cr7,r8,r9
{
p = *(buf_prev - 1);
}
else
{
p = NULL;
ffc0df80: 38 c0 00 00 li r6,0
}
q = p;
buf_prev--;
if (buf_prev > buf_stack)
ffc0df84: 40 bd fd 34 ble- cr7,ffc0dcb8 <rtems_bdbuf_remove_from_tree+0x9c>
ffc0df88: 4b ff fd 2c b ffc0dcb4 <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_with_state (bd->state, RTEMS_BDBUF_FATAL_TREE_RM);
}
ffc0df8c: 39 61 00 98 addi r11,r1,152
ffc0df90: 48 00 b7 b4 b ffc19744 <_restgpr_28_x>
ffc0e0ec <rtems_bdbuf_remove_from_tree_and_lru_list>:
rtems_bdbuf_fatal_with_state (bd->state, RTEMS_BDBUF_FATAL_TREE_RM);
}
static void
rtems_bdbuf_remove_from_tree_and_lru_list (rtems_bdbuf_buffer *bd)
{
ffc0e0ec: 7c 2b 0b 78 mr r11,r1
ffc0e0f0: 7c 08 02 a6 mflr r0
ffc0e0f4: 94 21 ff f0 stwu r1,-16(r1)
ffc0e0f8: 90 01 00 14 stw r0,20(r1)
ffc0e0fc: 48 00 b6 09 bl ffc19704 <_savegpr_31>
ffc0e100: 7c 7f 1b 78 mr r31,r3
switch (bd->state)
ffc0e104: 81 23 00 20 lwz r9,32(r3)
ffc0e108: 2f 89 00 00 cmpwi cr7,r9,0
ffc0e10c: 41 9e 00 20 beq- cr7,ffc0e12c <rtems_bdbuf_remove_from_tree_and_lru_list+0x40>
ffc0e110: 2f 89 00 02 cmpwi cr7,r9,2
ffc0e114: 40 be 00 0c bne+ cr7,ffc0e120 <rtems_bdbuf_remove_from_tree_and_lru_list+0x34><== NEVER TAKEN
{
case RTEMS_BDBUF_STATE_FREE:
break;
case RTEMS_BDBUF_STATE_CACHED:
rtems_bdbuf_remove_from_tree (bd);
ffc0e118: 4b ff fb 05 bl ffc0dc1c <rtems_bdbuf_remove_from_tree>
break;
ffc0e11c: 48 00 00 10 b ffc0e12c <rtems_bdbuf_remove_from_tree_and_lru_list+0x40>
default:
rtems_bdbuf_fatal_with_state (bd->state, RTEMS_BDBUF_FATAL_STATE_10);
ffc0e120: 7d 23 4b 78 mr r3,r9 <== NOT EXECUTED
ffc0e124: 38 80 00 16 li r4,22 <== NOT EXECUTED
ffc0e128: 4b ff f7 39 bl ffc0d860 <rtems_bdbuf_fatal_with_state><== NOT EXECUTED
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
ffc0e12c: 81 5f 00 00 lwz r10,0(r31)
}
rtems_chain_extract_unprotected (&bd->link);
}
ffc0e130: 39 61 00 10 addi r11,r1,16
previous = the_node->previous;
ffc0e134: 81 3f 00 04 lwz r9,4(r31)
next->previous = previous;
ffc0e138: 91 2a 00 04 stw r9,4(r10)
previous->next = next;
ffc0e13c: 91 49 00 00 stw r10,0(r9)
ffc0e140: 48 00 b6 10 b ffc19750 <_restgpr_31_x>
ffc0d940 <rtems_bdbuf_restore_preemption>:
static void
rtems_bdbuf_restore_preemption (rtems_mode prev_mode)
{
ffc0d940: 94 21 ff f0 stwu r1,-16(r1)
ffc0d944: 7c 08 02 a6 mflr r0
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_task_mode (prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode);
ffc0d948: 38 80 00 00 li r4,0
return prev_mode;
}
static void
rtems_bdbuf_restore_preemption (rtems_mode prev_mode)
{
ffc0d94c: 7c 25 0b 78 mr r5,r1
ffc0d950: 90 01 00 14 stw r0,20(r1)
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_task_mode (prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode);
ffc0d954: 60 84 ff ff ori r4,r4,65535
return prev_mode;
}
static void
rtems_bdbuf_restore_preemption (rtems_mode prev_mode)
{
ffc0d958: 94 65 00 08 stwu r3,8(r5)
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_task_mode (prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode);
ffc0d95c: 48 00 47 b1 bl ffc1210c <rtems_task_mode>
if (sc != RTEMS_SUCCESSFUL)
ffc0d960: 2f 83 00 00 cmpwi cr7,r3,0
ffc0d964: 41 be 00 0c beq+ cr7,ffc0d970 <rtems_bdbuf_restore_preemption+0x30><== ALWAYS TAKEN
rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_PREEMPT_RST);
ffc0d968: 38 60 00 06 li r3,6 <== NOT EXECUTED
ffc0d96c: 4b ff fe 91 bl ffc0d7fc <rtems_bdbuf_fatal> <== NOT EXECUTED
}
ffc0d970: 80 01 00 14 lwz r0,20(r1)
ffc0d974: 38 21 00 10 addi r1,r1,16
ffc0d978: 7c 08 03 a6 mtlr r0
ffc0d97c: 4e 80 00 20 blr
ffc0fdd0 <rtems_bdbuf_set_block_size>:
/*
* We do not care about the synchronization status since we will purge the
* device later.
*/
if (sync)
ffc0fdd0: 2f 85 00 00 cmpwi cr7,r5,0
rtems_status_code
rtems_bdbuf_set_block_size (rtems_disk_device *dd,
uint32_t block_size,
bool sync)
{
ffc0fdd4: 94 21 ff e8 stwu r1,-24(r1)
ffc0fdd8: 7c 08 02 a6 mflr r0
ffc0fddc: bf a1 00 0c stmw r29,12(r1)
ffc0fde0: 7c 7f 1b 78 mr r31,r3
ffc0fde4: 7c 9e 23 78 mr r30,r4
ffc0fde8: 90 01 00 1c stw r0,28(r1)
/*
* We do not care about the synchronization status since we will purge the
* device later.
*/
if (sync)
ffc0fdec: 41 be 00 08 beq+ cr7,ffc0fdf4 <rtems_bdbuf_set_block_size+0x24>
rtems_bdbuf_syncdev (dd);
ffc0fdf0: 4b ff fd c5 bl ffc0fbb4 <rtems_bdbuf_syncdev>
rtems_bdbuf_lock_cache ();
ffc0fdf4: 4b ff da 5d bl ffc0d850 <rtems_bdbuf_lock_cache>
if (block_size > 0)
ffc0fdf8: 2f 9e 00 00 cmpwi cr7,r30,0
sc = RTEMS_INVALID_NUMBER;
}
}
else
{
sc = RTEMS_INVALID_NUMBER;
ffc0fdfc: 3b a0 00 0a li r29,10
if (sync)
rtems_bdbuf_syncdev (dd);
rtems_bdbuf_lock_cache ();
if (block_size > 0)
ffc0fe00: 41 be 00 b0 beq+ cr7,ffc0feb0 <rtems_bdbuf_set_block_size+0xe0>
rtems_bdbuf_bds_per_group (size_t size)
{
size_t bufs_per_size;
size_t bds_per_size;
if (size > bdbuf_config.buffer_max)
ffc0fe04: 3d 20 ff c2 lis r9,-62
ffc0fe08: 39 29 a3 7c addi r9,r9,-23684
ffc0fe0c: 81 49 00 28 lwz r10,40(r9)
ffc0fe10: 7f 9e 50 40 cmplw cr7,r30,r10
ffc0fe14: 41 9d 00 9c bgt- cr7,ffc0feb0 <rtems_bdbuf_set_block_size+0xe0><== NEVER TAKEN
return 0;
bufs_per_size = ((size - 1) / bdbuf_config.buffer_min) + 1;
ffc0fe18: 81 29 00 24 lwz r9,36(r9)
ffc0fe1c: 39 5e ff ff addi r10,r30,-1
ffc0fe20: 7d 2a 4b 96 divwu r9,r10,r9
ffc0fe24: 39 49 00 01 addi r10,r9,1
for (bds_per_size = 1;
ffc0fe28: 39 20 00 01 li r9,1
ffc0fe2c: 48 00 00 08 b ffc0fe34 <rtems_bdbuf_set_block_size+0x64>
bds_per_size < bufs_per_size;
bds_per_size <<= 1)
ffc0fe30: 55 29 08 3c rlwinm r9,r9,1,0,30
if (size > bdbuf_config.buffer_max)
return 0;
bufs_per_size = ((size - 1) / bdbuf_config.buffer_min) + 1;
for (bds_per_size = 1;
ffc0fe34: 7f 89 50 40 cmplw cr7,r9,r10
ffc0fe38: 41 9c ff f8 blt+ cr7,ffc0fe30 <rtems_bdbuf_set_block_size+0x60>
bds_per_size < bufs_per_size;
bds_per_size <<= 1)
;
return bdbuf_cache.max_bds_per_group / bds_per_size;
ffc0fe3c: 3d 40 00 00 lis r10,0
ffc0fe40: 81 0a 2a 20 lwz r8,10784(r10)
sc = RTEMS_INVALID_NUMBER;
}
}
else
{
sc = RTEMS_INVALID_NUMBER;
ffc0fe44: 3b a0 00 0a li r29,10
for (bds_per_size = 1;
bds_per_size < bufs_per_size;
bds_per_size <<= 1)
;
return bdbuf_cache.max_bds_per_group / bds_per_size;
ffc0fe48: 7d 08 4b 96 divwu r8,r8,r9
if (block_size > 0)
{
size_t bds_per_group = rtems_bdbuf_bds_per_group (block_size);
if (bds_per_group != 0)
ffc0fe4c: 2f 88 00 00 cmpwi cr7,r8,0
ffc0fe50: 41 9e 00 60 beq- cr7,ffc0feb0 <rtems_bdbuf_set_block_size+0xe0><== NEVER TAKEN
{
int block_to_media_block_shift = 0;
uint32_t media_blocks_per_block = block_size / dd->media_block_size;
ffc0fe54: 80 ff 00 20 lwz r7,32(r31)
{
size_t bds_per_group = rtems_bdbuf_bds_per_group (block_size);
if (bds_per_group != 0)
{
int block_to_media_block_shift = 0;
ffc0fe58: 39 20 00 00 li r9,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)
ffc0fe5c: 38 a0 00 01 li r5,1
size_t bds_per_group = rtems_bdbuf_bds_per_group (block_size);
if (bds_per_group != 0)
{
int block_to_media_block_shift = 0;
uint32_t media_blocks_per_block = block_size / dd->media_block_size;
ffc0fe60: 7d 5e 3b 96 divwu r10,r30,r7
uint32_t one = 1;
while ((one << block_to_media_block_shift) < media_blocks_per_block)
ffc0fe64: 48 00 00 08 b ffc0fe6c <rtems_bdbuf_set_block_size+0x9c>
{
++block_to_media_block_shift;
ffc0fe68: 39 29 00 01 addi r9,r9,1
{
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)
ffc0fe6c: 7c a6 48 30 slw r6,r5,r9
ffc0fe70: 7f 86 50 40 cmplw cr7,r6,r10
ffc0fe74: 41 9c ff f4 blt+ cr7,ffc0fe68 <rtems_bdbuf_set_block_size+0x98>
{
++block_to_media_block_shift;
}
if ((dd->media_block_size << block_to_media_block_shift) != block_size)
ffc0fe78: 7c e7 48 30 slw r7,r7,r9
ffc0fe7c: 7f 87 f0 00 cmpw cr7,r7,r30
ffc0fe80: 41 9e 00 08 beq- cr7,ffc0fe88 <rtems_bdbuf_set_block_size+0xb8><== ALWAYS TAKEN
block_to_media_block_shift = -1;
ffc0fe84: 39 20 ff ff li r9,-1 <== NOT EXECUTED
dd->block_size = block_size;
dd->block_count = dd->size / media_blocks_per_block;
ffc0fe88: 80 ff 00 1c lwz r7,28(r31)
dd->media_blocks_per_block = media_blocks_per_block;
dd->block_to_media_block_shift = block_to_media_block_shift;
dd->bds_per_group = bds_per_group;
rtems_bdbuf_purge_dev (dd);
ffc0fe8c: 7f e3 fb 78 mr r3,r31
}
if ((dd->media_block_size << block_to_media_block_shift) != block_size)
block_to_media_block_shift = -1;
dd->block_size = block_size;
ffc0fe90: 93 df 00 24 stw r30,36(r31)
rtems_status_code
rtems_bdbuf_set_block_size (rtems_disk_device *dd,
uint32_t block_size,
bool sync)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
ffc0fe94: 3b a0 00 00 li r29,0
if ((dd->media_block_size << block_to_media_block_shift) != block_size)
block_to_media_block_shift = -1;
dd->block_size = block_size;
dd->block_count = dd->size / media_blocks_per_block;
ffc0fe98: 7c e7 53 96 divwu r7,r7,r10
dd->media_blocks_per_block = media_blocks_per_block;
ffc0fe9c: 91 5f 00 2c stw r10,44(r31)
dd->block_to_media_block_shift = block_to_media_block_shift;
ffc0fea0: 91 3f 00 30 stw r9,48(r31)
dd->bds_per_group = bds_per_group;
ffc0fea4: 91 1f 00 34 stw r8,52(r31)
if ((dd->media_block_size << block_to_media_block_shift) != block_size)
block_to_media_block_shift = -1;
dd->block_size = block_size;
dd->block_count = dd->size / media_blocks_per_block;
ffc0fea8: 90 ff 00 28 stw r7,40(r31)
dd->media_blocks_per_block = media_blocks_per_block;
dd->block_to_media_block_shift = block_to_media_block_shift;
dd->bds_per_group = bds_per_group;
rtems_bdbuf_purge_dev (dd);
ffc0feac: 4b ff fd 6d bl ffc0fc18 <rtems_bdbuf_purge_dev>
else
{
sc = RTEMS_INVALID_NUMBER;
}
rtems_bdbuf_unlock_cache ();
ffc0feb0: 4b ff d9 fd bl ffc0d8ac <rtems_bdbuf_unlock_cache>
return sc;
}
ffc0feb4: 39 61 00 18 addi r11,r1,24
ffc0feb8: 7f a3 eb 78 mr r3,r29
ffc0febc: 48 00 98 8c b ffc19748 <_restgpr_29_x>
ffc0e720 <rtems_bdbuf_swapout_modified_processing>:
rtems_chain_control* chain,
rtems_chain_control* transfer,
bool sync_active,
bool update_timers,
uint32_t timer_delta)
{
ffc0e720: 7c 2b 0b 78 mr r11,r1
ffc0e724: 7c 08 02 a6 mflr r0
ffc0e728: 94 21 ff f0 stwu r1,-16(r1)
ffc0e72c: 7d 80 00 26 mfcr r12
ffc0e730: 90 01 00 14 stw r0,20(r1)
ffc0e734: 48 00 af d1 bl ffc19704 <_savegpr_31>
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
ffc0e738: 81 24 00 00 lwz r9,0(r4)
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
ffc0e73c: 38 84 00 04 addi r4,r4,4
ffc0e740: 91 81 00 08 stw r12,8(r1)
if (!rtems_chain_is_empty (chain))
ffc0e744: 7f 89 20 00 cmpw cr7,r9,r4
ffc0e748: 41 9e 01 30 beq- cr7,ffc0e878 <rtems_bdbuf_swapout_modified_processing+0x158>
node = node->next;
/*
* A sync active with no valid dev means sync all.
*/
if (sync_active && (*dd_ptr == BDBUF_INVALID_DEV))
ffc0e74c: 2f 86 00 00 cmpwi cr7,r6,0
sync_all = true;
else
sync_all = false;
ffc0e750: 39 40 00 00 li r10,0
node = node->next;
/*
* A sync active with no valid dev means sync all.
*/
if (sync_active && (*dd_ptr == BDBUF_INVALID_DEV))
ffc0e754: 41 9e 00 10 beq- cr7,ffc0e764 <rtems_bdbuf_swapout_modified_processing+0x44>
ffc0e758: 81 43 00 00 lwz r10,0(r3)
ffc0e75c: 7d 4a 00 34 cntlzw r10,r10
ffc0e760: 55 4a d9 7e rlwinm r10,r10,27,5,31
}
static bool
rtems_bdbuf_has_buffer_waiters (void)
{
return bdbuf_cache.buffer_waiters.count;
ffc0e764: 3d 60 00 00 lis r11,0
ffc0e768: 81 6b 2a 74 lwz r11,10868(r11)
* 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))
ffc0e76c: 2f 8a 00 00 cmpwi cr7,r10,0
ffc0e770: 2c 06 00 00 cmpwi r6,0
|| rtems_bdbuf_has_buffer_waiters ())
ffc0e774: 2f 0b 00 00 cmpwi cr6,r11,0
bd->hold_timer = 0;
if (bd->hold_timer)
{
if (update_timers)
ffc0e778: 2e 07 00 00 cmpwi cr4,r7,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))
|| rtems_bdbuf_has_buffer_waiters ())
bd->hold_timer = 0;
ffc0e77c: 38 00 00 00 li r0,0
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
ffc0e780: 3b e0 00 09 li r31,9
* 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))
ffc0e784: 40 9e 00 1c bne- cr7,ffc0e7a0 <rtems_bdbuf_swapout_modified_processing+0x80>
ffc0e788: 41 82 00 14 beq- ffc0e79c <rtems_bdbuf_swapout_modified_processing+0x7c>
ffc0e78c: 81 83 00 00 lwz r12,0(r3)
ffc0e790: 81 69 00 14 lwz r11,20(r9)
ffc0e794: 7c 8c 58 00 cmpw cr1,r12,r11
ffc0e798: 41 86 00 08 beq- cr1,ffc0e7a0 <rtems_bdbuf_swapout_modified_processing+0x80>
|| rtems_bdbuf_has_buffer_waiters ())
ffc0e79c: 41 9a 00 08 beq- cr6,ffc0e7a4 <rtems_bdbuf_swapout_modified_processing+0x84>
bd->hold_timer = 0;
ffc0e7a0: 90 09 00 2c stw r0,44(r9)
if (bd->hold_timer)
ffc0e7a4: 81 69 00 2c lwz r11,44(r9)
ffc0e7a8: 2c 8b 00 00 cmpwi cr1,r11,0
ffc0e7ac: 41 86 00 34 beq- cr1,ffc0e7e0 <rtems_bdbuf_swapout_modified_processing+0xc0>
{
if (update_timers)
ffc0e7b0: 41 92 00 1c beq- cr4,ffc0e7cc <rtems_bdbuf_swapout_modified_processing+0xac>
{
if (bd->hold_timer > timer_delta)
ffc0e7b4: 7c 8b 40 40 cmplw cr1,r11,r8
ffc0e7b8: 40 85 00 10 ble- cr1,ffc0e7c8 <rtems_bdbuf_swapout_modified_processing+0xa8>
bd->hold_timer -= timer_delta;
ffc0e7bc: 7d 68 58 50 subf r11,r8,r11
ffc0e7c0: 91 69 00 2c stw r11,44(r9)
ffc0e7c4: 48 00 00 08 b ffc0e7cc <rtems_bdbuf_swapout_modified_processing+0xac>
else
bd->hold_timer = 0;
ffc0e7c8: 90 09 00 2c stw r0,44(r9)
}
if (bd->hold_timer)
ffc0e7cc: 81 69 00 2c lwz r11,44(r9)
ffc0e7d0: 2c 8b 00 00 cmpwi cr1,r11,0
ffc0e7d4: 41 86 00 0c beq- cr1,ffc0e7e0 <rtems_bdbuf_swapout_modified_processing+0xc0>
{
node = node->next;
ffc0e7d8: 81 29 00 00 lwz r9,0(r9)
continue;
ffc0e7dc: 48 00 00 78 b ffc0e854 <rtems_bdbuf_swapout_modified_processing+0x134>
/*
* 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)
ffc0e7e0: 81 63 00 00 lwz r11,0(r3)
ffc0e7e4: 2c 8b 00 00 cmpwi cr1,r11,0
ffc0e7e8: 40 a6 00 0c bne+ cr1,ffc0e7f4 <rtems_bdbuf_swapout_modified_processing+0xd4>
*dd_ptr = bd->dd;
ffc0e7ec: 81 69 00 14 lwz r11,20(r9)
ffc0e7f0: 91 63 00 00 stw r11,0(r3)
if (bd->dd == *dd_ptr)
ffc0e7f4: 81 63 00 00 lwz r11,0(r3)
ffc0e7f8: 81 89 00 14 lwz r12,20(r9)
ffc0e7fc: 7c 8c 58 00 cmpw cr1,r12,r11
ffc0e800: 81 69 00 00 lwz r11,0(r9)
ffc0e804: 40 a6 00 4c bne+ cr1,ffc0e850 <rtems_bdbuf_swapout_modified_processing+0x130><== NEVER TAKEN
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
ffc0e808: 81 89 00 04 lwz r12,4(r9)
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
ffc0e80c: 93 e9 00 20 stw r31,32(r9)
next->previous = previous;
ffc0e810: 91 8b 00 04 stw r12,4(r11)
previous->next = next;
ffc0e814: 91 6c 00 00 stw r11,0(r12)
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_TRANSFER);
rtems_chain_extract_unprotected (node);
tnode = tnode->previous;
ffc0e818: 81 45 00 08 lwz r10,8(r5)
ffc0e81c: 48 00 00 28 b ffc0e844 <rtems_bdbuf_swapout_modified_processing+0x124>
while (node && !rtems_chain_is_head (transfer, tnode))
{
rtems_bdbuf_buffer* tbd = (rtems_bdbuf_buffer*) tnode;
if (bd->block > tbd->block)
ffc0e820: 81 8a 00 18 lwz r12,24(r10)
ffc0e824: 80 e9 00 18 lwz r7,24(r9)
ffc0e828: 7c 87 60 40 cmplw cr1,r7,r12
ffc0e82c: 40 85 00 14 ble- cr1,ffc0e840 <rtems_bdbuf_swapout_modified_processing+0x120>
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
ffc0e830: 81 8a 00 00 lwz r12,0(r10)
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
ffc0e834: 91 49 00 04 stw r10,4(r9)
before_node = after_node->next;
after_node->next = the_node;
ffc0e838: 91 2a 00 00 stw r9,0(r10)
ffc0e83c: 48 00 00 30 b ffc0e86c <rtems_bdbuf_swapout_modified_processing+0x14c>
{
rtems_chain_insert_unprotected (tnode, node);
node = NULL;
}
else
tnode = tnode->previous;
ffc0e840: 81 4a 00 04 lwz r10,4(r10)
rtems_chain_extract_unprotected (node);
tnode = tnode->previous;
while (node && !rtems_chain_is_head (transfer, tnode))
ffc0e844: 7c 8a 28 00 cmpw cr1,r10,r5
ffc0e848: 40 86 ff d8 bne+ cr1,ffc0e820 <rtems_bdbuf_swapout_modified_processing+0x100>
ffc0e84c: 48 00 00 14 b ffc0e860 <rtems_bdbuf_swapout_modified_processing+0x140>
node = next_node;
}
else
{
node = node->next;
ffc0e850: 7d 69 5b 78 mr r9,r11
if (sync_active && (*dd_ptr == BDBUF_INVALID_DEV))
sync_all = true;
else
sync_all = false;
while (!rtems_chain_is_tail (chain, node))
ffc0e854: 7c 89 20 00 cmpw cr1,r9,r4
ffc0e858: 40 86 ff 2c bne+ cr1,ffc0e784 <rtems_bdbuf_swapout_modified_processing+0x64>
ffc0e85c: 48 00 00 1c b ffc0e878 <rtems_bdbuf_swapout_modified_processing+0x158>
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
ffc0e860: 81 85 00 00 lwz r12,0(r5)
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
ffc0e864: 90 a9 00 04 stw r5,4(r9)
before_node = after_node->next;
after_node->next = the_node;
ffc0e868: 91 25 00 00 stw r9,0(r5)
the_node->next = before_node;
ffc0e86c: 91 89 00 00 stw r12,0(r9)
before_node->previous = the_node;
ffc0e870: 91 2c 00 04 stw r9,4(r12)
ffc0e874: 4b ff ff dc b ffc0e850 <rtems_bdbuf_swapout_modified_processing+0x130>
{
node = node->next;
}
}
}
}
ffc0e878: 81 81 00 08 lwz r12,8(r1)
ffc0e87c: 39 61 00 10 addi r11,r1,16
ffc0e880: 7d 80 81 20 mtcrf 8,r12
ffc0e884: 48 00 ae cc b ffc19750 <_restgpr_31_x>
ffc0ebf4 <rtems_bdbuf_swapout_task>:
* not this.
* @return rtems_task Not used.
*/
static rtems_task
rtems_bdbuf_swapout_task (rtems_task_argument arg)
{
ffc0ebf4: 94 21 ff a8 stwu r1,-88(r1)
ffc0ebf8: 7c 08 02 a6 mflr r0
ffc0ebfc: be 81 00 28 stmw r20,40(r1)
rtems_bdbuf_swapout_transfer transfer;
uint32_t period_in_ticks;
const uint32_t period_in_msecs = bdbuf_config.swapout_period;
ffc0ec00: 3f 80 ff c2 lis r28,-62
ffc0ec04: 3b 9c a3 7c addi r28,r28,-23684
* not this.
* @return rtems_task Not used.
*/
static rtems_task
rtems_bdbuf_swapout_task (rtems_task_argument arg)
{
ffc0ec08: 90 01 00 5c stw r0,92(r1)
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
ffc0ec0c: 3f a0 00 00 lis r29,0
ffc0ec10: 3b bd 2a 00 addi r29,r29,10752
rtems_bdbuf_swapout_transfer transfer;
uint32_t period_in_ticks;
const uint32_t period_in_msecs = bdbuf_config.swapout_period;
ffc0ec14: 83 7c 00 0c lwz r27,12(r28)
uint32_t timer_delta;
transfer.write_req = rtems_bdbuf_swapout_writereq_alloc ();
ffc0ec18: 4b ff ee 99 bl ffc0dab0 <rtems_bdbuf_swapout_writereq_alloc>
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
ffc0ec1c: 39 21 00 0c addi r9,r1,12
ffc0ec20: 90 61 00 1c stw r3,28(r1)
transfer.syncing = false;
/*
* Localise the period.
*/
period_in_ticks = RTEMS_MICROSECONDS_TO_TICKS (period_in_msecs * 1000);
ffc0ec24: 1e fb 03 e8 mulli r23,r27,1000
ffc0ec28: 91 21 00 08 stw r9,8(r1)
head->previous = NULL;
ffc0ec2c: 39 20 00 00 li r9,0
ffc0ec30: 91 21 00 0c stw r9,12(r1)
tail->previous = head;
ffc0ec34: 39 41 00 08 addi r10,r1,8
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),
ffc0ec38: 3e a0 ff c1 lis r21,-63
const uint32_t period_in_msecs = bdbuf_config.swapout_period;
uint32_t timer_delta;
transfer.write_req = rtems_bdbuf_swapout_writereq_alloc ();
rtems_chain_initialize_empty (&transfer.bds);
transfer.dd = BDBUF_INVALID_DEV;
ffc0ec3c: 91 21 00 14 stw r9,20(r1)
rtems_status_code sc;
size_t w;
rtems_bdbuf_lock_cache ();
for (w = 0; w < bdbuf_config.swapout_workers; w++)
ffc0ec40: 3b c0 00 00 li r30,0
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
the_node->next = tail;
ffc0ec44: 3b 1d 00 0c addi r24,r29,12
uint32_t timer_delta;
transfer.write_req = rtems_bdbuf_swapout_writereq_alloc ();
rtems_chain_initialize_empty (&transfer.bds);
transfer.dd = BDBUF_INVALID_DEV;
transfer.syncing = false;
ffc0ec48: 99 21 00 18 stb r9,24(r1)
/*
* Localise the period.
*/
period_in_ticks = RTEMS_MICROSECONDS_TO_TICKS (period_in_msecs * 1000);
ffc0ec4c: 3d 20 ff c2 lis r9,-62
worker = malloc (sizeof (rtems_bdbuf_swapout_worker));
if (!worker)
rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_SO_WK_NOMEM);
rtems_chain_append_unprotected (&bdbuf_cache.swapout_workers, &worker->link);
worker->enabled = true;
ffc0ec50: 3a c0 00 01 li r22,1
transfer.syncing = false;
/*
* Localise the period.
*/
period_in_ticks = RTEMS_MICROSECONDS_TO_TICKS (period_in_msecs * 1000);
ffc0ec54: 81 29 a3 40 lwz r9,-23744(r9)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
ffc0ec58: 3b 40 00 00 li r26,0
tail->previous = head;
ffc0ec5c: 91 41 00 10 stw r10,16(r1)
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),
ffc0ec60: 3a b5 ee e8 addi r21,r21,-4376
transfer.syncing = false;
/*
* Localise the period.
*/
period_in_ticks = RTEMS_MICROSECONDS_TO_TICKS (period_in_msecs * 1000);
ffc0ec64: 7e f7 4b 96 divwu r23,r23,r9
rtems_bdbuf_swapout_workers_open (void)
{
rtems_status_code sc;
size_t w;
rtems_bdbuf_lock_cache ();
ffc0ec68: 4b ff eb e9 bl ffc0d850 <rtems_bdbuf_lock_cache>
for (w = 0; w < bdbuf_config.swapout_workers; w++)
ffc0ec6c: 83 3c 00 14 lwz r25,20(r28)
ffc0ec70: 48 00 00 88 b ffc0ecf8 <rtems_bdbuf_swapout_task+0x104>
{
rtems_bdbuf_swapout_worker* worker;
worker = malloc (sizeof (rtems_bdbuf_swapout_worker));
ffc0ec74: 38 60 00 28 li r3,40 <== NOT EXECUTED
ffc0ec78: 4b ff 6c b1 bl ffc05928 <malloc> <== NOT EXECUTED
if (!worker)
ffc0ec7c: 7c 7f 1b 79 mr. r31,r3 <== NOT EXECUTED
ffc0ec80: 40 a2 00 0c bne+ ffc0ec8c <rtems_bdbuf_swapout_task+0x98><== NOT EXECUTED
rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_SO_WK_NOMEM);
ffc0ec84: 38 60 00 0a li r3,10 <== NOT EXECUTED
ffc0ec88: 48 00 00 68 b ffc0ecf0 <rtems_bdbuf_swapout_task+0xfc><== NOT EXECUTED
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
ffc0ec8c: 81 3d 00 10 lwz r9,16(r29) <== NOT EXECUTED
the_node->next = tail;
ffc0ec90: 93 1f 00 00 stw r24,0(r31) <== NOT EXECUTED
tail->previous = the_node;
old_last->next = the_node;
the_node->previous = old_last;
ffc0ec94: 91 3f 00 04 stw r9,4(r31) <== NOT EXECUTED
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
the_node->next = tail;
tail->previous = the_node;
old_last->next = the_node;
ffc0ec98: 93 e9 00 00 stw r31,0(r9) <== NOT EXECUTED
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
the_node->next = tail;
tail->previous = the_node;
ffc0ec9c: 93 fd 00 10 stw r31,16(r29) <== NOT EXECUTED
rtems_chain_append_unprotected (&bdbuf_cache.swapout_workers, &worker->link);
worker->enabled = true;
ffc0eca0: 9a df 00 0c stb r22,12(r31) <== NOT EXECUTED
worker->transfer.write_req = rtems_bdbuf_swapout_writereq_alloc ();
ffc0eca4: 4b ff ee 0d bl ffc0dab0 <rtems_bdbuf_swapout_writereq_alloc><== 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 );
ffc0eca8: 39 3f 00 10 addi r9,r31,16 <== NOT EXECUTED
ffc0ecac: 90 7f 00 24 stw r3,36(r31) <== NOT EXECUTED
ffc0ecb0: 39 5f 00 14 addi r10,r31,20 <== 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)
ffc0ecb4: 38 7e 00 61 addi r3,r30,97 <== NOT EXECUTED
head->next = tail;
ffc0ecb8: 91 5f 00 10 stw r10,16(r31) <== 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),
ffc0ecbc: 64 63 42 44 oris r3,r3,16964 <== NOT EXECUTED
ffc0ecc0: 60 63 6f 00 ori r3,r3,28416 <== NOT EXECUTED
head->previous = NULL;
ffc0ecc4: 93 5f 00 14 stw r26,20(r31) <== NOT EXECUTED
ffc0ecc8: 7e a5 ab 78 mr r5,r21 <== NOT EXECUTED
ffc0eccc: 7f e6 fb 78 mr r6,r31 <== NOT EXECUTED
tail->previous = head;
ffc0ecd0: 91 3f 00 18 stw r9,24(r31) <== NOT EXECUTED
ffc0ecd4: 38 ff 00 08 addi r7,r31,8 <== NOT EXECUTED
rtems_chain_append_unprotected (&bdbuf_cache.swapout_workers, &worker->link);
worker->enabled = true;
worker->transfer.write_req = rtems_bdbuf_swapout_writereq_alloc ();
rtems_chain_initialize_empty (&worker->transfer.bds);
worker->transfer.dd = BDBUF_INVALID_DEV;
ffc0ecd8: 93 5f 00 1c stw r26,28(r31) <== NOT EXECUTED
sc = rtems_bdbuf_create_task (rtems_build_name('B', 'D', 'o', 'a' + w),
ffc0ecdc: 80 9c 00 18 lwz r4,24(r28) <== NOT EXECUTED
ffc0ece0: 4b ff ee c1 bl ffc0dba0 <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)
ffc0ece4: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc0ece8: 41 be 00 0c beq+ cr7,ffc0ecf4 <rtems_bdbuf_swapout_task+0x100><== NOT EXECUTED
rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_SO_WK_CREATE);
ffc0ecec: 38 60 00 0d li r3,13 <== NOT EXECUTED
ffc0ecf0: 4b ff eb 0d bl ffc0d7fc <rtems_bdbuf_fatal> <== NOT EXECUTED
rtems_status_code sc;
size_t w;
rtems_bdbuf_lock_cache ();
for (w = 0; w < bdbuf_config.swapout_workers; w++)
ffc0ecf4: 3b de 00 01 addi r30,r30,1 <== NOT EXECUTED
ffc0ecf8: 7f 9e c8 40 cmplw cr7,r30,r25
ffc0ecfc: 41 9c ff 78 blt+ cr7,ffc0ec74 <rtems_bdbuf_swapout_task+0x80><== NEVER TAKEN
/*
* Create the worker threads.
*/
rtems_bdbuf_swapout_workers_open ();
while (bdbuf_cache.swapout_enabled)
ffc0ed00: 3f c0 00 00 lis r30,0
&worker->id);
if (sc != RTEMS_SUCCESSFUL)
rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_SO_WK_CREATE);
}
rtems_bdbuf_unlock_cache ();
ffc0ed04: 4b ff eb a9 bl ffc0d8ac <rtems_bdbuf_unlock_cache>
/*
* Create the worker threads.
*/
rtems_bdbuf_swapout_workers_open ();
while (bdbuf_cache.swapout_enabled)
ffc0ed08: 3b de 2a 00 addi r30,r30,10752
* 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)
worker = NULL;
ffc0ed0c: 3b 20 00 00 li r25,0
else
{
worker = (rtems_bdbuf_swapout_worker*)
rtems_chain_get_unprotected (&bdbuf_cache.swapout_workers);
ffc0ed10: 3a de 00 08 addi r22,r30,8
ffc0ed14: 7f dd f3 78 mr r29,r30
/*
* 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,
ffc0ed18: 3a be 00 58 addi r21,r30,88
timer_delta);
/*
* Process the cache's modified list.
*/
rtems_bdbuf_swapout_modified_processing (&transfer->dd,
ffc0ed1c: 3a 9e 00 4c addi r20,r30,76
ffc0ed20: 48 00 01 4c b ffc0ee6c <rtems_bdbuf_swapout_task+0x278>
/*
* Create the worker threads.
*/
rtems_bdbuf_swapout_workers_open ();
while (bdbuf_cache.swapout_enabled)
ffc0ed24: 3b 40 00 01 li r26,1
rtems_bdbuf_swapout_transfer* transfer)
{
rtems_bdbuf_swapout_worker* worker;
bool transfered_buffers = false;
rtems_bdbuf_lock_cache ();
ffc0ed28: 4b ff eb 29 bl ffc0d850 <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)
ffc0ed2c: 89 3e 00 30 lbz r9,48(r30)
ffc0ed30: 2f 89 00 00 cmpwi cr7,r9,0
ffc0ed34: 41 9e 00 10 beq- cr7,ffc0ed44 <rtems_bdbuf_swapout_task+0x150>
worker = NULL;
ffc0ed38: 3b 80 00 00 li r28,0
ffc0ed3c: 3b e1 00 08 addi r31,r1,8
ffc0ed40: 48 00 00 18 b ffc0ed58 <rtems_bdbuf_swapout_task+0x164>
ffc0ed44: 7e c3 b3 78 mr r3,r22
ffc0ed48: 4b ff ea 89 bl ffc0d7d0 <_Chain_Get_unprotected>
else
{
worker = (rtems_bdbuf_swapout_worker*)
rtems_chain_get_unprotected (&bdbuf_cache.swapout_workers);
if (worker)
ffc0ed4c: 7c 7c 1b 79 mr. r28,r3
ffc0ed50: 41 a2 ff e8 beq- ffc0ed38 <rtems_bdbuf_swapout_task+0x144><== ALWAYS TAKEN
transfer = &worker->transfer;
ffc0ed54: 3b fc 00 10 addi r31,r28,16 <== 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 );
ffc0ed58: 39 3f 00 04 addi r9,r31,4
head->next = tail;
head->previous = NULL;
ffc0ed5c: 93 3f 00 04 stw r25,4(r31)
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
ffc0ed60: 91 3f 00 00 stw r9,0(r31)
}
rtems_chain_initialize_empty (&transfer->bds);
transfer->dd = BDBUF_INVALID_DEV;
transfer->syncing = bdbuf_cache.sync_active;
ffc0ed64: 89 3e 00 30 lbz r9,48(r30)
head->previous = NULL;
tail->previous = head;
ffc0ed68: 93 ff 00 08 stw r31,8(r31)
/*
* 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)
ffc0ed6c: 2f 89 00 00 cmpwi cr7,r9,0
if (worker)
transfer = &worker->transfer;
}
rtems_chain_initialize_empty (&transfer->bds);
transfer->dd = BDBUF_INVALID_DEV;
ffc0ed70: 93 3f 00 0c stw r25,12(r31)
transfer->syncing = bdbuf_cache.sync_active;
ffc0ed74: 99 3f 00 10 stb r9,16(r31)
/*
* 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)
ffc0ed78: 41 9e 00 0c beq- cr7,ffc0ed84 <rtems_bdbuf_swapout_task+0x190>
transfer->dd = bdbuf_cache.sync_device;
ffc0ed7c: 81 3e 00 38 lwz r9,56(r30)
ffc0ed80: 91 3f 00 0c stw r9,12(r31)
/*
* 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,
ffc0ed84: 3b 1f 00 0c addi r24,r31,12
ffc0ed88: 7f 03 c3 78 mr r3,r24
ffc0ed8c: 7e a4 ab 78 mr r4,r21
ffc0ed90: 7f e5 fb 78 mr r5,r31
ffc0ed94: 38 c0 00 01 li r6,1
ffc0ed98: 38 e0 00 00 li r7,0
ffc0ed9c: 7f 68 db 78 mr r8,r27
ffc0eda0: 4b ff f9 81 bl ffc0e720 <rtems_bdbuf_swapout_modified_processing>
timer_delta);
/*
* Process the cache's modified list.
*/
rtems_bdbuf_swapout_modified_processing (&transfer->dd,
ffc0eda4: 88 dd 00 30 lbz r6,48(r29)
ffc0eda8: 7f 03 c3 78 mr r3,r24
ffc0edac: 7e 84 a3 78 mr r4,r20
ffc0edb0: 7f e5 fb 78 mr r5,r31
ffc0edb4: 7f 47 d3 78 mr r7,r26
ffc0edb8: 7f 68 db 78 mr r8,r27
ffc0edbc: 4b ff f9 65 bl ffc0e720 <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 ();
ffc0edc0: 4b ff ea ed bl ffc0d8ac <rtems_bdbuf_unlock_cache>
/*
* If there are buffers to transfer to the media transfer them.
*/
if (!rtems_chain_is_empty (&transfer->bds))
ffc0edc4: 81 3f 00 00 lwz r9,0(r31)
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
ffc0edc8: 39 5f 00 04 addi r10,r31,4
ffc0edcc: 7f 89 50 00 cmpw cr7,r9,r10
ffc0edd0: 41 9e 00 34 beq- cr7,ffc0ee04 <rtems_bdbuf_swapout_task+0x210>
{
if (worker)
ffc0edd4: 2f 9c 00 00 cmpwi cr7,r28,0
ffc0edd8: 41 9e 00 20 beq- cr7,ffc0edf8 <rtems_bdbuf_swapout_task+0x204><== ALWAYS TAKEN
{
rtems_status_code sc = rtems_event_send (worker->id,
ffc0eddc: 80 7c 00 08 lwz r3,8(r28) <== NOT EXECUTED
ffc0ede0: 38 80 00 04 li r4,4 <== NOT EXECUTED
ffc0ede4: 4b ff a7 0d bl ffc094f0 <rtems_event_send> <== NOT EXECUTED
RTEMS_BDBUF_SWAPOUT_SYNC);
if (sc != RTEMS_SUCCESSFUL)
ffc0ede8: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc0edec: 41 be 00 20 beq+ cr7,ffc0ee0c <rtems_bdbuf_swapout_task+0x218><== NOT EXECUTED
rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_SO_WAKE_2);
ffc0edf0: 38 60 00 0c li r3,12 <== NOT EXECUTED
ffc0edf4: 4b ff fe fc b ffc0ecf0 <rtems_bdbuf_swapout_task+0xfc><== NOT EXECUTED
}
else
{
rtems_bdbuf_swapout_write (transfer);
ffc0edf8: 7f e3 fb 78 mr r3,r31
ffc0edfc: 4b ff fc 69 bl ffc0ea64 <rtems_bdbuf_swapout_write>
ffc0ee00: 48 00 00 0c b ffc0ee0c <rtems_bdbuf_swapout_task+0x218>
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;
ffc0ee04: 3b e0 00 00 li r31,0
ffc0ee08: 48 00 00 08 b ffc0ee10 <rtems_bdbuf_swapout_task+0x21c>
else
{
rtems_bdbuf_swapout_write (transfer);
}
transfered_buffers = true;
ffc0ee0c: 3b e0 00 01 li r31,1
}
if (bdbuf_cache.sync_active && !transfered_buffers)
ffc0ee10: 89 3e 00 30 lbz r9,48(r30)
ffc0ee14: 3b 40 00 00 li r26,0
ffc0ee18: 2f 9f 00 00 cmpwi cr7,r31,0
ffc0ee1c: 2f 09 00 00 cmpwi cr6,r9,0
ffc0ee20: 41 9a 00 34 beq- cr6,ffc0ee54 <rtems_bdbuf_swapout_task+0x260>
ffc0ee24: 40 9e ff 04 bne+ cr7,ffc0ed28 <rtems_bdbuf_swapout_task+0x134>
{
rtems_id sync_requester;
rtems_bdbuf_lock_cache ();
ffc0ee28: 4b ff ea 29 bl ffc0d850 <rtems_bdbuf_lock_cache>
sync_requester = bdbuf_cache.sync_requester;
ffc0ee2c: 83 9d 00 34 lwz r28,52(r29)
bdbuf_cache.sync_active = false;
ffc0ee30: 9b fd 00 30 stb r31,48(r29)
bdbuf_cache.sync_requester = 0;
ffc0ee34: 93 fd 00 34 stw r31,52(r29)
rtems_bdbuf_unlock_cache ();
ffc0ee38: 4b ff ea 75 bl ffc0d8ac <rtems_bdbuf_unlock_cache>
if (sync_requester)
ffc0ee3c: 2f 9c 00 00 cmpwi cr7,r28,0
ffc0ee40: 41 be 00 80 beq+ cr7,ffc0eec0 <rtems_bdbuf_swapout_task+0x2cc><== NEVER TAKEN
ffc0ee44: 7f 83 e3 78 mr r3,r28
ffc0ee48: 3c 80 80 00 lis r4,-32768
ffc0ee4c: 4b ff ad 35 bl ffc09b80 <rtems_event_system_send>
ffc0ee50: 48 00 00 70 b ffc0eec0 <rtems_bdbuf_swapout_task+0x2cc>
/*
* 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,
ffc0ee54: 41 be 00 6c beq+ cr7,ffc0eec0 <rtems_bdbuf_swapout_task+0x2cc>
ffc0ee58: 4b ff fe d0 b ffc0ed28 <rtems_bdbuf_swapout_task+0x134>
sc = rtems_event_receive (RTEMS_BDBUF_SWAPOUT_SYNC,
RTEMS_EVENT_ALL | RTEMS_WAIT,
period_in_ticks,
&out);
if ((sc != RTEMS_SUCCESSFUL) && (sc != RTEMS_TIMEOUT))
ffc0ee5c: 2f 83 00 06 cmpwi cr7,r3,6
ffc0ee60: 41 be 00 0c beq+ cr7,ffc0ee6c <rtems_bdbuf_swapout_task+0x278><== ALWAYS TAKEN
rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_SWAPOUT_RE);
ffc0ee64: 38 60 00 18 li r3,24 <== NOT EXECUTED
ffc0ee68: 4b ff fe 88 b ffc0ecf0 <rtems_bdbuf_swapout_task+0xfc><== NOT EXECUTED
/*
* Create the worker threads.
*/
rtems_bdbuf_swapout_workers_open ();
while (bdbuf_cache.swapout_enabled)
ffc0ee6c: 89 3e 00 04 lbz r9,4(r30)
ffc0ee70: 2f 89 00 00 cmpwi cr7,r9,0
ffc0ee74: 40 9e fe b0 bne+ cr7,ffc0ed24 <rtems_bdbuf_swapout_task+0x130><== ALWAYS TAKEN
static void
rtems_bdbuf_swapout_workers_close (void)
{
rtems_chain_node* node;
rtems_bdbuf_lock_cache ();
ffc0ee78: 4b ff e9 d9 bl ffc0d850 <rtems_bdbuf_lock_cache> <== 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;
ffc0ee7c: 3b a0 00 00 li r29,0 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
ffc0ee80: 83 fe 00 08 lwz r31,8(r30) <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_tail(
const Chain_Control *the_chain
)
{
return &the_chain->Tail.Node;
ffc0ee84: 3b de 00 0c addi r30,r30,12 <== NOT EXECUTED
ffc0ee88: 48 00 00 18 b ffc0eea0 <rtems_bdbuf_swapout_task+0x2ac><== NOT EXECUTED
ffc0ee8c: 9b bf 00 0c stb r29,12(r31) <== NOT EXECUTED
rtems_event_send (worker->id, RTEMS_BDBUF_SWAPOUT_SYNC);
ffc0ee90: 38 80 00 04 li r4,4 <== NOT EXECUTED
ffc0ee94: 80 7f 00 08 lwz r3,8(r31) <== NOT EXECUTED
ffc0ee98: 4b ff a6 59 bl ffc094f0 <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 ();
}
ffc0ee9c: 83 ff 00 00 lwz r31,0(r31) <== 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))
ffc0eea0: 7f 9f f0 00 cmpw cr7,r31,r30 <== NOT EXECUTED
ffc0eea4: 40 9e ff e8 bne+ cr7,ffc0ee8c <rtems_bdbuf_swapout_task+0x298><== NOT EXECUTED
worker->enabled = false;
rtems_event_send (worker->id, RTEMS_BDBUF_SWAPOUT_SYNC);
node = rtems_chain_next (node);
}
rtems_bdbuf_unlock_cache ();
ffc0eea8: 4b ff ea 05 bl ffc0d8ac <rtems_bdbuf_unlock_cache> <== NOT EXECUTED
rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_SWAPOUT_RE);
}
rtems_bdbuf_swapout_workers_close ();
free (transfer.write_req);
ffc0eeac: 80 61 00 1c lwz r3,28(r1) <== NOT EXECUTED
ffc0eeb0: 4b ff 64 e9 bl ffc05398 <free> <== NOT EXECUTED
rtems_task_delete (RTEMS_SELF);
ffc0eeb4: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc0eeb8: 4b ff ae 65 bl ffc09d1c <rtems_task_delete> <== NOT EXECUTED
ffc0eebc: 48 00 00 24 b ffc0eee0 <rtems_bdbuf_swapout_task+0x2ec><== NOT EXECUTED
*/
update_timers = false;
}
while (transfered_buffers);
sc = rtems_event_receive (RTEMS_BDBUF_SWAPOUT_SYNC,
ffc0eec0: 38 60 00 04 li r3,4
ffc0eec4: 38 80 00 00 li r4,0
ffc0eec8: 7e e5 bb 78 mr r5,r23
ffc0eecc: 38 c1 00 20 addi r6,r1,32
ffc0eed0: 4b ff a4 7d bl ffc0934c <rtems_event_receive>
RTEMS_EVENT_ALL | RTEMS_WAIT,
period_in_ticks,
&out);
if ((sc != RTEMS_SUCCESSFUL) && (sc != RTEMS_TIMEOUT))
ffc0eed4: 2c 03 00 00 cmpwi r3,0
ffc0eed8: 40 a2 ff 84 bne- ffc0ee5c <rtems_bdbuf_swapout_task+0x268>
ffc0eedc: 4b ff ff 90 b ffc0ee6c <rtems_bdbuf_swapout_task+0x278>
rtems_bdbuf_swapout_workers_close ();
free (transfer.write_req);
rtems_task_delete (RTEMS_SELF);
}
ffc0eee0: 39 61 00 58 addi r11,r1,88 <== NOT EXECUTED
ffc0eee4: 48 00 a8 40 b ffc19724 <_restgpr_20_x> <== NOT EXECUTED
ffc0eee8 <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)
{
ffc0eee8: 94 21 ff e0 stwu r1,-32(r1) <== NOT EXECUTED
ffc0eeec: 7c 08 02 a6 mflr r0 <== NOT EXECUTED
ffc0eef0: bf 41 00 08 stmw r26,8(r1) <== NOT EXECUTED
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
ffc0eef4: 3f c0 00 00 lis r30,0 <== NOT EXECUTED
ffc0eef8: 3b de 2a 00 addi r30,r30,10752 <== NOT EXECUTED
ffc0eefc: 90 01 00 24 stw r0,36(r1) <== NOT EXECUTED
ffc0ef00: 7c 7f 1b 78 mr r31,r3 <== NOT EXECUTED
while (worker->enabled)
{
rtems_bdbuf_wait_for_event (RTEMS_BDBUF_SWAPOUT_SYNC);
rtems_bdbuf_swapout_write (&worker->transfer);
ffc0ef04: 3b a3 00 10 addi r29,r3,16 <== 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 );
ffc0ef08: 3b 63 00 14 addi r27,r3,20 <== NOT EXECUTED
head->next = tail;
head->previous = NULL;
ffc0ef0c: 3b 80 00 00 li r28,0 <== NOT EXECUTED
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
the_node->next = tail;
ffc0ef10: 3b 5e 00 0c addi r26,r30,12 <== 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)
ffc0ef14: 48 00 00 40 b ffc0ef54 <rtems_bdbuf_swapout_worker_task+0x6c><== NOT EXECUTED
{
rtems_bdbuf_wait_for_event (RTEMS_BDBUF_SWAPOUT_SYNC);
ffc0ef18: 38 60 00 04 li r3,4 <== NOT EXECUTED
ffc0ef1c: 4b ff eb 41 bl ffc0da5c <rtems_bdbuf_wait_for_event> <== NOT EXECUTED
rtems_bdbuf_swapout_write (&worker->transfer);
ffc0ef20: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED
ffc0ef24: 4b ff fb 41 bl ffc0ea64 <rtems_bdbuf_swapout_write> <== NOT EXECUTED
rtems_bdbuf_lock_cache ();
ffc0ef28: 4b ff e9 29 bl ffc0d850 <rtems_bdbuf_lock_cache> <== NOT EXECUTED
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
ffc0ef2c: 81 3e 00 10 lwz r9,16(r30) <== NOT EXECUTED
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
ffc0ef30: 93 7f 00 10 stw r27,16(r31) <== NOT EXECUTED
rtems_chain_initialize_empty (&worker->transfer.bds);
worker->transfer.dd = BDBUF_INVALID_DEV;
ffc0ef34: 93 9f 00 1c stw r28,28(r31) <== NOT EXECUTED
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
the_node->next = tail;
ffc0ef38: 93 5f 00 00 stw r26,0(r31) <== NOT EXECUTED
tail->previous = the_node;
ffc0ef3c: 93 fe 00 10 stw r31,16(r30) <== NOT EXECUTED
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
ffc0ef40: 93 9f 00 14 stw r28,20(r31) <== NOT EXECUTED
tail->previous = head;
ffc0ef44: 93 bf 00 18 stw r29,24(r31) <== NOT EXECUTED
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
the_node->next = tail;
tail->previous = the_node;
old_last->next = the_node;
ffc0ef48: 93 e9 00 00 stw r31,0(r9) <== NOT EXECUTED
the_node->previous = old_last;
ffc0ef4c: 91 3f 00 04 stw r9,4(r31) <== NOT EXECUTED
rtems_chain_append_unprotected (&bdbuf_cache.swapout_workers, &worker->link);
rtems_bdbuf_unlock_cache ();
ffc0ef50: 4b ff e9 5d bl ffc0d8ac <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)
ffc0ef54: 89 3f 00 0c lbz r9,12(r31) <== NOT EXECUTED
ffc0ef58: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED
ffc0ef5c: 40 9e ff bc bne+ cr7,ffc0ef18 <rtems_bdbuf_swapout_worker_task+0x30><== NOT EXECUTED
rtems_chain_append_unprotected (&bdbuf_cache.swapout_workers, &worker->link);
rtems_bdbuf_unlock_cache ();
}
free (worker->transfer.write_req);
ffc0ef60: 80 7f 00 24 lwz r3,36(r31) <== NOT EXECUTED
ffc0ef64: 4b ff 64 35 bl ffc05398 <free> <== NOT EXECUTED
free (worker);
ffc0ef68: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc0ef6c: 4b ff 64 2d bl ffc05398 <free> <== NOT EXECUTED
rtems_task_delete (RTEMS_SELF);
}
ffc0ef70: 80 01 00 24 lwz r0,36(r1) <== NOT EXECUTED
ffc0ef74: bb 41 00 08 lmw r26,8(r1) <== NOT EXECUTED
}
free (worker->transfer.write_req);
free (worker);
rtems_task_delete (RTEMS_SELF);
ffc0ef78: 38 60 00 00 li r3,0 <== NOT EXECUTED
}
ffc0ef7c: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED
ffc0ef80: 38 21 00 20 addi r1,r1,32 <== NOT EXECUTED
}
free (worker->transfer.write_req);
free (worker);
rtems_task_delete (RTEMS_SELF);
ffc0ef84: 4b ff ad 98 b ffc09d1c <rtems_task_delete> <== NOT EXECUTED
ffc0ea64 <rtems_bdbuf_swapout_write>:
*
* @param transfer The transfer transaction.
*/
static void
rtems_bdbuf_swapout_write (rtems_bdbuf_swapout_transfer* transfer)
{
ffc0ea64: 94 21 ff d0 stwu r1,-48(r1)
ffc0ea68: 7c 08 02 a6 mflr r0
ffc0ea6c: 7d 80 00 26 mfcr r12
ffc0ea70: 90 01 00 34 stw r0,52(r1)
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))
ffc0ea74: 81 23 00 00 lwz r9,0(r3)
*
* @param transfer The transfer transaction.
*/
static void
rtems_bdbuf_swapout_write (rtems_bdbuf_swapout_transfer* transfer)
{
ffc0ea78: bf 01 00 10 stmw r24,16(r1)
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
ffc0ea7c: 3b 83 00 04 addi r28,r3,4
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))
ffc0ea80: 7f 89 e0 00 cmpw cr7,r9,r28
*
* @param transfer The transfer transaction.
*/
static void
rtems_bdbuf_swapout_write (rtems_bdbuf_swapout_transfer* transfer)
{
ffc0ea84: 91 81 00 0c stw r12,12(r1)
ffc0ea88: 7c 7f 1b 78 mr r31,r3
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))
ffc0ea8c: 41 9e 01 58 beq- cr7,ffc0ebe4 <rtems_bdbuf_swapout_write+0x180><== 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;
ffc0ea90: 83 c3 00 0c lwz r30,12(r3)
* 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;
ffc0ea94: 39 00 00 0c li r8,12
{
/*
* The last block number used when the driver only supports
* continuous blocks in a single request.
*/
uint32_t last_block = 0;
ffc0ea98: 3b a0 00 00 li r29,0
rtems_disk_device *dd = transfer->dd;
uint32_t media_blocks_per_block = dd->media_blocks_per_block;
bool need_continuous_blocks =
(dd->phys_dev->capabilities & RTEMS_BLKDEV_CAP_MULTISECTOR_CONT) != 0;
ffc0ea9c: 81 3e 00 08 lwz r9,8(r30)
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;
ffc0eaa0: 3b 40 00 00 li r26,0
* continuous blocks in a single request.
*/
uint32_t last_block = 0;
rtems_disk_device *dd = transfer->dd;
uint32_t media_blocks_per_block = dd->media_blocks_per_block;
ffc0eaa4: 83 7e 00 2c lwz r27,44(r30)
if (write)
{
rtems_bdbuf_execute_transfer_request (dd, transfer->write_req, false);
transfer->write_req->status = RTEMS_RESOURCE_IN_USE;
ffc0eaa8: 3b 20 00 0c li r25,12
uint32_t last_block = 0;
rtems_disk_device *dd = transfer->dd;
uint32_t media_blocks_per_block = dd->media_blocks_per_block;
bool need_continuous_blocks =
(dd->phys_dev->capabilities & RTEMS_BLKDEV_CAP_MULTISECTOR_CONT) != 0;
ffc0eaac: 81 49 00 0c lwz r10,12(r9)
* 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) ||
(transfer->write_req->bufnum >= bdbuf_config.max_write_blocks))
ffc0eab0: 3f 00 ff c2 lis r24,-62
* 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;
ffc0eab4: 81 23 00 14 lwz r9,20(r3)
ffc0eab8: 91 09 00 0c stw r8,12(r9)
transfer->write_req->bufnum = 0;
ffc0eabc: 39 00 00 00 li r8,0
ffc0eac0: 91 09 00 10 stw r8,16(r9)
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 &&
ffc0eac4: 55 49 07 fe clrlwi r9,r10,31
ffc0eac8: 2e 09 00 00 cmpwi cr4,r9,0
* 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)
ffc0eacc: 48 00 00 c0 b ffc0eb8c <rtems_bdbuf_swapout_write+0x128>
ffc0ead0: 81 5f 00 14 lwz r10,20(r31)
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 &&
ffc0ead4: 41 92 00 3c beq- cr4,ffc0eb10 <rtems_bdbuf_swapout_write+0xac>
ffc0ead8: 81 0a 00 10 lwz r8,16(r10)
ffc0eadc: 2f 88 00 00 cmpwi cr7,r8,0
ffc0eae0: 41 9e 00 30 beq- cr7,ffc0eb10 <rtems_bdbuf_swapout_write+0xac>
ffc0eae4: 81 03 00 18 lwz r8,24(r3)
bd->block != last_block + media_blocks_per_block)
ffc0eae8: 7c fd da 14 add r7,r29,r27
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 &&
ffc0eaec: 7f 88 38 00 cmpw cr7,r8,r7
ffc0eaf0: 41 9e 00 20 beq- cr7,ffc0eb10 <rtems_bdbuf_swapout_write+0xac>
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
ffc0eaf4: 81 5f 00 00 lwz r10,0(r31)
bd->block != last_block + media_blocks_per_block)
{
rtems_chain_prepend_unprotected (&transfer->bds, &bd->link);
write = true;
ffc0eaf8: 39 20 00 01 li r9,1
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
ffc0eafc: 93 e3 00 04 stw r31,4(r3)
before_node = after_node->next;
after_node->next = the_node;
ffc0eb00: 90 7f 00 00 stw r3,0(r31)
the_node->next = before_node;
before_node->previous = the_node;
ffc0eb04: 90 6a 00 04 stw r3,4(r10)
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
after_node->next = the_node;
the_node->next = before_node;
ffc0eb08: 91 43 00 00 stw r10,0(r3)
ffc0eb0c: 48 00 00 38 b ffc0eb44 <rtems_bdbuf_swapout_write+0xe0>
}
else
{
rtems_blkdev_sg_buffer* buf;
buf = &transfer->write_req->bufs[transfer->write_req->bufnum];
ffc0eb10: 80 ca 00 10 lwz r6,16(r10)
transfer->write_req->bufnum++;
buf->user = bd;
buf->block = bd->block;
ffc0eb14: 83 a3 00 18 lwz r29,24(r3)
write = true;
}
else
{
rtems_blkdev_sg_buffer* buf;
buf = &transfer->write_req->bufs[transfer->write_req->bufnum];
ffc0eb18: 38 c6 00 01 addi r6,r6,1
transfer->write_req->bufnum++;
buf->user = bd;
buf->block = bd->block;
buf->length = dd->block_size;
buf->buffer = bd->buffer;
ffc0eb1c: 81 23 00 1c lwz r9,28(r3)
write = true;
}
else
{
rtems_blkdev_sg_buffer* buf;
buf = &transfer->write_req->bufs[transfer->write_req->bufnum];
ffc0eb20: 54 c7 20 36 rlwinm r7,r6,4,0,27
transfer->write_req->bufnum++;
ffc0eb24: 90 ca 00 10 stw r6,16(r10)
write = true;
}
else
{
rtems_blkdev_sg_buffer* buf;
buf = &transfer->write_req->bufs[transfer->write_req->bufnum];
ffc0eb28: 7c ea 3a 14 add r7,r10,r7
transfer->write_req->bufnum++;
buf->user = bd;
buf->block = bd->block;
buf->length = dd->block_size;
ffc0eb2c: 81 5e 00 24 lwz r10,36(r30)
else
{
rtems_blkdev_sg_buffer* buf;
buf = &transfer->write_req->bufs[transfer->write_req->bufnum];
transfer->write_req->bufnum++;
buf->user = bd;
ffc0eb30: 90 67 00 14 stw r3,20(r7)
buf->block = bd->block;
ffc0eb34: 93 a7 00 08 stw r29,8(r7)
buf->length = dd->block_size;
ffc0eb38: 91 47 00 0c stw r10,12(r7)
buf->buffer = bd->buffer;
ffc0eb3c: 91 27 00 10 stw r9,16(r7)
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;
ffc0eb40: 39 20 00 00 li r9,0
/*
* 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) ||
ffc0eb44: 81 5f 00 00 lwz r10,0(r31)
ffc0eb48: 7f 8a e0 00 cmpw cr7,r10,r28
ffc0eb4c: 41 9e 00 24 beq- cr7,ffc0eb70 <rtems_bdbuf_swapout_write+0x10c>
(transfer->write_req->bufnum >= bdbuf_config.max_write_blocks))
ffc0eb50: 81 5f 00 14 lwz r10,20(r31)
ffc0eb54: 38 f8 a3 7c addi r7,r24,-23684
/*
* 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) ||
ffc0eb58: 81 0a 00 10 lwz r8,16(r10)
ffc0eb5c: 81 47 00 04 lwz r10,4(r7)
ffc0eb60: 7f 88 50 40 cmplw cr7,r8,r10
ffc0eb64: 40 9c 00 0c bge- cr7,ffc0eb70 <rtems_bdbuf_swapout_write+0x10c>
(transfer->write_req->bufnum >= bdbuf_config.max_write_blocks))
write = true;
if (write)
ffc0eb68: 2f 89 00 00 cmpwi cr7,r9,0
ffc0eb6c: 41 be 00 20 beq+ cr7,ffc0eb8c <rtems_bdbuf_swapout_write+0x128>
{
rtems_bdbuf_execute_transfer_request (dd, transfer->write_req, false);
ffc0eb70: 80 9f 00 14 lwz r4,20(r31)
ffc0eb74: 7f c3 f3 78 mr r3,r30
ffc0eb78: 38 a0 00 00 li r5,0
ffc0eb7c: 4b ff fd 1d bl ffc0e898 <rtems_bdbuf_execute_transfer_request>
transfer->write_req->status = RTEMS_RESOURCE_IN_USE;
ffc0eb80: 81 3f 00 14 lwz r9,20(r31)
ffc0eb84: 93 29 00 0c stw r25,12(r9)
transfer->write_req->bufnum = 0;
ffc0eb88: 93 49 00 10 stw r26,16(r9)
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get_unprotected(
rtems_chain_control *the_chain
)
{
return _Chain_Get_unprotected( the_chain );
ffc0eb8c: 7f e3 fb 78 mr r3,r31
ffc0eb90: 4b ff ec 41 bl ffc0d7d0 <_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)
ffc0eb94: 2c 03 00 00 cmpwi r3,0
ffc0eb98: 40 82 ff 38 bne+ ffc0ead0 <rtems_bdbuf_swapout_write+0x6c>
/*
* If sync'ing and the deivce is capability of handling a sync IO control
* call perform the call.
*/
if (transfer->syncing &&
ffc0eb9c: 89 3f 00 10 lbz r9,16(r31)
ffc0eba0: 2f 89 00 00 cmpwi cr7,r9,0
ffc0eba4: 41 9e 00 40 beq- cr7,ffc0ebe4 <rtems_bdbuf_swapout_write+0x180>
(dd->phys_dev->capabilities & RTEMS_BLKDEV_CAP_SYNC))
ffc0eba8: 80 7e 00 08 lwz r3,8(r30)
ffc0ebac: 81 23 00 0c lwz r9,12(r3)
/*
* If sync'ing and the deivce is capability of handling a sync IO control
* call perform the call.
*/
if (transfer->syncing &&
ffc0ebb0: 71 2a 00 02 andi. r10,r9,2
ffc0ebb4: 41 a2 00 30 beq+ ffc0ebe4 <rtems_bdbuf_swapout_write+0x180><== ALWAYS TAKEN
(dd->phys_dev->capabilities & RTEMS_BLKDEV_CAP_SYNC))
{
/* int result = */ dd->ioctl (dd->phys_dev, RTEMS_BLKDEV_REQ_SYNC, NULL);
ffc0ebb8: 81 3e 00 38 lwz r9,56(r30) <== NOT EXECUTED
ffc0ebbc: 38 80 00 02 li r4,2 <== NOT EXECUTED
/* How should the error be handled ? */
}
}
}
ffc0ebc0: 80 01 00 34 lwz r0,52(r1) <== NOT EXECUTED
* call perform the call.
*/
if (transfer->syncing &&
(dd->phys_dev->capabilities & RTEMS_BLKDEV_CAP_SYNC))
{
/* int result = */ dd->ioctl (dd->phys_dev, RTEMS_BLKDEV_REQ_SYNC, NULL);
ffc0ebc4: 38 a0 00 00 li r5,0 <== NOT EXECUTED
/* How should the error be handled ? */
}
}
}
ffc0ebc8: 81 81 00 0c lwz r12,12(r1) <== NOT EXECUTED
* call perform the call.
*/
if (transfer->syncing &&
(dd->phys_dev->capabilities & RTEMS_BLKDEV_CAP_SYNC))
{
/* int result = */ dd->ioctl (dd->phys_dev, RTEMS_BLKDEV_REQ_SYNC, NULL);
ffc0ebcc: 7d 29 03 a6 mtctr r9 <== NOT EXECUTED
/* How should the error be handled ? */
}
}
}
ffc0ebd0: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED
ffc0ebd4: bb 01 00 10 lmw r24,16(r1) <== NOT EXECUTED
ffc0ebd8: 7d 80 81 20 mtcrf 8,r12 <== NOT EXECUTED
ffc0ebdc: 38 21 00 30 addi r1,r1,48 <== NOT EXECUTED
* call perform the call.
*/
if (transfer->syncing &&
(dd->phys_dev->capabilities & RTEMS_BLKDEV_CAP_SYNC))
{
/* int result = */ dd->ioctl (dd->phys_dev, RTEMS_BLKDEV_REQ_SYNC, NULL);
ffc0ebe0: 4e 80 04 20 bctr <== NOT EXECUTED
/* How should the error be handled ? */
}
}
}
ffc0ebe4: 81 81 00 0c lwz r12,12(r1)
ffc0ebe8: 39 61 00 30 addi r11,r1,48
ffc0ebec: 7d 80 81 20 mtcrf 8,r12
ffc0ebf0: 48 00 ab 44 b ffc19734 <_restgpr_24_x>
ffc0dab0 <rtems_bdbuf_swapout_writereq_alloc>:
* 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)));
ffc0dab0: 3d 20 ff c2 lis r9,-62
*
* @return rtems_blkdev_request* The write reference memory.
*/
static rtems_blkdev_request*
rtems_bdbuf_swapout_writereq_alloc (void)
{
ffc0dab4: 7c 08 02 a6 mflr r0
* 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)));
ffc0dab8: 80 69 a3 80 lwz r3,-23680(r9)
*
* @return rtems_blkdev_request* The write reference memory.
*/
static rtems_blkdev_request*
rtems_bdbuf_swapout_writereq_alloc (void)
{
ffc0dabc: 7c 2b 0b 78 mr r11,r1
ffc0dac0: 94 21 ff f0 stwu r1,-16(r1)
* 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)));
ffc0dac4: 54 63 20 36 rlwinm r3,r3,4,0,27
* @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 =
ffc0dac8: 38 63 00 18 addi r3,r3,24
*
* @return rtems_blkdev_request* The write reference memory.
*/
static rtems_blkdev_request*
rtems_bdbuf_swapout_writereq_alloc (void)
{
ffc0dacc: 48 00 bc 39 bl ffc19704 <_savegpr_31>
ffc0dad0: 90 01 00 14 stw r0,20(r1)
* @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 =
ffc0dad4: 4b ff 7e 55 bl ffc05928 <malloc>
malloc (sizeof (rtems_blkdev_request) +
(bdbuf_config.max_write_blocks * sizeof (rtems_blkdev_sg_buffer)));
if (!write_req)
ffc0dad8: 7c 7f 1b 79 mr. r31,r3
ffc0dadc: 40 a2 00 0c bne+ ffc0dae8 <rtems_bdbuf_swapout_writereq_alloc+0x38><== ALWAYS TAKEN
rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_SO_REQ_NOMEM);
ffc0dae0: 38 60 00 09 li r3,9 <== NOT EXECUTED
ffc0dae4: 4b ff fd 19 bl ffc0d7fc <rtems_bdbuf_fatal> <== NOT EXECUTED
write_req->req = RTEMS_BLKDEV_REQ_WRITE;
ffc0dae8: 39 20 00 01 li r9,1
ffc0daec: 91 3f 00 00 stw r9,0(r31)
write_req->done = rtems_bdbuf_transfer_done;
ffc0daf0: 3d 20 ff c1 lis r9,-63
ffc0daf4: 39 29 e8 88 addi r9,r9,-6008
ffc0daf8: 91 3f 00 04 stw r9,4(r31)
write_req->io_task = rtems_task_self ();
ffc0dafc: 48 00 47 b1 bl ffc122ac <rtems_task_self>
return write_req;
}
ffc0db00: 39 61 00 10 addi r11,r1,16
if (!write_req)
rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_SO_REQ_NOMEM);
write_req->req = RTEMS_BLKDEV_REQ_WRITE;
write_req->done = rtems_bdbuf_transfer_done;
write_req->io_task = rtems_task_self ();
ffc0db04: 90 7f 00 14 stw r3,20(r31)
return write_req;
}
ffc0db08: 7f e3 fb 78 mr r3,r31
ffc0db0c: 48 00 bc 44 b ffc19750 <_restgpr_31_x>
ffc0fa88 <rtems_bdbuf_sync>:
rtems_status_code
rtems_bdbuf_sync (rtems_bdbuf_buffer *bd)
{
ffc0fa88: 94 21 ff f0 stwu r1,-16(r1)
ffc0fa8c: 7c 08 02 a6 mflr r0
ffc0fa90: bf c1 00 08 stmw r30,8(r1)
}
static rtems_status_code
rtems_bdbuf_check_bd_and_lock_cache (rtems_bdbuf_buffer *bd, const char *kind)
{
if (bd == NULL)
ffc0fa94: 7c 7f 1b 79 mr. r31,r3
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_bdbuf_sync (rtems_bdbuf_buffer *bd)
{
ffc0fa98: 90 01 00 14 stw r0,20(r1)
}
static rtems_status_code
rtems_bdbuf_check_bd_and_lock_cache (rtems_bdbuf_buffer *bd, const char *kind)
{
if (bd == NULL)
ffc0fa9c: 41 82 01 0c beq- ffc0fba8 <rtems_bdbuf_sync+0x120> <== NEVER TAKEN
if (rtems_bdbuf_tracer)
{
printf ("bdbuf:%s: %" PRIu32 "\n", kind, bd->block);
rtems_bdbuf_show_users (kind, bd);
}
rtems_bdbuf_lock_cache();
ffc0faa0: 4b ff dd b1 bl ffc0d850 <rtems_bdbuf_lock_cache>
sc = rtems_bdbuf_check_bd_and_lock_cache (bd, "sync");
if (sc != RTEMS_SUCCESSFUL)
return sc;
switch (bd->state)
ffc0faa4: 80 7f 00 20 lwz r3,32(r31)
ffc0faa8: 2b 83 00 03 cmplwi cr7,r3,3
ffc0faac: 41 9c 00 e8 blt- cr7,ffc0fb94 <rtems_bdbuf_sync+0x10c> <== NEVER TAKEN
ffc0fab0: 2b 83 00 05 cmplwi cr7,r3,5
ffc0fab4: 40 9d 00 10 ble- cr7,ffc0fac4 <rtems_bdbuf_sync+0x3c>
ffc0fab8: 2f 83 00 06 cmpwi cr7,r3,6
ffc0fabc: 40 be 00 d8 bne+ cr7,ffc0fb94 <rtems_bdbuf_sync+0x10c> <== NEVER TAKEN
ffc0fac0: 48 00 00 c8 b ffc0fb88 <rtems_bdbuf_sync+0x100>
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
ffc0fac4: 3c 60 00 00 lis r3,0
ffc0fac8: 38 63 2a 00 addi r3,r3,10752
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
ffc0facc: 39 20 00 08 li r9,8
ffc0fad0: 91 3f 00 20 stw r9,32(r31)
the_node->next = tail;
ffc0fad4: 39 43 00 5c addi r10,r3,92
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
ffc0fad8: 81 23 00 60 lwz r9,96(r3)
the_node->next = tail;
ffc0fadc: 91 5f 00 00 stw r10,0(r31)
tail->previous = the_node;
ffc0fae0: 93 e3 00 60 stw r31,96(r3)
old_last->next = the_node;
ffc0fae4: 93 e9 00 00 stw r31,0(r9)
the_node->previous = old_last;
ffc0fae8: 91 3f 00 04 stw r9,4(r31)
{
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_SYNC);
rtems_chain_append_unprotected (&bdbuf_cache.sync, &bd->link);
if (bd->waiters)
ffc0faec: 81 3f 00 24 lwz r9,36(r31)
ffc0faf0: 2f 89 00 00 cmpwi cr7,r9,0
ffc0faf4: 41 be 00 0c beq+ cr7,ffc0fb00 <rtems_bdbuf_sync+0x78>
rtems_bdbuf_wake (&bdbuf_cache.access_waiters);
ffc0faf8: 38 63 00 64 addi r3,r3,100
ffc0fafc: 4b ff e0 65 bl ffc0db60 <rtems_bdbuf_wake>
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);
ffc0fb00: 3f c0 00 00 lis r30,0
rtems_chain_append_unprotected (&bdbuf_cache.sync, &bd->link);
if (bd->waiters)
rtems_bdbuf_wake (&bdbuf_cache.access_waiters);
rtems_bdbuf_wake_swapper ();
ffc0fb04: 4b ff dd b9 bl ffc0d8bc <rtems_bdbuf_wake_swapper>
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);
ffc0fb08: 3b de 2a 00 addi r30,r30,10752
ffc0fb0c: 3b de 00 6c addi r30,r30,108
static void
rtems_bdbuf_wait_for_sync_done (rtems_bdbuf_buffer *bd)
{
while (true)
{
switch (bd->state)
ffc0fb10: 80 7f 00 20 lwz r3,32(r31)
ffc0fb14: 2b 83 00 01 cmplwi cr7,r3,1
ffc0fb18: 41 9c 00 24 blt- cr7,ffc0fb3c <rtems_bdbuf_sync+0xb4> <== NEVER TAKEN
ffc0fb1c: 2b 83 00 07 cmplwi cr7,r3,7
ffc0fb20: 40 9d 00 24 ble- cr7,ffc0fb44 <rtems_bdbuf_sync+0xbc>
ffc0fb24: 2b 83 00 0a cmplwi cr7,r3,10
ffc0fb28: 41 9d 00 14 bgt- cr7,ffc0fb3c <rtems_bdbuf_sync+0xb4> <== 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);
ffc0fb2c: 7f e3 fb 78 mr r3,r31
ffc0fb30: 7f c4 f3 78 mr r4,r30
ffc0fb34: 4b ff de c9 bl ffc0d9fc <rtems_bdbuf_wait>
ffc0fb38: 4b ff ff d8 b ffc0fb10 <rtems_bdbuf_sync+0x88>
break;
default:
rtems_bdbuf_fatal_with_state (bd->state, RTEMS_BDBUF_FATAL_STATE_9);
ffc0fb3c: 38 80 00 15 li r4,21 <== NOT EXECUTED
ffc0fb40: 48 00 00 58 b ffc0fb98 <rtems_bdbuf_sync+0x110> <== 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
ffc0fb44: 81 3f 00 24 lwz r9,36(r31)
ffc0fb48: 2f 89 00 00 cmpwi cr7,r9,0
ffc0fb4c: 40 9e 00 50 bne- cr7,ffc0fb9c <rtems_bdbuf_sync+0x114>
&& (bd->state == RTEMS_BDBUF_STATE_CACHED
|| bd->state == RTEMS_BDBUF_STATE_EMPTY))
ffc0fb50: 39 23 ff ff addi r9,r3,-1
/*
* We may have created a cached or empty buffer which may be recycled.
*/
if (bd->waiters == 0
&& (bd->state == RTEMS_BDBUF_STATE_CACHED
ffc0fb54: 2b 89 00 01 cmplwi cr7,r9,1
ffc0fb58: 41 bd 00 44 bgt+ cr7,ffc0fb9c <rtems_bdbuf_sync+0x114> <== NEVER TAKEN
|| bd->state == RTEMS_BDBUF_STATE_EMPTY))
{
if (bd->state == RTEMS_BDBUF_STATE_EMPTY)
ffc0fb5c: 2f 83 00 01 cmpwi cr7,r3,1
ffc0fb60: 40 be 00 14 bne+ cr7,ffc0fb74 <rtems_bdbuf_sync+0xec>
{
rtems_bdbuf_remove_from_tree (bd);
ffc0fb64: 7f e3 fb 78 mr r3,r31
ffc0fb68: 4b ff e0 b5 bl ffc0dc1c <rtems_bdbuf_remove_from_tree>
rtems_bdbuf_make_free_and_add_to_lru_list (bd);
ffc0fb6c: 7f e3 fb 78 mr r3,r31
ffc0fb70: 4b ff e4 65 bl ffc0dfd4 <rtems_bdbuf_make_free_and_add_to_lru_list>
}
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
ffc0fb74: 3c 60 00 00 lis r3,0
ffc0fb78: 38 63 2a 00 addi r3,r3,10752
ffc0fb7c: 38 63 00 74 addi r3,r3,116
ffc0fb80: 4b ff df e1 bl ffc0db60 <rtems_bdbuf_wake>
ffc0fb84: 48 00 00 18 b ffc0fb9c <rtems_bdbuf_sync+0x114>
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);
ffc0fb88: 7f e3 fb 78 mr r3,r31
ffc0fb8c: 4b ff f6 71 bl ffc0f1fc <rtems_bdbuf_discard_buffer_after_access>
break;
ffc0fb90: 48 00 00 0c b ffc0fb9c <rtems_bdbuf_sync+0x114>
default:
rtems_bdbuf_fatal_with_state (bd->state, RTEMS_BDBUF_FATAL_STATE_5);
ffc0fb94: 38 80 00 11 li r4,17 <== NOT EXECUTED
ffc0fb98: 4b ff dc c9 bl ffc0d860 <rtems_bdbuf_fatal_with_state><== NOT EXECUTED
}
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_usage ();
rtems_bdbuf_unlock_cache ();
ffc0fb9c: 4b ff dd 11 bl ffc0d8ac <rtems_bdbuf_unlock_cache>
return RTEMS_SUCCESSFUL;
ffc0fba0: 38 60 00 00 li r3,0
ffc0fba4: 48 00 00 08 b ffc0fbac <rtems_bdbuf_sync+0x124>
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;
ffc0fba8: 38 60 00 09 li r3,9 <== NOT EXECUTED
rtems_bdbuf_show_usage ();
rtems_bdbuf_unlock_cache ();
return RTEMS_SUCCESSFUL;
}
ffc0fbac: 39 61 00 10 addi r11,r1,16
ffc0fbb0: 48 00 9b 9c b ffc1974c <_restgpr_30_x>
ffc0d878 <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)
{
ffc0d878: 7c 2b 0b 78 mr r11,r1
ffc0d87c: 7c 08 02 a6 mflr r0
ffc0d880: 94 21 ff f0 stwu r1,-16(r1)
ffc0d884: 48 00 be 81 bl ffc19704 <_savegpr_31>
ffc0d888: 90 01 00 14 stw r0,20(r1)
ffc0d88c: 7c 9f 23 78 mr r31,r4
rtems_status_code sc = rtems_semaphore_release (lock);
ffc0d890: 4b ff c2 39 bl ffc09ac8 <rtems_semaphore_release>
if (sc != RTEMS_SUCCESSFUL)
ffc0d894: 2f 83 00 00 cmpwi cr7,r3,0
ffc0d898: 41 be 00 0c beq+ cr7,ffc0d8a4 <rtems_bdbuf_unlock+0x2c> <== ALWAYS TAKEN
rtems_bdbuf_fatal (fatal_error_code);
ffc0d89c: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc0d8a0: 4b ff ff 5d bl ffc0d7fc <rtems_bdbuf_fatal> <== NOT EXECUTED
}
ffc0d8a4: 39 61 00 10 addi r11,r1,16
ffc0d8a8: 48 00 be a8 b ffc19750 <_restgpr_31_x>
ffc0da5c <rtems_bdbuf_wait_for_event>:
return RTEMS_UNSATISFIED;
}
static void
rtems_bdbuf_wait_for_event (rtems_event_set event)
{
ffc0da5c: 7c 2b 0b 78 mr r11,r1
ffc0da60: 94 21 ff e0 stwu r1,-32(r1)
ffc0da64: 7c 08 02 a6 mflr r0
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_event_set out = 0;
ffc0da68: 39 20 00 00 li r9,0
ffc0da6c: 7c 26 0b 78 mr r6,r1
return RTEMS_UNSATISFIED;
}
static void
rtems_bdbuf_wait_for_event (rtems_event_set event)
{
ffc0da70: 48 00 bc 95 bl ffc19704 <_savegpr_31>
ffc0da74: 90 01 00 24 stw r0,36(r1)
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_event_set out = 0;
sc = rtems_event_receive (event,
ffc0da78: 38 80 00 00 li r4,0
ffc0da7c: 38 a0 00 00 li r5,0
static void
rtems_bdbuf_wait_for_event (rtems_event_set event)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_event_set out = 0;
ffc0da80: 95 26 00 08 stwu r9,8(r6)
return RTEMS_UNSATISFIED;
}
static void
rtems_bdbuf_wait_for_event (rtems_event_set event)
{
ffc0da84: 7c 7f 1b 78 mr r31,r3
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_event_set out = 0;
sc = rtems_event_receive (event,
ffc0da88: 4b ff b8 c5 bl ffc0934c <rtems_event_receive>
RTEMS_EVENT_ALL | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&out);
if (sc != RTEMS_SUCCESSFUL || out != event)
ffc0da8c: 2f 83 00 00 cmpwi cr7,r3,0
ffc0da90: 40 9e 00 10 bne- cr7,ffc0daa0 <rtems_bdbuf_wait_for_event+0x44><== NEVER TAKEN
ffc0da94: 81 21 00 08 lwz r9,8(r1)
ffc0da98: 7f 89 f8 00 cmpw cr7,r9,r31
ffc0da9c: 41 be 00 0c beq+ cr7,ffc0daa8 <rtems_bdbuf_wait_for_event+0x4c><== ALWAYS TAKEN
rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_WAIT_EVNT);
ffc0daa0: 38 60 00 1c li r3,28 <== NOT EXECUTED
ffc0daa4: 4b ff fd 59 bl ffc0d7fc <rtems_bdbuf_fatal> <== NOT EXECUTED
}
ffc0daa8: 39 61 00 20 addi r11,r1,32
ffc0daac: 48 00 bc a4 b ffc19750 <_restgpr_31_x>
ffc0df94 <rtems_bdbuf_wait_for_transient_event>:
rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_WAIT_EVNT);
}
static void
rtems_bdbuf_wait_for_transient_event (void)
{
ffc0df94: 94 21 ff e8 stwu r1,-24(r1)
ffc0df98: 7c 08 02 a6 mflr r0
rtems_interval ticks
)
{
rtems_event_set event_out;
return rtems_event_system_receive(
ffc0df9c: 3c 60 80 00 lis r3,-32768
ffc0dfa0: 38 80 00 00 li r4,0
ffc0dfa4: 90 01 00 1c stw r0,28(r1)
ffc0dfa8: 38 a0 00 00 li r5,0
ffc0dfac: 38 c1 00 08 addi r6,r1,8
ffc0dfb0: 48 00 40 dd bl ffc1208c <rtems_event_system_receive>
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_event_transient_receive (RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
ffc0dfb4: 2f 83 00 00 cmpwi cr7,r3,0
ffc0dfb8: 41 be 00 0c beq+ cr7,ffc0dfc4 <rtems_bdbuf_wait_for_transient_event+0x30><== ALWAYS TAKEN
rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_WAIT_TRANS_EVNT);
ffc0dfbc: 38 60 00 1d li r3,29 <== NOT EXECUTED
ffc0dfc0: 4b ff f8 3d bl ffc0d7fc <rtems_bdbuf_fatal> <== NOT EXECUTED
}
ffc0dfc4: 80 01 00 1c lwz r0,28(r1)
ffc0dfc8: 38 21 00 18 addi r1,r1,24
ffc0dfcc: 7c 08 03 a6 mtlr r0
ffc0dfd0: 4e 80 00 20 blr
ffc0db60 <rtems_bdbuf_wake>:
static void
rtems_bdbuf_wake (const rtems_bdbuf_waiters *waiters)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (waiters->count > 0)
ffc0db60: 81 23 00 00 lwz r9,0(r3)
ffc0db64: 2f 89 00 00 cmpwi cr7,r9,0
ffc0db68: 4d be 00 20 beqlr+ cr7
* 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)
{
ffc0db6c: 94 21 ff f8 stwu r1,-8(r1)
ffc0db70: 7c 08 02 a6 mflr r0
ffc0db74: 90 01 00 0c stw r0,12(r1)
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (waiters->count > 0)
{
sc = rtems_semaphore_flush (waiters->sema);
ffc0db78: 80 63 00 04 lwz r3,4(r3)
ffc0db7c: 48 00 44 75 bl ffc11ff0 <rtems_semaphore_flush>
if (sc != RTEMS_SUCCESSFUL)
ffc0db80: 2f 83 00 00 cmpwi cr7,r3,0
ffc0db84: 41 be 00 0c beq+ cr7,ffc0db90 <rtems_bdbuf_wake+0x30> <== ALWAYS TAKEN
rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_CACHE_WAKE);
ffc0db88: 38 60 00 04 li r3,4 <== NOT EXECUTED
ffc0db8c: 4b ff fc 71 bl ffc0d7fc <rtems_bdbuf_fatal> <== NOT EXECUTED
}
}
ffc0db90: 80 01 00 0c lwz r0,12(r1)
ffc0db94: 38 21 00 08 addi r1,r1,8
ffc0db98: 7c 08 03 a6 mtlr r0
ffc0db9c: 4e 80 00 20 blr
ffc0d8bc <rtems_bdbuf_wake_swapper>:
}
static void
rtems_bdbuf_wake_swapper (void)
{
rtems_status_code sc = rtems_event_send (bdbuf_cache.swapout,
ffc0d8bc: 3d 20 00 00 lis r9,0
}
}
static void
rtems_bdbuf_wake_swapper (void)
{
ffc0d8c0: 94 21 ff f8 stwu r1,-8(r1)
ffc0d8c4: 7c 08 02 a6 mflr r0
rtems_status_code sc = rtems_event_send (bdbuf_cache.swapout,
ffc0d8c8: 38 80 00 04 li r4,4
ffc0d8cc: 80 69 2a 00 lwz r3,10752(r9)
}
}
static void
rtems_bdbuf_wake_swapper (void)
{
ffc0d8d0: 90 01 00 0c stw r0,12(r1)
rtems_status_code sc = rtems_event_send (bdbuf_cache.swapout,
ffc0d8d4: 4b ff bc 1d bl ffc094f0 <rtems_event_send>
RTEMS_BDBUF_SWAPOUT_SYNC);
if (sc != RTEMS_SUCCESSFUL)
ffc0d8d8: 2f 83 00 00 cmpwi cr7,r3,0
ffc0d8dc: 41 be 00 0c beq+ cr7,ffc0d8e8 <rtems_bdbuf_wake_swapper+0x2c><== ALWAYS TAKEN
rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_SO_WAKE_1);
ffc0d8e0: 38 60 00 0b li r3,11 <== NOT EXECUTED
ffc0d8e4: 4b ff ff 19 bl ffc0d7fc <rtems_bdbuf_fatal> <== NOT EXECUTED
}
ffc0d8e8: 80 01 00 0c lwz r0,12(r1)
ffc0d8ec: 38 21 00 08 addi r1,r1,8
ffc0d8f0: 7c 08 03 a6 mtlr r0
ffc0d8f4: 4e 80 00 20 blr
ffc03c60 <rtems_bdpart_create>:
const rtems_bdpart_format *format,
rtems_bdpart_partition *pt,
const unsigned *dist,
size_t count
)
{
ffc03c60: 94 21 ff d0 stwu r1,-48(r1)
ffc03c64: 7c 08 02 a6 mflr r0
ffc03c68: bf 41 00 18 stmw r26,24(r1)
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool dos_compatibility = format != NULL
&& format->type == RTEMS_BDPART_FORMAT_MBR
&& format->mbr.dos_compatibility;
ffc03c6c: 7c 9d 23 79 mr. r29,r4
const rtems_bdpart_format *format,
rtems_bdpart_partition *pt,
const unsigned *dist,
size_t count
)
{
ffc03c70: 7c bc 2b 78 mr r28,r5
ffc03c74: 90 01 00 34 stw r0,52(r1)
ffc03c78: 7c db 33 78 mr r27,r6
ffc03c7c: 7c fe 3b 78 mr r30,r7
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool dos_compatibility = format != NULL
&& format->type == RTEMS_BDPART_FORMAT_MBR
&& format->mbr.dos_compatibility;
ffc03c80: 41 82 00 1c beq- ffc03c9c <rtems_bdpart_create+0x3c> <== NEVER TAKEN
size_t count
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool dos_compatibility = format != NULL
&& format->type == RTEMS_BDPART_FORMAT_MBR
ffc03c84: 81 3d 00 00 lwz r9,0(r29)
&& format->mbr.dos_compatibility;
ffc03c88: 3b e0 00 00 li r31,0
size_t count
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool dos_compatibility = format != NULL
&& format->type == RTEMS_BDPART_FORMAT_MBR
ffc03c8c: 2f 89 00 00 cmpwi cr7,r9,0
ffc03c90: 40 9e 00 10 bne- cr7,ffc03ca0 <rtems_bdpart_create+0x40><== NEVER TAKEN
&& format->mbr.dos_compatibility;
ffc03c94: 8b fd 00 08 lbz r31,8(r29)
ffc03c98: 48 00 00 08 b ffc03ca0 <rtems_bdpart_create+0x40>
ffc03c9c: 3b e0 00 00 li r31,0 <== NOT EXECUTED
rtems_blkdev_bnum disk_end = 0;
rtems_blkdev_bnum pos = 0;
rtems_blkdev_bnum dist_sum = 0;
rtems_blkdev_bnum record_space =
ffc03ca0: 73 fa 00 01 andi. r26,r31,1
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) {
ffc03ca4: 2f 9e 00 00 cmpwi cr7,r30,0
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool dos_compatibility = format != NULL
&& format->type == RTEMS_BDPART_FORMAT_MBR
&& format->mbr.dos_compatibility;
rtems_blkdev_bnum disk_end = 0;
ffc03ca8: 39 20 00 00 li r9,0
rtems_blkdev_bnum pos = 0;
rtems_blkdev_bnum dist_sum = 0;
rtems_blkdev_bnum record_space =
ffc03cac: 7f e0 00 26 mfcr r31
ffc03cb0: 57 ff 1f fe rlwinm r31,r31,3,31,31
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool dos_compatibility = format != NULL
&& format->type == RTEMS_BDPART_FORMAT_MBR
&& format->mbr.dos_compatibility;
rtems_blkdev_bnum disk_end = 0;
ffc03cb4: 91 21 00 08 stw r9,8(r1)
rtems_blkdev_bnum pos = 0;
rtems_blkdev_bnum dist_sum = 0;
rtems_blkdev_bnum record_space =
ffc03cb8: 39 20 ff c2 li r9,-62
ffc03cbc: 7f ff 00 d0 neg r31,r31
ffc03cc0: 7f ff 48 38 and r31,r31,r9
ffc03cc4: 3b ff 00 3f addi r31,r31,63
size_t i = 0;
/* Check if we have something to do */
if (count == 0) {
/* Nothing to do */
return RTEMS_SUCCESSFUL;
ffc03cc8: 39 20 00 00 li r9,0
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) {
ffc03ccc: 41 9e 01 6c beq- cr7,ffc03e38 <rtems_bdpart_create+0x1d8><== NEVER TAKEN
/* Nothing to do */
return RTEMS_SUCCESSFUL;
}
/* Check parameter */
if (format == NULL || pt == NULL || dist == NULL) {
ffc03cd0: 2f 9d 00 00 cmpwi cr7,r29,0
return RTEMS_INVALID_ADDRESS;
ffc03cd4: 39 20 00 09 li r9,9
/* Nothing to do */
return RTEMS_SUCCESSFUL;
}
/* Check parameter */
if (format == NULL || pt == NULL || dist == NULL) {
ffc03cd8: 41 9e 01 60 beq- cr7,ffc03e38 <rtems_bdpart_create+0x1d8><== NEVER TAKEN
ffc03cdc: 2f 9c 00 00 cmpwi cr7,r28,0
ffc03ce0: 41 9e 01 58 beq- cr7,ffc03e38 <rtems_bdpart_create+0x1d8><== NEVER TAKEN
ffc03ce4: 2f 9b 00 00 cmpwi cr7,r27,0
ffc03ce8: 41 9e 01 50 beq- cr7,ffc03e38 <rtems_bdpart_create+0x1d8><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
}
/* Get disk data */
sc = rtems_bdpart_get_disk_data( disk_name, NULL, NULL, &disk_end);
ffc03cec: 38 80 00 00 li r4,0
ffc03cf0: 38 a0 00 00 li r5,0
ffc03cf4: 38 c1 00 08 addi r6,r1,8
ffc03cf8: 48 00 04 8d bl ffc04184 <rtems_bdpart_get_disk_data>
if (sc != RTEMS_SUCCESSFUL) {
ffc03cfc: 7c 69 1b 79 mr. r9,r3
ffc03d00: 40 82 01 38 bne- ffc03e38 <rtems_bdpart_create+0x1d8> <== NEVER TAKEN
ffc03d04: 7f c9 03 a6 mtctr r30
ffc03d08: 39 00 00 00 li r8,0
ffc03d0c: 39 40 00 00 li r10,0
#endif
#include <rtems.h>
#include <rtems/bdpart.h>
rtems_status_code rtems_bdpart_create(
ffc03d10: 55 07 10 3a rlwinm r7,r8,2,0,29
/* Get distribution sum and check for overflow */
for (i = 0; i < count; ++i) {
unsigned prev_sum = dist_sum;
dist_sum += dist [i];
ffc03d14: 7c fb 38 2e lwzx r7,r27,r7
ffc03d18: 7c a7 52 14 add r5,r7,r10
if (dist_sum < prev_sum) {
ffc03d1c: 7f 85 50 40 cmplw cr7,r5,r10
ffc03d20: 40 bc 00 0c bge+ cr7,ffc03d2c <rtems_bdpart_create+0xcc><== ALWAYS TAKEN
return RTEMS_INVALID_NUMBER;
ffc03d24: 39 20 00 0a li r9,10 <== NOT EXECUTED
ffc03d28: 48 00 01 10 b ffc03e38 <rtems_bdpart_create+0x1d8> <== NOT EXECUTED
}
if (dist [i] == 0) {
ffc03d2c: 2f 87 00 00 cmpwi cr7,r7,0
ffc03d30: 41 be ff f4 beq- cr7,ffc03d24 <rtems_bdpart_create+0xc4><== NEVER TAKEN
if (sc != RTEMS_SUCCESSFUL) {
return sc;
}
/* Get distribution sum and check for overflow */
for (i = 0; i < count; ++i) {
ffc03d34: 39 08 00 01 addi r8,r8,1
unsigned prev_sum = dist_sum;
dist_sum += dist [i];
ffc03d38: 7c aa 2b 78 mr r10,r5
if (sc != RTEMS_SUCCESSFUL) {
return sc;
}
/* Get distribution sum and check for overflow */
for (i = 0; i < count; ++i) {
ffc03d3c: 42 00 ff d4 bdnz+ ffc03d10 <rtems_bdpart_create+0xb0>
return RTEMS_INVALID_NUMBER;
}
}
/* Check format */
if (format->type != RTEMS_BDPART_FORMAT_MBR) {
ffc03d40: 81 5d 00 00 lwz r10,0(r29)
ffc03d44: 2f 8a 00 00 cmpwi cr7,r10,0
ffc03d48: 40 be 00 e4 bne+ cr7,ffc03e2c <rtems_bdpart_create+0x1cc><== NEVER TAKEN
return RTEMS_NOT_IMPLEMENTED;
}
/* Align end of disk on cylinder boundary if necessary */
if (dos_compatibility) {
ffc03d4c: 2f 9a 00 00 cmpwi cr7,r26,0
ffc03d50: 41 9e 00 14 beq- cr7,ffc03d64 <rtems_bdpart_create+0x104><== NEVER TAKEN
disk_end -= (disk_end % record_space);
ffc03d54: 81 41 00 08 lwz r10,8(r1)
ffc03d58: 7d 4a fb 96 divwu r10,r10,r31
ffc03d5c: 7d 4a f9 d6 mullw r10,r10,r31
ffc03d60: 91 41 00 08 stw r10,8(r1)
/*
* In case we need an extended partition and logical partitions we have to
* account for the space of each EBR.
*/
if (count > 4) {
ffc03d64: 2b 9e 00 04 cmplwi cr7,r30,4
/*
* We need at least space for the MBR and the compatibility space for the
* first primary partition.
*/
overhead += record_space;
ffc03d68: 7f ea fb 78 mr r10,r31
/*
* In case we need an extended partition and logical partitions we have to
* account for the space of each EBR.
*/
if (count > 4) {
ffc03d6c: 40 9d 00 10 ble- cr7,ffc03d7c <rtems_bdpart_create+0x11c><== NEVER TAKEN
overhead += (count - 3) * record_space;
ffc03d70: 39 5e ff fd addi r10,r30,-3
ffc03d74: 7d 5f 51 d6 mullw r10,r31,r10
ffc03d78: 7d 4a fa 14 add r10,r10,r31
/*
* Account space to align every partition on cylinder boundaries if
* necessary.
*/
if (dos_compatibility) {
ffc03d7c: 2f 9a 00 00 cmpwi cr7,r26,0
ffc03d80: 41 9e 00 10 beq- cr7,ffc03d90 <rtems_bdpart_create+0x130><== NEVER TAKEN
overhead += (count - 1) * record_space;
ffc03d84: 39 1e ff ff addi r8,r30,-1
ffc03d88: 7d 1f 41 d6 mullw r8,r31,r8
ffc03d8c: 7d 4a 42 14 add r10,r10,r8
}
/* Check disk space */
if ((overhead + count) > disk_end) {
ffc03d90: 80 c1 00 08 lwz r6,8(r1)
ffc03d94: 7d 0a f2 14 add r8,r10,r30
ffc03d98: 7f 88 30 40 cmplw cr7,r8,r6
ffc03d9c: 41 bd 00 98 bgt+ cr7,ffc03e34 <rtems_bdpart_create+0x1d4><== NEVER TAKEN
}
s /= dist_sum;
/* Ensure that the partition is not empty */
if (s == 0) {
s = 1;
ffc03da0: 7f c9 03 a6 mtctr r30
/* Begin of first primary partition */
pos = record_space;
/* Space for partitions */
free_space = disk_end - overhead;
ffc03da4: 7c 6a 30 50 subf r3,r10,r6
ffc03da8: 7f 87 e3 78 mr r7,r28
if ((overhead + count) > disk_end) {
return RTEMS_IO_ERROR;
}
/* Begin of first primary partition */
pos = record_space;
ffc03dac: 7f ea fb 78 mr r10,r31
/* Space for partitions */
free_space = disk_end - overhead;
for (i = 0; i < count; ++i) {
ffc03db0: 39 00 00 00 li r8,0
#endif
#include <rtems.h>
#include <rtems/bdpart.h>
rtems_status_code rtems_bdpart_create(
ffc03db4: 55 04 10 3a rlwinm r4,r8,2,0,29
for (i = 0; i < count; ++i) {
rtems_bdpart_partition *p = pt + i;
/* Partition size */
rtems_blkdev_bnum s = free_space * dist [i];
ffc03db8: 7d 7b 20 2e lwzx r11,r27,r4
ffc03dbc: 7c 8b 19 d6 mullw r4,r11,r3
if (s < free_space || s < dist [i]) {
ffc03dc0: 7f 84 18 40 cmplw cr7,r4,r3
ffc03dc4: 41 bc ff 60 blt- cr7,ffc03d24 <rtems_bdpart_create+0xc4><== NEVER TAKEN
ffc03dc8: 7f 84 58 40 cmplw cr7,r4,r11
ffc03dcc: 41 bc ff 58 blt- cr7,ffc03d24 <rtems_bdpart_create+0xc4><== NEVER TAKEN
/* TODO: Calculate without overflow */
return RTEMS_INVALID_NUMBER;
}
s /= dist_sum;
ffc03dd0: 7c 84 2b 96 divwu r4,r4,r5
/* Ensure that the partition is not empty */
if (s == 0) {
ffc03dd4: 2f 84 00 00 cmpwi cr7,r4,0
ffc03dd8: 40 9e 00 08 bne- cr7,ffc03de0 <rtems_bdpart_create+0x180><== ALWAYS TAKEN
s = 1;
ffc03ddc: 38 80 00 01 li r4,1 <== NOT EXECUTED
}
/* Align partition upwards */
s += record_space - (s % record_space);
ffc03de0: 7c 84 fb 96 divwu r4,r4,r31
/* Reserve space for the EBR if necessary */
if (count > 4 && i > 2) {
ffc03de4: 2b 9e 00 04 cmplwi cr7,r30,4
if (s == 0) {
s = 1;
}
/* Align partition upwards */
s += record_space - (s % record_space);
ffc03de8: 7c 84 f9 d6 mullw r4,r4,r31
ffc03dec: 7c 9f 22 14 add r4,r31,r4
/* Reserve space for the EBR if necessary */
if (count > 4 && i > 2) {
ffc03df0: 40 9d 00 10 ble- cr7,ffc03e00 <rtems_bdpart_create+0x1a0><== NEVER TAKEN
ffc03df4: 2b 88 00 02 cmplwi cr7,r8,2
ffc03df8: 40 9d 00 08 ble- cr7,ffc03e00 <rtems_bdpart_create+0x1a0>
pos += record_space;
ffc03dfc: 7d 4a fa 14 add r10,r10,r31
}
/* Partition begin and end */
p->begin = pos;
ffc03e00: 91 47 00 00 stw r10,0(r7)
pos += s;
ffc03e04: 7d 4a 22 14 add r10,r10,r4
pos = record_space;
/* Space for partitions */
free_space = disk_end - overhead;
for (i = 0; i < count; ++i) {
ffc03e08: 39 08 00 01 addi r8,r8,1
}
/* Partition begin and end */
p->begin = pos;
pos += s;
p->end = pos;
ffc03e0c: 91 47 00 04 stw r10,4(r7)
ffc03e10: 38 e7 00 30 addi r7,r7,48
pos = record_space;
/* Space for partitions */
free_space = disk_end - overhead;
for (i = 0; i < count; ++i) {
ffc03e14: 42 00 ff a0 bdnz+ ffc03db4 <rtems_bdpart_create+0x154>
pos += s;
p->end = pos;
}
/* Expand the last partition to the disk end */
pt [count - 1].end = disk_end;
ffc03e18: 39 08 ff ff addi r8,r8,-1
ffc03e1c: 1d 08 00 30 mulli r8,r8,48
ffc03e20: 7f 9c 42 14 add r28,r28,r8
ffc03e24: 90 dc 00 04 stw r6,4(r28)
ffc03e28: 48 00 00 10 b ffc03e38 <rtems_bdpart_create+0x1d8>
}
}
/* Check format */
if (format->type != RTEMS_BDPART_FORMAT_MBR) {
return RTEMS_NOT_IMPLEMENTED;
ffc03e2c: 39 20 00 18 li r9,24 <== NOT EXECUTED
ffc03e30: 48 00 00 08 b ffc03e38 <rtems_bdpart_create+0x1d8> <== NOT EXECUTED
overhead += (count - 1) * record_space;
}
/* Check disk space */
if ((overhead + count) > disk_end) {
return RTEMS_IO_ERROR;
ffc03e34: 39 20 00 1b li r9,27 <== NOT EXECUTED
/* Expand the last partition to the disk end */
pt [count - 1].end = disk_end;
return RTEMS_SUCCESSFUL;
}
ffc03e38: 39 61 00 30 addi r11,r1,48
ffc03e3c: 7d 23 4b 78 mr r3,r9
ffc03e40: 4b ff c9 a0 b ffc007e0 <_restgpr_26_x>
ffc03e44 <rtems_bdpart_dump>:
{
uuid_unparse_lower( type, str);
}
void rtems_bdpart_dump( const rtems_bdpart_partition *pt, size_t count)
{
ffc03e44: 94 21 ff 80 stwu r1,-128(r1)
ffc03e48: 7c 08 02 a6 mflr r0
ffc03e4c: be 61 00 4c stmw r19,76(r1)
ffc03e50: 7c 7f 1b 78 mr r31,r3
size_t i = 0;
printf(
ffc03e54: 3c 60 ff c2 lis r3,-62
ffc03e58: 38 63 5c 2b addi r3,r3,23595
{
uuid_unparse_lower( type, str);
}
void rtems_bdpart_dump( const rtems_bdpart_partition *pt, size_t count)
{
ffc03e5c: 90 01 00 84 stw r0,132(r1)
break;
case RTEMS_BDPART_MBR_DATA:
type = "DATA";
break;
default:
snprintf( type_buffer, sizeof( type_buffer), "0x%02" PRIx8, type_mbr);
ffc03e60: 3f 20 ff c2 lis r25,-62
} else {
rtems_bdpart_type_to_string( p->type, type_buffer);
type = type_buffer;
}
printf(
ffc03e64: 3e 60 ff c2 lis r19,-62
{
uuid_unparse_lower( type, str);
}
void rtems_bdpart_dump( const rtems_bdpart_partition *pt, size_t count)
{
ffc03e68: 7c 9c 23 78 mr r28,r4
size_t i = 0;
printf(
ffc03e6c: 48 01 30 89 bl ffc16ef4 <puts>
"------------+------------+-----------------------------------------------------\n"
" BEGIN | END | TYPE\n"
"------------+------------+-----------------------------------------------------\n"
);
for (i = 0; i < count; ++i) {
ffc03e70: 3b c0 00 00 li r30,0
const rtems_bdpart_partition *p = pt + i;
const char *type = NULL;
char type_buffer [52];
uint8_t type_mbr = 0;
ffc03e74: 3b 60 00 00 li r27,0
break;
case RTEMS_BDPART_MBR_FAT_16_LBA:
type = "FAT 16 LBA";
break;
case RTEMS_BDPART_MBR_FAT_32:
type = "FAT 32";
ffc03e78: 3f 40 ff c2 lis r26,-62
break;
case RTEMS_BDPART_MBR_DATA:
type = "DATA";
break;
default:
snprintf( type_buffer, sizeof( type_buffer), "0x%02" PRIx8, type_mbr);
ffc03e7c: 3b 39 5d 6b addi r25,r25,23915
break;
case RTEMS_BDPART_MBR_FAT_16:
type = "FAT 16";
break;
case RTEMS_BDPART_MBR_FAT_16_LBA:
type = "FAT 16 LBA";
ffc03e80: 3f 00 ff c2 lis r24,-62
break;
case RTEMS_BDPART_MBR_FAT_32_LBA:
type = "FAT 32 LBA";
break;
case RTEMS_BDPART_MBR_DATA:
type = "DATA";
ffc03e84: 3e e0 ff c2 lis r23,-62
break;
case RTEMS_BDPART_MBR_FAT_32:
type = "FAT 32";
break;
case RTEMS_BDPART_MBR_FAT_32_LBA:
type = "FAT 32 LBA";
ffc03e88: 3e c0 ff c2 lis r22,-62
uint8_t type_mbr = 0;
if (rtems_bdpart_to_mbr_partition_type( p->type, &type_mbr)) {
switch (type_mbr) {
case RTEMS_BDPART_MBR_FAT_12:
type = "FAT 12";
ffc03e8c: 3e a0 ff c2 lis r21,-62
break;
case RTEMS_BDPART_MBR_FAT_16:
type = "FAT 16";
ffc03e90: 3e 80 ff c2 lis r20,-62
} else {
rtems_bdpart_type_to_string( p->type, type_buffer);
type = type_buffer;
}
printf(
ffc03e94: 3a 73 5d 72 addi r19,r19,23922
"------------+------------+-----------------------------------------------------\n"
" BEGIN | END | TYPE\n"
"------------+------------+-----------------------------------------------------\n"
);
for (i = 0; i < count; ++i) {
ffc03e98: 48 00 00 d8 b ffc03f70 <rtems_bdpart_dump+0x12c>
const rtems_bdpart_partition *p = pt + i;
const char *type = NULL;
char type_buffer [52];
uint8_t type_mbr = 0;
if (rtems_bdpart_to_mbr_partition_type( p->type, &type_mbr)) {
ffc03e9c: 3b bf 00 08 addi r29,r31,8
for (i = 0; i < count; ++i) {
const rtems_bdpart_partition *p = pt + i;
const char *type = NULL;
char type_buffer [52];
uint8_t type_mbr = 0;
ffc03ea0: 9b 61 00 3c stb r27,60(r1)
if (rtems_bdpart_to_mbr_partition_type( p->type, &type_mbr)) {
ffc03ea4: 7f a3 eb 78 mr r3,r29
ffc03ea8: 38 81 00 3c addi r4,r1,60
ffc03eac: 48 00 02 95 bl ffc04140 <rtems_bdpart_to_mbr_partition_type>
ffc03eb0: 2f 83 00 00 cmpwi cr7,r3,0
ffc03eb4: 41 9e 00 88 beq- cr7,ffc03f3c <rtems_bdpart_dump+0xf8> <== NEVER TAKEN
switch (type_mbr) {
ffc03eb8: 88 c1 00 3c lbz r6,60(r1)
ffc03ebc: 2f 86 00 0b cmpwi cr7,r6,11
ffc03ec0: 41 9e 00 4c beq- cr7,ffc03f0c <rtems_bdpart_dump+0xc8> <== ALWAYS TAKEN
ffc03ec4: 2b 86 00 0b cmplwi cr7,r6,11 <== NOT EXECUTED
ffc03ec8: 41 9d 00 18 bgt- cr7,ffc03ee0 <rtems_bdpart_dump+0x9c> <== NOT EXECUTED
ffc03ecc: 2f 86 00 01 cmpwi cr7,r6,1 <== NOT EXECUTED
ffc03ed0: 41 9e 00 2c beq- cr7,ffc03efc <rtems_bdpart_dump+0xb8> <== NOT EXECUTED
ffc03ed4: 2f 86 00 04 cmpwi cr7,r6,4 <== NOT EXECUTED
ffc03ed8: 40 be 00 4c bne+ cr7,ffc03f24 <rtems_bdpart_dump+0xe0> <== NOT EXECUTED
ffc03edc: 48 00 00 74 b ffc03f50 <rtems_bdpart_dump+0x10c> <== NOT EXECUTED
ffc03ee0: 2f 86 00 0e cmpwi cr7,r6,14 <== NOT EXECUTED
ffc03ee4: 41 9e 00 20 beq- cr7,ffc03f04 <rtems_bdpart_dump+0xc0> <== NOT EXECUTED
ffc03ee8: 2f 86 00 da cmpwi cr7,r6,218 <== NOT EXECUTED
ffc03eec: 41 9e 00 30 beq- cr7,ffc03f1c <rtems_bdpart_dump+0xd8> <== NOT EXECUTED
ffc03ef0: 2f 86 00 0c cmpwi cr7,r6,12 <== NOT EXECUTED
ffc03ef4: 40 be 00 30 bne+ cr7,ffc03f24 <rtems_bdpart_dump+0xe0> <== NOT EXECUTED
ffc03ef8: 48 00 00 1c b ffc03f14 <rtems_bdpart_dump+0xd0> <== NOT EXECUTED
case RTEMS_BDPART_MBR_FAT_12:
type = "FAT 12";
ffc03efc: 38 d5 5c 02 addi r6,r21,23554 <== NOT EXECUTED
ffc03f00: 48 00 00 54 b ffc03f54 <rtems_bdpart_dump+0x110> <== NOT EXECUTED
break;
case RTEMS_BDPART_MBR_FAT_16:
type = "FAT 16";
break;
case RTEMS_BDPART_MBR_FAT_16_LBA:
type = "FAT 16 LBA";
ffc03f04: 38 d8 5c 20 addi r6,r24,23584 <== NOT EXECUTED
break;
ffc03f08: 48 00 00 4c b ffc03f54 <rtems_bdpart_dump+0x110> <== NOT EXECUTED
case RTEMS_BDPART_MBR_FAT_32:
type = "FAT 32";
ffc03f0c: 38 da 5c 19 addi r6,r26,23577
break;
ffc03f10: 48 00 00 44 b ffc03f54 <rtems_bdpart_dump+0x110>
case RTEMS_BDPART_MBR_FAT_32_LBA:
type = "FAT 32 LBA";
ffc03f14: 38 d6 5c 0e addi r6,r22,23566 <== NOT EXECUTED
break;
ffc03f18: 48 00 00 3c b ffc03f54 <rtems_bdpart_dump+0x110> <== NOT EXECUTED
case RTEMS_BDPART_MBR_DATA:
type = "DATA";
ffc03f1c: 38 d7 5c 09 addi r6,r23,23561 <== NOT EXECUTED
break;
ffc03f20: 48 00 00 34 b ffc03f54 <rtems_bdpart_dump+0x110> <== NOT EXECUTED
default:
snprintf( type_buffer, sizeof( type_buffer), "0x%02" PRIx8, type_mbr);
ffc03f24: 38 61 00 08 addi r3,r1,8 <== NOT EXECUTED
ffc03f28: 38 80 00 34 li r4,52 <== NOT EXECUTED
ffc03f2c: 7f 25 cb 78 mr r5,r25 <== NOT EXECUTED
ffc03f30: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc03f34: 48 01 30 dd bl ffc17010 <snprintf> <== NOT EXECUTED
ffc03f38: 48 00 00 10 b ffc03f48 <rtems_bdpart_dump+0x104> <== NOT EXECUTED
static void rtems_bdpart_type_to_string(
const uuid_t type,
char str [37]
)
{
uuid_unparse_lower( type, str);
ffc03f3c: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED
ffc03f40: 38 81 00 08 addi r4,r1,8 <== NOT EXECUTED
ffc03f44: 48 00 ae a5 bl ffc0ede8 <uuid_unparse_lower> <== NOT EXECUTED
type = type_buffer;
break;
}
} else {
rtems_bdpart_type_to_string( p->type, type_buffer);
type = type_buffer;
ffc03f48: 38 c1 00 08 addi r6,r1,8 <== NOT EXECUTED
ffc03f4c: 48 00 00 08 b ffc03f54 <rtems_bdpart_dump+0x110> <== NOT EXECUTED
switch (type_mbr) {
case RTEMS_BDPART_MBR_FAT_12:
type = "FAT 12";
break;
case RTEMS_BDPART_MBR_FAT_16:
type = "FAT 16";
ffc03f50: 38 d4 5b fb addi r6,r20,23547 <== NOT EXECUTED
} else {
rtems_bdpart_type_to_string( p->type, type_buffer);
type = type_buffer;
}
printf(
ffc03f54: 80 9f 00 00 lwz r4,0(r31)
ffc03f58: 7e 63 9b 78 mr r3,r19
ffc03f5c: 80 bf 00 04 lwz r5,4(r31)
"------------+------------+-----------------------------------------------------\n"
" BEGIN | END | TYPE\n"
"------------+------------+-----------------------------------------------------\n"
);
for (i = 0; i < count; ++i) {
ffc03f60: 3b de 00 01 addi r30,r30,1
ffc03f64: 3b ff 00 30 addi r31,r31,48
} else {
rtems_bdpart_type_to_string( p->type, type_buffer);
type = type_buffer;
}
printf(
ffc03f68: 4c c6 31 82 crclr 4*cr1+eq
ffc03f6c: 48 01 2e 2d bl ffc16d98 <printf>
"------------+------------+-----------------------------------------------------\n"
" BEGIN | END | TYPE\n"
"------------+------------+-----------------------------------------------------\n"
);
for (i = 0; i < count; ++i) {
ffc03f70: 7f 9e e0 00 cmpw cr7,r30,r28
ffc03f74: 40 9e ff 28 bne+ cr7,ffc03e9c <rtems_bdpart_dump+0x58>
p->end,
type
);
}
puts( "------------+------------+-----------------------------------------------------");
ffc03f78: 3c 60 ff c2 lis r3,-62
ffc03f7c: 38 63 5d 1b addi r3,r3,23835
ffc03f80: 48 01 2f 75 bl ffc16ef4 <puts>
}
ffc03f84: 39 61 00 80 addi r11,r1,128
ffc03f88: 4b ff c8 3c b ffc007c4 <_restgpr_19_x>
ffc04184 <rtems_bdpart_get_disk_data>:
const char *disk_name,
int *fd_ptr,
rtems_disk_device **dd_ptr,
rtems_blkdev_bnum *disk_end
)
{
ffc04184: 94 21 ff d8 stwu r1,-40(r1)
ffc04188: 7c 08 02 a6 mflr r0
rtems_status_code sc = RTEMS_SUCCESSFUL;
int rv = 0;
int fd = -1;
rtems_disk_device *dd = NULL;
ffc0418c: 39 20 00 00 li r9,0
const char *disk_name,
int *fd_ptr,
rtems_disk_device **dd_ptr,
rtems_blkdev_bnum *disk_end
)
{
ffc04190: bf 81 00 18 stmw r28,24(r1)
ffc04194: 7c 9e 23 78 mr r30,r4
rtems_disk_device *dd = NULL;
rtems_blkdev_bnum disk_begin = 0;
rtems_blkdev_bnum block_size = 0;
/* Open device file */
fd = open( disk_name, O_RDWR);
ffc04198: 38 80 00 02 li r4,2
const char *disk_name,
int *fd_ptr,
rtems_disk_device **dd_ptr,
rtems_blkdev_bnum *disk_end
)
{
ffc0419c: 90 01 00 2c stw r0,44(r1)
ffc041a0: 7c bd 2b 78 mr r29,r5
ffc041a4: 7c df 33 78 mr r31,r6
rtems_status_code sc = RTEMS_SUCCESSFUL;
int rv = 0;
int fd = -1;
rtems_disk_device *dd = NULL;
ffc041a8: 91 21 00 08 stw r9,8(r1)
rtems_blkdev_bnum disk_begin = 0;
rtems_blkdev_bnum block_size = 0;
/* Open device file */
fd = open( disk_name, O_RDWR);
ffc041ac: 4c c6 31 82 crclr 4*cr1+eq
ffc041b0: 48 00 34 ad bl ffc0765c <open>
if (fd < 0) {
ffc041b4: 7c 7c 1b 79 mr. r28,r3
ffc041b8: 41 a0 00 74 blt+ ffc0422c <rtems_bdpart_get_disk_data+0xa8><== NEVER TAKEN
static inline int rtems_disk_fd_get_disk_device(
int fd,
rtems_disk_device **dd_ptr
)
{
return ioctl(fd, RTEMS_BLKIO_GETDISKDEV, dd_ptr);
ffc041bc: 3c 80 40 04 lis r4,16388
ffc041c0: 60 84 42 09 ori r4,r4,16905
ffc041c4: 38 a1 00 08 addi r5,r1,8
ffc041c8: 4c c6 31 82 crclr 4*cr1+eq
ffc041cc: 48 00 27 85 bl ffc06950 <ioctl>
goto error;
}
/* Get disk handle */
rv = rtems_disk_fd_get_disk_device( fd, &dd);
if (rv != 0) {
ffc041d0: 2f 83 00 00 cmpwi cr7,r3,0
ffc041d4: 40 be 00 58 bne+ cr7,ffc0422c <rtems_bdpart_get_disk_data+0xa8><== NEVER TAKEN
sc = RTEMS_INVALID_NAME;
goto error;
}
/* Get disk begin, end and block size */
disk_begin = dd->start;
ffc041d8: 81 21 00 08 lwz r9,8(r1)
*disk_end = dd->size;
ffc041dc: 81 49 00 1c lwz r10,28(r9)
sc = RTEMS_INVALID_NAME;
goto error;
}
/* Get disk begin, end and block size */
disk_begin = dd->start;
ffc041e0: 81 09 00 18 lwz r8,24(r9)
*disk_end = dd->size;
ffc041e4: 91 5f 00 00 stw r10,0(r31)
block_size = dd->block_size;
/* Check block size */
if (block_size < RTEMS_BDPART_BLOCK_SIZE) {
sc = RTEMS_IO_ERROR;
ffc041e8: 3b e0 00 1b li r31,27
disk_begin = dd->start;
*disk_end = dd->size;
block_size = dd->block_size;
/* Check block size */
if (block_size < RTEMS_BDPART_BLOCK_SIZE) {
ffc041ec: 81 49 00 24 lwz r10,36(r9)
ffc041f0: 2b 8a 01 ff cmplwi cr7,r10,511
ffc041f4: 40 bd 00 2c ble+ cr7,ffc04220 <rtems_bdpart_get_disk_data+0x9c><== NEVER TAKEN
sc = RTEMS_IO_ERROR;
goto error;
}
/* Check that we have do not have a logical disk */
if (disk_begin != 0) {
ffc041f8: 2f 88 00 00 cmpwi cr7,r8,0
ffc041fc: 40 be 00 24 bne+ cr7,ffc04220 <rtems_bdpart_get_disk_data+0x9c><== NEVER TAKEN
ffc04200: 48 00 00 34 b ffc04234 <rtems_bdpart_get_disk_data+0xb0>
goto error;
}
error:
if (sc == RTEMS_SUCCESSFUL && fd_ptr != NULL && dd_ptr != NULL) {
ffc04204: 2f 9d 00 00 cmpwi cr7,r29,0
ffc04208: 41 9e 00 14 beq- cr7,ffc0421c <rtems_bdpart_get_disk_data+0x98><== NEVER TAKEN
*fd_ptr = fd;
ffc0420c: 93 9e 00 00 stw r28,0(r30)
int *fd_ptr,
rtems_disk_device **dd_ptr,
rtems_blkdev_bnum *disk_end
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
ffc04210: 3b e0 00 00 li r31,0
error:
if (sc == RTEMS_SUCCESSFUL && fd_ptr != NULL && dd_ptr != NULL) {
*fd_ptr = fd;
*dd_ptr = dd;
ffc04214: 91 3d 00 00 stw r9,0(r29)
ffc04218: 48 00 00 28 b ffc04240 <rtems_bdpart_get_disk_data+0xbc>
int *fd_ptr,
rtems_disk_device **dd_ptr,
rtems_blkdev_bnum *disk_end
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
ffc0421c: 3b e0 00 00 li r31,0
if (sc == RTEMS_SUCCESSFUL && fd_ptr != NULL && dd_ptr != NULL) {
*fd_ptr = fd;
*dd_ptr = dd;
} else {
close( fd);
ffc04220: 7f 83 e3 78 mr r3,r28
ffc04224: 48 00 24 81 bl ffc066a4 <close>
ffc04228: 48 00 00 18 b ffc04240 <rtems_bdpart_get_disk_data+0xbc>
rtems_blkdev_bnum block_size = 0;
/* Open device file */
fd = open( disk_name, O_RDWR);
if (fd < 0) {
sc = RTEMS_INVALID_NAME;
ffc0422c: 3b e0 00 03 li r31,3 <== NOT EXECUTED
ffc04230: 4b ff ff f0 b ffc04220 <rtems_bdpart_get_disk_data+0x9c><== NOT EXECUTED
goto error;
}
error:
if (sc == RTEMS_SUCCESSFUL && fd_ptr != NULL && dd_ptr != NULL) {
ffc04234: 2f 9e 00 00 cmpwi cr7,r30,0
ffc04238: 40 9e ff cc bne+ cr7,ffc04204 <rtems_bdpart_get_disk_data+0x80>
ffc0423c: 4b ff ff e0 b ffc0421c <rtems_bdpart_get_disk_data+0x98>
} else {
close( fd);
}
return sc;
}
ffc04240: 39 61 00 28 addi r11,r1,40
ffc04244: 7f e3 fb 78 mr r3,r31
ffc04248: 4b ff c5 a0 b ffc007e8 <_restgpr_28_x>
ffc22360 <rtems_bdpart_mount>:
const char *disk_name,
const rtems_bdpart_partition *pt __attribute__((unused)),
size_t count,
const char *mount_base
)
{
ffc22360: 94 21 ff d0 stwu r1,-48(r1) <== NOT EXECUTED
ffc22364: 7c 08 02 a6 mflr r0 <== NOT EXECUTED
rtems_status_code esc = RTEMS_SUCCESSFUL;
const char *disk_file_name = strrchr( disk_name, '/');
ffc22368: 38 80 00 2f li r4,47 <== NOT EXECUTED
const char *disk_name,
const rtems_bdpart_partition *pt __attribute__((unused)),
size_t count,
const char *mount_base
)
{
ffc2236c: be c1 00 08 stmw r22,8(r1) <== NOT EXECUTED
ffc22370: 7c d7 33 78 mr r23,r6 <== NOT EXECUTED
ffc22374: 7c b6 2b 78 mr r22,r5 <== NOT EXECUTED
ffc22378: 90 01 00 34 stw r0,52(r1) <== NOT EXECUTED
ffc2237c: 7c 7a 1b 78 mr r26,r3 <== NOT EXECUTED
rtems_status_code esc = RTEMS_SUCCESSFUL;
const char *disk_file_name = strrchr( disk_name, '/');
ffc22380: 48 01 ef e5 bl ffc41364 <strrchr> <== NOT EXECUTED
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) {
return RTEMS_NO_MEMORY;
ffc22384: 3b c0 00 1a li r30,26 <== NOT EXECUTED
size_t count,
const char *mount_base
)
{
rtems_status_code esc = RTEMS_SUCCESSFUL;
const char *disk_file_name = strrchr( disk_name, '/');
ffc22388: 7c 7f 1b 78 mr r31,r3 <== 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);
ffc2238c: 7f 43 d3 78 mr r3,r26 <== NOT EXECUTED
ffc22390: 48 01 e0 69 bl ffc403f8 <strlen> <== NOT EXECUTED
ffc22394: 7c 7d 1b 78 mr r29,r3 <== NOT EXECUTED
size_t mount_base_size = strlen( mount_base);
ffc22398: 7e e3 bb 78 mr r3,r23 <== NOT EXECUTED
ffc2239c: 48 01 e0 5d bl ffc403f8 <strlen> <== NOT EXECUTED
ffc223a0: 7c 7c 1b 78 mr r28,r3 <== NOT EXECUTED
size_t i = 0;
/* Create logical disk name base */
logical_disk_name = malloc( disk_name_size + RTEMS_BDPART_NUMBER_SIZE);
ffc223a4: 38 7d 00 04 addi r3,r29,4 <== NOT EXECUTED
ffc223a8: 4b fe 1f 71 bl ffc04318 <malloc> <== NOT EXECUTED
if (logical_disk_name == NULL) {
ffc223ac: 7c 7b 1b 79 mr. r27,r3 <== NOT EXECUTED
ffc223b0: 41 82 01 34 beq- ffc224e4 <rtems_bdpart_mount+0x184> <== NOT EXECUTED
return RTEMS_NO_MEMORY;
}
strncpy( logical_disk_name, disk_name, disk_name_size);
ffc223b4: 7f 44 d3 78 mr r4,r26 <== NOT EXECUTED
ffc223b8: 7f a5 eb 78 mr r5,r29 <== NOT EXECUTED
ffc223bc: 48 01 e2 b5 bl ffc40670 <strncpy> <== NOT EXECUTED
/* Get disk file name */
if (disk_file_name != NULL) {
ffc223c0: 2f 9f 00 00 cmpwi cr7,r31,0 <== NOT EXECUTED
ffc223c4: 41 9e 00 18 beq- cr7,ffc223dc <rtems_bdpart_mount+0x7c> <== NOT EXECUTED
disk_file_name += 1;
ffc223c8: 3b 5f 00 01 addi r26,r31,1 <== NOT EXECUTED
disk_file_name_size = strlen( disk_file_name);
ffc223cc: 7f 43 d3 78 mr r3,r26 <== NOT EXECUTED
ffc223d0: 48 01 e0 29 bl ffc403f8 <strlen> <== NOT EXECUTED
ffc223d4: 7c 79 1b 78 mr r25,r3 <== NOT EXECUTED
ffc223d8: 48 00 00 08 b ffc223e0 <rtems_bdpart_mount+0x80> <== NOT EXECUTED
} else {
disk_file_name = disk_name;
disk_file_name_size = disk_name_size;
ffc223dc: 7f b9 eb 78 mr r25,r29 <== NOT EXECUTED
}
/* Create mount point base */
mount_point = malloc( mount_base_size + 1 + disk_file_name_size + RTEMS_BDPART_NUMBER_SIZE);
ffc223e0: 7f 19 e2 14 add r24,r25,r28 <== NOT EXECUTED
ffc223e4: 38 78 00 05 addi r3,r24,5 <== NOT EXECUTED
ffc223e8: 4b fe 1f 31 bl ffc04318 <malloc> <== NOT EXECUTED
if (mount_point == NULL) {
esc = RTEMS_NO_MEMORY;
ffc223ec: 3b c0 00 1a li r30,26 <== 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) {
ffc223f0: 7c 7f 1b 79 mr. r31,r3 <== NOT EXECUTED
ffc223f4: 41 82 00 dc beq- ffc224d0 <rtems_bdpart_mount+0x170> <== NOT EXECUTED
esc = RTEMS_NO_MEMORY;
goto cleanup;
}
strncpy( mount_point, mount_base, mount_base_size);
ffc223f8: 7f 85 e3 78 mr r5,r28 <== NOT EXECUTED
ffc223fc: 7e e4 bb 78 mr r4,r23 <== NOT EXECUTED
ffc22400: 48 01 e2 71 bl ffc40670 <strncpy> <== NOT EXECUTED
mount_point [mount_base_size] = '/';
ffc22404: 39 20 00 2f li r9,47 <== NOT EXECUTED
ffc22408: 7d 3f e1 ae stbx r9,r31,r28 <== NOT EXECUTED
strncpy( mount_point + mount_base_size + 1, disk_file_name, disk_file_name_size);
ffc2240c: 38 7c 00 01 addi r3,r28,1 <== NOT EXECUTED
ffc22410: 7f 44 d3 78 mr r4,r26 <== NOT EXECUTED
ffc22414: 7c 7f 1a 14 add r3,r31,r3 <== NOT EXECUTED
ffc22418: 7f 25 cb 78 mr r5,r25 <== NOT EXECUTED
/* Markers */
logical_disk_marker = logical_disk_name + disk_name_size;
mount_marker = mount_point + mount_base_size + 1 + disk_file_name_size;
ffc2241c: 3b 18 00 01 addi r24,r24,1 <== NOT EXECUTED
esc = RTEMS_NO_MEMORY;
goto cleanup;
}
strncpy( mount_point, mount_base, mount_base_size);
mount_point [mount_base_size] = '/';
strncpy( mount_point + mount_base_size + 1, disk_file_name, disk_file_name_size);
ffc22420: 48 01 e2 51 bl ffc40670 <strncpy> <== NOT EXECUTED
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) {
/* Create logical disk name */
int rv = snprintf( logical_disk_marker, RTEMS_BDPART_NUMBER_SIZE, "%zu", i + 1);
ffc22424: 3f 80 ff c6 lis r28,-58 <== NOT EXECUTED
esc = RTEMS_IO_ERROR;
goto cleanup;
}
/* Mount */
rv = mount(
ffc22428: 3f 40 ff c6 lis r26,-58 <== NOT EXECUTED
strncpy( mount_point, mount_base, mount_base_size);
mount_point [mount_base_size] = '/';
strncpy( mount_point + mount_base_size + 1, disk_file_name, disk_file_name_size);
/* Markers */
logical_disk_marker = logical_disk_name + disk_name_size;
ffc2242c: 7f bb ea 14 add r29,r27,r29 <== NOT EXECUTED
mount_marker = mount_point + mount_base_size + 1 + disk_file_name_size;
ffc22430: 7f 1f c2 14 add r24,r31,r24 <== NOT EXECUTED
/* Mount supported file systems for each partition */
for (i = 0; i < count; ++i) {
ffc22434: 3b c0 00 00 li r30,0 <== NOT EXECUTED
/* Create logical disk name */
int rv = snprintf( logical_disk_marker, RTEMS_BDPART_NUMBER_SIZE, "%zu", i + 1);
ffc22438: 3b 9c c9 1b addi r28,r28,-14053 <== NOT EXECUTED
esc = RTEMS_IO_ERROR;
goto cleanup;
}
/* Mount */
rv = mount(
ffc2243c: 3b 5a ab aa addi r26,r26,-21590 <== 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) {
ffc22440: 48 00 00 74 b ffc224b4 <rtems_bdpart_mount+0x154> <== NOT EXECUTED
/* Create logical disk name */
int rv = snprintf( logical_disk_marker, RTEMS_BDPART_NUMBER_SIZE, "%zu", i + 1);
ffc22444: 3b de 00 01 addi r30,r30,1 <== NOT EXECUTED
ffc22448: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED
ffc2244c: 38 80 00 04 li r4,4 <== NOT EXECUTED
ffc22450: 7f 85 e3 78 mr r5,r28 <== NOT EXECUTED
ffc22454: 7f c6 f3 78 mr r6,r30 <== NOT EXECUTED
ffc22458: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc2245c: 48 01 d1 59 bl ffc3f5b4 <snprintf> <== NOT EXECUTED
if (rv >= RTEMS_BDPART_NUMBER_SIZE) {
ffc22460: 2f 83 00 03 cmpwi cr7,r3,3 <== NOT EXECUTED
ffc22464: 41 9d 00 60 bgt- cr7,ffc224c4 <rtems_bdpart_mount+0x164><== NOT EXECUTED
esc = RTEMS_INVALID_NAME;
goto cleanup;
}
/* Create mount point */
strncpy( mount_marker, logical_disk_marker, RTEMS_BDPART_NUMBER_SIZE);
ffc22468: 7f a4 eb 78 mr r4,r29 <== NOT EXECUTED
ffc2246c: 38 a0 00 04 li r5,4 <== NOT EXECUTED
ffc22470: 7f 03 c3 78 mr r3,r24 <== NOT EXECUTED
ffc22474: 48 01 e1 fd bl ffc40670 <strncpy> <== NOT EXECUTED
rv = rtems_mkdir( mount_point, S_IRWXU | S_IRWXG | S_IRWXO);
ffc22478: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc2247c: 38 80 01 ff li r4,511 <== NOT EXECUTED
ffc22480: 48 00 41 05 bl ffc26584 <rtems_mkdir> <== NOT EXECUTED
if (rv != 0) {
ffc22484: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc22488: 40 9e 00 44 bne- cr7,ffc224cc <rtems_bdpart_mount+0x16c><== NOT EXECUTED
esc = RTEMS_IO_ERROR;
goto cleanup;
}
/* Mount */
rv = mount(
ffc2248c: 7f 63 db 78 mr r3,r27 <== NOT EXECUTED
ffc22490: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED
ffc22494: 7f 45 d3 78 mr r5,r26 <== NOT EXECUTED
ffc22498: 38 c0 00 00 li r6,0 <== NOT EXECUTED
ffc2249c: 38 e0 00 00 li r7,0 <== NOT EXECUTED
ffc224a0: 4b fe 20 8d bl ffc0452c <mount> <== NOT EXECUTED
mount_point,
"msdos",
0,
NULL
);
if (rv != 0) {
ffc224a4: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc224a8: 41 be 00 0c beq+ cr7,ffc224b4 <rtems_bdpart_mount+0x154><== NOT EXECUTED
rmdir( mount_point);
ffc224ac: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc224b0: 48 00 40 19 bl ffc264c8 <rmdir> <== 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) {
ffc224b4: 7f 9e b0 00 cmpw cr7,r30,r22 <== NOT EXECUTED
ffc224b8: 40 9e ff 8c bne+ cr7,ffc22444 <rtems_bdpart_mount+0xe4> <== NOT EXECUTED
const rtems_bdpart_partition *pt __attribute__((unused)),
size_t count,
const char *mount_base
)
{
rtems_status_code esc = RTEMS_SUCCESSFUL;
ffc224bc: 3b c0 00 00 li r30,0 <== NOT EXECUTED
ffc224c0: 48 00 00 10 b ffc224d0 <rtems_bdpart_mount+0x170> <== 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;
ffc224c4: 3b c0 00 03 li r30,3 <== NOT EXECUTED
ffc224c8: 48 00 00 08 b ffc224d0 <rtems_bdpart_mount+0x170> <== 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;
ffc224cc: 3b c0 00 1b li r30,27 <== NOT EXECUTED
}
}
cleanup:
free( logical_disk_name);
ffc224d0: 7f 63 db 78 mr r3,r27 <== NOT EXECUTED
ffc224d4: 4b fe 1a a9 bl ffc03f7c <free> <== NOT EXECUTED
free( mount_point);
ffc224d8: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc224dc: 4b fe 1a a1 bl ffc03f7c <free> <== NOT EXECUTED
return esc;
ffc224e0: 48 00 00 04 b ffc224e4 <rtems_bdpart_mount+0x184> <== NOT EXECUTED
}
ffc224e4: 39 61 00 30 addi r11,r1,48 <== NOT EXECUTED
ffc224e8: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc224ec: 48 03 1f fc b ffc544e8 <_restgpr_22_x> <== NOT EXECUTED
ffc046a8 <rtems_bdpart_new_record>:
static rtems_status_code rtems_bdpart_new_record(
rtems_disk_device *dd,
rtems_blkdev_bnum index,
rtems_bdbuf_buffer **block
)
{
ffc046a8: 94 21 ff e0 stwu r1,-32(r1)
ffc046ac: 7c 08 02 a6 mflr r0
ffc046b0: 90 01 00 24 stw r0,36(r1)
ffc046b4: bf a1 00 14 stmw r29,20(r1)
ffc046b8: 7c 7d 1b 78 mr r29,r3
ffc046bc: 7c bf 2b 78 mr r31,r5
rtems_status_code sc = RTEMS_SUCCESSFUL;
/* Synchronize previous block if necessary */
if (*block != NULL) {
ffc046c0: 80 65 00 00 lwz r3,0(r5)
ffc046c4: 2f 83 00 00 cmpwi cr7,r3,0
ffc046c8: 40 be 00 1c bne+ cr7,ffc046e4 <rtems_bdpart_new_record+0x3c>
return sc;
}
}
/* Read the new record block (this accounts for disk block sizes > 512) */
sc = rtems_bdbuf_read( dd, index, block);
ffc046cc: 7f a3 eb 78 mr r3,r29
ffc046d0: 7f e5 fb 78 mr r5,r31
ffc046d4: 48 00 c6 a5 bl ffc10d78 <rtems_bdbuf_read>
if (sc != RTEMS_SUCCESSFUL) {
ffc046d8: 7c 7e 1b 79 mr. r30,r3
ffc046dc: 41 a2 00 20 beq+ ffc046fc <rtems_bdpart_new_record+0x54><== ALWAYS TAKEN
ffc046e0: 48 00 00 60 b ffc04740 <rtems_bdpart_new_record+0x98><== NOT EXECUTED
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
/* Synchronize previous block if necessary */
if (*block != NULL) {
sc = rtems_bdbuf_sync( *block);
ffc046e4: 90 81 00 08 stw r4,8(r1)
ffc046e8: 48 00 c9 dd bl ffc110c4 <rtems_bdbuf_sync>
if (sc != RTEMS_SUCCESSFUL) {
ffc046ec: 7c 7e 1b 79 mr. r30,r3
ffc046f0: 80 81 00 08 lwz r4,8(r1)
ffc046f4: 41 82 ff d8 beq+ ffc046cc <rtems_bdpart_new_record+0x24><== ALWAYS TAKEN
ffc046f8: 48 00 00 48 b ffc04740 <rtems_bdpart_new_record+0x98><== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
return sc;
}
/* just in case block did not get filled in */
if ( *block == NULL ) {
ffc046fc: 81 3f 00 00 lwz r9,0(r31)
ffc04700: 2f 89 00 00 cmpwi cr7,r9,0
ffc04704: 41 9e 00 38 beq- cr7,ffc0473c <rtems_bdpart_new_record+0x94><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
}
/* Clear record */
memset( (*block)->buffer, 0, RTEMS_BDPART_BLOCK_SIZE);
ffc04708: 80 69 00 1c lwz r3,28(r9)
ffc0470c: 38 80 00 00 li r4,0
ffc04710: 38 a0 02 00 li r5,512
ffc04714: 48 01 24 e5 bl ffc16bf8 <memset>
/* Write signature */
(*block)->buffer [RTEMS_BDPART_MBR_OFFSET_SIGNATURE_0] =
ffc04718: 81 3f 00 00 lwz r9,0(r31)
ffc0471c: 39 40 00 55 li r10,85
ffc04720: 81 29 00 1c lwz r9,28(r9)
ffc04724: 99 49 01 fe stb r10,510(r9)
RTEMS_BDPART_MBR_SIGNATURE_0;
(*block)->buffer [RTEMS_BDPART_MBR_OFFSET_SIGNATURE_1] =
ffc04728: 39 40 ff aa li r10,-86
ffc0472c: 81 3f 00 00 lwz r9,0(r31)
ffc04730: 81 29 00 1c lwz r9,28(r9)
ffc04734: 99 49 01 ff stb r10,511(r9)
ffc04738: 48 00 00 08 b ffc04740 <rtems_bdpart_new_record+0x98>
return sc;
}
/* just in case block did not get filled in */
if ( *block == NULL ) {
return RTEMS_INVALID_ADDRESS;
ffc0473c: 3b c0 00 09 li r30,9 <== NOT EXECUTED
RTEMS_BDPART_MBR_SIGNATURE_0;
(*block)->buffer [RTEMS_BDPART_MBR_OFFSET_SIGNATURE_1] =
RTEMS_BDPART_MBR_SIGNATURE_1;
return RTEMS_SUCCESSFUL;
}
ffc04740: 39 61 00 20 addi r11,r1,32
ffc04744: 7f c3 f3 78 mr r3,r30
ffc04748: 4b ff c0 a4 b ffc007ec <_restgpr_29_x>
ffc0424c <rtems_bdpart_read>:
const char *disk_name,
rtems_bdpart_format *format,
rtems_bdpart_partition *pt,
size_t *count
)
{
ffc0424c: 94 21 ff b0 stwu r1,-80(r1)
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_status_code esc = RTEMS_SUCCESSFUL;
rtems_bdbuf_buffer *block = NULL;
ffc04250: 39 20 00 00 li r9,0
const char *disk_name,
rtems_bdpart_format *format,
rtems_bdpart_partition *pt,
size_t *count
)
{
ffc04254: 7c 08 02 a6 mflr r0
ffc04258: be e1 00 2c stmw r23,44(r1)
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);
ffc0425c: 7c dd 33 79 mr. r29,r6
const char *disk_name,
rtems_bdpart_format *format,
rtems_bdpart_partition *pt,
size_t *count
)
{
ffc04260: 7c 9b 23 78 mr r27,r4
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_status_code esc = RTEMS_SUCCESSFUL;
rtems_bdbuf_buffer *block = NULL;
ffc04264: 91 21 00 1c stw r9,28(r1)
rtems_bdpart_partition *p = pt - 1;
ffc04268: 39 25 ff d0 addi r9,r5,-48
const char *disk_name,
rtems_bdpart_format *format,
rtems_bdpart_partition *pt,
size_t *count
)
{
ffc0426c: 7c bc 2b 78 mr r28,r5
ffc04270: 90 01 00 54 stw r0,84(r1)
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_status_code esc = RTEMS_SUCCESSFUL;
rtems_bdbuf_buffer *block = NULL;
rtems_bdpart_partition *p = pt - 1;
ffc04274: 91 21 00 18 stw r9,24(r1)
const rtems_bdpart_partition *p_end = pt + (count != NULL ? *count : 0);
ffc04278: 41 82 00 10 beq- ffc04288 <rtems_bdpart_read+0x3c> <== NEVER TAKEN
ffc0427c: 83 5d 00 00 lwz r26,0(r29)
ffc04280: 1f 5a 00 30 mulli r26,r26,48
ffc04284: 48 00 00 08 b ffc0428c <rtems_bdpart_read+0x40>
ffc04288: 3b 40 00 00 li r26,0 <== NOT EXECUTED
const uint8_t *data = NULL;
int fd = -1;
rtems_disk_device *dd = NULL;
/* Check parameter */
if (format == NULL || pt == NULL || count == NULL) {
ffc0428c: 2f 9b 00 00 cmpwi cr7,r27,0
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);
rtems_blkdev_bnum ep_begin = 0; /* Extended partition begin */
ffc04290: 39 20 00 00 li r9,0
rtems_blkdev_bnum ebr = 0; /* Extended boot record block index */
rtems_blkdev_bnum disk_end = 0;
size_t i = 0;
const uint8_t *data = NULL;
int fd = -1;
ffc04294: 39 40 ff ff li r10,-1
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);
rtems_blkdev_bnum ep_begin = 0; /* Extended partition begin */
ffc04298: 91 21 00 14 stw r9,20(r1)
int fd = -1;
rtems_disk_device *dd = NULL;
/* Check parameter */
if (format == NULL || pt == NULL || count == NULL) {
return RTEMS_INVALID_ADDRESS;
ffc0429c: 3b e0 00 09 li r31,9
rtems_bdbuf_buffer *block = NULL;
rtems_bdpart_partition *p = pt - 1;
const rtems_bdpart_partition *p_end = pt + (count != NULL ? *count : 0);
rtems_blkdev_bnum ep_begin = 0; /* Extended partition begin */
rtems_blkdev_bnum ebr = 0; /* Extended boot record block index */
rtems_blkdev_bnum disk_end = 0;
ffc042a0: 91 21 00 10 stw r9,16(r1)
size_t i = 0;
const uint8_t *data = NULL;
int fd = -1;
ffc042a4: 91 41 00 0c stw r10,12(r1)
rtems_disk_device *dd = NULL;
ffc042a8: 91 21 00 08 stw r9,8(r1)
/* Check parameter */
if (format == NULL || pt == NULL || count == NULL) {
ffc042ac: 41 9e 01 e8 beq- cr7,ffc04494 <rtems_bdpart_read+0x248> <== NEVER TAKEN
ffc042b0: 2f 9c 00 00 cmpwi cr7,r28,0
ffc042b4: 41 9e 01 e0 beq- cr7,ffc04494 <rtems_bdpart_read+0x248> <== NEVER TAKEN
ffc042b8: 2f 9d 00 00 cmpwi cr7,r29,0
ffc042bc: 41 9e 01 d8 beq- cr7,ffc04494 <rtems_bdpart_read+0x248> <== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
}
/* Set count to a save value */
*count = 0;
ffc042c0: 91 3d 00 00 stw r9,0(r29)
/* Get disk data */
sc = rtems_bdpart_get_disk_data( disk_name, &fd, &dd, &disk_end);
ffc042c4: 38 81 00 0c addi r4,r1,12
ffc042c8: 38 a1 00 08 addi r5,r1,8
ffc042cc: 38 c1 00 10 addi r6,r1,16
ffc042d0: 4b ff fe b5 bl ffc04184 <rtems_bdpart_get_disk_data>
if (sc != RTEMS_SUCCESSFUL) {
ffc042d4: 7c 7f 1b 79 mr. r31,r3
ffc042d8: 40 a2 01 bc bne+ ffc04494 <rtems_bdpart_read+0x248> <== NEVER TAKEN
return sc;
}
/* Read MBR */
sc = rtems_bdpart_read_record( dd, 0, &block);
ffc042dc: 80 61 00 08 lwz r3,8(r1)
ffc042e0: 38 80 00 00 li r4,0
ffc042e4: 38 a1 00 1c addi r5,r1,28
ffc042e8: 4b ff fc d1 bl ffc03fb8 <rtems_bdpart_read_record>
if (sc != RTEMS_SUCCESSFUL) {
ffc042ec: 2f 83 00 00 cmpwi cr7,r3,0
ffc042f0: 7c 7f 1b 78 mr r31,r3
ffc042f4: 40 be 01 80 bne+ cr7,ffc04474 <rtems_bdpart_read+0x228> <== NEVER TAKEN
esc = sc;
goto cleanup;
}
/* Read the first partition entry */
data = block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0;
ffc042f8: 81 21 00 1c lwz r9,28(r1)
{
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);
ffc042fc: 7f 5c d2 14 add r26,r28,r26
goto cleanup;
}
/* Read the first partition entry */
data = block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0;
sc = rtems_bdpart_read_mbr_partition( data, &p, p_end, &ep_begin);
ffc04300: 3b 01 00 18 addi r24,r1,24
esc = sc;
goto cleanup;
}
/* Read the first partition entry */
data = block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0;
ffc04304: 82 e9 00 1c lwz r23,28(r9)
sc = rtems_bdpart_read_mbr_partition( data, &p, p_end, &ep_begin);
ffc04308: 3b 21 00 14 addi r25,r1,20
ffc0430c: 7f 04 c3 78 mr r4,r24
esc = sc;
goto cleanup;
}
/* Read the first partition entry */
data = block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0;
ffc04310: 3b d7 01 be addi r30,r23,446
sc = rtems_bdpart_read_mbr_partition( data, &p, p_end, &ep_begin);
ffc04314: 7f c3 f3 78 mr r3,r30
ffc04318: 7f 45 d3 78 mr r5,r26
ffc0431c: 7f 26 cb 78 mr r6,r25
ffc04320: 4b ff fd 59 bl ffc04078 <rtems_bdpart_read_mbr_partition>
if (sc != RTEMS_SUCCESSFUL) {
ffc04324: 2f 83 00 00 cmpwi cr7,r3,0
ffc04328: 7c 7f 1b 78 mr r31,r3
ffc0432c: 40 9e 01 48 bne- cr7,ffc04474 <rtems_bdpart_read+0x228> <== NEVER TAKEN
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) {
ffc04330: 81 21 00 18 lwz r9,24(r1)
esc = RTEMS_NOT_IMPLEMENTED;
ffc04334: 3b e0 00 18 li r31,24
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) {
ffc04338: 89 29 00 08 lbz r9,8(r9)
ffc0433c: 2f 89 00 ee cmpwi cr7,r9,238
ffc04340: 41 9e 01 34 beq- cr7,ffc04474 <rtems_bdpart_read+0x228> <== NEVER TAKEN
}
/* Set format */
format->type = RTEMS_BDPART_FORMAT_MBR;
format->mbr.disk_id = rtems_uint32_from_little_endian(
block->buffer + RTEMS_BDPART_MBR_OFFSET_DISK_ID
ffc04344: 81 21 00 1c lwz r9,28(r1)
}
return RTEMS_SUCCESSFUL;
}
rtems_status_code rtems_bdpart_read(
ffc04348: 3a f7 01 ee addi r23,r23,494
esc = RTEMS_NOT_IMPLEMENTED;
goto cleanup;
}
/* Set format */
format->type = RTEMS_BDPART_FORMAT_MBR;
ffc0434c: 90 7b 00 00 stw r3,0(r27)
format->mbr.disk_id = rtems_uint32_from_little_endian(
ffc04350: 80 69 00 1c lwz r3,28(r9)
ffc04354: 38 63 01 b8 addi r3,r3,440
ffc04358: 4b ff fc 35 bl ffc03f8c <rtems_uint32_from_little_endian>
block->buffer + RTEMS_BDPART_MBR_OFFSET_DISK_ID
);
format->mbr.dos_compatibility = true;
ffc0435c: 39 20 00 01 li r9,1
goto cleanup;
}
/* Set format */
format->type = RTEMS_BDPART_FORMAT_MBR;
format->mbr.disk_id = rtems_uint32_from_little_endian(
ffc04360: 90 7b 00 04 stw r3,4(r27)
block->buffer + RTEMS_BDPART_MBR_OFFSET_DISK_ID
);
format->mbr.dos_compatibility = true;
ffc04364: 99 3b 00 08 stb r9,8(r27)
/* Iterate through the rest of the primary partition table */
for (i = 1; i < 4; ++i) {
data += RTEMS_BDPART_MBR_TABLE_ENTRY_SIZE;
ffc04368: 3b de 00 10 addi r30,r30,16
sc = rtems_bdpart_read_mbr_partition( data, &p, p_end, &ep_begin);
ffc0436c: 7f c3 f3 78 mr r3,r30
ffc04370: 7f 04 c3 78 mr r4,r24
ffc04374: 7f 45 d3 78 mr r5,r26
ffc04378: 7f 26 cb 78 mr r6,r25
ffc0437c: 4b ff fc fd bl ffc04078 <rtems_bdpart_read_mbr_partition>
if (sc != RTEMS_SUCCESSFUL) {
ffc04380: 2c 03 00 00 cmpwi r3,0
ffc04384: 40 82 00 ec bne- ffc04470 <rtems_bdpart_read+0x224> <== 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) {
ffc04388: 7f 9e b8 00 cmpw cr7,r30,r23
ffc0438c: 40 9e ff dc bne+ cr7,ffc04368 <rtems_bdpart_read+0x11c>
goto cleanup;
}
}
/* Iterate through the logical partitions within the extended partition */
ebr = ep_begin;
ffc04390: 83 e1 00 14 lwz r31,20(r1)
while (ebr != 0) {
ffc04394: 48 00 00 ac b ffc04440 <rtems_bdpart_read+0x1f4>
rtems_blkdev_bnum tmp = 0;
/* Read EBR */
sc = rtems_bdpart_read_record( dd, ebr, &block);
ffc04398: 80 61 00 08 lwz r3,8(r1)
ffc0439c: 7f e4 fb 78 mr r4,r31
ffc043a0: 38 a1 00 1c addi r5,r1,28
ffc043a4: 4b ff fc 15 bl ffc03fb8 <rtems_bdpart_read_record>
if (sc != RTEMS_SUCCESSFUL) {
ffc043a8: 2c 03 00 00 cmpwi r3,0
ffc043ac: 40 82 00 c4 bne- ffc04470 <rtems_bdpart_read+0x224> <== NEVER TAKEN
goto cleanup;
}
/* Read first partition entry */
sc = rtems_bdpart_read_mbr_partition(
block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0,
ffc043b0: 81 21 00 1c lwz r9,28(r1)
esc = sc;
goto cleanup;
}
/* Read first partition entry */
sc = rtems_bdpart_read_mbr_partition(
ffc043b4: 7f 04 c3 78 mr r4,r24
ffc043b8: 7f 45 d3 78 mr r5,r26
ffc043bc: 80 69 00 1c lwz r3,28(r9)
ffc043c0: 38 c0 00 00 li r6,0
ffc043c4: 38 63 01 be addi r3,r3,446
ffc043c8: 4b ff fc b1 bl ffc04078 <rtems_bdpart_read_mbr_partition>
block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0,
&p,
p_end,
NULL
);
if (sc != RTEMS_SUCCESSFUL) {
ffc043cc: 2c 03 00 00 cmpwi r3,0
ffc043d0: 40 82 00 a0 bne- ffc04470 <rtems_bdpart_read+0x224> <== NEVER TAKEN
esc = sc;
goto cleanup;
}
/* Adjust partition begin */
tmp = p->begin + ebr;
ffc043d4: 81 21 00 18 lwz r9,24(r1)
ffc043d8: 81 49 00 00 lwz r10,0(r9)
ffc043dc: 7d 1f 52 14 add r8,r31,r10
if (tmp > p->begin) {
ffc043e0: 7f 88 50 40 cmplw cr7,r8,r10
ffc043e4: 41 bd 00 0c bgt+ cr7,ffc043f0 <rtems_bdpart_read+0x1a4> <== ALWAYS TAKEN
p->begin = tmp;
} else {
esc = RTEMS_IO_ERROR;
ffc043e8: 3b e0 00 1b li r31,27 <== NOT EXECUTED
ffc043ec: 48 00 00 88 b ffc04474 <rtems_bdpart_read+0x228> <== NOT EXECUTED
goto cleanup;
}
/* Adjust partition end */
tmp = p->end + ebr;
ffc043f0: 81 49 00 04 lwz r10,4(r9)
}
/* Adjust partition begin */
tmp = p->begin + ebr;
if (tmp > p->begin) {
p->begin = tmp;
ffc043f4: 91 09 00 00 stw r8,0(r9)
esc = RTEMS_IO_ERROR;
goto cleanup;
}
/* Adjust partition end */
tmp = p->end + ebr;
ffc043f8: 7f ff 52 14 add r31,r31,r10
if (tmp > p->end) {
ffc043fc: 7f 9f 50 40 cmplw cr7,r31,r10
ffc04400: 40 bd ff e8 ble- cr7,ffc043e8 <rtems_bdpart_read+0x19c> <== NEVER TAKEN
p->end = tmp;
ffc04404: 93 e9 00 04 stw r31,4(r9)
goto cleanup;
}
/* Read second partition entry for next EBR block */
ebr = rtems_bdpart_next_ebr(
block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_1
ffc04408: 81 21 00 1c lwz r9,28(r1)
ffc0440c: 83 c9 00 1c lwz r30,28(r9)
== RTEMS_BDPART_MBR_SIGNATURE_1;
}
static rtems_blkdev_bnum rtems_bdpart_next_ebr( const uint8_t *data)
{
rtems_blkdev_bnum begin =
ffc04410: 38 7e 01 d6 addi r3,r30,470
ffc04414: 4b ff fb 79 bl ffc03f8c <rtems_uint32_from_little_endian>
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) {
ffc04418: 89 3e 01 d2 lbz r9,466(r30)
ffc0441c: 2f 89 00 05 cmpwi cr7,r9,5
ffc04420: 40 be 00 28 bne+ cr7,ffc04448 <rtems_bdpart_read+0x1fc>
/* Read second partition entry for next EBR block */
ebr = rtems_bdpart_next_ebr(
block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_1
);
if (ebr != 0) {
ffc04424: 2f 83 00 00 cmpwi cr7,r3,0
ffc04428: 41 9e 00 20 beq- cr7,ffc04448 <rtems_bdpart_read+0x1fc> <== NEVER TAKEN
/* Adjust partition EBR block index */
tmp = ebr + ep_begin;
ffc0442c: 81 21 00 14 lwz r9,20(r1)
ffc04430: 7d 23 4a 14 add r9,r3,r9
if (tmp > ebr) {
ffc04434: 7f 89 18 40 cmplw cr7,r9,r3
ffc04438: 40 bd ff b0 ble- cr7,ffc043e8 <rtems_bdpart_read+0x19c> <== NEVER TAKEN
ffc0443c: 7d 3f 4b 78 mr r31,r9
}
}
/* Iterate through the logical partitions within the extended partition */
ebr = ep_begin;
while (ebr != 0) {
ffc04440: 2f 9f 00 00 cmpwi cr7,r31,0
ffc04444: 40 9e ff 54 bne+ cr7,ffc04398 <rtems_bdpart_read+0x14c> <== ALWAYS TAKEN
}
}
}
/* Return partition count */
*count = (size_t) (p - pt + 1);
ffc04448: 81 21 00 18 lwz r9,24(r1)
ffc0444c: 3d 40 aa aa lis r10,-21846
ffc04450: 61 4a aa ab ori r10,r10,43691
ffc04454: 7d 3c 48 50 subf r9,r28,r9
ffc04458: 7d 29 26 70 srawi r9,r9,4
ffc0445c: 7d 29 51 d6 mullw r9,r9,r10
rtems_bdpart_partition *pt,
size_t *count
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_status_code esc = RTEMS_SUCCESSFUL;
ffc04460: 3b e0 00 00 li r31,0
}
}
}
/* Return partition count */
*count = (size_t) (p - pt + 1);
ffc04464: 39 29 00 01 addi r9,r9,1
ffc04468: 91 3d 00 00 stw r9,0(r29)
ffc0446c: 48 00 00 08 b ffc04474 <rtems_bdpart_read+0x228>
esc = sc;
goto cleanup;
}
/* Read first partition entry */
sc = rtems_bdpart_read_mbr_partition(
ffc04470: 7c 7f 1b 78 mr r31,r3 <== NOT EXECUTED
/* Return partition count */
*count = (size_t) (p - pt + 1);
cleanup:
if (fd >= 0) {
ffc04474: 80 61 00 0c lwz r3,12(r1)
ffc04478: 2f 83 00 00 cmpwi cr7,r3,0
ffc0447c: 41 9c 00 08 blt- cr7,ffc04484 <rtems_bdpart_read+0x238> <== NEVER TAKEN
close( fd);
ffc04480: 48 00 22 25 bl ffc066a4 <close>
}
if (block != NULL) {
ffc04484: 80 61 00 1c lwz r3,28(r1)
ffc04488: 2f 83 00 00 cmpwi cr7,r3,0
ffc0448c: 41 9e 00 08 beq- cr7,ffc04494 <rtems_bdpart_read+0x248> <== NEVER TAKEN
rtems_bdbuf_release( block);
ffc04490: 48 00 ca e1 bl ffc10f70 <rtems_bdbuf_release>
}
return esc;
}
ffc04494: 39 61 00 50 addi r11,r1,80
ffc04498: 7f e3 fb 78 mr r3,r31
ffc0449c: 4b ff c3 38 b ffc007d4 <_restgpr_23_x>
ffc04078 <rtems_bdpart_read_mbr_partition>:
const uint8_t *data,
rtems_bdpart_partition **p,
const rtems_bdpart_partition *p_end,
rtems_blkdev_bnum *ep_begin
)
{
ffc04078: 94 21 ff d8 stwu r1,-40(r1)
ffc0407c: 7c 08 02 a6 mflr r0
ffc04080: bf 21 00 0c stmw r25,12(r1)
ffc04084: 7c 7f 1b 78 mr r31,r3
rtems_blkdev_bnum begin =
ffc04088: 38 63 00 08 addi r3,r3,8
const uint8_t *data,
rtems_bdpart_partition **p,
const rtems_bdpart_partition *p_end,
rtems_blkdev_bnum *ep_begin
)
{
ffc0408c: 90 01 00 2c stw r0,44(r1)
ffc04090: 7c 9e 23 78 mr r30,r4
ffc04094: 7c b9 2b 78 mr r25,r5
ffc04098: 7c da 33 78 mr r26,r6
rtems_blkdev_bnum begin =
ffc0409c: 4b ff fe f1 bl ffc03f8c <rtems_uint32_from_little_endian>
ffc040a0: 7c 7d 1b 78 mr r29,r3
rtems_uint32_from_little_endian( data + RTEMS_BDPART_MBR_OFFSET_BEGIN);
rtems_blkdev_bnum size =
ffc040a4: 38 7f 00 0c addi r3,r31,12
ffc040a8: 4b ff fe e5 bl ffc03f8c <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];
ffc040ac: 8b 9f 00 04 lbz r28,4(r31)
if (type == RTEMS_BDPART_MBR_EMPTY) {
ffc040b0: 2f 9c 00 00 cmpwi cr7,r28,0
ffc040b4: 41 9e 00 7c beq- cr7,ffc04130 <rtems_bdpart_read_mbr_partition+0xb8><== NEVER TAKEN
return RTEMS_SUCCESSFUL;
} else if (*p == p_end) {
ffc040b8: 81 5e 00 00 lwz r10,0(r30)
return RTEMS_TOO_MANY;
ffc040bc: 39 20 00 05 li r9,5
rtems_blkdev_bnum end = begin + size;
uint8_t type = data [RTEMS_BDPART_MBR_OFFSET_TYPE];
if (type == RTEMS_BDPART_MBR_EMPTY) {
return RTEMS_SUCCESSFUL;
} else if (*p == p_end) {
ffc040c0: 7f 8a c8 00 cmpw cr7,r10,r25
ffc040c4: 41 9e 00 70 beq- cr7,ffc04134 <rtems_bdpart_read_mbr_partition+0xbc><== 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;
ffc040c8: 7f 63 ea 14 add r27,r3,r29
if (type == RTEMS_BDPART_MBR_EMPTY) {
return RTEMS_SUCCESSFUL;
} else if (*p == p_end) {
return RTEMS_TOO_MANY;
} else if (begin >= end) {
ffc040cc: 7f 9d d8 40 cmplw cr7,r29,r27
return RTEMS_IO_ERROR;
ffc040d0: 39 20 00 1b li r9,27
if (type == RTEMS_BDPART_MBR_EMPTY) {
return RTEMS_SUCCESSFUL;
} else if (*p == p_end) {
return RTEMS_TOO_MANY;
} else if (begin >= end) {
ffc040d4: 40 bc 00 60 bge+ cr7,ffc04134 <rtems_bdpart_read_mbr_partition+0xbc><== NEVER TAKEN
return RTEMS_IO_ERROR;
} else if (type == RTEMS_BDPART_MBR_EXTENDED) {
ffc040d8: 2f 9c 00 05 cmpwi cr7,r28,5
ffc040dc: 40 9e 00 14 bne- cr7,ffc040f0 <rtems_bdpart_read_mbr_partition+0x78>
if (ep_begin != NULL) {
ffc040e0: 2f 9a 00 00 cmpwi cr7,r26,0
ffc040e4: 41 9e 00 4c beq- cr7,ffc04130 <rtems_bdpart_read_mbr_partition+0xb8><== NEVER TAKEN
*ep_begin = begin;
ffc040e8: 93 ba 00 00 stw r29,0(r26)
ffc040ec: 48 00 00 44 b ffc04130 <rtems_bdpart_read_mbr_partition+0xb8>
}
} else {
/* Increment partition index */
++(*p);
ffc040f0: 38 6a 00 30 addi r3,r10,48
ffc040f4: 90 7e 00 00 stw r3,0(r30)
/* Clear partition */
memset( *p, 0, sizeof( rtems_bdpart_partition));
ffc040f8: 38 80 00 00 li r4,0
ffc040fc: 38 a0 00 30 li r5,48
ffc04100: 48 01 2a f9 bl ffc16bf8 <memset>
/* Set values */
(*p)->begin = begin;
ffc04104: 80 9e 00 00 lwz r4,0(r30)
(*p)->end = end;
rtems_bdpart_to_partition_type( type, (*p)->type);
ffc04108: 7f 83 e3 78 mr r3,r28
/* Clear partition */
memset( *p, 0, sizeof( rtems_bdpart_partition));
/* Set values */
(*p)->begin = begin;
ffc0410c: 93 a4 00 00 stw r29,0(r4)
(*p)->end = end;
ffc04110: 93 64 00 04 stw r27,4(r4)
rtems_bdpart_to_partition_type( type, (*p)->type);
ffc04114: 38 84 00 08 addi r4,r4,8
ffc04118: 4b ff ff 41 bl ffc04058 <rtems_bdpart_to_partition_type>
(*p)->flags = data [RTEMS_BDPART_MBR_OFFSET_FLAGS];
ffc0411c: 89 5f 00 00 lbz r10,0(r31)
ffc04120: 81 3e 00 00 lwz r9,0(r30)
ffc04124: 91 49 00 2c stw r10,44(r9)
ffc04128: 39 40 00 00 li r10,0
ffc0412c: 91 49 00 28 stw r10,40(r9)
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;
ffc04130: 39 20 00 00 li r9,0
rtems_bdpart_to_partition_type( type, (*p)->type);
(*p)->flags = data [RTEMS_BDPART_MBR_OFFSET_FLAGS];
}
return RTEMS_SUCCESSFUL;
}
ffc04134: 39 61 00 28 addi r11,r1,40
ffc04138: 7d 23 4b 78 mr r3,r9
ffc0413c: 4b ff c6 a0 b ffc007dc <_restgpr_25_x>
ffc03fb8 <rtems_bdpart_read_record>:
static rtems_status_code rtems_bdpart_read_record(
rtems_disk_device *dd,
rtems_blkdev_bnum index,
rtems_bdbuf_buffer **block
)
{
ffc03fb8: 94 21 ff e8 stwu r1,-24(r1)
ffc03fbc: 7c 08 02 a6 mflr r0
ffc03fc0: 90 01 00 1c stw r0,28(r1)
ffc03fc4: bf c1 00 10 stmw r30,16(r1)
ffc03fc8: 7c 7e 1b 78 mr r30,r3
ffc03fcc: 7c bf 2b 78 mr r31,r5
rtems_status_code sc = RTEMS_SUCCESSFUL;
/* Release previous block if necessary */
if (*block != NULL) {
ffc03fd0: 80 65 00 00 lwz r3,0(r5)
ffc03fd4: 2f 83 00 00 cmpwi cr7,r3,0
ffc03fd8: 40 be 00 1c bne+ cr7,ffc03ff4 <rtems_bdpart_read_record+0x3c>
return sc;
}
}
/* Read the record block */
sc = rtems_bdbuf_read( dd, index, block);
ffc03fdc: 7f c3 f3 78 mr r3,r30
ffc03fe0: 7f e5 fb 78 mr r5,r31
ffc03fe4: 48 00 cd 95 bl ffc10d78 <rtems_bdbuf_read>
if (sc != RTEMS_SUCCESSFUL) {
ffc03fe8: 2c 03 00 00 cmpwi r3,0
ffc03fec: 41 a2 00 20 beq+ ffc0400c <rtems_bdpart_read_record+0x54><== ALWAYS TAKEN
ffc03ff0: 48 00 00 60 b ffc04050 <rtems_bdpart_read_record+0x98><== NOT EXECUTED
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
/* Release previous block if necessary */
if (*block != NULL) {
sc = rtems_bdbuf_release( *block);
ffc03ff4: 90 81 00 08 stw r4,8(r1)
ffc03ff8: 48 00 cf 79 bl ffc10f70 <rtems_bdbuf_release>
if (sc != RTEMS_SUCCESSFUL) {
ffc03ffc: 2c 03 00 00 cmpwi r3,0
ffc04000: 80 81 00 08 lwz r4,8(r1)
ffc04004: 41 82 ff d8 beq+ ffc03fdc <rtems_bdpart_read_record+0x24><== ALWAYS TAKEN
ffc04008: 48 00 00 48 b ffc04050 <rtems_bdpart_read_record+0x98><== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
return sc;
}
/* just in case block did not get filled in */
if ( *block == NULL ) {
ffc0400c: 81 3f 00 00 lwz r9,0(r31)
ffc04010: 2f 89 00 00 cmpwi cr7,r9,0
ffc04014: 41 9e 00 38 beq- cr7,ffc0404c <rtems_bdpart_read_record+0x94><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
}
/* Check MBR signature */
if (!rtems_bdpart_is_valid_record( (*block)->buffer)) {
ffc04018: 81 09 00 1c lwz r8,28(r9)
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]
ffc0401c: 39 20 00 00 li r9,0
ffc04020: 88 e8 01 fe lbz r7,510(r8)
ffc04024: 2f 87 00 55 cmpwi cr7,r7,85
ffc04028: 40 be 00 14 bne+ cr7,ffc0403c <rtems_bdpart_read_record+0x84><== NEVER TAKEN
ffc0402c: 89 28 01 ff lbz r9,511(r8)
ffc04030: 69 29 00 aa xori r9,r9,170
ffc04034: 7d 29 00 34 cntlzw r9,r9
ffc04038: 55 29 d9 7e rlwinm r9,r9,27,5,31
if ( *block == NULL ) {
return RTEMS_INVALID_ADDRESS;
}
/* Check MBR signature */
if (!rtems_bdpart_is_valid_record( (*block)->buffer)) {
ffc0403c: 2f 89 00 00 cmpwi cr7,r9,0
ffc04040: 40 9e 00 10 bne- cr7,ffc04050 <rtems_bdpart_read_record+0x98><== ALWAYS TAKEN
return RTEMS_IO_ERROR;
ffc04044: 38 60 00 1b li r3,27 <== NOT EXECUTED
ffc04048: 48 00 00 08 b ffc04050 <rtems_bdpart_read_record+0x98><== NOT EXECUTED
return sc;
}
/* just in case block did not get filled in */
if ( *block == NULL ) {
return RTEMS_INVALID_ADDRESS;
ffc0404c: 38 60 00 09 li r3,9 <== NOT EXECUTED
if (!rtems_bdpart_is_valid_record( (*block)->buffer)) {
return RTEMS_IO_ERROR;
}
return RTEMS_SUCCESSFUL;
}
ffc04050: 39 61 00 18 addi r11,r1,24
ffc04054: 4b ff c7 9c b ffc007f0 <_restgpr_30_x>
ffc044a0 <rtems_bdpart_register>:
rtems_status_code rtems_bdpart_register(
const char *disk_name,
const rtems_bdpart_partition *pt,
size_t count
)
{
ffc044a0: 94 21 ff c8 stwu r1,-56(r1)
ffc044a4: 7c 08 02 a6 mflr r0
ffc044a8: bf 01 00 18 stmw r24,24(r1)
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;
ffc044ac: 3b c0 00 00 li r30,0
rtems_status_code rtems_bdpart_register(
const char *disk_name,
const rtems_bdpart_partition *pt,
size_t count
)
{
ffc044b0: 7c 7a 1b 78 mr r26,r3
ffc044b4: 90 01 00 3c stw r0,60(r1)
ffc044b8: 7c 9d 23 78 mr r29,r4
ffc044bc: 7c b8 2b 78 mr r24,r5
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;
ffc044c0: 93 c1 00 10 stw r30,16(r1)
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);
ffc044c4: 48 01 30 e5 bl ffc175a8 <strlen>
ffc044c8: 7c 7f 1b 78 mr r31,r3
size_t i = 0;
int fd = -1;
ffc044cc: 39 20 ff ff li r9,-1
rtems_disk_device *dd = NULL;
ffc044d0: 93 c1 00 08 stw r30,8(r1)
/* Get disk data */
sc = rtems_bdpart_get_disk_data( disk_name, &fd, &dd, &disk_end);
ffc044d4: 7f 43 d3 78 mr r3,r26
ffc044d8: 38 81 00 0c addi r4,r1,12
dev_t logical_disk = 0;
char *logical_disk_name = NULL;
char *logical_disk_marker = NULL;
size_t disk_name_size = strlen( disk_name);
size_t i = 0;
int fd = -1;
ffc044dc: 91 21 00 0c stw r9,12(r1)
rtems_disk_device *dd = NULL;
/* Get disk data */
sc = rtems_bdpart_get_disk_data( disk_name, &fd, &dd, &disk_end);
ffc044e0: 38 a1 00 08 addi r5,r1,8
ffc044e4: 38 c1 00 10 addi r6,r1,16
ffc044e8: 4b ff fc 9d bl ffc04184 <rtems_bdpart_get_disk_data>
if (sc != RTEMS_SUCCESSFUL) {
ffc044ec: 7c 69 1b 79 mr. r9,r3
ffc044f0: 40 a2 00 cc bne+ ffc045bc <rtems_bdpart_register+0x11c> <== NEVER TAKEN
static inline dev_t rtems_disk_get_device_identifier(
const rtems_disk_device *dd
)
{
return dd->dev;
ffc044f4: 81 21 00 08 lwz r9,8(r1)
return sc;
}
disk = rtems_disk_get_device_identifier( dd);
close( fd);
ffc044f8: 80 61 00 0c lwz r3,12(r1)
ffc044fc: 83 69 00 00 lwz r27,0(r9)
ffc04500: 83 c9 00 04 lwz r30,4(r9)
ffc04504: 48 00 21 a1 bl ffc066a4 <close>
/* 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);
ffc04508: 38 7f 00 04 addi r3,r31,4
ffc0450c: 48 00 28 e9 bl ffc06df4 <malloc>
if (logical_disk_name == NULL) {
return RTEMS_NO_MEMORY;
ffc04510: 39 20 00 1a li r9,26
/* 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) {
ffc04514: 7c 7c 1b 79 mr. r28,r3
ffc04518: 41 82 00 a4 beq- ffc045bc <rtems_bdpart_register+0x11c> <== NEVER TAKEN
return RTEMS_NO_MEMORY;
}
strncpy( logical_disk_name, disk_name, disk_name_size);
ffc0451c: 7f 44 d3 78 mr r4,r26
ffc04520: 7f e5 fb 78 mr r5,r31
#include <string.h>
#include <rtems.h>
#include <rtems/bdpart.h>
rtems_status_code rtems_bdpart_register(
ffc04524: 7f 58 f2 14 add r26,r24,r30
/* Create logical disk name */
logical_disk_name = malloc( disk_name_size + RTEMS_BDPART_NUMBER_SIZE);
if (logical_disk_name == NULL) {
return RTEMS_NO_MEMORY;
}
strncpy( logical_disk_name, disk_name, disk_name_size);
ffc04528: 48 01 32 55 bl ffc1777c <strncpy>
/* 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);
ffc0452c: 3f 00 ff c2 lis r24,-62
logical_disk_name = malloc( disk_name_size + RTEMS_BDPART_NUMBER_SIZE);
if (logical_disk_name == NULL) {
return RTEMS_NO_MEMORY;
}
strncpy( logical_disk_name, disk_name, disk_name_size);
logical_disk_marker = logical_disk_name + disk_name_size;
ffc04530: 7f 3c fa 14 add r25,r28,r31
/* 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);
ffc04534: 3b 18 5d 98 addi r24,r24,23960
}
disk = rtems_disk_get_device_identifier( dd);
close( fd);
/* Get the disk device identifier */
rtems_filesystem_split_dev_t( disk, major, minor);
ffc04538: 7f df f3 78 mr r31,r30
}
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) {
ffc0453c: 48 00 00 58 b ffc04594 <rtems_bdpart_register+0xf4>
const rtems_bdpart_partition *p = pt + i;
int rv = 0;
/* New minor number */
++minor;
ffc04540: 3b ff 00 01 addi r31,r31,1
/* 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);
ffc04544: 7f 23 cb 78 mr r3,r25
ffc04548: 38 80 00 04 li r4,4
ffc0454c: 7f 05 c3 78 mr r5,r24
ffc04550: 7c de f8 50 subf r6,r30,r31
ffc04554: 4c c6 31 82 crclr 4*cr1+eq
ffc04558: 48 01 2a b9 bl ffc17010 <snprintf>
if (rv >= RTEMS_BDPART_NUMBER_SIZE) {
ffc0455c: 2f 83 00 03 cmpwi cr7,r3,3
ffc04560: 41 9d 00 44 bgt- cr7,ffc045a4 <rtems_bdpart_register+0x104><== NEVER TAKEN
/* Create logical disk */
sc = rtems_disk_create_log(
logical_disk,
disk,
p->begin,
p->end - p->begin,
ffc04564: 80 fd 00 00 lwz r7,0(r29)
esc = RTEMS_INVALID_NAME;
goto cleanup;
}
/* Create logical disk */
sc = rtems_disk_create_log(
ffc04568: 7f 63 db 78 mr r3,r27
ffc0456c: 81 1d 00 04 lwz r8,4(r29)
ffc04570: 7f e4 fb 78 mr r4,r31
ffc04574: 7f 65 db 78 mr r5,r27
ffc04578: 7f c6 f3 78 mr r6,r30
ffc0457c: 7d 07 40 50 subf r8,r7,r8
ffc04580: 7f 89 e3 78 mr r9,r28
ffc04584: 48 00 0d 19 bl ffc0529c <rtems_disk_create_log>
ffc04588: 3b bd 00 30 addi r29,r29,48
disk,
p->begin,
p->end - p->begin,
logical_disk_name
);
if (sc != RTEMS_SUCCESSFUL) {
ffc0458c: 2c 03 00 00 cmpwi r3,0
ffc04590: 40 82 00 1c bne- ffc045ac <rtems_bdpart_register+0x10c> <== 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) {
ffc04594: 7f 9f d0 00 cmpw cr7,r31,r26
ffc04598: 40 9e ff a8 bne+ cr7,ffc04540 <rtems_bdpart_register+0xa0>
const rtems_bdpart_partition *pt,
size_t count
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_status_code esc = RTEMS_SUCCESSFUL;
ffc0459c: 3b e0 00 00 li r31,0
ffc045a0: 48 00 00 10 b ffc045b0 <rtems_bdpart_register+0x110>
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;
ffc045a4: 3b e0 00 03 li r31,3 <== NOT EXECUTED
ffc045a8: 48 00 00 08 b ffc045b0 <rtems_bdpart_register+0x110> <== NOT EXECUTED
goto cleanup;
}
/* Create logical disk */
sc = rtems_disk_create_log(
ffc045ac: 7c 7f 1b 78 mr r31,r3 <== NOT EXECUTED
}
}
cleanup:
free( logical_disk_name);
ffc045b0: 7f 83 e3 78 mr r3,r28
ffc045b4: 48 00 21 79 bl ffc0672c <free>
return esc;
ffc045b8: 7f e9 fb 78 mr r9,r31
}
ffc045bc: 39 61 00 38 addi r11,r1,56
ffc045c0: 7d 23 4b 78 mr r3,r9
ffc045c4: 4b ff c2 14 b ffc007d8 <_restgpr_24_x>
ffc045c8 <rtems_bdpart_register_from_disk>:
rtems_status_code rtems_bdpart_register_from_disk( const char *disk_name)
{
ffc045c8: 7c 2b 0b 78 mr r11,r1
ffc045cc: 94 21 fc d0 stwu r1,-816(r1)
ffc045d0: 7c 08 02 a6 mflr r0
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;
ffc045d4: 39 20 00 10 li r9,16
/* Read partitions */
sc = rtems_bdpart_read( disk_name, &format, pt, &count);
ffc045d8: 38 81 03 08 addi r4,r1,776
return esc;
}
rtems_status_code rtems_bdpart_register_from_disk( const char *disk_name)
{
ffc045dc: 48 01 ff a9 bl ffc24584 <_savegpr_31>
rtems_bdpart_format format;
rtems_bdpart_partition pt [RTEMS_BDPART_PARTITION_NUMBER_HINT];
size_t count = RTEMS_BDPART_PARTITION_NUMBER_HINT;
/* Read partitions */
sc = rtems_bdpart_read( disk_name, &format, pt, &count);
ffc045e0: 38 a1 00 08 addi r5,r1,8
return esc;
}
rtems_status_code rtems_bdpart_register_from_disk( const char *disk_name)
{
ffc045e4: 90 01 03 34 stw r0,820(r1)
rtems_bdpart_format format;
rtems_bdpart_partition pt [RTEMS_BDPART_PARTITION_NUMBER_HINT];
size_t count = RTEMS_BDPART_PARTITION_NUMBER_HINT;
/* Read partitions */
sc = rtems_bdpart_read( disk_name, &format, pt, &count);
ffc045e8: 38 c1 03 1c addi r6,r1,796
return esc;
}
rtems_status_code rtems_bdpart_register_from_disk( const char *disk_name)
{
ffc045ec: 7c 7f 1b 78 mr r31,r3
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;
ffc045f0: 91 21 03 1c stw r9,796(r1)
/* Read partitions */
sc = rtems_bdpart_read( disk_name, &format, pt, &count);
ffc045f4: 4b ff fc 59 bl ffc0424c <rtems_bdpart_read>
if (sc != RTEMS_SUCCESSFUL) {
ffc045f8: 2c 03 00 00 cmpwi r3,0
ffc045fc: 40 a2 00 14 bne+ ffc04610 <rtems_bdpart_register_from_disk+0x48><== NEVER TAKEN
return sc;
}
/* Register partitions */
return rtems_bdpart_register( disk_name, pt, count);
ffc04600: 80 a1 03 1c lwz r5,796(r1)
ffc04604: 7f e3 fb 78 mr r3,r31
ffc04608: 38 81 00 08 addi r4,r1,8
ffc0460c: 4b ff fe 95 bl ffc044a0 <rtems_bdpart_register>
}
ffc04610: 39 61 03 30 addi r11,r1,816
ffc04614: 4b ff c1 e0 b ffc007f4 <_restgpr_31_x>
ffc224f0 <rtems_bdpart_unmount>:
const char *disk_name,
const rtems_bdpart_partition *pt __attribute__((unused)),
size_t count,
const char *mount_base
)
{
ffc224f0: 94 21 ff d8 stwu r1,-40(r1) <== NOT EXECUTED
ffc224f4: 7c 08 02 a6 mflr r0 <== NOT EXECUTED
rtems_status_code esc = RTEMS_SUCCESSFUL;
const char *disk_file_name = strrchr( disk_name, '/');
ffc224f8: 38 80 00 2f li r4,47 <== NOT EXECUTED
const char *disk_name,
const rtems_bdpart_partition *pt __attribute__((unused)),
size_t count,
const char *mount_base
)
{
ffc224fc: bf 01 00 08 stmw r24,8(r1) <== NOT EXECUTED
ffc22500: 7c d9 33 78 mr r25,r6 <== NOT EXECUTED
ffc22504: 7c b8 2b 78 mr r24,r5 <== NOT EXECUTED
ffc22508: 90 01 00 2c stw r0,44(r1) <== NOT EXECUTED
ffc2250c: 7c 7c 1b 78 mr r28,r3 <== NOT EXECUTED
rtems_status_code esc = RTEMS_SUCCESSFUL;
const char *disk_file_name = strrchr( disk_name, '/');
ffc22510: 48 01 ee 55 bl ffc41364 <strrchr> <== NOT EXECUTED
ffc22514: 7c 7f 1b 78 mr r31,r3 <== 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);
ffc22518: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED
ffc2251c: 48 01 de dd bl ffc403f8 <strlen> <== NOT EXECUTED
ffc22520: 7c 7b 1b 78 mr r27,r3 <== NOT EXECUTED
size_t mount_base_size = strlen( mount_base);
ffc22524: 7f 23 cb 78 mr r3,r25 <== NOT EXECUTED
ffc22528: 48 01 de d1 bl ffc403f8 <strlen> <== NOT EXECUTED
size_t i = 0;
/* Get disk file name */
if (disk_file_name != NULL) {
ffc2252c: 2f 9f 00 00 cmpwi cr7,r31,0 <== NOT EXECUTED
const char *disk_file_name = strrchr( disk_name, '/');
char *mount_point = NULL;
char *mount_marker = NULL;
size_t disk_file_name_size = 0;
size_t disk_name_size = strlen( disk_name);
size_t mount_base_size = strlen( mount_base);
ffc22530: 7c 7e 1b 78 mr r30,r3 <== NOT EXECUTED
size_t i = 0;
/* Get disk file name */
if (disk_file_name != NULL) {
ffc22534: 41 9e 00 14 beq- cr7,ffc22548 <rtems_bdpart_unmount+0x58><== NOT EXECUTED
disk_file_name += 1;
ffc22538: 3b 9f 00 01 addi r28,r31,1 <== NOT EXECUTED
disk_file_name_size = strlen( disk_file_name);
ffc2253c: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED
ffc22540: 48 01 de b9 bl ffc403f8 <strlen> <== NOT EXECUTED
ffc22544: 7c 7b 1b 78 mr r27,r3 <== NOT EXECUTED
disk_file_name = disk_name;
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);
ffc22548: 7f 5b f2 14 add r26,r27,r30 <== NOT EXECUTED
ffc2254c: 38 7a 00 05 addi r3,r26,5 <== NOT EXECUTED
ffc22550: 4b fe 1d c9 bl ffc04318 <malloc> <== NOT EXECUTED
if (mount_point == NULL) {
esc = RTEMS_NO_MEMORY;
ffc22554: 3b a0 00 1a li r29,26 <== 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) {
ffc22558: 7c 7f 1b 79 mr. r31,r3 <== NOT EXECUTED
ffc2255c: 41 82 00 a4 beq- ffc22600 <rtems_bdpart_unmount+0x110> <== NOT EXECUTED
esc = RTEMS_NO_MEMORY;
goto cleanup;
}
strncpy( mount_point, mount_base, mount_base_size);
ffc22560: 7f c5 f3 78 mr r5,r30 <== NOT EXECUTED
ffc22564: 7f 24 cb 78 mr r4,r25 <== NOT EXECUTED
ffc22568: 48 01 e1 09 bl ffc40670 <strncpy> <== NOT EXECUTED
mount_point [mount_base_size] = '/';
ffc2256c: 39 20 00 2f li r9,47 <== NOT EXECUTED
ffc22570: 7d 3f f1 ae stbx r9,r31,r30 <== NOT EXECUTED
strncpy( mount_point + mount_base_size + 1, disk_file_name, disk_file_name_size);
ffc22574: 38 7e 00 01 addi r3,r30,1 <== NOT EXECUTED
ffc22578: 7c 7f 1a 14 add r3,r31,r3 <== NOT EXECUTED
ffc2257c: 7f 84 e3 78 mr r4,r28 <== NOT EXECUTED
ffc22580: 7f 65 db 78 mr r5,r27 <== NOT EXECUTED
/* Marker */
mount_marker = mount_point + mount_base_size + 1 + disk_file_name_size;
ffc22584: 3b 5a 00 01 addi r26,r26,1 <== NOT EXECUTED
esc = RTEMS_NO_MEMORY;
goto cleanup;
}
strncpy( mount_point, mount_base, mount_base_size);
mount_point [mount_base_size] = '/';
strncpy( mount_point + mount_base_size + 1, disk_file_name, disk_file_name_size);
ffc22588: 48 01 e0 e9 bl ffc40670 <strncpy> <== NOT EXECUTED
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) {
/* Create mount point */
int rv = snprintf( mount_marker, RTEMS_BDPART_NUMBER_SIZE, "%zu", i + 1);
ffc2258c: 3f a0 ff c6 lis r29,-58 <== NOT EXECUTED
strncpy( mount_point, mount_base, mount_base_size);
mount_point [mount_base_size] = '/';
strncpy( mount_point + mount_base_size + 1, disk_file_name, disk_file_name_size);
/* Marker */
mount_marker = mount_point + mount_base_size + 1 + disk_file_name_size;
ffc22590: 7f 5f d2 14 add r26,r31,r26 <== NOT EXECUTED
/* Mount supported file systems for each partition */
for (i = 0; i < count; ++i) {
ffc22594: 3b c0 00 00 li r30,0 <== NOT EXECUTED
/* Create mount point */
int rv = snprintf( mount_marker, RTEMS_BDPART_NUMBER_SIZE, "%zu", i + 1);
ffc22598: 3b bd c9 1b addi r29,r29,-14053 <== 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) {
ffc2259c: 48 00 00 48 b ffc225e4 <rtems_bdpart_unmount+0xf4> <== NOT EXECUTED
/* Create mount point */
int rv = snprintf( mount_marker, RTEMS_BDPART_NUMBER_SIZE, "%zu", i + 1);
ffc225a0: 3b de 00 01 addi r30,r30,1 <== NOT EXECUTED
ffc225a4: 7f 43 d3 78 mr r3,r26 <== NOT EXECUTED
ffc225a8: 38 80 00 04 li r4,4 <== NOT EXECUTED
ffc225ac: 7f a5 eb 78 mr r5,r29 <== NOT EXECUTED
ffc225b0: 7f c6 f3 78 mr r6,r30 <== NOT EXECUTED
ffc225b4: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc225b8: 48 01 cf fd bl ffc3f5b4 <snprintf> <== NOT EXECUTED
if (rv >= RTEMS_BDPART_NUMBER_SIZE) {
ffc225bc: 2f 83 00 03 cmpwi cr7,r3,3 <== NOT EXECUTED
ffc225c0: 41 9d 00 34 bgt- cr7,ffc225f4 <rtems_bdpart_unmount+0x104><== NOT EXECUTED
esc = RTEMS_INVALID_NAME;
goto cleanup;
}
/* Unmount */
rv = unmount( mount_point);
ffc225c4: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc225c8: 48 00 46 99 bl ffc26c60 <unmount> <== NOT EXECUTED
if (rv == 0) {
ffc225cc: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc225d0: 40 be 00 14 bne+ cr7,ffc225e4 <rtems_bdpart_unmount+0xf4><== NOT EXECUTED
/* Remove mount point */
rv = rmdir( mount_point);
ffc225d4: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc225d8: 48 00 3e f1 bl ffc264c8 <rmdir> <== NOT EXECUTED
if (rv != 0) {
ffc225dc: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc225e0: 40 9e 00 1c bne- cr7,ffc225fc <rtems_bdpart_unmount+0x10c><== 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) {
ffc225e4: 7f 9e c0 00 cmpw cr7,r30,r24 <== NOT EXECUTED
ffc225e8: 40 9e ff b8 bne+ cr7,ffc225a0 <rtems_bdpart_unmount+0xb0><== NOT EXECUTED
const rtems_bdpart_partition *pt __attribute__((unused)),
size_t count,
const char *mount_base
)
{
rtems_status_code esc = RTEMS_SUCCESSFUL;
ffc225ec: 3b a0 00 00 li r29,0 <== NOT EXECUTED
ffc225f0: 48 00 00 10 b ffc22600 <rtems_bdpart_unmount+0x110> <== 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;
ffc225f4: 3b a0 00 03 li r29,3 <== NOT EXECUTED
ffc225f8: 48 00 00 08 b ffc22600 <rtems_bdpart_unmount+0x110> <== NOT EXECUTED
rv = unmount( mount_point);
if (rv == 0) {
/* Remove mount point */
rv = rmdir( mount_point);
if (rv != 0) {
esc = RTEMS_IO_ERROR;
ffc225fc: 3b a0 00 1b li r29,27 <== NOT EXECUTED
}
}
cleanup:
free( mount_point);
ffc22600: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc22604: 4b fe 19 79 bl ffc03f7c <free> <== NOT EXECUTED
return esc;
}
ffc22608: 39 61 00 28 addi r11,r1,40 <== NOT EXECUTED
ffc2260c: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED
ffc22610: 48 03 1e e0 b ffc544f0 <_restgpr_24_x> <== NOT EXECUTED
ffc04618 <rtems_bdpart_unregister>:
rtems_status_code rtems_bdpart_unregister(
const char *disk_name,
const rtems_bdpart_partition *pt __attribute__((unused)),
size_t count
)
{
ffc04618: 94 21 ff d8 stwu r1,-40(r1)
ffc0461c: 7c 08 02 a6 mflr r0
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
rtems_blkdev_bnum disk_end = 0;
ffc04620: 39 20 00 00 li r9,0
rtems_status_code rtems_bdpart_unregister(
const char *disk_name,
const rtems_bdpart_partition *pt __attribute__((unused)),
size_t count
)
{
ffc04624: bf 81 00 18 stmw r28,24(r1)
rtems_device_minor_number minor = 0;
rtems_blkdev_bnum disk_end = 0;
dev_t disk = 0;
dev_t logical_disk = 0;
size_t i = 0;
int fd = -1;
ffc04628: 39 40 ff ff li r10,-1
rtems_status_code rtems_bdpart_unregister(
const char *disk_name,
const rtems_bdpart_partition *pt __attribute__((unused)),
size_t count
)
{
ffc0462c: 7c bc 2b 78 mr r28,r5
size_t i = 0;
int fd = -1;
rtems_disk_device *dd = NULL;
/* Get disk data */
sc = rtems_bdpart_get_disk_data( disk_name, &fd, &dd, &disk_end);
ffc04630: 38 81 00 0c addi r4,r1,12
rtems_status_code rtems_bdpart_unregister(
const char *disk_name,
const rtems_bdpart_partition *pt __attribute__((unused)),
size_t count
)
{
ffc04634: 90 01 00 2c stw r0,44(r1)
size_t i = 0;
int fd = -1;
rtems_disk_device *dd = NULL;
/* Get disk data */
sc = rtems_bdpart_get_disk_data( disk_name, &fd, &dd, &disk_end);
ffc04638: 38 a1 00 08 addi r5,r1,8
ffc0463c: 38 c1 00 10 addi r6,r1,16
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
rtems_blkdev_bnum disk_end = 0;
ffc04640: 91 21 00 10 stw r9,16(r1)
dev_t disk = 0;
dev_t logical_disk = 0;
size_t i = 0;
int fd = -1;
ffc04644: 91 41 00 0c stw r10,12(r1)
rtems_disk_device *dd = NULL;
ffc04648: 91 21 00 08 stw r9,8(r1)
/* Get disk data */
sc = rtems_bdpart_get_disk_data( disk_name, &fd, &dd, &disk_end);
ffc0464c: 4b ff fb 39 bl ffc04184 <rtems_bdpart_get_disk_data>
if (sc != RTEMS_SUCCESSFUL) {
ffc04650: 7c 7e 1b 79 mr. r30,r3
ffc04654: 40 a2 00 48 bne+ ffc0469c <rtems_bdpart_unregister+0x84><== NEVER TAKEN
ffc04658: 81 21 00 08 lwz r9,8(r1)
return sc;
}
disk = rtems_disk_get_device_identifier( dd);
close( fd);
ffc0465c: 80 61 00 0c lwz r3,12(r1)
ffc04660: 83 e9 00 04 lwz r31,4(r9)
ffc04664: 83 a9 00 00 lwz r29,0(r9)
ffc04668: 48 00 20 3d bl ffc066a4 <close>
/* Register partitions */
return rtems_bdpart_register( disk_name, pt, count);
}
rtems_status_code rtems_bdpart_unregister(
ffc0466c: 7f 9c fa 14 add r28,r28,r31
/* 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) {
ffc04670: 48 00 00 1c b ffc0468c <rtems_bdpart_unregister+0x74>
/* New minor number */
++minor;
ffc04674: 3b ff 00 01 addi r31,r31,1
/* Get the device identifier */
logical_disk = rtems_filesystem_make_dev_t( major, minor);
/* Delete logical disk */
sc = rtems_disk_delete( logical_disk);
ffc04678: 7f a3 eb 78 mr r3,r29
ffc0467c: 7f e4 fb 78 mr r4,r31
ffc04680: 48 00 0a 8d bl ffc0510c <rtems_disk_delete>
if (sc != RTEMS_SUCCESSFUL) {
ffc04684: 2c 03 00 00 cmpwi r3,0
ffc04688: 40 82 00 10 bne- ffc04698 <rtems_bdpart_unregister+0x80><== 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) {
ffc0468c: 7f 9f e0 00 cmpw cr7,r31,r28
ffc04690: 40 9e ff e4 bne+ cr7,ffc04674 <rtems_bdpart_unregister+0x5c>
ffc04694: 48 00 00 08 b ffc0469c <rtems_bdpart_unregister+0x84>
/* Get the device identifier */
logical_disk = rtems_filesystem_make_dev_t( major, minor);
/* Delete logical disk */
sc = rtems_disk_delete( logical_disk);
ffc04698: 7c 7e 1b 78 mr r30,r3 <== NOT EXECUTED
return sc;
}
}
return RTEMS_SUCCESSFUL;
}
ffc0469c: 39 61 00 28 addi r11,r1,40
ffc046a0: 7f c3 f3 78 mr r3,r30
ffc046a4: 4b ff c1 44 b ffc007e8 <_restgpr_28_x>
ffc04788 <rtems_bdpart_write>:
const char *disk_name,
const rtems_bdpart_format *format,
const rtems_bdpart_partition *pt,
size_t count
)
{
ffc04788: 94 21 ff a8 stwu r1,-88(r1)
ffc0478c: 7d 80 00 26 mfcr r12
ffc04790: 7c 08 02 a6 mflr r0
ffc04794: be a1 00 2c stmw r21,44(r1)
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;
ffc04798: 7c 98 23 79 mr. r24,r4
const char *disk_name,
const rtems_bdpart_format *format,
const rtems_bdpart_partition *pt,
size_t count
)
{
ffc0479c: 7c ba 2b 78 mr r26,r5
ffc047a0: 90 01 00 5c stw r0,92(r1)
ffc047a4: 7c de 33 78 mr r30,r6
ffc047a8: 91 81 00 28 stw r12,40(r1)
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;
ffc047ac: 41 82 00 1c beq- ffc047c8 <rtems_bdpart_write+0x40> <== 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
ffc047b0: 81 58 00 00 lwz r10,0(r24)
&& format->mbr.dos_compatibility;
ffc047b4: 39 20 00 00 li r9,0
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_status_code esc = RTEMS_SUCCESSFUL;
bool dos_compatibility = format != NULL
&& format->type == RTEMS_BDPART_FORMAT_MBR
ffc047b8: 2f 8a 00 00 cmpwi cr7,r10,0
ffc047bc: 40 9e 00 10 bne- cr7,ffc047cc <rtems_bdpart_write+0x44> <== NEVER TAKEN
&& format->mbr.dos_compatibility;
ffc047c0: 89 38 00 08 lbz r9,8(r24)
ffc047c4: 48 00 00 08 b ffc047cc <rtems_bdpart_write+0x44>
ffc047c8: 39 20 00 00 li r9,0 <== NOT EXECUTED
rtems_bdbuf_buffer *block = NULL;
rtems_blkdev_bnum disk_end = 0;
rtems_blkdev_bnum record_space =
ffc047cc: 55 3b 07 fe clrlwi r27,r9,31
ffc047d0: 2e 1b 00 00 cmpwi cr4,r27,0
uint8_t *data = NULL;
int fd = -1;
rtems_disk_device *dd = NULL;
/* Check if we have something to do */
if (count == 0) {
ffc047d4: 2f 9e 00 00 cmpwi cr7,r30,0
bool dos_compatibility = format != NULL
&& format->type == RTEMS_BDPART_FORMAT_MBR
&& format->mbr.dos_compatibility;
rtems_bdbuf_buffer *block = NULL;
rtems_blkdev_bnum disk_end = 0;
rtems_blkdev_bnum record_space =
ffc047d8: 39 00 ff c2 li r8,-62
ffc047dc: 7f a0 00 26 mfcr r29
ffc047e0: 57 bd 9f fe rlwinm r29,r29,19,31,31
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;
rtems_bdbuf_buffer *block = NULL;
ffc047e4: 39 40 00 00 li r10,0
ffc047e8: 91 41 00 14 stw r10,20(r1)
rtems_disk_device *dd = NULL;
/* Check if we have something to do */
if (count == 0) {
/* Nothing to do */
return RTEMS_SUCCESSFUL;
ffc047ec: 3b e0 00 00 li r31,0
bool dos_compatibility = format != NULL
&& format->type == RTEMS_BDPART_FORMAT_MBR
&& format->mbr.dos_compatibility;
rtems_bdbuf_buffer *block = NULL;
rtems_blkdev_bnum disk_end = 0;
rtems_blkdev_bnum record_space =
ffc047f0: 7f bd 00 d0 neg r29,r29
ffc047f4: 7f bd 40 38 and r29,r29,r8
rtems_status_code esc = RTEMS_SUCCESSFUL;
bool dos_compatibility = format != NULL
&& format->type == RTEMS_BDPART_FORMAT_MBR
&& format->mbr.dos_compatibility;
rtems_bdbuf_buffer *block = NULL;
rtems_blkdev_bnum disk_end = 0;
ffc047f8: 91 41 00 10 stw r10,16(r1)
rtems_blkdev_bnum record_space =
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;
ffc047fc: 39 00 ff ff li r8,-1
bool dos_compatibility = format != NULL
&& format->type == RTEMS_BDPART_FORMAT_MBR
&& format->mbr.dos_compatibility;
rtems_bdbuf_buffer *block = NULL;
rtems_blkdev_bnum disk_end = 0;
rtems_blkdev_bnum record_space =
ffc04800: 3b bd 00 3f addi r29,r29,63
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;
ffc04804: 91 01 00 0c stw r8,12(r1)
rtems_disk_device *dd = NULL;
ffc04808: 91 41 00 08 stw r10,8(r1)
/* Check if we have something to do */
if (count == 0) {
ffc0480c: 41 9e 02 fc beq- cr7,ffc04b08 <rtems_bdpart_write+0x380><== NEVER TAKEN
/* Nothing to do */
return RTEMS_SUCCESSFUL;
}
/* Check parameter */
if (format == NULL || pt == NULL) {
ffc04810: 2f 98 00 00 cmpwi cr7,r24,0
return RTEMS_INVALID_ADDRESS;
ffc04814: 3b e0 00 09 li r31,9
/* Nothing to do */
return RTEMS_SUCCESSFUL;
}
/* Check parameter */
if (format == NULL || pt == NULL) {
ffc04818: 41 9e 02 f0 beq- cr7,ffc04b08 <rtems_bdpart_write+0x380><== NEVER TAKEN
ffc0481c: 2f 9a 00 00 cmpwi cr7,r26,0
ffc04820: 41 9e 02 e8 beq- cr7,ffc04b08 <rtems_bdpart_write+0x380><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
}
/* Get disk data */
sc = rtems_bdpart_get_disk_data( disk_name, &fd, &dd, &disk_end);
ffc04824: 38 81 00 0c addi r4,r1,12
ffc04828: 38 a1 00 08 addi r5,r1,8
ffc0482c: 38 c1 00 10 addi r6,r1,16
ffc04830: 4b ff f9 55 bl ffc04184 <rtems_bdpart_get_disk_data>
if (sc != RTEMS_SUCCESSFUL) {
ffc04834: 7c 7f 1b 79 mr. r31,r3
ffc04838: 40 82 02 d0 bne- ffc04b08 <rtems_bdpart_write+0x380> <== NEVER TAKEN
return sc;
}
/* Align end of disk on cylinder boundary if necessary */
if (dos_compatibility) {
ffc0483c: 41 92 00 14 beq- cr4,ffc04850 <rtems_bdpart_write+0xc8> <== NEVER TAKEN
disk_end -= (disk_end % record_space);
ffc04840: 81 21 00 10 lwz r9,16(r1)
ffc04844: 7d 29 eb 96 divwu r9,r9,r29
ffc04848: 7d 29 e9 d6 mullw r9,r9,r29
ffc0484c: 91 21 00 10 stw r9,16(r1)
}
/* Check that we have a consistent partition table */
for (i = 0; i < count; ++i) {
ffc04850: 7f c9 03 a6 mtctr r30
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) {
ffc04854: 80 e1 00 10 lwz r7,16(r1)
ffc04858: 7f 59 d3 78 mr r25,r26
ffc0485c: 7f 49 d3 78 mr r9,r26
if (dos_compatibility) {
disk_end -= (disk_end % record_space);
}
/* Check that we have a consistent partition table */
for (i = 0; i < count; ++i) {
ffc04860: 39 40 00 00 li r10,0
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) {
ffc04864: 81 09 00 00 lwz r8,0(r9)
ffc04868: 7f 88 38 40 cmplw cr7,r8,r7
ffc0486c: 40 9c 02 70 bge- cr7,ffc04adc <rtems_bdpart_write+0x354><== NEVER TAKEN
ffc04870: 80 c9 00 04 lwz r6,4(r9)
ffc04874: 7f 86 38 40 cmplw cr7,r6,r7
ffc04878: 41 9d 02 64 bgt- cr7,ffc04adc <rtems_bdpart_write+0x354><== NEVER TAKEN
esc = RTEMS_INVALID_NUMBER;
goto cleanup;
}
/* Check that begin and end are valid */
if (p->begin >= p->end) {
ffc0487c: 7f 88 30 40 cmplw cr7,r8,r6
ffc04880: 40 9c 02 5c bge- cr7,ffc04adc <rtems_bdpart_write+0x354><== NEVER TAKEN
esc = RTEMS_INVALID_NUMBER;
goto cleanup;
}
/* Check that partitions do not overlap */
if (i > 0 && pt [i - 1].end > p->begin) {
ffc04884: 2f 8a 00 00 cmpwi cr7,r10,0
ffc04888: 41 9e 00 10 beq- cr7,ffc04898 <rtems_bdpart_write+0x110>
ffc0488c: 80 c9 ff d4 lwz r6,-44(r9)
ffc04890: 7f 86 40 40 cmplw cr7,r6,r8
ffc04894: 41 9d 02 48 bgt- cr7,ffc04adc <rtems_bdpart_write+0x354><== 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) {
ffc04898: 39 4a 00 01 addi r10,r10,1
ffc0489c: 39 29 00 30 addi r9,r9,48
ffc048a0: 42 00 ff c4 bdnz+ ffc04864 <rtems_bdpart_write+0xdc>
goto cleanup;
}
}
/* Check format */
if (format->type != RTEMS_BDPART_FORMAT_MBR) {
ffc048a4: 81 38 00 00 lwz r9,0(r24)
esc = RTEMS_NOT_IMPLEMENTED;
ffc048a8: 3b e0 00 18 li r31,24
goto cleanup;
}
}
/* Check format */
if (format->type != RTEMS_BDPART_FORMAT_MBR) {
ffc048ac: 2f 89 00 00 cmpwi cr7,r9,0
ffc048b0: 40 9e 02 38 bne- cr7,ffc04ae8 <rtems_bdpart_write+0x360><== 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;
ffc048b4: 2b 9e 00 04 cmplwi cr7,r30,4
ffc048b8: 7f dc f3 78 mr r28,r30
ffc048bc: 40 9d 00 08 ble- cr7,ffc048c4 <rtems_bdpart_write+0x13c><== NEVER TAKEN
ffc048c0: 3b 80 00 03 li r28,3
/*
* 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) {
ffc048c4: 2f 9b 00 00 cmpwi cr7,r27,0
ffc048c8: 40 9e 00 30 bne- cr7,ffc048f8 <rtems_bdpart_write+0x170><== ALWAYS TAKEN
ffc048cc: 7f 9c f0 40 cmplw cr7,r28,r30
RTEMS_BDPART_MBR_SIGNATURE_1;
return RTEMS_SUCCESSFUL;
}
rtems_status_code rtems_bdpart_write(
ffc048d0: 1e dc 00 30 mulli r22,r28,48
ffc048d4: 7d 3c f0 50 subf r9,r28,r30
ffc048d8: 7f 7a b2 14 add r27,r26,r22
ffc048dc: 7f 6a db 78 mr r10,r27
ffc048e0: 39 29 00 01 addi r9,r9,1
ffc048e4: 41 9d 00 0c bgt- cr7,ffc048f0 <rtems_bdpart_write+0x168><== NEVER TAKEN
ffc048e8: 2f 9e 00 00 cmpwi cr7,r30,0
ffc048ec: 40 be 00 3c bne+ cr7,ffc04928 <rtems_bdpart_write+0x1a0><== ALWAYS TAKEN
ffc048f0: 39 20 00 01 li r9,1 <== NOT EXECUTED
ffc048f4: 48 00 00 34 b ffc04928 <rtems_bdpart_write+0x1a0> <== NOT EXECUTED
/*
* 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) {
ffc048f8: 81 3a 00 00 lwz r9,0(r26)
esc = RTEMS_INVALID_NUMBER;
ffc048fc: 3b e0 00 0a li r31,10
/*
* 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) {
ffc04900: 2f 89 00 3f cmpwi cr7,r9,63
ffc04904: 40 be 01 e4 bne+ cr7,ffc04ae8 <rtems_bdpart_write+0x360><== NEVER TAKEN
ffc04908: 4b ff ff c4 b ffc048cc <rtems_bdpart_write+0x144>
RTEMS_BDPART_MBR_SIGNATURE_1;
return RTEMS_SUCCESSFUL;
}
rtems_status_code rtems_bdpart_write(
ffc0490c: 7d 48 53 78 mr r8,r10
* 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) {
ffc04910: 80 e8 00 00 lwz r7,0(r8)
ffc04914: 39 4a 00 30 addi r10,r10,48
ffc04918: 81 08 ff d4 lwz r8,-44(r8)
ffc0491c: 7d 08 38 50 subf r8,r8,r7
ffc04920: 7f 88 e8 40 cmplw cr7,r8,r29
ffc04924: 41 9c 01 b8 blt- cr7,ffc04adc <rtems_bdpart_write+0x354><== 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) {
ffc04928: 35 29 ff ff addic. r9,r9,-1
ffc0492c: 40 82 ff e0 bne+ ffc0490c <rtems_bdpart_write+0x184>
ffc04930: 7f 5f d3 78 mr r31,r26
ffc04934: 3a e0 00 00 li r23,0
}
}
/* Check that we can convert the parition descriptions to the MBR format */
for (i = 0; i < count; ++i) {
uint8_t type = 0;
ffc04938: 3a a0 00 00 li r21,0
const rtems_bdpart_partition *p = pt + i;
/* Check type */
if (!rtems_bdpart_to_mbr_partition_type( p->type, &type)) {
ffc0493c: 38 7f 00 08 addi r3,r31,8
}
}
/* Check that we can convert the parition descriptions to the MBR format */
for (i = 0; i < count; ++i) {
uint8_t type = 0;
ffc04940: 9a a1 00 18 stb r21,24(r1)
const rtems_bdpart_partition *p = pt + i;
/* Check type */
if (!rtems_bdpart_to_mbr_partition_type( p->type, &type)) {
ffc04944: 38 81 00 18 addi r4,r1,24
ffc04948: 4b ff f7 f9 bl ffc04140 <rtems_bdpart_to_mbr_partition_type>
ffc0494c: 2f 83 00 00 cmpwi cr7,r3,0
ffc04950: 41 9e 00 30 beq- cr7,ffc04980 <rtems_bdpart_write+0x1f8><== NEVER TAKEN
ffc04954: 3b ff 00 30 addi r31,r31,48
esc = RTEMS_INVALID_ID;
goto cleanup;
}
/* Check flags */
if (p->flags > 0xffU) {
ffc04958: 81 3f ff f8 lwz r9,-8(r31)
ffc0495c: 2f 89 00 00 cmpwi cr7,r9,0
ffc04960: 40 9e 00 20 bne- cr7,ffc04980 <rtems_bdpart_write+0x1f8><== NEVER TAKEN
ffc04964: 81 3f ff fc lwz r9,-4(r31)
ffc04968: 2b 89 00 ff cmplwi cr7,r9,255
ffc0496c: 41 9d 00 14 bgt- cr7,ffc04980 <rtems_bdpart_write+0x1f8><== NEVER TAKEN
goto cleanup;
}
}
/* Check that we can convert the parition descriptions to the MBR format */
for (i = 0; i < count; ++i) {
ffc04970: 3a f7 00 01 addi r23,r23,1
ffc04974: 7f 97 f0 00 cmpw cr7,r23,r30
ffc04978: 40 9e ff c4 bne+ cr7,ffc0493c <rtems_bdpart_write+0x1b4>
ffc0497c: 48 00 00 0c b ffc04988 <rtems_bdpart_write+0x200>
ffc04980: 3b e0 00 04 li r31,4 <== NOT EXECUTED
ffc04984: 48 00 01 64 b ffc04ae8 <rtems_bdpart_write+0x360> <== NOT EXECUTED
/* Check ID */
/* TODO */
}
/* New MBR */
sc = rtems_bdpart_new_record( dd, 0, &block);
ffc04988: 80 61 00 08 lwz r3,8(r1)
ffc0498c: 38 80 00 00 li r4,0
ffc04990: 38 a1 00 14 addi r5,r1,20
ffc04994: 4b ff fd 15 bl ffc046a8 <rtems_bdpart_new_record>
if (sc != RTEMS_SUCCESSFUL) {
ffc04998: 2f 83 00 00 cmpwi cr7,r3,0
ffc0499c: 7c 7f 1b 78 mr r31,r3
ffc049a0: 40 be 01 48 bne+ cr7,ffc04ae8 <rtems_bdpart_write+0x360><== NEVER TAKEN
}
/* Write disk ID */
rtems_uint32_to_little_endian(
format->mbr.disk_id,
block->buffer + RTEMS_BDPART_MBR_OFFSET_DISK_ID
ffc049a4: 81 41 00 14 lwz r10,20(r1)
RTEMS_BDPART_MBR_SIGNATURE_1;
return RTEMS_SUCCESSFUL;
}
rtems_status_code rtems_bdpart_write(
ffc049a8: 39 00 00 04 li r8,4
ffc049ac: 7d 09 03 a6 mtctr r8
esc = sc;
goto cleanup;
}
/* Write disk ID */
rtems_uint32_to_little_endian(
ffc049b0: 81 38 00 04 lwz r9,4(r24)
format->mbr.disk_id,
block->buffer + RTEMS_BDPART_MBR_OFFSET_DISK_ID
ffc049b4: 81 4a 00 1c lwz r10,28(r10)
RTEMS_BDPART_MBR_SIGNATURE_1;
return RTEMS_SUCCESSFUL;
}
rtems_status_code rtems_bdpart_write(
ffc049b8: 39 4a 01 b7 addi r10,r10,439
data [i] = (uint8_t) value;
ffc049bc: 9d 2a 00 01 stbu r9,1(r10)
value >>= 8;
ffc049c0: 55 29 c2 3e rlwinm r9,r9,24,8,31
static inline void rtems_uint32_to_little_endian( uint32_t value, uint8_t *data)
{
size_t i = 0;
for (i = 0; i < 4; ++i) {
ffc049c4: 42 00 ff f8 bdnz+ ffc049bc <rtems_bdpart_write+0x234>
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;
ffc049c8: 81 21 00 14 lwz r9,20(r1)
for (i = 0; i < ppc; ++i) {
ffc049cc: 3b e0 00 00 li r31,0
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;
ffc049d0: 82 e9 00 1c lwz r23,28(r9)
ffc049d4: 3a f7 01 be addi r23,r23,446
ffc049d8: 7e f8 bb 78 mr r24,r23
for (i = 0; i < ppc; ++i) {
ffc049dc: 48 00 00 2c b ffc04a08 <rtems_bdpart_write+0x280>
/* Write partition entry */
rtems_bdpart_write_mbr_partition(
data,
p->begin,
p->end - p->begin,
ffc049e0: 80 99 00 00 lwz r4,0(r25)
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(
ffc049e4: 7f 03 c3 78 mr r3,r24
ffc049e8: 80 b9 00 04 lwz r5,4(r25)
p->end - p->begin,
rtems_bdpart_mbr_partition_type( p->type),
(uint8_t) p->flags
);
data += RTEMS_BDPART_MBR_TABLE_ENTRY_SIZE;
ffc049ec: 3b 18 00 10 addi r24,r24,16
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(
ffc049f0: 88 d9 00 08 lbz r6,8(r25)
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) {
ffc049f4: 3b ff 00 01 addi r31,r31,1
const rtems_bdpart_partition *p = pt + i;
/* Write partition entry */
rtems_bdpart_write_mbr_partition(
ffc049f8: 88 f9 00 2f lbz r7,47(r25)
ffc049fc: 7c a4 28 50 subf r5,r4,r5
ffc04a00: 3b 39 00 30 addi r25,r25,48
ffc04a04: 4b ff fd 49 bl ffc0474c <rtems_bdpart_write_mbr_partition>
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) {
ffc04a08: 7f 9f e0 00 cmpw cr7,r31,r28
ffc04a0c: 40 9e ff d4 bne+ cr7,ffc049e0 <rtems_bdpart_write+0x258>
data += RTEMS_BDPART_MBR_TABLE_ENTRY_SIZE;
}
/* Write extended partition with logical partitions if necessary */
if (ppc != count) {
ffc04a10: 7f 9c f0 00 cmpw cr7,r28,r30
RTEMS_BDPART_MBR_SIGNATURE_1;
return RTEMS_SUCCESSFUL;
}
rtems_status_code rtems_bdpart_write(
ffc04a14: 57 83 20 36 rlwinm r3,r28,4,0,27
ffc04a18: 7c 77 1a 14 add r3,r23,r3
const rtems_bdpart_partition *pt,
size_t count
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_status_code esc = RTEMS_SUCCESSFUL;
ffc04a1c: 3b e0 00 00 li r31,0
data += RTEMS_BDPART_MBR_TABLE_ENTRY_SIZE;
}
/* Write extended partition with logical partitions if necessary */
if (ppc != count) {
ffc04a20: 41 9e 00 c8 beq- cr7,ffc04ae8 <rtems_bdpart_write+0x360><== 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;
ffc04a24: 7f 3a b0 2e lwzx r25,r26,r22
/* Write extended partition */
rtems_bdpart_write_mbr_partition(
ffc04a28: 38 c0 00 05 li r6,5
ffc04a2c: 80 a1 00 10 lwz r5,16(r1)
ffc04a30: 38 e0 00 00 li r7,0
/* Write extended partition with logical partitions if necessary */
if (ppc != count) {
rtems_blkdev_bnum ebr = 0; /* Extended boot record block index */
/* Begin of extended partition */
rtems_blkdev_bnum ep_begin = pt [ppc].begin - record_space;
ffc04a34: 7f 3d c8 50 subf r25,r29,r25
/* Write extended partition */
rtems_bdpart_write_mbr_partition(
ffc04a38: 7f 24 cb 78 mr r4,r25
ffc04a3c: 7c b9 28 50 subf r5,r25,r5
ffc04a40: 4b ff fd 0d bl ffc0474c <rtems_bdpart_write_mbr_partition>
RTEMS_BDPART_MBR_EXTENDED,
0
);
/* Write logical partitions */
for (i = ppc; i < count; ++i) {
ffc04a44: 7f 9a e3 78 mr r26,r28
ffc04a48: 48 00 00 84 b ffc04acc <rtems_bdpart_write+0x344>
const rtems_bdpart_partition *p = pt + i;
/* Write second partition entry */
if (i > ppc) {
ffc04a4c: 7f 9a e0 40 cmplw cr7,r26,r28
ffc04a50: 40 bd 00 30 ble+ cr7,ffc04a80 <rtems_bdpart_write+0x2f8>
rtems_blkdev_bnum begin = p->begin - record_space;
rtems_bdpart_write_mbr_partition(
block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_1,
ffc04a54: 81 41 00 14 lwz r10,20(r1)
/* Write second partition entry */
if (i > ppc) {
rtems_blkdev_bnum begin = p->begin - record_space;
rtems_bdpart_write_mbr_partition(
ffc04a58: 38 c0 00 05 li r6,5
for (i = ppc; i < count; ++i) {
const rtems_bdpart_partition *p = pt + i;
/* Write second partition entry */
if (i > ppc) {
rtems_blkdev_bnum begin = p->begin - record_space;
ffc04a5c: 81 3b 00 00 lwz r9,0(r27)
rtems_bdpart_write_mbr_partition(
ffc04a60: 38 e0 00 00 li r7,0
ffc04a64: 80 6a 00 1c lwz r3,28(r10)
ffc04a68: 80 a1 00 10 lwz r5,16(r1)
for (i = ppc; i < count; ++i) {
const rtems_bdpart_partition *p = pt + i;
/* Write second partition entry */
if (i > ppc) {
rtems_blkdev_bnum begin = p->begin - record_space;
ffc04a6c: 7d 3d 48 50 subf r9,r29,r9
rtems_bdpart_write_mbr_partition(
ffc04a70: 38 63 01 ce addi r3,r3,462
ffc04a74: 7c 99 48 50 subf r4,r25,r9
ffc04a78: 7c a9 28 50 subf r5,r9,r5
ffc04a7c: 4b ff fc d1 bl ffc0474c <rtems_bdpart_write_mbr_partition>
0
);
}
/* New EBR */
ebr = p->begin - record_space;
ffc04a80: 80 9b 00 00 lwz r4,0(r27)
sc = rtems_bdpart_new_record( dd, ebr, &block);
ffc04a84: 38 a1 00 14 addi r5,r1,20
ffc04a88: 80 61 00 08 lwz r3,8(r1)
ffc04a8c: 7c 9d 20 50 subf r4,r29,r4
ffc04a90: 4b ff fc 19 bl ffc046a8 <rtems_bdpart_new_record>
if (sc != RTEMS_SUCCESSFUL) {
ffc04a94: 2c 03 00 00 cmpwi r3,0
ffc04a98: 40 82 00 4c bne- ffc04ae4 <rtems_bdpart_write+0x35c> <== NEVER TAKEN
goto cleanup;
}
/* Write first partition entry */
rtems_bdpart_write_mbr_partition(
block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0,
ffc04a9c: 81 21 00 14 lwz r9,20(r1)
esc = sc;
goto cleanup;
}
/* Write first partition entry */
rtems_bdpart_write_mbr_partition(
ffc04aa0: 7f a4 eb 78 mr r4,r29
ffc04aa4: 80 bb 00 04 lwz r5,4(r27)
RTEMS_BDPART_MBR_EXTENDED,
0
);
/* Write logical partitions */
for (i = ppc; i < count; ++i) {
ffc04aa8: 3b 5a 00 01 addi r26,r26,1
esc = sc;
goto cleanup;
}
/* Write first partition entry */
rtems_bdpart_write_mbr_partition(
ffc04aac: 80 69 00 1c lwz r3,28(r9)
ffc04ab0: 81 3b 00 00 lwz r9,0(r27)
ffc04ab4: 88 db 00 08 lbz r6,8(r27)
ffc04ab8: 38 63 01 be addi r3,r3,446
ffc04abc: 88 fb 00 2f lbz r7,47(r27)
ffc04ac0: 7c a9 28 50 subf r5,r9,r5
ffc04ac4: 3b 7b 00 30 addi r27,r27,48
ffc04ac8: 4b ff fc 85 bl ffc0474c <rtems_bdpart_write_mbr_partition>
RTEMS_BDPART_MBR_EXTENDED,
0
);
/* Write logical partitions */
for (i = ppc; i < count; ++i) {
ffc04acc: 7f 9a f0 40 cmplw cr7,r26,r30
ffc04ad0: 41 9c ff 7c blt+ cr7,ffc04a4c <rtems_bdpart_write+0x2c4>
const rtems_bdpart_partition *pt,
size_t count
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_status_code esc = RTEMS_SUCCESSFUL;
ffc04ad4: 3b e0 00 00 li r31,0
ffc04ad8: 48 00 00 10 b ffc04ae8 <rtems_bdpart_write+0x360>
* 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;
ffc04adc: 3b e0 00 0a li r31,10 <== NOT EXECUTED
ffc04ae0: 48 00 00 08 b ffc04ae8 <rtems_bdpart_write+0x360> <== NOT EXECUTED
}
/* New EBR */
ebr = p->begin - record_space;
sc = rtems_bdpart_new_record( dd, ebr, &block);
if (sc != RTEMS_SUCCESSFUL) {
ffc04ae4: 7c 7f 1b 78 mr r31,r3 <== NOT EXECUTED
}
}
cleanup:
if (fd >= 0) {
ffc04ae8: 80 61 00 0c lwz r3,12(r1)
ffc04aec: 2f 83 00 00 cmpwi cr7,r3,0
ffc04af0: 41 9c 00 08 blt- cr7,ffc04af8 <rtems_bdpart_write+0x370><== NEVER TAKEN
close( fd);
ffc04af4: 48 00 1b b1 bl ffc066a4 <close>
}
if (block != NULL) {
ffc04af8: 80 61 00 14 lwz r3,20(r1)
ffc04afc: 2f 83 00 00 cmpwi cr7,r3,0
ffc04b00: 41 9e 00 08 beq- cr7,ffc04b08 <rtems_bdpart_write+0x380><== NEVER TAKEN
rtems_bdbuf_sync( block);
ffc04b04: 48 00 c5 c1 bl ffc110c4 <rtems_bdbuf_sync>
}
return esc;
}
ffc04b08: 81 81 00 28 lwz r12,40(r1)
ffc04b0c: 39 61 00 58 addi r11,r1,88
ffc04b10: 7f e3 fb 78 mr r3,r31
ffc04b14: 7d 80 81 20 mtcrf 8,r12
ffc04b18: 4b ff bc b4 b ffc007cc <_restgpr_21_x>
ffc0471c <rtems_blkdev_create_partition>:
const char *partition,
const char *parent_block_device,
rtems_blkdev_bnum media_block_begin,
rtems_blkdev_bnum media_block_count
)
{
ffc0471c: 94 21 ff 90 stwu r1,-112(r1)
ffc04720: 7c 08 02 a6 mflr r0
ffc04724: bf 41 00 58 stmw r26,88(r1)
ffc04728: 7c 7c 1b 78 mr r28,r3
rtems_status_code sc = RTEMS_SUCCESSFUL;
int fd = open(parent_block_device, O_RDWR);
ffc0472c: 7c 83 23 78 mr r3,r4
ffc04730: 38 80 00 02 li r4,2
const char *partition,
const char *parent_block_device,
rtems_blkdev_bnum media_block_begin,
rtems_blkdev_bnum media_block_count
)
{
ffc04734: 90 01 00 74 stw r0,116(r1)
ffc04738: 7c ba 2b 78 mr r26,r5
ffc0473c: 7c db 33 78 mr r27,r6
rtems_status_code sc = RTEMS_SUCCESSFUL;
int fd = open(parent_block_device, O_RDWR);
ffc04740: 4c c6 31 82 crclr 4*cr1+eq
ffc04744: 48 00 27 35 bl ffc06e78 <open>
if (fd >= 0) {
ffc04748: 7c 7d 1b 79 mr. r29,r3
if (sc != RTEMS_SUCCESSFUL) {
close(fd);
}
} else {
sc = RTEMS_INVALID_ID;
ffc0474c: 3b e0 00 04 li r31,4
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
int fd = open(parent_block_device, O_RDWR);
if (fd >= 0) {
ffc04750: 41 a0 00 cc blt+ ffc0481c <rtems_blkdev_create_partition+0x100>
int rv;
struct stat st;
rv = fstat(fd, &st);
ffc04754: 38 81 00 08 addi r4,r1,8
ffc04758: 48 00 18 c1 bl ffc06018 <fstat>
if (rv == 0 && S_ISBLK(st.st_mode)) {
ffc0475c: 2f 83 00 00 cmpwi cr7,r3,0
ffc04760: 40 9e 00 ac bne- cr7,ffc0480c <rtems_blkdev_create_partition+0xf0><== NEVER TAKEN
ffc04764: 81 21 00 14 lwz r9,20(r1)
ffc04768: 3b e0 00 15 li r31,21
ffc0476c: 55 29 04 26 rlwinm r9,r9,0,16,19
ffc04770: 2f 89 60 00 cmpwi cr7,r9,24576
ffc04774: 40 be 00 9c bne+ cr7,ffc04810 <rtems_blkdev_create_partition+0xf4>
static inline int rtems_disk_fd_get_disk_device(
int fd,
rtems_disk_device **dd_ptr
)
{
return ioctl(fd, RTEMS_BLKIO_GETDISKDEV, dd_ptr);
ffc04778: 3c 80 40 04 lis r4,16388
ffc0477c: 7f a3 eb 78 mr r3,r29
ffc04780: 60 84 42 09 ori r4,r4,16905
ffc04784: 38 a1 00 50 addi r5,r1,80
ffc04788: 4c c6 31 82 crclr 4*cr1+eq
ffc0478c: 48 00 19 e1 bl ffc0616c <ioctl>
}
} else {
sc = RTEMS_NO_MEMORY;
}
} else {
sc = RTEMS_NOT_IMPLEMENTED;
ffc04790: 3b e0 00 18 li r31,24
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) {
ffc04794: 2f 83 00 00 cmpwi cr7,r3,0
ffc04798: 40 be 00 78 bne+ cr7,ffc04810 <rtems_blkdev_create_partition+0xf4>
rtems_blkdev_imfs_context *ctx = malloc(sizeof(*ctx));
ffc0479c: 38 60 00 80 li r3,128
ffc047a0: 48 00 1e 71 bl ffc06610 <malloc>
if (ctx != NULL) {
ffc047a4: 7c 7e 1b 79 mr. r30,r3
ffc047a8: 41 82 00 5c beq- ffc04804 <rtems_blkdev_create_partition+0xe8>
sc = rtems_disk_init_log(
ffc047ac: 80 81 00 50 lwz r4,80(r1)
ffc047b0: 7f 45 d3 78 mr r5,r26
ffc047b4: 7f 66 db 78 mr r6,r27
ffc047b8: 48 00 02 6d bl ffc04a24 <rtems_disk_init_log>
phys_dd,
media_block_begin,
media_block_count
);
if (sc == RTEMS_SUCCESSFUL) {
ffc047bc: 7c 7f 1b 79 mr. r31,r3
ffc047c0: 40 82 00 38 bne- ffc047f8 <rtems_blkdev_create_partition+0xdc>
ctx->fd = fd;
ffc047c4: 93 be 00 78 stw r29,120(r30)
rv = IMFS_make_generic_node(
ffc047c8: 3c a0 ff c2 lis r5,-62
ffc047cc: 7f 83 e3 78 mr r3,r28
ffc047d0: 38 80 61 ff li r4,25087
ffc047d4: 38 a5 b4 90 addi r5,r5,-19312
ffc047d8: 7f c6 f3 78 mr r6,r30
ffc047dc: 48 00 0f 3d bl ffc05718 <IMFS_make_generic_node>
S_IFBLK | S_IRWXU | S_IRWXG | S_IRWXO,
&rtems_blkdev_imfs_control,
ctx
);
if (rv != 0) {
ffc047e0: 2f 83 00 00 cmpwi cr7,r3,0
ffc047e4: 41 be 00 38 beq+ cr7,ffc0481c <rtems_blkdev_create_partition+0x100>
free(ctx);
ffc047e8: 7f c3 f3 78 mr r3,r30
ffc047ec: 48 00 17 5d bl ffc05f48 <free>
sc = RTEMS_UNSATISFIED;
ffc047f0: 3b e0 00 0d li r31,13
ffc047f4: 48 00 00 1c b ffc04810 <rtems_blkdev_create_partition+0xf4>
}
} else {
free(ctx);
ffc047f8: 7f c3 f3 78 mr r3,r30
ffc047fc: 48 00 17 4d bl ffc05f48 <free>
ffc04800: 48 00 00 10 b ffc04810 <rtems_blkdev_create_partition+0xf4>
}
} else {
sc = RTEMS_NO_MEMORY;
ffc04804: 3b e0 00 1a li r31,26
ffc04808: 48 00 00 08 b ffc04810 <rtems_blkdev_create_partition+0xf4>
if (fd >= 0) {
int rv;
struct stat st;
rv = fstat(fd, &st);
if (rv == 0 && S_ISBLK(st.st_mode)) {
ffc0480c: 3b e0 00 15 li r31,21 <== NOT EXECUTED
} else {
sc = RTEMS_INVALID_NODE;
}
if (sc != RTEMS_SUCCESSFUL) {
close(fd);
ffc04810: 7f a3 eb 78 mr r3,r29
ffc04814: 48 00 16 ad bl ffc05ec0 <close>
ffc04818: 48 00 00 04 b ffc0481c <rtems_blkdev_create_partition+0x100>
} else {
sc = RTEMS_INVALID_ID;
}
return sc;
}
ffc0481c: 39 61 00 70 addi r11,r1,112
ffc04820: 7f e3 fb 78 mr r3,r31
ffc04824: 4b ff c8 fc b ffc01120 <_restgpr_26_x>
ffc102cc <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)
{
ffc102cc: 7c 2b 0b 78 mr r11,r1
ffc102d0: 7c 08 02 a6 mflr r0
ffc102d4: 94 21 ff f0 stwu r1,-16(r1)
ffc102d8: 90 01 00 14 stw r0,20(r1)
ffc102dc: 48 00 94 29 bl ffc19704 <_savegpr_31>
ffc102e0: 7c bf 2b 78 mr r31,r5
rtems_libio_ioctl_args_t *args = arg;
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
ffc102e4: 81 25 00 00 lwz r9,0(r5)
if (args->command != RTEMS_BLKIO_REQUEST)
ffc102e8: 80 85 00 04 lwz r4,4(r5)
rtems_device_minor_number minor __attribute__((unused)),
void * arg)
{
rtems_libio_ioctl_args_t *args = arg;
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
ffc102ec: 80 69 00 30 lwz r3,48(r9)
if (args->command != RTEMS_BLKIO_REQUEST)
ffc102f0: 6c 89 c0 18 xoris r9,r4,49176
ffc102f4: 2f 89 42 01 cmpwi cr7,r9,16897
ffc102f8: 41 9e 00 1c beq- cr7,ffc10314 <rtems_blkdev_generic_ioctl+0x48><== NEVER TAKEN
{
args->ioctl_return = dd->ioctl(dd,
ffc102fc: 81 23 00 38 lwz r9,56(r3)
ffc10300: 80 a5 00 08 lwz r5,8(r5)
ffc10304: 7d 29 03 a6 mtctr r9
ffc10308: 4e 80 04 21 bctrl
ffc1030c: 90 7f 00 0c stw r3,12(r31)
ffc10310: 48 00 00 0c b ffc1031c <rtems_blkdev_generic_ioctl+0x50>
{
/*
* It is not allowed to directly access the driver circumventing the
* cache.
*/
args->ioctl_return = -1;
ffc10314: 39 20 ff ff li r9,-1 <== NOT EXECUTED
ffc10318: 91 25 00 0c stw r9,12(r5) <== NOT EXECUTED
}
return RTEMS_SUCCESSFUL;
}
ffc1031c: 39 61 00 10 addi r11,r1,16
ffc10320: 38 60 00 00 li r3,0
ffc10324: 48 00 94 2c b ffc19750 <_restgpr_31_x>
ffc10074 <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)
{
ffc10074: 94 21 ff c0 stwu r1,-64(r1)
ffc10078: 7c 08 02 a6 mflr r0
ffc1007c: 90 01 00 44 stw r0,68(r1)
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;
ffc10080: 81 25 00 00 lwz r9,0(r5)
rtems_device_driver
rtems_blkdev_generic_read(
rtems_device_major_number major __attribute__((unused)),
rtems_device_minor_number minor __attribute__((unused)),
void * arg)
{
ffc10084: be e1 00 1c stmw r23,28(r1)
ffc10088: 7c bd 2b 78 mr r29,r5
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;
ffc1008c: 83 09 00 30 lwz r24,48(r9)
uint32_t block_size = dd->block_size;
char *buf = args->buffer;
uint32_t count = args->count;
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);
ffc10090: 83 c5 00 08 lwz r30,8(r5)
{
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;
uint32_t block_size = dd->block_size;
ffc10094: 83 58 00 24 lwz r26,36(r24)
char *buf = args->buffer;
uint32_t count = args->count;
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);
ffc10098: 83 e5 00 0c lwz r31,12(r5)
ffc1009c: 7f c3 f3 78 mr r3,r30
ffc100a0: 7f 46 d3 78 mr r6,r26
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;
uint32_t block_size = dd->block_size;
char *buf = args->buffer;
ffc100a4: 83 65 00 10 lwz r27,16(r5)
uint32_t count = args->count;
ffc100a8: 83 85 00 14 lwz r28,20(r5)
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);
ffc100ac: 7f e4 fb 78 mr r4,r31
ffc100b0: 38 a0 00 00 li r5,0
ffc100b4: 48 00 86 c9 bl ffc1877c <__divdi3>
uint32_t blkofs = (uint32_t) (args->offset % block_size);
ffc100b8: 7f c3 f3 78 mr r3,r30
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
uint32_t block_size = dd->block_size;
char *buf = args->buffer;
uint32_t count = args->count;
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);
ffc100bc: 7c 97 23 78 mr r23,r4
uint32_t blkofs = (uint32_t) (args->offset % block_size);
ffc100c0: 38 a0 00 00 li r5,0
ffc100c4: 7f e4 fb 78 mr r4,r31
ffc100c8: 7f 46 d3 78 mr r6,r26
ffc100cc: 48 00 8a d5 bl ffc18ba0 <__moddi3>
args->bytes_moved = 0;
ffc100d0: 39 20 00 00 li r9,0
rtems_disk_device *dd = iop->data1;
uint32_t block_size = dd->block_size;
char *buf = args->buffer;
uint32_t count = args->count;
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);
uint32_t blkofs = (uint32_t) (args->offset % block_size);
ffc100d4: 7c 99 23 78 mr r25,r4
args->bytes_moved = 0;
ffc100d8: 91 3d 00 1c stw r9,28(r29)
while (count > 0)
ffc100dc: 3b c0 00 00 li r30,0
ffc100e0: 48 00 00 6c b ffc1014c <rtems_blkdev_generic_read+0xd8>
{
rtems_bdbuf_buffer *diskbuf;
uint32_t copy;
rc = rtems_bdbuf_read(dd, block, &diskbuf);
ffc100e4: 7f 03 c3 78 mr r3,r24
ffc100e8: 38 a1 00 08 addi r5,r1,8
ffc100ec: 4b ff f6 51 bl ffc0f73c <rtems_bdbuf_read>
if (rc != RTEMS_SUCCESSFUL)
ffc100f0: 2c 03 00 00 cmpwi r3,0
ffc100f4: 40 82 00 68 bne- ffc1015c <rtems_blkdev_generic_read+0xe8><== NEVER TAKEN
break;
copy = block_size - blkofs;
ffc100f8: 7f f9 d0 50 subf r31,r25,r26
ffc100fc: 7f 9f e0 40 cmplw cr7,r31,r28
ffc10100: 40 9d 00 08 ble- cr7,ffc10108 <rtems_blkdev_generic_read+0x94><== ALWAYS TAKEN
ffc10104: 7f 9f e3 78 mr r31,r28 <== NOT EXECUTED
if (copy > count)
copy = count;
memcpy(buf, (char *)diskbuf->buffer + blkofs, copy);
ffc10108: 81 21 00 08 lwz r9,8(r1)
ffc1010c: 7f e5 fb 78 mr r5,r31
ffc10110: 7f 63 db 78 mr r3,r27
ffc10114: 80 89 00 1c lwz r4,28(r9)
ffc10118: 3b de 00 01 addi r30,r30,1
ffc1011c: 7c 84 ca 14 add r4,r4,r25
ffc10120: 48 00 53 e5 bl ffc15504 <memcpy>
rc = rtems_bdbuf_release(diskbuf);
ffc10124: 80 61 00 08 lwz r3,8(r1)
ffc10128: 4b ff f8 0d bl ffc0f934 <rtems_bdbuf_release>
args->bytes_moved += copy;
ffc1012c: 81 3d 00 1c lwz r9,28(r29)
if (rc != RTEMS_SUCCESSFUL)
ffc10130: 2c 03 00 00 cmpwi r3,0
copy = block_size - blkofs;
if (copy > count)
copy = count;
memcpy(buf, (char *)diskbuf->buffer + blkofs, copy);
rc = rtems_bdbuf_release(diskbuf);
args->bytes_moved += copy;
ffc10134: 7d 29 fa 14 add r9,r9,r31
ffc10138: 91 3d 00 1c stw r9,28(r29)
if (rc != RTEMS_SUCCESSFUL)
ffc1013c: 40 82 00 20 bne- ffc1015c <rtems_blkdev_generic_read+0xe8><== NEVER TAKEN
break;
count -= copy;
ffc10140: 7f 9f e0 50 subf r28,r31,r28
buf += copy;
ffc10144: 7f 7b fa 14 add r27,r27,r31
blkofs = 0;
ffc10148: 3b 20 00 00 li r25,0
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)
ffc1014c: 2f 9c 00 00 cmpwi cr7,r28,0
/* rtems_blkdev_generic_read --
* Generic block device read primitive. Implemented using block device
* buffer management primitives.
*/
rtems_device_driver
rtems_blkdev_generic_read(
ffc10150: 7c 9e ba 14 add r4,r30,r23
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)
ffc10154: 40 9e ff 90 bne+ cr7,ffc100e4 <rtems_blkdev_generic_read+0x70>
ffc10158: 38 60 00 00 li r3,0
blkofs = 0;
block++;
}
return rc;
}
ffc1015c: 39 61 00 40 addi r11,r1,64
ffc10160: 48 00 95 d0 b ffc19730 <_restgpr_23_x>
ffc10164 <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)
{
ffc10164: 94 21 ff c0 stwu r1,-64(r1)
ffc10168: 7c 08 02 a6 mflr r0
ffc1016c: 90 01 00 44 stw r0,68(r1)
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;
ffc10170: 81 25 00 00 lwz r9,0(r5)
rtems_device_driver
rtems_blkdev_generic_write(
rtems_device_major_number major __attribute__((unused)),
rtems_device_minor_number minor __attribute__((unused)),
void * arg)
{
ffc10174: be e1 00 1c stmw r23,28(r1)
ffc10178: 7c bd 2b 78 mr r29,r5
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)
ffc1017c: 3b 40 00 00 li r26,0
void * arg)
{
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;
ffc10180: 83 09 00 30 lwz r24,48(r9)
uint32_t block_size = dd->block_size;
char *buf = args->buffer;
uint32_t count = args->count;
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);
ffc10184: 83 c5 00 08 lwz r30,8(r5)
{
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;
uint32_t block_size = dd->block_size;
ffc10188: 83 78 00 24 lwz r27,36(r24)
char *buf = args->buffer;
uint32_t count = args->count;
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);
ffc1018c: 83 e5 00 0c lwz r31,12(r5)
ffc10190: 7f c3 f3 78 mr r3,r30
ffc10194: 7f 66 db 78 mr r6,r27
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;
uint32_t block_size = dd->block_size;
char *buf = args->buffer;
ffc10198: 83 25 00 10 lwz r25,16(r5)
uint32_t count = args->count;
ffc1019c: 83 85 00 14 lwz r28,20(r5)
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);
ffc101a0: 7f e4 fb 78 mr r4,r31
ffc101a4: 38 a0 00 00 li r5,0
ffc101a8: 48 00 85 d5 bl ffc1877c <__divdi3>
uint32_t blkofs = (uint32_t) (args->offset % block_size);
ffc101ac: 7f c3 f3 78 mr r3,r30
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
uint32_t block_size = dd->block_size;
char *buf = args->buffer;
uint32_t count = args->count;
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);
ffc101b0: 7c 97 23 78 mr r23,r4
uint32_t blkofs = (uint32_t) (args->offset % block_size);
ffc101b4: 38 a0 00 00 li r5,0
ffc101b8: 7f e4 fb 78 mr r4,r31
ffc101bc: 7f 66 db 78 mr r6,r27
ffc101c0: 48 00 89 e1 bl ffc18ba0 <__moddi3>
args->bytes_moved = 0;
ffc101c4: 39 20 00 00 li r9,0
rtems_disk_device *dd = iop->data1;
uint32_t block_size = dd->block_size;
char *buf = args->buffer;
uint32_t count = args->count;
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);
uint32_t blkofs = (uint32_t) (args->offset % block_size);
ffc101c8: 7c 9e 23 78 mr r30,r4
args->bytes_moved = 0;
ffc101cc: 91 3d 00 1c stw r9,28(r29)
while (count > 0)
ffc101d0: 48 00 00 84 b ffc10254 <rtems_blkdev_generic_write+0xf0>
{
rtems_bdbuf_buffer *diskbuf;
uint32_t copy;
if ((blkofs == 0) && (count >= block_size))
ffc101d4: 2f 9e 00 00 cmpwi cr7,r30,0
rc = rtems_bdbuf_get(dd, block, &diskbuf);
ffc101d8: 7f 03 c3 78 mr r3,r24
ffc101dc: 38 a1 00 08 addi r5,r1,8
while (count > 0)
{
rtems_bdbuf_buffer *diskbuf;
uint32_t copy;
if ((blkofs == 0) && (count >= block_size))
ffc101e0: 40 9e 00 14 bne- cr7,ffc101f4 <rtems_blkdev_generic_write+0x90><== NEVER TAKEN
ffc101e4: 7f 9c d8 40 cmplw cr7,r28,r27
ffc101e8: 41 bc 00 0c blt+ cr7,ffc101f4 <rtems_blkdev_generic_write+0x90><== NEVER TAKEN
rc = rtems_bdbuf_get(dd, block, &diskbuf);
ffc101ec: 4b ff f4 79 bl ffc0f664 <rtems_bdbuf_get>
ffc101f0: 48 00 00 08 b ffc101f8 <rtems_blkdev_generic_write+0x94>
else
rc = rtems_bdbuf_read(dd, block, &diskbuf);
ffc101f4: 4b ff f5 49 bl ffc0f73c <rtems_bdbuf_read> <== NOT EXECUTED
if (rc != RTEMS_SUCCESSFUL)
ffc101f8: 2f 83 00 00 cmpwi cr7,r3,0
ffc101fc: 40 9e 00 68 bne- cr7,ffc10264 <rtems_blkdev_generic_write+0x100><== NEVER TAKEN
break;
copy = block_size - blkofs;
ffc10200: 7f fe d8 50 subf r31,r30,r27
ffc10204: 7f 9f e0 40 cmplw cr7,r31,r28
ffc10208: 40 9d 00 08 ble- cr7,ffc10210 <rtems_blkdev_generic_write+0xac><== ALWAYS TAKEN
ffc1020c: 7f 9f e3 78 mr r31,r28 <== NOT EXECUTED
if (copy > count)
copy = count;
memcpy((char *)diskbuf->buffer + blkofs, buf, copy);
ffc10210: 81 21 00 08 lwz r9,8(r1)
ffc10214: 7f 24 cb 78 mr r4,r25
ffc10218: 7f e5 fb 78 mr r5,r31
ffc1021c: 80 69 00 1c lwz r3,28(r9)
ffc10220: 3b 5a 00 01 addi r26,r26,1
ffc10224: 7c 63 f2 14 add r3,r3,r30
ffc10228: 48 00 52 dd bl ffc15504 <memcpy>
args->bytes_moved += copy;
ffc1022c: 81 3d 00 1c lwz r9,28(r29)
rc = rtems_bdbuf_release_modified(diskbuf);
ffc10230: 80 61 00 08 lwz r3,8(r1)
copy = block_size - blkofs;
if (copy > count)
copy = count;
memcpy((char *)diskbuf->buffer + blkofs, buf, copy);
args->bytes_moved += copy;
ffc10234: 7d 29 fa 14 add r9,r9,r31
ffc10238: 91 3d 00 1c stw r9,28(r29)
rc = rtems_bdbuf_release_modified(diskbuf);
ffc1023c: 4b ff f7 d5 bl ffc0fa10 <rtems_bdbuf_release_modified>
if (rc != RTEMS_SUCCESSFUL)
ffc10240: 2c 03 00 00 cmpwi r3,0
ffc10244: 40 82 00 20 bne- ffc10264 <rtems_blkdev_generic_write+0x100><== NEVER TAKEN
break;
count -= copy;
ffc10248: 7f 9f e0 50 subf r28,r31,r28
buf += copy;
ffc1024c: 7f 39 fa 14 add r25,r25,r31
blkofs = 0;
ffc10250: 3b c0 00 00 li r30,0
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)
ffc10254: 2f 9c 00 00 cmpwi cr7,r28,0
/* rtems_blkdev_generic_write --
* Generic block device write primitive. Implemented using block device
* buffer management primitives.
*/
rtems_device_driver
rtems_blkdev_generic_write(
ffc10258: 7c 9a ba 14 add r4,r26,r23
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)
ffc1025c: 40 9e ff 78 bne+ cr7,ffc101d4 <rtems_blkdev_generic_write+0x70>
ffc10260: 38 60 00 00 li r3,0
blkofs = 0;
block++;
}
return rc;
}
ffc10264: 39 61 00 40 addi r11,r1,64
ffc10268: 48 00 94 c8 b ffc19730 <_restgpr_23_x>
ffc045e4 <rtems_blkdev_imfs_fsync_or_fdatasync>:
}
static int rtems_blkdev_imfs_fsync_or_fdatasync(
rtems_libio_t *iop
)
{
ffc045e4: 94 21 ff f8 stwu r1,-8(r1)
ffc045e8: 7c 08 02 a6 mflr r0
ffc045ec: 90 01 00 0c stw r0,12(r1)
} else {
sc = RTEMS_INVALID_ID;
}
return sc;
}
ffc045f0: 81 23 00 1c lwz r9,28(r3)
)
{
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);
ffc045f4: 80 69 00 50 lwz r3,80(r9)
ffc045f8: 48 00 c2 cd bl ffc108c4 <rtems_bdbuf_syncdev>
if (sc != RTEMS_SUCCESSFUL) {
ffc045fc: 2f 83 00 00 cmpwi cr7,r3,0
ffc04600: 41 be 00 18 beq+ cr7,ffc04618 <rtems_blkdev_imfs_fsync_or_fdatasync+0x34><== ALWAYS TAKEN
errno = EIO;
ffc04604: 48 01 0a 55 bl ffc15058 <__errno> <== NOT EXECUTED
ffc04608: 39 20 00 05 li r9,5 <== NOT EXECUTED
ffc0460c: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED
ffc04610: 38 60 ff ff li r3,-1 <== NOT EXECUTED
ffc04614: 48 00 00 08 b ffc0461c <rtems_blkdev_imfs_fsync_or_fdatasync+0x38><== NOT EXECUTED
static int rtems_blkdev_imfs_fsync_or_fdatasync(
rtems_libio_t *iop
)
{
int rv = 0;
ffc04618: 38 60 00 00 li r3,0
errno = EIO;
rv = -1;
}
return rv;
}
ffc0461c: 80 01 00 0c lwz r0,12(r1)
ffc04620: 38 21 00 08 addi r1,r1,8
ffc04624: 7c 08 03 a6 mtlr r0
ffc04628: 4e 80 00 20 blr
ffc0462c <rtems_blkdev_imfs_ioctl>:
void *buffer
)
{
int rv = 0;
if (request != RTEMS_BLKIO_REQUEST) {
ffc0462c: 6c 89 c0 18 xoris r9,r4,49176
ffc04630: 2f 89 42 01 cmpwi cr7,r9,16897
ffc04634: 41 9e 00 18 beq- cr7,ffc0464c <rtems_blkdev_imfs_ioctl+0x20><== NEVER TAKEN
} else {
sc = RTEMS_INVALID_ID;
}
return sc;
}
ffc04638: 81 23 00 1c lwz r9,28(r3)
ffc0463c: 80 69 00 50 lwz r3,80(r9)
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);
ffc04640: 81 23 00 38 lwz r9,56(r3)
ffc04644: 7d 29 03 a6 mtctr r9
ffc04648: 4e 80 04 20 bctr
static int rtems_blkdev_imfs_ioctl(
rtems_libio_t *iop,
uint32_t request,
void *buffer
)
{
ffc0464c: 94 21 ff f8 stwu r1,-8(r1) <== NOT EXECUTED
ffc04650: 7c 08 02 a6 mflr r0 <== NOT EXECUTED
ffc04654: 90 01 00 0c stw r0,12(r1) <== NOT EXECUTED
rv = (*dd->ioctl)(dd, request, buffer);
} else {
/*
* It is not allowed to directly access the driver circumventing the cache.
*/
errno = EINVAL;
ffc04658: 48 01 0a 01 bl ffc15058 <__errno> <== NOT EXECUTED
ffc0465c: 39 20 00 16 li r9,22 <== NOT EXECUTED
rv = -1;
}
return rv;
}
ffc04660: 80 01 00 0c lwz r0,12(r1) <== NOT EXECUTED
rv = (*dd->ioctl)(dd, request, buffer);
} else {
/*
* It is not allowed to directly access the driver circumventing the cache.
*/
errno = EINVAL;
ffc04664: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED
rv = -1;
}
return rv;
}
ffc04668: 38 60 ff ff li r3,-1 <== NOT EXECUTED
ffc0466c: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED
ffc04670: 38 21 00 08 addi r1,r1,8 <== NOT EXECUTED
ffc04674: 4e 80 00 20 blr <== NOT EXECUTED
ffc04418 <rtems_blkdev_imfs_read>:
static ssize_t rtems_blkdev_imfs_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
ffc04418: 94 21 ff c0 stwu r1,-64(r1)
ffc0441c: 7c 08 02 a6 mflr r0
ffc04420: 90 01 00 44 stw r0,68(r1)
ffc04424: be c1 00 18 stmw r22,24(r1)
ffc04428: 7c bb 2b 78 mr r27,r5
ffc0442c: 7c 7c 1b 78 mr r28,r3
} else {
sc = RTEMS_INVALID_ID;
}
return sc;
}
ffc04430: 81 23 00 1c lwz r9,28(r3)
static ssize_t rtems_blkdev_imfs_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
ffc04434: 7c 98 23 78 mr r24,r4
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;
ffc04438: 83 e3 00 0c lwz r31,12(r3)
} else {
sc = RTEMS_INVALID_ID;
}
return sc;
}
ffc0443c: 82 e9 00 50 lwz r23,80(r9)
{
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;
ffc04440: 83 c3 00 08 lwz r30,8(r3)
ssize_t block_size = (ssize_t) rtems_disk_get_block_size(dd);
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (offset / block_size);
ffc04444: 7f e4 fb 78 mr r4,r31
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;
ssize_t block_size = (ssize_t) rtems_disk_get_block_size(dd);
ffc04448: 83 b7 00 24 lwz r29,36(r23)
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (offset / block_size);
ffc0444c: 7f c3 f3 78 mr r3,r30
ffc04450: 7f b9 fe 70 srawi r25,r29,31
ffc04454: 7f 25 cb 78 mr r5,r25
ffc04458: 7f a6 eb 78 mr r6,r29
ffc0445c: 48 01 4b 19 bl ffc18f74 <__divdi3>
ssize_t block_offset = (ssize_t) (offset % block_size);
ffc04460: 7f 25 cb 78 mr r5,r25
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;
ssize_t block_size = (ssize_t) rtems_disk_get_block_size(dd);
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (offset / block_size);
ffc04464: 7c 9a 23 78 mr r26,r4
ssize_t block_offset = (ssize_t) (offset % block_size);
ffc04468: 7f c3 f3 78 mr r3,r30
ffc0446c: 7f e4 fb 78 mr r4,r31
ffc04470: 7f a6 eb 78 mr r6,r29
ffc04474: 48 01 4f 25 bl ffc19398 <__moddi3>
)
{
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;
ffc04478: 7f 7f db 78 mr r31,r27
off_t offset = iop->offset;
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);
ffc0447c: 7c 99 23 78 mr r25,r4
char *dst = buffer;
while (remaining > 0) {
ffc04480: 48 00 00 74 b ffc044f4 <rtems_blkdev_imfs_read+0xdc>
rtems_bdbuf_buffer *bd;
rtems_status_code sc = rtems_bdbuf_read(dd, block, &bd);
ffc04484: 7e e3 bb 78 mr r3,r23
ffc04488: 7f 44 d3 78 mr r4,r26
ffc0448c: 38 a1 00 08 addi r5,r1,8
ffc04490: 48 00 bf bd bl ffc1044c <rtems_bdbuf_read>
if (sc == RTEMS_SUCCESSFUL) {
ffc04494: 2f 83 00 00 cmpwi cr7,r3,0
ffc04498: 40 9e 00 50 bne- cr7,ffc044e8 <rtems_blkdev_imfs_read+0xd0><== NEVER TAKEN
ssize_t copy = block_size - block_offset;
ffc0449c: 7f d9 e8 50 subf r30,r25,r29
ffc044a0: 7f 9e f8 00 cmpw cr7,r30,r31
ffc044a4: 40 9d 00 08 ble- cr7,ffc044ac <rtems_blkdev_imfs_read+0x94>
ffc044a8: 7f fe fb 78 mr r30,r31
if (copy > remaining) {
copy = remaining;
}
memcpy(dst, (char *) bd->buffer + block_offset, (size_t) copy);
ffc044ac: 82 c1 00 08 lwz r22,8(r1)
ffc044b0: 7f c5 f3 78 mr r5,r30
ffc044b4: 7f 03 c3 78 mr r3,r24
ffc044b8: 80 96 00 1c lwz r4,28(r22)
ffc044bc: 7c 84 ca 14 add r4,r4,r25
ffc044c0: 48 01 17 8d bl ffc15c4c <memcpy>
sc = rtems_bdbuf_release(bd);
ffc044c4: 7e c3 b3 78 mr r3,r22
ffc044c8: 48 00 c1 7d bl ffc10644 <rtems_bdbuf_release>
if (sc == RTEMS_SUCCESSFUL) {
ffc044cc: 2f 83 00 00 cmpwi cr7,r3,0
ffc044d0: 40 9e 00 18 bne- cr7,ffc044e8 <rtems_blkdev_imfs_read+0xd0><== NEVER TAKEN
block_offset = 0;
remaining -= copy;
ffc044d4: 7f fe f8 50 subf r31,r30,r31
dst += copy;
ffc044d8: 7f 18 f2 14 add r24,r24,r30
++block;
ffc044dc: 3b 5a 00 01 addi r26,r26,1
memcpy(dst, (char *) bd->buffer + block_offset, (size_t) copy);
sc = rtems_bdbuf_release(bd);
if (sc == RTEMS_SUCCESSFUL) {
block_offset = 0;
ffc044e0: 3b 20 00 00 li r25,0
ffc044e4: 48 00 00 10 b ffc044f4 <rtems_blkdev_imfs_read+0xdc>
remaining -= copy;
dst += copy;
++block;
} else {
remaining = -1;
ffc044e8: 3b e0 ff ff li r31,-1 <== NOT EXECUTED
ffc044ec: 2f 9f 00 00 cmpwi cr7,r31,0 <== NOT EXECUTED
ffc044f0: 48 00 00 0c b ffc044fc <rtems_blkdev_imfs_read+0xe4> <== NOT EXECUTED
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) {
ffc044f4: 2f 9f 00 00 cmpwi cr7,r31,0
ffc044f8: 41 9d ff 8c bgt+ cr7,ffc04484 <rtems_blkdev_imfs_read+0x6c>
} else {
remaining = -1;
}
}
if (remaining >= 0) {
ffc044fc: 40 9e 00 2c bne- cr7,ffc04528 <rtems_blkdev_imfs_read+0x110><== NEVER TAKEN
iop->offset += count;
ffc04500: 81 1c 00 08 lwz r8,8(r28)
ffc04504: 7f 6b db 78 mr r11,r27
ffc04508: 81 3c 00 0c lwz r9,12(r28)
ffc0450c: 39 40 00 00 li r10,0
rv = (ssize_t) count;
ffc04510: 7f 63 db 78 mr r3,r27
remaining = -1;
}
}
if (remaining >= 0) {
iop->offset += count;
ffc04514: 7d 6b 48 14 addc r11,r11,r9
ffc04518: 7d 4a 41 14 adde r10,r10,r8
ffc0451c: 91 5c 00 08 stw r10,8(r28)
ffc04520: 91 7c 00 0c stw r11,12(r28)
ffc04524: 48 00 00 14 b ffc04538 <rtems_blkdev_imfs_read+0x120>
rv = (ssize_t) count;
} else {
errno = EIO;
ffc04528: 48 01 0b 31 bl ffc15058 <__errno> <== NOT EXECUTED
ffc0452c: 39 20 00 05 li r9,5 <== NOT EXECUTED
ffc04530: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED
rv = -1;
ffc04534: 38 60 ff ff li r3,-1 <== NOT EXECUTED
}
return rv;
}
ffc04538: 39 61 00 40 addi r11,r1,64
ffc0453c: 4b ff cb d4 b ffc01110 <_restgpr_22_x>
ffc042d8 <rtems_blkdev_imfs_write>:
static ssize_t rtems_blkdev_imfs_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
ffc042d8: 94 21 ff c0 stwu r1,-64(r1)
ffc042dc: 7c 08 02 a6 mflr r0
ffc042e0: 90 01 00 44 stw r0,68(r1)
ffc042e4: be e1 00 1c stmw r23,28(r1)
ffc042e8: 7c b9 2b 78 mr r25,r5
ffc042ec: 7c 7c 1b 78 mr r28,r3
} else {
sc = RTEMS_INVALID_ID;
}
return sc;
}
ffc042f0: 81 23 00 1c lwz r9,28(r3)
static ssize_t rtems_blkdev_imfs_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
ffc042f4: 7c 98 23 78 mr r24,r4
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;
ffc042f8: 83 e3 00 0c lwz r31,12(r3)
} else {
sc = RTEMS_INVALID_ID;
}
return sc;
}
ffc042fc: 82 e9 00 50 lwz r23,80(r9)
{
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;
ffc04300: 83 c3 00 08 lwz r30,8(r3)
ssize_t block_size = (ssize_t) rtems_disk_get_block_size(dd);
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (offset / block_size);
ffc04304: 7f e4 fb 78 mr r4,r31
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;
ssize_t block_size = (ssize_t) rtems_disk_get_block_size(dd);
ffc04308: 83 b7 00 24 lwz r29,36(r23)
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (offset / block_size);
ffc0430c: 7f c3 f3 78 mr r3,r30
ffc04310: 7f ba fe 70 srawi r26,r29,31
ffc04314: 7f 45 d3 78 mr r5,r26
ffc04318: 7f a6 eb 78 mr r6,r29
ffc0431c: 48 01 4c 59 bl ffc18f74 <__divdi3>
ssize_t block_offset = (ssize_t) (offset % block_size);
ffc04320: 7f 45 d3 78 mr r5,r26
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;
ssize_t block_size = (ssize_t) rtems_disk_get_block_size(dd);
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (offset / block_size);
ffc04324: 7c 9b 23 78 mr r27,r4
ssize_t block_offset = (ssize_t) (offset % block_size);
ffc04328: 7f c3 f3 78 mr r3,r30
ffc0432c: 7f e4 fb 78 mr r4,r31
ffc04330: 7f a6 eb 78 mr r6,r29
ffc04334: 48 01 50 65 bl ffc19398 <__moddi3>
)
{
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;
ffc04338: 7f 3f cb 78 mr r31,r25
off_t offset = iop->offset;
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);
ffc0433c: 7c 9a 23 78 mr r26,r4
const char *src = buffer;
while (remaining > 0) {
ffc04340: 48 00 00 8c b ffc043cc <rtems_blkdev_imfs_write+0xf4>
rtems_status_code sc;
rtems_bdbuf_buffer *bd;
if (block_offset == 0 && remaining >= block_size) {
ffc04344: 2f 9a 00 00 cmpwi cr7,r26,0
sc = rtems_bdbuf_get(dd, block, &bd);
ffc04348: 7e e3 bb 78 mr r3,r23
ffc0434c: 7f 64 db 78 mr r4,r27
ffc04350: 38 a1 00 08 addi r5,r1,8
while (remaining > 0) {
rtems_status_code sc;
rtems_bdbuf_buffer *bd;
if (block_offset == 0 && remaining >= block_size) {
ffc04354: 40 9e 00 14 bne- cr7,ffc04368 <rtems_blkdev_imfs_write+0x90>
ffc04358: 7f 9f e8 00 cmpw cr7,r31,r29
ffc0435c: 41 bc 00 0c blt+ cr7,ffc04368 <rtems_blkdev_imfs_write+0x90>
sc = rtems_bdbuf_get(dd, block, &bd);
ffc04360: 48 00 c0 15 bl ffc10374 <rtems_bdbuf_get>
ffc04364: 48 00 00 08 b ffc0436c <rtems_blkdev_imfs_write+0x94>
} else {
sc = rtems_bdbuf_read(dd, block, &bd);
ffc04368: 48 00 c0 e5 bl ffc1044c <rtems_bdbuf_read>
}
if (sc == RTEMS_SUCCESSFUL) {
ffc0436c: 2f 83 00 00 cmpwi cr7,r3,0
ffc04370: 40 9e 00 50 bne- cr7,ffc043c0 <rtems_blkdev_imfs_write+0xe8><== NEVER TAKEN
ssize_t copy = block_size - block_offset;
ffc04374: 7f da e8 50 subf r30,r26,r29
ffc04378: 7f 9e f8 00 cmpw cr7,r30,r31
ffc0437c: 40 9d 00 08 ble- cr7,ffc04384 <rtems_blkdev_imfs_write+0xac>
ffc04380: 7f fe fb 78 mr r30,r31
if (copy > remaining) {
copy = remaining;
}
memcpy((char *) bd->buffer + block_offset, src, (size_t) copy);
ffc04384: 81 21 00 08 lwz r9,8(r1)
ffc04388: 7f 04 c3 78 mr r4,r24
ffc0438c: 7f c5 f3 78 mr r5,r30
ffc04390: 80 69 00 1c lwz r3,28(r9)
ffc04394: 7c 63 d2 14 add r3,r3,r26
ffc04398: 48 01 18 b5 bl ffc15c4c <memcpy>
sc = rtems_bdbuf_release_modified(bd);
ffc0439c: 80 61 00 08 lwz r3,8(r1)
ffc043a0: 48 00 c3 81 bl ffc10720 <rtems_bdbuf_release_modified>
if (sc == RTEMS_SUCCESSFUL) {
ffc043a4: 2f 83 00 00 cmpwi cr7,r3,0
ffc043a8: 40 9e 00 18 bne- cr7,ffc043c0 <rtems_blkdev_imfs_write+0xe8><== NEVER TAKEN
block_offset = 0;
remaining -= copy;
ffc043ac: 7f fe f8 50 subf r31,r30,r31
src += copy;
ffc043b0: 7f 18 f2 14 add r24,r24,r30
++block;
ffc043b4: 3b 7b 00 01 addi r27,r27,1
memcpy((char *) bd->buffer + block_offset, src, (size_t) copy);
sc = rtems_bdbuf_release_modified(bd);
if (sc == RTEMS_SUCCESSFUL) {
block_offset = 0;
ffc043b8: 3b 40 00 00 li r26,0
ffc043bc: 48 00 00 10 b ffc043cc <rtems_blkdev_imfs_write+0xf4>
remaining -= copy;
src += copy;
++block;
} else {
remaining = -1;
ffc043c0: 3b e0 ff ff li r31,-1 <== NOT EXECUTED
ffc043c4: 2f 9f 00 00 cmpwi cr7,r31,0 <== NOT EXECUTED
ffc043c8: 48 00 00 0c b ffc043d4 <rtems_blkdev_imfs_write+0xfc><== NOT EXECUTED
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) {
ffc043cc: 2f 9f 00 00 cmpwi cr7,r31,0
ffc043d0: 41 9d ff 74 bgt+ cr7,ffc04344 <rtems_blkdev_imfs_write+0x6c>
} else {
remaining = -1;
}
}
if (remaining >= 0) {
ffc043d4: 40 9e 00 2c bne- cr7,ffc04400 <rtems_blkdev_imfs_write+0x128><== NEVER TAKEN
iop->offset += count;
ffc043d8: 81 1c 00 08 lwz r8,8(r28)
ffc043dc: 7f 2b cb 78 mr r11,r25
ffc043e0: 81 3c 00 0c lwz r9,12(r28)
ffc043e4: 39 40 00 00 li r10,0
rv = (ssize_t) count;
ffc043e8: 7f 23 cb 78 mr r3,r25
remaining = -1;
}
}
if (remaining >= 0) {
iop->offset += count;
ffc043ec: 7d 6b 48 14 addc r11,r11,r9
ffc043f0: 7d 4a 41 14 adde r10,r10,r8
ffc043f4: 91 5c 00 08 stw r10,8(r28)
ffc043f8: 91 7c 00 0c stw r11,12(r28)
ffc043fc: 48 00 00 14 b ffc04410 <rtems_blkdev_imfs_write+0x138>
rv = (ssize_t) count;
} else {
errno = EIO;
ffc04400: 48 01 0c 59 bl ffc15058 <__errno> <== NOT EXECUTED
ffc04404: 39 20 00 05 li r9,5 <== NOT EXECUTED
ffc04408: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED
rv = -1;
ffc0440c: 38 60 ff ff li r3,-1 <== NOT EXECUTED
}
return rv;
}
ffc04410: 39 61 00 40 addi r11,r1,64
ffc04414: 4b ff cd 00 b ffc01114 <_restgpr_23_x>
ffc0ff3c <rtems_blkdev_ioctl>:
rtems_blkdev_ioctl(rtems_disk_device *dd, uint32_t req, void *argp)
{
rtems_status_code sc;
int rc = 0;
switch (req)
ffc0ff3c: 3d 00 40 04 lis r8,16388
#include <rtems/blkdev.h>
#include <rtems/bdbuf.h>
int
rtems_blkdev_ioctl(rtems_disk_device *dd, uint32_t req, void *argp)
{
ffc0ff40: 94 21 ff f8 stwu r1,-8(r1)
rtems_status_code sc;
int rc = 0;
switch (req)
ffc0ff44: 61 08 42 03 ori r8,r8,16899
#include <rtems/blkdev.h>
#include <rtems/bdbuf.h>
int
rtems_blkdev_ioctl(rtems_disk_device *dd, uint32_t req, void *argp)
{
ffc0ff48: 7c 08 02 a6 mflr r0
rtems_status_code sc;
int rc = 0;
switch (req)
ffc0ff4c: 7f 84 40 00 cmpw cr7,r4,r8
#include <rtems/blkdev.h>
#include <rtems/bdbuf.h>
int
rtems_blkdev_ioctl(rtems_disk_device *dd, uint32_t req, void *argp)
{
ffc0ff50: 90 01 00 0c stw r0,12(r1)
rtems_status_code sc;
int rc = 0;
switch (req)
ffc0ff54: 41 9e 00 9c beq- cr7,ffc0fff0 <rtems_blkdev_ioctl+0xb4>
ffc0ff58: 7f 84 40 40 cmplw cr7,r4,r8
ffc0ff5c: 41 9d 00 48 bgt- cr7,ffc0ffa4 <rtems_blkdev_ioctl+0x68>
ffc0ff60: 3d 00 20 00 lis r8,8192
ffc0ff64: 61 08 42 0a ori r8,r8,16906
ffc0ff68: 7f 84 40 00 cmpw cr7,r4,r8
ffc0ff6c: 41 9e 00 c8 beq- cr7,ffc10034 <rtems_blkdev_ioctl+0xf8>
ffc0ff70: 7f 84 40 40 cmplw cr7,r4,r8
ffc0ff74: 41 9d 00 14 bgt- cr7,ffc0ff88 <rtems_blkdev_ioctl+0x4c>
ffc0ff78: 6c 8a 20 00 xoris r10,r4,8192
ffc0ff7c: 2f 8a 42 06 cmpwi cr7,r10,16902
ffc0ff80: 40 9e 00 d4 bne- cr7,ffc10054 <rtems_blkdev_ioctl+0x118>
ffc0ff84: 48 00 00 90 b ffc10014 <rtems_blkdev_ioctl+0xd8>
ffc0ff88: 6c 88 20 00 xoris r8,r4,8192
ffc0ff8c: 2f 88 42 0c cmpwi cr7,r8,16908
ffc0ff90: 41 9e 00 b8 beq- cr7,ffc10048 <rtems_blkdev_ioctl+0x10c>
ffc0ff94: 6c 88 40 04 xoris r8,r4,16388
ffc0ff98: 2f 88 42 02 cmpwi cr7,r8,16898
ffc0ff9c: 40 9e 00 b8 bne- cr7,ffc10054 <rtems_blkdev_ioctl+0x118><== NEVER TAKEN
ffc0ffa0: 48 00 00 48 b ffc0ffe8 <rtems_blkdev_ioctl+0xac>
ffc0ffa4: 3d 00 40 04 lis r8,16388
ffc0ffa8: 61 08 42 09 ori r8,r8,16905
ffc0ffac: 7f 84 40 00 cmpw cr7,r4,r8
ffc0ffb0: 41 9e 00 7c beq- cr7,ffc1002c <rtems_blkdev_ioctl+0xf0>
ffc0ffb4: 7f 84 40 40 cmplw cr7,r4,r8
ffc0ffb8: 41 9d 00 14 bgt- cr7,ffc0ffcc <rtems_blkdev_ioctl+0x90>
ffc0ffbc: 6c 88 40 04 xoris r8,r4,16388
ffc0ffc0: 2f 88 42 05 cmpwi cr7,r8,16901
ffc0ffc4: 40 9e 00 90 bne- cr7,ffc10054 <rtems_blkdev_ioctl+0x118><== NEVER TAKEN
ffc0ffc8: 48 00 00 40 b ffc10008 <rtems_blkdev_ioctl+0xcc>
ffc0ffcc: 6c 8a 40 04 xoris r10,r4,16388
ffc0ffd0: 2f 8a 42 0b cmpwi cr7,r10,16907
ffc0ffd4: 41 9e 00 68 beq- cr7,ffc1003c <rtems_blkdev_ioctl+0x100>
ffc0ffd8: 6c 8a 80 04 xoris r10,r4,32772
ffc0ffdc: 2f 8a 42 04 cmpwi cr7,r10,16900
ffc0ffe0: 40 9e 00 74 bne- cr7,ffc10054 <rtems_blkdev_ioctl+0x118><== NEVER TAKEN
ffc0ffe4: 48 00 00 14 b ffc0fff8 <rtems_blkdev_ioctl+0xbc>
{
case RTEMS_BLKIO_GETMEDIABLKSIZE:
*(uint32_t *) argp = dd->media_block_size;
ffc0ffe8: 81 23 00 20 lwz r9,32(r3)
ffc0ffec: 48 00 00 20 b ffc1000c <rtems_blkdev_ioctl+0xd0>
break;
case RTEMS_BLKIO_GETBLKSIZE:
*(uint32_t *) argp = dd->block_size;
ffc0fff0: 81 23 00 24 lwz r9,36(r3)
ffc0fff4: 48 00 00 18 b ffc1000c <rtems_blkdev_ioctl+0xd0>
break;
case RTEMS_BLKIO_SETBLKSIZE:
sc = rtems_bdbuf_set_block_size(dd, *(uint32_t *) argp, true);
ffc0fff8: 80 85 00 00 lwz r4,0(r5)
ffc0fffc: 38 a0 00 01 li r5,1
ffc10000: 4b ff fd d1 bl ffc0fdd0 <rtems_bdbuf_set_block_size>
ffc10004: 48 00 00 14 b ffc10018 <rtems_blkdev_ioctl+0xdc>
rc = -1;
}
break;
case RTEMS_BLKIO_GETSIZE:
*(rtems_blkdev_bnum *) argp = dd->size;
ffc10008: 81 23 00 1c lwz r9,28(r3)
ffc1000c: 91 25 00 00 stw r9,0(r5)
ffc10010: 48 00 00 3c b ffc1004c <rtems_blkdev_ioctl+0x110>
break;
case RTEMS_BLKIO_SYNCDEV:
sc = rtems_bdbuf_syncdev(dd);
ffc10014: 4b ff fb a1 bl ffc0fbb4 <rtems_bdbuf_syncdev>
if (sc != RTEMS_SUCCESSFUL) {
ffc10018: 2f 83 00 00 cmpwi cr7,r3,0
ffc1001c: 41 be 00 30 beq+ cr7,ffc1004c <rtems_blkdev_ioctl+0x110><== ALWAYS TAKEN
errno = EIO;
ffc10020: 48 00 48 f1 bl ffc14910 <__errno> <== NOT EXECUTED
ffc10024: 39 20 00 05 li r9,5 <== NOT EXECUTED
ffc10028: 48 00 00 34 b ffc1005c <rtems_blkdev_ioctl+0x120> <== NOT EXECUTED
rc = -1;
}
break;
case RTEMS_BLKIO_GETDISKDEV:
*(rtems_disk_device **) argp = dd;
ffc1002c: 90 65 00 00 stw r3,0(r5)
ffc10030: 48 00 00 1c b ffc1004c <rtems_blkdev_ioctl+0x110>
break;
case RTEMS_BLKIO_PURGEDEV:
rtems_bdbuf_purge_dev(dd);
ffc10034: 4b ff fb e5 bl ffc0fc18 <rtems_bdbuf_purge_dev>
ffc10038: 48 00 00 14 b ffc1004c <rtems_blkdev_ioctl+0x110>
break;
case RTEMS_BLKIO_GETDEVSTATS:
rtems_bdbuf_get_device_stats(dd, (rtems_blkdev_stats *) argp);
ffc1003c: 7c a4 2b 78 mr r4,r5
ffc10040: 4b ff fe 81 bl ffc0fec0 <rtems_bdbuf_get_device_stats>
ffc10044: 48 00 00 08 b ffc1004c <rtems_blkdev_ioctl+0x110>
break;
case RTEMS_BLKIO_RESETDEVSTATS:
rtems_bdbuf_reset_device_stats(dd);
ffc10048: 4b ff fe b5 bl ffc0fefc <rtems_bdbuf_reset_device_stats>
int
rtems_blkdev_ioctl(rtems_disk_device *dd, uint32_t req, void *argp)
{
rtems_status_code sc;
int rc = 0;
ffc1004c: 38 60 00 00 li r3,0
rtems_bdbuf_get_device_stats(dd, (rtems_blkdev_stats *) argp);
break;
case RTEMS_BLKIO_RESETDEVSTATS:
rtems_bdbuf_reset_device_stats(dd);
break;
ffc10050: 48 00 00 14 b ffc10064 <rtems_blkdev_ioctl+0x128>
default:
errno = EINVAL;
ffc10054: 48 00 48 bd bl ffc14910 <__errno>
ffc10058: 39 20 00 16 li r9,22
ffc1005c: 91 23 00 00 stw r9,0(r3)
rc = -1;
ffc10060: 38 60 ff ff li r3,-1
break;
}
return rc;
}
ffc10064: 80 01 00 0c lwz r0,12(r1)
ffc10068: 38 21 00 08 addi r1,r1,8
ffc1006c: 7c 08 03 a6 mtlr r0
ffc10070: 4e 80 00 20 blr
ffc231a4 <rtems_blkstats>:
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
void rtems_blkstats(FILE *output, const char *device, bool reset)
{
ffc231a4: 94 21 ff 78 stwu r1,-136(r1) <== NOT EXECUTED
ffc231a8: 7c 08 02 a6 mflr r0 <== NOT EXECUTED
ffc231ac: bf a1 00 7c stmw r29,124(r1) <== NOT EXECUTED
ffc231b0: 7c 7f 1b 78 mr r31,r3 <== NOT EXECUTED
int fd = open(device, O_RDONLY);
ffc231b4: 7c 83 23 78 mr r3,r4 <== NOT EXECUTED
ffc231b8: 38 80 00 00 li r4,0 <== NOT EXECUTED
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
void rtems_blkstats(FILE *output, const char *device, bool reset)
{
ffc231bc: 90 01 00 8c stw r0,140(r1) <== NOT EXECUTED
ffc231c0: 7c bd 2b 78 mr r29,r5 <== NOT EXECUTED
int fd = open(device, O_RDONLY);
ffc231c4: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc231c8: 4b fe 19 b9 bl ffc04b80 <open> <== NOT EXECUTED
if (fd >= 0) {
ffc231cc: 7c 7e 1b 79 mr. r30,r3 <== NOT EXECUTED
ffc231d0: 41 80 01 24 blt- ffc232f4 <rtems_blkstats+0x150> <== NOT EXECUTED
struct stat st;
int rv;
rv = fstat(fd, &st);
ffc231d4: 38 81 00 08 addi r4,r1,8 <== NOT EXECUTED
ffc231d8: 48 00 1e a5 bl ffc2507c <fstat> <== NOT EXECUTED
if (rv == 0) {
ffc231dc: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc231e0: 40 9e 00 c0 bne- cr7,ffc232a0 <rtems_blkstats+0xfc> <== NOT EXECUTED
if (S_ISBLK(st.st_mode)) {
ffc231e4: 81 21 00 14 lwz r9,20(r1) <== NOT EXECUTED
ffc231e8: 55 29 04 26 rlwinm r9,r9,0,16,19 <== NOT EXECUTED
ffc231ec: 2f 89 60 00 cmpwi cr7,r9,24576 <== NOT EXECUTED
ffc231f0: 40 9e 00 9c bne- cr7,ffc2328c <rtems_blkstats+0xe8> <== NOT EXECUTED
if (reset) {
ffc231f4: 2f 9d 00 00 cmpwi cr7,r29,0 <== 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);
ffc231f8: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc231fc: 41 9e 00 3c beq- cr7,ffc23238 <rtems_blkstats+0x94> <== NOT EXECUTED
ffc23200: 3c 80 20 00 lis r4,8192 <== NOT EXECUTED
ffc23204: 60 84 42 0c ori r4,r4,16908 <== NOT EXECUTED
ffc23208: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc2320c: 48 00 2a 41 bl ffc25c4c <ioctl> <== NOT EXECUTED
rv = rtems_disk_fd_reset_device_stats(fd);
if (rv != 0) {
ffc23210: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc23214: 41 be 00 b0 beq+ cr7,ffc232c4 <rtems_blkstats+0x120> <== NOT EXECUTED
fprintf(output, "error: reset stats: %s\n", strerror(errno));
ffc23218: 48 01 51 f1 bl ffc38408 <__errno> <== NOT EXECUTED
ffc2321c: 80 63 00 00 lwz r3,0(r3) <== NOT EXECUTED
ffc23220: 48 01 d1 5d bl ffc4037c <strerror> <== NOT EXECUTED
ffc23224: 3c 80 ff c6 lis r4,-58 <== NOT EXECUTED
ffc23228: 7c 65 1b 78 mr r5,r3 <== NOT EXECUTED
ffc2322c: 38 84 ab c0 addi r4,r4,-21568 <== NOT EXECUTED
ffc23230: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc23234: 48 00 00 88 b ffc232bc <rtems_blkstats+0x118> <== NOT EXECUTED
static inline int rtems_disk_fd_get_device_stats(
int fd,
rtems_blkdev_stats *stats
)
{
return ioctl(fd, RTEMS_BLKIO_GETDEVSTATS, stats);
ffc23238: 3c 80 40 04 lis r4,16388 <== NOT EXECUTED
ffc2323c: 60 84 42 0b ori r4,r4,16907 <== NOT EXECUTED
ffc23240: 38 a1 00 50 addi r5,r1,80 <== NOT EXECUTED
ffc23244: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc23248: 48 00 2a 05 bl ffc25c4c <ioctl> <== NOT EXECUTED
}
} else {
rtems_blkdev_stats stats;
rv = rtems_disk_fd_get_device_stats(fd, &stats);
if (rv == 0) {
ffc2324c: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc23250: 40 9e 00 1c bne- cr7,ffc2326c <rtems_blkstats+0xc8> <== NOT EXECUTED
rtems_blkdev_print_stats(
ffc23254: 3c 80 ff c4 lis r4,-60 <== NOT EXECUTED
ffc23258: 38 61 00 50 addi r3,r1,80 <== NOT EXECUTED
ffc2325c: 38 84 92 40 addi r4,r4,-28096 <== NOT EXECUTED
ffc23260: 7f e5 fb 78 mr r5,r31 <== NOT EXECUTED
ffc23264: 48 00 00 bd bl ffc23320 <rtems_blkdev_print_stats> <== NOT EXECUTED
ffc23268: 48 00 00 5c b ffc232c4 <rtems_blkstats+0x120> <== NOT EXECUTED
&stats,
(rtems_printk_plugin_t) fprintf,
output
);
} else {
fprintf(output, "error: get stats: %s\n", strerror(errno));
ffc2326c: 48 01 51 9d bl ffc38408 <__errno> <== NOT EXECUTED
ffc23270: 80 63 00 00 lwz r3,0(r3) <== NOT EXECUTED
ffc23274: 48 01 d1 09 bl ffc4037c <strerror> <== NOT EXECUTED
ffc23278: 3c 80 ff c6 lis r4,-58 <== NOT EXECUTED
ffc2327c: 7c 65 1b 78 mr r5,r3 <== NOT EXECUTED
ffc23280: 38 84 ab d8 addi r4,r4,-21544 <== NOT EXECUTED
ffc23284: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc23288: 48 00 00 34 b ffc232bc <rtems_blkstats+0x118> <== NOT EXECUTED
}
}
} else {
fprintf(output, "error: not a block device\n");
ffc2328c: 3c 60 ff c6 lis r3,-58 <== NOT EXECUTED
ffc23290: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED
ffc23294: 38 63 ab ee addi r3,r3,-21522 <== NOT EXECUTED
ffc23298: 48 01 61 a5 bl ffc3943c <fputs> <== NOT EXECUTED
ffc2329c: 48 00 00 28 b ffc232c4 <rtems_blkstats+0x120> <== NOT EXECUTED
}
} else {
fprintf(output, "error: get file stats: %s\n", strerror(errno));
ffc232a0: 48 01 51 69 bl ffc38408 <__errno> <== NOT EXECUTED
ffc232a4: 80 63 00 00 lwz r3,0(r3) <== NOT EXECUTED
ffc232a8: 48 01 d0 d5 bl ffc4037c <strerror> <== NOT EXECUTED
ffc232ac: 3c 80 ff c6 lis r4,-58 <== NOT EXECUTED
ffc232b0: 7c 65 1b 78 mr r5,r3 <== NOT EXECUTED
ffc232b4: 38 84 ac 09 addi r4,r4,-21495 <== NOT EXECUTED
ffc232b8: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc232bc: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc232c0: 48 01 5f 81 bl ffc39240 <fprintf> <== NOT EXECUTED
}
rv = close(fd);
ffc232c4: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc232c8: 48 00 18 9d bl ffc24b64 <close> <== NOT EXECUTED
if (rv != 0) {
ffc232cc: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc232d0: 41 be 00 48 beq+ cr7,ffc23318 <rtems_blkstats+0x174> <== NOT EXECUTED
fprintf(output, "error: close device: %s\n", strerror(errno));
ffc232d4: 48 01 51 35 bl ffc38408 <__errno> <== NOT EXECUTED
ffc232d8: 80 63 00 00 lwz r3,0(r3) <== NOT EXECUTED
ffc232dc: 48 01 d0 a1 bl ffc4037c <strerror> <== NOT EXECUTED
ffc232e0: 3c 80 ff c6 lis r4,-58 <== NOT EXECUTED
ffc232e4: 7c 65 1b 78 mr r5,r3 <== NOT EXECUTED
ffc232e8: 38 84 ac 24 addi r4,r4,-21468 <== NOT EXECUTED
ffc232ec: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc232f0: 48 00 00 20 b ffc23310 <rtems_blkstats+0x16c> <== NOT EXECUTED
}
} else {
fprintf(output, "error: open device: %s\n", strerror(errno));
ffc232f4: 48 01 51 15 bl ffc38408 <__errno> <== NOT EXECUTED
ffc232f8: 80 63 00 00 lwz r3,0(r3) <== NOT EXECUTED
ffc232fc: 48 01 d0 81 bl ffc4037c <strerror> <== NOT EXECUTED
ffc23300: 3c 80 ff c6 lis r4,-58 <== NOT EXECUTED
ffc23304: 7c 65 1b 78 mr r5,r3 <== NOT EXECUTED
ffc23308: 38 84 ac 3d addi r4,r4,-21443 <== NOT EXECUTED
ffc2330c: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc23310: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc23314: 48 01 5f 2d bl ffc39240 <fprintf> <== NOT EXECUTED
}
}
ffc23318: 39 61 00 88 addi r11,r1,136 <== NOT EXECUTED
ffc2331c: 48 03 11 e8 b ffc54504 <_restgpr_29_x> <== NOT EXECUTED
ffc091e0 <rtems_chain_get_with_wait>:
rtems_chain_control *chain,
rtems_event_set events,
rtems_interval timeout,
rtems_chain_node **node_ptr
)
{
ffc091e0: 94 21 ff d0 stwu r1,-48(r1)
ffc091e4: 7c 08 02 a6 mflr r0
ffc091e8: bf 61 00 1c stmw r27,28(r1)
ffc091ec: 7c 7e 1b 78 mr r30,r3
ffc091f0: 7c 9d 23 78 mr r29,r4
ffc091f4: 90 01 00 34 stw r0,52(r1)
ffc091f8: 7c bc 2b 78 mr r28,r5
ffc091fc: 7c df 33 78 mr r31,r6
ffc09200: 48 00 00 20 b ffc09220 <rtems_chain_get_with_wait+0x40>
while (
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
) {
rtems_event_set out;
sc = rtems_event_receive(
ffc09204: 7f a3 eb 78 mr r3,r29
ffc09208: 38 80 00 00 li r4,0
ffc0920c: 7f 85 e3 78 mr r5,r28
ffc09210: 38 c1 00 08 addi r6,r1,8
ffc09214: 4b ff f3 2d bl ffc08540 <rtems_event_receive>
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_node *node = NULL;
while (
ffc09218: 2c 03 00 00 cmpwi r3,0
ffc0921c: 40 82 00 18 bne- ffc09234 <rtems_chain_get_with_wait+0x54><== ALWAYS TAKEN
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
ffc09220: 7f c3 f3 78 mr r3,r30
ffc09224: 48 00 06 15 bl ffc09838 <_Chain_Get>
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
ffc09228: 7c 7b 1b 79 mr. r27,r3
ffc0922c: 41 82 ff d8 beq+ ffc09204 <rtems_chain_get_with_wait+0x24>
ffc09230: 38 60 00 00 li r3,0
timeout,
&out
);
}
*node_ptr = node;
ffc09234: 93 7f 00 00 stw r27,0(r31)
return sc;
}
ffc09238: 39 61 00 30 addi r11,r1,48
ffc0923c: 48 00 c4 8c b ffc156c8 <_restgpr_27_x>
ffc047a8 <rtems_cpu_usage_report_with_plugin>:
*/
void rtems_cpu_usage_report_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
ffc047a8: 94 21 ff 88 stwu r1,-120(r1)
ffc047ac: 7c 08 02 a6 mflr r0
ffc047b0: be 21 00 3c stmw r17,60(r1)
uint32_t seconds, nanoseconds;
#else
uint32_t total_units = 0;
#endif
if ( !print )
ffc047b4: 7c 99 23 79 mr. r25,r4
*/
void rtems_cpu_usage_report_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
ffc047b8: 90 01 00 7c stw r0,124(r1)
uint32_t seconds, nanoseconds;
#else
uint32_t total_units = 0;
#endif
if ( !print )
ffc047bc: 41 82 02 40 beq- ffc049fc <rtems_cpu_usage_report_with_plugin+0x254><== NEVER TAKEN
static inline void _Timestamp64_implementation_Set_to_zero(
Timestamp64_Control *_time
)
{
*_time = 0;
ffc047c0: 39 40 00 00 li r10,0
}
}
}
#endif
(*print)(
ffc047c4: 7f 29 03 a6 mtctr r25
ffc047c8: 39 60 00 00 li r11,0
ffc047cc: 91 41 00 20 stw r10,32(r1)
ffc047d0: 3c 80 ff c2 lis r4,-62
ffc047d4: 91 61 00 24 stw r11,36(r1)
ffc047d8: 38 84 f0 47 addi r4,r4,-4025
* 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;
ffc047dc: 3d 20 00 00 lis r9,0
ffc047e0: 3f 40 00 00 lis r26,0
ffc047e4: 39 29 29 20 addi r9,r9,10528
ffc047e8: 3b 5a 30 78 addi r26,r26,12408
ffc047ec: 83 89 00 00 lwz r28,0(r9)
if ( !the_thread )
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
(*print)(
ffc047f0: 3e 80 ff c2 lis r20,-62
* 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;
ffc047f4: 83 a9 00 04 lwz r29,4(r9)
ffc047f8: 3e c0 00 00 lis r22,0
*/
seconds = _Timestamp_Get_seconds( &ran );
nanoseconds = _Timestamp_Get_nanoseconds( &ran ) /
TOD_NANOSECONDS_PER_MICROSECOND;
(*print)( context,
ffc047fc: 3e 40 ff c2 lis r18,-62
ffc04800: 7c 77 1b 78 mr r23,r3
}
}
}
#endif
(*print)(
ffc04804: 4c c6 31 82 crclr 4*cr1+eq
ffc04808: 4e 80 04 21 bctrl
#endif
/*
* rtems_cpu_usage_report
*/
void rtems_cpu_usage_report_with_plugin(
ffc0480c: 3a ba 00 0c addi r21,r26,12
if ( !the_thread )
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
(*print)(
ffc04810: 3a 94 f1 b9 addi r20,r20,-3655
Thread_Control *the_thread,
Timestamp_Control *time_of_context_switch
)
{
#ifndef RTEMS_SMP
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
ffc04814: 3e 60 00 00 lis r19,0
ffc04818: 3a d6 30 68 addi r22,r22,12392
*/
seconds = _Timestamp_Get_seconds( &ran );
nanoseconds = _Timestamp_Get_nanoseconds( &ran ) /
TOD_NANOSECONDS_PER_MICROSECOND;
(*print)( context,
ffc0481c: 3a 52 f1 cc addi r18,r18,-3636
#if !defined(RTEMS_POSIX_API) || defined(RTEMS_DEBUG)
if ( !_Objects_Information_table[ api_index ] )
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
ffc04820: 85 3a 00 04 lwzu r9,4(r26)
if ( information ) {
ffc04824: 3b 60 00 01 li r27,1
#if !defined(RTEMS_POSIX_API) || defined(RTEMS_DEBUG)
if ( !_Objects_Information_table[ api_index ] )
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
ffc04828: 83 09 00 04 lwz r24,4(r9)
if ( information ) {
ffc0482c: 2f 98 00 00 cmpwi cr7,r24,0
ffc04830: 40 be 01 48 bne+ cr7,ffc04978 <rtems_cpu_usage_report_with_plugin+0x1d0><== ALWAYS TAKEN
" ID | NAME | TICKS | PERCENT\n"
#endif
"------------+----------------------------------------+---------------+---------\n"
);
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
ffc04834: 7f 9a a8 00 cmpw cr7,r26,r21
ffc04838: 40 9e ff e8 bne+ cr7,ffc04820 <rtems_cpu_usage_report_with_plugin+0x78>
ffc0483c: 48 00 01 4c b ffc04988 <rtems_cpu_usage_report_with_plugin+0x1e0>
#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 ];
ffc04840: 81 38 00 1c lwz r9,28(r24)
ffc04844: 57 6a 10 3a rlwinm r10,r27,2,0,29
ffc04848: 7f e9 50 2e lwzx r31,r9,r10
if ( !the_thread )
ffc0484c: 2f 9f 00 00 cmpwi cr7,r31,0
ffc04850: 41 9e 01 24 beq- cr7,ffc04974 <rtems_cpu_usage_report_with_plugin+0x1cc><== NEVER TAKEN
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
ffc04854: 80 7f 00 08 lwz r3,8(r31)
ffc04858: 38 80 00 0d li r4,13
ffc0485c: 38 a1 00 08 addi r5,r1,8
ffc04860: 48 00 51 ed bl ffc09a4c <rtems_object_get_name>
(*print)(
ffc04864: 7e e3 bb 78 mr r3,r23
ffc04868: 7e 84 a3 78 mr r4,r20
ffc0486c: 80 bf 00 08 lwz r5,8(r31)
ffc04870: 38 c1 00 08 addi r6,r1,8
ffc04874: 7f 29 03 a6 mtctr r25
ffc04878: 4c c6 31 82 crclr 4*cr1+eq
ffc0487c: 4e 80 04 21 bctrl
/*
* If this is the currently executing thread, account for time
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
ffc04880: 81 3f 00 80 lwz r9,128(r31)
ffc04884: 81 5f 00 84 lwz r10,132(r31)
ffc04888: 91 21 00 18 stw r9,24(r1)
Thread_Control *the_thread,
Timestamp_Control *time_of_context_switch
)
{
#ifndef RTEMS_SMP
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
ffc0488c: 39 33 35 e0 addi r9,r19,13792
/*
* If this is the currently executing thread, account for time
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
ffc04890: 91 41 00 1c stw r10,28(r1)
Thread_Control *the_thread,
Timestamp_Control *time_of_context_switch
)
{
#ifndef RTEMS_SMP
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
ffc04894: 81 49 00 10 lwz r10,16(r9)
ffc04898: 81 0a 00 08 lwz r8,8(r10)
ffc0489c: 81 5f 00 08 lwz r10,8(r31)
ffc048a0: 7f 88 50 00 cmpw cr7,r8,r10
ffc048a4: 40 be 01 48 bne+ cr7,ffc049ec <rtems_cpu_usage_report_with_plugin+0x244>
*/
static inline void _TOD_Get_uptime(
Timestamp_Control *time
)
{
_TOD_Get_with_nanoseconds( time, &_TOD.uptime );
ffc048a8: 38 61 00 28 addi r3,r1,40
*time_of_context_switch = _Thread_Time_of_last_context_switch;
ffc048ac: 83 c9 00 20 lwz r30,32(r9)
ffc048b0: 7e c4 b3 78 mr r4,r22
ffc048b4: 83 e9 00 24 lwz r31,36(r9)
ffc048b8: 48 00 66 b5 bl ffc0af6c <_TOD_Get_with_nanoseconds>
const Timestamp64_Control *_start,
const Timestamp64_Control *_end,
Timestamp64_Control *_result
)
{
*_result = *_end - *_start;
ffc048bc: 81 41 00 28 lwz r10,40(r1)
ffc048c0: 81 61 00 2c lwz r11,44(r1)
static inline void _Timestamp64_implementation_Add_to(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
*_time += *_add;
ffc048c4: 81 01 00 18 lwz r8,24(r1)
ffc048c8: 81 21 00 1c lwz r9,28(r1)
const Timestamp64_Control *_start,
const Timestamp64_Control *_end,
Timestamp64_Control *_result
)
{
*_result = *_end - *_start;
ffc048cc: 7d 7f 58 10 subfc r11,r31,r11
ffc048d0: 7d 5e 51 10 subfe r10,r30,r10
static inline void _Timestamp64_implementation_Add_to(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
*_time += *_add;
ffc048d4: 7d 29 58 14 addc r9,r9,r11
ffc048d8: 7d 08 51 14 adde r8,r8,r10
ffc048dc: 91 01 00 18 stw r8,24(r1)
ffc048e0: 91 21 00 1c stw r9,28(r1)
const Timestamp64_Control *_start,
const Timestamp64_Control *_end,
Timestamp64_Control *_result
)
{
*_result = *_end - *_start;
ffc048e4: 81 41 00 28 lwz r10,40(r1)
_Timestamp_Add_to( &ran, &used );
} else {
_TOD_Get_uptime( &uptime );
}
_Timestamp_Subtract( &uptime_at_last_reset, &uptime, &total );
_Timestamp_Divide( &ran, &total, &ival, &fval );
ffc048e8: 38 61 00 18 addi r3,r1,24
ffc048ec: 81 61 00 2c lwz r11,44(r1)
ffc048f0: 38 81 00 20 addi r4,r1,32
ffc048f4: 38 a1 00 34 addi r5,r1,52
ffc048f8: 7d 7d 58 10 subfc r11,r29,r11
ffc048fc: 7d 5c 51 10 subfe r10,r28,r10
ffc04900: 91 41 00 20 stw r10,32(r1)
ffc04904: 38 c1 00 30 addi r6,r1,48
ffc04908: 91 61 00 24 stw r11,36(r1)
ffc0490c: 48 00 8d 1d bl ffc0d628 <_Timestamp64_Divide>
static inline uint32_t _Timestamp64_implementation_Get_seconds(
const Timestamp64_Control *_time
)
{
return (uint32_t) (*_time / 1000000000L);
ffc04910: 3c c0 3b 9a lis r6,15258
/*
* Print the information
*/
seconds = _Timestamp_Get_seconds( &ran );
ffc04914: 83 c1 00 18 lwz r30,24(r1)
ffc04918: 38 a0 00 00 li r5,0
ffc0491c: 83 e1 00 1c lwz r31,28(r1)
ffc04920: 60 c6 ca 00 ori r6,r6,51712
ffc04924: 7f c3 f3 78 mr r3,r30
ffc04928: 7f e4 fb 78 mr r4,r31
ffc0492c: 48 01 77 6d bl ffc1c098 <__divdi3>
static inline uint32_t _Timestamp64_implementation_Get_nanoseconds(
const Timestamp64_Control *_time
)
{
return (uint32_t) (*_time % 1000000000L);
ffc04930: 3c c0 3b 9a lis r6,15258
static inline uint32_t _Timestamp64_implementation_Get_seconds(
const Timestamp64_Control *_time
)
{
return (uint32_t) (*_time / 1000000000L);
ffc04934: 7c 91 23 78 mr r17,r4
static inline uint32_t _Timestamp64_implementation_Get_nanoseconds(
const Timestamp64_Control *_time
)
{
return (uint32_t) (*_time % 1000000000L);
ffc04938: 38 a0 00 00 li r5,0
ffc0493c: 60 c6 ca 00 ori r6,r6,51712
ffc04940: 7f c3 f3 78 mr r3,r30
ffc04944: 7f e4 fb 78 mr r4,r31
ffc04948: 48 01 7b 75 bl ffc1c4bc <__moddi3>
nanoseconds = _Timestamp_Get_nanoseconds( &ran ) /
ffc0494c: 38 c0 03 e8 li r6,1000
ffc04950: 7c c4 33 96 divwu r6,r4,r6
TOD_NANOSECONDS_PER_MICROSECOND;
(*print)( context,
ffc04954: 80 e1 00 34 lwz r7,52(r1)
ffc04958: 81 01 00 30 lwz r8,48(r1)
ffc0495c: 7f 29 03 a6 mtctr r25
ffc04960: 7e e3 bb 78 mr r3,r23
ffc04964: 7e 44 93 78 mr r4,r18
ffc04968: 7e 25 8b 78 mr r5,r17
ffc0496c: 4c c6 31 82 crclr 4*cr1+eq
ffc04970: 4e 80 04 21 bctrl
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
if ( information ) {
for ( i=1 ; i <= information->maximum ; i++ ) {
ffc04974: 3b 7b 00 01 addi r27,r27,1
ffc04978: a1 38 00 10 lhz r9,16(r24)
ffc0497c: 7f 9b 48 40 cmplw cr7,r27,r9
ffc04980: 40 9d fe c0 ble+ cr7,ffc04840 <rtems_cpu_usage_report_with_plugin+0x98>
ffc04984: 4b ff fe b0 b ffc04834 <rtems_cpu_usage_report_with_plugin+0x8c>
}
}
}
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
seconds = _Timestamp_Get_seconds( &total );
ffc04988: 83 c1 00 20 lwz r30,32(r1)
static inline uint32_t _Timestamp64_implementation_Get_seconds(
const Timestamp64_Control *_time
)
{
return (uint32_t) (*_time / 1000000000L);
ffc0498c: 3c c0 3b 9a lis r6,15258
ffc04990: 83 e1 00 24 lwz r31,36(r1)
ffc04994: 38 a0 00 00 li r5,0
ffc04998: 7f c3 f3 78 mr r3,r30
ffc0499c: 7f e4 fb 78 mr r4,r31
ffc049a0: 60 c6 ca 00 ori r6,r6,51712
ffc049a4: 48 01 76 f5 bl ffc1c098 <__divdi3>
static inline uint32_t _Timestamp64_implementation_Get_nanoseconds(
const Timestamp64_Control *_time
)
{
return (uint32_t) (*_time % 1000000000L);
ffc049a8: 3c c0 3b 9a lis r6,15258
static inline uint32_t _Timestamp64_implementation_Get_seconds(
const Timestamp64_Control *_time
)
{
return (uint32_t) (*_time / 1000000000L);
ffc049ac: 7c 9d 23 78 mr r29,r4
static inline uint32_t _Timestamp64_implementation_Get_nanoseconds(
const Timestamp64_Control *_time
)
{
return (uint32_t) (*_time % 1000000000L);
ffc049b0: 7f c3 f3 78 mr r3,r30
ffc049b4: 7f e4 fb 78 mr r4,r31
ffc049b8: 38 a0 00 00 li r5,0
ffc049bc: 60 c6 ca 00 ori r6,r6,51712
ffc049c0: 48 01 7a fd bl ffc1c4bc <__moddi3>
nanoseconds = _Timestamp_Get_nanoseconds( &total ) /
ffc049c4: 38 c0 03 e8 li r6,1000
ffc049c8: 7c c4 33 96 divwu r6,r4,r6
TOD_NANOSECONDS_PER_MICROSECOND;
(*print)(
ffc049cc: 7f 29 03 a6 mtctr r25
ffc049d0: 3c 80 ff c2 lis r4,-62
ffc049d4: 7e e3 bb 78 mr r3,r23
ffc049d8: 38 84 f1 e4 addi r4,r4,-3612
ffc049dc: 7f a5 eb 78 mr r5,r29
ffc049e0: 4c c6 31 82 crclr 4*cr1+eq
ffc049e4: 4e 80 04 21 bctrl
ffc049e8: 48 00 00 14 b ffc049fc <rtems_cpu_usage_report_with_plugin+0x254>
ffc049ec: 38 61 00 28 addi r3,r1,40
ffc049f0: 7e c4 b3 78 mr r4,r22
ffc049f4: 48 00 65 79 bl ffc0af6c <_TOD_Get_with_nanoseconds>
ffc049f8: 4b ff fe ec b ffc048e4 <rtems_cpu_usage_report_with_plugin+0x13c>
"-------------------------------------------------------------------------------\n",
_Watchdog_Ticks_since_boot - CPU_usage_Ticks_at_last_reset,
total_units
);
#endif
}
ffc049fc: 39 61 00 78 addi r11,r1,120
ffc04a00: 4b ff c9 04 b ffc01304 <_restgpr_17_x>
ffc104cc <rtems_deviceio_errno>:
[RTEMS_PROXY_BLOCKING] = EIO
};
int rtems_deviceio_errno(rtems_status_code sc)
{
if (sc == RTEMS_SUCCESSFUL) {
ffc104cc: 2c 03 00 00 cmpwi r3,0
ffc104d0: 41 a2 00 44 beq+ ffc10514 <rtems_deviceio_errno+0x48>
return 0;
} else {
int eno = EINVAL;
if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) {
ffc104d4: 2b 83 00 1c cmplwi cr7,r3,28
[RTEMS_IO_ERROR] = EIO,
[RTEMS_PROXY_BLOCKING] = EIO
};
int rtems_deviceio_errno(rtems_status_code sc)
{
ffc104d8: 7c 08 02 a6 mflr r0
ffc104dc: 7c 2b 0b 78 mr r11,r1
ffc104e0: 94 21 ff f0 stwu r1,-16(r1)
ffc104e4: 48 00 a8 d9 bl ffc1adbc <_savegpr_31>
ffc104e8: 90 01 00 14 stw r0,20(r1)
if (sc == RTEMS_SUCCESSFUL) {
return 0;
} else {
int eno = EINVAL;
ffc104ec: 3b e0 00 16 li r31,22
if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) {
ffc104f0: 41 9d 00 14 bgt- cr7,ffc10504 <rtems_deviceio_errno+0x38><== NEVER TAKEN
eno = status_code_to_errno [sc];
ffc104f4: 3d 40 ff c2 lis r10,-62
ffc104f8: 54 69 10 3a rlwinm r9,r3,2,0,29
ffc104fc: 39 4a d6 10 addi r10,r10,-10736
ffc10500: 7f ea 48 2e lwzx r31,r10,r9
}
errno = eno;
ffc10504: 48 00 00 a9 bl ffc105ac <__errno>
ffc10508: 93 e3 00 00 stw r31,0(r3)
return -1;
ffc1050c: 38 60 ff ff li r3,-1
ffc10510: 48 00 00 0c b ffc1051c <rtems_deviceio_errno+0x50>
};
int rtems_deviceio_errno(rtems_status_code sc)
{
if (sc == RTEMS_SUCCESSFUL) {
return 0;
ffc10514: 38 60 00 00 li r3,0
ffc10518: 4e 80 00 20 blr
errno = eno;
return -1;
}
}
ffc1051c: 39 61 00 10 addi r11,r1,16
ffc10520: 4b ff 00 a4 b ffc005c4 <_restgpr_31_x>
ffc045f0 <rtems_disk_create_log>:
dev_t phys,
rtems_blkdev_bnum block_begin,
rtems_blkdev_bnum block_count,
const char *name
)
{
ffc045f0: 94 21 ff c8 stwu r1,-56(r1)
ffc045f4: 7c 08 02 a6 mflr r0
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_disk_device *phys_dd = NULL;
rtems_disk_device *dd = NULL;
ffc045f8: 39 40 00 00 li r10,0
dev_t phys,
rtems_blkdev_bnum block_begin,
rtems_blkdev_bnum block_count,
const char *name
)
{
ffc045fc: bf 01 00 18 stmw r24,24(r1)
ffc04600: 7c 9f 23 78 mr r31,r4
ffc04604: 7c 7e 1b 78 mr r30,r3
ffc04608: 90 01 00 3c stw r0,60(r1)
ffc0460c: 7c dd 33 78 mr r29,r6
ffc04610: 7c bc 2b 78 mr r28,r5
ffc04614: 7c f9 3b 78 mr r25,r7
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_disk_device *phys_dd = NULL;
rtems_disk_device *dd = NULL;
ffc04618: 91 41 00 0c stw r10,12(r1)
dev_t phys,
rtems_blkdev_bnum block_begin,
rtems_blkdev_bnum block_count,
const char *name
)
{
ffc0461c: 7d 1a 43 78 mr r26,r8
ffc04620: 7d 38 4b 78 mr r24,r9
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_disk_device *phys_dd = NULL;
rtems_disk_device *dd = NULL;
char *alloc_name = NULL;
ffc04624: 91 41 00 08 stw r10,8(r1)
sc = disk_lock();
ffc04628: 4b ff fb ed bl ffc04214 <disk_lock>
if (sc != RTEMS_SUCCESSFUL) {
ffc0462c: 7c 7b 1b 79 mr. r27,r3
ffc04630: 40 a2 00 a4 bne+ ffc046d4 <rtems_disk_create_log+0xe4> <== NEVER TAKEN
return sc;
}
phys_dd = get_disk_entry(phys, true);
ffc04634: 7f a4 eb 78 mr r4,r29
ffc04638: 7f 83 e3 78 mr r3,r28
ffc0463c: 38 a0 00 01 li r5,1
ffc04640: 4b ff fa e5 bl ffc04124 <get_disk_entry>
if (phys_dd == NULL) {
ffc04644: 7c 7d 1b 79 mr. r29,r3
ffc04648: 40 a2 00 10 bne+ ffc04658 <rtems_disk_create_log+0x68>
disk_unlock();
ffc0464c: 4b ff fc 19 bl ffc04264 <disk_unlock>
return RTEMS_INVALID_ID;
ffc04650: 3b 60 00 04 li r27,4
ffc04654: 48 00 00 80 b ffc046d4 <rtems_disk_create_log+0xe4>
}
sc = create_disk(dev, name, &dd, &alloc_name);
ffc04658: 7f c3 f3 78 mr r3,r30
ffc0465c: 7f e4 fb 78 mr r4,r31
ffc04660: 7f 05 c3 78 mr r5,r24
ffc04664: 38 c1 00 0c addi r6,r1,12
ffc04668: 38 e1 00 08 addi r7,r1,8
ffc0466c: 4b ff fc 41 bl ffc042ac <create_disk>
if (sc != RTEMS_SUCCESSFUL) {
ffc04670: 7c 7b 1b 79 mr. r27,r3
ffc04674: 41 a2 00 08 beq+ ffc0467c <rtems_disk_create_log+0x8c>
ffc04678: 48 00 00 58 b ffc046d0 <rtems_disk_create_log+0xe0>
disk_unlock();
return sc;
}
sc = rtems_disk_init_log(
ffc0467c: 80 61 00 0c lwz r3,12(r1)
ffc04680: 7f a4 eb 78 mr r4,r29
ffc04684: 7f 25 cb 78 mr r5,r25
ffc04688: 7f 46 d3 78 mr r6,r26
ffc0468c: 48 00 be e5 bl ffc10570 <rtems_disk_init_log>
phys_dd,
block_begin,
block_count
);
dd->dev = dev;
ffc04690: 81 21 00 0c lwz r9,12(r1)
dd->name = alloc_name;
ffc04694: 81 41 00 08 lwz r10,8(r1)
++phys_dd->uses;
if (sc != RTEMS_SUCCESSFUL) {
ffc04698: 7c 7b 1b 79 mr. r27,r3
phys_dd,
block_begin,
block_count
);
dd->dev = dev;
ffc0469c: 93 c9 00 00 stw r30,0(r9)
dd->name = alloc_name;
ffc046a0: 91 49 00 10 stw r10,16(r9)
++phys_dd->uses;
ffc046a4: 81 5d 00 14 lwz r10,20(r29)
phys_dd,
block_begin,
block_count
);
dd->dev = dev;
ffc046a8: 93 e9 00 04 stw r31,4(r9)
dd->name = alloc_name;
++phys_dd->uses;
ffc046ac: 39 4a 00 01 addi r10,r10,1
ffc046b0: 91 5d 00 14 stw r10,20(r29)
if (sc != RTEMS_SUCCESSFUL) {
ffc046b4: 41 a2 00 1c beq+ ffc046d0 <rtems_disk_create_log+0xe0>
dd->ioctl = null_handler;
ffc046b8: 3d 40 ff c0 lis r10,-64
ffc046bc: 39 4a 41 a0 addi r10,r10,16800
ffc046c0: 91 49 00 38 stw r10,56(r9)
rtems_disk_delete(dev);
ffc046c4: 7f c3 f3 78 mr r3,r30
ffc046c8: 7f e4 fb 78 mr r4,r31
ffc046cc: 4b ff fd 95 bl ffc04460 <rtems_disk_delete>
disk_unlock();
return sc;
}
disk_unlock();
ffc046d0: 4b ff fb 95 bl ffc04264 <disk_unlock>
return RTEMS_SUCCESSFUL;
}
ffc046d4: 39 61 00 38 addi r11,r1,56
ffc046d8: 7f 63 db 78 mr r3,r27
ffc046dc: 48 01 50 58 b ffc19734 <_restgpr_24_x>
ffc046e0 <rtems_disk_create_phys>:
rtems_blkdev_bnum block_count,
rtems_block_device_ioctl handler,
void *driver_data,
const char *name
)
{
ffc046e0: 94 21 ff c8 stwu r1,-56(r1)
ffc046e4: 7c 08 02 a6 mflr r0
rtems_disk_device *dd = NULL;
ffc046e8: 39 40 00 00 li r10,0
rtems_blkdev_bnum block_count,
rtems_block_device_ioctl handler,
void *driver_data,
const char *name
)
{
ffc046ec: bf 01 00 18 stmw r24,24(r1)
rtems_disk_device *dd = NULL;
rtems_status_code sc = RTEMS_SUCCESSFUL;
char *alloc_name = NULL;
if (handler == NULL) {
ffc046f0: 7c fb 3b 79 mr. r27,r7
return RTEMS_INVALID_ADDRESS;
ffc046f4: 3b a0 00 09 li r29,9
rtems_blkdev_bnum block_count,
rtems_block_device_ioctl handler,
void *driver_data,
const char *name
)
{
ffc046f8: 90 01 00 3c stw r0,60(r1)
rtems_disk_device *dd = NULL;
ffc046fc: 91 41 00 0c stw r10,12(r1)
rtems_status_code sc = RTEMS_SUCCESSFUL;
char *alloc_name = NULL;
ffc04700: 91 41 00 08 stw r10,8(r1)
if (handler == NULL) {
ffc04704: 41 82 00 a0 beq- ffc047a4 <rtems_disk_create_phys+0xc4>
ffc04708: 7c 9f 23 78 mr r31,r4
ffc0470c: 7c 7e 1b 78 mr r30,r3
ffc04710: 7c b9 2b 78 mr r25,r5
ffc04714: 7c da 33 78 mr r26,r6
ffc04718: 7d 1c 43 78 mr r28,r8
ffc0471c: 7d 38 4b 78 mr r24,r9
return RTEMS_INVALID_ADDRESS;
}
sc = disk_lock();
ffc04720: 4b ff fa f5 bl ffc04214 <disk_lock>
if (sc != RTEMS_SUCCESSFUL) {
ffc04724: 7c 7d 1b 79 mr. r29,r3
ffc04728: 40 a2 00 7c bne+ ffc047a4 <rtems_disk_create_phys+0xc4> <== NEVER TAKEN
return sc;
}
sc = create_disk(dev, name, &dd, &alloc_name);
ffc0472c: 7f c3 f3 78 mr r3,r30
ffc04730: 7f e4 fb 78 mr r4,r31
ffc04734: 7f 05 c3 78 mr r5,r24
ffc04738: 38 c1 00 0c addi r6,r1,12
ffc0473c: 38 e1 00 08 addi r7,r1,8
ffc04740: 4b ff fb 6d bl ffc042ac <create_disk>
if (sc != RTEMS_SUCCESSFUL) {
ffc04744: 7c 7d 1b 79 mr. r29,r3
ffc04748: 41 a2 00 08 beq+ ffc04750 <rtems_disk_create_phys+0x70>
ffc0474c: 48 00 00 50 b ffc0479c <rtems_disk_create_phys+0xbc>
disk_unlock();
return sc;
}
sc = rtems_disk_init_phys(
ffc04750: 80 61 00 0c lwz r3,12(r1)
ffc04754: 7f 24 cb 78 mr r4,r25
ffc04758: 7f 45 d3 78 mr r5,r26
ffc0475c: 7f 66 db 78 mr r6,r27
ffc04760: 7f 87 e3 78 mr r7,r28
ffc04764: 48 00 bd 69 bl ffc104cc <rtems_disk_init_phys>
block_count,
handler,
driver_data
);
dd->dev = dev;
ffc04768: 81 21 00 0c lwz r9,12(r1)
dd->name = alloc_name;
if (sc != RTEMS_SUCCESSFUL) {
ffc0476c: 7c 7d 1b 79 mr. r29,r3
handler,
driver_data
);
dd->dev = dev;
dd->name = alloc_name;
ffc04770: 81 41 00 08 lwz r10,8(r1)
block_count,
handler,
driver_data
);
dd->dev = dev;
ffc04774: 93 c9 00 00 stw r30,0(r9)
ffc04778: 93 e9 00 04 stw r31,4(r9)
dd->name = alloc_name;
ffc0477c: 91 49 00 10 stw r10,16(r9)
if (sc != RTEMS_SUCCESSFUL) {
ffc04780: 41 a2 00 1c beq+ ffc0479c <rtems_disk_create_phys+0xbc>
dd->ioctl = null_handler;
ffc04784: 3d 40 ff c0 lis r10,-64
ffc04788: 39 4a 41 a0 addi r10,r10,16800
ffc0478c: 91 49 00 38 stw r10,56(r9)
rtems_disk_delete(dev);
ffc04790: 7f c3 f3 78 mr r3,r30
ffc04794: 7f e4 fb 78 mr r4,r31
ffc04798: 4b ff fc c9 bl ffc04460 <rtems_disk_delete>
disk_unlock();
return sc;
}
disk_unlock();
ffc0479c: 4b ff fa c9 bl ffc04264 <disk_unlock>
ffc047a0: 48 00 00 04 b ffc047a4 <rtems_disk_create_phys+0xc4>
return RTEMS_SUCCESSFUL;
}
ffc047a4: 39 61 00 38 addi r11,r1,56
ffc047a8: 7f a3 eb 78 mr r3,r29
ffc047ac: 48 01 4f 88 b ffc19734 <_restgpr_24_x>
ffc04460 <rtems_disk_delete>:
}
}
rtems_status_code
rtems_disk_delete(dev_t dev)
{
ffc04460: 94 21 ff d0 stwu r1,-48(r1)
ffc04464: 7c 08 02 a6 mflr r0
ffc04468: be c1 00 08 stmw r22,8(r1)
ffc0446c: 7c 9f 23 78 mr r31,r4
ffc04470: 7c 7e 1b 78 mr r30,r3
ffc04474: 90 01 00 34 stw r0,52(r1)
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_disk_device *dd = NULL;
sc = disk_lock();
ffc04478: 4b ff fd 9d bl ffc04214 <disk_lock>
if (sc != RTEMS_SUCCESSFUL) {
ffc0447c: 7c 7c 1b 79 mr. r28,r3
ffc04480: 40 a2 01 64 bne+ ffc045e4 <rtems_disk_delete+0x184> <== NEVER TAKEN
return sc;
}
dd = get_disk_entry(dev, true);
ffc04484: 7f c3 f3 78 mr r3,r30
ffc04488: 7f e4 fb 78 mr r4,r31
ffc0448c: 38 a0 00 01 li r5,1
ffc04490: 4b ff fc 95 bl ffc04124 <get_disk_entry>
if (dd == NULL) {
ffc04494: 7c 69 1b 79 mr. r9,r3
ffc04498: 40 a2 00 10 bne+ ffc044a8 <rtems_disk_delete+0x48> <== ALWAYS TAKEN
disk_unlock();
ffc0449c: 4b ff fd c9 bl ffc04264 <disk_unlock> <== NOT EXECUTED
return RTEMS_INVALID_ID;
ffc044a0: 3b 80 00 04 li r28,4 <== NOT EXECUTED
ffc044a4: 48 00 01 40 b ffc045e4 <rtems_disk_delete+0x184> <== NOT EXECUTED
}
dd->deleted = true;
ffc044a8: 39 40 00 01 li r10,1
}
static void
rtems_disk_cleanup(rtems_disk_device *disk_to_remove)
{
rtems_disk_device *const physical_disk = disk_to_remove->phys_dev;
ffc044ac: 83 e9 00 08 lwz r31,8(r9)
disk_unlock();
return RTEMS_INVALID_ID;
}
dd->deleted = true;
ffc044b0: 99 49 00 40 stb r10,64(r9)
{
rtems_disk_device *const physical_disk = disk_to_remove->phys_dev;
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
if (physical_disk->deleted) {
ffc044b4: 89 5f 00 40 lbz r10,64(r31)
ffc044b8: 2f 8a 00 00 cmpwi cr7,r10,0
ffc044bc: 41 9e 00 e8 beq- cr7,ffc045a4 <rtems_disk_delete+0x144>
dev_t dev = physical_disk->dev;
ffc044c0: 83 1f 00 00 lwz r24,0(r31)
unsigned deleted_count = 0;
ffc044c4: 3b 60 00 00 li r27,0
rtems_disk_device *const physical_disk = disk_to_remove->phys_dev;
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
if (physical_disk->deleted) {
dev_t dev = physical_disk->dev;
ffc044c8: 82 ff 00 04 lwz r23,4(r31)
unsigned deleted_count = 0;
for (major = 0; major < disktab_size; ++major) {
ffc044cc: 3b c0 00 00 li r30,0
ffc044d0: 3f 40 00 00 lis r26,0
if (dd->uses == 0) {
++deleted_count;
dtab->minor [minor] = NULL;
free_disk_device(dd);
} else {
dd->deleted = true;
ffc044d4: 3a c0 00 01 li r22,1
ffc044d8: 48 00 00 84 b ffc0455c <rtems_disk_delete+0xfc>
if (physical_disk->deleted) {
dev_t dev = physical_disk->dev;
unsigned deleted_count = 0;
for (major = 0; major < disktab_size; ++major) {
rtems_disk_device_table *dtab = disktab + major;
ffc044dc: 83 29 00 04 lwz r25,4(r9)
}
}
}
rtems_status_code
rtems_disk_delete(dev_t dev)
ffc044e0: 57 ca 18 38 rlwinm r10,r30,3,0,28
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) {
ffc044e4: 3b a0 00 00 li r29,0
if (physical_disk->deleted) {
dev_t dev = physical_disk->dev;
unsigned deleted_count = 0;
for (major = 0; major < disktab_size; ++major) {
rtems_disk_device_table *dtab = disktab + major;
ffc044e8: 7f 39 52 14 add r25,r25,r10
ffc044ec: 48 00 00 60 b ffc0454c <rtems_disk_delete+0xec>
for (minor = 0; minor < dtab->size; ++minor) {
rtems_disk_device *dd = dtab->minor [minor];
ffc044f0: 81 19 00 00 lwz r8,0(r25)
}
}
}
rtems_status_code
rtems_disk_delete(dev_t dev)
ffc044f4: 57 aa 10 3a rlwinm r10,r29,2,0,29
for (major = 0; major < disktab_size; ++major) {
rtems_disk_device_table *dtab = disktab + major;
for (minor = 0; minor < dtab->size; ++minor) {
rtems_disk_device *dd = dtab->minor [minor];
ffc044f8: 7c 68 50 2e lwzx r3,r8,r10
if (dd != NULL && dd->phys_dev->dev == dev && dd != physical_disk) {
ffc044fc: 2f 83 00 00 cmpwi cr7,r3,0
ffc04500: 41 9e 00 48 beq- cr7,ffc04548 <rtems_disk_delete+0xe8>
ffc04504: 80 e3 00 08 lwz r7,8(r3)
ffc04508: 80 c7 00 00 lwz r6,0(r7)
ffc0450c: 7f 86 c0 00 cmpw cr7,r6,r24
ffc04510: 40 be 00 38 bne+ cr7,ffc04548 <rtems_disk_delete+0xe8> <== NEVER TAKEN
ffc04514: 80 e7 00 04 lwz r7,4(r7)
ffc04518: 7f 87 b8 00 cmpw cr7,r7,r23
ffc0451c: 40 be 00 2c bne+ cr7,ffc04548 <rtems_disk_delete+0xe8> <== NEVER TAKEN
ffc04520: 7f 83 f8 00 cmpw cr7,r3,r31
ffc04524: 41 9e 00 24 beq- cr7,ffc04548 <rtems_disk_delete+0xe8>
if (dd->uses == 0) {
ffc04528: 80 e3 00 14 lwz r7,20(r3)
ffc0452c: 2f 87 00 00 cmpwi cr7,r7,0
ffc04530: 40 be 00 14 bne+ cr7,ffc04544 <rtems_disk_delete+0xe4>
++deleted_count;
dtab->minor [minor] = NULL;
ffc04534: 7c e8 51 2e stwx r7,r8,r10
for (minor = 0; minor < dtab->size; ++minor) {
rtems_disk_device *dd = dtab->minor [minor];
if (dd != NULL && dd->phys_dev->dev == dev && dd != physical_disk) {
if (dd->uses == 0) {
++deleted_count;
ffc04538: 3b 7b 00 01 addi r27,r27,1
dtab->minor [minor] = NULL;
free_disk_device(dd);
ffc0453c: 4b ff fc 6d bl ffc041a8 <free_disk_device>
ffc04540: 48 00 00 08 b ffc04548 <rtems_disk_delete+0xe8>
} else {
dd->deleted = true;
ffc04544: 9a c3 00 40 stb r22,64(r3)
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) {
ffc04548: 3b bd 00 01 addi r29,r29,1
ffc0454c: 81 39 00 04 lwz r9,4(r25)
ffc04550: 7f 9d 48 40 cmplw cr7,r29,r9
ffc04554: 41 9c ff 9c blt+ cr7,ffc044f0 <rtems_disk_delete+0x90>
if (physical_disk->deleted) {
dev_t dev = physical_disk->dev;
unsigned deleted_count = 0;
for (major = 0; major < disktab_size; ++major) {
ffc04558: 3b de 00 01 addi r30,r30,1
ffc0455c: 81 5a 28 e0 lwz r10,10464(r26)
ffc04560: 39 3a 28 e0 addi r9,r26,10464
ffc04564: 7f 9e 50 40 cmplw cr7,r30,r10
ffc04568: 41 9c ff 74 blt+ cr7,ffc044dc <rtems_disk_delete+0x7c>
}
}
}
}
physical_disk->uses -= deleted_count;
ffc0456c: 81 5f 00 14 lwz r10,20(r31)
ffc04570: 7f 7b 50 50 subf r27,r27,r10
if (physical_disk->uses == 0) {
ffc04574: 2f 9b 00 00 cmpwi cr7,r27,0
}
}
}
}
physical_disk->uses -= deleted_count;
ffc04578: 93 7f 00 14 stw r27,20(r31)
if (physical_disk->uses == 0) {
ffc0457c: 40 be 00 64 bne+ cr7,ffc045e0 <rtems_disk_delete+0x180>
rtems_filesystem_split_dev_t(physical_disk->dev, major, minor);
ffc04580: 81 1f 00 00 lwz r8,0(r31)
disktab [major].minor [minor] = NULL;
free_disk_device(physical_disk);
ffc04584: 7f e3 fb 78 mr r3,r31
}
physical_disk->uses -= deleted_count;
if (physical_disk->uses == 0) {
rtems_filesystem_split_dev_t(physical_disk->dev, major, minor);
disktab [major].minor [minor] = NULL;
ffc04588: 81 29 00 04 lwz r9,4(r9)
}
}
physical_disk->uses -= deleted_count;
if (physical_disk->uses == 0) {
rtems_filesystem_split_dev_t(physical_disk->dev, major, minor);
ffc0458c: 81 5f 00 04 lwz r10,4(r31)
disktab [major].minor [minor] = NULL;
ffc04590: 55 08 18 38 rlwinm r8,r8,3,0,28
ffc04594: 7d 29 40 2e lwzx r9,r9,r8
ffc04598: 55 4a 10 3a rlwinm r10,r10,2,0,29
ffc0459c: 7f 69 51 2e stwx r27,r9,r10
ffc045a0: 48 00 00 3c b ffc045dc <rtems_disk_delete+0x17c>
free_disk_device(physical_disk);
}
} else {
if (disk_to_remove->uses == 0) {
ffc045a4: 81 49 00 14 lwz r10,20(r9)
ffc045a8: 2f 8a 00 00 cmpwi cr7,r10,0
ffc045ac: 40 be 00 34 bne+ cr7,ffc045e0 <rtems_disk_delete+0x180> <== NEVER TAKEN
--physical_disk->uses;
ffc045b0: 81 5f 00 14 lwz r10,20(r31)
rtems_filesystem_split_dev_t(disk_to_remove->dev, major, minor);
disktab [major].minor [minor] = NULL;
ffc045b4: 3d 00 00 00 lis r8,0
ffc045b8: 81 08 28 e4 lwz r8,10468(r8)
disktab [major].minor [minor] = NULL;
free_disk_device(physical_disk);
}
} else {
if (disk_to_remove->uses == 0) {
--physical_disk->uses;
ffc045bc: 39 4a ff ff addi r10,r10,-1
ffc045c0: 91 5f 00 14 stw r10,20(r31)
rtems_filesystem_split_dev_t(disk_to_remove->dev, major, minor);
ffc045c4: 81 49 00 00 lwz r10,0(r9)
ffc045c8: 81 29 00 04 lwz r9,4(r9)
disktab [major].minor [minor] = NULL;
ffc045cc: 55 4a 18 38 rlwinm r10,r10,3,0,28
ffc045d0: 7d 48 50 2e lwzx r10,r8,r10
ffc045d4: 55 29 10 3a rlwinm r9,r9,2,0,29
ffc045d8: 7f 8a 49 2e stwx r28,r10,r9
free_disk_device(disk_to_remove);
ffc045dc: 4b ff fb cd bl ffc041a8 <free_disk_device>
}
dd->deleted = true;
rtems_disk_cleanup(dd);
disk_unlock();
ffc045e0: 4b ff fc 85 bl ffc04264 <disk_unlock>
return RTEMS_SUCCESSFUL;
}
ffc045e4: 39 61 00 30 addi r11,r1,48
ffc045e8: 7f 83 e3 78 mr r3,r28
ffc045ec: 48 01 51 40 b ffc1972c <_restgpr_22_x>
ffc04994 <rtems_disk_io_initialize>:
rtems_status_code
rtems_disk_io_initialize(void)
{
ffc04994: 94 21 ff e8 stwu r1,-24(r1)
ffc04998: 7c 08 02 a6 mflr r0
ffc0499c: bf 81 00 08 stmw r28,8(r1)
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_device_major_number size = DISKTAB_INITIAL_SIZE;
if (disktab_size > 0) {
ffc049a0: 3f a0 00 00 lis r29,0
ffc049a4: 3b fd 28 e0 addi r31,r29,10464
ffc049a8: 83 9d 28 e0 lwz r28,10464(r29)
return RTEMS_SUCCESSFUL;
ffc049ac: 3b c0 00 00 li r30,0
}
}
rtems_status_code
rtems_disk_io_initialize(void)
{
ffc049b0: 90 01 00 1c stw r0,28(r1)
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_device_major_number size = DISKTAB_INITIAL_SIZE;
if (disktab_size > 0) {
ffc049b4: 2f 9c 00 00 cmpwi cr7,r28,0
ffc049b8: 40 be 00 84 bne+ cr7,ffc04a3c <rtems_disk_io_initialize+0xa8>
return RTEMS_SUCCESSFUL;
}
disktab = calloc(size, sizeof(rtems_disk_device_table));
ffc049bc: 38 60 00 08 li r3,8
ffc049c0: 38 80 00 08 li r4,8
ffc049c4: 48 00 08 f1 bl ffc052b4 <calloc>
if (disktab == NULL) {
return RTEMS_NO_MEMORY;
ffc049c8: 3b c0 00 1a li r30,26
if (disktab_size > 0) {
return RTEMS_SUCCESSFUL;
}
disktab = calloc(size, sizeof(rtems_disk_device_table));
if (disktab == NULL) {
ffc049cc: 2f 83 00 00 cmpwi cr7,r3,0
if (disktab_size > 0) {
return RTEMS_SUCCESSFUL;
}
disktab = calloc(size, sizeof(rtems_disk_device_table));
ffc049d0: 90 7f 00 04 stw r3,4(r31)
if (disktab == NULL) {
ffc049d4: 41 9e 00 68 beq- cr7,ffc04a3c <rtems_disk_io_initialize+0xa8><== NEVER TAKEN
return RTEMS_NO_MEMORY;
}
diskdevs_protected = false;
sc = rtems_semaphore_create(
ffc049d8: 3c 60 44 44 lis r3,17476
disktab = calloc(size, sizeof(rtems_disk_device_table));
if (disktab == NULL) {
return RTEMS_NO_MEMORY;
}
diskdevs_protected = false;
ffc049dc: 9b 9f 00 0c stb r28,12(r31)
sc = rtems_semaphore_create(
ffc049e0: 60 63 45 56 ori r3,r3,17750
ffc049e4: 38 80 00 01 li r4,1
ffc049e8: 38 a0 00 10 li r5,16
ffc049ec: 38 c0 00 00 li r6,0
ffc049f0: 38 ff 00 08 addi r7,r31,8
ffc049f4: 48 00 4d 2d bl ffc09720 <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) {
ffc049f8: 2f 83 00 00 cmpwi cr7,r3,0
ffc049fc: 41 9e 00 10 beq- cr7,ffc04a0c <rtems_disk_io_initialize+0x78><== ALWAYS TAKEN
free(disktab);
ffc04a00: 80 7f 00 04 lwz r3,4(r31) <== NOT EXECUTED
ffc04a04: 48 00 09 95 bl ffc05398 <free> <== NOT EXECUTED
return RTEMS_NO_MEMORY;
ffc04a08: 48 00 00 34 b ffc04a3c <rtems_disk_io_initialize+0xa8><== NOT EXECUTED
}
sc = rtems_bdbuf_init();
ffc04a0c: 48 00 a8 6d bl ffc0f278 <rtems_bdbuf_init>
if (sc != RTEMS_SUCCESSFUL) {
ffc04a10: 2f 83 00 00 cmpwi cr7,r3,0
ffc04a14: 41 9e 00 1c beq- cr7,ffc04a30 <rtems_disk_io_initialize+0x9c><== ALWAYS TAKEN
rtems_semaphore_delete(diskdevs_mutex);
ffc04a18: 80 7f 00 08 lwz r3,8(r31) <== NOT EXECUTED
free(disktab);
return RTEMS_UNSATISFIED;
ffc04a1c: 3b c0 00 0d li r30,13 <== NOT EXECUTED
return RTEMS_NO_MEMORY;
}
sc = rtems_bdbuf_init();
if (sc != RTEMS_SUCCESSFUL) {
rtems_semaphore_delete(diskdevs_mutex);
ffc04a20: 48 00 4e c9 bl ffc098e8 <rtems_semaphore_delete> <== NOT EXECUTED
free(disktab);
ffc04a24: 80 7f 00 04 lwz r3,4(r31) <== NOT EXECUTED
ffc04a28: 48 00 09 71 bl ffc05398 <free> <== NOT EXECUTED
return RTEMS_UNSATISFIED;
ffc04a2c: 48 00 00 10 b ffc04a3c <rtems_disk_io_initialize+0xa8><== NOT EXECUTED
}
disktab_size = size;
ffc04a30: 39 20 00 08 li r9,8
ffc04a34: 91 3d 28 e0 stw r9,10464(r29)
return RTEMS_SUCCESSFUL;
ffc04a38: 3b c0 00 00 li r30,0
}
ffc04a3c: 39 61 00 18 addi r11,r1,24
ffc04a40: 7f c3 f3 78 mr r3,r30
ffc04a44: 48 01 4d 00 b ffc19744 <_restgpr_28_x>
ffc048a0 <rtems_disk_next>:
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) {
ffc048a0: 2f 83 ff ff cmpwi cr7,r3,-1
return RTEMS_SUCCESSFUL;
}
rtems_disk_device *
rtems_disk_next(dev_t dev)
{
ffc048a4: 94 21 ff e8 stwu r1,-24(r1)
ffc048a8: 7c 08 02 a6 mflr r0
ffc048ac: bf 81 00 08 stmw r28,8(r1)
ffc048b0: 90 01 00 1c stw r0,28(r1)
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) {
ffc048b4: 40 be 00 0c bne+ cr7,ffc048c0 <rtems_disk_next+0x20>
ffc048b8: 2f 84 ff ff cmpwi cr7,r4,-1
ffc048bc: 41 9e 00 24 beq- cr7,ffc048e0 <rtems_disk_next+0x40> <== ALWAYS TAKEN
rtems_filesystem_split_dev_t(dev, major, minor);
/* If minor wraps around */
if ((minor + 1) < minor) {
ffc048c0: 3b c4 00 01 addi r30,r4,1
ffc048c4: 7f 9e 20 40 cmplw cr7,r30,r4
ffc048c8: 40 9c 00 24 bge- cr7,ffc048ec <rtems_disk_next+0x4c> <== ALWAYS TAKEN
/* If major wraps around */
if ((major + 1) < major) {
ffc048cc: 3b e3 00 01 addi r31,r3,1 <== NOT EXECUTED
ffc048d0: 7f 9f 18 40 cmplw cr7,r31,r3 <== NOT EXECUTED
return NULL;
}
++major;
minor = 0;
ffc048d4: 3b c0 00 00 li r30,0 <== 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) {
ffc048d8: 40 bc 00 18 bge+ cr7,ffc048f0 <rtems_disk_next+0x50> <== NOT EXECUTED
ffc048dc: 48 00 00 38 b ffc04914 <rtems_disk_next+0x74> <== 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;
ffc048e0: 3b c0 00 00 li r30,0
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;
ffc048e4: 3b e0 00 00 li r31,0
ffc048e8: 48 00 00 08 b ffc048f0 <rtems_disk_next+0x50>
)
{
union __rtems_dev_t temp;
temp.device = device;
return temp.__overlay.major;
ffc048ec: 7c 7f 1b 78 mr r31,r3
} else {
++minor;
}
}
sc = disk_lock();
ffc048f0: 4b ff f9 25 bl ffc04214 <disk_lock>
if (sc != RTEMS_SUCCESSFUL) {
ffc048f4: 2f 83 00 00 cmpwi cr7,r3,0
ffc048f8: 40 9e 00 1c bne- cr7,ffc04914 <rtems_disk_next+0x74> <== NEVER TAKEN
return NULL;
}
if (major >= disktab_size) {
ffc048fc: 3d 20 00 00 lis r9,0
ffc04900: 81 49 28 e0 lwz r10,10464(r9)
ffc04904: 39 09 28 e0 addi r8,r9,10464
ffc04908: 7f 9f 50 40 cmplw cr7,r31,r10
ffc0490c: 41 bc 00 10 blt+ cr7,ffc0491c <rtems_disk_next+0x7c> <== ALWAYS TAKEN
disk_unlock();
ffc04910: 4b ff f9 55 bl ffc04264 <disk_unlock>
return NULL;
ffc04914: 38 60 00 00 li r3,0
ffc04918: 48 00 00 74 b ffc0498c <rtems_disk_next+0xec>
}
dtab = disktab + major;
ffc0491c: 81 08 00 04 lwz r8,4(r8)
ffc04920: 57 fd 18 38 rlwinm r29,r31,3,0,28
ffc04924: 7f a8 ea 14 add r29,r8,r29
while (true) {
if (dtab->minor == NULL || minor >= dtab->size) {
ffc04928: 81 3d 00 00 lwz r9,0(r29)
ffc0492c: 2f 89 00 00 cmpwi cr7,r9,0
ffc04930: 41 9e 00 10 beq- cr7,ffc04940 <rtems_disk_next+0xa0>
ffc04934: 80 fd 00 04 lwz r7,4(r29)
ffc04938: 7f 9e 38 40 cmplw cr7,r30,r7
ffc0493c: 41 9c 00 20 blt- cr7,ffc0495c <rtems_disk_next+0xbc>
minor = 0;
++major;
ffc04940: 3b ff 00 01 addi r31,r31,1
if (major >= disktab_size) {
ffc04944: 7f 9f 50 40 cmplw cr7,r31,r10
ffc04948: 40 bc ff c8 bge- cr7,ffc04910 <rtems_disk_next+0x70>
disk_unlock();
return NULL;
}
dtab = disktab + major;
ffc0494c: 57 fd 18 38 rlwinm r29,r31,3,0,28
ffc04950: 7f a8 ea 14 add r29,r8,r29
}
dtab = disktab + major;
while (true) {
if (dtab->minor == NULL || minor >= dtab->size) {
minor = 0;
ffc04954: 3b c0 00 00 li r30,0
if (major >= disktab_size) {
disk_unlock();
return NULL;
}
dtab = disktab + major;
ffc04958: 4b ff ff d0 b ffc04928 <rtems_disk_next+0x88>
} else if (dtab->minor [minor] == NULL) {
ffc0495c: 57 dc 10 3a rlwinm r28,r30,2,0,29
ffc04960: 7d 29 e0 2e lwzx r9,r9,r28
ffc04964: 2f 89 00 00 cmpwi cr7,r9,0
ffc04968: 40 9e 00 0c bne- cr7,ffc04974 <rtems_disk_next+0xd4>
++minor;
ffc0496c: 3b de 00 01 addi r30,r30,1
ffc04970: 4b ff ff b8 b ffc04928 <rtems_disk_next+0x88>
} else {
++dtab->minor [minor]->uses;
ffc04974: 81 49 00 14 lwz r10,20(r9)
ffc04978: 39 4a 00 01 addi r10,r10,1
ffc0497c: 91 49 00 14 stw r10,20(r9)
disk_unlock();
ffc04980: 4b ff f8 e5 bl ffc04264 <disk_unlock>
return dtab->minor [minor];
ffc04984: 81 3d 00 00 lwz r9,0(r29)
ffc04988: 7c 69 e0 2e lwzx r3,r9,r28
}
}
}
ffc0498c: 39 61 00 18 addi r11,r1,24
ffc04990: 48 01 4d b4 b ffc19744 <_restgpr_28_x>
ffc047b0 <rtems_disk_obtain>:
return RTEMS_SUCCESSFUL;
}
rtems_disk_device *
rtems_disk_obtain(dev_t dev)
{
ffc047b0: 94 21 ff e8 stwu r1,-24(r1)
ffc047b4: 7c 08 02 a6 mflr r0
ffc047b8: bf 81 00 08 stmw r28,8(r1)
ffc047bc: 90 01 00 1c stw r0,28(r1)
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc047c0: 7f 80 00 a6 mfmsr r28
ffc047c4: 7d 30 42 a6 mfsprg r9,0
ffc047c8: 7f 89 48 78 andc r9,r28,r9
ffc047cc: 7d 20 01 24 mtmsr r9
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_disk_device *dd = NULL;
rtems_interrupt_level level;
rtems_interrupt_disable(level);
if (!diskdevs_protected) {
ffc047d0: 3d 20 00 00 lis r9,0
ffc047d4: 89 29 28 ec lbz r9,10476(r9)
ffc047d8: 2f 89 00 00 cmpwi cr7,r9,0
ffc047dc: 40 be 00 18 bne+ cr7,ffc047f4 <rtems_disk_obtain+0x44> <== NEVER TAKEN
/* Frequent and quickest case */
dd = get_disk_entry(dev, false);
ffc047e0: 38 a0 00 00 li r5,0
ffc047e4: 4b ff f9 41 bl ffc04124 <get_disk_entry>
ffc047e8: 7c 7d 1b 78 mr r29,r3
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc047ec: 7f 80 01 24 mtmsr r28
ffc047f0: 48 00 00 38 b ffc04828 <rtems_disk_obtain+0x78>
ffc047f4: 7c 9f 23 78 mr r31,r4 <== NOT EXECUTED
ffc047f8: 7c 7e 1b 78 mr r30,r3 <== NOT EXECUTED
ffc047fc: 7f 80 01 24 mtmsr r28 <== NOT EXECUTED
rtems_interrupt_enable(level);
} else {
rtems_interrupt_enable(level);
sc = disk_lock();
ffc04800: 4b ff fa 15 bl ffc04214 <disk_lock> <== NOT EXECUTED
rtems_disk_device *
rtems_disk_obtain(dev_t dev)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_disk_device *dd = NULL;
ffc04804: 3b a0 00 00 li r29,0 <== NOT EXECUTED
rtems_interrupt_enable(level);
} else {
rtems_interrupt_enable(level);
sc = disk_lock();
if (sc == RTEMS_SUCCESSFUL) {
ffc04808: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc0480c: 40 9e 00 1c bne- cr7,ffc04828 <rtems_disk_obtain+0x78> <== NOT EXECUTED
dd = get_disk_entry(dev, false);
ffc04810: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc04814: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED
ffc04818: 38 a0 00 00 li r5,0 <== NOT EXECUTED
ffc0481c: 4b ff f9 09 bl ffc04124 <get_disk_entry> <== NOT EXECUTED
ffc04820: 7c 7d 1b 78 mr r29,r3 <== NOT EXECUTED
disk_unlock();
ffc04824: 4b ff fa 41 bl ffc04264 <disk_unlock> <== NOT EXECUTED
}
}
return dd;
}
ffc04828: 39 61 00 18 addi r11,r1,24
ffc0482c: 7f a3 eb 78 mr r3,r29
ffc04830: 48 01 4f 14 b ffc19744 <_restgpr_28_x>
ffc043f0 <rtems_error>:
int rtems_error(
rtems_error_code_t error_flag,
const char *printf_format,
...
)
{
ffc043f0: 7c 2b 0b 78 mr r11,r1
ffc043f4: 7c 08 02 a6 mflr r0
ffc043f8: 94 21 ff 88 stwu r1,-120(r1)
ffc043fc: 48 01 69 c1 bl ffc1adbc <_savegpr_31>
ffc04400: 90 01 00 7c stw r0,124(r1)
ffc04404: 7c 7f 1b 78 mr r31,r3
ffc04408: 90 a1 00 18 stw r5,24(r1)
ffc0440c: 90 c1 00 1c stw r6,28(r1)
ffc04410: 90 e1 00 20 stw r7,32(r1)
ffc04414: 91 01 00 24 stw r8,36(r1)
ffc04418: 91 21 00 28 stw r9,40(r1)
ffc0441c: 91 41 00 2c stw r10,44(r1)
ffc04420: 40 86 00 24 bne- cr1,ffc04444 <rtems_error+0x54> <== ALWAYS TAKEN
ffc04424: d8 21 00 30 stfd f1,48(r1) <== NOT EXECUTED
ffc04428: d8 41 00 38 stfd f2,56(r1) <== NOT EXECUTED
ffc0442c: d8 61 00 40 stfd f3,64(r1) <== NOT EXECUTED
ffc04430: d8 81 00 48 stfd f4,72(r1) <== NOT EXECUTED
ffc04434: d8 a1 00 50 stfd f5,80(r1) <== NOT EXECUTED
ffc04438: d8 c1 00 58 stfd f6,88(r1) <== NOT EXECUTED
ffc0443c: d8 e1 00 60 stfd f7,96(r1) <== NOT EXECUTED
ffc04440: d9 01 00 68 stfd f8,104(r1) <== NOT EXECUTED
va_list arglist;
int chars_written;
va_start(arglist, printf_format);
ffc04444: 39 20 00 02 li r9,2
ffc04448: 99 21 00 08 stb r9,8(r1)
ffc0444c: 39 20 00 00 li r9,0
chars_written = rtems_verror(error_flag, printf_format, arglist);
ffc04450: 7f e3 fb 78 mr r3,r31
)
{
va_list arglist;
int chars_written;
va_start(arglist, printf_format);
ffc04454: 99 21 00 09 stb r9,9(r1)
ffc04458: 39 21 00 80 addi r9,r1,128
chars_written = rtems_verror(error_flag, printf_format, arglist);
ffc0445c: 38 a1 00 08 addi r5,r1,8
)
{
va_list arglist;
int chars_written;
va_start(arglist, printf_format);
ffc04460: 91 21 00 0c stw r9,12(r1)
ffc04464: 39 21 00 10 addi r9,r1,16
ffc04468: 91 21 00 10 stw r9,16(r1)
chars_written = rtems_verror(error_flag, printf_format, arglist);
ffc0446c: 4b ff fe 01 bl ffc0426c <rtems_verror>
va_end(arglist);
if (error_flag & RTEMS_ERROR_PANIC) {
ffc04470: 77 e9 20 00 andis. r9,r31,8192
ffc04474: 41 a2 00 24 beq+ ffc04498 <rtems_error+0xa8>
rtems_error(0, "fatal error, exiting");
ffc04478: 3c 80 ff c2 lis r4,-62
ffc0447c: 38 84 cd b3 addi r4,r4,-12877
ffc04480: 38 60 00 00 li r3,0
ffc04484: 4c c6 31 82 crclr 4*cr1+eq
ffc04488: 4b ff ff 69 bl ffc043f0 <rtems_error>
_exit(errno);
ffc0448c: 48 00 c1 21 bl ffc105ac <__errno>
ffc04490: 80 63 00 00 lwz r3,0(r3)
ffc04494: 48 00 0a 19 bl ffc04eac <_exit>
}
if (error_flag & RTEMS_ERROR_ABORT) {
ffc04498: 77 e9 10 00 andis. r9,r31,4096
ffc0449c: 41 a2 00 1c beq+ ffc044b8 <rtems_error+0xc8>
rtems_error(0, "fatal error, aborting");
ffc044a0: 3c 80 ff c2 lis r4,-62
ffc044a4: 38 84 cd c8 addi r4,r4,-12856
ffc044a8: 38 60 00 00 li r3,0
ffc044ac: 4c c6 31 82 crclr 4*cr1+eq
ffc044b0: 4b ff ff 41 bl ffc043f0 <rtems_error>
abort();
ffc044b4: 48 00 c0 dd bl ffc10590 <abort>
}
return chars_written;
}
ffc044b8: 39 61 00 78 addi r11,r1,120
ffc044bc: 4b ff c1 08 b ffc005c4 <_restgpr_31_x>
ffc1208c <rtems_event_system_receive>:
rtems_event_set *event_out
)
{
rtems_status_code sc;
if ( event_out != NULL ) {
ffc1208c: 7c c9 33 79 mr. r9,r6
rtems_event_set event_in,
rtems_option option_set,
rtems_interval ticks,
rtems_event_set *event_out
)
{
ffc12090: 7c 08 02 a6 mflr r0
ffc12094: 7c 2b 0b 78 mr r11,r1
ffc12098: 94 21 ff f0 stwu r1,-16(r1)
ffc1209c: 90 01 00 14 stw r0,20(r1)
ffc120a0: 48 00 76 65 bl ffc19704 <_savegpr_31>
rtems_status_code sc;
if ( event_out != NULL ) {
ffc120a4: 41 82 00 5c beq- ffc12100 <rtems_event_system_receive+0x74><== NEVER TAKEN
Thread_Control *executing = _Thread_Executing;
RTEMS_API_Control *api = executing->API_Extensions[ THREAD_API_RTEMS ];
Event_Control *event = &api->System_event;
if ( !_Event_sets_Is_empty( event_in ) ) {
ffc120a8: 2f 83 00 00 cmpwi cr7,r3,0
)
{
rtems_status_code sc;
if ( event_out != NULL ) {
Thread_Control *executing = _Thread_Executing;
ffc120ac: 3d 00 00 00 lis r8,0
ffc120b0: 83 e8 32 10 lwz r31,12816(r8)
RTEMS_API_Control *api = executing->API_Extensions[ THREAD_API_RTEMS ];
ffc120b4: 81 1f 01 4c lwz r8,332(r31)
Event_Control *event = &api->System_event;
if ( !_Event_sets_Is_empty( event_in ) ) {
ffc120b8: 41 be 00 38 beq+ cr7,ffc120f0 <rtems_event_system_receive+0x64><== NEVER TAKEN
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
ffc120bc: 3d 20 00 00 lis r9,0
ffc120c0: 81 49 28 20 lwz r10,10272(r9)
++level;
ffc120c4: 39 4a 00 01 addi r10,r10,1
_Thread_Dispatch_disable_level = level;
ffc120c8: 91 49 28 20 stw r10,10272(r9)
_Thread_Disable_dispatch();
_Event_Seize(
ffc120cc: 3d 20 00 00 lis r9,0
ffc120d0: 7f e7 fb 78 mr r7,r31
ffc120d4: 39 08 00 04 addi r8,r8,4
ffc120d8: 39 29 28 54 addi r9,r9,10324
ffc120dc: 3d 40 00 04 lis r10,4
ffc120e0: 4b ff 72 e9 bl ffc093c8 <_Event_Seize>
executing,
event,
&_System_event_Sync_state,
STATES_WAITING_FOR_SYSTEM_EVENT
);
_Thread_Enable_dispatch();
ffc120e4: 4b ff a3 09 bl ffc0c3ec <_Thread_Enable_dispatch>
sc = executing->Wait.return_code;
ffc120e8: 80 7f 00 34 lwz r3,52(r31)
ffc120ec: 48 00 00 18 b ffc12104 <rtems_event_system_receive+0x78>
} else {
*event_out = event->pending_events;
ffc120f0: 81 48 00 04 lwz r10,4(r8) <== NOT EXECUTED
sc = RTEMS_SUCCESSFUL;
ffc120f4: 38 60 00 00 li r3,0 <== NOT EXECUTED
);
_Thread_Enable_dispatch();
sc = executing->Wait.return_code;
} else {
*event_out = event->pending_events;
ffc120f8: 91 49 00 00 stw r10,0(r9) <== NOT EXECUTED
ffc120fc: 48 00 00 08 b ffc12104 <rtems_event_system_receive+0x78><== NOT EXECUTED
sc = RTEMS_SUCCESSFUL;
}
} else {
sc = RTEMS_INVALID_ADDRESS;
ffc12100: 38 60 00 09 li r3,9 <== NOT EXECUTED
}
return sc;
}
ffc12104: 39 61 00 10 addi r11,r1,16
ffc12108: 48 00 76 48 b ffc19750 <_restgpr_31_x>
ffc08a88 <rtems_event_system_send>:
rtems_status_code rtems_event_system_send(
rtems_id id,
rtems_event_set event_in
)
{
ffc08a88: 7c 2b 0b 78 mr r11,r1
ffc08a8c: 94 21 ff e0 stwu r1,-32(r1)
ffc08a90: 7c 08 02 a6 mflr r0
ffc08a94: 48 01 23 29 bl ffc1adbc <_savegpr_31>
ffc08a98: 7c 9f 23 78 mr r31,r4
rtems_status_code sc;
Thread_Control *thread;
Objects_Locations location;
RTEMS_API_Control *api;
thread = _Thread_Get( id, &location );
ffc08a9c: 38 81 00 08 addi r4,r1,8
rtems_status_code rtems_event_system_send(
rtems_id id,
rtems_event_set event_in
)
{
ffc08aa0: 90 01 00 24 stw r0,36(r1)
rtems_status_code sc;
Thread_Control *thread;
Objects_Locations location;
RTEMS_API_Control *api;
thread = _Thread_Get( id, &location );
ffc08aa4: 48 00 27 a1 bl ffc0b244 <_Thread_Get>
switch ( location ) {
ffc08aa8: 81 21 00 08 lwz r9,8(r1)
ffc08aac: 2f 89 00 00 cmpwi cr7,r9,0
ffc08ab0: 40 9e 00 2c bne- cr7,ffc08adc <rtems_event_system_send+0x54><== NEVER TAKEN
case OBJECTS_LOCAL:
api = thread->API_Extensions[ THREAD_API_RTEMS ];
_Event_Surrender(
ffc08ab4: 80 a3 01 4c lwz r5,332(r3)
ffc08ab8: 3c c0 00 00 lis r6,0
ffc08abc: 7f e4 fb 78 mr r4,r31
ffc08ac0: 38 a5 00 04 addi r5,r5,4
ffc08ac4: 38 c6 28 9c addi r6,r6,10396
ffc08ac8: 3c e0 00 04 lis r7,4
ffc08acc: 4b ff f9 89 bl ffc08454 <_Event_Surrender>
event_in,
&api->System_event,
&_System_event_Sync_state,
STATES_WAITING_FOR_SYSTEM_EVENT
);
_Thread_Enable_dispatch();
ffc08ad0: 48 00 27 59 bl ffc0b228 <_Thread_Enable_dispatch>
sc = RTEMS_SUCCESSFUL;
ffc08ad4: 38 60 00 00 li r3,0
break;
ffc08ad8: 48 00 00 08 b ffc08ae0 <rtems_event_system_send+0x58>
case OBJECTS_REMOTE:
sc = RTEMS_ILLEGAL_ON_REMOTE_OBJECT;
break;
#endif
default:
sc = RTEMS_INVALID_ID;
ffc08adc: 38 60 00 04 li r3,4 <== NOT EXECUTED
break;
}
return sc;
}
ffc08ae0: 39 61 00 20 addi r11,r1,32
ffc08ae4: 4b ff 7a e0 b ffc005c4 <_restgpr_31_x>
ffc08130 <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, ...)
ffc08130: 7c 2b 0b 78 mr r11,r1 <== NOT EXECUTED
ffc08134: 94 21 ff e0 stwu r1,-32(r1) <== NOT EXECUTED
ffc08138: 7c 08 02 a6 mflr r0 <== NOT EXECUTED
{
va_list args;
va_start (args, format);
fprintf (stderr, "fdisk:abort:");
ffc0813c: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
*
* @param format The format string. See printf for details.
* @param ... The arguments for the format text.
*/
static void
rtems_fdisk_abort (const char *format, ...)
ffc08140: 4b ff 93 e1 bl ffc01520 <_savegpr_31> <== NOT EXECUTED
{
va_list args;
va_start (args, format);
ffc08144: 39 21 00 28 addi r9,r1,40 <== NOT EXECUTED
fprintf (stderr, "fdisk:abort:");
ffc08148: 3f e0 00 00 lis r31,0 <== NOT EXECUTED
*
* @param format The format string. See printf for details.
* @param ... The arguments for the format text.
*/
static void
rtems_fdisk_abort (const char *format, ...)
ffc0814c: 90 01 00 24 stw r0,36(r1) <== NOT EXECUTED
{
va_list args;
va_start (args, format);
fprintf (stderr, "fdisk:abort:");
ffc08150: 38 63 37 c2 addi r3,r3,14274 <== NOT EXECUTED
*/
static void
rtems_fdisk_abort (const char *format, ...)
{
va_list args;
va_start (args, format);
ffc08154: 91 21 00 0c stw r9,12(r1) <== NOT EXECUTED
fprintf (stderr, "fdisk:abort:");
ffc08158: 81 3f 28 0c lwz r9,10252(r31) <== NOT EXECUTED
ffc0815c: 80 89 00 0c lwz r4,12(r9) <== NOT EXECUTED
ffc08160: 48 01 aa 95 bl ffc22bf4 <fputs> <== NOT EXECUTED
vfprintf (stderr, format, args);
ffc08164: 81 3f 28 0c lwz r9,10252(r31) <== NOT EXECUTED
ffc08168: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc0816c: 80 89 00 0c lwz r4,12(r9) <== NOT EXECUTED
ffc08170: 38 63 37 cf addi r3,r3,14287 <== NOT EXECUTED
ffc08174: 48 01 aa 81 bl ffc22bf4 <fputs> <== NOT EXECUTED
fprintf (stderr, "\n");
ffc08178: 81 3f 28 0c lwz r9,10252(r31) <== NOT EXECUTED
ffc0817c: 38 60 00 0a li r3,10 <== NOT EXECUTED
ffc08180: 80 89 00 0c lwz r4,12(r9) <== NOT EXECUTED
ffc08184: 48 01 a9 59 bl ffc22adc <fputc> <== NOT EXECUTED
fflush (stderr);
ffc08188: 81 3f 28 0c lwz r9,10252(r31) <== NOT EXECUTED
ffc0818c: 80 69 00 0c lwz r3,12(r9) <== NOT EXECUTED
ffc08190: 48 01 a3 21 bl ffc224b0 <fflush> <== NOT EXECUTED
va_end (args);
exit (1);
ffc08194: 38 60 00 01 li r3,1 <== NOT EXECUTED
ffc08198: 48 01 9e 5d bl ffc21ff4 <exit> <== NOT EXECUTED
ffc0659c <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)
{
ffc0659c: 94 21 ff b8 stwu r1,-72(r1)
ffc065a0: 7c 08 02 a6 mflr r0
ffc065a4: 90 01 00 4c stw r0,76(r1)
static bool
rtems_fdisk_is_erased_blocks_starvation (rtems_flashdisk* fd)
{
bool starvation = fd->erased_blocks < fd->starvation_threshold;
if (starvation)
ffc065a8: 81 43 00 28 lwz r10,40(r3)
ffc065ac: 81 23 00 24 lwz r9,36(r3)
* 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)
{
ffc065b0: be a1 00 1c stmw r21,28(r1)
ffc065b4: 7c 7f 1b 78 mr r31,r3
static bool
rtems_fdisk_is_erased_blocks_starvation (rtems_flashdisk* fd)
{
bool starvation = fd->erased_blocks < fd->starvation_threshold;
if (starvation)
ffc065b8: 7f 8a 48 40 cmplw cr7,r10,r9
ffc065bc: 40 9c 01 b0 bge- cr7,ffc0676c <rtems_fdisk_compact+0x1d0>
fd->starvations++;
ffc065c0: 81 23 00 70 lwz r9,112(r3)
uint32_t pages;
if (rtems_fdisk_is_erased_blocks_starvation (fd))
{
#if RTEMS_FDISK_TRACE
rtems_fdisk_printf (fd, " resolve starvation");
ffc065c4: 3c 80 ff c3 lis r4,-61
ffc065c8: 38 84 3a 1f addi r4,r4,14879
rtems_fdisk_is_erased_blocks_starvation (rtems_flashdisk* fd)
{
bool starvation = fd->erased_blocks < fd->starvation_threshold;
if (starvation)
fd->starvations++;
ffc065cc: 39 29 00 01 addi r9,r9,1
ffc065d0: 91 23 00 70 stw r9,112(r3)
uint32_t pages;
if (rtems_fdisk_is_erased_blocks_starvation (fd))
{
#if RTEMS_FDISK_TRACE
rtems_fdisk_printf (fd, " resolve starvation");
ffc065d4: 4c c6 31 82 crclr 4*cr1+eq
ffc065d8: 4b ff f2 fd bl ffc058d4 <rtems_fdisk_printf>
#endif
ssc = rtems_fdisk_segment_queue_pop_head (&fd->used);
ffc065dc: 38 7f 00 40 addi r3,r31,64
ffc065e0: 4b ff f0 a1 bl ffc05680 <rtems_fdisk_segment_queue_pop_head>
if (!ssc)
ffc065e4: 7c 7e 1b 79 mr. r30,r3
ffc065e8: 40 a2 00 14 bne+ ffc065fc <rtems_fdisk_compact+0x60> <== ALWAYS TAKEN
ssc = rtems_fdisk_segment_queue_pop_head (&fd->available);
ffc065ec: 38 7f 00 34 addi r3,r31,52 <== NOT EXECUTED
ffc065f0: 4b ff f0 91 bl ffc05680 <rtems_fdisk_segment_queue_pop_head><== NOT EXECUTED
if (ssc)
ffc065f4: 7c 7e 1b 79 mr. r30,r3 <== NOT EXECUTED
ffc065f8: 41 a2 00 3c beq+ ffc06634 <rtems_fdisk_compact+0x98> <== NOT EXECUTED
{
dsc = rtems_fdisk_seg_most_available (&fd->available);
ffc065fc: 80 7f 00 34 lwz r3,52(r31)
ffc06600: 4b ff f6 05 bl ffc05c04 <rtems_fdisk_seg_most_available.isra.8>
if (dsc)
ffc06604: 7c 65 1b 79 mr. r5,r3
ffc06608: 41 82 00 20 beq- ffc06628 <rtems_fdisk_compact+0x8c> <== NEVER TAKEN
{
ret = rtems_fdisk_recycle_segment (fd, ssc, dsc, &pages);
ffc0660c: 7f e3 fb 78 mr r3,r31
ffc06610: 7f c4 f3 78 mr r4,r30
ffc06614: 38 c1 00 08 addi r6,r1,8
ffc06618: 4b ff fc 01 bl ffc06218 <rtems_fdisk_recycle_segment>
if (ret)
ffc0661c: 2c 03 00 00 cmpwi r3,0
ffc06620: 41 a2 01 4c beq+ ffc0676c <rtems_fdisk_compact+0x1d0> <== ALWAYS TAKEN
ffc06624: 48 00 01 94 b ffc067b8 <rtems_fdisk_compact+0x21c> <== NOT EXECUTED
return ret;
}
else
{
rtems_fdisk_error ("compacting: starvation");
ffc06628: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc0662c: 38 63 3a 33 addi r3,r3,14899 <== NOT EXECUTED
ffc06630: 48 00 00 0c b ffc0663c <rtems_fdisk_compact+0xa0> <== NOT EXECUTED
return EIO;
}
}
else
{
rtems_fdisk_error ("compacting: nothing to recycle");
ffc06634: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc06638: 38 63 3a 4a addi r3,r3,14922 <== NOT EXECUTED
ffc0663c: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc06640: 4b ff f4 3d bl ffc05a7c <rtems_fdisk_error> <== NOT EXECUTED
return EIO;
ffc06644: 38 60 00 05 li r3,5 <== NOT EXECUTED
ffc06648: 48 00 01 70 b ffc067b8 <rtems_fdisk_compact+0x21c> <== NOT EXECUTED
{
uint32_t dst_pages;
uint32_t segments;
#if RTEMS_FDISK_TRACE
rtems_fdisk_printf (fd, " compacting");
ffc0664c: 7f 64 db 78 mr r4,r27
ffc06650: 7f e3 fb 78 mr r3,r31
ffc06654: 4c c6 31 82 crclr 4*cr1+eq
ffc06658: 4b ff f2 7d bl ffc058d4 <rtems_fdisk_printf>
#endif
dsc = rtems_fdisk_seg_most_available (&fd->available);
ffc0665c: 80 7f 00 34 lwz r3,52(r31)
ffc06660: 4b ff f5 a5 bl ffc05c04 <rtems_fdisk_seg_most_available.isra.8>
if (dsc == 0)
ffc06664: 7c 7c 1b 79 mr. r28,r3
ffc06668: 40 a2 00 10 bne+ ffc06678 <rtems_fdisk_compact+0xdc> <== ALWAYS TAKEN
{
rtems_fdisk_error ("compacting: no available segments to compact too");
ffc0666c: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc06670: 38 63 3a 75 addi r3,r3,14965 <== NOT EXECUTED
ffc06674: 4b ff ff c8 b ffc0663c <rtems_fdisk_compact+0xa0> <== NOT EXECUTED
return EIO;
}
ssc = fd->used.head;
dst_pages = rtems_fdisk_seg_pages_available (dsc);
ffc06678: 4b ff f1 69 bl ffc057e0 <rtems_fdisk_seg_pages_available>
segments = 0;
pages = 0;
#if RTEMS_FDISK_TRACE
rtems_fdisk_printf (fd, " dsc:%02d-%03d: most available",
ffc0667c: 80 bc 00 08 lwz r5,8(r28)
ffc06680: 80 dc 00 0c lwz r6,12(r28)
rtems_fdisk_error ("compacting: no available segments to compact too");
return EIO;
}
ssc = fd->used.head;
dst_pages = rtems_fdisk_seg_pages_available (dsc);
ffc06684: 7c 75 1b 78 mr r21,r3
segments = 0;
pages = 0;
#if RTEMS_FDISK_TRACE
rtems_fdisk_printf (fd, " dsc:%02d-%03d: most available",
ffc06688: 7f 24 cb 78 mr r4,r25
{
rtems_fdisk_error ("compacting: no available segments to compact too");
return EIO;
}
ssc = fd->used.head;
ffc0668c: 83 df 00 40 lwz r30,64(r31)
dst_pages = rtems_fdisk_seg_pages_available (dsc);
segments = 0;
pages = 0;
#if RTEMS_FDISK_TRACE
rtems_fdisk_printf (fd, " dsc:%02d-%03d: most available",
ffc06690: 7f e3 fb 78 mr r3,r31
}
ssc = fd->used.head;
dst_pages = rtems_fdisk_seg_pages_available (dsc);
segments = 0;
pages = 0;
ffc06694: 93 41 00 08 stw r26,8(r1)
#if RTEMS_FDISK_TRACE
rtems_fdisk_printf (fd, " dsc:%02d-%03d: most available",
ffc06698: 4c c6 31 82 crclr 4*cr1+eq
ffc0669c: 4b ff f2 39 bl ffc058d4 <rtems_fdisk_printf>
return EIO;
}
ssc = fd->used.head;
dst_pages = rtems_fdisk_seg_pages_available (dsc);
segments = 0;
ffc066a0: 39 00 00 00 li r8,0
ffc066a4: 80 e1 00 08 lwz r7,8(r1)
* 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 &&
ffc066a8: 48 00 00 10 b ffc066b8 <rtems_fdisk_compact+0x11c>
((pages + ssc->pages_active) < dst_pages) &&
((compacted_segs + segments) < fd->compact_segs))
{
pages += ssc->pages_active;
segments++;
ssc = ssc->next;
ffc066ac: 83 de 00 00 lwz r30,0(r30)
while (ssc &&
((pages + ssc->pages_active) < dst_pages) &&
((compacted_segs + segments) < fd->compact_segs))
{
pages += ssc->pages_active;
segments++;
ffc066b0: 39 08 00 01 addi r8,r8,1
while (ssc &&
((pages + ssc->pages_active) < dst_pages) &&
((compacted_segs + segments) < fd->compact_segs))
{
pages += ssc->pages_active;
ffc066b4: 7d 27 4b 78 mr r7,r9
* 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 &&
ffc066b8: 2f 9e 00 00 cmpwi cr7,r30,0
ffc066bc: 40 be 00 20 bne+ cr7,ffc066dc <rtems_fdisk_compact+0x140>
ffc066c0: 90 e1 00 08 stw r7,8(r1)
*/
if (!ssc || (pages == 0) || ((compacted_segs + segments) == 1))
{
#if RTEMS_FDISK_TRACE
rtems_fdisk_printf (fd, " nothing to compact");
ffc066c4: 3c 80 ff c3 lis r4,-61
ffc066c8: 7f e3 fb 78 mr r3,r31
ffc066cc: 38 84 3a c5 addi r4,r4,15045
ffc066d0: 4c c6 31 82 crclr 4*cr1+eq
ffc066d4: 4b ff f2 01 bl ffc058d4 <rtems_fdisk_printf>
ffc066d8: 48 00 00 c8 b ffc067a0 <rtems_fdisk_compact+0x204>
* compaction or less delay when compacting but it may mean the disk
* will fill.
*/
while (ssc &&
((pages + ssc->pages_active) < dst_pages) &&
ffc066dc: 81 3e 00 1c lwz r9,28(r30)
ffc066e0: 7d 27 4a 14 add r9,r7,r9
* 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 &&
ffc066e4: 7f 89 a8 40 cmplw cr7,r9,r21
ffc066e8: 40 9c 00 c0 bge- cr7,ffc067a8 <rtems_fdisk_compact+0x20c>
((pages + ssc->pages_active) < dst_pages) &&
ffc066ec: 81 5f 00 0c lwz r10,12(r31)
* 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)
ffc066f0: 7c c8 ea 14 add r6,r8,r29
* compaction or less delay when compacting but it may mean the disk
* will fill.
*/
while (ssc &&
((pages + ssc->pages_active) < dst_pages) &&
ffc066f4: 7f 86 50 40 cmplw cr7,r6,r10
ffc066f8: 41 9c ff b4 blt+ cr7,ffc066ac <rtems_fdisk_compact+0x110><== ALWAYS TAKEN
ffc066fc: 48 00 00 ac b ffc067a8 <rtems_fdisk_compact+0x20c> <== 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))
ffc06700: 7f bd 42 14 add r29,r29,r8
ffc06704: 2f 9d 00 01 cmpwi cr7,r29,1
ffc06708: 41 be ff bc beq- cr7,ffc066c4 <rtems_fdisk_compact+0x128>
#endif
break;
}
#if RTEMS_FDISK_TRACE
rtems_fdisk_printf (fd, " ssc scan: %d-%d: p=%ld, seg=%ld",
ffc0670c: 80 be 00 08 lwz r5,8(r30)
ffc06710: 7f 04 c3 78 mr r4,r24
ffc06714: 80 de 00 0c lwz r6,12(r30)
ffc06718: 7f e3 fb 78 mr r3,r31
ffc0671c: 4c c6 31 82 crclr 4*cr1+eq
ffc06720: 4b ff f1 b5 bl ffc058d4 <rtems_fdisk_printf>
ssc->device, ssc->segment,
pages, segments);
#endif
rtems_fdisk_segment_queue_remove (&fd->available, dsc);
ffc06724: 7e e3 bb 78 mr r3,r23
ffc06728: 7f 84 e3 78 mr r4,r28
ffc0672c: 4b ff ef d5 bl ffc05700 <rtems_fdisk_segment_queue_remove>
/*
* We now copy the pages to the new segment.
*/
while (pages)
ffc06730: 48 00 00 2c b ffc0675c <rtems_fdisk_compact+0x1c0>
{
ssc = rtems_fdisk_segment_queue_pop_head (&fd->used);
ffc06734: 7e c3 b3 78 mr r3,r22
ffc06738: 4b ff ef 49 bl ffc05680 <rtems_fdisk_segment_queue_pop_head>
if (ssc)
ffc0673c: 7c 64 1b 79 mr. r4,r3
ffc06740: 41 a2 00 1c beq+ ffc0675c <rtems_fdisk_compact+0x1c0> <== NEVER TAKEN
{
ret = rtems_fdisk_recycle_segment (fd, ssc, dsc, &pages);
ffc06744: 7f e3 fb 78 mr r3,r31
ffc06748: 7f 85 e3 78 mr r5,r28
ffc0674c: 38 c1 00 08 addi r6,r1,8
ffc06750: 4b ff fa c9 bl ffc06218 <rtems_fdisk_recycle_segment>
if (ret)
ffc06754: 2c 03 00 00 cmpwi r3,0
ffc06758: 40 82 00 60 bne- ffc067b8 <rtems_fdisk_compact+0x21c> <== NEVER TAKEN
/*
* We now copy the pages to the new segment.
*/
while (pages)
ffc0675c: 81 21 00 08 lwz r9,8(r1)
ffc06760: 2f 89 00 00 cmpwi cr7,r9,0
ffc06764: 41 be 00 30 beq+ cr7,ffc06794 <rtems_fdisk_compact+0x1f8>
ffc06768: 4b ff ff cc b ffc06734 <rtems_fdisk_compact+0x198>
{
uint32_t dst_pages;
uint32_t segments;
#if RTEMS_FDISK_TRACE
rtems_fdisk_printf (fd, " compacting");
ffc0676c: 3f 60 ff c3 lis r27,-61
dst_pages = rtems_fdisk_seg_pages_available (dsc);
segments = 0;
pages = 0;
#if RTEMS_FDISK_TRACE
rtems_fdisk_printf (fd, " dsc:%02d-%03d: most available",
ffc06770: 3f 20 ff c3 lis r25,-61
#endif
break;
}
#if RTEMS_FDISK_TRACE
rtems_fdisk_printf (fd, " ssc scan: %d-%d: p=%ld, seg=%ld",
ffc06774: 3f 00 ff c3 lis r24,-61
* compaction or less delay when compacting but it may mean the disk
* will fill.
*/
while (ssc &&
((pages + ssc->pages_active) < dst_pages) &&
ffc06778: 3b a0 00 00 li r29,0
{
uint32_t dst_pages;
uint32_t segments;
#if RTEMS_FDISK_TRACE
rtems_fdisk_printf (fd, " compacting");
ffc0677c: 3b 7b 3a 69 addi r27,r27,14953
}
ssc = fd->used.head;
dst_pages = rtems_fdisk_seg_pages_available (dsc);
segments = 0;
pages = 0;
ffc06780: 3b 40 00 00 li r26,0
#if RTEMS_FDISK_TRACE
rtems_fdisk_printf (fd, " dsc:%02d-%03d: most available",
ffc06784: 3b 39 3a a6 addi r25,r25,15014
#endif
break;
}
#if RTEMS_FDISK_TRACE
rtems_fdisk_printf (fd, " ssc scan: %d-%d: p=%ld, seg=%ld",
ffc06788: 3b 18 3a d9 addi r24,r24,15065
ssc->device, ssc->segment,
pages, segments);
#endif
rtems_fdisk_segment_queue_remove (&fd->available, dsc);
ffc0678c: 3a ff 00 34 addi r23,r31,52
* We now copy the pages to the new segment.
*/
while (pages)
{
ssc = rtems_fdisk_segment_queue_pop_head (&fd->used);
ffc06790: 3a df 00 40 addi r22,r31,64
rtems_fdisk_error ("compacting: nothing to recycle");
return EIO;
}
}
while (fd->used.head)
ffc06794: 81 3f 00 40 lwz r9,64(r31)
ffc06798: 2f 89 00 00 cmpwi cr7,r9,0
ffc0679c: 40 9e fe b0 bne+ cr7,ffc0664c <rtems_fdisk_compact+0xb0>
}
compacted_segs += segments;
}
return 0;
ffc067a0: 38 60 00 00 li r3,0
ffc067a4: 48 00 00 14 b ffc067b8 <rtems_fdisk_compact+0x21c>
* 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))
ffc067a8: 2f 87 00 00 cmpwi cr7,r7,0
ffc067ac: 90 e1 00 08 stw r7,8(r1)
ffc067b0: 40 9e ff 50 bne+ cr7,ffc06700 <rtems_fdisk_compact+0x164>
ffc067b4: 4b ff ff 10 b ffc066c4 <rtems_fdisk_compact+0x128>
compacted_segs += segments;
}
return 0;
}
ffc067b8: 39 61 00 48 addi r11,r1,72
ffc067bc: 4b ff ad 88 b ffc01544 <_restgpr_21_x>
ffc05e80 <rtems_fdisk_erase_segment>:
/**
* Erase the segment.
*/
static int
rtems_fdisk_erase_segment (rtems_flashdisk* fd, rtems_fdisk_segment_ctl* sc)
{
ffc05e80: 94 21 ff e0 stwu r1,-32(r1)
ffc05e84: 7c 08 02 a6 mflr r0
ffc05e88: 90 01 00 24 stw r0,36(r1)
ffc05e8c: bf 61 00 0c stmw r27,12(r1)
ffc05e90: 7c 9f 23 78 mr r31,r4
ffc05e94: 7c 7e 1b 78 mr r30,r3
int ret;
uint32_t device;
uint32_t segment;
const rtems_fdisk_segment_desc* sd;
const rtems_fdisk_driver_handlers* ops;
device = sc->device;
ffc05e98: 80 84 00 08 lwz r4,8(r4)
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;
ffc05e9c: 81 23 00 2c lwz r9,44(r3)
ffc05ea0: 1d 44 00 0c mulli r10,r4,12
uint32_t device;
uint32_t segment;
const rtems_fdisk_segment_desc* sd;
const rtems_fdisk_driver_handlers* ops;
device = sc->device;
segment = sc->segment;
ffc05ea4: 80 bf 00 0c lwz r5,12(r31)
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;
ffc05ea8: 7d 09 52 14 add r8,r9,r10
ffc05eac: 7d 49 50 2e lwzx r10,r9,r10
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;
ffc05eb0: 81 08 00 08 lwz r8,8(r8)
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;
ffc05eb4: 1d 25 00 30 mulli r9,r5,48
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);
ffc05eb8: 81 08 00 08 lwz r8,8(r8)
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;
ffc05ebc: 7d 4a 4a 14 add r10,r10,r9
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);
ffc05ec0: 80 6a 00 04 lwz r3,4(r10)
ffc05ec4: 81 28 00 10 lwz r9,16(r8)
ffc05ec8: 7d 29 03 a6 mtctr r9
ffc05ecc: 4e 80 04 21 bctrl
if (ret)
ffc05ed0: 7c 7d 1b 79 mr. r29,r3
ffc05ed4: 41 82 00 58 beq- ffc05f2c <rtems_fdisk_erase_segment+0xac><== ALWAYS TAKEN
{
rtems_fdisk_error (" erase-segment:%02d-%03d: " \
ffc05ed8: 83 7f 00 08 lwz r27,8(r31) <== NOT EXECUTED
ffc05edc: 83 9f 00 0c lwz r28,12(r31) <== NOT EXECUTED
ffc05ee0: 48 01 ec 99 bl ffc24b78 <strerror> <== NOT EXECUTED
ffc05ee4: 7c 66 1b 78 mr r6,r3 <== NOT EXECUTED
ffc05ee8: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc05eec: 38 63 38 36 addi r3,r3,14390 <== NOT EXECUTED
ffc05ef0: 7f 64 db 78 mr r4,r27 <== NOT EXECUTED
ffc05ef4: 7f 85 e3 78 mr r5,r28 <== NOT EXECUTED
ffc05ef8: 7f a7 eb 78 mr r7,r29 <== NOT EXECUTED
ffc05efc: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc05f00: 4b ff fb 7d bl ffc05a7c <rtems_fdisk_error> <== NOT EXECUTED
"segment erase failed: %s (%d)",
sc->device, sc->segment, strerror (ret), ret);
sc->failed = true;
ffc05f04: 39 20 00 01 li r9,1 <== NOT EXECUTED
ffc05f08: 91 3f 00 28 stw r9,40(r31) <== NOT EXECUTED
}
rtems_flashdisk_count = rtems_flashdisk_configuration_size;
return RTEMS_SUCCESSFUL;
}
ffc05f0c: 81 3e 00 58 lwz r9,88(r30) <== NOT EXECUTED
ffc05f10: 48 00 00 10 b ffc05f20 <rtems_fdisk_erase_segment+0xa0><== NOT EXECUTED
{
rtems_fdisk_segment_ctl* it = queue->head;
while (it)
{
if (it == sc)
ffc05f14: 7f 89 f8 00 cmpw cr7,r9,r31 <== NOT EXECUTED
ffc05f18: 41 9e 00 6c beq- cr7,ffc05f84 <rtems_fdisk_erase_segment+0x104><== NOT EXECUTED
return true;
it = it->next;
ffc05f1c: 81 29 00 00 lwz r9,0(r9) <== 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)
ffc05f20: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED
ffc05f24: 40 9e ff f0 bne+ cr7,ffc05f14 <rtems_fdisk_erase_segment+0x94><== NOT EXECUTED
ffc05f28: 48 00 00 50 b ffc05f78 <rtems_fdisk_erase_segment+0xf8><== 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;
ffc05f2c: 81 5e 00 28 lwz r10,40(r30)
sc->erased++;
memset (sc->page_descriptors, 0xff, sc->pages_desc * fd->block_size);
ffc05f30: 38 80 00 ff li r4,255
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;
ffc05f34: 81 3f 00 14 lwz r9,20(r31)
sc->erased++;
memset (sc->page_descriptors, 0xff, sc->pages_desc * fd->block_size);
ffc05f38: 80 be 00 14 lwz r5,20(r30)
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;
ffc05f3c: 7d 2a 4a 14 add r9,r10,r9
sc->erased++;
memset (sc->page_descriptors, 0xff, sc->pages_desc * fd->block_size);
ffc05f40: 80 7f 00 10 lwz r3,16(r31)
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;
ffc05f44: 91 3e 00 28 stw r9,40(r30)
sc->erased++;
ffc05f48: 81 3f 00 2c lwz r9,44(r31)
ffc05f4c: 39 29 00 01 addi r9,r9,1
ffc05f50: 91 3f 00 2c stw r9,44(r31)
memset (sc->page_descriptors, 0xff, sc->pages_desc * fd->block_size);
ffc05f54: 81 3f 00 18 lwz r9,24(r31)
ffc05f58: 7c a5 49 d6 mullw r5,r5,r9
ffc05f5c: 48 01 d7 d5 bl ffc23730 <memset>
sc->pages_active = 0;
ffc05f60: 93 bf 00 1c stw r29,28(r31)
/*
* 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);
ffc05f64: 38 7e 00 34 addi r3,r30,52
sc->erased++;
memset (sc->page_descriptors, 0xff, sc->pages_desc * fd->block_size);
sc->pages_active = 0;
sc->pages_used = 0;
ffc05f68: 93 bf 00 20 stw r29,32(r31)
sc->pages_bad = 0;
ffc05f6c: 93 bf 00 24 stw r29,36(r31)
sc->failed = false;
ffc05f70: 93 bf 00 28 stw r29,40(r31)
ffc05f74: 48 00 00 08 b ffc05f7c <rtems_fdisk_erase_segment+0xfc>
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);
ffc05f78: 38 7e 00 58 addi r3,r30,88 <== NOT EXECUTED
ffc05f7c: 7f e4 fb 78 mr r4,r31
ffc05f80: 4b ff f7 3d bl ffc056bc <rtems_fdisk_segment_queue_push_tail>
* segment will now get a go.
*/
rtems_fdisk_segment_queue_push_tail (&fd->available, sc);
return 0;
}
ffc05f84: 39 61 00 20 addi r11,r1,32
ffc05f88: 7f a3 eb 78 mr r3,r29
ffc05f8c: 4b ff b5 d0 b ffc0155c <_restgpr_27_x>
ffc05a7c <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, ...)
{
ffc05a7c: 94 21 ff 80 stwu r1,-128(r1) <== NOT EXECUTED
ffc05a80: 7c 08 02 a6 mflr r0 <== NOT EXECUTED
ffc05a84: bf c1 00 78 stmw r30,120(r1) <== NOT EXECUTED
ffc05a88: 90 01 00 84 stw r0,132(r1) <== NOT EXECUTED
ffc05a8c: 90 81 00 1c stw r4,28(r1) <== NOT EXECUTED
ffc05a90: 90 a1 00 20 stw r5,32(r1) <== NOT EXECUTED
ffc05a94: 90 c1 00 24 stw r6,36(r1) <== NOT EXECUTED
ffc05a98: 90 e1 00 28 stw r7,40(r1) <== NOT EXECUTED
ffc05a9c: 91 01 00 2c stw r8,44(r1) <== NOT EXECUTED
ffc05aa0: 91 21 00 30 stw r9,48(r1) <== NOT EXECUTED
ffc05aa4: 91 41 00 34 stw r10,52(r1) <== NOT EXECUTED
ffc05aa8: 40 86 00 24 bne- cr1,ffc05acc <rtems_fdisk_error+0x50> <== NOT EXECUTED
ffc05aac: d8 21 00 38 stfd f1,56(r1) <== NOT EXECUTED
ffc05ab0: d8 41 00 40 stfd f2,64(r1) <== NOT EXECUTED
ffc05ab4: d8 61 00 48 stfd f3,72(r1) <== NOT EXECUTED
ffc05ab8: d8 81 00 50 stfd f4,80(r1) <== NOT EXECUTED
ffc05abc: d8 a1 00 58 stfd f5,88(r1) <== NOT EXECUTED
ffc05ac0: d8 c1 00 60 stfd f6,96(r1) <== NOT EXECUTED
ffc05ac4: d8 e1 00 68 stfd f7,104(r1) <== NOT EXECUTED
ffc05ac8: d9 01 00 70 stfd f8,112(r1) <== NOT EXECUTED
int ret;
va_list args;
va_start (args, format);
ffc05acc: 39 20 00 01 li r9,1 <== NOT EXECUTED
ffc05ad0: 99 21 00 08 stb r9,8(r1) <== NOT EXECUTED
ffc05ad4: 39 20 00 00 li r9,0 <== NOT EXECUTED
fprintf (stderr, "fdisk:error:");
ffc05ad8: 3f e0 00 00 lis r31,0 <== NOT EXECUTED
static int
rtems_fdisk_error (const char *format, ...)
{
int ret;
va_list args;
va_start (args, format);
ffc05adc: 99 21 00 09 stb r9,9(r1) <== NOT EXECUTED
ffc05ae0: 39 21 00 88 addi r9,r1,136 <== NOT EXECUTED
* @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, ...)
{
ffc05ae4: 7c 7e 1b 78 mr r30,r3 <== NOT EXECUTED
int ret;
va_list args;
va_start (args, format);
ffc05ae8: 91 21 00 0c stw r9,12(r1) <== NOT EXECUTED
ffc05aec: 39 21 00 18 addi r9,r1,24 <== NOT EXECUTED
fprintf (stderr, "fdisk:error:");
ffc05af0: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
static int
rtems_fdisk_error (const char *format, ...)
{
int ret;
va_list args;
va_start (args, format);
ffc05af4: 91 21 00 10 stw r9,16(r1) <== NOT EXECUTED
fprintf (stderr, "fdisk:error:");
ffc05af8: 38 63 37 92 addi r3,r3,14226 <== NOT EXECUTED
ffc05afc: 81 3f 28 0c lwz r9,10252(r31) <== NOT EXECUTED
ffc05b00: 80 89 00 0c lwz r4,12(r9) <== NOT EXECUTED
ffc05b04: 48 01 d0 f1 bl ffc22bf4 <fputs> <== NOT EXECUTED
ret = vfprintf (stderr, format, args);
ffc05b08: 81 3f 28 0c lwz r9,10252(r31) <== NOT EXECUTED
ffc05b0c: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED
ffc05b10: 80 69 00 0c lwz r3,12(r9) <== NOT EXECUTED
ffc05b14: 38 a1 00 08 addi r5,r1,8 <== NOT EXECUTED
ffc05b18: 48 02 64 59 bl ffc2bf70 <vfprintf> <== NOT EXECUTED
fprintf (stderr, "\n");
ffc05b1c: 81 3f 28 0c lwz r9,10252(r31) <== NOT EXECUTED
{
int ret;
va_list args;
va_start (args, format);
fprintf (stderr, "fdisk:error:");
ret = vfprintf (stderr, format, args);
ffc05b20: 7c 7e 1b 78 mr r30,r3 <== NOT EXECUTED
fprintf (stderr, "\n");
ffc05b24: 80 89 00 0c lwz r4,12(r9) <== NOT EXECUTED
ffc05b28: 38 60 00 0a li r3,10 <== NOT EXECUTED
ffc05b2c: 48 01 cf b1 bl ffc22adc <fputc> <== NOT EXECUTED
fflush (stderr);
ffc05b30: 81 3f 28 0c lwz r9,10252(r31) <== NOT EXECUTED
ffc05b34: 80 69 00 0c lwz r3,12(r9) <== NOT EXECUTED
ffc05b38: 48 01 c9 79 bl ffc224b0 <fflush> <== NOT EXECUTED
va_end (args);
return ret;
}
ffc05b3c: 39 61 00 80 addi r11,r1,128 <== NOT EXECUTED
ffc05b40: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc05b44: 4b ff ba 24 b ffc01568 <_restgpr_30_x> <== NOT EXECUTED
ffc05800 <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, ...)
{
ffc05800: 94 21 ff 80 stwu r1,-128(r1)
ffc05804: 7c 08 02 a6 mflr r0
ffc05808: bf a1 00 74 stmw r29,116(r1)
ffc0580c: 90 01 00 84 stw r0,132(r1)
ffc05810: 90 a1 00 18 stw r5,24(r1)
ffc05814: 90 c1 00 1c stw r6,28(r1)
ffc05818: 90 e1 00 20 stw r7,32(r1)
ffc0581c: 91 01 00 24 stw r8,36(r1)
ffc05820: 91 21 00 28 stw r9,40(r1)
ffc05824: 91 41 00 2c stw r10,44(r1)
ffc05828: 40 86 00 24 bne- cr1,ffc0584c <rtems_fdisk_info+0x4c> <== ALWAYS TAKEN
ffc0582c: d8 21 00 30 stfd f1,48(r1) <== NOT EXECUTED
ffc05830: d8 41 00 38 stfd f2,56(r1) <== NOT EXECUTED
ffc05834: d8 61 00 40 stfd f3,64(r1) <== NOT EXECUTED
ffc05838: d8 81 00 48 stfd f4,72(r1) <== NOT EXECUTED
ffc0583c: d8 a1 00 50 stfd f5,80(r1) <== NOT EXECUTED
ffc05840: d8 c1 00 58 stfd f6,88(r1) <== NOT EXECUTED
ffc05844: d8 e1 00 60 stfd f7,96(r1) <== NOT EXECUTED
ffc05848: d9 01 00 68 stfd f8,104(r1) <== NOT EXECUTED
int ret = 0;
if (fd->info_level >= 2)
ffc0584c: 81 23 00 6c lwz r9,108(r3)
* @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, ...)
{
ffc05850: 7c 9d 23 78 mr r29,r4
int ret = 0;
ffc05854: 3b c0 00 00 li r30,0
if (fd->info_level >= 2)
ffc05858: 2b 89 00 01 cmplwi cr7,r9,1
ffc0585c: 40 9d 00 6c ble- cr7,ffc058c8 <rtems_fdisk_info+0xc8> <== ALWAYS TAKEN
{
va_list args;
va_start (args, format);
ffc05860: 39 20 00 02 li r9,2 <== NOT EXECUTED
ffc05864: 9b c1 00 09 stb r30,9(r1) <== NOT EXECUTED
fprintf (stdout, "fdisk:");
ffc05868: 3f e0 00 00 lis r31,0 <== NOT EXECUTED
{
int ret = 0;
if (fd->info_level >= 2)
{
va_list args;
va_start (args, format);
ffc0586c: 99 21 00 08 stb r9,8(r1) <== NOT EXECUTED
ffc05870: 39 21 00 88 addi r9,r1,136 <== NOT EXECUTED
fprintf (stdout, "fdisk:");
ffc05874: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
{
int ret = 0;
if (fd->info_level >= 2)
{
va_list args;
va_start (args, format);
ffc05878: 91 21 00 0c stw r9,12(r1) <== NOT EXECUTED
ffc0587c: 39 21 00 10 addi r9,r1,16 <== NOT EXECUTED
fprintf (stdout, "fdisk:");
ffc05880: 38 63 37 7c addi r3,r3,14204 <== NOT EXECUTED
{
int ret = 0;
if (fd->info_level >= 2)
{
va_list args;
va_start (args, format);
ffc05884: 91 21 00 10 stw r9,16(r1) <== NOT EXECUTED
fprintf (stdout, "fdisk:");
ffc05888: 81 3f 28 0c lwz r9,10252(r31) <== NOT EXECUTED
ffc0588c: 80 89 00 08 lwz r4,8(r9) <== NOT EXECUTED
ffc05890: 48 01 d3 65 bl ffc22bf4 <fputs> <== NOT EXECUTED
ret = vfprintf (stdout, format, args);
ffc05894: 81 3f 28 0c lwz r9,10252(r31) <== NOT EXECUTED
ffc05898: 7f a4 eb 78 mr r4,r29 <== NOT EXECUTED
ffc0589c: 80 69 00 08 lwz r3,8(r9) <== NOT EXECUTED
ffc058a0: 38 a1 00 08 addi r5,r1,8 <== NOT EXECUTED
ffc058a4: 48 02 66 cd bl ffc2bf70 <vfprintf> <== NOT EXECUTED
fprintf (stdout, "\n");
ffc058a8: 81 3f 28 0c lwz r9,10252(r31) <== NOT EXECUTED
if (fd->info_level >= 2)
{
va_list args;
va_start (args, format);
fprintf (stdout, "fdisk:");
ret = vfprintf (stdout, format, args);
ffc058ac: 7c 7e 1b 78 mr r30,r3 <== NOT EXECUTED
fprintf (stdout, "\n");
ffc058b0: 80 89 00 08 lwz r4,8(r9) <== NOT EXECUTED
ffc058b4: 38 60 00 0a li r3,10 <== NOT EXECUTED
ffc058b8: 48 01 d2 25 bl ffc22adc <fputc> <== NOT EXECUTED
fflush (stdout);
ffc058bc: 81 3f 28 0c lwz r9,10252(r31) <== NOT EXECUTED
ffc058c0: 80 69 00 08 lwz r3,8(r9) <== NOT EXECUTED
ffc058c4: 48 01 cb ed bl ffc224b0 <fflush> <== NOT EXECUTED
va_end (args);
}
return ret;
}
ffc058c8: 39 61 00 80 addi r11,r1,128
ffc058cc: 7f c3 f3 78 mr r3,r30
ffc058d0: 4b ff bc 94 b ffc01564 <_restgpr_29_x>
ffc07c88 <rtems_fdisk_initialize>:
*/
rtems_device_driver
rtems_fdisk_initialize (rtems_device_major_number major,
rtems_device_minor_number minor,
void* arg __attribute__((unused)))
{
ffc07c88: 94 21 ff a8 stwu r1,-88(r1)
ffc07c8c: 7c 08 02 a6 mflr r0
ffc07c90: be 01 00 18 stmw r16,24(r1)
ffc07c94: 7c 7c 1b 78 mr r28,r3
ffc07c98: 90 01 00 5c stw r0,92(r1)
const rtems_flashdisk_config* c = rtems_flashdisk_configuration;
rtems_flashdisk* fd;
rtems_status_code sc;
sc = rtems_disk_io_initialize ();
ffc07c9c: 4b ff d8 61 bl ffc054fc <rtems_disk_io_initialize>
if (sc != RTEMS_SUCCESSFUL)
ffc07ca0: 2c 03 00 00 cmpwi r3,0
ffc07ca4: 40 a2 04 84 bne+ ffc08128 <rtems_fdisk_initialize+0x4a0><== 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);
ffc07ca8: 38 60 02 00 li r3,512
ffc07cac: 48 00 15 31 bl ffc091dc <malloc>
ffc07cb0: 3d 20 00 01 lis r9,1
if (!rtems_fdisk_crc16_factor)
ffc07cb4: 2f 83 00 00 cmpwi cr7,r3,0
static rtems_status_code
rtems_fdisk_crc16_gen_factors (uint16_t pattern)
{
uint32_t b;
rtems_fdisk_crc16_factor = malloc (sizeof (uint16_t) * 256);
ffc07cb8: 90 69 29 7c stw r3,10620(r9)
for (b = 0; b < 256; b++)
{
uint32_t i;
uint16_t v = b;
for (i = 8; i--;)
v = v & 1 ? (v >> 1) ^ pattern : v >> 1;
ffc07cbc: 38 e0 84 08 li r7,-31736
rtems_fdisk_crc16_gen_factors (uint16_t pattern)
{
uint32_t b;
rtems_fdisk_crc16_factor = malloc (sizeof (uint16_t) * 256);
if (!rtems_fdisk_crc16_factor)
ffc07cc0: 39 20 00 00 li r9,0
ffc07cc4: 40 be 00 08 bne+ cr7,ffc07ccc <rtems_fdisk_initialize+0x44><== ALWAYS TAKEN
ffc07cc8: 48 00 03 fc b ffc080c4 <rtems_fdisk_initialize+0x43c><== NOT EXECUTED
for (b = 0; b < 256; b++)
{
uint32_t i;
uint16_t v = b;
for (i = 8; i--;)
v = v & 1 ? (v >> 1) ^ pattern : v >> 1;
ffc07ccc: 39 00 00 09 li r8,9
return RTEMS_NO_MEMORY;
for (b = 0; b < 256; b++)
{
uint32_t i;
uint16_t v = b;
ffc07cd0: 55 2a 04 3e clrlwi r10,r9,16
for (i = 8; i--;)
v = v & 1 ? (v >> 1) ^ pattern : v >> 1;
ffc07cd4: 7d 09 03 a6 mtctr r8
ffc07cd8: 48 00 00 18 b ffc07cf0 <rtems_fdisk_initialize+0x68>
ffc07cdc: 71 48 00 01 andi. r8,r10,1
ffc07ce0: 55 4a f8 7e rlwinm r10,r10,31,1,31
ffc07ce4: 41 82 00 08 beq- ffc07cec <rtems_fdisk_initialize+0x64>
ffc07ce8: 7d 4a 3a 78 xor r10,r10,r7
ffc07cec: 55 4a 04 3e clrlwi r10,r10,16
for (b = 0; b < 256; b++)
{
uint32_t i;
uint16_t v = b;
for (i = 8; i--;)
ffc07cf0: 42 00 ff ec bdnz+ ffc07cdc <rtems_fdisk_initialize+0x54>
rtems_fdisk_crc16_factor = malloc (sizeof (uint16_t) * 256);
if (!rtems_fdisk_crc16_factor)
return RTEMS_NO_MEMORY;
for (b = 0; b < 256; b++)
ffc07cf4: 2f 89 00 ff cmpwi cr7,r9,255
* @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,
ffc07cf8: 55 28 08 3c rlwinm r8,r9,1,0,30
{
uint32_t i;
uint16_t v = b;
for (i = 8; i--;)
v = v & 1 ? (v >> 1) ^ pattern : v >> 1;
rtems_fdisk_crc16_factor[b] = v & 0xffff;
ffc07cfc: 7d 43 43 2e sthx r10,r3,r8
rtems_fdisk_crc16_factor = malloc (sizeof (uint16_t) * 256);
if (!rtems_fdisk_crc16_factor)
return RTEMS_NO_MEMORY;
for (b = 0; b < 256; b++)
ffc07d00: 39 29 00 01 addi r9,r9,1
ffc07d04: 40 9e ff c8 bne+ cr7,ffc07ccc <rtems_fdisk_initialize+0x44>
ffc07d08: 48 00 03 fc b ffc08104 <rtems_fdisk_initialize+0x47c>
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";
ffc07d0c: 39 57 42 0f addi r10,r23,16911
ffc07d10: 39 21 00 08 addi r9,r1,8
ffc07d14: 7c aa 54 aa lswi r5,r10,10
ffc07d18: 7c a9 55 aa stswi r5,r9,10
* @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,
ffc07d1c: 1d 5d 00 74 mulli r10,r29,116
uint32_t blocks = 0;
int ret;
fd = &rtems_flashdisks[minor];
name [sizeof(RTEMS_FLASHDISK_DEVICE_BASE_NAME)] += minor;
ffc07d20: 9b a1 00 11 stb r29,17(r1)
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;
ffc07d24: 3b 60 00 00 li r27,0
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++)
ffc07d28: 3b 40 00 00 li r26,0
dev_t dev = rtems_filesystem_make_dev_t (major, minor);
uint32_t device;
uint32_t blocks = 0;
int ret;
fd = &rtems_flashdisks[minor];
ffc07d2c: 81 36 29 74 lwz r9,10612(r22)
fd->major = major;
fd->minor = minor;
fd->flags = c->flags;
fd->compact_segs = c->compact_segs;
fd->avail_compact_segs = c->avail_compact_segs;
fd->block_size = c->block_size;
ffc07d30: 80 7e ff e0 lwz r3,-32(r30)
dev_t dev = rtems_filesystem_make_dev_t (major, minor);
uint32_t device;
uint32_t blocks = 0;
int ret;
fd = &rtems_flashdisks[minor];
ffc07d34: 7f e9 52 14 add r31,r9,r10
name [sizeof(RTEMS_FLASHDISK_DEVICE_BASE_NAME)] += minor;
fd->major = major;
ffc07d38: 7f 89 51 2e stwx r28,r9,r10
fd->minor = minor;
fd->flags = c->flags;
ffc07d3c: 81 3e ff ec lwz r9,-20(r30)
fd = &rtems_flashdisks[minor];
name [sizeof(RTEMS_FLASHDISK_DEVICE_BASE_NAME)] += minor;
fd->major = major;
fd->minor = minor;
ffc07d40: 93 bf 00 04 stw r29,4(r31)
fd->flags = c->flags;
ffc07d44: 91 3f 00 08 stw r9,8(r31)
fd->compact_segs = c->compact_segs;
ffc07d48: 81 3e ff f4 lwz r9,-12(r30)
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++)
ffc07d4c: 80 be ff e4 lwz r5,-28(r30)
name [sizeof(RTEMS_FLASHDISK_DEVICE_BASE_NAME)] += minor;
fd->major = major;
fd->minor = minor;
fd->flags = c->flags;
fd->compact_segs = c->compact_segs;
ffc07d50: 91 3f 00 0c stw r9,12(r31)
fd->avail_compact_segs = c->avail_compact_segs;
ffc07d54: 81 3e ff f8 lwz r9,-8(r30)
fd->block_size = c->block_size;
ffc07d58: 90 7f 00 14 stw r3,20(r31)
fd->major = major;
fd->minor = minor;
fd->flags = c->flags;
fd->compact_segs = c->compact_segs;
fd->avail_compact_segs = c->avail_compact_segs;
ffc07d5c: 91 3f 00 10 stw r9,16(r31)
fd->block_size = c->block_size;
fd->unavail_blocks = c->unavail_blocks;
ffc07d60: 81 3e ff f0 lwz r9,-16(r30)
ffc07d64: 91 3f 00 20 stw r9,32(r31)
fd->info_level = c->info_level;
ffc07d68: 81 3e ff fc lwz r9,-4(r30)
ffc07d6c: 91 3f 00 6c stw r9,108(r31)
for (device = 0; device < c->device_count; device++)
ffc07d70: 48 00 00 6c b ffc07ddc <rtems_fdisk_initialize+0x154>
* @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,
ffc07d74: 1d 5a 00 0c mulli r10,r26,12
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],
ffc07d78: 81 3e ff e8 lwz r9,-24(r30)
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++)
ffc07d7c: 7d 09 50 2e lwzx r8,r9,r10
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],
ffc07d80: 7c 89 52 14 add r4,r9,r10
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++)
ffc07d84: 39 40 00 00 li r10,0
*/
static uint32_t
rtems_fdisk_blocks_in_device (const rtems_fdisk_device_desc* dd,
uint32_t page_size)
{
uint32_t count = 0;
ffc07d88: 39 08 00 01 addi r8,r8,1
ffc07d8c: 39 20 00 00 li r9,0
ffc07d90: 7d 09 03 a6 mtctr r8
ffc07d94: 48 00 00 3c b ffc07dd0 <rtems_fdisk_initialize+0x148>
* @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,
ffc07d98: 1c ea 00 0c mulli r7,r10,12
{
uint32_t count = 0;
uint32_t s;
for (s = 0; s < dd->segment_count; s++)
{
const rtems_fdisk_segment_desc* sd = &dd->segments[s];
ffc07d9c: 81 04 00 04 lwz r8,4(r4)
ffc07da0: 7c c8 3a 14 add r6,r8,r7
count +=
(rtems_fdisk_pages_in_segment (sd, page_size) -
rtems_fdisk_page_desc_pages (sd, page_size)) * sd->count;
ffc07da4: 7c e8 3a 2e lhzx r7,r8,r7
*/
static uint32_t
rtems_fdisk_pages_in_segment (const rtems_fdisk_segment_desc* sd,
uint32_t page_size)
{
return sd->size / page_size;
ffc07da8: 80 c6 00 08 lwz r6,8(r6)
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++)
ffc07dac: 39 4a 00 01 addi r10,r10,1
*/
static uint32_t
rtems_fdisk_pages_in_segment (const rtems_fdisk_segment_desc* sd,
uint32_t page_size)
{
return sd->size / page_size;
ffc07db0: 7c c6 1b 96 divwu r6,r6,r3
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;
ffc07db4: 39 66 ff ff addi r11,r6,-1
static uint32_t
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);
ffc07db8: 54 c6 18 38 rlwinm r6,r6,3,0,28
return ((bytes - 1) / page_size) + 1;
ffc07dbc: 38 c6 ff ff addi r6,r6,-1
ffc07dc0: 7c c6 1b 96 divwu r6,r6,r3
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) -
ffc07dc4: 7c c6 58 50 subf r6,r6,r11
rtems_fdisk_page_desc_pages (sd, page_size)) * sd->count;
ffc07dc8: 7d 06 39 d6 mullw r8,r6,r7
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 +=
ffc07dcc: 7d 29 42 14 add r9,r9,r8
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++)
ffc07dd0: 42 00 ff c8 bdnz+ ffc07d98 <rtems_fdisk_initialize+0x110>
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],
ffc07dd4: 7f 7b 4a 14 add r27,r27,r9
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++)
ffc07dd8: 3b 5a 00 01 addi r26,r26,1
ffc07ddc: 7f 9a 28 00 cmpw cr7,r26,r5
ffc07de0: 40 9e ff 94 bne+ cr7,ffc07d74 <rtems_fdisk_initialize+0xec>
c->block_size);
/*
* One copy buffer of a page size.
*/
fd->copy_buffer = malloc (c->block_size);
ffc07de4: 48 00 13 f9 bl ffc091dc <malloc>
if (!fd->copy_buffer)
ffc07de8: 2f 83 00 00 cmpwi cr7,r3,0
c->block_size);
/*
* One copy buffer of a page size.
*/
fd->copy_buffer = malloc (c->block_size);
ffc07dec: 90 7f 00 68 stw r3,104(r31)
if (!fd->copy_buffer)
ffc07df0: 41 9e 02 d4 beq- cr7,ffc080c4 <rtems_fdisk_initialize+0x43c><== NEVER TAKEN
return RTEMS_NO_MEMORY;
fd->blocks = calloc (blocks, sizeof (rtems_fdisk_block_ctl));
ffc07df4: 7f 63 db 78 mr r3,r27
ffc07df8: 38 80 00 08 li r4,8
ffc07dfc: 48 00 0b 71 bl ffc0896c <calloc>
if (!fd->blocks)
ffc07e00: 2f 83 00 00 cmpwi cr7,r3,0
*/
fd->copy_buffer = malloc (c->block_size);
if (!fd->copy_buffer)
return RTEMS_NO_MEMORY;
fd->blocks = calloc (blocks, sizeof (rtems_fdisk_block_ctl));
ffc07e04: 90 7f 00 18 stw r3,24(r31)
if (!fd->blocks)
ffc07e08: 41 9e 02 bc beq- cr7,ffc080c4 <rtems_fdisk_initialize+0x43c><== NEVER TAKEN
return RTEMS_NO_MEMORY;
fd->block_count = blocks;
ffc07e0c: 93 7f 00 1c stw r27,28(r31)
fd->devices = calloc (c->device_count, sizeof (rtems_fdisk_device_ctl));
ffc07e10: 7f 43 d3 78 mr r3,r26
ffc07e14: 38 80 00 0c li r4,12
ffc07e18: 48 00 0b 55 bl ffc0896c <calloc>
if (!fd->devices)
ffc07e1c: 2f 83 00 00 cmpwi cr7,r3,0
if (!fd->blocks)
return RTEMS_NO_MEMORY;
fd->block_count = blocks;
fd->devices = calloc (c->device_count, sizeof (rtems_fdisk_device_ctl));
ffc07e20: 90 7f 00 2c stw r3,44(r31)
if (!fd->devices)
ffc07e24: 41 9e 02 a0 beq- cr7,ffc080c4 <rtems_fdisk_initialize+0x43c><== NEVER TAKEN
return RTEMS_NO_MEMORY;
sc = rtems_semaphore_create (rtems_build_name ('F', 'D', 'S', 'K'), 1,
ffc07e28: 3c 60 46 44 lis r3,17988
ffc07e2c: 60 63 53 4b ori r3,r3,21323
ffc07e30: 38 80 00 01 li r4,1
ffc07e34: 38 a0 00 54 li r5,84
ffc07e38: 38 c0 00 00 li r6,0
ffc07e3c: 38 ff 00 64 addi r7,r31,100
ffc07e40: 48 00 58 21 bl ffc0d660 <rtems_semaphore_create>
RTEMS_PRIORITY | RTEMS_BINARY_SEMAPHORE |
RTEMS_INHERIT_PRIORITY, 0, &fd->lock);
if (sc != RTEMS_SUCCESSFUL)
ffc07e44: 7c 7a 1b 79 mr. r26,r3
ffc07e48: 41 a2 00 34 beq+ ffc07e7c <rtems_fdisk_initialize+0x1f4><== ALWAYS TAKEN
{
rtems_fdisk_error ("disk lock create failed");
ffc07e4c: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc07e50: 38 63 41 9c addi r3,r3,16796 <== NOT EXECUTED
ffc07e54: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc07e58: 4b ff dc 25 bl ffc05a7c <rtems_fdisk_error> <== NOT EXECUTED
free (fd->copy_buffer);
ffc07e5c: 80 7f 00 68 lwz r3,104(r31) <== NOT EXECUTED
ffc07e60: 48 00 0c b5 bl ffc08b14 <free> <== NOT EXECUTED
free (fd->blocks);
ffc07e64: 80 7f 00 18 lwz r3,24(r31) <== NOT EXECUTED
ffc07e68: 48 00 0c ad bl ffc08b14 <free> <== NOT EXECUTED
free (fd->devices);
ffc07e6c: 80 7f 00 2c lwz r3,44(r31) <== NOT EXECUTED
ffc07e70: 48 00 0c a5 bl ffc08b14 <free> <== NOT EXECUTED
fd->devices = calloc (c->device_count, sizeof (rtems_fdisk_device_ctl));
if (!fd->devices)
return RTEMS_NO_MEMORY;
sc = rtems_semaphore_create (rtems_build_name ('F', 'D', 'S', 'K'), 1,
ffc07e74: 7f 43 d3 78 mr r3,r26 <== NOT EXECUTED
ffc07e78: 48 00 02 b0 b ffc08128 <rtems_fdisk_initialize+0x4a0><== NOT EXECUTED
free (fd->blocks);
free (fd->devices);
return sc;
}
sc = rtems_disk_create_phys(dev, c->block_size,
ffc07e7c: 80 df 00 20 lwz r6,32(r31)
ffc07e80: 7f 83 e3 78 mr r3,r28
ffc07e84: 80 be ff e0 lwz r5,-32(r30)
ffc07e88: 7f a4 eb 78 mr r4,r29
ffc07e8c: 7c c6 d8 50 subf r6,r6,r27
ffc07e90: 7e 87 a3 78 mr r7,r20
ffc07e94: 39 00 00 00 li r8,0
ffc07e98: 39 21 00 08 addi r9,r1,8
ffc07e9c: 4b ff d3 ad bl ffc05248 <rtems_disk_create_phys>
blocks - fd->unavail_blocks,
rtems_fdisk_ioctl, NULL, name);
if (sc != RTEMS_SUCCESSFUL)
ffc07ea0: 7c 7b 1b 79 mr. r27,r3
ffc07ea4: 41 a2 01 48 beq+ ffc07fec <rtems_fdisk_initialize+0x364><== ALWAYS TAKEN
{
rtems_semaphore_delete (fd->lock);
ffc07ea8: 80 7f 00 64 lwz r3,100(r31) <== NOT EXECUTED
ffc07eac: 48 00 59 7d bl ffc0d828 <rtems_semaphore_delete> <== NOT EXECUTED
rtems_disk_delete (dev);
ffc07eb0: 7f a4 eb 78 mr r4,r29 <== NOT EXECUTED
ffc07eb4: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED
ffc07eb8: 4b ff d1 11 bl ffc04fc8 <rtems_disk_delete> <== NOT EXECUTED
free (fd->copy_buffer);
ffc07ebc: 80 7f 00 68 lwz r3,104(r31) <== NOT EXECUTED
ffc07ec0: 48 00 0c 55 bl ffc08b14 <free> <== NOT EXECUTED
free (fd->blocks);
ffc07ec4: 80 7f 00 18 lwz r3,24(r31) <== NOT EXECUTED
ffc07ec8: 48 00 0c 4d bl ffc08b14 <free> <== NOT EXECUTED
free (fd->devices);
ffc07ecc: 80 7f 00 2c lwz r3,44(r31) <== NOT EXECUTED
ffc07ed0: 48 00 0c 45 bl ffc08b14 <free> <== NOT EXECUTED
rtems_fdisk_error ("disk create phy failed");
ffc07ed4: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc07ed8: 38 63 41 b4 addi r3,r3,16820 <== NOT EXECUTED
ffc07edc: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc07ee0: 4b ff db 9d bl ffc05a7c <rtems_fdisk_error> <== NOT EXECUTED
ffc07ee4: 48 00 01 78 b ffc0805c <rtems_fdisk_initialize+0x3d4><== NOT EXECUTED
{
rtems_fdisk_segment_ctl* sc;
uint32_t segment_count;
uint32_t segment;
segment_count = rtems_fdisk_count_segments (&c->devices[device]);
ffc07ee8: 81 3e ff e8 lwz r9,-24(r30)
* @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,
ffc07eec: 1f 3b 00 0c mulli r25,r27,12
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++)
ffc07ef0: 7e 29 c8 2e lwzx r17,r9,r25
{
rtems_fdisk_segment_ctl* sc;
uint32_t segment_count;
uint32_t segment;
segment_count = rtems_fdisk_count_segments (&c->devices[device]);
ffc07ef4: 7e 69 ca 14 add r19,r9,r25
* Count the segments for a device.
*/
static uint32_t
rtems_fdisk_count_segments (const rtems_fdisk_device_desc* dd)
{
uint32_t count = 0;
ffc07ef8: 3b 40 00 00 li r26,0
ffc07efc: 39 51 00 01 addi r10,r17,1
uint32_t segment;
for (segment = 0; segment < dd->segment_count; segment++)
ffc07f00: 39 20 00 00 li r9,0
* Count the segments for a device.
*/
static uint32_t
rtems_fdisk_count_segments (const rtems_fdisk_device_desc* dd)
{
uint32_t count = 0;
ffc07f04: 7d 49 03 a6 mtctr r10
ffc07f08: 48 00 00 18 b ffc07f20 <rtems_fdisk_initialize+0x298>
uint32_t segment;
for (segment = 0; segment < dd->segment_count; segment++)
count += dd->segments[segment].count;
ffc07f0c: 1d 09 00 0c mulli r8,r9,12
ffc07f10: 81 53 00 04 lwz r10,4(r19)
ffc07f14: 7d 4a 42 2e lhzx r10,r10,r8
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++)
ffc07f18: 39 29 00 01 addi r9,r9,1
count += dd->segments[segment].count;
ffc07f1c: 7f 5a 52 14 add r26,r26,r10
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++)
ffc07f20: 42 00 ff ec bdnz+ ffc07f0c <rtems_fdisk_initialize+0x284>
uint32_t segment_count;
uint32_t segment;
segment_count = rtems_fdisk_count_segments (&c->devices[device]);
fd->devices[device].segments = calloc (segment_count,
ffc07f24: 7f 43 d3 78 mr r3,r26
ffc07f28: 82 1f 00 2c lwz r16,44(r31)
ffc07f2c: 38 80 00 30 li r4,48
ffc07f30: 48 00 0a 3d bl ffc0896c <calloc>
ffc07f34: 7e 50 ca 14 add r18,r16,r25
sizeof (rtems_fdisk_segment_ctl));
if (!fd->devices[device].segments)
ffc07f38: 2f 83 00 00 cmpwi cr7,r3,0
uint32_t segment_count;
uint32_t segment;
segment_count = rtems_fdisk_count_segments (&c->devices[device]);
fd->devices[device].segments = calloc (segment_count,
ffc07f3c: 7c 70 c9 2e stwx r3,r16,r25
sizeof (rtems_fdisk_segment_ctl));
if (!fd->devices[device].segments)
ffc07f40: 40 be 00 90 bne+ cr7,ffc07fd0 <rtems_fdisk_initialize+0x348><== ALWAYS TAKEN
{
rtems_disk_delete (dev);
ffc07f44: 7f a4 eb 78 mr r4,r29 <== NOT EXECUTED
ffc07f48: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED
ffc07f4c: 4b ff d0 7d bl ffc04fc8 <rtems_disk_delete> <== NOT EXECUTED
rtems_semaphore_delete (fd->lock);
ffc07f50: 80 7f 00 64 lwz r3,100(r31) <== NOT EXECUTED
ffc07f54: 48 00 58 d5 bl ffc0d828 <rtems_semaphore_delete> <== NOT EXECUTED
free (fd->copy_buffer);
ffc07f58: 80 7f 00 68 lwz r3,104(r31) <== NOT EXECUTED
ffc07f5c: 48 00 0b b9 bl ffc08b14 <free> <== NOT EXECUTED
free (fd->blocks);
ffc07f60: 80 7f 00 18 lwz r3,24(r31) <== NOT EXECUTED
ffc07f64: 48 00 0b b1 bl ffc08b14 <free> <== NOT EXECUTED
free (fd->devices);
ffc07f68: 80 7f 00 2c lwz r3,44(r31) <== NOT EXECUTED
ffc07f6c: 48 00 0b a9 bl ffc08b14 <free> <== NOT EXECUTED
ffc07f70: 48 00 01 54 b ffc080c4 <rtems_fdisk_initialize+0x43c><== 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,
ffc07f74: 1d 0a 00 0c mulli r8,r10,12
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];
ffc07f78: 81 33 00 04 lwz r9,4(r19)
for (seg_segment = 0; seg_segment < sd->count; seg_segment++, sc++)
ffc07f7c: 7c e9 42 2e lhzx r7,r9,r8
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];
ffc07f80: 7c a9 42 14 add r5,r9,r8
for (seg_segment = 0; seg_segment < sd->count; seg_segment++, sc++)
ffc07f84: 38 c0 00 00 li r6,0
ffc07f88: 2f 87 00 00 cmpwi cr7,r7,0
ffc07f8c: 7c 69 1b 78 mr r9,r3
{
sc->descriptor = sd;
sc->device = device;
sc->segment = seg_segment;
sc->erased = 0;
ffc07f90: 39 07 00 01 addi r8,r7,1
ffc07f94: 40 be 00 24 bne+ cr7,ffc07fb8 <rtems_fdisk_initialize+0x330><== ALWAYS TAKEN
ffc07f98: 39 00 00 01 li r8,1 <== NOT EXECUTED
ffc07f9c: 48 00 00 1c b ffc07fb8 <rtems_fdisk_initialize+0x330><== NOT EXECUTED
for (seg_segment = 0; seg_segment < sd->count; seg_segment++, sc++)
{
sc->descriptor = sd;
sc->device = device;
sc->segment = seg_segment;
ffc07fa0: 90 c9 00 0c stw r6,12(r9)
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++)
ffc07fa4: 38 c6 00 01 addi r6,r6,1
{
sc->descriptor = sd;
ffc07fa8: 90 a9 00 04 stw r5,4(r9)
sc->device = device;
ffc07fac: 93 69 00 08 stw r27,8(r9)
sc->segment = seg_segment;
sc->erased = 0;
ffc07fb0: 92 a9 00 2c stw r21,44(r9)
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++)
ffc07fb4: 39 29 00 30 addi r9,r9,48
ffc07fb8: 35 08 ff ff addic. r8,r8,-1
ffc07fbc: 40 82 ff e4 bne+ ffc07fa0 <rtems_fdisk_initialize+0x318>
* @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,
ffc07fc0: 1c e7 00 30 mulli r7,r7,48
return RTEMS_NO_MEMORY;
}
sc = fd->devices[device].segments;
for (segment = 0; segment < c->devices[device].segment_count; segment++)
ffc07fc4: 39 4a 00 01 addi r10,r10,1
ffc07fc8: 7c 63 3a 14 add r3,r3,r7
ffc07fcc: 48 00 00 08 b ffc07fd4 <rtems_fdisk_initialize+0x34c>
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)
ffc07fd0: 39 40 00 00 li r10,0
return RTEMS_NO_MEMORY;
}
sc = fd->devices[device].segments;
for (segment = 0; segment < c->devices[device].segment_count; segment++)
ffc07fd4: 7f 8a 88 00 cmpw cr7,r10,r17
ffc07fd8: 40 9e ff 9c bne+ cr7,ffc07f74 <rtems_fdisk_initialize+0x2ec>
sc->segment = seg_segment;
sc->erased = 0;
}
}
fd->devices[device].segment_count = segment_count;
ffc07fdc: 93 52 00 04 stw r26,4(r18)
free (fd->devices);
rtems_fdisk_error ("disk create phy failed");
return sc;
}
for (device = 0; device < c->device_count; device++)
ffc07fe0: 3b 7b 00 01 addi r27,r27,1
sc->erased = 0;
}
}
fd->devices[device].segment_count = segment_count;
fd->devices[device].descriptor = &c->devices[device];
ffc07fe4: 92 72 00 08 stw r19,8(r18)
ffc07fe8: 48 00 00 08 b ffc07ff0 <rtems_fdisk_initialize+0x368>
}
sc = rtems_disk_create_phys(dev, c->block_size,
blocks - fd->unavail_blocks,
rtems_fdisk_ioctl, NULL, name);
if (sc != RTEMS_SUCCESSFUL)
ffc07fec: 3b 60 00 00 li r27,0
free (fd->devices);
rtems_fdisk_error ("disk create phy failed");
return sc;
}
for (device = 0; device < c->device_count; device++)
ffc07ff0: 81 3e ff e4 lwz r9,-28(r30)
ffc07ff4: 7f 9b 48 40 cmplw cr7,r27,r9
ffc07ff8: 41 9c fe f0 blt+ cr7,ffc07ee8 <rtems_fdisk_initialize+0x260>
fd->devices[device].segment_count = segment_count;
fd->devices[device].descriptor = &c->devices[device];
}
fd->device_count = c->device_count;
ffc07ffc: 91 3f 00 30 stw r9,48(r31)
ret = rtems_fdisk_recover_block_mappings (fd);
ffc08000: 7f e3 fb 78 mr r3,r31
ffc08004: 4b ff e7 bd bl ffc067c0 <rtems_fdisk_recover_block_mappings>
if (ret)
ffc08008: 7c 7b 1b 79 mr. r27,r3
ffc0800c: 41 a2 00 58 beq+ ffc08064 <rtems_fdisk_initialize+0x3dc><== ALWAYS TAKEN
{
rtems_disk_delete (dev);
ffc08010: 7f a4 eb 78 mr r4,r29 <== NOT EXECUTED
ffc08014: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED
ffc08018: 4b ff cf b1 bl ffc04fc8 <rtems_disk_delete> <== NOT EXECUTED
rtems_semaphore_delete (fd->lock);
ffc0801c: 80 7f 00 64 lwz r3,100(r31) <== NOT EXECUTED
ffc08020: 48 00 58 09 bl ffc0d828 <rtems_semaphore_delete> <== NOT EXECUTED
free (fd->copy_buffer);
ffc08024: 80 7f 00 68 lwz r3,104(r31) <== NOT EXECUTED
ffc08028: 48 00 0a ed bl ffc08b14 <free> <== NOT EXECUTED
free (fd->blocks);
ffc0802c: 80 7f 00 18 lwz r3,24(r31) <== NOT EXECUTED
ffc08030: 48 00 0a e5 bl ffc08b14 <free> <== NOT EXECUTED
free (fd->devices);
ffc08034: 80 7f 00 2c lwz r3,44(r31) <== NOT EXECUTED
ffc08038: 48 00 0a dd bl ffc08b14 <free> <== NOT EXECUTED
rtems_fdisk_error ("recovery of disk failed: %s (%d)",
ffc0803c: 7f 63 db 78 mr r3,r27 <== NOT EXECUTED
ffc08040: 48 01 cb 39 bl ffc24b78 <strerror> <== NOT EXECUTED
ffc08044: 7c 64 1b 78 mr r4,r3 <== NOT EXECUTED
ffc08048: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc0804c: 38 63 41 cb addi r3,r3,16843 <== NOT EXECUTED
ffc08050: 7f 65 db 78 mr r5,r27 <== NOT EXECUTED
ffc08054: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc08058: 4b ff da 25 bl ffc05a7c <rtems_fdisk_error> <== NOT EXECUTED
strerror (ret), ret);
return ret;
ffc0805c: 7f 63 db 78 mr r3,r27 <== NOT EXECUTED
ffc08060: 48 00 00 c8 b ffc08128 <rtems_fdisk_initialize+0x4a0><== NOT EXECUTED
}
ret = rtems_fdisk_compact (fd);
ffc08064: 7f e3 fb 78 mr r3,r31
ffc08068: 4b ff e5 35 bl ffc0659c <rtems_fdisk_compact>
ffc0806c: 3b de 00 20 addi r30,r30,32
if (ret)
ffc08070: 7c 7b 1b 79 mr. r27,r3
ffc08074: 41 a2 00 48 beq+ ffc080bc <rtems_fdisk_initialize+0x434><== ALWAYS TAKEN
{
rtems_disk_delete (dev);
ffc08078: 7f a4 eb 78 mr r4,r29 <== NOT EXECUTED
ffc0807c: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED
ffc08080: 4b ff cf 49 bl ffc04fc8 <rtems_disk_delete> <== NOT EXECUTED
rtems_semaphore_delete (fd->lock);
ffc08084: 80 7f 00 64 lwz r3,100(r31) <== NOT EXECUTED
ffc08088: 48 00 57 a1 bl ffc0d828 <rtems_semaphore_delete> <== NOT EXECUTED
free (fd->copy_buffer);
ffc0808c: 80 7f 00 68 lwz r3,104(r31) <== NOT EXECUTED
ffc08090: 48 00 0a 85 bl ffc08b14 <free> <== NOT EXECUTED
free (fd->blocks);
ffc08094: 80 7f 00 18 lwz r3,24(r31) <== NOT EXECUTED
ffc08098: 48 00 0a 7d bl ffc08b14 <free> <== NOT EXECUTED
free (fd->devices);
ffc0809c: 80 7f 00 2c lwz r3,44(r31) <== NOT EXECUTED
ffc080a0: 48 00 0a 75 bl ffc08b14 <free> <== NOT EXECUTED
rtems_fdisk_error ("compacting of disk failed: %s (%d)",
ffc080a4: 7f 63 db 78 mr r3,r27 <== NOT EXECUTED
ffc080a8: 48 01 ca d1 bl ffc24b78 <strerror> <== NOT EXECUTED
ffc080ac: 7c 64 1b 78 mr r4,r3 <== NOT EXECUTED
ffc080b0: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc080b4: 38 63 41 ec addi r3,r3,16876 <== NOT EXECUTED
ffc080b8: 4b ff ff 98 b ffc08050 <rtems_fdisk_initialize+0x3c8><== NOT EXECUTED
sizeof (rtems_flashdisk));
if (!rtems_flashdisks)
return RTEMS_NO_MEMORY;
for (minor = 0; minor < rtems_flashdisk_configuration_size; minor++, c++)
ffc080bc: 3b bd 00 01 addi r29,r29,1
ffc080c0: 48 00 00 28 b ffc080e8 <rtems_fdisk_initialize+0x460>
/*
* One copy buffer of a page size.
*/
fd->copy_buffer = malloc (c->block_size);
if (!fd->copy_buffer)
return RTEMS_NO_MEMORY;
ffc080c4: 38 60 00 1a li r3,26 <== NOT EXECUTED
ffc080c8: 48 00 00 60 b ffc08128 <rtems_fdisk_initialize+0x4a0><== NOT EXECUTED
ffc080cc: 3f c0 ff c3 lis r30,-61
free (fd->blocks);
free (fd->devices);
return sc;
}
sc = rtems_disk_create_phys(dev, c->block_size,
ffc080d0: 3e 80 ff c0 lis r20,-64
ffc080d4: 3b de 29 64 addi r30,r30,10596
return sc;
rtems_flashdisks = calloc (rtems_flashdisk_configuration_size,
sizeof (rtems_flashdisk));
if (!rtems_flashdisks)
ffc080d8: 3b a0 00 00 li r29,0
return RTEMS_NO_MEMORY;
for (minor = 0; minor < rtems_flashdisk_configuration_size; minor++, c++)
{
char name[] = RTEMS_FLASHDISK_DEVICE_BASE_NAME "a";
ffc080dc: 3e e0 ff c3 lis r23,-61
dev_t dev = rtems_filesystem_make_dev_t (major, minor);
uint32_t device;
uint32_t blocks = 0;
ffc080e0: 3a a0 00 00 li r21,0
free (fd->blocks);
free (fd->devices);
return sc;
}
sc = rtems_disk_create_phys(dev, c->block_size,
ffc080e4: 3a 94 6b 14 addi r20,r20,27412
sizeof (rtems_flashdisk));
if (!rtems_flashdisks)
return RTEMS_NO_MEMORY;
for (minor = 0; minor < rtems_flashdisk_configuration_size; minor++, c++)
ffc080e8: 81 38 27 c8 lwz r9,10184(r24)
ffc080ec: 7f 9d 48 40 cmplw cr7,r29,r9
ffc080f0: 41 9c fc 1c blt+ cr7,ffc07d0c <rtems_fdisk_initialize+0x84>
strerror (ret), ret);
return ret;
}
}
rtems_flashdisk_count = rtems_flashdisk_configuration_size;
ffc080f4: 3d 40 00 01 lis r10,1
ffc080f8: 91 2a 29 78 stw r9,10616(r10)
return RTEMS_SUCCESSFUL;
ffc080fc: 38 60 00 00 li r3,0
ffc08100: 48 00 00 28 b ffc08128 <rtems_fdisk_initialize+0x4a0>
sc = rtems_fdisk_crc16_gen_factors (0x8408);
if (sc != RTEMS_SUCCESSFUL)
return sc;
rtems_flashdisks = calloc (rtems_flashdisk_configuration_size,
ffc08104: 3f 00 00 00 lis r24,0
ffc08108: 80 78 27 c8 lwz r3,10184(r24)
ffc0810c: 38 80 00 74 li r4,116
ffc08110: 3e c0 00 01 lis r22,1
ffc08114: 48 00 08 59 bl ffc0896c <calloc>
sizeof (rtems_flashdisk));
if (!rtems_flashdisks)
ffc08118: 2f 83 00 00 cmpwi cr7,r3,0
sc = rtems_fdisk_crc16_gen_factors (0x8408);
if (sc != RTEMS_SUCCESSFUL)
return sc;
rtems_flashdisks = calloc (rtems_flashdisk_configuration_size,
ffc0811c: 90 76 29 74 stw r3,10612(r22)
sizeof (rtems_flashdisk));
if (!rtems_flashdisks)
ffc08120: 40 9e ff ac bne+ cr7,ffc080cc <rtems_fdisk_initialize+0x444><== ALWAYS TAKEN
ffc08124: 4b ff ff a0 b ffc080c4 <rtems_fdisk_initialize+0x43c><== NOT EXECUTED
}
rtems_flashdisk_count = rtems_flashdisk_configuration_size;
return RTEMS_SUCCESSFUL;
}
ffc08128: 39 61 00 58 addi r11,r1,88
ffc0812c: 4b ff 94 04 b ffc01530 <_restgpr_16_x>
ffc06b14 <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)
{
ffc06b14: 94 21 ff 68 stwu r1,-152(r1)
ffc06b18: 7c 08 02 a6 mflr r0
ffc06b1c: 7d 80 00 26 mfcr r12
ffc06b20: 90 01 00 9c stw r0,156(r1)
ffc06b24: bd c1 00 50 stmw r14,80(r1)
ffc06b28: 7c 9d 23 78 mr r29,r4
ffc06b2c: 7c bf 2b 78 mr r31,r5
dev_t device
)
{
union __rtems_dev_t temp;
temp.device = device;
ffc06b30: 83 23 00 04 lwz r25,4(r3)
rtems_blkdev_request* r = argp;
rtems_status_code sc;
errno = 0;
sc = rtems_semaphore_obtain (rtems_flashdisks[minor].lock, RTEMS_WAIT, 0);
ffc06b34: 3f c0 00 01 lis r30,1
* @param argp IOCTL argument.
* @retval The IOCTL return value
*/
static int
rtems_fdisk_ioctl (rtems_disk_device *dd, uint32_t req, void* argp)
{
ffc06b38: 91 81 00 4c stw r12,76(r1)
ffc06b3c: 7c 7b 1b 78 mr r27,r3
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;
ffc06b40: 48 01 b4 a9 bl ffc21fe8 <__errno>
ffc06b44: 39 20 00 00 li r9,0
ffc06b48: 91 23 00 00 stw r9,0(r3)
sc = rtems_semaphore_obtain (rtems_flashdisks[minor].lock, RTEMS_WAIT, 0);
ffc06b4c: 1f 99 00 74 mulli r28,r25,116
ffc06b50: 81 3e 29 74 lwz r9,10612(r30)
ffc06b54: 38 80 00 00 li r4,0
ffc06b58: 38 a0 00 00 li r5,0
ffc06b5c: 7d 29 e2 14 add r9,r9,r28
ffc06b60: 80 69 00 64 lwz r3,100(r9)
ffc06b64: 3b 1e 29 74 addi r24,r30,10612
ffc06b68: 48 00 6d 7d bl ffc0d8e4 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
ffc06b6c: 7c 7a 1b 79 mr. r26,r3
ffc06b70: 41 82 00 08 beq- ffc06b78 <rtems_fdisk_ioctl+0x64> <== ALWAYS TAKEN
ffc06b74: 48 00 10 c0 b ffc07c34 <rtems_fdisk_ioctl+0x1120> <== NOT EXECUTED
errno = EIO;
else
{
errno = 0;
ffc06b78: 48 01 b4 71 bl ffc21fe8 <__errno>
switch (req)
ffc06b7c: 3d 20 20 00 lis r9,8192
ffc06b80: 61 29 42 83 ori r9,r9,17027
sc = rtems_semaphore_obtain (rtems_flashdisks[minor].lock, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
errno = EIO;
else
{
errno = 0;
ffc06b84: 93 43 00 00 stw r26,0(r3)
switch (req)
ffc06b88: 7f 9d 48 00 cmpw cr7,r29,r9
ffc06b8c: 41 9e 0a e0 beq- cr7,ffc0766c <rtems_fdisk_ioctl+0xb58> <== NEVER TAKEN
ffc06b90: 7f 9d 48 40 cmplw cr7,r29,r9
ffc06b94: 3d 20 20 00 lis r9,8192
ffc06b98: 41 9d 00 28 bgt- cr7,ffc06bc0 <rtems_fdisk_ioctl+0xac>
ffc06b9c: 61 29 42 81 ori r9,r9,17025
ffc06ba0: 7f 9d 48 00 cmpw cr7,r29,r9
ffc06ba4: 41 9e 0a 5c beq- cr7,ffc07600 <rtems_fdisk_ioctl+0xaec> <== NEVER TAKEN
ffc06ba8: 7f 9d 48 40 cmplw cr7,r29,r9
ffc06bac: 41 9d 0a 70 bgt- cr7,ffc0761c <rtems_fdisk_ioctl+0xb08> <== NEVER TAKEN
ffc06bb0: 6f a9 20 00 xoris r9,r29,8192
ffc06bb4: 2f 89 42 80 cmpwi cr7,r9,17024
ffc06bb8: 40 9e 10 50 bne- cr7,ffc07c08 <rtems_fdisk_ioctl+0x10f4><== ALWAYS TAKEN
ffc06bbc: 48 00 09 48 b ffc07504 <rtems_fdisk_ioctl+0x9f0> <== NOT EXECUTED
ffc06bc0: 61 29 42 85 ori r9,r9,17029
ffc06bc4: 7f 9d 48 00 cmpw cr7,r29,r9
ffc06bc8: 41 9e 0c 2c beq- cr7,ffc077f4 <rtems_fdisk_ioctl+0xce0>
ffc06bcc: 7f 9d 48 40 cmplw cr7,r29,r9
ffc06bd0: 41 9c 0c 14 blt- cr7,ffc077e4 <rtems_fdisk_ioctl+0xcd0> <== NEVER TAKEN
ffc06bd4: 6f a9 c0 18 xoris r9,r29,49176
ffc06bd8: 2f 89 42 01 cmpwi cr7,r9,16897
ffc06bdc: 40 9e 10 2c bne- cr7,ffc07c08 <rtems_fdisk_ioctl+0x10f4>
{
case RTEMS_BLKIO_REQUEST:
if ((minor >= rtems_flashdisk_count) ||
ffc06be0: 81 38 00 04 lwz r9,4(r24)
ffc06be4: 7f 99 48 40 cmplw cr7,r25,r9
ffc06be8: 40 9c 00 18 bge- cr7,ffc06c00 <rtems_fdisk_ioctl+0xec> <== NEVER TAKEN
(rtems_flashdisks[minor].device_count == 0))
ffc06bec: 81 3e 29 74 lwz r9,10612(r30)
ffc06bf0: 7d 29 e2 14 add r9,r9,r28
{
errno = 0;
switch (req)
{
case RTEMS_BLKIO_REQUEST:
if ((minor >= rtems_flashdisk_count) ||
ffc06bf4: 81 29 00 30 lwz r9,48(r9)
ffc06bf8: 2f 89 00 00 cmpwi cr7,r9,0
ffc06bfc: 40 9e 00 10 bne- cr7,ffc06c0c <rtems_fdisk_ioctl+0xf8> <== ALWAYS TAKEN
(rtems_flashdisks[minor].device_count == 0))
{
errno = ENODEV;
ffc06c00: 48 01 b3 e9 bl ffc21fe8 <__errno> <== NOT EXECUTED
ffc06c04: 39 20 00 13 li r9,19 <== NOT EXECUTED
ffc06c08: 48 00 08 f4 b ffc074fc <rtems_fdisk_ioctl+0x9e8> <== NOT EXECUTED
}
else
{
switch (r->req)
ffc06c0c: 81 3f 00 00 lwz r9,0(r31)
ffc06c10: 2f 89 00 00 cmpwi cr7,r9,0
ffc06c14: 41 9e 00 10 beq- cr7,ffc06c24 <rtems_fdisk_ioctl+0x110>
ffc06c18: 2f 89 00 01 cmpwi cr7,r9,1
ffc06c1c: 40 be 08 d8 bne+ cr7,ffc074f4 <rtems_fdisk_ioctl+0x9e0> <== NEVER TAKEN
ffc06c20: 48 00 02 d8 b ffc06ef8 <rtems_fdisk_ioctl+0x3e4>
{
case RTEMS_BLKDEV_REQ_READ:
errno = rtems_fdisk_read (&rtems_flashdisks[minor], r);
ffc06c24: 48 01 b3 c5 bl ffc21fe8 <__errno>
ffc06c28: 83 be 29 74 lwz r29,10612(r30)
block, sc->device, sc->segment, bc->page);
}
}
else
{
rtems_fdisk_error ("read-block: block page not active: %d: %d-%d-%d",
ffc06c2c: 3e 60 ff c3 lis r19,-61
else
{
switch (r->req)
{
case RTEMS_BLKDEV_REQ_READ:
errno = rtems_fdisk_read (&rtems_flashdisks[minor], r);
ffc06c30: 90 61 00 30 stw r3,48(r1)
rtems_fdisk_error ("read-block: crc failure: %d: buffer:%04x page:%04x",
block, cs, pd->crc);
}
else
{
rtems_fdisk_error ("read-block: block points to used page: %d: %d-%d-%d",
ffc06c34: 3e 40 ff c3 lis r18,-61
cs = rtems_fdisk_page_checksum (buffer, fd->block_size);
if (cs == pd->crc)
return 0;
rtems_fdisk_error ("read-block: crc failure: %d: buffer:%04x page:%04x",
ffc06c38: 3e 20 ff c3 lis r17,-61
else
{
switch (r->req)
{
case RTEMS_BLKDEV_REQ_READ:
errno = rtems_fdisk_read (&rtems_flashdisks[minor], r);
ffc06c3c: 7f bd e2 14 add r29,r29,r28
* @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;
ffc06c40: 3b 5f 00 18 addi r26,r31,24
uint32_t buf;
int ret = 0;
for (buf = 0; (ret == 0) && (buf < req->bufnum); buf++, sg++)
ffc06c44: 3a c0 00 00 li r22,0
block, sc->device, sc->segment, bc->page);
}
}
else
{
rtems_fdisk_error ("read-block: block page not active: %d: %d-%d-%d",
ffc06c48: 3a 73 3d 36 addi r19,r19,15670
rtems_fdisk_error ("read-block: crc failure: %d: buffer:%04x page:%04x",
block, cs, pd->crc);
}
else
{
rtems_fdisk_error ("read-block: block points to used page: %d: %d-%d-%d",
ffc06c4c: 3a 52 3d 02 addi r18,r18,15618
cs = rtems_fdisk_page_checksum (buffer, fd->block_size);
if (cs == pd->crc)
return 0;
rtems_fdisk_error ("read-block: crc failure: %d: buffer:%04x page:%04x",
ffc06c50: 3a 31 3c cf addi r17,r17,15567
ffc06c54: 48 00 02 6c b ffc06ec0 <rtems_fdisk_ioctl+0x3ac>
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;
ffc06c58: 82 1a 00 04 lwz r16,4(r26)
data = sg->buffer;
for (b = 0; b < fb; b++, data += fd->block_size)
ffc06c5c: 3b 00 00 00 li r24,0
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;
ffc06c60: 81 3d 00 14 lwz r9,20(r29)
sc = fd->blocks[block].segment;
pd = &sc->page_descriptors[bc->page];
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd,
ffc06c64: 3d e0 ff c3 lis r15,-61
{
uint8_t* data;
uint32_t fb;
uint32_t b;
fb = sg->length / fd->block_size;
data = sg->buffer;
ffc06c68: 83 3a 00 08 lwz r25,8(r26)
sc = fd->blocks[block].segment;
pd = &sc->page_descriptors[bc->page];
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd,
ffc06c6c: 3d c0 ff c3 lis r14,-61
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;
ffc06c70: 7e 10 4b 96 divwu r16,r16,r9
ffc06c74: 48 00 02 30 b ffc06ea4 <rtems_fdisk_ioctl+0x390>
data = sg->buffer;
for (b = 0; b < fb; b++, data += fd->block_size)
{
ret = rtems_fdisk_read_block (fd, sg->block + b, data);
ffc06c78: 83 7a 00 00 lwz r27,0(r26)
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);
ffc06c7c: 3c a0 ff c3 lis r5,-61
ffc06c80: 80 85 37 5c lwz r4,14172(r5)
ffc06c84: 7f a3 eb 78 mr r3,r29
uint32_t b;
fb = sg->length / fd->block_size;
data = sg->buffer;
for (b = 0; b < fb; b++, data += fd->block_size)
{
ret = rtems_fdisk_read_block (fd, sg->block + b, data);
ffc06c88: 7f 78 da 14 add r27,r24,r27
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);
ffc06c8c: 7f 65 db 78 mr r5,r27
ffc06c90: 4c c6 31 82 crclr 4*cr1+eq
ffc06c94: 4b ff eb 6d bl ffc05800 <rtems_fdisk_info>
/*
* Broken out to allow info messages when testing.
*/
if (block >= (fd->block_count - fd->unavail_blocks))
ffc06c98: 81 5d 00 1c lwz r10,28(r29)
ffc06c9c: 81 3d 00 20 lwz r9,32(r29)
ffc06ca0: 7d 29 50 50 subf r9,r9,r10
ffc06ca4: 7f 9b 48 40 cmplw cr7,r27,r9
ffc06ca8: 41 bc 00 1c blt+ cr7,ffc06cc4 <rtems_fdisk_ioctl+0x1b0> <== ALWAYS TAKEN
{
rtems_fdisk_error ("read-block: block out of range: %d", block);
ffc06cac: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc06cb0: 7f 64 db 78 mr r4,r27 <== NOT EXECUTED
ffc06cb4: 38 63 3c 0d addi r3,r3,15373 <== NOT EXECUTED
ffc06cb8: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc06cbc: 4b ff ed c1 bl ffc05a7c <rtems_fdisk_error> <== NOT EXECUTED
ffc06cc0: 48 00 0f b0 b ffc07c70 <rtems_fdisk_ioctl+0x115c> <== NOT EXECUTED
return EIO;
}
bc = &fd->blocks[block];
ffc06cc4: 81 3d 00 18 lwz r9,24(r29)
ffc06cc8: 57 6a 18 38 rlwinm r10,r27,3,0,28
if (!bc->segment)
ffc06ccc: 7f c9 50 2e lwzx r30,r9,r10
{
rtems_fdisk_error ("read-block: block out of range: %d", block);
return EIO;
}
bc = &fd->blocks[block];
ffc06cd0: 7e e9 52 14 add r23,r9,r10
if (!bc->segment)
ffc06cd4: 2f 9e 00 00 cmpwi cr7,r30,0
ffc06cd8: 40 be 00 30 bne+ cr7,ffc06d08 <rtems_fdisk_ioctl+0x1f4>
{
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd, "read-block: no segment mapping: %d", block);
ffc06cdc: 3c c0 ff c3 lis r6,-61
ffc06ce0: 80 86 37 60 lwz r4,14176(r6)
ffc06ce4: 7f 65 db 78 mr r5,r27
ffc06ce8: 7f a3 eb 78 mr r3,r29
ffc06cec: 4c c6 31 82 crclr 4*cr1+eq
ffc06cf0: 4b ff eb 11 bl ffc05800 <rtems_fdisk_info>
#endif
memset (buffer, 0xff, fd->block_size);
ffc06cf4: 80 bd 00 14 lwz r5,20(r29)
ffc06cf8: 7f 23 cb 78 mr r3,r25
ffc06cfc: 38 80 00 ff li r4,255
ffc06d00: 48 01 ca 31 bl ffc23730 <memset>
ffc06d04: 48 00 0f 5c b ffc07c60 <rtems_fdisk_ioctl+0x114c>
sc = fd->blocks[block].segment;
pd = &sc->page_descriptors[bc->page];
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd,
ffc06d08: 80 be 00 00 lwz r5,0(r30)
memset (buffer, 0xff, fd->block_size);
return 0;
}
sc = fd->blocks[block].segment;
pd = &sc->page_descriptors[bc->page];
ffc06d0c: 81 17 00 04 lwz r8,4(r23)
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd,
ffc06d10: 2f 85 00 00 cmpwi cr7,r5,0
memset (buffer, 0xff, fd->block_size);
return 0;
}
sc = fd->blocks[block].segment;
pd = &sc->page_descriptors[bc->page];
ffc06d14: 82 9e 00 10 lwz r20,16(r30)
ffc06d18: 55 15 18 38 rlwinm r21,r8,3,0,28
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd,
ffc06d1c: 80 de 00 08 lwz r6,8(r30)
memset (buffer, 0xff, fd->block_size);
return 0;
}
sc = fd->blocks[block].segment;
pd = &sc->page_descriptors[bc->page];
ffc06d20: 7d 94 aa 14 add r12,r20,r21
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd,
ffc06d24: 80 fe 00 0c lwz r7,12(r30)
ffc06d28: 81 3e 00 14 lwz r9,20(r30)
ffc06d2c: 81 5e 00 1c lwz r10,28(r30)
ffc06d30: 80 7e 00 20 lwz r3,32(r30)
ffc06d34: 80 9e 00 24 lwz r4,36(r30)
ffc06d38: 41 9e 00 0c beq- cr7,ffc06d44 <rtems_fdisk_ioctl+0x230>
ffc06d3c: 38 ae 54 92 addi r5,r14,21650
ffc06d40: 48 00 00 08 b ffc06d48 <rtems_fdisk_ioctl+0x234>
ffc06d44: 38 af 38 75 addi r5,r15,14453
ffc06d48: 90 61 00 08 stw r3,8(r1)
ffc06d4c: 7f a3 eb 78 mr r3,r29
ffc06d50: 90 81 00 0c stw r4,12(r1)
ffc06d54: 90 a1 00 10 stw r5,16(r1)
ffc06d58: a0 ac 00 02 lhz r5,2(r12)
ffc06d5c: 90 a1 00 14 stw r5,20(r1)
ffc06d60: 7c b4 aa 2e lhzx r5,r20,r21
ffc06d64: 90 a1 00 18 stw r5,24(r1)
ffc06d68: 80 ac 00 04 lwz r5,4(r12)
ffc06d6c: 91 81 00 3c stw r12,60(r1)
ffc06d70: 90 a1 00 1c stw r5,28(r1)
ffc06d74: 3c a0 ff c3 lis r5,-61
ffc06d78: 80 85 37 64 lwz r4,14180(r5)
ffc06d7c: 7f 65 db 78 mr r5,r27
ffc06d80: 4c c6 31 82 crclr 4*cr1+eq
ffc06d84: 4b ff ea 7d bl ffc05800 <rtems_fdisk_info>
}
rtems_flashdisk_count = rtems_flashdisk_configuration_size;
return RTEMS_SUCCESSFUL;
}
ffc06d88: 81 81 00 3c lwz r12,60(r1)
ffc06d8c: a1 2c 00 02 lhz r9,2(r12)
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))
ffc06d90: 71 26 00 01 andi. r6,r9,1
ffc06d94: 40 82 00 f0 bne- ffc06e84 <rtems_fdisk_ioctl+0x370> <== NEVER TAKEN
{
if (rtems_fdisk_page_desc_flags_clear (pd, RTEMS_FDISK_PAGE_USED))
ffc06d98: 71 28 00 02 andi. r8,r9,2
ffc06d9c: 80 f7 00 04 lwz r7,4(r23)
ffc06da0: 41 a2 00 d0 beq+ ffc06e70 <rtems_fdisk_ioctl+0x35c> <== NEVER TAKEN
/*
* 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,
ffc06da4: 81 5e 00 18 lwz r10,24(r30)
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,
ffc06da8: 7f a3 eb 78 mr r3,r29
page * fd->block_size, buffer, fd->block_size);
ffc06dac: 81 3d 00 14 lwz r9,20(r29)
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,
ffc06db0: 7f c4 f3 78 mr r4,r30
/*
* 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,
ffc06db4: 7c aa 3a 14 add r5,r10,r7
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,
ffc06db8: 7c a5 49 d6 mullw r5,r5,r9
ffc06dbc: 7d 27 4b 78 mr r7,r9
ffc06dc0: 7f 26 cb 78 mr r6,r25
ffc06dc4: 4b ff ed a5 bl ffc05b68 <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)
ffc06dc8: 7c 69 1b 79 mr. r9,r3
ffc06dcc: 41 a2 00 44 beq+ ffc06e10 <rtems_fdisk_ioctl+0x2fc> <== ALWAYS TAKEN
{
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd,
ffc06dd0: 83 3e 00 08 lwz r25,8(r30) <== NOT EXECUTED
ffc06dd4: 83 7e 00 0c lwz r27,12(r30) <== NOT EXECUTED
ffc06dd8: 83 d7 00 04 lwz r30,4(r23) <== NOT EXECUTED
ffc06ddc: 91 21 00 44 stw r9,68(r1) <== NOT EXECUTED
ffc06de0: 48 01 dd 99 bl ffc24b78 <strerror> <== NOT EXECUTED
ffc06de4: 3c 80 ff c3 lis r4,-61 <== NOT EXECUTED
ffc06de8: 81 21 00 44 lwz r9,68(r1) <== NOT EXECUTED
ffc06dec: 7c 68 1b 78 mr r8,r3 <== NOT EXECUTED
ffc06df0: 38 84 3c 9a addi r4,r4,15514 <== NOT EXECUTED
ffc06df4: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED
ffc06df8: 7f 25 cb 78 mr r5,r25 <== NOT EXECUTED
ffc06dfc: 7f 66 db 78 mr r6,r27 <== NOT EXECUTED
ffc06e00: 7f c7 f3 78 mr r7,r30 <== NOT EXECUTED
ffc06e04: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc06e08: 4b ff e9 f9 bl ffc05800 <rtems_fdisk_info> <== NOT EXECUTED
ffc06e0c: 48 00 0e 64 b ffc07c70 <rtems_fdisk_ioctl+0x115c> <== NOT EXECUTED
strerror (ret), ret);
#endif
return ret;
}
cs = rtems_fdisk_page_checksum (buffer, fd->block_size);
ffc06e10: 81 5d 00 14 lwz r10,20(r29)
{
uint16_t cs = 0xffff;
uint32_t i;
for (i = 0; i < page_size; i++, buffer++)
cs = rtems_fdisk_calc_crc16 (cs, *buffer);
ffc06e14: 3c a0 00 01 lis r5,1
ffc06e18: 39 25 29 74 addi r9,r5,10612
* 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;
ffc06e1c: 39 4a 00 01 addi r10,r10,1
uint32_t i;
for (i = 0; i < page_size; i++, buffer++)
cs = rtems_fdisk_calc_crc16 (cs, *buffer);
ffc06e20: 81 09 00 08 lwz r8,8(r9)
* 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;
ffc06e24: 38 a0 00 00 li r5,0
ffc06e28: 7d 49 03 a6 mtctr r10
uint32_t i;
for (i = 0; i < page_size; i++, buffer++)
ffc06e2c: 39 20 00 00 li r9,0
* 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;
ffc06e30: 60 a5 ff ff ori r5,r5,65535
ffc06e34: 48 00 00 18 b ffc06e4c <rtems_fdisk_ioctl+0x338>
uint32_t i;
for (i = 0; i < page_size; i++, buffer++)
cs = rtems_fdisk_calc_crc16 (cs, *buffer);
ffc06e38: 7d 59 48 ae lbzx r10,r25,r9
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++)
ffc06e3c: 39 29 00 01 addi r9,r9,1
cs = rtems_fdisk_calc_crc16 (cs, *buffer);
ffc06e40: 7d 45 2a 78 xor r5,r10,r5
ffc06e44: 54 a5 0d fc rlwinm r5,r5,1,23,30
ffc06e48: 7c a8 2a 2e lhzx r5,r8,r5
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++)
ffc06e4c: 42 00 ff ec bdnz+ ffc06e38 <rtems_fdisk_ioctl+0x324>
return ret;
}
cs = rtems_fdisk_page_checksum (buffer, fd->block_size);
if (cs == pd->crc)
ffc06e50: 7c d4 aa 2e lhzx r6,r20,r21
ffc06e54: 7f 85 30 00 cmpw cr7,r5,r6
ffc06e58: 41 9e 0e 08 beq- cr7,ffc07c60 <rtems_fdisk_ioctl+0x114c><== ALWAYS TAKEN
return 0;
rtems_fdisk_error ("read-block: crc failure: %d: buffer:%04x page:%04x",
ffc06e5c: 7e 23 8b 78 mr r3,r17 <== NOT EXECUTED
ffc06e60: 7f 64 db 78 mr r4,r27 <== NOT EXECUTED
ffc06e64: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc06e68: 4b ff ec 15 bl ffc05a7c <rtems_fdisk_error> <== NOT EXECUTED
ffc06e6c: 48 00 0e 04 b ffc07c70 <rtems_fdisk_ioctl+0x115c> <== NOT EXECUTED
block, cs, pd->crc);
}
else
{
rtems_fdisk_error ("read-block: block points to used page: %d: %d-%d-%d",
ffc06e70: 7e 43 93 78 mr r3,r18 <== NOT EXECUTED
ffc06e74: 80 be 00 08 lwz r5,8(r30) <== NOT EXECUTED
ffc06e78: 7f 64 db 78 mr r4,r27 <== NOT EXECUTED
ffc06e7c: 80 de 00 0c lwz r6,12(r30) <== NOT EXECUTED
ffc06e80: 48 00 00 18 b ffc06e98 <rtems_fdisk_ioctl+0x384> <== NOT EXECUTED
block, sc->device, sc->segment, bc->page);
}
}
else
{
rtems_fdisk_error ("read-block: block page not active: %d: %d-%d-%d",
ffc06e84: 80 be 00 08 lwz r5,8(r30) <== NOT EXECUTED
ffc06e88: 7e 63 9b 78 mr r3,r19 <== NOT EXECUTED
ffc06e8c: 80 de 00 0c lwz r6,12(r30) <== NOT EXECUTED
ffc06e90: 7f 64 db 78 mr r4,r27 <== NOT EXECUTED
ffc06e94: 80 f7 00 04 lwz r7,4(r23) <== NOT EXECUTED
ffc06e98: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc06e9c: 4b ff eb e1 bl ffc05a7c <rtems_fdisk_error> <== NOT EXECUTED
ffc06ea0: 48 00 0d d0 b ffc07c70 <rtems_fdisk_ioctl+0x115c> <== 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)
ffc06ea4: 7f 98 80 00 cmpw cr7,r24,r16
ffc06ea8: 40 9e fd d0 bne+ cr7,ffc06c78 <rtems_fdisk_ioctl+0x164>
ffc06eac: 39 20 00 00 li r9,0
{
rtems_blkdev_sg_buffer* sg = req->bufs;
uint32_t buf;
int ret = 0;
for (buf = 0; (ret == 0) && (buf < req->bufnum); buf++, sg++)
ffc06eb0: 2f 89 00 00 cmpwi cr7,r9,0
ffc06eb4: 3a d6 00 01 addi r22,r22,1
ffc06eb8: 3b 5a 00 10 addi r26,r26,16
ffc06ebc: 40 9e 00 18 bne- cr7,ffc06ed4 <rtems_fdisk_ioctl+0x3c0> <== NEVER TAKEN
ffc06ec0: 81 3f 00 10 lwz r9,16(r31)
ffc06ec4: 7f 96 48 40 cmplw cr7,r22,r9
ffc06ec8: 41 9c fd 90 blt+ cr7,ffc06c58 <rtems_fdisk_ioctl+0x144>
if (ret)
break;
}
}
rtems_blkdev_request_done (req, ret ? RTEMS_IO_ERROR : RTEMS_SUCCESSFUL);
ffc06ecc: 38 80 00 00 li r4,0
ffc06ed0: 48 00 00 08 b ffc06ed8 <rtems_fdisk_ioctl+0x3c4>
ffc06ed4: 38 80 00 1b li r4,27 <== NOT EXECUTED
static inline void rtems_blkdev_request_done(
rtems_blkdev_request *req,
rtems_status_code status
)
{
(*req->done)(req, status);
ffc06ed8: 81 3f 00 04 lwz r9,4(r31)
ffc06edc: 7f e3 fb 78 mr r3,r31
ffc06ee0: 7d 29 03 a6 mtctr r9
ffc06ee4: 4e 80 04 21 bctrl
else
{
switch (r->req)
{
case RTEMS_BLKDEV_REQ_READ:
errno = rtems_fdisk_read (&rtems_flashdisks[minor], r);
ffc06ee8: 80 a1 00 30 lwz r5,48(r1)
ffc06eec: 39 20 00 00 li r9,0
ffc06ef0: 91 25 00 00 stw r9,0(r5)
break;
ffc06ef4: 48 00 0d 24 b ffc07c18 <rtems_fdisk_ioctl+0x1104>
case RTEMS_BLKDEV_REQ_WRITE:
errno = rtems_fdisk_write (&rtems_flashdisks[minor], r);
ffc06ef8: 48 01 b0 f1 bl ffc21fe8 <__errno>
ffc06efc: 3d 20 00 01 lis r9,1
ffc06f00: 83 c9 29 74 lwz r30,10612(r9)
{
sc = bc->segment;
pd = &sc->page_descriptors[bc->page];
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd, " write:%02d-%03d-%03d: flag used",
ffc06f04: 3d e0 ff c3 lis r15,-61
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);
ffc06f08: 7c 70 1b 78 mr r16,r3
ffc06f0c: 7f de e2 14 add r30,r30,r28
* @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;
ffc06f10: 3b 3f 00 18 addi r25,r31,24
uint32_t buf;
int ret = 0;
for (buf = 0; (ret == 0) && (buf < req->bufnum); buf++, sg++)
ffc06f14: 3a c0 00 00 li r22,0
{
sc = bc->segment;
pd = &sc->page_descriptors[bc->page];
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd, " write:%02d-%03d-%03d: flag used",
ffc06f18: 39 ef 3d 99 addi r15,r15,15769
ffc06f1c: 48 00 05 a4 b ffc074c0 <rtems_fdisk_ioctl+0x9ac>
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;
ffc06f20: 81 d9 00 04 lwz r14,4(r25)
data = sg->buffer;
for (b = 0; b < fb; b++, data += fd->block_size)
ffc06f24: 3a e0 00 00 li r23,0
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;
ffc06f28: 81 3e 00 14 lwz r9,20(r30)
data = sg->buffer;
ffc06f2c: 83 19 00 08 lwz r24,8(r25)
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;
ffc06f30: 7d ce 4b 96 divwu r14,r14,r9
ffc06f34: 48 00 05 70 b ffc074a4 <rtems_fdisk_ioctl+0x990>
data = sg->buffer;
for (b = 0; b < fb; b++, data += fd->block_size)
{
ret = rtems_fdisk_write_block (fd, sg->block + b, data);
ffc06f38: 83 79 00 00 lwz r27,0(r25)
rtems_fdisk_page_desc* pd;
uint32_t page;
int ret;
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd, "write-block:%d", block);
ffc06f3c: 3c c0 ff c3 lis r6,-61
ffc06f40: 80 86 37 68 lwz r4,14184(r6)
ffc06f44: 7f c3 f3 78 mr r3,r30
uint32_t b;
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);
ffc06f48: 7f 77 da 14 add r27,r23,r27
rtems_fdisk_page_desc* pd;
uint32_t page;
int ret;
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd, "write-block:%d", block);
ffc06f4c: 7f 65 db 78 mr r5,r27
ffc06f50: 4c c6 31 82 crclr 4*cr1+eq
ffc06f54: 4b ff e8 ad bl ffc05800 <rtems_fdisk_info>
/*
* Broken out to allow info messages when testing.
*/
if (block >= (fd->block_count - fd->unavail_blocks))
ffc06f58: 81 5e 00 1c lwz r10,28(r30)
ffc06f5c: 81 3e 00 20 lwz r9,32(r30)
ffc06f60: 7d 29 50 50 subf r9,r9,r10
ffc06f64: 7f 9b 48 40 cmplw cr7,r27,r9
ffc06f68: 41 9c 00 1c blt- cr7,ffc06f84 <rtems_fdisk_ioctl+0x470> <== ALWAYS TAKEN
{
rtems_fdisk_error ("write-block: block out of range: %d", block);
ffc06f6c: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc06f70: 7f 64 db 78 mr r4,r27 <== NOT EXECUTED
ffc06f74: 38 63 3d 75 addi r3,r3,15733 <== NOT EXECUTED
ffc06f78: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc06f7c: 4b ff eb 01 bl ffc05a7c <rtems_fdisk_error> <== NOT EXECUTED
ffc06f80: 48 00 05 08 b ffc07488 <rtems_fdisk_ioctl+0x974> <== NOT EXECUTED
return EIO;
}
bc = &fd->blocks[block];
ffc06f84: 82 9e 00 18 lwz r20,24(r30)
ffc06f88: 57 75 18 38 rlwinm r21,r27,3,0,28
/*
* Does the page exist in flash ?
*/
if (bc->segment)
ffc06f8c: 7f b4 a8 2e lwzx r29,r20,r21
{
rtems_fdisk_error ("write-block: block out of range: %d", block);
return EIO;
}
bc = &fd->blocks[block];
ffc06f90: 7f 54 aa 14 add r26,r20,r21
/*
* Does the page exist in flash ?
*/
if (bc->segment)
ffc06f94: 2f 9d 00 00 cmpwi cr7,r29,0
ffc06f98: 41 9e 02 30 beq- cr7,ffc071c8 <rtems_fdisk_ioctl+0x6b4>
{
sc = bc->segment;
pd = &sc->page_descriptors[bc->page];
ffc06f9c: 81 3a 00 04 lwz r9,4(r26)
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd, " write:%02d-%03d-%03d: flag used",
ffc06fa0: 7d e4 7b 78 mr r4,r15
* Does the page exist in flash ?
*/
if (bc->segment)
{
sc = bc->segment;
pd = &sc->page_descriptors[bc->page];
ffc06fa4: 80 1d 00 10 lwz r0,16(r29)
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd, " write:%02d-%03d-%03d: flag used",
ffc06fa8: 7f c3 f3 78 mr r3,r30
ffc06fac: 80 bd 00 08 lwz r5,8(r29)
ffc06fb0: 7d 27 4b 78 mr r7,r9
ffc06fb4: 80 dd 00 0c lwz r6,12(r29)
ffc06fb8: 90 01 00 40 stw r0,64(r1)
ffc06fbc: 91 21 00 44 stw r9,68(r1)
ffc06fc0: 4c c6 31 82 crclr 4*cr1+eq
ffc06fc4: 4b ff e8 3d bl ffc05800 <rtems_fdisk_info>
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;
#if RTEMS_FDISK_TRACE
rtems_fdisk_printf (fd, " seg-verify: %02d-%03d: o=%08x s=%d",
ffc06fc8: 3c 80 ff c3 lis r4,-61
#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,
ffc06fcc: 82 3d 00 08 lwz r17,8(r29)
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;
#if RTEMS_FDISK_TRACE
rtems_fdisk_printf (fd, " seg-verify: %02d-%03d: o=%08x s=%d",
ffc06fd0: 38 84 3d ba addi r4,r4,15802
#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,
ffc06fd4: 81 1d 00 18 lwz r8,24(r29)
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;
#if RTEMS_FDISK_TRACE
rtems_fdisk_printf (fd, " seg-verify: %02d-%03d: o=%08x s=%d",
ffc06fd8: 7f c3 f3 78 mr r3,r30
#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,
ffc06fdc: 81 5a 00 04 lwz r10,4(r26)
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;
ffc06fe0: 1c f1 00 0c mulli r7,r17,12
#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,
ffc06fe4: 82 5d 00 0c lwz r18,12(r29)
ffc06fe8: 7d 48 52 14 add r10,r8,r10
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;
ffc06fec: 81 1e 00 2c lwz r8,44(r30)
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);
ffc06ff0: 82 7e 00 14 lwz r19,20(r30)
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;
#if RTEMS_FDISK_TRACE
rtems_fdisk_printf (fd, " seg-verify: %02d-%03d: o=%08x s=%d",
ffc06ff4: 7e 25 8b 78 mr r5,r17
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;
ffc06ff8: 7c c8 3a 14 add r6,r8,r7
ffc06ffc: 7c e8 38 2e lwzx r7,r8,r7
ffc07000: 1d 12 00 30 mulli r8,r18,48
ffc07004: 7d 07 42 14 add r8,r7,r8
ffc07008: 81 88 00 04 lwz r12,4(r8)
uint32_t device,
uint32_t segment,
uint32_t page,
const void* buffer)
{
return rtems_fdisk_seg_verify (fd, device, segment,
ffc0700c: 7d 4a 99 d6 mullw r10,r10,r19
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;
ffc07010: 81 06 00 08 lwz r8,8(r6)
#if RTEMS_FDISK_TRACE
rtems_fdisk_printf (fd, " seg-verify: %02d-%03d: o=%08x s=%d",
ffc07014: 7e 46 93 78 mr r6,r18
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;
ffc07018: 81 68 00 08 lwz r11,8(r8)
#if RTEMS_FDISK_TRACE
rtems_fdisk_printf (fd, " seg-verify: %02d-%03d: o=%08x s=%d",
ffc0701c: 7d 47 53 78 mr r7,r10
ffc07020: 7e 68 9b 78 mr r8,r19
ffc07024: 91 41 00 34 stw r10,52(r1)
ffc07028: 91 61 00 38 stw r11,56(r1)
ffc0702c: 91 81 00 3c stw r12,60(r1)
ffc07030: 4c c6 31 82 crclr 4*cr1+eq
ffc07034: 4b ff e8 a1 bl ffc058d4 <rtems_fdisk_printf>
device, segment, offset, size);
#endif
return ops->verify (sd, device, segment, offset, buffer, size);
ffc07038: 7e 24 8b 78 mr r4,r17
ffc0703c: 81 61 00 38 lwz r11,56(r1)
ffc07040: 7e 45 93 78 mr r5,r18
ffc07044: 81 81 00 3c lwz r12,60(r1)
ffc07048: 7f 07 c3 78 mr r7,r24
ffc0704c: 81 6b 00 0c lwz r11,12(r11)
ffc07050: 7e 68 9b 78 mr r8,r19
ffc07054: 81 41 00 34 lwz r10,52(r1)
ffc07058: 7d 83 63 78 mr r3,r12
ffc0705c: 7d 69 03 a6 mtctr r11
ffc07060: 7d 46 53 78 mr r6,r10
ffc07064: 4e 80 04 21 bctrl
#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,
ffc07068: 80 01 00 40 lwz r0,64(r1)
ffc0706c: 2f 83 00 00 cmpwi cr7,r3,0
ffc07070: 81 21 00 44 lwz r9,68(r1)
ffc07074: 40 be 00 2c bne+ cr7,ffc070a0 <rtems_fdisk_ioctl+0x58c>
bc->page + sc->pages_desc, buffer) == 0)
{
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd, "write-block:%d=>%02d-%03d-%03d: page verified",
ffc07078: 3c 80 ff c3 lis r4,-61
ffc0707c: 80 dd 00 08 lwz r6,8(r29)
ffc07080: 80 fd 00 0c lwz r7,12(r29)
ffc07084: 7f c3 f3 78 mr r3,r30
ffc07088: 81 1a 00 04 lwz r8,4(r26)
ffc0708c: 38 84 3d df addi r4,r4,15839
ffc07090: 7f 65 db 78 mr r5,r27
ffc07094: 4c c6 31 82 crclr 4*cr1+eq
ffc07098: 4b ff e7 69 bl ffc05800 <rtems_fdisk_info>
ffc0709c: 48 00 03 fc b ffc07498 <rtems_fdisk_ioctl+0x984>
* Does the page exist in flash ?
*/
if (bc->segment)
{
sc = bc->segment;
pd = &sc->page_descriptors[bc->page];
ffc070a0: 55 29 18 38 rlwinm r9,r9,3,0,28
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));
if ((fd->flags & RTEMS_FDISK_BLANK_CHECK_BEFORE_WRITE))
ffc070a4: 81 5e 00 08 lwz r10,8(r30)
* Does the page exist in flash ?
*/
if (bc->segment)
{
sc = bc->segment;
pd = &sc->page_descriptors[bc->page];
ffc070a8: 7e 40 4a 14 add r18,r0,r9
* 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;
ffc070ac: a1 32 00 02 lhz r9,2(r18)
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));
if ((fd->flags & RTEMS_FDISK_BLANK_CHECK_BEFORE_WRITE))
ffc070b0: 71 45 00 08 andi. r5,r10,8
* 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;
ffc070b4: 55 29 07 fa rlwinm r9,r9,0,31,29
ffc070b8: b1 32 00 02 sth r9,2(r18)
* 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);
ffc070bc: 81 3a 00 04 lwz r9,4(r26)
rtems_fdisk_seg_write_page_desc_flags (const rtems_flashdisk* fd,
rtems_fdisk_segment_ctl* sc,
uint32_t page,
const rtems_fdisk_page_desc* page_desc)
{
uint32_t offset = ((page * sizeof (rtems_fdisk_page_desc)) +
ffc070c0: 55 31 18 38 rlwinm r17,r9,3,0,28
((uint8_t*) &page_desc->flags) - ((uint8_t*) page_desc));
ffc070c4: 3a 31 00 02 addi r17,r17,2
if ((fd->flags & RTEMS_FDISK_BLANK_CHECK_BEFORE_WRITE))
ffc070c8: 41 82 00 60 beq- ffc07128 <rtems_fdisk_ioctl+0x614> <== NEVER TAKEN
{
uint16_t flash_flags;
int ret;
ret = rtems_fdisk_seg_read (fd, sc, offset,
ffc070cc: 7f c3 f3 78 mr r3,r30
ffc070d0: 91 21 00 44 stw r9,68(r1)
ffc070d4: 7f a4 eb 78 mr r4,r29
ffc070d8: 7e 25 8b 78 mr r5,r17
ffc070dc: 38 c1 00 26 addi r6,r1,38
ffc070e0: 38 e0 00 02 li r7,2
ffc070e4: 4b ff ea 85 bl ffc05b68 <rtems_fdisk_seg_read>
&flash_flags, sizeof (flash_flags));
if (ret)
ffc070e8: 81 21 00 44 lwz r9,68(r1)
ffc070ec: 7c 73 1b 79 mr. r19,r3
ffc070f0: 40 82 00 54 bne- ffc07144 <rtems_fdisk_ioctl+0x630> <== NEVER TAKEN
return ret;
if ((flash_flags & page_desc->flags) != page_desc->flags)
ffc070f4: a1 12 00 02 lhz r8,2(r18)
ffc070f8: a0 e1 00 26 lhz r7,38(r1)
ffc070fc: 7d 0a 38 38 and r10,r8,r7
ffc07100: 7f 8a 40 00 cmpw cr7,r10,r8
ffc07104: 41 9e 00 24 beq- cr7,ffc07128 <rtems_fdisk_ioctl+0x614> <== ALWAYS TAKEN
{
rtems_fdisk_error (" seg-write-page-flags: %02d-%03d-%03d: "
ffc07108: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc0710c: 80 9d 00 08 lwz r4,8(r29) <== NOT EXECUTED
ffc07110: 80 bd 00 0c lwz r5,12(r29) <== NOT EXECUTED
ffc07114: 7d 26 4b 78 mr r6,r9 <== NOT EXECUTED
ffc07118: 38 63 3e 0d addi r3,r3,15885 <== NOT EXECUTED
ffc0711c: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc07120: 4b ff e9 5d bl ffc05a7c <rtems_fdisk_error> <== NOT EXECUTED
ffc07124: 48 00 00 6c b ffc07190 <rtems_fdisk_ioctl+0x67c> <== NOT EXECUTED
sc->device, sc->segment, page,
flash_flags, page_desc->flags);
return ret;
}
}
return rtems_fdisk_seg_write (fd, sc, offset,
ffc07128: 7f c3 f3 78 mr r3,r30
ffc0712c: 7f a4 eb 78 mr r4,r29
ffc07130: 7e 25 8b 78 mr r5,r17
ffc07134: 38 d2 00 02 addi r6,r18,2
ffc07138: 38 e0 00 02 li r7,2
ffc0713c: 4b ff eb b1 bl ffc05cec <rtems_fdisk_seg_write>
ffc07140: 7c 73 1b 78 mr r19,r3
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)
ffc07144: 2f 93 00 00 cmpwi cr7,r19,0
ffc07148: 41 be 00 48 beq+ cr7,ffc07190 <rtems_fdisk_ioctl+0x67c> <== ALWAYS TAKEN
{
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd, " write:%02d-%03d-%03d: " \
ffc0714c: 80 bd 00 08 lwz r5,8(r29) <== NOT EXECUTED
ffc07150: 7e 63 9b 78 mr r3,r19 <== NOT EXECUTED
ffc07154: 82 3d 00 0c lwz r17,12(r29) <== NOT EXECUTED
ffc07158: 82 5a 00 04 lwz r18,4(r26) <== NOT EXECUTED
ffc0715c: 90 a1 00 34 stw r5,52(r1) <== NOT EXECUTED
ffc07160: 48 01 da 19 bl ffc24b78 <strerror> <== NOT EXECUTED
ffc07164: 3c 80 ff c3 lis r4,-61 <== NOT EXECUTED
ffc07168: 80 a1 00 34 lwz r5,52(r1) <== NOT EXECUTED
ffc0716c: 7c 68 1b 78 mr r8,r3 <== NOT EXECUTED
ffc07170: 38 84 3e 57 addi r4,r4,15959 <== NOT EXECUTED
ffc07174: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc07178: 7e 26 8b 78 mr r6,r17 <== NOT EXECUTED
ffc0717c: 7e 47 93 78 mr r7,r18 <== NOT EXECUTED
ffc07180: 7e 69 9b 78 mr r9,r19 <== NOT EXECUTED
ffc07184: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc07188: 4b ff e6 79 bl ffc05800 <rtems_fdisk_info> <== NOT EXECUTED
ffc0718c: 48 00 00 1c b ffc071a8 <rtems_fdisk_ioctl+0x694> <== NOT EXECUTED
strerror (ret), ret);
#endif
}
else
{
sc->pages_active--;
ffc07190: 81 3d 00 1c lwz r9,28(r29)
ffc07194: 39 29 ff ff addi r9,r9,-1
ffc07198: 91 3d 00 1c stw r9,28(r29)
sc->pages_used++;
ffc0719c: 81 3d 00 20 lwz r9,32(r29)
ffc071a0: 39 29 00 01 addi r9,r9,1
ffc071a4: 91 3d 00 20 stw r9,32(r29)
/*
* 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);
ffc071a8: 7f c3 f3 78 mr r3,r30
ffc071ac: 7f a4 eb 78 mr r4,r29
ffc071b0: 4b ff ee 9d bl ffc0604c <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)
ffc071b4: 81 3e 00 08 lwz r9,8(r30)
ffc071b8: 71 26 00 02 andi. r6,r9,2
ffc071bc: 40 a2 00 0c bne+ ffc071c8 <rtems_fdisk_ioctl+0x6b4> <== NEVER TAKEN
rtems_fdisk_compact (fd);
ffc071c0: 7f c3 f3 78 mr r3,r30
ffc071c4: 4b ff f3 d9 bl ffc0659c <rtems_fdisk_compact>
/*
* Is it time to compact the disk ?
*
* We override the background compaction configruation.
*/
if (rtems_fdisk_segment_count_queue (&fd->available) <=
ffc071c8: 80 7e 00 34 lwz r3,52(r30)
ffc071cc: 4b ff e9 7d bl ffc05b48 <rtems_fdisk_segment_count_queue.isra.1>
ffc071d0: 81 3e 00 10 lwz r9,16(r30)
ffc071d4: 7f 83 48 40 cmplw cr7,r3,r9
ffc071d8: 41 bd 00 0c bgt+ cr7,ffc071e4 <rtems_fdisk_ioctl+0x6d0>
fd->avail_compact_segs)
rtems_fdisk_compact (fd);
ffc071dc: 7f c3 f3 78 mr r3,r30
ffc071e0: 4b ff f3 bd bl ffc0659c <rtems_fdisk_compact>
/*
* Get the next avaliable segment.
*/
sc = rtems_fdisk_segment_queue_pop_head (&fd->available);
ffc071e4: 3b be 00 34 addi r29,r30,52
ffc071e8: 7f a3 eb 78 mr r3,r29
ffc071ec: 4b ff e4 95 bl ffc05680 <rtems_fdisk_segment_queue_pop_head>
/*
* Is the flash disk full ?
*/
if (!sc)
ffc071f0: 7c 73 1b 79 mr. r19,r3
ffc071f4: 40 a2 00 40 bne+ ffc07234 <rtems_fdisk_ioctl+0x720> <== 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))
ffc071f8: 81 3e 00 08 lwz r9,8(r30) <== NOT EXECUTED
ffc071fc: 71 28 00 02 andi. r8,r9,2 <== NOT EXECUTED
ffc07200: 41 a2 00 0c beq+ ffc0720c <rtems_fdisk_ioctl+0x6f8> <== NOT EXECUTED
rtems_fdisk_compact (fd);
ffc07204: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc07208: 4b ff f3 95 bl ffc0659c <rtems_fdisk_compact> <== NOT EXECUTED
/*
* Try again for some free space.
*/
sc = rtems_fdisk_segment_queue_pop_head (&fd->available);
ffc0720c: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED
ffc07210: 4b ff e4 71 bl ffc05680 <rtems_fdisk_segment_queue_pop_head><== NOT EXECUTED
if (!sc)
ffc07214: 7c 73 1b 79 mr. r19,r3 <== NOT EXECUTED
ffc07218: 40 a2 00 1c bne+ ffc07234 <rtems_fdisk_ioctl+0x720> <== NOT EXECUTED
{
rtems_fdisk_error ("write-block: no available pages");
ffc0721c: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc07220: 38 63 3e 93 addi r3,r3,16019 <== NOT EXECUTED
ffc07224: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc07228: 4b ff e8 55 bl ffc05a7c <rtems_fdisk_error> <== NOT EXECUTED
return ENOSPC;
ffc0722c: 3b a0 00 1c li r29,28 <== NOT EXECUTED
ffc07230: 48 00 02 80 b ffc074b0 <rtems_fdisk_ioctl+0x99c> <== NOT EXECUTED
}
}
#if RTEMS_FDISK_TRACE
if (fd->info_level >= 3)
ffc07234: 81 3e 00 6c lwz r9,108(r30)
ffc07238: 2b 89 00 02 cmplwi cr7,r9,2
ffc0723c: 40 bd 00 38 ble+ cr7,ffc07274 <rtems_fdisk_ioctl+0x760> <== ALWAYS TAKEN
{
char queues[5];
rtems_fdisk_queue_status (fd, sc, queues);
ffc07240: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc07244: 7e 64 9b 78 mr r4,r19 <== NOT EXECUTED
ffc07248: 38 a1 00 20 addi r5,r1,32 <== NOT EXECUTED
ffc0724c: 4b ff ed 45 bl ffc05f90 <rtems_fdisk_queue_status> <== NOT EXECUTED
rtems_fdisk_info (fd, " write:%d=>%02d-%03d: queue check: %s",
ffc07250: 3d 20 ff c3 lis r9,-61 <== NOT EXECUTED
ffc07254: 80 89 37 6c lwz r4,14188(r9) <== NOT EXECUTED
ffc07258: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc0725c: 80 d3 00 08 lwz r6,8(r19) <== NOT EXECUTED
ffc07260: 7f 65 db 78 mr r5,r27 <== NOT EXECUTED
ffc07264: 80 f3 00 0c lwz r7,12(r19) <== NOT EXECUTED
ffc07268: 39 01 00 20 addi r8,r1,32 <== NOT EXECUTED
ffc0726c: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc07270: 4b ff e5 91 bl ffc05800 <rtems_fdisk_info> <== NOT EXECUTED
/*
* Find the next avaliable page in the segment.
*/
pd = sc->page_descriptors;
ffc07274: 81 33 00 10 lwz r9,16(r19)
for (page = 0; page < sc->pages; page++, pd++)
ffc07278: 3a 40 00 00 li r18,0
ffc0727c: 83 b3 00 14 lwz r29,20(r19)
ffc07280: 48 00 01 cc b ffc0744c <rtems_fdisk_ioctl+0x938>
{
if (rtems_fdisk_page_desc_erased (pd))
ffc07284: 7e 23 8b 78 mr r3,r17
ffc07288: 91 21 00 44 stw r9,68(r1)
ffc0728c: 4b ff e5 2d bl ffc057b8 <rtems_fdisk_page_desc_erased>
ffc07290: 2f 83 00 00 cmpwi cr7,r3,0
ffc07294: 81 21 00 44 lwz r9,68(r1)
ffc07298: 41 be 01 b0 beq+ cr7,ffc07448 <rtems_fdisk_ioctl+0x934>
{
pd->crc = rtems_fdisk_page_checksum (buffer, fd->block_size);
ffc0729c: 81 5e 00 14 lwz r10,20(r30)
{
uint16_t cs = 0xffff;
uint32_t i;
for (i = 0; i < page_size; i++, buffer++)
cs = rtems_fdisk_calc_crc16 (cs, *buffer);
ffc072a0: 3c a0 00 01 lis r5,1
ffc072a4: 39 25 29 74 addi r9,r5,10612
* 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;
ffc072a8: 39 00 00 00 li r8,0
uint32_t i;
for (i = 0; i < page_size; i++, buffer++)
cs = rtems_fdisk_calc_crc16 (cs, *buffer);
ffc072ac: 80 e9 00 08 lwz r7,8(r9)
* 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;
ffc072b0: 39 4a 00 01 addi r10,r10,1
uint32_t i;
for (i = 0; i < page_size; i++, buffer++)
ffc072b4: 39 20 00 00 li r9,0
* 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;
ffc072b8: 7d 49 03 a6 mtctr r10
ffc072bc: 61 08 ff ff ori r8,r8,65535
ffc072c0: 48 00 00 18 b ffc072d8 <rtems_fdisk_ioctl+0x7c4>
uint32_t i;
for (i = 0; i < page_size; i++, buffer++)
cs = rtems_fdisk_calc_crc16 (cs, *buffer);
ffc072c4: 7d 58 48 ae lbzx r10,r24,r9
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++)
ffc072c8: 39 29 00 01 addi r9,r9,1
cs = rtems_fdisk_calc_crc16 (cs, *buffer);
ffc072cc: 7d 48 42 78 xor r8,r10,r8
ffc072d0: 55 08 0d fc rlwinm r8,r8,1,23,30
ffc072d4: 7d 07 42 2e lhzx r8,r7,r8
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++)
ffc072d8: 42 00 ff ec bdnz+ ffc072c4 <rtems_fdisk_ioctl+0x7b0>
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: " \
ffc072dc: 80 b3 00 00 lwz r5,0(r19)
* 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;
ffc072e0: a1 31 00 02 lhz r9,2(r17)
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: " \
ffc072e4: 2f 85 00 00 cmpwi cr7,r5,0
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);
ffc072e8: b1 11 00 00 sth r8,0(r17)
* 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;
ffc072ec: 55 29 04 3c rlwinm r9,r9,0,16,30
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);
pd->block = block;
ffc072f0: 93 71 00 04 stw r27,4(r17)
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: " \
ffc072f4: 80 d3 00 08 lwz r6,8(r19)
if (rtems_fdisk_page_desc_erased (pd))
{
pd->crc = rtems_fdisk_page_checksum (buffer, fd->block_size);
pd->block = block;
bc->segment = sc;
ffc072f8: 7e 74 a9 2e stwx r19,r20,r21
bc->page = page;
ffc072fc: 92 5a 00 04 stw r18,4(r26)
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: " \
ffc07300: 80 f3 00 0c lwz r7,12(r19)
* 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;
ffc07304: b1 31 00 02 sth r9,2(r17)
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: " \
ffc07308: 81 53 00 1c lwz r10,28(r19)
ffc0730c: 80 73 00 20 lwz r3,32(r19)
ffc07310: 80 93 00 24 lwz r4,36(r19)
ffc07314: 41 9e 00 10 beq- cr7,ffc07324 <rtems_fdisk_ioctl+0x810> <== ALWAYS TAKEN
ffc07318: 3c a0 ff c3 lis r5,-61 <== NOT EXECUTED
ffc0731c: 38 a5 54 92 addi r5,r5,21650 <== NOT EXECUTED
ffc07320: 48 00 00 0c b ffc0732c <rtems_fdisk_ioctl+0x818> <== NOT EXECUTED
ffc07324: 3c a0 ff c3 lis r5,-61
ffc07328: 38 a5 38 75 addi r5,r5,14453
ffc0732c: 91 01 00 18 stw r8,24(r1)
ffc07330: 3d 00 ff c3 lis r8,-61
ffc07334: 90 61 00 08 stw r3,8(r1)
ffc07338: 7f c3 f3 78 mr r3,r30
ffc0733c: 90 81 00 0c stw r4,12(r1)
ffc07340: 90 a1 00 10 stw r5,16(r1)
ffc07344: 7f 65 db 78 mr r5,r27
ffc07348: 80 88 37 70 lwz r4,14192(r8)
ffc0734c: 7e 48 93 78 mr r8,r18
ffc07350: 91 21 00 14 stw r9,20(r1)
ffc07354: 7f a9 eb 78 mr r9,r29
ffc07358: 93 61 00 1c stw r27,28(r1)
ffc0735c: 4c c6 31 82 crclr 4*cr1+eq
ffc07360: 4b ff e4 a1 bl ffc05800 <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);
ffc07364: 80 b3 00 18 lwz r5,24(r19)
ffc07368: 7f c3 f3 78 mr r3,r30
ffc0736c: 7e 64 9b 78 mr r4,r19
ffc07370: 7c b2 2a 14 add r5,r18,r5
ffc07374: 7f 06 c3 78 mr r6,r24
ffc07378: 4b ff ea 8d bl ffc05e04 <rtems_fdisk_seg_write_page>
if (ret)
ffc0737c: 7c 7d 1b 79 mr. r29,r3
ffc07380: 41 82 00 30 beq- ffc073b0 <rtems_fdisk_ioctl+0x89c> <== ALWAYS TAKEN
{
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd, "write-block:%02d-%03d-%03d: write page failed: " \
ffc07384: 83 53 00 08 lwz r26,8(r19) <== NOT EXECUTED
ffc07388: 83 73 00 0c lwz r27,12(r19) <== NOT EXECUTED
ffc0738c: 48 01 d7 ed bl ffc24b78 <strerror> <== NOT EXECUTED
ffc07390: 3d 20 ff c3 lis r9,-61 <== NOT EXECUTED
ffc07394: 7c 68 1b 78 mr r8,r3 <== NOT EXECUTED
ffc07398: 80 89 37 74 lwz r4,14196(r9) <== NOT EXECUTED
ffc0739c: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc073a0: 7f 45 d3 78 mr r5,r26 <== NOT EXECUTED
ffc073a4: 7f 66 db 78 mr r6,r27 <== NOT EXECUTED
ffc073a8: 7e 47 93 78 mr r7,r18 <== NOT EXECUTED
ffc073ac: 48 00 00 4c b ffc073f8 <rtems_fdisk_ioctl+0x8e4> <== NOT EXECUTED
strerror (ret), ret);
#endif
}
else
{
ret = rtems_fdisk_seg_write_page_desc (fd, sc, page, pd);
ffc073b0: 7f c3 f3 78 mr r3,r30
ffc073b4: 7e 64 9b 78 mr r4,r19
ffc073b8: 7e 45 93 78 mr r5,r18
ffc073bc: 7e 26 8b 78 mr r6,r17
ffc073c0: 4b ff e9 d5 bl ffc05d94 <rtems_fdisk_seg_write_page_desc>
if (ret)
ffc073c4: 7c 7d 1b 79 mr. r29,r3
ffc073c8: 41 a2 00 40 beq+ ffc07408 <rtems_fdisk_ioctl+0x8f4> <== ALWAYS TAKEN
{
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd, "write-block:%02d-%03d-%03d: " \
ffc073cc: 82 93 00 08 lwz r20,8(r19) <== NOT EXECUTED
ffc073d0: 82 b3 00 0c lwz r21,12(r19) <== NOT EXECUTED
ffc073d4: 83 7a 00 04 lwz r27,4(r26) <== NOT EXECUTED
ffc073d8: 48 01 d7 a1 bl ffc24b78 <strerror> <== NOT EXECUTED
ffc073dc: 3d 40 ff c3 lis r10,-61 <== NOT EXECUTED
ffc073e0: 80 8a 37 78 lwz r4,14200(r10) <== NOT EXECUTED
ffc073e4: 7c 68 1b 78 mr r8,r3 <== NOT EXECUTED
ffc073e8: 7e 85 a3 78 mr r5,r20 <== NOT EXECUTED
ffc073ec: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc073f0: 7e a6 ab 78 mr r6,r21 <== NOT EXECUTED
ffc073f4: 7f 67 db 78 mr r7,r27 <== NOT EXECUTED
ffc073f8: 7f a9 eb 78 mr r9,r29 <== NOT EXECUTED
ffc073fc: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc07400: 4b ff e4 01 bl ffc05800 <rtems_fdisk_info> <== NOT EXECUTED
ffc07404: 48 00 00 10 b ffc07414 <rtems_fdisk_ioctl+0x900> <== NOT EXECUTED
strerror (ret), ret);
#endif
}
else
{
sc->pages_active++;
ffc07408: 81 33 00 1c lwz r9,28(r19)
ffc0740c: 39 29 00 01 addi r9,r9,1
ffc07410: 91 33 00 1c stw r9,28(r19)
}
}
rtems_fdisk_queue_segment (fd, sc);
ffc07414: 7f c3 f3 78 mr r3,r30
ffc07418: 7e 64 9b 78 mr r4,r19
ffc0741c: 4b ff ec 31 bl ffc0604c <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)
ffc07420: 81 5e 00 28 lwz r10,40(r30)
ffc07424: 81 3e 00 24 lwz r9,36(r30)
ffc07428: 7f 8a 48 40 cmplw cr7,r10,r9
ffc0742c: 40 9c 00 64 bge- cr7,ffc07490 <rtems_fdisk_ioctl+0x97c>
fd->starvations++;
ffc07430: 81 3e 00 70 lwz r9,112(r30)
}
rtems_fdisk_queue_segment (fd, sc);
if (rtems_fdisk_is_erased_blocks_starvation (fd))
rtems_fdisk_compact (fd);
ffc07434: 7f c3 f3 78 mr r3,r30
rtems_fdisk_is_erased_blocks_starvation (rtems_flashdisk* fd)
{
bool starvation = fd->erased_blocks < fd->starvation_threshold;
if (starvation)
fd->starvations++;
ffc07438: 39 29 00 01 addi r9,r9,1
ffc0743c: 91 3e 00 70 stw r9,112(r30)
}
rtems_fdisk_queue_segment (fd, sc);
if (rtems_fdisk_is_erased_blocks_starvation (fd))
rtems_fdisk_compact (fd);
ffc07440: 4b ff f1 5d bl ffc0659c <rtems_fdisk_compact>
ffc07444: 48 00 00 4c b ffc07490 <rtems_fdisk_ioctl+0x97c>
* Find the next avaliable page in the segment.
*/
pd = sc->page_descriptors;
for (page = 0; page < sc->pages; page++, pd++)
ffc07448: 3a 52 00 01 addi r18,r18,1
ffc0744c: 7f 92 e8 00 cmpw cr7,r18,r29
* @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)
ffc07450: 56 51 18 38 rlwinm r17,r18,3,0,28
ffc07454: 7e 29 8a 14 add r17,r9,r17
* Find the next avaliable page in the segment.
*/
pd = sc->page_descriptors;
for (page = 0; page < sc->pages; page++, pd++)
ffc07458: 40 9e fe 2c bne+ cr7,ffc07284 <rtems_fdisk_ioctl+0x770> <== ALWAYS TAKEN
return ret;
}
}
rtems_fdisk_error ("write-block: no erased page descs in segment: %d-%d",
ffc0745c: 80 93 00 08 lwz r4,8(r19) <== NOT EXECUTED
ffc07460: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc07464: 80 b3 00 0c lwz r5,12(r19) <== NOT EXECUTED
ffc07468: 38 63 3f 9b addi r3,r3,16283 <== NOT EXECUTED
ffc0746c: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc07470: 4b ff e6 0d bl ffc05a7c <rtems_fdisk_error> <== NOT EXECUTED
sc->device, sc->segment);
sc->failed = true;
ffc07474: 39 20 00 01 li r9,1 <== NOT EXECUTED
ffc07478: 91 33 00 28 stw r9,40(r19) <== NOT EXECUTED
rtems_fdisk_queue_segment (fd, sc);
ffc0747c: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc07480: 7e 64 9b 78 mr r4,r19 <== NOT EXECUTED
ffc07484: 4b ff eb c9 bl ffc0604c <rtems_fdisk_queue_segment> <== NOT EXECUTED
return EIO;
ffc07488: 3b a0 00 05 li r29,5 <== NOT EXECUTED
ffc0748c: 48 00 00 24 b ffc074b0 <rtems_fdisk_ioctl+0x99c> <== 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)
ffc07490: 2f 9d 00 00 cmpwi cr7,r29,0
ffc07494: 40 9e 00 1c bne- cr7,ffc074b0 <rtems_fdisk_ioctl+0x99c> <== 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)
ffc07498: 81 3e 00 14 lwz r9,20(r30)
ffc0749c: 3a f7 00 01 addi r23,r23,1
ffc074a0: 7f 18 4a 14 add r24,r24,r9
ffc074a4: 7f 97 70 00 cmpw cr7,r23,r14
ffc074a8: 40 9e fa 90 bne+ cr7,ffc06f38 <rtems_fdisk_ioctl+0x424>
ffc074ac: 3b a0 00 00 li r29,0
{
rtems_blkdev_sg_buffer* sg = req->bufs;
uint32_t buf;
int ret = 0;
for (buf = 0; (ret == 0) && (buf < req->bufnum); buf++, sg++)
ffc074b0: 2f 9d 00 00 cmpwi cr7,r29,0
ffc074b4: 3a d6 00 01 addi r22,r22,1
ffc074b8: 3b 39 00 10 addi r25,r25,16
ffc074bc: 40 9e 00 18 bne- cr7,ffc074d4 <rtems_fdisk_ioctl+0x9c0> <== NEVER TAKEN
ffc074c0: 81 3f 00 10 lwz r9,16(r31)
ffc074c4: 7f 96 48 40 cmplw cr7,r22,r9
ffc074c8: 41 9c fa 58 blt+ cr7,ffc06f20 <rtems_fdisk_ioctl+0x40c>
if (ret)
break;
}
}
rtems_blkdev_request_done (req, ret ? RTEMS_IO_ERROR : RTEMS_SUCCESSFUL);
ffc074cc: 38 80 00 00 li r4,0
ffc074d0: 48 00 00 08 b ffc074d8 <rtems_fdisk_ioctl+0x9c4>
ffc074d4: 38 80 00 1b li r4,27 <== NOT EXECUTED
ffc074d8: 81 3f 00 04 lwz r9,4(r31)
ffc074dc: 7f e3 fb 78 mr r3,r31
ffc074e0: 7d 29 03 a6 mtctr r9
ffc074e4: 4e 80 04 21 bctrl
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);
ffc074e8: 39 20 00 00 li r9,0
ffc074ec: 91 30 00 00 stw r9,0(r16)
break;
ffc074f0: 48 00 07 28 b ffc07c18 <rtems_fdisk_ioctl+0x1104>
default:
errno = EINVAL;
ffc074f4: 48 01 aa f5 bl ffc21fe8 <__errno> <== NOT EXECUTED
ffc074f8: 39 20 00 16 li r9,22 <== NOT EXECUTED
ffc074fc: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED
break;
ffc07500: 48 00 07 18 b ffc07c18 <rtems_fdisk_ioctl+0x1104> <== NOT EXECUTED
}
}
break;
case RTEMS_FDISK_IOCTL_ERASE_DISK:
errno = rtems_fdisk_erase_disk (&rtems_flashdisks[minor]);
ffc07504: 48 01 aa e5 bl ffc21fe8 <__errno> <== NOT EXECUTED
ffc07508: 83 fe 29 74 lwz r31,10612(r30) <== NOT EXECUTED
{
uint32_t device;
int ret;
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd, "erase-disk");
ffc0750c: 3c 80 ff c3 lis r4,-61 <== NOT EXECUTED
}
}
break;
case RTEMS_FDISK_IOCTL_ERASE_DISK:
errno = rtems_fdisk_erase_disk (&rtems_flashdisks[minor]);
ffc07510: 7f ff e2 14 add r31,r31,r28 <== NOT EXECUTED
ffc07514: 7c 7b 1b 78 mr r27,r3 <== NOT EXECUTED
{
uint32_t device;
int ret;
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd, "erase-disk");
ffc07518: 38 84 3f cf addi r4,r4,16335 <== NOT EXECUTED
ffc0751c: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
for (device = 0; device < fd->device_count; device++)
{
int ret;
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd, " erase-flash:%02d", device);
ffc07520: 3f 00 ff c3 lis r24,-61 <== NOT EXECUTED
{
uint32_t device;
int ret;
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd, "erase-disk");
ffc07524: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc07528: 4b ff e2 d9 bl ffc05800 <rtems_fdisk_info> <== NOT EXECUTED
rtems_fdisk_device_erase (const rtems_flashdisk* fd, uint32_t device)
{
const rtems_fdisk_driver_handlers* ops;
ops = fd->devices[device].descriptor->flash_ops;
#if RTEMS_FDISK_TRACE
rtems_fdisk_printf (fd, " device-erase: %02d", device);
ffc0752c: 3f 40 ff c3 lis r26,-61 <== NOT EXECUTED
*/
static int
rtems_fdisk_erase_flash (const rtems_flashdisk* fd)
{
uint32_t device;
for (device = 0; device < fd->device_count; device++)
ffc07530: 3b c0 00 00 li r30,0 <== NOT EXECUTED
{
int ret;
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd, " erase-flash:%02d", device);
ffc07534: 3b 18 3f da addi r24,r24,16346 <== NOT EXECUTED
rtems_fdisk_device_erase (const rtems_flashdisk* fd, uint32_t device)
{
const rtems_fdisk_driver_handlers* ops;
ops = fd->devices[device].descriptor->flash_ops;
#if RTEMS_FDISK_TRACE
rtems_fdisk_printf (fd, " device-erase: %02d", device);
ffc07538: 3b 5a 3f ec addi r26,r26,16364 <== NOT EXECUTED
ffc0753c: 48 00 00 68 b ffc075a4 <rtems_fdisk_ioctl+0xa90> <== NOT EXECUTED
for (device = 0; device < fd->device_count; device++)
{
int ret;
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd, " erase-flash:%02d", device);
ffc07540: 7f 04 c3 78 mr r4,r24 <== NOT EXECUTED
ffc07544: 7f c5 f3 78 mr r5,r30 <== NOT EXECUTED
ffc07548: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc0754c: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc07550: 4b ff e2 b1 bl ffc05800 <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)
ffc07554: 1f be 00 0c mulli r29,r30,12 <== 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;
ffc07558: 81 3f 00 2c lwz r9,44(r31) <== NOT EXECUTED
#if RTEMS_FDISK_TRACE
rtems_fdisk_printf (fd, " device-erase: %02d", device);
ffc0755c: 7f 44 d3 78 mr r4,r26 <== 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;
ffc07560: 7d 29 ea 14 add r9,r9,r29 <== NOT EXECUTED
ffc07564: 81 29 00 08 lwz r9,8(r9) <== NOT EXECUTED
#if RTEMS_FDISK_TRACE
rtems_fdisk_printf (fd, " device-erase: %02d", device);
ffc07568: 7f c5 f3 78 mr r5,r30 <== NOT EXECUTED
ffc0756c: 7f e3 fb 78 mr r3,r31 <== 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;
ffc07570: 83 29 00 08 lwz r25,8(r9) <== NOT EXECUTED
#if RTEMS_FDISK_TRACE
rtems_fdisk_printf (fd, " device-erase: %02d", device);
ffc07574: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc07578: 4b ff e3 5d bl ffc058d4 <rtems_fdisk_printf> <== NOT EXECUTED
#endif
return ops->erase_device (fd->devices[device].descriptor, device);
ffc0757c: 81 3f 00 2c lwz r9,44(r31) <== NOT EXECUTED
ffc07580: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED
ffc07584: 7f a9 ea 14 add r29,r9,r29 <== NOT EXECUTED
ffc07588: 81 39 00 14 lwz r9,20(r25) <== NOT EXECUTED
ffc0758c: 80 7d 00 08 lwz r3,8(r29) <== NOT EXECUTED
ffc07590: 7d 29 03 a6 mtctr r9 <== NOT EXECUTED
ffc07594: 4e 80 04 21 bctrl <== NOT EXECUTED
rtems_fdisk_info (fd, " erase-flash:%02d", device);
#endif
ret = rtems_fdisk_device_erase (fd, device);
if (ret != 0)
ffc07598: 2c 03 00 00 cmpwi r3,0 <== NOT EXECUTED
ffc0759c: 40 82 00 5c bne- ffc075f8 <rtems_fdisk_ioctl+0xae4> <== NOT EXECUTED
*/
static int
rtems_fdisk_erase_flash (const rtems_flashdisk* fd)
{
uint32_t device;
for (device = 0; device < fd->device_count; device++)
ffc075a0: 3b de 00 01 addi r30,r30,1 <== NOT EXECUTED
ffc075a4: 81 3f 00 30 lwz r9,48(r31) <== NOT EXECUTED
ffc075a8: 7f 9e 48 40 cmplw cr7,r30,r9 <== NOT EXECUTED
ffc075ac: 41 9c ff 94 blt+ cr7,ffc07540 <rtems_fdisk_ioctl+0xa2c> <== NOT EXECUTED
ffc075b0: 3b c0 00 00 li r30,0 <== NOT EXECUTED
ffc075b4: 48 00 00 2c b ffc075e0 <rtems_fdisk_ioctl+0xacc> <== NOT EXECUTED
if (ret == 0)
{
for (device = 0; device < fd->device_count; device++)
{
if (!fd->devices[device].segments)
ffc075b8: 81 3f 00 2c lwz r9,44(r31) <== NOT EXECUTED
ffc075bc: 1d 5e 00 0c mulli r10,r30,12 <== NOT EXECUTED
ffc075c0: 7d 29 50 2e lwzx r9,r9,r10 <== NOT EXECUTED
ffc075c4: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED
ffc075c8: 41 9e 00 2c beq- cr7,ffc075f4 <rtems_fdisk_ioctl+0xae0> <== NOT EXECUTED
return ENOMEM;
ret = rtems_fdisk_recover_block_mappings (fd);
ffc075cc: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc075d0: 4b ff f1 f1 bl ffc067c0 <rtems_fdisk_recover_block_mappings><== NOT EXECUTED
if (ret)
ffc075d4: 2c 03 00 00 cmpwi r3,0 <== NOT EXECUTED
ffc075d8: 40 82 00 20 bne- ffc075f8 <rtems_fdisk_ioctl+0xae4> <== NOT EXECUTED
ret = rtems_fdisk_erase_flash (fd);
if (ret == 0)
{
for (device = 0; device < fd->device_count; device++)
ffc075dc: 3b de 00 01 addi r30,r30,1 <== NOT EXECUTED
ffc075e0: 81 3f 00 30 lwz r9,48(r31) <== NOT EXECUTED
ffc075e4: 7f 9e 48 40 cmplw cr7,r30,r9 <== NOT EXECUTED
ffc075e8: 41 9c ff d0 blt+ cr7,ffc075b8 <rtems_fdisk_ioctl+0xaa4> <== NOT EXECUTED
ffc075ec: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc075f0: 48 00 00 08 b ffc075f8 <rtems_fdisk_ioctl+0xae4> <== NOT EXECUTED
{
if (!fd->devices[device].segments)
return ENOMEM;
ffc075f4: 38 60 00 0c li r3,12 <== NOT EXECUTED
}
}
break;
case RTEMS_FDISK_IOCTL_ERASE_DISK:
errno = rtems_fdisk_erase_disk (&rtems_flashdisks[minor]);
ffc075f8: 90 7b 00 00 stw r3,0(r27) <== NOT EXECUTED
break;
ffc075fc: 48 00 06 1c b ffc07c18 <rtems_fdisk_ioctl+0x1104> <== NOT EXECUTED
case RTEMS_FDISK_IOCTL_COMPACT:
errno = rtems_fdisk_compact (&rtems_flashdisks[minor]);
ffc07600: 48 01 a9 e9 bl ffc21fe8 <__errno> <== NOT EXECUTED
ffc07604: 7c 7f 1b 78 mr r31,r3 <== NOT EXECUTED
ffc07608: 80 7e 29 74 lwz r3,10612(r30) <== NOT EXECUTED
ffc0760c: 7c 63 e2 14 add r3,r3,r28 <== NOT EXECUTED
ffc07610: 4b ff ef 8d bl ffc0659c <rtems_fdisk_compact> <== NOT EXECUTED
ffc07614: 90 7f 00 00 stw r3,0(r31) <== NOT EXECUTED
break;
ffc07618: 48 00 06 00 b ffc07c18 <rtems_fdisk_ioctl+0x1104> <== NOT EXECUTED
case RTEMS_FDISK_IOCTL_ERASE_USED:
errno = rtems_fdisk_erase_used (&rtems_flashdisks[minor]);
ffc0761c: 48 01 a9 cd bl ffc21fe8 <__errno> <== NOT EXECUTED
ffc07620: 83 de 29 74 lwz r30,10612(r30) <== NOT EXECUTED
ffc07624: 7c 7d 1b 78 mr r29,r3 <== NOT EXECUTED
ffc07628: 7f de e2 14 add r30,r30,r28 <== NOT EXECUTED
*/
static int
rtems_fdisk_erase_used (rtems_flashdisk* fd)
{
rtems_fdisk_segment_ctl* sc;
int latched_ret = 0;
ffc0762c: 3b e0 00 00 li r31,0 <== NOT EXECUTED
while ((sc = rtems_fdisk_segment_queue_pop_head (&fd->erase)))
ffc07630: 3b 7e 00 4c addi r27,r30,76 <== NOT EXECUTED
ffc07634: 48 00 00 20 b ffc07654 <rtems_fdisk_ioctl+0xb40> <== NOT EXECUTED
{
/*
* The segment will either end up on the available queue or
* the failed queue.
*/
int ret = rtems_fdisk_erase_segment (fd, sc);
ffc07638: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc0763c: 4b ff e8 45 bl ffc05e80 <rtems_fdisk_erase_segment> <== NOT EXECUTED
if (ret && !latched_ret)
ffc07640: 2c 03 00 00 cmpwi r3,0 <== NOT EXECUTED
ffc07644: 41 82 00 10 beq- ffc07654 <rtems_fdisk_ioctl+0xb40> <== NOT EXECUTED
ffc07648: 2f 9f 00 00 cmpwi cr7,r31,0 <== NOT EXECUTED
ffc0764c: 40 9e 00 08 bne- cr7,ffc07654 <rtems_fdisk_ioctl+0xb40> <== NOT EXECUTED
ffc07650: 7c 7f 1b 78 mr r31,r3 <== 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)))
ffc07654: 7f 63 db 78 mr r3,r27 <== NOT EXECUTED
ffc07658: 4b ff e0 29 bl ffc05680 <rtems_fdisk_segment_queue_pop_head><== NOT EXECUTED
ffc0765c: 7c 64 1b 79 mr. r4,r3 <== NOT EXECUTED
ffc07660: 40 82 ff d8 bne+ ffc07638 <rtems_fdisk_ioctl+0xb24> <== 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]);
ffc07664: 93 fd 00 00 stw r31,0(r29) <== NOT EXECUTED
break;
ffc07668: 48 00 05 b0 b ffc07c18 <rtems_fdisk_ioctl+0x1104> <== NOT EXECUTED
case RTEMS_FDISK_IOCTL_MONITORING:
errno = rtems_fdisk_monitoring_data (&rtems_flashdisks[minor],
ffc0766c: 48 01 a9 7d bl ffc21fe8 <__errno> <== NOT EXECUTED
ffc07670: 83 de 29 74 lwz r30,10612(r30) <== NOT EXECUTED
ffc07674: 7c 7b 1b 78 mr r27,r3 <== NOT EXECUTED
ffc07678: 7f de e2 14 add r30,r30,r28 <== NOT EXECUTED
rtems_fdisk_monitor_data* data)
{
uint32_t i;
uint32_t j;
data->block_size = fd->block_size;
ffc0767c: 81 3e 00 14 lwz r9,20(r30) <== NOT EXECUTED
data->block_count = fd->block_count;
ffc07680: 81 5e 00 1c lwz r10,28(r30) <== NOT EXECUTED
data->unavail_blocks = fd->unavail_blocks;
data->device_count = fd->device_count;
ffc07684: 83 be 00 30 lwz r29,48(r30) <== NOT EXECUTED
rtems_fdisk_monitor_data* data)
{
uint32_t i;
uint32_t j;
data->block_size = fd->block_size;
ffc07688: 91 3f 00 00 stw r9,0(r31) <== NOT EXECUTED
data->block_count = fd->block_count;
data->unavail_blocks = fd->unavail_blocks;
ffc0768c: 81 3e 00 20 lwz r9,32(r30) <== NOT EXECUTED
{
uint32_t i;
uint32_t j;
data->block_size = fd->block_size;
data->block_count = fd->block_count;
ffc07690: 91 5f 00 04 stw r10,4(r31) <== NOT EXECUTED
data->unavail_blocks = fd->unavail_blocks;
data->device_count = fd->device_count;
data->blocks_used = 0;
for (i = 0; i < fd->block_count; i++)
ffc07694: 39 4a 00 01 addi r10,r10,1 <== NOT EXECUTED
ffc07698: 7d 49 03 a6 mtctr r10 <== NOT EXECUTED
uint32_t i;
uint32_t j;
data->block_size = fd->block_size;
data->block_count = fd->block_count;
data->unavail_blocks = fd->unavail_blocks;
ffc0769c: 91 3f 00 08 stw r9,8(r31) <== NOT EXECUTED
data->device_count = fd->device_count;
data->blocks_used = 0;
for (i = 0; i < fd->block_count; i++)
ffc076a0: 39 20 00 00 li r9,0 <== NOT EXECUTED
uint32_t j;
data->block_size = fd->block_size;
data->block_count = fd->block_count;
data->unavail_blocks = fd->unavail_blocks;
data->device_count = fd->device_count;
ffc076a4: 93 bf 00 0c stw r29,12(r31) <== NOT EXECUTED
data->blocks_used = 0;
ffc076a8: 93 5f 00 18 stw r26,24(r31) <== NOT EXECUTED
ffc076ac: 48 00 00 28 b ffc076d4 <rtems_fdisk_ioctl+0xbc0> <== NOT EXECUTED
for (i = 0; i < fd->block_count; i++)
if (fd->blocks[i].segment)
ffc076b0: 81 5e 00 18 lwz r10,24(r30) <== NOT EXECUTED
ffc076b4: 55 28 18 38 rlwinm r8,r9,3,0,28 <== NOT EXECUTED
ffc076b8: 7d 4a 40 2e lwzx r10,r10,r8 <== NOT EXECUTED
ffc076bc: 2f 8a 00 00 cmpwi cr7,r10,0 <== NOT EXECUTED
ffc076c0: 41 9e 00 10 beq- cr7,ffc076d0 <rtems_fdisk_ioctl+0xbbc> <== NOT EXECUTED
data->blocks_used++;
ffc076c4: 81 5f 00 18 lwz r10,24(r31) <== NOT EXECUTED
ffc076c8: 39 4a 00 01 addi r10,r10,1 <== NOT EXECUTED
ffc076cc: 91 5f 00 18 stw r10,24(r31) <== 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++)
ffc076d0: 39 29 00 01 addi r9,r9,1 <== NOT EXECUTED
ffc076d4: 42 00 ff dc bdnz+ ffc076b0 <rtems_fdisk_ioctl+0xb9c> <== NOT EXECUTED
if (fd->blocks[i].segment)
data->blocks_used++;
data->segs_available = rtems_fdisk_segment_count_queue (&fd->available);
ffc076d8: 80 7e 00 34 lwz r3,52(r30) <== NOT EXECUTED
ffc076dc: 4b ff e4 6d bl ffc05b48 <rtems_fdisk_segment_count_queue.isra.1><== NOT EXECUTED
ffc076e0: 90 7f 00 1c stw r3,28(r31) <== NOT EXECUTED
data->segs_used = rtems_fdisk_segment_count_queue (&fd->used);
ffc076e4: 80 7e 00 40 lwz r3,64(r30) <== NOT EXECUTED
ffc076e8: 4b ff e4 61 bl ffc05b48 <rtems_fdisk_segment_count_queue.isra.1><== NOT EXECUTED
ffc076ec: 90 7f 00 20 stw r3,32(r31) <== NOT EXECUTED
data->segs_failed = rtems_fdisk_segment_count_queue (&fd->failed);
ffc076f0: 80 7e 00 58 lwz r3,88(r30) <== NOT EXECUTED
ffc076f4: 4b ff e4 55 bl ffc05b48 <rtems_fdisk_segment_count_queue.isra.1><== NOT EXECUTED
data->segment_count = 0;
ffc076f8: 39 20 00 00 li r9,0 <== NOT EXECUTED
if (fd->blocks[i].segment)
data->blocks_used++;
data->segs_available = rtems_fdisk_segment_count_queue (&fd->available);
data->segs_used = rtems_fdisk_segment_count_queue (&fd->used);
data->segs_failed = rtems_fdisk_segment_count_queue (&fd->failed);
ffc076fc: 90 7f 00 24 stw r3,36(r31) <== 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++)
ffc07700: 39 40 00 00 li r10,0 <== NOT EXECUTED
data->segs_available = rtems_fdisk_segment_count_queue (&fd->available);
data->segs_used = rtems_fdisk_segment_count_queue (&fd->used);
data->segs_failed = rtems_fdisk_segment_count_queue (&fd->failed);
data->segment_count = 0;
ffc07704: 91 3f 00 10 stw r9,16(r31) <== NOT EXECUTED
data->page_count = 0;
ffc07708: 91 3f 00 14 stw r9,20(r31) <== NOT EXECUTED
data->pages_desc = 0;
ffc0770c: 91 3f 00 2c stw r9,44(r31) <== NOT EXECUTED
data->pages_active = 0;
ffc07710: 91 3f 00 30 stw r9,48(r31) <== NOT EXECUTED
data->pages_used = 0;
ffc07714: 91 3f 00 34 stw r9,52(r31) <== NOT EXECUTED
data->pages_bad = 0;
ffc07718: 91 3f 00 38 stw r9,56(r31) <== NOT EXECUTED
data->seg_erases = 0;
ffc0771c: 91 3f 00 28 stw r9,40(r31) <== NOT EXECUTED
ffc07720: 48 00 00 a8 b ffc077c8 <rtems_fdisk_ioctl+0xcb4> <== NOT EXECUTED
for (i = 0; i < fd->device_count; i++)
{
data->segment_count += fd->devices[i].segment_count;
ffc07724: 81 3e 00 2c lwz r9,44(r30) <== 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)
ffc07728: 1c ea 00 0c mulli r7,r10,12 <== 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;
ffc0772c: 81 1f 00 10 lwz r8,16(r31) <== NOT EXECUTED
ffc07730: 7c e9 3a 14 add r7,r9,r7 <== NOT EXECUTED
ffc07734: 81 27 00 04 lwz r9,4(r7) <== NOT EXECUTED
ffc07738: 7d 08 4a 14 add r8,r8,r9 <== NOT EXECUTED
for (j = 0; j < fd->devices[i].segment_count; j++)
ffc0773c: 39 29 00 01 addi r9,r9,1 <== 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;
ffc07740: 91 1f 00 10 stw r8,16(r31) <== NOT EXECUTED
for (j = 0; j < fd->devices[i].segment_count; j++)
ffc07744: 7d 29 03 a6 mtctr r9 <== NOT EXECUTED
ffc07748: 39 00 00 00 li r8,0 <== NOT EXECUTED
ffc0774c: 48 00 00 74 b ffc077c0 <rtems_fdisk_ioctl+0xcac> <== NOT EXECUTED
{
rtems_fdisk_segment_ctl* sc = &fd->devices[i].segments[j];
ffc07750: 81 27 00 00 lwz r9,0(r7) <== 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)
ffc07754: 1c c8 00 30 mulli r6,r8,48 <== NOT EXECUTED
for (j = 0; j < fd->devices[i].segment_count; j++)
{
rtems_fdisk_segment_ctl* sc = &fd->devices[i].segments[j];
data->page_count += sc->pages;
ffc07758: 80 bf 00 14 lwz r5,20(r31) <== 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];
ffc0775c: 7d 29 32 14 add r9,r9,r6 <== NOT EXECUTED
data->page_count += sc->pages;
ffc07760: 80 c9 00 14 lwz r6,20(r9) <== 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++)
ffc07764: 39 08 00 01 addi r8,r8,1 <== NOT EXECUTED
{
rtems_fdisk_segment_ctl* sc = &fd->devices[i].segments[j];
data->page_count += sc->pages;
ffc07768: 7c c5 32 14 add r6,r5,r6 <== NOT EXECUTED
data->pages_desc += sc->pages_desc;
ffc0776c: 80 bf 00 2c lwz r5,44(r31) <== NOT EXECUTED
for (j = 0; j < fd->devices[i].segment_count; j++)
{
rtems_fdisk_segment_ctl* sc = &fd->devices[i].segments[j];
data->page_count += sc->pages;
ffc07770: 90 df 00 14 stw r6,20(r31) <== NOT EXECUTED
data->pages_desc += sc->pages_desc;
ffc07774: 80 c9 00 18 lwz r6,24(r9) <== NOT EXECUTED
ffc07778: 7c c5 32 14 add r6,r5,r6 <== NOT EXECUTED
data->pages_active += sc->pages_active;
ffc0777c: 80 bf 00 30 lwz r5,48(r31) <== NOT EXECUTED
for (j = 0; j < fd->devices[i].segment_count; j++)
{
rtems_fdisk_segment_ctl* sc = &fd->devices[i].segments[j];
data->page_count += sc->pages;
data->pages_desc += sc->pages_desc;
ffc07780: 90 df 00 2c stw r6,44(r31) <== NOT EXECUTED
data->pages_active += sc->pages_active;
ffc07784: 80 c9 00 1c lwz r6,28(r9) <== NOT EXECUTED
ffc07788: 7c c5 32 14 add r6,r5,r6 <== NOT EXECUTED
data->pages_used += sc->pages_used;
ffc0778c: 80 bf 00 34 lwz r5,52(r31) <== NOT EXECUTED
{
rtems_fdisk_segment_ctl* sc = &fd->devices[i].segments[j];
data->page_count += sc->pages;
data->pages_desc += sc->pages_desc;
data->pages_active += sc->pages_active;
ffc07790: 90 df 00 30 stw r6,48(r31) <== NOT EXECUTED
data->pages_used += sc->pages_used;
ffc07794: 80 c9 00 20 lwz r6,32(r9) <== NOT EXECUTED
ffc07798: 7c c5 32 14 add r6,r5,r6 <== NOT EXECUTED
data->pages_bad += sc->pages_bad;
ffc0779c: 80 bf 00 38 lwz r5,56(r31) <== NOT EXECUTED
rtems_fdisk_segment_ctl* sc = &fd->devices[i].segments[j];
data->page_count += sc->pages;
data->pages_desc += sc->pages_desc;
data->pages_active += sc->pages_active;
data->pages_used += sc->pages_used;
ffc077a0: 90 df 00 34 stw r6,52(r31) <== NOT EXECUTED
data->pages_bad += sc->pages_bad;
ffc077a4: 80 c9 00 24 lwz r6,36(r9) <== NOT EXECUTED
data->seg_erases += sc->erased;
ffc077a8: 81 29 00 2c lwz r9,44(r9) <== NOT EXECUTED
data->page_count += sc->pages;
data->pages_desc += sc->pages_desc;
data->pages_active += sc->pages_active;
data->pages_used += sc->pages_used;
data->pages_bad += sc->pages_bad;
ffc077ac: 7c c5 32 14 add r6,r5,r6 <== NOT EXECUTED
ffc077b0: 90 df 00 38 stw r6,56(r31) <== NOT EXECUTED
data->seg_erases += sc->erased;
ffc077b4: 80 df 00 28 lwz r6,40(r31) <== NOT EXECUTED
ffc077b8: 7c c6 4a 14 add r6,r6,r9 <== NOT EXECUTED
ffc077bc: 90 df 00 28 stw r6,40(r31) <== 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++)
ffc077c0: 42 00 ff 90 bdnz+ ffc07750 <rtems_fdisk_ioctl+0xc3c> <== 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++)
ffc077c4: 39 4a 00 01 addi r10,r10,1 <== NOT EXECUTED
ffc077c8: 7f 8a e8 00 cmpw cr7,r10,r29 <== NOT EXECUTED
ffc077cc: 40 9e ff 58 bne+ cr7,ffc07724 <rtems_fdisk_ioctl+0xc10> <== NOT EXECUTED
data->pages_bad += sc->pages_bad;
data->seg_erases += sc->erased;
}
}
data->info_level = fd->info_level;
ffc077d0: 81 3e 00 6c lwz r9,108(r30) <== NOT EXECUTED
ffc077d4: 91 3f 00 3c stw r9,60(r31) <== 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],
ffc077d8: 39 20 00 00 li r9,0 <== NOT EXECUTED
ffc077dc: 91 3b 00 00 stw r9,0(r27) <== NOT EXECUTED
(rtems_fdisk_monitor_data*) argp);
break;
ffc077e0: 48 00 04 38 b ffc07c18 <rtems_fdisk_ioctl+0x1104> <== NOT EXECUTED
case RTEMS_FDISK_IOCTL_INFO_LEVEL:
rtems_flashdisks[minor].info_level = (uintptr_t) argp;
ffc077e4: 81 3e 29 74 lwz r9,10612(r30) <== NOT EXECUTED
ffc077e8: 7d 29 e2 14 add r9,r9,r28 <== NOT EXECUTED
ffc077ec: 93 e9 00 6c stw r31,108(r9) <== NOT EXECUTED
break;
ffc077f0: 48 00 04 28 b ffc07c18 <rtems_fdisk_ioctl+0x1104> <== NOT EXECUTED
case RTEMS_FDISK_IOCTL_PRINT_STATUS:
errno = rtems_fdisk_print_status (&rtems_flashdisks[minor]);
ffc077f4: 48 01 a7 f5 bl ffc21fe8 <__errno>
ffc077f8: 81 3e 29 74 lwz r9,10612(r30)
uint32_t current_info_level = fd->info_level;
uint32_t total;
uint32_t count;
uint32_t device;
fd->info_level = 3;
ffc077fc: 39 40 00 03 li r10,3
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]);
ffc07800: 7f e9 e2 14 add r31,r9,r28
uint32_t count;
uint32_t device;
fd->info_level = 3;
rtems_fdisk_printf (fd,
ffc07804: 7c a9 e0 2e lwzx r5,r9,r28
ffc07808: 80 df 00 04 lwz r6,4(r31)
ffc0780c: 3c 80 ff c3 lis r4,-61
*/
static int
rtems_fdisk_print_status (rtems_flashdisk* fd)
{
#if RTEMS_FDISK_TRACE
uint32_t current_info_level = fd->info_level;
ffc07810: 82 5f 00 6c lwz r18,108(r31)
uint32_t count;
uint32_t device;
fd->info_level = 3;
rtems_fdisk_printf (fd,
ffc07814: 38 84 40 00 addi r4,r4,16384
uint32_t current_info_level = fd->info_level;
uint32_t total;
uint32_t count;
uint32_t device;
fd->info_level = 3;
ffc07818: 91 5f 00 6c stw r10,108(r31)
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]);
ffc0781c: 7c 73 1b 78 mr r19,r3
uint32_t count;
uint32_t device;
fd->info_level = 3;
rtems_fdisk_printf (fd,
ffc07820: 7f e3 fb 78 mr r3,r31
ffc07824: 4c c6 31 82 crclr 4*cr1+eq
ffc07828: 4b ff e0 ad bl ffc058d4 <rtems_fdisk_printf>
"Flash Disk Driver Status : %d.%d", fd->major, fd->minor);
rtems_fdisk_printf (fd, "Block count\t%d", fd->block_count);
ffc0782c: 80 bf 00 1c lwz r5,28(r31)
ffc07830: 3c 80 ff c3 lis r4,-61
ffc07834: 38 84 40 21 addi r4,r4,16417
ffc07838: 7f e3 fb 78 mr r3,r31
ffc0783c: 4c c6 31 82 crclr 4*cr1+eq
ffc07840: 4b ff e0 95 bl ffc058d4 <rtems_fdisk_printf>
rtems_fdisk_printf (fd, "Unavail blocks\t%d", fd->unavail_blocks);
ffc07844: 80 bf 00 20 lwz r5,32(r31)
ffc07848: 3c 80 ff c3 lis r4,-61
ffc0784c: 38 84 40 30 addi r4,r4,16432
ffc07850: 7f e3 fb 78 mr r3,r31
ffc07854: 4c c6 31 82 crclr 4*cr1+eq
ffc07858: 4b ff e0 7d bl ffc058d4 <rtems_fdisk_printf>
rtems_fdisk_printf (fd, "Starvation threshold\t%d", fd->starvation_threshold);
ffc0785c: 80 bf 00 24 lwz r5,36(r31)
ffc07860: 3c 80 ff c3 lis r4,-61
ffc07864: 38 84 40 42 addi r4,r4,16450
ffc07868: 7f e3 fb 78 mr r3,r31
ffc0786c: 4c c6 31 82 crclr 4*cr1+eq
ffc07870: 4b ff e0 65 bl ffc058d4 <rtems_fdisk_printf>
rtems_fdisk_printf (fd, "Starvations\t%d", fd->starvations);
ffc07874: 80 bf 00 70 lwz r5,112(r31)
ffc07878: 3c 80 ff c3 lis r4,-61
ffc0787c: 38 84 40 5a addi r4,r4,16474
ffc07880: 7f e3 fb 78 mr r3,r31
ffc07884: 4c c6 31 82 crclr 4*cr1+eq
ffc07888: 4b ff e0 4d bl ffc058d4 <rtems_fdisk_printf>
count = rtems_fdisk_segment_count_queue (&fd->available);
ffc0788c: 80 7f 00 34 lwz r3,52(r31)
ffc07890: 4b ff e2 b9 bl ffc05b48 <rtems_fdisk_segment_count_queue.isra.1>
total = count;
rtems_fdisk_printf (fd, "Available queue\t%ld (%ld)",
ffc07894: 80 df 00 3c lwz r6,60(r31)
rtems_fdisk_printf (fd, "Block count\t%d", fd->block_count);
rtems_fdisk_printf (fd, "Unavail blocks\t%d", fd->unavail_blocks);
rtems_fdisk_printf (fd, "Starvation threshold\t%d", fd->starvation_threshold);
rtems_fdisk_printf (fd, "Starvations\t%d", fd->starvations);
count = rtems_fdisk_segment_count_queue (&fd->available);
ffc07898: 7c 7e 1b 78 mr r30,r3
total = count;
rtems_fdisk_printf (fd, "Available queue\t%ld (%ld)",
ffc0789c: 3c 80 ff c3 lis r4,-61
ffc078a0: 7f c5 f3 78 mr r5,r30
ffc078a4: 38 84 40 69 addi r4,r4,16489
ffc078a8: 7f e3 fb 78 mr r3,r31
ffc078ac: 4c c6 31 82 crclr 4*cr1+eq
ffc078b0: 4b ff e0 25 bl ffc058d4 <rtems_fdisk_printf>
count, rtems_fdisk_segment_queue_count (&fd->available));
count = rtems_fdisk_segment_count_queue (&fd->used);
ffc078b4: 80 7f 00 40 lwz r3,64(r31)
ffc078b8: 4b ff e2 91 bl ffc05b48 <rtems_fdisk_segment_count_queue.isra.1>
total += count;
rtems_fdisk_printf (fd, "Used queue\t%ld (%ld)",
ffc078bc: 80 df 00 48 lwz r6,72(r31)
ffc078c0: 3c 80 ff c3 lis r4,-61
rtems_fdisk_printf (fd, "Starvations\t%d", fd->starvations);
count = rtems_fdisk_segment_count_queue (&fd->available);
total = count;
rtems_fdisk_printf (fd, "Available queue\t%ld (%ld)",
count, rtems_fdisk_segment_queue_count (&fd->available));
count = rtems_fdisk_segment_count_queue (&fd->used);
ffc078c4: 7c 65 1b 78 mr r5,r3
total += count;
rtems_fdisk_printf (fd, "Used queue\t%ld (%ld)",
ffc078c8: 38 84 40 83 addi r4,r4,16515
count = rtems_fdisk_segment_count_queue (&fd->available);
total = count;
rtems_fdisk_printf (fd, "Available queue\t%ld (%ld)",
count, rtems_fdisk_segment_queue_count (&fd->available));
count = rtems_fdisk_segment_count_queue (&fd->used);
total += count;
ffc078cc: 7f c3 f2 14 add r30,r3,r30
rtems_fdisk_printf (fd, "Used queue\t%ld (%ld)",
ffc078d0: 7f e3 fb 78 mr r3,r31
ffc078d4: 4c c6 31 82 crclr 4*cr1+eq
ffc078d8: 4b ff df fd bl ffc058d4 <rtems_fdisk_printf>
count, rtems_fdisk_segment_queue_count (&fd->used));
count = rtems_fdisk_segment_count_queue (&fd->erase);
ffc078dc: 80 7f 00 4c lwz r3,76(r31)
ffc078e0: 4b ff e2 69 bl ffc05b48 <rtems_fdisk_segment_count_queue.isra.1>
total += count;
rtems_fdisk_printf (fd, "Erase queue\t%ld (%ld)",
ffc078e4: 80 df 00 54 lwz r6,84(r31)
ffc078e8: 3c 80 ff c3 lis r4,-61
count, rtems_fdisk_segment_queue_count (&fd->available));
count = rtems_fdisk_segment_count_queue (&fd->used);
total += count;
rtems_fdisk_printf (fd, "Used queue\t%ld (%ld)",
count, rtems_fdisk_segment_queue_count (&fd->used));
count = rtems_fdisk_segment_count_queue (&fd->erase);
ffc078ec: 7c 65 1b 78 mr r5,r3
total += count;
rtems_fdisk_printf (fd, "Erase queue\t%ld (%ld)",
ffc078f0: 38 84 40 98 addi r4,r4,16536
count = rtems_fdisk_segment_count_queue (&fd->used);
total += count;
rtems_fdisk_printf (fd, "Used queue\t%ld (%ld)",
count, rtems_fdisk_segment_queue_count (&fd->used));
count = rtems_fdisk_segment_count_queue (&fd->erase);
total += count;
ffc078f4: 7f de 1a 14 add r30,r30,r3
rtems_fdisk_printf (fd, "Erase queue\t%ld (%ld)",
ffc078f8: 7f e3 fb 78 mr r3,r31
ffc078fc: 4c c6 31 82 crclr 4*cr1+eq
ffc07900: 4b ff df d5 bl ffc058d4 <rtems_fdisk_printf>
count, rtems_fdisk_segment_queue_count (&fd->erase));
count = rtems_fdisk_segment_count_queue (&fd->failed);
ffc07904: 80 7f 00 58 lwz r3,88(r31)
ffc07908: 4b ff e2 41 bl ffc05b48 <rtems_fdisk_segment_count_queue.isra.1>
total += count;
rtems_fdisk_printf (fd, "Failed queue\t%ld (%ld)",
ffc0790c: 80 df 00 60 lwz r6,96(r31)
ffc07910: 3c 80 ff c3 lis r4,-61
count, rtems_fdisk_segment_queue_count (&fd->used));
count = rtems_fdisk_segment_count_queue (&fd->erase);
total += count;
rtems_fdisk_printf (fd, "Erase queue\t%ld (%ld)",
count, rtems_fdisk_segment_queue_count (&fd->erase));
count = rtems_fdisk_segment_count_queue (&fd->failed);
ffc07914: 7c 65 1b 78 mr r5,r3
total += count;
ffc07918: 7f de 1a 14 add r30,r30,r3
rtems_fdisk_printf (fd, "Failed queue\t%ld (%ld)",
ffc0791c: 38 84 40 ae addi r4,r4,16558
ffc07920: 7f e3 fb 78 mr r3,r31
ffc07924: 4c c6 31 82 crclr 4*cr1+eq
ffc07928: 4b ff df ad bl ffc058d4 <rtems_fdisk_printf>
count, rtems_fdisk_segment_queue_count (&fd->failed));
count = 0;
for (device = 0; device < fd->device_count; device++)
ffc0792c: 81 5f 00 30 lwz r10,48(r31)
ffc07930: 39 20 00 00 li r9,0
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;
ffc07934: 39 4a 00 01 addi r10,r10,1
ffc07938: 38 c0 00 00 li r6,0
ffc0793c: 7d 49 03 a6 mtctr r10
ffc07940: 48 00 00 1c b ffc0795c <rtems_fdisk_ioctl+0xe48>
for (device = 0; device < fd->device_count; device++)
count += fd->devices[device].segment_count;
ffc07944: 1d 09 00 0c mulli r8,r9,12
ffc07948: 81 5f 00 2c lwz r10,44(r31)
ffc0794c: 7d 4a 42 14 add r10,r10,r8
ffc07950: 81 4a 00 04 lwz r10,4(r10)
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++)
ffc07954: 39 29 00 01 addi r9,r9,1
count += fd->devices[device].segment_count;
ffc07958: 7c c6 52 14 add r6,r6,r10
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++)
ffc0795c: 42 00 ff e8 bdnz+ ffc07944 <rtems_fdisk_ioctl+0xe30>
count += fd->devices[device].segment_count;
rtems_fdisk_printf (fd, "Queue total\t%ld of %ld, %s", total, count,
ffc07960: 7f 9e 30 00 cmpw cr7,r30,r6
ffc07964: 40 be 00 10 bne+ cr7,ffc07974 <rtems_fdisk_ioctl+0xe60> <== NEVER TAKEN
ffc07968: 3c e0 ff c3 lis r7,-61
ffc0796c: 38 e7 3b f4 addi r7,r7,15348
ffc07970: 48 00 00 0c b ffc0797c <rtems_fdisk_ioctl+0xe68>
ffc07974: 3c e0 ff c3 lis r7,-61 <== NOT EXECUTED
ffc07978: 38 e7 3b f7 addi r7,r7,15351 <== NOT EXECUTED
ffc0797c: 3c 80 ff c3 lis r4,-61
ffc07980: 38 84 40 c5 addi r4,r4,16581
ffc07984: 7f c5 f3 78 mr r5,r30
ffc07988: 7f e3 fb 78 mr r3,r31
ffc0798c: 4c c6 31 82 crclr 4*cr1+eq
ffc07990: 4b ff df 45 bl ffc058d4 <rtems_fdisk_printf>
total == count ? "ok" : "MISSING");
rtems_fdisk_printf (fd, "Device count\t%d", fd->device_count);
ffc07994: 3c 80 ff c3 lis r4,-61
ffc07998: 80 bf 00 30 lwz r5,48(r31)
ffc0799c: 7f e3 fb 78 mr r3,r31
ffc079a0: 38 84 40 e0 addi r4,r4,16608
for (device = 0; device < fd->device_count; device++)
{
uint32_t block;
uint32_t seg;
rtems_fdisk_printf (fd, " Device\t\t%ld", device);
ffc079a4: 3e 20 ff c3 lis r17,-61
count += fd->devices[device].segment_count;
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);
ffc079a8: 4c c6 31 82 crclr 4*cr1+eq
ffc079ac: 4b ff df 29 bl ffc058d4 <rtems_fdisk_printf>
{
uint32_t block;
uint32_t seg;
rtems_fdisk_printf (fd, " Device\t\t%ld", device);
rtems_fdisk_printf (fd, " Segment count\t%ld",
ffc079b0: 3e 00 ff c3 lis r16,-61
for (block = 0; block < fd->block_count; block++)
{
if ((fd->blocks[block].segment == sc) &&
(fd->blocks[block].page == page) && !is_active)
rtems_fdisk_printf (fd,
ffc079b4: 3d e0 ff c3 lis r15,-61
{
if (fd->blocks[block].segment == sc)
count++;
}
rtems_fdisk_printf (fd, " %3ld %s p:%3ld a:%3ld/%3ld" \
ffc079b8: 3d c0 ff c3 lis r14,-61
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++)
ffc079bc: 3b 60 00 00 li r27,0
{
uint32_t block;
uint32_t seg;
rtems_fdisk_printf (fd, " Device\t\t%ld", device);
ffc079c0: 3a 31 40 f0 addi r17,r17,16624
rtems_fdisk_printf (fd, " Segment count\t%ld",
ffc079c4: 3a 10 40 fd addi r16,r16,16637
for (block = 0; block < fd->block_count; block++)
{
if ((fd->blocks[block].segment == sc) &&
(fd->blocks[block].page == page) && !is_active)
rtems_fdisk_printf (fd,
ffc079c8: 39 ef 41 11 addi r15,r15,16657
{
if (fd->blocks[block].segment == sc)
count++;
}
rtems_fdisk_printf (fd, " %3ld %s p:%3ld a:%3ld/%3ld" \
ffc079cc: 39 ce 41 3e addi r14,r14,16702
ffc079d0: 48 00 01 c8 b ffc07b98 <rtems_fdisk_ioctl+0x1084>
for (device = 0; device < fd->device_count; device++)
{
uint32_t block;
uint32_t seg;
rtems_fdisk_printf (fd, " Device\t\t%ld", device);
ffc079d4: 7e 24 8b 78 mr r4,r17
ffc079d8: 7f 65 db 78 mr r5,r27
ffc079dc: 7f e3 fb 78 mr r3,r31
ffc079e0: 4c c6 31 82 crclr 4*cr1+eq
ffc079e4: 4b ff de f1 bl ffc058d4 <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)
ffc079e8: 1f 1b 00 0c mulli r24,r27,12
{
uint32_t block;
uint32_t seg;
rtems_fdisk_printf (fd, " Device\t\t%ld", device);
rtems_fdisk_printf (fd, " Segment count\t%ld",
ffc079ec: 81 3f 00 2c lwz r9,44(r31)
ffc079f0: 7f e3 fb 78 mr r3,r31
ffc079f4: 7d 29 c2 14 add r9,r9,r24
ffc079f8: 80 a9 00 04 lwz r5,4(r9)
ffc079fc: 7e 04 83 78 mr r4,r16
fd->devices[device].segment_count);
for (seg = 0; seg < fd->devices[device].segment_count; seg++)
ffc07a00: 3b 40 00 00 li r26,0
{
uint32_t block;
uint32_t seg;
rtems_fdisk_printf (fd, " Device\t\t%ld", device);
rtems_fdisk_printf (fd, " Segment count\t%ld",
ffc07a04: 4c c6 31 82 crclr 4*cr1+eq
ffc07a08: 4b ff de cd bl ffc058d4 <rtems_fdisk_printf>
ffc07a0c: 48 00 01 74 b ffc07b80 <rtems_fdisk_ioctl+0x106c>
* @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)
ffc07a10: 1d 5a 00 30 mulli r10,r26,48
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];
ffc07a14: 7f c9 c0 2e lwzx r30,r9,r24
ffc07a18: 7f de 52 14 add r30,r30,r10
uint32_t active = 0;
uint32_t used = 0;
bool is_active = false;
char queues[5];
rtems_fdisk_queue_status (fd, sc, queues);
ffc07a1c: 7f e3 fb 78 mr r3,r31
ffc07a20: 7f c4 f3 78 mr r4,r30
ffc07a24: 38 a1 00 20 addi r5,r1,32
ffc07a28: 4b ff e5 69 bl ffc05f90 <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;
ffc07a2c: 3a 80 00 00 li r20,0
{
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;
ffc07a30: 3a a0 00 00 li r21,0
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;
ffc07a34: 3a e0 00 00 li r23,0
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;
ffc07a38: 3a c0 00 00 li r22,0
bool is_active = false;
char queues[5];
rtems_fdisk_queue_status (fd, sc, queues);
for (page = 0; page < sc->pages; page++)
ffc07a3c: 3b a0 00 00 li r29,0
ffc07a40: 48 00 00 b0 b ffc07af0 <rtems_fdisk_ioctl+0xfdc>
{
if (rtems_fdisk_page_desc_erased (&sc->page_descriptors[page]))
ffc07a44: 81 3e 00 10 lwz r9,16(r30)
* @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)
ffc07a48: 57 b9 18 38 rlwinm r25,r29,3,0,28
rtems_fdisk_queue_status (fd, sc, queues);
for (page = 0; page < sc->pages; page++)
{
if (rtems_fdisk_page_desc_erased (&sc->page_descriptors[page]))
ffc07a4c: 7f 29 ca 14 add r25,r9,r25
ffc07a50: 7f 23 cb 78 mr r3,r25
ffc07a54: 4b ff dd 65 bl ffc057b8 <rtems_fdisk_page_desc_erased>
ffc07a58: 2f 83 00 00 cmpwi cr7,r3,0
ffc07a5c: 41 9e 00 0c beq- cr7,ffc07a68 <rtems_fdisk_ioctl+0xf54>
erased++;
ffc07a60: 3a d6 00 01 addi r22,r22,1
ffc07a64: 48 00 00 2c b ffc07a90 <rtems_fdisk_ioctl+0xf7c>
}
rtems_flashdisk_count = rtems_flashdisk_configuration_size;
return RTEMS_SUCCESSFUL;
}
ffc07a68: a1 39 00 02 lhz r9,2(r25)
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],
ffc07a6c: 71 25 00 01 andi. r5,r9,1
ffc07a70: 40 82 00 20 bne- ffc07a90 <rtems_fdisk_ioctl+0xf7c> <== NEVER TAKEN
RTEMS_FDISK_PAGE_ACTIVE))
{
if (rtems_fdisk_page_desc_flags_set (&sc->page_descriptors[page],
ffc07a74: 55 29 07 bc rlwinm r9,r9,0,30,30
ffc07a78: 71 26 ff ff andi. r6,r9,65535
ffc07a7c: 40 82 00 0c bne- ffc07a88 <rtems_fdisk_ioctl+0xf74>
RTEMS_FDISK_PAGE_USED))
used++;
ffc07a80: 3a b5 00 01 addi r21,r21,1
ffc07a84: 48 00 00 0c b ffc07a90 <rtems_fdisk_ioctl+0xf7c>
else
{
active++;
ffc07a88: 3a f7 00 01 addi r23,r23,1
is_active = true;
ffc07a8c: 3a 80 00 01 li r20,1
}
}
for (block = 0; block < fd->block_count; block++)
ffc07a90: 3b 20 00 00 li r25,0
{
if ((fd->blocks[block].segment == sc) &&
(fd->blocks[block].page == page) && !is_active)
ffc07a94: 2e 14 00 00 cmpwi cr4,r20,0
ffc07a98: 48 00 00 48 b ffc07ae0 <rtems_fdisk_ioctl+0xfcc>
}
}
for (block = 0; block < fd->block_count; block++)
{
if ((fd->blocks[block].segment == sc) &&
ffc07a9c: 81 3f 00 18 lwz r9,24(r31)
* @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)
ffc07aa0: 57 2a 18 38 rlwinm r10,r25,3,0,28
}
}
for (block = 0; block < fd->block_count; block++)
{
if ((fd->blocks[block].segment == sc) &&
ffc07aa4: 7d 09 52 14 add r8,r9,r10
ffc07aa8: 7d 29 50 2e lwzx r9,r9,r10
ffc07aac: 7f 89 f0 00 cmpw cr7,r9,r30
ffc07ab0: 40 be 00 2c bne+ cr7,ffc07adc <rtems_fdisk_ioctl+0xfc8>
ffc07ab4: 81 28 00 04 lwz r9,4(r8)
ffc07ab8: 7f 89 e8 00 cmpw cr7,r9,r29
ffc07abc: 40 be 00 20 bne+ cr7,ffc07adc <rtems_fdisk_ioctl+0xfc8>
(fd->blocks[block].page == page) && !is_active)
ffc07ac0: 40 b2 00 1c bne+ cr4,ffc07adc <rtems_fdisk_ioctl+0xfc8> <== ALWAYS TAKEN
rtems_fdisk_printf (fd,
ffc07ac4: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc07ac8: 7d e4 7b 78 mr r4,r15 <== NOT EXECUTED
ffc07acc: 7f a5 eb 78 mr r5,r29 <== NOT EXECUTED
ffc07ad0: 7f 26 cb 78 mr r6,r25 <== NOT EXECUTED
ffc07ad4: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc07ad8: 4b ff dd fd bl ffc058d4 <rtems_fdisk_printf> <== NOT EXECUTED
active++;
is_active = true;
}
}
for (block = 0; block < fd->block_count; block++)
ffc07adc: 3b 39 00 01 addi r25,r25,1
ffc07ae0: 81 3f 00 1c lwz r9,28(r31)
ffc07ae4: 7f 99 48 40 cmplw cr7,r25,r9
ffc07ae8: 41 9c ff b4 blt+ cr7,ffc07a9c <rtems_fdisk_ioctl+0xf88>
bool is_active = false;
char queues[5];
rtems_fdisk_queue_status (fd, sc, queues);
for (page = 0; page < sc->pages; page++)
ffc07aec: 3b bd 00 01 addi r29,r29,1
ffc07af0: 80 fe 00 14 lwz r7,20(r30)
ffc07af4: 7f 9d 38 40 cmplw cr7,r29,r7
ffc07af8: 41 9c ff 4c blt+ cr7,ffc07a44 <rtems_fdisk_ioctl+0xf30>
page, block);
}
}
count = 0;
for (block = 0; block < fd->block_count; block++)
ffc07afc: 81 1f 00 1c lwz r8,28(r31)
ffc07b00: 39 40 00 00 li r10,0
ffc07b04: 39 20 00 00 li r9,0
ffc07b08: 39 08 00 01 addi r8,r8,1
ffc07b0c: 7d 09 03 a6 mtctr r8
ffc07b10: 48 00 00 24 b ffc07b34 <rtems_fdisk_ioctl+0x1020>
{
if (fd->blocks[block].segment == sc)
ffc07b14: 81 1f 00 18 lwz r8,24(r31)
ffc07b18: 55 46 18 38 rlwinm r6,r10,3,0,28
page, block);
}
}
count = 0;
for (block = 0; block < fd->block_count; block++)
ffc07b1c: 39 4a 00 01 addi r10,r10,1
{
if (fd->blocks[block].segment == sc)
ffc07b20: 7d 08 30 2e lwzx r8,r8,r6
count++;
ffc07b24: 7d 05 f2 78 xor r5,r8,r30
ffc07b28: 20 a5 00 00 subfic r5,r5,0
ffc07b2c: 7c a9 01 94 addze r5,r9
ffc07b30: 7c a9 2b 78 mr r9,r5
page, block);
}
}
count = 0;
for (block = 0; block < fd->block_count; block++)
ffc07b34: 42 00 ff e0 bdnz+ ffc07b14 <rtems_fdisk_ioctl+0x1000>
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 +
ffc07b38: 81 1e 00 1c lwz r8,28(r30)
{
if (fd->blocks[block].segment == sc)
count++;
}
rtems_fdisk_printf (fd, " %3ld %s p:%3ld a:%3ld/%3ld" \
ffc07b3c: 7f e3 fb 78 mr r3,r31
" 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 +
sc->pages_used + sc->pages_bad),
ffc07b40: 81 5e 00 20 lwz r10,32(r30)
{
if (fd->blocks[block].segment == sc)
count++;
}
rtems_fdisk_printf (fd, " %3ld %s p:%3ld a:%3ld/%3ld" \
ffc07b44: 7d c4 73 78 mr r4,r14
ffc07b48: 92 a1 00 08 stw r21,8(r1)
* @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)
ffc07b4c: 7c a8 52 14 add r5,r8,r10
{
if (fd->blocks[block].segment == sc)
count++;
}
rtems_fdisk_printf (fd, " %3ld %s p:%3ld a:%3ld/%3ld" \
ffc07b50: 92 c1 00 0c stw r22,12(r1)
* @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)
ffc07b54: 80 de 00 24 lwz r6,36(r30)
{
if (fd->blocks[block].segment == sc)
count++;
}
rtems_fdisk_printf (fd, " %3ld %s p:%3ld a:%3ld/%3ld" \
ffc07b58: 91 21 00 14 stw r9,20(r1)
ffc07b5c: 7e e9 bb 78 mr r9,r23
* @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)
ffc07b60: 7c c5 32 14 add r6,r5,r6
{
if (fd->blocks[block].segment == sc)
count++;
}
rtems_fdisk_printf (fd, " %3ld %s p:%3ld a:%3ld/%3ld" \
ffc07b64: 7c c6 38 50 subf r6,r6,r7
ffc07b68: 90 c1 00 10 stw r6,16(r1)
ffc07b6c: 7f 45 d3 78 mr r5,r26
ffc07b70: 38 c1 00 20 addi r6,r1,32
ffc07b74: 4c c6 31 82 crclr 4*cr1+eq
ffc07b78: 4b ff dd 5d bl ffc058d4 <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++)
ffc07b7c: 3b 5a 00 01 addi r26,r26,1
ffc07b80: 81 3f 00 2c lwz r9,44(r31)
ffc07b84: 7d 49 c2 14 add r10,r9,r24
ffc07b88: 81 4a 00 04 lwz r10,4(r10)
ffc07b8c: 7f 9a 50 40 cmplw cr7,r26,r10
ffc07b90: 41 9c fe 80 blt+ cr7,ffc07a10 <rtems_fdisk_ioctl+0xefc>
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++)
ffc07b94: 3b 7b 00 01 addi r27,r27,1
ffc07b98: 81 3f 00 30 lwz r9,48(r31)
ffc07b9c: 7f 9b 48 40 cmplw cr7,r27,r9
ffc07ba0: 41 9c fe 34 blt+ cr7,ffc079d4 <rtems_fdisk_ioctl+0xec0>
}
{
rtems_fdisk_segment_ctl* sc = fd->used.head;
int count = 0;
rtems_fdisk_printf (fd, "Used List:");
ffc07ba4: 3c 80 ff c3 lis r4,-61
count);
}
}
{
rtems_fdisk_segment_ctl* sc = fd->used.head;
ffc07ba8: 83 df 00 40 lwz r30,64(r31)
int count = 0;
rtems_fdisk_printf (fd, "Used List:");
ffc07bac: 7f e3 fb 78 mr r3,r31
ffc07bb0: 38 84 41 7a addi r4,r4,16762
while (sc)
{
rtems_fdisk_printf (fd, " %3d %02d:%03d u:%3ld",
ffc07bb4: 3f 60 ff c3 lis r27,-61
}
{
rtems_fdisk_segment_ctl* sc = fd->used.head;
int count = 0;
rtems_fdisk_printf (fd, "Used List:");
ffc07bb8: 4c c6 31 82 crclr 4*cr1+eq
ffc07bbc: 4b ff dd 19 bl ffc058d4 <rtems_fdisk_printf>
}
}
{
rtems_fdisk_segment_ctl* sc = fd->used.head;
int count = 0;
ffc07bc0: 3b a0 00 00 li r29,0
rtems_fdisk_printf (fd, "Used List:");
while (sc)
{
rtems_fdisk_printf (fd, " %3d %02d:%03d u:%3ld",
ffc07bc4: 3b 7b 41 85 addi r27,r27,16773
ffc07bc8: 48 00 00 2c b ffc07bf4 <rtems_fdisk_ioctl+0x10e0>
ffc07bcc: 80 de 00 08 lwz r6,8(r30)
ffc07bd0: 7f a5 eb 78 mr r5,r29
ffc07bd4: 80 fe 00 0c lwz r7,12(r30)
ffc07bd8: 7f e3 fb 78 mr r3,r31
ffc07bdc: 81 1e 00 20 lwz r8,32(r30)
ffc07be0: 7f 64 db 78 mr r4,r27
count, sc->device, sc->segment, sc->pages_used);
sc = sc->next;
count++;
ffc07be4: 3b bd 00 01 addi r29,r29,1
rtems_fdisk_segment_ctl* sc = fd->used.head;
int count = 0;
rtems_fdisk_printf (fd, "Used List:");
while (sc)
{
rtems_fdisk_printf (fd, " %3d %02d:%03d u:%3ld",
ffc07be8: 4c c6 31 82 crclr 4*cr1+eq
ffc07bec: 4b ff dc e9 bl ffc058d4 <rtems_fdisk_printf>
count, sc->device, sc->segment, sc->pages_used);
sc = sc->next;
ffc07bf0: 83 de 00 00 lwz r30,0(r30)
{
rtems_fdisk_segment_ctl* sc = fd->used.head;
int count = 0;
rtems_fdisk_printf (fd, "Used List:");
while (sc)
ffc07bf4: 2f 9e 00 00 cmpwi cr7,r30,0
ffc07bf8: 40 9e ff d4 bne+ cr7,ffc07bcc <rtems_fdisk_ioctl+0x10b8>
count, sc->device, sc->segment, sc->pages_used);
sc = sc->next;
count++;
}
}
fd->info_level = current_info_level;
ffc07bfc: 92 5f 00 6c stw r18,108(r31)
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]);
ffc07c00: 93 d3 00 00 stw r30,0(r19)
break;
ffc07c04: 48 00 00 14 b ffc07c18 <rtems_fdisk_ioctl+0x1104>
default:
rtems_blkdev_ioctl (dd, req, argp);
ffc07c08: 7f 63 db 78 mr r3,r27
ffc07c0c: 7f a4 eb 78 mr r4,r29
ffc07c10: 7f e5 fb 78 mr r5,r31
ffc07c14: 48 00 f1 b1 bl ffc16dc4 <rtems_blkdev_ioctl>
break;
}
sc = rtems_semaphore_release (rtems_flashdisks[minor].lock);
ffc07c18: 3d 20 00 01 lis r9,1
ffc07c1c: 81 29 29 74 lwz r9,10612(r9)
ffc07c20: 7f 89 e2 14 add r28,r9,r28
ffc07c24: 80 7c 00 64 lwz r3,100(r28)
ffc07c28: 48 00 5d e1 bl ffc0da08 <rtems_semaphore_release>
if (sc != RTEMS_SUCCESSFUL)
ffc07c2c: 2f 83 00 00 cmpwi cr7,r3,0
ffc07c30: 41 be 00 10 beq+ cr7,ffc07c40 <rtems_fdisk_ioctl+0x112c><== ALWAYS TAKEN
errno = EIO;
ffc07c34: 48 01 a3 b5 bl ffc21fe8 <__errno> <== NOT EXECUTED
ffc07c38: 39 20 00 05 li r9,5 <== NOT EXECUTED
ffc07c3c: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED
}
return errno == 0 ? 0 : -1;
ffc07c40: 48 01 a3 a9 bl ffc21fe8 <__errno>
ffc07c44: 81 23 00 00 lwz r9,0(r3)
ffc07c48: 2f 89 00 00 cmpwi cr7,r9,0
ffc07c4c: 40 9e 00 0c bne- cr7,ffc07c58 <rtems_fdisk_ioctl+0x1144>
ffc07c50: 38 60 00 00 li r3,0
ffc07c54: 48 00 00 24 b ffc07c78 <rtems_fdisk_ioctl+0x1164>
ffc07c58: 38 60 ff ff li r3,-1
ffc07c5c: 48 00 00 1c b ffc07c78 <rtems_fdisk_ioctl+0x1164>
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)
ffc07c60: 81 3d 00 14 lwz r9,20(r29)
ffc07c64: 3b 18 00 01 addi r24,r24,1
ffc07c68: 7f 39 4a 14 add r25,r25,r9
ffc07c6c: 4b ff f2 38 b ffc06ea4 <rtems_fdisk_ioctl+0x390>
ffc07c70: 39 20 00 01 li r9,1 <== NOT EXECUTED
ffc07c74: 4b ff f2 3c b ffc06eb0 <rtems_fdisk_ioctl+0x39c> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
errno = EIO;
}
return errno == 0 ? 0 : -1;
}
ffc07c78: 81 81 00 4c lwz r12,76(r1)
ffc07c7c: 39 61 00 98 addi r11,r1,152
ffc07c80: 7d 80 81 20 mtcrf 8,r12
ffc07c84: 4b ff 98 a4 b ffc01528 <_restgpr_14_x>
ffc058d4 <rtems_fdisk_printf>:
* @param ... The arguments for the format text.
* @return int The number of bytes written to the output.
*/
static int
rtems_fdisk_printf (const rtems_flashdisk* fd, const char *format, ...)
{
ffc058d4: 94 21 ff 80 stwu r1,-128(r1)
ffc058d8: 7c 08 02 a6 mflr r0
ffc058dc: bf a1 00 74 stmw r29,116(r1)
ffc058e0: 90 01 00 84 stw r0,132(r1)
ffc058e4: 90 a1 00 18 stw r5,24(r1)
ffc058e8: 90 c1 00 1c stw r6,28(r1)
ffc058ec: 90 e1 00 20 stw r7,32(r1)
ffc058f0: 91 01 00 24 stw r8,36(r1)
ffc058f4: 91 21 00 28 stw r9,40(r1)
ffc058f8: 91 41 00 2c stw r10,44(r1)
ffc058fc: 40 86 00 24 bne- cr1,ffc05920 <rtems_fdisk_printf+0x4c> <== ALWAYS TAKEN
ffc05900: d8 21 00 30 stfd f1,48(r1) <== NOT EXECUTED
ffc05904: d8 41 00 38 stfd f2,56(r1) <== NOT EXECUTED
ffc05908: d8 61 00 40 stfd f3,64(r1) <== NOT EXECUTED
ffc0590c: d8 81 00 48 stfd f4,72(r1) <== NOT EXECUTED
ffc05910: d8 a1 00 50 stfd f5,80(r1) <== NOT EXECUTED
ffc05914: d8 c1 00 58 stfd f6,88(r1) <== NOT EXECUTED
ffc05918: d8 e1 00 60 stfd f7,96(r1) <== NOT EXECUTED
ffc0591c: d9 01 00 68 stfd f8,104(r1) <== NOT EXECUTED
int ret = 0;
if (fd->info_level >= 3)
ffc05920: 81 23 00 6c lwz r9,108(r3)
* @param ... The arguments for the format text.
* @return int The number of bytes written to the output.
*/
static int
rtems_fdisk_printf (const rtems_flashdisk* fd, const char *format, ...)
{
ffc05924: 7c 9d 23 78 mr r29,r4
int ret = 0;
ffc05928: 3b c0 00 00 li r30,0
if (fd->info_level >= 3)
ffc0592c: 2b 89 00 02 cmplwi cr7,r9,2
ffc05930: 40 bd 00 6c ble+ cr7,ffc0599c <rtems_fdisk_printf+0xc8>
{
va_list args;
va_start (args, format);
ffc05934: 39 20 00 02 li r9,2
ffc05938: 9b c1 00 09 stb r30,9(r1)
fprintf (stdout, "fdisk:");
ffc0593c: 3f e0 00 00 lis r31,0
{
int ret = 0;
if (fd->info_level >= 3)
{
va_list args;
va_start (args, format);
ffc05940: 99 21 00 08 stb r9,8(r1)
ffc05944: 39 21 00 88 addi r9,r1,136
fprintf (stdout, "fdisk:");
ffc05948: 3c 60 ff c3 lis r3,-61
{
int ret = 0;
if (fd->info_level >= 3)
{
va_list args;
va_start (args, format);
ffc0594c: 91 21 00 0c stw r9,12(r1)
ffc05950: 39 21 00 10 addi r9,r1,16
fprintf (stdout, "fdisk:");
ffc05954: 38 63 37 7c addi r3,r3,14204
{
int ret = 0;
if (fd->info_level >= 3)
{
va_list args;
va_start (args, format);
ffc05958: 91 21 00 10 stw r9,16(r1)
fprintf (stdout, "fdisk:");
ffc0595c: 81 3f 28 0c lwz r9,10252(r31)
ffc05960: 80 89 00 08 lwz r4,8(r9)
ffc05964: 48 01 d2 91 bl ffc22bf4 <fputs>
ret = vfprintf (stdout, format, args);
ffc05968: 81 3f 28 0c lwz r9,10252(r31)
ffc0596c: 7f a4 eb 78 mr r4,r29
ffc05970: 80 69 00 08 lwz r3,8(r9)
ffc05974: 38 a1 00 08 addi r5,r1,8
ffc05978: 48 02 65 f9 bl ffc2bf70 <vfprintf>
fprintf (stdout, "\n");
ffc0597c: 81 3f 28 0c lwz r9,10252(r31)
if (fd->info_level >= 3)
{
va_list args;
va_start (args, format);
fprintf (stdout, "fdisk:");
ret = vfprintf (stdout, format, args);
ffc05980: 7c 7e 1b 78 mr r30,r3
fprintf (stdout, "\n");
ffc05984: 80 89 00 08 lwz r4,8(r9)
ffc05988: 38 60 00 0a li r3,10
ffc0598c: 48 01 d1 51 bl ffc22adc <fputc>
fflush (stdout);
ffc05990: 81 3f 28 0c lwz r9,10252(r31)
ffc05994: 80 69 00 08 lwz r3,8(r9)
ffc05998: 48 01 cb 19 bl ffc224b0 <fflush>
va_end (args);
}
return ret;
}
ffc0599c: 39 61 00 80 addi r11,r1,128
ffc059a0: 7f c3 f3 78 mr r3,r30
ffc059a4: 4b ff bb c0 b ffc01564 <_restgpr_29_x>
ffc0604c <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)
{
ffc0604c: 94 21 ff d8 stwu r1,-40(r1)
ffc06050: 7c 08 02 a6 mflr r0
ffc06054: 90 01 00 2c stw r0,44(r1)
ffc06058: bf 61 00 14 stmw r27,20(r1)
ffc0605c: 7c 9f 23 78 mr r31,r4
ffc06060: 7c 7e 1b 78 mr r30,r3
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd, " queue-seg:%02d-%03d: p=%d a=%d u=%d b=%d f=%s n=%s",
ffc06064: 80 a4 00 08 lwz r5,8(r4)
ffc06068: 80 c4 00 0c lwz r6,12(r4)
ffc0606c: 80 e4 00 14 lwz r7,20(r4)
ffc06070: 81 04 00 1c lwz r8,28(r4)
ffc06074: 81 24 00 20 lwz r9,32(r4)
ffc06078: 81 44 00 24 lwz r10,36(r4)
ffc0607c: 80 84 00 28 lwz r4,40(r4)
ffc06080: 2f 84 00 00 cmpwi cr7,r4,0
ffc06084: 41 9e 00 10 beq- cr7,ffc06094 <rtems_fdisk_queue_segment+0x48><== ALWAYS TAKEN
ffc06088: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc0608c: 38 63 38 6e addi r3,r3,14446 <== NOT EXECUTED
ffc06090: 48 00 00 0c b ffc0609c <rtems_fdisk_queue_segment+0x50><== NOT EXECUTED
ffc06094: 3c 60 ff c3 lis r3,-61
ffc06098: 38 63 53 ff addi r3,r3,21503
ffc0609c: 80 9f 00 00 lwz r4,0(r31)
ffc060a0: 2f 84 00 00 cmpwi cr7,r4,0
ffc060a4: 41 9e 00 10 beq- cr7,ffc060b4 <rtems_fdisk_queue_segment+0x68>
ffc060a8: 3c 80 ff c3 lis r4,-61
ffc060ac: 38 84 54 92 addi r4,r4,21650
ffc060b0: 48 00 00 0c b ffc060bc <rtems_fdisk_queue_segment+0x70>
ffc060b4: 3c 80 ff c3 lis r4,-61
ffc060b8: 38 84 38 75 addi r4,r4,14453
ffc060bc: 90 61 00 08 stw r3,8(r1)
ffc060c0: 7f c3 f3 78 mr r3,r30
ffc060c4: 90 81 00 0c stw r4,12(r1)
ffc060c8: 3c 80 ff c3 lis r4,-61
ffc060cc: 38 84 38 7a addi r4,r4,14458
ffc060d0: 4c c6 31 82 crclr 4*cr1+eq
ffc060d4: 4b ff f7 2d bl ffc05800 <rtems_fdisk_info>
/*
* If the segment has failed then check the failed queue and append
* if not failed.
*/
if (sc->failed)
ffc060d8: 81 3f 00 28 lwz r9,40(r31)
ffc060dc: 2f 89 00 00 cmpwi cr7,r9,0
ffc060e0: 41 9e 00 24 beq- cr7,ffc06104 <rtems_fdisk_queue_segment+0xb8><== ALWAYS TAKEN
}
rtems_flashdisk_count = rtems_flashdisk_configuration_size;
return RTEMS_SUCCESSFUL;
}
ffc060e4: 81 3e 00 58 lwz r9,88(r30) <== NOT EXECUTED
ffc060e8: 48 00 00 10 b ffc060f8 <rtems_fdisk_queue_segment+0xac><== NOT EXECUTED
{
rtems_fdisk_segment_ctl* it = queue->head;
while (it)
{
if (it == sc)
ffc060ec: 7f 89 f8 00 cmpw cr7,r9,r31 <== NOT EXECUTED
ffc060f0: 41 9e 01 20 beq- cr7,ffc06210 <rtems_fdisk_queue_segment+0x1c4><== NOT EXECUTED
return true;
it = it->next;
ffc060f4: 81 29 00 00 lwz r9,0(r9) <== 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)
ffc060f8: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED
ffc060fc: 40 9e ff f0 bne+ cr7,ffc060ec <rtems_fdisk_queue_segment+0xa0><== NOT EXECUTED
ffc06100: 48 00 00 bc b ffc061bc <rtems_fdisk_queue_segment+0x170><== NOT EXECUTED
}
/*
* Remove the queue from the available or used queue.
*/
rtems_fdisk_segment_queue_remove (&fd->available, sc);
ffc06104: 3b be 00 34 addi r29,r30,52
ffc06108: 7f a3 eb 78 mr r3,r29
ffc0610c: 7f e4 fb 78 mr r4,r31
rtems_fdisk_segment_queue_remove (&fd->used, sc);
ffc06110: 3b 9e 00 40 addi r28,r30,64
}
/*
* Remove the queue from the available or used queue.
*/
rtems_fdisk_segment_queue_remove (&fd->available, sc);
ffc06114: 4b ff f5 ed bl ffc05700 <rtems_fdisk_segment_queue_remove>
rtems_fdisk_segment_queue_remove (&fd->used, sc);
ffc06118: 7f 83 e3 78 mr r3,r28
ffc0611c: 7f e4 fb 78 mr r4,r31
ffc06120: 4b ff f5 e1 bl ffc05700 <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)
ffc06124: 7f e3 fb 78 mr r3,r31
ffc06128: 4b ff f6 b9 bl ffc057e0 <rtems_fdisk_seg_pages_available>
ffc0612c: 7c 7b 1b 79 mr. r27,r3
ffc06130: 40 82 00 64 bne- ffc06194 <rtems_fdisk_queue_segment+0x148>
{
if (sc->pages_active)
ffc06134: 81 3f 00 1c lwz r9,28(r31)
ffc06138: 2f 89 00 00 cmpwi cr7,r9,0
ffc0613c: 41 9e 00 2c beq- cr7,ffc06168 <rtems_fdisk_queue_segment+0x11c><== 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;
ffc06140: 80 9e 00 40 lwz r4,64(r30)
while (seg)
ffc06144: 48 00 00 18 b ffc0615c <rtems_fdisk_queue_segment+0x110>
{
if (sc->pages_used > seg->pages_used)
ffc06148: 81 5f 00 20 lwz r10,32(r31)
ffc0614c: 81 24 00 20 lwz r9,32(r4)
ffc06150: 7f 8a 48 40 cmplw cr7,r10,r9
ffc06154: 41 9d 00 78 bgt- cr7,ffc061cc <rtems_fdisk_queue_segment+0x180>
break;
seg = seg->next;
ffc06158: 80 84 00 00 lwz r4,0(r4)
* 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)
ffc0615c: 2f 84 00 00 cmpwi cr7,r4,0
ffc06160: 40 9e ff e8 bne+ cr7,ffc06148 <rtems_fdisk_queue_segment+0xfc>
ffc06164: 48 00 00 60 b ffc061c4 <rtems_fdisk_queue_segment+0x178>
else
rtems_fdisk_segment_queue_push_tail (&fd->used, sc);
}
else
{
if ((fd->flags & RTEMS_FDISK_BACKGROUND_ERASE))
ffc06168: 81 3e 00 08 lwz r9,8(r30) <== NOT EXECUTED
rtems_fdisk_segment_queue_push_tail (&fd->erase, sc);
ffc0616c: 38 7e 00 4c addi r3,r30,76 <== NOT EXECUTED
else
rtems_fdisk_segment_queue_push_tail (&fd->used, sc);
}
else
{
if ((fd->flags & RTEMS_FDISK_BACKGROUND_ERASE))
ffc06170: 71 2a 00 01 andi. r10,r9,1 <== NOT EXECUTED
ffc06174: 40 82 00 84 bne- ffc061f8 <rtems_fdisk_queue_segment+0x1ac><== NOT EXECUTED
if (seg)
rtems_fdisk_segment_queue_insert_before (&fd->available, seg, sc);
else
rtems_fdisk_segment_queue_push_tail (&fd->available, sc);
}
}
ffc06178: 80 01 00 2c lwz r0,44(r1) <== 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);
ffc0617c: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc06180: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED
if (seg)
rtems_fdisk_segment_queue_insert_before (&fd->available, seg, sc);
else
rtems_fdisk_segment_queue_push_tail (&fd->available, sc);
}
}
ffc06184: bb 61 00 14 lmw r27,20(r1) <== NOT EXECUTED
ffc06188: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED
ffc0618c: 38 21 00 28 addi r1,r1,40 <== 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);
ffc06190: 4b ff fc f0 b ffc05e80 <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;
ffc06194: 83 de 00 34 lwz r30,52(r30)
while (seg)
ffc06198: 48 00 00 18 b ffc061b0 <rtems_fdisk_queue_segment+0x164>
{
if (rtems_fdisk_seg_pages_available (sc) <
rtems_fdisk_seg_pages_available (seg))
ffc0619c: 7f c3 f3 78 mr r3,r30
ffc061a0: 4b ff f6 41 bl ffc057e0 <rtems_fdisk_seg_pages_available>
*/
rtems_fdisk_segment_ctl* seg = fd->available.head;
while (seg)
{
if (rtems_fdisk_seg_pages_available (sc) <
ffc061a4: 7f 9b 18 40 cmplw cr7,r27,r3
ffc061a8: 41 9c 00 2c blt- cr7,ffc061d4 <rtems_fdisk_queue_segment+0x188>
rtems_fdisk_seg_pages_available (seg))
break;
seg = seg->next;
ffc061ac: 83 de 00 00 lwz r30,0(r30)
* 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)
ffc061b0: 2f 9e 00 00 cmpwi cr7,r30,0
ffc061b4: 40 9e ff e8 bne+ cr7,ffc0619c <rtems_fdisk_queue_segment+0x150>
ffc061b8: 48 00 00 3c b ffc061f4 <rtems_fdisk_queue_segment+0x1a8>
* if not failed.
*/
if (sc->failed)
{
if (!rtems_fdisk_segment_queue_present (&fd->failed, sc))
rtems_fdisk_segment_queue_push_tail (&fd->failed, sc);
ffc061bc: 38 7e 00 58 addi r3,r30,88 <== NOT EXECUTED
ffc061c0: 48 00 00 38 b ffc061f8 <rtems_fdisk_queue_segment+0x1ac><== NOT EXECUTED
}
if (seg)
rtems_fdisk_segment_queue_insert_before (&fd->used, seg, sc);
else
rtems_fdisk_segment_queue_push_tail (&fd->used, sc);
ffc061c4: 7f 83 e3 78 mr r3,r28
ffc061c8: 48 00 00 30 b ffc061f8 <rtems_fdisk_queue_segment+0x1ac>
break;
seg = seg->next;
}
if (seg)
rtems_fdisk_segment_queue_insert_before (&fd->used, seg, sc);
ffc061cc: 7f 83 e3 78 mr r3,r28
ffc061d0: 48 00 00 0c b ffc061dc <rtems_fdisk_queue_segment+0x190>
break;
seg = seg->next;
}
if (seg)
rtems_fdisk_segment_queue_insert_before (&fd->available, seg, sc);
ffc061d4: 7f a3 eb 78 mr r3,r29
ffc061d8: 7f c4 f3 78 mr r4,r30
else
rtems_fdisk_segment_queue_push_tail (&fd->available, sc);
}
}
ffc061dc: 80 01 00 2c lwz r0,44(r1)
break;
seg = seg->next;
}
if (seg)
rtems_fdisk_segment_queue_insert_before (&fd->available, seg, sc);
ffc061e0: 7f e5 fb 78 mr r5,r31
else
rtems_fdisk_segment_queue_push_tail (&fd->available, sc);
}
}
ffc061e4: bb 61 00 14 lmw r27,20(r1)
ffc061e8: 7c 08 03 a6 mtlr r0
ffc061ec: 38 21 00 28 addi r1,r1,40
break;
seg = seg->next;
}
if (seg)
rtems_fdisk_segment_queue_insert_before (&fd->available, seg, sc);
ffc061f0: 4b ff f5 7c b ffc0576c <rtems_fdisk_segment_queue_insert_before>
else
rtems_fdisk_segment_queue_push_tail (&fd->available, sc);
ffc061f4: 7f a3 eb 78 mr r3,r29
}
}
ffc061f8: 80 01 00 2c lwz r0,44(r1)
}
if (seg)
rtems_fdisk_segment_queue_insert_before (&fd->available, seg, sc);
else
rtems_fdisk_segment_queue_push_tail (&fd->available, sc);
ffc061fc: 7f e4 fb 78 mr r4,r31
}
}
ffc06200: bb 61 00 14 lmw r27,20(r1)
ffc06204: 7c 08 03 a6 mtlr r0
ffc06208: 38 21 00 28 addi r1,r1,40
}
if (seg)
rtems_fdisk_segment_queue_insert_before (&fd->available, seg, sc);
else
rtems_fdisk_segment_queue_push_tail (&fd->available, sc);
ffc0620c: 4b ff f4 b0 b ffc056bc <rtems_fdisk_segment_queue_push_tail>
}
}
ffc06210: 39 61 00 28 addi r11,r1,40 <== NOT EXECUTED
ffc06214: 4b ff b3 48 b ffc0155c <_restgpr_27_x> <== NOT EXECUTED
ffc05f90 <rtems_fdisk_queue_status>:
}
rtems_flashdisk_count = rtems_flashdisk_configuration_size;
return RTEMS_SUCCESSFUL;
}
ffc05f90: 81 23 00 34 lwz r9,52(r3)
ffc05f94: 48 00 00 10 b ffc05fa4 <rtems_fdisk_queue_status+0x14>
{
rtems_fdisk_segment_ctl* it = queue->head;
while (it)
{
if (it == sc)
ffc05f98: 7f 89 20 00 cmpw cr7,r9,r4
ffc05f9c: 41 9e 00 18 beq- cr7,ffc05fb4 <rtems_fdisk_queue_status+0x24>
return true;
it = it->next;
ffc05fa0: 81 29 00 00 lwz r9,0(r9)
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)
ffc05fa4: 2f 89 00 00 cmpwi cr7,r9,0
ffc05fa8: 40 9e ff f0 bne+ cr7,ffc05f98 <rtems_fdisk_queue_status+0x8>
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' : '-';
ffc05fac: 39 20 00 2d li r9,45
ffc05fb0: 48 00 00 08 b ffc05fb8 <rtems_fdisk_queue_status+0x28>
ffc05fb4: 39 20 00 41 li r9,65
ffc05fb8: 99 25 00 00 stb r9,0(r5)
}
rtems_flashdisk_count = rtems_flashdisk_configuration_size;
return RTEMS_SUCCESSFUL;
}
ffc05fbc: 81 23 00 40 lwz r9,64(r3)
ffc05fc0: 48 00 00 10 b ffc05fd0 <rtems_fdisk_queue_status+0x40>
{
rtems_fdisk_segment_ctl* it = queue->head;
while (it)
{
if (it == sc)
ffc05fc4: 7f 89 20 00 cmpw cr7,r9,r4
ffc05fc8: 41 9e 00 18 beq- cr7,ffc05fe0 <rtems_fdisk_queue_status+0x50>
return true;
it = it->next;
ffc05fcc: 81 29 00 00 lwz r9,0(r9)
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)
ffc05fd0: 2f 89 00 00 cmpwi cr7,r9,0
ffc05fd4: 40 9e ff f0 bne+ cr7,ffc05fc4 <rtems_fdisk_queue_status+0x34>
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' : '-';
ffc05fd8: 39 20 00 2d li r9,45
ffc05fdc: 48 00 00 08 b ffc05fe4 <rtems_fdisk_queue_status+0x54>
ffc05fe0: 39 20 00 55 li r9,85
ffc05fe4: 99 25 00 01 stb r9,1(r5)
}
rtems_flashdisk_count = rtems_flashdisk_configuration_size;
return RTEMS_SUCCESSFUL;
}
ffc05fe8: 81 23 00 4c lwz r9,76(r3)
ffc05fec: 48 00 00 10 b ffc05ffc <rtems_fdisk_queue_status+0x6c>
{
rtems_fdisk_segment_ctl* it = queue->head;
while (it)
{
if (it == sc)
ffc05ff0: 7f 89 20 00 cmpw cr7,r9,r4 <== NOT EXECUTED
ffc05ff4: 41 9e 00 18 beq- cr7,ffc0600c <rtems_fdisk_queue_status+0x7c><== NOT EXECUTED
return true;
it = it->next;
ffc05ff8: 81 29 00 00 lwz r9,0(r9) <== 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)
ffc05ffc: 2f 89 00 00 cmpwi cr7,r9,0
ffc06000: 40 9e ff f0 bne+ cr7,ffc05ff0 <rtems_fdisk_queue_status+0x60><== 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' : '-';
ffc06004: 39 20 00 2d li r9,45
ffc06008: 48 00 00 08 b ffc06010 <rtems_fdisk_queue_status+0x80>
ffc0600c: 39 20 00 45 li r9,69 <== NOT EXECUTED
ffc06010: 99 25 00 02 stb r9,2(r5)
}
rtems_flashdisk_count = rtems_flashdisk_configuration_size;
return RTEMS_SUCCESSFUL;
}
ffc06014: 81 23 00 58 lwz r9,88(r3)
ffc06018: 48 00 00 10 b ffc06028 <rtems_fdisk_queue_status+0x98>
{
rtems_fdisk_segment_ctl* it = queue->head;
while (it)
{
if (it == sc)
ffc0601c: 7f 89 20 00 cmpw cr7,r9,r4 <== NOT EXECUTED
ffc06020: 41 9e 00 18 beq- cr7,ffc06038 <rtems_fdisk_queue_status+0xa8><== NOT EXECUTED
return true;
it = it->next;
ffc06024: 81 29 00 00 lwz r9,0(r9) <== 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)
ffc06028: 2f 89 00 00 cmpwi cr7,r9,0
ffc0602c: 40 9e ff f0 bne+ cr7,ffc0601c <rtems_fdisk_queue_status+0x8c><== 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' : '-';
ffc06030: 39 20 00 2d li r9,45
ffc06034: 48 00 00 08 b ffc0603c <rtems_fdisk_queue_status+0xac>
ffc06038: 39 20 00 46 li r9,70 <== NOT EXECUTED
ffc0603c: 99 25 00 03 stb r9,3(r5)
queues[4] = '\0';
ffc06040: 39 20 00 00 li r9,0
ffc06044: 99 25 00 04 stb r9,4(r5)
ffc06048: 4e 80 00 20 blr
ffc067c0 <rtems_fdisk_recover_block_mappings>:
/**
* Recover the block mappings from the devices.
*/
static int
rtems_fdisk_recover_block_mappings (rtems_flashdisk* fd)
{
ffc067c0: 94 21 ff c0 stwu r1,-64(r1)
ffc067c4: 7c 08 02 a6 mflr r0
rtems_fdisk_segment_queue_init (&fd->failed);
/*
* Clear the lock mappings.
*/
memset (fd->blocks, 0, fd->block_count * sizeof (rtems_fdisk_block_ctl));
ffc067c8: 38 80 00 00 li r4,0
/**
* Recover the block mappings from the devices.
*/
static int
rtems_fdisk_recover_block_mappings (rtems_flashdisk* fd)
{
ffc067cc: 90 01 00 44 stw r0,68(r1)
ffc067d0: be 41 00 08 stmw r18,8(r1)
* Initialise the segment control queue.
*/
static void
rtems_fdisk_segment_queue_init (rtems_fdisk_segment_ctl_queue* queue)
{
queue->head = queue->tail = 0;
ffc067d4: 3b c0 00 00 li r30,0
/**
* Recover the block mappings from the devices.
*/
static int
rtems_fdisk_recover_block_mappings (rtems_flashdisk* fd)
{
ffc067d8: 7c 7f 1b 78 mr r31,r3
rtems_fdisk_segment_queue_init (&fd->failed);
/*
* Clear the lock mappings.
*/
memset (fd->blocks, 0, fd->block_count * sizeof (rtems_fdisk_block_ctl));
ffc067dc: 80 a3 00 1c lwz r5,28(r3)
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);
ffc067e0: 3e c0 ff c3 lis r22,-61
* Initialise the segment control queue.
*/
static void
rtems_fdisk_segment_queue_init (rtems_fdisk_segment_ctl_queue* queue)
{
queue->head = queue->tail = 0;
ffc067e4: 93 c3 00 38 stw r30,56(r3)
* 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: " \
ffc067e8: 3e a0 ff c3 lis r21,-61
rtems_fdisk_segment_queue_init (&fd->failed);
/*
* Clear the lock mappings.
*/
memset (fd->blocks, 0, fd->block_count * sizeof (rtems_fdisk_block_ctl));
ffc067ec: 54 a5 18 38 rlwinm r5,r5,3,0,28
* Initialise the segment control queue.
*/
static void
rtems_fdisk_segment_queue_init (rtems_fdisk_segment_ctl_queue* queue)
{
queue->head = queue->tail = 0;
ffc067f0: 93 c3 00 34 stw r30,52(r3)
else if (rtems_fdisk_page_desc_flags_set (pd, RTEMS_FDISK_PAGE_ACTIVE))
{
if (pd->block >= fd->block_count)
{
#if RTEMS_FDISK_TRACE
rtems_fdisk_warning (fd,
ffc067f4: 3e 80 ff c3 lis r20,-61
++fd->erased_blocks;
}
else
{
#if RTEMS_FDISK_TRACE
rtems_fdisk_warning (fd, "page not blank: %d-%d-%d",
ffc067f8: 3e 60 ff c3 lis r19,-61
*/
static void
rtems_fdisk_segment_queue_init (rtems_fdisk_segment_ctl_queue* queue)
{
queue->head = queue->tail = 0;
queue->count = 0;
ffc067fc: 93 c3 00 3c stw r30,60(r3)
ret = rtems_fdisk_seg_write_page_desc (fd, sc,
page, pd);
if (ret)
{
rtems_fdisk_error ("forcing page to used failed: %d-%d-%d",
ffc06800: 3e 40 ff c3 lis r18,-61
/*
* 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++)
ffc06804: 3b 60 00 00 li r27,0
* Initialise the segment control queue.
*/
static void
rtems_fdisk_segment_queue_init (rtems_fdisk_segment_ctl_queue* queue)
{
queue->head = queue->tail = 0;
ffc06808: 93 c3 00 44 stw r30,68(r3)
/**
* Recover the block mappings from the devices.
*/
static int
rtems_fdisk_recover_block_mappings (rtems_flashdisk* fd)
ffc0680c: 3b 20 00 00 li r25,0
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);
ffc06810: 3a d6 3a fa addi r22,r22,15098
* Initialise the segment control queue.
*/
static void
rtems_fdisk_segment_queue_init (rtems_fdisk_segment_ctl_queue* queue)
{
queue->head = queue->tail = 0;
ffc06814: 93 c3 00 40 stw r30,64(r3)
* 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: " \
ffc06818: 3a b5 3b c5 addi r21,r21,15301
else if (rtems_fdisk_page_desc_flags_set (pd, RTEMS_FDISK_PAGE_ACTIVE))
{
if (pd->block >= fd->block_count)
{
#if RTEMS_FDISK_TRACE
rtems_fdisk_warning (fd,
ffc0681c: 3a 94 3b 9b addi r20,r20,15259
*/
static void
rtems_fdisk_segment_queue_init (rtems_fdisk_segment_ctl_queue* queue)
{
queue->head = queue->tail = 0;
queue->count = 0;
ffc06820: 93 c3 00 48 stw r30,72(r3)
++fd->erased_blocks;
}
else
{
#if RTEMS_FDISK_TRACE
rtems_fdisk_warning (fd, "page not blank: %d-%d-%d",
ffc06824: 3a 73 3b 5c addi r19,r19,15196
ret = rtems_fdisk_seg_write_page_desc (fd, sc,
page, pd);
if (ret)
{
rtems_fdisk_error ("forcing page to used failed: %d-%d-%d",
ffc06828: 3a 52 3b 75 addi r18,r18,15221
* Initialise the segment control queue.
*/
static void
rtems_fdisk_segment_queue_init (rtems_fdisk_segment_ctl_queue* queue)
{
queue->head = queue->tail = 0;
ffc0682c: 93 c3 00 50 stw r30,80(r3)
ffc06830: 93 c3 00 4c stw r30,76(r3)
queue->count = 0;
ffc06834: 93 c3 00 54 stw r30,84(r3)
* Initialise the segment control queue.
*/
static void
rtems_fdisk_segment_queue_init (rtems_fdisk_segment_ctl_queue* queue)
{
queue->head = queue->tail = 0;
ffc06838: 93 c3 00 5c stw r30,92(r3)
ffc0683c: 93 c3 00 58 stw r30,88(r3)
queue->count = 0;
ffc06840: 93 c3 00 60 stw r30,96(r3)
rtems_fdisk_segment_queue_init (&fd->failed);
/*
* Clear the lock mappings.
*/
memset (fd->blocks, 0, fd->block_count * sizeof (rtems_fdisk_block_ctl));
ffc06844: 80 63 00 18 lwz r3,24(r3)
ffc06848: 48 01 ce e9 bl ffc23730 <memset>
/*
* Scan each segment or each device recovering the valid pages.
*/
fd->erased_blocks = 0;
ffc0684c: 93 df 00 28 stw r30,40(r31)
fd->starvation_threshold = 0;
ffc06850: 93 df 00 24 stw r30,36(r31)
for (device = 0; device < fd->device_count; device++)
ffc06854: 48 00 02 98 b ffc06aec <rtems_fdisk_recover_block_mappings+0x32c>
/**
* Recover the block mappings from the devices.
*/
static int
rtems_fdisk_recover_block_mappings (rtems_flashdisk* fd)
ffc06858: 1d 5c 00 30 mulli r10,r28,48
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];
ffc0685c: 7f c9 b8 2e lwzx r30,r9,r23
ffc06860: 7f de 52 14 add r30,r30,r10
const rtems_fdisk_segment_desc* sd = sc->descriptor;
ffc06864: 83 be 00 04 lwz r29,4(r30)
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);
ffc06868: 7f e3 fb 78 mr r3,r31
ffc0686c: 7e c4 b3 78 mr r4,r22
ffc06870: 7f 65 db 78 mr r5,r27
ffc06874: 7f 86 e3 78 mr r6,r28
ffc06878: 4c c6 31 82 crclr 4*cr1+eq
ffc0687c: 4b ff ef 85 bl ffc05800 <rtems_fdisk_info>
#endif
sc->pages_desc = rtems_fdisk_page_desc_pages (sd, fd->block_size);
ffc06880: 83 5f 00 14 lwz r26,20(r31)
*/
static uint32_t
rtems_fdisk_pages_in_segment (const rtems_fdisk_segment_desc* sd,
uint32_t page_size)
{
return sd->size / page_size;
ffc06884: 81 3d 00 08 lwz r9,8(r29)
#endif
sc->pages_desc = rtems_fdisk_page_desc_pages (sd, fd->block_size);
sc->pages =
rtems_fdisk_pages_in_segment (sd, fd->block_size) - sc->pages_desc;
if (sc->pages > fd->starvation_threshold)
ffc06888: 81 5f 00 24 lwz r10,36(r31)
*/
static uint32_t
rtems_fdisk_pages_in_segment (const rtems_fdisk_segment_desc* sd,
uint32_t page_size)
{
return sd->size / page_size;
ffc0688c: 7d 29 d3 96 divwu r9,r9,r26
static uint32_t
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);
ffc06890: 55 38 18 38 rlwinm r24,r9,3,0,28
return ((bytes - 1) / page_size) + 1;
ffc06894: 3b 18 ff ff addi r24,r24,-1
ffc06898: 7f 18 d3 96 divwu r24,r24,r26
ffc0689c: 3b 18 00 01 addi r24,r24,1
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 =
rtems_fdisk_pages_in_segment (sd, fd->block_size) - sc->pages_desc;
ffc068a0: 7d 38 48 50 subf r9,r24,r9
#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);
ffc068a4: 93 1e 00 18 stw r24,24(r30)
sc->pages =
rtems_fdisk_pages_in_segment (sd, fd->block_size) - sc->pages_desc;
if (sc->pages > fd->starvation_threshold)
ffc068a8: 7f 89 50 40 cmplw cr7,r9,r10
#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 =
ffc068ac: 91 3e 00 14 stw r9,20(r30)
rtems_fdisk_pages_in_segment (sd, fd->block_size) - sc->pages_desc;
if (sc->pages > fd->starvation_threshold)
ffc068b0: 40 9d 00 08 ble- cr7,ffc068b8 <rtems_fdisk_recover_block_mappings+0xf8>
fd->starvation_threshold = sc->pages;
ffc068b4: 91 3f 00 24 stw r9,36(r31)
sc->pages_used = 0;
sc->pages_bad = 0;
sc->failed = false;
if (!sc->page_descriptors)
ffc068b8: 81 3e 00 10 lwz r9,16(r30)
sc->pages =
rtems_fdisk_pages_in_segment (sd, fd->block_size) - sc->pages_desc;
if (sc->pages > fd->starvation_threshold)
fd->starvation_threshold = sc->pages;
sc->pages_active = 0;
ffc068bc: 93 3e 00 1c stw r25,28(r30)
sc->pages_used = 0;
sc->pages_bad = 0;
sc->failed = false;
if (!sc->page_descriptors)
ffc068c0: 2f 89 00 00 cmpwi cr7,r9,0
rtems_fdisk_pages_in_segment (sd, fd->block_size) - sc->pages_desc;
if (sc->pages > fd->starvation_threshold)
fd->starvation_threshold = sc->pages;
sc->pages_active = 0;
sc->pages_used = 0;
ffc068c4: 93 3e 00 20 stw r25,32(r30)
sc->pages_bad = 0;
ffc068c8: 93 3e 00 24 stw r25,36(r30)
sc->failed = false;
ffc068cc: 93 3e 00 28 stw r25,40(r30)
if (!sc->page_descriptors)
ffc068d0: 40 be 00 10 bne+ cr7,ffc068e0 <rtems_fdisk_recover_block_mappings+0x120><== NEVER TAKEN
sc->page_descriptors = malloc (sc->pages_desc * fd->block_size);
ffc068d4: 7c 78 d1 d6 mullw r3,r24,r26
ffc068d8: 48 00 29 05 bl ffc091dc <malloc>
ffc068dc: 90 7e 00 10 stw r3,16(r30)
if (!sc->page_descriptors)
ffc068e0: 83 be 00 10 lwz r29,16(r30)
ffc068e4: 2f 9d 00 00 cmpwi cr7,r29,0
ffc068e8: 40 be 00 14 bne+ cr7,ffc068fc <rtems_fdisk_recover_block_mappings+0x13c><== ALWAYS TAKEN
rtems_fdisk_abort ("no memory for page descriptors");
ffc068ec: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc068f0: 38 63 37 cf addi r3,r3,14287 <== NOT EXECUTED
ffc068f4: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc068f8: 48 00 18 39 bl ffc08130 <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,
ffc068fc: 7c f8 d1 d6 mullw r7,r24,r26
ffc06900: 7f e3 fb 78 mr r3,r31
ffc06904: 7f c4 f3 78 mr r4,r30
ffc06908: 38 a0 00 00 li r5,0
ffc0690c: 7f a6 eb 78 mr r6,r29
ffc06910: 4b ff f2 59 bl ffc05b68 <rtems_fdisk_seg_read>
sc->pages_desc * fd->block_size);
if (ret)
ffc06914: 7c 7a 1b 79 mr. r26,r3
ffc06918: 41 a2 01 9c beq+ ffc06ab4 <rtems_fdisk_recover_block_mappings+0x2f4><== ALWAYS TAKEN
{
rtems_fdisk_error ("recover-block-mappings:%02d-%03d: " \
ffc0691c: 48 01 e2 5d bl ffc24b78 <strerror> <== NOT EXECUTED
ffc06920: 7f 64 db 78 mr r4,r27 <== NOT EXECUTED
ffc06924: 7c 66 1b 78 mr r6,r3 <== NOT EXECUTED
ffc06928: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc0692c: 7f 85 e3 78 mr r5,r28 <== NOT EXECUTED
ffc06930: 7f 47 d3 78 mr r7,r26 <== NOT EXECUTED
ffc06934: 38 63 3b 1b addi r3,r3,15131 <== NOT EXECUTED
ffc06938: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc0693c: 4b ff f1 41 bl ffc05a7c <rtems_fdisk_error> <== NOT EXECUTED
"read page desc failed: %s (%d)",
device, segment, strerror (ret), ret);
return ret;
ffc06940: 48 00 01 c8 b ffc06b08 <rtems_fdisk_recover_block_mappings+0x348><== 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))
ffc06944: 7f a3 eb 78 mr r3,r29
ffc06948: 4b ff ee 71 bl ffc057b8 <rtems_fdisk_page_desc_erased>
ffc0694c: 2f 83 00 00 cmpwi cr7,r3,0
ffc06950: 41 be 00 9c beq+ cr7,ffc069ec <rtems_fdisk_recover_block_mappings+0x22c><== NEVER TAKEN
{
/*
* Is the page erased ?
*/
ret = rtems_fdisk_seg_blank_check_page (fd, sc,
ffc06954: 80 be 00 18 lwz r5,24(r30)
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,
ffc06958: 7f e3 fb 78 mr r3,r31
page * fd->block_size, fd->block_size);
ffc0695c: 80 df 00 14 lwz r6,20(r31)
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,
ffc06960: 7f c4 f3 78 mr r4,r30
if (rtems_fdisk_page_desc_erased (pd))
{
/*
* Is the page erased ?
*/
ret = rtems_fdisk_seg_blank_check_page (fd, sc,
ffc06964: 7c ba 2a 14 add r5,r26,r5
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,
ffc06968: 7c a5 31 d6 mullw r5,r5,r6
ffc0696c: 4b ff f2 ed bl ffc05c58 <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)
ffc06970: 2f 83 00 00 cmpwi cr7,r3,0
ffc06974: 40 9e 00 14 bne- cr7,ffc06988 <rtems_fdisk_recover_block_mappings+0x1c8><== NEVER TAKEN
{
++fd->erased_blocks;
ffc06978: 81 3f 00 28 lwz r9,40(r31)
ffc0697c: 39 29 00 01 addi r9,r9,1
ffc06980: 91 3f 00 28 stw r9,40(r31)
ffc06984: 48 00 01 24 b ffc06aa8 <rtems_fdisk_recover_block_mappings+0x2e8>
}
else
{
#if RTEMS_FDISK_TRACE
rtems_fdisk_warning (fd, "page not blank: %d-%d-%d",
ffc06988: 81 1d 00 04 lwz r8,4(r29) <== NOT EXECUTED
ffc0698c: 7e 64 9b 78 mr r4,r19 <== NOT EXECUTED
ffc06990: 7f 65 db 78 mr r5,r27 <== NOT EXECUTED
ffc06994: 7f 86 e3 78 mr r6,r28 <== NOT EXECUTED
ffc06998: 7f 47 d3 78 mr r7,r26 <== NOT EXECUTED
ffc0699c: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc069a0: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc069a4: 4b ff f0 05 bl ffc059a8 <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;
ffc069a8: a1 3d 00 02 lhz r9,2(r29) <== 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,
ffc069ac: 7f e3 fb 78 mr r3,r31 <== 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;
ffc069b0: 55 29 07 fa rlwinm r9,r9,0,31,29 <== NOT EXECUTED
ffc069b4: b1 3d 00 02 sth r9,2(r29) <== 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,
ffc069b8: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED
ffc069bc: 7f 45 d3 78 mr r5,r26 <== NOT EXECUTED
ffc069c0: 7f a6 eb 78 mr r6,r29 <== NOT EXECUTED
ffc069c4: 4b ff f3 d1 bl ffc05d94 <rtems_fdisk_seg_write_page_desc><== NOT EXECUTED
page, pd);
if (ret)
ffc069c8: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc069cc: 41 be 00 30 beq+ cr7,ffc069fc <rtems_fdisk_recover_block_mappings+0x23c><== NOT EXECUTED
{
rtems_fdisk_error ("forcing page to used failed: %d-%d-%d",
ffc069d0: 7e 43 93 78 mr r3,r18 <== NOT EXECUTED
ffc069d4: 7f 64 db 78 mr r4,r27 <== NOT EXECUTED
ffc069d8: 7f 85 e3 78 mr r5,r28 <== NOT EXECUTED
ffc069dc: 7f 46 d3 78 mr r6,r26 <== NOT EXECUTED
ffc069e0: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc069e4: 4b ff f0 99 bl ffc05a7c <rtems_fdisk_error> <== NOT EXECUTED
ffc069e8: 48 00 00 14 b ffc069fc <rtems_fdisk_recover_block_mappings+0x23c><== NOT EXECUTED
}
rtems_flashdisk_count = rtems_flashdisk_configuration_size;
return RTEMS_SUCCESSFUL;
}
ffc069ec: a1 3d 00 02 lhz r9,2(r29) <== NOT EXECUTED
sc->pages_used++;
}
}
else
{
if (rtems_fdisk_page_desc_flags_set (pd, RTEMS_FDISK_PAGE_USED))
ffc069f0: 55 2a 07 bc rlwinm r10,r9,0,30,30 <== NOT EXECUTED
ffc069f4: 71 48 ff ff andi. r8,r10,65535 <== NOT EXECUTED
ffc069f8: 40 82 00 14 bne- ffc06a0c <rtems_fdisk_recover_block_mappings+0x24c><== NOT EXECUTED
{
sc->pages_used++;
ffc069fc: 81 3e 00 20 lwz r9,32(r30) <== NOT EXECUTED
ffc06a00: 39 29 00 01 addi r9,r9,1 <== NOT EXECUTED
ffc06a04: 91 3e 00 20 stw r9,32(r30) <== NOT EXECUTED
ffc06a08: 48 00 00 a0 b ffc06aa8 <rtems_fdisk_recover_block_mappings+0x2e8><== NOT EXECUTED
}
else if (rtems_fdisk_page_desc_flags_set (pd, RTEMS_FDISK_PAGE_ACTIVE))
ffc06a0c: 71 2a 00 01 andi. r10,r9,1 <== NOT EXECUTED
ffc06a10: 40 82 00 8c bne- ffc06a9c <rtems_fdisk_recover_block_mappings+0x2dc><== NOT EXECUTED
{
if (pd->block >= fd->block_count)
ffc06a14: 81 1d 00 04 lwz r8,4(r29) <== NOT EXECUTED
ffc06a18: 81 3f 00 1c lwz r9,28(r31) <== NOT EXECUTED
ffc06a1c: 7f 88 48 40 cmplw cr7,r8,r9 <== NOT EXECUTED
ffc06a20: 41 bc 00 24 blt+ cr7,ffc06a44 <rtems_fdisk_recover_block_mappings+0x284><== NOT EXECUTED
{
#if RTEMS_FDISK_TRACE
rtems_fdisk_warning (fd,
ffc06a24: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc06a28: 7e 84 a3 78 mr r4,r20 <== NOT EXECUTED
ffc06a2c: 7f 65 db 78 mr r5,r27 <== NOT EXECUTED
ffc06a30: 7f 86 e3 78 mr r6,r28 <== NOT EXECUTED
ffc06a34: 7f 47 d3 78 mr r7,r26 <== NOT EXECUTED
ffc06a38: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc06a3c: 4b ff ef 6d bl ffc059a8 <rtems_fdisk_warning> <== NOT EXECUTED
ffc06a40: 48 00 00 5c b ffc06a9c <rtems_fdisk_recover_block_mappings+0x2dc><== 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)
ffc06a44: 81 5f 00 18 lwz r10,24(r31) <== NOT EXECUTED
ffc06a48: 55 08 18 38 rlwinm r8,r8,3,0,28 <== NOT EXECUTED
ffc06a4c: 7d 2a 40 2e lwzx r9,r10,r8 <== NOT EXECUTED
ffc06a50: 7c ea 42 14 add r7,r10,r8 <== NOT EXECUTED
ffc06a54: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED
ffc06a58: 41 9e 00 2c beq- cr7,ffc06a84 <rtems_fdisk_recover_block_mappings+0x2c4><== 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: " \
ffc06a5c: 80 89 00 08 lwz r4,8(r9) <== NOT EXECUTED
ffc06a60: 7e a3 ab 78 mr r3,r21 <== NOT EXECUTED
ffc06a64: 80 a9 00 0c lwz r5,12(r9) <== NOT EXECUTED
ffc06a68: 7f 88 e3 78 mr r8,r28 <== NOT EXECUTED
ffc06a6c: 80 c7 00 04 lwz r6,4(r7) <== NOT EXECUTED
ffc06a70: 7f 49 d3 78 mr r9,r26 <== NOT EXECUTED
ffc06a74: 7f 67 db 78 mr r7,r27 <== NOT EXECUTED
ffc06a78: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc06a7c: 4b ff f0 01 bl ffc05a7c <rtems_fdisk_error> <== NOT EXECUTED
ffc06a80: 48 00 00 1c b ffc06a9c <rtems_fdisk_recover_block_mappings+0x2dc><== NOT EXECUTED
fd->blocks[pd->block].page = page;
/*
* The page is active.
*/
sc->pages_active++;
ffc06a84: 81 3e 00 1c lwz r9,28(r30) <== NOT EXECUTED
{
/**
* @todo
* Add start up crc checks here.
*/
fd->blocks[pd->block].segment = sc;
ffc06a88: 7f ca 41 2e stwx r30,r10,r8 <== NOT EXECUTED
fd->blocks[pd->block].page = page;
/*
* The page is active.
*/
sc->pages_active++;
ffc06a8c: 39 29 00 01 addi r9,r9,1 <== NOT EXECUTED
/**
* @todo
* Add start up crc checks here.
*/
fd->blocks[pd->block].segment = sc;
fd->blocks[pd->block].page = page;
ffc06a90: 93 47 00 04 stw r26,4(r7) <== NOT EXECUTED
/*
* The page is active.
*/
sc->pages_active++;
ffc06a94: 91 3e 00 1c stw r9,28(r30) <== NOT EXECUTED
ffc06a98: 48 00 00 10 b ffc06aa8 <rtems_fdisk_recover_block_mappings+0x2e8><== NOT EXECUTED
}
}
else
sc->pages_bad++;
ffc06a9c: 81 3e 00 24 lwz r9,36(r30) <== NOT EXECUTED
ffc06aa0: 39 29 00 01 addi r9,r9,1 <== NOT EXECUTED
ffc06aa4: 91 3e 00 24 stw r9,36(r30) <== 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++)
ffc06aa8: 3b 5a 00 01 addi r26,r26,1
ffc06aac: 3b bd 00 08 addi r29,r29,8
ffc06ab0: 48 00 00 08 b ffc06ab8 <rtems_fdisk_recover_block_mappings+0x2f8>
* 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)
ffc06ab4: 3b 40 00 00 li r26,0
* 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++)
ffc06ab8: 81 3e 00 14 lwz r9,20(r30)
ffc06abc: 7f 9a 48 40 cmplw cr7,r26,r9
ffc06ac0: 41 9c fe 84 blt+ cr7,ffc06944 <rtems_fdisk_recover_block_mappings+0x184>
}
/*
* Place the segment on to the correct queue.
*/
rtems_fdisk_queue_segment (fd, sc);
ffc06ac4: 7f e3 fb 78 mr r3,r31
ffc06ac8: 7f c4 f3 78 mr r4,r30
ffc06acc: 4b ff f5 81 bl ffc0604c <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++)
ffc06ad0: 3b 9c 00 01 addi r28,r28,1
ffc06ad4: 81 3f 00 2c lwz r9,44(r31)
ffc06ad8: 7d 49 ba 14 add r10,r9,r23
ffc06adc: 81 4a 00 04 lwz r10,4(r10)
ffc06ae0: 7f 9c 50 40 cmplw cr7,r28,r10
ffc06ae4: 41 9c fd 74 blt+ cr7,ffc06858 <rtems_fdisk_recover_block_mappings+0x98>
/*
* 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++)
ffc06ae8: 3b 7b 00 01 addi r27,r27,1
ffc06aec: 81 3f 00 30 lwz r9,48(r31)
ffc06af0: 7f 9b 48 40 cmplw cr7,r27,r9
ffc06af4: 40 9c 00 10 bge- cr7,ffc06b04 <rtems_fdisk_recover_block_mappings+0x344>
/**
* Recover the block mappings from the devices.
*/
static int
rtems_fdisk_recover_block_mappings (rtems_flashdisk* fd)
ffc06af8: 1e fb 00 0c mulli r23,r27,12
ffc06afc: 3b 80 00 00 li r28,0
ffc06b00: 4b ff ff d4 b ffc06ad4 <rtems_fdisk_recover_block_mappings+0x314>
*/
rtems_fdisk_queue_segment (fd, sc);
}
}
return 0;
ffc06b04: 3b 40 00 00 li r26,0
}
ffc06b08: 39 61 00 40 addi r11,r1,64
ffc06b0c: 7f 43 d3 78 mr r3,r26
ffc06b10: 4b ff aa 28 b ffc01538 <_restgpr_18_x>
ffc06218 <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)
{
ffc06218: 94 21 ff b8 stwu r1,-72(r1)
ffc0621c: 7c 08 02 a6 mflr r0
ffc06220: be 41 00 10 stmw r18,16(r1)
rtems_fdisk_segment_queue_push_head (&fd->used, ssc);
return EIO;
}
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd, "recycle: %02d-%03d-%03d=>%02d-%03d-%03d",
ffc06224: 3e 60 ff c3 lis r19,-61
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",
ffc06228: 3e 40 ff c3 lis r18,-61
static int
rtems_fdisk_recycle_segment (rtems_flashdisk* fd,
rtems_fdisk_segment_ctl* ssc,
rtems_fdisk_segment_ctl* dsc,
uint32_t *pages)
{
ffc0622c: 90 01 00 4c stw r0,76(r1)
ffc06230: 7c 7d 1b 78 mr r29,r3
ffc06234: 7c 9e 23 78 mr r30,r4
ffc06238: 7c bf 2b 78 mr r31,r5
ffc0623c: 7c d6 33 78 mr r22,r6
int ret;
uint32_t spage;
uint32_t used = 0;
uint32_t active = 0;
ffc06240: 3a e0 00 00 li r23,0
rtems_fdisk_segment_ctl* dsc,
uint32_t *pages)
{
int ret;
uint32_t spage;
uint32_t used = 0;
ffc06244: 3b 00 00 00 li r24,0
uint32_t active = 0;
for (spage = 0; spage < ssc->pages; spage++)
ffc06248: 3b 60 00 00 li r27,0
rtems_fdisk_segment_queue_push_head (&fd->used, ssc);
return EIO;
}
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd, "recycle: %02d-%03d-%03d=>%02d-%03d-%03d",
ffc0624c: 3a 73 38 ff addi r19,r19,14591
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",
ffc06250: 3a 52 39 27 addi r18,r18,14631
int ret;
uint32_t spage;
uint32_t used = 0;
uint32_t active = 0;
for (spage = 0; spage < ssc->pages; spage++)
ffc06254: 48 00 02 d0 b ffc06524 <rtems_fdisk_recycle_segment+0x30c>
{
rtems_fdisk_page_desc* spd = &ssc->page_descriptors[spage];
if (!dsc && ssc->pages_active > 0)
ffc06258: 2f 9f 00 00 cmpwi cr7,r31,0
uint32_t used = 0;
uint32_t active = 0;
for (spage = 0; spage < ssc->pages; spage++)
{
rtems_fdisk_page_desc* spd = &ssc->page_descriptors[spage];
ffc0625c: 81 3e 00 10 lwz r9,16(r30)
rtems_fdisk_segment_queue_push_tail (&fd->available, sc);
}
}
static int
rtems_fdisk_recycle_segment (rtems_flashdisk* fd,
ffc06260: 57 79 18 38 rlwinm r25,r27,3,0,28
uint32_t used = 0;
uint32_t active = 0;
for (spage = 0; spage < ssc->pages; spage++)
{
rtems_fdisk_page_desc* spd = &ssc->page_descriptors[spage];
ffc06264: 7f 29 ca 14 add r25,r9,r25
if (!dsc && ssc->pages_active > 0)
ffc06268: 40 be 00 24 bne+ cr7,ffc0628c <rtems_fdisk_recycle_segment+0x74>
ffc0626c: 81 3e 00 1c lwz r9,28(r30)
ffc06270: 2f 89 00 00 cmpwi cr7,r9,0
ffc06274: 41 be 00 18 beq+ cr7,ffc0628c <rtems_fdisk_recycle_segment+0x74><== ALWAYS TAKEN
{
rtems_fdisk_error ("recycle: no available dst segment");
ffc06278: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc0627c: 38 63 38 ae addi r3,r3,14510 <== NOT EXECUTED
ffc06280: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc06284: 4b ff f7 f9 bl ffc05a7c <rtems_fdisk_error> <== NOT EXECUTED
ffc06288: 48 00 00 a4 b ffc0632c <rtems_fdisk_recycle_segment+0x114><== NOT EXECUTED
}
rtems_flashdisk_count = rtems_flashdisk_configuration_size;
return RTEMS_SUCCESSFUL;
}
ffc0628c: a1 39 00 02 lhz r9,2(r25)
{
rtems_fdisk_error ("recycle: no available dst segment");
return EIO;
}
if (rtems_fdisk_page_desc_flags_set (spd, RTEMS_FDISK_PAGE_ACTIVE) &&
ffc06290: 71 2a 00 01 andi. r10,r9,1
ffc06294: 40 82 02 68 bne- ffc064fc <rtems_fdisk_recycle_segment+0x2e4><== NEVER TAKEN
ffc06298: 55 29 07 bc rlwinm r9,r9,0,30,30
ffc0629c: 71 2a ff ff andi. r10,r9,65535
ffc062a0: 41 a2 02 5c beq+ ffc064fc <rtems_fdisk_recycle_segment+0x2e4>
* 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];
ffc062a4: 82 bf 00 10 lwz r21,16(r31)
uint32_t page;
for (page = 0; page < sc->pages; page++, pd++)
ffc062a8: 3b 80 00 00 li r28,0
ffc062ac: 83 5f 00 14 lwz r26,20(r31)
ffc062b0: 48 00 00 14 b ffc062c4 <rtems_fdisk_recycle_segment+0xac>
if (rtems_fdisk_page_desc_erased (pd))
ffc062b4: 4b ff f5 05 bl ffc057b8 <rtems_fdisk_page_desc_erased>
ffc062b8: 2f 83 00 00 cmpwi cr7,r3,0
ffc062bc: 40 9e 00 18 bne- cr7,ffc062d4 <rtems_fdisk_recycle_segment+0xbc>
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++)
ffc062c0: 3b 9c 00 01 addi r28,r28,1
ffc062c4: 7f 9c d0 00 cmpw cr7,r28,r26
rtems_fdisk_segment_queue_push_tail (&fd->available, sc);
}
}
static int
rtems_fdisk_recycle_segment (rtems_flashdisk* fd,
ffc062c8: 57 83 18 38 rlwinm r3,r28,3,0,28
ffc062cc: 7c 75 1a 14 add r3,r21,r3
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++)
ffc062d0: 40 9e ff e4 bne+ cr7,ffc062b4 <rtems_fdisk_recycle_segment+0x9c><== ALWAYS TAKEN
dpage = rtems_fdisk_seg_next_available_page (dsc);
dpd = &dsc->page_descriptors[dpage];
active++;
if (dpage >= dsc->pages)
ffc062d4: 7f 9c d0 40 cmplw cr7,r28,r26
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];
ffc062d8: 57 89 18 38 rlwinm r9,r28,3,0,28
ffc062dc: 7e b5 4a 14 add r21,r21,r9
active++;
ffc062e0: 3a f7 00 01 addi r23,r23,1
if (dpage >= dsc->pages)
ffc062e4: 41 bc 00 50 blt+ cr7,ffc06334 <rtems_fdisk_recycle_segment+0x11c><== ALWAYS TAKEN
{
rtems_fdisk_error ("recycle: %02d-%03d: " \
ffc062e8: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc062ec: 4b ff f4 f5 bl ffc057e0 <rtems_fdisk_seg_pages_available><== NOT EXECUTED
ffc062f0: 80 9f 00 08 lwz r4,8(r31) <== NOT EXECUTED
ffc062f4: 7c 66 1b 78 mr r6,r3 <== NOT EXECUTED
ffc062f8: 80 bf 00 0c lwz r5,12(r31) <== NOT EXECUTED
ffc062fc: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc06300: 38 63 38 d0 addi r3,r3,14544 <== NOT EXECUTED
ffc06304: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc06308: 4b ff f7 75 bl ffc05a7c <rtems_fdisk_error> <== NOT EXECUTED
"no page desc available: %d",
dsc->device, dsc->segment,
rtems_fdisk_seg_pages_available (dsc));
dsc->failed = true;
ffc0630c: 39 20 00 01 li r9,1 <== NOT EXECUTED
ffc06310: 91 3f 00 28 stw r9,40(r31) <== NOT EXECUTED
rtems_fdisk_queue_segment (fd, dsc);
ffc06314: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED
ffc06318: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED
ffc0631c: 4b ff fd 31 bl ffc0604c <rtems_fdisk_queue_segment> <== NOT EXECUTED
rtems_fdisk_segment_queue_push_head (&fd->used, ssc);
ffc06320: 38 7d 00 40 addi r3,r29,64 <== NOT EXECUTED
ffc06324: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED
ffc06328: 4b ff f3 25 bl ffc0564c <rtems_fdisk_segment_queue_push_head><== NOT EXECUTED
return EIO;
ffc0632c: 3b 40 00 05 li r26,5 <== NOT EXECUTED
ffc06330: 48 00 02 60 b ffc06590 <rtems_fdisk_recycle_segment+0x378><== NOT EXECUTED
}
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd, "recycle: %02d-%03d-%03d=>%02d-%03d-%03d",
ffc06334: 80 be 00 08 lwz r5,8(r30)
ffc06338: 7e 64 9b 78 mr r4,r19
ffc0633c: 80 de 00 0c lwz r6,12(r30)
ffc06340: 7f 67 db 78 mr r7,r27
ffc06344: 81 1f 00 08 lwz r8,8(r31)
ffc06348: 7f 8a e3 78 mr r10,r28
ffc0634c: 81 3f 00 0c lwz r9,12(r31)
ffc06350: 7f a3 eb 78 mr r3,r29
ffc06354: 4c c6 31 82 crclr 4*cr1+eq
ffc06358: 4b ff f4 a9 bl ffc05800 <rtems_fdisk_info>
ssc->device, ssc->segment, spage,
dsc->device, dsc->segment, dpage);
#endif
ret = rtems_fdisk_seg_copy_page (fd, ssc,
ffc0635c: 83 5e 00 18 lwz r26,24(r30)
ffc06360: 82 9f 00 18 lwz r20,24(r31)
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",
ffc06364: 7e 44 93 78 mr r4,r18
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd, "recycle: %02d-%03d-%03d=>%02d-%03d-%03d",
ssc->device, ssc->segment, spage,
dsc->device, dsc->segment, dpage);
#endif
ret = rtems_fdisk_seg_copy_page (fd, ssc,
ffc06368: 7f 5b d2 14 add r26,r27,r26
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",
ffc0636c: 80 be 00 08 lwz r5,8(r30)
ffc06370: 80 de 00 0c lwz r6,12(r30)
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd, "recycle: %02d-%03d-%03d=>%02d-%03d-%03d",
ssc->device, ssc->segment, spage,
dsc->device, dsc->segment, dpage);
#endif
ret = rtems_fdisk_seg_copy_page (fd, ssc,
ffc06374: 7e 9c a2 14 add r20,r28,r20
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",
ffc06378: 81 1f 00 08 lwz r8,8(r31)
ffc0637c: 7f 47 d3 78 mr r7,r26
ffc06380: 81 3f 00 0c lwz r9,12(r31)
ffc06384: 7e 8a a3 78 mr r10,r20
ffc06388: 7f a3 eb 78 mr r3,r29
ffc0638c: 4c c6 31 82 crclr 4*cr1+eq
ffc06390: 4b ff f5 45 bl ffc058d4 <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);
ffc06394: 80 fd 00 14 lwz r7,20(r29)
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,
ffc06398: 80 dd 00 68 lwz r6,104(r29)
ffc0639c: 7f a3 eb 78 mr r3,r29
ffc063a0: 7c ba 39 d6 mullw r5,r26,r7
ffc063a4: 7f c4 f3 78 mr r4,r30
ffc063a8: 4b ff f7 c1 bl ffc05b68 <rtems_fdisk_seg_read>
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)
ffc063ac: 7c 7a 1b 79 mr. r26,r3
ffc063b0: 40 a2 00 20 bne+ ffc063d0 <rtems_fdisk_recycle_segment+0x1b8><== NEVER TAKEN
return ret;
return rtems_fdisk_seg_write_page (fd, dst_sc, dst_page,
ffc063b4: 80 dd 00 68 lwz r6,104(r29)
ffc063b8: 7f a3 eb 78 mr r3,r29
ffc063bc: 7f e4 fb 78 mr r4,r31
ffc063c0: 7e 85 a3 78 mr r5,r20
ffc063c4: 4b ff fa 41 bl ffc05e04 <rtems_fdisk_seg_write_page>
#endif
ret = rtems_fdisk_seg_copy_page (fd, ssc,
spage + ssc->pages_desc,
dsc,
dpage + dsc->pages_desc);
if (ret)
ffc063c8: 7c 7a 1b 79 mr. r26,r3
ffc063cc: 41 a2 00 30 beq+ ffc063fc <rtems_fdisk_recycle_segment+0x1e4><== ALWAYS TAKEN
{
rtems_fdisk_error ("recycle: %02d-%03d-%03d=>" \
ffc063d0: 7f 43 d3 78 mr r3,r26 <== NOT EXECUTED
ffc063d4: 82 de 00 08 lwz r22,8(r30) <== NOT EXECUTED
ffc063d8: 82 fe 00 0c lwz r23,12(r30) <== NOT EXECUTED
ffc063dc: 83 1f 00 08 lwz r24,8(r31) <== NOT EXECUTED
ffc063e0: 83 3f 00 0c lwz r25,12(r31) <== NOT EXECUTED
ffc063e4: 48 01 e7 95 bl ffc24b78 <strerror> <== NOT EXECUTED
ffc063e8: 7c 6a 1b 78 mr r10,r3 <== NOT EXECUTED
ffc063ec: 93 41 00 08 stw r26,8(r1) <== NOT EXECUTED
ffc063f0: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc063f4: 38 63 39 57 addi r3,r3,14679 <== NOT EXECUTED
ffc063f8: 48 00 00 54 b ffc0644c <rtems_fdisk_recycle_segment+0x234><== NOT EXECUTED
rtems_fdisk_queue_segment (fd, dsc);
rtems_fdisk_segment_queue_push_head (&fd->used, ssc);
return ret;
}
*dpd = *spd;
ffc063fc: 81 39 00 00 lwz r9,0(r25)
ret = rtems_fdisk_seg_write_page_desc (fd,
ffc06400: 7f a3 eb 78 mr r3,r29
rtems_fdisk_queue_segment (fd, dsc);
rtems_fdisk_segment_queue_push_head (&fd->used, ssc);
return ret;
}
*dpd = *spd;
ffc06404: 81 59 00 04 lwz r10,4(r25)
ret = rtems_fdisk_seg_write_page_desc (fd,
ffc06408: 7f e4 fb 78 mr r4,r31
rtems_fdisk_queue_segment (fd, dsc);
rtems_fdisk_segment_queue_push_head (&fd->used, ssc);
return ret;
}
*dpd = *spd;
ffc0640c: 91 35 00 00 stw r9,0(r21)
ret = rtems_fdisk_seg_write_page_desc (fd,
ffc06410: 7f 85 e3 78 mr r5,r28
ffc06414: 7e a6 ab 78 mr r6,r21
rtems_fdisk_queue_segment (fd, dsc);
rtems_fdisk_segment_queue_push_head (&fd->used, ssc);
return ret;
}
*dpd = *spd;
ffc06418: 91 55 00 04 stw r10,4(r21)
ret = rtems_fdisk_seg_write_page_desc (fd,
ffc0641c: 4b ff f9 79 bl ffc05d94 <rtems_fdisk_seg_write_page_desc>
dsc,
dpage, dpd);
if (ret)
ffc06420: 7c 7a 1b 79 mr. r26,r3
ffc06424: 41 a2 00 64 beq+ ffc06488 <rtems_fdisk_recycle_segment+0x270><== ALWAYS TAKEN
{
rtems_fdisk_error ("recycle: %02d-%03d-%03d=>" \
ffc06428: 82 de 00 08 lwz r22,8(r30) <== NOT EXECUTED
ffc0642c: 82 fe 00 0c lwz r23,12(r30) <== NOT EXECUTED
ffc06430: 83 1f 00 08 lwz r24,8(r31) <== NOT EXECUTED
ffc06434: 83 3f 00 0c lwz r25,12(r31) <== NOT EXECUTED
ffc06438: 48 01 e7 41 bl ffc24b78 <strerror> <== NOT EXECUTED
ffc0643c: 7c 6a 1b 78 mr r10,r3 <== NOT EXECUTED
ffc06440: 93 41 00 08 stw r26,8(r1) <== NOT EXECUTED
ffc06444: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc06448: 38 63 39 9a addi r3,r3,14746 <== NOT EXECUTED
ffc0644c: 7e c4 b3 78 mr r4,r22 <== NOT EXECUTED
ffc06450: 7e e5 bb 78 mr r5,r23 <== NOT EXECUTED
ffc06454: 7f 66 db 78 mr r6,r27 <== NOT EXECUTED
ffc06458: 7f 07 c3 78 mr r7,r24 <== NOT EXECUTED
ffc0645c: 7f 28 cb 78 mr r8,r25 <== NOT EXECUTED
ffc06460: 7f 89 e3 78 mr r9,r28 <== NOT EXECUTED
ffc06464: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc06468: 4b ff f6 15 bl ffc05a7c <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);
ffc0646c: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED
ffc06470: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED
ffc06474: 4b ff fb d9 bl ffc0604c <rtems_fdisk_queue_segment> <== NOT EXECUTED
rtems_fdisk_segment_queue_push_head (&fd->used, ssc);
ffc06478: 38 7d 00 40 addi r3,r29,64 <== NOT EXECUTED
ffc0647c: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED
ffc06480: 4b ff f1 cd bl ffc0564c <rtems_fdisk_segment_queue_push_head><== NOT EXECUTED
return ret;
ffc06484: 48 00 01 0c b ffc06590 <rtems_fdisk_recycle_segment+0x378><== NOT EXECUTED
}
dsc->pages_active++;
ffc06488: 81 3f 00 1c lwz r9,28(r31)
fd->blocks[spd->block].page = dpage;
/*
* Place the segment on to the correct queue.
*/
rtems_fdisk_queue_segment (fd, dsc);
ffc0648c: 7f a3 eb 78 mr r3,r29
*/
ssc->pages_active--;
ssc->pages_used++;
fd->blocks[spd->block].segment = dsc;
ffc06490: 81 59 00 04 lwz r10,4(r25)
fd->blocks[spd->block].page = dpage;
/*
* Place the segment on to the correct queue.
*/
rtems_fdisk_queue_segment (fd, dsc);
ffc06494: 7f e4 fb 78 mr r4,r31
rtems_fdisk_queue_segment (fd, dsc);
rtems_fdisk_segment_queue_push_head (&fd->used, ssc);
return ret;
}
dsc->pages_active++;
ffc06498: 39 29 00 01 addi r9,r9,1
ffc0649c: 91 3f 00 1c stw r9,28(r31)
*/
ssc->pages_active--;
ssc->pages_used++;
fd->blocks[spd->block].segment = dsc;
ffc064a0: 55 4a 18 38 rlwinm r10,r10,3,0,28
* 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--;
ffc064a4: 81 3e 00 1c lwz r9,28(r30)
ffc064a8: 39 29 ff ff addi r9,r9,-1
ffc064ac: 91 3e 00 1c stw r9,28(r30)
ssc->pages_used++;
ffc064b0: 81 3e 00 20 lwz r9,32(r30)
ffc064b4: 39 29 00 01 addi r9,r9,1
ffc064b8: 91 3e 00 20 stw r9,32(r30)
fd->blocks[spd->block].segment = dsc;
ffc064bc: 81 3d 00 18 lwz r9,24(r29)
ffc064c0: 7d 09 52 14 add r8,r9,r10
ffc064c4: 7f e9 51 2e stwx r31,r9,r10
fd->blocks[spd->block].page = dpage;
ffc064c8: 93 88 00 04 stw r28,4(r8)
/*
* Place the segment on to the correct queue.
*/
rtems_fdisk_queue_segment (fd, dsc);
ffc064cc: 4b ff fb 81 bl ffc0604c <rtems_fdisk_queue_segment>
/*
* Get new destination segment if necessary.
*/
dst_pages = rtems_fdisk_seg_pages_available (dsc);
ffc064d0: 7f e3 fb 78 mr r3,r31
ffc064d4: 4b ff f3 0d bl ffc057e0 <rtems_fdisk_seg_pages_available>
if (dst_pages == 0)
ffc064d8: 2f 83 00 00 cmpwi cr7,r3,0
ffc064dc: 40 be 00 10 bne+ cr7,ffc064ec <rtems_fdisk_recycle_segment+0x2d4>
dsc = rtems_fdisk_seg_most_available (&fd->available);
ffc064e0: 80 7d 00 34 lwz r3,52(r29)
ffc064e4: 4b ff f7 21 bl ffc05c04 <rtems_fdisk_seg_most_available.isra.8>
ffc064e8: 7c 7f 1b 78 mr r31,r3
(*pages)--;
ffc064ec: 81 36 00 00 lwz r9,0(r22)
ffc064f0: 39 29 ff ff addi r9,r9,-1
ffc064f4: 91 36 00 00 stw r9,0(r22)
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))
{
ffc064f8: 48 00 00 28 b ffc06520 <rtems_fdisk_recycle_segment+0x308>
if (dst_pages == 0)
dsc = rtems_fdisk_seg_most_available (&fd->available);
(*pages)--;
}
else if (rtems_fdisk_page_desc_erased (spd))
ffc064fc: 7f 23 cb 78 mr r3,r25
ffc06500: 4b ff f2 b9 bl ffc057b8 <rtems_fdisk_page_desc_erased>
ffc06504: 2f 83 00 00 cmpwi cr7,r3,0
ffc06508: 41 9e 00 14 beq- cr7,ffc0651c <rtems_fdisk_recycle_segment+0x304><== ALWAYS TAKEN
{
--fd->erased_blocks;
ffc0650c: 81 3d 00 28 lwz r9,40(r29) <== NOT EXECUTED
ffc06510: 39 29 ff ff addi r9,r9,-1 <== NOT EXECUTED
ffc06514: 91 3d 00 28 stw r9,40(r29) <== NOT EXECUTED
ffc06518: 48 00 00 08 b ffc06520 <rtems_fdisk_recycle_segment+0x308><== NOT EXECUTED
}
else
{
used++;
ffc0651c: 3b 18 00 01 addi r24,r24,1
int ret;
uint32_t spage;
uint32_t used = 0;
uint32_t active = 0;
for (spage = 0; spage < ssc->pages; spage++)
ffc06520: 3b 7b 00 01 addi r27,r27,1
ffc06524: 81 3e 00 14 lwz r9,20(r30)
ffc06528: 7f 9b 48 40 cmplw cr7,r27,r9
ffc0652c: 41 9c fd 2c blt+ cr7,ffc06258 <rtems_fdisk_recycle_segment+0x40>
used++;
}
}
#if RTEMS_FDISK_TRACE
rtems_fdisk_printf (fd, "ssc end: %d-%d: p=%ld, a=%ld, u=%ld",
ffc06530: 3c 80 ff c3 lis r4,-61
ffc06534: 80 be 00 08 lwz r5,8(r30)
ffc06538: 80 de 00 0c lwz r6,12(r30)
ffc0653c: 38 84 39 db addi r4,r4,14811
ffc06540: 7f a3 eb 78 mr r3,r29
ffc06544: 7e c7 b3 78 mr r7,r22
ffc06548: 7e e8 bb 78 mr r8,r23
ffc0654c: 7f 09 c3 78 mr r9,r24
ffc06550: 4c c6 31 82 crclr 4*cr1+eq
ffc06554: 4b ff f3 81 bl ffc058d4 <rtems_fdisk_printf>
ssc->device, ssc->segment,
pages, active, used);
#endif
if (ssc->pages_active != 0)
ffc06558: 80 9e 00 1c lwz r4,28(r30)
ffc0655c: 2f 84 00 00 cmpwi cr7,r4,0
ffc06560: 41 be 00 14 beq+ cr7,ffc06574 <rtems_fdisk_recycle_segment+0x35c><== ALWAYS TAKEN
{
rtems_fdisk_error ("compacting: ssc pages not 0: %d",
ffc06564: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc06568: 38 63 39 ff addi r3,r3,14847 <== NOT EXECUTED
ffc0656c: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc06570: 4b ff f5 0d bl ffc05a7c <rtems_fdisk_error> <== NOT EXECUTED
}
ret = rtems_fdisk_erase_segment (fd, ssc);
return ret;
}
ffc06574: 80 01 00 4c lwz r0,76(r1)
{
rtems_fdisk_error ("compacting: ssc pages not 0: %d",
ssc->pages_active);
}
ret = rtems_fdisk_erase_segment (fd, ssc);
ffc06578: 7f a3 eb 78 mr r3,r29
ffc0657c: 7f c4 f3 78 mr r4,r30
return ret;
}
ffc06580: ba 41 00 10 lmw r18,16(r1)
ffc06584: 7c 08 03 a6 mtlr r0
ffc06588: 38 21 00 48 addi r1,r1,72
{
rtems_fdisk_error ("compacting: ssc pages not 0: %d",
ssc->pages_active);
}
ret = rtems_fdisk_erase_segment (fd, ssc);
ffc0658c: 4b ff f8 f4 b ffc05e80 <rtems_fdisk_erase_segment>
return ret;
}
ffc06590: 39 61 00 48 addi r11,r1,72 <== NOT EXECUTED
ffc06594: 7f 43 d3 78 mr r3,r26 <== NOT EXECUTED
ffc06598: 4b ff af a0 b ffc01538 <_restgpr_18_x> <== NOT EXECUTED
ffc05cec <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)
{
ffc05cec: 94 21 ff d8 stwu r1,-40(r1)
ffc05cf0: 7c 08 02 a6 mflr r0
ffc05cf4: 90 01 00 2c stw r0,44(r1)
ffc05cf8: bf 01 00 08 stmw r24,8(r1)
ffc05cfc: 7c bb 2b 78 mr r27,r5
ffc05d00: 7c fc 3b 78 mr r28,r7
int ret;
uint32_t device;
uint32_t segment;
const rtems_fdisk_segment_desc* sd;
const rtems_fdisk_driver_handlers* ops;
device = sc->device;
ffc05d04: 83 a4 00 08 lwz r29,8(r4)
rtems_fdisk_seg_write (const rtems_flashdisk* fd,
rtems_fdisk_segment_ctl* sc,
uint32_t offset,
const void* buffer,
uint32_t size)
{
ffc05d08: 7c 9f 23 78 mr r31,r4
uint32_t device;
uint32_t segment;
const rtems_fdisk_segment_desc* sd;
const rtems_fdisk_driver_handlers* ops;
device = sc->device;
segment = sc->segment;
ffc05d0c: 83 c4 00 0c lwz r30,12(r4)
sd = rtems_fdisk_seg_descriptor (fd, device, segment);
ops = fd->devices[device].descriptor->flash_ops;
#if RTEMS_FDISK_TRACE
rtems_fdisk_printf (fd, " seg-write: %02d-%03d: o=%08x s=%d",
ffc05d10: 3c 80 ff c3 lis r4,-61
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;
ffc05d14: 81 23 00 2c lwz r9,44(r3)
ffc05d18: 1d 5d 00 0c mulli r10,r29,12
ffc05d1c: 7d 09 52 14 add r8,r9,r10
ffc05d20: 7d 49 50 2e lwzx r10,r9,r10
ffc05d24: 1d 3e 00 30 mulli r9,r30,48
ffc05d28: 7d 2a 4a 14 add r9,r10,r9
ffc05d2c: 83 09 00 04 lwz r24,4(r9)
rtems_fdisk_seg_write (const rtems_flashdisk* fd,
rtems_fdisk_segment_ctl* sc,
uint32_t offset,
const void* buffer,
uint32_t size)
{
ffc05d30: 7c d9 33 78 mr r25,r6
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;
ffc05d34: 81 28 00 08 lwz r9,8(r8)
#if RTEMS_FDISK_TRACE
rtems_fdisk_printf (fd, " seg-write: %02d-%03d: o=%08x s=%d",
ffc05d38: 38 84 38 12 addi r4,r4,14354
ffc05d3c: 7f a5 eb 78 mr r5,r29
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;
ffc05d40: 83 49 00 08 lwz r26,8(r9)
#if RTEMS_FDISK_TRACE
rtems_fdisk_printf (fd, " seg-write: %02d-%03d: o=%08x s=%d",
ffc05d44: 7f c6 f3 78 mr r6,r30
ffc05d48: 7f 67 db 78 mr r7,r27
ffc05d4c: 7f 88 e3 78 mr r8,r28
ffc05d50: 4c c6 31 82 crclr 4*cr1+eq
ffc05d54: 4b ff fb 81 bl ffc058d4 <rtems_fdisk_printf>
device, segment, offset, size);
#endif
ret = ops->write (sd, device, segment, offset, buffer, size);
ffc05d58: 81 3a 00 04 lwz r9,4(r26)
ffc05d5c: 7f 03 c3 78 mr r3,r24
ffc05d60: 7f a4 eb 78 mr r4,r29
ffc05d64: 7d 29 03 a6 mtctr r9
ffc05d68: 7f c5 f3 78 mr r5,r30
ffc05d6c: 7f 66 db 78 mr r6,r27
ffc05d70: 7f 27 cb 78 mr r7,r25
ffc05d74: 7f 88 e3 78 mr r8,r28
ffc05d78: 4e 80 04 21 bctrl
if (ret)
ffc05d7c: 2c 03 00 00 cmpwi r3,0
ffc05d80: 41 82 00 0c beq- ffc05d8c <rtems_fdisk_seg_write+0xa0> <== ALWAYS TAKEN
sc->failed = true;
ffc05d84: 39 20 00 01 li r9,1 <== NOT EXECUTED
ffc05d88: 91 3f 00 28 stw r9,40(r31) <== NOT EXECUTED
return ret;
}
ffc05d8c: 39 61 00 28 addi r11,r1,40
ffc05d90: 4b ff b7 c0 b ffc01550 <_restgpr_24_x>
ffc05e04 <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)
{
ffc05e04: 94 21 ff e8 stwu r1,-24(r1)
ffc05e08: 7c 08 02 a6 mflr r0
ffc05e0c: 90 01 00 1c stw r0,28(r1)
if ((fd->flags & RTEMS_FDISK_BLANK_CHECK_BEFORE_WRITE))
ffc05e10: 81 23 00 08 lwz r9,8(r3)
static int
rtems_fdisk_seg_write_page (rtems_flashdisk* fd,
rtems_fdisk_segment_ctl* sc,
uint32_t page,
const void* buffer)
{
ffc05e14: bf 81 00 08 stmw r28,8(r1)
ffc05e18: 7c 7f 1b 78 mr r31,r3
if ((fd->flags & RTEMS_FDISK_BLANK_CHECK_BEFORE_WRITE))
ffc05e1c: 71 2a 00 08 andi. r10,r9,8
static int
rtems_fdisk_seg_write_page (rtems_flashdisk* fd,
rtems_fdisk_segment_ctl* sc,
uint32_t page,
const void* buffer)
{
ffc05e20: 7c 9d 23 78 mr r29,r4
ffc05e24: 7c be 2b 78 mr r30,r5
ffc05e28: 7c dc 33 78 mr r28,r6
if ((fd->flags & RTEMS_FDISK_BLANK_CHECK_BEFORE_WRITE))
ffc05e2c: 40 82 00 38 bne- ffc05e64 <rtems_fdisk_seg_write_page+0x60><== ALWAYS TAKEN
return ret;
}
--fd->erased_blocks;
return rtems_fdisk_seg_write (fd, sc,
page * fd->block_size, buffer, fd->block_size);
}
ffc05e30: 80 01 00 1c lwz r0,28(r1)
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,
ffc05e34: 7f e3 fb 78 mr r3,r31
{
int ret = rtems_fdisk_seg_blank_check_page (fd, sc, page);
if (ret)
return ret;
}
--fd->erased_blocks;
ffc05e38: 81 3f 00 28 lwz r9,40(r31)
return rtems_fdisk_seg_write (fd, sc,
ffc05e3c: 7f a4 eb 78 mr r4,r29
page * fd->block_size, buffer, fd->block_size);
ffc05e40: 80 ff 00 14 lwz r7,20(r31)
}
ffc05e44: 7c 08 03 a6 mtlr r0
{
int ret = rtems_fdisk_seg_blank_check_page (fd, sc, page);
if (ret)
return ret;
}
--fd->erased_blocks;
ffc05e48: 39 29 ff ff addi r9,r9,-1
return rtems_fdisk_seg_write (fd, sc,
ffc05e4c: 7c be 39 d6 mullw r5,r30,r7
{
int ret = rtems_fdisk_seg_blank_check_page (fd, sc, page);
if (ret)
return ret;
}
--fd->erased_blocks;
ffc05e50: 91 3f 00 28 stw r9,40(r31)
return rtems_fdisk_seg_write (fd, sc,
ffc05e54: 7f 86 e3 78 mr r6,r28
page * fd->block_size, buffer, fd->block_size);
}
ffc05e58: bb 81 00 08 lmw r28,8(r1)
ffc05e5c: 38 21 00 18 addi r1,r1,24
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,
ffc05e60: 4b ff fe 8c b ffc05cec <rtems_fdisk_seg_write>
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);
ffc05e64: 80 c3 00 14 lwz r6,20(r3)
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,
ffc05e68: 7c a5 31 d6 mullw r5,r5,r6
ffc05e6c: 4b ff fd ed bl ffc05c58 <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)
ffc05e70: 2f 83 00 00 cmpwi cr7,r3,0
ffc05e74: 41 9e ff bc beq+ cr7,ffc05e30 <rtems_fdisk_seg_write_page+0x2c><== ALWAYS TAKEN
return ret;
}
--fd->erased_blocks;
return rtems_fdisk_seg_write (fd, sc,
page * fd->block_size, buffer, fd->block_size);
}
ffc05e78: 39 61 00 18 addi r11,r1,24 <== NOT EXECUTED
ffc05e7c: 4b ff b6 e4 b ffc01560 <_restgpr_28_x> <== NOT EXECUTED
ffc05d94 <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)
{
ffc05d94: 94 21 ff e8 stwu r1,-24(r1)
ffc05d98: 7c 08 02 a6 mflr r0
ffc05d9c: 90 01 00 1c stw r0,28(r1)
uint32_t offset = page * sizeof (rtems_fdisk_page_desc);
if ((fd->flags & RTEMS_FDISK_BLANK_CHECK_BEFORE_WRITE))
ffc05da0: 81 23 00 08 lwz r9,8(r3)
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)
{
ffc05da4: bf 81 00 08 stmw r28,8(r1)
ffc05da8: 7c 7e 1b 78 mr r30,r3
uint32_t offset = page * sizeof (rtems_fdisk_page_desc);
if ((fd->flags & RTEMS_FDISK_BLANK_CHECK_BEFORE_WRITE))
ffc05dac: 71 2a 00 08 andi. r10,r9,8
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)
{
ffc05db0: 7c 9d 23 78 mr r29,r4
ffc05db4: 7c dc 33 78 mr r28,r6
uint32_t offset = page * sizeof (rtems_fdisk_page_desc);
ffc05db8: 54 bf 18 38 rlwinm r31,r5,3,0,28
if ((fd->flags & RTEMS_FDISK_BLANK_CHECK_BEFORE_WRITE))
ffc05dbc: 40 82 00 2c bne- ffc05de8 <rtems_fdisk_seg_write_page_desc+0x54><== ALWAYS TAKEN
if (ret)
return ret;
}
return rtems_fdisk_seg_write (fd, sc, offset,
page_desc, sizeof (rtems_fdisk_page_desc));
}
ffc05dc0: 80 01 00 1c lwz r0,28(r1)
offset,
sizeof (rtems_fdisk_page_desc));
if (ret)
return ret;
}
return rtems_fdisk_seg_write (fd, sc, offset,
ffc05dc4: 7f c3 f3 78 mr r3,r30
ffc05dc8: 7f a4 eb 78 mr r4,r29
page_desc, sizeof (rtems_fdisk_page_desc));
}
ffc05dcc: 7c 08 03 a6 mtlr r0
offset,
sizeof (rtems_fdisk_page_desc));
if (ret)
return ret;
}
return rtems_fdisk_seg_write (fd, sc, offset,
ffc05dd0: 7f e5 fb 78 mr r5,r31
ffc05dd4: 7f 86 e3 78 mr r6,r28
page_desc, sizeof (rtems_fdisk_page_desc));
}
ffc05dd8: bb 81 00 08 lmw r28,8(r1)
offset,
sizeof (rtems_fdisk_page_desc));
if (ret)
return ret;
}
return rtems_fdisk_seg_write (fd, sc, offset,
ffc05ddc: 38 e0 00 08 li r7,8
page_desc, sizeof (rtems_fdisk_page_desc));
}
ffc05de0: 38 21 00 18 addi r1,r1,24
offset,
sizeof (rtems_fdisk_page_desc));
if (ret)
return ret;
}
return rtems_fdisk_seg_write (fd, sc, offset,
ffc05de4: 4b ff ff 08 b ffc05cec <rtems_fdisk_seg_write>
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,
ffc05de8: 7f e5 fb 78 mr r5,r31
ffc05dec: 38 c0 00 08 li r6,8
ffc05df0: 4b ff fe 69 bl ffc05c58 <rtems_fdisk_seg_blank_check>
offset,
sizeof (rtems_fdisk_page_desc));
if (ret)
ffc05df4: 2f 83 00 00 cmpwi cr7,r3,0
ffc05df8: 41 9e ff c8 beq+ cr7,ffc05dc0 <rtems_fdisk_seg_write_page_desc+0x2c><== ALWAYS TAKEN
return ret;
}
return rtems_fdisk_seg_write (fd, sc, offset,
page_desc, sizeof (rtems_fdisk_page_desc));
}
ffc05dfc: 39 61 00 18 addi r11,r1,24 <== NOT EXECUTED
ffc05e00: 4b ff b7 60 b ffc01560 <_restgpr_28_x> <== NOT EXECUTED
ffc0576c <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)
{
if (item)
ffc0576c: 2c 04 00 00 cmpwi r4,0
ffc05770: 41 82 00 40 beq- ffc057b0 <rtems_fdisk_segment_queue_insert_before+0x44><== NEVER TAKEN
{
rtems_fdisk_segment_ctl** prev = &queue->head;
ffc05774: 7c 6a 1b 78 mr r10,r3
rtems_fdisk_segment_ctl* it = queue->head;
ffc05778: 81 23 00 00 lwz r9,0(r3)
while (it)
ffc0577c: 48 00 00 2c b ffc057a8 <rtems_fdisk_segment_queue_insert_before+0x3c>
{
if (item == it)
ffc05780: 7f 84 48 00 cmpw cr7,r4,r9
ffc05784: 40 be 00 1c bne+ cr7,ffc057a0 <rtems_fdisk_segment_queue_insert_before+0x34>
{
sc->next = item;
*prev = sc;
queue->count++;
ffc05788: 81 23 00 08 lwz r9,8(r3)
while (it)
{
if (item == it)
{
sc->next = item;
ffc0578c: 90 85 00 00 stw r4,0(r5)
*prev = sc;
queue->count++;
ffc05790: 39 29 00 01 addi r9,r9,1
while (it)
{
if (item == it)
{
sc->next = item;
*prev = sc;
ffc05794: 90 aa 00 00 stw r5,0(r10)
queue->count++;
ffc05798: 91 23 00 08 stw r9,8(r3)
return;
ffc0579c: 4e 80 00 20 blr
}
prev = &it->next;
ffc057a0: 7d 2a 4b 78 mr r10,r9
it = it->next;
ffc057a4: 81 29 00 00 lwz r9,0(r9)
if (item)
{
rtems_fdisk_segment_ctl** prev = &queue->head;
rtems_fdisk_segment_ctl* it = queue->head;
while (it)
ffc057a8: 2f 89 00 00 cmpwi cr7,r9,0
ffc057ac: 40 9e ff d4 bne+ cr7,ffc05780 <rtems_fdisk_segment_queue_insert_before+0x14><== ALWAYS TAKEN
prev = &it->next;
it = it->next;
}
}
rtems_fdisk_segment_queue_push_tail (queue, sc);
ffc057b0: 7c a4 2b 78 mr r4,r5 <== NOT EXECUTED
ffc057b4: 4b ff ff 08 b ffc056bc <rtems_fdisk_segment_queue_push_tail><== NOT EXECUTED
ffc0564c <rtems_fdisk_segment_queue_push_head>:
*/
static void
rtems_fdisk_segment_queue_push_head (rtems_fdisk_segment_ctl_queue* queue,
rtems_fdisk_segment_ctl* sc)
{
if (sc)
ffc0564c: 2c 04 00 00 cmpwi r4,0 <== NOT EXECUTED
ffc05650: 4d 82 00 20 beqlr <== NOT EXECUTED
{
sc->next = queue->head;
ffc05654: 81 43 00 00 lwz r10,0(r3) <== NOT EXECUTED
ffc05658: 91 44 00 00 stw r10,0(r4) <== NOT EXECUTED
queue->head = sc;
if (queue->tail == 0)
ffc0565c: 81 43 00 04 lwz r10,4(r3) <== NOT EXECUTED
rtems_fdisk_segment_ctl* sc)
{
if (sc)
{
sc->next = queue->head;
queue->head = sc;
ffc05660: 90 83 00 00 stw r4,0(r3) <== NOT EXECUTED
if (queue->tail == 0)
ffc05664: 2f 8a 00 00 cmpwi cr7,r10,0 <== NOT EXECUTED
ffc05668: 40 be 00 08 bne+ cr7,ffc05670 <rtems_fdisk_segment_queue_push_head+0x24><== NOT EXECUTED
queue->tail = sc;
ffc0566c: 90 83 00 04 stw r4,4(r3) <== NOT EXECUTED
queue->count++;
ffc05670: 81 23 00 08 lwz r9,8(r3) <== NOT EXECUTED
ffc05674: 39 29 00 01 addi r9,r9,1 <== NOT EXECUTED
ffc05678: 91 23 00 08 stw r9,8(r3) <== NOT EXECUTED
ffc0567c: 4e 80 00 20 blr <== NOT EXECUTED
ffc059a8 <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, ...)
{
ffc059a8: 94 21 ff 80 stwu r1,-128(r1) <== NOT EXECUTED
ffc059ac: 7c 08 02 a6 mflr r0 <== NOT EXECUTED
ffc059b0: bf a1 00 74 stmw r29,116(r1) <== NOT EXECUTED
ffc059b4: 90 01 00 84 stw r0,132(r1) <== NOT EXECUTED
ffc059b8: 90 a1 00 18 stw r5,24(r1) <== NOT EXECUTED
ffc059bc: 90 c1 00 1c stw r6,28(r1) <== NOT EXECUTED
ffc059c0: 90 e1 00 20 stw r7,32(r1) <== NOT EXECUTED
ffc059c4: 91 01 00 24 stw r8,36(r1) <== NOT EXECUTED
ffc059c8: 91 21 00 28 stw r9,40(r1) <== NOT EXECUTED
ffc059cc: 91 41 00 2c stw r10,44(r1) <== NOT EXECUTED
ffc059d0: 40 86 00 24 bne- cr1,ffc059f4 <rtems_fdisk_warning+0x4c><== NOT EXECUTED
ffc059d4: d8 21 00 30 stfd f1,48(r1) <== NOT EXECUTED
ffc059d8: d8 41 00 38 stfd f2,56(r1) <== NOT EXECUTED
ffc059dc: d8 61 00 40 stfd f3,64(r1) <== NOT EXECUTED
ffc059e0: d8 81 00 48 stfd f4,72(r1) <== NOT EXECUTED
ffc059e4: d8 a1 00 50 stfd f5,80(r1) <== NOT EXECUTED
ffc059e8: d8 c1 00 58 stfd f6,88(r1) <== NOT EXECUTED
ffc059ec: d8 e1 00 60 stfd f7,96(r1) <== NOT EXECUTED
ffc059f0: d9 01 00 68 stfd f8,104(r1) <== NOT EXECUTED
int ret = 0;
if (fd->info_level >= 1)
ffc059f4: 81 23 00 6c lwz r9,108(r3) <== NOT EXECUTED
* @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, ...)
{
ffc059f8: 7c 9d 23 78 mr r29,r4 <== NOT EXECUTED
int ret = 0;
ffc059fc: 3b c0 00 00 li r30,0 <== NOT EXECUTED
if (fd->info_level >= 1)
ffc05a00: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED
ffc05a04: 41 be 00 6c beq+ cr7,ffc05a70 <rtems_fdisk_warning+0xc8><== NOT EXECUTED
{
va_list args;
va_start (args, format);
ffc05a08: 39 20 00 02 li r9,2 <== NOT EXECUTED
ffc05a0c: 9b c1 00 09 stb r30,9(r1) <== NOT EXECUTED
fprintf (stdout, "fdisk:warning:");
ffc05a10: 3f e0 00 00 lis r31,0 <== NOT EXECUTED
{
int ret = 0;
if (fd->info_level >= 1)
{
va_list args;
va_start (args, format);
ffc05a14: 99 21 00 08 stb r9,8(r1) <== NOT EXECUTED
ffc05a18: 39 21 00 88 addi r9,r1,136 <== NOT EXECUTED
fprintf (stdout, "fdisk:warning:");
ffc05a1c: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
{
int ret = 0;
if (fd->info_level >= 1)
{
va_list args;
va_start (args, format);
ffc05a20: 91 21 00 0c stw r9,12(r1) <== NOT EXECUTED
ffc05a24: 39 21 00 10 addi r9,r1,16 <== NOT EXECUTED
fprintf (stdout, "fdisk:warning:");
ffc05a28: 38 63 37 83 addi r3,r3,14211 <== NOT EXECUTED
{
int ret = 0;
if (fd->info_level >= 1)
{
va_list args;
va_start (args, format);
ffc05a2c: 91 21 00 10 stw r9,16(r1) <== NOT EXECUTED
fprintf (stdout, "fdisk:warning:");
ffc05a30: 81 3f 28 0c lwz r9,10252(r31) <== NOT EXECUTED
ffc05a34: 80 89 00 08 lwz r4,8(r9) <== NOT EXECUTED
ffc05a38: 48 01 d1 bd bl ffc22bf4 <fputs> <== NOT EXECUTED
ret = vfprintf (stdout, format, args);
ffc05a3c: 81 3f 28 0c lwz r9,10252(r31) <== NOT EXECUTED
ffc05a40: 7f a4 eb 78 mr r4,r29 <== NOT EXECUTED
ffc05a44: 80 69 00 08 lwz r3,8(r9) <== NOT EXECUTED
ffc05a48: 38 a1 00 08 addi r5,r1,8 <== NOT EXECUTED
ffc05a4c: 48 02 65 25 bl ffc2bf70 <vfprintf> <== NOT EXECUTED
fprintf (stdout, "\n");
ffc05a50: 81 3f 28 0c lwz r9,10252(r31) <== NOT EXECUTED
if (fd->info_level >= 1)
{
va_list args;
va_start (args, format);
fprintf (stdout, "fdisk:warning:");
ret = vfprintf (stdout, format, args);
ffc05a54: 7c 7e 1b 78 mr r30,r3 <== NOT EXECUTED
fprintf (stdout, "\n");
ffc05a58: 80 89 00 08 lwz r4,8(r9) <== NOT EXECUTED
ffc05a5c: 38 60 00 0a li r3,10 <== NOT EXECUTED
ffc05a60: 48 01 d0 7d bl ffc22adc <fputc> <== NOT EXECUTED
fflush (stdout);
ffc05a64: 81 3f 28 0c lwz r9,10252(r31) <== NOT EXECUTED
ffc05a68: 80 69 00 08 lwz r3,8(r9) <== NOT EXECUTED
ffc05a6c: 48 01 ca 45 bl ffc224b0 <fflush> <== NOT EXECUTED
va_end (args);
}
return ret;
}
ffc05a70: 39 61 00 80 addi r11,r1,128 <== NOT EXECUTED
ffc05a74: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc05a78: 4b ff ba ec b ffc01564 <_restgpr_29_x> <== NOT EXECUTED
ffc05cd8 <rtems_filesystem_do_unmount>:
}
void rtems_filesystem_do_unmount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
ffc05cd8: 94 21 ff f0 stwu r1,-16(r1)
ffc05cdc: 7c 08 02 a6 mflr r0
*/
#include <rtems/userenv.h>
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
ffc05ce0: 38 80 00 00 li r4,0
ffc05ce4: bf c1 00 08 stmw r30,8(r1)
ffc05ce8: 3f c0 00 00 lis r30,0
ffc05cec: 7c 7f 1b 78 mr r31,r3
ffc05cf0: 80 7e 28 54 lwz r3,10324(r30)
ffc05cf4: 38 a0 00 00 li r5,0
ffc05cf8: 90 01 00 14 stw r0,20(r1)
ffc05cfc: 48 00 2b b1 bl ffc088ac <rtems_semaphore_obtain>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
ffc05d00: 81 3f 00 00 lwz r9,0(r31)
previous = the_node->previous;
ffc05d04: 81 5f 00 04 lwz r10,4(r31)
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
ffc05d08: 80 7e 28 54 lwz r3,10324(r30)
next->previous = previous;
ffc05d0c: 91 49 00 04 stw r10,4(r9)
previous->next = next;
ffc05d10: 91 2a 00 00 stw r9,0(r10)
ffc05d14: 48 00 2c bd bl ffc089d0 <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);
ffc05d18: 80 7f 00 20 lwz r3,32(r31)
ffc05d1c: 48 00 01 7d bl ffc05e98 <rtems_filesystem_global_location_release>
(*mt_entry->ops->fsunmount_me_h)(mt_entry);
ffc05d20: 81 3f 00 0c lwz r9,12(r31)
ffc05d24: 7f e3 fb 78 mr r3,r31
ffc05d28: 81 29 00 3c lwz r9,60(r9)
ffc05d2c: 7d 29 03 a6 mtctr r9
ffc05d30: 4e 80 04 21 bctrl
if (mt_entry->unmount_task != 0) {
ffc05d34: 80 7f 00 3c lwz r3,60(r31)
ffc05d38: 2f 83 00 00 cmpwi cr7,r3,0
ffc05d3c: 41 9e 00 20 beq- cr7,ffc05d5c <rtems_filesystem_do_unmount+0x84><== NEVER TAKEN
*/
RTEMS_INLINE_ROUTINE rtems_status_code rtems_event_transient_send(
rtems_id id
)
{
return rtems_event_system_send( id, RTEMS_EVENT_SYSTEM_TRANSIENT );
ffc05d40: 3c 80 80 00 lis r4,-32768
ffc05d44: 48 00 2d 45 bl ffc08a88 <rtems_event_system_send>
rtems_status_code sc =
rtems_event_transient_send(mt_entry->unmount_task);
if (sc != RTEMS_SUCCESSFUL) {
ffc05d48: 2f 83 00 00 cmpwi cr7,r3,0
ffc05d4c: 41 be 00 10 beq+ cr7,ffc05d5c <rtems_filesystem_do_unmount+0x84><== ALWAYS TAKEN
rtems_fatal_error_occurred(0xdeadbeef);
ffc05d50: 3c 60 de ad lis r3,-8531 <== NOT EXECUTED
ffc05d54: 60 63 be ef ori r3,r3,48879 <== NOT EXECUTED
ffc05d58: 48 00 33 1d bl ffc09074 <rtems_fatal_error_occurred> <== NOT EXECUTED
}
}
free(mt_entry);
}
ffc05d5c: 80 01 00 14 lwz r0,20(r1)
if (sc != RTEMS_SUCCESSFUL) {
rtems_fatal_error_occurred(0xdeadbeef);
}
}
free(mt_entry);
ffc05d60: 7f e3 fb 78 mr r3,r31
}
ffc05d64: bb c1 00 08 lmw r30,8(r1)
ffc05d68: 7c 08 03 a6 mtlr r0
ffc05d6c: 38 21 00 10 addi r1,r1,16
if (sc != RTEMS_SUCCESSFUL) {
rtems_fatal_error_occurred(0xdeadbeef);
}
}
free(mt_entry);
ffc05d70: 4b ff e7 ec b ffc0455c <free>
ffc0d458 <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
)
{
ffc0d458: 94 21 ff d8 stwu r1,-40(r1)
ffc0d45c: 7c 08 02 a6 mflr r0
ffc0d460: bf 01 00 08 stmw r24,8(r1)
} else {
/* This is the root file system */
status = (*config->eval_token)(ctx, arg, ".", 1);
}
} else {
status = (*config->eval_token)(ctx, arg, "..", 2);
ffc0d464: 3f 00 ff c2 lis r24,-62
¤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);
ffc0d468: 3f 80 ff c2 lis r28,-62
void rtems_filesystem_eval_path_generic(
rtems_filesystem_eval_path_context_t *ctx,
void *arg,
const rtems_filesystem_eval_path_generic_config *config
)
{
ffc0d46c: 90 01 00 2c stw r0,44(r1)
ffc0d470: 7c 7f 1b 78 mr r31,r3
ffc0d474: 7c 9e 23 78 mr r30,r4
ffc0d478: 7c bd 2b 78 mr r29,r5
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 =
ffc0d47c: 3b 23 00 18 addi r25,r3,24
} else {
/* This is the root file system */
status = (*config->eval_token)(ctx, arg, ".", 1);
}
} else {
status = (*config->eval_token)(ctx, arg, "..", 2);
ffc0d480: 3b 18 d4 33 addi r24,r24,-11213
¤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);
ffc0d484: 3b 9c d4 34 addi r28,r28,-11212
rtems_filesystem_eval_path_context_t *ctx,
const char **token,
size_t *tokenlen
)
{
rtems_filesystem_eval_path_next_token(ctx);
ffc0d488: 7f e3 fb 78 mr r3,r31
ffc0d48c: 48 00 02 55 bl ffc0d6e0 <rtems_filesystem_eval_path_next_token>
*token = ctx->token;
*tokenlen = ctx->tokenlen;
ffc0d490: 83 7f 00 0c lwz r27,12(r31)
const char **token,
size_t *tokenlen
)
{
rtems_filesystem_eval_path_next_token(ctx);
*token = ctx->token;
ffc0d494: 83 5f 00 08 lwz r26,8(r31)
const char *token;
size_t tokenlen;
rtems_filesystem_eval_path_get_next_token(ctx, &token, &tokenlen);
if (tokenlen > 0) {
ffc0d498: 2f 9b 00 00 cmpwi cr7,r27,0
ffc0d49c: 41 be 01 e0 beq+ cr7,ffc0d67c <rtems_filesystem_eval_path_generic+0x224>
if ((*config->is_directory)(ctx, arg)) {
ffc0d4a0: 81 3d 00 00 lwz r9,0(r29)
ffc0d4a4: 7f e3 fb 78 mr r3,r31
ffc0d4a8: 7f c4 f3 78 mr r4,r30
ffc0d4ac: 7d 29 03 a6 mtctr r9
ffc0d4b0: 4e 80 04 21 bctrl
ffc0d4b4: 2f 83 00 00 cmpwi cr7,r3,0
ffc0d4b8: 41 9e 01 b4 beq- cr7,ffc0d66c <rtems_filesystem_eval_path_generic+0x214>
static inline bool rtems_filesystem_is_current_directory(
const char *token,
size_t tokenlen
)
{
return tokenlen == 1 && token [0] == '.';
ffc0d4bc: 2f 9b 00 01 cmpwi cr7,r27,1
ffc0d4c0: 39 20 00 00 li r9,0
ffc0d4c4: 40 be 00 14 bne+ cr7,ffc0d4d8 <rtems_filesystem_eval_path_generic+0x80>
ffc0d4c8: 89 3a 00 00 lbz r9,0(r26)
ffc0d4cc: 69 29 00 2e xori r9,r9,46
ffc0d4d0: 7d 29 00 34 cntlzw r9,r9
ffc0d4d4: 55 29 d9 7e rlwinm r9,r9,27,5,31
if (rtems_filesystem_is_current_directory(token, tokenlen)) {
ffc0d4d8: 2f 89 00 00 cmpwi cr7,r9,0
ffc0d4dc: 41 9e 00 30 beq- cr7,ffc0d50c <rtems_filesystem_eval_path_generic+0xb4>
if (rtems_filesystem_eval_path_has_path(ctx)) {
ffc0d4e0: 81 3f 00 04 lwz r9,4(r31)
ffc0d4e4: 2f 89 00 00 cmpwi cr7,r9,0
ffc0d4e8: 41 be 00 08 beq+ cr7,ffc0d4f0 <rtems_filesystem_eval_path_generic+0x98>
ffc0d4ec: 48 00 00 ec b ffc0d5d8 <rtems_filesystem_eval_path_generic+0x180>
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) {
ffc0d4f0: 81 3f 00 10 lwz r9,16(r31)
ffc0d4f4: 71 2a 01 00 andi. r10,r9,256
ffc0d4f8: 40 82 00 08 bne- ffc0d500 <rtems_filesystem_eval_path_generic+0xa8>
ffc0d4fc: 48 00 00 dc b ffc0d5d8 <rtems_filesystem_eval_path_generic+0x180>
status = (*config->eval_token)(ctx, arg, ".", 1);
} else {
rtems_filesystem_eval_path_error(ctx, EINVAL);
ffc0d500: 7f e3 fb 78 mr r3,r31
ffc0d504: 38 80 00 16 li r4,22
ffc0d508: 48 00 01 5c b ffc0d664 <rtems_filesystem_eval_path_generic+0x20c>
static inline bool rtems_filesystem_is_parent_directory(
const char *token,
size_t tokenlen
)
{
return tokenlen == 2 && token [0] == '.' && token [1] == '.';
ffc0d50c: 2f 9b 00 02 cmpwi cr7,r27,2
ffc0d510: 39 20 00 00 li r9,0
ffc0d514: 40 be 00 20 bne+ cr7,ffc0d534 <rtems_filesystem_eval_path_generic+0xdc>
ffc0d518: 89 5a 00 00 lbz r10,0(r26)
ffc0d51c: 2f 8a 00 2e cmpwi cr7,r10,46
ffc0d520: 40 be 00 14 bne+ cr7,ffc0d534 <rtems_filesystem_eval_path_generic+0xdc>
ffc0d524: 89 3a 00 01 lbz r9,1(r26)
ffc0d528: 69 29 00 2e xori r9,r9,46
ffc0d52c: 7d 29 00 34 cntlzw r9,r9
ffc0d530: 55 29 d9 7e rlwinm r9,r9,27,5,31
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_DONE;
}
}
} else if (rtems_filesystem_is_parent_directory(token, tokenlen)) {
ffc0d534: 2f 89 00 00 cmpwi cr7,r9,0
ffc0d538: 41 9e 00 d0 beq- cr7,ffc0d608 <rtems_filesystem_eval_path_generic+0x1b0>
}
} else {
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_DONE;
}
}
}
ffc0d53c: 80 9f 00 30 lwz r4,48(r31)
{
const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry;
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 );
ffc0d540: 38 60 00 00 li r3,0
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;
ffc0d544: 81 3f 00 2c lwz r9,44(r31)
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 );
ffc0d548: 81 44 00 14 lwz r10,20(r4)
ffc0d54c: 7f 89 50 00 cmpw cr7,r9,r10
ffc0d550: 40 be 00 18 bne+ cr7,ffc0d568 <rtems_filesystem_eval_path_generic+0x110>
ffc0d554: 81 29 00 0c lwz r9,12(r9)
ffc0d558: 7f 23 cb 78 mr r3,r25
ffc0d55c: 81 29 00 10 lwz r9,16(r9)
ffc0d560: 7d 29 03 a6 mtctr r9
ffc0d564: 4e 80 04 21 bctrl
}
} 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)) {
ffc0d568: 70 7b 00 01 andi. r27,r3,1
ffc0d56c: 41 82 00 08 beq- ffc0d574 <rtems_filesystem_eval_path_generic+0x11c>
ffc0d570: 48 00 00 68 b ffc0d5d8 <rtems_filesystem_eval_path_generic+0x180>
#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;
ffc0d574: 81 3f 00 2c lwz r9,44(r31)
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 );
ffc0d578: 7f 23 cb 78 mr r3,r25
ffc0d57c: 81 49 00 0c lwz r10,12(r9)
ffc0d580: 80 89 00 24 lwz r4,36(r9)
ffc0d584: 81 4a 00 10 lwz r10,16(r10)
ffc0d588: 7d 49 03 a6 mtctr r10
ffc0d58c: 4e 80 04 21 bctrl
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)) {
ffc0d590: 2f 83 00 00 cmpwi cr7,r3,0
ffc0d594: 41 9e 00 5c beq- cr7,ffc0d5f0 <rtems_filesystem_eval_path_generic+0x198>
if (currentloc->mt_entry->mt_point_node != NULL) {
ffc0d598: 80 9f 00 2c lwz r4,44(r31)
ffc0d59c: 81 24 00 20 lwz r9,32(r4)
ffc0d5a0: 2f 89 00 00 cmpwi cr7,r9,0
ffc0d5a4: 41 9e 00 34 beq- cr7,ffc0d5d8 <rtems_filesystem_eval_path_generic+0x180><== NEVER TAKEN
static inline void rtems_filesystem_eval_path_put_back_token(
rtems_filesystem_eval_path_context_t *ctx
)
{
size_t tokenlen = ctx->tokenlen;
ffc0d5a8: 81 3f 00 0c lwz r9,12(r31)
rtems_filesystem_eval_path_put_back_token(ctx);
rtems_filesystem_eval_path_restart(
ffc0d5ac: 7f e3 fb 78 mr r3,r31
ctx->path -= tokenlen;
ffc0d5b0: 81 5f 00 00 lwz r10,0(r31)
ffc0d5b4: 38 84 00 20 addi r4,r4,32
ctx->pathlen += tokenlen;
ctx->tokenlen = 0;
ffc0d5b8: 93 7f 00 0c stw r27,12(r31)
rtems_filesystem_eval_path_context_t *ctx
)
{
size_t tokenlen = ctx->tokenlen;
ctx->path -= tokenlen;
ffc0d5bc: 7d 49 50 50 subf r10,r9,r10
ffc0d5c0: 91 5f 00 00 stw r10,0(r31)
ctx->pathlen += tokenlen;
ffc0d5c4: 81 5f 00 04 lwz r10,4(r31)
ffc0d5c8: 7d 2a 4a 14 add r9,r10,r9
ffc0d5cc: 91 3f 00 04 stw r9,4(r31)
ffc0d5d0: 4b ff 84 81 bl ffc05a50 <rtems_filesystem_eval_path_restart>
ffc0d5d4: 48 00 00 a8 b ffc0d67c <rtems_filesystem_eval_path_generic+0x224>
¤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);
ffc0d5d8: 81 3d 00 04 lwz r9,4(r29)
ffc0d5dc: 7f e3 fb 78 mr r3,r31
ffc0d5e0: 7f c4 f3 78 mr r4,r30
ffc0d5e4: 7f 85 e3 78 mr r5,r28
ffc0d5e8: 38 c0 00 01 li r6,1
ffc0d5ec: 48 00 00 30 b ffc0d61c <rtems_filesystem_eval_path_generic+0x1c4>
}
} else {
status = (*config->eval_token)(ctx, arg, "..", 2);
ffc0d5f0: 81 3d 00 04 lwz r9,4(r29)
ffc0d5f4: 7f e3 fb 78 mr r3,r31
ffc0d5f8: 7f c4 f3 78 mr r4,r30
ffc0d5fc: 7f 05 c3 78 mr r5,r24
ffc0d600: 38 c0 00 02 li r6,2
ffc0d604: 48 00 00 18 b ffc0d61c <rtems_filesystem_eval_path_generic+0x1c4>
}
} else {
status = (*config->eval_token)(ctx, arg, token, tokenlen);
ffc0d608: 81 3d 00 04 lwz r9,4(r29)
ffc0d60c: 7f e3 fb 78 mr r3,r31
ffc0d610: 7f c4 f3 78 mr r4,r30
ffc0d614: 7f 45 d3 78 mr r5,r26
ffc0d618: 7f 66 db 78 mr r6,r27
ffc0d61c: 7d 29 03 a6 mtctr r9
ffc0d620: 4e 80 04 21 bctrl
}
if (status == RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY) {
ffc0d624: 2f 83 00 02 cmpwi cr7,r3,2
ffc0d628: 2f 03 00 00 cmpwi cr6,r3,0
ffc0d62c: 40 be 00 4c bne+ cr7,ffc0d678 <rtems_filesystem_eval_path_generic+0x220>
if (rtems_filesystem_eval_path_has_path(ctx)) {
ffc0d630: 81 3f 00 04 lwz r9,4(r31)
ffc0d634: 2f 89 00 00 cmpwi cr7,r9,0
ffc0d638: 41 be 00 44 beq+ cr7,ffc0d67c <rtems_filesystem_eval_path_generic+0x224>
int eval_flags;
rtems_filesystem_eval_path_eat_delimiter(ctx);
ffc0d63c: 7f e3 fb 78 mr r3,r31
ffc0d640: 48 00 00 45 bl ffc0d684 <rtems_filesystem_eval_path_eat_delimiter>
eval_flags = rtems_filesystem_eval_path_get_flags(ctx);
if (
(eval_flags & RTEMS_FS_ACCEPT_RESIDUAL_DELIMITERS) == 0
ffc0d644: 81 3f 00 10 lwz r9,16(r31)
if (rtems_filesystem_eval_path_has_path(ctx)) {
int eval_flags;
rtems_filesystem_eval_path_eat_delimiter(ctx);
eval_flags = rtems_filesystem_eval_path_get_flags(ctx);
if (
ffc0d648: 71 2a 00 80 andi. r10,r9,128
ffc0d64c: 41 82 00 10 beq- ffc0d65c <rtems_filesystem_eval_path_generic+0x204>
(eval_flags & RTEMS_FS_ACCEPT_RESIDUAL_DELIMITERS) == 0
|| rtems_filesystem_eval_path_has_path(ctx)
ffc0d650: 81 3f 00 04 lwz r9,4(r31)
ffc0d654: 2f 89 00 00 cmpwi cr7,r9,0
ffc0d658: 41 9e 00 24 beq- cr7,ffc0d67c <rtems_filesystem_eval_path_generic+0x224>
) {
rtems_filesystem_eval_path_error(ctx, ENOENT);
ffc0d65c: 7f e3 fb 78 mr r3,r31
ffc0d660: 38 80 00 02 li r4,2
ffc0d664: 4b ff 7f 15 bl ffc05578 <rtems_filesystem_eval_path_error>
ffc0d668: 48 00 00 14 b ffc0d67c <rtems_filesystem_eval_path_generic+0x224>
}
}
}
} else {
rtems_filesystem_eval_path_error(ctx, ENOTDIR);
ffc0d66c: 7f e3 fb 78 mr r3,r31
ffc0d670: 38 80 00 14 li r4,20
ffc0d674: 4b ff ff f0 b ffc0d664 <rtems_filesystem_eval_path_generic+0x20c>
)
{
rtems_filesystem_eval_path_generic_status status =
RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_CONTINUE;
while (status == RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_CONTINUE) {
ffc0d678: 41 9a fe 10 beq+ cr6,ffc0d488 <rtems_filesystem_eval_path_generic+0x30>
}
} else {
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_DONE;
}
}
}
ffc0d67c: 39 61 00 28 addi r11,r1,40
ffc0d680: 4b ff 2f 28 b ffc005a8 <_restgpr_24_x>
ffc05ad8 <rtems_filesystem_eval_path_recursive>:
void rtems_filesystem_eval_path_recursive(
rtems_filesystem_eval_path_context_t *ctx,
const char *path,
size_t pathlen
)
{
ffc05ad8: 94 21 ff e0 stwu r1,-32(r1)
ffc05adc: 7c 08 02 a6 mflr r0
ffc05ae0: bf 61 00 0c stmw r27,12(r1)
if (pathlen > 0) {
ffc05ae4: 7c bb 2b 79 mr. r27,r5
void rtems_filesystem_eval_path_recursive(
rtems_filesystem_eval_path_context_t *ctx,
const char *path,
size_t pathlen
)
{
ffc05ae8: 90 01 00 24 stw r0,36(r1)
if (pathlen > 0) {
ffc05aec: 41 82 00 b0 beq- ffc05b9c <rtems_filesystem_eval_path_recursive+0xc4><== NEVER TAKEN
if (ctx->recursionlevel < RTEMS_FILESYSTEM_SYMLOOP_MAX) {
ffc05af0: 81 23 00 14 lwz r9,20(r3)
ffc05af4: 7c 7f 1b 78 mr r31,r3
ffc05af8: 2f 89 00 1f cmpwi cr7,r9,31
ffc05afc: 41 9d 00 98 bgt- cr7,ffc05b94 <rtems_filesystem_eval_path_recursive+0xbc>
const char *saved_path = ctx->path;
size_t saved_pathlen = ctx->pathlen;
if (rtems_filesystem_is_delimiter(path [0])) {
ffc05b00: 89 24 00 00 lbz r9,0(r4)
ffc05b04: 7c 9e 23 78 mr r30,r4
size_t pathlen
)
{
if (pathlen > 0) {
if (ctx->recursionlevel < RTEMS_FILESYSTEM_SYMLOOP_MAX) {
const char *saved_path = ctx->path;
ffc05b08: 83 83 00 00 lwz r28,0(r3)
gid_t node_gid
);
static inline bool rtems_filesystem_is_delimiter(char c)
{
return c == '/' || c == '\\';
ffc05b0c: 2f 89 00 2f cmpwi cr7,r9,47
size_t saved_pathlen = ctx->pathlen;
ffc05b10: 83 a3 00 04 lwz r29,4(r3)
ffc05b14: 41 9e 00 14 beq- cr7,ffc05b28 <rtems_filesystem_eval_path_recursive+0x50>
ffc05b18: 69 29 00 5c xori r9,r9,92
ffc05b1c: 7d 29 00 34 cntlzw r9,r9
ffc05b20: 55 29 d9 7e rlwinm r9,r9,27,5,31
ffc05b24: 48 00 00 08 b ffc05b2c <rtems_filesystem_eval_path_recursive+0x54>
ffc05b28: 39 20 00 01 li r9,1
if (rtems_filesystem_is_delimiter(path [0])) {
ffc05b2c: 2f 89 00 00 cmpwi cr7,r9,0
ffc05b30: 41 be 00 10 beq+ cr7,ffc05b40 <rtems_filesystem_eval_path_recursive+0x68>
rtems_filesystem_eval_path_restart(ctx, &ctx->rootloc);
ffc05b34: 7f e3 fb 78 mr r3,r31
ffc05b38: 38 9f 00 30 addi r4,r31,48
ffc05b3c: 4b ff ff 15 bl ffc05a50 <rtems_filesystem_eval_path_restart>
}
ctx->path = path;
ctx->pathlen = pathlen;
++ctx->recursionlevel;
ffc05b40: 81 3f 00 14 lwz r9,20(r31)
if (rtems_filesystem_is_delimiter(path [0])) {
rtems_filesystem_eval_path_restart(ctx, &ctx->rootloc);
}
ctx->path = path;
ffc05b44: 93 df 00 00 stw r30,0(r31)
ctx->pathlen = pathlen;
++ctx->recursionlevel;
ffc05b48: 39 29 00 01 addi r9,r9,1
if (rtems_filesystem_is_delimiter(path [0])) {
rtems_filesystem_eval_path_restart(ctx, &ctx->rootloc);
}
ctx->path = path;
ctx->pathlen = pathlen;
ffc05b4c: 93 7f 00 04 stw r27,4(r31)
++ctx->recursionlevel;
ffc05b50: 91 3f 00 14 stw r9,20(r31)
while (ctx->pathlen > 0) {
ffc05b54: 48 00 00 1c b ffc05b70 <rtems_filesystem_eval_path_recursive+0x98>
(*ctx->currentloc.mt_entry->ops->eval_path_h)(ctx);
ffc05b58: 81 3f 00 2c lwz r9,44(r31)
ffc05b5c: 7f e3 fb 78 mr r3,r31
ffc05b60: 81 29 00 0c lwz r9,12(r9)
ffc05b64: 81 29 00 08 lwz r9,8(r9)
ffc05b68: 7d 29 03 a6 mtctr r9
ffc05b6c: 4e 80 04 21 bctrl
ctx->path = path;
ctx->pathlen = pathlen;
++ctx->recursionlevel;
while (ctx->pathlen > 0) {
ffc05b70: 81 3f 00 04 lwz r9,4(r31)
ffc05b74: 2f 89 00 00 cmpwi cr7,r9,0
ffc05b78: 40 9e ff e0 bne+ cr7,ffc05b58 <rtems_filesystem_eval_path_recursive+0x80>
(*ctx->currentloc.mt_entry->ops->eval_path_h)(ctx);
}
--ctx->recursionlevel;
ffc05b7c: 81 3f 00 14 lwz r9,20(r31)
ctx->path = saved_path;
ffc05b80: 93 9f 00 00 stw r28,0(r31)
++ctx->recursionlevel;
while (ctx->pathlen > 0) {
(*ctx->currentloc.mt_entry->ops->eval_path_h)(ctx);
}
--ctx->recursionlevel;
ffc05b84: 39 29 ff ff addi r9,r9,-1
ffc05b88: 91 3f 00 14 stw r9,20(r31)
ctx->path = saved_path;
ctx->pathlen = saved_pathlen;
ffc05b8c: 93 bf 00 04 stw r29,4(r31)
ffc05b90: 48 00 00 24 b ffc05bb4 <rtems_filesystem_eval_path_recursive+0xdc>
} else {
rtems_filesystem_eval_path_error(ctx, ELOOP);
ffc05b94: 38 80 00 5c li r4,92
ffc05b98: 48 00 00 08 b ffc05ba0 <rtems_filesystem_eval_path_recursive+0xc8>
}
} else {
rtems_filesystem_eval_path_error(ctx, ENOENT);
ffc05b9c: 38 80 00 02 li r4,2 <== NOT EXECUTED
}
}
ffc05ba0: 80 01 00 24 lwz r0,36(r1)
ffc05ba4: bb 61 00 0c lmw r27,12(r1)
ffc05ba8: 7c 08 03 a6 mtlr r0
ffc05bac: 38 21 00 20 addi r1,r1,32
ctx->pathlen = saved_pathlen;
} else {
rtems_filesystem_eval_path_error(ctx, ELOOP);
}
} else {
rtems_filesystem_eval_path_error(ctx, ENOENT);
ffc05bb0: 4b ff f9 c8 b ffc05578 <rtems_filesystem_eval_path_error>
}
}
ffc05bb4: 39 61 00 20 addi r11,r1,32
ffc05bb8: 4b ff a9 fc b ffc005b4 <_restgpr_27_x>
ffc058a8 <rtems_filesystem_eval_path_start_with_parent>:
const char *path,
int eval_flags,
rtems_filesystem_location_info_t *parentloc,
int parent_eval_flags
)
{
ffc058a8: 94 21 ff d8 stwu r1,-40(r1)
ffc058ac: 7c 08 02 a6 mflr r0
ffc058b0: bf 21 00 0c stmw r25,12(r1)
ffc058b4: 7c 7e 1b 78 mr r30,r3
size_t pathlen = strlen(path);
ffc058b8: 7c 83 23 78 mr r3,r4
const char *path,
int eval_flags,
rtems_filesystem_location_info_t *parentloc,
int parent_eval_flags
)
{
ffc058bc: 90 01 00 2c stw r0,44(r1)
ffc058c0: 7c 9f 23 78 mr r31,r4
ffc058c4: 7c bb 2b 78 mr r27,r5
ffc058c8: 7c da 33 78 mr r26,r6
ffc058cc: 7c f9 3b 78 mr r25,r7
size_t pathlen = strlen(path);
ffc058d0: 48 00 c5 a1 bl ffc11e70 <strlen>
gid_t node_gid
);
static inline bool rtems_filesystem_is_delimiter(char c)
{
return c == '/' || c == '\\';
ffc058d4: 39 43 00 01 addi r10,r3,1
ffc058d8: 7c 69 1b 78 mr r9,r3
ffc058dc: 7d 49 03 a6 mtctr r10
ffc058e0: 48 00 00 34 b ffc05914 <rtems_filesystem_eval_path_start_with_parent+0x6c>
#include <rtems/libio_.h>
static size_t get_parentpathlen(const char *path, size_t pathlen)
{
while (pathlen > 0) {
size_t i = pathlen - 1;
ffc058e4: 39 09 ff ff addi r8,r9,-1
if (rtems_filesystem_is_delimiter(path [i])) {
ffc058e8: 7d 5f 40 ae lbzx r10,r31,r8
ffc058ec: 2f 8a 00 2f cmpwi cr7,r10,47
ffc058f0: 41 9e 00 14 beq- cr7,ffc05904 <rtems_filesystem_eval_path_start_with_parent+0x5c>
ffc058f4: 69 4a 00 5c xori r10,r10,92
ffc058f8: 7d 4a 00 34 cntlzw r10,r10
ffc058fc: 55 4a d9 7e rlwinm r10,r10,27,5,31
ffc05900: 48 00 00 08 b ffc05908 <rtems_filesystem_eval_path_start_with_parent+0x60>
ffc05904: 39 40 00 01 li r10,1
ffc05908: 2f 8a 00 00 cmpwi cr7,r10,0
ffc0590c: 40 9e 00 90 bne- cr7,ffc0599c <rtems_filesystem_eval_path_start_with_parent+0xf4>
return pathlen;
}
pathlen = i;
ffc05910: 7d 09 43 78 mr r9,r8
#include <rtems/libio_.h>
static size_t get_parentpathlen(const char *path, size_t pathlen)
{
while (pathlen > 0) {
ffc05914: 42 00 ff d0 bdnz+ ffc058e4 <rtems_filesystem_eval_path_start_with_parent+0x3c>
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) {
ffc05918: 2f 83 00 00 cmpwi cr7,r3,0
ffc0591c: 41 9e 00 30 beq- cr7,ffc0594c <rtems_filesystem_eval_path_start_with_parent+0xa4>
if (parentpathlen == 0) {
parentpath = ".";
parentpathlen = 1;
name = path;
ffc05920: 7f fd fb 78 mr r29,r31
size_t namelen = 0;
const rtems_filesystem_location_info_t *currentloc = NULL;
if (pathlen > 0) {
if (parentpathlen == 0) {
parentpath = ".";
ffc05924: 3f e0 ff c2 lis r31,-62
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) {
ffc05928: 7c 7c 1b 78 mr r28,r3
if (parentpathlen == 0) {
parentpath = ".";
parentpathlen = 1;
ffc0592c: 38 a0 00 01 li r5,1
size_t namelen = 0;
const rtems_filesystem_location_info_t *currentloc = NULL;
if (pathlen > 0) {
if (parentpathlen == 0) {
parentpath = ".";
ffc05930: 38 9f d4 34 addi r4,r31,-11212
ffc05934: 48 00 00 28 b ffc0595c <rtems_filesystem_eval_path_start_with_parent+0xb4>
parentpathlen = 1;
name = path;
namelen = pathlen;
} else {
name = path + parentpathlen;
ffc05938: 7f bf 4a 14 add r29,r31,r9
namelen = pathlen - parentpathlen;
ffc0593c: 7f 89 18 50 subf r28,r9,r3
ffc05940: 7d 25 4b 78 mr r5,r9
rtems_filesystem_location_info_t *parentloc,
int parent_eval_flags
)
{
size_t pathlen = strlen(path);
const char *parentpath = path;
ffc05944: 7f e4 fb 78 mr r4,r31
ffc05948: 48 00 00 14 b ffc0595c <rtems_filesystem_eval_path_start_with_parent+0xb4>
ffc0594c: 7f e4 fb 78 mr r4,r31
size_t parentpathlen = get_parentpathlen(path, pathlen);
const char *name = NULL;
size_t namelen = 0;
ffc05950: 3b 80 00 00 li r28,0
)
{
size_t pathlen = strlen(path);
const char *parentpath = path;
size_t parentpathlen = get_parentpathlen(path, pathlen);
const char *name = NULL;
ffc05954: 3b a0 00 00 li r29,0
}
pathlen = i;
}
return 0;
ffc05958: 38 a0 00 00 li r5,0
currentloc = eval_path_start(
ctx,
parentpath,
parentpathlen,
parent_eval_flags,
&rtems_filesystem_root,
ffc0595c: 3d 40 00 00 lis r10,0
ffc05960: 81 0a 27 d8 lwz r8,10200(r10)
name = path + parentpathlen;
namelen = pathlen - parentpathlen;
}
}
currentloc = eval_path_start(
ffc05964: 7f 26 cb 78 mr r6,r25
ffc05968: 7f c3 f3 78 mr r3,r30
ffc0596c: 38 e8 00 04 addi r7,r8,4
ffc05970: 4b ff fd b9 bl ffc05728 <eval_path_start>
ffc05974: 7c 64 1b 78 mr r4,r3
parent_eval_flags,
&rtems_filesystem_root,
&rtems_filesystem_current
);
rtems_filesystem_location_clone(parentloc, currentloc);
ffc05978: 7f 43 d3 78 mr r3,r26
ffc0597c: 48 00 74 81 bl ffc0cdfc <rtems_filesystem_location_clone>
ctx->path = name;
ffc05980: 93 be 00 00 stw r29,0(r30)
ctx->pathlen = namelen;
ctx->flags = eval_flags;
rtems_filesystem_eval_path_continue(ctx);
ffc05984: 7f c3 f3 78 mr r3,r30
);
rtems_filesystem_location_clone(parentloc, currentloc);
ctx->path = name;
ctx->pathlen = namelen;
ffc05988: 93 9e 00 04 stw r28,4(r30)
ctx->flags = eval_flags;
ffc0598c: 93 7e 00 10 stw r27,16(r30)
rtems_filesystem_eval_path_continue(ctx);
ffc05990: 4b ff fd 01 bl ffc05690 <rtems_filesystem_eval_path_continue>
return &ctx->currentloc;
ffc05994: 38 7e 00 18 addi r3,r30,24
ffc05998: 48 00 00 20 b ffc059b8 <rtems_filesystem_eval_path_start_with_parent+0x110>
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) {
ffc0599c: 2f 83 00 00 cmpwi cr7,r3,0
ffc059a0: 40 9e ff 98 bne+ cr7,ffc05938 <rtems_filesystem_eval_path_start_with_parent+0x90><== ALWAYS TAKEN
ffc059a4: 7d 25 4b 78 mr r5,r9 <== NOT EXECUTED
rtems_filesystem_location_info_t *parentloc,
int parent_eval_flags
)
{
size_t pathlen = strlen(path);
const char *parentpath = path;
ffc059a8: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED
size_t parentpathlen = get_parentpathlen(path, pathlen);
const char *name = NULL;
size_t namelen = 0;
ffc059ac: 3b 80 00 00 li r28,0 <== NOT EXECUTED
)
{
size_t pathlen = strlen(path);
const char *parentpath = path;
size_t parentpathlen = get_parentpathlen(path, pathlen);
const char *name = NULL;
ffc059b0: 3b a0 00 00 li r29,0 <== NOT EXECUTED
ffc059b4: 4b ff ff a8 b ffc0595c <rtems_filesystem_eval_path_start_with_parent+0xb4><== NOT EXECUTED
ctx->flags = eval_flags;
rtems_filesystem_eval_path_continue(ctx);
return &ctx->currentloc;
}
ffc059b8: 39 61 00 28 addi r11,r1,40
ffc059bc: 4b ff ab f0 b ffc005ac <_restgpr_25_x>
ffc0d20c <rtems_filesystem_get_mount_handler>:
find_arg fa = {
.type = type,
.mount_h = NULL
};
if ( type != NULL ) {
ffc0d20c: 2f 83 00 00 cmpwi cr7,r3,0
rtems_filesystem_fsmount_me_t
rtems_filesystem_get_mount_handler(
const char *type
)
{
ffc0d210: 94 21 ff e8 stwu r1,-24(r1)
ffc0d214: 7c 08 02 a6 mflr r0
find_arg fa = {
ffc0d218: 39 20 00 00 li r9,0
ffc0d21c: 90 61 00 08 stw r3,8(r1)
rtems_filesystem_fsmount_me_t
rtems_filesystem_get_mount_handler(
const char *type
)
{
ffc0d220: 90 01 00 1c stw r0,28(r1)
find_arg fa = {
ffc0d224: 91 21 00 0c stw r9,12(r1)
.type = type,
.mount_h = NULL
};
if ( type != NULL ) {
ffc0d228: 41 9e 00 14 beq- cr7,ffc0d23c <rtems_filesystem_get_mount_handler+0x30><== NEVER TAKEN
rtems_filesystem_iterate( find_handler, &fa );
ffc0d22c: 3c 60 ff c1 lis r3,-63
ffc0d230: 38 63 d0 f0 addi r3,r3,-12048
ffc0d234: 38 81 00 08 addi r4,r1,8
ffc0d238: 4b ff ff 21 bl ffc0d158 <rtems_filesystem_iterate>
}
return fa.mount_h;
}
ffc0d23c: 80 01 00 1c lwz r0,28(r1)
ffc0d240: 80 61 00 0c lwz r3,12(r1)
ffc0d244: 7c 08 03 a6 mtlr r0
ffc0d248: 38 21 00 18 addi r1,r1,24
ffc0d24c: 4e 80 00 20 blr
ffc0418c <rtems_filesystem_initialize>:
{
int rv = 0;
const rtems_filesystem_mount_configuration *root_config =
&rtems_filesystem_root_configuration;
rv = mount(
ffc0418c: 3d 40 ff c2 lis r10,-62
/*
* Default mode for created files.
*/
void rtems_filesystem_initialize( void )
{
ffc04190: 94 21 ff f8 stwu r1,-8(r1)
int rv = 0;
const rtems_filesystem_mount_configuration *root_config =
&rtems_filesystem_root_configuration;
rv = mount(
ffc04194: 39 2a bf e0 addi r9,r10,-16416
/*
* Default mode for created files.
*/
void rtems_filesystem_initialize( void )
{
ffc04198: 7c 08 02 a6 mflr r0
int rv = 0;
const rtems_filesystem_mount_configuration *root_config =
&rtems_filesystem_root_configuration;
rv = mount(
ffc0419c: 80 6a bf e0 lwz r3,-16416(r10)
ffc041a0: 80 89 00 04 lwz r4,4(r9)
ffc041a4: 80 a9 00 08 lwz r5,8(r9)
ffc041a8: 80 c9 00 0c lwz r6,12(r9)
ffc041ac: 80 e9 00 10 lwz r7,16(r9)
/*
* Default mode for created files.
*/
void rtems_filesystem_initialize( void )
{
ffc041b0: 90 01 00 0c stw r0,12(r1)
int rv = 0;
const rtems_filesystem_mount_configuration *root_config =
&rtems_filesystem_root_configuration;
rv = mount(
ffc041b4: 48 00 09 59 bl ffc04b0c <mount>
root_config->target,
root_config->filesystemtype,
root_config->options,
root_config->data
);
if ( rv != 0 )
ffc041b8: 2f 83 00 00 cmpwi cr7,r3,0
ffc041bc: 41 be 00 10 beq+ cr7,ffc041cc <rtems_filesystem_initialize+0x40><== ALWAYS TAKEN
rtems_fatal_error_occurred( 0xABCD0002 );
ffc041c0: 3c 60 ab cd lis r3,-21555 <== NOT EXECUTED
ffc041c4: 60 63 00 02 ori r3,r3,2 <== NOT EXECUTED
ffc041c8: 48 00 00 24 b ffc041ec <rtems_filesystem_initialize+0x60><== 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);
ffc041cc: 3c 60 ff c2 lis r3,-62
ffc041d0: 38 63 cc 14 addi r3,r3,-13292
ffc041d4: 38 80 01 ff li r4,511
ffc041d8: 48 00 08 1d bl ffc049f4 <mkdir>
if ( rv != 0 )
ffc041dc: 2f 83 00 00 cmpwi cr7,r3,0
ffc041e0: 41 be 00 10 beq+ cr7,ffc041f0 <rtems_filesystem_initialize+0x64><== ALWAYS TAKEN
rtems_fatal_error_occurred( 0xABCD0003 );
ffc041e4: 3c 60 ab cd lis r3,-21555 <== NOT EXECUTED
ffc041e8: 60 63 00 03 ori r3,r3,3 <== NOT EXECUTED
ffc041ec: 48 00 4e 89 bl ffc09074 <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.
*/
}
ffc041f0: 80 01 00 0c lwz r0,12(r1)
ffc041f4: 38 21 00 08 addi r1,r1,8
ffc041f8: 7c 08 03 a6 mtlr r0
ffc041fc: 4e 80 00 20 blr
ffc0d158 <rtems_filesystem_iterate>:
bool rtems_filesystem_iterate(
rtems_per_filesystem_routine routine,
void *routine_arg
)
{
ffc0d158: 94 21 ff e0 stwu r1,-32(r1)
ffc0d15c: 7c 08 02 a6 mflr r0
ffc0d160: bf 61 00 0c stmw r27,12(r1)
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
ffc0d164: 3f c0 ff c2 lis r30,-62
bool rtems_filesystem_iterate(
rtems_per_filesystem_routine routine,
void *routine_arg
)
{
ffc0d168: 7c 7d 1b 78 mr r29,r3
ffc0d16c: 90 01 00 24 stw r0,36(r1)
ffc0d170: 7c 9c 23 78 mr r28,r4
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
ffc0d174: 3b e0 00 00 li r31,0
bool rtems_filesystem_iterate(
rtems_per_filesystem_routine routine,
void *routine_arg
)
{
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
ffc0d178: 3b de bf f4 addi r30,r30,-16396
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
ffc0d17c: 48 00 00 1c b ffc0d198 <rtems_filesystem_iterate+0x40>
stop = (*routine)( table_entry, routine_arg );
ffc0d180: 7f c3 f3 78 mr r3,r30
ffc0d184: 7f a9 03 a6 mtctr r29
ffc0d188: 7f 84 e3 78 mr r4,r28
++table_entry;
ffc0d18c: 3b de 00 08 addi r30,r30,8
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
stop = (*routine)( table_entry, routine_arg );
ffc0d190: 4e 80 04 21 bctrl
ffc0d194: 7c 7f 1b 78 mr r31,r3
{
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
ffc0d198: 81 3e 00 00 lwz r9,0(r30)
ffc0d19c: 2f 9f 00 00 cmpwi cr7,r31,0
ffc0d1a0: 2f 09 00 00 cmpwi cr6,r9,0
ffc0d1a4: 41 9a 00 0c beq- cr6,ffc0d1b0 <rtems_filesystem_iterate+0x58>
ffc0d1a8: 41 9e ff d8 beq+ cr7,ffc0d180 <rtems_filesystem_iterate+0x28>
ffc0d1ac: 48 00 00 54 b ffc0d200 <rtems_filesystem_iterate+0xa8>
stop = (*routine)( table_entry, routine_arg );
++table_entry;
}
if ( !stop ) {
ffc0d1b0: 40 9e 00 50 bne- cr7,ffc0d200 <rtems_filesystem_iterate+0xa8>
rtems_libio_lock();
ffc0d1b4: 4b ff ff 85 bl ffc0d138 <rtems_libio_lock>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
ffc0d1b8: 3d 20 00 00 lis r9,0
ffc0d1bc: 83 c9 22 14 lwz r30,8724(r9)
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 ));
ffc0d1c0: 39 29 22 14 addi r9,r9,8724
ffc0d1c4: 3b 69 00 04 addi r27,r9,4
for (
ffc0d1c8: 48 00 00 1c b ffc0d1e4 <rtems_filesystem_iterate+0x8c>
!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 );
ffc0d1cc: 38 7e 00 08 addi r3,r30,8
ffc0d1d0: 7f a9 03 a6 mtctr r29
ffc0d1d4: 7f 84 e3 78 mr r4,r28
ffc0d1d8: 4e 80 04 21 bctrl
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
}
ffc0d1dc: 83 de 00 00 lwz r30,0(r30)
!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 );
ffc0d1e0: 7c 7f 1b 78 mr r31,r3
++table_entry;
}
if ( !stop ) {
rtems_libio_lock();
for (
ffc0d1e4: 7f 9e d8 00 cmpw cr7,r30,r27
ffc0d1e8: 40 be 00 0c bne+ cr7,ffc0d1f4 <rtems_filesystem_iterate+0x9c>
) {
const filesystem_node *fsn = (filesystem_node *) node;
stop = (*routine)( &fsn->entry, routine_arg );
}
rtems_libio_unlock();
ffc0d1ec: 4b ff ff 61 bl ffc0d14c <rtems_libio_unlock>
ffc0d1f0: 48 00 00 10 b ffc0d200 <rtems_filesystem_iterate+0xa8>
if ( !stop ) {
rtems_libio_lock();
for (
node = rtems_chain_first( &filesystem_chain );
!rtems_chain_is_tail( &filesystem_chain, node ) && !stop;
ffc0d1f4: 2f 9f 00 00 cmpwi cr7,r31,0
ffc0d1f8: 41 9e ff d4 beq+ cr7,ffc0d1cc <rtems_filesystem_iterate+0x74><== ALWAYS TAKEN
ffc0d1fc: 4b ff ff f0 b ffc0d1ec <rtems_filesystem_iterate+0x94><== NOT EXECUTED
}
rtems_libio_unlock();
}
return stop;
}
ffc0d200: 39 61 00 20 addi r11,r1,32
ffc0d204: 7f e3 fb 78 mr r3,r31
ffc0d208: 4b ff 33 ac b ffc005b4 <_restgpr_27_x>
ffc05d74 <rtems_filesystem_location_remove_from_mt_entry>:
}
void rtems_filesystem_location_remove_from_mt_entry(
rtems_filesystem_location_info_t *loc
)
{
ffc05d74: 94 21 ff f0 stwu r1,-16(r1)
ffc05d78: 7c 08 02 a6 mflr r0
ffc05d7c: bf c1 00 08 stmw r30,8(r1)
ffc05d80: 7c 7f 1b 78 mr r31,r3
ffc05d84: 90 01 00 14 stw r0,20(r1)
rtems_filesystem_mt_entry_declare_lock_context(lock_context);
bool do_unmount;
rtems_filesystem_mt_entry_lock(lock_context);
ffc05d88: 4b ff fe 35 bl ffc05bbc <ppc_interrupt_disable>
ffc05d8c: 7c 7e 1b 78 mr r30,r3
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
ffc05d90: 81 3f 00 00 lwz r9,0(r31)
previous = the_node->previous;
ffc05d94: 81 5f 00 04 lwz r10,4(r31)
rtems_chain_extract_unprotected(&loc->mt_entry_node);
do_unmount = rtems_filesystem_is_ready_for_unmount(loc->mt_entry);
ffc05d98: 80 7f 00 14 lwz r3,20(r31)
next->previous = previous;
ffc05d9c: 91 49 00 04 stw r10,4(r9)
previous->next = next;
ffc05da0: 91 2a 00 00 stw r9,0(r10)
ffc05da4: 4b ff fe 2d bl ffc05bd0 <rtems_filesystem_is_ready_for_unmount>
ffc05da8: 7f c0 01 24 mtmsr r30
rtems_filesystem_mt_entry_unlock(lock_context);
if (do_unmount) {
ffc05dac: 2f 83 00 00 cmpwi cr7,r3,0
ffc05db0: 41 be 00 1c beq+ cr7,ffc05dcc <rtems_filesystem_location_remove_from_mt_entry+0x58><== ALWAYS TAKEN
rtems_filesystem_do_unmount(loc->mt_entry);
}
}
ffc05db4: 80 01 00 14 lwz r0,20(r1) <== 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);
ffc05db8: 80 7f 00 14 lwz r3,20(r31) <== NOT EXECUTED
}
}
ffc05dbc: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED
ffc05dc0: bb c1 00 08 lmw r30,8(r1) <== NOT EXECUTED
ffc05dc4: 38 21 00 10 addi r1,r1,16 <== 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);
ffc05dc8: 4b ff ff 10 b ffc05cd8 <rtems_filesystem_do_unmount> <== NOT EXECUTED
}
}
ffc05dcc: 39 61 00 10 addi r11,r1,16
ffc05dd0: 4b ff a7 f0 b ffc005c0 <_restgpr_30_x>
ffc05ffc <rtems_filesystem_location_transform_to_global>:
}
rtems_filesystem_global_location_t *rtems_filesystem_location_transform_to_global(
rtems_filesystem_location_info_t *loc
)
{
ffc05ffc: 94 21 ff e0 stwu r1,-32(r1)
ffc06000: 7c 08 02 a6 mflr r0
ffc06004: bf c1 00 18 stmw r30,24(r1)
ffc06008: 7c 7e 1b 78 mr r30,r3
rtems_filesystem_global_location_t *global_loc = malloc(sizeof(*global_loc));
ffc0600c: 38 60 00 24 li r3,36
}
rtems_filesystem_global_location_t *rtems_filesystem_location_transform_to_global(
rtems_filesystem_location_info_t *loc
)
{
ffc06010: 90 01 00 24 stw r0,36(r1)
rtems_filesystem_global_location_t *global_loc = malloc(sizeof(*global_loc));
ffc06014: 4b ff e8 e5 bl ffc048f8 <malloc>
if (global_loc != NULL) {
ffc06018: 7c 7f 1b 79 mr. r31,r3
ffc0601c: 41 82 00 2c beq- ffc06048 <rtems_filesystem_location_transform_to_global+0x4c><== NEVER TAKEN
global_loc->reference_count = 1;
ffc06020: 39 20 00 01 li r9,1
ffc06024: 91 3f 00 18 stw r9,24(r31)
global_loc->deferred_released_next = NULL;
ffc06028: 39 20 00 00 li r9,0
global_loc->deferred_released_count = 0;
rtems_filesystem_location_copy(&global_loc->location, loc);
ffc0602c: 7f c4 f3 78 mr r4,r30
{
rtems_filesystem_global_location_t *global_loc = malloc(sizeof(*global_loc));
if (global_loc != NULL) {
global_loc->reference_count = 1;
global_loc->deferred_released_next = NULL;
ffc06030: 91 3f 00 1c stw r9,28(r31)
global_loc->deferred_released_count = 0;
ffc06034: 91 3f 00 20 stw r9,32(r31)
rtems_filesystem_location_copy(&global_loc->location, loc);
ffc06038: 4b ff fb fd bl ffc05c34 <rtems_filesystem_location_copy>
rtems_filesystem_location_remove_from_mt_entry(loc);
ffc0603c: 7f c3 f3 78 mr r3,r30
ffc06040: 4b ff fd 35 bl ffc05d74 <rtems_filesystem_location_remove_from_mt_entry>
ffc06044: 48 00 00 28 b ffc0606c <rtems_filesystem_location_transform_to_global+0x70>
} else {
rtems_filesystem_location_free(loc);
ffc06048: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc0604c: 48 00 6e 19 bl ffc0ce64 <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;
ffc06050: 7c 23 0b 78 mr r3,r1 <== NOT EXECUTED
ffc06054: 97 e3 00 08 stwu r31,8(r3) <== NOT EXECUTED
return rtems_filesystem_global_location_obtain( &global_loc );
ffc06058: 4b ff fe d9 bl ffc05f30 <rtems_filesystem_global_location_obtain><== NOT EXECUTED
ffc0605c: 7c 7f 1b 78 mr r31,r3 <== NOT EXECUTED
global_loc = rtems_filesystem_global_location_obtain_null();
errno = ENOMEM;
ffc06060: 48 00 a5 4d bl ffc105ac <__errno> <== NOT EXECUTED
ffc06064: 39 20 00 0c li r9,12 <== NOT EXECUTED
ffc06068: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED
}
return global_loc;
}
ffc0606c: 39 61 00 20 addi r11,r1,32
ffc06070: 7f e3 fb 78 mr r3,r31
ffc06074: 4b ff a5 4c b ffc005c0 <_restgpr_30_x>
ffc04b4c <rtems_gxx_key_create>:
int rtems_gxx_key_create (__gthread_key_t *key, void (*dtor) (void *))
{
ffc04b4c: 94 21 ff e8 stwu r1,-24(r1)
ffc04b50: 7c 08 02 a6 mflr r0
ffc04b54: bf a1 00 0c stmw r29,12(r1)
ffc04b58: 7c 7d 1b 78 mr r29,r3
* 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 ) );
ffc04b5c: 38 60 00 08 li r3,8
}
return 0;
}
int rtems_gxx_key_create (__gthread_key_t *key, void (*dtor) (void *))
{
ffc04b60: 7c 9e 23 78 mr r30,r4
ffc04b64: 90 01 00 1c stw r0,28(r1)
* 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 ) );
ffc04b68: 48 00 04 bd bl ffc05024 <malloc>
*key = new_key;
new_key->val = NULL;
ffc04b6c: 39 20 00 00 li r9,0
* 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 ) );
*key = new_key;
ffc04b70: 90 7d 00 00 stw r3,0(r29)
* 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 ) );
ffc04b74: 7c 7f 1b 78 mr r31,r3
"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 );
ffc04b78: 7f e4 fb 78 mr r4,r31
* 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 ) );
*key = new_key;
new_key->val = NULL;
ffc04b7c: 91 23 00 00 stw r9,0(r3)
"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 );
ffc04b80: 7f c5 f3 78 mr r5,r30
*/
/* Do not pull your hair, trust me this works. :-) */
__gthread_key_t new_key = (__gthread_key_t) malloc( sizeof( *new_key ) );
*key = new_key;
new_key->val = NULL;
new_key->dtor = dtor;
ffc04b84: 93 c3 00 04 stw r30,4(r3)
"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 );
ffc04b88: 38 60 00 00 li r3,0
ffc04b8c: 48 00 4a 5d bl ffc095e8 <rtems_task_variable_add>
if ( status == RTEMS_SUCCESSFUL )
ffc04b90: 2f 83 00 00 cmpwi cr7,r3,0
ffc04b94: 41 be 00 14 beq+ cr7,ffc04ba8 <rtems_gxx_key_create+0x5c><== ALWAYS TAKEN
return 0;
free( new_key );
ffc04b98: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc04b9c: 4b ff fd c9 bl ffc04964 <free> <== NOT EXECUTED
return -1;
ffc04ba0: 38 60 ff ff li r3,-1 <== NOT EXECUTED
ffc04ba4: 48 00 00 08 b ffc04bac <rtems_gxx_key_create+0x60> <== NOT EXECUTED
#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 )
return 0;
ffc04ba8: 38 60 00 00 li r3,0
free( new_key );
return -1;
}
ffc04bac: 39 61 00 18 addi r11,r1,24
ffc04bb0: 4b ff c1 14 b ffc00cc4 <_restgpr_29_x>
ffc04bc4 <rtems_gxx_key_delete>:
int rtems_gxx_key_delete (__gthread_key_t key)
{
ffc04bc4: 7c 2b 0b 78 mr r11,r1
ffc04bc8: 94 21 ff f0 stwu r1,-16(r1)
ffc04bcc: 7c 08 02 a6 mflr r0
ffc04bd0: 48 01 0f 8d bl ffc15b5c <_savegpr_31>
ffc04bd4: 7c 7f 1b 78 mr r31,r3
#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 );
ffc04bd8: 7f e4 fb 78 mr r4,r31
key->val = 0;
return 0;
}
int rtems_gxx_key_delete (__gthread_key_t key)
{
ffc04bdc: 90 01 00 14 stw r0,20(r1)
#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 );
ffc04be0: 38 60 00 00 li r3,0
ffc04be4: 48 00 4a b9 bl ffc0969c <rtems_task_variable_delete>
if ( status == RTEMS_SUCCESSFUL ) {
ffc04be8: 2f 83 00 00 cmpwi cr7,r3,0
ffc04bec: 40 9e 00 14 bne- cr7,ffc04c00 <rtems_gxx_key_delete+0x3c><== NEVER TAKEN
/* Hmm - hopefully all tasks using this key have gone away... */
if ( key ) free( *(void **)key );
ffc04bf0: 2f 9f 00 00 cmpwi cr7,r31,0
ffc04bf4: 41 9e 00 0c beq- cr7,ffc04c00 <rtems_gxx_key_delete+0x3c><== NEVER TAKEN
ffc04bf8: 80 7f 00 00 lwz r3,0(r31)
ffc04bfc: 4b ff fd 69 bl ffc04964 <free>
return 0;
}
key = NULL;
return 0;
}
ffc04c00: 39 61 00 10 addi r11,r1,16
ffc04c04: 38 60 00 00 li r3,0
ffc04c08: 4b ff c0 c4 b ffc00ccc <_restgpr_31_x>
ffc04d1c <rtems_gxx_mutex_lock>:
int rtems_gxx_mutex_lock (__gthread_mutex_t *mutex)
{
ffc04d1c: 94 21 ff f8 stwu r1,-8(r1)
ffc04d20: 7c 08 02 a6 mflr r0
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: lock mutex=%X\n", *mutex );
#endif
status = rtems_semaphore_obtain(
ffc04d24: 38 80 00 00 li r4,0
printk( "gxx_wrappers: mutex init complete =%X\n", *mutex );
#endif
}
int rtems_gxx_mutex_lock (__gthread_mutex_t *mutex)
{
ffc04d28: 90 01 00 0c stw r0,12(r1)
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: lock mutex=%X\n", *mutex );
#endif
status = rtems_semaphore_obtain(
ffc04d2c: 38 a0 00 00 li r5,0
ffc04d30: 80 63 00 00 lwz r3,0(r3)
ffc04d34: 48 00 42 0d bl ffc08f40 <rtems_semaphore_obtain>
*(rtems_id *)mutex,
RTEMS_WAIT,
RTEMS_NO_TIMEOUT
);
if ( status == RTEMS_SUCCESSFUL )
ffc04d38: 2f 83 00 00 cmpwi cr7,r3,0
ffc04d3c: 41 be 00 08 beq+ cr7,ffc04d44 <rtems_gxx_mutex_lock+0x28><== ALWAYS TAKEN
return 0;
return -1;
ffc04d40: 38 60 ff ff li r3,-1 <== NOT EXECUTED
}
ffc04d44: 80 01 00 0c lwz r0,12(r1)
ffc04d48: 38 21 00 08 addi r1,r1,8
ffc04d4c: 7c 08 03 a6 mtlr r0
ffc04d50: 4e 80 00 20 blr
ffc04d84 <rtems_gxx_mutex_trylock>:
int rtems_gxx_mutex_trylock (__gthread_mutex_t *mutex)
{
ffc04d84: 94 21 ff f8 stwu r1,-8(r1)
ffc04d88: 7c 08 02 a6 mflr r0
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: trylock mutex=%X\n", *mutex );
#endif
status = rtems_semaphore_obtain (*(rtems_id *)mutex, RTEMS_NO_WAIT, 0);
ffc04d8c: 38 80 00 01 li r4,1
return 0;
return -1;
}
int rtems_gxx_mutex_trylock (__gthread_mutex_t *mutex)
{
ffc04d90: 90 01 00 0c stw r0,12(r1)
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: trylock mutex=%X\n", *mutex );
#endif
status = rtems_semaphore_obtain (*(rtems_id *)mutex, RTEMS_NO_WAIT, 0);
ffc04d94: 38 a0 00 00 li r5,0
ffc04d98: 80 63 00 00 lwz r3,0(r3)
ffc04d9c: 48 00 41 a5 bl ffc08f40 <rtems_semaphore_obtain>
if ( status == RTEMS_SUCCESSFUL )
ffc04da0: 2f 83 00 00 cmpwi cr7,r3,0
ffc04da4: 41 be 00 08 beq+ cr7,ffc04dac <rtems_gxx_mutex_trylock+0x28><== ALWAYS TAKEN
return 0;
return -1;
ffc04da8: 38 60 ff ff li r3,-1 <== NOT EXECUTED
}
ffc04dac: 80 01 00 0c lwz r0,12(r1)
ffc04db0: 38 21 00 08 addi r1,r1,8
ffc04db4: 7c 08 03 a6 mtlr r0
ffc04db8: 4e 80 00 20 blr
ffc04dbc <rtems_gxx_mutex_unlock>:
int rtems_gxx_mutex_unlock (__gthread_mutex_t *mutex)
{
ffc04dbc: 94 21 ff f8 stwu r1,-8(r1)
ffc04dc0: 7c 08 02 a6 mflr r0
ffc04dc4: 90 01 00 0c stw r0,12(r1)
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: unlock mutex=%X\n", *mutex );
#endif
status = rtems_semaphore_release( *(rtems_id *)mutex );
ffc04dc8: 80 63 00 00 lwz r3,0(r3)
ffc04dcc: 48 00 42 99 bl ffc09064 <rtems_semaphore_release>
if ( status == RTEMS_SUCCESSFUL )
ffc04dd0: 2f 83 00 00 cmpwi cr7,r3,0
ffc04dd4: 41 be 00 08 beq+ cr7,ffc04ddc <rtems_gxx_mutex_unlock+0x20><== ALWAYS TAKEN
return 0;
return -1;
ffc04dd8: 38 60 ff ff li r3,-1 <== NOT EXECUTED
}
ffc04ddc: 80 01 00 0c lwz r0,12(r1)
ffc04de0: 38 21 00 08 addi r1,r1,8
ffc04de4: 7c 08 03 a6 mtlr r0
ffc04de8: 4e 80 00 20 blr
ffc04ad8 <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))
{
ffc04ad8: 94 21 ff d8 stwu r1,-40(r1)
ffc04adc: 7c 08 02 a6 mflr r0
ffc04ae0: 90 01 00 2c stw r0,44(r1)
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: once=%x, func=%x\n", *once, func );
#endif
if ( *(volatile __gthread_once_t *)once == 0 ) {
ffc04ae4: 81 23 00 00 lwz r9,0(r3)
/* 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))
{
ffc04ae8: bf a1 00 1c stmw r29,28(r1)
ffc04aec: 7c 7f 1b 78 mr r31,r3
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: once=%x, func=%x\n", *once, func );
#endif
if ( *(volatile __gthread_once_t *)once == 0 ) {
ffc04af0: 2f 89 00 00 cmpwi cr7,r9,0
ffc04af4: 40 be 00 4c bne+ cr7,ffc04b40 <rtems_gxx_once+0x68>
ffc04af8: 7c 9d 23 78 mr r29,r4
rtems_mode saveMode;
__gthread_once_t o;
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
ffc04afc: 38 60 01 00 li r3,256
ffc04b00: 38 80 01 00 li r4,256
ffc04b04: 38 a1 00 08 addi r5,r1,8
ffc04b08: 48 00 48 c9 bl ffc093d0 <rtems_task_mode>
if ( (o = *(volatile __gthread_once_t *)once) == 0 ) {
ffc04b0c: 83 df 00 00 lwz r30,0(r31)
ffc04b10: 2f 9e 00 00 cmpwi cr7,r30,0
ffc04b14: 40 9e 00 0c bne- cr7,ffc04b20 <rtems_gxx_once+0x48> <== NEVER TAKEN
*(volatile __gthread_once_t *)once = 1;
ffc04b18: 39 20 00 01 li r9,1
ffc04b1c: 91 3f 00 00 stw r9,0(r31)
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
ffc04b20: 7c 25 0b 78 mr r5,r1
ffc04b24: 84 65 00 08 lwzu r3,8(r5)
ffc04b28: 38 80 01 00 li r4,256
ffc04b2c: 48 00 48 a5 bl ffc093d0 <rtems_task_mode>
if ( o == 0 )
ffc04b30: 2f 9e 00 00 cmpwi cr7,r30,0
ffc04b34: 40 be 00 0c bne+ cr7,ffc04b40 <rtems_gxx_once+0x68> <== NEVER TAKEN
(*func)();
ffc04b38: 7f a9 03 a6 mtctr r29
ffc04b3c: 4e 80 04 21 bctrl
}
return 0;
}
ffc04b40: 39 61 00 28 addi r11,r1,40
ffc04b44: 38 60 00 00 li r3,0
ffc04b48: 4b ff c1 7c b ffc00cc4 <_restgpr_29_x>
ffc04c88 <rtems_gxx_setspecific>:
int rtems_gxx_setspecific(__gthread_key_t key, const void *ptr)
{
ffc04c88: 94 21 ff f0 stwu r1,-16(r1)
ffc04c8c: 7c 08 02 a6 mflr r0
ffc04c90: 90 01 00 14 stw r0,20(r1)
ffc04c94: bf c1 00 08 stmw r30,8(r1)
ffc04c98: 7c 7f 1b 78 mr r31,r3
ffc04c9c: 7c 9e 23 78 mr r30,r4
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 );
ffc04ca0: 80 bf 00 04 lwz r5,4(r31)
ffc04ca4: 38 60 00 00 li r3,0
ffc04ca8: 7f e4 fb 78 mr r4,r31
ffc04cac: 48 00 49 3d bl ffc095e8 <rtems_task_variable_add>
if ( status == RTEMS_SUCCESSFUL ) {
ffc04cb0: 2f 83 00 00 cmpwi cr7,r3,0
ffc04cb4: 40 9e 00 0c bne- cr7,ffc04cc0 <rtems_gxx_setspecific+0x38><== NEVER TAKEN
/* now let's set the proper value */
key->val = (void *)ptr;
ffc04cb8: 93 df 00 00 stw r30,0(r31)
return 0;
ffc04cbc: 48 00 00 08 b ffc04cc4 <rtems_gxx_setspecific+0x3c>
}
return -1;
ffc04cc0: 38 60 ff ff li r3,-1 <== NOT EXECUTED
}
ffc04cc4: 39 61 00 10 addi r11,r1,16
ffc04cc8: 4b ff c0 00 b ffc00cc8 <_restgpr_30_x>
ffc0889c <rtems_heap_allocate_aligned_with_boundary>:
size_t size,
uintptr_t alignment,
uintptr_t boundary
)
{
if (
ffc0889c: 3d 20 00 00 lis r9,0
void *rtems_heap_allocate_aligned_with_boundary(
size_t size,
uintptr_t alignment,
uintptr_t boundary
)
{
ffc088a0: 94 21 ff e8 stwu r1,-24(r1)
ffc088a4: 7c 08 02 a6 mflr r0
if (
ffc088a8: 81 29 28 ec lwz r9,10476(r9)
void *rtems_heap_allocate_aligned_with_boundary(
size_t size,
uintptr_t alignment,
uintptr_t boundary
)
{
ffc088ac: bf a1 00 0c stmw r29,12(r1)
ffc088b0: 7c 7f 1b 78 mr r31,r3
if (
ffc088b4: 2f 89 00 03 cmpwi cr7,r9,3
void *rtems_heap_allocate_aligned_with_boundary(
size_t size,
uintptr_t alignment,
uintptr_t boundary
)
{
ffc088b8: 90 01 00 1c stw r0,28(r1)
ffc088bc: 7c 9e 23 78 mr r30,r4
ffc088c0: 7c bd 2b 78 mr r29,r5
if (
ffc088c4: 41 9e 00 30 beq- cr7,ffc088f4 <rtems_heap_allocate_aligned_with_boundary+0x58><== ALWAYS TAKEN
&& !malloc_is_system_state_OK()
) {
return NULL;
}
malloc_deferred_frees_process();
ffc088c8: 4b ff ee 9d bl ffc07764 <malloc_deferred_frees_process>
RTEMS_Malloc_Heap,
size,
alignment,
boundary
);
}
ffc088cc: 80 01 00 1c lwz r0,28(r1)
malloc_deferred_frees_process();
/* FIXME: Statistics, boundary checks */
return _Protected_heap_Allocate_aligned_with_boundary(
ffc088d0: 3d 20 00 00 lis r9,0
RTEMS_Malloc_Heap,
size,
alignment,
boundary
);
}
ffc088d4: 7c 08 03 a6 mtlr r0
malloc_deferred_frees_process();
/* FIXME: Statistics, boundary checks */
return _Protected_heap_Allocate_aligned_with_boundary(
ffc088d8: 7f e4 fb 78 mr r4,r31
ffc088dc: 7f c5 f3 78 mr r5,r30
ffc088e0: 80 69 27 d4 lwz r3,10196(r9)
ffc088e4: 7f a6 eb 78 mr r6,r29
RTEMS_Malloc_Heap,
size,
alignment,
boundary
);
}
ffc088e8: bb a1 00 0c lmw r29,12(r1)
ffc088ec: 38 21 00 18 addi r1,r1,24
malloc_deferred_frees_process();
/* FIXME: Statistics, boundary checks */
return _Protected_heap_Allocate_aligned_with_boundary(
ffc088f0: 48 00 61 cc b ffc0eabc <_Protected_heap_Allocate_aligned_with_boundary>
uintptr_t boundary
)
{
if (
_System_state_Is_up( _System_state_Get() )
&& !malloc_is_system_state_OK()
ffc088f4: 4b ff ee 45 bl ffc07738 <malloc_is_system_state_OK>
ffc088f8: 2f 83 00 00 cmpwi cr7,r3,0
ffc088fc: 40 9e ff cc bne+ cr7,ffc088c8 <rtems_heap_allocate_aligned_with_boundary+0x2c>
RTEMS_Malloc_Heap,
size,
alignment,
boundary
);
}
ffc08900: 39 61 00 18 addi r11,r1,24
ffc08904: 4b ff ac 44 b ffc03548 <_restgpr_29_x>
ffc05118 <rtems_heap_extend_via_sbrk>:
void *rtems_heap_extend_via_sbrk(
Heap_Control *heap,
size_t alloc_size
)
{
ptrdiff_t sbrk_amount = RTEMS_Malloc_Sbrk_amount;
ffc05118: 3d 20 00 00 lis r9,0
void *rtems_heap_extend_via_sbrk(
Heap_Control *heap,
size_t alloc_size
)
{
ffc0511c: 94 21 ff e8 stwu r1,-24(r1)
ffc05120: 7c 08 02 a6 mflr r0
ptrdiff_t sbrk_amount = RTEMS_Malloc_Sbrk_amount;
ffc05124: 81 29 28 4c lwz r9,10316(r9)
void *rtems_heap_extend_via_sbrk(
Heap_Control *heap,
size_t alloc_size
)
{
ffc05128: bf a1 00 0c stmw r29,12(r1)
ffc0512c: 7c 7d 1b 78 mr r29,r3
ptrdiff_t sbrk_amount = RTEMS_Malloc_Sbrk_amount;
ptrdiff_t sbrk_size = (ptrdiff_t) alloc_size;
ptrdiff_t misaligned = sbrk_size % sbrk_amount;
ffc05130: 7d 44 4b d6 divw r10,r4,r9
void *rtems_heap_extend_via_sbrk(
Heap_Control *heap,
size_t alloc_size
)
{
ffc05134: 90 01 00 1c stw r0,28(r1)
ptrdiff_t sbrk_amount = RTEMS_Malloc_Sbrk_amount;
ptrdiff_t sbrk_size = (ptrdiff_t) alloc_size;
ptrdiff_t misaligned = sbrk_size % sbrk_amount;
ffc05138: 7d 4a 49 d6 mullw r10,r10,r9
void *rtems_heap_extend_via_sbrk(
Heap_Control *heap,
size_t alloc_size
)
{
ffc0513c: 7c 9e 23 78 mr r30,r4
ptrdiff_t sbrk_amount = RTEMS_Malloc_Sbrk_amount;
ptrdiff_t sbrk_size = (ptrdiff_t) alloc_size;
ptrdiff_t misaligned = sbrk_size % sbrk_amount;
void *return_this = NULL;
if ( misaligned != 0 ) {
ffc05140: 7d 0a 20 51 subf. r8,r10,r4
Heap_Control *heap,
size_t alloc_size
)
{
ptrdiff_t sbrk_amount = RTEMS_Malloc_Sbrk_amount;
ptrdiff_t sbrk_size = (ptrdiff_t) alloc_size;
ffc05144: 7c 9f 23 78 mr r31,r4
ptrdiff_t misaligned = sbrk_size % sbrk_amount;
void *return_this = NULL;
if ( misaligned != 0 ) {
ffc05148: 41 82 00 0c beq- ffc05154 <rtems_heap_extend_via_sbrk+0x3c>
sbrk_size += sbrk_amount - misaligned;
ffc0514c: 7f e8 48 50 subf r31,r8,r9
ffc05150: 7f e4 fa 14 add r31,r4,r31
}
if ( sbrk_size > 0 && sbrk_amount > 0 ) {
ffc05154: 2f 9f 00 00 cmpwi cr7,r31,0
ffc05158: 40 9d 00 70 ble- cr7,ffc051c8 <rtems_heap_extend_via_sbrk+0xb0><== NEVER TAKEN
ffc0515c: 2f 89 00 00 cmpwi cr7,r9,0
ffc05160: 40 9d 00 68 ble- cr7,ffc051c8 <rtems_heap_extend_via_sbrk+0xb0><== NEVER TAKEN
void *area_begin = sbrk( sbrk_size );
ffc05164: 7f e3 fb 78 mr r3,r31
ffc05168: 4b ff b3 15 bl ffc0047c <sbrk>
if ( area_begin != (void *) -1 ) {
ffc0516c: 2f 83 ff ff cmpwi cr7,r3,-1
if ( misaligned != 0 ) {
sbrk_size += sbrk_amount - misaligned;
}
if ( sbrk_size > 0 && sbrk_amount > 0 ) {
void *area_begin = sbrk( sbrk_size );
ffc05170: 7c 64 1b 78 mr r4,r3
if ( area_begin != (void *) -1 ) {
ffc05174: 41 9e 00 54 beq- cr7,ffc051c8 <rtems_heap_extend_via_sbrk+0xb0><== NEVER TAKEN
bool ok = _Protected_heap_Extend( heap, area_begin, sbrk_size );
ffc05178: 7f a3 eb 78 mr r3,r29
ffc0517c: 7f e5 fb 78 mr r5,r31
ffc05180: 48 00 50 c9 bl ffc0a248 <_Protected_heap_Extend>
if ( ok ) {
ffc05184: 2f 83 00 00 cmpwi cr7,r3,0
ffc05188: 41 9e 00 38 beq- cr7,ffc051c0 <rtems_heap_extend_via_sbrk+0xa8><== ALWAYS TAKEN
}
}
}
return return_this;
}
ffc0518c: 80 01 00 1c lwz r0,28(r1) <== NOT EXECUTED
if ( area_begin != (void *) -1 ) {
bool ok = _Protected_heap_Extend( heap, area_begin, sbrk_size );
if ( ok ) {
MSBUMP( space_available, sbrk_size );
ffc05190: 3d 20 00 00 lis r9,0 <== NOT EXECUTED
ffc05194: 81 49 2c 78 lwz r10,11384(r9) <== NOT EXECUTED
ffc05198: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED
}
}
}
return return_this;
}
ffc0519c: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED
ffc051a0: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED
if ( area_begin != (void *) -1 ) {
bool ok = _Protected_heap_Extend( heap, area_begin, sbrk_size );
if ( ok ) {
MSBUMP( space_available, sbrk_size );
ffc051a4: 7f ff 52 14 add r31,r31,r10 <== NOT EXECUTED
ffc051a8: 93 e9 2c 78 stw r31,11384(r9) <== NOT EXECUTED
ffc051ac: 38 a0 00 00 li r5,0 <== NOT EXECUTED
ffc051b0: 38 c0 00 00 li r6,0 <== NOT EXECUTED
}
}
}
return return_this;
}
ffc051b4: bb a1 00 0c lmw r29,12(r1) <== NOT EXECUTED
ffc051b8: 38 21 00 18 addi r1,r1,24 <== NOT EXECUTED
ffc051bc: 48 00 50 34 b ffc0a1f0 <_Protected_heap_Allocate_aligned_with_boundary><== NOT EXECUTED
if ( ok ) {
MSBUMP( space_available, sbrk_size );
return_this = _Protected_heap_Allocate( heap, alloc_size );
} else {
sbrk( -sbrk_size );
ffc051c0: 7c 7f 00 d0 neg r3,r31
ffc051c4: 4b ff b2 b9 bl ffc0047c <sbrk>
}
}
}
return return_this;
}
ffc051c8: 39 61 00 18 addi r11,r1,24
ffc051cc: 38 60 00 00 li r3,0
ffc051d0: 4b ff b3 e4 b ffc005b4 <_restgpr_29_x>
ffc05d6c <rtems_ide_part_table_free>:
* N/A
*/
void
rtems_ide_part_table_free(rtems_disk_desc_t *disk_desc)
{
partition_table_free( disk_desc );
ffc05d6c: 4b ff fb 14 b ffc05880 <partition_table_free> <== NOT EXECUTED
ffc05d70 <rtems_ide_part_table_get>:
* 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 );
ffc05d70: 4b ff fd ec b ffc05b5c <partition_table_get> <== NOT EXECUTED
ffc05d74 <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)
{
ffc05d74: 94 21 ff c0 stwu r1,-64(r1)
ffc05d78: 7c 08 02 a6 mflr r0
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));
ffc05d7c: 38 80 01 28 li r4,296
* 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)
{
ffc05d80: be e1 00 1c stmw r23,28(r1)
ffc05d84: 7c 7c 1b 78 mr r28,r3
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));
ffc05d88: 38 60 00 01 li r3,1
* 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)
{
ffc05d8c: 90 01 00 44 stw r0,68(r1)
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));
ffc05d90: 48 00 08 b9 bl ffc06648 <calloc>
if (disk_desc == NULL)
ffc05d94: 7c 7f 1b 79 mr. r31,r3
{
return RTEMS_NO_MEMORY;
ffc05d98: 3b a0 00 1a li r29,26
/* 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)
ffc05d9c: 41 82 00 d0 beq- ffc05e6c <rtems_ide_part_table_initialize+0xf8><== NEVER TAKEN
{
return RTEMS_NO_MEMORY;
}
/* get partition table */
rc = partition_table_get(dev_name, disk_desc);
ffc05da0: 7f 83 e3 78 mr r3,r28
ffc05da4: 7f e4 fb 78 mr r4,r31
ffc05da8: 4b ff fd b5 bl ffc05b5c <partition_table_get>
if (rc != RTEMS_SUCCESSFUL)
ffc05dac: 7c 7d 1b 79 mr. r29,r3
ffc05db0: 41 a2 00 10 beq+ ffc05dc0 <rtems_ide_part_table_initialize+0x4c><== ALWAYS TAKEN
{
free(disk_desc);
ffc05db4: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc05db8: 48 00 09 75 bl ffc0672c <free> <== NOT EXECUTED
ffc05dbc: 48 00 00 b0 b ffc05e6c <rtems_ide_part_table_initialize+0xf8><== 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++)
{
sprintf(name, "%s%d", dev_name, part_num + 1);
ffc05dc0: 3f 20 ff c2 lis r25,-62
/* To avoid device numbers conflicts we have to use for logic disk the same
* device major number as ATA device has, and minor number that equals to
* sum of logic disk partition number and the minor number of physical disk
*/
rtems_filesystem_split_dev_t (disk_desc->dev, major, minor);
ffc05dc4: 83 7f 00 00 lwz r27,0(r31)
rc = rtems_disk_create_log(dev, disk_desc->dev, part_desc->start,
part_desc->size, name);
if (rc != RTEMS_SUCCESSFUL)
{
fprintf(stdout,"Cannot create device %s, error code %d\n", name, rc);
ffc05dc8: 3e e0 ff c2 lis r23,-62
/* To avoid device numbers conflicts we have to use for logic disk the same
* device major number as ATA device has, and minor number that equals to
* sum of logic disk partition number and the minor number of physical disk
*/
rtems_filesystem_split_dev_t (disk_desc->dev, major, minor);
ffc05dcc: 83 5f 00 04 lwz r26,4(r31)
/* create logical disks on the physical one */
for (part_num = 0; part_num < disk_desc->last_log_id; part_num++)
ffc05dd0: 3b c0 00 00 li r30,0
{
sprintf(name, "%s%d", dev_name, part_num + 1);
ffc05dd4: 3b 39 5d a2 addi r25,r25,23970
rc = rtems_disk_create_log(dev, disk_desc->dev, part_desc->start,
part_desc->size, name);
if (rc != RTEMS_SUCCESSFUL)
{
fprintf(stdout,"Cannot create device %s, error code %d\n", name, rc);
ffc05dd8: 3f 00 00 00 lis r24,0
ffc05ddc: 3a f7 5d a7 addi r23,r23,23975
*/
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++)
ffc05de0: 48 00 00 74 b ffc05e54 <rtems_ide_part_table_initialize+0xe0>
{
sprintf(name, "%s%d", dev_name, part_num + 1);
ffc05de4: 3b de 00 01 addi r30,r30,1
ffc05de8: 7f 24 cb 78 mr r4,r25
ffc05dec: 38 61 00 08 addi r3,r1,8
ffc05df0: 7f 85 e3 78 mr r5,r28
ffc05df4: 7f c6 f3 78 mr r6,r30
ffc05df8: 4c c6 31 82 crclr 4*cr1+eq
ffc05dfc: 48 01 13 e1 bl ffc171dc <sprintf>
* RTEMS_SUCCESSFUL if success,
* 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)
ffc05e00: 57 c9 10 3a rlwinm r9,r30,2,0,29
ffc05e04: 7d 3f 4a 14 add r9,r31,r9
for (part_num = 0; part_num < disk_desc->last_log_id; part_num++)
{
sprintf(name, "%s%d", dev_name, part_num + 1);
dev = rtems_filesystem_make_dev_t(major, ++minor);
part_desc = disk_desc->partitions[part_num];
ffc05e08: 81 29 00 24 lwz r9,36(r9)
* RTEMS_SUCCESSFUL if success,
* 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)
ffc05e0c: 7c 9e d2 14 add r4,r30,r26
{
sprintf(name, "%s%d", dev_name, part_num + 1);
dev = rtems_filesystem_make_dev_t(major, ++minor);
part_desc = disk_desc->partitions[part_num];
if (part_desc == NULL)
ffc05e10: 2f 89 00 00 cmpwi cr7,r9,0
ffc05e14: 41 9e 00 40 beq- cr7,ffc05e54 <rtems_ide_part_table_initialize+0xe0>
{
continue;
}
rc = rtems_disk_create_log(dev, disk_desc->dev, part_desc->start,
ffc05e18: 80 df 00 04 lwz r6,4(r31)
ffc05e1c: 7f 63 db 78 mr r3,r27
ffc05e20: 80 e9 00 04 lwz r7,4(r9)
ffc05e24: 81 09 00 08 lwz r8,8(r9)
ffc05e28: 39 21 00 08 addi r9,r1,8
ffc05e2c: 80 bf 00 00 lwz r5,0(r31)
ffc05e30: 4b ff f4 6d bl ffc0529c <rtems_disk_create_log>
part_desc->size, name);
if (rc != RTEMS_SUCCESSFUL)
ffc05e34: 7c 66 1b 79 mr. r6,r3
ffc05e38: 41 a2 00 1c beq+ ffc05e54 <rtems_ide_part_table_initialize+0xe0><== ALWAYS TAKEN
{
fprintf(stdout,"Cannot create device %s, error code %d\n", name, rc);
ffc05e3c: 81 38 27 ec lwz r9,10220(r24) <== NOT EXECUTED
ffc05e40: 7e e4 bb 78 mr r4,r23 <== NOT EXECUTED
ffc05e44: 38 a1 00 08 addi r5,r1,8 <== NOT EXECUTED
ffc05e48: 80 69 00 08 lwz r3,8(r9) <== NOT EXECUTED
ffc05e4c: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc05e50: 48 01 08 d5 bl ffc16724 <fprintf> <== 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++)
ffc05e54: 81 3f 00 24 lwz r9,36(r31)
ffc05e58: 7f 9e 48 00 cmpw cr7,r30,r9
ffc05e5c: 41 9c ff 88 blt+ cr7,ffc05de4 <rtems_ide_part_table_initialize+0x70>
fprintf(stdout,"Cannot create device %s, error code %d\n", name, rc);
continue;
}
}
partition_table_free(disk_desc);
ffc05e60: 7f e3 fb 78 mr r3,r31
ffc05e64: 4b ff fa 1d bl ffc05880 <partition_table_free>
ffc05e68: 48 00 00 04 b ffc05e6c <rtems_ide_part_table_initialize+0xf8>
return RTEMS_SUCCESSFUL;
}
ffc05e6c: 39 61 00 40 addi r11,r1,64
ffc05e70: 7f a3 eb 78 mr r3,r29
ffc05e74: 4b ff a9 60 b ffc007d4 <_restgpr_23_x>
ffc0b5e0 <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)
{
ffc0b5e0: 94 21 ff e0 stwu r1,-32(r1)
ffc0b5e4: 7c 08 02 a6 mflr r0
ffc0b5e8: bf 61 00 0c stmw r27,12(r1)
uint32_t i;
uint32_t api_index;
Thread_Control *the_thread;
Objects_Information *information;
if ( !routine )
ffc0b5ec: 7c 7b 1b 79 mr. r27,r3
#include <rtems/system.h>
#include <rtems/score/thread.h>
void rtems_iterate_over_all_threads(rtems_per_thread_routine routine)
{
ffc0b5f0: 90 01 00 24 stw r0,36(r1)
uint32_t i;
uint32_t api_index;
Thread_Control *the_thread;
Objects_Information *information;
if ( !routine )
ffc0b5f4: 41 82 00 60 beq- ffc0b654 <rtems_iterate_over_all_threads+0x74><== NEVER TAKEN
ffc0b5f8: 3f e0 00 00 lis r31,0
ffc0b5fc: 3b ff 30 78 addi r31,r31,12408
#endif
#include <rtems/system.h>
#include <rtems/score/thread.h>
void rtems_iterate_over_all_threads(rtems_per_thread_routine routine)
ffc0b600: 3b 9f 00 0c addi r28,r31,12
#if !defined(RTEMS_POSIX_API) || defined(RTEMS_DEBUG)
if ( !_Objects_Information_table[ api_index ] )
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
ffc0b604: 85 3f 00 04 lwzu r9,4(r31)
if ( !information )
ffc0b608: 3b c0 00 01 li r30,1
#if !defined(RTEMS_POSIX_API) || defined(RTEMS_DEBUG)
if ( !_Objects_Information_table[ api_index ] )
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
ffc0b60c: 83 a9 00 04 lwz r29,4(r9)
if ( !information )
ffc0b610: 2f 9d 00 00 cmpwi cr7,r29,0
ffc0b614: 40 be 00 30 bne+ cr7,ffc0b644 <rtems_iterate_over_all_threads+0x64>
Objects_Information *information;
if ( !routine )
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
ffc0b618: 7f 9f e0 00 cmpw cr7,r31,r28
ffc0b61c: 40 9e ff e8 bne+ cr7,ffc0b604 <rtems_iterate_over_all_threads+0x24>
ffc0b620: 48 00 00 34 b ffc0b654 <rtems_iterate_over_all_threads+0x74>
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 ];
ffc0b624: 81 3d 00 1c lwz r9,28(r29)
ffc0b628: 57 ca 10 3a rlwinm r10,r30,2,0,29
ffc0b62c: 7c 69 50 2e lwzx r3,r9,r10
if ( !the_thread )
ffc0b630: 2f 83 00 00 cmpwi cr7,r3,0
ffc0b634: 41 9e 00 0c beq- cr7,ffc0b640 <rtems_iterate_over_all_threads+0x60>
continue;
(*routine)(the_thread);
ffc0b638: 7f 69 03 a6 mtctr r27
ffc0b63c: 4e 80 04 21 bctrl
information = _Objects_Information_table[ api_index ][ 1 ];
if ( !information )
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
ffc0b640: 3b de 00 01 addi r30,r30,1
ffc0b644: a1 3d 00 10 lhz r9,16(r29)
ffc0b648: 7f 9e 48 40 cmplw cr7,r30,r9
ffc0b64c: 40 9d ff d8 ble+ cr7,ffc0b624 <rtems_iterate_over_all_threads+0x44>
ffc0b650: 4b ff ff c8 b ffc0b618 <rtems_iterate_over_all_threads+0x38>
(*routine)(the_thread);
}
}
}
ffc0b654: 39 61 00 20 addi r11,r1,32
ffc0b658: 4b ff 5c d4 b ffc0132c <_restgpr_27_x>
ffc046d0 <rtems_libio_init>:
rtems_id rtems_libio_semaphore;
rtems_libio_t *rtems_libio_iops;
rtems_libio_t *rtems_libio_iop_freelist;
void rtems_libio_init( void )
{
ffc046d0: 7c 2b 0b 78 mr r11,r1
ffc046d4: 94 21 ff f0 stwu r1,-16(r1)
rtems_status_code rc;
uint32_t i;
rtems_libio_t *iop;
if (rtems_libio_number_iops > 0)
ffc046d8: 3d 20 00 00 lis r9,0
rtems_id rtems_libio_semaphore;
rtems_libio_t *rtems_libio_iops;
rtems_libio_t *rtems_libio_iop_freelist;
void rtems_libio_init( void )
{
ffc046dc: 7c 08 02 a6 mflr r0
ffc046e0: 48 01 66 dd bl ffc1adbc <_savegpr_31>
rtems_status_code rc;
uint32_t i;
rtems_libio_t *iop;
if (rtems_libio_number_iops > 0)
ffc046e4: 83 e9 27 98 lwz r31,10136(r9)
rtems_id rtems_libio_semaphore;
rtems_libio_t *rtems_libio_iops;
rtems_libio_t *rtems_libio_iop_freelist;
void rtems_libio_init( void )
{
ffc046e8: 90 01 00 14 stw r0,20(r1)
rtems_status_code rc;
uint32_t i;
rtems_libio_t *iop;
if (rtems_libio_number_iops > 0)
ffc046ec: 2f 9f 00 00 cmpwi cr7,r31,0
ffc046f0: 41 9e 00 60 beq- cr7,ffc04750 <rtems_libio_init+0x80> <== NEVER TAKEN
{
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
ffc046f4: 7f e3 fb 78 mr r3,r31
ffc046f8: 38 80 00 38 li r4,56
ffc046fc: 4b ff fb 05 bl ffc04200 <calloc>
ffc04700: 3d 20 00 00 lis r9,0
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
ffc04704: 2f 83 00 00 cmpwi cr7,r3,0
uint32_t i;
rtems_libio_t *iop;
if (rtems_libio_number_iops > 0)
{
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
ffc04708: 90 69 28 4c stw r3,10316(r9)
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
ffc0470c: 40 be 00 0c bne+ cr7,ffc04718 <rtems_libio_init+0x48>
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
ffc04710: 38 60 00 1a li r3,26
ffc04714: 48 00 00 64 b ffc04778 <rtems_libio_init+0xa8>
iop = rtems_libio_iop_freelist = rtems_libio_iops;
ffc04718: 3d 20 00 00 lis r9,0
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
ffc0471c: 7f e9 03 a6 mtctr r31
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
iop = rtems_libio_iop_freelist = rtems_libio_iops;
ffc04720: 90 69 28 50 stw r3,10320(r9)
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
ffc04724: 39 40 00 00 li r10,0
ffc04728: 7c 69 1b 78 mr r9,r3
ffc0472c: 48 00 00 0c b ffc04738 <rtems_libio_init+0x68>
iop->data1 = iop + 1;
ffc04730: 39 29 00 38 addi r9,r9,56
ffc04734: 91 29 ff f8 stw r9,-8(r9)
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++)
ffc04738: 39 4a 00 01 addi r10,r10,1
ffc0473c: 42 00 ff f4 bdnz+ ffc04730 <rtems_libio_init+0x60>
iop->data1 = iop + 1;
iop->data1 = NULL;
ffc04740: 1d 4a 00 38 mulli r10,r10,56
ffc04744: 39 20 00 00 li r9,0
ffc04748: 7c 63 52 14 add r3,r3,r10
ffc0474c: 91 23 ff f8 stw r9,-8(r3)
/*
* Create the binary semaphore used to provide mutual exclusion
* on the IOP Table.
*/
rc = rtems_semaphore_create(
ffc04750: 3c 60 4c 42 lis r3,19522
ffc04754: 3c e0 00 00 lis r7,0
ffc04758: 60 63 49 4f ori r3,r3,18767
ffc0475c: 38 80 00 01 li r4,1
ffc04760: 38 a0 00 54 li r5,84
ffc04764: 38 c0 00 00 li r6,0
ffc04768: 38 e7 28 54 addi r7,r7,10324
ffc0476c: 48 00 3e bd bl ffc08628 <rtems_semaphore_create>
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&rtems_libio_semaphore
);
if ( rc != RTEMS_SUCCESSFUL )
ffc04770: 2f 83 00 00 cmpwi cr7,r3,0
ffc04774: 41 be 00 08 beq+ cr7,ffc0477c <rtems_libio_init+0xac> <== ALWAYS TAKEN
rtems_fatal_error_occurred( rc );
ffc04778: 48 00 48 fd bl ffc09074 <rtems_fatal_error_occurred>
/*
* Initialize the base file system infrastructure.
*/
if (rtems_fs_init_helper)
ffc0477c: 3d 20 00 00 lis r9,0
ffc04780: 81 29 27 9c lwz r9,10140(r9)
ffc04784: 2f 89 00 00 cmpwi cr7,r9,0
ffc04788: 41 9e 00 1c beq- cr7,ffc047a4 <rtems_libio_init+0xd4>
(* rtems_fs_init_helper)();
}
ffc0478c: 80 01 00 14 lwz r0,20(r1)
/*
* Initialize the base file system infrastructure.
*/
if (rtems_fs_init_helper)
(* rtems_fs_init_helper)();
ffc04790: 7d 29 03 a6 mtctr r9
}
ffc04794: 83 e1 00 0c lwz r31,12(r1)
ffc04798: 7c 08 03 a6 mtlr r0
ffc0479c: 38 21 00 10 addi r1,r1,16
/*
* Initialize the base file system infrastructure.
*/
if (rtems_fs_init_helper)
(* rtems_fs_init_helper)();
ffc047a0: 4e 80 04 20 bctr
}
ffc047a4: 39 61 00 10 addi r11,r1,16
ffc047a8: 4b ff be 1c b ffc005c4 <_restgpr_31_x>
ffc05bec <rtems_libio_set_private_env>:
}
rtems_status_code rtems_libio_set_private_env(void)
{
ffc05bec: 94 21 ff e8 stwu r1,-24(r1)
ffc05bf0: 7c 08 02 a6 mflr r0
ffc05bf4: bf 81 00 08 stmw r28,8(r1)
ffc05bf8: 90 01 00 1c stw r0,28(r1)
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_id self_task_id = rtems_task_self();
ffc05bfc: 48 00 1b 39 bl ffc07734 <rtems_task_self>
rtems_user_env_t *old_env = rtems_current_user_env;
ffc05c00: 3d 20 00 00 lis r9,0
ffc05c04: 83 c9 27 68 lwz r30,10088(r9)
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) {
ffc05c08: 3d 40 00 00 lis r10,0
ffc05c0c: 39 4a 21 38 addi r10,r10,8504
ffc05c10: 7f 9e 50 00 cmpw cr7,r30,r10
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
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;
ffc05c14: 81 3e 00 24 lwz r9,36(r30)
}
rtems_status_code rtems_libio_set_private_env(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_id self_task_id = rtems_task_self();
ffc05c18: 7c 7c 1b 78 mr r28,r3
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) {
ffc05c1c: 41 9e 00 0c beq- cr7,ffc05c28 <rtems_libio_set_private_env+0x3c>
ffc05c20: 7f 89 18 00 cmpw cr7,r9,r3
ffc05c24: 41 9e 00 a0 beq- cr7,ffc05cc4 <rtems_libio_set_private_env+0xd8>
rtems_user_env_t *new_env = calloc(1, sizeof(*new_env));
ffc05c28: 38 60 00 01 li r3,1
ffc05c2c: 38 80 00 2c li r4,44
ffc05c30: 48 00 4f 65 bl ffc0ab94 <calloc>
if (sc != RTEMS_SUCCESSFUL) {
free_user_env(new_env);
}
} else {
sc = RTEMS_NO_MEMORY;
ffc05c34: 3b a0 00 1a li r29,26
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) {
ffc05c38: 7c 7f 1b 79 mr. r31,r3
ffc05c3c: 41 82 00 a4 beq- ffc05ce0 <rtems_libio_set_private_env+0xf4>
*new_env = *old_env;
ffc05c40: 7f c4 f3 78 mr r4,r30
ffc05c44: 38 a0 00 2c li r5,44
ffc05c48: 48 00 81 59 bl ffc0dda0 <memcpy>
new_env->reference_count = 1;
ffc05c4c: 39 20 00 01 li r9,1
ffc05c50: 91 3f 00 28 stw r9,40(r31)
new_env->task_id = self_task_id;
new_env->root_directory =
rtems_filesystem_global_location_obtain(&old_env->root_directory);
ffc05c54: 38 7e 00 04 addi r3,r30,4
rtems_user_env_t *new_env = calloc(1, sizeof(*new_env));
if (new_env != NULL) {
*new_env = *old_env;
new_env->reference_count = 1;
new_env->task_id = self_task_id;
ffc05c58: 93 9f 00 24 stw r28,36(r31)
new_env->root_directory =
rtems_filesystem_global_location_obtain(&old_env->root_directory);
ffc05c5c: 48 00 0e 65 bl ffc06ac0 <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 =
ffc05c60: 90 7f 00 04 stw r3,4(r31)
rtems_filesystem_global_location_obtain(&old_env->root_directory);
new_env->current_directory =
rtems_filesystem_global_location_obtain(&old_env->current_directory);
ffc05c64: 7f c3 f3 78 mr r3,r30
ffc05c68: 48 00 0e 59 bl ffc06ac0 <rtems_filesystem_global_location_obtain>
rtems_fatal_error_occurred(0xdeadbeef);
}
rtems_current_user_env = &rtems_global_user_env;
}
}
ffc05c6c: 81 5f 00 04 lwz r10,4(r31)
*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 =
ffc05c70: 90 7f 00 00 stw r3,0(r31)
rtems_filesystem_global_location_obtain(&old_env->current_directory);
if (
ffc05c74: 3d 20 ff c1 lis r9,-63
ffc05c78: 39 29 3b c0 addi r9,r9,15296
ffc05c7c: 81 4a 00 10 lwz r10,16(r10)
ffc05c80: 7f 8a 48 00 cmpw cr7,r10,r9
ffc05c84: 41 9e 00 48 beq- cr7,ffc05ccc <rtems_libio_set_private_env+0xe0>
!rtems_filesystem_global_location_is_null(new_env->root_directory)
&& !rtems_filesystem_global_location_is_null(new_env->current_directory)
ffc05c88: 81 43 00 10 lwz r10,16(r3)
ffc05c8c: 7f 8a 48 00 cmpw cr7,r10,r9
ffc05c90: 41 9e 00 3c beq- cr7,ffc05ccc <rtems_libio_set_private_env+0xe0><== NEVER TAKEN
) {
sc = rtems_task_variable_add(
ffc05c94: 3f 80 00 00 lis r28,0
ffc05c98: 3c a0 ff c0 lis r5,-64
ffc05c9c: 38 60 00 00 li r3,0
ffc05ca0: 38 9c 27 68 addi r4,r28,10088
ffc05ca4: 38 a5 5b 50 addi r5,r5,23376
ffc05ca8: 48 00 1b 15 bl ffc077bc <rtems_task_variable_add>
RTEMS_SELF,
(void **) &rtems_current_user_env,
free_user_env
);
if (sc == RTEMS_SUCCESSFUL) {
ffc05cac: 7c 7d 1b 79 mr. r29,r3
ffc05cb0: 40 a2 00 24 bne+ ffc05cd4 <rtems_libio_set_private_env+0xe8>
free_user_env_protected(old_env);
ffc05cb4: 7f c3 f3 78 mr r3,r30
ffc05cb8: 4b ff ff 05 bl ffc05bbc <free_user_env_protected>
rtems_current_user_env = new_env;
ffc05cbc: 93 fc 27 68 stw r31,10088(r28)
ffc05cc0: 48 00 00 20 b ffc05ce0 <rtems_libio_set_private_env+0xf4>
_Thread_Enable_dispatch();
}
rtems_status_code rtems_libio_set_private_env(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
ffc05cc4: 3b a0 00 00 li r29,0
ffc05cc8: 48 00 00 18 b ffc05ce0 <rtems_libio_set_private_env+0xf4>
rtems_current_user_env = new_env;
} else {
sc = RTEMS_TOO_MANY;
}
} else {
sc = RTEMS_UNSATISFIED;
ffc05ccc: 3b a0 00 0d li r29,13
ffc05cd0: 48 00 00 08 b ffc05cd8 <rtems_libio_set_private_env+0xec>
);
if (sc == RTEMS_SUCCESSFUL) {
free_user_env_protected(old_env);
rtems_current_user_env = new_env;
} else {
sc = RTEMS_TOO_MANY;
ffc05cd4: 3b a0 00 05 li r29,5
} else {
sc = RTEMS_UNSATISFIED;
}
if (sc != RTEMS_SUCCESSFUL) {
free_user_env(new_env);
ffc05cd8: 7f e3 fb 78 mr r3,r31
ffc05cdc: 4b ff fe 75 bl ffc05b50 <free_user_env>
sc = RTEMS_NO_MEMORY;
}
}
return sc;
}
ffc05ce0: 39 61 00 18 addi r11,r1,24
ffc05ce4: 7f a3 eb 78 mr r3,r29
ffc05ce8: 48 00 b9 28 b ffc11610 <_restgpr_28_x>
ffc05cec <rtems_libio_share_private_env>:
rtems_status_code rtems_libio_share_private_env(rtems_id task_id)
{
ffc05cec: 94 21 ff e0 stwu r1,-32(r1)
ffc05cf0: 7c 08 02 a6 mflr r0
ffc05cf4: bf c1 00 18 stmw r30,24(r1)
ffc05cf8: 7c 7e 1b 78 mr r30,r3
rtems_status_code sc = RTEMS_SUCCESSFUL;
ffc05cfc: 3b e0 00 00 li r31,0
return sc;
}
rtems_status_code rtems_libio_share_private_env(rtems_id task_id)
{
ffc05d00: 90 01 00 24 stw r0,36(r1)
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_id self_task_id = rtems_task_self();
ffc05d04: 48 00 1a 31 bl ffc07734 <rtems_task_self>
if (task_id != RTEMS_SELF && self_task_id != task_id) {
ffc05d08: 2f 9e 00 00 cmpwi cr7,r30,0
ffc05d0c: 41 9e 00 9c beq- cr7,ffc05da8 <rtems_libio_share_private_env+0xbc>
ffc05d10: 7f 83 f0 00 cmpw cr7,r3,r30
ffc05d14: 41 9e 00 94 beq- cr7,ffc05da8 <rtems_libio_share_private_env+0xbc>
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
ffc05d18: 3d 20 00 00 lis r9,0
ffc05d1c: 81 49 27 fc lwz r10,10236(r9)
++level;
ffc05d20: 39 4a 00 01 addi r10,r10,1
_Thread_Dispatch_disable_level = level;
ffc05d24: 91 49 27 fc stw r10,10236(r9)
/*
* We have to disable the thread dispatching to prevent deletion of the
* environment in the meantime.
*/
_Thread_Disable_dispatch();
sc = rtems_task_variable_get(
ffc05d28: 3c 80 00 00 lis r4,0
ffc05d2c: 7f c3 f3 78 mr r3,r30
ffc05d30: 38 84 27 68 addi r4,r4,10088
ffc05d34: 38 a1 00 08 addi r5,r1,8
ffc05d38: 48 00 1b cd bl ffc07904 <rtems_task_variable_get>
task_id,
(void *) &rtems_current_user_env,
(void *) &env
);
if (sc == RTEMS_SUCCESSFUL) {
ffc05d3c: 7c 7f 1b 79 mr. r31,r3
ffc05d40: 40 82 00 18 bne- ffc05d58 <rtems_libio_share_private_env+0x6c>
++env->reference_count;
ffc05d44: 81 21 00 08 lwz r9,8(r1)
ffc05d48: 81 49 00 28 lwz r10,40(r9)
ffc05d4c: 39 4a 00 01 addi r10,r10,1
ffc05d50: 91 49 00 28 stw r10,40(r9)
ffc05d54: 48 00 00 08 b ffc05d5c <rtems_libio_share_private_env+0x70>
} else {
sc = RTEMS_UNSATISFIED;
ffc05d58: 3b e0 00 0d li r31,13
}
_Thread_Enable_dispatch();
ffc05d5c: 48 00 3b ad bl ffc09908 <_Thread_Enable_dispatch>
if (sc == RTEMS_SUCCESSFUL) {
ffc05d60: 2f 9f 00 00 cmpwi cr7,r31,0
ffc05d64: 40 be 00 44 bne+ cr7,ffc05da8 <rtems_libio_share_private_env+0xbc>
sc = rtems_task_variable_add(
ffc05d68: 3f c0 00 00 lis r30,0
ffc05d6c: 3c a0 ff c0 lis r5,-64
ffc05d70: 38 60 00 00 li r3,0
ffc05d74: 38 9e 27 68 addi r4,r30,10088
ffc05d78: 38 a5 5b 50 addi r5,r5,23376
ffc05d7c: 48 00 1a 41 bl ffc077bc <rtems_task_variable_add>
RTEMS_SELF,
(void **) &rtems_current_user_env,
free_user_env
);
if (sc == RTEMS_SUCCESSFUL) {
ffc05d80: 7c 7f 1b 79 mr. r31,r3
ffc05d84: 40 82 00 18 bne- ffc05d9c <rtems_libio_share_private_env+0xb0><== NEVER TAKEN
free_user_env_protected(rtems_current_user_env);
ffc05d88: 80 7e 27 68 lwz r3,10088(r30)
ffc05d8c: 4b ff fe 31 bl ffc05bbc <free_user_env_protected>
rtems_current_user_env = env;
ffc05d90: 81 21 00 08 lwz r9,8(r1)
ffc05d94: 91 3e 27 68 stw r9,10088(r30)
ffc05d98: 48 00 00 10 b ffc05da8 <rtems_libio_share_private_env+0xbc>
} else {
free_user_env_protected(env);
ffc05d9c: 80 61 00 08 lwz r3,8(r1) <== NOT EXECUTED
sc = RTEMS_TOO_MANY;
ffc05da0: 3b e0 00 05 li r31,5 <== NOT EXECUTED
);
if (sc == RTEMS_SUCCESSFUL) {
free_user_env_protected(rtems_current_user_env);
rtems_current_user_env = env;
} else {
free_user_env_protected(env);
ffc05da4: 4b ff fe 19 bl ffc05bbc <free_user_env_protected> <== NOT EXECUTED
}
}
}
return sc;
}
ffc05da8: 39 61 00 20 addi r11,r1,32
ffc05dac: 7f e3 fb 78 mr r3,r31
ffc05db0: 48 00 b8 68 b ffc11618 <_restgpr_30_x>
ffc0cfd0 <rtems_libio_to_fcntl_flags>:
int rtems_libio_to_fcntl_flags( uint32_t flags )
{
int fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
ffc0cfd0: 54 6a 07 7c rlwinm r10,r3,0,29,30
ffc0cfd4: 2f 8a 00 06 cmpwi cr7,r10,6
fcntl_flags |= O_RDWR;
ffc0cfd8: 39 20 00 02 li r9,2
int rtems_libio_to_fcntl_flags( uint32_t flags )
{
int fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
ffc0cfdc: 41 9e 00 14 beq- cr7,ffc0cff0 <rtems_libio_to_fcntl_flags+0x20>
fcntl_flags |= O_RDWR;
} else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) {
ffc0cfe0: 70 6a 00 02 andi. r10,r3,2
fcntl_flags |= O_RDONLY;
ffc0cfe4: 39 20 00 00 li r9,0
{
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) {
ffc0cfe8: 40 82 00 08 bne- ffc0cff0 <rtems_libio_to_fcntl_flags+0x20><== ALWAYS TAKEN
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;
ffc0cfec: 54 69 f7 fe rlwinm r9,r3,30,31,31 <== NOT EXECUTED
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 ) {
ffc0cff0: 70 6a 00 01 andi. r10,r3,1
ffc0cff4: 41 82 00 08 beq- ffc0cffc <rtems_libio_to_fcntl_flags+0x2c>
fcntl_flags |= O_NONBLOCK;
ffc0cff8: 61 29 40 00 ori r9,r9,16384
}
if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) {
ffc0cffc: 70 6a 02 00 andi. r10,r3,512
ffc0d000: 41 82 00 08 beq- ffc0d008 <rtems_libio_to_fcntl_flags+0x38>
fcntl_flags |= O_APPEND;
ffc0d004: 61 29 00 08 ori r9,r9,8
}
if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) {
ffc0d008: 70 6a 04 00 andi. r10,r3,1024
ffc0d00c: 41 82 00 08 beq- ffc0d014 <rtems_libio_to_fcntl_flags+0x44>
fcntl_flags |= O_CREAT;
ffc0d010: 61 29 02 00 ori r9,r9,512
}
return fcntl_flags;
}
ffc0d014: 7d 23 4b 78 mr r3,r9
ffc0d018: 4e 80 00 20 blr
ffc05db4 <rtems_libio_use_global_env>:
void rtems_libio_use_global_env(void)
{
ffc05db4: 94 21 ff f0 stwu r1,-16(r1)
ffc05db8: 7c 08 02 a6 mflr r0
ffc05dbc: bf c1 00 08 stmw r30,8(r1)
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) {
ffc05dc0: 3f e0 00 00 lis r31,0
ffc05dc4: 3f c0 00 00 lis r30,0
ffc05dc8: 81 3f 27 68 lwz r9,10088(r31)
ffc05dcc: 3b de 21 38 addi r30,r30,8504
return sc;
}
void rtems_libio_use_global_env(void)
{
ffc05dd0: 90 01 00 14 stw r0,20(r1)
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) {
ffc05dd4: 38 9f 27 68 addi r4,r31,10088
ffc05dd8: 7f 89 f0 00 cmpw cr7,r9,r30
ffc05ddc: 41 9e 00 24 beq- cr7,ffc05e00 <rtems_libio_use_global_env+0x4c>
sc = rtems_task_variable_delete(
ffc05de0: 38 60 00 00 li r3,0
ffc05de4: 48 00 1a 8d bl ffc07870 <rtems_task_variable_delete>
RTEMS_SELF,
(void **) &rtems_current_user_env
);
if (sc != RTEMS_SUCCESSFUL) {
ffc05de8: 2f 83 00 00 cmpwi cr7,r3,0
ffc05dec: 41 be 00 10 beq+ cr7,ffc05dfc <rtems_libio_use_global_env+0x48><== ALWAYS TAKEN
rtems_fatal_error_occurred(0xdeadbeef);
ffc05df0: 3c 60 de ad lis r3,-8531 <== NOT EXECUTED
ffc05df4: 60 63 be ef ori r3,r3,48879 <== NOT EXECUTED
ffc05df8: 48 00 1d 61 bl ffc07b58 <rtems_fatal_error_occurred> <== NOT EXECUTED
}
rtems_current_user_env = &rtems_global_user_env;
ffc05dfc: 93 df 27 68 stw r30,10088(r31)
}
}
ffc05e00: 39 61 00 10 addi r11,r1,16
ffc05e04: 48 00 b8 14 b ffc11618 <_restgpr_30_x>
ffc07ad8 <rtems_malloc_statistics_at_free>:
* size and thus we skip updating the statistics.
*/
static void rtems_malloc_statistics_at_free(
void *pointer
)
{
ffc07ad8: 94 21 ff e8 stwu r1,-24(r1)
uintptr_t size;
if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) {
ffc07adc: 3d 20 00 00 lis r9,0
* size and thus we skip updating the statistics.
*/
static void rtems_malloc_statistics_at_free(
void *pointer
)
{
ffc07ae0: 7c 08 02 a6 mflr r0
ffc07ae4: 7c 64 1b 78 mr r4,r3
uintptr_t size;
if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) {
ffc07ae8: 80 69 27 d4 lwz r3,10196(r9)
ffc07aec: 38 a1 00 08 addi r5,r1,8
* size and thus we skip updating the statistics.
*/
static void rtems_malloc_statistics_at_free(
void *pointer
)
{
ffc07af0: 90 01 00 1c stw r0,28(r1)
uintptr_t size;
if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) {
ffc07af4: 48 00 70 c5 bl ffc0ebb8 <_Protected_heap_Get_block_size>
ffc07af8: 2f 83 00 00 cmpwi cr7,r3,0
ffc07afc: 41 9e 00 2c beq- cr7,ffc07b28 <rtems_malloc_statistics_at_free+0x50><== NEVER TAKEN
MSBUMP(lifetime_freed, size);
ffc07b00: 3c e0 00 00 lis r7,0
ffc07b04: 81 61 00 08 lwz r11,8(r1)
ffc07b08: 38 e7 34 a0 addi r7,r7,13472
ffc07b0c: 81 07 00 28 lwz r8,40(r7)
ffc07b10: 39 40 00 00 li r10,0
ffc07b14: 81 27 00 2c lwz r9,44(r7)
ffc07b18: 7d 6b 48 14 addc r11,r11,r9
ffc07b1c: 7d 4a 41 14 adde r10,r10,r8
ffc07b20: 91 47 00 28 stw r10,40(r7)
ffc07b24: 91 67 00 2c stw r11,44(r7)
}
}
ffc07b28: 80 01 00 1c lwz r0,28(r1)
ffc07b2c: 38 21 00 18 addi r1,r1,24
ffc07b30: 7c 08 03 a6 mtlr r0
ffc07b34: 4e 80 00 20 blr
ffc07b38 <rtems_malloc_statistics_at_malloc>:
{
uintptr_t actual_size = 0;
uint32_t current_depth;
rtems_malloc_statistics_t *s = &rtems_malloc_statistics;
if ( !pointer )
ffc07b38: 7c 64 1b 79 mr. r4,r3
}
static void rtems_malloc_statistics_at_malloc(
void *pointer
)
{
ffc07b3c: 94 21 ff e8 stwu r1,-24(r1)
ffc07b40: 7c 08 02 a6 mflr r0
uintptr_t actual_size = 0;
ffc07b44: 39 20 00 00 li r9,0
ffc07b48: 91 21 00 08 stw r9,8(r1)
}
static void rtems_malloc_statistics_at_malloc(
void *pointer
)
{
ffc07b4c: 90 01 00 1c stw r0,28(r1)
uintptr_t actual_size = 0;
uint32_t current_depth;
rtems_malloc_statistics_t *s = &rtems_malloc_statistics;
if ( !pointer )
ffc07b50: 41 82 00 54 beq- ffc07ba4 <rtems_malloc_statistics_at_malloc+0x6c><== NEVER TAKEN
return;
_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size);
ffc07b54: 3d 20 00 00 lis r9,0
ffc07b58: 80 69 27 d4 lwz r3,10196(r9)
ffc07b5c: 38 a1 00 08 addi r5,r1,8
ffc07b60: 48 00 70 59 bl ffc0ebb8 <_Protected_heap_Get_block_size>
MSBUMP(lifetime_allocated, actual_size);
ffc07b64: 3c e0 00 00 lis r7,0
ffc07b68: 38 e7 34 a0 addi r7,r7,13472
ffc07b6c: 81 61 00 08 lwz r11,8(r1)
ffc07b70: 81 27 00 24 lwz r9,36(r7)
ffc07b74: 39 40 00 00 li r10,0
ffc07b78: 81 07 00 20 lwz r8,32(r7)
ffc07b7c: 7d 6b 48 14 addc r11,r11,r9
ffc07b80: 7d 4a 41 14 adde r10,r10,r8
current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed);
ffc07b84: 81 27 00 2c lwz r9,44(r7)
if ( !pointer )
return;
_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size);
MSBUMP(lifetime_allocated, actual_size);
ffc07b88: 91 47 00 20 stw r10,32(r7)
current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed);
ffc07b8c: 7d 29 58 50 subf r9,r9,r11
if (current_depth > s->max_depth)
ffc07b90: 81 47 00 18 lwz r10,24(r7)
if ( !pointer )
return;
_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size);
MSBUMP(lifetime_allocated, actual_size);
ffc07b94: 91 67 00 24 stw r11,36(r7)
current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed);
if (current_depth > s->max_depth)
ffc07b98: 7f 89 50 40 cmplw cr7,r9,r10
ffc07b9c: 40 9d 00 08 ble- cr7,ffc07ba4 <rtems_malloc_statistics_at_malloc+0x6c>
s->max_depth = current_depth;
ffc07ba0: 91 27 00 18 stw r9,24(r7)
}
ffc07ba4: 80 01 00 1c lwz r0,28(r1)
ffc07ba8: 38 21 00 18 addi r1,r1,24
ffc07bac: 7c 08 03 a6 mtlr r0
ffc07bb0: 4e 80 00 20 blr
ffc11300 <rtems_memalign>:
int rtems_memalign(
void **pointer,
size_t alignment,
size_t size
)
{
ffc11300: 94 21 ff e8 stwu r1,-24(r1)
ffc11304: 7c 08 02 a6 mflr r0
ffc11308: bf a1 00 0c stmw r29,12(r1)
void *return_this;
/*
* Parameter error checks
*/
if ( !pointer )
ffc1130c: 7c 7f 1b 79 mr. r31,r3
int rtems_memalign(
void **pointer,
size_t alignment,
size_t size
)
{
ffc11310: 90 01 00 1c stw r0,28(r1)
void *return_this;
/*
* Parameter error checks
*/
if ( !pointer )
ffc11314: 40 a2 00 0c bne+ ffc11320 <rtems_memalign+0x20>
return EINVAL;
ffc11318: 39 20 00 16 li r9,22
ffc1131c: 48 00 00 88 b ffc113a4 <rtems_memalign+0xa4>
*pointer = NULL;
ffc11320: 39 20 00 00 li r9,0
ffc11324: 91 3f 00 00 stw r9,0(r31)
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
ffc11328: 3d 20 00 00 lis r9,0
ffc1132c: 7c 9e 23 78 mr r30,r4
ffc11330: 81 29 28 48 lwz r9,10312(r9)
ffc11334: 7c bd 2b 78 mr r29,r5
ffc11338: 2f 89 00 03 cmpwi cr7,r9,3
ffc1133c: 41 9e 00 30 beq- cr7,ffc1136c <rtems_memalign+0x6c>
return EINVAL;
/*
* If some free's have been deferred, then do them now.
*/
malloc_deferred_frees_process();
ffc11340: 4b ff 44 c9 bl ffc05808 <malloc_deferred_frees_process>
Heap_Control *heap,
uintptr_t size,
uintptr_t alignment
)
{
return
ffc11344: 3d 20 00 00 lis r9,0
ffc11348: 80 69 27 50 lwz r3,10064(r9)
ffc1134c: 7f c5 f3 78 mr r5,r30
ffc11350: 7f a4 eb 78 mr r4,r29
ffc11354: 38 c0 00 00 li r6,0
ffc11358: 4b ff a3 e5 bl ffc0b73c <_Protected_heap_Allocate_aligned_with_boundary>
RTEMS_Malloc_Heap,
size,
alignment
);
if ( !return_this )
return ENOMEM;
ffc1135c: 39 20 00 0c li r9,12
return_this = _Protected_heap_Allocate_aligned(
RTEMS_Malloc_Heap,
size,
alignment
);
if ( !return_this )
ffc11360: 7c 7e 1b 79 mr. r30,r3
ffc11364: 40 a2 00 18 bne+ ffc1137c <rtems_memalign+0x7c>
ffc11368: 48 00 00 3c b ffc113a4 <rtems_memalign+0xa4>
/*
* 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() )
ffc1136c: 4b ff 44 71 bl ffc057dc <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()) &&
ffc11370: 2f 83 00 00 cmpwi cr7,r3,0
ffc11374: 41 9e ff a4 beq+ cr7,ffc11318 <rtems_memalign+0x18> <== NEVER TAKEN
ffc11378: 4b ff ff c8 b ffc11340 <rtems_memalign+0x40>
return ENOMEM;
/*
* If configured, update the more involved statistics
*/
if ( rtems_malloc_statistics_helpers )
ffc1137c: 3d 20 00 00 lis r9,0
ffc11380: 81 29 27 c8 lwz r9,10184(r9)
ffc11384: 2f 89 00 00 cmpwi cr7,r9,0
ffc11388: 41 9e 00 14 beq- cr7,ffc1139c <rtems_memalign+0x9c>
(*rtems_malloc_statistics_helpers->at_malloc)(pointer);
ffc1138c: 81 29 00 04 lwz r9,4(r9)
ffc11390: 7f e3 fb 78 mr r3,r31
ffc11394: 7d 29 03 a6 mtctr r9
ffc11398: 4e 80 04 21 bctrl
*pointer = return_this;
ffc1139c: 93 df 00 00 stw r30,0(r31)
return 0;
ffc113a0: 39 20 00 00 li r9,0
}
ffc113a4: 39 61 00 18 addi r11,r1,24
ffc113a8: 7d 23 4b 78 mr r3,r9
ffc113ac: 48 00 83 9c b ffc19748 <_restgpr_29_x>
ffc0a024 <rtems_mkdir>:
return (retval);
}
int
rtems_mkdir(const char *path, mode_t mode)
{
ffc0a024: 94 21 ff 88 stwu r1,-120(r1)
ffc0a028: 7c 08 02 a6 mflr r0
ffc0a02c: bf 21 00 5c stmw r25,92(r1)
ffc0a030: 7c 9b 23 78 mr r27,r4
ffc0a034: 90 01 00 7c stw r0,124(r1)
int success = 0;
char *dup_path = strdup(path);
ffc0a038: 48 01 a6 d9 bl ffc24710 <strdup>
if (dup_path != NULL) {
ffc0a03c: 7c 7d 1b 79 mr. r29,r3
ffc0a040: 40 a2 00 0c bne+ ffc0a04c <rtems_mkdir+0x28>
success = build(dup_path, mode);
free(dup_path);
}
return success != 0 ? 0 : -1;
ffc0a044: 38 60 ff ff li r3,-1
ffc0a048: 48 00 01 74 b ffc0a1bc <rtems_mkdir+0x198>
char *p;
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
ffc0a04c: 89 3d 00 00 lbz r9,0(r29)
(void)umask(oumask);
return (retval);
}
int
rtems_mkdir(const char *path, mode_t mode)
ffc0a050: 3b 80 00 00 li r28,0
for (first = 1, last = 0; !last ; ++p) {
if (p[0] == '\0')
last = 1;
else if (p[0] != '/')
continue;
*p = '\0';
ffc0a054: 3b 40 00 00 li r26,0
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
++p;
ffc0a058: 69 3e 00 2f xori r30,r9,47
ffc0a05c: 23 de 00 00 subfic r30,r30,0
ffc0a060: 7f dd 01 94 addze r30,r29
(void)umask(oumask);
return (retval);
}
int
rtems_mkdir(const char *path, mode_t mode)
ffc0a064: 3b de ff ff addi r30,r30,-1
ffc0a068: 39 20 00 01 li r9,1
retval = 0;
break;
}
}
if (!last)
*p = '/';
ffc0a06c: 3b 20 00 2f li r25,47
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
++p;
for (first = 1, last = 0; !last ; ++p) {
if (p[0] == '\0')
ffc0a070: 8d 1e 00 01 lbzu r8,1(r30)
last = 1;
ffc0a074: 39 40 00 01 li r10,1
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
++p;
for (first = 1, last = 0; !last ; ++p) {
if (p[0] == '\0')
ffc0a078: 2f 88 00 00 cmpwi cr7,r8,0
ffc0a07c: 41 9e 00 10 beq- cr7,ffc0a08c <rtems_mkdir+0x68>
last = 1;
else if (p[0] != '/')
ffc0a080: 2f 88 00 2f cmpwi cr7,r8,47
ffc0a084: 40 9e ff ec bne+ cr7,ffc0a070 <rtems_mkdir+0x4c>
ffc0a088: 39 40 00 00 li r10,0
continue;
*p = '\0';
if (!last && p[1] == '\0')
ffc0a08c: 2f 8a 00 00 cmpwi cr7,r10,0
for (first = 1, last = 0; !last ; ++p) {
if (p[0] == '\0')
last = 1;
else if (p[0] != '/')
continue;
*p = '\0';
ffc0a090: 9b 5e 00 00 stb r26,0(r30)
if (!last && p[1] == '\0')
ffc0a094: 3b e0 00 01 li r31,1
ffc0a098: 40 9e 00 10 bne- cr7,ffc0a0a8 <rtems_mkdir+0x84>
ffc0a09c: 8b fe 00 01 lbz r31,1(r30)
ffc0a0a0: 7f ff 00 34 cntlzw r31,r31
ffc0a0a4: 57 ff d9 7e rlwinm r31,r31,27,5,31
last = 1;
if (first) {
ffc0a0a8: 2f 89 00 00 cmpwi cr7,r9,0
ffc0a0ac: 41 be 00 18 beq+ cr7,ffc0a0c4 <rtems_mkdir+0xa0>
* mkdir [-m mode] dir
*
* We change the user's umask and then restore it,
* instead of doing chmod's.
*/
oumask = umask(0);
ffc0a0b0: 38 60 00 00 li r3,0
ffc0a0b4: 48 00 2a a9 bl ffc0cb5c <umask>
ffc0a0b8: 7c 7c 1b 78 mr r28,r3
numask = oumask & ~(S_IWUSR | S_IXUSR);
(void)umask(numask);
ffc0a0bc: 54 63 06 ae rlwinm r3,r3,0,26,23
ffc0a0c0: 48 00 2a 9d bl ffc0cb5c <umask>
first = 0;
}
if (last)
ffc0a0c4: 2f 9f 00 00 cmpwi cr7,r31,0
(void)umask(oumask);
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
ffc0a0c8: 38 80 01 ff li r4,511
oumask = umask(0);
numask = oumask & ~(S_IWUSR | S_IXUSR);
(void)umask(numask);
first = 0;
}
if (last)
ffc0a0cc: 41 be 00 10 beq+ cr7,ffc0a0dc <rtems_mkdir+0xb8>
(void)umask(oumask);
ffc0a0d0: 7f 83 e3 78 mr r3,r28
ffc0a0d4: 48 00 2a 89 bl ffc0cb5c <umask>
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
ffc0a0d8: 7f 64 db 78 mr r4,r27
ffc0a0dc: 7f a3 eb 78 mr r3,r29
ffc0a0e0: 4b ff f1 f9 bl ffc092d8 <mkdir>
ffc0a0e4: 2f 83 00 00 cmpwi cr7,r3,0
ffc0a0e8: 40 bc 00 90 bge+ cr7,ffc0a178 <rtems_mkdir+0x154>
if (errno == EEXIST || errno == EISDIR) {
ffc0a0ec: 48 01 7e fd bl ffc21fe8 <__errno>
ffc0a0f0: 81 23 00 00 lwz r9,0(r3)
ffc0a0f4: 2f 89 00 11 cmpwi cr7,r9,17
ffc0a0f8: 40 be 00 1c bne+ cr7,ffc0a114 <rtems_mkdir+0xf0>
if (stat(path, &sb) < 0) {
ffc0a0fc: 7f a3 eb 78 mr r3,r29
ffc0a100: 38 81 00 08 addi r4,r1,8
ffc0a104: 48 00 00 c1 bl ffc0a1c4 <stat>
ffc0a108: 2f 83 00 00 cmpwi cr7,r3,0
ffc0a10c: 40 bc 00 1c bge+ cr7,ffc0a128 <rtems_mkdir+0x104> <== ALWAYS TAKEN
ffc0a110: 48 00 00 78 b ffc0a188 <rtems_mkdir+0x164> <== 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) {
ffc0a114: 48 01 7e d5 bl ffc21fe8 <__errno>
ffc0a118: 81 23 00 00 lwz r9,0(r3)
ffc0a11c: 2f 89 00 15 cmpwi cr7,r9,21
ffc0a120: 41 9e ff dc beq+ cr7,ffc0a0fc <rtems_mkdir+0xd8> <== NEVER TAKEN
ffc0a124: 48 00 00 64 b ffc0a188 <rtems_mkdir+0x164>
if (stat(path, &sb) < 0) {
retval = 0;
break;
} else if (!S_ISDIR(sb.st_mode)) {
ffc0a128: 81 21 00 14 lwz r9,20(r1)
ffc0a12c: 2f 9f 00 00 cmpwi cr7,r31,0
ffc0a130: 55 29 04 26 rlwinm r9,r9,0,16,19
ffc0a134: 2f 09 40 00 cmpwi cr6,r9,16384
ffc0a138: 41 ba 00 30 beq+ cr6,ffc0a168 <rtems_mkdir+0x144>
if (last)
ffc0a13c: 41 9e 00 18 beq- cr7,ffc0a154 <rtems_mkdir+0x130>
errno = EEXIST;
ffc0a140: 48 01 7e a9 bl ffc21fe8 <__errno>
ffc0a144: 39 20 00 11 li r9,17
ffc0a148: 91 23 00 00 stw r9,0(r3)
else
errno = ENOTDIR;
retval = 0;
ffc0a14c: 3b c0 00 00 li r30,0
ffc0a150: 48 00 00 4c b ffc0a19c <rtems_mkdir+0x178>
break;
} else if (!S_ISDIR(sb.st_mode)) {
if (last)
errno = EEXIST;
else
errno = ENOTDIR;
ffc0a154: 48 01 7e 95 bl ffc21fe8 <__errno>
ffc0a158: 39 20 00 14 li r9,20
ffc0a15c: 91 23 00 00 stw r9,0(r3)
retval = 0;
ffc0a160: 3b c0 00 00 li r30,0
ffc0a164: 48 00 00 30 b ffc0a194 <rtems_mkdir+0x170>
break;
}
if (last)
ffc0a168: 40 9e 00 4c bne- cr7,ffc0a1b4 <rtems_mkdir+0x190>
retval = 0;
break;
}
}
if (!last)
*p = '/';
ffc0a16c: 9b 3e 00 00 stb r25,0(r30)
ffc0a170: 39 20 00 00 li r9,0
ffc0a174: 4b ff fe fc b ffc0a070 <rtems_mkdir+0x4c>
} else {
retval = 0;
break;
}
}
if (!last)
ffc0a178: 2f 9f 00 00 cmpwi cr7,r31,0
ffc0a17c: 41 be ff f0 beq- cr7,ffc0a16c <rtems_mkdir+0x148>
ffc0a180: 3b c0 00 01 li r30,1
ffc0a184: 48 00 00 18 b ffc0a19c <rtems_mkdir+0x178>
*p = '/';
}
if (!first && !last)
ffc0a188: 2f 9f 00 00 cmpwi cr7,r31,0
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;
ffc0a18c: 3b c0 00 00 li r30,0
}
}
if (!last)
*p = '/';
}
if (!first && !last)
ffc0a190: 40 be 00 0c bne+ cr7,ffc0a19c <rtems_mkdir+0x178> <== ALWAYS TAKEN
(void)umask(oumask);
ffc0a194: 7f 83 e3 78 mr r3,r28
ffc0a198: 48 00 29 c5 bl ffc0cb5c <umask>
int success = 0;
char *dup_path = strdup(path);
if (dup_path != NULL) {
success = build(dup_path, mode);
free(dup_path);
ffc0a19c: 7f a3 eb 78 mr r3,r29
ffc0a1a0: 4b ff e9 75 bl ffc08b14 <free>
}
return success != 0 ? 0 : -1;
ffc0a1a4: 2f 9e 00 00 cmpwi cr7,r30,0
ffc0a1a8: 41 be fe 9c beq- cr7,ffc0a044 <rtems_mkdir+0x20>
ffc0a1ac: 38 60 00 00 li r3,0
ffc0a1b0: 48 00 00 0c b ffc0a1bc <rtems_mkdir+0x198>
errno = ENOTDIR;
retval = 0;
break;
}
if (last)
retval = 2;
ffc0a1b4: 3b c0 00 02 li r30,2
ffc0a1b8: 4b ff ff e4 b ffc0a19c <rtems_mkdir+0x178>
success = build(dup_path, mode);
free(dup_path);
}
return success != 0 ? 0 : -1;
}
ffc0a1bc: 39 61 00 78 addi r11,r1,120
ffc0a1c0: 4b ff 73 94 b ffc01554 <_restgpr_25_x>
ffc044c0 <rtems_panic>:
void rtems_panic(
const char *printf_format,
...
)
{
ffc044c0: 94 21 ff 88 stwu r1,-120(r1)
ffc044c4: 7c 08 02 a6 mflr r0
ffc044c8: 90 81 00 1c stw r4,28(r1)
ffc044cc: 90 01 00 7c stw r0,124(r1)
ffc044d0: 90 a1 00 20 stw r5,32(r1)
ffc044d4: 90 c1 00 24 stw r6,36(r1)
ffc044d8: 90 e1 00 28 stw r7,40(r1)
ffc044dc: 91 01 00 2c stw r8,44(r1)
ffc044e0: 91 21 00 30 stw r9,48(r1)
ffc044e4: 91 41 00 34 stw r10,52(r1)
ffc044e8: 40 86 00 24 bne- cr1,ffc0450c <rtems_panic+0x4c> <== ALWAYS TAKEN
ffc044ec: d8 21 00 38 stfd f1,56(r1) <== NOT EXECUTED
ffc044f0: d8 41 00 40 stfd f2,64(r1) <== NOT EXECUTED
ffc044f4: d8 61 00 48 stfd f3,72(r1) <== NOT EXECUTED
ffc044f8: d8 81 00 50 stfd f4,80(r1) <== NOT EXECUTED
ffc044fc: d8 a1 00 58 stfd f5,88(r1) <== NOT EXECUTED
ffc04500: d8 c1 00 60 stfd f6,96(r1) <== NOT EXECUTED
ffc04504: d8 e1 00 68 stfd f7,104(r1) <== NOT EXECUTED
ffc04508: d9 01 00 70 stfd f8,112(r1) <== NOT EXECUTED
va_list arglist;
va_start(arglist, printf_format);
ffc0450c: 39 20 00 01 li r9,1
ffc04510: 99 21 00 08 stb r9,8(r1)
ffc04514: 39 20 00 00 li r9,0
void rtems_panic(
const char *printf_format,
...
)
{
ffc04518: 7c 64 1b 78 mr r4,r3
va_list arglist;
va_start(arglist, printf_format);
ffc0451c: 99 21 00 09 stb r9,9(r1)
ffc04520: 39 21 00 80 addi r9,r1,128
(void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist);
ffc04524: 38 a1 00 08 addi r5,r1,8
...
)
{
va_list arglist;
va_start(arglist, printf_format);
ffc04528: 91 21 00 0c stw r9,12(r1)
(void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist);
ffc0452c: 3c 60 20 00 lis r3,8192
...
)
{
va_list arglist;
va_start(arglist, printf_format);
ffc04530: 39 21 00 18 addi r9,r1,24
ffc04534: 91 21 00 10 stw r9,16(r1)
(void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist);
ffc04538: 4b ff fd 35 bl ffc0426c <rtems_verror>
va_end(arglist);
rtems_error(0, "fatal error, exiting");
ffc0453c: 3c 80 ff c2 lis r4,-62
ffc04540: 38 84 cd b3 addi r4,r4,-12877
ffc04544: 38 60 00 00 li r3,0
ffc04548: 4c c6 31 82 crclr 4*cr1+eq
ffc0454c: 4b ff fe a5 bl ffc043f0 <rtems_error>
_exit(errno);
ffc04550: 48 00 c0 5d bl ffc105ac <__errno>
ffc04554: 80 63 00 00 lwz r3,0(r3)
ffc04558: 48 00 09 55 bl ffc04eac <_exit>
ffc09d1c <rtems_partition_create>:
uint32_t length,
uint32_t buffer_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
ffc09d1c: 94 21 ff d0 stwu r1,-48(r1)
ffc09d20: 7c 08 02 a6 mflr r0
ffc09d24: bf 21 00 14 stmw r25,20(r1)
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
ffc09d28: 7c 7b 1b 79 mr. r27,r3
uint32_t length,
uint32_t buffer_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
ffc09d2c: 90 01 00 34 stw r0,52(r1)
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
ffc09d30: 41 a2 00 dc beq+ ffc09e0c <rtems_partition_create+0xf0>
return RTEMS_INVALID_NAME;
if ( !starting_address )
ffc09d34: 2f 84 00 00 cmpwi cr7,r4,0
return RTEMS_INVALID_ADDRESS;
ffc09d38: 38 60 00 09 li r3,9
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !starting_address )
ffc09d3c: 41 9e 00 d4 beq- cr7,ffc09e10 <rtems_partition_create+0xf4>
return RTEMS_INVALID_ADDRESS;
if ( !id )
ffc09d40: 2f 88 00 00 cmpwi cr7,r8,0
ffc09d44: 7d 1c 43 78 mr r28,r8
ffc09d48: 41 9e 00 c8 beq- cr7,ffc09e10 <rtems_partition_create+0xf4><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
ffc09d4c: 2f 85 00 00 cmpwi cr7,r5,0
ffc09d50: 7c be 2b 78 mr r30,r5
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
ffc09d54: 38 60 00 08 li r3,8
return RTEMS_INVALID_ADDRESS;
if ( !id )
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
ffc09d58: 41 be 00 b8 beq+ cr7,ffc09e10 <rtems_partition_create+0xf4>
ffc09d5c: 2f 86 00 00 cmpwi cr7,r6,0
ffc09d60: 41 be 00 b0 beq+ cr7,ffc09e10 <rtems_partition_create+0xf4>
ffc09d64: 7f 85 30 40 cmplw cr7,r5,r6
ffc09d68: 41 bc 00 a8 blt+ cr7,ffc09e10 <rtems_partition_create+0xf4>
ffc09d6c: 70 c9 00 07 andi. r9,r6,7
ffc09d70: 40 a2 00 a0 bne+ ffc09e10 <rtems_partition_create+0xf4>
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
if ( !_Addresses_Is_aligned( starting_address ) )
ffc09d74: 70 99 00 07 andi. r25,r4,7
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !starting_address )
return RTEMS_INVALID_ADDRESS;
ffc09d78: 38 60 00 09 li r3,9
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 ) )
ffc09d7c: 40 a2 00 94 bne+ ffc09e10 <rtems_partition_create+0xf4>
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
ffc09d80: 3d 20 00 00 lis r9,0
ffc09d84: 81 49 28 a8 lwz r10,10408(r9)
ffc09d88: 7c fa 3b 78 mr r26,r7
++level;
ffc09d8c: 39 4a 00 01 addi r10,r10,1
_Thread_Dispatch_disable_level = level;
ffc09d90: 91 49 28 a8 stw r10,10408(r9)
* 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 );
ffc09d94: 3f a0 00 00 lis r29,0
ffc09d98: 90 81 00 08 stw r4,8(r1)
ffc09d9c: 3b bd 54 d8 addi r29,r29,21720
ffc09da0: 7f a3 eb 78 mr r3,r29
ffc09da4: 90 c1 00 0c stw r6,12(r1)
ffc09da8: 48 00 1c e5 bl ffc0ba8c <_Objects_Allocate>
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
ffc09dac: 7c 7f 1b 79 mr. r31,r3
ffc09db0: 80 81 00 08 lwz r4,8(r1)
ffc09db4: 80 c1 00 0c lwz r6,12(r1)
ffc09db8: 40 a2 00 10 bne+ ffc09dc8 <rtems_partition_create+0xac>
_Thread_Enable_dispatch();
ffc09dbc: 48 00 31 0d bl ffc0cec8 <_Thread_Enable_dispatch>
return RTEMS_TOO_MANY;
ffc09dc0: 38 60 00 05 li r3,5
ffc09dc4: 48 00 00 4c b ffc09e10 <rtems_partition_create+0xf4>
the_partition->length = length;
the_partition->buffer_size = buffer_size;
the_partition->attribute_set = attribute_set;
the_partition->number_of_used_blocks = 0;
_Chain_Initialize( &the_partition->Memory, starting_address,
ffc09dc8: 7c be 33 96 divwu r5,r30,r6
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
ffc09dcc: 90 9f 00 10 stw r4,16(r31)
the_partition->length = length;
the_partition->buffer_size = buffer_size;
ffc09dd0: 90 df 00 18 stw r6,24(r31)
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
the_partition->length = length;
ffc09dd4: 93 df 00 14 stw r30,20(r31)
the_partition->buffer_size = buffer_size;
the_partition->attribute_set = attribute_set;
ffc09dd8: 93 5f 00 1c stw r26,28(r31)
the_partition->number_of_used_blocks = 0;
ffc09ddc: 93 3f 00 20 stw r25,32(r31)
_Chain_Initialize( &the_partition->Memory, starting_address,
ffc09de0: 38 7f 00 24 addi r3,r31,36
ffc09de4: 48 00 12 69 bl ffc0b04c <_Chain_Initialize>
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
ffc09de8: 81 3f 00 08 lwz r9,8(r31)
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
ffc09dec: 81 1d 00 1c lwz r8,28(r29)
ffc09df0: 55 2a 13 ba rlwinm r10,r9,2,14,29
ffc09df4: 7f e8 51 2e stwx r31,r8,r10
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
ffc09df8: 93 7f 00 0c stw r27,12(r31)
&_Partition_Information,
&the_partition->Object,
(Objects_Name) name
);
*id = the_partition->Object.id;
ffc09dfc: 91 3c 00 00 stw r9,0(r28)
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
ffc09e00: 48 00 30 c9 bl ffc0cec8 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
ffc09e04: 38 60 00 00 li r3,0
ffc09e08: 48 00 00 08 b ffc09e10 <rtems_partition_create+0xf4>
)
{
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
ffc09e0c: 38 60 00 03 li r3,3
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
ffc09e10: 39 61 00 30 addi r11,r1,48
ffc09e14: 48 01 2f 88 b ffc1cd9c <_restgpr_25_x>
ffc08250 <rtems_printf_plugin>:
#include <rtems/bspIo.h>
#include <stdio.h>
int rtems_printf_plugin(void *context, const char *format, ...)
{
ffc08250: 94 21 ff 90 stwu r1,-112(r1)
ffc08254: 7c 08 02 a6 mflr r0
ffc08258: 90 a1 00 18 stw r5,24(r1)
ffc0825c: 90 01 00 74 stw r0,116(r1)
ffc08260: 90 c1 00 1c stw r6,28(r1)
ffc08264: 90 e1 00 20 stw r7,32(r1)
ffc08268: 91 01 00 24 stw r8,36(r1)
ffc0826c: 91 21 00 28 stw r9,40(r1)
ffc08270: 91 41 00 2c stw r10,44(r1)
ffc08274: 40 86 00 24 bne- cr1,ffc08298 <rtems_printf_plugin+0x48><== ALWAYS TAKEN
ffc08278: d8 21 00 30 stfd f1,48(r1) <== NOT EXECUTED
ffc0827c: d8 41 00 38 stfd f2,56(r1) <== NOT EXECUTED
ffc08280: d8 61 00 40 stfd f3,64(r1) <== NOT EXECUTED
ffc08284: d8 81 00 48 stfd f4,72(r1) <== NOT EXECUTED
ffc08288: d8 a1 00 50 stfd f5,80(r1) <== NOT EXECUTED
ffc0828c: d8 c1 00 58 stfd f6,88(r1) <== NOT EXECUTED
ffc08290: d8 e1 00 60 stfd f7,96(r1) <== NOT EXECUTED
ffc08294: d9 01 00 68 stfd f8,104(r1) <== NOT EXECUTED
int rv;
va_list ap;
va_start(ap, format);
ffc08298: 39 20 00 02 li r9,2
ffc0829c: 99 21 00 08 stb r9,8(r1)
ffc082a0: 39 20 00 00 li r9,0
rv = vprintf(format, ap);
ffc082a4: 7c 83 23 78 mr r3,r4
int rtems_printf_plugin(void *context, const char *format, ...)
{
int rv;
va_list ap;
va_start(ap, format);
ffc082a8: 99 21 00 09 stb r9,9(r1)
ffc082ac: 39 21 00 78 addi r9,r1,120
rv = vprintf(format, ap);
ffc082b0: 38 81 00 08 addi r4,r1,8
int rtems_printf_plugin(void *context, const char *format, ...)
{
int rv;
va_list ap;
va_start(ap, format);
ffc082b4: 91 21 00 0c stw r9,12(r1)
ffc082b8: 39 21 00 10 addi r9,r1,16
ffc082bc: 91 21 00 10 stw r9,16(r1)
rv = vprintf(format, ap);
ffc082c0: 48 00 e2 09 bl ffc164c8 <vprintf>
va_end(ap);
return rv;
}
ffc082c4: 80 01 00 74 lwz r0,116(r1)
ffc082c8: 38 21 00 70 addi r1,r1,112
ffc082cc: 7c 08 03 a6 mtlr r0
ffc082d0: 4e 80 00 20 blr
ffc348a8 <rtems_rate_monotonic_period>:
rtems_status_code rtems_rate_monotonic_period(
rtems_id id,
rtems_interval length
)
{
ffc348a8: 94 21 ff d8 stwu r1,-40(r1)
ffc348ac: 7c 08 02 a6 mflr r0
ffc348b0: bf 81 00 18 stmw r28,24(r1)
ffc348b4: 7c 7e 1b 78 mr r30,r3
ffc348b8: 3c 60 00 00 lis r3,0
ffc348bc: 7c 9d 23 78 mr r29,r4
ffc348c0: 90 01 00 2c stw r0,44(r1)
ffc348c4: 38 63 6f 3c addi r3,r3,28476
ffc348c8: 7f c4 f3 78 mr r4,r30
ffc348cc: 38 a1 00 08 addi r5,r1,8
ffc348d0: 4b fd 53 2d bl ffc09bfc <_Objects_Get>
rtems_rate_monotonic_period_states local_state;
ISR_Level level;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
ffc348d4: 81 21 00 08 lwz r9,8(r1)
ffc348d8: 2f 89 00 00 cmpwi cr7,r9,0
ffc348dc: 40 9e 01 8c bne- cr7,ffc34a68 <rtems_rate_monotonic_period+0x1c0>
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
ffc348e0: 3d 40 00 00 lis r10,0
ffc348e4: 81 23 00 40 lwz r9,64(r3)
ffc348e8: 81 4a 69 30 lwz r10,26928(r10)
ffc348ec: 7c 7f 1b 78 mr r31,r3
ffc348f0: 7f 89 50 00 cmpw cr7,r9,r10
ffc348f4: 41 9e 00 10 beq- cr7,ffc34904 <rtems_rate_monotonic_period+0x5c>
_Thread_Enable_dispatch();
ffc348f8: 4b fd 61 59 bl ffc0aa50 <_Thread_Enable_dispatch>
return RTEMS_NOT_OWNER_OF_RESOURCE;
ffc348fc: 3b c0 00 17 li r30,23
ffc34900: 48 00 01 6c b ffc34a6c <rtems_rate_monotonic_period+0x1c4>
}
if ( length == RTEMS_PERIOD_STATUS ) {
ffc34904: 2f 9d 00 00 cmpwi cr7,r29,0
ffc34908: 40 9e 00 28 bne- cr7,ffc34930 <rtems_rate_monotonic_period+0x88>
switch ( the_period->state ) {
ffc3490c: 81 23 00 38 lwz r9,56(r3)
ffc34910: 3b c0 00 00 li r30,0
ffc34914: 2b 89 00 04 cmplwi cr7,r9,4
ffc34918: 41 9d 00 10 bgt- cr7,ffc34928 <rtems_rate_monotonic_period+0x80><== NEVER TAKEN
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
ffc3491c: 3d 40 ff c6 lis r10,-58
ffc34920: 39 4a e4 90 addi r10,r10,-7024
ffc34924: 7f ca 48 ae lbzx r30,r10,r9
case RATE_MONOTONIC_ACTIVE:
default: /* unreached -- only to remove warnings */
return_value = RTEMS_SUCCESSFUL;
break;
}
_Thread_Enable_dispatch();
ffc34928: 4b fd 61 29 bl ffc0aa50 <_Thread_Enable_dispatch>
ffc3492c: 48 00 01 40 b ffc34a6c <rtems_rate_monotonic_period+0x1c4>
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc34930: 7f 80 00 a6 mfmsr r28
ffc34934: 7d 30 42 a6 mfsprg r9,0
ffc34938: 7f 89 48 78 andc r9,r28,r9
ffc3493c: 7d 20 01 24 mtmsr r9
return( return_value );
}
_ISR_Disable( level );
if ( the_period->state == RATE_MONOTONIC_INACTIVE ) {
ffc34940: 81 23 00 38 lwz r9,56(r3)
ffc34944: 2f 89 00 00 cmpwi cr7,r9,0
ffc34948: 40 be 00 4c bne+ cr7,ffc34994 <rtems_rate_monotonic_period+0xec>
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc3494c: 7f 80 01 24 mtmsr r28
_ISR_Enable( level );
the_period->next_length = length;
ffc34950: 93 a3 00 3c stw r29,60(r3)
/*
* Baseline statistics information for the beginning of a period.
*/
_Rate_monotonic_Initiate_statistics( the_period );
ffc34954: 4b ff fe b9 bl ffc3480c <_Rate_monotonic_Initiate_statistics>
the_period->state = RATE_MONOTONIC_ACTIVE;
ffc34958: 39 20 00 02 li r9,2
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
ffc3495c: 3d 40 ff c3 lis r10,-61
ffc34960: 91 3f 00 38 stw r9,56(r31)
ffc34964: 39 4a 4a 78 addi r10,r10,19064
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
ffc34968: 39 20 00 00 li r9,0
the_watchdog->routine = routine;
ffc3496c: 91 5f 00 2c stw r10,44(r31)
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc34970: 3c 60 00 00 lis r3,0
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
ffc34974: 91 3f 00 18 stw r9,24(r31)
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc34978: 38 63 65 28 addi r3,r3,25896
ffc3497c: 38 9f 00 10 addi r4,r31,16
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
ffc34980: 93 df 00 30 stw r30,48(r31)
the_watchdog->user_data = user_data;
ffc34984: 91 3f 00 34 stw r9,52(r31)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
ffc34988: 93 bf 00 1c stw r29,28(r31)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc3498c: 4b fd 6e 31 bl ffc0b7bc <_Watchdog_Insert>
ffc34990: 48 00 00 74 b ffc34a04 <rtems_rate_monotonic_period+0x15c>
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
if ( the_period->state == RATE_MONOTONIC_ACTIVE ) {
ffc34994: 2f 89 00 02 cmpwi cr7,r9,2
ffc34998: 40 be 00 78 bne+ cr7,ffc34a10 <rtems_rate_monotonic_period+0x168>
/*
* Update statistics from the concluding period.
*/
_Rate_monotonic_Update_statistics( the_period );
ffc3499c: 4b ff fd 45 bl ffc346e0 <_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;
ffc349a0: 39 20 00 01 li r9,1
ffc349a4: 91 3f 00 38 stw r9,56(r31)
the_period->next_length = length;
ffc349a8: 93 bf 00 3c stw r29,60(r31)
ffc349ac: 7f 80 01 24 mtmsr r28
_ISR_Enable( level );
_Thread_Executing->Wait.id = the_period->Object.id;
ffc349b0: 3d 20 00 00 lis r9,0
ffc349b4: 80 69 69 30 lwz r3,26928(r9)
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
ffc349b8: 38 80 40 00 li r4,16384
the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING;
the_period->next_length = length;
_ISR_Enable( level );
_Thread_Executing->Wait.id = the_period->Object.id;
ffc349bc: 81 3f 00 08 lwz r9,8(r31)
ffc349c0: 91 23 00 20 stw r9,32(r3)
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
ffc349c4: 4b fd 69 e9 bl ffc0b3ac <_Thread_Set_state>
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc349c8: 7d 40 00 a6 mfmsr r10
ffc349cc: 7d 30 42 a6 mfsprg r9,0
ffc349d0: 7d 49 48 78 andc r9,r10,r9
ffc349d4: 7d 20 01 24 mtmsr r9
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
local_state = the_period->state;
the_period->state = RATE_MONOTONIC_ACTIVE;
ffc349d8: 39 00 00 02 li r8,2
/*
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
local_state = the_period->state;
ffc349dc: 81 3f 00 38 lwz r9,56(r31)
the_period->state = RATE_MONOTONIC_ACTIVE;
ffc349e0: 91 1f 00 38 stw r8,56(r31)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc349e4: 7d 40 01 24 mtmsr r10
/*
* 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 )
ffc349e8: 2f 89 00 03 cmpwi cr7,r9,3
ffc349ec: 40 be 00 18 bne+ cr7,ffc34a04 <rtems_rate_monotonic_period+0x15c><== ALWAYS TAKEN
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
ffc349f0: 3d 20 00 00 lis r9,0 <== NOT EXECUTED
ffc349f4: 39 29 69 20 addi r9,r9,26912 <== NOT EXECUTED
ffc349f8: 80 69 00 10 lwz r3,16(r9) <== NOT EXECUTED
ffc349fc: 38 80 40 00 li r4,16384 <== NOT EXECUTED
ffc34a00: 4b fd 5c 31 bl ffc0a630 <_Thread_Clear_state> <== NOT EXECUTED
_Thread_Enable_dispatch();
ffc34a04: 4b fd 60 4d bl ffc0aa50 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
ffc34a08: 3b c0 00 00 li r30,0
ffc34a0c: 48 00 00 60 b ffc34a6c <rtems_rate_monotonic_period+0x1c4>
}
if ( the_period->state == RATE_MONOTONIC_EXPIRED ) {
ffc34a10: 2f 89 00 04 cmpwi cr7,r9,4
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
ffc34a14: 3b c0 00 04 li r30,4
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
if ( the_period->state == RATE_MONOTONIC_EXPIRED ) {
ffc34a18: 40 be 00 54 bne+ cr7,ffc34a6c <rtems_rate_monotonic_period+0x1c4><== NEVER TAKEN
/*
* Update statistics from the concluding period
*/
_Rate_monotonic_Update_statistics( the_period );
ffc34a1c: 4b ff fc c5 bl ffc346e0 <_Rate_monotonic_Update_statistics>
ffc34a20: 7f 80 01 24 mtmsr r28
_ISR_Enable( level );
the_period->state = RATE_MONOTONIC_ACTIVE;
ffc34a24: 39 20 00 02 li r9,2
the_period->next_length = length;
ffc34a28: 93 bf 00 3c stw r29,60(r31)
ffc34a2c: 3c 60 00 00 lis r3,0
*/
_Rate_monotonic_Update_statistics( the_period );
_ISR_Enable( level );
the_period->state = RATE_MONOTONIC_ACTIVE;
ffc34a30: 91 3f 00 38 stw r9,56(r31)
ffc34a34: 38 63 65 28 addi r3,r3,25896
ffc34a38: 38 9f 00 10 addi r4,r31,16
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
ffc34a3c: 93 bf 00 1c stw r29,28(r31)
the_period->next_length = length;
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Scheduler_Release_job(the_period->owner, the_period->next_length);
_Thread_Enable_dispatch();
return RTEMS_TIMEOUT;
ffc34a40: 3b c0 00 06 li r30,6
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc34a44: 4b fd 6d 79 bl ffc0b7bc <_Watchdog_Insert>
ffc34a48: 3d 20 00 00 lis r9,0
ffc34a4c: 81 29 20 c0 lwz r9,8384(r9)
ffc34a50: 80 7f 00 40 lwz r3,64(r31)
ffc34a54: 80 9f 00 3c lwz r4,60(r31)
ffc34a58: 7d 29 03 a6 mtctr r9
ffc34a5c: 4e 80 04 21 bctrl
the_period->state = RATE_MONOTONIC_ACTIVE;
the_period->next_length = length;
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Scheduler_Release_job(the_period->owner, the_period->next_length);
_Thread_Enable_dispatch();
ffc34a60: 4b fd 5f f1 bl ffc0aa50 <_Thread_Enable_dispatch>
ffc34a64: 48 00 00 08 b ffc34a6c <rtems_rate_monotonic_period+0x1c4>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
ffc34a68: 3b c0 00 04 li r30,4
}
ffc34a6c: 39 61 00 28 addi r11,r1,40
ffc34a70: 7f c3 f3 78 mr r3,r30
ffc34a74: 48 01 fa 8c b ffc54500 <_restgpr_28_x>
ffc27858 <rtems_rate_monotonic_report_statistics_with_plugin>:
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
ffc27858: 94 21 ff 70 stwu r1,-144(r1)
ffc2785c: 7c 08 02 a6 mflr r0
ffc27860: be e1 00 6c stmw r23,108(r1)
rtems_id id;
rtems_rate_monotonic_period_statistics the_stats;
rtems_rate_monotonic_period_status the_status;
char name[5];
if ( !print )
ffc27864: 7c 9f 23 79 mr. r31,r4
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
ffc27868: 90 01 00 94 stw r0,148(r1)
rtems_id id;
rtems_rate_monotonic_period_statistics the_stats;
rtems_rate_monotonic_period_status the_status;
char name[5];
if ( !print )
ffc2786c: 41 82 01 cc beq- ffc27a38 <rtems_rate_monotonic_report_statistics_with_plugin+0x1e0><== NEVER TAKEN
return;
(*print)( context, "Period information by period\n" );
ffc27870: 3c 80 ff c6 lis r4,-58
ffc27874: 7f e9 03 a6 mtctr r31
ffc27878: 38 84 b8 d0 addi r4,r4,-18224
ffc2787c: 7c 7e 1b 78 mr r30,r3
rtems_object_get_name( the_status.owner, sizeof(name), name );
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
ffc27880: 3f 40 ff c6 lis r26,-58
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 );
(*print)( context,
ffc27884: 3f 20 ff c6 lis r25,-58
char name[5];
if ( !print )
return;
(*print)( context, "Period information by period\n" );
ffc27888: 4c c6 31 82 crclr 4*cr1+eq
ffc2788c: 4e 80 04 21 bctrl
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)( context, "--- CPU times are in seconds ---\n" );
ffc27890: 3c 80 ff c6 lis r4,-58
ffc27894: 38 84 b8 ee addi r4,r4,-18194
ffc27898: 7f e9 03 a6 mtctr r31
ffc2789c: 7f c3 f3 78 mr r3,r30
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);
(*print)( context,
ffc278a0: 3f 00 ff c6 lis r24,-58
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
(*print)( context, "\n" );
ffc278a4: 3e e0 ff c5 lis r23,-59
rtems_object_get_name( the_status.owner, sizeof(name), name );
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
ffc278a8: 3b 5a b9 ca addi r26,r26,-17974
if ( !print )
return;
(*print)( context, "Period information by period\n" );
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)( context, "--- CPU times are in seconds ---\n" );
ffc278ac: 4c c6 31 82 crclr 4*cr1+eq
ffc278b0: 4e 80 04 21 bctrl
(*print)( context, "--- Wall times are in seconds ---\n" );
ffc278b4: 3c 80 ff c6 lis r4,-58
ffc278b8: 38 84 b9 10 addi r4,r4,-18160
ffc278bc: 7f e9 03 a6 mtctr r31
ffc278c0: 7f c3 f3 78 mr r3,r30
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 );
(*print)( context,
ffc278c4: 3b 39 b9 e1 addi r25,r25,-17951
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);
(*print)( context,
ffc278c8: 3b 18 ba 00 addi r24,r24,-17920
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
(*print)( context, "\n" );
ffc278cc: 3a f7 61 e6 addi r23,r23,25062
return;
(*print)( context, "Period information by period\n" );
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)( context, "--- CPU times are in seconds ---\n" );
(*print)( context, "--- Wall times are in seconds ---\n" );
ffc278d0: 4c c6 31 82 crclr 4*cr1+eq
ffc278d4: 4e 80 04 21 bctrl
Be sure to test the various cases.
(*print)( context,"\
1234567890123456789012345678901234567890123456789012345678901234567890123456789\
\n");
*/
(*print)( context, " ID OWNER COUNT MISSED "
ffc278d8: 3c 80 ff c6 lis r4,-58
ffc278dc: 38 84 b9 33 addi r4,r4,-18125
ffc278e0: 7f e9 03 a6 mtctr r31
ffc278e4: 7f c3 f3 78 mr r3,r30
ffc278e8: 4c c6 31 82 crclr 4*cr1+eq
ffc278ec: 4e 80 04 21 bctrl
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
" "
#endif
" WALL TIME\n"
);
(*print)( context, " "
ffc278f0: 3c 80 ff c6 lis r4,-58
ffc278f4: 7f c3 f3 78 mr r3,r30
ffc278f8: 7f e9 03 a6 mtctr r31
ffc278fc: 38 84 b9 7e addi r4,r4,-18050
ffc27900: 4c c6 31 82 crclr 4*cr1+eq
ffc27904: 4e 80 04 21 bctrl
/*
* 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 ;
ffc27908: 3d 20 00 00 lis r9,0
ffc2790c: 39 49 6f 3c addi r10,r9,28476
ffc27910: 83 aa 00 08 lwz r29,8(r10)
id <= _Rate_monotonic_Information.maximum_id ;
ffc27914: 7d 3b 4b 78 mr r27,r9
/*
* 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 ;
ffc27918: 48 00 01 10 b ffc27a28 <rtems_rate_monotonic_report_statistics_with_plugin+0x1d0>
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
ffc2791c: 7f a3 eb 78 mr r3,r29
ffc27920: 38 81 00 08 addi r4,r1,8
ffc27924: 48 00 c9 dd bl ffc34300 <rtems_rate_monotonic_get_statistics>
if ( status != RTEMS_SUCCESSFUL )
ffc27928: 2f 83 00 00 cmpwi cr7,r3,0
ffc2792c: 40 be 00 f8 bne+ cr7,ffc27a24 <rtems_rate_monotonic_report_statistics_with_plugin+0x1cc>
#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 );
ffc27930: 38 81 00 40 addi r4,r1,64
ffc27934: 7f a3 eb 78 mr r3,r29
ffc27938: 48 00 cb b9 bl ffc344f0 <rtems_rate_monotonic_get_status>
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
ffc2793c: 80 61 00 40 lwz r3,64(r1)
ffc27940: 38 80 00 05 li r4,5
ffc27944: 38 a1 00 60 addi r5,r1,96
ffc27948: 4b fe 85 d1 bl ffc0ff18 <rtems_object_get_name>
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
ffc2794c: 7f 44 d3 78 mr r4,r26
ffc27950: 7f c3 f3 78 mr r3,r30
ffc27954: 80 e1 00 08 lwz r7,8(r1)
ffc27958: 7f a5 eb 78 mr r5,r29
ffc2795c: 81 01 00 0c lwz r8,12(r1)
ffc27960: 38 c1 00 60 addi r6,r1,96
ffc27964: 7f e9 03 a6 mtctr r31
ffc27968: 4c c6 31 82 crclr 4*cr1+eq
ffc2796c: 4e 80 04 21 bctrl
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
ffc27970: 80 81 00 08 lwz r4,8(r1)
ffc27974: 2f 84 00 00 cmpwi cr7,r4,0
ffc27978: 40 9e 00 1c bne- cr7,ffc27994 <rtems_rate_monotonic_report_statistics_with_plugin+0x13c>
(*print)( context, "\n" );
ffc2797c: 7f c3 f3 78 mr r3,r30
ffc27980: 7f e9 03 a6 mtctr r31
ffc27984: 7e e4 bb 78 mr r4,r23
ffc27988: 4c c6 31 82 crclr 4*cr1+eq
ffc2798c: 4e 80 04 21 bctrl
continue;
ffc27990: 48 00 00 94 b ffc27a24 <rtems_rate_monotonic_report_statistics_with_plugin+0x1cc>
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 );
ffc27994: 38 61 00 20 addi r3,r1,32
ffc27998: 38 a1 00 58 addi r5,r1,88
ffc2799c: 48 00 0c c9 bl ffc28664 <_Timespec_Divide_by_integer>
(*print)( context,
ffc279a0: 80 c1 00 14 lwz r6,20(r1)
ffc279a4: 81 01 00 1c lwz r8,28(r1)
ffc279a8: 3b 80 03 e8 li r28,1000
ffc279ac: 81 41 00 5c lwz r10,92(r1)
ffc279b0: 7c c6 e3 d6 divw r6,r6,r28
ffc279b4: 80 e1 00 18 lwz r7,24(r1)
ffc279b8: 7f e9 03 a6 mtctr r31
ffc279bc: 81 21 00 58 lwz r9,88(r1)
ffc279c0: 80 a1 00 10 lwz r5,16(r1)
ffc279c4: 7d 08 e3 d6 divw r8,r8,r28
ffc279c8: 7d 4a e3 d6 divw r10,r10,r28
ffc279cc: 7f 24 cb 78 mr r4,r25
ffc279d0: 7f c3 f3 78 mr r3,r30
ffc279d4: 4c c6 31 82 crclr 4*cr1+eq
ffc279d8: 4e 80 04 21 bctrl
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);
ffc279dc: 80 81 00 08 lwz r4,8(r1)
ffc279e0: 38 61 00 38 addi r3,r1,56
ffc279e4: 38 a1 00 58 addi r5,r1,88
ffc279e8: 48 00 0c 7d bl ffc28664 <_Timespec_Divide_by_integer>
(*print)( context,
ffc279ec: 80 c1 00 2c lwz r6,44(r1)
ffc279f0: 81 01 00 34 lwz r8,52(r1)
ffc279f4: 7f c3 f3 78 mr r3,r30
ffc279f8: 81 41 00 5c lwz r10,92(r1)
ffc279fc: 7f 04 c3 78 mr r4,r24
ffc27a00: 80 a1 00 28 lwz r5,40(r1)
ffc27a04: 7c c6 e3 d6 divw r6,r6,r28
ffc27a08: 80 e1 00 30 lwz r7,48(r1)
ffc27a0c: 7f e9 03 a6 mtctr r31
ffc27a10: 81 21 00 58 lwz r9,88(r1)
ffc27a14: 7d 08 e3 d6 divw r8,r8,r28
ffc27a18: 7d 4a e3 d6 divw r10,r10,r28
ffc27a1c: 4c c6 31 82 crclr 4*cr1+eq
ffc27a20: 4e 80 04 21 bctrl
* 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++ ) {
ffc27a24: 3b bd 00 01 addi r29,r29,1
/*
* 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 ;
ffc27a28: 39 3b 6f 3c addi r9,r27,28476
/*
* 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 ;
ffc27a2c: 81 29 00 0c lwz r9,12(r9)
ffc27a30: 7f 9d 48 40 cmplw cr7,r29,r9
ffc27a34: 40 9d fe e8 ble+ cr7,ffc2791c <rtems_rate_monotonic_report_statistics_with_plugin+0xc4>
the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall
);
#endif
}
}
}
ffc27a38: 39 61 00 90 addi r11,r1,144
ffc27a3c: 48 02 ca b0 b ffc544ec <_restgpr_23_x>
ffc09764 <rtems_rbheap_allocate>:
return big_enough;
}
void *rtems_rbheap_allocate(rtems_rbheap_control *control, size_t size)
{
ffc09764: 94 21 ff e0 stwu r1,-32(r1)
ffc09768: 7c 08 02 a6 mflr r0
ffc0976c: 2f 84 00 00 cmpwi cr7,r4,0
ffc09770: 90 01 00 24 stw r0,36(r1)
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;
ffc09774: 81 23 00 30 lwz r9,48(r3)
return big_enough;
}
void *rtems_rbheap_allocate(rtems_rbheap_control *control, size_t size)
{
ffc09778: bf 61 00 0c stmw r27,12(r1)
ffc0977c: 7c 7c 1b 78 mr r28,r3
#include <stdlib.h>
static uintptr_t align_up(uintptr_t alignment, uintptr_t value)
{
uintptr_t excess = value % alignment;
ffc09780: 7f a4 4b 96 divwu r29,r4,r9
ffc09784: 7f bd 49 d6 mullw r29,r29,r9
if (excess > 0) {
ffc09788: 7d 5d 20 51 subf. r10,r29,r4
ffc0978c: 41 82 00 dc beq- ffc09868 <rtems_rbheap_allocate+0x104> <== ALWAYS TAKEN
value += alignment - excess;
ffc09790: 7f a4 4a 14 add r29,r4,r9 <== NOT EXECUTED
ffc09794: 7f aa e8 50 subf r29,r10,r29 <== 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) {
ffc09798: 40 be 00 0c bne+ cr7,ffc097a4 <rtems_rbheap_allocate+0x40><== NOT EXECUTED
return big_enough;
}
void *rtems_rbheap_allocate(rtems_rbheap_control *control, size_t size)
{
void *ptr = NULL;
ffc0979c: 38 60 00 00 li r3,0
ffc097a0: 48 00 00 d0 b ffc09870 <rtems_rbheap_allocate+0x10c>
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) {
ffc097a4: 7f 84 e8 40 cmplw cr7,r4,r29 <== NOT EXECUTED
ffc097a8: 40 bd 00 0c ble+ cr7,ffc097b4 <rtems_rbheap_allocate+0x50><== NOT EXECUTED
ffc097ac: 4b ff ff f0 b ffc0979c <rtems_rbheap_allocate+0x38> <== NOT EXECUTED
ffc097b0: 7c 9d 23 78 mr r29,r4
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
ffc097b4: 81 3c 00 00 lwz r9,0(r28)
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);
ffc097b8: 39 1c 00 04 addi r8,r28,4
rtems_rbheap_chunk *big_enough = NULL;
ffc097bc: 3b e0 00 00 li r31,0
ffc097c0: 48 00 00 18 b ffc097d8 <rtems_rbheap_allocate+0x74>
while (current != tail && big_enough == NULL) {
rtems_rbheap_chunk *free_chunk = (rtems_rbheap_chunk *) current;
if (free_chunk->size >= size) {
ffc097c4: 81 49 00 1c lwz r10,28(r9)
ffc097c8: 7f 8a e8 40 cmplw cr7,r10,r29
ffc097cc: 41 9c 00 08 blt- cr7,ffc097d4 <rtems_rbheap_allocate+0x70>
ffc097d0: 7d 3f 4b 78 mr r31,r9
rtems_rbheap_chunk *chunk = malloc(sizeof(*chunk));
if (chunk != NULL) {
rtems_rbheap_add_to_spare_descriptor_chain(control, chunk);
}
}
ffc097d4: 81 29 00 00 lwz r9,0(r9)
{
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) {
ffc097d8: 7f 09 40 00 cmpw cr6,r9,r8
ffc097dc: 2f 9f 00 00 cmpwi cr7,r31,0
ffc097e0: 40 ba 00 0c bne+ cr6,ffc097ec <rtems_rbheap_allocate+0x88>
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) {
ffc097e4: 40 be 00 0c bne+ cr7,ffc097f0 <rtems_rbheap_allocate+0x8c>
ffc097e8: 4b ff ff b4 b ffc0979c <rtems_rbheap_allocate+0x38>
{
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) {
ffc097ec: 41 9e ff d8 beq+ cr7,ffc097c4 <rtems_rbheap_allocate+0x60><== ALWAYS TAKEN
if (size > 0 && size <= aligned_size) {
rtems_rbheap_chunk *free_chunk = search_free_chunk(free_chain, aligned_size);
if (free_chunk != NULL) {
uintptr_t free_size = free_chunk->size;
ffc097f0: 83 7f 00 1c lwz r27,28(r31)
if (free_size > aligned_size) {
ffc097f4: 7f 9b e8 40 cmplw cr7,r27,r29
ffc097f8: 40 9d 00 4c ble- cr7,ffc09844 <rtems_rbheap_allocate+0xe0>
rtems_rbheap_chunk *new_chunk = get_chunk(control);
ffc097fc: 7f 83 e3 78 mr r3,r28
ffc09800: 4b ff fd c5 bl ffc095c4 <get_chunk>
if (new_chunk != NULL) {
ffc09804: 7c 7e 1b 79 mr. r30,r3
ffc09808: 41 a2 ff 94 beq- ffc0979c <rtems_rbheap_allocate+0x38> <== NEVER TAKEN
uintptr_t new_free_size = free_size - aligned_size;
free_chunk->size = new_free_size;
new_chunk->begin = free_chunk->begin + new_free_size;
ffc0980c: 81 3f 00 18 lwz r9,24(r31)
if (free_size > aligned_size) {
rtems_rbheap_chunk *new_chunk = get_chunk(control);
if (new_chunk != NULL) {
uintptr_t new_free_size = free_size - aligned_size;
ffc09810: 7f 7d d8 50 subf r27,r29,r27
free_chunk->size = new_free_size;
ffc09814: 93 7f 00 1c stw r27,28(r31)
static void insert_into_tree(
rtems_rbtree_control *tree,
rtems_rbheap_chunk *chunk
)
{
_RBTree_Insert_unprotected(tree, &chunk->tree_node);
ffc09818: 38 7c 00 18 addi r3,r28,24
if (new_chunk != NULL) {
uintptr_t new_free_size = free_size - aligned_size;
free_chunk->size = new_free_size;
new_chunk->begin = free_chunk->begin + new_free_size;
ffc0981c: 7f 7b 4a 14 add r27,r27,r9
*/
RTEMS_INLINE_ROUTINE void _Chain_Set_off_chain(
Chain_Node *node
)
{
node->next = node->previous = NULL;
ffc09820: 39 20 00 00 li r9,0
ffc09824: 93 7e 00 18 stw r27,24(r30)
static void insert_into_tree(
rtems_rbtree_control *tree,
rtems_rbheap_chunk *chunk
)
{
_RBTree_Insert_unprotected(tree, &chunk->tree_node);
ffc09828: 38 9e 00 08 addi r4,r30,8
if (new_chunk != NULL) {
uintptr_t new_free_size = free_size - aligned_size;
free_chunk->size = new_free_size;
new_chunk->begin = free_chunk->begin + new_free_size;
new_chunk->size = aligned_size;
ffc0982c: 93 be 00 1c stw r29,28(r30)
ffc09830: 91 3e 00 04 stw r9,4(r30)
ffc09834: 91 3e 00 00 stw r9,0(r30)
static void insert_into_tree(
rtems_rbtree_control *tree,
rtems_rbheap_chunk *chunk
)
{
_RBTree_Insert_unprotected(tree, &chunk->tree_node);
ffc09838: 48 00 1a f1 bl ffc0b328 <_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;
ffc0983c: 80 7e 00 18 lwz r3,24(r30)
ffc09840: 48 00 00 30 b ffc09870 <rtems_rbheap_allocate+0x10c>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
ffc09844: 81 3f 00 00 lwz r9,0(r31)
previous = the_node->previous;
ffc09848: 81 5f 00 04 lwz r10,4(r31)
}
} else {
rtems_chain_extract_unprotected(&free_chunk->chain_node);
rtems_chain_set_off_chain(&free_chunk->chain_node);
ptr = (void *) free_chunk->begin;
ffc0984c: 80 7f 00 18 lwz r3,24(r31)
next->previous = previous;
ffc09850: 91 49 00 04 stw r10,4(r9)
previous->next = next;
ffc09854: 91 2a 00 00 stw r9,0(r10)
*/
RTEMS_INLINE_ROUTINE void _Chain_Set_off_chain(
Chain_Node *node
)
{
node->next = node->previous = NULL;
ffc09858: 39 20 00 00 li r9,0
ffc0985c: 91 3f 00 04 stw r9,4(r31)
ffc09860: 91 3f 00 00 stw r9,0(r31)
ffc09864: 48 00 00 0c b ffc09870 <rtems_rbheap_allocate+0x10c>
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) {
ffc09868: 40 9e ff 48 bne+ cr7,ffc097b0 <rtems_rbheap_allocate+0x4c>
ffc0986c: 4b ff ff 30 b ffc0979c <rtems_rbheap_allocate+0x38>
}
}
}
return ptr;
}
ffc09870: 39 61 00 20 addi r11,r1,32
ffc09874: 4b ff 74 f4 b ffc00d68 <_restgpr_27_x>
ffc099a8 <rtems_rbheap_extend_descriptors_with_malloc>:
/* Do nothing */
}
void rtems_rbheap_extend_descriptors_with_malloc(rtems_rbheap_control *control)
{
ffc099a8: 7c 2b 0b 78 mr r11,r1 <== NOT EXECUTED
ffc099ac: 94 21 ff f0 stwu r1,-16(r1) <== NOT EXECUTED
ffc099b0: 7c 08 02 a6 mflr r0 <== NOT EXECUTED
ffc099b4: 4b ff 73 79 bl ffc00d2c <_savegpr_31> <== NOT EXECUTED
ffc099b8: 7c 7f 1b 78 mr r31,r3 <== NOT EXECUTED
rtems_rbheap_chunk *chunk = malloc(sizeof(*chunk));
ffc099bc: 38 60 00 20 li r3,32 <== NOT EXECUTED
{
/* Do nothing */
}
void rtems_rbheap_extend_descriptors_with_malloc(rtems_rbheap_control *control)
{
ffc099c0: 90 01 00 14 stw r0,20(r1) <== NOT EXECUTED
rtems_rbheap_chunk *chunk = malloc(sizeof(*chunk));
ffc099c4: 4b ff b3 e9 bl ffc04dac <malloc> <== NOT EXECUTED
if (chunk != NULL) {
ffc099c8: 2c 03 00 00 cmpwi r3,0 <== NOT EXECUTED
ffc099cc: 41 82 00 1c beq- ffc099e8 <rtems_rbheap_extend_descriptors_with_malloc+0x40><== 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);
ffc099d0: 39 5f 00 0c addi r10,r31,12 <== NOT EXECUTED
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
ffc099d4: 91 43 00 04 stw r10,4(r3) <== NOT EXECUTED
before_node = after_node->next;
ffc099d8: 81 5f 00 0c lwz r10,12(r31) <== NOT EXECUTED
after_node->next = the_node;
ffc099dc: 90 7f 00 0c stw r3,12(r31) <== NOT EXECUTED
the_node->next = before_node;
before_node->previous = the_node;
ffc099e0: 90 6a 00 04 stw r3,4(r10) <== NOT EXECUTED
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
after_node->next = the_node;
the_node->next = before_node;
ffc099e4: 91 43 00 00 stw r10,0(r3) <== NOT EXECUTED
rtems_rbheap_add_to_spare_descriptor_chain(control, chunk);
}
}
ffc099e8: 39 61 00 10 addi r11,r1,16 <== NOT EXECUTED
ffc099ec: 4b ff 73 8c b ffc00d78 <_restgpr_31_x> <== NOT EXECUTED
ffc09878 <rtems_rbheap_free>:
_RBTree_Extract_unprotected(chunk_tree, &b->tree_node);
}
}
rtems_status_code rtems_rbheap_free(rtems_rbheap_control *control, void *ptr)
{
ffc09878: 94 21 ff c0 stwu r1,-64(r1)
ffc0987c: 7c 08 02 a6 mflr r0
ffc09880: bf 61 00 2c stmw r27,44(r1)
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (ptr != NULL) {
ffc09884: 7c 9f 23 79 mr. r31,r4
_RBTree_Extract_unprotected(chunk_tree, &b->tree_node);
}
}
rtems_status_code rtems_rbheap_free(rtems_rbheap_control *control, void *ptr)
{
ffc09888: 90 01 00 44 stw r0,68(r1)
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (ptr != NULL) {
ffc0988c: 41 82 01 0c beq- ffc09998 <rtems_rbheap_free+0x120>
ffc09890: 7c 7d 1b 78 mr r29,r3
rtems_chain_control *free_chain = &control->free_chunk_chain;
rtems_rbtree_control *chunk_tree = &control->chunk_tree;
ffc09894: 3b 83 00 18 addi r28,r3,24
#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 };
ffc09898: 38 80 00 00 li r4,0
ffc0989c: 38 61 00 08 addi r3,r1,8
ffc098a0: 38 a0 00 20 li r5,32
ffc098a4: 48 00 88 f9 bl ffc1219c <memset>
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
RBTree_Node* iter_node = the_rbtree->root;
RBTree_Node* found = NULL;
ffc098a8: 3b c0 00 00 li r30,0
ffc098ac: 93 e1 00 20 stw r31,32(r1)
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Find_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
RBTree_Node* iter_node = the_rbtree->root;
ffc098b0: 83 fd 00 1c lwz r31,28(r29)
ffc098b4: 48 00 00 44 b ffc098f8 <rtems_rbheap_free+0x80>
RBTree_Node* found = NULL;
int compare_result;
while (iter_node) {
compare_result = the_rbtree->compare_function(the_node, iter_node);
ffc098b8: 81 3c 00 10 lwz r9,16(r28)
ffc098bc: 38 61 00 10 addi r3,r1,16
ffc098c0: 7f e4 fb 78 mr r4,r31
ffc098c4: 7d 29 03 a6 mtctr r9
ffc098c8: 4e 80 04 21 bctrl
if ( _RBTree_Is_equal( compare_result ) ) {
ffc098cc: 2c 03 00 00 cmpwi r3,0
ffc098d0: 40 82 00 14 bne- ffc098e4 <rtems_rbheap_free+0x6c>
found = iter_node;
if ( the_rbtree->is_unique )
ffc098d4: 89 5c 00 14 lbz r10,20(r28)
ffc098d8: 2f 8a 00 00 cmpwi cr7,r10,0
ffc098dc: 40 9e 00 28 bne- cr7,ffc09904 <rtems_rbheap_free+0x8c> <== ALWAYS TAKEN
ffc098e0: 7f fe fb 78 mr r30,r31 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE bool _RBTree_Is_greater(
int compare_result
)
{
return compare_result > 0;
ffc098e4: 7c 6a fe 70 srawi r10,r3,31
ffc098e8: 7d 23 50 50 subf r9,r3,r10
break;
}
RBTree_Direction dir =
(RBTree_Direction) _RBTree_Is_greater( compare_result );
iter_node = iter_node->child[dir];
ffc098ec: 55 29 1f 7a rlwinm r9,r9,3,29,29
ffc098f0: 7f ff 4a 14 add r31,r31,r9
ffc098f4: 83 ff 00 04 lwz r31,4(r31)
)
{
RBTree_Node* iter_node = the_rbtree->root;
RBTree_Node* found = NULL;
int compare_result;
while (iter_node) {
ffc098f8: 2f 9f 00 00 cmpwi cr7,r31,0
ffc098fc: 40 9e ff bc bne+ cr7,ffc098b8 <rtems_rbheap_free+0x40>
ffc09900: 7f df f3 78 mr r31,r30
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) {
ffc09904: 2f 9f 00 00 cmpwi cr7,r31,0
check_and_merge(free_chain, chunk_tree, chunk, pred);
} else {
sc = RTEMS_INCORRECT_STATE;
}
} else {
sc = RTEMS_INVALID_ID;
ffc09908: 38 60 00 04 li r3,4
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) {
ffc0990c: 3b df ff f8 addi r30,r31,-8
ffc09910: 41 9e 00 8c beq- cr7,ffc0999c <rtems_rbheap_free+0x124>
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_node_off_chain(
const Chain_Node *node
)
{
return (node->next == NULL) && (node->previous == NULL);
ffc09914: 81 5f ff f8 lwz r10,-8(r31)
ffc09918: 39 20 00 00 li r9,0
ffc0991c: 2f 8a 00 00 cmpwi cr7,r10,0
ffc09920: 40 be 00 10 bne+ cr7,ffc09930 <rtems_rbheap_free+0xb8>
ffc09924: 81 3e 00 04 lwz r9,4(r30)
ffc09928: 7d 29 00 34 cntlzw r9,r9
ffc0992c: 55 29 d9 7e rlwinm r9,r9,27,5,31
if (!rtems_rbheap_is_chunk_free(chunk)) {
ffc09930: 2f 89 00 00 cmpwi cr7,r9,0
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;
ffc09934: 38 60 00 0e li r3,14
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)) {
ffc09938: 41 be 00 64 beq+ cr7,ffc0999c <rtems_rbheap_free+0x124>
static rtems_rbheap_chunk *get_next(
const rtems_rbheap_chunk *chunk,
RBTree_Direction dir
)
{
return rtems_rbheap_chunk_of_node(
ffc0993c: 3b fe 00 08 addi r31,r30,8
ffc09940: 38 80 00 00 li r4,0
ffc09944: 7f e3 fb 78 mr r3,r31
ffc09948: 48 00 1c 9d bl ffc0b5e4 <_RBTree_Next_unprotected>
ffc0994c: 38 80 00 01 li r4,1
ffc09950: 7c 7b 1b 78 mr r27,r3
ffc09954: 7f e3 fb 78 mr r3,r31
ffc09958: 48 00 1c 8d bl ffc0b5e4 <_RBTree_Next_unprotected>
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);
ffc0995c: 7f 84 e3 78 mr r4,r28
static rtems_rbheap_chunk *get_next(
const rtems_rbheap_chunk *chunk,
RBTree_Direction dir
)
{
return rtems_rbheap_chunk_of_node(
ffc09960: 38 c3 ff f8 addi r6,r3,-8
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);
ffc09964: 7f c5 f3 78 mr r5,r30
ffc09968: 7f a3 eb 78 mr r3,r29
ffc0996c: 4b ff fb d1 bl ffc0953c <check_and_merge>
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
ffc09970: 81 3d 00 00 lwz r9,0(r29)
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
ffc09974: 93 be 00 04 stw r29,4(r30)
add_to_chain(free_chain, chunk);
check_and_merge(free_chain, chunk_tree, chunk, pred);
ffc09978: 7f a3 eb 78 mr r3,r29
ffc0997c: 7f 84 e3 78 mr r4,r28
before_node = after_node->next;
after_node->next = the_node;
ffc09980: 93 dd 00 00 stw r30,0(r29)
ffc09984: 7f c5 f3 78 mr r5,r30
ffc09988: 38 db ff f8 addi r6,r27,-8
the_node->next = before_node;
ffc0998c: 91 3e 00 00 stw r9,0(r30)
before_node->previous = the_node;
ffc09990: 93 c9 00 04 stw r30,4(r9)
ffc09994: 4b ff fb a9 bl ffc0953c <check_and_merge>
}
}
rtems_status_code rtems_rbheap_free(rtems_rbheap_control *control, void *ptr)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
ffc09998: 38 60 00 00 li r3,0
sc = RTEMS_INVALID_ID;
}
}
return sc;
}
ffc0999c: 39 61 00 40 addi r11,r1,64
ffc099a0: 4b ff 73 c8 b ffc00d68 <_restgpr_27_x>
ffc09638 <rtems_rbheap_initialize>:
void *handler_arg
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (alignment > 0) {
ffc09638: 7c ca 33 79 mr. r10,r6
ffc0963c: 41 a2 01 04 beq+ ffc09740 <rtems_rbheap_initialize+0x108>
uintptr_t area_size,
uintptr_t alignment,
rtems_rbheap_extend_descriptors extend_descriptors,
void *handler_arg
)
{
ffc09640: 94 21 ff e8 stwu r1,-24(r1)
ffc09644: 7c 08 02 a6 mflr r0
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (alignment > 0) {
uintptr_t begin = (uintptr_t) area_begin;
uintptr_t end = begin + area_size;
ffc09648: 7c a5 22 14 add r5,r5,r4
uintptr_t area_size,
uintptr_t alignment,
rtems_rbheap_extend_descriptors extend_descriptors,
void *handler_arg
)
{
ffc0964c: bf a1 00 0c stmw r29,12(r1)
#include <stdlib.h>
static uintptr_t align_up(uintptr_t alignment, uintptr_t value)
{
uintptr_t excess = value % alignment;
ffc09650: 7f c4 53 96 divwu r30,r4,r10
uintptr_t area_size,
uintptr_t alignment,
rtems_rbheap_extend_descriptors extend_descriptors,
void *handler_arg
)
{
ffc09654: 90 01 00 1c stw r0,28(r1)
#include <stdlib.h>
static uintptr_t align_up(uintptr_t alignment, uintptr_t value)
{
uintptr_t excess = value % alignment;
ffc09658: 7f de 51 d6 mullw r30,r30,r10
ffc0965c: 7c 7f 1b 78 mr r31,r3
if (excess > 0) {
ffc09660: 7d 3e 20 51 subf. r9,r30,r4
ffc09664: 41 82 00 e8 beq- ffc0974c <rtems_rbheap_initialize+0x114>
uintptr_t begin = (uintptr_t) area_begin;
uintptr_t end = begin + area_size;
uintptr_t aligned_begin = align_up(alignment, begin);
uintptr_t aligned_end = align_down(alignment, end);
if (begin < end && begin <= aligned_begin && aligned_begin < aligned_end) {
ffc09668: 7f 84 28 40 cmplw cr7,r4,r5
static uintptr_t align_up(uintptr_t alignment, uintptr_t value)
{
uintptr_t excess = value % alignment;
if (excess > 0) {
value += alignment - excess;
ffc0966c: 7f ca 22 14 add r30,r10,r4
ffc09670: 7f c9 f0 50 subf r30,r9,r30
insert_into_tree(chunk_tree, first);
} else {
sc = RTEMS_NO_MEMORY;
}
} else {
sc = RTEMS_INVALID_ADDRESS;
ffc09674: 39 20 00 09 li r9,9
uintptr_t begin = (uintptr_t) area_begin;
uintptr_t end = begin + area_size;
uintptr_t aligned_begin = align_up(alignment, begin);
uintptr_t aligned_end = align_down(alignment, end);
if (begin < end && begin <= aligned_begin && aligned_begin < aligned_end) {
ffc09678: 40 bc 00 e0 bge+ cr7,ffc09758 <rtems_rbheap_initialize+0x120>
ffc0967c: 7f 84 f0 40 cmplw cr7,r4,r30
ffc09680: 41 bd 00 d8 bgt+ cr7,ffc09758 <rtems_rbheap_initialize+0x120><== NEVER TAKEN
ffc09684: 48 00 00 08 b ffc0968c <rtems_rbheap_initialize+0x54>
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (alignment > 0) {
uintptr_t begin = (uintptr_t) area_begin;
ffc09688: 7c 9e 23 78 mr r30,r4
return value;
}
static uintptr_t align_down(uintptr_t alignment, uintptr_t value)
{
uintptr_t excess = value % alignment;
ffc0968c: 7c a5 53 96 divwu r5,r5,r10
return value - excess;
ffc09690: 7f a5 51 d6 mullw r29,r5,r10
insert_into_tree(chunk_tree, first);
} else {
sc = RTEMS_NO_MEMORY;
}
} else {
sc = RTEMS_INVALID_ADDRESS;
ffc09694: 39 20 00 09 li r9,9
uintptr_t begin = (uintptr_t) area_begin;
uintptr_t end = begin + area_size;
uintptr_t aligned_begin = align_up(alignment, begin);
uintptr_t aligned_end = align_down(alignment, end);
if (begin < end && begin <= aligned_begin && aligned_begin < aligned_end) {
ffc09698: 7f 9e e8 40 cmplw cr7,r30,r29
ffc0969c: 40 bc 00 bc bge+ cr7,ffc09758 <rtems_rbheap_initialize+0x120>
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 );
ffc096a0: 39 3f 00 04 addi r9,r31,4
head->next = tail;
head->previous = NULL;
tail->previous = head;
ffc096a4: 93 ff 00 08 stw r31,8(r31)
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 );
ffc096a8: 38 df 00 0c addi r6,r31,12
head->next = tail;
ffc096ac: 91 3f 00 00 stw r9,0(r31)
head->previous = NULL;
ffc096b0: 39 20 00 00 li r9,0
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 );
ffc096b4: 38 bf 00 10 addi r5,r31,16
head->next = tail;
head->previous = NULL;
ffc096b8: 91 3f 00 04 stw r9,4(r31)
rtems_rbtree_initialize_empty(chunk_tree, chunk_compare, true);
control->alignment = alignment;
control->handler_arg = handler_arg;
control->extend_descriptors = extend_descriptors;
first = get_chunk(control);
ffc096bc: 7f e3 fb 78 mr r3,r31
ffc096c0: 91 3f 00 10 stw r9,16(r31)
RBTree_Control *the_rbtree,
RBTree_Compare_function compare_function,
bool is_unique
)
{
the_rbtree->permanent_null = NULL;
ffc096c4: 91 3f 00 18 stw r9,24(r31)
the_rbtree->root = NULL;
ffc096c8: 91 3f 00 1c stw r9,28(r31)
the_rbtree->first[0] = NULL;
ffc096cc: 91 3f 00 20 stw r9,32(r31)
the_rbtree->first[1] = NULL;
ffc096d0: 91 3f 00 24 stw r9,36(r31)
the_rbtree->compare_function = compare_function;
ffc096d4: 3d 20 ff c1 lis r9,-63
ffc096d8: 39 29 95 2c addi r9,r9,-27348
ffc096dc: 91 3f 00 28 stw r9,40(r31)
the_rbtree->is_unique = is_unique;
ffc096e0: 39 20 00 01 li r9,1
ffc096e4: 99 3f 00 2c stb r9,44(r31)
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
ffc096e8: 90 bf 00 0c stw r5,12(r31)
head->previous = NULL;
tail->previous = head;
ffc096ec: 90 df 00 14 stw r6,20(r31)
rtems_rbheap_chunk *first = NULL;
rtems_chain_initialize_empty(free_chain);
rtems_chain_initialize_empty(&control->spare_descriptor_chain);
rtems_rbtree_initialize_empty(chunk_tree, chunk_compare, true);
control->alignment = alignment;
ffc096f0: 91 5f 00 30 stw r10,48(r31)
control->handler_arg = handler_arg;
ffc096f4: 91 1f 00 38 stw r8,56(r31)
control->extend_descriptors = extend_descriptors;
ffc096f8: 90 ff 00 34 stw r7,52(r31)
first = get_chunk(control);
ffc096fc: 4b ff fe c9 bl ffc095c4 <get_chunk>
first->begin = aligned_begin;
first->size = aligned_end - aligned_begin;
add_to_chain(free_chain, first);
insert_into_tree(chunk_tree, first);
} else {
sc = RTEMS_NO_MEMORY;
ffc09700: 39 20 00 1a li r9,26
control->alignment = alignment;
control->handler_arg = handler_arg;
control->extend_descriptors = extend_descriptors;
first = get_chunk(control);
if (first != NULL) {
ffc09704: 7c 64 1b 79 mr. r4,r3
ffc09708: 41 82 00 50 beq- ffc09758 <rtems_rbheap_initialize+0x120>
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
ffc0970c: 81 3f 00 00 lwz r9,0(r31)
static void insert_into_tree(
rtems_rbtree_control *tree,
rtems_rbheap_chunk *chunk
)
{
_RBTree_Insert_unprotected(tree, &chunk->tree_node);
ffc09710: 38 7f 00 18 addi r3,r31,24
control->handler_arg = handler_arg;
control->extend_descriptors = extend_descriptors;
first = get_chunk(control);
if (first != NULL) {
first->begin = aligned_begin;
ffc09714: 93 c4 00 18 stw r30,24(r4)
first->size = aligned_end - aligned_begin;
ffc09718: 7f de e8 50 subf r30,r30,r29
ffc0971c: 93 c4 00 1c stw r30,28(r4)
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
ffc09720: 93 e4 00 04 stw r31,4(r4)
before_node = after_node->next;
after_node->next = the_node;
ffc09724: 90 9f 00 00 stw r4,0(r31)
the_node->next = before_node;
before_node->previous = the_node;
ffc09728: 90 89 00 04 stw r4,4(r9)
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
after_node->next = the_node;
the_node->next = before_node;
ffc0972c: 91 24 00 00 stw r9,0(r4)
static void insert_into_tree(
rtems_rbtree_control *tree,
rtems_rbheap_chunk *chunk
)
{
_RBTree_Insert_unprotected(tree, &chunk->tree_node);
ffc09730: 38 84 00 08 addi r4,r4,8
ffc09734: 48 00 1b f5 bl ffc0b328 <_RBTree_Insert_unprotected>
uintptr_t alignment,
rtems_rbheap_extend_descriptors extend_descriptors,
void *handler_arg
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
ffc09738: 39 20 00 00 li r9,0
ffc0973c: 48 00 00 1c b ffc09758 <rtems_rbheap_initialize+0x120>
}
} else {
sc = RTEMS_INVALID_ADDRESS;
}
} else {
sc = RTEMS_INVALID_NUMBER;
ffc09740: 39 20 00 0a li r9,10
}
return sc;
}
ffc09744: 7d 23 4b 78 mr r3,r9
ffc09748: 4e 80 00 20 blr
uintptr_t begin = (uintptr_t) area_begin;
uintptr_t end = begin + area_size;
uintptr_t aligned_begin = align_up(alignment, begin);
uintptr_t aligned_end = align_down(alignment, end);
if (begin < end && begin <= aligned_begin && aligned_begin < aligned_end) {
ffc0974c: 7f 84 28 40 cmplw cr7,r4,r5
ffc09750: 41 bc ff 38 blt- cr7,ffc09688 <rtems_rbheap_initialize+0x50>
insert_into_tree(chunk_tree, first);
} else {
sc = RTEMS_NO_MEMORY;
}
} else {
sc = RTEMS_INVALID_ADDRESS;
ffc09754: 39 20 00 09 li r9,9
} else {
sc = RTEMS_INVALID_NUMBER;
}
return sc;
}
ffc09758: 39 61 00 18 addi r11,r1,24
ffc0975c: 7d 23 4b 78 mr r3,r9
ffc09760: 4b ff 76 10 b ffc00d70 <_restgpr_29_x>
ffc1b260 <rtems_rfs_bitmap_create_search>:
int
rtems_rfs_bitmap_create_search (rtems_rfs_bitmap_control* control)
{
ffc1b260: 94 21 ff c8 stwu r1,-56(r1)
ffc1b264: 7c 08 02 a6 mflr r0
rtems_rfs_bitmap_map map;
size_t size;
rtems_rfs_bitmap_bit bit;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
ffc1b268: 38 81 00 08 addi r4,r1,8
return 0;
}
int
rtems_rfs_bitmap_create_search (rtems_rfs_bitmap_control* control)
{
ffc1b26c: bf 21 00 1c stmw r25,28(r1)
ffc1b270: 7c 7e 1b 78 mr r30,r3
ffc1b274: 90 01 00 3c stw r0,60(r1)
rtems_rfs_bitmap_map map;
size_t size;
rtems_rfs_bitmap_bit bit;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
ffc1b278: 4b ff f9 29 bl ffc1aba0 <rtems_rfs_bitmap_load_map>
if (rc > 0)
ffc1b27c: 2c 03 00 00 cmpwi r3,0
ffc1b280: 41 a1 00 d4 bgt+ ffc1b354 <rtems_rfs_bitmap_create_search+0xf4>
return rc;
control->free = 0;
ffc1b284: 39 20 00 00 li r9,0
search_map = control->search_bits;
ffc1b288: 83 be 00 14 lwz r29,20(r30)
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
control->free = 0;
ffc1b28c: 91 3e 00 10 stw r9,16(r30)
search_map = control->search_bits;
size = control->size;
bit = 0;
*search_map = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
ffc1b290: 39 20 ff ff li r9,-1
return rc;
control->free = 0;
search_map = control->search_bits;
size = control->size;
bit = 0;
ffc1b294: 3b 80 00 00 li r28,0
if (rc > 0)
return rc;
control->free = 0;
search_map = control->search_bits;
size = control->size;
ffc1b298: 83 fe 00 0c lwz r31,12(r30)
*/
static bool
rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_bit bit)
{
return RTEMS_RFS_BITMAP_TEST_BIT (target, bit);
ffc1b29c: 3b 40 00 01 li r26,1
control->free = 0;
search_map = control->search_bits;
size = control->size;
bit = 0;
*search_map = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
ffc1b2a0: 91 3d 00 00 stw r9,0(r29)
if (bit == rtems_rfs_bitmap_element_bits ())
{
bit = 0;
search_map++;
*search_map = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
ffc1b2a4: 3b 20 ff ff li r25,-1
ffc1b2a8: 83 61 00 08 lwz r27,8(r1)
search_map = control->search_bits;
size = control->size;
bit = 0;
*search_map = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
while (size)
ffc1b2ac: 48 00 00 9c b ffc1b348 <rtems_rfs_bitmap_create_search+0xe8>
{
rtems_rfs_bitmap_element bits;
int available;
if (size < rtems_rfs_bitmap_element_bits ())
ffc1b2b0: 2b 9f 00 1f cmplwi cr7,r31,31
ffc1b2b4: 41 9d 00 20 bgt- cr7,ffc1b2d4 <rtems_rfs_bitmap_create_search+0x74>
{
bits = rtems_rfs_bitmap_merge (*map,
ffc1b2b8: 38 60 00 00 li r3,0
ffc1b2bc: 7f e4 fb 78 mr r4,r31
ffc1b2c0: 4b ff fb 61 bl ffc1ae20 <rtems_rfs_bitmap_mask_section>
{
/*
* Use the normal bit operators because we do not change the bits just merge
* the 2 separate parts.
*/
bits1 &= mask;
ffc1b2c4: 81 3b 00 00 lwz r9,0(r27)
ffc1b2c8: 7c 63 48 38 and r3,r3,r9
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;
ffc1b2cc: 7f e9 fb 78 mr r9,r31
ffc1b2d0: 48 00 00 0c b ffc1b2dc <rtems_rfs_bitmap_create_search+0x7c>
}
else
{
bits = *map;
ffc1b2d4: 80 7b 00 00 lwz r3,0(r27)
available = rtems_rfs_bitmap_element_bits ();
ffc1b2d8: 39 20 00 20 li r9,32
}
if (rtems_rfs_bitmap_match (bits, RTEMS_RFS_BITMAP_ELEMENT_SET))
ffc1b2dc: 2f 83 00 00 cmpwi cr7,r3,0
ffc1b2e0: 40 9e 00 14 bne- cr7,ffc1b2f4 <rtems_rfs_bitmap_create_search+0x94>
control->free++;
}
size -= available;
if (bit == rtems_rfs_bitmap_element_bits ())
ffc1b2e4: 2f 9c 00 20 cmpwi cr7,r28,32
for (b = 0; b < available; b++)
if (!rtems_rfs_bitmap_test (bits, b))
control->free++;
}
size -= available;
ffc1b2e8: 7f e9 f8 50 subf r31,r9,r31
if (bit == rtems_rfs_bitmap_element_bits ())
ffc1b2ec: 40 be 00 54 bne+ cr7,ffc1b340 <rtems_rfs_bitmap_create_search+0xe0>
ffc1b2f0: 48 00 00 40 b ffc1b330 <rtems_rfs_bitmap_create_search+0xd0>
ffc1b2f4: 2f 89 00 00 cmpwi cr7,r9,0
{
bits = *map;
available = rtems_rfs_bitmap_element_bits ();
}
if (rtems_rfs_bitmap_match (bits, RTEMS_RFS_BITMAP_ELEMENT_SET))
ffc1b2f8: 39 00 00 00 li r8,0
*/
static bool
rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_bit bit)
{
return RTEMS_RFS_BITMAP_TEST_BIT (target, bit);
ffc1b2fc: 7d 2a 4b 78 mr r10,r9
ffc1b300: 41 bd 00 08 bgt+ cr7,ffc1b308 <rtems_rfs_bitmap_create_search+0xa8><== ALWAYS TAKEN
ffc1b304: 39 40 00 01 li r10,1 <== NOT EXECUTED
ffc1b308: 7f 47 40 30 slw r7,r26,r8
rtems_rfs_bitmap_set (*search_map, bit);
else
{
int b;
for (b = 0; b < available; b++)
if (!rtems_rfs_bitmap_test (bits, b))
ffc1b30c: 7c e6 18 39 and. r6,r7,r3
ffc1b310: 41 82 00 10 beq- ffc1b320 <rtems_rfs_bitmap_create_search+0xc0>
control->free++;
ffc1b314: 80 fe 00 10 lwz r7,16(r30)
ffc1b318: 38 e7 00 01 addi r7,r7,1
ffc1b31c: 90 fe 00 10 stw r7,16(r30)
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++)
ffc1b320: 35 4a ff ff addic. r10,r10,-1
ffc1b324: 39 08 00 01 addi r8,r8,1
ffc1b328: 40 82 ff e0 bne+ ffc1b308 <rtems_rfs_bitmap_create_search+0xa8>
ffc1b32c: 4b ff ff b8 b ffc1b2e4 <rtems_rfs_bitmap_create_search+0x84>
if (bit == rtems_rfs_bitmap_element_bits ())
{
bit = 0;
search_map++;
*search_map = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
ffc1b330: 93 3d 00 04 stw r25,4(r29)
size -= available;
if (bit == rtems_rfs_bitmap_element_bits ())
{
bit = 0;
ffc1b334: 3b 80 00 00 li r28,0
search_map++;
ffc1b338: 3b bd 00 04 addi r29,r29,4
ffc1b33c: 48 00 00 08 b ffc1b344 <rtems_rfs_bitmap_create_search+0xe4>
*search_map = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
}
else
bit++;
ffc1b340: 3b 9c 00 01 addi r28,r28,1
ffc1b344: 3b 7b 00 04 addi r27,r27,4
search_map = control->search_bits;
size = control->size;
bit = 0;
*search_map = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
while (size)
ffc1b348: 2f 9f 00 00 cmpwi cr7,r31,0
ffc1b34c: 40 9e ff 64 bne+ cr7,ffc1b2b0 <rtems_rfs_bitmap_create_search+0x50>
else
bit++;
map++;
}
return 0;
ffc1b350: 38 60 00 00 li r3,0
}
ffc1b354: 39 61 00 38 addi r11,r1,56
ffc1b358: 4b fe 61 fc b ffc01554 <_restgpr_25_x>
ffc1aba0 <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)
{
ffc1aba0: 94 21 ff f0 stwu r1,-16(r1)
ffc1aba4: 7c 08 02 a6 mflr r0
ffc1aba8: 90 01 00 14 stw r0,20(r1)
int rc;
if (!control->buffer)
ffc1abac: 81 23 00 00 lwz r9,0(r3)
* @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)
{
ffc1abb0: bf c1 00 08 stmw r30,8(r1)
ffc1abb4: 7c 7f 1b 78 mr r31,r3
int rc;
if (!control->buffer)
ffc1abb8: 2f 89 00 00 cmpwi cr7,r9,0
return ENXIO;
ffc1abbc: 38 60 00 06 li r3,6
rtems_rfs_bitmap_load_map (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_map* map)
{
int rc;
if (!control->buffer)
ffc1abc0: 41 9e 00 40 beq- cr7,ffc1ac00 <rtems_rfs_bitmap_load_map+0x60>
return ENXIO;
*map = NULL;
ffc1abc4: 39 20 00 00 li r9,0
rc = rtems_rfs_buffer_handle_request (control->fs,
ffc1abc8: 80 bf 00 08 lwz r5,8(r31)
int rc;
if (!control->buffer)
return ENXIO;
*map = NULL;
ffc1abcc: 91 24 00 00 stw r9,0(r4)
ffc1abd0: 7c 9e 23 78 mr r30,r4
rc = rtems_rfs_buffer_handle_request (control->fs,
ffc1abd4: 38 c0 00 01 li r6,1
ffc1abd8: 80 7f 00 04 lwz r3,4(r31)
ffc1abdc: 80 9f 00 00 lwz r4,0(r31)
ffc1abe0: 48 00 1c 5d bl ffc1c83c <rtems_rfs_buffer_handle_request>
control->buffer,
control->block,
true);
if (rc)
ffc1abe4: 2c 03 00 00 cmpwi r3,0
ffc1abe8: 40 82 00 18 bne- ffc1ac00 <rtems_rfs_bitmap_load_map+0x60><== NEVER TAKEN
return rc;
*map = rtems_rfs_buffer_data (control->buffer);
ffc1abec: 81 3f 00 00 lwz r9,0(r31)
ffc1abf0: 81 29 00 08 lwz r9,8(r9)
ffc1abf4: 81 29 00 1c lwz r9,28(r9)
ffc1abf8: 91 3e 00 00 stw r9,0(r30)
ffc1abfc: 48 00 00 04 b ffc1ac00 <rtems_rfs_bitmap_load_map+0x60>
return 0;
}
ffc1ac00: 39 61 00 10 addi r11,r1,16
ffc1ac04: 4b fe 69 64 b ffc01568 <_restgpr_30_x>
ffc1b164 <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)
{
ffc1b164: 94 21 ff e0 stwu r1,-32(r1)
ffc1b168: 7c 08 02 a6 mflr r0
int rc = 0;
/*
* By default we assume the allocation failed.
*/
*allocated = false;
ffc1b16c: 39 20 00 00 li r9,0
int
rtems_rfs_bitmap_map_alloc (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_bit seed,
bool* allocated,
rtems_rfs_bitmap_bit* bit)
{
ffc1b170: bf 61 00 0c stmw r27,12(r1)
ffc1b174: 7c 7d 1b 78 mr r29,r3
ffc1b178: 7c bc 2b 78 mr r28,r5
ffc1b17c: 90 01 00 24 stw r0,36(r1)
ffc1b180: 7c db 33 78 mr r27,r6
* 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;
ffc1b184: 7c 9f 23 78 mr r31,r4
int rc = 0;
/*
* By default we assume the allocation failed.
*/
*allocated = false;
ffc1b188: 99 25 00 00 stb r9,0(r5)
* 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;
ffc1b18c: 7c 9e 23 78 mr r30,r4
* 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))
ffc1b190: 48 00 00 9c b ffc1b22c <rtems_rfs_bitmap_map_alloc+0xc8>
|| ((lower_seed >= 0) && (lower_seed < control->size)))
{
/*
* Search up first so bits allocated in succession are grouped together.
*/
if (upper_seed < control->size)
ffc1b194: 81 3d 00 0c lwz r9,12(r29)
ffc1b198: 7f 9e 48 40 cmplw cr7,r30,r9
ffc1b19c: 41 9c 00 10 blt- cr7,ffc1b1ac <rtems_rfs_bitmap_map_alloc+0x48>
window, 1);
if ((rc > 0) || *allocated)
break;
}
if (lower_seed >= 0)
ffc1b1a0: 2f 9f 00 00 cmpwi cr7,r31,0
ffc1b1a4: 40 9c 00 48 bge- cr7,ffc1b1ec <rtems_rfs_bitmap_map_alloc+0x88>
ffc1b1a8: 48 00 00 34 b ffc1b1dc <rtems_rfs_bitmap_map_alloc+0x78>
/*
* Search up first so bits allocated in succession are grouped together.
*/
if (upper_seed < control->size)
{
*bit = upper_seed;
ffc1b1ac: 93 db 00 00 stw r30,0(r27)
rc = rtems_rfs_search_map_for_clear_bit (control, bit, allocated,
ffc1b1b0: 7f a3 eb 78 mr r3,r29
ffc1b1b4: 7f 64 db 78 mr r4,r27
ffc1b1b8: 7f 85 e3 78 mr r5,r28
ffc1b1bc: 38 c0 00 01 li r6,1
ffc1b1c0: 4b ff fa 49 bl ffc1ac08 <rtems_rfs_search_map_for_clear_bit.constprop.1>
window, 1);
if ((rc > 0) || *allocated)
ffc1b1c4: 2f 83 00 00 cmpwi cr7,r3,0
ffc1b1c8: 41 9d 00 8c bgt- cr7,ffc1b254 <rtems_rfs_bitmap_map_alloc+0xf0><== NEVER TAKEN
ffc1b1cc: 89 3c 00 00 lbz r9,0(r28)
ffc1b1d0: 2f 89 00 00 cmpwi cr7,r9,0
ffc1b1d4: 41 9e ff cc beq+ cr7,ffc1b1a0 <rtems_rfs_bitmap_map_alloc+0x3c>
ffc1b1d8: 48 00 00 7c b ffc1b254 <rtems_rfs_bitmap_map_alloc+0xf0>
/*
* 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)
ffc1b1dc: 81 3d 00 0c lwz r9,12(r29)
ffc1b1e0: 7f 9e 48 40 cmplw cr7,r30,r9
ffc1b1e4: 41 9c 00 38 blt- cr7,ffc1b21c <rtems_rfs_bitmap_map_alloc+0xb8><== ALWAYS TAKEN
ffc1b1e8: 48 00 00 38 b ffc1b220 <rtems_rfs_bitmap_map_alloc+0xbc><== NOT EXECUTED
break;
}
if (lower_seed >= 0)
{
*bit = lower_seed;
ffc1b1ec: 93 fb 00 00 stw r31,0(r27)
rc = rtems_rfs_search_map_for_clear_bit (control, bit, allocated,
ffc1b1f0: 7f a3 eb 78 mr r3,r29
ffc1b1f4: 7f 64 db 78 mr r4,r27
ffc1b1f8: 7f 85 e3 78 mr r5,r28
ffc1b1fc: 38 c0 ff ff li r6,-1
ffc1b200: 4b ff fa 09 bl ffc1ac08 <rtems_rfs_search_map_for_clear_bit.constprop.1>
window, -1);
if ((rc > 0) || *allocated)
ffc1b204: 2f 83 00 00 cmpwi cr7,r3,0
ffc1b208: 41 9d 00 4c bgt- cr7,ffc1b254 <rtems_rfs_bitmap_map_alloc+0xf0><== NEVER TAKEN
ffc1b20c: 89 3c 00 00 lbz r9,0(r28)
ffc1b210: 2f 89 00 00 cmpwi cr7,r9,0
ffc1b214: 41 9e ff c8 beq+ cr7,ffc1b1dc <rtems_rfs_bitmap_map_alloc+0x78>
ffc1b218: 48 00 00 3c b ffc1b254 <rtems_rfs_bitmap_map_alloc+0xf0>
/*
* 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;
ffc1b21c: 3b de 08 00 addi r30,r30,2048
if (lower_seed >= 0)
ffc1b220: 2f 9f 00 00 cmpwi cr7,r31,0
ffc1b224: 41 9c 00 08 blt- cr7,ffc1b22c <rtems_rfs_bitmap_map_alloc+0xc8>
lower_seed -= window;
ffc1b228: 3b ff f8 00 addi r31,r31,-2048
* 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))
ffc1b22c: 2f 9e 00 00 cmpwi cr7,r30,0
ffc1b230: 41 9c 00 10 blt- cr7,ffc1b240 <rtems_rfs_bitmap_map_alloc+0xdc><== NEVER TAKEN
ffc1b234: 81 3d 00 0c lwz r9,12(r29)
ffc1b238: 7f 9e 48 40 cmplw cr7,r30,r9
ffc1b23c: 41 bc ff 58 blt- cr7,ffc1b194 <rtems_rfs_bitmap_map_alloc+0x30>
|| ((lower_seed >= 0) && (lower_seed < control->size)))
ffc1b240: 2f 9f 00 00 cmpwi cr7,r31,0
ffc1b244: 41 9c 00 10 blt- cr7,ffc1b254 <rtems_rfs_bitmap_map_alloc+0xf0>
ffc1b248: 81 3d 00 0c lwz r9,12(r29)
ffc1b24c: 7f 9f 48 40 cmplw cr7,r31,r9
ffc1b250: 41 9c ff 44 blt+ cr7,ffc1b194 <rtems_rfs_bitmap_map_alloc+0x30>
if (lower_seed >= 0)
lower_seed -= window;
}
return 0;
}
ffc1b254: 39 61 00 20 addi r11,r1,32
ffc1b258: 38 60 00 00 li r3,0
ffc1b25c: 4b fe 63 00 b ffc0155c <_restgpr_27_x>
ffc1aeec <rtems_rfs_bitmap_map_clear>:
int
rtems_rfs_bitmap_map_clear (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_bit bit)
{
ffc1aeec: 94 21 ff e0 stwu r1,-32(r1)
ffc1aef0: 7c 08 02 a6 mflr r0
ffc1aef4: bf c1 00 18 stmw r30,24(r1)
ffc1aef8: 7c 9e 23 78 mr r30,r4
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);
ffc1aefc: 38 81 00 08 addi r4,r1,8
}
int
rtems_rfs_bitmap_map_clear (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_bit bit)
{
ffc1af00: 90 01 00 24 stw r0,36(r1)
ffc1af04: 7c 7f 1b 78 mr r31,r3
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);
ffc1af08: 4b ff fc 99 bl ffc1aba0 <rtems_rfs_bitmap_load_map>
if (rc > 0)
ffc1af0c: 2c 03 00 00 cmpwi r3,0
ffc1af10: 41 a1 00 70 bgt+ ffc1af80 <rtems_rfs_bitmap_map_clear+0x94>
return rc;
if (bit >= control->size)
ffc1af14: 81 3f 00 0c lwz r9,12(r31)
return EINVAL;
ffc1af18: 38 60 00 16 li r3,22
int offset;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
if (bit >= control->size)
ffc1af1c: 7f 9e 48 40 cmplw cr7,r30,r9
ffc1af20: 40 bc 00 60 bge+ cr7,ffc1af80 <rtems_rfs_bitmap_map_clear+0x94><== NEVER TAKEN
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_clear (map[index], 1 << offset);
ffc1af24: 80 c1 00 08 lwz r6,8(r1)
if (rc > 0)
return rc;
if (bit >= control->size)
return EINVAL;
search_map = control->search_bits;
index = rtems_rfs_bitmap_map_index (bit);
ffc1af28: 7f c8 2e 70 srawi r8,r30,5
offset = rtems_rfs_bitmap_map_offset (bit);
map[index] = rtems_rfs_bitmap_clear (map[index], 1 << offset);
ffc1af2c: 55 07 10 3a rlwinm r7,r8,2,0,29
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
if (bit >= control->size)
return EINVAL;
search_map = control->search_bits;
ffc1af30: 81 5f 00 14 lwz r10,20(r31)
*/
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);
ffc1af34: 7c a6 38 2e lwzx r5,r6,r7
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_clear (map[index], 1 << offset);
ffc1af38: 39 20 00 01 li r9,1
return rc;
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);
ffc1af3c: 57 c4 06 fe clrlwi r4,r30,27
map[index] = rtems_rfs_bitmap_clear (map[index], 1 << offset);
ffc1af40: 7d 24 20 30 slw r4,r9,r4
*/
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);
ffc1af44: 7c a5 23 78 or r5,r5,r4
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_clear (map[index], 1 << offset);
ffc1af48: 7c a6 39 2e stwx r5,r6,r7
bit = index;
index = rtems_rfs_bitmap_map_index (bit);
ffc1af4c: 7f de 56 70 srawi r30,r30,10
offset = rtems_rfs_bitmap_map_offset(bit);
search_map[index] = rtems_rfs_bitmap_clear (search_map[index], 1 << offset);
ffc1af50: 57 de 10 3a rlwinm r30,r30,2,0,29
*/
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);
ffc1af54: 7c ea f0 2e lwzx r7,r10,r30
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);
offset = rtems_rfs_bitmap_map_offset(bit);
ffc1af58: 55 08 06 fe clrlwi r8,r8,27
search_map[index] = rtems_rfs_bitmap_clear (search_map[index], 1 << offset);
ffc1af5c: 7d 28 40 30 slw r8,r9,r8
*/
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);
ffc1af60: 7c e7 43 78 or r7,r7,r8
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);
offset = rtems_rfs_bitmap_map_offset(bit);
search_map[index] = rtems_rfs_bitmap_clear (search_map[index], 1 << offset);
ffc1af64: 7c ea f1 2e stwx r7,r10,r30
rtems_rfs_buffer_mark_dirty (control->buffer);
control->free++;
return 0;
ffc1af68: 38 60 00 00 li r3,0
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);
ffc1af6c: 81 5f 00 00 lwz r10,0(r31)
ffc1af70: 99 2a 00 00 stb r9,0(r10)
control->free++;
ffc1af74: 81 3f 00 10 lwz r9,16(r31)
ffc1af78: 39 29 00 01 addi r9,r9,1
ffc1af7c: 91 3f 00 10 stw r9,16(r31)
return 0;
}
ffc1af80: 39 61 00 20 addi r11,r1,32
ffc1af84: 4b fe 65 e4 b ffc01568 <_restgpr_30_x>
ffc1b09c <rtems_rfs_bitmap_map_clear_all>:
int
rtems_rfs_bitmap_map_clear_all (rtems_rfs_bitmap_control* control)
{
ffc1b09c: 7c 2b 0b 78 mr r11,r1
ffc1b0a0: 94 21 ff e0 stwu r1,-32(r1)
ffc1b0a4: 7c 08 02 a6 mflr r0
rtems_rfs_bitmap_bit last_search_bit;
size_t elements;
int e;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
ffc1b0a8: 38 81 00 08 addi r4,r1,8
return 0;
}
int
rtems_rfs_bitmap_map_clear_all (rtems_rfs_bitmap_control* control)
{
ffc1b0ac: 4b fe 64 75 bl ffc01520 <_savegpr_31>
ffc1b0b0: 90 01 00 24 stw r0,36(r1)
ffc1b0b4: 7c 7f 1b 78 mr r31,r3
rtems_rfs_bitmap_bit last_search_bit;
size_t elements;
int e;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
ffc1b0b8: 4b ff fa e9 bl ffc1aba0 <rtems_rfs_bitmap_load_map>
if (rc > 0)
ffc1b0bc: 2c 03 00 00 cmpwi r3,0
ffc1b0c0: 41 a1 00 9c bgt+ ffc1b15c <rtems_rfs_bitmap_map_clear_all+0xc0>
return rc;
elements = rtems_rfs_bitmap_elements (control->size);
ffc1b0c4: 81 1f 00 0c lwz r8,12(r31)
control->free = elements;
for (e = 0; e < elements; e++)
ffc1b0c8: 39 40 00 00 li r10,0
map[e] = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
ffc1b0cc: 80 e1 00 08 lwz r7,8(r1)
ffc1b0d0: 38 c0 ff ff li r6,-1
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
elements = rtems_rfs_bitmap_elements (control->size);
ffc1b0d4: 39 08 ff ff addi r8,r8,-1
ffc1b0d8: 55 08 d9 7e rlwinm r8,r8,27,5,31
ffc1b0dc: 39 28 00 01 addi r9,r8,1
control->free = elements;
for (e = 0; e < elements; e++)
map[e] = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
ffc1b0e0: 38 a9 00 01 addi r5,r9,1
if (rc > 0)
return rc;
elements = rtems_rfs_bitmap_elements (control->size);
control->free = elements;
ffc1b0e4: 91 3f 00 10 stw r9,16(r31)
for (e = 0; e < elements; e++)
map[e] = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
ffc1b0e8: 7c a9 03 a6 mtctr r5
ffc1b0ec: 48 00 00 10 b ffc1b0fc <rtems_rfs_bitmap_map_clear_all+0x60>
return 0;
}
int
rtems_rfs_bitmap_map_clear_all (rtems_rfs_bitmap_control* control)
ffc1b0f0: 55 45 10 3a rlwinm r5,r10,2,0,29
elements = rtems_rfs_bitmap_elements (control->size);
control->free = elements;
for (e = 0; e < elements; e++)
map[e] = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
ffc1b0f4: 7c c7 29 2e stwx r6,r7,r5
elements = rtems_rfs_bitmap_elements (control->size);
control->free = elements;
for (e = 0; e < elements; e++)
ffc1b0f8: 39 4a 00 01 addi r10,r10,1
ffc1b0fc: 42 00 ff f4 bdnz+ ffc1b0f0 <rtems_rfs_bitmap_map_clear_all+0x54>
* 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)
ffc1b100: 71 27 00 1f andi. r7,r9,31
ffc1b104: 40 82 00 08 bne- ffc1b10c <rtems_rfs_bitmap_map_clear_all+0x70>
last_search_bit = rtems_rfs_bitmap_element_bits ();
ffc1b108: 38 e0 00 20 li r7,32
elements = rtems_rfs_bitmap_elements (elements);
ffc1b10c: 55 09 d9 7e rlwinm r9,r8,27,5,31
for (e = 0; e < (elements - 1); e++)
control->search_bits[e] = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
ffc1b110: 39 09 00 01 addi r8,r9,1
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++)
ffc1b114: 39 40 00 00 li r10,0
control->search_bits[e] = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
ffc1b118: 7d 09 03 a6 mtctr r8
ffc1b11c: 38 c0 ff ff li r6,-1
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++)
ffc1b120: 48 00 00 10 b ffc1b130 <rtems_rfs_bitmap_map_clear_all+0x94>
control->search_bits[e] = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
ffc1b124: 55 45 10 3a rlwinm r5,r10,2,0,29 <== NOT EXECUTED
ffc1b128: 7c c8 29 2e stwx r6,r8,r5 <== NOT EXECUTED
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++)
ffc1b12c: 39 4a 00 01 addi r10,r10,1 <== NOT EXECUTED
ffc1b130: 81 1f 00 14 lwz r8,20(r31)
ffc1b134: 42 00 ff f0 bdnz+ ffc1b124 <rtems_rfs_bitmap_map_clear_all+0x88>
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);
ffc1b138: 39 40 ff ff li r10,-1
ffc1b13c: 20 e7 00 20 subfic r7,r7,32
elements = rtems_rfs_bitmap_elements (elements);
for (e = 0; e < (elements - 1); e++)
control->search_bits[e] = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
control->search_bits[elements - 1] =
ffc1b140: 55 29 10 3a rlwinm r9,r9,2,0,29
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);
ffc1b144: 7d 47 3c 30 srw r7,r10,r7
elements = rtems_rfs_bitmap_elements (elements);
for (e = 0; e < (elements - 1); e++)
control->search_bits[e] = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
control->search_bits[elements - 1] =
ffc1b148: 7c e8 49 2e stwx r7,r8,r9
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);
ffc1b14c: 39 40 00 01 li r10,1
return 0;
ffc1b150: 38 60 00 00 li r3,0
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);
ffc1b154: 81 3f 00 00 lwz r9,0(r31)
ffc1b158: 99 49 00 00 stb r10,0(r9)
return 0;
}
ffc1b15c: 39 61 00 20 addi r11,r1,32
ffc1b160: 4b fe 64 0c b ffc0156c <_restgpr_31_x>
ffc1ae48 <rtems_rfs_bitmap_map_set>:
int
rtems_rfs_bitmap_map_set (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_bit bit)
{
ffc1ae48: 94 21 ff e0 stwu r1,-32(r1)
ffc1ae4c: 7c 08 02 a6 mflr r0
ffc1ae50: bf c1 00 18 stmw r30,24(r1)
ffc1ae54: 7c 9e 23 78 mr r30,r4
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);
ffc1ae58: 38 81 00 08 addi r4,r1,8
}
int
rtems_rfs_bitmap_map_set (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_bit bit)
{
ffc1ae5c: 90 01 00 24 stw r0,36(r1)
ffc1ae60: 7c 7f 1b 78 mr r31,r3
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);
ffc1ae64: 4b ff fd 3d bl ffc1aba0 <rtems_rfs_bitmap_load_map>
if (rc > 0)
ffc1ae68: 2c 03 00 00 cmpwi r3,0
ffc1ae6c: 41 a1 00 78 bgt+ ffc1aee4 <rtems_rfs_bitmap_map_set+0x9c>
return rc;
if (bit >= control->size)
ffc1ae70: 81 3f 00 0c lwz r9,12(r31)
return EINVAL;
ffc1ae74: 38 60 00 16 li r3,22
int offset;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
if (bit >= control->size)
ffc1ae78: 7f 9e 48 40 cmplw cr7,r30,r9
ffc1ae7c: 40 bc 00 68 bge+ cr7,ffc1aee4 <rtems_rfs_bitmap_map_set+0x9c><== NEVER TAKEN
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);
ffc1ae80: 80 a1 00 08 lwz r5,8(r1)
if (rc > 0)
return rc;
if (bit >= control->size)
return EINVAL;
search_map = control->search_bits;
index = rtems_rfs_bitmap_map_index (bit);
ffc1ae84: 7f c8 2e 70 srawi r8,r30,5
offset = rtems_rfs_bitmap_map_offset (bit);
map[index] = rtems_rfs_bitmap_set (map[index], 1 << offset);
ffc1ae88: 55 06 10 3a rlwinm r6,r8,2,0,29
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
if (bit >= control->size)
return EINVAL;
search_map = control->search_bits;
ffc1ae8c: 81 5f 00 14 lwz r10,20(r31)
*/
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);
ffc1ae90: 7c 85 30 2e lwzx r4,r5,r6
return rc;
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);
ffc1ae94: 57 c7 06 fe clrlwi r7,r30,27
map[index] = rtems_rfs_bitmap_set (map[index], 1 << offset);
ffc1ae98: 39 20 00 01 li r9,1
ffc1ae9c: 7d 27 38 30 slw r7,r9,r7
*/
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);
ffc1aea0: 7c 87 38 78 andc r7,r4,r7
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))
ffc1aea4: 2f 87 00 00 cmpwi cr7,r7,0
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);
ffc1aea8: 7c e5 31 2e stwx r7,r5,r6
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;
ffc1aeac: 38 60 00 00 li r3,0
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))
ffc1aeb0: 40 9e 00 34 bne- cr7,ffc1aee4 <rtems_rfs_bitmap_map_set+0x9c><== ALWAYS TAKEN
{
bit = index;
index = rtems_rfs_bitmap_map_index (bit);
ffc1aeb4: 7f de 56 70 srawi r30,r30,10 <== NOT EXECUTED
offset = rtems_rfs_bitmap_map_offset (bit);
search_map[index] = rtems_rfs_bitmap_set (search_map[index], 1 << offset);
ffc1aeb8: 57 de 10 3a rlwinm r30,r30,2,0,29 <== NOT EXECUTED
*/
static rtems_rfs_bitmap_element
rtems_rfs_bitmap_set (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_element bits)
{
return RTEMS_RFS_BITMAP_SET_BITS (target, bits);
ffc1aebc: 7c ea f0 2e lwzx r7,r10,r30 <== NOT EXECUTED
map[index] = rtems_rfs_bitmap_set (map[index], 1 << offset);
if (rtems_rfs_bitmap_match(map[index], RTEMS_RFS_BITMAP_ELEMENT_SET))
{
bit = index;
index = rtems_rfs_bitmap_map_index (bit);
offset = rtems_rfs_bitmap_map_offset (bit);
ffc1aec0: 55 08 06 fe clrlwi r8,r8,27 <== NOT EXECUTED
search_map[index] = rtems_rfs_bitmap_set (search_map[index], 1 << offset);
ffc1aec4: 7d 28 40 30 slw r8,r9,r8 <== NOT EXECUTED
*/
static rtems_rfs_bitmap_element
rtems_rfs_bitmap_set (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_element bits)
{
return RTEMS_RFS_BITMAP_SET_BITS (target, bits);
ffc1aec8: 7c e7 40 78 andc r7,r7,r8 <== NOT EXECUTED
if (rtems_rfs_bitmap_match(map[index], RTEMS_RFS_BITMAP_ELEMENT_SET))
{
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);
ffc1aecc: 7c ea f1 2e stwx r7,r10,r30 <== NOT EXECUTED
control->free--;
ffc1aed0: 81 5f 00 10 lwz r10,16(r31) <== NOT EXECUTED
ffc1aed4: 39 4a ff ff addi r10,r10,-1 <== NOT EXECUTED
ffc1aed8: 91 5f 00 10 stw r10,16(r31) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (control->buffer);
ffc1aedc: 81 5f 00 00 lwz r10,0(r31) <== NOT EXECUTED
ffc1aee0: 99 2a 00 00 stb r9,0(r10) <== NOT EXECUTED
}
return 0;
}
ffc1aee4: 39 61 00 20 addi r11,r1,32
ffc1aee8: 4b fe 66 80 b ffc01568 <_restgpr_30_x>
ffc1af88 <rtems_rfs_bitmap_map_test>:
int
rtems_rfs_bitmap_map_test (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_bit bit,
bool* state)
{
ffc1af88: 94 21 ff d8 stwu r1,-40(r1)
ffc1af8c: 7c 08 02 a6 mflr r0
ffc1af90: bf a1 00 1c stmw r29,28(r1)
ffc1af94: 7c 9f 23 78 mr r31,r4
rtems_rfs_bitmap_map map;
int index;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
ffc1af98: 38 81 00 08 addi r4,r1,8
int
rtems_rfs_bitmap_map_test (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_bit bit,
bool* state)
{
ffc1af9c: 90 01 00 2c stw r0,44(r1)
ffc1afa0: 7c 7e 1b 78 mr r30,r3
ffc1afa4: 7c bd 2b 78 mr r29,r5
rtems_rfs_bitmap_map map;
int index;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
ffc1afa8: 4b ff fb f9 bl ffc1aba0 <rtems_rfs_bitmap_load_map>
if (rc > 0)
ffc1afac: 2c 03 00 00 cmpwi r3,0
ffc1afb0: 41 a1 00 40 bgt+ ffc1aff0 <rtems_rfs_bitmap_map_test+0x68>
return rc;
if (bit >= control->size)
ffc1afb4: 81 3e 00 0c lwz r9,12(r30)
return EINVAL;
ffc1afb8: 38 60 00 16 li r3,22
int index;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
if (bit >= control->size)
ffc1afbc: 7f 9f 48 40 cmplw cr7,r31,r9
ffc1afc0: 40 bc 00 30 bge+ cr7,ffc1aff0 <rtems_rfs_bitmap_map_test+0x68><== NEVER TAKEN
return EINVAL;
index = rtems_rfs_bitmap_map_index (bit);
ffc1afc4: 7f e8 2e 70 srawi r8,r31,5
*/
static bool
rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_bit bit)
{
return RTEMS_RFS_BITMAP_TEST_BIT (target, bit);
ffc1afc8: 81 21 00 08 lwz r9,8(r1)
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);
ffc1afcc: 55 08 10 3a rlwinm r8,r8,2,0,29
*/
static bool
rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_bit bit)
{
return RTEMS_RFS_BITMAP_TEST_BIT (target, bit);
ffc1afd0: 39 40 00 01 li r10,1
ffc1afd4: 7d 4a f8 30 slw r10,r10,r31
ffc1afd8: 7f e9 40 2e lwzx r31,r9,r8
return rc;
if (bit >= control->size)
return EINVAL;
index = rtems_rfs_bitmap_map_index (bit);
*state = rtems_rfs_bitmap_test (map[index], bit);
return 0;
ffc1afdc: 38 60 00 00 li r3,0
*/
static bool
rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_bit bit)
{
return RTEMS_RFS_BITMAP_TEST_BIT (target, bit);
ffc1afe0: 7d 49 f8 39 and. r9,r10,r31
ffc1afe4: 7f e0 00 26 mfcr r31
ffc1afe8: 57 ff 1f fe rlwinm r31,r31,3,31,31
ffc1afec: 9b fd 00 00 stb r31,0(r29)
if (bit >= control->size)
return EINVAL;
index = rtems_rfs_bitmap_map_index (bit);
*state = rtems_rfs_bitmap_test (map[index], bit);
return 0;
}
ffc1aff0: 39 61 00 28 addi r11,r1,40
ffc1aff4: 4b fe 65 70 b ffc01564 <_restgpr_29_x>
ffc1ae10 <rtems_rfs_bitmap_mask>:
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);
return mask;
}
ffc1ae10: 39 20 ff ff li r9,-1 <== NOT EXECUTED
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);
ffc1ae14: 20 63 00 20 subfic r3,r3,32 <== NOT EXECUTED
return mask;
}
ffc1ae18: 7d 23 1c 30 srw r3,r9,r3 <== NOT EXECUTED
ffc1ae1c: 4e 80 00 20 blr <== NOT EXECUTED
ffc1ae20 <rtems_rfs_bitmap_mask_section>:
rtems_rfs_bitmap_element
rtems_rfs_bitmap_mask_section (unsigned int start, unsigned int end)
{
rtems_rfs_bitmap_element mask = 0;
if (end > start)
ffc1ae20: 7f 84 18 40 cmplw cr7,r4,r3
ffc1ae24: 40 9d 00 1c ble- cr7,ffc1ae40 <rtems_rfs_bitmap_mask_section+0x20><== NEVER TAKEN
mask = rtems_rfs_bitmap_mask (end - start) << start;
ffc1ae28: 7c 83 20 50 subf r4,r3,r4
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);
ffc1ae2c: 39 20 ff ff li r9,-1
ffc1ae30: 20 84 00 20 subfic r4,r4,32
ffc1ae34: 7d 24 24 30 srw r4,r9,r4
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;
ffc1ae38: 7c 83 18 30 slw r3,r4,r3
ffc1ae3c: 4e 80 00 20 blr
}
rtems_rfs_bitmap_element
rtems_rfs_bitmap_mask_section (unsigned int start, unsigned int end)
{
rtems_rfs_bitmap_element mask = 0;
ffc1ae40: 38 60 00 00 li r3,0 <== NOT EXECUTED
if (end > start)
mask = rtems_rfs_bitmap_mask (end - start) << start;
return mask;
}
ffc1ae44: 4e 80 00 20 blr <== NOT EXECUTED
ffc1b544 <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)
{
ffc1b544: 94 21 ff e0 stwu r1,-32(r1)
ffc1b548: 7c 08 02 a6 mflr r0
ffc1b54c: bf 61 00 0c stmw r27,12(r1)
ffc1b550: 7c de 33 78 mr r30,r6
/*
* 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);
ffc1b554: 38 c0 00 01 li r6,1
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)
{
ffc1b558: 90 01 00 24 stw r0,36(r1)
ffc1b55c: 7c 7c 1b 78 mr r28,r3
ffc1b560: 7c 9b 23 78 mr r27,r4
ffc1b564: 7c bd 2b 78 mr r29,r5
ffc1b568: 7c ff 3b 78 mr r31,r7
/*
* 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);
ffc1b56c: 48 00 12 d1 bl ffc1c83c <rtems_rfs_buffer_handle_request>
if (rc > 0)
ffc1b570: 2c 03 00 00 cmpwi r3,0
ffc1b574: 41 a1 00 98 bgt+ ffc1b60c <rtems_rfs_block_find_indirect+0xc8><== NEVER TAKEN
return rc;
*result = rtems_rfs_block_get_number (buffer, offset);
ffc1b578: 81 3b 00 08 lwz r9,8(r27)
ffc1b57c: 57 c8 10 3a rlwinm r8,r30,2,0,29
ffc1b580: 80 e9 00 1c lwz r7,28(r9)
ffc1b584: 7d 47 42 14 add r10,r7,r8
ffc1b588: 7d 27 40 ae lbzx r9,r7,r8
ffc1b58c: 88 ca 00 03 lbz r6,3(r10)
ffc1b590: 89 0a 00 01 lbz r8,1(r10)
ffc1b594: 55 29 c0 0e rlwinm r9,r9,24,0,7
ffc1b598: 89 4a 00 02 lbz r10,2(r10)
ffc1b59c: 7c c9 4b 78 or r9,r6,r9
ffc1b5a0: 55 08 80 1e rlwinm r8,r8,16,0,15
ffc1b5a4: 7d 29 43 78 or r9,r9,r8
ffc1b5a8: 55 4a 40 2e rlwinm r10,r10,8,0,23
ffc1b5ac: 7d 29 53 78 or r9,r9,r10
if ((*result + 1) == 0)
ffc1b5b0: 2f 89 ff ff cmpwi cr7,r9,-1
ffc1b5b4: 40 be 00 08 bne+ cr7,ffc1b5bc <rtems_rfs_block_find_indirect+0x78><== ALWAYS TAKEN
*result = 0;
ffc1b5b8: 39 20 00 00 li r9,0 <== NOT EXECUTED
if (*result >= rtems_rfs_fs_blocks (fs))
ffc1b5bc: 81 5c 00 04 lwz r10,4(r28)
ffc1b5c0: 38 60 00 00 li r3,0
ffc1b5c4: 91 3f 00 00 stw r9,0(r31)
ffc1b5c8: 7f 89 50 40 cmplw cr7,r9,r10
ffc1b5cc: 41 bc 00 40 blt+ cr7,ffc1b60c <rtems_rfs_block_find_indirect+0xc8><== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_FIND))
ffc1b5d0: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc1b5d4: 38 80 10 00 li r4,4096 <== NOT EXECUTED
ffc1b5d8: 4b ff 8d f1 bl ffc143c8 <rtems_rfs_trace> <== NOT EXECUTED
ffc1b5dc: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc1b5e0: 41 be 00 20 beq+ cr7,ffc1b600 <rtems_rfs_block_find_indirect+0xbc><== NOT EXECUTED
printf ("rtems-rfs: block-find: invalid block in table:"
ffc1b5e4: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1b5e8: 80 9f 00 00 lwz r4,0(r31) <== NOT EXECUTED
ffc1b5ec: 38 63 5d 1b addi r3,r3,23835 <== NOT EXECUTED
ffc1b5f0: 7f a5 eb 78 mr r5,r29 <== NOT EXECUTED
ffc1b5f4: 7f c6 f3 78 mr r6,r30 <== NOT EXECUTED
ffc1b5f8: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1b5fc: 48 00 83 91 bl ffc2398c <printf> <== NOT EXECUTED
" block=%" PRId32 ", indirect=%" PRId32 "/%d\n", *result, block, offset);
*result = 0;
ffc1b600: 39 20 00 00 li r9,0 <== NOT EXECUTED
ffc1b604: 91 3f 00 00 stw r9,0(r31) <== NOT EXECUTED
ffc1b608: 38 60 00 00 li r3,0 <== NOT EXECUTED
rc = EIO;
}
return 0;
}
ffc1b60c: 39 61 00 20 addi r11,r1,32
ffc1b610: 4b fe 5f 4c b ffc0155c <_restgpr_27_x>
ffc1b764 <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)
{
ffc1b764: 94 21 ff e8 stwu r1,-24(r1) <== NOT EXECUTED
ffc1b768: 7c 08 02 a6 mflr r0 <== NOT EXECUTED
ffc1b76c: bf 81 00 08 stmw r28,8(r1) <== NOT EXECUTED
ffc1b770: 7c bd 2b 78 mr r29,r5 <== NOT EXECUTED
ffc1b774: 7c de 33 78 mr r30,r6 <== NOT EXECUTED
if (pos == 0)
ffc1b778: 7f a9 f3 79 or. r9,r29,r30 <== NOT EXECUTED
void
rtems_rfs_block_get_block_size (rtems_rfs_file_system* fs,
rtems_rfs_pos pos,
rtems_rfs_block_size* size)
{
ffc1b77c: 90 01 00 1c stw r0,28(r1) <== NOT EXECUTED
ffc1b780: 7c ff 3b 78 mr r31,r7 <== NOT EXECUTED
if (pos == 0)
ffc1b784: 40 a2 00 10 bne+ ffc1b794 <rtems_rfs_block_get_block_size+0x30><== 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;
ffc1b788: 91 27 00 00 stw r9,0(r7) <== NOT EXECUTED
size->offset = 0;
ffc1b78c: 91 27 00 04 stw r9,4(r7) <== NOT EXECUTED
ffc1b790: 48 00 00 3c b ffc1b7cc <rtems_rfs_block_get_block_size+0x68><== NOT EXECUTED
rtems_rfs_block_set_size_zero (size);
else
{
size->count = pos / rtems_rfs_fs_block_size (fs) + 1;
ffc1b794: 83 83 00 08 lwz r28,8(r3) <== NOT EXECUTED
ffc1b798: 7c c4 33 78 mr r4,r6 <== NOT EXECUTED
ffc1b79c: 7c a3 2b 78 mr r3,r5 <== NOT EXECUTED
ffc1b7a0: 7f 86 e3 78 mr r6,r28 <== NOT EXECUTED
ffc1b7a4: 38 a0 00 00 li r5,0 <== NOT EXECUTED
ffc1b7a8: 48 01 5b 2d bl ffc312d4 <__udivdi3> <== NOT EXECUTED
size->offset = pos % rtems_rfs_fs_block_size (fs);
ffc1b7ac: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED
{
if (pos == 0)
rtems_rfs_block_set_size_zero (size);
else
{
size->count = pos / rtems_rfs_fs_block_size (fs) + 1;
ffc1b7b0: 38 84 00 01 addi r4,r4,1 <== NOT EXECUTED
ffc1b7b4: 90 9f 00 00 stw r4,0(r31) <== NOT EXECUTED
size->offset = pos % rtems_rfs_fs_block_size (fs);
ffc1b7b8: 38 a0 00 00 li r5,0 <== NOT EXECUTED
ffc1b7bc: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED
ffc1b7c0: 7f 86 e3 78 mr r6,r28 <== NOT EXECUTED
ffc1b7c4: 48 01 5f 09 bl ffc316cc <__umoddi3> <== NOT EXECUTED
ffc1b7c8: 90 9f 00 04 stw r4,4(r31) <== NOT EXECUTED
}
}
ffc1b7cc: 39 61 00 18 addi r11,r1,24 <== NOT EXECUTED
ffc1b7d0: 4b fe 5d 90 b ffc01560 <_restgpr_28_x> <== NOT EXECUTED
ffc1b9e0 <rtems_rfs_block_map_close>:
int
rtems_rfs_block_map_close (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map)
{
ffc1b9e0: 94 21 ff e8 stwu r1,-24(r1)
ffc1b9e4: 7c 08 02 a6 mflr r0
ffc1b9e8: 90 01 00 1c stw r0,28(r1)
int rc = 0;
int brc;
if (map->dirty && map->inode)
ffc1b9ec: 89 24 00 00 lbz r9,0(r4)
}
int
rtems_rfs_block_map_close (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map)
{
ffc1b9f0: bf 81 00 08 stmw r28,8(r1)
ffc1b9f4: 7c 7c 1b 78 mr r28,r3
int rc = 0;
int brc;
if (map->dirty && map->inode)
ffc1b9f8: 2f 89 00 00 cmpwi cr7,r9,0
}
int
rtems_rfs_block_map_close (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map)
{
ffc1b9fc: 7c 9f 23 78 mr r31,r4
int rc = 0;
ffc1ba00: 3b c0 00 00 li r30,0
int brc;
if (map->dirty && map->inode)
ffc1ba04: 41 9e 01 88 beq- cr7,ffc1bb8c <rtems_rfs_block_map_close+0x1ac>
ffc1ba08: 80 84 00 04 lwz r4,4(r4)
int
rtems_rfs_block_map_close (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map)
{
int rc = 0;
ffc1ba0c: 3b c0 00 00 li r30,0
int brc;
if (map->dirty && map->inode)
ffc1ba10: 2f 84 00 00 cmpwi cr7,r4,0
ffc1ba14: 41 9e 01 78 beq- cr7,ffc1bb8c <rtems_rfs_block_map_close+0x1ac><== NEVER TAKEN
{
brc = rtems_rfs_inode_load (fs, map->inode);
ffc1ba18: 4b ff 6d ed bl ffc12804 <rtems_rfs_inode_load>
if (brc > 0)
ffc1ba1c: 2f 83 00 00 cmpwi cr7,r3,0
ffc1ba20: 7c 7e 1b 78 mr r30,r3
ffc1ba24: 41 bd 01 68 bgt+ cr7,ffc1bb8c <rtems_rfs_block_map_close+0x1ac><== NEVER TAKEN
*/
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);
rtems_rfs_buffer_mark_dirty (&handle->buffer);
ffc1ba28: 39 20 00 05 li r9,5
ffc1ba2c: 7d 29 03 a6 mtctr r9
ffc1ba30: 39 00 00 00 li r8,0
ffc1ba34: 38 a0 00 01 li r5,1
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]);
ffc1ba38: 81 3f 00 04 lwz r9,4(r31)
return rc;
}
int
rtems_rfs_block_map_close (rtems_rfs_file_system* fs,
ffc1ba3c: 55 0a 10 3a rlwinm r10,r8,2,0,29
ffc1ba40: 7d 5f 52 14 add r10,r31,r10
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]);
ffc1ba44: 81 4a 00 24 lwz r10,36(r10)
* @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);
ffc1ba48: 38 e8 00 04 addi r7,r8,4
ffc1ba4c: 80 c9 00 0c lwz r6,12(r9)
ffc1ba50: 54 e7 10 3a rlwinm r7,r7,2,0,29
ffc1ba54: 55 44 46 3e rlwinm r4,r10,8,24,31
ffc1ba58: 7c c6 3a 14 add r6,r6,r7
ffc1ba5c: 98 86 00 0c stb r4,12(r6)
ffc1ba60: 55 44 84 3e rlwinm r4,r10,16,16,31
if (rc == 0)
{
int b;
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
ffc1ba64: 39 08 00 01 addi r8,r8,1
ffc1ba68: 80 c9 00 0c lwz r6,12(r9)
ffc1ba6c: 7c c6 3a 14 add r6,r6,r7
ffc1ba70: 98 86 00 0d stb r4,13(r6)
ffc1ba74: 55 44 c2 3e rlwinm r4,r10,24,8,31
ffc1ba78: 80 c9 00 0c lwz r6,12(r9)
ffc1ba7c: 7c c6 3a 14 add r6,r6,r7
ffc1ba80: 98 86 00 0e stb r4,14(r6)
ffc1ba84: 80 c9 00 0c lwz r6,12(r9)
ffc1ba88: 7c e6 3a 14 add r7,r6,r7
ffc1ba8c: 99 47 00 0f stb r10,15(r7)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
ffc1ba90: 39 40 00 01 li r10,1
ffc1ba94: 98 a9 00 10 stb r5,16(r9)
ffc1ba98: 42 00 ff a0 bdnz+ ffc1ba38 <rtems_rfs_block_map_close+0x58>
rtems_rfs_inode_set_block (map->inode, b, map->blocks[b]);
rtems_rfs_inode_set_block_count (map->inode, map->size.count);
ffc1ba9c: 81 3f 00 04 lwz r9,4(r31)
rtems_rfs_inode_set_block_offset (map->inode, map->size.offset);
rtems_rfs_inode_set_last_map_block (map->inode, map->last_map_block);
rtems_rfs_inode_set_last_data_block (map->inode, map->last_data_block);
brc = rtems_rfs_inode_unload (fs, map->inode, true);
ffc1baa0: 7f 83 e3 78 mr r3,r28
{
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);
ffc1baa4: 81 1f 00 08 lwz r8,8(r31)
rtems_rfs_inode_set_block_offset (map->inode, map->size.offset);
rtems_rfs_inode_set_last_map_block (map->inode, map->last_map_block);
rtems_rfs_inode_set_last_data_block (map->inode, map->last_data_block);
brc = rtems_rfs_inode_unload (fs, map->inode, true);
ffc1baa8: 38 a0 00 01 li r5,1
* @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);
ffc1baac: 80 e9 00 0c lwz r7,12(r9)
ffc1bab0: 55 06 46 3e rlwinm r6,r8,8,24,31
ffc1bab4: 98 c7 00 0c stb r6,12(r7)
ffc1bab8: 55 06 84 3e rlwinm r6,r8,16,16,31
ffc1babc: 80 e9 00 0c lwz r7,12(r9)
ffc1bac0: 98 c7 00 0d stb r6,13(r7)
ffc1bac4: 55 06 c2 3e rlwinm r6,r8,24,8,31
ffc1bac8: 80 e9 00 0c lwz r7,12(r9)
ffc1bacc: 98 c7 00 0e stb r6,14(r7)
ffc1bad0: 80 e9 00 0c lwz r7,12(r9)
ffc1bad4: 99 07 00 0f stb r8,15(r7)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
ffc1bad8: 99 49 00 10 stb r10,16(r9)
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);
ffc1badc: 81 3f 00 04 lwz r9,4(r31)
ffc1bae0: 81 1f 00 0c lwz r8,12(r31)
*/
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);
ffc1bae4: 80 e9 00 0c lwz r7,12(r9)
ffc1bae8: 55 06 c6 3e rlwinm r6,r8,24,24,31
ffc1baec: 98 c7 00 0a stb r6,10(r7)
ffc1baf0: 80 e9 00 0c lwz r7,12(r9)
ffc1baf4: 99 07 00 0b stb r8,11(r7)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
ffc1baf8: 99 49 00 10 stb r10,16(r9)
rtems_rfs_inode_set_last_map_block (map->inode, map->last_map_block);
ffc1bafc: 81 3f 00 04 lwz r9,4(r31)
ffc1bb00: 81 1f 00 1c lwz r8,28(r31)
* @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);
ffc1bb04: 80 e9 00 0c lwz r7,12(r9)
ffc1bb08: 55 06 46 3e rlwinm r6,r8,8,24,31
ffc1bb0c: 98 c7 00 30 stb r6,48(r7)
ffc1bb10: 55 06 84 3e rlwinm r6,r8,16,16,31
ffc1bb14: 80 e9 00 0c lwz r7,12(r9)
ffc1bb18: 98 c7 00 31 stb r6,49(r7)
ffc1bb1c: 55 06 c2 3e rlwinm r6,r8,24,8,31
ffc1bb20: 80 e9 00 0c lwz r7,12(r9)
ffc1bb24: 98 c7 00 32 stb r6,50(r7)
ffc1bb28: 80 e9 00 0c lwz r7,12(r9)
ffc1bb2c: 99 07 00 33 stb r8,51(r7)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
ffc1bb30: 99 49 00 10 stb r10,16(r9)
rtems_rfs_inode_set_last_data_block (map->inode, map->last_data_block);
ffc1bb34: 81 3f 00 04 lwz r9,4(r31)
ffc1bb38: 81 1f 00 20 lwz r8,32(r31)
* @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);
ffc1bb3c: 80 e9 00 0c lwz r7,12(r9)
ffc1bb40: 55 06 46 3e rlwinm r6,r8,8,24,31
ffc1bb44: 98 c7 00 34 stb r6,52(r7)
ffc1bb48: 55 06 84 3e rlwinm r6,r8,16,16,31
ffc1bb4c: 80 e9 00 0c lwz r7,12(r9)
ffc1bb50: 98 c7 00 35 stb r6,53(r7)
ffc1bb54: 55 06 c2 3e rlwinm r6,r8,24,8,31
ffc1bb58: 80 e9 00 0c lwz r7,12(r9)
ffc1bb5c: 98 c7 00 36 stb r6,54(r7)
ffc1bb60: 80 e9 00 0c lwz r7,12(r9)
ffc1bb64: 99 07 00 37 stb r8,55(r7)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
ffc1bb68: 99 49 00 10 stb r10,16(r9)
brc = rtems_rfs_inode_unload (fs, map->inode, true);
ffc1bb6c: 80 9f 00 04 lwz r4,4(r31)
ffc1bb70: 4b ff 6e 3d bl ffc129ac <rtems_rfs_inode_unload>
ffc1bb74: 7c 69 18 f8 not r9,r3
ffc1bb78: 7d 29 fe 70 srawi r9,r9,31
ffc1bb7c: 7c 7e 48 38 and r30,r3,r9
if (brc > 0)
rc = brc;
map->dirty = false;
ffc1bb80: 39 20 00 00 li r9,0
ffc1bb84: 99 3f 00 00 stb r9,0(r31)
ffc1bb88: 48 00 00 04 b ffc1bb8c <rtems_rfs_block_map_close+0x1ac>
}
}
map->inode = NULL;
ffc1bb8c: 3b a0 00 00 li r29,0
ffc1bb90: 93 bf 00 04 stw r29,4(r31)
*/
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);
ffc1bb94: 38 9f 00 38 addi r4,r31,56
ffc1bb98: 7f 83 e3 78 mr r3,r28
ffc1bb9c: 48 00 0a bd bl ffc1c658 <rtems_rfs_buffer_handle_release>
handle->dirty = false;
ffc1bba0: 9b bf 00 38 stb r29,56(r31)
*/
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);
ffc1bba4: 7f 83 e3 78 mr r3,r28
handle->dirty = false;
handle->bnum = 0;
ffc1bba8: 93 bf 00 3c stw r29,60(r31)
*/
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);
ffc1bbac: 38 9f 00 44 addi r4,r31,68
handle->dirty = false;
handle->bnum = 0;
handle->buffer = NULL;
ffc1bbb0: 93 bf 00 40 stw r29,64(r31)
*/
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);
ffc1bbb4: 48 00 0a a5 bl ffc1c658 <rtems_rfs_buffer_handle_release>
handle->dirty = false;
ffc1bbb8: 9b bf 00 44 stb r29,68(r31)
rc = brc;
brc = rtems_rfs_buffer_handle_close (fs, &map->doubly_buffer);
if ((brc > 0) && (rc == 0))
rc = brc;
return rc;
}
ffc1bbbc: 39 61 00 18 addi r11,r1,24
handle->bnum = 0;
ffc1bbc0: 93 bf 00 48 stw r29,72(r31)
ffc1bbc4: 7f c3 f3 78 mr r3,r30
handle->buffer = NULL;
ffc1bbc8: 93 bf 00 4c stw r29,76(r31)
ffc1bbcc: 4b fe 59 94 b ffc01560 <_restgpr_28_x>
ffc1bbd0 <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)
{
ffc1bbd0: 94 21 ff d0 stwu r1,-48(r1)
ffc1bbd4: 7c 08 02 a6 mflr r0
int rc = 0;
*block = 0;
ffc1bbd8: 39 20 00 00 li r9,0
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)
{
ffc1bbdc: bf 61 00 1c stmw r27,28(r1)
ffc1bbe0: 7c 7d 1b 78 mr r29,r3
ffc1bbe4: 7c 9f 23 78 mr r31,r4
ffc1bbe8: 90 01 00 34 stw r0,52(r1)
ffc1bbec: 7c bc 2b 78 mr r28,r5
ffc1bbf0: 7c de 33 78 mr r30,r6
int rc = 0;
*block = 0;
ffc1bbf4: 91 26 00 00 stw r9,0(r6)
/*
* Range checking here makes the remaining logic simpler.
*/
if (rtems_rfs_block_pos_block_past_end (bpos, &map->size))
ffc1bbf8: 81 45 00 00 lwz r10,0(r5)
ffc1bbfc: 81 04 00 08 lwz r8,8(r4)
ffc1bc00: 2f 8a 00 00 cmpwi cr7,r10,0
ffc1bc04: 41 9e 00 10 beq- cr7,ffc1bc14 <rtems_rfs_block_map_find+0x44>
ffc1bc08: 2f 88 00 00 cmpwi cr7,r8,0
return ENXIO;
ffc1bc0c: 38 60 00 06 li r3,6
*block = 0;
/*
* Range checking here makes the remaining logic simpler.
*/
if (rtems_rfs_block_pos_block_past_end (bpos, &map->size))
ffc1bc10: 41 be 01 14 beq+ cr7,ffc1bd24 <rtems_rfs_block_map_find+0x154><== NEVER TAKEN
ffc1bc14: 7f 8a 40 40 cmplw cr7,r10,r8
return ENXIO;
ffc1bc18: 38 60 00 06 li r3,6
*block = 0;
/*
* Range checking here makes the remaining logic simpler.
*/
if (rtems_rfs_block_pos_block_past_end (bpos, &map->size))
ffc1bc1c: 40 bc 01 08 bge+ cr7,ffc1bd24 <rtems_rfs_block_map_find+0x154>
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))
ffc1bc20: 81 3f 00 10 lwz r9,16(r31)
ffc1bc24: 7f 8a 48 00 cmpw cr7,r10,r9
ffc1bc28: 40 be 00 14 bne+ cr7,ffc1bc3c <rtems_rfs_block_map_find+0x6c>
ffc1bc2c: 81 3f 00 18 lwz r9,24(r31)
ffc1bc30: 2f 89 00 00 cmpwi cr7,r9,0
ffc1bc34: 41 9e 00 08 beq- cr7,ffc1bc3c <rtems_rfs_block_map_find+0x6c>
ffc1bc38: 48 00 00 1c b ffc1bc54 <rtems_rfs_block_map_find+0x84>
/*
* 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)
ffc1bc3c: 2b 88 00 05 cmplwi cr7,r8,5
ffc1bc40: 41 9d 00 1c bgt- cr7,ffc1bc5c <rtems_rfs_block_map_find+0x8c>
{
*block = map->blocks[bpos->bno];
ffc1bc44: 39 4a 00 08 addi r10,r10,8
ffc1bc48: 55 4a 10 3a rlwinm r10,r10,2,0,29
ffc1bc4c: 7d 5f 52 14 add r10,r31,r10
ffc1bc50: 81 2a 00 04 lwz r9,4(r10)
ffc1bc54: 91 3e 00 00 stw r9,0(r30)
ffc1bc58: 48 00 00 a8 b ffc1bd00 <rtems_rfs_block_map_find+0x130>
* 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;
ffc1bc5c: 80 fd 00 34 lwz r7,52(r29)
ffc1bc60: 7d 2a 3b 96 divwu r9,r10,r7
ffc1bc64: 7f 69 39 d6 mullw r27,r9,r7
singly = bpos->bno / fs->blocks_per_block;
ffc1bc68: 91 21 00 08 stw r9,8(r1)
* 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;
ffc1bc6c: 7f 7b 50 50 subf r27,r27,r10
singly = bpos->bno / fs->blocks_per_block;
if (map->size.count <= fs->block_map_singly_blocks)
ffc1bc70: 81 5d 00 38 lwz r10,56(r29)
ffc1bc74: 7f 88 50 40 cmplw cr7,r8,r10
ffc1bc78: 41 bd 00 20 bgt+ cr7,ffc1bc98 <rtems_rfs_block_map_find+0xc8><== NEVER TAKEN
{
/*
* This is a single indirect table of blocks anchored off a slot in the
* inode.
*/
rc = rtems_rfs_block_find_indirect (fs,
ffc1bc7c: 39 29 00 08 addi r9,r9,8
ffc1bc80: 55 29 10 3a rlwinm r9,r9,2,0,29
ffc1bc84: 7d 3f 4a 14 add r9,r31,r9
ffc1bc88: 7f a3 eb 78 mr r3,r29
ffc1bc8c: 80 a9 00 04 lwz r5,4(r9)
ffc1bc90: 38 9f 00 38 addi r4,r31,56
ffc1bc94: 48 00 00 58 b ffc1bcec <rtems_rfs_block_map_find+0x11c>
* The map is doubly indirect.
*/
rtems_rfs_block_no doubly;
doubly = singly / fs->blocks_per_block;
singly %= fs->blocks_per_block;
ffc1bc98: 7d 49 3b 96 divwu r10,r9,r7 <== NOT EXECUTED
ffc1bc9c: 7c ea 39 d6 mullw r7,r10,r7 <== NOT EXECUTED
{
/*
* This should never happen. Here so Joel can remove once his coverage
* testing gets to the file systems.
*/
rc = ENXIO;
ffc1bca0: 38 60 00 06 li r3,6 <== NOT EXECUTED
* The map is doubly indirect.
*/
rtems_rfs_block_no doubly;
doubly = singly / fs->blocks_per_block;
singly %= fs->blocks_per_block;
ffc1bca4: 7c c7 48 50 subf r6,r7,r9 <== NOT EXECUTED
if (map->size.count < fs->block_map_doubly_blocks)
ffc1bca8: 80 fd 00 3c lwz r7,60(r29) <== NOT EXECUTED
* The map is doubly indirect.
*/
rtems_rfs_block_no doubly;
doubly = singly / fs->blocks_per_block;
singly %= fs->blocks_per_block;
ffc1bcac: 90 c1 00 08 stw r6,8(r1) <== NOT EXECUTED
if (map->size.count < fs->block_map_doubly_blocks)
ffc1bcb0: 7f 88 38 40 cmplw cr7,r8,r7 <== NOT EXECUTED
ffc1bcb4: 40 bc 00 70 bge+ cr7,ffc1bd24 <rtems_rfs_block_map_find+0x154><== NOT EXECUTED
{
rc = rtems_rfs_block_find_indirect (fs,
ffc1bcb8: 39 4a 00 08 addi r10,r10,8 <== NOT EXECUTED
ffc1bcbc: 55 4a 10 3a rlwinm r10,r10,2,0,29 <== NOT EXECUTED
ffc1bcc0: 7d 5f 52 14 add r10,r31,r10 <== NOT EXECUTED
ffc1bcc4: 80 aa 00 04 lwz r5,4(r10) <== NOT EXECUTED
ffc1bcc8: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED
ffc1bccc: 38 9f 00 44 addi r4,r31,68 <== NOT EXECUTED
ffc1bcd0: 38 e1 00 08 addi r7,r1,8 <== NOT EXECUTED
ffc1bcd4: 4b ff f8 71 bl ffc1b544 <rtems_rfs_block_find_indirect><== NOT EXECUTED
&map->doubly_buffer,
map->blocks[doubly],
singly, &singly);
if (rc == 0)
ffc1bcd8: 2c 03 00 00 cmpwi r3,0 <== NOT EXECUTED
ffc1bcdc: 40 a2 00 1c bne+ ffc1bcf8 <rtems_rfs_block_map_find+0x128><== NOT EXECUTED
{
rc = rtems_rfs_block_find_indirect (fs,
ffc1bce0: 80 a1 00 08 lwz r5,8(r1) <== NOT EXECUTED
ffc1bce4: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED
ffc1bce8: 38 9f 00 38 addi r4,r31,56 <== NOT EXECUTED
ffc1bcec: 7f 66 db 78 mr r6,r27
ffc1bcf0: 7f c7 f3 78 mr r7,r30
ffc1bcf4: 4b ff f8 51 bl ffc1b544 <rtems_rfs_block_find_indirect>
}
}
}
}
if (rc == 0)
ffc1bcf8: 2f 83 00 00 cmpwi cr7,r3,0
ffc1bcfc: 40 be 00 28 bne+ cr7,ffc1bd24 <rtems_rfs_block_map_find+0x154><== NEVER TAKEN
{
rtems_rfs_block_copy_bpos (&map->bpos, bpos);
ffc1bd00: 81 3c 00 00 lwz r9,0(r28)
map->bpos.block = *block;
ffc1bd04: 38 60 00 00 li r3,0
}
}
if (rc == 0)
{
rtems_rfs_block_copy_bpos (&map->bpos, bpos);
ffc1bd08: 91 3f 00 10 stw r9,16(r31)
ffc1bd0c: 81 3c 00 04 lwz r9,4(r28)
ffc1bd10: 91 3f 00 14 stw r9,20(r31)
ffc1bd14: 81 3c 00 08 lwz r9,8(r28)
ffc1bd18: 91 3f 00 18 stw r9,24(r31)
map->bpos.block = *block;
ffc1bd1c: 81 3e 00 00 lwz r9,0(r30)
ffc1bd20: 91 3f 00 18 stw r9,24(r31)
}
return rc;
}
ffc1bd24: 39 61 00 30 addi r11,r1,48
ffc1bd28: 4b fe 58 34 b ffc0155c <_restgpr_27_x>
ffc1bdfc <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)
{
ffc1bdfc: 94 21 ff b8 stwu r1,-72(r1)
ffc1be00: 7c 08 02 a6 mflr r0
ffc1be04: be 81 00 18 stmw r20,24(r1)
ffc1be08: 7c 7e 1b 78 mr r30,r3
ffc1be0c: 7c 9f 23 78 mr r31,r4
int b;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_GROW))
ffc1be10: 38 60 00 00 li r3,0
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)
{
ffc1be14: 90 01 00 4c stw r0,76(r1)
int b;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_GROW))
ffc1be18: 38 80 20 00 li r4,8192
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)
{
ffc1be1c: 7c b8 2b 78 mr r24,r5
ffc1be20: 7c d4 33 78 mr r20,r6
int b;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_GROW))
ffc1be24: 4b ff 85 a5 bl ffc143c8 <rtems_rfs_trace>
ffc1be28: 2f 83 00 00 cmpwi cr7,r3,0
ffc1be2c: 41 be 00 1c beq+ cr7,ffc1be48 <rtems_rfs_block_map_grow+0x4c><== ALWAYS TAKEN
printf ("rtems-rfs: block-map-grow: entry: blocks=%zd count=%" PRIu32 "\n",
ffc1be30: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1be34: 80 bf 00 08 lwz r5,8(r31) <== NOT EXECUTED
ffc1be38: 38 63 5d 66 addi r3,r3,23910 <== NOT EXECUTED
ffc1be3c: 7f 04 c3 78 mr r4,r24 <== NOT EXECUTED
ffc1be40: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1be44: 48 00 7b 49 bl ffc2398c <printf> <== NOT EXECUTED
blocks, map->size.count);
if ((map->size.count + blocks) >= rtems_rfs_fs_max_block_map_blocks (fs))
ffc1be48: 81 3f 00 08 lwz r9,8(r31)
return EFBIG;
ffc1be4c: 3b a0 00 1b li r29,27
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))
ffc1be50: 7d 58 4a 14 add r10,r24,r9
ffc1be54: 81 3e 00 3c lwz r9,60(r30)
ffc1be58: 7f 8a 48 40 cmplw cr7,r10,r9
ffc1be5c: 40 bc 03 30 bge+ cr7,ffc1c18c <rtems_rfs_block_map_grow+0x390><== NEVER TAKEN
ffc1be60: 48 00 03 10 b ffc1c170 <rtems_rfs_block_map_grow+0x374>
/*
* 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,
ffc1be64: 80 9f 00 20 lwz r4,32(r31)
ffc1be68: 7f c3 f3 78 mr r3,r30
ffc1be6c: 38 a0 00 00 li r5,0
ffc1be70: 38 c1 00 0c addi r6,r1,12
ffc1be74: 4b ff 65 01 bl ffc12374 <rtems_rfs_group_bitmap_alloc>
false, &block);
if (rc > 0)
ffc1be78: 7c 7d 1b 79 mr. r29,r3
ffc1be7c: 41 81 03 10 bgt- ffc1c18c <rtems_rfs_block_map_grow+0x390>
return rc;
if (map->size.count < RTEMS_RFS_INODE_BLOCKS)
ffc1be80: 80 ff 00 08 lwz r7,8(r31)
ffc1be84: 2b 87 00 04 cmplwi cr7,r7,4
ffc1be88: 41 9d 00 1c bgt- cr7,ffc1bea4 <rtems_rfs_block_map_grow+0xa8>
map->blocks[map->size.count] = block;
ffc1be8c: 38 e7 00 08 addi r7,r7,8
ffc1be90: 81 21 00 0c lwz r9,12(r1)
ffc1be94: 54 e7 10 3a rlwinm r7,r7,2,0,29
ffc1be98: 7c ff 3a 14 add r7,r31,r7
ffc1be9c: 91 27 00 04 stw r9,4(r7)
ffc1bea0: 48 00 02 9c b ffc1c13c <rtems_rfs_block_map_grow+0x340>
* 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;
ffc1bea4: 83 3e 00 34 lwz r25,52(r30)
singly = map->size.count / fs->blocks_per_block;
if (map->size.count < fs->block_map_singly_blocks)
ffc1bea8: 81 5e 00 38 lwz r10,56(r30)
* 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;
ffc1beac: 7d 27 cb 96 divwu r9,r7,r25
singly = map->size.count / fs->blocks_per_block;
if (map->size.count < fs->block_map_singly_blocks)
ffc1beb0: 7f 87 50 40 cmplw cr7,r7,r10
* 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;
ffc1beb4: 7e a9 c9 d6 mullw r21,r9,r25
ffc1beb8: 7e b5 38 51 subf. r21,r21,r7
singly = map->size.count / fs->blocks_per_block;
if (map->size.count < fs->block_map_singly_blocks)
ffc1bebc: 40 9c 00 78 bge- cr7,ffc1bf34 <rtems_rfs_block_map_grow+0x138><== 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) ||
ffc1bec0: 41 82 00 14 beq- ffc1bed4 <rtems_rfs_block_map_grow+0xd8><== NEVER TAKEN
ffc1bec4: 2f 89 00 00 cmpwi cr7,r9,0
ffc1bec8: 40 9e 00 3c bne- cr7,ffc1bf04 <rtems_rfs_block_map_grow+0x108><== NEVER TAKEN
((singly == 0) && (direct == RTEMS_RFS_INODE_BLOCKS)))
ffc1becc: 2f 95 00 05 cmpwi cr7,r21,5
ffc1bed0: 40 be 00 34 bne+ cr7,ffc1bf04 <rtems_rfs_block_map_grow+0x108>
*/
bool upping;
upping = map->size.count == RTEMS_RFS_INODE_BLOCKS;
rc = rtems_rfs_block_map_indirect_alloc (fs, map,
&map->singly_buffer,
&map->blocks[singly],
ffc1bed4: 38 c9 00 08 addi r6,r9,8
ffc1bed8: 54 c6 10 3a rlwinm r6,r6,2,0,29
/*
* 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,
ffc1bedc: 68 e7 00 05 xori r7,r7,5
&map->singly_buffer,
&map->blocks[singly],
ffc1bee0: 7c df 32 14 add r6,r31,r6
/*
* 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,
ffc1bee4: 7c e7 00 34 cntlzw r7,r7
ffc1bee8: 7f c3 f3 78 mr r3,r30
ffc1beec: 7f e4 fb 78 mr r4,r31
ffc1bef0: 7f 45 d3 78 mr r5,r26
ffc1bef4: 38 c6 00 04 addi r6,r6,4
ffc1bef8: 54 e7 d9 7e rlwinm r7,r7,27,5,31
ffc1befc: 4b ff f4 f1 bl ffc1b3ec <rtems_rfs_block_map_indirect_alloc>
ffc1bf00: 48 00 00 24 b ffc1bf24 <rtems_rfs_block_map_grow+0x128>
&map->blocks[singly],
upping);
}
else
{
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
ffc1bf04: 39 29 00 08 addi r9,r9,8
ffc1bf08: 55 29 10 3a rlwinm r9,r9,2,0,29
ffc1bf0c: 7d 3f 4a 14 add r9,r31,r9
ffc1bf10: 80 a9 00 04 lwz r5,4(r9)
ffc1bf14: 7f c3 f3 78 mr r3,r30
ffc1bf18: 7f 44 d3 78 mr r4,r26
ffc1bf1c: 38 c0 00 01 li r6,1
ffc1bf20: 48 00 09 1d bl ffc1c83c <rtems_rfs_buffer_handle_request>
map->blocks[singly], true);
}
if (rc > 0)
ffc1bf24: 2f 83 00 00 cmpwi cr7,r3,0
&map->blocks[singly],
upping);
}
else
{
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
ffc1bf28: 7c 7d 1b 78 mr r29,r3
map->blocks[singly], true);
}
if (rc > 0)
ffc1bf2c: 40 bd 01 b8 ble+ cr7,ffc1c0e4 <rtems_rfs_block_map_grow+0x2e8><== ALWAYS TAKEN
ffc1bf30: 48 00 01 a0 b ffc1c0d0 <rtems_rfs_block_map_grow+0x2d4><== NOT EXECUTED
* Doubly indirect tables are being used.
*/
rtems_rfs_block_no doubly;
rtems_rfs_block_no singly_block;
doubly = singly / fs->blocks_per_block;
ffc1bf34: 7f 89 cb 96 divwu r28,r9,r25 <== NOT EXECUTED
singly %= fs->blocks_per_block;
ffc1bf38: 7f 3c c9 d6 mullw r25,r28,r25 <== NOT EXECUTED
ffc1bf3c: 7f 39 48 50 subf r25,r25,r9 <== 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)
ffc1bf40: 40 82 01 10 bne- ffc1c050 <rtems_rfs_block_map_grow+0x254><== NOT EXECUTED
{
rc = rtems_rfs_block_map_indirect_alloc (fs, map,
ffc1bf44: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc1bf48: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED
ffc1bf4c: 7f 45 d3 78 mr r5,r26 <== NOT EXECUTED
ffc1bf50: 38 c1 00 08 addi r6,r1,8 <== NOT EXECUTED
ffc1bf54: 38 e0 00 00 li r7,0 <== NOT EXECUTED
ffc1bf58: 4b ff f4 95 bl ffc1b3ec <rtems_rfs_block_map_indirect_alloc><== NOT EXECUTED
&map->singly_buffer,
&singly_block,
false);
if (rc > 0)
ffc1bf5c: 7c 7d 1b 79 mr. r29,r3 <== NOT EXECUTED
ffc1bf60: 40 a1 00 08 ble+ ffc1bf68 <rtems_rfs_block_map_grow+0x16c><== NOT EXECUTED
ffc1bf64: 48 00 01 6c b ffc1c0d0 <rtems_rfs_block_map_grow+0x2d4><== 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) ||
ffc1bf68: 2f 99 00 00 cmpwi cr7,r25,0 <== NOT EXECUTED
ffc1bf6c: 41 9e 00 14 beq- cr7,ffc1bf80 <rtems_rfs_block_map_grow+0x184><== NOT EXECUTED
ffc1bf70: 2f 9c 00 00 cmpwi cr7,r28,0 <== NOT EXECUTED
ffc1bf74: 40 9e 00 44 bne- cr7,ffc1bfb8 <rtems_rfs_block_map_grow+0x1bc><== NOT EXECUTED
((doubly == 0) && (singly == RTEMS_RFS_INODE_BLOCKS)))
ffc1bf78: 2f 99 00 05 cmpwi cr7,r25,5 <== NOT EXECUTED
ffc1bf7c: 40 be 00 3c bne+ cr7,ffc1bfb8 <rtems_rfs_block_map_grow+0x1bc><== NOT EXECUTED
{
bool upping;
upping = map->size.count == fs->block_map_singly_blocks;
ffc1bf80: 80 ff 00 08 lwz r7,8(r31) <== NOT EXECUTED
rc = rtems_rfs_block_map_indirect_alloc (fs, map,
&map->doubly_buffer,
&map->blocks[doubly],
ffc1bf84: 38 dc 00 08 addi r6,r28,8 <== NOT EXECUTED
*/
if ((singly == 0) ||
((doubly == 0) && (singly == RTEMS_RFS_INODE_BLOCKS)))
{
bool upping;
upping = map->size.count == fs->block_map_singly_blocks;
ffc1bf88: 81 3e 00 38 lwz r9,56(r30) <== NOT EXECUTED
rc = rtems_rfs_block_map_indirect_alloc (fs, map,
&map->doubly_buffer,
&map->blocks[doubly],
ffc1bf8c: 54 c6 10 3a rlwinm r6,r6,2,0,29 <== NOT EXECUTED
ffc1bf90: 7c df 32 14 add r6,r31,r6 <== 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,
ffc1bf94: 7c e7 4a 78 xor r7,r7,r9 <== NOT EXECUTED
ffc1bf98: 7c e7 00 34 cntlzw r7,r7 <== NOT EXECUTED
ffc1bf9c: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc1bfa0: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED
ffc1bfa4: 7e c5 b3 78 mr r5,r22 <== NOT EXECUTED
ffc1bfa8: 38 c6 00 04 addi r6,r6,4 <== NOT EXECUTED
ffc1bfac: 54 e7 d9 7e rlwinm r7,r7,27,5,31 <== NOT EXECUTED
ffc1bfb0: 4b ff f4 3d bl ffc1b3ec <rtems_rfs_block_map_indirect_alloc><== NOT EXECUTED
ffc1bfb4: 48 00 00 24 b ffc1bfd8 <rtems_rfs_block_map_grow+0x1dc><== NOT EXECUTED
return rc;
}
}
else
{
rc = rtems_rfs_buffer_handle_request (fs, &map->doubly_buffer,
ffc1bfb8: 3b 9c 00 08 addi r28,r28,8 <== NOT EXECUTED
ffc1bfbc: 57 9c 10 3a rlwinm r28,r28,2,0,29 <== NOT EXECUTED
ffc1bfc0: 7f 9f e2 14 add r28,r31,r28 <== NOT EXECUTED
ffc1bfc4: 80 bc 00 04 lwz r5,4(r28) <== NOT EXECUTED
ffc1bfc8: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc1bfcc: 7e c4 b3 78 mr r4,r22 <== NOT EXECUTED
ffc1bfd0: 38 c0 00 01 li r6,1 <== NOT EXECUTED
ffc1bfd4: 48 00 08 69 bl ffc1c83c <rtems_rfs_buffer_handle_request><== NOT EXECUTED
map->blocks[doubly], true);
if (rc > 0)
ffc1bfd8: 7c 7d 1b 79 mr. r29,r3 <== NOT EXECUTED
ffc1bfdc: 40 a1 00 18 ble+ ffc1bff4 <rtems_rfs_block_map_grow+0x1f8><== NOT EXECUTED
{
rtems_rfs_group_bitmap_free (fs, false, singly_block);
ffc1bfe0: 80 a1 00 08 lwz r5,8(r1) <== NOT EXECUTED
ffc1bfe4: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc1bfe8: 38 80 00 00 li r4,0 <== NOT EXECUTED
ffc1bfec: 4b ff 65 85 bl ffc12570 <rtems_rfs_group_bitmap_free> <== NOT EXECUTED
ffc1bff0: 48 00 00 e0 b ffc1c0d0 <rtems_rfs_block_map_grow+0x2d4><== NOT EXECUTED
rtems_rfs_group_bitmap_free (fs, false, block);
return rc;
}
}
rtems_rfs_block_set_number (&map->doubly_buffer,
ffc1bff4: 81 3f 00 4c lwz r9,76(r31) <== NOT EXECUTED
ffc1bff8: 57 39 10 3a rlwinm r25,r25,2,0,29 <== NOT EXECUTED
ffc1bffc: 89 41 00 08 lbz r10,8(r1) <== NOT EXECUTED
ffc1c000: 81 29 00 1c lwz r9,28(r9) <== NOT EXECUTED
ffc1c004: 7d 49 c9 ae stbx r10,r9,r25 <== NOT EXECUTED
ffc1c008: 81 3f 00 4c lwz r9,76(r31) <== NOT EXECUTED
ffc1c00c: a1 41 00 08 lhz r10,8(r1) <== NOT EXECUTED
ffc1c010: 81 29 00 1c lwz r9,28(r9) <== NOT EXECUTED
ffc1c014: 7d 29 ca 14 add r9,r9,r25 <== NOT EXECUTED
ffc1c018: 99 49 00 01 stb r10,1(r9) <== NOT EXECUTED
ffc1c01c: 81 3f 00 4c lwz r9,76(r31) <== NOT EXECUTED
ffc1c020: 81 49 00 1c lwz r10,28(r9) <== NOT EXECUTED
ffc1c024: 81 21 00 08 lwz r9,8(r1) <== NOT EXECUTED
ffc1c028: 7d 4a ca 14 add r10,r10,r25 <== NOT EXECUTED
ffc1c02c: 55 29 c2 3e rlwinm r9,r9,24,8,31 <== NOT EXECUTED
ffc1c030: 99 2a 00 02 stb r9,2(r10) <== NOT EXECUTED
ffc1c034: 81 3f 00 4c lwz r9,76(r31) <== NOT EXECUTED
ffc1c038: 81 41 00 08 lwz r10,8(r1) <== NOT EXECUTED
ffc1c03c: 81 29 00 1c lwz r9,28(r9) <== NOT EXECUTED
ffc1c040: 7f 29 ca 14 add r25,r9,r25 <== NOT EXECUTED
ffc1c044: 99 59 00 03 stb r10,3(r25) <== NOT EXECUTED
ffc1c048: 9a ff 00 44 stb r23,68(r31) <== NOT EXECUTED
ffc1c04c: 48 00 00 98 b ffc1c0e4 <rtems_rfs_block_map_grow+0x2e8><== NOT EXECUTED
singly,
singly_block);
}
else
{
rc = rtems_rfs_buffer_handle_request (fs,
ffc1c050: 3b 9c 00 08 addi r28,r28,8 <== NOT EXECUTED
ffc1c054: 57 9c 10 3a rlwinm r28,r28,2,0,29 <== NOT EXECUTED
ffc1c058: 7f 9f e2 14 add r28,r31,r28 <== NOT EXECUTED
ffc1c05c: 80 bc 00 04 lwz r5,4(r28) <== NOT EXECUTED
ffc1c060: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc1c064: 7e c4 b3 78 mr r4,r22 <== NOT EXECUTED
ffc1c068: 38 c0 00 01 li r6,1 <== NOT EXECUTED
ffc1c06c: 48 00 07 d1 bl ffc1c83c <rtems_rfs_buffer_handle_request><== NOT EXECUTED
&map->doubly_buffer,
map->blocks[doubly],
true);
if (rc > 0)
ffc1c070: 7c 7d 1b 79 mr. r29,r3 <== NOT EXECUTED
ffc1c074: 40 a1 00 08 ble+ ffc1c07c <rtems_rfs_block_map_grow+0x280><== NOT EXECUTED
ffc1c078: 48 00 00 58 b ffc1c0d0 <rtems_rfs_block_map_grow+0x2d4><== NOT EXECUTED
{
rtems_rfs_group_bitmap_free (fs, false, block);
return rc;
}
singly_block = rtems_rfs_block_get_number (&map->doubly_buffer,
ffc1c07c: 81 3f 00 4c lwz r9,76(r31) <== NOT EXECUTED
ffc1c080: 57 39 10 3a rlwinm r25,r25,2,0,29 <== NOT EXECUTED
singly);
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
ffc1c084: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
{
rtems_rfs_group_bitmap_free (fs, false, block);
return rc;
}
singly_block = rtems_rfs_block_get_number (&map->doubly_buffer,
ffc1c088: 81 29 00 1c lwz r9,28(r9) <== NOT EXECUTED
singly);
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
ffc1c08c: 7f 44 d3 78 mr r4,r26 <== NOT EXECUTED
ffc1c090: 38 c0 00 01 li r6,1 <== NOT EXECUTED
{
rtems_rfs_group_bitmap_free (fs, false, block);
return rc;
}
singly_block = rtems_rfs_block_get_number (&map->doubly_buffer,
ffc1c094: 7d 49 ca 14 add r10,r9,r25 <== NOT EXECUTED
ffc1c098: 7c a9 c8 ae lbzx r5,r9,r25 <== NOT EXECUTED
ffc1c09c: 89 0a 00 03 lbz r8,3(r10) <== NOT EXECUTED
ffc1c0a0: 89 2a 00 01 lbz r9,1(r10) <== NOT EXECUTED
ffc1c0a4: 54 a5 c0 0e rlwinm r5,r5,24,0,7 <== NOT EXECUTED
ffc1c0a8: 7d 05 2b 78 or r5,r8,r5 <== NOT EXECUTED
ffc1c0ac: 55 29 80 1e rlwinm r9,r9,16,0,15 <== NOT EXECUTED
ffc1c0b0: 7c a5 4b 78 or r5,r5,r9 <== NOT EXECUTED
ffc1c0b4: 89 2a 00 02 lbz r9,2(r10) <== NOT EXECUTED
ffc1c0b8: 55 29 40 2e rlwinm r9,r9,8,0,23 <== NOT EXECUTED
ffc1c0bc: 7c a5 4b 78 or r5,r5,r9 <== NOT EXECUTED
ffc1c0c0: 90 a1 00 08 stw r5,8(r1) <== NOT EXECUTED
singly);
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
ffc1c0c4: 48 00 07 79 bl ffc1c83c <rtems_rfs_buffer_handle_request><== NOT EXECUTED
singly_block, true);
if (rc > 0)
ffc1c0c8: 7c 7d 1b 79 mr. r29,r3 <== NOT EXECUTED
ffc1c0cc: 40 a1 00 18 ble+ ffc1c0e4 <rtems_rfs_block_map_grow+0x2e8><== NOT EXECUTED
{
rtems_rfs_group_bitmap_free (fs, false, block);
ffc1c0d0: 80 a1 00 0c lwz r5,12(r1) <== NOT EXECUTED
ffc1c0d4: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc1c0d8: 38 80 00 00 li r4,0 <== NOT EXECUTED
ffc1c0dc: 4b ff 64 95 bl ffc12570 <rtems_rfs_group_bitmap_free> <== NOT EXECUTED
ffc1c0e0: 48 00 00 ac b ffc1c18c <rtems_rfs_block_map_grow+0x390><== NOT EXECUTED
return rc;
}
}
}
rtems_rfs_block_set_number (&map->singly_buffer, direct, block);
ffc1c0e4: 81 5f 00 40 lwz r10,64(r31)
ffc1c0e8: 56 a9 10 3a rlwinm r9,r21,2,0,29
ffc1c0ec: 89 01 00 0c lbz r8,12(r1)
ffc1c0f0: 81 4a 00 1c lwz r10,28(r10)
ffc1c0f4: 7d 0a 49 ae stbx r8,r10,r9
ffc1c0f8: 81 5f 00 40 lwz r10,64(r31)
ffc1c0fc: a1 01 00 0c lhz r8,12(r1)
ffc1c100: 81 4a 00 1c lwz r10,28(r10)
ffc1c104: 7d 4a 4a 14 add r10,r10,r9
ffc1c108: 99 0a 00 01 stb r8,1(r10)
ffc1c10c: 81 5f 00 40 lwz r10,64(r31)
ffc1c110: 81 0a 00 1c lwz r8,28(r10)
ffc1c114: 81 41 00 0c lwz r10,12(r1)
ffc1c118: 7d 08 4a 14 add r8,r8,r9
ffc1c11c: 55 4a c2 3e rlwinm r10,r10,24,8,31
ffc1c120: 99 48 00 02 stb r10,2(r8)
ffc1c124: 81 5f 00 40 lwz r10,64(r31)
ffc1c128: 81 4a 00 1c lwz r10,28(r10)
ffc1c12c: 7d 2a 4a 14 add r9,r10,r9
ffc1c130: 81 41 00 0c lwz r10,12(r1)
ffc1c134: 99 49 00 03 stb r10,3(r9)
ffc1c138: 9a ff 00 38 stb r23,56(r31)
}
map->size.count++;
map->size.offset = 0;
if (b == 0)
ffc1c13c: 2f 9b 00 00 cmpwi cr7,r27,0
}
rtems_rfs_block_set_number (&map->singly_buffer, direct, block);
}
map->size.count++;
ffc1c140: 81 3f 00 08 lwz r9,8(r31)
ffc1c144: 39 29 00 01 addi r9,r9,1
ffc1c148: 91 3f 00 08 stw r9,8(r31)
map->size.offset = 0;
ffc1c14c: 39 20 00 00 li r9,0
ffc1c150: 91 3f 00 0c stw r9,12(r31)
ffc1c154: 81 21 00 0c lwz r9,12(r1)
if (b == 0)
ffc1c158: 40 9e 00 08 bne- cr7,ffc1c160 <rtems_rfs_block_map_grow+0x364><== NEVER TAKEN
*new_block = block;
ffc1c15c: 91 34 00 00 stw r9,0(r20)
map->last_data_block = block;
ffc1c160: 91 3f 00 20 stw r9,32(r31)
/*
* 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++)
ffc1c164: 3b 7b 00 01 addi r27,r27,1
map->size.offset = 0;
if (b == 0)
*new_block = block;
map->last_data_block = block;
map->dirty = true;
ffc1c168: 9a ff 00 00 stb r23,0(r31)
ffc1c16c: 48 00 00 14 b ffc1c180 <rtems_rfs_block_map_grow+0x384>
map->last_map_block = new_block;
return 0;
}
int
rtems_rfs_block_map_grow (rtems_rfs_file_system* fs,
ffc1c170: 3b 60 00 00 li r27,0
return rc;
}
}
}
rtems_rfs_block_set_number (&map->singly_buffer, direct, block);
ffc1c174: 3a e0 00 01 li r23,1
singly,
singly_block);
}
else
{
rc = rtems_rfs_buffer_handle_request (fs,
ffc1c178: 3a df 00 44 addi r22,r31,68
}
singly_block = rtems_rfs_block_get_number (&map->doubly_buffer,
singly);
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
ffc1c17c: 3b 5f 00 38 addi r26,r31,56
/*
* 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++)
ffc1c180: 7f 9b c0 00 cmpw cr7,r27,r24
ffc1c184: 40 9e fc e0 bne+ cr7,ffc1be64 <rtems_rfs_block_map_grow+0x68>
*new_block = block;
map->last_data_block = block;
map->dirty = true;
}
return 0;
ffc1c188: 3b a0 00 00 li r29,0
}
ffc1c18c: 39 61 00 48 addi r11,r1,72
ffc1c190: 7f a3 eb 78 mr r3,r29
ffc1c194: 4b fe 53 ac b ffc01540 <_restgpr_20_x>
ffc1b3ec <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)
{
ffc1b3ec: 94 21 ff d0 stwu r1,-48(r1)
ffc1b3f0: 7c 08 02 a6 mflr r0
ffc1b3f4: 90 01 00 34 stw r0,52(r1)
ffc1b3f8: bf 41 00 18 stmw r26,24(r1)
ffc1b3fc: 7c 9e 23 78 mr r30,r4
ffc1b400: 7c bf 2b 78 mr r31,r5
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);
ffc1b404: 80 84 00 1c lwz r4,28(r4)
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)
{
ffc1b408: 7c db 33 78 mr r27,r6
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);
ffc1b40c: 38 a0 00 00 li r5,0
ffc1b410: 38 c1 00 08 addi r6,r1,8
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)
{
ffc1b414: 7c 7d 1b 78 mr r29,r3
ffc1b418: 7c fa 3b 78 mr r26,r7
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);
ffc1b41c: 4b ff 6f 59 bl ffc12374 <rtems_rfs_group_bitmap_alloc>
if (rc > 0)
ffc1b420: 7c 7c 1b 79 mr. r28,r3
ffc1b424: 41 a1 01 14 bgt+ ffc1b538 <rtems_rfs_block_map_indirect_alloc+0x14c><== NEVER TAKEN
return rc;
rc = rtems_rfs_buffer_handle_request (fs, buffer, new_block, false);
ffc1b428: 80 a1 00 08 lwz r5,8(r1)
ffc1b42c: 7f a3 eb 78 mr r3,r29
ffc1b430: 7f e4 fb 78 mr r4,r31
ffc1b434: 38 c0 00 00 li r6,0
ffc1b438: 48 00 14 05 bl ffc1c83c <rtems_rfs_buffer_handle_request>
if (rc > 0)
ffc1b43c: 7c 7c 1b 79 mr. r28,r3
ffc1b440: 40 81 00 18 ble- ffc1b458 <rtems_rfs_block_map_indirect_alloc+0x6c><== ALWAYS TAKEN
{
rtems_rfs_group_bitmap_free (fs, false, new_block);
ffc1b444: 80 a1 00 08 lwz r5,8(r1) <== NOT EXECUTED
ffc1b448: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED
ffc1b44c: 38 80 00 00 li r4,0 <== NOT EXECUTED
ffc1b450: 4b ff 71 21 bl ffc12570 <rtems_rfs_group_bitmap_free> <== NOT EXECUTED
ffc1b454: 48 00 00 e4 b ffc1b538 <rtems_rfs_block_map_indirect_alloc+0x14c><== NOT EXECUTED
return rc;
}
memset (rtems_rfs_buffer_data (buffer), 0xff, rtems_rfs_fs_block_size (fs));
ffc1b458: 81 3f 00 08 lwz r9,8(r31)
ffc1b45c: 38 80 00 ff li r4,255
ffc1b460: 80 bd 00 08 lwz r5,8(r29)
ffc1b464: 80 69 00 1c lwz r3,28(r9)
ffc1b468: 48 00 82 c9 bl ffc23730 <memset>
if (upping)
ffc1b46c: 2f 9a 00 00 cmpwi cr7,r26,0
ffc1b470: 41 be 00 b0 beq+ cr7,ffc1b520 <rtems_rfs_block_map_indirect_alloc+0x134><== NEVER TAKEN
{
int b;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_GROW))
ffc1b474: 38 60 00 00 li r3,0
ffc1b478: 38 80 20 00 li r4,8192
ffc1b47c: 4b ff 8f 4d bl ffc143c8 <rtems_rfs_trace>
ffc1b480: 2f 83 00 00 cmpwi cr7,r3,0
ffc1b484: 41 be 00 18 beq+ cr7,ffc1b49c <rtems_rfs_block_map_indirect_alloc+0xb0><== ALWAYS TAKEN
printf ("rtems-rfs: block-map-grow: upping: block-count=%" PRId32 "\n",
ffc1b488: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1b48c: 80 9e 00 08 lwz r4,8(r30) <== NOT EXECUTED
ffc1b490: 38 63 5c e7 addi r3,r3,23783 <== NOT EXECUTED
ffc1b494: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1b498: 48 00 84 f5 bl ffc2398c <printf> <== NOT EXECUTED
map->size.count);
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
rtems_rfs_block_set_number (buffer, b, map->blocks[b]);
ffc1b49c: 39 00 00 05 li r8,5
ffc1b4a0: 7d 09 03 a6 mtctr r8
ffc1b4a4: 7f c9 f3 78 mr r9,r30
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)
{
ffc1b4a8: 39 40 00 00 li r10,0
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]);
ffc1b4ac: 38 e0 00 01 li r7,1
ffc1b4b0: 81 1f 00 08 lwz r8,8(r31)
ffc1b4b4: 88 c9 00 24 lbz r6,36(r9)
ffc1b4b8: 81 08 00 1c lwz r8,28(r8)
ffc1b4bc: 7c c8 51 ae stbx r6,r8,r10
ffc1b4c0: 81 1f 00 08 lwz r8,8(r31)
ffc1b4c4: a0 c9 00 24 lhz r6,36(r9)
ffc1b4c8: 81 08 00 1c lwz r8,28(r8)
ffc1b4cc: 7d 08 52 14 add r8,r8,r10
ffc1b4d0: 98 c8 00 01 stb r6,1(r8)
ffc1b4d4: 81 1f 00 08 lwz r8,8(r31)
ffc1b4d8: 80 c8 00 1c lwz r6,28(r8)
ffc1b4dc: 81 09 00 24 lwz r8,36(r9)
ffc1b4e0: 7c c6 52 14 add r6,r6,r10
ffc1b4e4: 55 08 c2 3e rlwinm r8,r8,24,8,31
ffc1b4e8: 99 06 00 02 stb r8,2(r6)
ffc1b4ec: 81 1f 00 08 lwz r8,8(r31)
ffc1b4f0: 80 c8 00 1c lwz r6,28(r8)
ffc1b4f4: 81 09 00 24 lwz r8,36(r9)
ffc1b4f8: 39 29 00 04 addi r9,r9,4
ffc1b4fc: 7c c6 52 14 add r6,r6,r10
ffc1b500: 99 06 00 03 stb r8,3(r6)
ffc1b504: 39 4a 00 04 addi r10,r10,4
ffc1b508: 98 ff 00 00 stb r7,0(r31)
{
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++)
ffc1b50c: 42 00 ff a4 bdnz+ ffc1b4b0 <rtems_rfs_block_map_indirect_alloc+0xc4>
rtems_rfs_block_set_number (buffer, b, map->blocks[b]);
memset (map->blocks, 0, sizeof (map->blocks));
ffc1b510: 38 7e 00 24 addi r3,r30,36
ffc1b514: 38 80 00 00 li r4,0
ffc1b518: 38 a0 00 14 li r5,20
ffc1b51c: 48 00 82 15 bl ffc23730 <memset>
}
rtems_rfs_buffer_mark_dirty (buffer);
ffc1b520: 39 20 00 01 li r9,1
ffc1b524: 99 3f 00 00 stb r9,0(r31)
*block = new_block;
map->last_map_block = new_block;
return 0;
ffc1b528: 3b 80 00 00 li r28,0
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
rtems_rfs_block_set_number (buffer, b, map->blocks[b]);
memset (map->blocks, 0, sizeof (map->blocks));
}
rtems_rfs_buffer_mark_dirty (buffer);
*block = new_block;
ffc1b52c: 81 21 00 08 lwz r9,8(r1)
ffc1b530: 91 3b 00 00 stw r9,0(r27)
map->last_map_block = new_block;
ffc1b534: 91 3e 00 1c stw r9,28(r30)
return 0;
}
ffc1b538: 39 61 00 30 addi r11,r1,48
ffc1b53c: 7f 83 e3 78 mr r3,r28
ffc1b540: 4b fe 60 18 b ffc01558 <_restgpr_26_x>
ffc1b614 <rtems_rfs_block_map_indirect_shrink.isra.7>:
* 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) ||
ffc1b614: 2c 07 00 00 cmpwi r7,0
* @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,
ffc1b618: 94 21 ff f0 stwu r1,-16(r1)
ffc1b61c: 7c 08 02 a6 mflr r0
ffc1b620: bf c1 00 08 stmw r30,8(r1)
ffc1b624: 7c 9f 23 78 mr r31,r4
ffc1b628: 90 01 00 14 stw r0,20(r1)
* 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) ||
ffc1b62c: 41 82 00 1c beq- ffc1b648 <rtems_rfs_block_map_indirect_shrink.isra.7+0x34><== NEVER TAKEN
ffc1b630: 2f 86 00 00 cmpwi cr7,r6,0
rtems_rfs_block_map* map,
rtems_rfs_buffer_handle* buffer,
rtems_rfs_block_no indirect,
rtems_rfs_block_no index)
{
int rc = 0;
ffc1b634: 39 20 00 00 li r9,0
* 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) ||
ffc1b638: 40 9e 00 ac bne- cr7,ffc1b6e4 <rtems_rfs_block_map_indirect_shrink.isra.7+0xd0><== NEVER TAKEN
((indirect == 0) && (index == RTEMS_RFS_INODE_BLOCKS)))
ffc1b63c: 2f 87 00 05 cmpwi cr7,r7,5
rtems_rfs_block_map* map,
rtems_rfs_buffer_handle* buffer,
rtems_rfs_block_no indirect,
rtems_rfs_block_no index)
{
int rc = 0;
ffc1b640: 7c c9 33 78 mr r9,r6
* 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) ||
((indirect == 0) && (index == RTEMS_RFS_INODE_BLOCKS)))
ffc1b644: 40 be 00 a0 bne+ cr7,ffc1b6e4 <rtems_rfs_block_map_indirect_shrink.isra.7+0xd0>
{
rtems_rfs_block_no block_to_free = map->blocks[indirect];
if ((indirect == 0) && (index == RTEMS_RFS_INODE_BLOCKS))
ffc1b648: 2f 86 00 00 cmpwi cr7,r6,0
* into the inode and free the indirect table's block.
*/
if ((index == 0) ||
((indirect == 0) && (index == RTEMS_RFS_INODE_BLOCKS)))
{
rtems_rfs_block_no block_to_free = map->blocks[indirect];
ffc1b64c: 39 26 00 08 addi r9,r6,8
ffc1b650: 55 28 10 3a rlwinm r8,r9,2,0,29
ffc1b654: 7d 1f 42 14 add r8,r31,r8
ffc1b658: 83 c8 00 04 lwz r30,4(r8)
if ((indirect == 0) && (index == RTEMS_RFS_INODE_BLOCKS))
ffc1b65c: 40 9e 00 60 bne- cr7,ffc1b6bc <rtems_rfs_block_map_indirect_shrink.isra.7+0xa8><== NEVER TAKEN
ffc1b660: 2f 87 00 05 cmpwi cr7,r7,5
ffc1b664: 40 be 00 58 bne+ cr7,ffc1b6bc <rtems_rfs_block_map_indirect_shrink.isra.7+0xa8><== 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);
ffc1b668: 39 00 00 05 li r8,5
ffc1b66c: 81 25 00 00 lwz r9,0(r5)
ffc1b670: 7d 09 03 a6 mtctr r8
ffc1b674: 39 40 00 00 li r10,0
ffc1b678: 81 29 00 1c lwz r9,28(r9)
ffc1b67c: 88 c9 00 00 lbz r6,0(r9)
* @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,
ffc1b680: 7d 1f 52 14 add r8,r31,r10
/*
* 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);
ffc1b684: 88 e9 00 01 lbz r7,1(r9)
ffc1b688: 39 4a 00 04 addi r10,r10,4
ffc1b68c: 54 c6 c0 0e rlwinm r6,r6,24,0,7
ffc1b690: 54 e7 80 1e rlwinm r7,r7,16,0,15
ffc1b694: 7c c7 3b 78 or r7,r6,r7
ffc1b698: 88 c9 00 03 lbz r6,3(r9)
ffc1b69c: 7c e7 33 78 or r7,r7,r6
ffc1b6a0: 88 c9 00 02 lbz r6,2(r9)
ffc1b6a4: 39 29 00 04 addi r9,r9,4
ffc1b6a8: 54 c6 40 2e rlwinm r6,r6,8,0,23
ffc1b6ac: 7c e7 33 78 or r7,r7,r6
ffc1b6b0: 90 e8 00 24 stw r7,36(r8)
{
/*
* Move to direct inode access.
*/
int b;
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
ffc1b6b4: 42 00 ff c8 bdnz+ ffc1b67c <rtems_rfs_block_map_indirect_shrink.isra.7+0x68>
ffc1b6b8: 48 00 00 14 b ffc1b6cc <rtems_rfs_block_map_indirect_shrink.isra.7+0xb8>
else
{
/*
* One less singly indirect block in the inode.
*/
map->blocks[indirect] = 0;
ffc1b6bc: 55 29 10 3a rlwinm r9,r9,2,0,29 <== NOT EXECUTED
ffc1b6c0: 7d 3f 4a 14 add r9,r31,r9 <== NOT EXECUTED
ffc1b6c4: 39 40 00 00 li r10,0 <== NOT EXECUTED
ffc1b6c8: 91 49 00 04 stw r10,4(r9) <== NOT EXECUTED
}
rc = rtems_rfs_group_bitmap_free (fs, false, block_to_free);
ffc1b6cc: 38 80 00 00 li r4,0
ffc1b6d0: 7f c5 f3 78 mr r5,r30
ffc1b6d4: 4b ff 6e 9d bl ffc12570 <rtems_rfs_group_bitmap_free>
if (rc > 0)
ffc1b6d8: 7c 69 1b 79 mr. r9,r3
ffc1b6dc: 41 a1 00 08 bgt+ ffc1b6e4 <rtems_rfs_block_map_indirect_shrink.isra.7+0xd0><== NEVER TAKEN
return rc;
map->last_map_block = block_to_free;
ffc1b6e0: 93 df 00 1c stw r30,28(r31)
}
return rc;
}
ffc1b6e4: 39 61 00 10 addi r11,r1,16
ffc1b6e8: 7d 23 4b 78 mr r3,r9
ffc1b6ec: 4b fe 5e 7c b ffc01568 <_restgpr_30_x>
ffc1b828 <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)
{
ffc1b828: 94 21 ff e0 stwu r1,-32(r1)
ffc1b82c: 7c 08 02 a6 mflr r0
* 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;
ffc1b830: 39 20 00 00 li r9,0
int
rtems_rfs_block_map_open (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* inode,
rtems_rfs_block_map* map)
{
ffc1b834: bf 61 00 0c stmw r27,12(r1)
* 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;
map->inode = NULL;
ffc1b838: 3b c0 00 00 li r30,0
int
rtems_rfs_block_map_open (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* inode,
rtems_rfs_block_map* map)
{
ffc1b83c: 7c 7c 1b 78 mr r28,r3
ffc1b840: 90 01 00 24 stw r0,36(r1)
ffc1b844: 7c 9d 23 78 mr r29,r4
ffc1b848: 7c bf 2b 78 mr r31,r5
* 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;
ffc1b84c: 99 25 00 00 stb r9,0(r5)
map->inode = NULL;
ffc1b850: 93 c5 00 04 stw r30,4(r5)
* @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;
ffc1b854: 93 c5 00 08 stw r30,8(r5)
size->offset = 0;
ffc1b858: 93 c5 00 0c stw r30,12(r5)
* @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;
ffc1b85c: 93 c5 00 10 stw r30,16(r5)
bpos->boff = 0;
ffc1b860: 93 c5 00 14 stw r30,20(r5)
bpos->block = 0;
ffc1b864: 93 c5 00 18 stw r30,24(r5)
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
ffc1b868: 9b c5 00 38 stb r30,56(r5)
handle->bnum = 0;
ffc1b86c: 93 c5 00 3c stw r30,60(r5)
handle->buffer = NULL;
ffc1b870: 93 c5 00 40 stw r30,64(r5)
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
ffc1b874: 9b c5 00 44 stb r30,68(r5)
handle->bnum = 0;
ffc1b878: 93 c5 00 48 stw r30,72(r5)
handle->buffer = NULL;
ffc1b87c: 93 c5 00 4c stw r30,76(r5)
return rc;
rc = rtems_rfs_buffer_handle_open (fs, &map->doubly_buffer);
if (rc > 0)
return rc;
rc = rtems_rfs_inode_load (fs, inode);
ffc1b880: 4b ff 6f 85 bl ffc12804 <rtems_rfs_inode_load>
if (rc > 0)
ffc1b884: 7c 7b 1b 79 mr. r27,r3
ffc1b888: 41 81 01 1c bgt- ffc1b9a4 <rtems_rfs_block_map_open+0x17c><== NEVER TAKEN
/*
* 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++)
ffc1b88c: 39 00 00 05 li r8,5
/*
* Extract the block and block count data from the inode into the targets
* byte order.
*/
map->inode = inode;
ffc1b890: 93 bf 00 04 stw r29,4(r31)
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
ffc1b894: 7d 09 03 a6 mtctr r8
ffc1b898: 39 40 00 00 li r10,0
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);
}
ffc1b89c: 81 3d 00 0c lwz r9,12(r29)
* @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]);
ffc1b8a0: 38 ea 00 04 addi r7,r10,4
ffc1b8a4: 54 e7 10 3a rlwinm r7,r7,2,0,29
ffc1b8a8: 7c e9 3a 14 add r7,r9,r7
ffc1b8ac: 39 07 00 0c addi r8,r7,12
ffc1b8b0: 88 a7 00 0c lbz r5,12(r7)
ffc1b8b4: 88 e7 00 0d lbz r7,13(r7)
block_size = rtems_rfs_fs_block_size (fs);
return (((uint64_t) (size->count - 1)) * block_size) + offset;
}
int
rtems_rfs_block_map_open (rtems_rfs_file_system* fs,
ffc1b8b8: 55 46 10 3a rlwinm r6,r10,2,0,29
ffc1b8bc: 54 a5 c0 0e rlwinm r5,r5,24,0,7
ffc1b8c0: 54 e7 80 1e rlwinm r7,r7,16,0,15
ffc1b8c4: 7c a5 3b 78 or r5,r5,r7
ffc1b8c8: 88 e8 00 03 lbz r7,3(r8)
ffc1b8cc: 7c df 32 14 add r6,r31,r6
ffc1b8d0: 7c a5 3b 78 or r5,r5,r7
ffc1b8d4: 88 e8 00 02 lbz r7,2(r8)
/*
* 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++)
ffc1b8d8: 39 4a 00 01 addi r10,r10,1
ffc1b8dc: 54 e7 40 2e rlwinm r7,r7,8,0,23
ffc1b8e0: 7c a8 3b 78 or r8,r5,r7
map->blocks[b] = rtems_rfs_inode_get_block (inode, b);
ffc1b8e4: 91 06 00 24 stw r8,36(r6)
/*
* 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++)
ffc1b8e8: 42 00 ff b8 bdnz+ ffc1b8a0 <rtems_rfs_block_map_open+0x78>
* @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);
ffc1b8ec: 89 09 00 0c lbz r8,12(r9)
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);
ffc1b8f0: 7f 83 e3 78 mr r3,r28
ffc1b8f4: 89 49 00 0d lbz r10,13(r9)
ffc1b8f8: 7f a4 eb 78 mr r4,r29
ffc1b8fc: 55 08 c0 0e rlwinm r8,r8,24,0,7
return rc;
}
ffc1b900: 80 01 00 24 lwz r0,36(r1)
ffc1b904: 55 4a 80 1e rlwinm r10,r10,16,0,15
ffc1b908: 7d 0a 53 78 or r10,r8,r10
ffc1b90c: 89 09 00 0f lbz r8,15(r9)
ffc1b910: 7c 08 03 a6 mtlr r0
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);
ffc1b914: 38 a0 00 00 li r5,0
ffc1b918: 7d 4a 43 78 or r10,r10,r8
ffc1b91c: 89 09 00 0e lbz r8,14(r9)
ffc1b920: 55 08 40 2e rlwinm r8,r8,8,0,23
ffc1b924: 7d 4a 43 78 or r10,r10,r8
* byte order.
*/
map->inode = inode;
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
map->blocks[b] = rtems_rfs_inode_get_block (inode, b);
map->size.count = rtems_rfs_inode_get_block_count (inode);
ffc1b928: 91 5f 00 08 stw r10,8(r31)
* @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);
ffc1b92c: 89 49 00 0a lbz r10,10(r9)
ffc1b930: 89 09 00 0b lbz r8,11(r9)
ffc1b934: 55 4a 40 2e rlwinm r10,r10,8,0,23
map->size.offset = rtems_rfs_inode_get_block_offset (inode);
ffc1b938: 7d 4a 43 78 or r10,r10,r8
ffc1b93c: 91 5f 00 0c stw r10,12(r31)
* @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);
ffc1b940: 89 09 00 30 lbz r8,48(r9)
ffc1b944: 89 49 00 31 lbz r10,49(r9)
ffc1b948: 55 08 c0 0e rlwinm r8,r8,24,0,7
ffc1b94c: 55 4a 80 1e rlwinm r10,r10,16,0,15
ffc1b950: 7d 0a 53 78 or r10,r8,r10
ffc1b954: 89 09 00 33 lbz r8,51(r9)
ffc1b958: 7d 4a 43 78 or r10,r10,r8
ffc1b95c: 89 09 00 32 lbz r8,50(r9)
ffc1b960: 55 08 40 2e rlwinm r8,r8,8,0,23
ffc1b964: 7d 4a 43 78 or r10,r10,r8
map->last_map_block = rtems_rfs_inode_get_last_map_block (inode);
ffc1b968: 91 5f 00 1c stw r10,28(r31)
* @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);
ffc1b96c: 89 09 00 34 lbz r8,52(r9)
ffc1b970: 89 49 00 35 lbz r10,53(r9)
ffc1b974: 55 08 c0 0e rlwinm r8,r8,24,0,7
ffc1b978: 55 4a 80 1e rlwinm r10,r10,16,0,15
ffc1b97c: 7d 08 53 78 or r8,r8,r10
ffc1b980: 89 49 00 37 lbz r10,55(r9)
ffc1b984: 7d 08 53 78 or r8,r8,r10
ffc1b988: 89 49 00 36 lbz r10,54(r9)
ffc1b98c: 55 4a 40 2e rlwinm r10,r10,8,0,23
ffc1b990: 7d 09 53 78 or r9,r8,r10
map->last_data_block = rtems_rfs_inode_get_last_data_block (inode);
ffc1b994: 91 3f 00 20 stw r9,32(r31)
rc = rtems_rfs_inode_unload (fs, inode, false);
return rc;
}
ffc1b998: bb 61 00 0c lmw r27,12(r1)
ffc1b99c: 38 21 00 20 addi r1,r1,32
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);
ffc1b9a0: 4b ff 70 0c b ffc129ac <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);
ffc1b9a4: 38 9f 00 38 addi r4,r31,56 <== NOT EXECUTED
ffc1b9a8: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED
ffc1b9ac: 48 00 0c ad bl ffc1c658 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
handle->dirty = false;
ffc1b9b0: 9b df 00 38 stb r30,56(r31) <== 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);
ffc1b9b4: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED
handle->dirty = false;
handle->bnum = 0;
ffc1b9b8: 93 df 00 3c stw r30,60(r31) <== 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);
ffc1b9bc: 38 9f 00 44 addi r4,r31,68 <== NOT EXECUTED
handle->dirty = false;
handle->bnum = 0;
handle->buffer = NULL;
ffc1b9c0: 93 df 00 40 stw r30,64(r31) <== 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);
ffc1b9c4: 48 00 0c 95 bl ffc1c658 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
handle->dirty = false;
ffc1b9c8: 9b df 00 44 stb r30,68(r31) <== NOT EXECUTED
return rc;
}
ffc1b9cc: 39 61 00 20 addi r11,r1,32 <== NOT EXECUTED
handle->bnum = 0;
ffc1b9d0: 93 df 00 48 stw r30,72(r31) <== NOT EXECUTED
ffc1b9d4: 7f 63 db 78 mr r3,r27 <== NOT EXECUTED
handle->buffer = NULL;
ffc1b9d8: 93 df 00 4c stw r30,76(r31) <== NOT EXECUTED
ffc1b9dc: 4b fe 5b 80 b ffc0155c <_restgpr_27_x> <== NOT EXECUTED
ffc1c198 <rtems_rfs_block_map_shrink>:
int
rtems_rfs_block_map_shrink (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
size_t blocks)
{
ffc1c198: 94 21 ff c0 stwu r1,-64(r1)
ffc1c19c: 7c 08 02 a6 mflr r0
ffc1c1a0: be 61 00 0c stmw r19,12(r1)
ffc1c1a4: 7c 7e 1b 78 mr r30,r3
ffc1c1a8: 7c 9f 23 78 mr r31,r4
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_SHRINK))
ffc1c1ac: 38 60 00 00 li r3,0
int
rtems_rfs_block_map_shrink (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
size_t blocks)
{
ffc1c1b0: 90 01 00 44 stw r0,68(r1)
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_SHRINK))
ffc1c1b4: 38 80 40 00 li r4,16384
int
rtems_rfs_block_map_shrink (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
size_t blocks)
{
ffc1c1b8: 7c bd 2b 78 mr r29,r5
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_SHRINK))
ffc1c1bc: 4b ff 82 0d bl ffc143c8 <rtems_rfs_trace>
ffc1c1c0: 2f 83 00 00 cmpwi cr7,r3,0
ffc1c1c4: 41 be 00 1c beq+ cr7,ffc1c1e0 <rtems_rfs_block_map_shrink+0x48><== ALWAYS TAKEN
printf ("rtems-rfs: block-map-shrink: entry: blocks=%zd count=%" PRIu32 "\n",
ffc1c1c8: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1c1cc: 80 bf 00 08 lwz r5,8(r31) <== NOT EXECUTED
ffc1c1d0: 38 63 5d 9e addi r3,r3,23966 <== NOT EXECUTED
ffc1c1d4: 7f a4 eb 78 mr r4,r29 <== NOT EXECUTED
ffc1c1d8: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1c1dc: 48 00 77 b1 bl ffc2398c <printf> <== NOT EXECUTED
blocks, map->size.count);
if (map->size.count == 0)
ffc1c1e0: 81 3f 00 08 lwz r9,8(r31)
ffc1c1e4: 2f 89 00 00 cmpwi cr7,r9,0
ffc1c1e8: 40 be 00 08 bne+ cr7,ffc1c1f0 <rtems_rfs_block_map_shrink+0x58>
ffc1c1ec: 48 00 02 ac b ffc1c498 <rtems_rfs_block_map_shrink+0x300>
ffc1c1f0: 7f 9d 48 40 cmplw cr7,r29,r9
ffc1c1f4: 40 9d 02 18 ble- cr7,ffc1c40c <rtems_rfs_block_map_shrink+0x274><== ALWAYS TAKEN
ffc1c1f8: 7d 3d 4b 78 mr r29,r9 <== NOT EXECUTED
ffc1c1fc: 48 00 02 10 b ffc1c40c <rtems_rfs_block_map_shrink+0x274><== NOT EXECUTED
{
rtems_rfs_block_no block;
rtems_rfs_block_no block_to_free;
int rc;
block = map->size.count - 1;
ffc1c200: 81 5f 00 08 lwz r10,8(r31)
ffc1c204: 39 2a ff ff addi r9,r10,-1
if (block < RTEMS_RFS_INODE_BLOCKS)
ffc1c208: 2b 89 00 04 cmplwi cr7,r9,4
ffc1c20c: 41 9d 00 20 bgt- cr7,ffc1c22c <rtems_rfs_block_map_shrink+0x94>
{
/*
* We have less than RTEMS_RFS_INODE_BLOCKS so they are held in the
* inode.
*/
block_to_free = map->blocks[block];
ffc1c210: 39 2a 00 07 addi r9,r10,7
ffc1c214: 55 29 10 3a rlwinm r9,r9,2,0,29
ffc1c218: 7d 3f 4a 14 add r9,r31,r9
map->blocks[block] = 0;
ffc1c21c: 39 40 00 00 li r10,0
{
/*
* We have less than RTEMS_RFS_INODE_BLOCKS so they are held in the
* inode.
*/
block_to_free = map->blocks[block];
ffc1c220: 83 69 00 04 lwz r27,4(r9)
map->blocks[block] = 0;
ffc1c224: 91 49 00 04 stw r10,4(r9)
ffc1c228: 48 00 01 a8 b ffc1c3d0 <rtems_rfs_block_map_shrink+0x238>
* table of block numbers.
*/
rtems_rfs_block_no direct;
rtems_rfs_block_no singly;
direct = block % fs->blocks_per_block;
ffc1c22c: 80 fe 00 34 lwz r7,52(r30)
singly = block / fs->blocks_per_block;
if (block < fs->block_map_singly_blocks)
ffc1c230: 81 5e 00 38 lwz r10,56(r30)
* table of block numbers.
*/
rtems_rfs_block_no direct;
rtems_rfs_block_no singly;
direct = block % fs->blocks_per_block;
ffc1c234: 7f 89 3b 96 divwu r28,r9,r7
singly = block / fs->blocks_per_block;
if (block < fs->block_map_singly_blocks)
ffc1c238: 7f 89 50 40 cmplw cr7,r9,r10
* table of block numbers.
*/
rtems_rfs_block_no direct;
rtems_rfs_block_no singly;
direct = block % fs->blocks_per_block;
ffc1c23c: 7f 5c 39 d6 mullw r26,r28,r7
ffc1c240: 7f 5a 48 50 subf r26,r26,r9
singly = block / fs->blocks_per_block;
if (block < fs->block_map_singly_blocks)
ffc1c244: 40 bc 00 7c bge+ cr7,ffc1c2c0 <rtems_rfs_block_map_shrink+0x128><== 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,
ffc1c248: 39 3c 00 08 addi r9,r28,8
ffc1c24c: 55 29 10 3a rlwinm r9,r9,2,0,29
ffc1c250: 7d 3f 4a 14 add r9,r31,r9
ffc1c254: 80 a9 00 04 lwz r5,4(r9)
ffc1c258: 7f c3 f3 78 mr r3,r30
ffc1c25c: 7e e4 bb 78 mr r4,r23
ffc1c260: 38 c0 00 01 li r6,1
ffc1c264: 48 00 05 d9 bl ffc1c83c <rtems_rfs_buffer_handle_request>
map->blocks[singly], true);
if (rc > 0)
ffc1c268: 2c 03 00 00 cmpwi r3,0
ffc1c26c: 41 81 02 30 bgt- ffc1c49c <rtems_rfs_block_map_shrink+0x304><== NEVER TAKEN
return rc;
block_to_free = rtems_rfs_block_get_number (&map->singly_buffer,
ffc1c270: 81 3f 00 40 lwz r9,64(r31)
ffc1c274: 57 4a 10 3a rlwinm r10,r26,2,0,29
direct);
rc = rtems_rfs_block_map_indirect_shrink (fs, map, &map->singly_buffer,
ffc1c278: 7f c3 f3 78 mr r3,r30
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
map->blocks[singly], true);
if (rc > 0)
return rc;
block_to_free = rtems_rfs_block_get_number (&map->singly_buffer,
ffc1c27c: 81 09 00 1c lwz r8,28(r9)
direct);
rc = rtems_rfs_block_map_indirect_shrink (fs, map, &map->singly_buffer,
ffc1c280: 7f e4 fb 78 mr r4,r31
ffc1c284: 7e 85 a3 78 mr r5,r20
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
map->blocks[singly], true);
if (rc > 0)
return rc;
block_to_free = rtems_rfs_block_get_number (&map->singly_buffer,
ffc1c288: 7d 28 52 14 add r9,r8,r10
ffc1c28c: 7f 68 50 ae lbzx r27,r8,r10
ffc1c290: 88 e9 00 03 lbz r7,3(r9)
direct);
rc = rtems_rfs_block_map_indirect_shrink (fs, map, &map->singly_buffer,
ffc1c294: 7f 86 e3 78 mr r6,r28
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
map->blocks[singly], true);
if (rc > 0)
return rc;
block_to_free = rtems_rfs_block_get_number (&map->singly_buffer,
ffc1c298: 89 49 00 01 lbz r10,1(r9)
ffc1c29c: 57 7b c0 0e rlwinm r27,r27,24,0,7
ffc1c2a0: 89 29 00 02 lbz r9,2(r9)
ffc1c2a4: 7c fb db 78 or r27,r7,r27
ffc1c2a8: 55 4a 80 1e rlwinm r10,r10,16,0,15
ffc1c2ac: 7f 7b 53 78 or r27,r27,r10
ffc1c2b0: 55 29 40 2e rlwinm r9,r9,8,0,23
ffc1c2b4: 7f 7b 4b 78 or r27,r27,r9
direct);
rc = rtems_rfs_block_map_indirect_shrink (fs, map, &map->singly_buffer,
ffc1c2b8: 7f 47 d3 78 mr r7,r26
ffc1c2bc: 48 00 01 08 b ffc1c3c4 <rtems_rfs_block_map_shrink+0x22c>
singly, direct);
if (rc)
return rc;
}
else if (block < fs->block_map_doubly_blocks)
ffc1c2c0: 81 5e 00 3c lwz r10,60(r30) <== NOT EXECUTED
ffc1c2c4: 7f 89 50 40 cmplw cr7,r9,r10 <== NOT EXECUTED
ffc1c2c8: 40 9c 01 60 bge- cr7,ffc1c428 <rtems_rfs_block_map_shrink+0x290><== 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;
ffc1c2cc: 7f 3c 3b 96 divwu r25,r28,r7 <== NOT EXECUTED
doubly_singly = singly % fs->blocks_per_block;
rc = rtems_rfs_buffer_handle_request (fs, &map->doubly_buffer,
ffc1c2d0: 39 39 00 08 addi r9,r25,8 <== NOT EXECUTED
ffc1c2d4: 55 29 10 3a rlwinm r9,r9,2,0,29 <== NOT EXECUTED
*/
rtems_rfs_block_no doubly;
rtems_rfs_block_no doubly_singly;
doubly = singly / fs->blocks_per_block;
doubly_singly = singly % fs->blocks_per_block;
ffc1c2d8: 7c f9 39 d6 mullw r7,r25,r7 <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_request (fs, &map->doubly_buffer,
ffc1c2dc: 7d 3f 4a 14 add r9,r31,r9 <== NOT EXECUTED
ffc1c2e0: 80 a9 00 04 lwz r5,4(r9) <== NOT EXECUTED
ffc1c2e4: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc1c2e8: 7e c4 b3 78 mr r4,r22 <== NOT EXECUTED
ffc1c2ec: 38 c0 00 01 li r6,1 <== NOT EXECUTED
*/
rtems_rfs_block_no doubly;
rtems_rfs_block_no doubly_singly;
doubly = singly / fs->blocks_per_block;
doubly_singly = singly % fs->blocks_per_block;
ffc1c2f0: 7f 87 e0 50 subf r28,r7,r28 <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_request (fs, &map->doubly_buffer,
ffc1c2f4: 48 00 05 49 bl ffc1c83c <rtems_rfs_buffer_handle_request><== NOT EXECUTED
map->blocks[doubly], true);
if (rc > 0)
ffc1c2f8: 2c 03 00 00 cmpwi r3,0 <== NOT EXECUTED
ffc1c2fc: 41 81 01 a0 bgt- ffc1c49c <rtems_rfs_block_map_shrink+0x304><== NOT EXECUTED
return rc;
singly = rtems_rfs_block_get_number (&map->doubly_buffer,
ffc1c300: 81 3f 00 4c lwz r9,76(r31) <== NOT EXECUTED
ffc1c304: 57 8a 10 3a rlwinm r10,r28,2,0,29 <== NOT EXECUTED
doubly_singly);
/*
* Read the singly indirect table and get the block number.
*/
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
ffc1c308: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_request (fs, &map->doubly_buffer,
map->blocks[doubly], true);
if (rc > 0)
return rc;
singly = rtems_rfs_block_get_number (&map->doubly_buffer,
ffc1c30c: 81 09 00 1c lwz r8,28(r9) <== NOT EXECUTED
doubly_singly);
/*
* Read the singly indirect table and get the block number.
*/
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
ffc1c310: 7e e4 bb 78 mr r4,r23 <== NOT EXECUTED
ffc1c314: 38 c0 00 01 li r6,1 <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_request (fs, &map->doubly_buffer,
map->blocks[doubly], true);
if (rc > 0)
return rc;
singly = rtems_rfs_block_get_number (&map->doubly_buffer,
ffc1c318: 7d 28 52 14 add r9,r8,r10 <== NOT EXECUTED
ffc1c31c: 7f 08 50 ae lbzx r24,r8,r10 <== NOT EXECUTED
ffc1c320: 88 e9 00 03 lbz r7,3(r9) <== NOT EXECUTED
ffc1c324: 89 49 00 01 lbz r10,1(r9) <== NOT EXECUTED
ffc1c328: 57 18 c0 0e rlwinm r24,r24,24,0,7 <== NOT EXECUTED
ffc1c32c: 89 29 00 02 lbz r9,2(r9) <== NOT EXECUTED
ffc1c330: 7c f8 c3 78 or r24,r7,r24 <== NOT EXECUTED
ffc1c334: 55 4a 80 1e rlwinm r10,r10,16,0,15 <== NOT EXECUTED
ffc1c338: 7f 18 53 78 or r24,r24,r10 <== NOT EXECUTED
ffc1c33c: 55 29 40 2e rlwinm r9,r9,8,0,23 <== NOT EXECUTED
ffc1c340: 7f 18 4b 78 or r24,r24,r9 <== NOT EXECUTED
doubly_singly);
/*
* Read the singly indirect table and get the block number.
*/
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
ffc1c344: 7f 05 c3 78 mr r5,r24 <== NOT EXECUTED
ffc1c348: 48 00 04 f5 bl ffc1c83c <rtems_rfs_buffer_handle_request><== NOT EXECUTED
singly, true);
if (rc > 0)
ffc1c34c: 2c 03 00 00 cmpwi r3,0 <== NOT EXECUTED
ffc1c350: 41 81 01 4c bgt- ffc1c49c <rtems_rfs_block_map_shrink+0x304><== NOT EXECUTED
return rc;
block_to_free = rtems_rfs_block_get_number (&map->singly_buffer,
ffc1c354: 81 3f 00 40 lwz r9,64(r31) <== NOT EXECUTED
ffc1c358: 57 4a 10 3a rlwinm r10,r26,2,0,29 <== NOT EXECUTED
direct);
if (direct == 0)
ffc1c35c: 2f 9a 00 00 cmpwi cr7,r26,0 <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
singly, true);
if (rc > 0)
return rc;
block_to_free = rtems_rfs_block_get_number (&map->singly_buffer,
ffc1c360: 81 09 00 1c lwz r8,28(r9) <== NOT EXECUTED
ffc1c364: 7d 28 52 14 add r9,r8,r10 <== NOT EXECUTED
ffc1c368: 7f 68 50 ae lbzx r27,r8,r10 <== NOT EXECUTED
ffc1c36c: 88 e9 00 03 lbz r7,3(r9) <== NOT EXECUTED
ffc1c370: 89 49 00 01 lbz r10,1(r9) <== NOT EXECUTED
ffc1c374: 57 7b c0 0e rlwinm r27,r27,24,0,7 <== NOT EXECUTED
ffc1c378: 89 29 00 02 lbz r9,2(r9) <== NOT EXECUTED
ffc1c37c: 7c fb db 78 or r27,r7,r27 <== NOT EXECUTED
ffc1c380: 55 4a 80 1e rlwinm r10,r10,16,0,15 <== NOT EXECUTED
ffc1c384: 7f 7b 53 78 or r27,r27,r10 <== NOT EXECUTED
ffc1c388: 55 29 40 2e rlwinm r9,r9,8,0,23 <== NOT EXECUTED
ffc1c38c: 7f 7b 4b 78 or r27,r27,r9 <== NOT EXECUTED
direct);
if (direct == 0)
ffc1c390: 40 be 00 40 bne+ cr7,ffc1c3d0 <rtems_rfs_block_map_shrink+0x238><== NOT EXECUTED
{
rc = rtems_rfs_group_bitmap_free (fs, false, singly);
ffc1c394: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc1c398: 38 80 00 00 li r4,0 <== NOT EXECUTED
ffc1c39c: 7f 05 c3 78 mr r5,r24 <== NOT EXECUTED
ffc1c3a0: 4b ff 61 d1 bl ffc12570 <rtems_rfs_group_bitmap_free> <== NOT EXECUTED
if (rc > 0)
ffc1c3a4: 2c 03 00 00 cmpwi r3,0 <== NOT EXECUTED
ffc1c3a8: 41 81 00 f4 bgt- ffc1c49c <rtems_rfs_block_map_shrink+0x304><== NOT EXECUTED
return rc;
map->last_map_block = singly;
ffc1c3ac: 93 1f 00 1c stw r24,28(r31) <== NOT EXECUTED
rc = rtems_rfs_block_map_indirect_shrink (fs, map, &map->doubly_buffer,
ffc1c3b0: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc1c3b4: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED
ffc1c3b8: 7e a5 ab 78 mr r5,r21 <== NOT EXECUTED
ffc1c3bc: 7f 26 cb 78 mr r6,r25 <== NOT EXECUTED
ffc1c3c0: 7f 87 e3 78 mr r7,r28 <== NOT EXECUTED
ffc1c3c4: 4b ff f2 51 bl ffc1b614 <rtems_rfs_block_map_indirect_shrink.isra.7>
doubly, doubly_singly);
if (rc)
ffc1c3c8: 2c 03 00 00 cmpwi r3,0
ffc1c3cc: 40 82 00 d0 bne- ffc1c49c <rtems_rfs_block_map_shrink+0x304><== NEVER TAKEN
{
rc = EIO;
break;
}
}
rc = rtems_rfs_group_bitmap_free (fs, false, block_to_free);
ffc1c3d0: 7f c3 f3 78 mr r3,r30
ffc1c3d4: 38 80 00 00 li r4,0
ffc1c3d8: 7f 65 db 78 mr r5,r27
ffc1c3dc: 4b ff 61 95 bl ffc12570 <rtems_rfs_group_bitmap_free>
if (rc > 0)
ffc1c3e0: 2c 03 00 00 cmpwi r3,0
ffc1c3e4: 41 81 00 b8 bgt- ffc1c49c <rtems_rfs_block_map_shrink+0x304><== NEVER TAKEN
return rc;
map->size.count--;
ffc1c3e8: 81 3f 00 08 lwz r9,8(r31)
map->size.offset = 0;
map->last_data_block = block_to_free;
map->dirty = true;
blocks--;
ffc1c3ec: 3b bd ff ff addi r29,r29,-1
rc = rtems_rfs_group_bitmap_free (fs, false, block_to_free);
if (rc > 0)
return rc;
map->size.count--;
map->size.offset = 0;
map->last_data_block = block_to_free;
ffc1c3f0: 93 7f 00 20 stw r27,32(r31)
}
}
rc = rtems_rfs_group_bitmap_free (fs, false, block_to_free);
if (rc > 0)
return rc;
map->size.count--;
ffc1c3f4: 39 29 ff ff addi r9,r9,-1
ffc1c3f8: 91 3f 00 08 stw r9,8(r31)
map->size.offset = 0;
ffc1c3fc: 39 20 00 00 li r9,0
ffc1c400: 91 3f 00 0c stw r9,12(r31)
map->last_data_block = block_to_free;
map->dirty = true;
ffc1c404: 9a 7f 00 00 stb r19,0(r31)
ffc1c408: 48 00 00 18 b ffc1c420 <rtems_rfs_block_map_shrink+0x288>
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,
ffc1c40c: 3a df 00 44 addi r22,r31,68
doubly_singly);
/*
* Read the singly indirect table and get the block number.
*/
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
ffc1c410: 3a ff 00 38 addi r23,r31,56
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);
}
ffc1c414: 3a bf 00 4c addi r21,r31,76
ffc1c418: 3a 9f 00 40 addi r20,r31,64
if (rc > 0)
return rc;
map->size.count--;
map->size.offset = 0;
map->last_data_block = block_to_free;
map->dirty = true;
ffc1c41c: 3a 60 00 01 li r19,1
return 0;
if (blocks > map->size.count)
blocks = map->size.count;
while (blocks)
ffc1c420: 2f 9d 00 00 cmpwi cr7,r29,0
ffc1c424: 40 9e fd dc bne+ cr7,ffc1c200 <rtems_rfs_block_map_shrink+0x68>
map->last_data_block = block_to_free;
map->dirty = true;
blocks--;
}
if (map->size.count == 0)
ffc1c428: 81 3f 00 08 lwz r9,8(r31)
ffc1c42c: 2f 89 00 00 cmpwi cr7,r9,0
ffc1c430: 40 9e 00 0c bne- cr7,ffc1c43c <rtems_rfs_block_map_shrink+0x2a4>
{
map->last_map_block = 0;
ffc1c434: 91 3f 00 1c stw r9,28(r31)
map->last_data_block = 0;
ffc1c438: 91 3f 00 20 stw r9,32(r31)
}
/*
* Keep the position inside the map.
*/
if (rtems_rfs_block_pos_past_end (&map->bpos, &map->size))
ffc1c43c: 81 5f 00 10 lwz r10,16(r31)
ffc1c440: 2f 8a 00 00 cmpwi cr7,r10,0
ffc1c444: 41 9e 00 0c beq- cr7,ffc1c450 <rtems_rfs_block_map_shrink+0x2b8>
ffc1c448: 2f 89 00 00 cmpwi cr7,r9,0
ffc1c44c: 41 9e 00 28 beq- cr7,ffc1c474 <rtems_rfs_block_map_shrink+0x2dc><== ALWAYS TAKEN
ffc1c450: 7f 8a 48 40 cmplw cr7,r10,r9
ffc1c454: 40 9c 00 20 bge- cr7,ffc1c474 <rtems_rfs_block_map_shrink+0x2dc>
ffc1c458: 39 09 ff ff addi r8,r9,-1
ffc1c45c: 7f 8a 40 00 cmpw cr7,r10,r8
ffc1c460: 40 be 00 38 bne+ cr7,ffc1c498 <rtems_rfs_block_map_shrink+0x300><== NEVER TAKEN
ffc1c464: 81 1f 00 14 lwz r8,20(r31)
ffc1c468: 81 5f 00 0c lwz r10,12(r31)
ffc1c46c: 7f 88 50 40 cmplw cr7,r8,r10
ffc1c470: 40 9d 00 28 ble- cr7,ffc1c498 <rtems_rfs_block_map_shrink+0x300><== NEVER TAKEN
rtems_rfs_block_size_get_bpos (&map->size, &map->bpos);
ffc1c474: 81 5f 00 0c lwz r10,12(r31)
ffc1c478: 39 00 00 00 li r8,0
ffc1c47c: 91 3f 00 10 stw r9,16(r31)
ffc1c480: 2f 8a 00 00 cmpwi cr7,r10,0
ffc1c484: 91 5f 00 14 stw r10,20(r31)
ffc1c488: 91 1f 00 18 stw r8,24(r31)
ffc1c48c: 41 9e 00 0c beq- cr7,ffc1c498 <rtems_rfs_block_map_shrink+0x300><== ALWAYS TAKEN
ffc1c490: 39 29 ff ff addi r9,r9,-1 <== NOT EXECUTED
ffc1c494: 91 3f 00 10 stw r9,16(r31) <== NOT EXECUTED
return 0;
ffc1c498: 38 60 00 00 li r3,0
}
ffc1c49c: 39 61 00 40 addi r11,r1,64
ffc1c4a0: 4b fe 50 9c b ffc0153c <_restgpr_19_x>
ffc21ba8 <rtems_rfs_buffer_bdbuf_release>:
int
rtems_rfs_buffer_bdbuf_release (rtems_rfs_buffer* buffer,
bool modified)
{
ffc21ba8: 94 21 ff f0 stwu r1,-16(r1)
ffc21bac: 7c 08 02 a6 mflr r0
ffc21bb0: bf c1 00 08 stmw r30,8(r1)
ffc21bb4: 7c 7f 1b 78 mr r31,r3
ffc21bb8: 7c 9e 23 78 mr r30,r4
rtems_status_code sc;
int rc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_RELEASE))
ffc21bbc: 38 60 00 00 li r3,0
}
int
rtems_rfs_buffer_bdbuf_release (rtems_rfs_buffer* buffer,
bool modified)
{
ffc21bc0: 90 01 00 14 stw r0,20(r1)
rtems_status_code sc;
int rc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_RELEASE))
ffc21bc4: 38 80 00 40 li r4,64
ffc21bc8: 4b ff 28 01 bl ffc143c8 <rtems_rfs_trace>
ffc21bcc: 2f 83 00 00 cmpwi cr7,r3,0
ffc21bd0: 41 9e 00 38 beq- cr7,ffc21c08 <rtems_rfs_buffer_bdbuf_release+0x60><== ALWAYS TAKEN
printf ("rtems-rfs: bdbuf-release: block=%" PRIuPTR " bdbuf=%" PRIu32 " %s\n",
ffc21bd4: 2f 9e 00 00 cmpwi cr7,r30,0 <== NOT EXECUTED
ffc21bd8: 80 9f 00 34 lwz r4,52(r31) <== NOT EXECUTED
ffc21bdc: 80 bf 00 18 lwz r5,24(r31) <== NOT EXECUTED
ffc21be0: 41 9e 00 10 beq- cr7,ffc21bf0 <rtems_rfs_buffer_bdbuf_release+0x48><== NOT EXECUTED
ffc21be4: 3c c0 ff c3 lis r6,-61 <== NOT EXECUTED
ffc21be8: 38 c6 72 88 addi r6,r6,29320 <== NOT EXECUTED
ffc21bec: 48 00 00 0c b ffc21bf8 <rtems_rfs_buffer_bdbuf_release+0x50><== NOT EXECUTED
ffc21bf0: 3c c0 ff c3 lis r6,-61 <== NOT EXECUTED
ffc21bf4: 38 c6 43 db addi r6,r6,17371 <== NOT EXECUTED
ffc21bf8: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc21bfc: 38 63 72 93 addi r3,r3,29331 <== NOT EXECUTED
ffc21c00: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc21c04: 48 00 1d 89 bl ffc2398c <printf> <== NOT EXECUTED
((intptr_t) buffer->user),
buffer->block, modified ? "(modified)" : "");
if (modified)
ffc21c08: 2f 9e 00 00 cmpwi cr7,r30,0
sc = rtems_bdbuf_release_modified (buffer);
ffc21c0c: 7f e3 fb 78 mr r3,r31
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_RELEASE))
printf ("rtems-rfs: bdbuf-release: block=%" PRIuPTR " bdbuf=%" PRIu32 " %s\n",
((intptr_t) buffer->user),
buffer->block, modified ? "(modified)" : "");
if (modified)
ffc21c10: 41 9e 00 0c beq- cr7,ffc21c1c <rtems_rfs_buffer_bdbuf_release+0x74>
sc = rtems_bdbuf_release_modified (buffer);
ffc21c14: 4b ff 4c 85 bl ffc16898 <rtems_bdbuf_release_modified>
ffc21c18: 48 00 00 08 b ffc21c20 <rtems_rfs_buffer_bdbuf_release+0x78>
else
sc = rtems_bdbuf_release (buffer);
ffc21c1c: 4b ff 4b a1 bl ffc167bc <rtems_bdbuf_release>
if (sc != RTEMS_SUCCESSFUL)
ffc21c20: 2f 83 00 00 cmpwi cr7,r3,0
#if RTEMS_RFS_BUFFER_ERRORS
printf ("rtems-rfs: buffer-release: bdbuf-%s: %s(%d)\n",
modified ? "modified" : "not-modified",
rtems_status_text (sc), sc);
#endif
rc = EIO;
ffc21c24: 39 20 00 05 li r9,5
if (modified)
sc = rtems_bdbuf_release_modified (buffer);
else
sc = rtems_bdbuf_release (buffer);
if (sc != RTEMS_SUCCESSFUL)
ffc21c28: 40 be 00 08 bne+ cr7,ffc21c30 <rtems_rfs_buffer_bdbuf_release+0x88><== NEVER TAKEN
int
rtems_rfs_buffer_bdbuf_release (rtems_rfs_buffer* buffer,
bool modified)
{
rtems_status_code sc;
int rc = 0;
ffc21c2c: 39 20 00 00 li r9,0
#endif
rc = EIO;
}
return rc;
}
ffc21c30: 39 61 00 10 addi r11,r1,16
ffc21c34: 7d 23 4b 78 mr r3,r9
ffc21c38: 4b fd f9 30 b ffc01568 <_restgpr_30_x>
ffc21b5c <rtems_rfs_buffer_bdbuf_request>:
rtems_rfs_buffer** buffer)
{
rtems_status_code sc;
int rc = 0;
if (read)
ffc21b5c: 2f 85 00 00 cmpwi cr7,r5,0
int
rtems_rfs_buffer_bdbuf_request (rtems_rfs_file_system* fs,
rtems_rfs_buffer_block block,
bool read,
rtems_rfs_buffer** buffer)
{
ffc21b60: 94 21 ff f8 stwu r1,-8(r1)
ffc21b64: 7c 08 02 a6 mflr r0
rtems_status_code sc;
int rc = 0;
if (read)
sc = rtems_bdbuf_read (rtems_rfs_fs_device (fs), block, buffer);
ffc21b68: 7c c5 33 78 mr r5,r6
int
rtems_rfs_buffer_bdbuf_request (rtems_rfs_file_system* fs,
rtems_rfs_buffer_block block,
bool read,
rtems_rfs_buffer** buffer)
{
ffc21b6c: 90 01 00 0c stw r0,12(r1)
ffc21b70: 80 63 00 10 lwz r3,16(r3)
rtems_status_code sc;
int rc = 0;
if (read)
ffc21b74: 41 9e 00 0c beq- cr7,ffc21b80 <rtems_rfs_buffer_bdbuf_request+0x24>
sc = rtems_bdbuf_read (rtems_rfs_fs_device (fs), block, buffer);
ffc21b78: 4b ff 4a 4d bl ffc165c4 <rtems_bdbuf_read>
ffc21b7c: 48 00 00 08 b ffc21b84 <rtems_rfs_buffer_bdbuf_request+0x28>
else
sc = rtems_bdbuf_get (rtems_rfs_fs_device (fs), block, buffer);
ffc21b80: 4b ff 49 6d bl ffc164ec <rtems_bdbuf_get>
if (sc != RTEMS_SUCCESSFUL)
ffc21b84: 2f 83 00 00 cmpwi cr7,r3,0
{
#if RTEMS_RFS_BUFFER_ERRORS
printf ("rtems-rfs: buffer-bdbuf-request: block=%lu: bdbuf-%s: %d: %s\n",
block, read ? "read" : "get", sc, rtems_status_text (sc));
#endif
rc = EIO;
ffc21b88: 39 20 00 05 li r9,5
if (read)
sc = rtems_bdbuf_read (rtems_rfs_fs_device (fs), block, buffer);
else
sc = rtems_bdbuf_get (rtems_rfs_fs_device (fs), block, buffer);
if (sc != RTEMS_SUCCESSFUL)
ffc21b8c: 40 be 00 08 bne+ cr7,ffc21b94 <rtems_rfs_buffer_bdbuf_request+0x38><== NEVER TAKEN
rtems_rfs_buffer_block block,
bool read,
rtems_rfs_buffer** buffer)
{
rtems_status_code sc;
int rc = 0;
ffc21b90: 39 20 00 00 li r9,0
#endif
rc = EIO;
}
return rc;
}
ffc21b94: 80 01 00 0c lwz r0,12(r1)
ffc21b98: 7d 23 4b 78 mr r3,r9
ffc21b9c: 7c 08 03 a6 mtlr r0
ffc21ba0: 38 21 00 08 addi r1,r1,8
ffc21ba4: 4e 80 00 20 blr
ffc1ce88 <rtems_rfs_buffer_close>:
return 0;
}
int
rtems_rfs_buffer_close (rtems_rfs_file_system* fs)
{
ffc1ce88: 94 21 ff f0 stwu r1,-16(r1)
ffc1ce8c: 7c 08 02 a6 mflr r0
int rc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CLOSE))
ffc1ce90: 38 80 00 10 li r4,16
return 0;
}
int
rtems_rfs_buffer_close (rtems_rfs_file_system* fs)
{
ffc1ce94: bf c1 00 08 stmw r30,8(r1)
ffc1ce98: 7c 7e 1b 78 mr r30,r3
int rc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CLOSE))
ffc1ce9c: 38 60 00 00 li r3,0
return 0;
}
int
rtems_rfs_buffer_close (rtems_rfs_file_system* fs)
{
ffc1cea0: 90 01 00 14 stw r0,20(r1)
int rc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CLOSE))
ffc1cea4: 4b ff 75 25 bl ffc143c8 <rtems_rfs_trace>
ffc1cea8: 2f 83 00 00 cmpwi cr7,r3,0
ffc1ceac: 41 be 00 10 beq+ cr7,ffc1cebc <rtems_rfs_buffer_close+0x34><== ALWAYS TAKEN
printf ("rtems-rfs: buffer-close: closing\n");
ffc1ceb0: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1ceb4: 38 63 62 20 addi r3,r3,25120 <== NOT EXECUTED
ffc1ceb8: 48 00 6e 3d bl ffc23cf4 <puts> <== 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));
ffc1cebc: 81 3e 00 10 lwz r9,16(r30)
ffc1cec0: 7f c3 f3 78 mr r3,r30
ffc1cec4: 80 89 00 20 lwz r4,32(r9)
ffc1cec8: 4b ff fe c5 bl ffc1cd8c <rtems_rfs_buffer_setblksize>
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CLOSE))
ffc1cecc: 7c 7f 1b 79 mr. r31,r3
ffc1ced0: 40 81 00 38 ble- ffc1cf08 <rtems_rfs_buffer_close+0x80> <== ALWAYS TAKEN
ffc1ced4: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc1ced8: 38 80 00 10 li r4,16 <== NOT EXECUTED
ffc1cedc: 4b ff 74 ed bl ffc143c8 <rtems_rfs_trace> <== NOT EXECUTED
ffc1cee0: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc1cee4: 41 be 00 24 beq+ cr7,ffc1cf08 <rtems_rfs_buffer_close+0x80><== NOT EXECUTED
printf ("rtems-rfs: buffer-close: set media block size failed: %d: %s\n",
ffc1cee8: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc1ceec: 48 00 7c 8d bl ffc24b78 <strerror> <== NOT EXECUTED
ffc1cef0: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED
ffc1cef4: 7c 65 1b 78 mr r5,r3 <== NOT EXECUTED
ffc1cef8: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1cefc: 38 63 62 41 addi r3,r3,25153 <== NOT EXECUTED
ffc1cf00: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1cf04: 48 00 6a 89 bl ffc2398c <printf> <== NOT EXECUTED
rc, strerror (rc));
if (close (fs->device) < 0)
ffc1cf08: 80 7e 00 0c lwz r3,12(r30)
ffc1cf0c: 4b fe bb 81 bl ffc08a8c <close>
ffc1cf10: 2f 83 00 00 cmpwi cr7,r3,0
ffc1cf14: 40 bc 00 40 bge+ cr7,ffc1cf54 <rtems_rfs_buffer_close+0xcc><== ALWAYS TAKEN
{
rc = errno;
ffc1cf18: 48 00 50 d1 bl ffc21fe8 <__errno> <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CLOSE))
ffc1cf1c: 38 80 00 10 li r4,16 <== NOT EXECUTED
printf ("rtems-rfs: buffer-close: set media block size failed: %d: %s\n",
rc, strerror (rc));
if (close (fs->device) < 0)
{
rc = errno;
ffc1cf20: 83 e3 00 00 lwz r31,0(r3) <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CLOSE))
ffc1cf24: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc1cf28: 4b ff 74 a1 bl ffc143c8 <rtems_rfs_trace> <== NOT EXECUTED
ffc1cf2c: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc1cf30: 41 be 00 24 beq+ cr7,ffc1cf54 <rtems_rfs_buffer_close+0xcc><== NOT EXECUTED
printf ("rtems-rfs: buffer-close: file close failed: %d: %s\n",
ffc1cf34: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc1cf38: 48 00 7c 41 bl ffc24b78 <strerror> <== NOT EXECUTED
ffc1cf3c: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED
ffc1cf40: 7c 65 1b 78 mr r5,r3 <== NOT EXECUTED
ffc1cf44: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1cf48: 38 63 62 7f addi r3,r3,25215 <== NOT EXECUTED
ffc1cf4c: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1cf50: 48 00 6a 3d bl ffc2398c <printf> <== NOT EXECUTED
rc, strerror (rc));
}
return rc;
}
ffc1cf54: 39 61 00 10 addi r11,r1,16
ffc1cf58: 7f e3 fb 78 mr r3,r31
ffc1cf5c: 4b fe 46 0c b ffc01568 <_restgpr_30_x>
ffc1c658 <rtems_rfs_buffer_handle_release>:
}
int
rtems_rfs_buffer_handle_release (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
ffc1c658: 94 21 ff e8 stwu r1,-24(r1)
ffc1c65c: 7c 08 02 a6 mflr r0
ffc1c660: 90 01 00 1c stw r0,28(r1)
int rc = 0;
if (rtems_rfs_buffer_handle_has_block (handle))
ffc1c664: 81 24 00 08 lwz r9,8(r4)
}
int
rtems_rfs_buffer_handle_release (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
ffc1c668: bf a1 00 0c stmw r29,12(r1)
ffc1c66c: 7c 9e 23 78 mr r30,r4
int rc = 0;
if (rtems_rfs_buffer_handle_has_block (handle))
ffc1c670: 2f 89 00 00 cmpwi cr7,r9,0
int
rtems_rfs_buffer_handle_release (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
int rc = 0;
ffc1c674: 3b a0 00 00 li r29,0
if (rtems_rfs_buffer_handle_has_block (handle))
ffc1c678: 41 9e 01 b8 beq- cr7,ffc1c830 <rtems_rfs_buffer_handle_release+0x1d8>
ffc1c67c: 7c 7f 1b 78 mr r31,r3
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_RELEASE))
ffc1c680: 38 80 02 00 li r4,512
ffc1c684: 38 60 00 00 li r3,0
ffc1c688: 4b ff 7d 41 bl ffc143c8 <rtems_rfs_trace>
ffc1c68c: 2f 83 00 00 cmpwi cr7,r3,0
ffc1c690: 41 9e 00 5c beq- cr7,ffc1c6ec <rtems_rfs_buffer_handle_release+0x94><== ALWAYS TAKEN
printf ("rtems-rfs: buffer-release: block=%" PRIu32 " %s refs=%d %s\n",
ffc1c694: 89 3e 00 00 lbz r9,0(r30) <== NOT EXECUTED
ffc1c698: 80 9e 00 04 lwz r4,4(r30) <== NOT EXECUTED
ffc1c69c: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED
ffc1c6a0: 41 9e 00 10 beq- cr7,ffc1c6b0 <rtems_rfs_buffer_handle_release+0x58><== NOT EXECUTED
ffc1c6a4: 3c a0 ff c3 lis r5,-61 <== NOT EXECUTED
ffc1c6a8: 38 a5 5e 4e addi r5,r5,24142 <== NOT EXECUTED
ffc1c6ac: 48 00 00 0c b ffc1c6b8 <rtems_rfs_buffer_handle_release+0x60><== NOT EXECUTED
ffc1c6b0: 3c a0 ff c3 lis r5,-61 <== NOT EXECUTED
ffc1c6b4: 38 a5 43 db addi r5,r5,17371 <== 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" : "");
ffc1c6b8: 81 3e 00 08 lwz r9,8(r30) <== NOT EXECUTED
ffc1c6bc: 80 c9 00 30 lwz r6,48(r9) <== 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",
ffc1c6c0: 2f 86 00 00 cmpwi cr7,r6,0 <== NOT EXECUTED
ffc1c6c4: 40 9e 00 10 bne- cr7,ffc1c6d4 <rtems_rfs_buffer_handle_release+0x7c><== NOT EXECUTED
ffc1c6c8: 3c e0 ff c3 lis r7,-61 <== NOT EXECUTED
ffc1c6cc: 38 e7 5e 56 addi r7,r7,24150 <== NOT EXECUTED
ffc1c6d0: 48 00 00 0c b ffc1c6dc <rtems_rfs_buffer_handle_release+0x84><== NOT EXECUTED
ffc1c6d4: 3c e0 ff c3 lis r7,-61 <== NOT EXECUTED
ffc1c6d8: 38 e7 43 db addi r7,r7,17371 <== NOT EXECUTED
ffc1c6dc: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1c6e0: 38 63 5e 64 addi r3,r3,24164 <== NOT EXECUTED
ffc1c6e4: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1c6e8: 48 00 72 a5 bl ffc2398c <printf> <== 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)
ffc1c6ec: 80 7e 00 08 lwz r3,8(r30)
ffc1c6f0: 81 23 00 30 lwz r9,48(r3)
ffc1c6f4: 2f 89 00 00 cmpwi cr7,r9,0
ffc1c6f8: 40 9d 00 0c ble- cr7,ffc1c704 <rtems_rfs_buffer_handle_release+0xac><== NEVER TAKEN
rtems_rfs_buffer_refs_down (handle);
ffc1c6fc: 39 29 ff ff addi r9,r9,-1
ffc1c700: 91 23 00 30 stw r9,48(r3)
if (rtems_rfs_buffer_refs (handle) == 0)
ffc1c704: 81 23 00 30 lwz r9,48(r3)
int
rtems_rfs_buffer_handle_release (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
int rc = 0;
ffc1c708: 3b a0 00 00 li r29,0
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)
ffc1c70c: 2f 89 00 00 cmpwi cr7,r9,0
ffc1c710: 40 be 01 14 bne+ cr7,ffc1c824 <rtems_rfs_buffer_handle_release+0x1cc>
ffc1c714: 4b ff cd c1 bl ffc194d4 <_Chain_Extract>
{
rtems_chain_extract (rtems_rfs_buffer_link (handle));
fs->buffers_count--;
ffc1c718: 81 3f 00 50 lwz r9,80(r31)
ffc1c71c: 39 29 ff ff addi r9,r9,-1
ffc1c720: 91 3f 00 50 stw r9,80(r31)
if (rtems_rfs_fs_no_local_cache (fs))
ffc1c724: 81 3f 00 00 lwz r9,0(r31)
ffc1c728: 71 27 00 02 andi. r7,r9,2
ffc1c72c: 41 a2 00 1c beq+ ffc1c748 <rtems_rfs_buffer_handle_release+0xf0>
{
handle->buffer->user = (void*) 0;
ffc1c730: 80 7e 00 08 lwz r3,8(r30)
rc = rtems_rfs_buffer_io_release (handle->buffer,
ffc1c734: 88 9e 00 00 lbz r4,0(r30)
rtems_chain_extract (rtems_rfs_buffer_link (handle));
fs->buffers_count--;
if (rtems_rfs_fs_no_local_cache (fs))
{
handle->buffer->user = (void*) 0;
ffc1c738: 93 a3 00 34 stw r29,52(r3)
rc = rtems_rfs_buffer_io_release (handle->buffer,
ffc1c73c: 48 00 54 6d bl ffc21ba8 <rtems_rfs_buffer_bdbuf_release>
ffc1c740: 7c 7d 1b 78 mr r29,r3
ffc1c744: 48 00 00 e0 b ffc1c824 <rtems_rfs_buffer_handle_release+0x1cc>
* 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 +
ffc1c748: 81 5f 00 60 lwz r10,96(r31)
int
rtems_rfs_buffer_handle_release (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
int rc = 0;
ffc1c74c: 7c fd 3b 78 mr r29,r7
* 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 +
ffc1c750: 81 1f 00 70 lwz r8,112(r31)
ffc1c754: 7d 08 52 14 add r8,r8,r10
ffc1c758: 81 5f 00 40 lwz r10,64(r31)
ffc1c75c: 7f 88 50 40 cmplw cr7,r8,r10
ffc1c760: 41 bc 00 88 blt+ cr7,ffc1c7e8 <rtems_rfs_buffer_handle_release+0x190>
fs->release_modified_count) >= fs->max_held_buffers)
{
rtems_rfs_buffer* buffer;
bool modified;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_RELEASE))
ffc1c764: 38 60 00 00 li r3,0
ffc1c768: 38 80 02 00 li r4,512
ffc1c76c: 4b ff 7c 5d bl ffc143c8 <rtems_rfs_trace>
ffc1c770: 2f 83 00 00 cmpwi cr7,r3,0
ffc1c774: 41 be 00 20 beq+ cr7,ffc1c794 <rtems_rfs_buffer_handle_release+0x13c><== ALWAYS TAKEN
printf ("rtems-rfs: buffer-release: local cache overflow:"
ffc1c778: 80 9f 00 70 lwz r4,112(r31) <== NOT EXECUTED
ffc1c77c: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1c780: 81 3f 00 60 lwz r9,96(r31) <== NOT EXECUTED
ffc1c784: 38 63 5e 98 addi r3,r3,24216 <== NOT EXECUTED
ffc1c788: 7c 84 4a 14 add r4,r4,r9 <== NOT EXECUTED
ffc1c78c: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1c790: 48 00 71 fd bl ffc2398c <printf> <== NOT EXECUTED
" %" PRIu32 "\n", fs->release_count + fs->release_modified_count);
if (fs->release_count > fs->release_modified_count)
ffc1c794: 81 5f 00 60 lwz r10,96(r31)
ffc1c798: 81 3f 00 70 lwz r9,112(r31)
ffc1c79c: 7f 8a 48 40 cmplw cr7,r10,r9
ffc1c7a0: 40 9d 00 20 ble- cr7,ffc1c7c0 <rtems_rfs_buffer_handle_release+0x168>
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
ffc1c7a4: 38 7f 00 54 addi r3,r31,84
ffc1c7a8: 4b ff 1c 89 bl ffc0e430 <_Chain_Get>
{
buffer = (rtems_rfs_buffer*) rtems_chain_get (&fs->release);
fs->release_count--;
ffc1c7ac: 81 3f 00 60 lwz r9,96(r31)
modified = false;
ffc1c7b0: 38 80 00 00 li r4,0
" %" PRIu32 "\n", fs->release_count + fs->release_modified_count);
if (fs->release_count > fs->release_modified_count)
{
buffer = (rtems_rfs_buffer*) rtems_chain_get (&fs->release);
fs->release_count--;
ffc1c7b4: 39 29 ff ff addi r9,r9,-1
ffc1c7b8: 91 3f 00 60 stw r9,96(r31)
ffc1c7bc: 48 00 00 1c b ffc1c7d8 <rtems_rfs_buffer_handle_release+0x180>
ffc1c7c0: 38 7f 00 64 addi r3,r31,100
ffc1c7c4: 4b ff 1c 6d bl ffc0e430 <_Chain_Get>
}
else
{
buffer =
(rtems_rfs_buffer*) rtems_chain_get (&fs->release_modified);
fs->release_modified_count--;
ffc1c7c8: 81 3f 00 70 lwz r9,112(r31)
modified = true;
ffc1c7cc: 38 80 00 01 li r4,1
}
else
{
buffer =
(rtems_rfs_buffer*) rtems_chain_get (&fs->release_modified);
fs->release_modified_count--;
ffc1c7d0: 39 29 ff ff addi r9,r9,-1
ffc1c7d4: 91 3f 00 70 stw r9,112(r31)
modified = true;
}
buffer->user = (void*) 0;
ffc1c7d8: 39 20 00 00 li r9,0
ffc1c7dc: 91 23 00 34 stw r9,52(r3)
rc = rtems_rfs_buffer_io_release (buffer, modified);
ffc1c7e0: 48 00 53 c9 bl ffc21ba8 <rtems_rfs_buffer_bdbuf_release>
ffc1c7e4: 7c 7d 1b 78 mr r29,r3
}
if (rtems_rfs_buffer_dirty (handle))
ffc1c7e8: 89 3e 00 00 lbz r9,0(r30)
ffc1c7ec: 80 9e 00 08 lwz r4,8(r30)
ffc1c7f0: 2f 89 00 00 cmpwi cr7,r9,0
ffc1c7f4: 41 9e 00 1c beq- cr7,ffc1c810 <rtems_rfs_buffer_handle_release+0x1b8>
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
ffc1c7f8: 38 7f 00 64 addi r3,r31,100
ffc1c7fc: 4b ff 1c 05 bl ffc0e400 <_Chain_Append>
{
rtems_chain_append (&fs->release_modified,
rtems_rfs_buffer_link (handle));
fs->release_modified_count++;
ffc1c800: 81 3f 00 70 lwz r9,112(r31)
ffc1c804: 39 29 00 01 addi r9,r9,1
ffc1c808: 91 3f 00 70 stw r9,112(r31)
ffc1c80c: 48 00 00 18 b ffc1c824 <rtems_rfs_buffer_handle_release+0x1cc>
ffc1c810: 38 7f 00 54 addi r3,r31,84
ffc1c814: 4b ff 1b ed bl ffc0e400 <_Chain_Append>
}
else
{
rtems_chain_append (&fs->release, rtems_rfs_buffer_link (handle));
fs->release_count++;
ffc1c818: 81 3f 00 60 lwz r9,96(r31)
ffc1c81c: 39 29 00 01 addi r9,r9,1
ffc1c820: 91 3f 00 60 stw r9,96(r31)
}
}
}
handle->buffer = NULL;
ffc1c824: 39 20 00 00 li r9,0
ffc1c828: 91 3e 00 08 stw r9,8(r30)
ffc1c82c: 48 00 00 04 b ffc1c830 <rtems_rfs_buffer_handle_release+0x1d8>
}
return rc;
}
ffc1c830: 39 61 00 18 addi r11,r1,24
ffc1c834: 7f a3 eb 78 mr r3,r29
ffc1c838: 4b fe 4d 2c b ffc01564 <_restgpr_29_x>
ffc1c83c <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)
{
ffc1c83c: 94 21 ff e0 stwu r1,-32(r1)
ffc1c840: 7c 08 02 a6 mflr r0
ffc1c844: 90 01 00 24 stw r0,36(r1)
/*
* 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))
ffc1c848: 81 24 00 08 lwz r9,8(r4)
int
rtems_rfs_buffer_handle_request (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle,
rtems_rfs_buffer_block block,
bool read)
{
ffc1c84c: bf 41 00 08 stmw r26,8(r1)
ffc1c850: 7c 7e 1b 78 mr r30,r3
/*
* 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))
ffc1c854: 2f 89 00 00 cmpwi cr7,r9,0
int
rtems_rfs_buffer_handle_request (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle,
rtems_rfs_buffer_block block,
bool read)
{
ffc1c858: 7c 9f 23 78 mr r31,r4
ffc1c85c: 7c bd 2b 78 mr r29,r5
ffc1c860: 7c db 33 78 mr r27,r6
/*
* 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))
ffc1c864: 41 9e 00 68 beq- cr7,ffc1c8cc <rtems_rfs_buffer_handle_request+0x90>
{
/*
* Treat block 0 as special to handle the loading of the super block.
*/
if (block && (rtems_rfs_buffer_bnum (handle) == block))
ffc1c868: 2f 85 00 00 cmpwi cr7,r5,0
ffc1c86c: 41 9e 00 14 beq- cr7,ffc1c880 <rtems_rfs_buffer_handle_request+0x44><== NEVER TAKEN
ffc1c870: 81 24 00 04 lwz r9,4(r4)
ffc1c874: 7f 89 28 00 cmpw cr7,r9,r5
ffc1c878: 40 be 00 08 bne+ cr7,ffc1c880 <rtems_rfs_buffer_handle_request+0x44>
ffc1c87c: 48 00 02 54 b ffc1cad0 <rtems_rfs_buffer_handle_request+0x294>
return 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
ffc1c880: 38 60 00 00 li r3,0
ffc1c884: 38 80 01 00 li r4,256
ffc1c888: 4b ff 7b 41 bl ffc143c8 <rtems_rfs_trace>
ffc1c88c: 2f 83 00 00 cmpwi cr7,r3,0
ffc1c890: 41 be 00 18 beq+ cr7,ffc1c8a8 <rtems_rfs_buffer_handle_request+0x6c><== ALWAYS TAKEN
printf ("rtems-rfs: buffer-request: handle has buffer: %" PRIu32 "\n",
ffc1c894: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1c898: 80 9f 00 04 lwz r4,4(r31) <== NOT EXECUTED
ffc1c89c: 38 63 5e d2 addi r3,r3,24274 <== NOT EXECUTED
ffc1c8a0: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1c8a4: 48 00 70 e9 bl ffc2398c <printf> <== NOT EXECUTED
rtems_rfs_buffer_bnum (handle));
rc = rtems_rfs_buffer_handle_release (fs, handle);
ffc1c8a8: 7f c3 f3 78 mr r3,r30
ffc1c8ac: 7f e4 fb 78 mr r4,r31
ffc1c8b0: 4b ff fd a9 bl ffc1c658 <rtems_rfs_buffer_handle_release>
if (rc > 0)
ffc1c8b4: 7c 7c 1b 79 mr. r28,r3
ffc1c8b8: 41 a1 02 1c bgt+ ffc1cad4 <rtems_rfs_buffer_handle_request+0x298><== NEVER TAKEN
return rc;
handle->dirty = false;
ffc1c8bc: 39 20 00 00 li r9,0
ffc1c8c0: 99 3f 00 00 stb r9,0(r31)
handle->bnum = 0;
ffc1c8c4: 39 20 00 00 li r9,0
ffc1c8c8: 91 3f 00 04 stw r9,4(r31)
}
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
ffc1c8cc: 38 60 00 00 li r3,0
ffc1c8d0: 38 80 01 00 li r4,256
ffc1c8d4: 4b ff 7a f5 bl ffc143c8 <rtems_rfs_trace>
ffc1c8d8: 2f 83 00 00 cmpwi cr7,r3,0
ffc1c8dc: 41 be 00 18 beq+ cr7,ffc1c8f4 <rtems_rfs_buffer_handle_request+0xb8><== ALWAYS TAKEN
printf ("rtems-rfs: buffer-request: block=%" PRIu32 "\n", block);
ffc1c8e0: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1c8e4: 38 63 5f 05 addi r3,r3,24325 <== NOT EXECUTED
ffc1c8e8: 7f a4 eb 78 mr r4,r29 <== NOT EXECUTED
ffc1c8ec: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1c8f0: 48 00 70 9d bl ffc2398c <printf> <== 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)
ffc1c8f4: 81 3e 00 50 lwz r9,80(r30)
ffc1c8f8: 2f 89 00 00 cmpwi cr7,r9,0
ffc1c8fc: 41 be 00 50 beq+ cr7,ffc1c94c <rtems_rfs_buffer_handle_request+0x110>
{
/*
* Check the active buffer list for shared buffers.
*/
handle->buffer = rtems_rfs_scan_chain (&fs->buffers,
ffc1c900: 38 7e 00 44 addi r3,r30,68
ffc1c904: 38 9e 00 50 addi r4,r30,80
ffc1c908: 7f a5 eb 78 mr r5,r29
ffc1c90c: 4b ff fc 41 bl ffc1c54c <rtems_rfs_scan_chain>
&fs->buffers_count,
block);
if (rtems_rfs_buffer_handle_has_block (handle) &&
ffc1c910: 2f 83 00 00 cmpwi cr7,r3,0
if (fs->buffers_count)
{
/*
* Check the active buffer list for shared buffers.
*/
handle->buffer = rtems_rfs_scan_chain (&fs->buffers,
ffc1c914: 90 7f 00 08 stw r3,8(r31)
&fs->buffers_count,
block);
if (rtems_rfs_buffer_handle_has_block (handle) &&
ffc1c918: 41 9e 00 34 beq- cr7,ffc1c94c <rtems_rfs_buffer_handle_request+0x110>
rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
ffc1c91c: 38 60 00 00 li r3,0
ffc1c920: 38 80 01 00 li r4,256
ffc1c924: 4b ff 7a a5 bl ffc143c8 <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) &&
ffc1c928: 2f 83 00 00 cmpwi cr7,r3,0
ffc1c92c: 41 be 00 20 beq+ cr7,ffc1c94c <rtems_rfs_buffer_handle_request+0x110><== ALWAYS TAKEN
rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
printf ("rtems-rfs: buffer-request: buffer shared: refs: %d\n",
rtems_rfs_buffer_refs (handle) + 1);
ffc1c930: 81 3f 00 08 lwz r9,8(r31) <== 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",
ffc1c934: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1c938: 38 63 5f 2b addi r3,r3,24363 <== NOT EXECUTED
ffc1c93c: 80 89 00 30 lwz r4,48(r9) <== NOT EXECUTED
ffc1c940: 38 84 00 01 addi r4,r4,1 <== NOT EXECUTED
ffc1c944: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1c948: 48 00 70 45 bl ffc2398c <printf> <== 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) &&
ffc1c94c: 81 3e 00 00 lwz r9,0(r30)
ffc1c950: 71 2a 00 02 andi. r10,r9,2
ffc1c954: 40 82 00 6c bne- ffc1c9c0 <rtems_rfs_buffer_handle_request+0x184>
ffc1c958: 81 3f 00 08 lwz r9,8(r31)
ffc1c95c: 2f 89 00 00 cmpwi cr7,r9,0
ffc1c960: 40 be 00 60 bne+ cr7,ffc1c9c0 <rtems_rfs_buffer_handle_request+0x184>
!rtems_rfs_buffer_handle_has_block (handle))
{
/*
* Check the local cache of released buffers.
*/
if (fs->release_count)
ffc1c964: 81 3e 00 60 lwz r9,96(r30)
ffc1c968: 2f 89 00 00 cmpwi cr7,r9,0
ffc1c96c: 41 be 00 18 beq+ cr7,ffc1c984 <rtems_rfs_buffer_handle_request+0x148>
handle->buffer = rtems_rfs_scan_chain (&fs->release,
ffc1c970: 38 7e 00 54 addi r3,r30,84
ffc1c974: 38 9e 00 60 addi r4,r30,96
ffc1c978: 7f a5 eb 78 mr r5,r29
ffc1c97c: 4b ff fb d1 bl ffc1c54c <rtems_rfs_scan_chain>
ffc1c980: 90 7f 00 08 stw r3,8(r31)
&fs->release_count,
block);
if (!rtems_rfs_buffer_handle_has_block (handle) &&
ffc1c984: 81 3f 00 08 lwz r9,8(r31)
ffc1c988: 2f 89 00 00 cmpwi cr7,r9,0
ffc1c98c: 40 be 00 34 bne+ cr7,ffc1c9c0 <rtems_rfs_buffer_handle_request+0x184>
ffc1c990: 81 3e 00 70 lwz r9,112(r30)
ffc1c994: 2f 89 00 00 cmpwi cr7,r9,0
ffc1c998: 41 be 00 28 beq+ cr7,ffc1c9c0 <rtems_rfs_buffer_handle_request+0x184>
fs->release_modified_count)
{
handle->buffer = rtems_rfs_scan_chain (&fs->release_modified,
ffc1c99c: 38 7e 00 64 addi r3,r30,100
ffc1c9a0: 38 9e 00 70 addi r4,r30,112
ffc1c9a4: 7f a5 eb 78 mr r5,r29
ffc1c9a8: 4b ff fb a5 bl ffc1c54c <rtems_rfs_scan_chain>
&fs->release_modified_count,
block);
/*
* If we found a buffer retain the dirty buffer state.
*/
if (rtems_rfs_buffer_handle_has_block (handle))
ffc1c9ac: 2f 83 00 00 cmpwi cr7,r3,0
block);
if (!rtems_rfs_buffer_handle_has_block (handle) &&
fs->release_modified_count)
{
handle->buffer = rtems_rfs_scan_chain (&fs->release_modified,
ffc1c9b0: 90 7f 00 08 stw r3,8(r31)
&fs->release_modified_count,
block);
/*
* If we found a buffer retain the dirty buffer state.
*/
if (rtems_rfs_buffer_handle_has_block (handle))
ffc1c9b4: 41 9e 00 0c beq- cr7,ffc1c9c0 <rtems_rfs_buffer_handle_request+0x184>
rtems_rfs_buffer_mark_dirty (handle);
ffc1c9b8: 39 20 00 01 li r9,1
ffc1c9bc: 99 3f 00 00 stb r9,0(r31)
}
/*
* If not located we request the buffer from the I/O layer.
*/
if (!rtems_rfs_buffer_handle_has_block (handle))
ffc1c9c0: 83 5f 00 08 lwz r26,8(r31)
ffc1c9c4: 2f 9a 00 00 cmpwi cr7,r26,0
ffc1c9c8: 40 be 00 88 bne+ cr7,ffc1ca50 <rtems_rfs_buffer_handle_request+0x214>
{
rc = rtems_rfs_buffer_io_request (fs, block, read, &handle->buffer);
ffc1c9cc: 7f c3 f3 78 mr r3,r30
ffc1c9d0: 7f a4 eb 78 mr r4,r29
ffc1c9d4: 7f 65 db 78 mr r5,r27
ffc1c9d8: 38 df 00 08 addi r6,r31,8
ffc1c9dc: 48 00 51 81 bl ffc21b5c <rtems_rfs_buffer_bdbuf_request>
if (rc > 0)
ffc1c9e0: 7c 7c 1b 79 mr. r28,r3
ffc1c9e4: 40 81 00 60 ble- ffc1ca44 <rtems_rfs_buffer_handle_request+0x208><== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
ffc1c9e8: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc1c9ec: 38 80 01 00 li r4,256 <== NOT EXECUTED
ffc1c9f0: 4b ff 79 d9 bl ffc143c8 <rtems_rfs_trace> <== NOT EXECUTED
ffc1c9f4: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc1c9f8: 41 9e 00 dc beq- cr7,ffc1cad4 <rtems_rfs_buffer_handle_request+0x298><== NOT EXECUTED
printf ("rtems-rfs: buffer-request: block=%" PRIu32 ": bdbuf-%s: %d: %s\n",
ffc1c9fc: 2f 9b 00 00 cmpwi cr7,r27,0 <== NOT EXECUTED
ffc1ca00: 41 9e 00 10 beq- cr7,ffc1ca10 <rtems_rfs_buffer_handle_request+0x1d4><== NOT EXECUTED
ffc1ca04: 3f e0 ff c3 lis r31,-61 <== NOT EXECUTED
ffc1ca08: 3b ff 54 6b addi r31,r31,21611 <== NOT EXECUTED
ffc1ca0c: 48 00 00 0c b ffc1ca18 <rtems_rfs_buffer_handle_request+0x1dc><== NOT EXECUTED
ffc1ca10: 3f e0 ff c3 lis r31,-61 <== NOT EXECUTED
ffc1ca14: 3b ff 5e ce addi r31,r31,24270 <== NOT EXECUTED
ffc1ca18: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED
ffc1ca1c: 48 00 81 5d bl ffc24b78 <strerror> <== NOT EXECUTED
ffc1ca20: 7f a4 eb 78 mr r4,r29 <== NOT EXECUTED
ffc1ca24: 7c 67 1b 78 mr r7,r3 <== NOT EXECUTED
ffc1ca28: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1ca2c: 7f e5 fb 78 mr r5,r31 <== NOT EXECUTED
ffc1ca30: 7f 86 e3 78 mr r6,r28 <== NOT EXECUTED
ffc1ca34: 38 63 5f 5f addi r3,r3,24415 <== NOT EXECUTED
ffc1ca38: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1ca3c: 48 00 6f 51 bl ffc2398c <printf> <== NOT EXECUTED
ffc1ca40: 48 00 00 94 b ffc1cad4 <rtems_rfs_buffer_handle_request+0x298><== NOT EXECUTED
block, read ? "read" : "get", rc, strerror (rc));
return rc;
}
rtems_chain_set_off_chain (rtems_rfs_buffer_link(handle));
ffc1ca44: 81 3f 00 08 lwz r9,8(r31)
ffc1ca48: 93 49 00 04 stw r26,4(r9)
ffc1ca4c: 93 49 00 00 stw r26,0(r9)
}
/*
* Increase the reference count of the buffer.
*/
rtems_rfs_buffer_refs_up (handle);
ffc1ca50: 80 9f 00 08 lwz r4,8(r31)
ffc1ca54: 38 7e 00 44 addi r3,r30,68
ffc1ca58: 81 24 00 30 lwz r9,48(r4)
ffc1ca5c: 39 29 00 01 addi r9,r9,1
ffc1ca60: 91 24 00 30 stw r9,48(r4)
ffc1ca64: 4b ff 19 9d bl ffc0e400 <_Chain_Append>
rtems_chain_append (&fs->buffers, rtems_rfs_buffer_link (handle));
fs->buffers_count++;
ffc1ca68: 81 3e 00 50 lwz r9,80(r30)
handle->buffer->user = (void*) ((intptr_t) block);
handle->bnum = block;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
ffc1ca6c: 38 60 00 00 li r3,0
/*
* Increase the reference count of the buffer.
*/
rtems_rfs_buffer_refs_up (handle);
rtems_chain_append (&fs->buffers, rtems_rfs_buffer_link (handle));
fs->buffers_count++;
ffc1ca70: 39 29 00 01 addi r9,r9,1
ffc1ca74: 91 3e 00 50 stw r9,80(r30)
handle->buffer->user = (void*) ((intptr_t) block);
handle->bnum = block;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
ffc1ca78: 38 80 01 00 li r4,256
*/
rtems_rfs_buffer_refs_up (handle);
rtems_chain_append (&fs->buffers, rtems_rfs_buffer_link (handle));
fs->buffers_count++;
handle->buffer->user = (void*) ((intptr_t) block);
ffc1ca7c: 81 3f 00 08 lwz r9,8(r31)
ffc1ca80: 93 a9 00 34 stw r29,52(r9)
handle->bnum = block;
ffc1ca84: 93 bf 00 04 stw r29,4(r31)
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
ffc1ca88: 4b ff 79 41 bl ffc143c8 <rtems_rfs_trace>
ffc1ca8c: 2f 83 00 00 cmpwi cr7,r3,0
ffc1ca90: 41 9e 00 40 beq- cr7,ffc1cad0 <rtems_rfs_buffer_handle_request+0x294><== ALWAYS TAKEN
printf ("rtems-rfs: buffer-request: block=%" PRIu32 " bdbuf-%s=%" PRIu32 " refs=%d\n",
ffc1ca94: 2f 9b 00 00 cmpwi cr7,r27,0 <== NOT EXECUTED
ffc1ca98: 41 9e 00 10 beq- cr7,ffc1caa8 <rtems_rfs_buffer_handle_request+0x26c><== NOT EXECUTED
ffc1ca9c: 3c a0 ff c3 lis r5,-61 <== NOT EXECUTED
ffc1caa0: 38 a5 54 6b addi r5,r5,21611 <== NOT EXECUTED
ffc1caa4: 48 00 00 0c b ffc1cab0 <rtems_rfs_buffer_handle_request+0x274><== NOT EXECUTED
ffc1caa8: 3c a0 ff c3 lis r5,-61 <== NOT EXECUTED
ffc1caac: 38 a5 5e ce addi r5,r5,24270 <== NOT EXECUTED
block, read ? "read" : "get", handle->buffer->block,
ffc1cab0: 81 3f 00 08 lwz r9,8(r31) <== 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",
ffc1cab4: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1cab8: 38 63 5f 97 addi r3,r3,24471 <== NOT EXECUTED
ffc1cabc: 80 c9 00 18 lwz r6,24(r9) <== NOT EXECUTED
ffc1cac0: 7f a4 eb 78 mr r4,r29 <== NOT EXECUTED
ffc1cac4: 80 e9 00 30 lwz r7,48(r9) <== NOT EXECUTED
ffc1cac8: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1cacc: 48 00 6e c1 bl ffc2398c <printf> <== NOT EXECUTED
block, read ? "read" : "get", handle->buffer->block,
handle->buffer->references);
return 0;
ffc1cad0: 3b 80 00 00 li r28,0
}
ffc1cad4: 39 61 00 20 addi r11,r1,32
ffc1cad8: 7f 83 e3 78 mr r3,r28
ffc1cadc: 4b fe 4a 7c b ffc01558 <_restgpr_26_x>
ffc1cae0 <rtems_rfs_buffer_open>:
return rc;
}
int
rtems_rfs_buffer_open (const char* name, rtems_rfs_file_system* fs)
{
ffc1cae0: 94 21 ff a0 stwu r1,-96(r1)
ffc1cae4: 7c 08 02 a6 mflr r0
ffc1cae8: bf c1 00 58 stmw r30,88(r1)
ffc1caec: 7c 7f 1b 78 mr r31,r3
ffc1caf0: 7c 9e 23 78 mr r30,r4
struct stat st;
#if RTEMS_RFS_USE_LIBBLOCK
int rv;
#endif
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
ffc1caf4: 38 60 00 00 li r3,0
return rc;
}
int
rtems_rfs_buffer_open (const char* name, rtems_rfs_file_system* fs)
{
ffc1caf8: 90 01 00 64 stw r0,100(r1)
struct stat st;
#if RTEMS_RFS_USE_LIBBLOCK
int rv;
#endif
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
ffc1cafc: 38 80 00 20 li r4,32
ffc1cb00: 4b ff 78 c9 bl ffc143c8 <rtems_rfs_trace>
ffc1cb04: 2f 83 00 00 cmpwi cr7,r3,0
ffc1cb08: 41 be 00 18 beq+ cr7,ffc1cb20 <rtems_rfs_buffer_open+0x40><== ALWAYS TAKEN
printf ("rtems-rfs: buffer-open: opening: %s\n", name);
ffc1cb0c: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1cb10: 38 63 5f d2 addi r3,r3,24530 <== NOT EXECUTED
ffc1cb14: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED
ffc1cb18: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1cb1c: 48 00 6e 71 bl ffc2398c <printf> <== NOT EXECUTED
fs->device = open (name, O_RDWR);
ffc1cb20: 7f e3 fb 78 mr r3,r31
ffc1cb24: 38 80 00 02 li r4,2
ffc1cb28: 4c c6 31 82 crclr 4*cr1+eq
ffc1cb2c: 4b fe cf 95 bl ffc09ac0 <open>
if (fs->device < 0)
ffc1cb30: 2f 83 00 00 cmpwi cr7,r3,0
#endif
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
printf ("rtems-rfs: buffer-open: opening: %s\n", name);
fs->device = open (name, O_RDWR);
ffc1cb34: 90 7e 00 0c stw r3,12(r30)
if (fs->device < 0)
ffc1cb38: 40 bc 00 30 bge+ cr7,ffc1cb68 <rtems_rfs_buffer_open+0x88><== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_OPEN))
ffc1cb3c: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc1cb40: 38 80 00 08 li r4,8 <== NOT EXECUTED
ffc1cb44: 4b ff 78 85 bl ffc143c8 <rtems_rfs_trace> <== NOT EXECUTED
ffc1cb48: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc1cb4c: 40 9e 00 08 bne- cr7,ffc1cb54 <rtems_rfs_buffer_open+0x74><== NOT EXECUTED
ffc1cb50: 48 00 00 10 b ffc1cb60 <rtems_rfs_buffer_open+0x80> <== NOT EXECUTED
printf ("rtems-rfs: buffer-open: cannot open file\n");
ffc1cb54: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1cb58: 38 63 5f f7 addi r3,r3,24567 <== NOT EXECUTED
ffc1cb5c: 48 00 71 99 bl ffc23cf4 <puts> <== NOT EXECUTED
return ENXIO;
ffc1cb60: 3b e0 00 06 li r31,6 <== NOT EXECUTED
ffc1cb64: 48 00 00 fc b ffc1cc60 <rtems_rfs_buffer_open+0x180> <== NOT EXECUTED
}
if (fstat (fs->device, &st) < 0)
ffc1cb68: 38 81 00 08 addi r4,r1,8
ffc1cb6c: 4b fe c0 79 bl ffc08be4 <fstat>
ffc1cb70: 2f 83 00 00 cmpwi cr7,r3,0
ffc1cb74: 40 bc 00 40 bge+ cr7,ffc1cbb4 <rtems_rfs_buffer_open+0xd4><== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_OPEN))
ffc1cb78: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc1cb7c: 38 80 00 08 li r4,8 <== NOT EXECUTED
ffc1cb80: 4b ff 78 49 bl ffc143c8 <rtems_rfs_trace> <== NOT EXECUTED
ffc1cb84: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc1cb88: 41 9e ff d8 beq+ cr7,ffc1cb60 <rtems_rfs_buffer_open+0x80><== NOT EXECUTED
printf ("rtems-rfs: buffer-open: stat '%s' failed: %s\n",
name, strerror (errno));
ffc1cb8c: 48 00 54 5d bl ffc21fe8 <__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",
ffc1cb90: 80 63 00 00 lwz r3,0(r3) <== NOT EXECUTED
ffc1cb94: 48 00 7f e5 bl ffc24b78 <strerror> <== NOT EXECUTED
ffc1cb98: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED
ffc1cb9c: 7c 65 1b 78 mr r5,r3 <== NOT EXECUTED
ffc1cba0: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1cba4: 38 63 60 20 addi r3,r3,24608 <== NOT EXECUTED
ffc1cba8: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1cbac: 48 00 6d e1 bl ffc2398c <printf> <== NOT EXECUTED
ffc1cbb0: 4b ff ff b0 b ffc1cb60 <rtems_rfs_buffer_open+0x80> <== NOT EXECUTED
#if RTEMS_RFS_USE_LIBBLOCK
/*
* Is the device a block device ?
*/
if (!S_ISBLK (st.st_mode))
ffc1cbb4: 81 21 00 14 lwz r9,20(r1)
ffc1cbb8: 55 29 04 26 rlwinm r9,r9,0,16,19
ffc1cbbc: 2f 89 60 00 cmpwi cr7,r9,24576
ffc1cbc0: 41 9e 00 30 beq- cr7,ffc1cbf0 <rtems_rfs_buffer_open+0x110><== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_OPEN))
ffc1cbc4: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc1cbc8: 38 80 00 08 li r4,8 <== NOT EXECUTED
ffc1cbcc: 4b ff 77 fd bl ffc143c8 <rtems_rfs_trace> <== NOT EXECUTED
ffc1cbd0: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc1cbd4: 41 9e ff 8c beq+ cr7,ffc1cb60 <rtems_rfs_buffer_open+0x80><== NOT EXECUTED
printf ("rtems-rfs: buffer-open: '%s' is not a block device\n", name);
ffc1cbd8: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1cbdc: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED
ffc1cbe0: 38 63 60 4e addi r3,r3,24654 <== NOT EXECUTED
ffc1cbe4: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1cbe8: 48 00 6d a5 bl ffc2398c <printf> <== NOT EXECUTED
ffc1cbec: 4b ff ff 74 b ffc1cb60 <rtems_rfs_buffer_open+0x80> <== 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);
ffc1cbf0: 80 7e 00 0c lwz r3,12(r30)
ffc1cbf4: 3c 80 40 04 lis r4,16388
ffc1cbf8: 60 84 42 09 ori r4,r4,16905
ffc1cbfc: 38 be 00 10 addi r5,r30,16
ffc1cc00: 4c c6 31 82 crclr 4*cr1+eq
ffc1cc04: 4b fe c1 35 bl ffc08d38 <ioctl>
/*
* Check that device is registred as a block device and lock it.
*/
rv = rtems_disk_fd_get_disk_device (fs->device, &fs->disk);
if (rv != 0)
ffc1cc08: 2f 83 00 00 cmpwi cr7,r3,0
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_OPEN))
ffc1cc0c: 38 60 00 00 li r3,0
/*
* Check that device is registred as a block device and lock it.
*/
rv = rtems_disk_fd_get_disk_device (fs->device, &fs->disk);
if (rv != 0)
ffc1cc10: 41 9e 00 20 beq- cr7,ffc1cc30 <rtems_rfs_buffer_open+0x150><== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_OPEN))
ffc1cc14: 38 80 00 08 li r4,8 <== NOT EXECUTED
ffc1cc18: 4b ff 77 b1 bl ffc143c8 <rtems_rfs_trace> <== NOT EXECUTED
ffc1cc1c: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc1cc20: 41 9e ff 40 beq+ cr7,ffc1cb60 <rtems_rfs_buffer_open+0x80><== NOT EXECUTED
printf ("rtems-rfs: buffer-open: cannot obtain the disk\n");
ffc1cc24: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1cc28: 38 63 60 82 addi r3,r3,24706 <== NOT EXECUTED
ffc1cc2c: 4b ff ff 30 b ffc1cb5c <rtems_rfs_buffer_open+0x7c> <== NOT EXECUTED
#else
fs->media_size = st.st_size;
strcat (fs->name, name);
#endif
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
ffc1cc30: 38 80 00 20 li r4,32
ffc1cc34: 4b ff 77 95 bl ffc143c8 <rtems_rfs_trace>
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;
ffc1cc38: 3b e0 00 00 li r31,0
#else
fs->media_size = st.st_size;
strcat (fs->name, name);
#endif
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
ffc1cc3c: 2f 83 00 00 cmpwi cr7,r3,0
ffc1cc40: 41 be 00 20 beq+ cr7,ffc1cc60 <rtems_rfs_buffer_open+0x180><== ALWAYS TAKEN
printf ("rtems-rfs: buffer-open: blks=%" PRId32 ", blk-size=%" PRId32 "\n",
rtems_rfs_fs_media_blocks (fs),
ffc1cc44: 81 3e 00 10 lwz r9,16(r30) <== 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",
ffc1cc48: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1cc4c: 38 63 60 b1 addi r3,r3,24753 <== NOT EXECUTED
ffc1cc50: 80 89 00 1c lwz r4,28(r9) <== NOT EXECUTED
ffc1cc54: 80 a9 00 20 lwz r5,32(r9) <== NOT EXECUTED
ffc1cc58: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1cc5c: 48 00 6d 31 bl ffc2398c <printf> <== NOT EXECUTED
rtems_rfs_fs_media_blocks (fs),
rtems_rfs_fs_media_block_size (fs));
return 0;
}
ffc1cc60: 39 61 00 60 addi r11,r1,96
ffc1cc64: 7f e3 fb 78 mr r3,r31
ffc1cc68: 4b fe 49 00 b ffc01568 <_restgpr_30_x>
ffc1cd8c <rtems_rfs_buffer_setblksize>:
return result;
}
int
rtems_rfs_buffer_setblksize (rtems_rfs_file_system* fs, size_t size)
{
ffc1cd8c: 94 21 ff e8 stwu r1,-24(r1)
ffc1cd90: 7c 08 02 a6 mflr r0
ffc1cd94: bf c1 00 10 stmw r30,16(r1)
ffc1cd98: 7c 7f 1b 78 mr r31,r3
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SETBLKSIZE))
ffc1cd9c: 38 60 00 00 li r3,0
return result;
}
int
rtems_rfs_buffer_setblksize (rtems_rfs_file_system* fs, size_t size)
{
ffc1cda0: 90 81 00 08 stw r4,8(r1)
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SETBLKSIZE))
ffc1cda4: 38 80 04 00 li r4,1024
return result;
}
int
rtems_rfs_buffer_setblksize (rtems_rfs_file_system* fs, size_t size)
{
ffc1cda8: 90 01 00 1c stw r0,28(r1)
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SETBLKSIZE))
ffc1cdac: 4b ff 76 1d bl ffc143c8 <rtems_rfs_trace>
ffc1cdb0: 2f 83 00 00 cmpwi cr7,r3,0
ffc1cdb4: 41 be 00 18 beq+ cr7,ffc1cdcc <rtems_rfs_buffer_setblksize+0x40><== ALWAYS TAKEN
printf ("rtems-rfs: buffer-setblksize: block size: %zu\n", size);
ffc1cdb8: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1cdbc: 80 81 00 08 lwz r4,8(r1) <== NOT EXECUTED
ffc1cdc0: 38 63 61 7a addi r3,r3,24954 <== NOT EXECUTED
ffc1cdc4: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1cdc8: 48 00 6b c5 bl ffc2398c <printf> <== NOT EXECUTED
rc = rtems_rfs_buffers_release (fs);
ffc1cdcc: 7f e3 fb 78 mr r3,r31
ffc1cdd0: 4b ff ff 2d bl ffc1ccfc <rtems_rfs_buffers_release>
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SETBLKSIZE))
ffc1cdd4: 7c 7e 1b 79 mr. r30,r3
ffc1cdd8: 40 81 00 38 ble- ffc1ce10 <rtems_rfs_buffer_setblksize+0x84><== ALWAYS TAKEN
ffc1cddc: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc1cde0: 38 80 04 00 li r4,1024 <== NOT EXECUTED
ffc1cde4: 4b ff 75 e5 bl ffc143c8 <rtems_rfs_trace> <== NOT EXECUTED
ffc1cde8: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc1cdec: 41 be 00 24 beq+ cr7,ffc1ce10 <rtems_rfs_buffer_setblksize+0x84><== NOT EXECUTED
printf ("rtems-rfs: buffer-setblksize: buffer release failed: %d: %s\n",
ffc1cdf0: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc1cdf4: 48 00 7d 85 bl ffc24b78 <strerror> <== NOT EXECUTED
ffc1cdf8: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED
ffc1cdfc: 7c 65 1b 78 mr r5,r3 <== NOT EXECUTED
ffc1ce00: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1ce04: 38 63 61 a9 addi r3,r3,25001 <== NOT EXECUTED
ffc1ce08: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1ce0c: 48 00 6b 81 bl ffc2398c <printf> <== NOT EXECUTED
rc, strerror (rc));
rc = rtems_rfs_buffer_sync (fs);
ffc1ce10: 7f e3 fb 78 mr r3,r31
ffc1ce14: 4b ff fe 59 bl ffc1cc6c <rtems_rfs_buffer_sync>
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SETBLKSIZE))
ffc1ce18: 7c 7e 1b 79 mr. r30,r3
ffc1ce1c: 40 81 00 38 ble- ffc1ce54 <rtems_rfs_buffer_setblksize+0xc8><== ALWAYS TAKEN
ffc1ce20: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc1ce24: 38 80 04 00 li r4,1024 <== NOT EXECUTED
ffc1ce28: 4b ff 75 a1 bl ffc143c8 <rtems_rfs_trace> <== NOT EXECUTED
ffc1ce2c: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc1ce30: 41 be 00 24 beq+ cr7,ffc1ce54 <rtems_rfs_buffer_setblksize+0xc8><== NOT EXECUTED
printf ("rtems-rfs: buffer-setblksize: device sync failed: %d: %s\n",
ffc1ce34: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc1ce38: 48 00 7d 41 bl ffc24b78 <strerror> <== NOT EXECUTED
ffc1ce3c: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED
ffc1ce40: 7c 65 1b 78 mr r5,r3 <== NOT EXECUTED
ffc1ce44: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1ce48: 38 63 61 e6 addi r3,r3,25062 <== NOT EXECUTED
ffc1ce4c: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1ce50: 48 00 6b 3d bl ffc2398c <printf> <== NOT EXECUTED
rc, strerror (rc));
#if RTEMS_RFS_USE_LIBBLOCK
rc = fs->disk->ioctl (fs->disk, RTEMS_BLKIO_SETBLKSIZE, &size);
ffc1ce54: 80 7f 00 10 lwz r3,16(r31)
ffc1ce58: 3c 80 80 04 lis r4,-32764
ffc1ce5c: 60 84 42 04 ori r4,r4,16900
ffc1ce60: 81 23 00 38 lwz r9,56(r3)
ffc1ce64: 38 a1 00 08 addi r5,r1,8
ffc1ce68: 7d 29 03 a6 mtctr r9
ffc1ce6c: 4e 80 04 21 bctrl
if (rc < 0)
ffc1ce70: 2c 03 00 00 cmpwi r3,0
ffc1ce74: 40 a0 00 0c bge+ ffc1ce80 <rtems_rfs_buffer_setblksize+0xf4><== ALWAYS TAKEN
rc = errno;
ffc1ce78: 48 00 51 71 bl ffc21fe8 <__errno> <== NOT EXECUTED
ffc1ce7c: 80 63 00 00 lwz r3,0(r3) <== NOT EXECUTED
#endif
return rc;
}
ffc1ce80: 39 61 00 18 addi r11,r1,24
ffc1ce84: 4b fe 46 e4 b ffc01568 <_restgpr_30_x>
ffc1cc6c <rtems_rfs_buffer_sync>:
return rc;
}
int
rtems_rfs_buffer_sync (rtems_rfs_file_system* fs)
{
ffc1cc6c: 94 21 ff e8 stwu r1,-24(r1)
ffc1cc70: 7c 08 02 a6 mflr r0
int result = 0;
#if RTEMS_RFS_USE_LIBBLOCK
rtems_status_code sc;
#endif
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
ffc1cc74: 38 80 00 20 li r4,32
return rc;
}
int
rtems_rfs_buffer_sync (rtems_rfs_file_system* fs)
{
ffc1cc78: bf a1 00 0c stmw r29,12(r1)
ffc1cc7c: 7c 7e 1b 78 mr r30,r3
int result = 0;
#if RTEMS_RFS_USE_LIBBLOCK
rtems_status_code sc;
#endif
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
ffc1cc80: 38 60 00 00 li r3,0
return rc;
}
int
rtems_rfs_buffer_sync (rtems_rfs_file_system* fs)
{
ffc1cc84: 90 01 00 1c stw r0,28(r1)
int result = 0;
#if RTEMS_RFS_USE_LIBBLOCK
rtems_status_code sc;
#endif
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
ffc1cc88: 4b ff 77 41 bl ffc143c8 <rtems_rfs_trace>
ffc1cc8c: 2f 83 00 00 cmpwi cr7,r3,0
ffc1cc90: 41 be 00 10 beq+ cr7,ffc1cca0 <rtems_rfs_buffer_sync+0x34><== ALWAYS TAKEN
printf ("rtems-rfs: buffer-sync: syncing\n");
ffc1cc94: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1cc98: 38 63 60 e1 addi r3,r3,24801 <== NOT EXECUTED
ffc1cc9c: 48 00 70 59 bl ffc23cf4 <puts> <== 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));
ffc1cca0: 80 7e 00 10 lwz r3,16(r30)
}
int
rtems_rfs_buffer_sync (rtems_rfs_file_system* fs)
{
int result = 0;
ffc1cca4: 3b e0 00 00 li r31,0
/*
* @todo Split in the separate files for each type.
*/
#if RTEMS_RFS_USE_LIBBLOCK
sc = rtems_bdbuf_syncdev (rtems_rfs_fs_device (fs));
ffc1cca8: 4b ff 9d 95 bl ffc16a3c <rtems_bdbuf_syncdev>
if (sc != RTEMS_SUCCESSFUL)
ffc1ccac: 7c 7d 1b 79 mr. r29,r3
ffc1ccb0: 41 a2 00 38 beq+ ffc1cce8 <rtems_rfs_buffer_sync+0x7c> <== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
ffc1ccb4: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc1ccb8: 38 80 00 20 li r4,32 <== NOT EXECUTED
ffc1ccbc: 4b ff 77 0d bl ffc143c8 <rtems_rfs_trace> <== NOT EXECUTED
printf ("rtems-rfs: buffer-sync: device sync failed: %s\n",
rtems_status_text (sc));
result = EIO;
ffc1ccc0: 3b e0 00 05 li r31,5 <== 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))
ffc1ccc4: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc1ccc8: 41 be 00 20 beq+ cr7,ffc1cce8 <rtems_rfs_buffer_sync+0x7c><== NOT EXECUTED
printf ("rtems-rfs: buffer-sync: device sync failed: %s\n",
ffc1cccc: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED
ffc1ccd0: 4b ff ae 51 bl ffc17b20 <rtems_status_text> <== NOT EXECUTED
ffc1ccd4: 7c 64 1b 78 mr r4,r3 <== NOT EXECUTED
ffc1ccd8: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1ccdc: 38 63 61 01 addi r3,r3,24833 <== NOT EXECUTED
ffc1cce0: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1cce4: 48 00 6c a9 bl ffc2398c <printf> <== NOT EXECUTED
rtems_status_text (sc));
result = EIO;
}
rtems_disk_release (fs->disk);
ffc1cce8: 80 7e 00 10 lwz r3,16(r30)
ffc1ccec: 4b fe 86 b1 bl ffc0539c <rtems_disk_release>
printf ("rtems-rfs: buffer-sync: file sync failed: %d: %s\n",
result, strerror (result));
}
#endif
return result;
}
ffc1ccf0: 39 61 00 18 addi r11,r1,24
ffc1ccf4: 7f e3 fb 78 mr r3,r31
ffc1ccf8: 4b fe 48 6c b ffc01564 <_restgpr_29_x>
ffc1ccfc <rtems_rfs_buffers_release>:
return rrc;
}
int
rtems_rfs_buffers_release (rtems_rfs_file_system* fs)
{
ffc1ccfc: 94 21 ff f0 stwu r1,-16(r1)
ffc1cd00: 7c 08 02 a6 mflr r0
int rrc = 0;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_RELEASE))
ffc1cd04: 38 80 00 40 li r4,64
return rrc;
}
int
rtems_rfs_buffers_release (rtems_rfs_file_system* fs)
{
ffc1cd08: bf c1 00 08 stmw r30,8(r1)
ffc1cd0c: 7c 7f 1b 78 mr r31,r3
int rrc = 0;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_RELEASE))
ffc1cd10: 38 60 00 00 li r3,0
return rrc;
}
int
rtems_rfs_buffers_release (rtems_rfs_file_system* fs)
{
ffc1cd14: 90 01 00 14 stw r0,20(r1)
int rrc = 0;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_RELEASE))
ffc1cd18: 4b ff 76 b1 bl ffc143c8 <rtems_rfs_trace>
ffc1cd1c: 2f 83 00 00 cmpwi cr7,r3,0
ffc1cd20: 41 be 00 20 beq+ cr7,ffc1cd40 <rtems_rfs_buffers_release+0x44><== ALWAYS TAKEN
printf ("rtems-rfs: buffers-release: active:%" PRIu32 " "
ffc1cd24: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1cd28: 80 9f 00 50 lwz r4,80(r31) <== NOT EXECUTED
ffc1cd2c: 80 bf 00 60 lwz r5,96(r31) <== NOT EXECUTED
ffc1cd30: 38 63 61 31 addi r3,r3,24881 <== NOT EXECUTED
ffc1cd34: 80 df 00 70 lwz r6,112(r31) <== NOT EXECUTED
ffc1cd38: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1cd3c: 48 00 6c 51 bl ffc2398c <printf> <== 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,
ffc1cd40: 38 9f 00 60 addi r4,r31,96
ffc1cd44: 38 a0 00 00 li r5,0
ffc1cd48: 38 7f 00 54 addi r3,r31,84
ffc1cd4c: 4b ff f7 61 bl ffc1c4ac <rtems_rfs_release_chain>
&fs->release_count,
false);
if ((rc > 0) && (rrc == 0))
rrc = rc;
rc = rtems_rfs_release_chain (&fs->release_modified,
ffc1cd50: 38 9f 00 70 addi r4,r31,112
ffc1cd54: 7c 69 18 f8 not r9,r3
ffc1cd58: 7d 29 fe 70 srawi r9,r9,31
ffc1cd5c: 7c 7e 48 38 and r30,r3,r9
ffc1cd60: 38 a0 00 01 li r5,1
ffc1cd64: 38 7f 00 64 addi r3,r31,100
ffc1cd68: 4b ff f7 45 bl ffc1c4ac <rtems_rfs_release_chain>
&fs->release_modified_count,
true);
if ((rc > 0) && (rrc == 0))
ffc1cd6c: 2c 03 00 00 cmpwi r3,0
ffc1cd70: 40 81 00 10 ble- ffc1cd80 <rtems_rfs_buffers_release+0x84><== ALWAYS TAKEN
ffc1cd74: 2f 9e 00 00 cmpwi cr7,r30,0 <== NOT EXECUTED
ffc1cd78: 40 9e 00 08 bne- cr7,ffc1cd80 <rtems_rfs_buffers_release+0x84><== NOT EXECUTED
ffc1cd7c: 7c 7e 1b 78 mr r30,r3 <== NOT EXECUTED
rrc = rc;
return rrc;
}
ffc1cd80: 39 61 00 10 addi r11,r1,16
ffc1cd84: 7f c3 f3 78 mr r3,r30
ffc1cd88: 4b fe 47 e0 b ffc01568 <_restgpr_30_x>
ffc1d498 <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)
{
ffc1d498: 94 21 ff 58 stwu r1,-168(r1)
ffc1d49c: 7c 08 02 a6 mflr r0
ffc1d4a0: be 81 00 78 stmw r20,120(r1)
ffc1d4a4: 7c 7e 1b 78 mr r30,r3
ffc1d4a8: 7c 9d 23 78 mr r29,r4
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))
ffc1d4ac: 38 60 00 00 li r3,0
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)
{
ffc1d4b0: 90 01 00 ac stw r0,172(r1)
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))
ffc1d4b4: 3c 80 20 00 lis r4,8192
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)
{
ffc1d4b8: 7c b9 2b 78 mr r25,r5
ffc1d4bc: 7c dc 33 78 mr r28,r6
ffc1d4c0: 7c f8 3b 78 mr r24,r7
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))
ffc1d4c4: 4b ff 6f 05 bl ffc143c8 <rtems_rfs_trace>
ffc1d4c8: 2f 83 00 00 cmpwi cr7,r3,0
ffc1d4cc: 41 be 00 4c beq+ cr7,ffc1d518 <rtems_rfs_dir_add_entry+0x80><== ALWAYS TAKEN
{
int c;
printf ("rtems-rfs: dir-add-entry: dir=%" PRId32 ", name=",
ffc1d4d0: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1d4d4: 80 9d 00 08 lwz r4,8(r29) <== NOT EXECUTED
ffc1d4d8: 38 63 65 5b addi r3,r3,25947 <== NOT EXECUTED
ffc1d4dc: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1d4e0: 48 00 64 ad bl ffc2398c <printf> <== NOT EXECUTED
ffc1d4e4: 7f 3f cb 78 mr r31,r25 <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
return rc;
}
int
rtems_rfs_dir_add_entry (rtems_rfs_file_system* fs,
ffc1d4e8: 7f 79 e2 14 add r27,r25,r28 <== 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++)
ffc1d4ec: 48 00 00 10 b ffc1d4fc <rtems_rfs_dir_add_entry+0x64><== NOT EXECUTED
printf ("%c", name[c]);
ffc1d4f0: 88 7f 00 00 lbz r3,0(r31) <== NOT EXECUTED
ffc1d4f4: 3b ff 00 01 addi r31,r31,1 <== NOT EXECUTED
ffc1d4f8: 48 00 67 21 bl ffc23c18 <putchar> <== 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++)
ffc1d4fc: 7f 9f d8 00 cmpw cr7,r31,r27 <== NOT EXECUTED
ffc1d500: 40 9e ff f0 bne+ cr7,ffc1d4f0 <rtems_rfs_dir_add_entry+0x58><== NOT EXECUTED
printf ("%c", name[c]);
printf (", len=%zd\n", length);
ffc1d504: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1d508: 38 63 65 84 addi r3,r3,25988 <== NOT EXECUTED
ffc1d50c: 7f 84 e3 78 mr r4,r28 <== NOT EXECUTED
ffc1d510: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1d514: 48 00 64 79 bl ffc2398c <printf> <== NOT EXECUTED
}
rc = rtems_rfs_block_map_open (fs, dir, &map);
ffc1d518: 3a c1 00 08 addi r22,r1,8
ffc1d51c: 7f c3 f3 78 mr r3,r30
ffc1d520: 7f a4 eb 78 mr r4,r29
ffc1d524: 7e c5 b3 78 mr r5,r22
ffc1d528: 4b ff e3 01 bl ffc1b828 <rtems_rfs_block_map_open>
if (rc > 0)
ffc1d52c: 7c 7f 1b 79 mr. r31,r3
ffc1d530: 41 a1 02 f4 bgt+ ffc1d824 <rtems_rfs_dir_add_entry+0x38c><== NEVER TAKEN
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
ffc1d534: 39 20 00 00 li r9,0
ffc1d538: 99 21 00 58 stb r9,88(r1)
handle->bnum = 0;
ffc1d53c: 39 20 00 00 li r9,0
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
ffc1d540: 3a a0 00 00 li r21,0
ffc1d544: 91 21 00 5c stw r9,92(r1)
ffc1d548: 62 b5 ff ff ori r21,r21,65535
{
if ((length + RTEMS_RFS_DIR_ENTRY_SIZE) <
ffc1d54c: 3a 9c 00 0a addi r20,r28,10
handle->buffer = NULL;
ffc1d550: 91 21 00 60 stw r9,96(r1)
* @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;
ffc1d554: 91 21 00 64 stw r9,100(r1)
bpos->boff = 0;
ffc1d558: 91 21 00 68 stw r9,104(r1)
bpos->block = 0;
ffc1d55c: 91 21 00 6c stw r9,108(r1)
/*
* 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);
ffc1d560: 7f c3 f3 78 mr r3,r30
ffc1d564: 7e c4 b3 78 mr r4,r22
ffc1d568: 38 a1 00 64 addi r5,r1,100
ffc1d56c: 38 c1 00 70 addi r6,r1,112
ffc1d570: 4b ff e6 61 bl ffc1bbd0 <rtems_rfs_block_map_find>
if (rc > 0)
ffc1d574: 7c 7f 1b 79 mr. r31,r3
ffc1d578: 40 81 00 98 ble- ffc1d610 <rtems_rfs_dir_add_entry+0x178>
{
if (rc != ENXIO)
ffc1d57c: 2f 9f 00 06 cmpwi cr7,r31,6
ffc1d580: 41 be 00 34 beq+ cr7,ffc1d5b4 <rtems_rfs_dir_add_entry+0x11c><== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_ADD_ENTRY))
ffc1d584: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc1d588: 3c 80 20 00 lis r4,8192 <== NOT EXECUTED
ffc1d58c: 4b ff 6e 3d bl ffc143c8 <rtems_rfs_trace> <== NOT EXECUTED
ffc1d590: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc1d594: 41 be 02 78 beq+ cr7,ffc1d80c <rtems_rfs_dir_add_entry+0x374><== NOT EXECUTED
printf ("rtems-rfs: dir-add-entry: "
ffc1d598: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc1d59c: 83 bd 00 08 lwz r29,8(r29) <== NOT EXECUTED
ffc1d5a0: 48 00 75 d9 bl ffc24b78 <strerror> <== NOT EXECUTED
ffc1d5a4: 7c 66 1b 78 mr r6,r3 <== NOT EXECUTED
ffc1d5a8: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1d5ac: 38 63 65 8f addi r3,r3,25999 <== NOT EXECUTED
ffc1d5b0: 48 00 00 4c b ffc1d5fc <rtems_rfs_dir_add_entry+0x164><== NOT EXECUTED
}
/*
* We have reached the end of the directory so add a block.
*/
rc = rtems_rfs_block_map_grow (fs, &map, 1, &block);
ffc1d5b4: 7f c3 f3 78 mr r3,r30
ffc1d5b8: 7e c4 b3 78 mr r4,r22
ffc1d5bc: 38 a0 00 01 li r5,1
ffc1d5c0: 38 c1 00 70 addi r6,r1,112
ffc1d5c4: 4b ff e8 39 bl ffc1bdfc <rtems_rfs_block_map_grow>
if (rc > 0)
ffc1d5c8: 7c 7f 1b 79 mr. r31,r3
ffc1d5cc: 40 a1 00 4c ble+ ffc1d618 <rtems_rfs_dir_add_entry+0x180><== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_ADD_ENTRY))
ffc1d5d0: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc1d5d4: 3c 80 20 00 lis r4,8192 <== NOT EXECUTED
ffc1d5d8: 4b ff 6d f1 bl ffc143c8 <rtems_rfs_trace> <== NOT EXECUTED
ffc1d5dc: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc1d5e0: 41 be 02 2c beq+ cr7,ffc1d80c <rtems_rfs_dir_add_entry+0x374><== NOT EXECUTED
printf ("rtems-rfs: dir-add-entry: "
ffc1d5e4: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc1d5e8: 83 bd 00 08 lwz r29,8(r29) <== NOT EXECUTED
ffc1d5ec: 48 00 75 8d bl ffc24b78 <strerror> <== NOT EXECUTED
ffc1d5f0: 7c 66 1b 78 mr r6,r3 <== NOT EXECUTED
ffc1d5f4: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1d5f8: 38 63 65 d4 addi r3,r3,26068 <== NOT EXECUTED
ffc1d5fc: 7f a4 eb 78 mr r4,r29 <== NOT EXECUTED
ffc1d600: 7f e5 fb 78 mr r5,r31 <== NOT EXECUTED
ffc1d604: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1d608: 48 00 63 85 bl ffc2398c <printf> <== NOT EXECUTED
ffc1d60c: 48 00 02 00 b ffc1d80c <rtems_rfs_dir_add_entry+0x374><== NOT EXECUTED
while (true)
{
rtems_rfs_block_no block;
uint8_t* entry;
int offset;
bool read = true;
ffc1d610: 3b 60 00 01 li r27,1
ffc1d614: 48 00 00 08 b ffc1d61c <rtems_rfs_dir_add_entry+0x184>
"block map grow failed for ino %" PRIu32 ": %d: %s\n",
rtems_rfs_inode_ino (dir), rc, strerror (rc));
break;
}
read = false;
ffc1d618: 3b 60 00 00 li r27,0
}
bpos.bno++;
ffc1d61c: 81 21 00 64 lwz r9,100(r1)
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, read);
ffc1d620: 7f c3 f3 78 mr r3,r30
ffc1d624: 80 a1 00 70 lwz r5,112(r1)
ffc1d628: 38 81 00 58 addi r4,r1,88
}
read = false;
}
bpos.bno++;
ffc1d62c: 39 29 00 01 addi r9,r9,1
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, read);
ffc1d630: 7f 66 db 78 mr r6,r27
}
read = false;
}
bpos.bno++;
ffc1d634: 91 21 00 64 stw r9,100(r1)
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, read);
ffc1d638: 4b ff f2 05 bl ffc1c83c <rtems_rfs_buffer_handle_request>
if (rc > 0)
ffc1d63c: 7c 7f 1b 79 mr. r31,r3
ffc1d640: 40 a1 00 34 ble+ ffc1d674 <rtems_rfs_dir_add_entry+0x1dc><== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_ADD_ENTRY))
ffc1d644: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc1d648: 3c 80 20 00 lis r4,8192 <== NOT EXECUTED
ffc1d64c: 4b ff 6d 7d bl ffc143c8 <rtems_rfs_trace> <== NOT EXECUTED
ffc1d650: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc1d654: 41 be 01 b8 beq+ cr7,ffc1d80c <rtems_rfs_dir_add_entry+0x374><== NOT EXECUTED
printf ("rtems-rfs: dir-add-entry: "
ffc1d658: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc1d65c: 83 bd 00 08 lwz r29,8(r29) <== NOT EXECUTED
ffc1d660: 48 00 75 19 bl ffc24b78 <strerror> <== NOT EXECUTED
ffc1d664: 7c 66 1b 78 mr r6,r3 <== NOT EXECUTED
ffc1d668: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1d66c: 38 63 66 19 addi r3,r3,26137 <== NOT EXECUTED
ffc1d670: 4b ff ff 8c b ffc1d5fc <rtems_rfs_dir_add_entry+0x164><== NOT EXECUTED
break;
}
entry = rtems_rfs_buffer_data (&buffer);
if (!read)
ffc1d674: 2f 9b 00 00 cmpwi cr7,r27,0
"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);
ffc1d678: 81 21 00 60 lwz r9,96(r1)
ffc1d67c: 83 e9 00 1c lwz r31,28(r9)
if (!read)
ffc1d680: 40 be 00 14 bne+ cr7,ffc1d694 <rtems_rfs_dir_add_entry+0x1fc>
memset (entry, 0xff, rtems_rfs_fs_block_size (fs));
ffc1d684: 80 be 00 08 lwz r5,8(r30)
ffc1d688: 7f e3 fb 78 mr r3,r31
ffc1d68c: 38 80 00 ff li r4,255
ffc1d690: 48 00 60 a1 bl ffc23730 <memset>
offset = 0;
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
ffc1d694: 81 3e 00 08 lwz r9,8(r30)
entry = rtems_rfs_buffer_data (&buffer);
if (!read)
memset (entry, 0xff, rtems_rfs_fs_block_size (fs));
offset = 0;
ffc1d698: 3b 40 00 00 li r26,0
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
ffc1d69c: 39 09 ff f6 addi r8,r9,-10
ffc1d6a0: 48 00 01 60 b ffc1d800 <rtems_rfs_dir_add_entry+0x368>
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
ffc1d6a4: 8b 7f 00 08 lbz r27,8(r31)
ffc1d6a8: 89 5f 00 09 lbz r10,9(r31)
ffc1d6ac: 57 7b 40 2e rlwinm r27,r27,8,0,23
eino = rtems_rfs_dir_entry_ino (entry);
ffc1d6b0: 8a ff 00 00 lbz r23,0(r31)
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
ffc1d6b4: 7f 7b 53 78 or r27,r27,r10
eino = rtems_rfs_dir_entry_ino (entry);
ffc1d6b8: 89 5f 00 01 lbz r10,1(r31)
ffc1d6bc: 56 f7 c0 0e rlwinm r23,r23,24,0,7
ffc1d6c0: 55 4a 80 1e rlwinm r10,r10,16,0,15
ffc1d6c4: 7e f7 53 78 or r23,r23,r10
ffc1d6c8: 89 5f 00 03 lbz r10,3(r31)
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
ffc1d6cc: 7f 9b a8 00 cmpw cr7,r27,r21
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
ffc1d6d0: 7e f7 53 78 or r23,r23,r10
ffc1d6d4: 89 5f 00 02 lbz r10,2(r31)
ffc1d6d8: 55 4a 40 2e rlwinm r10,r10,8,0,23
ffc1d6dc: 7e f7 53 78 or r23,r23,r10
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
ffc1d6e0: 40 be 00 9c bne+ cr7,ffc1d77c <rtems_rfs_dir_add_entry+0x2e4>
{
if ((length + RTEMS_RFS_DIR_ENTRY_SIZE) <
(rtems_rfs_fs_block_size (fs) - offset))
ffc1d6e4: 7f 5a 48 50 subf r26,r26,r9
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) <
ffc1d6e8: 7f 94 d0 40 cmplw cr7,r20,r26
ffc1d6ec: 40 9c fe 74 bge+ cr7,ffc1d560 <rtems_rfs_dir_add_entry+0xc8><== NEVER TAKEN
(rtems_rfs_fs_block_size (fs) - offset))
{
uint32_t hash;
hash = rtems_rfs_dir_hash (name, length);
ffc1d6f0: 7f 84 e3 78 mr r4,r28
ffc1d6f4: 7f 23 cb 78 mr r3,r25
ffc1d6f8: 48 00 45 45 bl ffc21c3c <rtems_rfs_dir_hash>
rtems_rfs_dir_set_entry_hash (entry, hash);
rtems_rfs_dir_set_entry_ino (entry, ino);
ffc1d6fc: 9b 1f 00 03 stb r24,3(r31)
if ((length + RTEMS_RFS_DIR_ENTRY_SIZE) <
(rtems_rfs_fs_block_size (fs) - offset))
{
uint32_t hash;
hash = rtems_rfs_dir_hash (name, length);
rtems_rfs_dir_set_entry_hash (entry, hash);
ffc1d700: 54 69 46 3e rlwinm r9,r3,8,24,31
ffc1d704: 99 3f 00 04 stb r9,4(r31)
ffc1d708: 54 69 84 3e rlwinm r9,r3,16,16,31
rtems_rfs_dir_set_entry_ino (entry, ino);
rtems_rfs_dir_set_entry_length (entry,
RTEMS_RFS_DIR_ENTRY_SIZE + length);
memcpy (entry + RTEMS_RFS_DIR_ENTRY_SIZE, name, length);
ffc1d70c: 7f 85 e3 78 mr r5,r28
if ((length + RTEMS_RFS_DIR_ENTRY_SIZE) <
(rtems_rfs_fs_block_size (fs) - offset))
{
uint32_t hash;
hash = rtems_rfs_dir_hash (name, length);
rtems_rfs_dir_set_entry_hash (entry, hash);
ffc1d710: 99 3f 00 05 stb r9,5(r31)
ffc1d714: 54 69 c2 3e rlwinm r9,r3,24,8,31
rtems_rfs_dir_set_entry_ino (entry, ino);
rtems_rfs_dir_set_entry_length (entry,
RTEMS_RFS_DIR_ENTRY_SIZE + length);
memcpy (entry + RTEMS_RFS_DIR_ENTRY_SIZE, name, length);
ffc1d718: 7f 24 cb 78 mr r4,r25
if ((length + RTEMS_RFS_DIR_ENTRY_SIZE) <
(rtems_rfs_fs_block_size (fs) - offset))
{
uint32_t hash;
hash = rtems_rfs_dir_hash (name, length);
rtems_rfs_dir_set_entry_hash (entry, hash);
ffc1d71c: 99 3f 00 06 stb r9,6(r31)
rtems_rfs_dir_set_entry_ino (entry, ino);
ffc1d720: 57 09 46 3e rlwinm r9,r24,8,24,31
ffc1d724: 99 3f 00 00 stb r9,0(r31)
ffc1d728: 57 09 84 3e rlwinm r9,r24,16,16,31
ffc1d72c: 99 3f 00 01 stb r9,1(r31)
ffc1d730: 57 09 c2 3e rlwinm r9,r24,24,8,31
ffc1d734: 99 3f 00 02 stb r9,2(r31)
rtems_rfs_dir_set_entry_length (entry,
ffc1d738: 39 3c 00 0a addi r9,r28,10
ffc1d73c: 55 2a c6 3e rlwinm r10,r9,24,24,31
ffc1d740: 99 5f 00 08 stb r10,8(r31)
if ((length + RTEMS_RFS_DIR_ENTRY_SIZE) <
(rtems_rfs_fs_block_size (fs) - offset))
{
uint32_t hash;
hash = rtems_rfs_dir_hash (name, length);
rtems_rfs_dir_set_entry_hash (entry, hash);
ffc1d744: 98 7f 00 07 stb r3,7(r31)
rtems_rfs_dir_set_entry_ino (entry, ino);
rtems_rfs_dir_set_entry_length (entry,
RTEMS_RFS_DIR_ENTRY_SIZE + length);
memcpy (entry + RTEMS_RFS_DIR_ENTRY_SIZE, name, length);
ffc1d748: 38 7f 00 0a addi r3,r31,10
{
uint32_t hash;
hash = rtems_rfs_dir_hash (name, length);
rtems_rfs_dir_set_entry_hash (entry, hash);
rtems_rfs_dir_set_entry_ino (entry, ino);
rtems_rfs_dir_set_entry_length (entry,
ffc1d74c: 99 3f 00 09 stb r9,9(r31)
RTEMS_RFS_DIR_ENTRY_SIZE + length);
memcpy (entry + RTEMS_RFS_DIR_ENTRY_SIZE, name, length);
rtems_rfs_buffer_mark_dirty (&buffer);
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
return 0;
ffc1d750: 3b e0 00 00 li r31,0
hash = rtems_rfs_dir_hash (name, length);
rtems_rfs_dir_set_entry_hash (entry, hash);
rtems_rfs_dir_set_entry_ino (entry, ino);
rtems_rfs_dir_set_entry_length (entry,
RTEMS_RFS_DIR_ENTRY_SIZE + length);
memcpy (entry + RTEMS_RFS_DIR_ENTRY_SIZE, name, length);
ffc1d754: 48 00 5d ad bl ffc23500 <memcpy>
rtems_rfs_buffer_mark_dirty (&buffer);
ffc1d758: 7c 24 0b 78 mr r4,r1
ffc1d75c: 39 20 00 01 li r9,1
ffc1d760: 9d 24 00 58 stbu r9,88(r4)
rtems_rfs_buffer_handle_close (fs, &buffer);
ffc1d764: 7f c3 f3 78 mr r3,r30
ffc1d768: 4b ff f7 f9 bl ffc1cf60 <rtems_rfs_buffer_handle_close>
rtems_rfs_block_map_close (fs, &map);
ffc1d76c: 7f c3 f3 78 mr r3,r30
ffc1d770: 38 81 00 08 addi r4,r1,8
ffc1d774: 4b ff e2 6d bl ffc1b9e0 <rtems_rfs_block_map_close>
ffc1d778: 48 00 00 ac b ffc1d824 <rtems_rfs_dir_add_entry+0x38c>
}
break;
}
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
ffc1d77c: 2f 9b 00 0a cmpwi cr7,r27,10
ffc1d780: 40 9d 00 24 ble- cr7,ffc1d7a4 <rtems_rfs_dir_add_entry+0x30c><== NEVER TAKEN
ffc1d784: 81 5e 00 1c lwz r10,28(r30)
ffc1d788: 7f 9b 50 40 cmplw cr7,r27,r10
ffc1d78c: 40 9c 00 18 bge- cr7,ffc1d7a4 <rtems_rfs_dir_add_entry+0x30c><== NEVER TAKEN
ffc1d790: 2f 97 00 00 cmpwi cr7,r23,0
ffc1d794: 41 9e 00 10 beq- cr7,ffc1d7a4 <rtems_rfs_dir_add_entry+0x30c><== NEVER TAKEN
ffc1d798: 81 5e 00 14 lwz r10,20(r30)
ffc1d79c: 7f 97 50 40 cmplw cr7,r23,r10
ffc1d7a0: 40 bd 00 58 ble+ cr7,ffc1d7f8 <rtems_rfs_dir_add_entry+0x360><== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_ADD_ENTRY))
ffc1d7a4: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc1d7a8: 3c 80 20 00 lis r4,8192 <== NOT EXECUTED
ffc1d7ac: 4b ff 6c 1d bl ffc143c8 <rtems_rfs_trace> <== NOT EXECUTED
ffc1d7b0: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc1d7b4: 41 be 00 24 beq+ cr7,ffc1d7d8 <rtems_rfs_dir_add_entry+0x340><== NOT EXECUTED
printf ("rtems-rfs: dir-add-entry: "
ffc1d7b8: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1d7bc: 80 9d 00 08 lwz r4,8(r29) <== NOT EXECUTED
ffc1d7c0: 38 63 66 60 addi r3,r3,26208 <== NOT EXECUTED
ffc1d7c4: 7f 65 db 78 mr r5,r27 <== NOT EXECUTED
ffc1d7c8: 7e e6 bb 78 mr r6,r23 <== NOT EXECUTED
ffc1d7cc: 7f 47 d3 78 mr r7,r26 <== NOT EXECUTED
ffc1d7d0: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1d7d4: 48 00 61 b9 bl ffc2398c <printf> <== 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);
ffc1d7d8: 38 81 00 58 addi r4,r1,88 <== NOT EXECUTED
ffc1d7dc: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc1d7e0: 4b ff f7 81 bl ffc1cf60 <rtems_rfs_buffer_handle_close><== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
ffc1d7e4: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc1d7e8: 38 81 00 08 addi r4,r1,8 <== NOT EXECUTED
ffc1d7ec: 4b ff e1 f5 bl ffc1b9e0 <rtems_rfs_block_map_close> <== NOT EXECUTED
return EIO;
ffc1d7f0: 3b e0 00 05 li r31,5 <== NOT EXECUTED
ffc1d7f4: 48 00 00 30 b ffc1d824 <rtems_rfs_dir_add_entry+0x38c><== NOT EXECUTED
}
entry += elength;
ffc1d7f8: 7f ff da 14 add r31,r31,r27
offset += elength;
ffc1d7fc: 7f 5a da 14 add r26,r26,r27
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))
ffc1d800: 7f 9a 40 40 cmplw cr7,r26,r8
ffc1d804: 41 9c fe a0 blt+ cr7,ffc1d6a4 <rtems_rfs_dir_add_entry+0x20c><== ALWAYS TAKEN
ffc1d808: 4b ff fd 58 b ffc1d560 <rtems_rfs_dir_add_entry+0xc8><== NOT EXECUTED
entry += elength;
offset += elength;
}
}
rtems_rfs_buffer_handle_close (fs, &buffer);
ffc1d80c: 38 81 00 58 addi r4,r1,88 <== NOT EXECUTED
ffc1d810: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc1d814: 4b ff f7 4d bl ffc1cf60 <rtems_rfs_buffer_handle_close><== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
ffc1d818: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc1d81c: 38 81 00 08 addi r4,r1,8 <== NOT EXECUTED
ffc1d820: 4b ff e1 c1 bl ffc1b9e0 <rtems_rfs_block_map_close> <== NOT EXECUTED
return rc;
}
ffc1d824: 39 61 00 a8 addi r11,r1,168
ffc1d828: 7f e3 fb 78 mr r3,r31
ffc1d82c: 4b fe 3d 14 b ffc01540 <_restgpr_20_x>
ffc1d830 <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)
{
ffc1d830: 94 21 ff 58 stwu r1,-168(r1)
ffc1d834: 7d 80 00 26 mfcr r12
ffc1d838: 7c 08 02 a6 mflr r0
ffc1d83c: be 41 00 70 stmw r18,112(r1)
ffc1d840: 7c 7f 1b 78 mr r31,r3
ffc1d844: 7c 99 23 78 mr r25,r4
rtems_rfs_block_no block;
rtems_rfs_buffer_handle buffer;
bool search;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
ffc1d848: 38 60 00 00 li r3,0
int
rtems_rfs_dir_del_entry (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* dir,
rtems_rfs_ino ino,
uint32_t offset)
{
ffc1d84c: 90 01 00 ac stw r0,172(r1)
rtems_rfs_block_no block;
rtems_rfs_buffer_handle buffer;
bool search;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
ffc1d850: 3c 80 40 00 lis r4,16384
int
rtems_rfs_dir_del_entry (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* dir,
rtems_rfs_ino ino,
uint32_t offset)
{
ffc1d854: 91 81 00 6c stw r12,108(r1)
ffc1d858: 7c b6 2b 78 mr r22,r5
ffc1d85c: 7c d8 33 78 mr r24,r6
rtems_rfs_block_no block;
rtems_rfs_buffer_handle buffer;
bool search;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
ffc1d860: 4b ff 6b 69 bl ffc143c8 <rtems_rfs_trace>
ffc1d864: 2f 83 00 00 cmpwi cr7,r3,0
ffc1d868: 41 be 00 20 beq+ cr7,ffc1d888 <rtems_rfs_dir_del_entry+0x58><== ALWAYS TAKEN
printf ("rtems-rfs: dir-del-entry: dir=%" PRId32 ", entry=%" PRId32 " offset=%" PRIu32 "\n",
ffc1d86c: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1d870: 80 99 00 08 lwz r4,8(r25) <== NOT EXECUTED
ffc1d874: 38 63 66 a8 addi r3,r3,26280 <== NOT EXECUTED
ffc1d878: 7e c5 b3 78 mr r5,r22 <== NOT EXECUTED
ffc1d87c: 7f 06 c3 78 mr r6,r24 <== NOT EXECUTED
ffc1d880: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1d884: 48 00 61 09 bl ffc2398c <printf> <== NOT EXECUTED
rtems_rfs_inode_ino (dir), ino, offset);
rc = rtems_rfs_block_map_open (fs, dir, &map);
ffc1d888: 3b c1 00 08 addi r30,r1,8
ffc1d88c: 7f e3 fb 78 mr r3,r31
ffc1d890: 7f 24 cb 78 mr r4,r25
ffc1d894: 7f c5 f3 78 mr r5,r30
ffc1d898: 4b ff df 91 bl ffc1b828 <rtems_rfs_block_map_open>
if (rc > 0)
ffc1d89c: 7c 7d 1b 79 mr. r29,r3
ffc1d8a0: 41 a1 03 74 bgt+ ffc1dc14 <rtems_rfs_dir_del_entry+0x3e4><== NEVER TAKEN
return rc;
rc = rtems_rfs_block_map_seek (fs, &map, offset, &block);
ffc1d8a4: 3b 61 00 64 addi r27,r1,100
ffc1d8a8: 7f e3 fb 78 mr r3,r31
ffc1d8ac: 7f c4 f3 78 mr r4,r30
ffc1d8b0: 38 a0 00 00 li r5,0
ffc1d8b4: 7f 06 c3 78 mr r6,r24
ffc1d8b8: 7f 67 db 78 mr r7,r27
ffc1d8bc: 4b ff e4 71 bl ffc1bd2c <rtems_rfs_block_map_seek>
ffc1d8c0: 3b 80 00 00 li r28,0
if (rc > 0)
ffc1d8c4: 7c 7d 1b 79 mr. r29,r3
ffc1d8c8: 40 81 00 14 ble- ffc1d8dc <rtems_rfs_dir_del_entry+0xac><== ALWAYS TAKEN
{
if (rc == ENXIO)
ffc1d8cc: 2f 9d 00 06 cmpwi cr7,r29,6 <== NOT EXECUTED
ffc1d8d0: 40 be 02 bc bne+ cr7,ffc1db8c <rtems_rfs_dir_del_entry+0x35c><== NOT EXECUTED
rc = ENOENT;
ffc1d8d4: 3b a0 00 02 li r29,2 <== NOT EXECUTED
ffc1d8d8: 48 00 02 b4 b ffc1db8c <rtems_rfs_dir_del_entry+0x35c><== NOT EXECUTED
}
/*
* Only search if the offset is 0 else we are at that position.
*/
search = offset ? false : true;
ffc1d8dc: 7f 09 00 34 cntlzw r9,r24
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
ffc1d8e0: 9b 81 00 58 stb r28,88(r1)
ffc1d8e4: 55 29 d9 7e rlwinm r9,r9,27,5,31
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
ffc1d8e8: 3a a0 00 00 li r21,0
handle->bnum = 0;
ffc1d8ec: 93 81 00 5c stw r28,92(r1)
break;
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
printf ("rtems-rfs: dir-del-entry: "
ffc1d8f0: 3e 40 ff c3 lis r18,-61
handle->buffer = NULL;
ffc1d8f4: 93 81 00 60 stw r28,96(r1)
rc = ENOENT;
rtems_rfs_block_map_close (fs, &map);
return rc;
}
rc = rtems_rfs_buffer_handle_open (fs, &buffer);
ffc1d8f8: 3b a0 00 00 li r29,0
/*
* If we are searching start at the beginning of the block. If not searching
* skip to the offset in the block.
*/
if (search)
ffc1d8fc: 2e 09 00 00 cmpwi cr4,r9,0
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
ffc1d900: 62 b5 ff ff ori r21,r21,65535
eoffset += elength;
}
if (rc == 0)
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
ffc1d904: 7f 74 db 78 mr r20,r27
ffc1d908: 7f d3 f3 78 mr r19,r30
break;
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
printf ("rtems-rfs: dir-del-entry: "
ffc1d90c: 3a 52 67 28 addi r18,r18,26408
/*
* Only search if the offset is 0 else we are at that position.
*/
search = offset ? false : true;
while (rc == 0)
ffc1d910: 48 00 02 d0 b ffc1dbe0 <rtems_rfs_dir_del_entry+0x3b0>
{
uint8_t* entry;
int eoffset;
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
ffc1d914: 80 a1 00 64 lwz r5,100(r1)
ffc1d918: 7f e3 fb 78 mr r3,r31
ffc1d91c: 38 81 00 58 addi r4,r1,88
ffc1d920: 38 c0 00 01 li r6,1
ffc1d924: 4b ff ef 19 bl ffc1c83c <rtems_rfs_buffer_handle_request>
if (rc > 0)
ffc1d928: 7c 7a 1b 79 mr. r26,r3
ffc1d92c: 40 a1 00 44 ble+ ffc1d970 <rtems_rfs_dir_del_entry+0x140><== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
ffc1d930: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc1d934: 3c 80 40 00 lis r4,16384 <== NOT EXECUTED
ffc1d938: 4b ff 6a 91 bl ffc143c8 <rtems_rfs_trace> <== NOT EXECUTED
ffc1d93c: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc1d940: 41 be 02 ac beq+ cr7,ffc1dbec <rtems_rfs_dir_del_entry+0x3bc><== NOT EXECUTED
printf ("rtems-rfs: dir-del-entry: "
ffc1d944: 7f 43 d3 78 mr r3,r26 <== NOT EXECUTED
ffc1d948: 83 d9 00 08 lwz r30,8(r25) <== NOT EXECUTED
ffc1d94c: 48 00 72 2d bl ffc24b78 <strerror> <== NOT EXECUTED
ffc1d950: 7f 45 d3 78 mr r5,r26 <== NOT EXECUTED
ffc1d954: 7c 66 1b 78 mr r6,r3 <== NOT EXECUTED
ffc1d958: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1d95c: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED
ffc1d960: 38 63 66 e1 addi r3,r3,26337 <== NOT EXECUTED
ffc1d964: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1d968: 48 00 60 25 bl ffc2398c <printf> <== NOT EXECUTED
ffc1d96c: 48 00 02 80 b ffc1dbec <rtems_rfs_dir_del_entry+0x3bc><== 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;
ffc1d970: 3b 80 00 00 li r28,0
/*
* If we are searching start at the beginning of the block. If not searching
* skip to the offset in the block.
*/
if (search)
ffc1d974: 40 92 00 14 bne- cr4,ffc1d988 <rtems_rfs_dir_del_entry+0x158><== NEVER TAKEN
eoffset = 0;
else
eoffset = offset % rtems_rfs_fs_block_size (fs);
ffc1d978: 81 3f 00 08 lwz r9,8(r31)
ffc1d97c: 7f 98 4b 96 divwu r28,r24,r9
ffc1d980: 7f 9c 49 d6 mullw r28,r28,r9
ffc1d984: 7f 9c c0 50 subf r28,r28,r24
entry = rtems_rfs_buffer_data (&buffer) + eoffset;
ffc1d988: 81 21 00 60 lwz r9,96(r1)
ffc1d98c: 83 c9 00 1c lwz r30,28(r9)
while (eoffset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
ffc1d990: 81 3f 00 08 lwz r9,8(r31)
if (search)
eoffset = 0;
else
eoffset = offset % rtems_rfs_fs_block_size (fs);
entry = rtems_rfs_buffer_data (&buffer) + eoffset;
ffc1d994: 7f de e2 14 add r30,r30,r28
while (eoffset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
ffc1d998: 39 09 ff f6 addi r8,r9,-10
ffc1d99c: 48 00 02 0c b ffc1dba8 <rtems_rfs_dir_del_entry+0x378>
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
ffc1d9a0: 8b 7e 00 08 lbz r27,8(r30)
ffc1d9a4: 89 5e 00 09 lbz r10,9(r30)
ffc1d9a8: 57 7b 40 2e rlwinm r27,r27,8,0,23
eino = rtems_rfs_dir_entry_ino (entry);
ffc1d9ac: 8a fe 00 00 lbz r23,0(r30)
while (eoffset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
ffc1d9b0: 7f 7b 53 78 or r27,r27,r10
eino = rtems_rfs_dir_entry_ino (entry);
ffc1d9b4: 89 5e 00 01 lbz r10,1(r30)
ffc1d9b8: 56 f7 c0 0e rlwinm r23,r23,24,0,7
ffc1d9bc: 55 4a 80 1e rlwinm r10,r10,16,0,15
ffc1d9c0: 7e f7 53 78 or r23,r23,r10
ffc1d9c4: 89 5e 00 03 lbz r10,3(r30)
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
ffc1d9c8: 7f 9b a8 00 cmpw cr7,r27,r21
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
ffc1d9cc: 7e f7 53 78 or r23,r23,r10
ffc1d9d0: 89 5e 00 02 lbz r10,2(r30)
ffc1d9d4: 55 4a 40 2e rlwinm r10,r10,8,0,23
ffc1d9d8: 7e f7 53 78 or r23,r23,r10
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
ffc1d9dc: 41 9e 01 d4 beq- cr7,ffc1dbb0 <rtems_rfs_dir_del_entry+0x380><== NEVER TAKEN
break;
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
ffc1d9e0: 2f 9b 00 0a cmpwi cr7,r27,10
ffc1d9e4: 40 9d 00 24 ble- cr7,ffc1da08 <rtems_rfs_dir_del_entry+0x1d8><== NEVER TAKEN
ffc1d9e8: 81 5f 00 1c lwz r10,28(r31)
ffc1d9ec: 7f 9b 50 40 cmplw cr7,r27,r10
ffc1d9f0: 40 9c 00 18 bge- cr7,ffc1da08 <rtems_rfs_dir_del_entry+0x1d8><== NEVER TAKEN
ffc1d9f4: 2f 97 00 00 cmpwi cr7,r23,0
ffc1d9f8: 41 9e 00 10 beq- cr7,ffc1da08 <rtems_rfs_dir_del_entry+0x1d8><== NEVER TAKEN
ffc1d9fc: 81 5f 00 14 lwz r10,20(r31)
ffc1da00: 7f 97 50 40 cmplw cr7,r23,r10
ffc1da04: 40 bd 00 3c ble+ cr7,ffc1da40 <rtems_rfs_dir_del_entry+0x210><== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
ffc1da08: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc1da0c: 3c 80 40 00 lis r4,16384 <== NOT EXECUTED
ffc1da10: 4b ff 69 b9 bl ffc143c8 <rtems_rfs_trace> <== NOT EXECUTED
ffc1da14: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc1da18: 41 be 01 f4 beq+ cr7,ffc1dc0c <rtems_rfs_dir_del_entry+0x3dc><== NOT EXECUTED
printf ("rtems-rfs: dir-del-entry: "
ffc1da1c: 80 99 00 08 lwz r4,8(r25) <== NOT EXECUTED
ffc1da20: 7e 43 93 78 mr r3,r18 <== NOT EXECUTED
ffc1da24: 80 e1 00 64 lwz r7,100(r1) <== NOT EXECUTED
ffc1da28: 7f 65 db 78 mr r5,r27 <== NOT EXECUTED
ffc1da2c: 7e e6 bb 78 mr r6,r23 <== NOT EXECUTED
ffc1da30: 7f 88 e3 78 mr r8,r28 <== NOT EXECUTED
ffc1da34: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1da38: 48 00 5f 55 bl ffc2398c <printf> <== NOT EXECUTED
ffc1da3c: 48 00 01 d0 b ffc1dc0c <rtems_rfs_dir_del_entry+0x3dc><== NOT EXECUTED
rtems_rfs_inode_ino (dir), elength, eino, block, eoffset);
rc = EIO;
break;
}
if (ino == rtems_rfs_dir_entry_ino (entry))
ffc1da40: 7f 96 b8 00 cmpw cr7,r22,r23
ffc1da44: 40 be 01 58 bne+ cr7,ffc1db9c <rtems_rfs_dir_del_entry+0x36c><== NEVER TAKEN
{
uint32_t remaining;
remaining = rtems_rfs_fs_block_size (fs) - (eoffset + elength);
ffc1da48: 7f 5c da 14 add r26,r28,r27
ffc1da4c: 7f 5a 48 50 subf r26,r26,r9
memmove (entry, entry + elength, remaining);
ffc1da50: 7c 9e da 14 add r4,r30,r27
ffc1da54: 7f c3 f3 78 mr r3,r30
ffc1da58: 7f 45 d3 78 mr r5,r26
ffc1da5c: 48 00 5b 99 bl ffc235f4 <memmove>
memset (entry + remaining, 0xff, elength);
ffc1da60: 7c 7e d2 14 add r3,r30,r26
ffc1da64: 38 80 00 ff li r4,255
ffc1da68: 7f 65 db 78 mr r5,r27
ffc1da6c: 48 00 5c c5 bl ffc23730 <memset>
* 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);
ffc1da70: 89 5e 00 08 lbz r10,8(r30)
ffc1da74: 89 3e 00 09 lbz r9,9(r30)
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
ffc1da78: 38 60 00 00 li r3,0
* 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);
ffc1da7c: 55 4a 40 2e rlwinm r10,r10,8,0,23
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
ffc1da80: 3c 80 40 00 lis r4,16384
* 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);
ffc1da84: 7d 5e 4b 78 or r30,r10,r9
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
ffc1da88: 4b ff 69 41 bl ffc143c8 <rtems_rfs_trace>
ffc1da8c: 2f 83 00 00 cmpwi cr7,r3,0
ffc1da90: 41 9e 00 5c beq- cr7,ffc1daec <rtems_rfs_dir_del_entry+0x2bc><== 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");
ffc1da94: 81 21 00 18 lwz r9,24(r1) <== 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: "
ffc1da98: 80 c1 00 64 lwz r6,100(r1) <== NOT EXECUTED
ffc1da9c: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED
ffc1daa0: 81 41 00 10 lwz r10,16(r1) <== NOT EXECUTED
ffc1daa4: 40 9e 00 18 bne- cr7,ffc1dabc <rtems_rfs_dir_del_entry+0x28c><== 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");
ffc1daa8: 2f 8a 00 00 cmpwi cr7,r10,0 <== NOT EXECUTED
ffc1daac: 40 9e 00 10 bne- cr7,ffc1dabc <rtems_rfs_dir_del_entry+0x28c><== 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: "
ffc1dab0: 3d 00 ff c3 lis r8,-61 <== NOT EXECUTED
ffc1dab4: 39 08 4f 1e addi r8,r8,20254 <== NOT EXECUTED
ffc1dab8: 48 00 00 18 b ffc1dad0 <rtems_rfs_dir_del_entry+0x2a0><== 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");
ffc1dabc: 39 4a ff ff addi r10,r10,-1 <== NOT EXECUTED
ffc1dac0: 7f 89 50 00 cmpw cr7,r9,r10 <== NOT EXECUTED
ffc1dac4: 41 be ff ec beq- cr7,ffc1dab0 <rtems_rfs_dir_del_entry+0x280><== 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: "
ffc1dac8: 3d 00 ff c3 lis r8,-61 <== NOT EXECUTED
ffc1dacc: 39 08 53 ff addi r8,r8,21503 <== NOT EXECUTED
ffc1dad0: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1dad4: 38 63 67 74 addi r3,r3,26484 <== NOT EXECUTED
ffc1dad8: 7e c4 b3 78 mr r4,r22 <== NOT EXECUTED
ffc1dadc: 7f c5 f3 78 mr r5,r30 <== NOT EXECUTED
ffc1dae0: 7f 87 e3 78 mr r7,r28 <== NOT EXECUTED
ffc1dae4: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1dae8: 48 00 5e a5 bl ffc2398c <printf> <== 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) &&
ffc1daec: 6f c9 ff ff xoris r9,r30,65535
ffc1daf0: 2f 89 ff ff cmpwi cr7,r9,-1
ffc1daf4: 40 9e 00 84 bne- cr7,ffc1db78 <rtems_rfs_dir_del_entry+0x348>
ffc1daf8: 2f 9c 00 00 cmpwi cr7,r28,0
ffc1dafc: 40 9e 00 7c bne- cr7,ffc1db78 <rtems_rfs_dir_del_entry+0x348><== ALWAYS TAKEN
(eoffset == 0) && rtems_rfs_block_map_last (&map))
ffc1db00: 81 21 00 18 lwz r9,24(r1) <== NOT EXECUTED
ffc1db04: 81 41 00 10 lwz r10,16(r1) <== NOT EXECUTED
ffc1db08: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED
ffc1db0c: 40 9e 00 0c bne- cr7,ffc1db18 <rtems_rfs_dir_del_entry+0x2e8><== NOT EXECUTED
ffc1db10: 2f 8a 00 00 cmpwi cr7,r10,0 <== NOT EXECUTED
ffc1db14: 41 9e 00 10 beq- cr7,ffc1db24 <rtems_rfs_dir_del_entry+0x2f4><== NOT EXECUTED
ffc1db18: 39 4a ff ff addi r10,r10,-1 <== NOT EXECUTED
ffc1db1c: 7f 89 50 00 cmpw cr7,r9,r10 <== NOT EXECUTED
ffc1db20: 40 be 00 58 bne+ cr7,ffc1db78 <rtems_rfs_dir_del_entry+0x348><== NOT EXECUTED
{
rc = rtems_rfs_block_map_shrink (fs, &map, 1);
ffc1db24: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc1db28: 38 81 00 08 addi r4,r1,8 <== NOT EXECUTED
ffc1db2c: 38 a0 00 01 li r5,1 <== NOT EXECUTED
ffc1db30: 4b ff e6 69 bl ffc1c198 <rtems_rfs_block_map_shrink> <== NOT EXECUTED
if (rc > 0)
ffc1db34: 7c 7e 1b 79 mr. r30,r3 <== NOT EXECUTED
ffc1db38: 40 81 00 40 ble- ffc1db78 <rtems_rfs_dir_del_entry+0x348><== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
ffc1db3c: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc1db40: 3c 80 40 00 lis r4,16384 <== NOT EXECUTED
ffc1db44: 4b ff 68 85 bl ffc143c8 <rtems_rfs_trace> <== NOT EXECUTED
ffc1db48: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc1db4c: 41 be 00 2c beq+ cr7,ffc1db78 <rtems_rfs_dir_del_entry+0x348><== NOT EXECUTED
printf ("rtems-rfs: dir-del-entry: "
ffc1db50: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc1db54: 83 99 00 08 lwz r28,8(r25) <== NOT EXECUTED
ffc1db58: 48 00 70 21 bl ffc24b78 <strerror> <== NOT EXECUTED
ffc1db5c: 7f c5 f3 78 mr r5,r30 <== NOT EXECUTED
ffc1db60: 7c 66 1b 78 mr r6,r3 <== NOT EXECUTED
ffc1db64: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1db68: 38 63 67 d3 addi r3,r3,26579 <== NOT EXECUTED
ffc1db6c: 7f 84 e3 78 mr r4,r28 <== NOT EXECUTED
ffc1db70: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1db74: 48 00 5e 19 bl ffc2398c <printf> <== 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);
ffc1db78: 7c 24 0b 78 mr r4,r1
ffc1db7c: 39 20 00 01 li r9,1
ffc1db80: 9d 24 00 58 stbu r9,88(r4)
rtems_rfs_buffer_handle_close (fs, &buffer);
ffc1db84: 7f e3 fb 78 mr r3,r31
ffc1db88: 4b ff f3 d9 bl ffc1cf60 <rtems_rfs_buffer_handle_close>
rtems_rfs_block_map_close (fs, &map);
ffc1db8c: 7f e3 fb 78 mr r3,r31
ffc1db90: 38 81 00 08 addi r4,r1,8
ffc1db94: 4b ff de 4d bl ffc1b9e0 <rtems_rfs_block_map_close>
ffc1db98: 48 00 00 7c b ffc1dc14 <rtems_rfs_dir_del_entry+0x3e4>
return 0;
}
if (!search)
ffc1db9c: 41 92 00 70 beq- cr4,ffc1dc0c <rtems_rfs_dir_del_entry+0x3dc><== NOT EXECUTED
{
rc = EIO;
break;
}
entry += elength;
ffc1dba0: 7f de da 14 add r30,r30,r27 <== NOT EXECUTED
eoffset += elength;
ffc1dba4: 7f 9c da 14 add r28,r28,r27 <== 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))
ffc1dba8: 7f 9c 40 40 cmplw cr7,r28,r8
ffc1dbac: 41 9c fd f4 blt+ cr7,ffc1d9a0 <rtems_rfs_dir_del_entry+0x170><== ALWAYS TAKEN
entry += elength;
eoffset += elength;
}
if (rc == 0)
ffc1dbb0: 2f 9a 00 00 cmpwi cr7,r26,0 <== NOT EXECUTED
ffc1dbb4: 40 9e 00 28 bne- cr7,ffc1dbdc <rtems_rfs_dir_del_entry+0x3ac><== NOT EXECUTED
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
ffc1dbb8: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc1dbbc: 7e 64 9b 78 mr r4,r19 <== NOT EXECUTED
ffc1dbc0: 7e 85 a3 78 mr r5,r20 <== NOT EXECUTED
ffc1dbc4: 4b ff e1 f9 bl ffc1bdbc <rtems_rfs_block_map_next_block><== NOT EXECUTED
if (rc == ENXIO)
ffc1dbc8: 2f 83 00 06 cmpwi cr7,r3,6 <== NOT EXECUTED
eoffset += elength;
}
if (rc == 0)
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
ffc1dbcc: 7c 7d 1b 78 mr r29,r3 <== NOT EXECUTED
if (rc == ENXIO)
ffc1dbd0: 40 be 00 10 bne+ cr7,ffc1dbe0 <rtems_rfs_dir_del_entry+0x3b0><== NOT EXECUTED
rc = ENOENT;
ffc1dbd4: 3b a0 00 02 li r29,2 <== NOT EXECUTED
ffc1dbd8: 48 00 00 10 b ffc1dbe8 <rtems_rfs_dir_del_entry+0x3b8><== NOT EXECUTED
rc = ENOENT;
rtems_rfs_block_map_close (fs, &map);
return rc;
}
rc = rtems_rfs_buffer_handle_open (fs, &buffer);
ffc1dbdc: 7f 5d d3 78 mr r29,r26 <== NOT EXECUTED
/*
* Only search if the offset is 0 else we are at that position.
*/
search = offset ? false : true;
while (rc == 0)
ffc1dbe0: 2f 9d 00 00 cmpwi cr7,r29,0
ffc1dbe4: 41 9e fd 30 beq+ cr7,ffc1d914 <rtems_rfs_dir_del_entry+0xe4><== ALWAYS TAKEN
ffc1dbe8: 7f ba eb 78 mr r26,r29 <== NOT EXECUTED
if (rc == ENXIO)
rc = ENOENT;
}
}
rtems_rfs_buffer_handle_close (fs, &buffer);
ffc1dbec: 38 81 00 58 addi r4,r1,88 <== NOT EXECUTED
ffc1dbf0: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc1dbf4: 4b ff f3 6d bl ffc1cf60 <rtems_rfs_buffer_handle_close><== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
ffc1dbf8: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc1dbfc: 38 81 00 08 addi r4,r1,8 <== NOT EXECUTED
ffc1dc00: 4b ff dd e1 bl ffc1b9e0 <rtems_rfs_block_map_close> <== NOT EXECUTED
return rc;
ffc1dc04: 7f 5d d3 78 mr r29,r26 <== NOT EXECUTED
ffc1dc08: 48 00 00 0c b ffc1dc14 <rtems_rfs_dir_del_entry+0x3e4><== NOT EXECUTED
rc = ENOENT;
rtems_rfs_block_map_close (fs, &map);
return rc;
}
rc = rtems_rfs_buffer_handle_open (fs, &buffer);
ffc1dc0c: 3b 40 00 05 li r26,5 <== NOT EXECUTED
ffc1dc10: 4b ff ff cc b ffc1dbdc <rtems_rfs_dir_del_entry+0x3ac><== NOT EXECUTED
}
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
ffc1dc14: 81 81 00 6c lwz r12,108(r1)
ffc1dc18: 39 61 00 a8 addi r11,r1,168
ffc1dc1c: 7f a3 eb 78 mr r3,r29
ffc1dc20: 7d 80 81 20 mtcrf 8,r12
ffc1dc24: 4b fe 39 14 b ffc01538 <_restgpr_18_x>
ffc1dfa8 <rtems_rfs_dir_empty>:
int
rtems_rfs_dir_empty (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* dir)
{
ffc1dfa8: 94 21 ff 70 stwu r1,-144(r1)
ffc1dfac: 7c 08 02 a6 mflr r0
ffc1dfb0: be c1 00 68 stmw r22,104(r1)
ffc1dfb4: 7c 7f 1b 78 mr r31,r3
ffc1dfb8: 7c 9b 23 78 mr r27,r4
rtems_rfs_buffer_handle buffer;
rtems_rfs_block_no block;
bool empty;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
ffc1dfbc: 38 60 00 00 li r3,0
}
int
rtems_rfs_dir_empty (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* dir)
{
ffc1dfc0: 90 01 00 94 stw r0,148(r1)
rtems_rfs_buffer_handle buffer;
rtems_rfs_block_no block;
bool empty;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
ffc1dfc4: 3c 80 80 00 lis r4,-32768
ffc1dfc8: 4b ff 64 01 bl ffc143c8 <rtems_rfs_trace>
ffc1dfcc: 2f 83 00 00 cmpwi cr7,r3,0
ffc1dfd0: 41 be 00 18 beq+ cr7,ffc1dfe8 <rtems_rfs_dir_empty+0x40><== ALWAYS TAKEN
printf ("rtems-rfs: dir-empty: dir=%" PRId32 "\n", rtems_rfs_inode_ino (dir));
ffc1dfd4: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1dfd8: 80 9b 00 08 lwz r4,8(r27) <== NOT EXECUTED
ffc1dfdc: 38 63 68 f3 addi r3,r3,26867 <== NOT EXECUTED
ffc1dfe0: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1dfe4: 48 00 59 a9 bl ffc2398c <printf> <== NOT EXECUTED
empty = true;
rc = rtems_rfs_block_map_open (fs, dir, &map);
ffc1dfe8: 3b a1 00 08 addi r29,r1,8
ffc1dfec: 7f e3 fb 78 mr r3,r31
ffc1dff0: 7f 64 db 78 mr r4,r27
ffc1dff4: 7f a5 eb 78 mr r5,r29
ffc1dff8: 4b ff d8 31 bl ffc1b828 <rtems_rfs_block_map_open>
if (rc > 0)
ffc1dffc: 7c 7e 1b 79 mr. r30,r3
ffc1e000: 41 a1 01 cc bgt+ ffc1e1cc <rtems_rfs_dir_empty+0x224> <== NEVER TAKEN
return rc;
rc = rtems_rfs_block_map_seek (fs, &map, 0, &block);
ffc1e004: 3b 81 00 64 addi r28,r1,100
ffc1e008: 7f e3 fb 78 mr r3,r31
ffc1e00c: 7f a4 eb 78 mr r4,r29
ffc1e010: 38 a0 00 00 li r5,0
ffc1e014: 38 c0 00 00 li r6,0
ffc1e018: 7f 87 e3 78 mr r7,r28
ffc1e01c: 4b ff dd 11 bl ffc1bd2c <rtems_rfs_block_map_seek>
if (rc > 0)
ffc1e020: 7c 7e 1b 79 mr. r30,r3
ffc1e024: 40 a1 00 10 ble+ ffc1e034 <rtems_rfs_dir_empty+0x8c> <== ALWAYS TAKEN
{
rtems_rfs_block_map_close (fs, &map);
ffc1e028: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc1e02c: 7f a4 eb 78 mr r4,r29 <== NOT EXECUTED
ffc1e030: 48 00 01 78 b ffc1e1a8 <rtems_rfs_dir_empty+0x200> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
ffc1e034: 39 20 00 00 li r9,0
ffc1e038: 99 21 00 58 stb r9,88(r1)
handle->bnum = 0;
ffc1e03c: 39 20 00 00 li r9,0
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
ffc1e040: 3a e0 00 00 li r23,0
break;
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_EMPTY))
printf ("rtems-rfs: dir-empty: "
ffc1e044: 3e c0 ff c3 lis r22,-61
ffc1e048: 91 21 00 5c stw r9,92(r1)
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
ffc1e04c: 62 f7 ff ff ori r23,r23,65535
handle->buffer = NULL;
ffc1e050: 91 21 00 60 stw r9,96(r1)
break;
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_EMPTY))
printf ("rtems-rfs: dir-empty: "
ffc1e054: 3a d6 69 12 addi r22,r22,26898
offset += elength;
}
if (empty)
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
ffc1e058: 7f 99 e3 78 mr r25,r28
ffc1e05c: 7f b8 eb 78 mr r24,r29
while (empty)
{
uint8_t* entry;
int offset;
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
ffc1e060: 80 a1 00 64 lwz r5,100(r1)
ffc1e064: 7f e3 fb 78 mr r3,r31
ffc1e068: 38 81 00 58 addi r4,r1,88
ffc1e06c: 38 c0 00 01 li r6,1
ffc1e070: 4b ff e7 cd bl ffc1c83c <rtems_rfs_buffer_handle_request>
if (rc > 0)
ffc1e074: 7c 7e 1b 79 mr. r30,r3
ffc1e078: 41 81 01 1c bgt- ffc1e194 <rtems_rfs_dir_empty+0x1ec> <== NEVER TAKEN
break;
entry = rtems_rfs_buffer_data (&buffer);
ffc1e07c: 81 21 00 60 lwz r9,96(r1)
offset = 0;
ffc1e080: 3b 80 00 00 li r28,0
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
ffc1e084: 81 5f 00 08 lwz r10,8(r31)
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
if (rc > 0)
break;
entry = rtems_rfs_buffer_data (&buffer);
ffc1e088: 81 29 00 1c lwz r9,28(r9)
offset = 0;
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
ffc1e08c: 39 4a ff f6 addi r10,r10,-10
ffc1e090: 48 00 00 d8 b ffc1e168 <rtems_rfs_dir_empty+0x1c0>
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
ffc1e094: 8b a9 00 08 lbz r29,8(r9)
ffc1e098: 89 09 00 09 lbz r8,9(r9)
ffc1e09c: 57 bd 40 2e rlwinm r29,r29,8,0,23
eino = rtems_rfs_dir_entry_ino (entry);
ffc1e0a0: 8b 49 00 00 lbz r26,0(r9)
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
ffc1e0a4: 7f bd 43 78 or r29,r29,r8
eino = rtems_rfs_dir_entry_ino (entry);
ffc1e0a8: 89 09 00 01 lbz r8,1(r9)
ffc1e0ac: 57 5a c0 0e rlwinm r26,r26,24,0,7
ffc1e0b0: 55 08 80 1e rlwinm r8,r8,16,0,15
ffc1e0b4: 7f 5a 43 78 or r26,r26,r8
ffc1e0b8: 89 09 00 03 lbz r8,3(r9)
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
ffc1e0bc: 7f 9d b8 00 cmpw cr7,r29,r23
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
ffc1e0c0: 7f 5a 43 78 or r26,r26,r8
ffc1e0c4: 89 09 00 02 lbz r8,2(r9)
ffc1e0c8: 55 08 40 2e rlwinm r8,r8,8,0,23
ffc1e0cc: 7f 5a 43 78 or r26,r26,r8
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
ffc1e0d0: 41 9e 00 e0 beq- cr7,ffc1e1b0 <rtems_rfs_dir_empty+0x208>
break;
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
ffc1e0d4: 2f 9d 00 0a cmpwi cr7,r29,10
ffc1e0d8: 40 9d 00 24 ble- cr7,ffc1e0fc <rtems_rfs_dir_empty+0x154><== NEVER TAKEN
ffc1e0dc: 81 1f 00 1c lwz r8,28(r31)
ffc1e0e0: 7f 9d 40 40 cmplw cr7,r29,r8
ffc1e0e4: 40 9c 00 18 bge- cr7,ffc1e0fc <rtems_rfs_dir_empty+0x154><== NEVER TAKEN
ffc1e0e8: 2f 9a 00 00 cmpwi cr7,r26,0
ffc1e0ec: 41 9e 00 10 beq- cr7,ffc1e0fc <rtems_rfs_dir_empty+0x154><== NEVER TAKEN
ffc1e0f0: 81 1f 00 14 lwz r8,20(r31)
ffc1e0f4: 7f 9a 40 40 cmplw cr7,r26,r8
ffc1e0f8: 40 bd 00 38 ble+ cr7,ffc1e130 <rtems_rfs_dir_empty+0x188><== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_EMPTY))
ffc1e0fc: 38 60 00 01 li r3,1 <== NOT EXECUTED
ffc1e100: 38 80 00 00 li r4,0 <== NOT EXECUTED
ffc1e104: 4b ff 62 c5 bl ffc143c8 <rtems_rfs_trace> <== NOT EXECUTED
ffc1e108: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc1e10c: 41 be 00 a4 beq+ cr7,ffc1e1b0 <rtems_rfs_dir_empty+0x208><== NOT EXECUTED
printf ("rtems-rfs: dir-empty: "
ffc1e110: 80 9b 00 08 lwz r4,8(r27) <== NOT EXECUTED
ffc1e114: 7e c3 b3 78 mr r3,r22 <== NOT EXECUTED
ffc1e118: 7f a5 eb 78 mr r5,r29 <== NOT EXECUTED
ffc1e11c: 7f 46 d3 78 mr r6,r26 <== NOT EXECUTED
ffc1e120: 7f 87 e3 78 mr r7,r28 <== NOT EXECUTED
ffc1e124: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1e128: 48 00 58 65 bl ffc2398c <printf> <== NOT EXECUTED
ffc1e12c: 48 00 00 84 b ffc1e1b0 <rtems_rfs_dir_empty+0x208> <== NOT EXECUTED
/*
* Ignore the current (.) and parent (..) entries. Anything else means
* the directory is not empty.
*/
if (((elength != (RTEMS_RFS_DIR_ENTRY_SIZE + 1)) ||
ffc1e130: 2f 9d 00 0b cmpwi cr7,r29,11
ffc1e134: 40 be 00 0c bne+ cr7,ffc1e140 <rtems_rfs_dir_empty+0x198>
ffc1e138: 89 09 00 0a lbz r8,10(r9)
ffc1e13c: 48 00 00 1c b ffc1e158 <rtems_rfs_dir_empty+0x1b0>
(entry[RTEMS_RFS_DIR_ENTRY_SIZE] != '.')) &&
ffc1e140: 2f 9d 00 0c cmpwi cr7,r29,12
ffc1e144: 40 9e 00 3c bne- cr7,ffc1e180 <rtems_rfs_dir_empty+0x1d8>
((elength != (RTEMS_RFS_DIR_ENTRY_SIZE + 2)) ||
ffc1e148: 89 09 00 0a lbz r8,10(r9)
ffc1e14c: 2f 88 00 2e cmpwi cr7,r8,46
ffc1e150: 40 9e 00 30 bne- cr7,ffc1e180 <rtems_rfs_dir_empty+0x1d8><== NEVER TAKEN
(entry[RTEMS_RFS_DIR_ENTRY_SIZE] != '.') ||
ffc1e154: 89 09 00 0b lbz r8,11(r9)
ffc1e158: 2f 88 00 2e cmpwi cr7,r8,46
ffc1e15c: 40 9e 00 24 bne- cr7,ffc1e180 <rtems_rfs_dir_empty+0x1d8><== NEVER TAKEN
{
empty = false;
break;
}
entry += elength;
ffc1e160: 7d 29 ea 14 add r9,r9,r29
offset += elength;
ffc1e164: 7f 9c ea 14 add r28,r28,r29
break;
entry = rtems_rfs_buffer_data (&buffer);
offset = 0;
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
ffc1e168: 7f 9c 50 40 cmplw cr7,r28,r10
ffc1e16c: 41 9c ff 28 blt+ cr7,ffc1e094 <rtems_rfs_dir_empty+0xec><== ALWAYS TAKEN
ffc1e170: 48 00 00 40 b ffc1e1b0 <rtems_rfs_dir_empty+0x208> <== NOT EXECUTED
if (empty)
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
if (rc > 0)
{
if (rc == ENXIO)
ffc1e174: 2f 9e 00 06 cmpwi cr7,r30,6
ffc1e178: 40 be 00 1c bne+ cr7,ffc1e194 <rtems_rfs_dir_empty+0x1ec><== NEVER TAKEN
ffc1e17c: 48 00 00 14 b ffc1e190 <rtems_rfs_dir_empty+0x1e8>
break;
}
}
}
if ((rc == 0) && !empty)
ffc1e180: 2f 9e 00 00 cmpwi cr7,r30,0
ffc1e184: 40 9e 00 10 bne- cr7,ffc1e194 <rtems_rfs_dir_empty+0x1ec><== NEVER TAKEN
rc = ENOTEMPTY;
ffc1e188: 3b c0 00 5a li r30,90
ffc1e18c: 48 00 00 08 b ffc1e194 <rtems_rfs_dir_empty+0x1ec>
if (empty)
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
if (rc > 0)
{
if (rc == ENXIO)
ffc1e190: 3b c0 00 00 li r30,0
}
if ((rc == 0) && !empty)
rc = ENOTEMPTY;
rtems_rfs_buffer_handle_close (fs, &buffer);
ffc1e194: 38 81 00 58 addi r4,r1,88
ffc1e198: 7f e3 fb 78 mr r3,r31
ffc1e19c: 4b ff ed c5 bl ffc1cf60 <rtems_rfs_buffer_handle_close>
rtems_rfs_block_map_close (fs, &map);
ffc1e1a0: 7f e3 fb 78 mr r3,r31
ffc1e1a4: 38 81 00 08 addi r4,r1,8
ffc1e1a8: 4b ff d8 39 bl ffc1b9e0 <rtems_rfs_block_map_close>
ffc1e1ac: 48 00 00 20 b ffc1e1cc <rtems_rfs_dir_empty+0x224>
offset += elength;
}
if (empty)
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
ffc1e1b0: 7f e3 fb 78 mr r3,r31
ffc1e1b4: 7f 04 c3 78 mr r4,r24
ffc1e1b8: 7f 25 cb 78 mr r5,r25
ffc1e1bc: 4b ff dc 01 bl ffc1bdbc <rtems_rfs_block_map_next_block>
if (rc > 0)
ffc1e1c0: 7c 7e 1b 79 mr. r30,r3
ffc1e1c4: 40 81 fe 9c ble+ ffc1e060 <rtems_rfs_dir_empty+0xb8> <== NEVER TAKEN
ffc1e1c8: 4b ff ff ac b ffc1e174 <rtems_rfs_dir_empty+0x1cc>
rc = ENOTEMPTY;
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
ffc1e1cc: 39 61 00 90 addi r11,r1,144
ffc1e1d0: 7f c3 f3 78 mr r3,r30
ffc1e1d4: 4b fe 33 74 b ffc01548 <_restgpr_22_x>
ffc21c3c <rtems_rfs_dir_hash>:
{
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;
ffc21c3c: 38 a4 ff ff addi r5,r4,-1
ffc21c40: 38 c0 00 0c li r6,12
ffc21c44: 7c c5 33 96 divwu r6,r5,r6
ffc21c48: 2f 84 00 00 cmpwi cr7,r4,0
ffc21c4c: 3d 44 df df addis r10,r4,-8225
ffc21c50: 39 4a 16 9f addi r10,r10,5791
ffc21c54: 7d 48 53 78 mr r8,r10
ffc21c58: 7d 47 53 78 mr r7,r10
ffc21c5c: 38 c6 00 01 addi r6,r6,1
ffc21c60: 40 be 00 f8 bne+ cr7,ffc21d58 <rtems_rfs_dir_hash+0x11c><== ALWAYS TAKEN
ffc21c64: 38 c0 00 01 li r6,1 <== NOT EXECUTED
ffc21c68: 48 00 00 f0 b ffc21d58 <rtems_rfs_dir_hash+0x11c> <== NOT EXECUTED
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];
ffc21c6c: 88 a3 00 00 lbz r5,0(r3)
c += k[8];
c += ((uint32_t)k[9])<<8;
c += ((uint32_t)k[10])<<16;
c += ((uint32_t)k[11])<<24;
mix(a,b,c);
length -= 12;
ffc21c70: 38 84 ff f4 addi r4,r4,-12
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];
ffc21c74: 7c e5 3a 14 add r7,r5,r7
a += ((uint32_t)k[1])<<8;
ffc21c78: 88 a3 00 01 lbz r5,1(r3)
ffc21c7c: 54 a5 40 2e rlwinm r5,r5,8,0,23
ffc21c80: 7c e7 2a 14 add r7,r7,r5
a += ((uint32_t)k[2])<<16;
ffc21c84: 88 a3 00 02 lbz r5,2(r3)
ffc21c88: 54 a5 80 1e rlwinm r5,r5,16,0,15
ffc21c8c: 7c e7 2a 14 add r7,r7,r5
a += ((uint32_t)k[3])<<24;
ffc21c90: 88 a3 00 03 lbz r5,3(r3)
ffc21c94: 54 a5 c0 0e rlwinm r5,r5,24,0,7
ffc21c98: 7c e7 2a 14 add r7,r7,r5
b += k[4];
ffc21c9c: 88 a3 00 04 lbz r5,4(r3)
ffc21ca0: 7d 05 42 14 add r8,r5,r8
b += ((uint32_t)k[5])<<8;
ffc21ca4: 88 a3 00 05 lbz r5,5(r3)
ffc21ca8: 54 a5 40 2e rlwinm r5,r5,8,0,23
ffc21cac: 7d 08 2a 14 add r8,r8,r5
b += ((uint32_t)k[6])<<16;
ffc21cb0: 88 a3 00 06 lbz r5,6(r3)
ffc21cb4: 54 a5 80 1e rlwinm r5,r5,16,0,15
ffc21cb8: 7d 08 2a 14 add r8,r8,r5
b += ((uint32_t)k[7])<<24;
ffc21cbc: 88 a3 00 07 lbz r5,7(r3)
ffc21cc0: 54 a5 c0 0e rlwinm r5,r5,24,0,7
ffc21cc4: 7d 08 2a 14 add r8,r8,r5
c += k[8];
ffc21cc8: 88 a3 00 08 lbz r5,8(r3)
ffc21ccc: 7d 45 52 14 add r10,r5,r10
c += ((uint32_t)k[9])<<8;
ffc21cd0: 88 a3 00 09 lbz r5,9(r3)
ffc21cd4: 54 a5 40 2e rlwinm r5,r5,8,0,23
ffc21cd8: 7d 4a 2a 14 add r10,r10,r5
c += ((uint32_t)k[10])<<16;
ffc21cdc: 88 a3 00 0a lbz r5,10(r3)
ffc21ce0: 54 a5 80 1e rlwinm r5,r5,16,0,15
ffc21ce4: 7d 4a 2a 14 add r10,r10,r5
c += ((uint32_t)k[11])<<24;
ffc21ce8: 88 a3 00 0b lbz r5,11(r3)
mix(a,b,c);
length -= 12;
k += 12;
ffc21cec: 38 63 00 0c addi r3,r3,12
b += ((uint32_t)k[6])<<16;
b += ((uint32_t)k[7])<<24;
c += k[8];
c += ((uint32_t)k[9])<<8;
c += ((uint32_t)k[10])<<16;
c += ((uint32_t)k[11])<<24;
ffc21cf0: 54 a5 c0 0e rlwinm r5,r5,24,0,7
ffc21cf4: 7d 4a 2a 14 add r10,r10,r5
mix(a,b,c);
ffc21cf8: 55 45 20 3e rotlwi r5,r10,4
ffc21cfc: 7c ea 38 50 subf r7,r10,r7
ffc21d00: 7c e7 2a 78 xor r7,r7,r5
ffc21d04: 7d 4a 42 14 add r10,r10,r8
ffc21d08: 54 e5 30 3e rotlwi r5,r7,6
ffc21d0c: 7d 07 40 50 subf r8,r7,r8
ffc21d10: 7c a8 42 78 xor r8,r5,r8
ffc21d14: 7c e7 52 14 add r7,r7,r10
ffc21d18: 55 05 40 3e rotlwi r5,r8,8
ffc21d1c: 7d 48 50 50 subf r10,r8,r10
ffc21d20: 7c aa 52 78 xor r10,r5,r10
ffc21d24: 7d 08 3a 14 add r8,r8,r7
ffc21d28: 55 45 80 3e rotlwi r5,r10,16
ffc21d2c: 7c ea 38 50 subf r7,r10,r7
ffc21d30: 7c a7 3a 78 xor r7,r5,r7
ffc21d34: 7d 4a 42 14 add r10,r10,r8
ffc21d38: 54 e5 98 3e rotlwi r5,r7,19
ffc21d3c: 7d 07 40 50 subf r8,r7,r8
ffc21d40: 7c a8 42 78 xor r8,r5,r8
ffc21d44: 7c e7 52 14 add r7,r7,r10
ffc21d48: 55 05 20 3e rotlwi r5,r8,4
ffc21d4c: 7d 48 50 50 subf r10,r8,r10
ffc21d50: 7c aa 52 78 xor r10,r5,r10
ffc21d54: 7d 08 3a 14 add r8,r8,r7
} 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)
ffc21d58: 34 c6 ff ff addic. r6,r6,-1
ffc21d5c: 40 82 ff 10 bne+ ffc21c6c <rtems_rfs_dir_hash+0x30>
length -= 12;
k += 12;
}
/*-------------------------------- last block: affect all 32 bits of (c) */
switch(length) /* all the case statements fall through */
ffc21d60: 38 84 ff ff addi r4,r4,-1
ffc21d64: 2b 84 00 0b cmplwi cr7,r4,11
ffc21d68: 41 9d 00 f8 bgt- cr7,ffc21e60 <rtems_rfs_dir_hash+0x224><== NEVER TAKEN
ffc21d6c: 3c c0 ff c3 lis r6,-61
ffc21d70: 38 c6 72 c4 addi r6,r6,29380
ffc21d74: 54 84 10 3a rlwinm r4,r4,2,0,29
ffc21d78: 7c a6 20 2e lwzx r5,r6,r4
ffc21d7c: 7c c5 32 14 add r6,r5,r6
ffc21d80: 7c c9 03 a6 mtctr r6
ffc21d84: 4e 80 04 20 bctr
{
case 12: c+=((uint32_t)k[11])<<24;
ffc21d88: 88 c3 00 0b lbz r6,11(r3)
ffc21d8c: 54 c6 c0 0e rlwinm r6,r6,24,0,7
ffc21d90: 7d 46 52 14 add r10,r6,r10
case 11: c+=((uint32_t)k[10])<<16;
ffc21d94: 88 c3 00 0a lbz r6,10(r3)
ffc21d98: 54 c6 80 1e rlwinm r6,r6,16,0,15
ffc21d9c: 7d 4a 32 14 add r10,r10,r6
case 10: c+=((uint32_t)k[9])<<8;
ffc21da0: 88 c3 00 09 lbz r6,9(r3)
ffc21da4: 54 c6 40 2e rlwinm r6,r6,8,0,23
ffc21da8: 7d 4a 32 14 add r10,r10,r6
case 9 : c+=k[8];
ffc21dac: 88 c3 00 08 lbz r6,8(r3)
ffc21db0: 7d 4a 32 14 add r10,r10,r6
case 8 : b+=((uint32_t)k[7])<<24;
ffc21db4: 88 c3 00 07 lbz r6,7(r3)
ffc21db8: 54 c6 c0 0e rlwinm r6,r6,24,0,7
ffc21dbc: 7d 06 42 14 add r8,r6,r8
case 7 : b+=((uint32_t)k[6])<<16;
ffc21dc0: 88 c3 00 06 lbz r6,6(r3)
ffc21dc4: 54 c6 80 1e rlwinm r6,r6,16,0,15
ffc21dc8: 7d 08 32 14 add r8,r8,r6
case 6 : b+=((uint32_t)k[5])<<8;
ffc21dcc: 88 c3 00 05 lbz r6,5(r3)
ffc21dd0: 54 c6 40 2e rlwinm r6,r6,8,0,23
ffc21dd4: 7d 08 32 14 add r8,r8,r6
case 5 : b+=k[4];
ffc21dd8: 88 c3 00 04 lbz r6,4(r3)
ffc21ddc: 7d 08 32 14 add r8,r8,r6
case 4 : a+=((uint32_t)k[3])<<24;
ffc21de0: 88 c3 00 03 lbz r6,3(r3)
ffc21de4: 54 c6 c0 0e rlwinm r6,r6,24,0,7
ffc21de8: 7c e6 3a 14 add r7,r6,r7
case 3 : a+=((uint32_t)k[2])<<16;
ffc21dec: 88 c3 00 02 lbz r6,2(r3)
ffc21df0: 54 c6 80 1e rlwinm r6,r6,16,0,15
ffc21df4: 7c e7 32 14 add r7,r7,r6
case 2 : a+=((uint32_t)k[1])<<8;
ffc21df8: 88 c3 00 01 lbz r6,1(r3)
ffc21dfc: 54 c6 40 2e rlwinm r6,r6,8,0,23
ffc21e00: 7c e7 32 14 add r7,r7,r6
case 1 : a+=k[0];
ffc21e04: 89 23 00 00 lbz r9,0(r3)
break;
case 0 : return c;
}
}
final(a,b,c);
ffc21e08: 7d 4a 42 78 xor r10,r10,r8
case 6 : b+=((uint32_t)k[5])<<8;
case 5 : b+=k[4];
case 4 : a+=((uint32_t)k[3])<<24;
case 3 : a+=((uint32_t)k[2])<<16;
case 2 : a+=((uint32_t)k[1])<<8;
case 1 : a+=k[0];
ffc21e0c: 7c e7 4a 14 add r7,r7,r9
break;
case 0 : return c;
}
}
final(a,b,c);
ffc21e10: 55 09 70 3e rotlwi r9,r8,14
ffc21e14: 7d 29 50 50 subf r9,r9,r10
ffc21e18: 55 2a 58 3e rotlwi r10,r9,11
ffc21e1c: 7d 27 3a 78 xor r7,r9,r7
ffc21e20: 7c ea 38 50 subf r7,r10,r7
ffc21e24: 54 ea c8 3e rotlwi r10,r7,25
ffc21e28: 7c e8 42 78 xor r8,r7,r8
ffc21e2c: 7d 0a 40 50 subf r8,r10,r8
ffc21e30: 7d 09 4a 78 xor r9,r8,r9
ffc21e34: 55 06 80 3e rotlwi r6,r8,16
ffc21e38: 7d 26 48 50 subf r9,r6,r9
ffc21e3c: 55 2a 20 3e rotlwi r10,r9,4
ffc21e40: 7d 27 3a 78 xor r7,r9,r7
ffc21e44: 7c ea 38 50 subf r7,r10,r7
ffc21e48: 7c e8 42 78 xor r8,r7,r8
ffc21e4c: 54 e7 70 3e rotlwi r7,r7,14
ffc21e50: 7d 07 40 50 subf r8,r7,r8
ffc21e54: 7d 0a 4a 78 xor r10,r8,r9
ffc21e58: 55 08 c0 3e rotlwi r8,r8,24
ffc21e5c: 7d 48 50 50 subf r10,r8,r10
return c;
}
ffc21e60: 7d 43 53 78 mr r3,r10
ffc21e64: 4e 80 00 20 blr
ffc1cf9c <rtems_rfs_dir_lookup_ino>:
rtems_rfs_inode_handle* inode,
const char* name,
int length,
rtems_rfs_ino* ino,
uint32_t* offset)
{
ffc1cf9c: 94 21 ff 48 stwu r1,-184(r1)
ffc1cfa0: 7c 08 02 a6 mflr r0
ffc1cfa4: bd c1 00 70 stmw r14,112(r1)
ffc1cfa8: 7c 7d 1b 78 mr r29,r3
ffc1cfac: 7c 9c 23 78 mr r28,r4
rtems_rfs_block_map map;
rtems_rfs_buffer_handle entries;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
ffc1cfb0: 38 60 00 00 li r3,0
rtems_rfs_inode_handle* inode,
const char* name,
int length,
rtems_rfs_ino* ino,
uint32_t* offset)
{
ffc1cfb4: 90 01 00 bc stw r0,188(r1)
rtems_rfs_block_map map;
rtems_rfs_buffer_handle entries;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
ffc1cfb8: 3c 80 04 00 lis r4,1024
rtems_rfs_inode_handle* inode,
const char* name,
int length,
rtems_rfs_ino* ino,
uint32_t* offset)
{
ffc1cfbc: 7c b8 2b 78 mr r24,r5
ffc1cfc0: 7c da 33 78 mr r26,r6
ffc1cfc4: 7c f9 3b 78 mr r25,r7
ffc1cfc8: 7d 17 43 78 mr r23,r8
rtems_rfs_block_map map;
rtems_rfs_buffer_handle entries;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
ffc1cfcc: 4b ff 73 fd bl ffc143c8 <rtems_rfs_trace>
ffc1cfd0: 2f 83 00 00 cmpwi cr7,r3,0
ffc1cfd4: 41 be 00 48 beq+ cr7,ffc1d01c <rtems_rfs_dir_lookup_ino+0x80><== ALWAYS TAKEN
{
int c;
printf ("rtems-rfs: dir-lookup-ino: lookup ino: root=%" PRId32 ", path=",
ffc1cfd8: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1cfdc: 80 9c 00 08 lwz r4,8(r28) <== NOT EXECUTED
ffc1cfe0: 38 63 62 b3 addi r3,r3,25267 <== NOT EXECUTED
ffc1cfe4: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1cfe8: 48 00 69 a5 bl ffc2398c <printf> <== NOT EXECUTED
inode->ino);
for (c = 0; c < length; c++)
ffc1cfec: 3b e0 00 00 li r31,0 <== NOT EXECUTED
ffc1cff0: 48 00 00 10 b ffc1d000 <rtems_rfs_dir_lookup_ino+0x64><== NOT EXECUTED
printf ("%c", name[c]);
ffc1cff4: 7c 78 f8 ae lbzx r3,r24,r31 <== 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++)
ffc1cff8: 3b ff 00 01 addi r31,r31,1 <== NOT EXECUTED
printf ("%c", name[c]);
ffc1cffc: 48 00 6c 1d bl ffc23c18 <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++)
ffc1d000: 7f 9f d0 00 cmpw cr7,r31,r26 <== NOT EXECUTED
ffc1d004: 41 9c ff f0 blt+ cr7,ffc1cff4 <rtems_rfs_dir_lookup_ino+0x58><== NOT EXECUTED
printf ("%c", name[c]);
printf (", len=%d\n", length);
ffc1d008: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1d00c: 38 63 62 ea addi r3,r3,25322 <== NOT EXECUTED
ffc1d010: 7f 44 d3 78 mr r4,r26 <== NOT EXECUTED
ffc1d014: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1d018: 48 00 69 75 bl ffc2398c <printf> <== NOT EXECUTED
}
*ino = RTEMS_RFS_EMPTY_INO;
ffc1d01c: 3b c0 00 00 li r30,0
ffc1d020: 93 d9 00 00 stw r30,0(r25)
*offset = 0;
rc = rtems_rfs_block_map_open (fs, inode, &map);
ffc1d024: 3a 01 00 08 addi r16,r1,8
ffc1d028: 7f a3 eb 78 mr r3,r29
printf ("%c", name[c]);
printf (", len=%d\n", length);
}
*ino = RTEMS_RFS_EMPTY_INO;
*offset = 0;
ffc1d02c: 93 d7 00 00 stw r30,0(r23)
rc = rtems_rfs_block_map_open (fs, inode, &map);
ffc1d030: 7f 84 e3 78 mr r4,r28
ffc1d034: 7e 05 83 78 mr r5,r16
ffc1d038: 4b ff e7 f1 bl ffc1b828 <rtems_rfs_block_map_open>
if (rc > 0)
ffc1d03c: 7c 7f 1b 79 mr. r31,r3
ffc1d040: 40 81 00 44 ble- ffc1d084 <rtems_rfs_dir_lookup_ino+0xe8><== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
ffc1d044: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc1d048: 3c 80 04 00 lis r4,1024 <== NOT EXECUTED
ffc1d04c: 4b ff 73 7d bl ffc143c8 <rtems_rfs_trace> <== NOT EXECUTED
ffc1d050: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc1d054: 41 be 04 38 beq+ cr7,ffc1d48c <rtems_rfs_dir_lookup_ino+0x4f0><== NOT EXECUTED
printf ("rtems-rfs: dir-lookup-ino: map open failed for ino %" PRIu32 ": %d: %s",
ffc1d058: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc1d05c: 83 dc 00 08 lwz r30,8(r28) <== NOT EXECUTED
ffc1d060: 48 00 7b 19 bl ffc24b78 <strerror> <== NOT EXECUTED
ffc1d064: 7f e5 fb 78 mr r5,r31 <== NOT EXECUTED
ffc1d068: 7c 66 1b 78 mr r6,r3 <== NOT EXECUTED
ffc1d06c: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1d070: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED
ffc1d074: 38 63 62 f4 addi r3,r3,25332 <== NOT EXECUTED
ffc1d078: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1d07c: 48 00 69 11 bl ffc2398c <printf> <== NOT EXECUTED
ffc1d080: 48 00 04 0c b ffc1d48c <rtems_rfs_dir_lookup_ino+0x4f0><== NOT EXECUTED
uint32_t hash;
/*
* Calculate the hash of the look up string.
*/
hash = rtems_rfs_dir_hash (name, length);
ffc1d084: 7f 44 d3 78 mr r4,r26
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
ffc1d088: 9b c1 00 58 stb r30,88(r1)
ffc1d08c: 7f 03 c3 78 mr r3,r24
handle->bnum = 0;
ffc1d090: 93 c1 00 5c stw r30,92(r1)
/*
* 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);
ffc1d094: 3a 21 00 64 addi r17,r1,100
handle->buffer = NULL;
ffc1d098: 93 c1 00 60 stw r30,96(r1)
uint32_t hash;
/*
* Calculate the hash of the look up string.
*/
hash = rtems_rfs_dir_hash (name, length);
ffc1d09c: 48 00 4b a1 bl ffc21c3c <rtems_rfs_dir_hash>
/*
* 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);
ffc1d0a0: 7e 04 83 78 mr r4,r16
uint32_t hash;
/*
* Calculate the hash of the look up string.
*/
hash = rtems_rfs_dir_hash (name, length);
ffc1d0a4: 90 61 00 68 stw r3,104(r1)
/*
* 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);
ffc1d0a8: 38 a0 00 00 li r5,0
ffc1d0ac: 7f a3 eb 78 mr r3,r29
ffc1d0b0: 38 c0 00 00 li r6,0
ffc1d0b4: 7e 27 8b 78 mr r7,r17
ffc1d0b8: 4b ff ec 75 bl ffc1bd2c <rtems_rfs_block_map_seek>
if (rc > 0)
ffc1d0bc: 7c 7f 1b 79 mr. r31,r3
ffc1d0c0: 40 81 03 14 ble- ffc1d3d4 <rtems_rfs_dir_lookup_ino+0x438><== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
ffc1d0c4: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc1d0c8: 3c 80 04 00 lis r4,1024 <== NOT EXECUTED
ffc1d0cc: 4b ff 72 fd bl ffc143c8 <rtems_rfs_trace> <== NOT EXECUTED
ffc1d0d0: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc1d0d4: 41 be 00 24 beq+ cr7,ffc1d0f8 <rtems_rfs_dir_lookup_ino+0x15c><== NOT EXECUTED
printf ("rtems-rfs: dir-lookup-ino: block map find failed: %d: %s\n",
ffc1d0d8: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc1d0dc: 48 00 7a 9d bl ffc24b78 <strerror> <== NOT EXECUTED
ffc1d0e0: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED
ffc1d0e4: 7c 65 1b 78 mr r5,r3 <== NOT EXECUTED
ffc1d0e8: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1d0ec: 38 63 63 33 addi r3,r3,25395 <== NOT EXECUTED
ffc1d0f0: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1d0f4: 48 00 68 99 bl ffc2398c <printf> <== NOT EXECUTED
rc, strerror (rc));
if (rc == ENXIO)
ffc1d0f8: 2f 9f 00 06 cmpwi cr7,r31,6 <== NOT EXECUTED
ffc1d0fc: 40 be 03 48 bne+ cr7,ffc1d444 <rtems_rfs_dir_lookup_ino+0x4a8><== NOT EXECUTED
rc = ENOENT;
ffc1d100: 3b e0 00 02 li r31,2 <== NOT EXECUTED
ffc1d104: 48 00 03 40 b ffc1d444 <rtems_rfs_dir_lookup_ino+0x4a8><== NOT EXECUTED
while ((rc == 0) && block)
{
uint8_t* entry;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
ffc1d108: 38 60 00 00 li r3,0
ffc1d10c: 3c 80 04 00 lis r4,1024
ffc1d110: 4b ff 72 b9 bl ffc143c8 <rtems_rfs_trace>
ffc1d114: 2f 83 00 00 cmpwi cr7,r3,0
ffc1d118: 41 be 00 18 beq+ cr7,ffc1d130 <rtems_rfs_dir_lookup_ino+0x194><== ALWAYS TAKEN
printf ("rtems-rfs: dir-lookup-ino: block read, ino=%" PRIu32 " bno=%" PRId32 "\n",
ffc1d11c: 80 9c 00 08 lwz r4,8(r28) <== NOT EXECUTED
ffc1d120: 7e a3 ab 78 mr r3,r21 <== NOT EXECUTED
ffc1d124: 80 a1 00 18 lwz r5,24(r1) <== NOT EXECUTED
ffc1d128: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1d12c: 48 00 68 61 bl ffc2398c <printf> <== NOT EXECUTED
rtems_rfs_inode_ino (inode), map.bpos.bno);
rc = rtems_rfs_buffer_handle_request (fs, &entries, block, true);
ffc1d130: 80 a1 00 64 lwz r5,100(r1)
ffc1d134: 7f a3 eb 78 mr r3,r29
ffc1d138: 38 81 00 58 addi r4,r1,88
ffc1d13c: 38 c0 00 01 li r6,1
ffc1d140: 4b ff f6 fd bl ffc1c83c <rtems_rfs_buffer_handle_request>
if (rc > 0)
ffc1d144: 7c 7b 1b 79 mr. r27,r3
ffc1d148: 40 a1 00 4c ble+ ffc1d194 <rtems_rfs_dir_lookup_ino+0x1f8><== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
ffc1d14c: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc1d150: 3c 80 04 00 lis r4,1024 <== NOT EXECUTED
ffc1d154: 4b ff 72 75 bl ffc143c8 <rtems_rfs_trace> <== NOT EXECUTED
ffc1d158: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc1d15c: 41 be 03 28 beq+ cr7,ffc1d484 <rtems_rfs_dir_lookup_ino+0x4e8><== NOT EXECUTED
printf ("rtems-rfs: dir-lookup-ino: block read, ino=%" PRIu32 " block=%" PRId32 ": %d: %s\n",
ffc1d160: 7f 63 db 78 mr r3,r27 <== NOT EXECUTED
ffc1d164: 83 dc 00 08 lwz r30,8(r28) <== NOT EXECUTED
ffc1d168: 83 e1 00 64 lwz r31,100(r1) <== NOT EXECUTED
ffc1d16c: 48 00 7a 0d bl ffc24b78 <strerror> <== NOT EXECUTED
ffc1d170: 7c 67 1b 78 mr r7,r3 <== NOT EXECUTED
ffc1d174: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1d178: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED
ffc1d17c: 7f e5 fb 78 mr r5,r31 <== NOT EXECUTED
ffc1d180: 7f 66 db 78 mr r6,r27 <== NOT EXECUTED
ffc1d184: 38 63 63 a5 addi r3,r3,25509 <== NOT EXECUTED
ffc1d188: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1d18c: 48 00 68 01 bl ffc2398c <printf> <== NOT EXECUTED
ffc1d190: 48 00 02 f4 b ffc1d484 <rtems_rfs_dir_lookup_ino+0x4e8><== 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);
ffc1d194: 81 21 00 60 lwz r9,96(r1)
map.bpos.boff = 0;
ffc1d198: 92 81 00 1c stw r20,28(r1)
/*
* 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);
ffc1d19c: 83 c9 00 1c lwz r30,28(r9)
map.bpos.boff = 0;
while (map.bpos.boff < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
ffc1d1a0: 48 00 01 b0 b ffc1d350 <rtems_rfs_dir_lookup_ino+0x3b4>
{
uint32_t ehash;
int elength;
ehash = rtems_rfs_dir_entry_hash (entry);
ffc1d1a4: 88 fe 00 04 lbz r7,4(r30)
ffc1d1a8: 89 3e 00 05 lbz r9,5(r30)
ffc1d1ac: 54 e7 c0 0e rlwinm r7,r7,24,0,7
elength = rtems_rfs_dir_entry_length (entry);
ffc1d1b0: 89 5e 00 09 lbz r10,9(r30)
while (map.bpos.boff < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
uint32_t ehash;
int elength;
ehash = rtems_rfs_dir_entry_hash (entry);
ffc1d1b4: 55 29 80 1e rlwinm r9,r9,16,0,15
elength = rtems_rfs_dir_entry_length (entry);
*ino = rtems_rfs_dir_entry_ino (entry);
ffc1d1b8: 89 1e 00 00 lbz r8,0(r30)
while (map.bpos.boff < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
uint32_t ehash;
int elength;
ehash = rtems_rfs_dir_entry_hash (entry);
ffc1d1bc: 7c e7 4b 78 or r7,r7,r9
ffc1d1c0: 89 3e 00 07 lbz r9,7(r30)
elength = rtems_rfs_dir_entry_length (entry);
*ino = rtems_rfs_dir_entry_ino (entry);
ffc1d1c4: 55 08 c0 0e rlwinm r8,r8,24,0,7
while (map.bpos.boff < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
uint32_t ehash;
int elength;
ehash = rtems_rfs_dir_entry_hash (entry);
ffc1d1c8: 7c e7 4b 78 or r7,r7,r9
ffc1d1cc: 89 3e 00 06 lbz r9,6(r30)
ffc1d1d0: 55 29 40 2e rlwinm r9,r9,8,0,23
ffc1d1d4: 7c e7 4b 78 or r7,r7,r9
elength = rtems_rfs_dir_entry_length (entry);
ffc1d1d8: 89 3e 00 08 lbz r9,8(r30)
ffc1d1dc: 55 29 40 2e rlwinm r9,r9,8,0,23
ffc1d1e0: 7d 36 53 78 or r22,r9,r10
*ino = rtems_rfs_dir_entry_ino (entry);
ffc1d1e4: 89 5e 00 01 lbz r10,1(r30)
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
ffc1d1e8: 7f 96 98 00 cmpw cr7,r22,r19
uint32_t ehash;
int elength;
ehash = rtems_rfs_dir_entry_hash (entry);
elength = rtems_rfs_dir_entry_length (entry);
*ino = rtems_rfs_dir_entry_ino (entry);
ffc1d1ec: 55 4a 80 1e rlwinm r10,r10,16,0,15
ffc1d1f0: 7d 0a 53 78 or r10,r8,r10
ffc1d1f4: 89 1e 00 03 lbz r8,3(r30)
ffc1d1f8: 7d 4a 43 78 or r10,r10,r8
ffc1d1fc: 89 1e 00 02 lbz r8,2(r30)
ffc1d200: 55 08 40 2e rlwinm r8,r8,8,0,23
ffc1d204: 7d 4a 43 78 or r10,r10,r8
ffc1d208: 91 59 00 00 stw r10,0(r25)
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
ffc1d20c: 40 be 00 10 bne+ cr7,ffc1d21c <rtems_rfs_dir_lookup_ino+0x280>
map.bpos.boff += elength;
entry += elength;
}
if (rc == 0)
ffc1d210: 2f 9b 00 00 cmpwi cr7,r27,0
ffc1d214: 40 be 01 b8 bne+ cr7,ffc1d3cc <rtems_rfs_dir_lookup_ino+0x430><== NEVER TAKEN
ffc1d218: 48 00 01 50 b ffc1d368 <rtems_rfs_dir_lookup_ino+0x3cc>
*ino = rtems_rfs_dir_entry_ino (entry);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
break;
if (rtems_rfs_dir_entry_valid (fs, elength, *ino))
ffc1d21c: 2f 96 00 0a cmpwi cr7,r22,10
ffc1d220: 41 bd 00 1c bgt+ cr7,ffc1d23c <rtems_rfs_dir_lookup_ino+0x2a0><== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
ffc1d224: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc1d228: 3c 80 04 00 lis r4,1024 <== NOT EXECUTED
ffc1d22c: 4b ff 71 9d bl ffc143c8 <rtems_rfs_trace> <== NOT EXECUTED
ffc1d230: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc1d234: 41 be 02 2c beq+ cr7,ffc1d460 <rtems_rfs_dir_lookup_ino+0x4c4><== NOT EXECUTED
ffc1d238: 48 00 00 28 b ffc1d260 <rtems_rfs_dir_lookup_ino+0x2c4><== 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))
ffc1d23c: 81 1d 00 1c lwz r8,28(r29)
ffc1d240: 7f 96 40 40 cmplw cr7,r22,r8
ffc1d244: 40 bc ff e0 bge- cr7,ffc1d224 <rtems_rfs_dir_lookup_ino+0x288><== NEVER TAKEN
ffc1d248: 2f 8a 00 00 cmpwi cr7,r10,0
ffc1d24c: 41 be ff d8 beq- cr7,ffc1d224 <rtems_rfs_dir_lookup_ino+0x288><== NEVER TAKEN
ffc1d250: 81 1d 00 14 lwz r8,20(r29)
ffc1d254: 7f 8a 40 40 cmplw cr7,r10,r8
ffc1d258: 40 bd 00 28 ble+ cr7,ffc1d280 <rtems_rfs_dir_lookup_ino+0x2e4><== ALWAYS TAKEN
ffc1d25c: 4b ff ff c8 b ffc1d224 <rtems_rfs_dir_lookup_ino+0x288><== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
printf ("rtems-rfs: dir-lookup-ino: "
ffc1d260: 80 9c 00 08 lwz r4,8(r28) <== NOT EXECUTED
ffc1d264: 7d c3 73 78 mr r3,r14 <== NOT EXECUTED
ffc1d268: 80 d9 00 00 lwz r6,0(r25) <== NOT EXECUTED
ffc1d26c: 7e c5 b3 78 mr r5,r22 <== NOT EXECUTED
ffc1d270: 80 e1 00 1c lwz r7,28(r1) <== NOT EXECUTED
ffc1d274: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1d278: 48 00 67 15 bl ffc2398c <printf> <== NOT EXECUTED
ffc1d27c: 48 00 01 e4 b ffc1d460 <rtems_rfs_dir_lookup_ino+0x4c4><== NOT EXECUTED
rtems_rfs_inode_ino (inode), elength, *ino, map.bpos.boff);
rc = EIO;
break;
}
if (ehash == hash)
ffc1d280: 81 21 00 68 lwz r9,104(r1)
ffc1d284: 7f 87 48 00 cmpw cr7,r7,r9
ffc1d288: 40 be 00 b8 bne+ cr7,ffc1d340 <rtems_rfs_dir_lookup_ino+0x3a4>
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO_CHECK))
ffc1d28c: 38 60 00 00 li r3,0
ffc1d290: 3c 80 08 00 lis r4,2048
ffc1d294: 4b ff 71 35 bl ffc143c8 <rtems_rfs_trace>
ffc1d298: 2f 83 00 00 cmpwi cr7,r3,0
ffc1d29c: 41 be 00 48 beq+ cr7,ffc1d2e4 <rtems_rfs_dir_lookup_ino+0x348><== ALWAYS TAKEN
printf ("rtems-rfs: dir-lookup-ino: "
"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));
ffc1d2a0: 89 1e 00 00 lbz r8,0(r30) <== NOT EXECUTED
}
if (ehash == hash)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO_CHECK))
printf ("rtems-rfs: dir-lookup-ino: "
ffc1d2a4: 7e 43 93 78 mr r3,r18 <== 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));
ffc1d2a8: 89 5e 00 01 lbz r10,1(r30) <== NOT EXECUTED
}
if (ehash == hash)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO_CHECK))
printf ("rtems-rfs: dir-lookup-ino: "
ffc1d2ac: 7e c7 b3 78 mr r7,r22 <== 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));
ffc1d2b0: 55 08 c0 0e rlwinm r8,r8,24,0,7 <== NOT EXECUTED
}
if (ehash == hash)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO_CHECK))
printf ("rtems-rfs: dir-lookup-ino: "
ffc1d2b4: 80 9c 00 08 lwz r4,8(r28) <== 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));
ffc1d2b8: 55 4a 80 1e rlwinm r10,r10,16,0,15 <== NOT EXECUTED
}
if (ehash == hash)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO_CHECK))
printf ("rtems-rfs: dir-lookup-ino: "
ffc1d2bc: 80 a1 00 18 lwz r5,24(r1) <== 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));
ffc1d2c0: 7d 08 53 78 or r8,r8,r10 <== NOT EXECUTED
ffc1d2c4: 89 5e 00 03 lbz r10,3(r30) <== NOT EXECUTED
}
if (ehash == hash)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO_CHECK))
printf ("rtems-rfs: dir-lookup-ino: "
ffc1d2c8: 80 c1 00 1c lwz r6,28(r1) <== 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));
ffc1d2cc: 7d 08 53 78 or r8,r8,r10 <== NOT EXECUTED
ffc1d2d0: 89 5e 00 02 lbz r10,2(r30) <== NOT EXECUTED
ffc1d2d4: 55 4a 40 2e rlwinm r10,r10,8,0,23 <== NOT EXECUTED
}
if (ehash == hash)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO_CHECK))
printf ("rtems-rfs: dir-lookup-ino: "
ffc1d2d8: 7d 08 53 78 or r8,r8,r10 <== NOT EXECUTED
ffc1d2dc: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1d2e0: 48 00 66 ad bl ffc2398c <printf> <== 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)
ffc1d2e4: 38 7e 00 0a addi r3,r30,10
ffc1d2e8: 7f 04 c3 78 mr r4,r24
ffc1d2ec: 7f 45 d3 78 mr r5,r26
ffc1d2f0: 48 00 61 8d bl ffc2347c <memcmp>
ffc1d2f4: 2f 83 00 00 cmpwi cr7,r3,0
ffc1d2f8: 40 be 00 48 bne+ cr7,ffc1d340 <rtems_rfs_dir_lookup_ino+0x3a4><== NEVER TAKEN
{
*offset = rtems_rfs_block_map_pos (fs, &map);
ffc1d2fc: 7f a3 eb 78 mr r3,r29
ffc1d300: 38 81 00 18 addi r4,r1,24
ffc1d304: 4b ff e4 45 bl ffc1b748 <rtems_rfs_block_get_pos>
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO_FOUND))
ffc1d308: 38 60 00 00 li r3,0
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)
{
*offset = rtems_rfs_block_map_pos (fs, &map);
ffc1d30c: 90 97 00 00 stw r4,0(r23)
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO_FOUND))
ffc1d310: 3c 80 10 00 lis r4,4096
ffc1d314: 4b ff 70 b5 bl ffc143c8 <rtems_rfs_trace>
ffc1d318: 2f 83 00 00 cmpwi cr7,r3,0
ffc1d31c: 41 be 01 28 beq+ cr7,ffc1d444 <rtems_rfs_dir_lookup_ino+0x4a8><== ALWAYS TAKEN
printf ("rtems-rfs: dir-lookup-ino: "
ffc1d320: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1d324: 80 9c 00 08 lwz r4,8(r28) <== NOT EXECUTED
ffc1d328: 80 b9 00 00 lwz r5,0(r25) <== NOT EXECUTED
ffc1d32c: 38 63 64 8f addi r3,r3,25743 <== NOT EXECUTED
ffc1d330: 80 d7 00 00 lwz r6,0(r23) <== NOT EXECUTED
ffc1d334: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1d338: 48 00 66 55 bl ffc2398c <printf> <== NOT EXECUTED
ffc1d33c: 48 00 01 08 b ffc1d444 <rtems_rfs_dir_lookup_ino+0x4a8><== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
return 0;
}
}
map.bpos.boff += elength;
ffc1d340: 81 41 00 1c lwz r10,28(r1)
entry += elength;
ffc1d344: 7f de b2 14 add r30,r30,r22
rtems_rfs_block_map_close (fs, &map);
return 0;
}
}
map.bpos.boff += elength;
ffc1d348: 7d 4a b2 14 add r10,r10,r22
ffc1d34c: 91 41 00 1c stw r10,28(r1)
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))
ffc1d350: 81 3d 00 08 lwz r9,8(r29)
ffc1d354: 39 49 ff f6 addi r10,r9,-10
ffc1d358: 81 21 00 1c lwz r9,28(r1)
ffc1d35c: 7f 89 50 40 cmplw cr7,r9,r10
ffc1d360: 41 9c fe 44 blt+ cr7,ffc1d1a4 <rtems_rfs_dir_lookup_ino+0x208><== ALWAYS TAKEN
ffc1d364: 4b ff fe ac b ffc1d210 <rtems_rfs_dir_lookup_ino+0x274><== NOT EXECUTED
entry += elength;
}
if (rc == 0)
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
ffc1d368: 7f a3 eb 78 mr r3,r29
ffc1d36c: 7e 04 83 78 mr r4,r16
ffc1d370: 7e 25 8b 78 mr r5,r17
ffc1d374: 4b ff ea 49 bl ffc1bdbc <rtems_rfs_block_map_next_block>
if ((rc > 0) && (rc != ENXIO))
ffc1d378: 7c 7f 1b 79 mr. r31,r3
ffc1d37c: 40 81 00 84 ble- ffc1d400 <rtems_rfs_dir_lookup_ino+0x464><== NEVER TAKEN
ffc1d380: 2f 9f 00 06 cmpwi cr7,r31,6
ffc1d384: 41 9e 00 40 beq- cr7,ffc1d3c4 <rtems_rfs_dir_lookup_ino+0x428><== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
ffc1d388: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc1d38c: 3c 80 04 00 lis r4,1024 <== NOT EXECUTED
ffc1d390: 4b ff 70 39 bl ffc143c8 <rtems_rfs_trace> <== NOT EXECUTED
ffc1d394: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc1d398: 41 be 00 68 beq+ cr7,ffc1d400 <rtems_rfs_dir_lookup_ino+0x464><== NOT EXECUTED
printf ("rtems-rfs: dir-lookup-ino: "
ffc1d39c: 83 dc 00 08 lwz r30,8(r28) <== NOT EXECUTED
ffc1d3a0: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc1d3a4: 48 00 77 d5 bl ffc24b78 <strerror> <== NOT EXECUTED
ffc1d3a8: 7f e5 fb 78 mr r5,r31 <== NOT EXECUTED
ffc1d3ac: 7c 66 1b 78 mr r6,r3 <== NOT EXECUTED
ffc1d3b0: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED
ffc1d3b4: 7d e3 7b 78 mr r3,r15 <== NOT EXECUTED
ffc1d3b8: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1d3bc: 48 00 65 d1 bl ffc2398c <printf> <== NOT EXECUTED
ffc1d3c0: 48 00 00 40 b ffc1d400 <rtems_rfs_dir_lookup_ino+0x464><== 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;
ffc1d3c4: 3b e0 00 02 li r31,2
ffc1d3c8: 48 00 00 b8 b ffc1d480 <rtems_rfs_dir_lookup_ino+0x4e4>
ffc1d3cc: 7f 7f db 78 mr r31,r27 <== NOT EXECUTED
ffc1d3d0: 48 00 00 30 b ffc1d400 <rtems_rfs_dir_lookup_ino+0x464><== NOT EXECUTED
while ((rc == 0) && block)
{
uint8_t* entry;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
printf ("rtems-rfs: dir-lookup-ino: block read, ino=%" PRIu32 " bno=%" PRId32 "\n",
ffc1d3d4: 3e a0 ff c3 lis r21,-61
ehash = rtems_rfs_dir_entry_hash (entry);
elength = rtems_rfs_dir_entry_length (entry);
*ino = rtems_rfs_dir_entry_ino (entry);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
ffc1d3d8: 3a 60 00 00 li r19,0
}
if (ehash == hash)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO_CHECK))
printf ("rtems-rfs: dir-lookup-ino: "
ffc1d3dc: 3e 40 ff c3 lis r18,-61
{
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))
printf ("rtems-rfs: dir-lookup-ino: "
ffc1d3e0: 3d e0 ff c3 lis r15,-61
break;
if (rtems_rfs_dir_entry_valid (fs, elength, *ino))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
printf ("rtems-rfs: dir-lookup-ino: "
ffc1d3e4: 3d c0 ff c3 lis r14,-61
while ((rc == 0) && block)
{
uint8_t* entry;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
printf ("rtems-rfs: dir-lookup-ino: block read, ino=%" PRIu32 " bno=%" PRId32 "\n",
ffc1d3e8: 3a b5 63 6d addi r21,r21,25453
* means the entry is empty.
*/
entry = rtems_rfs_buffer_data (&entries);
map.bpos.boff = 0;
ffc1d3ec: 3a 80 00 00 li r20,0
ehash = rtems_rfs_dir_entry_hash (entry);
elength = rtems_rfs_dir_entry_length (entry);
*ino = rtems_rfs_dir_entry_ino (entry);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
ffc1d3f0: 62 73 ff ff ori r19,r19,65535
}
if (ehash == hash)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO_CHECK))
printf ("rtems-rfs: dir-lookup-ino: "
ffc1d3f4: 3a 52 64 31 addi r18,r18,25649
{
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))
printf ("rtems-rfs: dir-lookup-ino: "
ffc1d3f8: 39 ef 64 d6 addi r15,r15,25814
break;
if (rtems_rfs_dir_entry_valid (fs, elength, *ino))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
printf ("rtems-rfs: dir-lookup-ino: "
ffc1d3fc: 39 ce 63 e7 addi r14,r14,25575
rtems_rfs_buffer_handle_close (fs, &entries);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
while ((rc == 0) && block)
ffc1d400: 2f 9f 00 00 cmpwi cr7,r31,0
ffc1d404: 40 9e 00 7c bne- cr7,ffc1d480 <rtems_rfs_dir_lookup_ino+0x4e4><== NEVER TAKEN
ffc1d408: 81 21 00 64 lwz r9,100(r1)
ffc1d40c: 2f 89 00 00 cmpwi cr7,r9,0
ffc1d410: 40 9e fc f8 bne+ cr7,ffc1d108 <rtems_rfs_dir_lookup_ino+0x16c><== ALWAYS TAKEN
ffc1d414: 48 00 00 54 b ffc1d468 <rtems_rfs_dir_lookup_ino+0x4cc><== 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",
ffc1d418: 38 60 00 05 li r3,5 <== NOT EXECUTED
ffc1d41c: 83 fc 00 08 lwz r31,8(r28) <== NOT EXECUTED
ffc1d420: 48 00 77 59 bl ffc24b78 <strerror> <== NOT EXECUTED
ffc1d424: 38 a0 00 05 li r5,5 <== NOT EXECUTED
ffc1d428: 7c 66 1b 78 mr r6,r3 <== NOT EXECUTED
ffc1d42c: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1d430: 38 63 65 21 addi r3,r3,25889 <== NOT EXECUTED
ffc1d434: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED
ffc1d438: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1d43c: 48 00 65 51 bl ffc2398c <printf> <== NOT EXECUTED
}
}
if ((rc == 0) && (block == 0))
{
rc = EIO;
ffc1d440: 3b e0 00 05 li r31,5 <== 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);
ffc1d444: 38 81 00 58 addi r4,r1,88
ffc1d448: 7f a3 eb 78 mr r3,r29
ffc1d44c: 4b ff fb 15 bl ffc1cf60 <rtems_rfs_buffer_handle_close>
rtems_rfs_block_map_close (fs, &map);
ffc1d450: 7f a3 eb 78 mr r3,r29
ffc1d454: 38 81 00 08 addi r4,r1,8
ffc1d458: 4b ff e5 89 bl ffc1b9e0 <rtems_rfs_block_map_close>
ffc1d45c: 48 00 00 30 b ffc1d48c <rtems_rfs_dir_lookup_ino+0x4f0>
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;
ffc1d460: 3b 60 00 05 li r27,5 <== NOT EXECUTED
ffc1d464: 4b ff ff 68 b ffc1d3cc <rtems_rfs_dir_lookup_ino+0x430><== NOT EXECUTED
}
if ((rc == 0) && (block == 0))
{
rc = EIO;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
ffc1d468: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc1d46c: 3c 80 04 00 lis r4,1024 <== NOT EXECUTED
ffc1d470: 4b ff 6f 59 bl ffc143c8 <rtems_rfs_trace> <== NOT EXECUTED
ffc1d474: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc1d478: 40 be ff a0 bne- cr7,ffc1d418 <rtems_rfs_dir_lookup_ino+0x47c><== NOT EXECUTED
ffc1d47c: 4b ff ff c4 b ffc1d440 <rtems_rfs_dir_lookup_ino+0x4a4><== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &entries);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
while ((rc == 0) && block)
ffc1d480: 7f fb fb 78 mr r27,r31
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;
ffc1d484: 7f 7f db 78 mr r31,r27
ffc1d488: 4b ff ff bc b ffc1d444 <rtems_rfs_dir_lookup_ino+0x4a8>
}
rtems_rfs_buffer_handle_close (fs, &entries);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
ffc1d48c: 39 61 00 b8 addi r11,r1,184
ffc1d490: 7f e3 fb 78 mr r3,r31
ffc1d494: 4b fe 40 94 b ffc01528 <_restgpr_14_x>
ffc1dc28 <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)
{
ffc1dc28: 94 21 ff 58 stwu r1,-168(r1)
ffc1dc2c: 7c 08 02 a6 mflr r0
ffc1dc30: be 21 00 6c stmw r17,108(r1)
ffc1dc34: 7c 7b 1b 78 mr r27,r3
ffc1dc38: 7c 96 23 78 mr r22,r4
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))
ffc1dc3c: 38 60 00 00 li r3,0
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)
{
ffc1dc40: 90 01 00 ac stw r0,172(r1)
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))
ffc1dc44: 3c 80 80 00 lis r4,-32768
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)
{
ffc1dc48: 7c df 33 78 mr r31,r6
ffc1dc4c: 7c be 2b 78 mr r30,r5
ffc1dc50: 7c fa 3b 78 mr r26,r7
ffc1dc54: 7d 19 43 78 mr r25,r8
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))
ffc1dc58: 4b ff 67 71 bl ffc143c8 <rtems_rfs_trace>
ffc1dc5c: 2f 83 00 00 cmpwi cr7,r3,0
ffc1dc60: 41 be 00 20 beq+ cr7,ffc1dc80 <rtems_rfs_dir_read+0x58> <== ALWAYS TAKEN
printf ("rtems-rfs: dir-read: dir=%" PRId32 " offset=%" PRId64 "\n",
ffc1dc64: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1dc68: 80 96 00 08 lwz r4,8(r22) <== NOT EXECUTED
ffc1dc6c: 38 63 68 1a addi r3,r3,26650 <== NOT EXECUTED
ffc1dc70: 7f c5 f3 78 mr r5,r30 <== NOT EXECUTED
ffc1dc74: 7f e6 fb 78 mr r6,r31 <== NOT EXECUTED
ffc1dc78: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1dc7c: 48 00 5d 11 bl ffc2398c <printf> <== NOT EXECUTED
rtems_rfs_inode_ino (dir), offset);
*length = 0;
ffc1dc80: 39 20 00 00 li r9,0
ffc1dc84: 91 39 00 00 stw r9,0(r25)
rc = rtems_rfs_block_map_open (fs, dir, &map);
ffc1dc88: 7f 63 db 78 mr r3,r27
ffc1dc8c: 7e c4 b3 78 mr r4,r22
ffc1dc90: 38 a1 00 08 addi r5,r1,8
ffc1dc94: 4b ff db 95 bl ffc1b828 <rtems_rfs_block_map_open>
if (rc > 0)
ffc1dc98: 7c 7d 1b 79 mr. r29,r3
ffc1dc9c: 41 a1 03 00 bgt+ ffc1df9c <rtems_rfs_dir_read+0x374> <== NEVER TAKEN
return rc;
if (((rtems_rfs_fs_block_size (fs) -
(offset % rtems_rfs_fs_block_size (fs))) <= RTEMS_RFS_DIR_ENTRY_SIZE))
ffc1dca0: 83 bb 00 08 lwz r29,8(r27)
ffc1dca4: 3b 80 00 00 li r28,0
ffc1dca8: 7f c3 f3 78 mr r3,r30
ffc1dcac: 7f e4 fb 78 mr r4,r31
ffc1dcb0: 7f 85 e3 78 mr r5,r28
ffc1dcb4: 7f a6 eb 78 mr r6,r29
ffc1dcb8: 48 01 32 7d bl ffc30f34 <__moddi3>
rc = rtems_rfs_block_map_open (fs, dir, &map);
if (rc > 0)
return rc;
if (((rtems_rfs_fs_block_size (fs) -
ffc1dcbc: 7d 64 e8 10 subfc r11,r4,r29
ffc1dcc0: 7d 43 e1 10 subfe r10,r3,r28
ffc1dcc4: 2f 8a 00 00 cmpwi cr7,r10,0
ffc1dcc8: 41 9d 00 44 bgt- cr7,ffc1dd0c <rtems_rfs_dir_read+0xe4> <== NEVER TAKEN
ffc1dccc: 40 9e 00 0c bne- cr7,ffc1dcd8 <rtems_rfs_dir_read+0xb0> <== NEVER TAKEN
ffc1dcd0: 2b 8b 00 0a cmplwi cr7,r11,10
ffc1dcd4: 41 9d 00 38 bgt- cr7,ffc1dd0c <rtems_rfs_dir_read+0xe4> <== ALWAYS TAKEN
(offset % rtems_rfs_fs_block_size (fs))) <= RTEMS_RFS_DIR_ENTRY_SIZE))
offset = (((offset / rtems_rfs_fs_block_size (fs)) + 1) *
ffc1dcd8: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc1dcdc: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED
ffc1dce0: 7f 85 e3 78 mr r5,r28 <== NOT EXECUTED
ffc1dce4: 7f a6 eb 78 mr r6,r29 <== NOT EXECUTED
ffc1dce8: 48 01 2e 29 bl ffc30b10 <__divdi3> <== NOT EXECUTED
ffc1dcec: 31 64 00 01 addic r11,r4,1 <== NOT EXECUTED
ffc1dcf0: 7d 43 01 94 addze r10,r3 <== NOT EXECUTED
ffc1dcf4: 7d 4a e9 d6 mullw r10,r10,r29 <== NOT EXECUTED
ffc1dcf8: 7d 3c 59 d6 mullw r9,r28,r11 <== NOT EXECUTED
ffc1dcfc: 7f cb e8 16 mulhwu r30,r11,r29 <== NOT EXECUTED
ffc1dd00: 7f eb e9 d6 mullw r31,r11,r29 <== NOT EXECUTED
ffc1dd04: 7d 2a 4a 14 add r9,r10,r9 <== NOT EXECUTED
ffc1dd08: 7f c9 f2 14 add r30,r9,r30 <== NOT EXECUTED
rtems_rfs_fs_block_size (fs));
rc = rtems_rfs_block_map_seek (fs, &map, offset, &block);
ffc1dd0c: 3b 01 00 64 addi r24,r1,100
ffc1dd10: 3b 81 00 08 addi r28,r1,8
ffc1dd14: 7f 63 db 78 mr r3,r27
ffc1dd18: 7f 84 e3 78 mr r4,r28
ffc1dd1c: 7f c5 f3 78 mr r5,r30
ffc1dd20: 7f e6 fb 78 mr r6,r31
ffc1dd24: 7f 07 c3 78 mr r7,r24
ffc1dd28: 4b ff e0 05 bl ffc1bd2c <rtems_rfs_block_map_seek>
if (rc > 0)
ffc1dd2c: 7c 7d 1b 79 mr. r29,r3
ffc1dd30: 40 81 00 14 ble- ffc1dd44 <rtems_rfs_dir_read+0x11c> <== ALWAYS TAKEN
{
if (rc == ENXIO)
ffc1dd34: 2f 9d 00 06 cmpwi cr7,r29,6 <== NOT EXECUTED
ffc1dd38: 40 be 02 58 bne+ cr7,ffc1df90 <rtems_rfs_dir_read+0x368><== NOT EXECUTED
rc = ENOENT;
ffc1dd3c: 3b a0 00 02 li r29,2 <== NOT EXECUTED
ffc1dd40: 48 00 02 50 b ffc1df90 <rtems_rfs_dir_read+0x368> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
ffc1dd44: 39 20 00 00 li r9,0
ffc1dd48: 99 21 00 58 stb r9,88(r1)
handle->bnum = 0;
ffc1dd4c: 39 20 00 00 li r9,0
entry += map.bpos.boff;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
if (elength != RTEMS_RFS_DIR_ENTRY_EMPTY)
ffc1dd50: 3a 80 00 00 li r20,0
}
*length += rtems_rfs_fs_block_size (fs) - map.bpos.boff;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
printf ("rtems-rfs: dir-read: next block: off:%" PRId64 " length:%zd\n",
ffc1dd54: 3e 60 ff c3 lis r19,-61
ffc1dd58: 91 21 00 5c stw r9,92(r1)
entry += map.bpos.boff;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
if (elength != RTEMS_RFS_DIR_ENTRY_EMPTY)
ffc1dd5c: 62 94 ff ff ori r20,r20,65535
handle->buffer = NULL;
ffc1dd60: 91 21 00 60 stw r9,96(r1)
}
*length += rtems_rfs_fs_block_size (fs) - map.bpos.boff;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
printf ("rtems-rfs: dir-read: next block: off:%" PRId64 " length:%zd\n",
ffc1dd64: 3a 73 68 bd addi r19,r19,26813
offset, *length);
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
ffc1dd68: 7f 12 c3 78 mr r18,r24
ffc1dd6c: 7f 91 e3 78 mr r17,r28
uint8_t* entry;
rtems_rfs_ino eino;
int elength;
int remaining;
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
ffc1dd70: 80 a1 00 64 lwz r5,100(r1)
ffc1dd74: 7f 63 db 78 mr r3,r27
ffc1dd78: 38 81 00 58 addi r4,r1,88
ffc1dd7c: 38 c0 00 01 li r6,1
ffc1dd80: 4b ff ea bd bl ffc1c83c <rtems_rfs_buffer_handle_request>
if (rc > 0)
ffc1dd84: 7c 7d 1b 79 mr. r29,r3
ffc1dd88: 40 a1 00 08 ble+ ffc1dd90 <rtems_rfs_dir_read+0x168> <== ALWAYS TAKEN
ffc1dd8c: 48 00 01 f8 b ffc1df84 <rtems_rfs_dir_read+0x35c> <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
entry = rtems_rfs_buffer_data (&buffer);
ffc1dd90: 81 21 00 60 lwz r9,96(r1)
entry += map.bpos.boff;
ffc1dd94: 82 e1 00 1c lwz r23,28(r1)
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
entry = rtems_rfs_buffer_data (&buffer);
ffc1dd98: 81 29 00 1c lwz r9,28(r9)
entry += map.bpos.boff;
ffc1dd9c: 7f 89 ba 14 add r28,r9,r23
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
ffc1dda0: 7e a9 b8 ae lbzx r21,r9,r23
}
entry = rtems_rfs_buffer_data (&buffer);
entry += map.bpos.boff;
elength = rtems_rfs_dir_entry_length (entry);
ffc1dda4: 8b 1c 00 08 lbz r24,8(r28)
ffc1dda8: 89 5c 00 09 lbz r10,9(r28)
ffc1ddac: 57 18 40 2e rlwinm r24,r24,8,0,23
eino = rtems_rfs_dir_entry_ino (entry);
ffc1ddb0: 89 1c 00 01 lbz r8,1(r28)
}
entry = rtems_rfs_buffer_data (&buffer);
entry += map.bpos.boff;
elength = rtems_rfs_dir_entry_length (entry);
ffc1ddb4: 7f 18 53 78 or r24,r24,r10
eino = rtems_rfs_dir_entry_ino (entry);
ffc1ddb8: 89 3c 00 02 lbz r9,2(r28)
if (elength != RTEMS_RFS_DIR_ENTRY_EMPTY)
ffc1ddbc: 7f 98 a0 00 cmpw cr7,r24,r20
entry = rtems_rfs_buffer_data (&buffer);
entry += map.bpos.boff;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
ffc1ddc0: 89 5c 00 03 lbz r10,3(r28)
if (elength != RTEMS_RFS_DIR_ENTRY_EMPTY)
ffc1ddc4: 41 be 01 54 beq+ cr7,ffc1df18 <rtems_rfs_dir_read+0x2f0>
{
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
ffc1ddc8: 2f 98 00 0a cmpwi cr7,r24,10
entry = rtems_rfs_buffer_data (&buffer);
entry += map.bpos.boff;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
ffc1ddcc: 56 b5 c0 0e rlwinm r21,r21,24,0,7
ffc1ddd0: 55 08 80 1e rlwinm r8,r8,16,0,15
ffc1ddd4: 7e b5 43 78 or r21,r21,r8
ffc1ddd8: 7e b5 53 78 or r21,r21,r10
ffc1dddc: 55 29 40 2e rlwinm r9,r9,8,0,23
ffc1dde0: 7e b5 4b 78 or r21,r21,r9
if (elength != RTEMS_RFS_DIR_ENTRY_EMPTY)
{
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
ffc1dde4: 40 9d 00 24 ble- cr7,ffc1de08 <rtems_rfs_dir_read+0x1e0><== NEVER TAKEN
ffc1dde8: 81 3b 00 1c lwz r9,28(r27)
ffc1ddec: 7f 98 48 40 cmplw cr7,r24,r9
ffc1ddf0: 40 9c 00 18 bge- cr7,ffc1de08 <rtems_rfs_dir_read+0x1e0><== NEVER TAKEN
ffc1ddf4: 2f 95 00 00 cmpwi cr7,r21,0
ffc1ddf8: 41 9e 00 10 beq- cr7,ffc1de08 <rtems_rfs_dir_read+0x1e0><== NEVER TAKEN
ffc1ddfc: 81 3b 00 14 lwz r9,20(r27)
ffc1de00: 7f 95 48 40 cmplw cr7,r21,r9
ffc1de04: 40 9d 00 40 ble- cr7,ffc1de44 <rtems_rfs_dir_read+0x21c><== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
ffc1de08: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc1de0c: 3c 80 80 00 lis r4,-32768 <== NOT EXECUTED
ffc1de10: 4b ff 65 b9 bl ffc143c8 <rtems_rfs_trace> <== 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;
ffc1de14: 3b a0 00 05 li r29,5 <== 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))
ffc1de18: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc1de1c: 41 be 01 68 beq+ cr7,ffc1df84 <rtems_rfs_dir_read+0x35c><== NOT EXECUTED
printf ("rtems-rfs: dir-read: "
ffc1de20: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1de24: 80 96 00 08 lwz r4,8(r22) <== NOT EXECUTED
ffc1de28: 80 e1 00 1c lwz r7,28(r1) <== NOT EXECUTED
ffc1de2c: 7f 05 c3 78 mr r5,r24 <== NOT EXECUTED
ffc1de30: 7e a6 ab 78 mr r6,r21 <== NOT EXECUTED
ffc1de34: 38 63 68 44 addi r3,r3,26692 <== NOT EXECUTED
ffc1de38: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1de3c: 48 00 5b 51 bl ffc2398c <printf> <== NOT EXECUTED
ffc1de40: 48 00 01 44 b ffc1df84 <rtems_rfs_dir_read+0x35c> <== NOT EXECUTED
rtems_rfs_inode_ino (dir), elength, eino, map.bpos.boff);
rc = EIO;
break;
}
memset (dirent, 0, sizeof (struct dirent));
ffc1de44: 7f 43 d3 78 mr r3,r26
ffc1de48: 38 80 00 00 li r4,0
ffc1de4c: 38 a0 01 18 li r5,280
ffc1de50: 48 00 58 e1 bl ffc23730 <memset>
dirent->d_off = offset;
dirent->d_reclen = sizeof (struct dirent);
ffc1de54: 39 20 01 18 li r9,280
ffc1de58: b1 3a 00 10 sth r9,16(r26)
*length += elength;
ffc1de5c: 81 39 00 00 lwz r9,0(r25)
rc = EIO;
break;
}
memset (dirent, 0, sizeof (struct dirent));
dirent->d_off = offset;
ffc1de60: 93 da 00 08 stw r30,8(r26)
dirent->d_reclen = sizeof (struct dirent);
*length += elength;
ffc1de64: 7d 38 4a 14 add r9,r24,r9
rc = EIO;
break;
}
memset (dirent, 0, sizeof (struct dirent));
dirent->d_off = offset;
ffc1de68: 93 fa 00 0c stw r31,12(r26)
dirent->d_reclen = sizeof (struct dirent);
*length += elength;
ffc1de6c: 91 39 00 00 stw r9,0(r25)
remaining = rtems_rfs_fs_block_size (fs) - (map.bpos.boff + elength);
ffc1de70: 81 5b 00 08 lwz r10,8(r27)
ffc1de74: 7e f7 50 50 subf r23,r23,r10
ffc1de78: 7e f8 b8 50 subf r23,r24,r23
if (remaining <= RTEMS_RFS_DIR_ENTRY_SIZE)
ffc1de7c: 2f 97 00 0a cmpwi cr7,r23,10
ffc1de80: 41 9d 00 0c bgt- cr7,ffc1de8c <rtems_rfs_dir_read+0x264><== ALWAYS TAKEN
*length += remaining;
ffc1de84: 7d 37 4a 14 add r9,r23,r9 <== NOT EXECUTED
ffc1de88: 91 39 00 00 stw r9,0(r25) <== NOT EXECUTED
elength -= RTEMS_RFS_DIR_ENTRY_SIZE;
ffc1de8c: 3b 18 ff f6 addi r24,r24,-10
ffc1de90: 2f 98 00 ff cmpwi cr7,r24,255
ffc1de94: 40 9d 00 08 ble- cr7,ffc1de9c <rtems_rfs_dir_read+0x274><== ALWAYS TAKEN
ffc1de98: 3b 00 00 ff li r24,255 <== NOT EXECUTED
if (elength > NAME_MAX)
elength = NAME_MAX;
memcpy (dirent->d_name, entry + RTEMS_RFS_DIR_ENTRY_SIZE, elength);
ffc1de9c: 3b fa 00 14 addi r31,r26,20
ffc1dea0: 38 9c 00 0a addi r4,r28,10
ffc1dea4: 7f 05 c3 78 mr r5,r24
ffc1dea8: 7f e3 fb 78 mr r3,r31
ffc1deac: 48 00 56 55 bl ffc23500 <memcpy>
dirent->d_ino = rtems_rfs_dir_entry_ino (entry);
ffc1deb0: 89 5c 00 00 lbz r10,0(r28)
ffc1deb4: 89 3c 00 01 lbz r9,1(r28)
dirent->d_namlen = elength;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
ffc1deb8: 38 60 00 00 li r3,0
if (elength > NAME_MAX)
elength = NAME_MAX;
memcpy (dirent->d_name, entry + RTEMS_RFS_DIR_ENTRY_SIZE, elength);
dirent->d_ino = rtems_rfs_dir_entry_ino (entry);
ffc1debc: 55 4a c0 0e rlwinm r10,r10,24,0,7
ffc1dec0: 55 29 80 1e rlwinm r9,r9,16,0,15
ffc1dec4: 7d 49 4b 78 or r9,r10,r9
ffc1dec8: 89 5c 00 03 lbz r10,3(r28)
dirent->d_namlen = elength;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
ffc1decc: 3c 80 80 00 lis r4,-32768
if (elength > NAME_MAX)
elength = NAME_MAX;
memcpy (dirent->d_name, entry + RTEMS_RFS_DIR_ENTRY_SIZE, elength);
dirent->d_ino = rtems_rfs_dir_entry_ino (entry);
ffc1ded0: 7d 29 53 78 or r9,r9,r10
ffc1ded4: 89 5c 00 02 lbz r10,2(r28)
dirent->d_namlen = elength;
ffc1ded8: b3 1a 00 12 sth r24,18(r26)
if (elength > NAME_MAX)
elength = NAME_MAX;
memcpy (dirent->d_name, entry + RTEMS_RFS_DIR_ENTRY_SIZE, elength);
dirent->d_ino = rtems_rfs_dir_entry_ino (entry);
ffc1dedc: 55 4a 40 2e rlwinm r10,r10,8,0,23
ffc1dee0: 7d 29 53 78 or r9,r9,r10
ffc1dee4: 91 3a 00 00 stw r9,0(r26)
dirent->d_namlen = elength;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
ffc1dee8: 4b ff 64 e1 bl ffc143c8 <rtems_rfs_trace>
ffc1deec: 2f 83 00 00 cmpwi cr7,r3,0
ffc1def0: 41 be 00 94 beq+ cr7,ffc1df84 <rtems_rfs_dir_read+0x35c><== ALWAYS TAKEN
printf ("rtems-rfs: dir-read: found off:%" PRIooff_t " ino:%ld name=%s\n",
ffc1def4: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1def8: 80 ba 00 08 lwz r5,8(r26) <== NOT EXECUTED
ffc1defc: 80 da 00 0c lwz r6,12(r26) <== NOT EXECUTED
ffc1df00: 7f e8 fb 78 mr r8,r31 <== NOT EXECUTED
ffc1df04: 80 fa 00 00 lwz r7,0(r26) <== NOT EXECUTED
ffc1df08: 38 63 68 88 addi r3,r3,26760 <== NOT EXECUTED
ffc1df0c: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1df10: 48 00 5a 7d bl ffc2398c <printf> <== NOT EXECUTED
ffc1df14: 48 00 00 70 b ffc1df84 <rtems_rfs_dir_read+0x35c> <== NOT EXECUTED
dirent->d_off, dirent->d_ino, dirent->d_name);
break;
}
*length += rtems_rfs_fs_block_size (fs) - map.bpos.boff;
ffc1df18: 81 3b 00 08 lwz r9,8(r27)
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
ffc1df1c: 38 60 00 00 li r3,0
ffc1df20: 3c 80 80 00 lis r4,-32768
printf ("rtems-rfs: dir-read: found off:%" PRIooff_t " ino:%ld name=%s\n",
dirent->d_off, dirent->d_ino, dirent->d_name);
break;
}
*length += rtems_rfs_fs_block_size (fs) - map.bpos.boff;
ffc1df24: 7e f7 48 50 subf r23,r23,r9
ffc1df28: 81 39 00 00 lwz r9,0(r25)
ffc1df2c: 7d 29 ba 14 add r9,r9,r23
ffc1df30: 91 39 00 00 stw r9,0(r25)
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
ffc1df34: 4b ff 64 95 bl ffc143c8 <rtems_rfs_trace>
ffc1df38: 2f 83 00 00 cmpwi cr7,r3,0
ffc1df3c: 41 be 00 1c beq+ cr7,ffc1df58 <rtems_rfs_dir_read+0x330><== ALWAYS TAKEN
printf ("rtems-rfs: dir-read: next block: off:%" PRId64 " length:%zd\n",
ffc1df40: 80 f9 00 00 lwz r7,0(r25) <== NOT EXECUTED
ffc1df44: 7e 63 9b 78 mr r3,r19 <== NOT EXECUTED
ffc1df48: 7f c5 f3 78 mr r5,r30 <== NOT EXECUTED
ffc1df4c: 7f e6 fb 78 mr r6,r31 <== NOT EXECUTED
ffc1df50: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1df54: 48 00 5a 39 bl ffc2398c <printf> <== NOT EXECUTED
offset, *length);
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
ffc1df58: 7f 63 db 78 mr r3,r27
ffc1df5c: 7e 24 8b 78 mr r4,r17
ffc1df60: 7e 45 93 78 mr r5,r18
ffc1df64: 4b ff de 59 bl ffc1bdbc <rtems_rfs_block_map_next_block>
if (rc == ENXIO)
ffc1df68: 2f 83 00 06 cmpwi cr7,r3,6
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
printf ("rtems-rfs: dir-read: next block: off:%" PRId64 " length:%zd\n",
offset, *length);
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
ffc1df6c: 7c 7d 1b 78 mr r29,r3
if (rc == ENXIO)
ffc1df70: 41 9e 00 10 beq- cr7,ffc1df80 <rtems_rfs_dir_read+0x358><== ALWAYS TAKEN
/*
* Look for an empty entry and if this is the last block that is the end of
* the directory.
*/
while (rc == 0)
ffc1df74: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc1df78: 41 9e fd f8 beq+ cr7,ffc1dd70 <rtems_rfs_dir_read+0x148><== NOT EXECUTED
ffc1df7c: 48 00 00 08 b ffc1df84 <rtems_rfs_dir_read+0x35c> <== 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;
ffc1df80: 3b a0 00 02 li r29,2
}
rtems_rfs_buffer_handle_close (fs, &buffer);
ffc1df84: 7f 63 db 78 mr r3,r27
ffc1df88: 38 81 00 58 addi r4,r1,88
ffc1df8c: 4b ff ef d5 bl ffc1cf60 <rtems_rfs_buffer_handle_close>
rtems_rfs_block_map_close (fs, &map);
ffc1df90: 7f 63 db 78 mr r3,r27
ffc1df94: 38 81 00 08 addi r4,r1,8
ffc1df98: 4b ff da 49 bl ffc1b9e0 <rtems_rfs_block_map_close>
return rc;
}
ffc1df9c: 39 61 00 a8 addi r11,r1,168
ffc1dfa0: 7f a3 eb 78 mr r3,r29
ffc1dfa4: 4b fe 35 90 b ffc01534 <_restgpr_17_x>
ffc1e1d8 <rtems_rfs_file_close>:
}
int
rtems_rfs_file_close (rtems_rfs_file_system* fs,
rtems_rfs_file_handle* handle)
{
ffc1e1d8: 94 21 ff e0 stwu r1,-32(r1)
ffc1e1dc: 7c 08 02 a6 mflr r0
ffc1e1e0: bf 61 00 0c stmw r27,12(r1)
ffc1e1e4: 7c 7d 1b 78 mr r29,r3
ffc1e1e8: 7c 9f 23 78 mr r31,r4
int rrc;
int rc;
rrc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE))
ffc1e1ec: 38 60 00 10 li r3,16
}
int
rtems_rfs_file_close (rtems_rfs_file_system* fs,
rtems_rfs_file_handle* handle)
{
ffc1e1f0: 90 01 00 24 stw r0,36(r1)
int rrc;
int rc;
rrc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE))
ffc1e1f4: 38 80 00 00 li r4,0
ffc1e1f8: 4b ff 61 d1 bl ffc143c8 <rtems_rfs_trace>
ffc1e1fc: 2f 83 00 00 cmpwi cr7,r3,0
ffc1e200: 41 be 00 1c beq+ cr7,ffc1e21c <rtems_rfs_file_close+0x44><== ALWAYS TAKEN
printf ("rtems-rfs: file-close: entry: ino=%" PRId32 "\n",
handle->shared->inode.ino);
ffc1e204: 81 3f 00 1c lwz r9,28(r31) <== NOT EXECUTED
int rc;
rrc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE))
printf ("rtems-rfs: file-close: entry: ino=%" PRId32 "\n",
ffc1e208: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1e20c: 38 63 69 56 addi r3,r3,26966 <== NOT EXECUTED
ffc1e210: 80 89 00 14 lwz r4,20(r9) <== NOT EXECUTED
ffc1e214: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1e218: 48 00 57 75 bl ffc2398c <printf> <== NOT EXECUTED
handle->shared->inode.ino);
if (handle->shared->references > 0)
ffc1e21c: 80 9f 00 1c lwz r4,28(r31)
ffc1e220: 81 24 00 08 lwz r9,8(r4)
ffc1e224: 2f 89 00 00 cmpwi cr7,r9,0
ffc1e228: 40 9d 00 0c ble- cr7,ffc1e234 <rtems_rfs_file_close+0x5c><== NEVER TAKEN
handle->shared->references--;
ffc1e22c: 39 29 ff ff addi r9,r9,-1
ffc1e230: 91 24 00 08 stw r9,8(r4)
if (handle->shared->references == 0)
ffc1e234: 81 24 00 08 lwz r9,8(r4)
rtems_rfs_file_handle* handle)
{
int rrc;
int rc;
rrc = 0;
ffc1e238: 3b c0 00 00 li r30,0
handle->shared->inode.ino);
if (handle->shared->references > 0)
handle->shared->references--;
if (handle->shared->references == 0)
ffc1e23c: 2f 89 00 00 cmpwi cr7,r9,0
ffc1e240: 40 9e 01 e8 bne- cr7,ffc1e428 <rtems_rfs_file_close+0x250><== NEVER TAKEN
{
if (!rtems_rfs_inode_is_loaded (&handle->shared->inode))
ffc1e244: 81 24 00 18 lwz r9,24(r4)
ffc1e248: 2f 89 00 00 cmpwi cr7,r9,0
ffc1e24c: 40 be 00 18 bne+ cr7,ffc1e264 <rtems_rfs_file_close+0x8c><== NEVER TAKEN
rrc = rtems_rfs_inode_load (fs, &handle->shared->inode);
ffc1e250: 7f a3 eb 78 mr r3,r29
ffc1e254: 38 84 00 0c addi r4,r4,12
ffc1e258: 4b ff 45 ad bl ffc12804 <rtems_rfs_inode_load>
if (rrc == 0)
ffc1e25c: 7c 7e 1b 79 mr. r30,r3
ffc1e260: 40 a2 00 f0 bne+ ffc1e350 <rtems_rfs_file_close+0x178> <== NEVER TAKEN
{
/*
* @todo This could be clever and only update if different.
*/
rtems_rfs_inode_set_atime (&handle->shared->inode,
ffc1e264: 81 3f 00 1c lwz r9,28(r31)
ffc1e268: 81 49 00 8c lwz r10,140(r9)
*/
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);
ffc1e26c: 81 09 00 18 lwz r8,24(r9)
ffc1e270: 55 47 46 3e rlwinm r7,r10,8,24,31
ffc1e274: 98 e8 00 10 stb r7,16(r8)
ffc1e278: 55 47 84 3e rlwinm r7,r10,16,16,31
ffc1e27c: 81 09 00 18 lwz r8,24(r9)
ffc1e280: 98 e8 00 11 stb r7,17(r8)
ffc1e284: 55 47 c2 3e rlwinm r7,r10,24,8,31
ffc1e288: 81 09 00 18 lwz r8,24(r9)
ffc1e28c: 98 e8 00 12 stb r7,18(r8)
ffc1e290: 81 09 00 18 lwz r8,24(r9)
ffc1e294: 99 48 00 13 stb r10,19(r8)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
ffc1e298: 39 00 00 01 li r8,1
ffc1e29c: 99 09 00 1c stb r8,28(r9)
handle->shared->atime);
rtems_rfs_inode_set_mtime (&handle->shared->inode,
ffc1e2a0: 81 3f 00 1c lwz r9,28(r31)
ffc1e2a4: 81 49 00 90 lwz r10,144(r9)
*/
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);
ffc1e2a8: 80 e9 00 18 lwz r7,24(r9)
ffc1e2ac: 55 46 46 3e rlwinm r6,r10,8,24,31
ffc1e2b0: 98 c7 00 14 stb r6,20(r7)
ffc1e2b4: 55 46 84 3e rlwinm r6,r10,16,16,31
ffc1e2b8: 80 e9 00 18 lwz r7,24(r9)
ffc1e2bc: 98 c7 00 15 stb r6,21(r7)
ffc1e2c0: 55 46 c2 3e rlwinm r6,r10,24,8,31
ffc1e2c4: 80 e9 00 18 lwz r7,24(r9)
ffc1e2c8: 98 c7 00 16 stb r6,22(r7)
ffc1e2cc: 80 e9 00 18 lwz r7,24(r9)
ffc1e2d0: 99 47 00 17 stb r10,23(r7)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
ffc1e2d4: 99 09 00 1c stb r8,28(r9)
handle->shared->mtime);
rtems_rfs_inode_set_ctime (&handle->shared->inode,
ffc1e2d8: 81 3f 00 1c lwz r9,28(r31)
ffc1e2dc: 81 49 00 94 lwz r10,148(r9)
*/
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);
ffc1e2e0: 80 e9 00 18 lwz r7,24(r9)
ffc1e2e4: 55 46 46 3e rlwinm r6,r10,8,24,31
ffc1e2e8: 98 c7 00 18 stb r6,24(r7)
ffc1e2ec: 55 46 84 3e rlwinm r6,r10,16,16,31
ffc1e2f0: 80 e9 00 18 lwz r7,24(r9)
ffc1e2f4: 98 c7 00 19 stb r6,25(r7)
ffc1e2f8: 55 46 c2 3e rlwinm r6,r10,24,8,31
ffc1e2fc: 80 e9 00 18 lwz r7,24(r9)
ffc1e300: 98 c7 00 1a stb r6,26(r7)
ffc1e304: 80 e9 00 18 lwz r7,24(r9)
ffc1e308: 99 47 00 1b stb r10,27(r7)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
ffc1e30c: 99 09 00 1c stb r8,28(r9)
handle->shared->ctime);
if (!rtems_rfs_block_size_equal (&handle->shared->size,
ffc1e310: 81 3f 00 1c lwz r9,28(r31)
ffc1e314: 81 49 00 84 lwz r10,132(r9)
ffc1e318: 81 09 00 3c lwz r8,60(r9)
ffc1e31c: 7f 8a 40 00 cmpw cr7,r10,r8
ffc1e320: 40 be 00 18 bne+ cr7,ffc1e338 <rtems_rfs_file_close+0x160><== NEVER TAKEN
ffc1e324: 80 e9 00 88 lwz r7,136(r9)
ffc1e328: 3b c0 00 00 li r30,0
ffc1e32c: 81 09 00 40 lwz r8,64(r9)
ffc1e330: 7f 87 40 00 cmpw cr7,r7,r8
ffc1e334: 41 9e 00 1c beq- cr7,ffc1e350 <rtems_rfs_file_close+0x178><== 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);
ffc1e338: 91 49 00 3c stw r10,60(r9) <== NOT EXECUTED
map->dirty = true;
ffc1e33c: 3b c0 00 00 li r30,0 <== NOT EXECUTED
*/
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);
ffc1e340: 81 49 00 88 lwz r10,136(r9) <== NOT EXECUTED
ffc1e344: 91 49 00 40 stw r10,64(r9) <== NOT EXECUTED
map->dirty = true;
ffc1e348: 39 40 00 01 li r10,1 <== NOT EXECUTED
ffc1e34c: 99 49 00 34 stb r10,52(r9) <== NOT EXECUTED
&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);
ffc1e350: 80 9f 00 1c lwz r4,28(r31)
ffc1e354: 7f a3 eb 78 mr r3,r29
ffc1e358: 38 84 00 34 addi r4,r4,52
ffc1e35c: 4b ff d6 85 bl ffc1b9e0 <rtems_rfs_block_map_close>
if (rc > 0)
ffc1e360: 7c 7c 1b 79 mr. r28,r3
ffc1e364: 40 81 00 50 ble- ffc1e3b4 <rtems_rfs_file_close+0x1dc> <== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE))
ffc1e368: 38 60 00 10 li r3,16 <== NOT EXECUTED
ffc1e36c: 38 80 00 00 li r4,0 <== NOT EXECUTED
ffc1e370: 4b ff 60 59 bl ffc143c8 <rtems_rfs_trace> <== NOT EXECUTED
ffc1e374: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc1e378: 41 be 00 30 beq+ cr7,ffc1e3a8 <rtems_rfs_file_close+0x1d0><== NOT EXECUTED
printf ("rtems-rfs: file-close: map close error: ino=%" PRId32 ": %d: %s\n",
handle->shared->inode.ino, rc, strerror (rc));
ffc1e37c: 81 3f 00 1c lwz r9,28(r31) <== 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",
ffc1e380: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED
ffc1e384: 83 69 00 14 lwz r27,20(r9) <== NOT EXECUTED
ffc1e388: 48 00 67 f1 bl ffc24b78 <strerror> <== NOT EXECUTED
ffc1e38c: 7c 66 1b 78 mr r6,r3 <== NOT EXECUTED
ffc1e390: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1e394: 38 63 69 7d addi r3,r3,27005 <== NOT EXECUTED
ffc1e398: 7f 64 db 78 mr r4,r27 <== NOT EXECUTED
ffc1e39c: 7f 85 e3 78 mr r5,r28 <== NOT EXECUTED
ffc1e3a0: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1e3a4: 48 00 55 e9 bl ffc2398c <printf> <== NOT EXECUTED
handle->shared->inode.ino, rc, strerror (rc));
if (rrc == 0)
ffc1e3a8: 2f 9e 00 00 cmpwi cr7,r30,0 <== NOT EXECUTED
ffc1e3ac: 40 9e 00 08 bne- cr7,ffc1e3b4 <rtems_rfs_file_close+0x1dc><== NOT EXECUTED
ffc1e3b0: 7f 9e e3 78 mr r30,r28 <== NOT EXECUTED
rrc = rc;
}
rc = rtems_rfs_inode_close (fs, &handle->shared->inode);
ffc1e3b4: 80 9f 00 1c lwz r4,28(r31)
ffc1e3b8: 7f a3 eb 78 mr r3,r29
ffc1e3bc: 38 84 00 0c addi r4,r4,12
ffc1e3c0: 4b ff 46 f5 bl ffc12ab4 <rtems_rfs_inode_close>
if (rc > 0)
ffc1e3c4: 7c 7c 1b 79 mr. r28,r3
ffc1e3c8: 40 81 00 50 ble- ffc1e418 <rtems_rfs_file_close+0x240> <== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE))
ffc1e3cc: 38 60 00 10 li r3,16 <== NOT EXECUTED
ffc1e3d0: 38 80 00 00 li r4,0 <== NOT EXECUTED
ffc1e3d4: 4b ff 5f f5 bl ffc143c8 <rtems_rfs_trace> <== NOT EXECUTED
ffc1e3d8: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc1e3dc: 41 be 00 30 beq+ cr7,ffc1e40c <rtems_rfs_file_close+0x234><== NOT EXECUTED
printf ("rtems-rfs: file-close: inode close error: ino=%" PRId32 ": %d: %s\n",
handle->shared->inode.ino, rc, strerror (rc));
ffc1e3e0: 81 3f 00 1c lwz r9,28(r31) <== 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",
ffc1e3e4: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED
ffc1e3e8: 83 69 00 14 lwz r27,20(r9) <== NOT EXECUTED
ffc1e3ec: 48 00 67 8d bl ffc24b78 <strerror> <== NOT EXECUTED
ffc1e3f0: 7c 66 1b 78 mr r6,r3 <== NOT EXECUTED
ffc1e3f4: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1e3f8: 38 63 69 b6 addi r3,r3,27062 <== NOT EXECUTED
ffc1e3fc: 7f 64 db 78 mr r4,r27 <== NOT EXECUTED
ffc1e400: 7f 85 e3 78 mr r5,r28 <== NOT EXECUTED
ffc1e404: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1e408: 48 00 55 85 bl ffc2398c <printf> <== NOT EXECUTED
handle->shared->inode.ino, rc, strerror (rc));
if (rrc == 0)
ffc1e40c: 2f 9e 00 00 cmpwi cr7,r30,0 <== NOT EXECUTED
ffc1e410: 40 9e 00 08 bne- cr7,ffc1e418 <rtems_rfs_file_close+0x240><== NOT EXECUTED
ffc1e414: 7f 9e e3 78 mr r30,r28 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
ffc1e418: 80 7f 00 1c lwz r3,28(r31)
ffc1e41c: 4b ff b0 b9 bl ffc194d4 <_Chain_Extract>
rrc = rc;
}
rtems_chain_extract (&handle->shared->link);
free (handle->shared);
ffc1e420: 80 7f 00 1c lwz r3,28(r31)
ffc1e424: 4b fe a6 f1 bl ffc08b14 <free>
*/
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);
ffc1e428: 7f a3 eb 78 mr r3,r29
ffc1e42c: 38 9f 00 04 addi r4,r31,4
ffc1e430: 4b ff e2 29 bl ffc1c658 <rtems_rfs_buffer_handle_release>
rc = rtems_rfs_buffer_handle_close (fs, &handle->buffer);
if ((rrc == 0) && (rc > 0))
rrc = rc;
if (rrc > 0)
ffc1e434: 2f 9e 00 00 cmpwi cr7,r30,0
handle->dirty = false;
ffc1e438: 39 20 00 00 li r9,0
ffc1e43c: 99 3f 00 04 stb r9,4(r31)
handle->bnum = 0;
ffc1e440: 39 20 00 00 li r9,0
ffc1e444: 91 3f 00 08 stw r9,8(r31)
handle->buffer = NULL;
ffc1e448: 91 3f 00 0c stw r9,12(r31)
ffc1e44c: 40 9d 00 38 ble- cr7,ffc1e484 <rtems_rfs_file_close+0x2ac><== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE))
ffc1e450: 38 60 00 10 li r3,16 <== NOT EXECUTED
ffc1e454: 38 80 00 00 li r4,0 <== NOT EXECUTED
ffc1e458: 4b ff 5f 71 bl ffc143c8 <rtems_rfs_trace> <== NOT EXECUTED
ffc1e45c: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc1e460: 41 be 00 24 beq+ cr7,ffc1e484 <rtems_rfs_file_close+0x2ac><== NOT EXECUTED
printf ("rtems-rfs: file-close: result: %d: %s\n", rrc, strerror (rrc));
ffc1e464: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc1e468: 48 00 67 11 bl ffc24b78 <strerror> <== NOT EXECUTED
ffc1e46c: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED
ffc1e470: 7c 65 1b 78 mr r5,r3 <== NOT EXECUTED
ffc1e474: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1e478: 38 63 69 f1 addi r3,r3,27121 <== NOT EXECUTED
ffc1e47c: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1e480: 48 00 55 0d bl ffc2398c <printf> <== NOT EXECUTED
}
free (handle);
ffc1e484: 7f e3 fb 78 mr r3,r31
ffc1e488: 4b fe a6 8d bl ffc08b14 <free>
return rrc;
}
ffc1e48c: 39 61 00 20 addi r11,r1,32
ffc1e490: 7f c3 f3 78 mr r3,r30
ffc1e494: 4b fe 30 c8 b ffc0155c <_restgpr_27_x>
ffc1e6b8 <rtems_rfs_file_io_end>:
int
rtems_rfs_file_io_end (rtems_rfs_file_handle* handle,
size_t size,
bool read)
{
ffc1e6b8: 94 21 ff e0 stwu r1,-32(r1)
ffc1e6bc: 7c 08 02 a6 mflr r0
ffc1e6c0: bf 41 00 08 stmw r26,8(r1)
ffc1e6c4: 7c 7f 1b 78 mr r31,r3
ffc1e6c8: 7c 9c 23 78 mr r28,r4
bool atime;
bool mtime;
bool length;
int rc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
ffc1e6cc: 38 60 00 20 li r3,32
int
rtems_rfs_file_io_end (rtems_rfs_file_handle* handle,
size_t size,
bool read)
{
ffc1e6d0: 90 01 00 24 stw r0,36(r1)
bool atime;
bool mtime;
bool length;
int rc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
ffc1e6d4: 38 80 00 00 li r4,0
int
rtems_rfs_file_io_end (rtems_rfs_file_handle* handle,
size_t size,
bool read)
{
ffc1e6d8: 7c be 2b 78 mr r30,r5
bool atime;
bool mtime;
bool length;
int rc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
ffc1e6dc: 4b ff 5c ed bl ffc143c8 <rtems_rfs_trace>
ffc1e6e0: 2f 83 00 00 cmpwi cr7,r3,0
ffc1e6e4: 41 9e 00 34 beq- cr7,ffc1e718 <rtems_rfs_file_io_end+0x60><== ALWAYS TAKEN
printf ("rtems-rfs: file-io: end: %s size=%zu\n",
ffc1e6e8: 2f 9e 00 00 cmpwi cr7,r30,0 <== NOT EXECUTED
ffc1e6ec: 41 9e 00 10 beq- cr7,ffc1e6fc <rtems_rfs_file_io_end+0x44><== NOT EXECUTED
ffc1e6f0: 3c 80 ff c3 lis r4,-61 <== NOT EXECUTED
ffc1e6f4: 38 84 54 6b addi r4,r4,21611 <== NOT EXECUTED
ffc1e6f8: 48 00 00 0c b ffc1e704 <rtems_rfs_file_io_end+0x4c> <== NOT EXECUTED
ffc1e6fc: 3c 80 ff c3 lis r4,-61 <== NOT EXECUTED
ffc1e700: 38 84 6a 18 addi r4,r4,27160 <== NOT EXECUTED
ffc1e704: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1e708: 38 63 6a cf addi r3,r3,27343 <== NOT EXECUTED
ffc1e70c: 7f 85 e3 78 mr r5,r28 <== NOT EXECUTED
ffc1e710: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1e714: 48 00 52 79 bl ffc2398c <printf> <== NOT EXECUTED
read ? "read" : "write", size);
if (rtems_rfs_buffer_handle_has_block (&handle->buffer))
ffc1e718: 81 3f 00 0c lwz r9,12(r31)
ffc1e71c: 2f 89 00 00 cmpwi cr7,r9,0
ffc1e720: 41 9e 00 74 beq- cr7,ffc1e794 <rtems_rfs_file_io_end+0xdc><== NEVER TAKEN
{
if (!read)
ffc1e724: 2f 9e 00 00 cmpwi cr7,r30,0
ffc1e728: 40 9e 00 0c bne- cr7,ffc1e734 <rtems_rfs_file_io_end+0x7c>
rtems_rfs_buffer_mark_dirty (rtems_rfs_file_buffer (handle));
ffc1e72c: 39 20 00 01 li r9,1
ffc1e730: 99 3f 00 04 stb r9,4(r31)
rc = rtems_rfs_buffer_handle_release (rtems_rfs_file_fs (handle),
ffc1e734: 81 3f 00 1c lwz r9,28(r31)
ffc1e738: 38 9f 00 04 addi r4,r31,4
ffc1e73c: 80 69 00 98 lwz r3,152(r9)
ffc1e740: 4b ff df 19 bl ffc1c658 <rtems_rfs_buffer_handle_release>
rtems_rfs_file_buffer (handle));
if (rc > 0)
ffc1e744: 7c 7d 1b 79 mr. r29,r3
ffc1e748: 40 81 00 50 ble- ffc1e798 <rtems_rfs_file_io_end+0xe0> <== ALWAYS TAKEN
{
printf (
ffc1e74c: 2f 9e 00 00 cmpwi cr7,r30,0 <== NOT EXECUTED
ffc1e750: 41 be 00 10 beq+ cr7,ffc1e760 <rtems_rfs_file_io_end+0xa8><== NOT EXECUTED
ffc1e754: 3f e0 ff c3 lis r31,-61 <== NOT EXECUTED
ffc1e758: 3b ff 54 6b addi r31,r31,21611 <== NOT EXECUTED
ffc1e75c: 48 00 00 0c b ffc1e768 <rtems_rfs_file_io_end+0xb0> <== NOT EXECUTED
ffc1e760: 3f e0 ff c3 lis r31,-61 <== NOT EXECUTED
ffc1e764: 3b ff 6a 18 addi r31,r31,27160 <== NOT EXECUTED
ffc1e768: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED
ffc1e76c: 48 00 64 0d bl ffc24b78 <strerror> <== NOT EXECUTED
ffc1e770: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED
ffc1e774: 7c 67 1b 78 mr r7,r3 <== NOT EXECUTED
ffc1e778: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1e77c: 7f 85 e3 78 mr r5,r28 <== NOT EXECUTED
ffc1e780: 7f a6 eb 78 mr r6,r29 <== NOT EXECUTED
ffc1e784: 38 63 6a f7 addi r3,r3,27383 <== NOT EXECUTED
ffc1e788: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1e78c: 48 00 52 01 bl ffc2398c <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;
ffc1e790: 48 00 01 98 b ffc1e928 <rtems_rfs_file_io_end+0x270> <== NOT EXECUTED
bool read)
{
bool atime;
bool mtime;
bool length;
int rc = 0;
ffc1e794: 3b a0 00 00 li r29,0 <== 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;
ffc1e798: 81 3f 00 14 lwz r9,20(r31)
ffc1e79c: 7f 9c 4a 14 add r28,r28,r9
if (handle->bpos.boff >=
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle)))
ffc1e7a0: 81 3f 00 1c lwz r9,28(r31)
* 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;
ffc1e7a4: 93 9f 00 14 stw r28,20(r31)
if (handle->bpos.boff >=
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle)))
ffc1e7a8: 81 49 00 98 lwz r10,152(r9)
ffc1e7ac: 81 4a 00 08 lwz r10,8(r10)
* 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 >=
ffc1e7b0: 7f 9c 50 40 cmplw cr7,r28,r10
ffc1e7b4: 41 9c 00 18 blt- cr7,ffc1e7cc <rtems_rfs_file_io_end+0x114>
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle)))
{
handle->bpos.bno++;
ffc1e7b8: 81 1f 00 10 lwz r8,16(r31)
handle->bpos.boff -= rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
ffc1e7bc: 7f 8a e0 50 subf r28,r10,r28
ffc1e7c0: 93 9f 00 14 stw r28,20(r31)
handle->bpos.boff += size;
if (handle->bpos.boff >=
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle)))
{
handle->bpos.bno++;
ffc1e7c4: 39 08 00 01 addi r8,r8,1
ffc1e7c8: 91 1f 00 10 stw r8,16(r31)
}
length = false;
mtime = false;
if (!read &&
ffc1e7cc: 2f 9e 00 00 cmpwi cr7,r30,0
handle->bpos.bno++;
handle->bpos.boff -= rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
}
length = false;
mtime = false;
ffc1e7d0: 39 40 00 00 li r10,0
if (!read &&
ffc1e7d4: 40 9e 00 58 bne- cr7,ffc1e82c <rtems_rfs_file_io_end+0x174>
rtems_rfs_block_map_past_end (rtems_rfs_file_map (handle),
ffc1e7d8: 81 1f 00 10 lwz r8,16(r31)
ffc1e7dc: 81 49 00 3c lwz r10,60(r9)
}
length = false;
mtime = false;
if (!read &&
ffc1e7e0: 2f 88 00 00 cmpwi cr7,r8,0
ffc1e7e4: 41 9e 00 0c beq- cr7,ffc1e7f0 <rtems_rfs_file_io_end+0x138>
rtems_rfs_block_map_past_end (rtems_rfs_file_map (handle),
ffc1e7e8: 2f 8a 00 00 cmpwi cr7,r10,0
ffc1e7ec: 41 9e 00 2c beq- cr7,ffc1e818 <rtems_rfs_file_io_end+0x160><== NEVER TAKEN
ffc1e7f0: 7f 88 50 40 cmplw cr7,r8,r10
ffc1e7f4: 40 9c 00 24 bge- cr7,ffc1e818 <rtems_rfs_file_io_end+0x160>
ffc1e7f8: 38 ea ff ff addi r7,r10,-1
ffc1e7fc: 7f 88 38 00 cmpw cr7,r8,r7
handle->bpos.bno++;
handle->bpos.boff -= rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
}
length = false;
mtime = false;
ffc1e800: 39 40 00 00 li r10,0
if (!read &&
rtems_rfs_block_map_past_end (rtems_rfs_file_map (handle),
ffc1e804: 40 be 00 28 bne+ cr7,ffc1e82c <rtems_rfs_file_io_end+0x174>
ffc1e808: 80 ff 00 14 lwz r7,20(r31)
ffc1e80c: 81 09 00 40 lwz r8,64(r9)
ffc1e810: 7f 87 40 40 cmplw cr7,r7,r8
ffc1e814: 40 9d 00 18 ble- cr7,ffc1e82c <rtems_rfs_file_io_end+0x174>
*/
static inline void
rtems_rfs_block_map_set_size_offset (rtems_rfs_block_map* map,
rtems_rfs_block_off offset)
{
map->size.offset = offset;
ffc1e818: 81 5f 00 14 lwz r10,20(r31)
ffc1e81c: 91 49 00 40 stw r10,64(r9)
map->dirty = true;
ffc1e820: 39 40 00 01 li r10,1
ffc1e824: 99 49 00 34 stb r10,52(r9)
rtems_rfs_file_bpos (handle)))
{
rtems_rfs_block_map_set_size_offset (rtems_rfs_file_map (handle),
handle->bpos.boff);
length = true;
mtime = true;
ffc1e828: 39 40 00 01 li r10,1
}
atime = rtems_rfs_file_update_atime (handle);
ffc1e82c: 81 3f 00 00 lwz r9,0(r31)
mtime = rtems_rfs_file_update_mtime (handle) && mtime;
ffc1e830: 3b 80 00 00 li r28,0
ffc1e834: 71 28 00 02 andi. r8,r9,2
handle->bpos.boff);
length = true;
mtime = true;
}
atime = rtems_rfs_file_update_atime (handle);
ffc1e838: 55 3b 07 fe clrlwi r27,r9,31
ffc1e83c: 6b 7b 00 01 xori r27,r27,1
mtime = rtems_rfs_file_update_mtime (handle) && mtime;
ffc1e840: 40 82 00 08 bne- ffc1e848 <rtems_rfs_file_io_end+0x190> <== NEVER TAKEN
ffc1e844: 7d 5c 53 78 mr r28,r10
length = rtems_rfs_file_update_length (handle) && length;
ffc1e848: 71 28 00 04 andi. r8,r9,4
length = true;
mtime = true;
}
atime = rtems_rfs_file_update_atime (handle);
mtime = rtems_rfs_file_update_mtime (handle) && mtime;
ffc1e84c: 57 9c 07 fe clrlwi r28,r28,31
length = rtems_rfs_file_update_length (handle) && length;
ffc1e850: 3b 40 00 00 li r26,0
ffc1e854: 40 82 00 08 bne- ffc1e85c <rtems_rfs_file_io_end+0x1a4> <== NEVER TAKEN
ffc1e858: 7d 5a 53 78 mr r26,r10
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
ffc1e85c: 38 60 00 20 li r3,32
ffc1e860: 38 80 00 00 li r4,0
ffc1e864: 4b ff 5b 65 bl ffc143c8 <rtems_rfs_trace>
mtime = true;
}
atime = rtems_rfs_file_update_atime (handle);
mtime = rtems_rfs_file_update_mtime (handle) && mtime;
length = rtems_rfs_file_update_length (handle) && length;
ffc1e868: 57 5a 07 fe clrlwi r26,r26,31
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
ffc1e86c: 2f 83 00 00 cmpwi cr7,r3,0
ffc1e870: 41 9e 00 50 beq- cr7,ffc1e8c0 <rtems_rfs_file_io_end+0x208><== ALWAYS TAKEN
printf ("rtems-rfs: file-io: end: pos=%" PRIu32 ":%" PRIu32 " %c %c %c\n",
ffc1e874: 30 db ff ff addic r6,r27,-1 <== NOT EXECUTED
ffc1e878: 7c c6 31 10 subfe r6,r6,r6 <== NOT EXECUTED
ffc1e87c: 80 9f 00 10 lwz r4,16(r31) <== NOT EXECUTED
ffc1e880: 80 bf 00 14 lwz r5,20(r31) <== NOT EXECUTED
ffc1e884: 39 20 ff ec li r9,-20 <== NOT EXECUTED
ffc1e888: 30 fc ff ff addic r7,r28,-1 <== NOT EXECUTED
ffc1e88c: 7c e7 39 10 subfe r7,r7,r7 <== NOT EXECUTED
ffc1e890: 31 1a ff ff addic r8,r26,-1 <== NOT EXECUTED
ffc1e894: 7d 08 41 10 subfe r8,r8,r8 <== NOT EXECUTED
ffc1e898: 7c c6 48 38 and r6,r6,r9 <== NOT EXECUTED
ffc1e89c: 54 e7 00 34 rlwinm r7,r7,0,0,26 <== NOT EXECUTED
ffc1e8a0: 55 08 07 f4 rlwinm r8,r8,0,31,26 <== NOT EXECUTED
ffc1e8a4: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1e8a8: 38 63 6b 39 addi r3,r3,27449 <== NOT EXECUTED
ffc1e8ac: 38 c6 00 41 addi r6,r6,65 <== NOT EXECUTED
ffc1e8b0: 38 e7 00 4d addi r7,r7,77 <== NOT EXECUTED
ffc1e8b4: 39 08 00 4c addi r8,r8,76 <== NOT EXECUTED
ffc1e8b8: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1e8bc: 48 00 50 d1 bl ffc2398c <printf> <== NOT EXECUTED
handle->bpos.bno, handle->bpos.boff,
atime ? 'A' : '-', mtime ? 'M' : '-', length ? 'L' : '-');
if (atime || mtime)
ffc1e8c0: 2f 9b 00 00 cmpwi cr7,r27,0
ffc1e8c4: 40 9e 00 0c bne- cr7,ffc1e8d0 <rtems_rfs_file_io_end+0x218><== ALWAYS TAKEN
ffc1e8c8: 2f 9c 00 00 cmpwi cr7,r28,0 <== NOT EXECUTED
ffc1e8cc: 41 9e 00 30 beq- cr7,ffc1e8fc <rtems_rfs_file_io_end+0x244><== NOT EXECUTED
{
time_t now = time (NULL);
ffc1e8d0: 38 60 00 00 li r3,0
ffc1e8d4: 48 00 94 9d bl ffc27d70 <time>
if (read && atime)
ffc1e8d8: 2f 9e 00 00 cmpwi cr7,r30,0
ffc1e8dc: 41 9e 00 40 beq- cr7,ffc1e91c <rtems_rfs_file_io_end+0x264>
ffc1e8e0: 2f 9b 00 00 cmpwi cr7,r27,0
ffc1e8e4: 41 9e 00 18 beq- cr7,ffc1e8fc <rtems_rfs_file_io_end+0x244><== NEVER TAKEN
handle->shared->atime = now;
ffc1e8e8: 81 3f 00 1c lwz r9,28(r31)
ffc1e8ec: 90 69 00 8c stw r3,140(r9)
ffc1e8f0: 48 00 00 0c b ffc1e8fc <rtems_rfs_file_io_end+0x244>
if (!read && mtime)
handle->shared->mtime = now;
ffc1e8f4: 81 3f 00 1c lwz r9,28(r31)
ffc1e8f8: 90 69 00 90 stw r3,144(r9)
}
if (length)
ffc1e8fc: 2f 9a 00 00 cmpwi cr7,r26,0
ffc1e900: 41 9e 00 28 beq- cr7,ffc1e928 <rtems_rfs_file_io_end+0x270>
{
handle->shared->size.count =
rtems_rfs_block_map_count (rtems_rfs_file_map (handle));
ffc1e904: 81 3f 00 1c lwz r9,28(r31)
if (!read && mtime)
handle->shared->mtime = now;
}
if (length)
{
handle->shared->size.count =
ffc1e908: 81 49 00 3c lwz r10,60(r9)
ffc1e90c: 91 49 00 84 stw r10,132(r9)
rtems_rfs_block_map_count (rtems_rfs_file_map (handle));
handle->shared->size.offset =
ffc1e910: 81 49 00 40 lwz r10,64(r9)
ffc1e914: 91 49 00 88 stw r10,136(r9)
ffc1e918: 48 00 00 10 b ffc1e928 <rtems_rfs_file_io_end+0x270>
if (atime || mtime)
{
time_t now = time (NULL);
if (read && atime)
handle->shared->atime = now;
if (!read && mtime)
ffc1e91c: 2f 9c 00 00 cmpwi cr7,r28,0
ffc1e920: 40 be ff d4 bne- cr7,ffc1e8f4 <rtems_rfs_file_io_end+0x23c>
ffc1e924: 4b ff ff d8 b ffc1e8fc <rtems_rfs_file_io_end+0x244>
handle->shared->size.offset =
rtems_rfs_block_map_size_offset (rtems_rfs_file_map (handle));
}
return rc;
}
ffc1e928: 39 61 00 20 addi r11,r1,32
ffc1e92c: 7f a3 eb 78 mr r3,r29
ffc1e930: 4b fe 2c 28 b ffc01558 <_restgpr_26_x>
ffc1e934 <rtems_rfs_file_io_release>:
int
rtems_rfs_file_io_release (rtems_rfs_file_handle* handle)
{
int rc = 0;
if (rtems_rfs_buffer_handle_has_block (&handle->buffer))
ffc1e934: 81 23 00 0c lwz r9,12(r3)
return rc;
}
int
rtems_rfs_file_io_release (rtems_rfs_file_handle* handle)
{
ffc1e938: 7c 64 1b 78 mr r4,r3
int rc = 0;
if (rtems_rfs_buffer_handle_has_block (&handle->buffer))
ffc1e93c: 2f 89 00 00 cmpwi cr7,r9,0
ffc1e940: 41 9e 00 14 beq- cr7,ffc1e954 <rtems_rfs_file_io_release+0x20><== ALWAYS TAKEN
rc = rtems_rfs_buffer_handle_release (rtems_rfs_file_fs (handle),
ffc1e944: 81 23 00 1c lwz r9,28(r3) <== NOT EXECUTED
ffc1e948: 38 84 00 04 addi r4,r4,4 <== NOT EXECUTED
ffc1e94c: 80 69 00 98 lwz r3,152(r9) <== NOT EXECUTED
ffc1e950: 4b ff dd 08 b ffc1c658 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
rtems_rfs_file_buffer (handle));
return rc;
}
ffc1e954: 38 60 00 00 li r3,0
ffc1e958: 4e 80 00 20 blr
ffc1e498 <rtems_rfs_file_io_start>:
int
rtems_rfs_file_io_start (rtems_rfs_file_handle* handle,
size_t* available,
bool read)
{
ffc1e498: 94 21 ff d0 stwu r1,-48(r1)
ffc1e49c: 7c 08 02 a6 mflr r0
ffc1e4a0: bf 61 00 1c stmw r27,28(r1)
ffc1e4a4: 7c 7f 1b 78 mr r31,r3
ffc1e4a8: 7c 9d 23 78 mr r29,r4
size_t size;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
ffc1e4ac: 38 60 00 20 li r3,32
int
rtems_rfs_file_io_start (rtems_rfs_file_handle* handle,
size_t* available,
bool read)
{
ffc1e4b0: 90 01 00 34 stw r0,52(r1)
size_t size;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
ffc1e4b4: 38 80 00 00 li r4,0
int
rtems_rfs_file_io_start (rtems_rfs_file_handle* handle,
size_t* available,
bool read)
{
ffc1e4b8: 7c bc 2b 78 mr r28,r5
size_t size;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
ffc1e4bc: 4b ff 5f 0d bl ffc143c8 <rtems_rfs_trace>
ffc1e4c0: 2f 83 00 00 cmpwi cr7,r3,0
ffc1e4c4: 41 9e 00 38 beq- cr7,ffc1e4fc <rtems_rfs_file_io_start+0x64><== ALWAYS TAKEN
printf ("rtems-rfs: file-io: start: %s pos=%" PRIu32 ":%" PRIu32 "\n",
ffc1e4c8: 2f 9c 00 00 cmpwi cr7,r28,0 <== NOT EXECUTED
ffc1e4cc: 41 9e 00 10 beq- cr7,ffc1e4dc <rtems_rfs_file_io_start+0x44><== NOT EXECUTED
ffc1e4d0: 3c 80 ff c3 lis r4,-61 <== NOT EXECUTED
ffc1e4d4: 38 84 54 6b addi r4,r4,21611 <== NOT EXECUTED
ffc1e4d8: 48 00 00 0c b ffc1e4e4 <rtems_rfs_file_io_start+0x4c><== NOT EXECUTED
ffc1e4dc: 3c 80 ff c3 lis r4,-61 <== NOT EXECUTED
ffc1e4e0: 38 84 6a 18 addi r4,r4,27160 <== NOT EXECUTED
ffc1e4e4: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1e4e8: 80 bf 00 10 lwz r5,16(r31) <== NOT EXECUTED
ffc1e4ec: 80 df 00 14 lwz r6,20(r31) <== NOT EXECUTED
ffc1e4f0: 38 63 6a 1e addi r3,r3,27166 <== NOT EXECUTED
ffc1e4f4: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1e4f8: 48 00 54 95 bl ffc2398c <printf> <== NOT EXECUTED
read ? "read" : "write", handle->bpos.bno, handle->bpos.boff);
if (!rtems_rfs_buffer_handle_has_block (&handle->buffer))
ffc1e4fc: 83 7f 00 0c lwz r27,12(r31)
ffc1e500: 2f 9b 00 00 cmpwi cr7,r27,0
ffc1e504: 40 be 01 24 bne+ cr7,ffc1e628 <rtems_rfs_file_io_start+0x190>
bool request_read;
int rc;
request_read = read;
rc = rtems_rfs_block_map_find (rtems_rfs_file_fs (handle),
ffc1e508: 80 9f 00 1c lwz r4,28(r31)
ffc1e50c: 38 bf 00 10 addi r5,r31,16
ffc1e510: 38 c1 00 08 addi r6,r1,8
ffc1e514: 80 64 00 98 lwz r3,152(r4)
ffc1e518: 38 84 00 34 addi r4,r4,52
ffc1e51c: 4b ff d6 b5 bl ffc1bbd0 <rtems_rfs_block_map_find>
ffc1e520: 2f 9c 00 00 cmpwi cr7,r28,0
rtems_rfs_file_map (handle),
rtems_rfs_file_bpos (handle),
&block);
if (rc > 0)
ffc1e524: 7c 7e 1b 79 mr. r30,r3
ffc1e528: 40 81 00 68 ble- ffc1e590 <rtems_rfs_file_io_start+0xf8>
ffc1e52c: 2f 1e 00 06 cmpwi cr6,r30,6
{
/*
* Has the read reached the EOF ?
*/
if (read && (rc == ENXIO))
ffc1e530: 41 9e 00 14 beq- cr7,ffc1e544 <rtems_rfs_file_io_start+0xac><== ALWAYS TAKEN
ffc1e534: 40 ba 01 78 bne+ cr6,ffc1e6ac <rtems_rfs_file_io_start+0x214><== NOT EXECUTED
{
*available = 0;
ffc1e538: 93 7d 00 00 stw r27,0(r29) <== NOT EXECUTED
return 0;
ffc1e53c: 3b c0 00 00 li r30,0 <== NOT EXECUTED
ffc1e540: 48 00 01 6c b ffc1e6ac <rtems_rfs_file_io_start+0x214><== NOT EXECUTED
}
if (rc != ENXIO)
ffc1e544: 40 ba 01 68 bne+ cr6,ffc1e6ac <rtems_rfs_file_io_start+0x214><== NEVER TAKEN
return rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
ffc1e548: 38 60 00 20 li r3,32
ffc1e54c: 38 80 00 00 li r4,0
ffc1e550: 4b ff 5e 79 bl ffc143c8 <rtems_rfs_trace>
ffc1e554: 2f 83 00 00 cmpwi cr7,r3,0
ffc1e558: 41 be 00 10 beq+ cr7,ffc1e568 <rtems_rfs_file_io_start+0xd0><== ALWAYS TAKEN
printf ("rtems-rfs: file-io: start: grow\n");
ffc1e55c: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1e560: 38 63 6a 49 addi r3,r3,27209 <== NOT EXECUTED
ffc1e564: 48 00 57 91 bl ffc23cf4 <puts> <== NOT EXECUTED
rc = rtems_rfs_block_map_grow (rtems_rfs_file_fs (handle),
ffc1e568: 80 9f 00 1c lwz r4,28(r31)
ffc1e56c: 38 a0 00 01 li r5,1
ffc1e570: 38 c1 00 08 addi r6,r1,8
ffc1e574: 80 64 00 98 lwz r3,152(r4)
ffc1e578: 38 84 00 34 addi r4,r4,52
ffc1e57c: 4b ff d8 81 bl ffc1bdfc <rtems_rfs_block_map_grow>
rtems_rfs_file_map (handle),
1, &block);
if (rc > 0)
ffc1e580: 7c 7e 1b 79 mr. r30,r3
ffc1e584: 41 a1 01 28 bgt+ ffc1e6ac <rtems_rfs_file_io_start+0x214>
return rc;
request_read = false;
ffc1e588: 3b c0 00 00 li r30,0
ffc1e58c: 48 00 00 38 b ffc1e5c4 <rtems_rfs_file_io_start+0x12c>
/*
* 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 &&
ffc1e590: 40 9e 00 30 bne- cr7,ffc1e5c0 <rtems_rfs_file_io_start+0x128>
ffc1e594: 81 3f 00 14 lwz r9,20(r31)
(rtems_rfs_file_block_offset (handle) ||
(*available < rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle)))))
request_read = true;
ffc1e598: 3b c0 00 01 li r30,1
/*
* 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 &&
ffc1e59c: 2f 89 00 00 cmpwi cr7,r9,0
ffc1e5a0: 40 9e 00 24 bne- cr7,ffc1e5c4 <rtems_rfs_file_io_start+0x12c>
(rtems_rfs_file_block_offset (handle) ||
(*available < rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle)))))
ffc1e5a4: 81 3f 00 1c lwz r9,28(r31)
ffc1e5a8: 81 49 00 98 lwz r10,152(r9)
* 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) ||
ffc1e5ac: 81 3d 00 00 lwz r9,0(r29)
ffc1e5b0: 81 4a 00 08 lwz r10,8(r10)
ffc1e5b4: 7f 89 50 40 cmplw cr7,r9,r10
ffc1e5b8: 40 bc ff d0 bge- cr7,ffc1e588 <rtems_rfs_file_io_start+0xf0><== NEVER TAKEN
ffc1e5bc: 48 00 00 08 b ffc1e5c4 <rtems_rfs_file_io_start+0x12c>
/*
* 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 &&
ffc1e5c0: 7f 9e e3 78 mr r30,r28
(rtems_rfs_file_block_offset (handle) ||
(*available < rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle)))))
request_read = true;
}
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
ffc1e5c4: 38 60 00 20 li r3,32
ffc1e5c8: 38 80 00 00 li r4,0
ffc1e5cc: 4b ff 5d fd bl ffc143c8 <rtems_rfs_trace>
ffc1e5d0: 2f 83 00 00 cmpwi cr7,r3,0
ffc1e5d4: 41 9e 00 34 beq- cr7,ffc1e608 <rtems_rfs_file_io_start+0x170><== ALWAYS TAKEN
printf ("rtems-rfs: file-io: start: block=%" PRIu32 " request-read=%s\n",
ffc1e5d8: 2f 9e 00 00 cmpwi cr7,r30,0 <== NOT EXECUTED
ffc1e5dc: 80 81 00 08 lwz r4,8(r1) <== NOT EXECUTED
ffc1e5e0: 41 9e 00 10 beq- cr7,ffc1e5f0 <rtems_rfs_file_io_start+0x158><== NOT EXECUTED
ffc1e5e4: 3c a0 ff c3 lis r5,-61 <== NOT EXECUTED
ffc1e5e8: 38 a5 4f 1e addi r5,r5,20254 <== NOT EXECUTED
ffc1e5ec: 48 00 00 0c b ffc1e5f8 <rtems_rfs_file_io_start+0x160><== NOT EXECUTED
ffc1e5f0: 3c a0 ff c3 lis r5,-61 <== NOT EXECUTED
ffc1e5f4: 38 a5 53 ff addi r5,r5,21503 <== NOT EXECUTED
ffc1e5f8: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1e5fc: 38 63 6a 69 addi r3,r3,27241 <== NOT EXECUTED
ffc1e600: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1e604: 48 00 53 89 bl ffc2398c <printf> <== NOT EXECUTED
block, request_read ? "yes" : "no");
rc = rtems_rfs_buffer_handle_request (rtems_rfs_file_fs (handle),
ffc1e608: 81 3f 00 1c lwz r9,28(r31)
ffc1e60c: 7f c6 f3 78 mr r6,r30
ffc1e610: 80 a1 00 08 lwz r5,8(r1)
ffc1e614: 38 9f 00 04 addi r4,r31,4
ffc1e618: 80 69 00 98 lwz r3,152(r9)
ffc1e61c: 4b ff e2 21 bl ffc1c83c <rtems_rfs_buffer_handle_request>
rtems_rfs_file_buffer (handle),
block, request_read);
if (rc > 0)
ffc1e620: 7c 7e 1b 79 mr. r30,r3
ffc1e624: 41 a1 00 88 bgt+ ffc1e6ac <rtems_rfs_file_io_start+0x214><== NEVER TAKEN
return rc;
}
if (read
ffc1e628: 2f 9c 00 00 cmpwi cr7,r28,0
ffc1e62c: 41 9e 00 38 beq- cr7,ffc1e664 <rtems_rfs_file_io_start+0x1cc>
&& rtems_rfs_block_map_last (rtems_rfs_file_map (handle))
ffc1e630: 81 3f 00 1c lwz r9,28(r31)
ffc1e634: 81 49 00 44 lwz r10,68(r9)
ffc1e638: 81 09 00 3c lwz r8,60(r9)
ffc1e63c: 2f 8a 00 00 cmpwi cr7,r10,0
ffc1e640: 40 9e 00 0c bne- cr7,ffc1e64c <rtems_rfs_file_io_start+0x1b4>
ffc1e644: 2f 88 00 00 cmpwi cr7,r8,0
ffc1e648: 41 9e 00 10 beq- cr7,ffc1e658 <rtems_rfs_file_io_start+0x1c0><== NEVER TAKEN
ffc1e64c: 39 08 ff ff addi r8,r8,-1
ffc1e650: 7f 8a 40 00 cmpw cr7,r10,r8
ffc1e654: 40 be 00 10 bne+ cr7,ffc1e664 <rtems_rfs_file_io_start+0x1cc>
&& rtems_rfs_block_map_size_offset (rtems_rfs_file_map (handle)))
ffc1e658: 83 89 00 40 lwz r28,64(r9)
ffc1e65c: 2f 9c 00 00 cmpwi cr7,r28,0
ffc1e660: 40 9e 00 10 bne- cr7,ffc1e670 <rtems_rfs_file_io_start+0x1d8>
size = rtems_rfs_block_map_size_offset (rtems_rfs_file_map (handle));
else
size = rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
ffc1e664: 81 3f 00 1c lwz r9,28(r31)
ffc1e668: 81 29 00 98 lwz r9,152(r9)
ffc1e66c: 83 89 00 08 lwz r28,8(r9)
*available = size - rtems_rfs_file_block_offset (handle);
ffc1e670: 81 3f 00 14 lwz r9,20(r31)
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
ffc1e674: 38 60 00 20 li r3,32
ffc1e678: 38 80 00 00 li r4,0
&& rtems_rfs_block_map_size_offset (rtems_rfs_file_map (handle)))
size = rtems_rfs_block_map_size_offset (rtems_rfs_file_map (handle));
else
size = rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
*available = size - rtems_rfs_file_block_offset (handle);
ffc1e67c: 7d 29 e0 50 subf r9,r9,r28
ffc1e680: 91 3d 00 00 stw r9,0(r29)
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
printf ("rtems-rfs: file-io: start: available=%zu (%zu)\n",
*available, size);
return 0;
ffc1e684: 3b c0 00 00 li r30,0
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))
ffc1e688: 4b ff 5d 41 bl ffc143c8 <rtems_rfs_trace>
ffc1e68c: 2f 83 00 00 cmpwi cr7,r3,0
ffc1e690: 41 be 00 1c beq+ cr7,ffc1e6ac <rtems_rfs_file_io_start+0x214><== ALWAYS TAKEN
printf ("rtems-rfs: file-io: start: available=%zu (%zu)\n",
ffc1e694: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1e698: 80 9d 00 00 lwz r4,0(r29) <== NOT EXECUTED
ffc1e69c: 38 63 6a 9f addi r3,r3,27295 <== NOT EXECUTED
ffc1e6a0: 7f 85 e3 78 mr r5,r28 <== NOT EXECUTED
ffc1e6a4: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1e6a8: 48 00 52 e5 bl ffc2398c <printf> <== NOT EXECUTED
*available, size);
return 0;
}
ffc1e6ac: 39 61 00 30 addi r11,r1,48
ffc1e6b0: 7f c3 f3 78 mr r3,r30
ffc1e6b4: 4b fe 2e a8 b ffc0155c <_restgpr_27_x>
ffc1ed94 <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)
{
ffc1ed94: 94 21 ff d8 stwu r1,-40(r1)
ffc1ed98: 7c 08 02 a6 mflr r0
ffc1ed9c: bf 01 00 08 stmw r24,8(r1)
ffc1eda0: 7c 7d 1b 78 mr r29,r3
ffc1eda4: 7c 9b 23 78 mr r27,r4
rtems_rfs_file_handle* handle;
rtems_rfs_file_shared* shared;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
ffc1eda8: 38 60 00 08 li r3,8
int
rtems_rfs_file_open (rtems_rfs_file_system* fs,
rtems_rfs_ino ino,
int oflag,
rtems_rfs_file_handle** file)
{
ffc1edac: 90 01 00 2c stw r0,44(r1)
rtems_rfs_file_handle* handle;
rtems_rfs_file_shared* shared;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
ffc1edb0: 38 80 00 00 li r4,0
int
rtems_rfs_file_open (rtems_rfs_file_system* fs,
rtems_rfs_ino ino,
int oflag,
rtems_rfs_file_handle** file)
{
ffc1edb4: 7c b8 2b 78 mr r24,r5
ffc1edb8: 7c d9 33 78 mr r25,r6
rtems_rfs_file_handle* handle;
rtems_rfs_file_shared* shared;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
ffc1edbc: 4b ff 56 0d bl ffc143c8 <rtems_rfs_trace>
ffc1edc0: 2f 83 00 00 cmpwi cr7,r3,0
ffc1edc4: 41 be 00 18 beq+ cr7,ffc1eddc <rtems_rfs_file_open+0x48><== ALWAYS TAKEN
printf ("rtems-rfs: file-open: ino=%" PRId32 "\n", ino);
ffc1edc8: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1edcc: 38 63 6b af addi r3,r3,27567 <== NOT EXECUTED
ffc1edd0: 7f 64 db 78 mr r4,r27 <== NOT EXECUTED
ffc1edd4: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1edd8: 48 00 4b b5 bl ffc2398c <printf> <== NOT EXECUTED
*file = NULL;
ffc1eddc: 3b c0 00 00 li r30,0
ffc1ede0: 93 d9 00 00 stw r30,0(r25)
/*
* 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));
ffc1ede4: 38 60 00 20 li r3,32
if (!handle)
return ENOMEM;
ffc1ede8: 3b 80 00 0c li r28,12
/*
* 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));
ffc1edec: 4b fe a3 f1 bl ffc091dc <malloc>
if (!handle)
ffc1edf0: 7c 7f 1b 79 mr. r31,r3
ffc1edf4: 41 82 02 a0 beq- ffc1f094 <rtems_rfs_file_open+0x300> <== NEVER TAKEN
return ENOMEM;
memset (handle, 0, sizeof (rtems_rfs_file_handle));
ffc1edf8: 38 80 00 00 li r4,0
ffc1edfc: 38 a0 00 20 li r5,32
ffc1ee00: 48 00 49 31 bl ffc23730 <memset>
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
ffc1ee04: 9b df 00 04 stb r30,4(r31)
/*
* 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);
ffc1ee08: 7f a3 eb 78 mr r3,r29
handle->bnum = 0;
ffc1ee0c: 93 df 00 08 stw r30,8(r31)
ffc1ee10: 7f 64 db 78 mr r4,r27
handle->buffer = NULL;
ffc1ee14: 93 df 00 0c stw r30,12(r31)
ffc1ee18: 4b ff ff 49 bl ffc1ed60 <rtems_rfs_file_get_shared>
if (shared)
ffc1ee1c: 7c 7e 1b 79 mr. r30,r3
ffc1ee20: 41 82 00 30 beq- ffc1ee50 <rtems_rfs_file_open+0xbc> <== ALWAYS TAKEN
{
shared->references++;
ffc1ee24: 81 3e 00 08 lwz r9,8(r30) <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
ffc1ee28: 38 60 00 08 li r3,8 <== NOT EXECUTED
ffc1ee2c: 38 80 00 00 li r4,0 <== NOT EXECUTED
* the reference count and return the pointer to the data.
*/
shared = rtems_rfs_file_get_shared (fs, ino);
if (shared)
{
shared->references++;
ffc1ee30: 39 29 00 01 addi r9,r9,1 <== NOT EXECUTED
ffc1ee34: 91 3e 00 08 stw r9,8(r30) <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
ffc1ee38: 4b ff 55 91 bl ffc143c8 <rtems_rfs_trace> <== NOT EXECUTED
ffc1ee3c: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc1ee40: 41 be 02 44 beq+ cr7,ffc1f084 <rtems_rfs_file_open+0x2f0><== NOT EXECUTED
printf ("rtems-rfs: file-open: ino=%" PRId32 " shared\n", ino);
ffc1ee44: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1ee48: 38 63 6b ce addi r3,r3,27598 <== NOT EXECUTED
ffc1ee4c: 48 00 02 2c b ffc1f078 <rtems_rfs_file_open+0x2e4> <== 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));
ffc1ee50: 38 60 00 9c li r3,156
ffc1ee54: 4b fe a3 89 bl ffc091dc <malloc>
if (!shared)
ffc1ee58: 7c 7e 1b 79 mr. r30,r3
ffc1ee5c: 40 a2 00 20 bne+ ffc1ee7c <rtems_rfs_file_open+0xe8> <== 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);
ffc1ee60: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED
ffc1ee64: 38 9f 00 04 addi r4,r31,4 <== NOT EXECUTED
ffc1ee68: 4b ff d7 f1 bl ffc1c658 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
handle->dirty = false;
ffc1ee6c: 9b df 00 04 stb r30,4(r31) <== NOT EXECUTED
handle->bnum = 0;
ffc1ee70: 93 df 00 08 stw r30,8(r31) <== NOT EXECUTED
handle->buffer = NULL;
ffc1ee74: 93 df 00 0c stw r30,12(r31) <== NOT EXECUTED
ffc1ee78: 48 00 00 e8 b ffc1ef60 <rtems_rfs_file_open+0x1cc> <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &handle->buffer);
free (handle);
return ENOMEM;
}
memset (shared, 0, sizeof (rtems_rfs_file_shared));
ffc1ee7c: 38 80 00 00 li r4,0
ffc1ee80: 38 a0 00 9c li r5,156
rc = rtems_rfs_inode_open (fs, ino, &shared->inode, true);
ffc1ee84: 3b 5e 00 0c addi r26,r30,12
rtems_rfs_buffer_handle_close (fs, &handle->buffer);
free (handle);
return ENOMEM;
}
memset (shared, 0, sizeof (rtems_rfs_file_shared));
ffc1ee88: 48 00 48 a9 bl ffc23730 <memset>
rc = rtems_rfs_inode_open (fs, ino, &shared->inode, true);
ffc1ee8c: 7f a3 eb 78 mr r3,r29
ffc1ee90: 7f 64 db 78 mr r4,r27
ffc1ee94: 7f 45 d3 78 mr r5,r26
ffc1ee98: 38 c0 00 01 li r6,1
ffc1ee9c: 4b ff 3a 25 bl ffc128c0 <rtems_rfs_inode_open>
if (rc > 0)
ffc1eea0: 7c 7c 1b 79 mr. r28,r3
ffc1eea4: 40 81 00 3c ble- ffc1eee0 <rtems_rfs_file_open+0x14c> <== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
ffc1eea8: 38 60 00 08 li r3,8 <== NOT EXECUTED
ffc1eeac: 38 80 00 00 li r4,0 <== NOT EXECUTED
ffc1eeb0: 4b ff 55 19 bl ffc143c8 <rtems_rfs_trace> <== NOT EXECUTED
ffc1eeb4: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc1eeb8: 41 be 00 80 beq+ cr7,ffc1ef38 <rtems_rfs_file_open+0x1a4><== NOT EXECUTED
printf ("rtems-rfs: file-open: inode open failed: %d: %s\n",
ffc1eebc: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED
ffc1eec0: 48 00 5c b9 bl ffc24b78 <strerror> <== NOT EXECUTED
ffc1eec4: 7f 84 e3 78 mr r4,r28 <== NOT EXECUTED
ffc1eec8: 7c 65 1b 78 mr r5,r3 <== NOT EXECUTED
ffc1eecc: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1eed0: 38 63 6b f4 addi r3,r3,27636 <== NOT EXECUTED
ffc1eed4: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1eed8: 48 00 4a b5 bl ffc2398c <printf> <== NOT EXECUTED
ffc1eedc: 48 00 00 5c b ffc1ef38 <rtems_rfs_file_open+0x1a4> <== 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);
ffc1eee0: 7f a3 eb 78 mr r3,r29
ffc1eee4: 7f 44 d3 78 mr r4,r26
ffc1eee8: 38 be 00 34 addi r5,r30,52
ffc1eeec: 4b ff c9 3d bl ffc1b828 <rtems_rfs_block_map_open>
if (rc > 0)
ffc1eef0: 7c 7c 1b 79 mr. r28,r3
ffc1eef4: 40 81 00 78 ble- ffc1ef6c <rtems_rfs_file_open+0x1d8> <== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
ffc1eef8: 38 60 00 08 li r3,8 <== NOT EXECUTED
ffc1eefc: 38 80 00 00 li r4,0 <== NOT EXECUTED
ffc1ef00: 4b ff 54 c9 bl ffc143c8 <rtems_rfs_trace> <== NOT EXECUTED
ffc1ef04: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc1ef08: 41 be 00 24 beq+ cr7,ffc1ef2c <rtems_rfs_file_open+0x198><== NOT EXECUTED
printf ("rtems-rfs: file-open: block map open failed: %d: %s\n",
ffc1ef0c: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED
ffc1ef10: 48 00 5c 69 bl ffc24b78 <strerror> <== NOT EXECUTED
ffc1ef14: 7f 84 e3 78 mr r4,r28 <== NOT EXECUTED
ffc1ef18: 7c 65 1b 78 mr r5,r3 <== NOT EXECUTED
ffc1ef1c: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1ef20: 38 63 6c 25 addi r3,r3,27685 <== NOT EXECUTED
ffc1ef24: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1ef28: 48 00 4a 65 bl ffc2398c <printf> <== NOT EXECUTED
rc, strerror (rc));
rtems_rfs_inode_close (fs, &shared->inode);
ffc1ef2c: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED
ffc1ef30: 7f 44 d3 78 mr r4,r26 <== NOT EXECUTED
ffc1ef34: 4b ff 3b 81 bl ffc12ab4 <rtems_rfs_inode_close> <== NOT EXECUTED
free (shared);
ffc1ef38: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc1ef3c: 4b fe 9b d9 bl ffc08b14 <free> <== 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);
ffc1ef40: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED
ffc1ef44: 38 9f 00 04 addi r4,r31,4 <== NOT EXECUTED
ffc1ef48: 4b ff d7 11 bl ffc1c658 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
handle->dirty = false;
ffc1ef4c: 39 20 00 00 li r9,0 <== NOT EXECUTED
ffc1ef50: 99 3f 00 04 stb r9,4(r31) <== NOT EXECUTED
handle->bnum = 0;
ffc1ef54: 39 20 00 00 li r9,0 <== NOT EXECUTED
ffc1ef58: 91 3f 00 08 stw r9,8(r31) <== NOT EXECUTED
handle->buffer = NULL;
ffc1ef5c: 91 3f 00 0c stw r9,12(r31) <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &handle->buffer);
free (handle);
ffc1ef60: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc1ef64: 4b fe 9b b1 bl ffc08b14 <free> <== NOT EXECUTED
return rc;
ffc1ef68: 48 00 01 2c b ffc1f094 <rtems_rfs_file_open+0x300> <== NOT EXECUTED
}
shared->references = 1;
ffc1ef6c: 39 20 00 01 li r9,1
ffc1ef70: 91 3e 00 08 stw r9,8(r30)
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
ffc1ef74: 38 7d 00 74 addi r3,r29,116
ffc1ef78: 7f c4 f3 78 mr r4,r30
if (shared->inode.ino == ino)
return shared;
node = rtems_chain_next (node);
}
return NULL;
}
ffc1ef7c: 81 3e 00 18 lwz r9,24(r30)
* @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);
ffc1ef80: 89 09 00 0c lbz r8,12(r9)
ffc1ef84: 89 49 00 0d lbz r10,13(r9)
ffc1ef88: 55 08 c0 0e rlwinm r8,r8,24,0,7
ffc1ef8c: 55 4a 80 1e rlwinm r10,r10,16,0,15
ffc1ef90: 7d 0a 53 78 or r10,r8,r10
ffc1ef94: 89 09 00 0f lbz r8,15(r9)
ffc1ef98: 7d 4a 43 78 or r10,r10,r8
ffc1ef9c: 89 09 00 0e lbz r8,14(r9)
ffc1efa0: 55 08 40 2e rlwinm r8,r8,8,0,23
ffc1efa4: 7d 4a 43 78 or r10,r10,r8
free (handle);
return rc;
}
shared->references = 1;
shared->size.count = rtems_rfs_inode_get_block_count (&shared->inode);
ffc1efa8: 91 5e 00 84 stw r10,132(r30)
* @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);
ffc1efac: 89 49 00 0a lbz r10,10(r9)
ffc1efb0: 89 09 00 0b lbz r8,11(r9)
ffc1efb4: 55 4a 40 2e rlwinm r10,r10,8,0,23
shared->size.offset = rtems_rfs_inode_get_block_offset (&shared->inode);
ffc1efb8: 7d 4a 43 78 or r10,r10,r8
ffc1efbc: 91 5e 00 88 stw r10,136(r30)
* @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);
ffc1efc0: 89 09 00 10 lbz r8,16(r9)
ffc1efc4: 89 49 00 11 lbz r10,17(r9)
ffc1efc8: 55 08 c0 0e rlwinm r8,r8,24,0,7
ffc1efcc: 55 4a 80 1e rlwinm r10,r10,16,0,15
ffc1efd0: 7d 0a 53 78 or r10,r8,r10
ffc1efd4: 89 09 00 13 lbz r8,19(r9)
ffc1efd8: 7d 4a 43 78 or r10,r10,r8
ffc1efdc: 89 09 00 12 lbz r8,18(r9)
ffc1efe0: 55 08 40 2e rlwinm r8,r8,8,0,23
ffc1efe4: 7d 4a 43 78 or r10,r10,r8
shared->atime = rtems_rfs_inode_get_atime (&shared->inode);
ffc1efe8: 91 5e 00 8c stw r10,140(r30)
* @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);
ffc1efec: 89 09 00 14 lbz r8,20(r9)
ffc1eff0: 89 49 00 15 lbz r10,21(r9)
ffc1eff4: 55 08 c0 0e rlwinm r8,r8,24,0,7
ffc1eff8: 55 4a 80 1e rlwinm r10,r10,16,0,15
ffc1effc: 7d 0a 53 78 or r10,r8,r10
ffc1f000: 89 09 00 17 lbz r8,23(r9)
ffc1f004: 7d 4a 43 78 or r10,r10,r8
ffc1f008: 89 09 00 16 lbz r8,22(r9)
ffc1f00c: 55 08 40 2e rlwinm r8,r8,8,0,23
ffc1f010: 7d 4a 43 78 or r10,r10,r8
shared->mtime = rtems_rfs_inode_get_mtime (&shared->inode);
ffc1f014: 91 5e 00 90 stw r10,144(r30)
* @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);
ffc1f018: 89 09 00 18 lbz r8,24(r9)
ffc1f01c: 89 49 00 19 lbz r10,25(r9)
ffc1f020: 55 08 c0 0e rlwinm r8,r8,24,0,7
ffc1f024: 55 4a 80 1e rlwinm r10,r10,16,0,15
ffc1f028: 7d 08 53 78 or r8,r8,r10
ffc1f02c: 89 49 00 1b lbz r10,27(r9)
ffc1f030: 7d 08 53 78 or r8,r8,r10
ffc1f034: 89 49 00 1a lbz r10,26(r9)
shared->ctime = rtems_rfs_inode_get_ctime (&shared->inode);
shared->fs = fs;
ffc1f038: 93 be 00 98 stw r29,152(r30)
ffc1f03c: 55 4a 40 2e rlwinm r10,r10,8,0,23
ffc1f040: 7d 09 53 78 or r9,r8,r10
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);
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);
ffc1f044: 91 3e 00 94 stw r9,148(r30)
ffc1f048: 4b fe f3 b9 bl ffc0e400 <_Chain_Append>
shared->fs = fs;
rtems_chain_append (&fs->file_shares, &shared->link);
rtems_rfs_inode_unload (fs, &shared->inode, false);
ffc1f04c: 7f 44 d3 78 mr r4,r26
ffc1f050: 38 a0 00 00 li r5,0
ffc1f054: 7f a3 eb 78 mr r3,r29
ffc1f058: 4b ff 39 55 bl ffc129ac <rtems_rfs_inode_unload>
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
ffc1f05c: 38 60 00 08 li r3,8
ffc1f060: 38 80 00 00 li r4,0
ffc1f064: 4b ff 53 65 bl ffc143c8 <rtems_rfs_trace>
ffc1f068: 2f 83 00 00 cmpwi cr7,r3,0
ffc1f06c: 41 be 00 18 beq+ cr7,ffc1f084 <rtems_rfs_file_open+0x2f0><== ALWAYS TAKEN
printf ("rtems-rfs: file-open: ino=%" PRId32 " share created\n", ino);
ffc1f070: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1f074: 38 63 6c 5a addi r3,r3,27738 <== NOT EXECUTED
ffc1f078: 7f 64 db 78 mr r4,r27 <== NOT EXECUTED
ffc1f07c: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1f080: 48 00 49 0d bl ffc2398c <printf> <== NOT EXECUTED
}
handle->flags = oflag;
ffc1f084: 93 1f 00 00 stw r24,0(r31)
handle->shared = shared;
*file = handle;
return 0;
ffc1f088: 3b 80 00 00 li r28,0
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
printf ("rtems-rfs: file-open: ino=%" PRId32 " share created\n", ino);
}
handle->flags = oflag;
handle->shared = shared;
ffc1f08c: 93 df 00 1c stw r30,28(r31)
*file = handle;
ffc1f090: 93 f9 00 00 stw r31,0(r25)
return 0;
}
ffc1f094: 39 61 00 28 addi r11,r1,40
ffc1f098: 7f 83 e3 78 mr r3,r28
ffc1f09c: 4b fe 24 b4 b ffc01550 <_restgpr_24_x>
ffc1e95c <rtems_rfs_file_seek>:
int
rtems_rfs_file_seek (rtems_rfs_file_handle* handle,
rtems_rfs_pos pos,
rtems_rfs_pos* new_pos)
{
ffc1e95c: 94 21 ff d0 stwu r1,-48(r1)
ffc1e960: 7c 08 02 a6 mflr r0
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
ffc1e964: 38 80 00 00 li r4,0
int
rtems_rfs_file_seek (rtems_rfs_file_handle* handle,
rtems_rfs_pos pos,
rtems_rfs_pos* new_pos)
{
ffc1e968: bf 61 00 1c stmw r27,28(r1)
ffc1e96c: 7c 7f 1b 78 mr r31,r3
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
ffc1e970: 38 60 00 20 li r3,32
int
rtems_rfs_file_seek (rtems_rfs_file_handle* handle,
rtems_rfs_pos pos,
rtems_rfs_pos* new_pos)
{
ffc1e974: 90 01 00 34 stw r0,52(r1)
ffc1e978: 7c be 2b 78 mr r30,r5
ffc1e97c: 7c dd 33 78 mr r29,r6
ffc1e980: 7c fc 3b 78 mr r28,r7
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
ffc1e984: 4b ff 5a 45 bl ffc143c8 <rtems_rfs_trace>
ffc1e988: 2f 83 00 00 cmpwi cr7,r3,0
ffc1e98c: 41 be 00 1c beq+ cr7,ffc1e9a8 <rtems_rfs_file_seek+0x4c><== ALWAYS TAKEN
printf ("rtems-rfs: file-seek: new=%" PRIu64 "\n", pos);
ffc1e990: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1e994: 38 63 6b 6a addi r3,r3,27498 <== NOT EXECUTED
ffc1e998: 7f c5 f3 78 mr r5,r30 <== NOT EXECUTED
ffc1e99c: 7f a6 eb 78 mr r6,r29 <== NOT EXECUTED
ffc1e9a0: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1e9a4: 48 00 4f e9 bl ffc2398c <printf> <== 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),
ffc1e9a8: 80 9f 00 1c lwz r4,28(r31)
ffc1e9ac: 80 64 00 98 lwz r3,152(r4)
ffc1e9b0: 38 84 00 84 addi r4,r4,132
ffc1e9b4: 4b ff ce 21 bl ffc1b7d4 <rtems_rfs_block_get_size>
ffc1e9b8: 7f 9e 18 40 cmplw cr7,r30,r3
ffc1e9bc: 41 9d 00 80 bgt- cr7,ffc1ea3c <rtems_rfs_file_seek+0xe0><== NEVER TAKEN
ffc1e9c0: 7f 9e 18 00 cmpw cr7,r30,r3
ffc1e9c4: 40 9e 00 0c bne- cr7,ffc1e9d0 <rtems_rfs_file_seek+0x74><== NEVER TAKEN
ffc1e9c8: 7f 9d 20 40 cmplw cr7,r29,r4
ffc1e9cc: 41 9d 00 70 bgt- cr7,ffc1ea3c <rtems_rfs_file_seek+0xe0>
handle->shared))
{
rtems_rfs_file_set_bpos (handle, pos);
ffc1e9d0: 81 3f 00 1c lwz r9,28(r31)
ffc1e9d4: 3b 7f 00 10 addi r27,r31,16
ffc1e9d8: 7f c5 f3 78 mr r5,r30
ffc1e9dc: 80 69 00 98 lwz r3,152(r9)
ffc1e9e0: 7f a6 eb 78 mr r6,r29
ffc1e9e4: 7f 67 db 78 mr r7,r27
ffc1e9e8: 4b ff cd 09 bl ffc1b6f0 <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))
ffc1e9ec: 81 3f 00 0c lwz r9,12(r31)
ffc1e9f0: 2f 89 00 00 cmpwi cr7,r9,0
ffc1e9f4: 41 9e 00 58 beq- cr7,ffc1ea4c <rtems_rfs_file_seek+0xf0>
{
rtems_rfs_buffer_block block;
int rc;
rc = rtems_rfs_block_map_find (rtems_rfs_file_fs (handle),
ffc1e9f8: 80 9f 00 1c lwz r4,28(r31)
ffc1e9fc: 7f 65 db 78 mr r5,r27
ffc1ea00: 38 c1 00 08 addi r6,r1,8
ffc1ea04: 80 64 00 98 lwz r3,152(r4)
ffc1ea08: 38 84 00 34 addi r4,r4,52
ffc1ea0c: 4b ff d1 c5 bl ffc1bbd0 <rtems_rfs_block_map_find>
rtems_rfs_file_map (handle),
rtems_rfs_file_bpos (handle),
&block);
if (rc > 0)
ffc1ea10: 2c 03 00 00 cmpwi r3,0
ffc1ea14: 41 a1 00 44 bgt+ ffc1ea58 <rtems_rfs_file_seek+0xfc> <== NEVER TAKEN
return rc;
if (rtems_rfs_buffer_bnum (&handle->buffer) != block)
ffc1ea18: 81 5f 00 08 lwz r10,8(r31)
ffc1ea1c: 81 21 00 08 lwz r9,8(r1)
ffc1ea20: 7f 8a 48 00 cmpw cr7,r10,r9
ffc1ea24: 41 9e 00 28 beq- cr7,ffc1ea4c <rtems_rfs_file_seek+0xf0><== ALWAYS TAKEN
{
rc = rtems_rfs_buffer_handle_release (rtems_rfs_file_fs (handle),
ffc1ea28: 81 3f 00 1c lwz r9,28(r31) <== NOT EXECUTED
ffc1ea2c: 38 9f 00 04 addi r4,r31,4 <== NOT EXECUTED
ffc1ea30: 80 69 00 98 lwz r3,152(r9) <== NOT EXECUTED
ffc1ea34: 4b ff dc 25 bl ffc1c658 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
ffc1ea38: 48 00 00 0c b ffc1ea44 <rtems_rfs_file_seek+0xe8> <== 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);
ffc1ea3c: 7f e3 fb 78 mr r3,r31
ffc1ea40: 4b ff fe f5 bl ffc1e934 <rtems_rfs_file_io_release>
if (rc > 0)
ffc1ea44: 2c 03 00 00 cmpwi r3,0
ffc1ea48: 41 a1 00 10 bgt+ ffc1ea58 <rtems_rfs_file_seek+0xfc> <== NEVER TAKEN
return rc;
}
*new_pos = pos;
ffc1ea4c: 93 dc 00 00 stw r30,0(r28)
return 0;
ffc1ea50: 38 60 00 00 li r3,0
int rc = rtems_rfs_file_io_release (handle);
if (rc > 0)
return rc;
}
*new_pos = pos;
ffc1ea54: 93 bc 00 04 stw r29,4(r28)
return 0;
}
ffc1ea58: 39 61 00 30 addi r11,r1,48
ffc1ea5c: 4b fe 2b 00 b ffc0155c <_restgpr_27_x>
ffc1ea60 <rtems_rfs_file_set_size>:
int
rtems_rfs_file_set_size (rtems_rfs_file_handle* handle,
rtems_rfs_pos new_size)
{
ffc1ea60: 94 21 ff b8 stwu r1,-72(r1)
ffc1ea64: 7c 08 02 a6 mflr r0
rtems_rfs_block_map* map = rtems_rfs_file_map (handle);
rtems_rfs_pos size;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
ffc1ea68: 38 80 00 00 li r4,0
}
int
rtems_rfs_file_set_size (rtems_rfs_file_handle* handle,
rtems_rfs_pos new_size)
{
ffc1ea6c: 90 01 00 4c stw r0,76(r1)
ffc1ea70: be 81 00 18 stmw r20,24(r1)
ffc1ea74: 7c 7b 1b 78 mr r27,r3
ffc1ea78: 7c df 33 78 mr r31,r6
rtems_rfs_block_map* map = rtems_rfs_file_map (handle);
ffc1ea7c: 83 43 00 1c lwz r26,28(r3)
rtems_rfs_pos size;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
ffc1ea80: 38 60 00 20 li r3,32
}
int
rtems_rfs_file_set_size (rtems_rfs_file_handle* handle,
rtems_rfs_pos new_size)
{
ffc1ea84: 7c be 2b 78 mr r30,r5
rtems_rfs_block_map* map = rtems_rfs_file_map (handle);
rtems_rfs_pos size;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
ffc1ea88: 4b ff 59 41 bl ffc143c8 <rtems_rfs_trace>
ffc1ea8c: 2f 83 00 00 cmpwi cr7,r3,0
int
rtems_rfs_file_set_size (rtems_rfs_file_handle* handle,
rtems_rfs_pos new_size)
{
rtems_rfs_block_map* map = rtems_rfs_file_map (handle);
ffc1ea90: 3b 1a 00 34 addi r24,r26,52
rtems_rfs_pos size;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
ffc1ea94: 41 be 00 1c beq+ cr7,ffc1eab0 <rtems_rfs_file_set_size+0x50><== ALWAYS TAKEN
printf ("rtems-rfs: file-set-size: size=%" PRIu64 "\n", new_size);
ffc1ea98: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1ea9c: 38 63 6b 8a addi r3,r3,27530 <== NOT EXECUTED
ffc1eaa0: 7f c5 f3 78 mr r5,r30 <== NOT EXECUTED
ffc1eaa4: 7f e6 fb 78 mr r6,r31 <== NOT EXECUTED
ffc1eaa8: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1eaac: 48 00 4e e1 bl ffc2398c <printf> <== NOT EXECUTED
size = rtems_rfs_file_size (handle);
ffc1eab0: 80 9b 00 1c lwz r4,28(r27)
ffc1eab4: 80 64 00 98 lwz r3,152(r4)
ffc1eab8: 38 84 00 84 addi r4,r4,132
ffc1eabc: 4b ff cd 19 bl ffc1b7d4 <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)
ffc1eac0: 7f 83 f0 00 cmpw cr7,r3,r30
ffc1eac4: 40 be 00 10 bne+ cr7,ffc1ead4 <rtems_rfs_file_set_size+0x74><== NEVER TAKEN
ffc1eac8: 7f 84 f8 00 cmpw cr7,r4,r31
ffc1eacc: 40 be 00 08 bne+ cr7,ffc1ead4 <rtems_rfs_file_set_size+0x74>
ffc1ead0: 48 00 02 84 b ffc1ed54 <rtems_rfs_file_set_size+0x2f4>
{
/*
* Short cut for the common truncate on open call.
*/
if (new_size == 0)
ffc1ead4: 7f c9 fb 79 or. r9,r30,r31
ffc1ead8: 83 3b 00 1c lwz r25,28(r27)
ffc1eadc: 40 a2 00 1c bne+ ffc1eaf8 <rtems_rfs_file_set_size+0x98>
{
rc = rtems_rfs_block_map_free_all (rtems_rfs_file_fs (handle), map);
ffc1eae0: 80 79 00 98 lwz r3,152(r25)
ffc1eae4: 7f 04 c3 78 mr r4,r24
ffc1eae8: 4b ff d9 bd bl ffc1c4a4 <rtems_rfs_block_map_free_all>
if (rc > 0)
ffc1eaec: 2c 03 00 00 cmpwi r3,0
ffc1eaf0: 41 a1 02 68 bgt+ ffc1ed58 <rtems_rfs_file_set_size+0x2f8><== NEVER TAKEN
ffc1eaf4: 48 00 02 34 b ffc1ed28 <rtems_rfs_file_set_size+0x2c8>
return rc;
}
else
{
if (size < new_size)
ffc1eaf8: 7f 9e 18 40 cmplw cr7,r30,r3
ffc1eafc: 41 9d 00 14 bgt- cr7,ffc1eb10 <rtems_rfs_file_set_size+0xb0><== NEVER TAKEN
ffc1eb00: 7f 9e 18 00 cmpw cr7,r30,r3
ffc1eb04: 40 9e 01 54 bne- cr7,ffc1ec58 <rtems_rfs_file_set_size+0x1f8><== NEVER TAKEN
ffc1eb08: 7f 9f 20 40 cmplw cr7,r31,r4
ffc1eb0c: 40 9d 01 4c ble- cr7,ffc1ec58 <rtems_rfs_file_set_size+0x1f8>
rtems_rfs_pos count;
uint32_t length;
bool read_block;
count = new_size - size;
length = rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
ffc1eb10: 81 3b 00 1c lwz r9,28(r27)
*/
rtems_rfs_pos count;
uint32_t length;
bool read_block;
count = new_size - size;
ffc1eb14: 7f e4 f8 10 subfc r31,r4,r31
ffc1eb18: 7f c3 f1 10 subfe r30,r3,r30
length = rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
ffc1eb1c: 81 29 00 98 lwz r9,152(r9)
read_block = false;
ffc1eb20: 3a a0 00 00 li r21,0
/*
* 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);
ffc1eb24: 3a e0 00 00 li r23,0
rtems_rfs_pos count;
uint32_t length;
bool read_block;
count = new_size - size;
length = rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
ffc1eb28: 83 29 00 08 lwz r25,8(r9)
ffc1eb2c: 3a c0 00 01 li r22,1
}
/*
* Only read the block if the length is not the block size.
*/
rc = rtems_rfs_buffer_handle_request (rtems_rfs_file_fs (handle),
ffc1eb30: 3a 9b 00 04 addi r20,r27,4
count = new_size - size;
length = rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
read_block = false;
while (count)
ffc1eb34: 48 00 01 18 b ffc1ec4c <rtems_rfs_file_set_size+0x1ec>
/*
* 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);
ffc1eb38: 81 3a 00 40 lwz r9,64(r26)
ffc1eb3c: 81 5a 00 3c lwz r10,60(r26)
ffc1eb40: 2f 89 00 00 cmpwi cr7,r9,0
ffc1eb44: 91 21 00 0c stw r9,12(r1)
ffc1eb48: 91 41 00 08 stw r10,8(r1)
ffc1eb4c: 92 e1 00 10 stw r23,16(r1)
ffc1eb50: 41 9e 00 0c beq- cr7,ffc1eb5c <rtems_rfs_file_set_size+0xfc>
ffc1eb54: 39 4a ff ff addi r10,r10,-1
ffc1eb58: 91 41 00 08 stw r10,8(r1)
rc = rtems_rfs_block_map_find (rtems_rfs_file_fs (handle),
ffc1eb5c: 81 3b 00 1c lwz r9,28(r27)
ffc1eb60: 7f 04 c3 78 mr r4,r24
ffc1eb64: 38 a1 00 08 addi r5,r1,8
ffc1eb68: 80 69 00 98 lwz r3,152(r9)
ffc1eb6c: 38 c1 00 14 addi r6,r1,20
ffc1eb70: 4b ff d0 61 bl ffc1bbd0 <rtems_rfs_block_map_find>
map, &bpos, &block);
if (rc > 0)
ffc1eb74: 2c 03 00 00 cmpwi r3,0
ffc1eb78: 41 a1 00 20 bgt+ ffc1eb98 <rtems_rfs_file_set_size+0x138>
map, 1, &block);
if (rc > 0)
return rc;
}
if (count < (length - bpos.boff))
ffc1eb7c: 7f 97 f0 00 cmpw cr7,r23,r30
ffc1eb80: 81 21 00 0c lwz r9,12(r1)
ffc1eb84: 7d 49 c8 50 subf r10,r9,r25
ffc1eb88: 40 9e 00 50 bne- cr7,ffc1ebd8 <rtems_rfs_file_set_size+0x178><== NEVER TAKEN
ffc1eb8c: 7f 8a f8 40 cmplw cr7,r10,r31
ffc1eb90: 41 9d 00 34 bgt- cr7,ffc1ebc4 <rtems_rfs_file_set_size+0x164>
ffc1eb94: 48 00 00 44 b ffc1ebd8 <rtems_rfs_file_set_size+0x178>
if (rc > 0)
{
/*
* Have we reached the EOF ?
*/
if (rc != ENXIO)
ffc1eb98: 2f 83 00 06 cmpwi cr7,r3,6
ffc1eb9c: 40 9e 01 bc bne- cr7,ffc1ed58 <rtems_rfs_file_set_size+0x2f8><== NEVER TAKEN
return rc;
rc = rtems_rfs_block_map_grow (rtems_rfs_file_fs (handle),
ffc1eba0: 81 3b 00 1c lwz r9,28(r27)
ffc1eba4: 7f 04 c3 78 mr r4,r24
ffc1eba8: 38 a0 00 01 li r5,1
ffc1ebac: 80 69 00 98 lwz r3,152(r9)
ffc1ebb0: 38 c1 00 14 addi r6,r1,20
ffc1ebb4: 4b ff d2 49 bl ffc1bdfc <rtems_rfs_block_map_grow>
map, 1, &block);
if (rc > 0)
ffc1ebb8: 2c 03 00 00 cmpwi r3,0
ffc1ebbc: 40 81 ff c0 ble+ ffc1eb7c <rtems_rfs_file_set_size+0x11c><== ALWAYS TAKEN
ffc1ebc0: 48 00 01 98 b ffc1ed58 <rtems_rfs_file_set_size+0x2f8><== NOT EXECUTED
return rc;
}
if (count < (length - bpos.boff))
{
length = count + bpos.boff;
ffc1ebc4: 7f 29 fa 14 add r25,r9,r31
ffc1ebc8: 9a da 00 34 stb r22,52(r26)
read_block = true;
ffc1ebcc: 3a a0 00 01 li r21,1
*/
static inline void
rtems_rfs_block_map_set_size_offset (rtems_rfs_block_map* map,
rtems_rfs_block_off offset)
{
map->size.offset = offset;
ffc1ebd0: 93 3a 00 40 stw r25,64(r26)
ffc1ebd4: 48 00 00 0c b ffc1ebe0 <rtems_rfs_file_set_size+0x180>
ffc1ebd8: 92 fa 00 40 stw r23,64(r26)
map->dirty = true;
ffc1ebdc: 9a da 00 34 stb r22,52(r26)
}
/*
* Only read the block if the length is not the block size.
*/
rc = rtems_rfs_buffer_handle_request (rtems_rfs_file_fs (handle),
ffc1ebe0: 81 3b 00 1c lwz r9,28(r27)
ffc1ebe4: 7e 84 a3 78 mr r4,r20
ffc1ebe8: 80 a1 00 14 lwz r5,20(r1)
ffc1ebec: 7e a6 ab 78 mr r6,r21
ffc1ebf0: 80 69 00 98 lwz r3,152(r9)
ffc1ebf4: 4b ff dc 49 bl ffc1c83c <rtems_rfs_buffer_handle_request>
rtems_rfs_file_buffer (handle),
block, read_block);
if (rc > 0)
ffc1ebf8: 2c 03 00 00 cmpwi r3,0
ffc1ebfc: 41 81 01 5c bgt- ffc1ed58 <rtems_rfs_file_set_size+0x2f8><== NEVER TAKEN
return rc;
dst = rtems_rfs_buffer_data (&handle->buffer);
ffc1ec00: 81 3b 00 0c lwz r9,12(r27)
memset (dst + bpos.boff, 0, length - bpos.boff);
ffc1ec04: 38 80 00 00 li r4,0
ffc1ec08: 80 a1 00 0c lwz r5,12(r1)
ffc1ec0c: 80 69 00 1c lwz r3,28(r9)
ffc1ec10: 7c 63 2a 14 add r3,r3,r5
ffc1ec14: 7c a5 c8 50 subf r5,r5,r25
ffc1ec18: 48 00 4b 19 bl ffc23730 <memset>
rtems_rfs_buffer_mark_dirty (rtems_rfs_file_buffer (handle));
rc = rtems_rfs_buffer_handle_release (rtems_rfs_file_fs (handle),
ffc1ec1c: 81 3b 00 1c lwz r9,28(r27)
return rc;
dst = rtems_rfs_buffer_data (&handle->buffer);
memset (dst + bpos.boff, 0, length - bpos.boff);
rtems_rfs_buffer_mark_dirty (rtems_rfs_file_buffer (handle));
ffc1ec20: 9a db 00 04 stb r22,4(r27)
rc = rtems_rfs_buffer_handle_release (rtems_rfs_file_fs (handle),
ffc1ec24: 7e 84 a3 78 mr r4,r20
ffc1ec28: 80 69 00 98 lwz r3,152(r9)
ffc1ec2c: 4b ff da 2d bl ffc1c658 <rtems_rfs_buffer_handle_release>
rtems_rfs_file_buffer (handle));
if (rc > 0)
ffc1ec30: 2c 03 00 00 cmpwi r3,0
ffc1ec34: 41 81 01 24 bgt- ffc1ed58 <rtems_rfs_file_set_size+0x2f8><== NEVER TAKEN
return rc;
count -= length - bpos.boff;
ffc1ec38: 81 21 00 0c lwz r9,12(r1)
ffc1ec3c: 3b 80 00 00 li r28,0
ffc1ec40: 7f a9 c8 50 subf r29,r9,r25
ffc1ec44: 7f fd f8 10 subfc r31,r29,r31
ffc1ec48: 7f dc f1 10 subfe r30,r28,r30
count = new_size - size;
length = rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
read_block = false;
while (count)
ffc1ec4c: 7f ca fb 79 or. r10,r30,r31
ffc1ec50: 40 82 fe e8 bne+ ffc1eb38 <rtems_rfs_file_set_size+0xd8>
ffc1ec54: 48 00 00 d4 b ffc1ed28 <rtems_rfs_file_set_size+0x2c8>
uint32_t offset;
blocks =
rtems_rfs_block_map_count (map) -
(((new_size - 1) /
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle))) + 1);
ffc1ec58: 83 99 00 98 lwz r28,152(r25)
rtems_rfs_block_no blocks;
uint32_t offset;
blocks =
rtems_rfs_block_map_count (map) -
(((new_size - 1) /
ffc1ec5c: 30 9f ff ff addic r4,r31,-1
ffc1ec60: 7c 7e 01 d4 addme r3,r30
ffc1ec64: 83 1c 00 08 lwz r24,8(r28)
ffc1ec68: 38 a0 00 00 li r5,0
ffc1ec6c: 7f 06 c3 78 mr r6,r24
ffc1ec70: 48 01 26 65 bl ffc312d4 <__udivdi3>
* Shrink
*/
rtems_rfs_block_no blocks;
uint32_t offset;
blocks =
ffc1ec74: 81 3a 00 3c lwz r9,60(r26)
ffc1ec78: 7c 84 20 f8 not r4,r4
ffc1ec7c: 7f a4 4a 14 add r29,r4,r9
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));
ffc1ec80: 7f c3 f3 78 mr r3,r30
ffc1ec84: 7f e4 fb 78 mr r4,r31
ffc1ec88: 38 a0 00 00 li r5,0
ffc1ec8c: 7f 06 c3 78 mr r6,r24
ffc1ec90: 48 01 2a 3d bl ffc316cc <__umoddi3>
if (blocks)
ffc1ec94: 2f 9d 00 00 cmpwi cr7,r29,0
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));
ffc1ec98: 7c 9f 23 78 mr r31,r4
if (blocks)
ffc1ec9c: 40 9e 00 24 bne- cr7,ffc1ecc0 <rtems_rfs_file_set_size+0x260>
ffc1eca0: 39 20 00 01 li r9,1
*/
static inline void
rtems_rfs_block_map_set_size_offset (rtems_rfs_block_map* map,
rtems_rfs_block_off offset)
{
map->size.offset = offset;
ffc1eca4: 93 fa 00 40 stw r31,64(r26)
map->dirty = true;
ffc1eca8: 99 3a 00 34 stb r9,52(r26)
return rc;
}
rtems_rfs_block_map_set_size_offset (map, offset);
if (rtems_rfs_block_pos_past_end (rtems_rfs_file_bpos (handle),
ffc1ecac: 81 3b 00 10 lwz r9,16(r27)
ffc1ecb0: 81 5a 00 3c lwz r10,60(r26)
ffc1ecb4: 2f 89 00 00 cmpwi cr7,r9,0
ffc1ecb8: 40 9e 00 24 bne- cr7,ffc1ecdc <rtems_rfs_file_set_size+0x27c>
ffc1ecbc: 48 00 00 28 b ffc1ece4 <rtems_rfs_file_set_size+0x284>
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),
ffc1ecc0: 7f 83 e3 78 mr r3,r28
ffc1ecc4: 38 99 00 34 addi r4,r25,52
ffc1ecc8: 7f a5 eb 78 mr r5,r29
ffc1eccc: 4b ff d4 cd bl ffc1c198 <rtems_rfs_block_map_shrink>
rtems_rfs_file_map (handle),
blocks);
if (rc > 0)
ffc1ecd0: 2c 03 00 00 cmpwi r3,0
ffc1ecd4: 41 a1 00 84 bgt+ ffc1ed58 <rtems_rfs_file_set_size+0x2f8><== NEVER TAKEN
ffc1ecd8: 4b ff ff c8 b ffc1eca0 <rtems_rfs_file_set_size+0x240>
return rc;
}
rtems_rfs_block_map_set_size_offset (map, offset);
if (rtems_rfs_block_pos_past_end (rtems_rfs_file_bpos (handle),
ffc1ecdc: 2f 8a 00 00 cmpwi cr7,r10,0
ffc1ece0: 41 9e 00 24 beq- cr7,ffc1ed04 <rtems_rfs_file_set_size+0x2a4><== NEVER TAKEN
ffc1ece4: 7f 89 50 40 cmplw cr7,r9,r10
ffc1ece8: 40 9c 00 1c bge- cr7,ffc1ed04 <rtems_rfs_file_set_size+0x2a4><== NEVER TAKEN
ffc1ecec: 39 4a ff ff addi r10,r10,-1
ffc1ecf0: 7f 89 50 00 cmpw cr7,r9,r10
ffc1ecf4: 40 be 00 34 bne+ cr7,ffc1ed28 <rtems_rfs_file_set_size+0x2c8><== NEVER TAKEN
ffc1ecf8: 81 3b 00 14 lwz r9,20(r27)
ffc1ecfc: 7f 89 f8 40 cmplw cr7,r9,r31
ffc1ed00: 40 9d 00 28 ble- cr7,ffc1ed28 <rtems_rfs_file_set_size+0x2c8>
rtems_rfs_block_map_size (map)))
rtems_rfs_block_size_get_bpos (rtems_rfs_block_map_size (map),
ffc1ed04: 2f 9f 00 00 cmpwi cr7,r31,0
ffc1ed08: 81 3a 00 3c lwz r9,60(r26)
ffc1ed0c: 39 40 00 00 li r10,0
ffc1ed10: 93 fb 00 14 stw r31,20(r27)
ffc1ed14: 91 3b 00 10 stw r9,16(r27)
ffc1ed18: 91 5b 00 18 stw r10,24(r27)
ffc1ed1c: 41 9e 00 0c beq- cr7,ffc1ed28 <rtems_rfs_file_set_size+0x2c8><== NEVER TAKEN
ffc1ed20: 39 29 ff ff addi r9,r9,-1
ffc1ed24: 91 3b 00 10 stw r9,16(r27)
rtems_rfs_file_bpos (handle));
}
}
handle->shared->size.count = rtems_rfs_block_map_count (map);
ffc1ed28: 83 fb 00 1c lwz r31,28(r27)
ffc1ed2c: 81 3a 00 3c lwz r9,60(r26)
ffc1ed30: 91 3f 00 84 stw r9,132(r31)
handle->shared->size.offset = rtems_rfs_block_map_size_offset (map);
ffc1ed34: 81 3a 00 40 lwz r9,64(r26)
ffc1ed38: 91 3f 00 88 stw r9,136(r31)
if (rtems_rfs_file_update_mtime (handle))
ffc1ed3c: 81 3b 00 00 lwz r9,0(r27)
ffc1ed40: 71 2a 00 02 andi. r10,r9,2
ffc1ed44: 40 a2 00 10 bne+ ffc1ed54 <rtems_rfs_file_set_size+0x2f4><== NEVER TAKEN
handle->shared->mtime = time (NULL);
ffc1ed48: 38 60 00 00 li r3,0
ffc1ed4c: 48 00 90 25 bl ffc27d70 <time>
ffc1ed50: 90 7f 00 90 stw r3,144(r31)
}
return 0;
ffc1ed54: 38 60 00 00 li r3,0
}
ffc1ed58: 39 61 00 48 addi r11,r1,72
ffc1ed5c: 4b fe 27 e4 b ffc01540 <_restgpr_20_x>
ffc11458 <rtems_rfs_format>:
return rc;
}
int
rtems_rfs_format (const char* name, const rtems_rfs_format_config* config)
{
ffc11458: 94 21 fe d0 stwu r1,-304(r1)
ffc1145c: 7c 08 02 a6 mflr r0
ffc11460: 90 01 01 34 stw r0,308(r1)
rtems_rfs_file_system fs;
int group;
int rc;
if (config->verbose)
ffc11464: 89 24 00 15 lbz r9,21(r4)
return rc;
}
int
rtems_rfs_format (const char* name, const rtems_rfs_format_config* config)
{
ffc11468: bd e1 00 ec stmw r15,236(r1)
ffc1146c: 7c 79 1b 78 mr r25,r3
rtems_rfs_file_system fs;
int group;
int rc;
if (config->verbose)
ffc11470: 2f 89 00 00 cmpwi cr7,r9,0
return rc;
}
int
rtems_rfs_format (const char* name, const rtems_rfs_format_config* config)
{
ffc11474: 7c 9c 23 78 mr r28,r4
rtems_rfs_file_system fs;
int group;
int rc;
if (config->verbose)
ffc11478: 41 be 00 18 beq+ cr7,ffc11490 <rtems_rfs_format+0x38> <== ALWAYS TAKEN
printf ("rtems-rfs: format: %s\n", name);
ffc1147c: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc11480: 38 63 44 eb addi r3,r3,17643 <== NOT EXECUTED
ffc11484: 7f 24 cb 78 mr r4,r25 <== NOT EXECUTED
ffc11488: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1148c: 48 01 25 01 bl ffc2398c <printf> <== NOT EXECUTED
memset (&fs, 0, sizeof (rtems_rfs_file_system));
ffc11490: 38 80 00 00 li r4,0
ffc11494: 38 a0 00 84 li r5,132
ffc11498: 38 61 00 08 addi r3,r1,8
ffc1149c: 48 01 22 95 bl ffc23730 <memset>
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
ffc114a0: 7c 29 0b 78 mr r9,r1
ffc114a4: 39 41 00 50 addi r10,r1,80
ffc114a8: 95 49 00 4c stwu r10,76(r9)
ffc114ac: 39 41 00 60 addi r10,r1,96
fs.flags = RTEMS_RFS_FS_NO_LOCAL_CACHE;
/*
* Open the buffer interface.
*/
rc = rtems_rfs_buffer_open (name, &fs);
ffc114b0: 7f 23 cb 78 mr r3,r25
head->previous = NULL;
tail->previous = head;
ffc114b4: 91 21 00 54 stw r9,84(r1)
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
ffc114b8: 7c 29 0b 78 mr r9,r1
ffc114bc: 38 81 00 08 addi r4,r1,8
ffc114c0: 95 49 00 5c stwu r10,92(r9)
ffc114c4: 39 41 00 70 addi r10,r1,112
head->previous = NULL;
tail->previous = head;
ffc114c8: 91 21 00 64 stw r9,100(r1)
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
ffc114cc: 7c 29 0b 78 mr r9,r1
ffc114d0: 95 49 00 6c stwu r10,108(r9)
ffc114d4: 39 41 00 80 addi r10,r1,128
head->previous = NULL;
tail->previous = head;
ffc114d8: 91 21 00 74 stw r9,116(r1)
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
ffc114dc: 7c 29 0b 78 mr r9,r1
ffc114e0: 95 49 00 7c stwu r10,124(r9)
head->previous = NULL;
tail->previous = head;
ffc114e4: 91 21 00 84 stw r9,132(r1)
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;
ffc114e8: 39 20 00 05 li r9,5
ffc114ec: 91 21 00 48 stw r9,72(r1)
fs.release_count = 0;
fs.release_modified_count = 0;
fs.flags = RTEMS_RFS_FS_NO_LOCAL_CACHE;
ffc114f0: 39 20 00 02 li r9,2
ffc114f4: 91 21 00 08 stw r9,8(r1)
/*
* Open the buffer interface.
*/
rc = rtems_rfs_buffer_open (name, &fs);
ffc114f8: 48 00 b5 e9 bl ffc1cae0 <rtems_rfs_buffer_open>
if (rc > 0)
ffc114fc: 7c 7f 1b 79 mr. r31,r3
ffc11500: 40 a1 00 18 ble+ ffc11518 <rtems_rfs_format+0xc0> <== ALWAYS TAKEN
{
printf ("rtems-rfs: format: buffer open failed: %d: %s\n",
ffc11504: 48 01 36 75 bl ffc24b78 <strerror> <== NOT EXECUTED
ffc11508: 7c 65 1b 78 mr r5,r3 <== NOT EXECUTED
ffc1150c: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc11510: 38 63 45 02 addi r3,r3,17666 <== NOT EXECUTED
ffc11514: 48 00 0b 58 b ffc1206c <rtems_rfs_format+0xc14> <== NOT EXECUTED
}
/*
* Check the media.
*/
if (rtems_rfs_fs_media_block_size (&fs) == 0)
ffc11518: 81 21 00 18 lwz r9,24(r1)
ffc1151c: 81 29 00 20 lwz r9,32(r9)
ffc11520: 2f 89 00 00 cmpwi cr7,r9,0
ffc11524: 40 be 00 14 bne+ cr7,ffc11538 <rtems_rfs_format+0xe0> <== ALWAYS TAKEN
{
printf ("rtems-rfs: media block is invalid: %" PRIu32 "\n",
ffc11528: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1152c: 38 63 45 31 addi r3,r3,17713 <== NOT EXECUTED
ffc11530: 38 80 00 00 li r4,0 <== NOT EXECUTED
ffc11534: 48 00 05 cc b ffc11b00 <rtems_rfs_format+0x6a8> <== 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;
ffc11538: 81 3c 00 00 lwz r9,0(r28)
if (!fs->block_size)
ffc1153c: 2f 89 00 00 cmpwi cr7,r9,0
static bool
rtems_rfs_check_config (rtems_rfs_file_system* fs,
const rtems_rfs_format_config* config)
{
fs->block_size = config->block_size;
ffc11540: 91 21 00 10 stw r9,16(r1)
if (!fs->block_size)
ffc11544: 40 be 00 94 bne+ cr7,ffc115d8 <rtems_rfs_format+0x180>
{
uint64_t total_size = rtems_rfs_fs_media_size (fs);
ffc11548: 38 61 00 08 addi r3,r1,8
ffc1154c: 48 00 db ad bl ffc1f0f8 <rtems_rfs_fs_media_size>
if (total_size >= GIGS (1))
ffc11550: 2c 03 00 00 cmpwi r3,0
ffc11554: 40 82 00 14 bne- ffc11568 <rtems_rfs_format+0x110> <== NEVER TAKEN
ffc11558: 3d 20 00 0f lis r9,15
ffc1155c: 61 29 ff ff ori r9,r9,65535
ffc11560: 7f 84 48 40 cmplw cr7,r4,r9
ffc11564: 40 9d 00 4c ble- cr7,ffc115b0 <rtems_rfs_format+0x158> <== ALWAYS TAKEN
{
uint32_t gigs = (total_size + GIGS (1)) / GIGS (1);
ffc11568: 3d 24 00 10 addis r9,r4,16 <== NOT EXECUTED
ffc1156c: 7c 84 48 10 subfc r4,r4,r9 <== NOT EXECUTED
ffc11570: 7c 84 21 10 subfe r4,r4,r4 <== NOT EXECUTED
ffc11574: 7c 84 18 50 subf r4,r4,r3 <== NOT EXECUTED
ffc11578: 55 29 65 3e rlwinm r9,r9,12,20,31 <== NOT EXECUTED
ffc1157c: 54 84 60 26 rlwinm r4,r4,12,0,19 <== NOT EXECUTED
ffc11580: 7c 84 4b 78 or r4,r4,r9 <== NOT EXECUTED
int b;
for (b = 31; b > 0; b--)
ffc11584: 39 20 00 1f li r9,31 <== NOT EXECUTED
if ((gigs & (1 << b)) != 0)
ffc11588: 7d 29 03 a6 mtctr r9 <== NOT EXECUTED
ffc1158c: 39 40 00 01 li r10,1 <== NOT EXECUTED
ffc11590: 7d 48 48 30 slw r8,r10,r9 <== NOT EXECUTED
ffc11594: 7d 07 20 39 and. r7,r8,r4 <== NOT EXECUTED
ffc11598: 40 82 00 0c bne- ffc115a4 <rtems_rfs_format+0x14c> <== NOT EXECUTED
if (total_size >= GIGS (1))
{
uint32_t gigs = (total_size + GIGS (1)) / GIGS (1);
int b;
for (b = 31; b > 0; b--)
ffc1159c: 39 29 ff ff addi r9,r9,-1 <== NOT EXECUTED
ffc115a0: 42 00 ff f0 bdnz+ ffc11590 <rtems_rfs_format+0x138> <== NOT EXECUTED
if ((gigs & (1 << b)) != 0)
break;
fs->block_size = 1 << b;
ffc115a4: 39 40 00 01 li r10,1 <== NOT EXECUTED
ffc115a8: 7d 49 48 30 slw r9,r10,r9 <== NOT EXECUTED
ffc115ac: 91 21 00 10 stw r9,16(r1) <== NOT EXECUTED
}
if (fs->block_size < 512)
ffc115b0: 81 21 00 10 lwz r9,16(r1)
ffc115b4: 2b 89 01 ff cmplwi cr7,r9,511
ffc115b8: 41 9d 00 0c bgt- cr7,ffc115c4 <rtems_rfs_format+0x16c> <== NEVER TAKEN
fs->block_size = 512;
ffc115bc: 39 20 02 00 li r9,512
ffc115c0: 91 21 00 10 stw r9,16(r1)
if (fs->block_size > (4 * 1024))
ffc115c4: 81 21 00 10 lwz r9,16(r1)
ffc115c8: 2b 89 10 00 cmplwi cr7,r9,4096
ffc115cc: 40 9d 00 0c ble- cr7,ffc115d8 <rtems_rfs_format+0x180> <== ALWAYS TAKEN
fs->block_size = (4 * 1024);
ffc115d0: 39 20 10 00 li r9,4096 <== NOT EXECUTED
ffc115d4: 91 21 00 10 stw r9,16(r1) <== NOT EXECUTED
}
if ((fs->block_size % rtems_rfs_fs_media_block_size (fs)) != 0)
ffc115d8: 81 21 00 18 lwz r9,24(r1)
ffc115dc: 80 81 00 10 lwz r4,16(r1)
ffc115e0: 80 a9 00 20 lwz r5,32(r9)
ffc115e4: 7d 24 2b 96 divwu r9,r4,r5
ffc115e8: 7d 29 29 d6 mullw r9,r9,r5
ffc115ec: 7f 84 48 00 cmpw cr7,r4,r9
ffc115f0: 41 be 00 10 beq+ cr7,ffc11600 <rtems_rfs_format+0x1a8> <== ALWAYS TAKEN
{
printf ("block size (%zd) is not a multiple of media block size (%" PRId32 ")\n",
ffc115f4: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc115f8: 38 63 45 59 addi r3,r3,17753 <== NOT EXECUTED
ffc115fc: 48 00 08 20 b ffc11e1c <rtems_rfs_format+0x9c4> <== NOT EXECUTED
fs->block_size, rtems_rfs_fs_media_block_size (fs));
return false;
}
fs->group_blocks = config->group_blocks;
ffc11600: 81 3c 00 04 lwz r9,4(r28)
ffc11604: 54 84 18 38 rlwinm r4,r4,3,0,28
if (!fs->group_blocks)
ffc11608: 2f 89 00 00 cmpwi cr7,r9,0
ffc1160c: 41 9e 00 0c beq- cr7,ffc11618 <rtems_rfs_format+0x1c0> <== ALWAYS TAKEN
printf ("block size (%zd) is not a multiple of media block size (%" PRId32 ")\n",
fs->block_size, rtems_rfs_fs_media_block_size (fs));
return false;
}
fs->group_blocks = config->group_blocks;
ffc11610: 91 21 00 30 stw r9,48(r1) <== NOT EXECUTED
ffc11614: 48 00 00 08 b ffc1161c <rtems_rfs_format+0x1c4> <== 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);
ffc11618: 90 81 00 30 stw r4,48(r1)
}
if (fs->group_blocks > rtems_rfs_bitmap_numof_bits (fs->block_size))
ffc1161c: 81 21 00 30 lwz r9,48(r1)
ffc11620: 7f 89 20 40 cmplw cr7,r9,r4
ffc11624: 40 bd 00 10 ble+ cr7,ffc11634 <rtems_rfs_format+0x1dc> <== ALWAYS TAKEN
{
printf ("group block count is higher than bits in block\n");
ffc11628: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1162c: 38 63 45 97 addi r3,r3,17815 <== NOT EXECUTED
ffc11630: 48 00 04 9c b ffc11acc <rtems_rfs_format+0x674> <== NOT EXECUTED
return false;
}
fs->blocks = rtems_rfs_fs_media_size (fs) / fs->block_size;
ffc11634: 38 61 00 08 addi r3,r1,8
ffc11638: 48 00 da c1 bl ffc1f0f8 <rtems_rfs_fs_media_size>
ffc1163c: 83 e1 00 10 lwz r31,16(r1)
ffc11640: 38 a0 00 00 li r5,0
ffc11644: 7f e6 fb 78 mr r6,r31
ffc11648: 48 01 fc 8d bl ffc312d4 <__udivdi3>
* 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));
ffc1164c: 57 fe 18 38 rlwinm r30,r31,3,0,28
{
printf ("group block count is higher than bits in block\n");
return false;
}
fs->blocks = rtems_rfs_fs_media_size (fs) / fs->block_size;
ffc11650: 90 81 00 0c stw r4,12(r1)
/*
* 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),
ffc11654: 7c 83 23 78 mr r3,r4
{
printf ("group block count is higher than bits in block\n");
return false;
}
fs->blocks = rtems_rfs_fs_media_size (fs) / fs->block_size;
ffc11658: 7c 9d 23 78 mr r29,r4
/*
* 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),
ffc1165c: 7f c4 f3 78 mr r4,r30
ffc11660: 4b ff fd d9 bl ffc11438 <rtems_rfs_rup_quotient>
rtems_rfs_bits_per_block (fs));
fs->group_inodes = config->group_inodes;
ffc11664: 81 3c 00 08 lwz r9,8(r28)
/*
* 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),
ffc11668: 7c 64 1b 78 mr r4,r3
ffc1166c: 90 61 00 2c stw r3,44(r1)
rtems_rfs_bits_per_block (fs));
fs->group_inodes = config->group_inodes;
if (!fs->group_inodes)
ffc11670: 2f 89 00 00 cmpwi cr7,r9,0
* per block.
*/
fs->group_count = rtems_rfs_rup_quotient (rtems_rfs_fs_blocks (fs),
rtems_rfs_bits_per_block (fs));
fs->group_inodes = config->group_inodes;
ffc11674: 91 21 00 34 stw r9,52(r1)
if (!fs->group_inodes)
ffc11678: 40 9e 00 38 bne- cr7,ffc116b0 <rtems_rfs_format+0x258> <== 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)
ffc1167c: 81 3c 00 0c lwz r9,12(r28)
ffc11680: 2f 89 00 00 cmpwi cr7,r9,0
ffc11684: 40 9e 00 08 bne- cr7,ffc1168c <rtems_rfs_format+0x234> <== 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;
ffc11688: 39 20 00 01 li r9,1
static int
rtems_rfs_inodes_from_percent (rtems_rfs_file_system* fs,
int percentage)
{
int blocks;
blocks = ((rtems_rfs_fs_blocks (fs) -
ffc1168c: 3b bd ff ff addi r29,r29,-1
RTEMS_RFS_SUPERBLOCK_SIZE) * percentage) / 100;
ffc11690: 7d 29 e9 d6 mullw r9,r9,r29
blocks = rtems_rfs_rup_quotient (blocks, fs->group_count);
ffc11694: 38 60 00 64 li r3,100
ffc11698: 7c 69 1b 96 divwu r3,r9,r3
ffc1169c: 4b ff fd 9d bl ffc11438 <rtems_rfs_rup_quotient>
return blocks * (rtems_rfs_fs_block_size (fs) / RTEMS_RFS_INODE_SIZE);
ffc116a0: 39 20 00 38 li r9,56
ffc116a4: 7d 3f 4b 96 divwu r9,r31,r9
ffc116a8: 7c 63 49 d6 mullw r3,r3,r9
* 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);
ffc116ac: 90 61 00 34 stw r3,52(r1)
}
/*
* 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;
ffc116b0: 39 20 00 38 li r9,56
fs->group_inodes =
rtems_rfs_rup_quotient (fs->group_inodes,
ffc116b4: 80 61 00 34 lwz r3,52(r1)
}
/*
* 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;
ffc116b8: 7f ff 4b 96 divwu r31,r31,r9
fs->group_inodes =
rtems_rfs_rup_quotient (fs->group_inodes,
ffc116bc: 7f e4 fb 78 mr r4,r31
}
/*
* 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;
ffc116c0: 93 e1 00 38 stw r31,56(r1)
fs->group_inodes =
rtems_rfs_rup_quotient (fs->group_inodes,
ffc116c4: 4b ff fd 75 bl ffc11438 <rtems_rfs_rup_quotient>
fs->inodes_per_block) * fs->inodes_per_block;
ffc116c8: 7c 63 f9 d6 mullw r3,r3,r31
if (fs->group_inodes > rtems_rfs_bitmap_numof_bits (fs->block_size))
ffc116cc: 7f 83 f0 40 cmplw cr7,r3,r30
ffc116d0: 41 9d 00 0c bgt- cr7,ffc116dc <rtems_rfs_format+0x284> <== 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 =
ffc116d4: 90 61 00 34 stw r3,52(r1)
ffc116d8: 48 00 00 08 b ffc116e0 <rtems_rfs_format+0x288>
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);
ffc116dc: 93 c1 00 34 stw r30,52(r1) <== NOT EXECUTED
fs->max_name_length = config->max_name_length;
ffc116e0: 81 3c 00 10 lwz r9,16(r28)
if (!fs->max_name_length)
ffc116e4: 2f 89 00 00 cmpwi cr7,r9,0
ffc116e8: 40 9e 09 9c bne- cr7,ffc12084 <rtems_rfs_format+0xc2c> <== NEVER TAKEN
{
fs->max_name_length = 512;
ffc116ec: 39 20 02 00 li r9,512
ffc116f0: 48 00 09 94 b ffc12084 <rtems_rfs_format+0xc2c>
if (!rtems_rfs_check_config (&fs, config))
return -1;
if (config->verbose)
{
printf ("rtems-rfs: format: media size = %" PRIu64 "\n",
ffc116f4: 38 61 00 08 addi r3,r1,8 <== NOT EXECUTED
ffc116f8: 48 00 da 01 bl ffc1f0f8 <rtems_rfs_fs_media_size> <== NOT EXECUTED
ffc116fc: 7c 65 1b 78 mr r5,r3 <== NOT EXECUTED
ffc11700: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc11704: 7c 86 23 78 mr r6,r4 <== NOT EXECUTED
ffc11708: 38 63 45 c6 addi r3,r3,17862 <== NOT EXECUTED
ffc1170c: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc11710: 48 01 22 7d bl ffc2398c <printf> <== NOT EXECUTED
rtems_rfs_fs_media_size (&fs));
printf ("rtems-rfs: format: media blocks = %" PRIu32 "\n",
ffc11714: 81 21 00 18 lwz r9,24(r1) <== NOT EXECUTED
ffc11718: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1171c: 80 89 00 1c lwz r4,28(r9) <== NOT EXECUTED
ffc11720: 38 63 45 ec addi r3,r3,17900 <== NOT EXECUTED
ffc11724: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc11728: 48 01 22 65 bl ffc2398c <printf> <== NOT EXECUTED
rtems_rfs_fs_media_blocks (&fs));
printf ("rtems-rfs: format: media block size = %" PRIu32 "\n",
ffc1172c: 81 21 00 18 lwz r9,24(r1) <== NOT EXECUTED
ffc11730: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc11734: 80 89 00 20 lwz r4,32(r9) <== NOT EXECUTED
ffc11738: 38 63 46 13 addi r3,r3,17939 <== NOT EXECUTED
ffc1173c: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc11740: 48 01 22 4d bl ffc2398c <printf> <== NOT EXECUTED
rtems_rfs_fs_media_block_size (&fs));
printf ("rtems-rfs: format: size = %" PRIu64 "\n",
ffc11744: 38 61 00 08 addi r3,r1,8 <== NOT EXECUTED
ffc11748: 48 00 d9 95 bl ffc1f0dc <rtems_rfs_fs_size> <== NOT EXECUTED
ffc1174c: 7c 65 1b 78 mr r5,r3 <== NOT EXECUTED
ffc11750: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc11754: 7c 86 23 78 mr r6,r4 <== NOT EXECUTED
ffc11758: 38 63 46 3e addi r3,r3,17982 <== NOT EXECUTED
ffc1175c: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc11760: 48 01 22 2d bl ffc2398c <printf> <== NOT EXECUTED
rtems_rfs_fs_size (&fs));
printf ("rtems-rfs: format: blocks = %zu\n",
ffc11764: 80 81 00 0c lwz r4,12(r1) <== NOT EXECUTED
ffc11768: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1176c: 38 63 46 5e addi r3,r3,18014 <== NOT EXECUTED
ffc11770: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc11774: 48 01 22 19 bl ffc2398c <printf> <== NOT EXECUTED
rtems_rfs_fs_blocks (&fs));
printf ("rtems-rfs: format: block size = %zu\n",
ffc11778: 80 81 00 10 lwz r4,16(r1) <== NOT EXECUTED
ffc1177c: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc11780: 38 63 46 7f addi r3,r3,18047 <== NOT EXECUTED
ffc11784: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc11788: 48 01 22 05 bl ffc2398c <printf> <== NOT EXECUTED
rtems_rfs_fs_block_size (&fs));
printf ("rtems-rfs: format: bits per block = %u\n",
ffc1178c: 80 81 00 10 lwz r4,16(r1) <== NOT EXECUTED
ffc11790: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc11794: 54 84 18 38 rlwinm r4,r4,3,0,28 <== NOT EXECUTED
ffc11798: 38 63 46 a4 addi r3,r3,18084 <== NOT EXECUTED
ffc1179c: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc117a0: 48 01 21 ed bl ffc2398c <printf> <== NOT EXECUTED
rtems_rfs_bits_per_block (&fs));
printf ("rtems-rfs: format: inode size = %zu\n", RTEMS_RFS_INODE_SIZE);
ffc117a4: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc117a8: 38 80 00 38 li r4,56 <== NOT EXECUTED
ffc117ac: 38 63 46 cc addi r3,r3,18124 <== NOT EXECUTED
ffc117b0: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc117b4: 48 01 21 d9 bl ffc2398c <printf> <== NOT EXECUTED
printf ("rtems-rfs: format: inodes = %zu (%d.%d%%)\n",
fs.group_inodes * fs.group_count,
ffc117b8: 80 61 00 34 lwz r3,52(r1) <== 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",
ffc117bc: 83 c1 00 2c lwz r30,44(r1) <== NOT EXECUTED
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,
rtems_rfs_fs_block_size (fs));
ffc117c0: 83 e1 00 10 lwz r31,16(r1) <== 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",
ffc117c4: 7f c3 f1 d6 mullw r30,r3,r30 <== 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,
ffc117c8: 1c 63 00 38 mulli r3,r3,56 <== NOT EXECUTED
ffc117cc: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED
ffc117d0: 4b ff fc 69 bl ffc11438 <rtems_rfs_rup_quotient> <== 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))
ffc117d4: 81 21 00 0c lwz r9,12(r1) <== 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));
ffc117d8: 57 ff 18 38 rlwinm r31,r31,3,0,28 <== 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))
ffc117dc: 39 29 ff ff addi r9,r9,-1 <== NOT EXECUTED
ffc117e0: 7f 9f 48 40 cmplw cr7,r31,r9 <== NOT EXECUTED
ffc117e4: 41 bd 00 08 bgt+ cr7,ffc117ec <rtems_rfs_format+0x394> <== 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));
ffc117e8: 7f e9 fb 78 mr r9,r31 <== 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;
ffc117ec: 38 63 00 01 addi r3,r3,1 <== NOT EXECUTED
ffc117f0: 1c 63 03 e8 mulli r3,r3,1000 <== NOT EXECUTED
ffc117f4: 7d 23 4b d6 divw r9,r3,r9 <== 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",
ffc117f8: 38 a0 00 0a li r5,10 <== NOT EXECUTED
ffc117fc: 7c a9 2b d6 divw r5,r9,r5 <== NOT EXECUTED
ffc11800: 1c c5 00 0a mulli r6,r5,10 <== NOT EXECUTED
ffc11804: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc11808: 7c c6 48 50 subf r6,r6,r9 <== NOT EXECUTED
ffc1180c: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED
ffc11810: 38 63 46 f1 addi r3,r3,18161 <== NOT EXECUTED
ffc11814: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc11818: 48 01 21 75 bl ffc2398c <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);
ffc1181c: 80 81 00 2c lwz r4,44(r1) <== NOT EXECUTED
ffc11820: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc11824: 38 63 47 1c addi r3,r3,18204 <== NOT EXECUTED
ffc11828: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1182c: 48 01 21 61 bl ffc2398c <printf> <== NOT EXECUTED
printf ("rtems-rfs: format: group blocks = %zu\n", fs.group_blocks);
ffc11830: 80 81 00 30 lwz r4,48(r1) <== NOT EXECUTED
ffc11834: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc11838: 38 63 47 3c addi r3,r3,18236 <== NOT EXECUTED
ffc1183c: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc11840: 48 01 21 4d bl ffc2398c <printf> <== NOT EXECUTED
printf ("rtems-rfs: format: group inodes = %zu\n", fs.group_inodes);
ffc11844: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc11848: 80 81 00 34 lwz r4,52(r1) <== NOT EXECUTED
ffc1184c: 38 63 47 63 addi r3,r3,18275 <== NOT EXECUTED
ffc11850: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc11854: 48 01 21 39 bl ffc2398c <printf> <== NOT EXECUTED
}
rc = rtems_rfs_buffer_setblksize (&fs, rtems_rfs_fs_block_size (&fs));
ffc11858: 3b a1 00 08 addi r29,r1,8
ffc1185c: 80 81 00 10 lwz r4,16(r1)
ffc11860: 7f a3 eb 78 mr r3,r29
ffc11864: 48 00 b5 29 bl ffc1cd8c <rtems_rfs_buffer_setblksize>
if (rc > 0)
ffc11868: 7c 7f 1b 79 mr. r31,r3
ffc1186c: 40 a1 00 18 ble+ ffc11884 <rtems_rfs_format+0x42c> <== ALWAYS TAKEN
{
printf ("rtems-rfs: format: setting block size failed: %d: %s\n",
ffc11870: 48 01 33 09 bl ffc24b78 <strerror> <== NOT EXECUTED
ffc11874: 7c 65 1b 78 mr r5,r3 <== NOT EXECUTED
ffc11878: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1187c: 38 63 47 8a addi r3,r3,18314 <== NOT EXECUTED
ffc11880: 48 00 07 ec b ffc1206c <rtems_rfs_format+0xc14> <== NOT EXECUTED
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);
ffc11884: 3b c1 00 cc addi r30,r1,204
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
ffc11888: 39 20 00 00 li r9,0
handle->bnum = 0;
ffc1188c: 3b 60 00 00 li r27,0
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
ffc11890: 99 21 00 cc stb r9,204(r1)
ffc11894: 7f a3 eb 78 mr r3,r29
ffc11898: 7f c4 f3 78 mr r4,r30
handle->bnum = 0;
ffc1189c: 93 61 00 d0 stw r27,208(r1)
ffc118a0: 38 a0 00 00 li r5,0
ffc118a4: 38 c0 00 00 li r6,0
handle->buffer = NULL;
ffc118a8: 93 61 00 d4 stw r27,212(r1)
ffc118ac: 48 00 af 91 bl ffc1c83c <rtems_rfs_buffer_handle_request>
if (rc > 0)
ffc118b0: 7c 7f 1b 79 mr. r31,r3
ffc118b4: 40 81 00 28 ble- ffc118dc <rtems_rfs_format+0x484> <== ALWAYS TAKEN
{
rtems_rfs_buffer_handle_close (fs, &handle);
ffc118b8: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED
ffc118bc: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED
ffc118c0: 4b ff fb 3d bl ffc113fc <rtems_rfs_buffer_handle_close><== NOT EXECUTED
printf ("rtems-rfs: write-superblock: request failed: %d: %s\n",
ffc118c4: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc118c8: 48 01 32 b1 bl ffc24b78 <strerror> <== NOT EXECUTED
ffc118cc: 7c 65 1b 78 mr r5,r3 <== NOT EXECUTED
ffc118d0: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc118d4: 38 63 47 c0 addi r3,r3,18368 <== NOT EXECUTED
ffc118d8: 48 00 01 90 b ffc11a68 <rtems_rfs_format+0x610> <== NOT EXECUTED
rc, strerror (rc));
return false;
}
sb = rtems_rfs_buffer_data (&handle);
ffc118dc: 81 21 00 d4 lwz r9,212(r1)
#define write_sb(_o, _d) rtems_rfs_write_u32(sb + (_o), _d)
memset (sb, 0xff, rtems_rfs_fs_block_size (fs));
ffc118e0: 38 80 00 ff li r4,255
ffc118e4: 80 a1 00 10 lwz r5,16(r1)
printf ("rtems-rfs: write-superblock: request failed: %d: %s\n",
rc, strerror (rc));
return false;
}
sb = rtems_rfs_buffer_data (&handle);
ffc118e8: 83 e9 00 1c lwz r31,28(r9)
#define write_sb(_o, _d) rtems_rfs_write_u32(sb + (_o), _d)
memset (sb, 0xff, rtems_rfs_fs_block_size (fs));
ffc118ec: 7f e3 fb 78 mr r3,r31
ffc118f0: 48 01 1e 41 bl ffc23730 <memset>
write_sb (RTEMS_RFS_SB_OFFSET_MAGIC, RTEMS_RFS_SB_MAGIC);
ffc118f4: 39 20 00 28 li r9,40
ffc118f8: 99 3f 00 00 stb r9,0(r31)
ffc118fc: 39 20 00 09 li r9,9
ffc11900: 39 40 00 01 li r10,1
ffc11904: 99 3f 00 01 stb r9,1(r31)
ffc11908: 39 20 00 20 li r9,32
write_sb (RTEMS_RFS_SB_OFFSET_GROUP_INODES, fs->group_inodes);
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);
ffc1190c: 7f c4 f3 78 mr r4,r30
#define write_sb(_o, _d) rtems_rfs_write_u32(sb + (_o), _d)
memset (sb, 0xff, rtems_rfs_fs_block_size (fs));
write_sb (RTEMS_RFS_SB_OFFSET_MAGIC, RTEMS_RFS_SB_MAGIC);
ffc11910: 99 5f 00 03 stb r10,3(r31)
write_sb (RTEMS_RFS_SB_OFFSET_GROUP_INODES, fs->group_inodes);
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);
ffc11914: 7f a3 eb 78 mr r3,r29
#define write_sb(_o, _d) rtems_rfs_write_u32(sb + (_o), _d)
memset (sb, 0xff, rtems_rfs_fs_block_size (fs));
write_sb (RTEMS_RFS_SB_OFFSET_MAGIC, RTEMS_RFS_SB_MAGIC);
ffc11918: 99 3f 00 02 stb r9,2(r31)
write_sb (RTEMS_RFS_SB_OFFSET_VERSION, RTEMS_RFS_VERSION);
ffc1191c: 9b 7f 00 04 stb r27,4(r31)
ffc11920: 9b 7f 00 05 stb r27,5(r31)
ffc11924: 9b 7f 00 06 stb r27,6(r31)
ffc11928: 9b 7f 00 07 stb r27,7(r31)
write_sb (RTEMS_RFS_SB_OFFSET_BLOCKS, rtems_rfs_fs_blocks (fs));
ffc1192c: 81 21 00 0c lwz r9,12(r1)
ffc11930: 55 28 46 3e rlwinm r8,r9,8,24,31
ffc11934: 99 3f 00 0f stb r9,15(r31)
ffc11938: 99 1f 00 0c stb r8,12(r31)
ffc1193c: 55 28 84 3e rlwinm r8,r9,16,16,31
ffc11940: 99 1f 00 0d stb r8,13(r31)
ffc11944: 55 28 c2 3e rlwinm r8,r9,24,8,31
write_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE, rtems_rfs_fs_block_size (fs));
ffc11948: 89 21 00 10 lbz r9,16(r1)
memset (sb, 0xff, rtems_rfs_fs_block_size (fs));
write_sb (RTEMS_RFS_SB_OFFSET_MAGIC, RTEMS_RFS_SB_MAGIC);
write_sb (RTEMS_RFS_SB_OFFSET_VERSION, RTEMS_RFS_VERSION);
write_sb (RTEMS_RFS_SB_OFFSET_BLOCKS, rtems_rfs_fs_blocks (fs));
ffc1194c: 99 1f 00 0e stb r8,14(r31)
write_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE, rtems_rfs_fs_block_size (fs));
ffc11950: 99 3f 00 08 stb r9,8(r31)
ffc11954: a1 21 00 10 lhz r9,16(r1)
ffc11958: 99 3f 00 09 stb r9,9(r31)
ffc1195c: 81 21 00 10 lwz r9,16(r1)
ffc11960: 55 29 c2 3e rlwinm r9,r9,24,8,31
ffc11964: 99 3f 00 0a stb r9,10(r31)
ffc11968: 81 21 00 10 lwz r9,16(r1)
ffc1196c: 99 3f 00 0b stb r9,11(r31)
write_sb (RTEMS_RFS_SB_OFFSET_BAD_BLOCKS, fs->bad_blocks);
ffc11970: 89 21 00 20 lbz r9,32(r1)
ffc11974: 99 3f 00 10 stb r9,16(r31)
ffc11978: a1 21 00 20 lhz r9,32(r1)
ffc1197c: 99 3f 00 11 stb r9,17(r31)
ffc11980: 81 21 00 20 lwz r9,32(r1)
ffc11984: 55 29 c2 3e rlwinm r9,r9,24,8,31
ffc11988: 99 3f 00 12 stb r9,18(r31)
ffc1198c: 81 21 00 20 lwz r9,32(r1)
ffc11990: 99 3f 00 13 stb r9,19(r31)
write_sb (RTEMS_RFS_SB_OFFSET_MAX_NAME_LENGTH, fs->max_name_length);
ffc11994: 89 21 00 24 lbz r9,36(r1)
ffc11998: 99 3f 00 14 stb r9,20(r31)
ffc1199c: a1 21 00 24 lhz r9,36(r1)
ffc119a0: 99 3f 00 15 stb r9,21(r31)
ffc119a4: 81 21 00 24 lwz r9,36(r1)
ffc119a8: 55 29 c2 3e rlwinm r9,r9,24,8,31
ffc119ac: 99 3f 00 16 stb r9,22(r31)
ffc119b0: 81 21 00 24 lwz r9,36(r1)
ffc119b4: 99 3f 00 17 stb r9,23(r31)
write_sb (RTEMS_RFS_SB_OFFSET_GROUPS, fs->group_count);
ffc119b8: 89 21 00 2c lbz r9,44(r1)
ffc119bc: 99 3f 00 18 stb r9,24(r31)
ffc119c0: a1 21 00 2c lhz r9,44(r1)
ffc119c4: 99 3f 00 19 stb r9,25(r31)
ffc119c8: 81 21 00 2c lwz r9,44(r1)
ffc119cc: 55 29 c2 3e rlwinm r9,r9,24,8,31
ffc119d0: 99 3f 00 1a stb r9,26(r31)
ffc119d4: 81 21 00 2c lwz r9,44(r1)
ffc119d8: 99 3f 00 1b stb r9,27(r31)
write_sb (RTEMS_RFS_SB_OFFSET_GROUP_BLOCKS, fs->group_blocks);
ffc119dc: 89 21 00 30 lbz r9,48(r1)
ffc119e0: 99 3f 00 1c stb r9,28(r31)
ffc119e4: a1 21 00 30 lhz r9,48(r1)
ffc119e8: 99 3f 00 1d stb r9,29(r31)
ffc119ec: 81 21 00 30 lwz r9,48(r1)
ffc119f0: 55 29 c2 3e rlwinm r9,r9,24,8,31
ffc119f4: 99 3f 00 1e stb r9,30(r31)
ffc119f8: 81 21 00 30 lwz r9,48(r1)
ffc119fc: 99 3f 00 1f stb r9,31(r31)
write_sb (RTEMS_RFS_SB_OFFSET_GROUP_INODES, fs->group_inodes);
ffc11a00: 89 21 00 34 lbz r9,52(r1)
ffc11a04: 99 3f 00 20 stb r9,32(r31)
ffc11a08: a1 21 00 34 lhz r9,52(r1)
ffc11a0c: 99 3f 00 21 stb r9,33(r31)
ffc11a10: 81 21 00 34 lwz r9,52(r1)
ffc11a14: 55 29 c2 3e rlwinm r9,r9,24,8,31
ffc11a18: 99 3f 00 22 stb r9,34(r31)
ffc11a1c: 81 21 00 34 lwz r9,52(r1)
write_sb (RTEMS_RFS_SB_OFFSET_INODE_SIZE, RTEMS_RFS_INODE_SIZE);
ffc11a20: 9b 7f 00 24 stb r27,36(r31)
write_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE, rtems_rfs_fs_block_size (fs));
write_sb (RTEMS_RFS_SB_OFFSET_BAD_BLOCKS, fs->bad_blocks);
write_sb (RTEMS_RFS_SB_OFFSET_MAX_NAME_LENGTH, fs->max_name_length);
write_sb (RTEMS_RFS_SB_OFFSET_GROUPS, fs->group_count);
write_sb (RTEMS_RFS_SB_OFFSET_GROUP_BLOCKS, fs->group_blocks);
write_sb (RTEMS_RFS_SB_OFFSET_GROUP_INODES, fs->group_inodes);
ffc11a24: 99 3f 00 23 stb r9,35(r31)
write_sb (RTEMS_RFS_SB_OFFSET_INODE_SIZE, RTEMS_RFS_INODE_SIZE);
ffc11a28: 39 20 00 38 li r9,56
ffc11a2c: 9b 7f 00 25 stb r27,37(r31)
ffc11a30: 9b 7f 00 26 stb r27,38(r31)
ffc11a34: 99 3f 00 27 stb r9,39(r31)
rtems_rfs_buffer_mark_dirty (&handle);
ffc11a38: 99 41 00 cc stb r10,204(r1)
rc = rtems_rfs_buffer_handle_release (fs, &handle);
ffc11a3c: 48 00 ac 1d bl ffc1c658 <rtems_rfs_buffer_handle_release>
if (rc > 0)
ffc11a40: 7c 7f 1b 79 mr. r31,r3
{
rtems_rfs_buffer_handle_close (fs, &handle);
ffc11a44: 7f c4 f3 78 mr r4,r30
ffc11a48: 7f a3 eb 78 mr r3,r29
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)
ffc11a4c: 40 81 00 2c ble- ffc11a78 <rtems_rfs_format+0x620> <== ALWAYS TAKEN
{
rtems_rfs_buffer_handle_close (fs, &handle);
ffc11a50: 4b ff f9 ad bl ffc113fc <rtems_rfs_buffer_handle_close><== NOT EXECUTED
printf ("rtems-rfs: write-superblock: buffer release failed: %d: %s\n",
ffc11a54: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc11a58: 48 01 31 21 bl ffc24b78 <strerror> <== NOT EXECUTED
ffc11a5c: 7c 65 1b 78 mr r5,r3 <== NOT EXECUTED
ffc11a60: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc11a64: 38 63 47 f5 addi r3,r3,18421 <== NOT EXECUTED
ffc11a68: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED
ffc11a6c: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc11a70: 48 01 1f 1d bl ffc2398c <printf> <== NOT EXECUTED
ffc11a74: 48 00 00 50 b ffc11ac4 <rtems_rfs_format+0x66c> <== NOT EXECUTED
rc, strerror (rc));
return false;
}
rc = rtems_rfs_buffer_handle_close (fs, &handle);
ffc11a78: 4b ff f9 85 bl ffc113fc <rtems_rfs_buffer_handle_close>
if (rc > 0)
ffc11a7c: 7c 7f 1b 79 mr. r31,r3
ffc11a80: 40 81 00 18 ble- ffc11a98 <rtems_rfs_format+0x640> <== ALWAYS TAKEN
{
printf ("rtems-rfs: write-superblock: buffer handle close failed: %d: %s\n",
ffc11a84: 48 01 30 f5 bl ffc24b78 <strerror> <== NOT EXECUTED
ffc11a88: 7c 65 1b 78 mr r5,r3 <== NOT EXECUTED
ffc11a8c: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc11a90: 38 63 48 31 addi r3,r3,18481 <== NOT EXECUTED
ffc11a94: 4b ff ff d4 b ffc11a68 <rtems_rfs_format+0x610> <== NOT EXECUTED
*/
if ((group_base + group_size) > rtems_rfs_fs_blocks (fs))
group_size = rtems_rfs_fs_blocks (fs) - group_base;
if (verbose)
printf ("\rrtems-rfs: format: group %3d: base = %" PRId32 ", size = %zd",
ffc11a98: 3e 80 ff c3 lis r20,-61
rc, strerror (rc));
return false;
}
if (verbose)
printf (", blocks");
ffc11a9c: 3e 40 ff c3 lis r18,-61
}
rtems_rfs_buffer_mark_dirty (&handle);
if (verbose)
printf (", inodes");
ffc11aa0: 3e 20 ff c3 lis r17,-61
printf ("rtems-rfs: format: setting block size failed: %d: %s\n",
rc, strerror (rc));
return -1;
}
if (!rtems_rfs_write_superblock (&fs))
ffc11aa4: 3b e0 00 00 li r31,0
*/
if ((group_base + group_size) > rtems_rfs_fs_blocks (fs))
group_size = rtems_rfs_fs_blocks (fs) - group_base;
if (verbose)
printf ("\rrtems-rfs: format: group %3d: base = %" PRId32 ", size = %zd",
ffc11aa8: 3a 94 48 d6 addi r20,r20,18646
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
ffc11aac: 3a 60 00 00 li r19,0
handle->bnum = 0;
ffc11ab0: 3a a0 00 00 li r21,0
rc, strerror (rc));
return false;
}
if (verbose)
printf (", blocks");
ffc11ab4: 3a 52 49 0c addi r18,r18,18700
printf ("\nrtems-rfs: write-group: group %3d: close block bitmap failed: %d: %s\n",
group, rc, strerror (rc));
return false;
}
rtems_rfs_buffer_mark_dirty (&handle);
ffc11ab8: 3b 00 00 01 li r24,1
if (verbose)
printf (", inodes");
ffc11abc: 3a 31 49 ed addi r17,r17,18925
ffc11ac0: 48 00 03 68 b ffc11e28 <rtems_rfs_format+0x9d0>
return -1;
}
if (!rtems_rfs_write_superblock (&fs))
{
printf ("rtems-rfs: format: superblock write failed\n");
ffc11ac4: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc11ac8: 38 63 48 72 addi r3,r3,18546 <== NOT EXECUTED
ffc11acc: 48 01 22 29 bl ffc23cf4 <puts> <== NOT EXECUTED
ffc11ad0: 48 00 05 ac b ffc1207c <rtems_rfs_format+0xc24> <== NOT EXECUTED
size_t group_size;
int blocks;
int b;
int rc;
group_base = rtems_rfs_fs_block (fs, group, 0);
ffc11ad4: 83 61 00 30 lwz r27,48(r1)
printf ("rtems-rfs: format: superblock write failed\n");
return -1;
}
for (group = 0; group < fs.group_count; group++)
if (!rtems_rfs_write_group (&fs, group,
ffc11ad8: 56 d6 06 3e clrlwi r22,r22,24
int b;
int rc;
group_base = rtems_rfs_fs_block (fs, group, 0);
if (group_base > rtems_rfs_fs_blocks (fs))
ffc11adc: 81 21 00 0c lwz r9,12(r1)
size_t group_size;
int blocks;
int b;
int rc;
group_base = rtems_rfs_fs_block (fs, group, 0);
ffc11ae0: 7e ff d9 d6 mullw r23,r31,r27
printf ("rtems-rfs: format: superblock write failed\n");
return -1;
}
for (group = 0; group < fs.group_count; group++)
if (!rtems_rfs_write_group (&fs, group,
ffc11ae4: 8a 1c 00 14 lbz r16,20(r28)
size_t group_size;
int blocks;
int b;
int rc;
group_base = rtems_rfs_fs_block (fs, group, 0);
ffc11ae8: 3b 57 00 01 addi r26,r23,1
if (group_base > rtems_rfs_fs_blocks (fs))
ffc11aec: 7f 9a 48 40 cmplw cr7,r26,r9
ffc11af0: 40 bd 00 1c ble+ cr7,ffc11b0c <rtems_rfs_format+0x6b4> <== ALWAYS TAKEN
{
printf ("rtems-rfs: write-group: group %d base beyond disk limit\n",
ffc11af4: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc11af8: 38 63 48 9d addi r3,r3,18589 <== NOT EXECUTED
ffc11afc: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED
ffc11b00: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc11b04: 48 01 1e 89 bl ffc2398c <printf> <== NOT EXECUTED
ffc11b08: 48 00 05 74 b ffc1207c <rtems_rfs_format+0xc24> <== 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))
ffc11b0c: 7d 5a da 14 add r10,r26,r27
ffc11b10: 7f 8a 48 40 cmplw cr7,r10,r9
ffc11b14: 40 9d 00 08 ble- cr7,ffc11b1c <rtems_rfs_format+0x6c4> <== NEVER TAKEN
group_size = rtems_rfs_fs_blocks (fs) - group_base;
ffc11b18: 7f 7a 48 50 subf r27,r26,r9
if (verbose)
ffc11b1c: 2f 96 00 00 cmpwi cr7,r22,0
ffc11b20: 41 be 00 1c beq+ cr7,ffc11b3c <rtems_rfs_format+0x6e4> <== ALWAYS TAKEN
printf ("\rrtems-rfs: format: group %3d: base = %" PRId32 ", size = %zd",
ffc11b24: 7e 83 a3 78 mr r3,r20 <== NOT EXECUTED
ffc11b28: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED
ffc11b2c: 7f 45 d3 78 mr r5,r26 <== NOT EXECUTED
ffc11b30: 7f 66 db 78 mr r6,r27 <== NOT EXECUTED
ffc11b34: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc11b38: 48 01 1e 55 bl ffc2398c <printf> <== NOT EXECUTED
printf ("\nrtems-rfs: write-group: handle open failed: %d: %s\n",
rc, strerror (rc));
return false;
}
if (verbose)
ffc11b3c: 2f 96 00 00 cmpwi cr7,r22,0
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
ffc11b40: 9a 61 00 cc stb r19,204(r1)
handle->bnum = 0;
ffc11b44: 92 a1 00 d0 stw r21,208(r1)
handle->buffer = NULL;
ffc11b48: 92 a1 00 d4 stw r21,212(r1)
ffc11b4c: 41 be 00 10 beq+ cr7,ffc11b5c <rtems_rfs_format+0x704> <== ALWAYS TAKEN
printf (", blocks");
ffc11b50: 7e 43 93 78 mr r3,r18 <== NOT EXECUTED
ffc11b54: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc11b58: 48 01 1e 35 bl ffc2398c <printf> <== NOT EXECUTED
/*
* Open the block bitmap using the new buffer.
*/
rc = rtems_rfs_bitmap_open (&bitmap, fs, &handle, group_size,
ffc11b5c: 7f 47 d3 78 mr r7,r26
ffc11b60: 38 61 00 b4 addi r3,r1,180
ffc11b64: 7f a4 eb 78 mr r4,r29
ffc11b68: 7f c5 f3 78 mr r5,r30
ffc11b6c: 7f 66 db 78 mr r6,r27
ffc11b70: 48 00 97 ed bl ffc1b35c <rtems_rfs_bitmap_open>
group_base + RTEMS_RFS_GROUP_BLOCK_BITMAP_BLOCK);
if (rc > 0)
ffc11b74: 7c 7a 1b 79 mr. r26,r3
ffc11b78: 40 81 00 28 ble- ffc11ba0 <rtems_rfs_format+0x748> <== ALWAYS TAKEN
{
rtems_rfs_buffer_handle_close (fs, &handle);
ffc11b7c: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED
ffc11b80: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED
ffc11b84: 4b ff f8 79 bl ffc113fc <rtems_rfs_buffer_handle_close><== NOT EXECUTED
printf ("\nrtems-rfs: write-group: group %3d: open block bitmap failed: %d: %s\n",
ffc11b88: 7f 43 d3 78 mr r3,r26 <== NOT EXECUTED
ffc11b8c: 48 01 2f ed bl ffc24b78 <strerror> <== NOT EXECUTED
ffc11b90: 7c 66 1b 78 mr r6,r3 <== NOT EXECUTED
ffc11b94: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc11b98: 38 63 49 15 addi r3,r3,18709 <== NOT EXECUTED
ffc11b9c: 48 00 00 50 b ffc11bec <rtems_rfs_format+0x794> <== 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));
ffc11ba0: 81 21 00 d4 lwz r9,212(r1)
ffc11ba4: 38 80 00 ff li r4,255
ffc11ba8: 80 a1 00 10 lwz r5,16(r1)
ffc11bac: 80 69 00 1c lwz r3,28(r9)
ffc11bb0: 48 01 1b 81 bl ffc23730 <memset>
/*
* Clear the bitmap.
*/
rc = rtems_rfs_bitmap_map_clear_all (&bitmap);
ffc11bb4: 38 61 00 b4 addi r3,r1,180
ffc11bb8: 48 00 94 e5 bl ffc1b09c <rtems_rfs_bitmap_map_clear_all>
if (rc > 0)
ffc11bbc: 7c 7a 1b 79 mr. r26,r3
{
rtems_rfs_bitmap_close (&bitmap);
ffc11bc0: 38 61 00 b4 addi r3,r1,180
/*
* Clear the bitmap.
*/
rc = rtems_rfs_bitmap_map_clear_all (&bitmap);
if (rc > 0)
ffc11bc4: 40 81 00 34 ble- ffc11bf8 <rtems_rfs_format+0x7a0> <== ALWAYS TAKEN
{
rtems_rfs_bitmap_close (&bitmap);
ffc11bc8: 48 00 97 fd bl ffc1b3c4 <rtems_rfs_bitmap_close> <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &handle);
ffc11bcc: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED
ffc11bd0: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED
ffc11bd4: 4b ff f8 29 bl ffc113fc <rtems_rfs_buffer_handle_close><== NOT EXECUTED
printf ("\nrtems-rfs: write-group: group %3d: block bitmap clear all failed: %d: %s\n",
ffc11bd8: 7f 43 d3 78 mr r3,r26 <== NOT EXECUTED
ffc11bdc: 48 01 2f 9d bl ffc24b78 <strerror> <== NOT EXECUTED
ffc11be0: 7c 66 1b 78 mr r6,r3 <== NOT EXECUTED
ffc11be4: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc11be8: 38 63 49 5b addi r3,r3,18779 <== NOT EXECUTED
ffc11bec: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED
ffc11bf0: 7f 45 d3 78 mr r5,r26 <== NOT EXECUTED
ffc11bf4: 48 00 01 58 b ffc11d4c <rtems_rfs_format+0x8f4> <== NOT EXECUTED
}
/*
* Forced allocation of the block bitmap.
*/
rtems_rfs_bitmap_map_set (&bitmap, RTEMS_RFS_GROUP_BLOCK_BITMAP_BLOCK);
ffc11bf8: 38 80 00 00 li r4,0
ffc11bfc: 48 00 92 4d bl ffc1ae48 <rtems_rfs_bitmap_map_set>
/*
* Forced allocation of the inode bitmap.
*/
rtems_rfs_bitmap_map_set (&bitmap, RTEMS_RFS_GROUP_INODE_BITMAP_BLOCK);
ffc11c00: 38 80 00 01 li r4,1
ffc11c04: 38 61 00 b4 addi r3,r1,180
ffc11c08: 48 00 92 41 bl ffc1ae48 <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);
ffc11c0c: 80 61 00 34 lwz r3,52(r1)
ffc11c10: 80 81 00 38 lwz r4,56(r1)
/*
* Forced allocation of the inode blocks which follow the block bitmap.
*/
for (b = 0; b < blocks; b++)
ffc11c14: 3b 40 00 00 li r26,0
rtems_rfs_bitmap_map_set (&bitmap, RTEMS_RFS_GROUP_INODE_BITMAP_BLOCK);
/*
* Determine the number of inodes blocks in the group.
*/
blocks = rtems_rfs_rup_quotient (fs->group_inodes, fs->inodes_per_block);
ffc11c18: 4b ff f8 21 bl ffc11438 <rtems_rfs_rup_quotient>
ffc11c1c: 7c 6f 1b 78 mr r15,r3
ffc11c20: 48 00 00 10 b ffc11c30 <rtems_rfs_format+0x7d8>
/*
* 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);
ffc11c24: 38 9a 00 02 addi r4,r26,2
ffc11c28: 48 00 92 21 bl ffc1ae48 <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++)
ffc11c2c: 3b 5a 00 01 addi r26,r26,1
ffc11c30: 7f 9a 78 00 cmpw cr7,r26,r15
rtems_rfs_bitmap_map_set (&bitmap, b + RTEMS_RFS_GROUP_INODE_BLOCK);
ffc11c34: 38 61 00 b4 addi r3,r1,180
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++)
ffc11c38: 41 9c ff ec blt+ cr7,ffc11c24 <rtems_rfs_format+0x7cc>
rtems_rfs_bitmap_map_set (&bitmap, b + RTEMS_RFS_GROUP_INODE_BLOCK);
/*
* Close the block bitmap.
*/
rc = rtems_rfs_bitmap_close (&bitmap);
ffc11c3c: 48 00 97 89 bl ffc1b3c4 <rtems_rfs_bitmap_close>
if (rc > 0)
ffc11c40: 7c 7a 1b 79 mr. r26,r3
ffc11c44: 40 a1 00 28 ble+ ffc11c6c <rtems_rfs_format+0x814> <== ALWAYS TAKEN
{
rtems_rfs_buffer_handle_close (fs, &handle);
ffc11c48: 38 81 00 cc addi r4,r1,204 <== NOT EXECUTED
ffc11c4c: 38 61 00 08 addi r3,r1,8 <== NOT EXECUTED
ffc11c50: 4b ff f7 ad bl ffc113fc <rtems_rfs_buffer_handle_close><== NOT EXECUTED
printf ("\nrtems-rfs: write-group: group %3d: close block bitmap failed: %d: %s\n",
ffc11c54: 7f 43 d3 78 mr r3,r26 <== NOT EXECUTED
ffc11c58: 48 01 2f 21 bl ffc24b78 <strerror> <== NOT EXECUTED
ffc11c5c: 7c 66 1b 78 mr r6,r3 <== NOT EXECUTED
ffc11c60: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc11c64: 38 63 49 a6 addi r3,r3,18854 <== NOT EXECUTED
ffc11c68: 4b ff ff 84 b ffc11bec <rtems_rfs_format+0x794> <== NOT EXECUTED
return false;
}
rtems_rfs_buffer_mark_dirty (&handle);
if (verbose)
ffc11c6c: 2f 96 00 00 cmpwi cr7,r22,0
printf ("\nrtems-rfs: write-group: group %3d: close block bitmap failed: %d: %s\n",
group, rc, strerror (rc));
return false;
}
rtems_rfs_buffer_mark_dirty (&handle);
ffc11c70: 9b 01 00 cc stb r24,204(r1)
if (verbose)
ffc11c74: 41 be 00 10 beq+ cr7,ffc11c84 <rtems_rfs_format+0x82c> <== ALWAYS TAKEN
printf (", inodes");
ffc11c78: 7e 23 8b 78 mr r3,r17 <== NOT EXECUTED
ffc11c7c: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc11c80: 48 01 1d 0d bl ffc2398c <printf> <== NOT EXECUTED
/*
* Open the inode bitmap using the old buffer. Should release any changes.
*/
rc = rtems_rfs_bitmap_open (&bitmap, fs, &handle, group_size,
ffc11c84: 7f 66 db 78 mr r6,r27
ffc11c88: 38 61 00 b4 addi r3,r1,180
ffc11c8c: 7f a4 eb 78 mr r4,r29
ffc11c90: 7f c5 f3 78 mr r5,r30
ffc11c94: 38 f7 00 02 addi r7,r23,2
ffc11c98: 48 00 96 c5 bl ffc1b35c <rtems_rfs_bitmap_open>
group_base + RTEMS_RFS_GROUP_INODE_BITMAP_BLOCK);
if (rc > 0)
ffc11c9c: 7c 7b 1b 79 mr. r27,r3
ffc11ca0: 40 81 00 28 ble- ffc11cc8 <rtems_rfs_format+0x870> <== ALWAYS TAKEN
{
rtems_rfs_buffer_handle_close (fs, &handle);
ffc11ca4: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED
ffc11ca8: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED
ffc11cac: 4b ff f7 51 bl ffc113fc <rtems_rfs_buffer_handle_close><== NOT EXECUTED
printf ("\nrtems-rfs: write-group: group %3d: open inode bitmap failed: %d: %s\n",
ffc11cb0: 7f 63 db 78 mr r3,r27 <== NOT EXECUTED
ffc11cb4: 48 01 2e c5 bl ffc24b78 <strerror> <== NOT EXECUTED
ffc11cb8: 7c 66 1b 78 mr r6,r3 <== NOT EXECUTED
ffc11cbc: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc11cc0: 38 63 49 f6 addi r3,r3,18934 <== NOT EXECUTED
ffc11cc4: 48 00 00 80 b ffc11d44 <rtems_rfs_format+0x8ec> <== 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));
ffc11cc8: 81 21 00 d4 lwz r9,212(r1)
ffc11ccc: 38 80 00 00 li r4,0
ffc11cd0: 80 a1 00 10 lwz r5,16(r1)
ffc11cd4: 80 69 00 1c lwz r3,28(r9)
ffc11cd8: 48 01 1a 59 bl ffc23730 <memset>
/*
* Clear the inode bitmap.
*/
rc = rtems_rfs_bitmap_map_clear_all (&bitmap);
ffc11cdc: 38 61 00 b4 addi r3,r1,180
ffc11ce0: 48 00 93 bd bl ffc1b09c <rtems_rfs_bitmap_map_clear_all>
if (rc > 0)
ffc11ce4: 7c 7b 1b 79 mr. r27,r3
{
rtems_rfs_bitmap_close (&bitmap);
ffc11ce8: 38 61 00 b4 addi r3,r1,180
/*
* Clear the inode bitmap.
*/
rc = rtems_rfs_bitmap_map_clear_all (&bitmap);
if (rc > 0)
ffc11cec: 40 81 00 2c ble- ffc11d18 <rtems_rfs_format+0x8c0> <== ALWAYS TAKEN
{
rtems_rfs_bitmap_close (&bitmap);
ffc11cf0: 48 00 96 d5 bl ffc1b3c4 <rtems_rfs_bitmap_close> <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &handle);
ffc11cf4: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED
ffc11cf8: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED
ffc11cfc: 4b ff f7 01 bl ffc113fc <rtems_rfs_buffer_handle_close><== NOT EXECUTED
printf ("\nrtems-rfs: write-group: group %3d: inode bitmap" \
ffc11d00: 7f 63 db 78 mr r3,r27 <== NOT EXECUTED
ffc11d04: 48 01 2e 75 bl ffc24b78 <strerror> <== NOT EXECUTED
ffc11d08: 7c 66 1b 78 mr r6,r3 <== NOT EXECUTED
ffc11d0c: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc11d10: 38 63 4a 3c addi r3,r3,19004 <== NOT EXECUTED
ffc11d14: 48 00 00 30 b ffc11d44 <rtems_rfs_format+0x8ec> <== NOT EXECUTED
}
/*
* Close the inode bitmap.
*/
rc = rtems_rfs_bitmap_close (&bitmap);
ffc11d18: 48 00 96 ad bl ffc1b3c4 <rtems_rfs_bitmap_close>
if (rc > 0)
ffc11d1c: 7c 7b 1b 79 mr. r27,r3
ffc11d20: 40 a1 00 38 ble+ ffc11d58 <rtems_rfs_format+0x900> <== ALWAYS TAKEN
{
rtems_rfs_buffer_handle_close (fs, &handle);
ffc11d24: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED
ffc11d28: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED
ffc11d2c: 4b ff f6 d1 bl ffc113fc <rtems_rfs_buffer_handle_close><== NOT EXECUTED
printf ("\nrtems-rfs: write-group: group %3d: close inode" \
ffc11d30: 7f 63 db 78 mr r3,r27 <== NOT EXECUTED
ffc11d34: 48 01 2e 45 bl ffc24b78 <strerror> <== NOT EXECUTED
ffc11d38: 7c 66 1b 78 mr r6,r3 <== NOT EXECUTED
ffc11d3c: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc11d40: 38 63 4a 87 addi r3,r3,19079 <== NOT EXECUTED
ffc11d44: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED
ffc11d48: 7f 65 db 78 mr r5,r27 <== NOT EXECUTED
ffc11d4c: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc11d50: 48 01 1c 3d bl ffc2398c <printf> <== NOT EXECUTED
ffc11d54: 48 00 03 28 b ffc1207c <rtems_rfs_format+0xc24> <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle);
/*
* Initialise the inode tables if required to do so.
*/
if (initialise_inodes)
ffc11d58: 2f 90 00 00 cmpwi cr7,r16,0
printf ("\nrtems-rfs: write-group: group %3d: close inode" \
" bitmap failed: %d: %s\n", group, rc, strerror (rc));
return false;
}
rtems_rfs_buffer_mark_dirty (&handle);
ffc11d5c: 9b 01 00 cc stb r24,204(r1)
/*
* Initialise the inode tables if required to do so.
*/
if (initialise_inodes)
ffc11d60: 3b 60 00 00 li r27,0
{
for (b = 0; b < blocks; b++)
{
rc = rtems_rfs_buffer_handle_request (fs, &handle,
group_base + b + RTEMS_RFS_GROUP_INODE_BLOCK,
ffc11d64: 3a f7 00 03 addi r23,r23,3
rtems_rfs_buffer_mark_dirty (&handle);
/*
* Initialise the inode tables if required to do so.
*/
if (initialise_inodes)
ffc11d68: 40 be 00 94 bne+ cr7,ffc11dfc <rtems_rfs_format+0x9a4> <== NEVER TAKEN
rtems_rfs_buffer_mark_dirty (&handle);
}
}
rc = rtems_rfs_buffer_handle_close (fs, &handle);
ffc11d6c: 7f a3 eb 78 mr r3,r29
ffc11d70: 7f c4 f3 78 mr r4,r30
ffc11d74: 4b ff f6 89 bl ffc113fc <rtems_rfs_buffer_handle_close>
if (rc > 0)
ffc11d78: 7c 7b 1b 79 mr. r27,r3
ffc11d7c: 41 a1 00 8c bgt+ ffc11e08 <rtems_rfs_format+0x9b0> <== NEVER TAKEN
{
printf ("rtems-rfs: format: superblock write failed\n");
return -1;
}
for (group = 0; group < fs.group_count; group++)
ffc11d80: 3b ff 00 01 addi r31,r31,1
ffc11d84: 48 00 00 a4 b ffc11e28 <rtems_rfs_format+0x9d0>
return rc;
}
int
rtems_rfs_format (const char* name, const rtems_rfs_format_config* config)
ffc11d88: 7f 57 da 14 add r26,r23,r27 <== NOT EXECUTED
*/
if (initialise_inodes)
{
for (b = 0; b < blocks; b++)
{
rc = rtems_rfs_buffer_handle_request (fs, &handle,
ffc11d8c: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED
ffc11d90: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED
ffc11d94: 7f 45 d3 78 mr r5,r26 <== NOT EXECUTED
ffc11d98: 38 c0 00 00 li r6,0 <== NOT EXECUTED
ffc11d9c: 48 00 aa a1 bl ffc1c83c <rtems_rfs_buffer_handle_request><== NOT EXECUTED
group_base + b + RTEMS_RFS_GROUP_INODE_BLOCK,
false);
if (rc > 0)
ffc11da0: 7c 76 1b 79 mr. r22,r3 <== NOT EXECUTED
ffc11da4: 40 a1 00 3c ble+ ffc11de0 <rtems_rfs_format+0x988> <== NOT EXECUTED
{
rtems_rfs_buffer_handle_close (fs, &handle);
ffc11da8: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED
ffc11dac: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED
ffc11db0: 4b ff f6 4d bl ffc113fc <rtems_rfs_buffer_handle_close><== NOT EXECUTED
printf ("\nrtems-rfs: write-group: group %3d: block %" PRId32 " request failed: %d: %s\n",
ffc11db4: 7e c3 b3 78 mr r3,r22 <== NOT EXECUTED
ffc11db8: 48 01 2d c1 bl ffc24b78 <strerror> <== NOT EXECUTED
ffc11dbc: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED
ffc11dc0: 7c 67 1b 78 mr r7,r3 <== NOT EXECUTED
ffc11dc4: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc11dc8: 7f 45 d3 78 mr r5,r26 <== NOT EXECUTED
ffc11dcc: 7e c6 b3 78 mr r6,r22 <== NOT EXECUTED
ffc11dd0: 38 63 4a ce addi r3,r3,19150 <== NOT EXECUTED
ffc11dd4: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc11dd8: 48 01 1b b5 bl ffc2398c <printf> <== NOT EXECUTED
ffc11ddc: 48 00 02 a0 b ffc1207c <rtems_rfs_format+0xc24> <== 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));
ffc11de0: 81 21 00 d4 lwz r9,212(r1) <== NOT EXECUTED
ffc11de4: 38 80 00 ff li r4,255 <== NOT EXECUTED
ffc11de8: 80 a1 00 10 lwz r5,16(r1) <== NOT EXECUTED
/*
* Initialise the inode tables if required to do so.
*/
if (initialise_inodes)
{
for (b = 0; b < blocks; b++)
ffc11dec: 3b 7b 00 01 addi r27,r27,1 <== 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));
ffc11df0: 80 69 00 1c lwz r3,28(r9) <== NOT EXECUTED
ffc11df4: 48 01 19 3d bl ffc23730 <memset> <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle);
ffc11df8: 9b 01 00 cc stb r24,204(r1) <== NOT EXECUTED
/*
* Initialise the inode tables if required to do so.
*/
if (initialise_inodes)
{
for (b = 0; b < blocks; b++)
ffc11dfc: 7f 9b 78 00 cmpw cr7,r27,r15 <== NOT EXECUTED
ffc11e00: 41 9c ff 88 blt+ cr7,ffc11d88 <rtems_rfs_format+0x930> <== NOT EXECUTED
ffc11e04: 4b ff ff 68 b ffc11d6c <rtems_rfs_format+0x914> <== 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",
ffc11e08: 48 01 2d 71 bl ffc24b78 <strerror> <== NOT EXECUTED
ffc11e0c: 7f 64 db 78 mr r4,r27 <== NOT EXECUTED
ffc11e10: 7c 65 1b 78 mr r5,r3 <== NOT EXECUTED
ffc11e14: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc11e18: 38 63 4b 14 addi r3,r3,19220 <== NOT EXECUTED
ffc11e1c: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc11e20: 48 01 1b 6d bl ffc2398c <printf> <== NOT EXECUTED
ffc11e24: 48 00 02 58 b ffc1207c <rtems_rfs_format+0xc24> <== NOT EXECUTED
{
printf ("rtems-rfs: format: superblock write failed\n");
return -1;
}
for (group = 0; group < fs.group_count; group++)
ffc11e28: 81 21 00 2c lwz r9,44(r1)
ffc11e2c: 8a dc 00 15 lbz r22,21(r28)
ffc11e30: 7f 9f 48 00 cmpw cr7,r31,r9
ffc11e34: 41 9c fc a0 blt+ cr7,ffc11ad4 <rtems_rfs_format+0x67c>
if (!rtems_rfs_write_group (&fs, group,
config->initialise_inodes, config->verbose))
return -1;
if (config->verbose)
ffc11e38: 72 c8 00 ff andi. r8,r22,255
ffc11e3c: 41 a2 00 0c beq+ ffc11e48 <rtems_rfs_format+0x9f0> <== ALWAYS TAKEN
printf ("\n");
ffc11e40: 38 60 00 0a li r3,10 <== NOT EXECUTED
ffc11e44: 48 01 1d d5 bl ffc23c18 <putchar> <== NOT EXECUTED
rc = rtems_rfs_buffer_close (&fs);
ffc11e48: 38 61 00 08 addi r3,r1,8
ffc11e4c: 48 00 b0 3d bl ffc1ce88 <rtems_rfs_buffer_close>
if (rc > 0)
ffc11e50: 7c 7f 1b 79 mr. r31,r3
ffc11e54: 40 a1 00 18 ble+ ffc11e6c <rtems_rfs_format+0xa14> <== ALWAYS TAKEN
{
printf ("rtems-rfs: format: buffer close failed: %d: %s\n",
ffc11e58: 48 01 2d 21 bl ffc24b78 <strerror> <== NOT EXECUTED
ffc11e5c: 7c 65 1b 78 mr r5,r3 <== NOT EXECUTED
ffc11e60: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc11e64: 38 63 4b 51 addi r3,r3,19281 <== NOT EXECUTED
ffc11e68: 48 00 02 04 b ffc1206c <rtems_rfs_format+0xc14> <== NOT EXECUTED
int rc;
/*
* External API so returns -1.
*/
rc = rtems_rfs_fs_open (name, NULL,
ffc11e6c: 7f 23 cb 78 mr r3,r25
ffc11e70: 38 80 00 00 li r4,0
ffc11e74: 38 a0 00 06 li r5,6
ffc11e78: 38 c0 00 00 li r6,0
ffc11e7c: 38 e1 00 dc addi r7,r1,220
ffc11e80: 48 00 d2 99 bl ffc1f118 <rtems_rfs_fs_open>
RTEMS_RFS_FS_FORCE_OPEN | RTEMS_RFS_FS_NO_LOCAL_CACHE,
0, &fs);
if (rc < 0)
ffc11e84: 2f 83 00 00 cmpwi cr7,r3,0
ffc11e88: 40 bc 00 34 bge+ cr7,ffc11ebc <rtems_rfs_format+0xa64> <== ALWAYS TAKEN
{
printf ("rtems-rfs: format: file system open failed: %d: %s\n",
errno, strerror (errno));
ffc11e8c: 48 01 01 5d bl ffc21fe8 <__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",
ffc11e90: 83 e3 00 00 lwz r31,0(r3) <== NOT EXECUTED
errno, strerror (errno));
ffc11e94: 48 01 01 55 bl ffc21fe8 <__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",
ffc11e98: 80 63 00 00 lwz r3,0(r3) <== NOT EXECUTED
ffc11e9c: 48 01 2c dd bl ffc24b78 <strerror> <== NOT EXECUTED
ffc11ea0: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED
ffc11ea4: 7c 65 1b 78 mr r5,r3 <== NOT EXECUTED
ffc11ea8: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc11eac: 38 63 4b 81 addi r3,r3,19329 <== NOT EXECUTED
ffc11eb0: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc11eb4: 48 01 1a d9 bl ffc2398c <printf> <== NOT EXECUTED
ffc11eb8: 48 00 01 bc b ffc12074 <rtems_rfs_format+0xc1c> <== NOT EXECUTED
errno, strerror (errno));
return -1;
}
rc = rtems_rfs_inode_alloc (fs, RTEMS_RFS_ROOT_INO, &ino);
ffc11ebc: 80 61 00 dc lwz r3,220(r1)
ffc11ec0: 38 80 00 01 li r4,1
ffc11ec4: 38 a1 00 d8 addi r5,r1,216
ffc11ec8: 48 00 08 fd bl ffc127c4 <rtems_rfs_inode_alloc>
if (rc > 0)
ffc11ecc: 7c 7f 1b 79 mr. r31,r3
ffc11ed0: 40 a1 00 24 ble+ ffc11ef4 <rtems_rfs_format+0xa9c> <== ALWAYS TAKEN
{
printf ("rtems-rfs: format: inode allocation failed: %d: %s\n",
ffc11ed4: 48 01 2c a5 bl ffc24b78 <strerror> <== NOT EXECUTED
ffc11ed8: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED
ffc11edc: 7c 65 1b 78 mr r5,r3 <== NOT EXECUTED
ffc11ee0: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc11ee4: 38 63 4b b5 addi r3,r3,19381 <== NOT EXECUTED
ffc11ee8: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc11eec: 48 01 1a a1 bl ffc2398c <printf> <== NOT EXECUTED
ffc11ef0: 48 00 00 20 b ffc11f10 <rtems_rfs_format+0xab8> <== NOT EXECUTED
rc, strerror (rc));
rtems_rfs_fs_close (fs);
return rc;
}
if (ino != RTEMS_RFS_ROOT_INO)
ffc11ef4: 80 81 00 d8 lwz r4,216(r1)
ffc11ef8: 2f 84 00 01 cmpwi cr7,r4,1
ffc11efc: 41 9e 00 20 beq- cr7,ffc11f1c <rtems_rfs_format+0xac4> <== ALWAYS TAKEN
{
printf ("rtems-rfs: format: allocated inode not root ino: %" PRId32 "\n", ino);
ffc11f00: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc11f04: 38 63 4b e9 addi r3,r3,19433 <== NOT EXECUTED
ffc11f08: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc11f0c: 48 01 1a 81 bl ffc2398c <printf> <== NOT EXECUTED
rtems_rfs_fs_close (fs);
ffc11f10: 80 61 00 dc lwz r3,220(r1) <== NOT EXECUTED
ffc11f14: 48 00 d9 99 bl ffc1f8ac <rtems_rfs_fs_close> <== NOT EXECUTED
ffc11f18: 48 00 01 38 b ffc12050 <rtems_rfs_format+0xbf8> <== NOT EXECUTED
return rc;
}
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
ffc11f1c: 80 61 00 dc lwz r3,220(r1)
ffc11f20: 38 80 00 01 li r4,1
ffc11f24: 38 a1 00 8c addi r5,r1,140
ffc11f28: 38 c0 00 01 li r6,1
ffc11f2c: 48 00 09 95 bl ffc128c0 <rtems_rfs_inode_open>
if (rc > 0)
ffc11f30: 7c 7f 1b 79 mr. r31,r3
ffc11f34: 40 81 00 34 ble- ffc11f68 <rtems_rfs_format+0xb10> <== ALWAYS TAKEN
{
printf ("rtems-rfs: format: inode open failed: %d: %s\n",
ffc11f38: 48 01 2c 41 bl ffc24b78 <strerror> <== NOT EXECUTED
ffc11f3c: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED
ffc11f40: 7c 65 1b 78 mr r5,r3 <== NOT EXECUTED
ffc11f44: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc11f48: 38 63 4c 1f addi r3,r3,19487 <== NOT EXECUTED
ffc11f4c: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc11f50: 48 01 1a 3d bl ffc2398c <printf> <== NOT EXECUTED
rc, strerror (rc));
rtems_rfs_group_bitmap_free (fs, true, ino);
ffc11f54: 80 61 00 dc lwz r3,220(r1) <== NOT EXECUTED
ffc11f58: 80 a1 00 d8 lwz r5,216(r1) <== NOT EXECUTED
ffc11f5c: 38 80 00 01 li r4,1 <== NOT EXECUTED
ffc11f60: 48 00 06 11 bl ffc12570 <rtems_rfs_group_bitmap_free> <== NOT EXECUTED
ffc11f64: 4b ff ff ac b ffc11f10 <rtems_rfs_format+0xab8> <== NOT EXECUTED
rtems_rfs_fs_close (fs);
return rc;
}
rc = rtems_rfs_inode_initialise (&inode, 0,
ffc11f68: 38 61 00 8c addi r3,r1,140
ffc11f6c: 38 80 00 00 li r4,0
ffc11f70: 38 a0 41 c9 li r5,16841
ffc11f74: 38 c0 00 00 li r6,0
ffc11f78: 38 e0 00 00 li r7,0
ffc11f7c: 48 00 0d 89 bl ffc12d04 <rtems_rfs_inode_initialise>
(RTEMS_RFS_S_IFDIR | RTEMS_RFS_S_IRWXU |
RTEMS_RFS_S_IXGRP | RTEMS_RFS_S_IXOTH),
0, 0);
if (rc > 0)
ffc11f80: 7c 7f 1b 79 mr. r31,r3
ffc11f84: 40 81 00 20 ble- ffc11fa4 <rtems_rfs_format+0xb4c> <== ALWAYS TAKEN
printf ("rtems-rfs: format: inode initialise failed: %d: %s\n",
ffc11f88: 48 01 2b f1 bl ffc24b78 <strerror> <== NOT EXECUTED
ffc11f8c: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED
ffc11f90: 7c 65 1b 78 mr r5,r3 <== NOT EXECUTED
ffc11f94: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc11f98: 38 63 4c 4d addi r3,r3,19533 <== NOT EXECUTED
ffc11f9c: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc11fa0: 48 01 19 ed bl ffc2398c <printf> <== NOT EXECUTED
rc, strerror (rc));
rc = rtems_rfs_dir_add_entry (fs, &inode, ".", 1, ino);
ffc11fa4: 80 61 00 dc lwz r3,220(r1)
ffc11fa8: 3c a0 ff c3 lis r5,-61
ffc11fac: 80 e1 00 d8 lwz r7,216(r1)
ffc11fb0: 38 81 00 8c addi r4,r1,140
ffc11fb4: 38 a5 2b 85 addi r5,r5,11141
ffc11fb8: 38 c0 00 01 li r6,1
ffc11fbc: 48 00 b4 dd bl ffc1d498 <rtems_rfs_dir_add_entry>
if (rc > 0)
ffc11fc0: 7c 7f 1b 79 mr. r31,r3
ffc11fc4: 40 81 00 20 ble- ffc11fe4 <rtems_rfs_format+0xb8c> <== ALWAYS TAKEN
printf ("rtems-rfs: format: directory add failed: %d: %s\n",
ffc11fc8: 48 01 2b b1 bl ffc24b78 <strerror> <== NOT EXECUTED
ffc11fcc: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED
ffc11fd0: 7c 65 1b 78 mr r5,r3 <== NOT EXECUTED
ffc11fd4: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc11fd8: 38 63 4c 81 addi r3,r3,19585 <== NOT EXECUTED
ffc11fdc: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc11fe0: 48 01 19 ad bl ffc2398c <printf> <== NOT EXECUTED
rc, strerror (rc));
rc = rtems_rfs_inode_close (fs, &inode);
ffc11fe4: 80 61 00 dc lwz r3,220(r1)
ffc11fe8: 38 81 00 8c addi r4,r1,140
ffc11fec: 48 00 0a c9 bl ffc12ab4 <rtems_rfs_inode_close>
if (rc > 0)
ffc11ff0: 7c 7f 1b 79 mr. r31,r3
ffc11ff4: 40 81 00 20 ble- ffc12014 <rtems_rfs_format+0xbbc> <== ALWAYS TAKEN
printf ("rtems-rfs: format: inode close failed: %d: %s\n",
ffc11ff8: 48 01 2b 81 bl ffc24b78 <strerror> <== NOT EXECUTED
ffc11ffc: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED
ffc12000: 7c 65 1b 78 mr r5,r3 <== NOT EXECUTED
ffc12004: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc12008: 38 63 4c b2 addi r3,r3,19634 <== NOT EXECUTED
ffc1200c: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc12010: 48 01 19 7d bl ffc2398c <printf> <== NOT EXECUTED
rc, strerror (rc));
rc = rtems_rfs_fs_close (fs);
ffc12014: 80 61 00 dc lwz r3,220(r1)
ffc12018: 48 00 d8 95 bl ffc1f8ac <rtems_rfs_fs_close>
if (rc < 0)
ffc1201c: 7c 7f 1b 79 mr. r31,r3
ffc12020: 40 a0 00 30 bge+ ffc12050 <rtems_rfs_format+0xbf8> <== ALWAYS TAKEN
printf ("rtems-rfs: format: file system close failed: %d: %s\n",
errno, strerror (errno));
ffc12024: 48 00 ff c5 bl ffc21fe8 <__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",
ffc12028: 83 c3 00 00 lwz r30,0(r3) <== NOT EXECUTED
errno, strerror (errno));
ffc1202c: 48 00 ff bd bl ffc21fe8 <__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",
ffc12030: 80 63 00 00 lwz r3,0(r3) <== NOT EXECUTED
ffc12034: 48 01 2b 45 bl ffc24b78 <strerror> <== NOT EXECUTED
ffc12038: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED
ffc1203c: 7c 65 1b 78 mr r5,r3 <== NOT EXECUTED
ffc12040: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc12044: 38 63 4c e1 addi r3,r3,19681 <== NOT EXECUTED
ffc12048: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1204c: 48 01 19 41 bl ffc2398c <printf> <== NOT EXECUTED
rc, strerror (rc));
return -1;
}
rc = rtems_rfs_write_root_dir (name);
if (rc > 0)
ffc12050: 2f 9f 00 00 cmpwi cr7,r31,0
ffc12054: 40 bd 00 20 ble+ cr7,ffc12074 <rtems_rfs_format+0xc1c> <== ALWAYS TAKEN
{
printf ("rtems-rfs: format: writing root dir failed: %d: %s\n",
ffc12058: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc1205c: 48 01 2b 1d bl ffc24b78 <strerror> <== NOT EXECUTED
ffc12060: 7c 65 1b 78 mr r5,r3 <== NOT EXECUTED
ffc12064: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc12068: 38 63 4d 16 addi r3,r3,19734 <== NOT EXECUTED
ffc1206c: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED
ffc12070: 4b ff fd ac b ffc11e1c <rtems_rfs_format+0x9c4> <== NOT EXECUTED
rc, strerror (rc));
return -1;
}
return 0;
ffc12074: 38 60 00 00 li r3,0
ffc12078: 48 00 00 20 b ffc12098 <rtems_rfs_format+0xc40>
/*
* Check the configuration data.
*/
if (!rtems_rfs_check_config (&fs, config))
return -1;
ffc1207c: 38 60 ff ff li r3,-1 <== NOT EXECUTED
ffc12080: 48 00 00 18 b ffc12098 <rtems_rfs_format+0xc40> <== 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;
ffc12084: 91 21 00 24 stw r9,36(r1)
* Check the configuration data.
*/
if (!rtems_rfs_check_config (&fs, config))
return -1;
if (config->verbose)
ffc12088: 89 3c 00 15 lbz r9,21(r28)
ffc1208c: 2f 89 00 00 cmpwi cr7,r9,0
ffc12090: 41 9e f7 c8 beq+ cr7,ffc11858 <rtems_rfs_format+0x400> <== ALWAYS TAKEN
ffc12094: 4b ff f6 60 b ffc116f4 <rtems_rfs_format+0x29c> <== NOT EXECUTED
rc, strerror (rc));
return -1;
}
return 0;
}
ffc12098: 39 61 01 30 addi r11,r1,304
ffc1209c: 4b fe f4 90 b ffc0152c <_restgpr_15_x>
ffc1f8ac <rtems_rfs_fs_close>:
int
rtems_rfs_fs_close (rtems_rfs_file_system* fs)
{
ffc1f8ac: 94 21 ff f0 stwu r1,-16(r1)
ffc1f8b0: 7c 08 02 a6 mflr r0
int group;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_CLOSE))
ffc1f8b4: 38 80 00 02 li r4,2
return 0;
}
int
rtems_rfs_fs_close (rtems_rfs_file_system* fs)
{
ffc1f8b8: bf c1 00 08 stmw r30,8(r1)
ffc1f8bc: 7c 7f 1b 78 mr r31,r3
int group;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_CLOSE))
ffc1f8c0: 38 60 00 00 li r3,0
return 0;
}
int
rtems_rfs_fs_close (rtems_rfs_file_system* fs)
{
ffc1f8c4: 90 01 00 14 stw r0,20(r1)
int group;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_CLOSE))
ffc1f8c8: 4b ff 4b 01 bl ffc143c8 <rtems_rfs_trace>
ffc1f8cc: 2f 83 00 00 cmpwi cr7,r3,0
ffc1f8d0: 41 be 00 10 beq+ cr7,ffc1f8e0 <rtems_rfs_fs_close+0x34> <== ALWAYS TAKEN
printf ("rtems-rfs: close\n");
ffc1f8d4: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1f8d8: 38 63 6f 8e addi r3,r3,28558 <== NOT EXECUTED
ffc1f8dc: 48 00 44 19 bl ffc23cf4 <puts> <== NOT EXECUTED
return 0;
}
int
rtems_rfs_fs_close (rtems_rfs_file_system* fs)
{
ffc1f8e0: 3b c0 00 00 li r30,0
ffc1f8e4: 48 00 00 1c b ffc1f900 <rtems_rfs_fs_close+0x54>
errno = 0;
return 0;
}
int
rtems_rfs_fs_close (rtems_rfs_file_system* fs)
ffc1f8e8: 1c 9e 00 50 mulli r4,r30,80
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]);
ffc1f8ec: 81 3f 00 20 lwz r9,32(r31)
ffc1f8f0: 7f e3 fb 78 mr r3,r31
ffc1f8f4: 7c 89 22 14 add r4,r9,r4
ffc1f8f8: 4b ff 29 c9 bl ffc122c0 <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++)
ffc1f8fc: 3b de 00 01 addi r30,r30,1
ffc1f900: 81 3f 00 24 lwz r9,36(r31)
ffc1f904: 7f 9e 48 00 cmpw cr7,r30,r9
ffc1f908: 41 9c ff e0 blt+ cr7,ffc1f8e8 <rtems_rfs_fs_close+0x3c>
rtems_rfs_group_close (fs, &fs->groups[group]);
rtems_rfs_buffer_close (fs);
ffc1f90c: 7f e3 fb 78 mr r3,r31
ffc1f910: 4b ff d5 79 bl ffc1ce88 <rtems_rfs_buffer_close>
free (fs);
ffc1f914: 7f e3 fb 78 mr r3,r31
ffc1f918: 4b fe 91 fd bl ffc08b14 <free>
return 0;
}
ffc1f91c: 39 61 00 10 addi r11,r1,16
ffc1f920: 38 60 00 00 li r3,0
ffc1f924: 4b fe 1c 44 b ffc01568 <_restgpr_30_x>
ffc1f118 <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)
{
ffc1f118: 94 21 ff a0 stwu r1,-96(r1)
ffc1f11c: 7c 08 02 a6 mflr r0
ffc1f120: bf 61 00 4c stmw r27,76(r1)
ffc1f124: 7c 7e 1b 78 mr r30,r3
ffc1f128: 7c 9f 23 78 mr r31,r4
#endif
rtems_rfs_inode_handle inode;
uint16_t mode;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
ffc1f12c: 38 60 00 00 li r3,0
rtems_rfs_fs_open (const char* name,
void* user,
uint32_t flags,
uint32_t max_held_buffers,
rtems_rfs_file_system** fs)
{
ffc1f130: 90 01 00 64 stw r0,100(r1)
#endif
rtems_rfs_inode_handle inode;
uint16_t mode;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
ffc1f134: 38 80 00 01 li r4,1
rtems_rfs_fs_open (const char* name,
void* user,
uint32_t flags,
uint32_t max_held_buffers,
rtems_rfs_file_system** fs)
{
ffc1f138: 7c bc 2b 78 mr r28,r5
ffc1f13c: 7c db 33 78 mr r27,r6
ffc1f140: 7c fd 3b 78 mr r29,r7
#endif
rtems_rfs_inode_handle inode;
uint16_t mode;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
ffc1f144: 4b ff 52 85 bl ffc143c8 <rtems_rfs_trace>
ffc1f148: 2f 83 00 00 cmpwi cr7,r3,0
ffc1f14c: 41 be 00 18 beq+ cr7,ffc1f164 <rtems_rfs_fs_open+0x4c> <== ALWAYS TAKEN
printf ("rtems-rfs: open: %s\n", name);
ffc1f150: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1f154: 38 63 6c 87 addi r3,r3,27783 <== NOT EXECUTED
ffc1f158: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED
ffc1f15c: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1f160: 48 00 48 2d bl ffc2398c <printf> <== NOT EXECUTED
*fs = malloc (sizeof (rtems_rfs_file_system));
ffc1f164: 38 60 00 84 li r3,132
ffc1f168: 4b fe a0 75 bl ffc091dc <malloc>
if (!*fs)
ffc1f16c: 2f 83 00 00 cmpwi cr7,r3,0
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: open: %s\n", name);
*fs = malloc (sizeof (rtems_rfs_file_system));
ffc1f170: 90 7d 00 00 stw r3,0(r29)
if (!*fs)
ffc1f174: 40 be 00 30 bne+ cr7,ffc1f1a4 <rtems_rfs_fs_open+0x8c> <== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
ffc1f178: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc1f17c: 38 80 00 01 li r4,1 <== NOT EXECUTED
ffc1f180: 4b ff 52 49 bl ffc143c8 <rtems_rfs_trace> <== NOT EXECUTED
ffc1f184: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc1f188: 41 be 00 10 beq+ cr7,ffc1f198 <rtems_rfs_fs_open+0x80> <== NOT EXECUTED
printf ("rtems-rfs: open: no memory for file system data\n");
ffc1f18c: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1f190: 38 63 6c 9c addi r3,r3,27804 <== NOT EXECUTED
ffc1f194: 48 00 4b 61 bl ffc23cf4 <puts> <== NOT EXECUTED
errno = ENOMEM;
ffc1f198: 48 00 2e 51 bl ffc21fe8 <__errno> <== NOT EXECUTED
ffc1f19c: 39 20 00 0c li r9,12 <== NOT EXECUTED
ffc1f1a0: 48 00 06 8c b ffc1f82c <rtems_rfs_fs_open+0x714> <== NOT EXECUTED
return -1;
}
memset (*fs, 0, sizeof (rtems_rfs_file_system));
ffc1f1a4: 38 80 00 00 li r4,0
ffc1f1a8: 38 a0 00 84 li r5,132
ffc1f1ac: 48 00 45 85 bl ffc23730 <memset>
(*fs)->user = user;
ffc1f1b0: 81 3d 00 00 lwz r9,0(r29)
#endif
/*
* Open the buffer interface.
*/
rc = rtems_rfs_buffer_open (name, *fs);
ffc1f1b4: 7f c3 f3 78 mr r3,r30
return -1;
}
memset (*fs, 0, sizeof (rtems_rfs_file_system));
(*fs)->user = user;
ffc1f1b8: 93 e9 00 80 stw r31,128(r9)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
ffc1f1bc: 3b e0 00 00 li r31,0
rtems_chain_initialize_empty (&(*fs)->buffers);
ffc1f1c0: 81 3d 00 00 lwz r9,0(r29)
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 );
ffc1f1c4: 39 49 00 44 addi r10,r9,68
head->next = tail;
head->previous = NULL;
ffc1f1c8: 93 e9 00 48 stw r31,72(r9)
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 );
ffc1f1cc: 39 09 00 48 addi r8,r9,72
head->next = tail;
ffc1f1d0: 91 09 00 44 stw r8,68(r9)
head->previous = NULL;
tail->previous = head;
ffc1f1d4: 91 49 00 4c stw r10,76(r9)
rtems_chain_initialize_empty (&(*fs)->release);
ffc1f1d8: 81 3d 00 00 lwz r9,0(r29)
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 );
ffc1f1dc: 39 49 00 54 addi r10,r9,84
head->next = tail;
head->previous = NULL;
ffc1f1e0: 93 e9 00 58 stw r31,88(r9)
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 );
ffc1f1e4: 39 09 00 58 addi r8,r9,88
head->next = tail;
ffc1f1e8: 91 09 00 54 stw r8,84(r9)
head->previous = NULL;
tail->previous = head;
ffc1f1ec: 91 49 00 5c stw r10,92(r9)
rtems_chain_initialize_empty (&(*fs)->release_modified);
ffc1f1f0: 81 3d 00 00 lwz r9,0(r29)
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 );
ffc1f1f4: 39 49 00 64 addi r10,r9,100
head->next = tail;
head->previous = NULL;
ffc1f1f8: 93 e9 00 68 stw r31,104(r9)
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 );
ffc1f1fc: 39 09 00 68 addi r8,r9,104
head->next = tail;
ffc1f200: 91 09 00 64 stw r8,100(r9)
head->previous = NULL;
tail->previous = head;
ffc1f204: 91 49 00 6c stw r10,108(r9)
rtems_chain_initialize_empty (&(*fs)->file_shares);
ffc1f208: 81 3d 00 00 lwz r9,0(r29)
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 );
ffc1f20c: 39 49 00 74 addi r10,r9,116
head->next = tail;
head->previous = NULL;
ffc1f210: 93 e9 00 78 stw r31,120(r9)
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 );
ffc1f214: 39 09 00 78 addi r8,r9,120
head->next = tail;
ffc1f218: 91 09 00 74 stw r8,116(r9)
head->previous = NULL;
tail->previous = head;
ffc1f21c: 91 49 00 7c stw r10,124(r9)
(*fs)->max_held_buffers = max_held_buffers;
ffc1f220: 80 9d 00 00 lwz r4,0(r29)
(*fs)->buffers_count = 0;
(*fs)->release_count = 0;
(*fs)->release_modified_count = 0;
(*fs)->flags = flags;
ffc1f224: 93 84 00 00 stw r28,0(r4)
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;
ffc1f228: 93 64 00 40 stw r27,64(r4)
(*fs)->buffers_count = 0;
ffc1f22c: 93 e4 00 50 stw r31,80(r4)
(*fs)->release_count = 0;
ffc1f230: 93 e4 00 60 stw r31,96(r4)
(*fs)->release_modified_count = 0;
ffc1f234: 93 e4 00 70 stw r31,112(r4)
#endif
/*
* Open the buffer interface.
*/
rc = rtems_rfs_buffer_open (name, *fs);
ffc1f238: 4b ff d8 a9 bl ffc1cae0 <rtems_rfs_buffer_open>
ffc1f23c: 83 dd 00 00 lwz r30,0(r29)
if (rc > 0)
ffc1f240: 7c 7c 1b 79 mr. r28,r3
ffc1f244: 40 a1 00 50 ble+ ffc1f294 <rtems_rfs_fs_open+0x17c> <== ALWAYS TAKEN
{
free (*fs);
ffc1f248: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc1f24c: 4b fe 98 c9 bl ffc08b14 <free> <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
ffc1f250: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc1f254: 38 80 00 01 li r4,1 <== NOT EXECUTED
ffc1f258: 4b ff 51 71 bl ffc143c8 <rtems_rfs_trace> <== NOT EXECUTED
ffc1f25c: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc1f260: 41 be 00 24 beq+ cr7,ffc1f284 <rtems_rfs_fs_open+0x16c> <== NOT EXECUTED
printf ("rtems-rfs: open: buffer open failed: %d: %s\n",
ffc1f264: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED
ffc1f268: 48 00 59 11 bl ffc24b78 <strerror> <== NOT EXECUTED
ffc1f26c: 7f 84 e3 78 mr r4,r28 <== NOT EXECUTED
ffc1f270: 7c 65 1b 78 mr r5,r3 <== NOT EXECUTED
ffc1f274: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1f278: 38 63 6c cc addi r3,r3,27852 <== NOT EXECUTED
ffc1f27c: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1f280: 48 00 47 0d bl ffc2398c <printf> <== NOT EXECUTED
rc, strerror (rc));
errno = rc;
ffc1f284: 48 00 2d 65 bl ffc21fe8 <__errno> <== NOT EXECUTED
ffc1f288: 93 83 00 00 stw r28,0(r3) <== NOT EXECUTED
return -1;
ffc1f28c: 38 60 ff ff li r3,-1 <== NOT EXECUTED
ffc1f290: 48 00 06 14 b ffc1f8a4 <rtems_rfs_fs_open+0x78c> <== NOT EXECUTED
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);
ffc1f294: 7f c3 f3 78 mr r3,r30
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
ffc1f298: 9b e1 00 30 stb r31,48(r1)
ffc1f29c: 38 81 00 30 addi r4,r1,48
ffc1f2a0: 38 a0 00 00 li r5,0
handle->bnum = 0;
ffc1f2a4: 93 e1 00 34 stw r31,52(r1)
ffc1f2a8: 38 c0 00 01 li r6,1
handle->buffer = NULL;
ffc1f2ac: 93 e1 00 38 stw r31,56(r1)
ffc1f2b0: 4b ff d5 8d bl ffc1c83c <rtems_rfs_buffer_handle_request>
if (rc > 0)
ffc1f2b4: 7c 7f 1b 79 mr. r31,r3
ffc1f2b8: 40 81 00 30 ble- ffc1f2e8 <rtems_rfs_fs_open+0x1d0> <== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
ffc1f2bc: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc1f2c0: 38 80 00 01 li r4,1 <== NOT EXECUTED
ffc1f2c4: 4b ff 51 05 bl ffc143c8 <rtems_rfs_trace> <== NOT EXECUTED
ffc1f2c8: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc1f2cc: 41 be 04 4c beq+ cr7,ffc1f718 <rtems_rfs_fs_open+0x600> <== NOT EXECUTED
printf ("rtems-rfs: read-superblock: request failed%d: %s\n",
ffc1f2d0: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc1f2d4: 48 00 58 a5 bl ffc24b78 <strerror> <== NOT EXECUTED
ffc1f2d8: 7c 65 1b 78 mr r5,r3 <== NOT EXECUTED
ffc1f2dc: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1f2e0: 38 63 6c f9 addi r3,r3,27897 <== NOT EXECUTED
ffc1f2e4: 48 00 03 34 b ffc1f618 <rtems_rfs_fs_open+0x500> <== NOT EXECUTED
rc, strerror (rc));
return rc;
}
sb = rtems_rfs_buffer_data (&handle);
ffc1f2e8: 81 21 00 38 lwz r9,56(r1)
ffc1f2ec: 83 e9 00 1c lwz r31,28(r9)
#define read_sb(_o) rtems_rfs_read_u32 (sb + (_o))
if (read_sb (RTEMS_RFS_SB_OFFSET_MAGIC) != RTEMS_RFS_SB_MAGIC)
ffc1f2f0: 89 5f 00 00 lbz r10,0(r31)
ffc1f2f4: 89 3f 00 01 lbz r9,1(r31)
ffc1f2f8: 55 4a c0 0e rlwinm r10,r10,24,0,7
ffc1f2fc: 55 29 80 1e rlwinm r9,r9,16,0,15
ffc1f300: 7d 4a 4b 78 or r10,r10,r9
ffc1f304: 89 3f 00 03 lbz r9,3(r31)
ffc1f308: 7d 4a 4b 78 or r10,r10,r9
ffc1f30c: 89 3f 00 02 lbz r9,2(r31)
ffc1f310: 55 29 40 2e rlwinm r9,r9,8,0,23
ffc1f314: 7d 4a 4b 78 or r10,r10,r9
ffc1f318: 6d 49 28 09 xoris r9,r10,10249
ffc1f31c: 2f 89 20 01 cmpwi cr7,r9,8193
ffc1f320: 41 9e 00 24 beq- cr7,ffc1f344 <rtems_rfs_fs_open+0x22c> <== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
ffc1f324: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc1f328: 38 80 00 01 li r4,1 <== NOT EXECUTED
ffc1f32c: 4b ff 50 9d bl ffc143c8 <rtems_rfs_trace> <== NOT EXECUTED
ffc1f330: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc1f334: 41 be 01 40 beq+ cr7,ffc1f474 <rtems_rfs_fs_open+0x35c> <== NOT EXECUTED
printf ("rtems-rfs: read-superblock: invalid superblock, bad magic\n");
ffc1f338: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1f33c: 38 63 6d 2b addi r3,r3,27947 <== NOT EXECUTED
ffc1f340: 48 00 00 ac b ffc1f3ec <rtems_rfs_fs_open+0x2d4> <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &handle);
return EIO;
}
fs->blocks = read_sb (RTEMS_RFS_SB_OFFSET_BLOCKS);
ffc1f344: 89 5f 00 0c lbz r10,12(r31)
ffc1f348: 89 3f 00 0d lbz r9,13(r31)
ffc1f34c: 55 4a c0 0e rlwinm r10,r10,24,0,7
ffc1f350: 55 29 80 1e rlwinm r9,r9,16,0,15
ffc1f354: 7d 4a 4b 78 or r10,r10,r9
ffc1f358: 89 3f 00 0f lbz r9,15(r31)
ffc1f35c: 7d 4a 4b 78 or r10,r10,r9
ffc1f360: 89 3f 00 0e lbz r9,14(r31)
ffc1f364: 55 29 40 2e rlwinm r9,r9,8,0,23
ffc1f368: 7d 4a 4b 78 or r10,r10,r9
ffc1f36c: 91 5e 00 04 stw r10,4(r30)
fs->block_size = read_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE);
ffc1f370: 88 ff 00 08 lbz r7,8(r31)
ffc1f374: 89 3f 00 09 lbz r9,9(r31)
ffc1f378: 54 e7 c0 0e rlwinm r7,r7,24,0,7
ffc1f37c: 55 29 80 1e rlwinm r9,r9,16,0,15
ffc1f380: 7c e7 4b 78 or r7,r7,r9
ffc1f384: 89 3f 00 0b lbz r9,11(r31)
ffc1f388: 7c e7 4b 78 or r7,r7,r9
ffc1f38c: 89 3f 00 0a lbz r9,10(r31)
ffc1f390: 55 29 40 2e rlwinm r9,r9,8,0,23
ffc1f394: 7c e7 4b 78 or r7,r7,r9
}
uint64_t
rtems_rfs_fs_media_size (rtems_rfs_file_system* fs)
{
uint64_t media_blocks = (uint64_t) rtems_rfs_fs_media_blocks (fs);
ffc1f398: 81 3e 00 10 lwz r9,16(r30)
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;
ffc1f39c: 7d 07 50 16 mulhwu r8,r7,r10
rtems_rfs_buffer_handle_close (fs, &handle);
return EIO;
}
fs->blocks = read_sb (RTEMS_RFS_SB_OFFSET_BLOCKS);
fs->block_size = read_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE);
ffc1f3a0: 90 fe 00 08 stw r7,8(r30)
}
uint64_t
rtems_rfs_fs_media_size (rtems_rfs_file_system* fs)
{
uint64_t media_blocks = (uint64_t) rtems_rfs_fs_media_blocks (fs);
ffc1f3a4: 80 c9 00 1c lwz r6,28(r9)
uint64_t media_block_size = (uint64_t) rtems_rfs_fs_media_block_size (fs);
ffc1f3a8: 80 a9 00 20 lwz r5,32(r9)
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;
ffc1f3ac: 7d 27 51 d6 mullw r9,r7,r10
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;
ffc1f3b0: 7d 45 30 16 mulhwu r10,r5,r6
ffc1f3b4: 7d 65 31 d6 mullw r11,r5,r6
}
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))
ffc1f3b8: 7f 88 50 40 cmplw cr7,r8,r10
ffc1f3bc: 41 9d 00 14 bgt- cr7,ffc1f3d0 <rtems_rfs_fs_open+0x2b8> <== NEVER TAKEN
ffc1f3c0: 7f 88 50 00 cmpw cr7,r8,r10
ffc1f3c4: 40 9e 00 30 bne- cr7,ffc1f3f4 <rtems_rfs_fs_open+0x2dc> <== NEVER TAKEN
ffc1f3c8: 7f 89 58 40 cmplw cr7,r9,r11
ffc1f3cc: 40 9d 00 28 ble- cr7,ffc1f3f4 <rtems_rfs_fs_open+0x2dc> <== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
ffc1f3d0: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc1f3d4: 38 80 00 01 li r4,1 <== NOT EXECUTED
ffc1f3d8: 4b ff 4f f1 bl ffc143c8 <rtems_rfs_trace> <== NOT EXECUTED
ffc1f3dc: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc1f3e0: 41 be 00 94 beq+ cr7,ffc1f474 <rtems_rfs_fs_open+0x35c> <== NOT EXECUTED
printf ("rtems-rfs: read-superblock: invalid superblock block/size count\n");
ffc1f3e4: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1f3e8: 38 63 6d 65 addi r3,r3,28005 <== NOT EXECUTED
ffc1f3ec: 48 00 49 09 bl ffc23cf4 <puts> <== NOT EXECUTED
ffc1f3f0: 48 00 00 84 b ffc1f474 <rtems_rfs_fs_open+0x35c> <== 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)
ffc1f3f4: 89 1f 00 24 lbz r8,36(r31)
ffc1f3f8: 89 3f 00 25 lbz r9,37(r31)
ffc1f3fc: 55 08 c0 0e rlwinm r8,r8,24,0,7
ffc1f400: 55 29 80 1e rlwinm r9,r9,16,0,15
ffc1f404: 7d 08 4b 78 or r8,r8,r9
ffc1f408: 89 3f 00 27 lbz r9,39(r31)
ffc1f40c: 7d 08 4b 78 or r8,r8,r9
ffc1f410: 89 3f 00 26 lbz r9,38(r31)
ffc1f414: 55 29 40 2e rlwinm r9,r9,8,0,23
ffc1f418: 7d 08 4b 78 or r8,r8,r9
ffc1f41c: 2f 88 00 38 cmpwi cr7,r8,56
ffc1f420: 41 9e 00 68 beq- cr7,ffc1f488 <rtems_rfs_fs_open+0x370> <== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
ffc1f424: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc1f428: 38 80 00 01 li r4,1 <== NOT EXECUTED
ffc1f42c: 4b ff 4f 9d bl ffc143c8 <rtems_rfs_trace> <== NOT EXECUTED
ffc1f430: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc1f434: 41 be 00 40 beq+ cr7,ffc1f474 <rtems_rfs_fs_open+0x35c> <== NOT EXECUTED
printf ("rtems-rfs: read-superblock: inode size mismatch: fs:%" PRId32 " target:%" PRId32 "\n",
read_sb (RTEMS_RFS_SB_OFFSET_VERSION), RTEMS_RFS_VERSION_MASK);
ffc1f438: 88 9f 00 04 lbz r4,4(r31) <== 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",
ffc1f43c: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
read_sb (RTEMS_RFS_SB_OFFSET_VERSION), RTEMS_RFS_VERSION_MASK);
ffc1f440: 89 3f 00 05 lbz r9,5(r31) <== 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",
ffc1f444: 38 63 6d a5 addi r3,r3,28069 <== NOT EXECUTED
read_sb (RTEMS_RFS_SB_OFFSET_VERSION), RTEMS_RFS_VERSION_MASK);
ffc1f448: 54 84 c0 0e rlwinm r4,r4,24,0,7 <== NOT EXECUTED
ffc1f44c: 55 29 80 1e rlwinm r9,r9,16,0,15 <== NOT EXECUTED
ffc1f450: 7c 84 4b 78 or r4,r4,r9 <== NOT EXECUTED
ffc1f454: 89 3f 00 07 lbz r9,7(r31) <== 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",
ffc1f458: 38 a0 00 00 li r5,0 <== NOT EXECUTED
read_sb (RTEMS_RFS_SB_OFFSET_VERSION), RTEMS_RFS_VERSION_MASK);
ffc1f45c: 7c 84 4b 78 or r4,r4,r9 <== NOT EXECUTED
ffc1f460: 89 3f 00 06 lbz r9,6(r31) <== NOT EXECUTED
ffc1f464: 55 29 40 2e rlwinm r9,r9,8,0,23 <== 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",
ffc1f468: 7c 84 4b 78 or r4,r4,r9 <== NOT EXECUTED
ffc1f46c: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1f470: 48 00 45 1d bl ffc2398c <printf> <== NOT EXECUTED
read_sb (RTEMS_RFS_SB_OFFSET_VERSION), RTEMS_RFS_VERSION_MASK);
rtems_rfs_buffer_handle_close (fs, &handle);
ffc1f474: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc1f478: 38 81 00 30 addi r4,r1,48 <== NOT EXECUTED
ffc1f47c: 4b ff fc 25 bl ffc1f0a0 <rtems_rfs_buffer_handle_close><== NOT EXECUTED
return EIO;
ffc1f480: 3b e0 00 05 li r31,5 <== NOT EXECUTED
ffc1f484: 48 00 02 9c b ffc1f720 <rtems_rfs_fs_open+0x608> <== NOT EXECUTED
}
fs->bad_blocks = read_sb (RTEMS_RFS_SB_OFFSET_BAD_BLOCKS);
ffc1f488: 89 5f 00 10 lbz r10,16(r31)
fs->block_map_doubly_blocks =
fs->blocks_per_block * fs->blocks_per_block * RTEMS_RFS_INODE_BLOCKS;
fs->inodes = fs->group_count * fs->group_inodes;
fs->inodes_per_block = fs->block_size / RTEMS_RFS_INODE_SIZE;
ffc1f48c: 7d 07 43 96 divwu r8,r7,r8
read_sb (RTEMS_RFS_SB_OFFSET_VERSION), RTEMS_RFS_VERSION_MASK);
rtems_rfs_buffer_handle_close (fs, &handle);
return EIO;
}
fs->bad_blocks = read_sb (RTEMS_RFS_SB_OFFSET_BAD_BLOCKS);
ffc1f490: 89 3f 00 11 lbz r9,17(r31)
ffc1f494: 55 4a c0 0e rlwinm r10,r10,24,0,7
ffc1f498: 55 29 80 1e rlwinm r9,r9,16,0,15
ffc1f49c: 7d 49 4b 78 or r9,r10,r9
ffc1f4a0: 89 5f 00 13 lbz r10,19(r31)
fs->inodes_per_block = fs->block_size / RTEMS_RFS_INODE_SIZE;
if (fs->group_blocks >
rtems_rfs_bitmap_numof_bits (rtems_rfs_fs_block_size (fs)))
{
rtems_rfs_buffer_handle_close (fs, &handle);
ffc1f4a4: 7f c3 f3 78 mr r3,r30
read_sb (RTEMS_RFS_SB_OFFSET_VERSION), RTEMS_RFS_VERSION_MASK);
rtems_rfs_buffer_handle_close (fs, &handle);
return EIO;
}
fs->bad_blocks = read_sb (RTEMS_RFS_SB_OFFSET_BAD_BLOCKS);
ffc1f4a8: 7d 29 53 78 or r9,r9,r10
ffc1f4ac: 89 5f 00 12 lbz r10,18(r31)
ffc1f4b0: 55 4a 40 2e rlwinm r10,r10,8,0,23
ffc1f4b4: 7d 29 53 78 or r9,r9,r10
ffc1f4b8: 91 3e 00 18 stw r9,24(r30)
fs->max_name_length = read_sb (RTEMS_RFS_SB_OFFSET_MAX_NAME_LENGTH);
ffc1f4bc: 89 5f 00 14 lbz r10,20(r31)
ffc1f4c0: 89 3f 00 15 lbz r9,21(r31)
ffc1f4c4: 55 4a c0 0e rlwinm r10,r10,24,0,7
ffc1f4c8: 55 29 80 1e rlwinm r9,r9,16,0,15
ffc1f4cc: 7d 49 4b 78 or r9,r10,r9
ffc1f4d0: 89 5f 00 17 lbz r10,23(r31)
ffc1f4d4: 7d 29 53 78 or r9,r9,r10
ffc1f4d8: 89 5f 00 16 lbz r10,22(r31)
ffc1f4dc: 55 4a 40 2e rlwinm r10,r10,8,0,23
ffc1f4e0: 7d 29 53 78 or r9,r9,r10
ffc1f4e4: 91 3e 00 1c stw r9,28(r30)
fs->group_count = read_sb (RTEMS_RFS_SB_OFFSET_GROUPS);
ffc1f4e8: 88 df 00 18 lbz r6,24(r31)
ffc1f4ec: 89 3f 00 19 lbz r9,25(r31)
ffc1f4f0: 54 c6 c0 0e rlwinm r6,r6,24,0,7
ffc1f4f4: 55 29 80 1e rlwinm r9,r9,16,0,15
ffc1f4f8: 7c c6 4b 78 or r6,r6,r9
ffc1f4fc: 89 3f 00 1b lbz r9,27(r31)
ffc1f500: 7c c6 4b 78 or r6,r6,r9
ffc1f504: 89 3f 00 1a lbz r9,26(r31)
ffc1f508: 55 29 40 2e rlwinm r9,r9,8,0,23
ffc1f50c: 7c c6 4b 78 or r6,r6,r9
ffc1f510: 90 de 00 24 stw r6,36(r30)
fs->group_blocks = read_sb (RTEMS_RFS_SB_OFFSET_GROUP_BLOCKS);
ffc1f514: 89 5f 00 1c lbz r10,28(r31)
ffc1f518: 89 3f 00 1d lbz r9,29(r31)
ffc1f51c: 55 4a c0 0e rlwinm r10,r10,24,0,7
ffc1f520: 55 29 80 1e rlwinm r9,r9,16,0,15
ffc1f524: 7d 4a 4b 78 or r10,r10,r9
ffc1f528: 89 3f 00 1f lbz r9,31(r31)
ffc1f52c: 7d 4a 4b 78 or r10,r10,r9
ffc1f530: 89 3f 00 1e lbz r9,30(r31)
ffc1f534: 55 29 40 2e rlwinm r9,r9,8,0,23
ffc1f538: 7d 4a 4b 78 or r10,r10,r9
ffc1f53c: 91 5e 00 28 stw r10,40(r30)
fs->group_inodes = read_sb (RTEMS_RFS_SB_OFFSET_GROUP_INODES);
ffc1f540: 88 bf 00 20 lbz r5,32(r31)
ffc1f544: 89 3f 00 21 lbz r9,33(r31)
ffc1f548: 54 a5 c0 0e rlwinm r5,r5,24,0,7
ffc1f54c: 55 29 80 1e rlwinm r9,r9,16,0,15
ffc1f550: 7c a5 4b 78 or r5,r5,r9
ffc1f554: 89 3f 00 23 lbz r9,35(r31)
ffc1f558: 7c a5 4b 78 or r5,r5,r9
ffc1f55c: 89 3f 00 22 lbz r9,34(r31)
fs->block_map_doubly_blocks =
fs->blocks_per_block * fs->blocks_per_block * RTEMS_RFS_INODE_BLOCKS;
fs->inodes = fs->group_count * fs->group_inodes;
fs->inodes_per_block = fs->block_size / RTEMS_RFS_INODE_SIZE;
ffc1f560: 91 1e 00 30 stw r8,48(r30)
fs->bad_blocks = read_sb (RTEMS_RFS_SB_OFFSET_BAD_BLOCKS);
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);
ffc1f564: 55 29 40 2e rlwinm r9,r9,8,0,23
ffc1f568: 7c a5 4b 78 or r5,r5,r9
fs->blocks_per_block =
rtems_rfs_fs_block_size (fs) / sizeof (rtems_rfs_inode_block);
ffc1f56c: 54 e9 f0 be rlwinm r9,r7,30,2,31
fs->bad_blocks = read_sb (RTEMS_RFS_SB_OFFSET_BAD_BLOCKS);
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);
ffc1f570: 90 be 00 2c stw r5,44(r30)
fs->inodes = fs->group_count * fs->group_inodes;
fs->inodes_per_block = fs->block_size / RTEMS_RFS_INODE_SIZE;
if (fs->group_blocks >
rtems_rfs_bitmap_numof_bits (rtems_rfs_fs_block_size (fs)))
ffc1f574: 54 e7 18 38 rlwinm r7,r7,3,0,28
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;
ffc1f578: 1c 89 00 05 mulli r4,r9,5
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 =
ffc1f57c: 91 3e 00 34 stw r9,52(r30)
fs->inodes = fs->group_count * fs->group_inodes;
fs->inodes_per_block = fs->block_size / RTEMS_RFS_INODE_SIZE;
if (fs->group_blocks >
ffc1f580: 7f 8a 38 40 cmplw cr7,r10,r7
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 =
ffc1f584: 90 9e 00 38 stw r4,56(r30)
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;
ffc1f588: 7d 29 49 d6 mullw r9,r9,r9
fs->inodes = fs->group_count * fs->group_inodes;
ffc1f58c: 7c c5 31 d6 mullw r6,r5,r6
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 =
fs->blocks_per_block * fs->blocks_per_block * RTEMS_RFS_INODE_BLOCKS;
ffc1f590: 1d 29 00 05 mulli r9,r9,5
fs->inodes = fs->group_count * fs->group_inodes;
ffc1f594: 90 de 00 14 stw r6,20(r30)
fs->inodes_per_block = fs->block_size / RTEMS_RFS_INODE_SIZE;
if (fs->group_blocks >
rtems_rfs_bitmap_numof_bits (rtems_rfs_fs_block_size (fs)))
{
rtems_rfs_buffer_handle_close (fs, &handle);
ffc1f598: 38 81 00 30 addi r4,r1,48
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 =
ffc1f59c: 91 3e 00 3c stw r9,60(r30)
fs->inodes = fs->group_count * fs->group_inodes;
fs->inodes_per_block = fs->block_size / RTEMS_RFS_INODE_SIZE;
if (fs->group_blocks >
ffc1f5a0: 40 9d 00 2c ble- cr7,ffc1f5cc <rtems_rfs_fs_open+0x4b4> <== ALWAYS TAKEN
rtems_rfs_bitmap_numof_bits (rtems_rfs_fs_block_size (fs)))
{
rtems_rfs_buffer_handle_close (fs, &handle);
ffc1f5a4: 4b ff fa fd bl ffc1f0a0 <rtems_rfs_buffer_handle_close><== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
ffc1f5a8: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc1f5ac: 38 80 00 01 li r4,1 <== NOT EXECUTED
ffc1f5b0: 4b ff 4e 19 bl ffc143c8 <rtems_rfs_trace> <== NOT EXECUTED
printf ("rtems-rfs: read-superblock: groups blocks larger than block bits\n");
return EIO;
ffc1f5b4: 3b e0 00 05 li r31,5 <== 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))
ffc1f5b8: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc1f5bc: 41 be 01 64 beq+ cr7,ffc1f720 <rtems_rfs_fs_open+0x608> <== NOT EXECUTED
printf ("rtems-rfs: read-superblock: groups blocks larger than block bits\n");
ffc1f5c0: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1f5c4: 38 63 6d e9 addi r3,r3,28137 <== NOT EXECUTED
ffc1f5c8: 48 00 00 a8 b ffc1f670 <rtems_rfs_fs_open+0x558> <== NOT EXECUTED
return EIO;
}
rtems_rfs_buffer_handle_close (fs, &handle);
ffc1f5cc: 4b ff fa d5 bl ffc1f0a0 <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));
ffc1f5d0: 80 9e 00 08 lwz r4,8(r30)
ffc1f5d4: 7f c3 f3 78 mr r3,r30
ffc1f5d8: 4b ff d7 b5 bl ffc1cd8c <rtems_rfs_buffer_setblksize>
if (rc > 0)
ffc1f5dc: 7c 7f 1b 79 mr. r31,r3
ffc1f5e0: 40 81 00 48 ble- ffc1f628 <rtems_rfs_fs_open+0x510> <== ALWAYS TAKEN
{
rtems_rfs_buffer_handle_close (fs, &handle);
ffc1f5e4: 38 81 00 30 addi r4,r1,48 <== NOT EXECUTED
ffc1f5e8: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc1f5ec: 4b ff fa b5 bl ffc1f0a0 <rtems_rfs_buffer_handle_close><== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
ffc1f5f0: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc1f5f4: 38 80 00 01 li r4,1 <== NOT EXECUTED
ffc1f5f8: 4b ff 4d d1 bl ffc143c8 <rtems_rfs_trace> <== NOT EXECUTED
ffc1f5fc: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc1f600: 41 be 01 18 beq+ cr7,ffc1f718 <rtems_rfs_fs_open+0x600> <== NOT EXECUTED
printf ("rtems-rfs: read-superblock: invalid superblock block size%d: %s\n",
ffc1f604: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc1f608: 48 00 55 71 bl ffc24b78 <strerror> <== NOT EXECUTED
ffc1f60c: 7c 65 1b 78 mr r5,r3 <== NOT EXECUTED
ffc1f610: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1f614: 38 63 6e 2a addi r3,r3,28202 <== NOT EXECUTED
ffc1f618: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED
ffc1f61c: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1f620: 48 00 43 6d bl ffc2398c <printf> <== NOT EXECUTED
ffc1f624: 48 00 00 f4 b ffc1f718 <rtems_rfs_fs_open+0x600> <== NOT EXECUTED
rc, strerror (rc));
return rc;
}
fs->groups = calloc (fs->group_count, sizeof (rtems_rfs_group));
ffc1f628: 80 7e 00 24 lwz r3,36(r30)
ffc1f62c: 38 80 00 50 li r4,80
if (!fs->groups)
ffc1f630: 3b 80 00 00 li r28,0
printf ("rtems-rfs: read-superblock: invalid superblock block size%d: %s\n",
rc, strerror (rc));
return rc;
}
fs->groups = calloc (fs->group_count, sizeof (rtems_rfs_group));
ffc1f634: 4b fe 93 39 bl ffc0896c <calloc>
if (!fs->groups)
ffc1f638: 2f 83 00 00 cmpwi cr7,r3,0
printf ("rtems-rfs: read-superblock: invalid superblock block size%d: %s\n",
rc, strerror (rc));
return rc;
}
fs->groups = calloc (fs->group_count, sizeof (rtems_rfs_group));
ffc1f63c: 90 7e 00 20 stw r3,32(r30)
if (!fs->groups)
ffc1f640: 40 be 00 c8 bne+ cr7,ffc1f708 <rtems_rfs_fs_open+0x5f0> <== ALWAYS TAKEN
{
rtems_rfs_buffer_handle_close (fs, &handle);
ffc1f644: 38 81 00 30 addi r4,r1,48 <== NOT EXECUTED
ffc1f648: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc1f64c: 4b ff fa 55 bl ffc1f0a0 <rtems_rfs_buffer_handle_close><== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
ffc1f650: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc1f654: 38 80 00 01 li r4,1 <== NOT EXECUTED
ffc1f658: 4b ff 4d 71 bl ffc143c8 <rtems_rfs_trace> <== NOT EXECUTED
printf ("rtems-rfs: read-superblock: no memory for group table\n");
return ENOMEM;
ffc1f65c: 3b e0 00 0c li r31,12 <== 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))
ffc1f660: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc1f664: 41 be 00 bc beq+ cr7,ffc1f720 <rtems_rfs_fs_open+0x608> <== NOT EXECUTED
printf ("rtems-rfs: read-superblock: no memory for group table\n");
ffc1f668: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1f66c: 38 63 6e 6b addi r3,r3,28267 <== NOT EXECUTED
ffc1f670: 48 00 46 85 bl ffc23cf4 <puts> <== NOT EXECUTED
ffc1f674: 48 00 00 ac b ffc1f720 <rtems_rfs_fs_open+0x608> <== 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),
ffc1f678: 80 be 00 28 lwz r5,40(r30)
return 0;
}
int
rtems_rfs_fs_open (const char* name,
ffc1f67c: 1c fc 00 50 mulli r7,r28,80
* 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,
ffc1f680: 81 3e 00 20 lwz r9,32(r30)
rtems_rfs_fs_block (fs, group, 0),
ffc1f684: 7c 9c 29 d6 mullw r4,r28,r5
* 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,
ffc1f688: 80 de 00 2c lwz r6,44(r30)
ffc1f68c: 7f c3 f3 78 mr r3,r30
ffc1f690: 38 84 00 01 addi r4,r4,1
ffc1f694: 7c e9 3a 14 add r7,r9,r7
ffc1f698: 4b ff 2a 09 bl ffc120a0 <rtems_rfs_group_open>
rtems_rfs_fs_block (fs, group, 0),
fs->group_blocks,
fs->group_inodes,
&fs->groups[group]);
if (rc > 0)
ffc1f69c: 7c 7f 1b 79 mr. r31,r3
ffc1f6a0: 40 a1 00 64 ble+ ffc1f704 <rtems_rfs_fs_open+0x5ec> <== ALWAYS TAKEN
ffc1f6a4: 3b 60 00 00 li r27,0 <== NOT EXECUTED
ffc1f6a8: 48 00 00 1c b ffc1f6c4 <rtems_rfs_fs_open+0x5ac> <== NOT EXECUTED
return 0;
}
int
rtems_rfs_fs_open (const char* name,
ffc1f6ac: 1c 9b 00 50 mulli r4,r27,80 <== NOT EXECUTED
&fs->groups[group]);
if (rc > 0)
{
int g;
for (g = 0; g < group; g++)
rtems_rfs_group_close (fs, &fs->groups[g]);
ffc1f6b0: 81 3e 00 20 lwz r9,32(r30) <== NOT EXECUTED
ffc1f6b4: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc1f6b8: 7c 89 22 14 add r4,r9,r4 <== NOT EXECUTED
ffc1f6bc: 4b ff 2c 05 bl ffc122c0 <rtems_rfs_group_close> <== NOT EXECUTED
fs->group_inodes,
&fs->groups[group]);
if (rc > 0)
{
int g;
for (g = 0; g < group; g++)
ffc1f6c0: 3b 7b 00 01 addi r27,r27,1 <== NOT EXECUTED
ffc1f6c4: 7f 9b e0 00 cmpw cr7,r27,r28 <== NOT EXECUTED
ffc1f6c8: 41 9c ff e4 blt+ cr7,ffc1f6ac <rtems_rfs_fs_open+0x594> <== NOT EXECUTED
rtems_rfs_group_close (fs, &fs->groups[g]);
rtems_rfs_buffer_handle_close (fs, &handle);
ffc1f6cc: 38 81 00 30 addi r4,r1,48 <== NOT EXECUTED
ffc1f6d0: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc1f6d4: 4b ff f9 cd bl ffc1f0a0 <rtems_rfs_buffer_handle_close><== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
ffc1f6d8: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc1f6dc: 38 80 00 01 li r4,1 <== NOT EXECUTED
ffc1f6e0: 4b ff 4c e9 bl ffc143c8 <rtems_rfs_trace> <== NOT EXECUTED
ffc1f6e4: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc1f6e8: 41 be 00 30 beq+ cr7,ffc1f718 <rtems_rfs_fs_open+0x600> <== NOT EXECUTED
printf ("rtems-rfs: read-superblock: no memory for group table%d: %s\n",
ffc1f6ec: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc1f6f0: 48 00 54 89 bl ffc24b78 <strerror> <== NOT EXECUTED
ffc1f6f4: 7c 65 1b 78 mr r5,r3 <== NOT EXECUTED
ffc1f6f8: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1f6fc: 38 63 6e a1 addi r3,r3,28321 <== NOT EXECUTED
ffc1f700: 4b ff ff 18 b ffc1f618 <rtems_rfs_fs_open+0x500> <== 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++)
ffc1f704: 3b 9c 00 01 addi r28,r28,1
ffc1f708: 81 3e 00 24 lwz r9,36(r30)
ffc1f70c: 7f 9c 48 00 cmpw cr7,r28,r9
ffc1f710: 41 9c ff 68 blt+ cr7,ffc1f678 <rtems_rfs_fs_open+0x560>
ffc1f714: 48 00 00 48 b ffc1f75c <rtems_rfs_fs_open+0x644>
errno = rc;
return -1;
}
rc = rtems_rfs_fs_read_superblock (*fs);
if (rc > 0)
ffc1f718: 2f 9f 00 00 cmpwi cr7,r31,0 <== NOT EXECUTED
ffc1f71c: 41 be 00 40 beq+ cr7,ffc1f75c <rtems_rfs_fs_open+0x644> <== NOT EXECUTED
{
rtems_rfs_buffer_close (*fs);
ffc1f720: 80 7d 00 00 lwz r3,0(r29) <== NOT EXECUTED
ffc1f724: 4b ff d7 65 bl ffc1ce88 <rtems_rfs_buffer_close> <== NOT EXECUTED
free (*fs);
ffc1f728: 80 7d 00 00 lwz r3,0(r29) <== NOT EXECUTED
ffc1f72c: 4b fe 93 e9 bl ffc08b14 <free> <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
ffc1f730: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc1f734: 38 80 00 01 li r4,1 <== NOT EXECUTED
ffc1f738: 4b ff 4c 91 bl ffc143c8 <rtems_rfs_trace> <== NOT EXECUTED
ffc1f73c: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc1f740: 41 be 01 48 beq+ cr7,ffc1f888 <rtems_rfs_fs_open+0x770> <== NOT EXECUTED
printf ("rtems-rfs: open: reading superblock: %d: %s\n",
ffc1f744: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc1f748: 48 00 54 31 bl ffc24b78 <strerror> <== NOT EXECUTED
ffc1f74c: 7c 65 1b 78 mr r5,r3 <== NOT EXECUTED
ffc1f750: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1f754: 38 63 6e de addi r3,r3,28382 <== NOT EXECUTED
ffc1f758: 48 00 01 24 b ffc1f87c <rtems_rfs_fs_open+0x764> <== NOT EXECUTED
rc, strerror (rc));
errno = rc;
return -1;
}
rc = rtems_rfs_inode_open (*fs, RTEMS_RFS_ROOT_INO, &inode, true);
ffc1f75c: 80 7d 00 00 lwz r3,0(r29)
ffc1f760: 38 80 00 01 li r4,1
ffc1f764: 38 a1 00 08 addi r5,r1,8
ffc1f768: 38 c0 00 01 li r6,1
ffc1f76c: 4b ff 31 55 bl ffc128c0 <rtems_rfs_inode_open>
if (rc > 0)
ffc1f770: 7c 7f 1b 79 mr. r31,r3
ffc1f774: 80 7d 00 00 lwz r3,0(r29)
ffc1f778: 40 a1 00 3c ble+ ffc1f7b4 <rtems_rfs_fs_open+0x69c> <== ALWAYS TAKEN
{
rtems_rfs_buffer_close (*fs);
ffc1f77c: 4b ff d7 0d bl ffc1ce88 <rtems_rfs_buffer_close> <== NOT EXECUTED
free (*fs);
ffc1f780: 80 7d 00 00 lwz r3,0(r29) <== NOT EXECUTED
ffc1f784: 4b fe 93 91 bl ffc08b14 <free> <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
ffc1f788: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc1f78c: 38 80 00 01 li r4,1 <== NOT EXECUTED
ffc1f790: 4b ff 4c 39 bl ffc143c8 <rtems_rfs_trace> <== NOT EXECUTED
ffc1f794: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc1f798: 41 be 00 f0 beq+ cr7,ffc1f888 <rtems_rfs_fs_open+0x770> <== NOT EXECUTED
printf ("rtems-rfs: open: reading root inode: %d: %s\n",
ffc1f79c: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc1f7a0: 48 00 53 d9 bl ffc24b78 <strerror> <== NOT EXECUTED
ffc1f7a4: 7c 65 1b 78 mr r5,r3 <== NOT EXECUTED
ffc1f7a8: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1f7ac: 38 63 6f 0b addi r3,r3,28427 <== NOT EXECUTED
ffc1f7b0: 48 00 00 cc b ffc1f87c <rtems_rfs_fs_open+0x764> <== NOT EXECUTED
rc, strerror (rc));
errno = rc;
return -1;
}
if (((*fs)->flags & RTEMS_RFS_FS_FORCE_OPEN) == 0)
ffc1f7b4: 81 23 00 00 lwz r9,0(r3)
ffc1f7b8: 71 2a 00 04 andi. r10,r9,4
ffc1f7bc: 40 82 00 78 bne- ffc1f834 <rtems_rfs_fs_open+0x71c>
{
mode = rtems_rfs_inode_get_mode (&inode);
ffc1f7c0: 81 21 00 14 lwz r9,20(r1)
* @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);
ffc1f7c4: 89 09 00 02 lbz r8,2(r9)
ffc1f7c8: 89 49 00 03 lbz r10,3(r9)
ffc1f7cc: 55 08 40 2e rlwinm r8,r8,8,0,23
ffc1f7d0: 7d 09 53 78 or r9,r8,r10
if ((mode == 0xffff) || !RTEMS_RFS_S_ISDIR (mode))
ffc1f7d4: 6d 2a ff ff xoris r10,r9,65535
ffc1f7d8: 2f 8a ff ff cmpwi cr7,r10,-1
ffc1f7dc: 41 9e 00 10 beq- cr7,ffc1f7ec <rtems_rfs_fs_open+0x6d4> <== NEVER TAKEN
ffc1f7e0: 55 29 04 26 rlwinm r9,r9,0,16,19
ffc1f7e4: 2f 89 40 00 cmpwi cr7,r9,16384
ffc1f7e8: 41 be 00 4c beq+ cr7,ffc1f834 <rtems_rfs_fs_open+0x71c> <== ALWAYS TAKEN
{
rtems_rfs_inode_close (*fs, &inode);
ffc1f7ec: 38 81 00 08 addi r4,r1,8 <== NOT EXECUTED
ffc1f7f0: 4b ff 32 c5 bl ffc12ab4 <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_buffer_close (*fs);
ffc1f7f4: 80 7d 00 00 lwz r3,0(r29) <== NOT EXECUTED
ffc1f7f8: 4b ff d6 91 bl ffc1ce88 <rtems_rfs_buffer_close> <== NOT EXECUTED
free (*fs);
ffc1f7fc: 80 7d 00 00 lwz r3,0(r29) <== NOT EXECUTED
ffc1f800: 4b fe 93 15 bl ffc08b14 <free> <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
ffc1f804: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc1f808: 38 80 00 01 li r4,1 <== NOT EXECUTED
ffc1f80c: 4b ff 4b bd bl ffc143c8 <rtems_rfs_trace> <== NOT EXECUTED
ffc1f810: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc1f814: 41 be 00 10 beq+ cr7,ffc1f824 <rtems_rfs_fs_open+0x70c> <== NOT EXECUTED
printf ("rtems-rfs: open: invalid root inode mode\n");
ffc1f818: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1f81c: 38 63 6f 38 addi r3,r3,28472 <== NOT EXECUTED
ffc1f820: 48 00 44 d5 bl ffc23cf4 <puts> <== NOT EXECUTED
errno = EIO;
ffc1f824: 48 00 27 c5 bl ffc21fe8 <__errno> <== NOT EXECUTED
ffc1f828: 39 20 00 05 li r9,5 <== NOT EXECUTED
ffc1f82c: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED
ffc1f830: 4b ff fa 5c b ffc1f28c <rtems_rfs_fs_open+0x174> <== NOT EXECUTED
return -1;
}
}
rc = rtems_rfs_inode_close (*fs, &inode);
ffc1f834: 38 81 00 08 addi r4,r1,8
ffc1f838: 4b ff 32 7d bl ffc12ab4 <rtems_rfs_inode_close>
if (rc > 0)
ffc1f83c: 7c 7f 1b 79 mr. r31,r3
ffc1f840: 40 a1 00 54 ble+ ffc1f894 <rtems_rfs_fs_open+0x77c> <== ALWAYS TAKEN
{
rtems_rfs_buffer_close (*fs);
ffc1f844: 80 7d 00 00 lwz r3,0(r29) <== NOT EXECUTED
ffc1f848: 4b ff d6 41 bl ffc1ce88 <rtems_rfs_buffer_close> <== NOT EXECUTED
free (*fs);
ffc1f84c: 80 7d 00 00 lwz r3,0(r29) <== NOT EXECUTED
ffc1f850: 4b fe 92 c5 bl ffc08b14 <free> <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
ffc1f854: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc1f858: 38 80 00 01 li r4,1 <== NOT EXECUTED
ffc1f85c: 4b ff 4b 6d bl ffc143c8 <rtems_rfs_trace> <== NOT EXECUTED
ffc1f860: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc1f864: 41 be 00 24 beq+ cr7,ffc1f888 <rtems_rfs_fs_open+0x770> <== NOT EXECUTED
printf ("rtems-rfs: open: closing root inode: %d: %s\n", rc, strerror (rc));
ffc1f868: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc1f86c: 48 00 53 0d bl ffc24b78 <strerror> <== NOT EXECUTED
ffc1f870: 7c 65 1b 78 mr r5,r3 <== NOT EXECUTED
ffc1f874: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1f878: 38 63 6f 61 addi r3,r3,28513 <== NOT EXECUTED
ffc1f87c: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED
ffc1f880: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1f884: 48 00 41 09 bl ffc2398c <printf> <== NOT EXECUTED
errno = rc;
ffc1f888: 48 00 27 61 bl ffc21fe8 <__errno> <== NOT EXECUTED
ffc1f88c: 93 e3 00 00 stw r31,0(r3) <== NOT EXECUTED
ffc1f890: 4b ff f9 fc b ffc1f28c <rtems_rfs_fs_open+0x174> <== NOT EXECUTED
return -1;
}
errno = 0;
ffc1f894: 48 00 27 55 bl ffc21fe8 <__errno>
ffc1f898: 39 20 00 00 li r9,0
ffc1f89c: 91 23 00 00 stw r9,0(r3)
return 0;
ffc1f8a0: 38 60 00 00 li r3,0
}
ffc1f8a4: 39 61 00 60 addi r11,r1,96
ffc1f8a8: 4b fe 1c b4 b ffc0155c <_restgpr_27_x>
ffc1f0dc <rtems_rfs_fs_size>:
#include <rtems/rfs/rtems-rfs-trace.h>
uint64_t
rtems_rfs_fs_size (rtems_rfs_file_system* fs)
{
uint64_t blocks = rtems_rfs_fs_blocks (fs);
ffc1f0dc: 81 23 00 04 lwz r9,4(r3) <== NOT EXECUTED
uint64_t block_size = rtems_rfs_fs_block_size (fs);
ffc1f0e0: 81 03 00 08 lwz r8,8(r3) <== NOT EXECUTED
return blocks * block_size;
ffc1f0e4: 7d 48 48 16 mulhwu r10,r8,r9 <== NOT EXECUTED
ffc1f0e8: 7d 68 49 d6 mullw r11,r8,r9 <== NOT EXECUTED
}
ffc1f0ec: 7d 43 53 78 mr r3,r10 <== NOT EXECUTED
ffc1f0f0: 7d 64 5b 78 mr r4,r11 <== NOT EXECUTED
ffc1f0f4: 4e 80 00 20 blr <== NOT EXECUTED
ffc12374 <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)
{
ffc12374: 94 21 ff b8 stwu r1,-72(r1)
ffc12378: 7d 80 00 26 mfcr r12
ffc1237c: 7c 08 02 a6 mflr r0
ffc12380: be a1 00 1c stmw r21,28(r1)
rtems_rfs_bitmap_bit bit;
int offset;
bool updown;
int direction;
if (inode)
ffc12384: 7c ba 2b 79 mr. r26,r5
int
rtems_rfs_group_bitmap_alloc (rtems_rfs_file_system* fs,
rtems_rfs_bitmap_bit goal,
bool inode,
rtems_rfs_bitmap_bit* result)
{
ffc12388: 7c 7e 1b 78 mr r30,r3
ffc1238c: 90 01 00 4c stw r0,76(r1)
ffc12390: 7c d9 33 78 mr r25,r6
ffc12394: 91 81 00 18 stw r12,24(r1)
rtems_rfs_bitmap_bit bit;
int offset;
bool updown;
int direction;
if (inode)
ffc12398: 41 82 00 10 beq- ffc123a8 <rtems_rfs_group_bitmap_alloc+0x34>
{
size = fs->group_inodes;
ffc1239c: 83 63 00 2c lwz r27,44(r3)
goal -= RTEMS_RFS_ROOT_INO;
ffc123a0: 38 84 ff ff addi r4,r4,-1
ffc123a4: 48 00 00 08 b ffc123ac <rtems_rfs_group_bitmap_alloc+0x38>
}
else
size = fs->group_blocks;
ffc123a8: 83 63 00 28 lwz r27,40(r3)
group_start = goal / size;
ffc123ac: 7e c4 db 96 divwu r22,r4,r27
bit = (rtems_rfs_bitmap_bit) (goal % size);
ffc123b0: 7d 36 d9 d6 mullw r9,r22,r27
direction = direction > 0 ? -1 : 1;
updown = false;
continue;
}
if (inode)
ffc123b4: 2e 1a 00 00 cmpwi cr4,r26,0
}
else
size = fs->group_blocks;
group_start = goal / size;
bit = (rtems_rfs_bitmap_bit) (goal % size);
ffc123b8: 7c 89 20 50 subf r4,r9,r4
ffc123bc: 90 81 00 08 stw r4,8(r1)
offset = 0;
updown = true;
direction = 1;
ffc123c0: 3b e0 00 01 li r31,1
size = fs->group_blocks;
group_start = goal / size;
bit = (rtems_rfs_bitmap_bit) (goal % size);
offset = 0;
updown = true;
ffc123c4: 3b 00 00 01 li r24,1
else
size = fs->group_blocks;
group_start = goal / size;
bit = (rtems_rfs_bitmap_bit) (goal % size);
offset = 0;
ffc123c8: 3b 80 00 00 li r28,0
*/
while (true)
{
rtems_rfs_bitmap_control* bitmap;
int group;
bool allocated = false;
ffc123cc: 3a a0 00 00 li r21,0
/*
* 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);
if (offset)
ffc123d0: 2f 9c 00 00 cmpwi cr7,r28,0
*/
while (true)
{
rtems_rfs_bitmap_control* bitmap;
int group;
bool allocated = false;
ffc123d4: 9a a1 00 0c stb r21,12(r1)
/*
* 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);
ffc123d8: 7f bf e1 d6 mullw r29,r31,r28
ffc123dc: 7f b6 ea 14 add r29,r22,r29
if (offset)
ffc123e0: 41 9e 00 18 beq- cr7,ffc123f8 <rtems_rfs_group_bitmap_alloc+0x84>
bit = direction > 0 ? 0 : size - 1;
ffc123e4: 2f 9f 00 00 cmpwi cr7,r31,0
ffc123e8: 39 20 00 00 li r9,0
ffc123ec: 41 bd 00 08 bgt+ cr7,ffc123f4 <rtems_rfs_group_bitmap_alloc+0x80>
ffc123f0: 39 3b ff ff addi r9,r27,-1
ffc123f4: 91 21 00 08 stw r9,8(r1)
/*
* 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))
ffc123f8: 2f 9d 00 00 cmpwi cr7,r29,0
ffc123fc: 41 9c 00 10 blt- cr7,ffc1240c <rtems_rfs_group_bitmap_alloc+0x98>
ffc12400: 81 3e 00 24 lwz r9,36(r30)
ffc12404: 7f 9d 48 00 cmpw cr7,r29,r9
ffc12408: 41 9c 00 28 blt- cr7,ffc12430 <rtems_rfs_group_bitmap_alloc+0xbc>
{
if (!updown)
ffc1240c: 2f 98 00 00 cmpwi cr7,r24,0
ffc12410: 41 9e 01 24 beq- cr7,ffc12534 <rtems_rfs_group_bitmap_alloc+0x1c0>
break;
direction = direction > 0 ? -1 : 1;
ffc12414: 2f 9f 00 00 cmpwi cr7,r31,0
ffc12418: 40 9d 00 0c ble- cr7,ffc12424 <rtems_rfs_group_bitmap_alloc+0xb0><== ALWAYS TAKEN
ffc1241c: 3b e0 ff ff li r31,-1 <== NOT EXECUTED
ffc12420: 48 00 00 08 b ffc12428 <rtems_rfs_group_bitmap_alloc+0xb4><== NOT EXECUTED
ffc12424: 3b e0 00 01 li r31,1
updown = false;
ffc12428: 3b 00 00 00 li r24,0
ffc1242c: 4b ff ff a4 b ffc123d0 <rtems_rfs_group_bitmap_alloc+0x5c>
ffc12430: 1d 3d 00 50 mulli r9,r29,80
ffc12434: 82 fe 00 20 lwz r23,32(r30)
continue;
}
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
ffc12438: 7e f7 4a 14 add r23,r23,r9
direction = direction > 0 ? -1 : 1;
updown = false;
continue;
}
if (inode)
ffc1243c: 41 92 00 0c beq- cr4,ffc12448 <rtems_rfs_group_bitmap_alloc+0xd4>
bitmap = &fs->groups[group].inode_bitmap;
ffc12440: 3a f7 00 2c addi r23,r23,44
ffc12444: 48 00 00 08 b ffc1244c <rtems_rfs_group_bitmap_alloc+0xd8>
else
bitmap = &fs->groups[group].block_bitmap;
ffc12448: 3a f7 00 08 addi r23,r23,8
rc = rtems_rfs_bitmap_map_alloc (bitmap, bit, &allocated, &bit);
ffc1244c: 80 81 00 08 lwz r4,8(r1)
ffc12450: 7e e3 bb 78 mr r3,r23
ffc12454: 38 a1 00 0c addi r5,r1,12
ffc12458: 38 c1 00 08 addi r6,r1,8
ffc1245c: 48 00 8d 09 bl ffc1b164 <rtems_rfs_bitmap_map_alloc>
if (rc > 0)
ffc12460: 7c 69 1b 79 mr. r9,r3
ffc12464: 41 81 00 f8 bgt- ffc1255c <rtems_rfs_group_bitmap_alloc+0x1e8><== NEVER TAKEN
return rc;
if (rtems_rfs_fs_release_bitmaps (fs))
ffc12468: 81 3e 00 00 lwz r9,0(r30)
ffc1246c: 71 2a 00 01 andi. r10,r9,1
ffc12470: 40 a2 00 10 bne+ ffc12480 <rtems_rfs_group_bitmap_alloc+0x10c><== NEVER TAKEN
rtems_rfs_bitmap_release_buffer (fs, bitmap);
ffc12474: 80 97 00 00 lwz r4,0(r23)
ffc12478: 7f c3 f3 78 mr r3,r30
ffc1247c: 48 00 a1 dd bl ffc1c658 <rtems_rfs_buffer_handle_release>
if (allocated)
ffc12480: 89 21 00 0c lbz r9,12(r1)
ffc12484: 2f 89 00 00 cmpwi cr7,r9,0
ffc12488: 41 be 00 88 beq+ cr7,ffc12510 <rtems_rfs_group_bitmap_alloc+0x19c>
{
if (inode)
ffc1248c: 2f 9a 00 00 cmpwi cr7,r26,0
ffc12490: 81 21 00 08 lwz r9,8(r1)
ffc12494: 41 9e 00 18 beq- cr7,ffc124ac <rtems_rfs_group_bitmap_alloc+0x138>
*result = rtems_rfs_group_inode (fs, group, bit);
ffc12498: 81 5e 00 2c lwz r10,44(r30)
ffc1249c: 39 29 00 01 addi r9,r9,1
ffc124a0: 7f bd 51 d6 mullw r29,r29,r10
ffc124a4: 7d 29 ea 14 add r9,r9,r29
ffc124a8: 48 00 00 14 b ffc124bc <rtems_rfs_group_bitmap_alloc+0x148>
else
*result = rtems_rfs_group_block (&fs->groups[group], bit);
ffc124ac: 81 5e 00 20 lwz r10,32(r30)
ffc124b0: 1f bd 00 50 mulli r29,r29,80
ffc124b4: 7d 4a e8 2e lwzx r10,r10,r29
ffc124b8: 7d 29 52 14 add r9,r9,r10
ffc124bc: 91 39 00 00 stw r9,0(r25)
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_BITMAPS))
ffc124c0: 38 60 00 00 li r3,0
ffc124c4: 3c 80 00 02 lis r4,2
ffc124c8: 48 00 1f 01 bl ffc143c8 <rtems_rfs_trace>
printf ("rtems-rfs: group-bitmap-alloc: %s allocated: %" PRId32 "\n",
inode ? "inode" : "block", *result);
return 0;
ffc124cc: 39 20 00 00 li r9,0
{
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))
ffc124d0: 2f 83 00 00 cmpwi cr7,r3,0
ffc124d4: 41 9e 00 88 beq- cr7,ffc1255c <rtems_rfs_group_bitmap_alloc+0x1e8><== ALWAYS TAKEN
printf ("rtems-rfs: group-bitmap-alloc: %s allocated: %" PRId32 "\n",
ffc124d8: 2f 9a 00 00 cmpwi cr7,r26,0 <== NOT EXECUTED
ffc124dc: 41 9e 00 10 beq- cr7,ffc124ec <rtems_rfs_group_bitmap_alloc+0x178><== NOT EXECUTED
ffc124e0: 3c 80 ff c3 lis r4,-61 <== NOT EXECUTED
ffc124e4: 38 84 4e 5b addi r4,r4,20059 <== NOT EXECUTED
ffc124e8: 48 00 00 0c b ffc124f4 <rtems_rfs_group_bitmap_alloc+0x180><== NOT EXECUTED
ffc124ec: 3c 80 ff c3 lis r4,-61 <== NOT EXECUTED
ffc124f0: 38 84 45 c0 addi r4,r4,17856 <== NOT EXECUTED
ffc124f4: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc124f8: 80 b9 00 00 lwz r5,0(r25) <== NOT EXECUTED
ffc124fc: 38 63 4e 61 addi r3,r3,20065 <== NOT EXECUTED
ffc12500: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc12504: 48 01 14 89 bl ffc2398c <printf> <== NOT EXECUTED
inode ? "inode" : "block", *result);
return 0;
ffc12508: 39 20 00 00 li r9,0 <== NOT EXECUTED
ffc1250c: 48 00 00 50 b ffc1255c <rtems_rfs_group_bitmap_alloc+0x1e8><== NOT EXECUTED
}
if (updown)
ffc12510: 2f 98 00 00 cmpwi cr7,r24,0
ffc12514: 41 9e 00 18 beq- cr7,ffc1252c <rtems_rfs_group_bitmap_alloc+0x1b8><== NEVER TAKEN
direction = direction > 0 ? -1 : 1;
ffc12518: 2f 9f 00 00 cmpwi cr7,r31,0
ffc1251c: 40 9d 00 0c ble- cr7,ffc12528 <rtems_rfs_group_bitmap_alloc+0x1b4><== NEVER TAKEN
ffc12520: 3b e0 ff ff li r31,-1
ffc12524: 48 00 00 08 b ffc1252c <rtems_rfs_group_bitmap_alloc+0x1b8>
ffc12528: 3b e0 00 01 li r31,1 <== NOT EXECUTED
offset++;
ffc1252c: 3b 9c 00 01 addi r28,r28,1
ffc12530: 4b ff fe a0 b ffc123d0 <rtems_rfs_group_bitmap_alloc+0x5c>
}
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_BITMAPS))
ffc12534: 38 60 00 00 li r3,0
ffc12538: 3c 80 00 02 lis r4,2
ffc1253c: 48 00 1e 8d bl ffc143c8 <rtems_rfs_trace>
ffc12540: 2f 83 00 00 cmpwi cr7,r3,0
ffc12544: 40 9e 00 08 bne- cr7,ffc1254c <rtems_rfs_group_bitmap_alloc+0x1d8><== NEVER TAKEN
ffc12548: 48 00 00 10 b ffc12558 <rtems_rfs_group_bitmap_alloc+0x1e4>
printf ("rtems-rfs: group-bitmap-alloc: no blocks available\n");
ffc1254c: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc12550: 38 63 4e 93 addi r3,r3,20115 <== NOT EXECUTED
ffc12554: 48 01 17 a1 bl ffc23cf4 <puts> <== NOT EXECUTED
return ENOSPC;
ffc12558: 39 20 00 1c li r9,28
}
ffc1255c: 81 81 00 18 lwz r12,24(r1)
ffc12560: 39 61 00 48 addi r11,r1,72
ffc12564: 7d 23 4b 78 mr r3,r9
ffc12568: 7d 80 81 20 mtcrf 8,r12
ffc1256c: 4b fe ef d8 b ffc01544 <_restgpr_21_x>
ffc12570 <rtems_rfs_group_bitmap_free>:
int
rtems_rfs_group_bitmap_free (rtems_rfs_file_system* fs,
bool inode,
rtems_rfs_bitmap_bit no)
{
ffc12570: 94 21 ff e8 stwu r1,-24(r1)
ffc12574: 7c 08 02 a6 mflr r0
ffc12578: bf a1 00 0c stmw r29,12(r1)
ffc1257c: 7c 7f 1b 78 mr r31,r3
ffc12580: 7c 9e 23 78 mr r30,r4
unsigned int group;
rtems_rfs_bitmap_bit bit;
size_t size;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_BITMAPS))
ffc12584: 38 60 00 00 li r3,0
int
rtems_rfs_group_bitmap_free (rtems_rfs_file_system* fs,
bool inode,
rtems_rfs_bitmap_bit no)
{
ffc12588: 90 01 00 1c stw r0,28(r1)
unsigned int group;
rtems_rfs_bitmap_bit bit;
size_t size;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_BITMAPS))
ffc1258c: 3c 80 00 02 lis r4,2
int
rtems_rfs_group_bitmap_free (rtems_rfs_file_system* fs,
bool inode,
rtems_rfs_bitmap_bit no)
{
ffc12590: 7c bd 2b 78 mr r29,r5
unsigned int group;
rtems_rfs_bitmap_bit bit;
size_t size;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_BITMAPS))
ffc12594: 48 00 1e 35 bl ffc143c8 <rtems_rfs_trace>
ffc12598: 2f 83 00 00 cmpwi cr7,r3,0
ffc1259c: 41 9e 00 34 beq- cr7,ffc125d0 <rtems_rfs_group_bitmap_free+0x60><== ALWAYS TAKEN
printf ("rtems-rfs: group-bitmap-free: %s free: %" PRId32 "\n",
ffc125a0: 2f 9e 00 00 cmpwi cr7,r30,0 <== NOT EXECUTED
ffc125a4: 41 9e 00 10 beq- cr7,ffc125b4 <rtems_rfs_group_bitmap_free+0x44><== NOT EXECUTED
ffc125a8: 3c 80 ff c3 lis r4,-61 <== NOT EXECUTED
ffc125ac: 38 84 4e 5b addi r4,r4,20059 <== NOT EXECUTED
ffc125b0: 48 00 00 0c b ffc125bc <rtems_rfs_group_bitmap_free+0x4c><== NOT EXECUTED
ffc125b4: 3c 80 ff c3 lis r4,-61 <== NOT EXECUTED
ffc125b8: 38 84 45 c0 addi r4,r4,17856 <== NOT EXECUTED
ffc125bc: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc125c0: 38 63 4e c6 addi r3,r3,20166 <== NOT EXECUTED
ffc125c4: 7f a5 eb 78 mr r5,r29 <== NOT EXECUTED
ffc125c8: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc125cc: 48 01 13 c1 bl ffc2398c <printf> <== NOT EXECUTED
inode ? "inode" : "block", no);
if (inode)
ffc125d0: 2f 9e 00 00 cmpwi cr7,r30,0
ffc125d4: 3b bd ff ff addi r29,r29,-1
ffc125d8: 41 9e 00 0c beq- cr7,ffc125e4 <rtems_rfs_group_bitmap_free+0x74>
{
no -= RTEMS_RFS_ROOT_INO;
size = fs->group_inodes;
ffc125dc: 81 3f 00 2c lwz r9,44(r31)
ffc125e0: 48 00 00 08 b ffc125e8 <rtems_rfs_group_bitmap_free+0x78>
}
else
{
no -= RTEMS_RFS_SUPERBLOCK_SIZE;
size = fs->group_blocks;
ffc125e4: 81 3f 00 28 lwz r9,40(r31)
}
group = no / size;
ffc125e8: 7d 5d 4b 96 divwu r10,r29,r9
ffc125ec: 81 1f 00 20 lwz r8,32(r31)
bit = (rtems_rfs_bitmap_bit) (no % size);
if (inode)
ffc125f0: 2f 9e 00 00 cmpwi cr7,r30,0
no -= RTEMS_RFS_SUPERBLOCK_SIZE;
size = fs->group_blocks;
}
group = no / size;
bit = (rtems_rfs_bitmap_bit) (no % size);
ffc125f4: 7d 2a 49 d6 mullw r9,r10,r9
ffc125f8: 1d 4a 00 50 mulli r10,r10,80
ffc125fc: 7c 89 e8 50 subf r4,r9,r29
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
ffc12600: 7f c8 52 14 add r30,r8,r10
}
group = no / size;
bit = (rtems_rfs_bitmap_bit) (no % size);
if (inode)
ffc12604: 41 be 00 0c beq+ cr7,ffc12610 <rtems_rfs_group_bitmap_free+0xa0>
bitmap = &fs->groups[group].inode_bitmap;
ffc12608: 3b de 00 2c addi r30,r30,44
ffc1260c: 48 00 00 08 b ffc12614 <rtems_rfs_group_bitmap_free+0xa4>
else
bitmap = &fs->groups[group].block_bitmap;
ffc12610: 3b de 00 08 addi r30,r30,8
rc = rtems_rfs_bitmap_map_clear (bitmap, bit);
ffc12614: 7f c3 f3 78 mr r3,r30
ffc12618: 48 00 88 d5 bl ffc1aeec <rtems_rfs_bitmap_map_clear>
rtems_rfs_bitmap_release_buffer (fs, bitmap);
ffc1261c: 80 9e 00 00 lwz r4,0(r30)
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
else
bitmap = &fs->groups[group].block_bitmap;
rc = rtems_rfs_bitmap_map_clear (bitmap, bit);
ffc12620: 7c 7d 1b 78 mr r29,r3
rtems_rfs_bitmap_release_buffer (fs, bitmap);
ffc12624: 7f e3 fb 78 mr r3,r31
ffc12628: 48 00 a0 31 bl ffc1c658 <rtems_rfs_buffer_handle_release>
return rc;
}
ffc1262c: 39 61 00 18 addi r11,r1,24
ffc12630: 7f a3 eb 78 mr r3,r29
ffc12634: 4b fe ef 30 b ffc01564 <_restgpr_29_x>
ffc12638 <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)
{
ffc12638: 94 21 ff e0 stwu r1,-32(r1) <== NOT EXECUTED
ffc1263c: 7c 08 02 a6 mflr r0 <== NOT EXECUTED
ffc12640: bf 61 00 0c stmw r27,12(r1) <== NOT EXECUTED
ffc12644: 7c 7e 1b 78 mr r30,r3 <== NOT EXECUTED
ffc12648: 7c 9d 23 78 mr r29,r4 <== NOT EXECUTED
unsigned int group;
rtems_rfs_bitmap_bit bit;
size_t size;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_BITMAPS))
ffc1264c: 38 60 00 00 li r3,0 <== NOT EXECUTED
int
rtems_rfs_group_bitmap_test (rtems_rfs_file_system* fs,
bool inode,
rtems_rfs_bitmap_bit no,
bool* state)
{
ffc12650: 90 01 00 24 stw r0,36(r1) <== NOT EXECUTED
unsigned int group;
rtems_rfs_bitmap_bit bit;
size_t size;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_BITMAPS))
ffc12654: 3c 80 00 02 lis r4,2 <== NOT EXECUTED
int
rtems_rfs_group_bitmap_test (rtems_rfs_file_system* fs,
bool inode,
rtems_rfs_bitmap_bit no,
bool* state)
{
ffc12658: 7c bf 2b 78 mr r31,r5 <== NOT EXECUTED
ffc1265c: 7c db 33 78 mr r27,r6 <== NOT EXECUTED
unsigned int group;
rtems_rfs_bitmap_bit bit;
size_t size;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_BITMAPS))
ffc12660: 48 00 1d 69 bl ffc143c8 <rtems_rfs_trace> <== NOT EXECUTED
ffc12664: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc12668: 41 9e 00 34 beq- cr7,ffc1269c <rtems_rfs_group_bitmap_test+0x64><== NOT EXECUTED
printf ("rtems-rfs: group-bitmap-test: %s test: %" PRId32 "\n",
ffc1266c: 2f 9d 00 00 cmpwi cr7,r29,0 <== NOT EXECUTED
ffc12670: 41 9e 00 10 beq- cr7,ffc12680 <rtems_rfs_group_bitmap_test+0x48><== NOT EXECUTED
ffc12674: 3c 80 ff c3 lis r4,-61 <== NOT EXECUTED
ffc12678: 38 84 4e 5b addi r4,r4,20059 <== NOT EXECUTED
ffc1267c: 48 00 00 0c b ffc12688 <rtems_rfs_group_bitmap_test+0x50><== NOT EXECUTED
ffc12680: 3c 80 ff c3 lis r4,-61 <== NOT EXECUTED
ffc12684: 38 84 45 c0 addi r4,r4,17856 <== NOT EXECUTED
ffc12688: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1268c: 38 63 4e f2 addi r3,r3,20210 <== NOT EXECUTED
ffc12690: 7f e5 fb 78 mr r5,r31 <== NOT EXECUTED
ffc12694: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc12698: 48 01 12 f5 bl ffc2398c <printf> <== NOT EXECUTED
inode ? "inode" : "block", no);
if (inode)
ffc1269c: 2f 9d 00 00 cmpwi cr7,r29,0 <== NOT EXECUTED
ffc126a0: 41 9e 00 28 beq- cr7,ffc126c8 <rtems_rfs_group_bitmap_test+0x90><== NOT EXECUTED
{
if ((no < RTEMS_RFS_ROOT_INO) || (no > rtems_rfs_fs_inodes (fs)))
ffc126a4: 2f 9f 00 00 cmpwi cr7,r31,0 <== NOT EXECUTED
return EINVAL;
ffc126a8: 3b 80 00 16 li r28,22 <== NOT EXECUTED
printf ("rtems-rfs: group-bitmap-test: %s test: %" PRId32 "\n",
inode ? "inode" : "block", no);
if (inode)
{
if ((no < RTEMS_RFS_ROOT_INO) || (no > rtems_rfs_fs_inodes (fs)))
ffc126ac: 40 9d 00 78 ble- cr7,ffc12724 <rtems_rfs_group_bitmap_test+0xec><== NOT EXECUTED
ffc126b0: 81 3e 00 14 lwz r9,20(r30) <== NOT EXECUTED
ffc126b4: 7f 9f 48 40 cmplw cr7,r31,r9 <== NOT EXECUTED
ffc126b8: 41 bd 00 6c bgt+ cr7,ffc12724 <rtems_rfs_group_bitmap_test+0xec><== NOT EXECUTED
return EINVAL;
no -= RTEMS_RFS_ROOT_INO;
ffc126bc: 3b ff ff ff addi r31,r31,-1 <== NOT EXECUTED
size = fs->group_inodes;
ffc126c0: 80 9e 00 2c lwz r4,44(r30) <== NOT EXECUTED
ffc126c4: 48 00 00 18 b ffc126dc <rtems_rfs_group_bitmap_test+0xa4><== NOT EXECUTED
}
else
{
if (no >= rtems_rfs_fs_blocks (fs))
ffc126c8: 81 3e 00 04 lwz r9,4(r30) <== NOT EXECUTED
inode ? "inode" : "block", no);
if (inode)
{
if ((no < RTEMS_RFS_ROOT_INO) || (no > rtems_rfs_fs_inodes (fs)))
return EINVAL;
ffc126cc: 3b 80 00 16 li r28,22 <== NOT EXECUTED
no -= RTEMS_RFS_ROOT_INO;
size = fs->group_inodes;
}
else
{
if (no >= rtems_rfs_fs_blocks (fs))
ffc126d0: 7f 9f 48 40 cmplw cr7,r31,r9 <== NOT EXECUTED
ffc126d4: 40 bc 00 50 bge+ cr7,ffc12724 <rtems_rfs_group_bitmap_test+0xec><== NOT EXECUTED
return EINVAL;
size = fs->group_blocks;
ffc126d8: 80 9e 00 28 lwz r4,40(r30) <== NOT EXECUTED
}
group = no / size;
ffc126dc: 7d 3f 23 96 divwu r9,r31,r4 <== NOT EXECUTED
ffc126e0: 81 5e 00 20 lwz r10,32(r30) <== NOT EXECUTED
bit = (rtems_rfs_bitmap_bit) (no % size);
if (inode)
ffc126e4: 2f 9d 00 00 cmpwi cr7,r29,0 <== NOT EXECUTED
return EINVAL;
size = fs->group_blocks;
}
group = no / size;
bit = (rtems_rfs_bitmap_bit) (no % size);
ffc126e8: 7c 89 21 d6 mullw r4,r9,r4 <== NOT EXECUTED
ffc126ec: 1d 29 00 50 mulli r9,r9,80 <== NOT EXECUTED
ffc126f0: 7c 84 f8 50 subf r4,r4,r31 <== NOT EXECUTED
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
ffc126f4: 7f aa 4a 14 add r29,r10,r9 <== NOT EXECUTED
}
group = no / size;
bit = (rtems_rfs_bitmap_bit) (no % size);
if (inode)
ffc126f8: 41 9e 00 0c beq- cr7,ffc12704 <rtems_rfs_group_bitmap_test+0xcc><== NOT EXECUTED
bitmap = &fs->groups[group].inode_bitmap;
ffc126fc: 3b bd 00 2c addi r29,r29,44 <== NOT EXECUTED
ffc12700: 48 00 00 08 b ffc12708 <rtems_rfs_group_bitmap_test+0xd0><== NOT EXECUTED
else
bitmap = &fs->groups[group].block_bitmap;
ffc12704: 3b bd 00 08 addi r29,r29,8 <== NOT EXECUTED
rc = rtems_rfs_bitmap_map_test (bitmap, bit, state);
ffc12708: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED
ffc1270c: 7f 65 db 78 mr r5,r27 <== NOT EXECUTED
ffc12710: 48 00 88 79 bl ffc1af88 <rtems_rfs_bitmap_map_test> <== NOT EXECUTED
rtems_rfs_bitmap_release_buffer (fs, bitmap);
ffc12714: 80 9d 00 00 lwz r4,0(r29) <== NOT EXECUTED
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
else
bitmap = &fs->groups[group].block_bitmap;
rc = rtems_rfs_bitmap_map_test (bitmap, bit, state);
ffc12718: 7c 7c 1b 78 mr r28,r3 <== NOT EXECUTED
rtems_rfs_bitmap_release_buffer (fs, bitmap);
ffc1271c: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc12720: 48 00 9f 39 bl ffc1c658 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
return rc;
}
ffc12724: 39 61 00 20 addi r11,r1,32 <== NOT EXECUTED
ffc12728: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED
ffc1272c: 4b fe ee 30 b ffc0155c <_restgpr_27_x> <== NOT EXECUTED
ffc122c0 <rtems_rfs_group_close>:
int
rtems_rfs_group_close (rtems_rfs_file_system* fs, rtems_rfs_group* group)
{
ffc122c0: 94 21 ff e8 stwu r1,-24(r1)
ffc122c4: 7c 08 02 a6 mflr r0
ffc122c8: bf 81 00 08 stmw r28,8(r1)
ffc122cc: 7c 7e 1b 78 mr r30,r3
ffc122d0: 7c 9f 23 78 mr r31,r4
int result = 0;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_CLOSE))
ffc122d4: 38 60 00 00 li r3,0
return 0;
}
int
rtems_rfs_group_close (rtems_rfs_file_system* fs, rtems_rfs_group* group)
{
ffc122d8: 90 01 00 1c stw r0,28(r1)
int result = 0;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_CLOSE))
ffc122dc: 3c 80 00 01 lis r4,1
ffc122e0: 48 00 20 e9 bl ffc143c8 <rtems_rfs_trace>
ffc122e4: 2f 83 00 00 cmpwi cr7,r3,0
ffc122e8: 41 be 00 18 beq+ cr7,ffc12300 <rtems_rfs_group_close+0x40><== ALWAYS TAKEN
printf ("rtems-rfs: group-close: base=%" PRId32 "\n", group->base);
ffc122ec: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc122f0: 80 9f 00 00 lwz r4,0(r31) <== NOT EXECUTED
ffc122f4: 38 63 4e 39 addi r3,r3,20025 <== NOT EXECUTED
ffc122f8: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc122fc: 48 01 16 91 bl ffc2398c <printf> <== 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);
ffc12300: 38 7f 00 2c addi r3,r31,44
ffc12304: 48 00 90 c1 bl ffc1b3c4 <rtems_rfs_bitmap_close>
*/
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);
ffc12308: 38 9f 00 44 addi r4,r31,68
ffc1230c: 7c 7c 1b 78 mr r28,r3
ffc12310: 7f c3 f3 78 mr r3,r30
ffc12314: 48 00 a3 45 bl ffc1c658 <rtems_rfs_buffer_handle_release>
handle->dirty = false;
ffc12318: 39 20 00 00 li r9,0
ffc1231c: 99 3f 00 44 stb r9,68(r31)
handle->bnum = 0;
ffc12320: 39 20 00 00 li r9,0
if (rc > 0)
result = rc;
rc = rtems_rfs_buffer_handle_close (fs, &group->inode_bitmap_buffer);
if (rc > 0)
result = rc;
rc = rtems_rfs_bitmap_close (&group->block_bitmap);
ffc12324: 38 7f 00 08 addi r3,r31,8
ffc12328: 91 3f 00 48 stw r9,72(r31)
handle->buffer = NULL;
ffc1232c: 91 3f 00 4c stw r9,76(r31)
ffc12330: 48 00 90 95 bl ffc1b3c4 <rtems_rfs_bitmap_close>
if (rc > 0)
ffc12334: 7c 7d 1b 79 mr. r29,r3
ffc12338: 41 a1 00 10 bgt+ ffc12348 <rtems_rfs_group_close+0x88> <== NEVER TAKEN
ffc1233c: 7f 9d e0 f8 not r29,r28
ffc12340: 7f bd fe 70 srawi r29,r29,31
ffc12344: 7f 9d e8 38 and r29,r28,r29
*/
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);
ffc12348: 7f c3 f3 78 mr r3,r30
ffc1234c: 38 9f 00 20 addi r4,r31,32
ffc12350: 48 00 a3 09 bl ffc1c658 <rtems_rfs_buffer_handle_release>
handle->dirty = false;
ffc12354: 39 20 00 00 li r9,0
ffc12358: 99 3f 00 20 stb r9,32(r31)
handle->bnum = 0;
ffc1235c: 39 20 00 00 li r9,0
rc = rtems_rfs_buffer_handle_close (fs, &group->block_bitmap_buffer);
if (rc > 0)
result = rc;
return result;
}
ffc12360: 39 61 00 18 addi r11,r1,24
ffc12364: 91 3f 00 24 stw r9,36(r31)
ffc12368: 7f a3 eb 78 mr r3,r29
handle->buffer = NULL;
ffc1236c: 91 3f 00 28 stw r9,40(r31)
ffc12370: 4b fe f1 f0 b ffc01560 <_restgpr_28_x>
ffc120a0 <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)
{
ffc120a0: 94 21 ff d8 stwu r1,-40(r1)
ffc120a4: 7c 08 02 a6 mflr r0
ffc120a8: 90 01 00 2c stw r0,44(r1)
int rc;
if (base >= rtems_rfs_fs_blocks (fs))
ffc120ac: 81 23 00 04 lwz r9,4(r3)
rtems_rfs_group_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_block base,
size_t size,
size_t inodes,
rtems_rfs_group* group)
{
ffc120b0: bf 01 00 08 stmw r24,8(r1)
ffc120b4: 7c 7d 1b 78 mr r29,r3
int rc;
if (base >= rtems_rfs_fs_blocks (fs))
ffc120b8: 7f 84 48 40 cmplw cr7,r4,r9
rtems_rfs_group_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_block base,
size_t size,
size_t inodes,
rtems_rfs_group* group)
{
ffc120bc: 7c 9b 23 78 mr r27,r4
int rc;
if (base >= rtems_rfs_fs_blocks (fs))
ffc120c0: 41 bc 00 3c blt+ cr7,ffc120fc <rtems_rfs_group_open+0x5c><== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_OPEN))
ffc120c4: 38 80 00 00 li r4,0 <== NOT EXECUTED
ffc120c8: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc120cc: 60 84 80 00 ori r4,r4,32768 <== NOT EXECUTED
ffc120d0: 48 00 22 f9 bl ffc143c8 <rtems_rfs_trace> <== NOT EXECUTED
printf ("rtems-rfs: group-open: base outside file system range: %d: %s\n",
EIO, strerror (EIO));
return EIO;
ffc120d4: 3b 80 00 05 li r28,5 <== NOT EXECUTED
{
int rc;
if (base >= rtems_rfs_fs_blocks (fs))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_OPEN))
ffc120d8: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc120dc: 41 be 01 d8 beq+ cr7,ffc122b4 <rtems_rfs_group_open+0x214><== NOT EXECUTED
printf ("rtems-rfs: group-open: base outside file system range: %d: %s\n",
ffc120e0: 38 60 00 05 li r3,5 <== NOT EXECUTED
ffc120e4: 48 01 2a 95 bl ffc24b78 <strerror> <== NOT EXECUTED
ffc120e8: 38 80 00 05 li r4,5 <== NOT EXECUTED
ffc120ec: 7c 65 1b 78 mr r5,r3 <== NOT EXECUTED
ffc120f0: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc120f4: 38 63 4d 4a addi r3,r3,19786 <== NOT EXECUTED
ffc120f8: 48 00 00 ec b ffc121e4 <rtems_rfs_group_open+0x144> <== NOT EXECUTED
EIO, strerror (EIO));
return EIO;
}
if ((base + size) >= rtems_rfs_fs_blocks (fs))
ffc120fc: 7d 45 22 14 add r10,r5,r4
ffc12100: 7f 8a 48 40 cmplw cr7,r10,r9
ffc12104: 7c bc 2b 78 mr r28,r5
ffc12108: 7c ff 3b 78 mr r31,r7
ffc1210c: 41 9c 00 08 blt- cr7,ffc12114 <rtems_rfs_group_open+0x74><== NEVER TAKEN
size = rtems_rfs_fs_blocks (fs) - base;
ffc12110: 7f 84 48 50 subf r28,r4,r9
ffc12114: 7f 9c 30 40 cmplw cr7,r28,r6
ffc12118: 7f 99 e3 78 mr r25,r28
ffc1211c: 40 9d 00 08 ble- cr7,ffc12124 <rtems_rfs_group_open+0x84><== NEVER TAKEN
ffc12120: 7c d9 33 78 mr r25,r6
* the format configuration needs reviewing.
*/
if (inodes > size)
inodes = size;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_OPEN))
ffc12124: 38 80 00 00 li r4,0
ffc12128: 38 60 00 00 li r3,0
ffc1212c: 60 84 80 00 ori r4,r4,32768
ffc12130: 48 00 22 99 bl ffc143c8 <rtems_rfs_trace>
ffc12134: 2f 83 00 00 cmpwi cr7,r3,0
ffc12138: 41 be 00 20 beq+ cr7,ffc12158 <rtems_rfs_group_open+0xb8><== ALWAYS TAKEN
printf ("rtems-rfs: group-open: base=%" PRId32 ", blocks=%zd inodes=%zd\n",
ffc1213c: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc12140: 38 63 4d 89 addi r3,r3,19849 <== NOT EXECUTED
ffc12144: 7f 64 db 78 mr r4,r27 <== NOT EXECUTED
ffc12148: 7f 85 e3 78 mr r5,r28 <== NOT EXECUTED
ffc1214c: 7f 26 cb 78 mr r6,r25 <== NOT EXECUTED
ffc12150: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc12154: 48 01 18 39 bl ffc2398c <printf> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
ffc12158: 39 20 00 00 li r9,0
base, size, inodes);
group->base = base;
group->size = size;
ffc1215c: 93 9f 00 04 stw r28,4(r31)
handle->bnum = 0;
ffc12160: 3b c0 00 00 li r30,0
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_OPEN))
printf ("rtems-rfs: group-open: base=%" PRId32 ", blocks=%zd inodes=%zd\n",
base, size, inodes);
group->base = base;
ffc12164: 93 7f 00 00 stw r27,0(r31)
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,
ffc12168: 3b 1f 00 08 addi r24,r31,8
ffc1216c: 3b 5f 00 20 addi r26,r31,32
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
ffc12170: 99 3f 00 20 stb r9,32(r31)
ffc12174: 7f 86 e3 78 mr r6,r28
ffc12178: 7f 03 c3 78 mr r3,r24
handle->bnum = 0;
ffc1217c: 93 df 00 24 stw r30,36(r31)
ffc12180: 7f a4 eb 78 mr r4,r29
ffc12184: 7f 45 d3 78 mr r5,r26
handle->buffer = NULL;
ffc12188: 93 df 00 28 stw r30,40(r31)
ffc1218c: 7f 67 db 78 mr r7,r27
ffc12190: 48 00 91 cd bl ffc1b35c <rtems_rfs_bitmap_open>
&group->block_bitmap_buffer, size,
group->base + RTEMS_RFS_GROUP_BLOCK_BITMAP_BLOCK);
if (rc > 0)
ffc12194: 7c 7c 1b 79 mr. r28,r3
ffc12198: 40 81 00 58 ble- ffc121f0 <rtems_rfs_group_open+0x150> <== 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);
ffc1219c: 7f 44 d3 78 mr r4,r26 <== NOT EXECUTED
ffc121a0: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED
ffc121a4: 48 00 a4 b5 bl ffc1c658 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
handle->dirty = false;
ffc121a8: 9b df 00 20 stb r30,32(r31) <== NOT EXECUTED
{
rtems_rfs_buffer_handle_close (fs, &group->block_bitmap_buffer);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_OPEN))
ffc121ac: 38 80 00 00 li r4,0 <== NOT EXECUTED
handle->bnum = 0;
ffc121b0: 93 df 00 24 stw r30,36(r31) <== NOT EXECUTED
ffc121b4: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc121b8: 60 84 80 00 ori r4,r4,32768 <== NOT EXECUTED
handle->buffer = NULL;
ffc121bc: 93 df 00 28 stw r30,40(r31) <== NOT EXECUTED
ffc121c0: 48 00 22 09 bl ffc143c8 <rtems_rfs_trace> <== NOT EXECUTED
ffc121c4: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc121c8: 41 be 00 ec beq+ cr7,ffc122b4 <rtems_rfs_group_open+0x214><== NOT EXECUTED
printf ("rtems-rfs: group-open: could not open block bitmap: %d: %s\n",
ffc121cc: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED
ffc121d0: 48 01 29 a9 bl ffc24b78 <strerror> <== NOT EXECUTED
ffc121d4: 7c 65 1b 78 mr r5,r3 <== NOT EXECUTED
ffc121d8: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc121dc: 38 63 4d c1 addi r3,r3,19905 <== NOT EXECUTED
ffc121e0: 7f 84 e3 78 mr r4,r28 <== NOT EXECUTED
ffc121e4: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc121e8: 48 01 17 a5 bl ffc2398c <printf> <== NOT EXECUTED
ffc121ec: 48 00 00 c8 b ffc122b4 <rtems_rfs_group_open+0x214> <== NOT EXECUTED
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,
ffc121f0: 80 ff 00 00 lwz r7,0(r31)
ffc121f4: 3b 7f 00 44 addi r27,r31,68
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
ffc121f8: 9b df 00 44 stb r30,68(r31)
ffc121fc: 38 7f 00 2c addi r3,r31,44
ffc12200: 7f a4 eb 78 mr r4,r29
handle->bnum = 0;
ffc12204: 93 df 00 48 stw r30,72(r31)
ffc12208: 7f 65 db 78 mr r5,r27
ffc1220c: 7f 26 cb 78 mr r6,r25
handle->buffer = NULL;
ffc12210: 93 df 00 4c stw r30,76(r31)
ffc12214: 38 e7 00 01 addi r7,r7,1
ffc12218: 48 00 91 45 bl ffc1b35c <rtems_rfs_bitmap_open>
&group->inode_bitmap_buffer, inodes,
group->base + RTEMS_RFS_GROUP_INODE_BITMAP_BLOCK);
if (rc > 0)
ffc1221c: 7c 7c 1b 79 mr. r28,r3
ffc12220: 40 81 00 6c ble- ffc1228c <rtems_rfs_group_open+0x1ec> <== 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);
ffc12224: 7f 64 db 78 mr r4,r27 <== NOT EXECUTED
ffc12228: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED
ffc1222c: 48 00 a4 2d bl ffc1c658 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
handle->dirty = false;
ffc12230: 9b df 00 44 stb r30,68(r31) <== NOT EXECUTED
{
rtems_rfs_buffer_handle_close (fs, &group->inode_bitmap_buffer);
rtems_rfs_bitmap_close (&group->block_bitmap);
ffc12234: 7f 03 c3 78 mr r3,r24 <== NOT EXECUTED
handle->bnum = 0;
ffc12238: 93 df 00 48 stw r30,72(r31) <== NOT EXECUTED
handle->buffer = NULL;
ffc1223c: 93 df 00 4c stw r30,76(r31) <== NOT EXECUTED
ffc12240: 48 00 91 85 bl ffc1b3c4 <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);
ffc12244: 7f 44 d3 78 mr r4,r26 <== NOT EXECUTED
ffc12248: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED
ffc1224c: 48 00 a4 0d bl ffc1c658 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
handle->dirty = false;
ffc12250: 9b df 00 20 stb r30,32(r31) <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &group->block_bitmap_buffer);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_OPEN))
ffc12254: 38 80 00 00 li r4,0 <== NOT EXECUTED
handle->bnum = 0;
ffc12258: 93 df 00 24 stw r30,36(r31) <== NOT EXECUTED
ffc1225c: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc12260: 60 84 80 00 ori r4,r4,32768 <== NOT EXECUTED
handle->buffer = NULL;
ffc12264: 93 df 00 28 stw r30,40(r31) <== NOT EXECUTED
ffc12268: 48 00 21 61 bl ffc143c8 <rtems_rfs_trace> <== NOT EXECUTED
ffc1226c: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc12270: 41 be 00 44 beq+ cr7,ffc122b4 <rtems_rfs_group_open+0x214><== NOT EXECUTED
printf ("rtems-rfs: group-open: could not open inode bitmap: %d: %s\n",
ffc12274: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED
ffc12278: 48 01 29 01 bl ffc24b78 <strerror> <== NOT EXECUTED
ffc1227c: 7c 65 1b 78 mr r5,r3 <== NOT EXECUTED
ffc12280: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc12284: 38 63 4d fd addi r3,r3,19965 <== NOT EXECUTED
ffc12288: 4b ff ff 58 b ffc121e0 <rtems_rfs_group_open+0x140> <== NOT EXECUTED
rc, strerror (rc));
return rc;
}
if (rtems_rfs_fs_release_bitmaps (fs))
ffc1228c: 81 3d 00 00 lwz r9,0(r29)
{
rtems_rfs_bitmap_release_buffer (fs, &group->block_bitmap);
rtems_rfs_bitmap_release_buffer (fs, &group->inode_bitmap);
}
return 0;
ffc12290: 3b 80 00 00 li r28,0
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))
ffc12294: 71 2a 00 01 andi. r10,r9,1
ffc12298: 40 a2 00 1c bne+ ffc122b4 <rtems_rfs_group_open+0x214> <== NEVER TAKEN
{
rtems_rfs_bitmap_release_buffer (fs, &group->block_bitmap);
ffc1229c: 80 9f 00 08 lwz r4,8(r31)
ffc122a0: 7f a3 eb 78 mr r3,r29
ffc122a4: 48 00 a3 b5 bl ffc1c658 <rtems_rfs_buffer_handle_release>
rtems_rfs_bitmap_release_buffer (fs, &group->inode_bitmap);
ffc122a8: 80 9f 00 2c lwz r4,44(r31)
ffc122ac: 7f a3 eb 78 mr r3,r29
ffc122b0: 48 00 a3 a9 bl ffc1c658 <rtems_rfs_buffer_handle_release>
}
return 0;
}
ffc122b4: 39 61 00 28 addi r11,r1,40
ffc122b8: 7f 83 e3 78 mr r3,r28
ffc122bc: 4b fe f2 94 b ffc01550 <_restgpr_24_x>
ffc12730 <rtems_rfs_group_usage>:
size_t* blocks,
size_t* inodes)
{
int g;
*blocks = 0;
ffc12730: 39 20 00 00 li r9,0 <== NOT EXECUTED
ffc12734: 91 24 00 00 stw r9,0(r4) <== NOT EXECUTED
*inodes = 0;
ffc12738: 91 25 00 00 stw r9,0(r5) <== NOT EXECUTED
for (g = 0; g < fs->group_count; g++)
ffc1273c: 48 00 00 44 b ffc12780 <rtems_rfs_group_usage+0x50> <== NOT EXECUTED
return rc;
}
int
rtems_rfs_group_usage (rtems_rfs_file_system* fs,
ffc12740: 1d 09 00 50 mulli r8,r9,80 <== NOT EXECUTED
*blocks = 0;
*inodes = 0;
for (g = 0; g < fs->group_count; g++)
{
rtems_rfs_group* group = &fs->groups[g];
ffc12744: 81 43 00 20 lwz r10,32(r3) <== NOT EXECUTED
ffc12748: 7d 4a 42 14 add r10,r10,r8 <== NOT EXECUTED
*blocks +=
rtems_rfs_bitmap_map_size(&group->block_bitmap) -
ffc1274c: 81 0a 00 18 lwz r8,24(r10) <== NOT EXECUTED
int g;
*blocks = 0;
*inodes = 0;
for (g = 0; g < fs->group_count; g++)
ffc12750: 39 29 00 01 addi r9,r9,1 <== NOT EXECUTED
{
rtems_rfs_group* group = &fs->groups[g];
*blocks +=
rtems_rfs_bitmap_map_size(&group->block_bitmap) -
ffc12754: 80 ea 00 14 lwz r7,20(r10) <== NOT EXECUTED
ffc12758: 7c e8 38 50 subf r7,r8,r7 <== NOT EXECUTED
*inodes = 0;
for (g = 0; g < fs->group_count; g++)
{
rtems_rfs_group* group = &fs->groups[g];
*blocks +=
ffc1275c: 81 04 00 00 lwz r8,0(r4) <== NOT EXECUTED
ffc12760: 7d 08 3a 14 add r8,r8,r7 <== NOT EXECUTED
ffc12764: 91 04 00 00 stw r8,0(r4) <== 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) -
ffc12768: 81 0a 00 38 lwz r8,56(r10) <== NOT EXECUTED
ffc1276c: 81 4a 00 3c lwz r10,60(r10) <== NOT EXECUTED
ffc12770: 7d 0a 40 50 subf r8,r10,r8 <== 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 +=
ffc12774: 81 45 00 00 lwz r10,0(r5) <== NOT EXECUTED
ffc12778: 7d 4a 42 14 add r10,r10,r8 <== NOT EXECUTED
ffc1277c: 91 45 00 00 stw r10,0(r5) <== NOT EXECUTED
int g;
*blocks = 0;
*inodes = 0;
for (g = 0; g < fs->group_count; g++)
ffc12780: 81 43 00 24 lwz r10,36(r3) <== NOT EXECUTED
ffc12784: 7f 89 50 00 cmpw cr7,r9,r10 <== NOT EXECUTED
ffc12788: 41 9c ff b8 blt+ cr7,ffc12740 <rtems_rfs_group_usage+0x10><== 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))
ffc1278c: 81 43 00 04 lwz r10,4(r3) <== NOT EXECUTED
ffc12790: 81 24 00 00 lwz r9,0(r4) <== NOT EXECUTED
ffc12794: 7f 89 50 40 cmplw cr7,r9,r10 <== NOT EXECUTED
ffc12798: 40 9d 00 08 ble- cr7,ffc127a0 <rtems_rfs_group_usage+0x70><== NOT EXECUTED
ffc1279c: 7d 49 53 78 mr r9,r10 <== NOT EXECUTED
ffc127a0: 91 24 00 00 stw r9,0(r4) <== NOT EXECUTED
*blocks = rtems_rfs_fs_blocks (fs);
if (*inodes > rtems_rfs_fs_inodes (fs))
ffc127a4: 81 43 00 14 lwz r10,20(r3) <== NOT EXECUTED
ffc127a8: 81 25 00 00 lwz r9,0(r5) <== NOT EXECUTED
ffc127ac: 7f 89 50 40 cmplw cr7,r9,r10 <== NOT EXECUTED
ffc127b0: 40 9d 00 08 ble- cr7,ffc127b8 <rtems_rfs_group_usage+0x88><== NOT EXECUTED
ffc127b4: 7d 49 53 78 mr r9,r10 <== NOT EXECUTED
ffc127b8: 91 25 00 00 stw r9,0(r5) <== NOT EXECUTED
*inodes = rtems_rfs_fs_inodes (fs);
return 0;
}
ffc127bc: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc127c0: 4e 80 00 20 blr <== NOT EXECUTED
ffc12ab4 <rtems_rfs_inode_close>:
}
int
rtems_rfs_inode_close (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle)
{
ffc12ab4: 94 21 ff f0 stwu r1,-16(r1)
ffc12ab8: 7c 08 02 a6 mflr r0
ffc12abc: bf c1 00 08 stmw r30,8(r1)
ffc12ac0: 7c 7e 1b 78 mr r30,r3
ffc12ac4: 7c 9f 23 78 mr r31,r4
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_CLOSE))
ffc12ac8: 38 60 00 00 li r3,0
}
int
rtems_rfs_inode_close (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle)
{
ffc12acc: 90 01 00 14 stw r0,20(r1)
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_CLOSE))
ffc12ad0: 3c 80 00 08 lis r4,8
ffc12ad4: 48 00 18 f5 bl ffc143c8 <rtems_rfs_trace>
ffc12ad8: 2f 83 00 00 cmpwi cr7,r3,0
ffc12adc: 41 be 00 18 beq+ cr7,ffc12af4 <rtems_rfs_inode_close+0x40><== ALWAYS TAKEN
printf ("rtems-rfs: inode-close: ino: %" PRIu32 "\n", handle->ino);
ffc12ae0: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc12ae4: 80 9f 00 08 lwz r4,8(r31) <== NOT EXECUTED
ffc12ae8: 38 63 4f ab addi r3,r3,20395 <== NOT EXECUTED
ffc12aec: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc12af0: 48 01 0e 9d bl ffc2398c <printf> <== NOT EXECUTED
rc = rtems_rfs_inode_unload (fs, handle, true);
ffc12af4: 7f c3 f3 78 mr r3,r30
ffc12af8: 7f e4 fb 78 mr r4,r31
ffc12afc: 38 a0 00 01 li r5,1
ffc12b00: 4b ff fe ad bl ffc129ac <rtems_rfs_inode_unload>
if ((rc == 0) && (handle->loads > 0))
ffc12b04: 7c 7e 1b 79 mr. r30,r3
ffc12b08: 40 82 00 3c bne- ffc12b44 <rtems_rfs_inode_close+0x90> <== NEVER TAKEN
ffc12b0c: 81 3f 00 24 lwz r9,36(r31)
ffc12b10: 2f 89 00 00 cmpwi cr7,r9,0
ffc12b14: 40 9d 00 30 ble- cr7,ffc12b44 <rtems_rfs_inode_close+0x90><== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_CLOSE))
ffc12b18: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc12b1c: 3c 80 00 08 lis r4,8 <== NOT EXECUTED
ffc12b20: 48 00 18 a9 bl ffc143c8 <rtems_rfs_trace> <== NOT EXECUTED
printf ("rtems-rfs: inode-close: bad loads number: %d\n",
handle->loads);
rc = EIO;
ffc12b24: 3b c0 00 05 li r30,5 <== 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))
ffc12b28: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc12b2c: 41 be 00 18 beq+ cr7,ffc12b44 <rtems_rfs_inode_close+0x90><== NOT EXECUTED
printf ("rtems-rfs: inode-close: bad loads number: %d\n",
ffc12b30: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc12b34: 80 9f 00 24 lwz r4,36(r31) <== NOT EXECUTED
ffc12b38: 38 63 4f cd addi r3,r3,20429 <== NOT EXECUTED
ffc12b3c: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc12b40: 48 01 0e 4d bl ffc2398c <printf> <== NOT EXECUTED
handle->loads);
rc = EIO;
}
handle->ino = 0;
ffc12b44: 39 20 00 00 li r9,0
ffc12b48: 91 3f 00 08 stw r9,8(r31)
return rc;
}
ffc12b4c: 39 61 00 10 addi r11,r1,16
ffc12b50: 7f c3 f3 78 mr r3,r30
ffc12b54: 4b fe ea 14 b ffc01568 <_restgpr_30_x>
ffc12e5c <rtems_rfs_inode_create>:
uint16_t mode,
uint16_t links,
uid_t uid,
gid_t gid,
rtems_rfs_ino* ino)
{
ffc12e5c: 94 21 ff 78 stwu r1,-136(r1)
ffc12e60: 7c 08 02 a6 mflr r0
ffc12e64: be 81 00 58 stmw r20,88(r1)
ffc12e68: 7c 7f 1b 78 mr r31,r3
ffc12e6c: 7c 9a 23 78 mr r26,r4
rtems_rfs_inode_handle parent_inode;
rtems_rfs_inode_handle inode;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_CREATE))
ffc12e70: 38 60 00 00 li r3,0
uint16_t mode,
uint16_t links,
uid_t uid,
gid_t gid,
rtems_rfs_ino* ino)
{
ffc12e74: 90 01 00 8c stw r0,140(r1)
rtems_rfs_inode_handle parent_inode;
rtems_rfs_inode_handle inode;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_CREATE))
ffc12e78: 3c 80 00 40 lis r4,64
uint16_t mode,
uint16_t links,
uid_t uid,
gid_t gid,
rtems_rfs_ino* ino)
{
ffc12e7c: 7c b9 2b 78 mr r25,r5
ffc12e80: 83 81 00 90 lwz r28,144(r1)
ffc12e84: 7c d8 33 78 mr r24,r6
ffc12e88: 7c fb 3b 78 mr r27,r7
ffc12e8c: 7d 15 43 78 mr r21,r8
ffc12e90: 7d 36 4b 78 mr r22,r9
ffc12e94: 7d 57 53 78 mr r23,r10
rtems_rfs_inode_handle parent_inode;
rtems_rfs_inode_handle inode;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_CREATE))
ffc12e98: 48 00 15 31 bl ffc143c8 <rtems_rfs_trace>
ffc12e9c: 2f 83 00 00 cmpwi cr7,r3,0
ffc12ea0: 41 9e 00 cc beq- cr7,ffc12f6c <rtems_rfs_inode_create+0x110><== ALWAYS TAKEN
{
const char* type = "unknown";
int c;
if (RTEMS_RFS_S_ISDIR (mode))
ffc12ea4: 57 63 04 26 rlwinm r3,r27,0,16,19 <== NOT EXECUTED
ffc12ea8: 2f 83 40 00 cmpwi cr7,r3,16384 <== NOT EXECUTED
ffc12eac: 41 9e 00 38 beq- cr7,ffc12ee4 <rtems_rfs_inode_create+0x88><== NOT EXECUTED
type = "dir";
else if (RTEMS_RFS_S_ISCHR (mode))
ffc12eb0: 2f 83 20 00 cmpwi cr7,r3,8192 <== NOT EXECUTED
ffc12eb4: 41 9e 00 3c beq- cr7,ffc12ef0 <rtems_rfs_inode_create+0x94><== NOT EXECUTED
type = "char";
else if (RTEMS_RFS_S_ISBLK (mode))
ffc12eb8: 2f 83 60 00 cmpwi cr7,r3,24576 <== NOT EXECUTED
ffc12ebc: 41 9e 00 40 beq- cr7,ffc12efc <rtems_rfs_inode_create+0xa0><== NOT EXECUTED
type = "block";
else if (RTEMS_RFS_S_ISREG (mode))
ffc12ec0: 6c 69 ff ff xoris r9,r3,65535 <== NOT EXECUTED
ffc12ec4: 2f 89 80 00 cmpwi cr7,r9,-32768 <== NOT EXECUTED
ffc12ec8: 41 9e 00 40 beq- cr7,ffc12f08 <rtems_rfs_inode_create+0xac><== NOT EXECUTED
type = "file";
else if (RTEMS_RFS_S_ISLNK (mode))
ffc12ecc: 6c 69 ff ff xoris r9,r3,65535 <== NOT EXECUTED
ffc12ed0: 2f 89 a0 00 cmpwi cr7,r9,-24576 <== NOT EXECUTED
ffc12ed4: 41 9e 00 40 beq- cr7,ffc12f14 <rtems_rfs_inode_create+0xb8><== NOT EXECUTED
rtems_rfs_inode_handle inode;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_CREATE))
{
const char* type = "unknown";
ffc12ed8: 3f c0 ff c3 lis r30,-61 <== NOT EXECUTED
ffc12edc: 3b de 50 30 addi r30,r30,20528 <== NOT EXECUTED
ffc12ee0: 48 00 00 3c b ffc12f1c <rtems_rfs_inode_create+0xc0> <== NOT EXECUTED
int c;
if (RTEMS_RFS_S_ISDIR (mode))
type = "dir";
ffc12ee4: 3f c0 ff c3 lis r30,-61 <== NOT EXECUTED
ffc12ee8: 3b de 50 27 addi r30,r30,20519 <== NOT EXECUTED
ffc12eec: 48 00 00 30 b ffc12f1c <rtems_rfs_inode_create+0xc0> <== NOT EXECUTED
else if (RTEMS_RFS_S_ISCHR (mode))
type = "char";
ffc12ef0: 3f c0 ff c3 lis r30,-61 <== NOT EXECUTED
ffc12ef4: 3b de 50 2b addi r30,r30,20523 <== NOT EXECUTED
ffc12ef8: 48 00 00 24 b ffc12f1c <rtems_rfs_inode_create+0xc0> <== NOT EXECUTED
else if (RTEMS_RFS_S_ISBLK (mode))
type = "block";
ffc12efc: 3f c0 ff c3 lis r30,-61 <== NOT EXECUTED
ffc12f00: 3b de 45 c0 addi r30,r30,17856 <== NOT EXECUTED
ffc12f04: 48 00 00 18 b ffc12f1c <rtems_rfs_inode_create+0xc0> <== NOT EXECUTED
else if (RTEMS_RFS_S_ISREG (mode))
type = "file";
ffc12f08: 3f c0 ff c3 lis r30,-61 <== NOT EXECUTED
ffc12f0c: 3b de 60 1b addi r30,r30,24603 <== NOT EXECUTED
ffc12f10: 48 00 00 0c b ffc12f1c <rtems_rfs_inode_create+0xc0> <== NOT EXECUTED
else if (RTEMS_RFS_S_ISLNK (mode))
type = "link";
ffc12f14: 3f c0 ff c3 lis r30,-61 <== NOT EXECUTED
ffc12f18: 3b de 54 5e addi r30,r30,21598 <== NOT EXECUTED
printf("rtems-rfs: inode-create: parent:%" PRIu32 " name:", parent);
ffc12f1c: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc12f20: 38 63 50 38 addi r3,r3,20536 <== NOT EXECUTED
ffc12f24: 7f 44 d3 78 mr r4,r26 <== NOT EXECUTED
ffc12f28: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc12f2c: 48 01 0a 61 bl ffc2398c <printf> <== NOT EXECUTED
ffc12f30: 7f 3d cb 78 mr r29,r25 <== NOT EXECUTED
return rc;
}
int
rtems_rfs_inode_create (rtems_rfs_file_system* fs,
ffc12f34: 7e 99 c2 14 add r20,r25,r24 <== 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++)
ffc12f38: 48 00 00 10 b ffc12f48 <rtems_rfs_inode_create+0xec> <== NOT EXECUTED
printf ("%c", name[c]);
ffc12f3c: 88 7d 00 00 lbz r3,0(r29) <== NOT EXECUTED
ffc12f40: 3b bd 00 01 addi r29,r29,1 <== NOT EXECUTED
ffc12f44: 48 01 0c d5 bl ffc23c18 <putchar> <== 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++)
ffc12f48: 7f 9d a0 00 cmpw cr7,r29,r20 <== NOT EXECUTED
ffc12f4c: 40 9e ff f0 bne+ cr7,ffc12f3c <rtems_rfs_inode_create+0xe0><== NOT EXECUTED
printf ("%c", name[c]);
printf (" type:%s mode:%04x (%03o)\n", type, mode, mode & ((1 << 10) - 1));
ffc12f50: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc12f54: 38 63 50 62 addi r3,r3,20578 <== NOT EXECUTED
ffc12f58: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED
ffc12f5c: 7f 65 db 78 mr r5,r27 <== NOT EXECUTED
ffc12f60: 57 66 05 be clrlwi r6,r27,22 <== NOT EXECUTED
ffc12f64: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc12f68: 48 01 0a 25 bl ffc2398c <printf> <== NOT EXECUTED
}
/*
* The file type is field within the mode. Check we have a sane mode set.
*/
switch (mode & RTEMS_RFS_S_IFMT)
ffc12f6c: 57 7d 04 26 rlwinm r29,r27,0,16,19
ffc12f70: 2f 9d 60 00 cmpwi cr7,r29,24576
ffc12f74: 41 9e 00 38 beq- cr7,ffc12fac <rtems_rfs_inode_create+0x150><== NEVER TAKEN
ffc12f78: 2b 9d 60 00 cmplwi cr7,r29,24576
ffc12f7c: 41 9d 00 14 bgt- cr7,ffc12f90 <rtems_rfs_inode_create+0x134>
ffc12f80: 2f 9d 20 00 cmpwi cr7,r29,8192
ffc12f84: 41 9e 00 28 beq- cr7,ffc12fac <rtems_rfs_inode_create+0x150><== NEVER TAKEN
ffc12f88: 2f 9d 40 00 cmpwi cr7,r29,16384
ffc12f8c: 48 00 00 1c b ffc12fa8 <rtems_rfs_inode_create+0x14c>
ffc12f90: 6f a9 ff ff xoris r9,r29,65535
ffc12f94: 2f 89 80 00 cmpwi cr7,r9,-32768
ffc12f98: 41 9e 00 14 beq- cr7,ffc12fac <rtems_rfs_inode_create+0x150>
ffc12f9c: 39 20 00 00 li r9,0
ffc12fa0: 61 29 a0 00 ori r9,r9,40960
ffc12fa4: 7f 9d 48 00 cmpw cr7,r29,r9
ffc12fa8: 40 be 01 c4 bne+ cr7,ffc1316c <rtems_rfs_inode_create+0x310><== NEVER TAKEN
break;
default:
return EINVAL;
}
rc = rtems_rfs_inode_alloc (fs, parent, ino);
ffc12fac: 7f e3 fb 78 mr r3,r31
ffc12fb0: 7f 44 d3 78 mr r4,r26
ffc12fb4: 7f 85 e3 78 mr r5,r28
ffc12fb8: 4b ff f8 0d bl ffc127c4 <rtems_rfs_inode_alloc>
if (rc > 0)
ffc12fbc: 7c 7e 1b 79 mr. r30,r3
ffc12fc0: 41 a1 01 b8 bgt+ ffc13178 <rtems_rfs_inode_create+0x31c>
return rc;
rc = rtems_rfs_inode_open (fs, *ino, &inode, true);
ffc12fc4: 80 9c 00 00 lwz r4,0(r28)
ffc12fc8: 7f e3 fb 78 mr r3,r31
ffc12fcc: 38 a1 00 08 addi r5,r1,8
ffc12fd0: 38 c0 00 01 li r6,1
ffc12fd4: 4b ff f8 ed bl ffc128c0 <rtems_rfs_inode_open>
if (rc > 0)
ffc12fd8: 7c 7e 1b 79 mr. r30,r3
ffc12fdc: 40 81 00 08 ble- ffc12fe4 <rtems_rfs_inode_create+0x188><== ALWAYS TAKEN
ffc12fe0: 48 00 01 7c b ffc1315c <rtems_rfs_inode_create+0x300><== NOT EXECUTED
{
rtems_rfs_inode_free (fs, *ino);
return rc;
}
rc = rtems_rfs_inode_initialise (&inode, links, mode, uid, gid);
ffc12fe4: 38 61 00 08 addi r3,r1,8
ffc12fe8: 7e a4 ab 78 mr r4,r21
ffc12fec: 7f 65 db 78 mr r5,r27
ffc12ff0: 7e c6 b3 78 mr r6,r22
ffc12ff4: 7e e7 bb 78 mr r7,r23
ffc12ff8: 4b ff fd 0d bl ffc12d04 <rtems_rfs_inode_initialise>
if (rc > 0)
ffc12ffc: 7c 7e 1b 79 mr. r30,r3
ffc13000: 40 a1 00 14 ble+ ffc13014 <rtems_rfs_inode_create+0x1b8><== ALWAYS TAKEN
{
rtems_rfs_inode_close (fs, &inode);
ffc13004: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc13008: 38 81 00 08 addi r4,r1,8 <== NOT EXECUTED
ffc1300c: 4b ff fa a9 bl ffc12ab4 <rtems_rfs_inode_close> <== NOT EXECUTED
ffc13010: 48 00 01 4c b ffc1315c <rtems_rfs_inode_create+0x300><== 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))
ffc13014: 2f 9d 40 00 cmpwi cr7,r29,16384
ffc13018: 40 be 00 54 bne+ cr7,ffc1306c <rtems_rfs_inode_create+0x210>
{
rc = rtems_rfs_dir_add_entry (fs, &inode, ".", 1, *ino);
ffc1301c: 3c a0 ff c3 lis r5,-61
ffc13020: 80 fc 00 00 lwz r7,0(r28)
ffc13024: 7f e3 fb 78 mr r3,r31
ffc13028: 38 81 00 08 addi r4,r1,8
ffc1302c: 38 a5 2b 85 addi r5,r5,11141
ffc13030: 38 c0 00 01 li r6,1
ffc13034: 48 00 a4 65 bl ffc1d498 <rtems_rfs_dir_add_entry>
if (rc == 0)
ffc13038: 7c 7e 1b 79 mr. r30,r3
ffc1303c: 40 a2 00 24 bne+ ffc13060 <rtems_rfs_inode_create+0x204><== NEVER TAKEN
rc = rtems_rfs_dir_add_entry (fs, &inode, "..", 2, parent);
ffc13040: 3c a0 ff c3 lis r5,-61
ffc13044: 7f e3 fb 78 mr r3,r31
ffc13048: 38 81 00 08 addi r4,r1,8
ffc1304c: 38 a5 2b 84 addi r5,r5,11140
ffc13050: 38 c0 00 02 li r6,2
ffc13054: 7f 47 d3 78 mr r7,r26
ffc13058: 48 00 a4 41 bl ffc1d498 <rtems_rfs_dir_add_entry>
ffc1305c: 7c 7e 1b 78 mr r30,r3
if (rc > 0)
ffc13060: 2f 9e 00 00 cmpwi cr7,r30,0
{
rtems_rfs_inode_delete (fs, &inode);
ffc13064: 7f e3 fb 78 mr r3,r31
if (RTEMS_RFS_S_ISDIR (mode))
{
rc = rtems_rfs_dir_add_entry (fs, &inode, ".", 1, *ino);
if (rc == 0)
rc = rtems_rfs_dir_add_entry (fs, &inode, "..", 2, parent);
if (rc > 0)
ffc13068: 41 9d 00 24 bgt- cr7,ffc1308c <rtems_rfs_inode_create+0x230><== NEVER TAKEN
rtems_rfs_inode_close (fs, &inode);
return rc;
}
}
rc = rtems_rfs_inode_open (fs, parent, &parent_inode, true);
ffc1306c: 7f e3 fb 78 mr r3,r31
ffc13070: 7f 44 d3 78 mr r4,r26
ffc13074: 38 a1 00 30 addi r5,r1,48
ffc13078: 38 c0 00 01 li r6,1
ffc1307c: 4b ff f8 45 bl ffc128c0 <rtems_rfs_inode_open>
if (rc > 0)
ffc13080: 7c 7e 1b 79 mr. r30,r3
{
rtems_rfs_inode_delete (fs, &inode);
ffc13084: 7f e3 fb 78 mr r3,r31
return rc;
}
}
rc = rtems_rfs_inode_open (fs, parent, &parent_inode, true);
if (rc > 0)
ffc13088: 40 81 00 0c ble- ffc13094 <rtems_rfs_inode_create+0x238><== ALWAYS TAKEN
{
rtems_rfs_inode_delete (fs, &inode);
ffc1308c: 38 81 00 08 addi r4,r1,8 <== NOT EXECUTED
ffc13090: 48 00 00 ac b ffc1313c <rtems_rfs_inode_create+0x2e0><== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
return rc;
}
rc = rtems_rfs_dir_add_entry (fs, &parent_inode, name, length, *ino);
ffc13094: 80 fc 00 00 lwz r7,0(r28)
ffc13098: 38 81 00 30 addi r4,r1,48
ffc1309c: 7f 25 cb 78 mr r5,r25
ffc130a0: 7f 06 c3 78 mr r6,r24
ffc130a4: 48 00 a3 f5 bl ffc1d498 <rtems_rfs_dir_add_entry>
if (rc > 0)
ffc130a8: 7c 7e 1b 79 mr. r30,r3
ffc130ac: 40 a1 00 28 ble+ ffc130d4 <rtems_rfs_inode_create+0x278><== ALWAYS TAKEN
{
rtems_rfs_inode_delete (fs, &inode);
ffc130b0: 38 81 00 08 addi r4,r1,8 <== NOT EXECUTED
ffc130b4: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc130b8: 4b ff fa a1 bl ffc12b58 <rtems_rfs_inode_delete> <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
ffc130bc: 38 81 00 08 addi r4,r1,8 <== NOT EXECUTED
ffc130c0: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc130c4: 4b ff f9 f1 bl ffc12ab4 <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_inode_close (fs, &parent_inode);
ffc130c8: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc130cc: 38 81 00 30 addi r4,r1,48 <== NOT EXECUTED
ffc130d0: 48 00 00 78 b ffc13148 <rtems_rfs_inode_create+0x2ec><== 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))
ffc130d4: 2f 9d 40 00 cmpwi cr7,r29,16384
ffc130d8: 40 be 00 48 bne+ cr7,ffc13120 <rtems_rfs_inode_create+0x2c4>
rtems_rfs_inode_set_links (&parent_inode,
rtems_rfs_inode_get_links (&parent_inode) + 1);
ffc130dc: 81 21 00 3c lwz r9,60(r1)
*/
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);
ffc130e0: 89 49 00 00 lbz r10,0(r9)
ffc130e4: 89 09 00 01 lbz r8,1(r9)
ffc130e8: 55 4a 40 2e rlwinm r10,r10,8,0,23
ffc130ec: 7d 4a 43 78 or r10,r10,r8
if (links == 0xffff)
ffc130f0: 6d 48 ff ff xoris r8,r10,65535
ffc130f4: 2f 88 ff ff cmpwi cr7,r8,-1
ffc130f8: 40 9e 00 08 bne- cr7,ffc13100 <rtems_rfs_inode_create+0x2a4><== ALWAYS TAKEN
links = 0;
ffc130fc: 39 40 00 00 li r10,0 <== 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))
rtems_rfs_inode_set_links (&parent_inode,
ffc13100: 39 4a 00 01 addi r10,r10,1
ffc13104: 55 4a 04 3e clrlwi r10,r10,16
* @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);
ffc13108: 55 48 c2 3e rlwinm r8,r10,24,8,31
ffc1310c: 99 09 00 00 stb r8,0(r9)
ffc13110: 81 21 00 3c lwz r9,60(r1)
ffc13114: 99 49 00 01 stb r10,1(r9)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
ffc13118: 39 20 00 01 li r9,1
ffc1311c: 99 21 00 40 stb r9,64(r1)
rtems_rfs_inode_get_links (&parent_inode) + 1);
rc = rtems_rfs_inode_close (fs, &parent_inode);
ffc13120: 38 81 00 30 addi r4,r1,48
ffc13124: 7f e3 fb 78 mr r3,r31
ffc13128: 4b ff f9 8d bl ffc12ab4 <rtems_rfs_inode_close>
if (rc > 0)
{
rtems_rfs_inode_delete (fs, &inode);
ffc1312c: 38 81 00 08 addi r4,r1,8
if (RTEMS_RFS_S_ISDIR (mode))
rtems_rfs_inode_set_links (&parent_inode,
rtems_rfs_inode_get_links (&parent_inode) + 1);
rc = rtems_rfs_inode_close (fs, &parent_inode);
if (rc > 0)
ffc13130: 7c 7e 1b 79 mr. r30,r3
{
rtems_rfs_inode_delete (fs, &inode);
ffc13134: 7f e3 fb 78 mr r3,r31
if (RTEMS_RFS_S_ISDIR (mode))
rtems_rfs_inode_set_links (&parent_inode,
rtems_rfs_inode_get_links (&parent_inode) + 1);
rc = rtems_rfs_inode_close (fs, &parent_inode);
if (rc > 0)
ffc13138: 40 81 00 18 ble- ffc13150 <rtems_rfs_inode_create+0x2f4><== ALWAYS TAKEN
{
rtems_rfs_inode_delete (fs, &inode);
ffc1313c: 4b ff fa 1d bl ffc12b58 <rtems_rfs_inode_delete> <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
ffc13140: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc13144: 38 81 00 08 addi r4,r1,8 <== NOT EXECUTED
ffc13148: 4b ff f9 6d bl ffc12ab4 <rtems_rfs_inode_close> <== NOT EXECUTED
ffc1314c: 48 00 00 2c b ffc13178 <rtems_rfs_inode_create+0x31c><== NOT EXECUTED
return rc;
}
rc = rtems_rfs_inode_close (fs, &inode);
ffc13150: 4b ff f9 65 bl ffc12ab4 <rtems_rfs_inode_close>
if (rc > 0)
ffc13154: 7c 7e 1b 79 mr. r30,r3
ffc13158: 40 81 00 1c ble- ffc13174 <rtems_rfs_inode_create+0x318><== ALWAYS TAKEN
{
rtems_rfs_inode_free (fs, *ino);
ffc1315c: 80 9c 00 00 lwz r4,0(r28) <== NOT EXECUTED
ffc13160: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc13164: 4b ff f6 95 bl ffc127f8 <rtems_rfs_inode_free> <== NOT EXECUTED
ffc13168: 48 00 00 10 b ffc13178 <rtems_rfs_inode_create+0x31c><== NOT EXECUTED
case RTEMS_RFS_S_IFBLK:
case RTEMS_RFS_S_IFREG:
case RTEMS_RFS_S_IFLNK:
break;
default:
return EINVAL;
ffc1316c: 3b c0 00 16 li r30,22 <== NOT EXECUTED
ffc13170: 48 00 00 08 b ffc13178 <rtems_rfs_inode_create+0x31c><== NOT EXECUTED
{
rtems_rfs_inode_free (fs, *ino);
return rc;
}
return 0;
ffc13174: 3b c0 00 00 li r30,0
}
ffc13178: 39 61 00 88 addi r11,r1,136
ffc1317c: 7f c3 f3 78 mr r3,r30
ffc13180: 4b fe e3 c0 b ffc01540 <_restgpr_20_x>
ffc12b58 <rtems_rfs_inode_delete>:
}
int
rtems_rfs_inode_delete (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle)
{
ffc12b58: 94 21 ff a0 stwu r1,-96(r1)
ffc12b5c: 7c 08 02 a6 mflr r0
ffc12b60: bf c1 00 58 stmw r30,88(r1)
ffc12b64: 7c 7e 1b 78 mr r30,r3
ffc12b68: 7c 9f 23 78 mr r31,r4
int rc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_DELETE))
ffc12b6c: 38 60 00 00 li r3,0
}
int
rtems_rfs_inode_delete (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle)
{
ffc12b70: 90 01 00 64 stw r0,100(r1)
int rc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_DELETE))
ffc12b74: 3c 80 00 80 lis r4,128
ffc12b78: 48 00 18 51 bl ffc143c8 <rtems_rfs_trace>
ffc12b7c: 2f 83 00 00 cmpwi cr7,r3,0
ffc12b80: 41 9e 00 38 beq- cr7,ffc12bb8 <rtems_rfs_inode_delete+0x60><== ALWAYS TAKEN
printf("rtems-rfs: inode-delete: ino:%" PRIu32 " loaded:%s\n",
ffc12b84: 81 3f 00 0c lwz r9,12(r31) <== NOT EXECUTED
ffc12b88: 80 9f 00 08 lwz r4,8(r31) <== NOT EXECUTED
ffc12b8c: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED
ffc12b90: 41 9e 00 10 beq- cr7,ffc12ba0 <rtems_rfs_inode_delete+0x48><== NOT EXECUTED
ffc12b94: 3c a0 ff c3 lis r5,-61 <== NOT EXECUTED
ffc12b98: 38 a5 4f 1e addi r5,r5,20254 <== NOT EXECUTED
ffc12b9c: 48 00 00 0c b ffc12ba8 <rtems_rfs_inode_delete+0x50> <== NOT EXECUTED
ffc12ba0: 3c a0 ff c3 lis r5,-61 <== NOT EXECUTED
ffc12ba4: 38 a5 53 ff addi r5,r5,21503 <== NOT EXECUTED
ffc12ba8: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc12bac: 38 63 4f fb addi r3,r3,20475 <== NOT EXECUTED
ffc12bb0: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc12bb4: 48 01 0d d9 bl ffc2398c <printf> <== NOT EXECUTED
rtems_rfs_inode_ino (handle),
rtems_rfs_inode_is_loaded (handle) ? "yes" : "no");
if (rtems_rfs_inode_is_loaded (handle))
ffc12bb8: 81 3f 00 0c lwz r9,12(r31)
int
rtems_rfs_inode_delete (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle)
{
int rc = 0;
ffc12bbc: 38 60 00 00 li r3,0
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_DELETE))
printf("rtems-rfs: inode-delete: ino:%" PRIu32 " loaded:%s\n",
rtems_rfs_inode_ino (handle),
rtems_rfs_inode_is_loaded (handle) ? "yes" : "no");
if (rtems_rfs_inode_is_loaded (handle))
ffc12bc0: 2f 89 00 00 cmpwi cr7,r9,0
ffc12bc4: 41 9e 00 78 beq- cr7,ffc12c3c <rtems_rfs_inode_delete+0xe4><== NEVER TAKEN
rtems_rfs_block_map map;
/*
* Free the ino number.
*/
rc = rtems_rfs_inode_free (fs, handle->ino);
ffc12bc8: 80 9f 00 08 lwz r4,8(r31)
ffc12bcc: 7f c3 f3 78 mr r3,r30
ffc12bd0: 4b ff fc 29 bl ffc127f8 <rtems_rfs_inode_free>
if (rc > 0)
ffc12bd4: 2c 03 00 00 cmpwi r3,0
ffc12bd8: 41 a1 00 64 bgt+ ffc12c3c <rtems_rfs_inode_delete+0xe4> <== NEVER TAKEN
return rc;
/*
* Free the blocks the inode may have attached.
*/
rc = rtems_rfs_block_map_open (fs, handle, &map);
ffc12bdc: 7f c3 f3 78 mr r3,r30
ffc12be0: 7f e4 fb 78 mr r4,r31
ffc12be4: 38 a1 00 08 addi r5,r1,8
ffc12be8: 48 00 8c 41 bl ffc1b828 <rtems_rfs_block_map_open>
if (rc == 0)
ffc12bec: 2c 03 00 00 cmpwi r3,0
ffc12bf0: 40 a2 00 4c bne+ ffc12c3c <rtems_rfs_inode_delete+0xe4> <== NEVER TAKEN
{
int rrc;
rrc = rtems_rfs_block_map_free_all (fs, &map);
ffc12bf4: 38 81 00 08 addi r4,r1,8
ffc12bf8: 7f c3 f3 78 mr r3,r30
ffc12bfc: 48 00 98 a9 bl ffc1c4a4 <rtems_rfs_block_map_free_all>
rc = rtems_rfs_block_map_close (fs, &map);
ffc12c00: 38 81 00 08 addi r4,r1,8
ffc12c04: 7f c3 f3 78 mr r3,r30
ffc12c08: 48 00 8d d9 bl ffc1b9e0 <rtems_rfs_block_map_close>
if (rc > 0)
rrc = rc;
memset (handle->node, 0xff, RTEMS_RFS_INODE_SIZE);
ffc12c0c: 80 7f 00 0c lwz r3,12(r31)
ffc12c10: 38 80 00 ff li r4,255
ffc12c14: 38 a0 00 38 li r5,56
ffc12c18: 48 01 0b 19 bl ffc23730 <memset>
rtems_rfs_buffer_mark_dirty (&handle->buffer);
ffc12c1c: 39 20 00 01 li r9,1
ffc12c20: 7f e4 fb 78 mr r4,r31
ffc12c24: 9d 24 00 10 stbu r9,16(r4)
/*
* 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);
ffc12c28: 7f c3 f3 78 mr r3,r30
ffc12c2c: 48 00 9a 2d bl ffc1c658 <rtems_rfs_buffer_handle_release>
handle->loads = 0;
ffc12c30: 39 20 00 00 li r9,0
ffc12c34: 91 3f 00 24 stw r9,36(r31)
handle->node = NULL;
ffc12c38: 91 3f 00 0c stw r9,12(r31)
}
}
return rc;
}
ffc12c3c: 39 61 00 60 addi r11,r1,96
ffc12c40: 4b fe e9 28 b ffc01568 <_restgpr_30_x>
ffc2041c <rtems_rfs_inode_get_block.isra.0>:
* @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]);
ffc2041c: 38 84 00 04 addi r4,r4,4 <== NOT EXECUTED
ffc20420: 54 84 10 3a rlwinm r4,r4,2,0,29 <== NOT EXECUTED
ffc20424: 7c 63 22 14 add r3,r3,r4 <== NOT EXECUTED
ffc20428: 39 23 00 0c addi r9,r3,12 <== NOT EXECUTED
ffc2042c: 88 63 00 0c lbz r3,12(r3) <== NOT EXECUTED
ffc20430: 89 49 00 01 lbz r10,1(r9) <== NOT EXECUTED
ffc20434: 54 63 c0 0e rlwinm r3,r3,24,0,7 <== NOT EXECUTED
ffc20438: 55 4a 80 1e rlwinm r10,r10,16,0,15 <== NOT EXECUTED
ffc2043c: 7c 63 53 78 or r3,r3,r10 <== NOT EXECUTED
ffc20440: 89 49 00 03 lbz r10,3(r9) <== NOT EXECUTED
ffc20444: 89 29 00 02 lbz r9,2(r9) <== NOT EXECUTED
ffc20448: 7c 63 53 78 or r3,r3,r10 <== NOT EXECUTED
ffc2044c: 55 29 40 2e rlwinm r9,r9,8,0,23 <== NOT EXECUTED
}
ffc20450: 7c 63 4b 78 or r3,r3,r9 <== NOT EXECUTED
ffc20454: 4e 80 00 20 blr <== NOT EXECUTED
ffc13acc <rtems_rfs_inode_get_block.isra.12>:
* @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]);
ffc13acc: 38 84 00 04 addi r4,r4,4 <== NOT EXECUTED
ffc13ad0: 54 84 10 3a rlwinm r4,r4,2,0,29 <== NOT EXECUTED
ffc13ad4: 7c 63 22 14 add r3,r3,r4 <== NOT EXECUTED
ffc13ad8: 39 23 00 0c addi r9,r3,12 <== NOT EXECUTED
ffc13adc: 88 63 00 0c lbz r3,12(r3) <== NOT EXECUTED
ffc13ae0: 89 49 00 01 lbz r10,1(r9) <== NOT EXECUTED
ffc13ae4: 54 63 c0 0e rlwinm r3,r3,24,0,7 <== NOT EXECUTED
ffc13ae8: 55 4a 80 1e rlwinm r10,r10,16,0,15 <== NOT EXECUTED
ffc13aec: 7c 63 53 78 or r3,r3,r10 <== NOT EXECUTED
ffc13af0: 89 49 00 03 lbz r10,3(r9) <== NOT EXECUTED
ffc13af4: 89 29 00 02 lbz r9,2(r9) <== NOT EXECUTED
ffc13af8: 7c 63 53 78 or r3,r3,r10 <== NOT EXECUTED
ffc13afc: 55 29 40 2e rlwinm r9,r9,8,0,23 <== NOT EXECUTED
}
ffc13b00: 7c 63 4b 78 or r3,r3,r9 <== NOT EXECUTED
ffc13b04: 4e 80 00 20 blr <== NOT EXECUTED
ffc20ba4 <rtems_rfs_inode_get_block.isra.5>:
* @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]);
ffc20ba4: 38 84 00 04 addi r4,r4,4 <== NOT EXECUTED
ffc20ba8: 54 84 10 3a rlwinm r4,r4,2,0,29 <== NOT EXECUTED
ffc20bac: 7c 63 22 14 add r3,r3,r4 <== NOT EXECUTED
ffc20bb0: 39 23 00 0c addi r9,r3,12 <== NOT EXECUTED
ffc20bb4: 88 63 00 0c lbz r3,12(r3) <== NOT EXECUTED
ffc20bb8: 89 49 00 01 lbz r10,1(r9) <== NOT EXECUTED
ffc20bbc: 54 63 c0 0e rlwinm r3,r3,24,0,7 <== NOT EXECUTED
ffc20bc0: 55 4a 80 1e rlwinm r10,r10,16,0,15 <== NOT EXECUTED
ffc20bc4: 7c 63 53 78 or r3,r3,r10 <== NOT EXECUTED
ffc20bc8: 89 49 00 03 lbz r10,3(r9) <== NOT EXECUTED
ffc20bcc: 89 29 00 02 lbz r9,2(r9) <== NOT EXECUTED
ffc20bd0: 7c 63 53 78 or r3,r3,r10 <== NOT EXECUTED
ffc20bd4: 55 29 40 2e rlwinm r9,r9,8,0,23 <== NOT EXECUTED
}
ffc20bd8: 7c 63 4b 78 or r3,r3,r9 <== NOT EXECUTED
ffc20bdc: 4e 80 00 20 blr <== NOT EXECUTED
ffc12804 <rtems_rfs_inode_load>:
}
int
rtems_rfs_inode_load (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle)
{
ffc12804: 94 21 ff f0 stwu r1,-16(r1)
ffc12808: 7c 08 02 a6 mflr r0
ffc1280c: bf c1 00 08 stmw r30,8(r1)
ffc12810: 7c 7e 1b 78 mr r30,r3
ffc12814: 7c 9f 23 78 mr r31,r4
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_LOAD))
ffc12818: 38 60 00 00 li r3,0
}
int
rtems_rfs_inode_load (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle)
{
ffc1281c: 90 01 00 14 stw r0,20(r1)
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_LOAD))
ffc12820: 3c 80 00 10 lis r4,16
ffc12824: 48 00 1b a5 bl ffc143c8 <rtems_rfs_trace>
ffc12828: 2f 83 00 00 cmpwi cr7,r3,0
ffc1282c: 41 9e 00 3c beq- cr7,ffc12868 <rtems_rfs_inode_load+0x64><== ALWAYS TAKEN
printf ("rtems-rfs: inode-load: ino=%" PRIu32 " loads=%i loaded=%s\n",
ffc12830: 81 3f 00 0c lwz r9,12(r31) <== NOT EXECUTED
ffc12834: 80 9f 00 08 lwz r4,8(r31) <== NOT EXECUTED
ffc12838: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED
ffc1283c: 80 bf 00 24 lwz r5,36(r31) <== NOT EXECUTED
ffc12840: 41 9e 00 10 beq- cr7,ffc12850 <rtems_rfs_inode_load+0x4c><== NOT EXECUTED
ffc12844: 3c c0 ff c3 lis r6,-61 <== NOT EXECUTED
ffc12848: 38 c6 4f 1e addi r6,r6,20254 <== NOT EXECUTED
ffc1284c: 48 00 00 0c b ffc12858 <rtems_rfs_inode_load+0x54> <== NOT EXECUTED
ffc12850: 3c c0 ff c3 lis r6,-61 <== NOT EXECUTED
ffc12854: 38 c6 53 ff addi r6,r6,21503 <== NOT EXECUTED
ffc12858: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1285c: 38 63 4f 22 addi r3,r3,20258 <== NOT EXECUTED
ffc12860: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc12864: 48 01 11 29 bl ffc2398c <printf> <== NOT EXECUTED
/*
* An inode does not move so once loaded no need to do again.
*/
if (!rtems_rfs_inode_is_loaded (handle))
ffc12868: 81 3f 00 0c lwz r9,12(r31)
ffc1286c: 2f 89 00 00 cmpwi cr7,r9,0
ffc12870: 40 be 00 38 bne+ cr7,ffc128a8 <rtems_rfs_inode_load+0xa4>
{
int rc;
rc = rtems_rfs_buffer_handle_request (fs,&handle->buffer,
ffc12874: 80 bf 00 1c lwz r5,28(r31)
ffc12878: 7f c3 f3 78 mr r3,r30
ffc1287c: 38 9f 00 10 addi r4,r31,16
ffc12880: 38 c0 00 01 li r6,1
ffc12884: 48 00 9f b9 bl ffc1c83c <rtems_rfs_buffer_handle_request>
handle->block, true);
if (rc > 0)
ffc12888: 2c 03 00 00 cmpwi r3,0
ffc1288c: 41 a1 00 2c bgt+ ffc128b8 <rtems_rfs_inode_load+0xb4> <== NEVER TAKEN
return rc;
handle->node = rtems_rfs_buffer_data (&handle->buffer);
ffc12890: 81 3f 00 18 lwz r9,24(r31)
handle->node += handle->offset;
ffc12894: 81 5f 00 20 lwz r10,32(r31)
ffc12898: 81 29 00 1c lwz r9,28(r9)
ffc1289c: 1d 4a 00 38 mulli r10,r10,56
ffc128a0: 7d 49 52 14 add r10,r9,r10
ffc128a4: 91 5f 00 0c stw r10,12(r31)
}
handle->loads++;
ffc128a8: 81 3f 00 24 lwz r9,36(r31)
return 0;
ffc128ac: 38 60 00 00 li r3,0
handle->node = rtems_rfs_buffer_data (&handle->buffer);
handle->node += handle->offset;
}
handle->loads++;
ffc128b0: 39 29 00 01 addi r9,r9,1
ffc128b4: 91 3f 00 24 stw r9,36(r31)
return 0;
}
ffc128b8: 39 61 00 10 addi r11,r1,16
ffc128bc: 4b fe ec ac b ffc01568 <_restgpr_30_x>
ffc128c0 <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)
{
ffc128c0: 94 21 ff e8 stwu r1,-24(r1)
ffc128c4: 7c 08 02 a6 mflr r0
ffc128c8: bf 81 00 08 stmw r28,8(r1)
ffc128cc: 7c 7e 1b 78 mr r30,r3
ffc128d0: 7c 9d 23 78 mr r29,r4
int group;
int gino;
int index;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_OPEN))
ffc128d4: 38 60 00 00 li r3,0
int
rtems_rfs_inode_open (rtems_rfs_file_system* fs,
rtems_rfs_ino ino,
rtems_rfs_inode_handle* handle,
bool load)
{
ffc128d8: 90 01 00 1c stw r0,28(r1)
int group;
int gino;
int index;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_OPEN))
ffc128dc: 3c 80 00 04 lis r4,4
int
rtems_rfs_inode_open (rtems_rfs_file_system* fs,
rtems_rfs_ino ino,
rtems_rfs_inode_handle* handle,
bool load)
{
ffc128e0: 7c bf 2b 78 mr r31,r5
ffc128e4: 7c dc 33 78 mr r28,r6
int group;
int gino;
int index;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_OPEN))
ffc128e8: 48 00 1a e1 bl ffc143c8 <rtems_rfs_trace>
ffc128ec: 2f 83 00 00 cmpwi cr7,r3,0
ffc128f0: 41 be 00 18 beq+ cr7,ffc12908 <rtems_rfs_inode_open+0x48><== ALWAYS TAKEN
printf ("rtems-rfs: inode-open: ino: %" PRIu32 "\n", ino);
ffc128f4: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc128f8: 38 63 4f 55 addi r3,r3,20309 <== NOT EXECUTED
ffc128fc: 7f a4 eb 78 mr r4,r29 <== NOT EXECUTED
ffc12900: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc12904: 48 01 10 89 bl ffc2398c <printf> <== NOT EXECUTED
if (ino == RTEMS_RFS_EMPTY_INO)
ffc12908: 2f 9d 00 00 cmpwi cr7,r29,0
return EINVAL;
ffc1290c: 38 60 00 16 li r3,22
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)
ffc12910: 41 be 00 94 beq+ cr7,ffc129a4 <rtems_rfs_inode_open+0xe4><== NEVER TAKEN
return EINVAL;
if ((ino - RTEMS_RFS_ROOT_INO) > rtems_rfs_fs_inodes (fs))
ffc12914: 81 3e 00 14 lwz r9,20(r30)
ffc12918: 39 5d ff ff addi r10,r29,-1
ffc1291c: 7f 8a 48 40 cmplw cr7,r10,r9
ffc12920: 41 bd 00 84 bgt+ cr7,ffc129a4 <rtems_rfs_inode_open+0xe4><== NEVER TAKEN
handle->ino = ino;
handle->node = NULL;
handle->loads = 0;
gino = ino - RTEMS_RFS_ROOT_INO;
group = gino / fs->group_inodes;
ffc12924: 81 1e 00 2c lwz r8,44(r30)
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)
ffc12928: 2f 9c 00 00 cmpwi cr7,r28,0
if ((ino - RTEMS_RFS_ROOT_INO) > rtems_rfs_fs_inodes (fs))
return EINVAL;
handle->ino = ino;
handle->node = NULL;
ffc1292c: 39 20 00 00 li r9,0
return EINVAL;
if ((ino - RTEMS_RFS_ROOT_INO) > rtems_rfs_fs_inodes (fs))
return EINVAL;
handle->ino = ino;
ffc12930: 93 bf 00 08 stw r29,8(r31)
handle->node = NULL;
handle->loads = 0;
gino = ino - RTEMS_RFS_ROOT_INO;
group = gino / fs->group_inodes;
gino = gino % fs->group_inodes;
ffc12934: 7c aa 43 96 divwu r5,r10,r8
if ((ino - RTEMS_RFS_ROOT_INO) > rtems_rfs_fs_inodes (fs))
return EINVAL;
handle->ino = ino;
handle->node = NULL;
ffc12938: 91 3f 00 0c stw r9,12(r31)
handle->loads = 0;
ffc1293c: 91 3f 00 24 stw r9,36(r31)
gino = ino - RTEMS_RFS_ROOT_INO;
group = gino / fs->group_inodes;
gino = gino % fs->group_inodes;
ffc12940: 7d 05 41 d6 mullw r8,r5,r8
index = (gino / fs->inodes_per_block) + RTEMS_RFS_GROUP_INODE_BLOCK;
handle->offset = gino % fs->inodes_per_block;
handle->block = rtems_rfs_group_block (&fs->groups[group], index);
ffc12944: 1c a5 00 50 mulli r5,r5,80
handle->node = NULL;
handle->loads = 0;
gino = ino - RTEMS_RFS_ROOT_INO;
group = gino / fs->group_inodes;
gino = gino % fs->group_inodes;
ffc12948: 7d 48 50 50 subf r10,r8,r10
index = (gino / fs->inodes_per_block) + RTEMS_RFS_GROUP_INODE_BLOCK;
ffc1294c: 81 1e 00 30 lwz r8,48(r30)
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);
ffc12950: 38 60 00 00 li r3,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;
handle->offset = gino % fs->inodes_per_block;
ffc12954: 7c ea 43 96 divwu r7,r10,r8
ffc12958: 7d 07 41 d6 mullw r8,r7,r8
ffc1295c: 7d 48 50 50 subf r10,r8,r10
ffc12960: 91 5f 00 20 stw r10,32(r31)
handle->block = rtems_rfs_group_block (&fs->groups[group], index);
ffc12964: 81 5e 00 20 lwz r10,32(r30)
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;
ffc12968: 7d 4a 28 2e lwzx r10,r10,r5
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
ffc1296c: 99 3f 00 10 stb r9,16(r31)
ffc12970: 39 4a 00 02 addi r10,r10,2
handle->offset = gino % fs->inodes_per_block;
handle->block = rtems_rfs_group_block (&fs->groups[group], index);
ffc12974: 7c ea 3a 14 add r7,r10,r7
handle->bnum = 0;
ffc12978: 91 3f 00 14 stw r9,20(r31)
ffc1297c: 90 ff 00 1c stw r7,28(r31)
handle->buffer = NULL;
ffc12980: 91 3f 00 18 stw r9,24(r31)
rc = rtems_rfs_buffer_handle_open (fs, &handle->buffer);
if ((rc == 0) && load)
ffc12984: 41 be 00 20 beq+ cr7,ffc129a4 <rtems_rfs_inode_open+0xe4><== NEVER TAKEN
rc = rtems_rfs_inode_load (fs, handle);
return rc;
}
ffc12988: 80 01 00 1c lwz r0,28(r1)
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);
ffc1298c: 7f c3 f3 78 mr r3,r30
ffc12990: 7f e4 fb 78 mr r4,r31
return rc;
}
ffc12994: bb 81 00 08 lmw r28,8(r1)
ffc12998: 7c 08 03 a6 mtlr r0
ffc1299c: 38 21 00 18 addi r1,r1,24
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);
ffc129a0: 4b ff fe 64 b ffc12804 <rtems_rfs_inode_load>
return rc;
}
ffc129a4: 39 61 00 18 addi r11,r1,24 <== NOT EXECUTED
ffc129a8: 4b fe eb b8 b ffc01560 <_restgpr_28_x> <== NOT EXECUTED
ffc131ec <rtems_rfs_inode_set_block>:
* @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);
ffc131ec: 81 23 00 0c lwz r9,12(r3) <== NOT EXECUTED
ffc131f0: 38 84 00 04 addi r4,r4,4 <== NOT EXECUTED
ffc131f4: 54 84 10 3a rlwinm r4,r4,2,0,29 <== NOT EXECUTED
ffc131f8: 7d 29 22 14 add r9,r9,r4 <== NOT EXECUTED
ffc131fc: 54 aa 46 3e rlwinm r10,r5,8,24,31 <== NOT EXECUTED
ffc13200: 99 49 00 0c stb r10,12(r9) <== NOT EXECUTED
ffc13204: 54 aa 84 3e rlwinm r10,r5,16,16,31 <== NOT EXECUTED
ffc13208: 81 23 00 0c lwz r9,12(r3) <== NOT EXECUTED
ffc1320c: 7d 29 22 14 add r9,r9,r4 <== NOT EXECUTED
ffc13210: 99 49 00 0d stb r10,13(r9) <== NOT EXECUTED
ffc13214: 54 aa c2 3e rlwinm r10,r5,24,8,31 <== NOT EXECUTED
ffc13218: 81 23 00 0c lwz r9,12(r3) <== NOT EXECUTED
ffc1321c: 7d 29 22 14 add r9,r9,r4 <== NOT EXECUTED
ffc13220: 99 49 00 0e stb r10,14(r9) <== NOT EXECUTED
ffc13224: 81 23 00 0c lwz r9,12(r3) <== NOT EXECUTED
ffc13228: 7c 89 22 14 add r4,r9,r4 <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
ffc1322c: 39 20 00 01 li r9,1 <== NOT EXECUTED
* @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);
ffc13230: 98 a4 00 0f stb r5,15(r4) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
ffc13234: 99 23 00 10 stb r9,16(r3) <== NOT EXECUTED
ffc13238: 4e 80 00 20 blr <== NOT EXECUTED
ffc12c44 <rtems_rfs_inode_time_stamp_now>:
int
rtems_rfs_inode_time_stamp_now (rtems_rfs_inode_handle* handle,
bool atime,
bool mtime)
{
ffc12c44: 94 21 ff e8 stwu r1,-24(r1)
ffc12c48: 7c 08 02 a6 mflr r0
ffc12c4c: 90 01 00 1c stw r0,28(r1)
time_t now;
if (!rtems_rfs_inode_is_loaded (handle))
ffc12c50: 81 23 00 0c lwz r9,12(r3)
int
rtems_rfs_inode_time_stamp_now (rtems_rfs_inode_handle* handle,
bool atime,
bool mtime)
{
ffc12c54: bf a1 00 0c stmw r29,12(r1)
ffc12c58: 7c 7f 1b 78 mr r31,r3
time_t now;
if (!rtems_rfs_inode_is_loaded (handle))
ffc12c5c: 2f 89 00 00 cmpwi cr7,r9,0
return ENXIO;
ffc12c60: 38 60 00 06 li r3,6
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))
ffc12c64: 41 9e 00 98 beq- cr7,ffc12cfc <rtems_rfs_inode_time_stamp_now+0xb8><== NEVER TAKEN
ffc12c68: 7c 9e 23 78 mr r30,r4
return ENXIO;
now = time (NULL);
ffc12c6c: 38 60 00 00 li r3,0
ffc12c70: 7c bd 2b 78 mr r29,r5
ffc12c74: 48 01 50 fd bl ffc27d70 <time>
if (atime)
ffc12c78: 2f 9e 00 00 cmpwi cr7,r30,0
bool mtime)
{
time_t now;
if (!rtems_rfs_inode_is_loaded (handle))
return ENXIO;
now = time (NULL);
ffc12c7c: 7c 69 1b 78 mr r9,r3
if (atime)
ffc12c80: 41 be 00 38 beq+ cr7,ffc12cb8 <rtems_rfs_inode_time_stamp_now+0x74><== 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);
ffc12c84: 81 5f 00 0c lwz r10,12(r31)
ffc12c88: 54 68 46 3e rlwinm r8,r3,8,24,31
ffc12c8c: 99 0a 00 10 stb r8,16(r10)
ffc12c90: 54 68 84 3e rlwinm r8,r3,16,16,31
ffc12c94: 81 5f 00 0c lwz r10,12(r31)
ffc12c98: 99 0a 00 11 stb r8,17(r10)
ffc12c9c: 54 68 c2 3e rlwinm r8,r3,24,8,31
ffc12ca0: 81 5f 00 0c lwz r10,12(r31)
ffc12ca4: 99 0a 00 12 stb r8,18(r10)
ffc12ca8: 81 5f 00 0c lwz r10,12(r31)
ffc12cac: 98 6a 00 13 stb r3,19(r10)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
ffc12cb0: 39 40 00 01 li r10,1
ffc12cb4: 99 5f 00 10 stb r10,16(r31)
rtems_rfs_inode_set_atime (handle, now);
if (mtime)
ffc12cb8: 2f 9d 00 00 cmpwi cr7,r29,0
rtems_rfs_inode_set_mtime (handle, now);
return 0;
ffc12cbc: 38 60 00 00 li r3,0
if (!rtems_rfs_inode_is_loaded (handle))
return ENXIO;
now = time (NULL);
if (atime)
rtems_rfs_inode_set_atime (handle, now);
if (mtime)
ffc12cc0: 41 be 00 3c beq+ cr7,ffc12cfc <rtems_rfs_inode_time_stamp_now+0xb8><== 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);
ffc12cc4: 81 5f 00 0c lwz r10,12(r31)
ffc12cc8: 55 28 46 3e rlwinm r8,r9,8,24,31
ffc12ccc: 99 0a 00 14 stb r8,20(r10)
ffc12cd0: 55 28 84 3e rlwinm r8,r9,16,16,31
ffc12cd4: 81 5f 00 0c lwz r10,12(r31)
ffc12cd8: 99 0a 00 15 stb r8,21(r10)
ffc12cdc: 55 28 c2 3e rlwinm r8,r9,24,8,31
ffc12ce0: 81 5f 00 0c lwz r10,12(r31)
ffc12ce4: 99 0a 00 16 stb r8,22(r10)
ffc12ce8: 81 5f 00 0c lwz r10,12(r31)
ffc12cec: 99 2a 00 17 stb r9,23(r10)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
ffc12cf0: 39 20 00 01 li r9,1
ffc12cf4: 99 3f 00 10 stb r9,16(r31)
ffc12cf8: 48 00 00 04 b ffc12cfc <rtems_rfs_inode_time_stamp_now+0xb8>
rtems_rfs_inode_set_mtime (handle, now);
return 0;
}
ffc12cfc: 39 61 00 18 addi r11,r1,24
ffc12d00: 4b fe e8 64 b ffc01564 <_restgpr_29_x>
ffc129ac <rtems_rfs_inode_unload>:
int
rtems_rfs_inode_unload (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle,
bool update_ctime)
{
ffc129ac: 94 21 ff e8 stwu r1,-24(r1)
ffc129b0: 7c 08 02 a6 mflr r0
ffc129b4: bf a1 00 0c stmw r29,12(r1)
ffc129b8: 7c 7e 1b 78 mr r30,r3
ffc129bc: 7c 9f 23 78 mr r31,r4
int rc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_UNLOAD))
ffc129c0: 38 60 00 00 li r3,0
int
rtems_rfs_inode_unload (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle,
bool update_ctime)
{
ffc129c4: 90 01 00 1c stw r0,28(r1)
int rc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_UNLOAD))
ffc129c8: 3c 80 00 20 lis r4,32
int
rtems_rfs_inode_unload (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle,
bool update_ctime)
{
ffc129cc: 7c bd 2b 78 mr r29,r5
int rc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_UNLOAD))
ffc129d0: 48 00 19 f9 bl ffc143c8 <rtems_rfs_trace>
ffc129d4: 2f 83 00 00 cmpwi cr7,r3,0
ffc129d8: 41 9e 00 3c beq- cr7,ffc12a14 <rtems_rfs_inode_unload+0x68><== ALWAYS TAKEN
printf ("rtems-rfs: inode-unload: ino=%" PRIu32 " loads=%i loaded=%s\n",
ffc129dc: 81 3f 00 0c lwz r9,12(r31) <== NOT EXECUTED
ffc129e0: 80 9f 00 08 lwz r4,8(r31) <== NOT EXECUTED
ffc129e4: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED
ffc129e8: 80 bf 00 24 lwz r5,36(r31) <== NOT EXECUTED
ffc129ec: 41 9e 00 10 beq- cr7,ffc129fc <rtems_rfs_inode_unload+0x50><== NOT EXECUTED
ffc129f0: 3c c0 ff c3 lis r6,-61 <== NOT EXECUTED
ffc129f4: 38 c6 4f 1e addi r6,r6,20254 <== NOT EXECUTED
ffc129f8: 48 00 00 0c b ffc12a04 <rtems_rfs_inode_unload+0x58> <== NOT EXECUTED
ffc129fc: 3c c0 ff c3 lis r6,-61 <== NOT EXECUTED
ffc12a00: 38 c6 53 ff addi r6,r6,21503 <== NOT EXECUTED
ffc12a04: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc12a08: 38 63 4f 76 addi r3,r3,20342 <== NOT EXECUTED
ffc12a0c: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc12a10: 48 01 0f 7d bl ffc2398c <printf> <== NOT EXECUTED
handle->ino, handle->loads,
rtems_rfs_inode_is_loaded (handle) ? "yes" : "no");
if (rtems_rfs_inode_is_loaded (handle))
ffc12a14: 81 3f 00 0c lwz r9,12(r31)
ffc12a18: 2f 89 00 00 cmpwi cr7,r9,0
ffc12a1c: 40 be 00 0c bne+ cr7,ffc12a28 <rtems_rfs_inode_unload+0x7c>
int
rtems_rfs_inode_unload (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle,
bool update_ctime)
{
int rc = 0;
ffc12a20: 38 60 00 00 li r3,0
ffc12a24: 48 00 00 88 b ffc12aac <rtems_rfs_inode_unload+0x100>
handle->ino, handle->loads,
rtems_rfs_inode_is_loaded (handle) ? "yes" : "no");
if (rtems_rfs_inode_is_loaded (handle))
{
if (handle->loads == 0)
ffc12a28: 81 5f 00 24 lwz r10,36(r31)
return EIO;
ffc12a2c: 38 60 00 05 li r3,5
handle->ino, handle->loads,
rtems_rfs_inode_is_loaded (handle) ? "yes" : "no");
if (rtems_rfs_inode_is_loaded (handle))
{
if (handle->loads == 0)
ffc12a30: 2f 8a 00 00 cmpwi cr7,r10,0
ffc12a34: 41 be 00 78 beq+ cr7,ffc12aac <rtems_rfs_inode_unload+0x100><== NEVER TAKEN
return EIO;
handle->loads--;
ffc12a38: 39 2a ff ff addi r9,r10,-1
if (handle->loads == 0)
ffc12a3c: 2f 89 00 00 cmpwi cr7,r9,0
if (rtems_rfs_inode_is_loaded (handle))
{
if (handle->loads == 0)
return EIO;
handle->loads--;
ffc12a40: 91 3f 00 24 stw r9,36(r31)
if (handle->loads == 0)
ffc12a44: 40 be ff dc bne- cr7,ffc12a20 <rtems_rfs_inode_unload+0x74>
{
/*
* If the buffer is dirty it will be release. Also set the ctime.
*/
if (rtems_rfs_buffer_dirty (&handle->buffer) && update_ctime)
ffc12a48: 89 3f 00 10 lbz r9,16(r31)
ffc12a4c: 2f 89 00 00 cmpwi cr7,r9,0
ffc12a50: 41 9e 00 48 beq- cr7,ffc12a98 <rtems_rfs_inode_unload+0xec>
ffc12a54: 2f 9d 00 00 cmpwi cr7,r29,0
ffc12a58: 41 be 00 40 beq+ cr7,ffc12a98 <rtems_rfs_inode_unload+0xec><== NEVER TAKEN
rtems_rfs_inode_set_ctime (handle, time (NULL));
ffc12a5c: 38 60 00 00 li r3,0
ffc12a60: 48 01 53 11 bl ffc27d70 <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);
ffc12a64: 81 5f 00 0c lwz r10,12(r31)
ffc12a68: 54 68 46 3e rlwinm r8,r3,8,24,31
ffc12a6c: 99 0a 00 18 stb r8,24(r10)
ffc12a70: 54 68 84 3e rlwinm r8,r3,16,16,31
rtems_rfs_buffer_mark_dirty (&handle->buffer);
ffc12a74: 39 20 00 01 li r9,1
*/
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);
ffc12a78: 81 5f 00 0c lwz r10,12(r31)
ffc12a7c: 99 0a 00 19 stb r8,25(r10)
ffc12a80: 54 68 c2 3e rlwinm r8,r3,24,8,31
ffc12a84: 81 5f 00 0c lwz r10,12(r31)
ffc12a88: 99 0a 00 1a stb r8,26(r10)
ffc12a8c: 81 5f 00 0c lwz r10,12(r31)
ffc12a90: 98 6a 00 1b stb r3,27(r10)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
ffc12a94: 99 3f 00 10 stb r9,16(r31)
rc = rtems_rfs_buffer_handle_release (fs, &handle->buffer);
ffc12a98: 7f c3 f3 78 mr r3,r30
ffc12a9c: 38 9f 00 10 addi r4,r31,16
ffc12aa0: 48 00 9b b9 bl ffc1c658 <rtems_rfs_buffer_handle_release>
handle->node = NULL;
ffc12aa4: 39 40 00 00 li r10,0
ffc12aa8: 91 5f 00 0c stw r10,12(r31)
}
}
return rc;
}
ffc12aac: 39 61 00 18 addi r11,r1,24
ffc12ab0: 4b fe ea b4 b ffc01564 <_restgpr_29_x>
ffc1f928 <rtems_rfs_link>:
const char* name,
int length,
rtems_rfs_ino parent,
rtems_rfs_ino target,
bool link_dir)
{
ffc1f928: 94 21 ff 88 stwu r1,-120(r1)
ffc1f92c: 7c 08 02 a6 mflr r0
ffc1f930: bf 21 00 5c stmw r25,92(r1)
ffc1f934: 7c 7f 1b 78 mr r31,r3
ffc1f938: 7c 9b 23 78 mr r27,r4
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))
ffc1f93c: 38 60 00 00 li r3,0
const char* name,
int length,
rtems_rfs_ino parent,
rtems_rfs_ino target,
bool link_dir)
{
ffc1f940: 90 01 00 7c stw r0,124(r1)
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))
ffc1f944: 3c 80 01 00 lis r4,256
const char* name,
int length,
rtems_rfs_ino parent,
rtems_rfs_ino target,
bool link_dir)
{
ffc1f948: 7c bc 2b 78 mr r28,r5
ffc1f94c: 7c da 33 78 mr r26,r6
ffc1f950: 7c fd 3b 78 mr r29,r7
ffc1f954: 7d 19 43 78 mr r25,r8
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))
ffc1f958: 4b ff 4a 71 bl ffc143c8 <rtems_rfs_trace>
ffc1f95c: 2f 83 00 00 cmpwi cr7,r3,0
ffc1f960: 41 be 00 48 beq+ cr7,ffc1f9a8 <rtems_rfs_link+0x80> <== ALWAYS TAKEN
{
int c;
printf ("rtems-rfs: link: parent(%" PRIu32 ") -> ", parent);
ffc1f964: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1f968: 38 63 6f 9f addi r3,r3,28575 <== NOT EXECUTED
ffc1f96c: 7f 44 d3 78 mr r4,r26 <== NOT EXECUTED
ffc1f970: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1f974: 48 00 40 19 bl ffc2398c <printf> <== NOT EXECUTED
for (c = 0; c < length; c++)
ffc1f978: 3b c0 00 00 li r30,0 <== NOT EXECUTED
ffc1f97c: 48 00 00 10 b ffc1f98c <rtems_rfs_link+0x64> <== NOT EXECUTED
printf ("%c", name[c]);
ffc1f980: 7c 7b f0 ae lbzx r3,r27,r30 <== 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++)
ffc1f984: 3b de 00 01 addi r30,r30,1 <== NOT EXECUTED
printf ("%c", name[c]);
ffc1f988: 48 00 42 91 bl ffc23c18 <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++)
ffc1f98c: 7f 9e e0 00 cmpw cr7,r30,r28 <== NOT EXECUTED
ffc1f990: 41 9c ff f0 blt+ cr7,ffc1f980 <rtems_rfs_link+0x58> <== NOT EXECUTED
printf ("%c", name[c]);
printf ("(%" PRIu32 ")\n", target);
ffc1f994: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1f998: 38 63 6f e4 addi r3,r3,28644 <== NOT EXECUTED
ffc1f99c: 7f a4 eb 78 mr r4,r29 <== NOT EXECUTED
ffc1f9a0: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1f9a4: 48 00 3f e9 bl ffc2398c <printf> <== NOT EXECUTED
}
rc = rtems_rfs_inode_open (fs, target, &target_inode, true);
ffc1f9a8: 7f e3 fb 78 mr r3,r31
ffc1f9ac: 7f a4 eb 78 mr r4,r29
ffc1f9b0: 38 a1 00 08 addi r5,r1,8
ffc1f9b4: 38 c0 00 01 li r6,1
ffc1f9b8: 4b ff 2f 09 bl ffc128c0 <rtems_rfs_inode_open>
if (rc)
ffc1f9bc: 7c 7e 1b 79 mr. r30,r3
ffc1f9c0: 40 82 01 14 bne- ffc1fad4 <rtems_rfs_link+0x1ac> <== 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)))
ffc1f9c4: 2f 99 00 00 cmpwi cr7,r25,0
{
rtems_rfs_inode_close (fs, &target_inode);
ffc1f9c8: 7f e3 fb 78 mr r3,r31
/*
* 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)))
ffc1f9cc: 40 9e 00 28 bne- cr7,ffc1f9f4 <rtems_rfs_link+0xcc> <== NEVER TAKEN
ffc1f9d0: 81 21 00 14 lwz r9,20(r1)
ffc1f9d4: 89 29 00 02 lbz r9,2(r9)
ffc1f9d8: 55 29 44 26 rlwinm r9,r9,8,16,19
ffc1f9dc: 2f 89 40 00 cmpwi cr7,r9,16384
ffc1f9e0: 40 be 00 14 bne+ cr7,ffc1f9f4 <rtems_rfs_link+0xcc> <== ALWAYS TAKEN
{
rtems_rfs_inode_close (fs, &target_inode);
ffc1f9e4: 38 81 00 08 addi r4,r1,8 <== NOT EXECUTED
ffc1f9e8: 4b ff 30 cd bl ffc12ab4 <rtems_rfs_inode_close> <== NOT EXECUTED
return ENOTSUP;
ffc1f9ec: 3b c0 00 86 li r30,134 <== NOT EXECUTED
ffc1f9f0: 48 00 00 e4 b ffc1fad4 <rtems_rfs_link+0x1ac> <== NOT EXECUTED
}
rc = rtems_rfs_inode_open (fs, parent, &parent_inode, true);
ffc1f9f4: 7f 44 d3 78 mr r4,r26
ffc1f9f8: 38 a1 00 30 addi r5,r1,48
ffc1f9fc: 38 c0 00 01 li r6,1
ffc1fa00: 4b ff 2e c1 bl ffc128c0 <rtems_rfs_inode_open>
if (rc)
ffc1fa04: 7c 7e 1b 79 mr. r30,r3
{
rtems_rfs_inode_close (fs, &target_inode);
ffc1fa08: 7f e3 fb 78 mr r3,r31
rtems_rfs_inode_close (fs, &target_inode);
return ENOTSUP;
}
rc = rtems_rfs_inode_open (fs, parent, &parent_inode, true);
if (rc)
ffc1fa0c: 41 a2 00 08 beq+ ffc1fa14 <rtems_rfs_link+0xec> <== ALWAYS TAKEN
ffc1fa10: 48 00 00 30 b ffc1fa40 <rtems_rfs_link+0x118> <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
rc = rtems_rfs_dir_add_entry (fs, &parent_inode, name, length, target);
ffc1fa14: 38 81 00 30 addi r4,r1,48
ffc1fa18: 7f 65 db 78 mr r5,r27
ffc1fa1c: 7f 86 e3 78 mr r6,r28
ffc1fa20: 7f a7 eb 78 mr r7,r29
ffc1fa24: 4b ff da 75 bl ffc1d498 <rtems_rfs_dir_add_entry>
if (rc > 0)
ffc1fa28: 7c 7e 1b 79 mr. r30,r3
ffc1fa2c: 40 81 00 20 ble- ffc1fa4c <rtems_rfs_link+0x124> <== ALWAYS TAKEN
{
rtems_rfs_inode_close (fs, &parent_inode);
ffc1fa30: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc1fa34: 38 81 00 30 addi r4,r1,48 <== NOT EXECUTED
ffc1fa38: 4b ff 30 7d bl ffc12ab4 <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_inode_close (fs, &target_inode);
ffc1fa3c: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc1fa40: 38 81 00 08 addi r4,r1,8 <== NOT EXECUTED
ffc1fa44: 4b ff 30 71 bl ffc12ab4 <rtems_rfs_inode_close> <== NOT EXECUTED
ffc1fa48: 48 00 00 8c b ffc1fad4 <rtems_rfs_link+0x1ac> <== NOT EXECUTED
return rc;
}
links = rtems_rfs_inode_get_links (&target_inode) + 1;
ffc1fa4c: 81 21 00 14 lwz r9,20(r1)
*/
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);
ffc1fa50: 89 49 00 00 lbz r10,0(r9)
ffc1fa54: 89 09 00 01 lbz r8,1(r9)
ffc1fa58: 55 4a 40 2e rlwinm r10,r10,8,0,23
ffc1fa5c: 7d 4a 43 78 or r10,r10,r8
if (links == 0xffff)
ffc1fa60: 6d 48 ff ff xoris r8,r10,65535
ffc1fa64: 2f 88 ff ff cmpwi cr7,r8,-1
ffc1fa68: 40 9e 00 08 bne- cr7,ffc1fa70 <rtems_rfs_link+0x148> <== ALWAYS TAKEN
links = 0;
ffc1fa6c: 39 40 00 00 li r10,0 <== NOT EXECUTED
ffc1fa70: 39 4a 00 01 addi r10,r10,1
ffc1fa74: 55 4a 04 3e clrlwi r10,r10,16
* @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);
ffc1fa78: 55 48 c2 3e rlwinm r8,r10,24,8,31
ffc1fa7c: 99 09 00 00 stb r8,0(r9)
rtems_rfs_inode_set_links (&target_inode, links);
rc = rtems_rfs_inode_time_stamp_now (&parent_inode, true, true);
ffc1fa80: 38 80 00 01 li r4,1
ffc1fa84: 38 61 00 30 addi r3,r1,48
ffc1fa88: 81 21 00 14 lwz r9,20(r1)
ffc1fa8c: 38 a0 00 01 li r5,1
ffc1fa90: 99 49 00 01 stb r10,1(r9)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
ffc1fa94: 39 20 00 01 li r9,1
ffc1fa98: 99 21 00 18 stb r9,24(r1)
ffc1fa9c: 4b ff 31 a9 bl ffc12c44 <rtems_rfs_inode_time_stamp_now>
if (rc > 0)
ffc1faa0: 7c 7e 1b 79 mr. r30,r3
{
rtems_rfs_inode_close (fs, &parent_inode);
ffc1faa4: 38 81 00 30 addi r4,r1,48
ffc1faa8: 7f e3 fb 78 mr r3,r31
links = rtems_rfs_inode_get_links (&target_inode) + 1;
rtems_rfs_inode_set_links (&target_inode, links);
rc = rtems_rfs_inode_time_stamp_now (&parent_inode, true, true);
if (rc > 0)
ffc1faac: 40 81 00 08 ble- ffc1fab4 <rtems_rfs_link+0x18c> <== ALWAYS TAKEN
ffc1fab0: 4b ff ff 88 b ffc1fa38 <rtems_rfs_link+0x110> <== 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);
ffc1fab4: 4b ff 30 01 bl ffc12ab4 <rtems_rfs_inode_close>
if (rc > 0)
{
rtems_rfs_inode_close (fs, &target_inode);
ffc1fab8: 38 81 00 08 addi r4,r1,8
rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
rc = rtems_rfs_inode_close (fs, &parent_inode);
if (rc > 0)
ffc1fabc: 7c 7e 1b 79 mr. r30,r3
{
rtems_rfs_inode_close (fs, &target_inode);
ffc1fac0: 7f e3 fb 78 mr r3,r31
rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
rc = rtems_rfs_inode_close (fs, &parent_inode);
if (rc > 0)
ffc1fac4: 40 81 00 08 ble- ffc1facc <rtems_rfs_link+0x1a4> <== ALWAYS TAKEN
ffc1fac8: 4b ff ff 7c b ffc1fa44 <rtems_rfs_link+0x11c> <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
rc = rtems_rfs_inode_close (fs, &target_inode);
ffc1facc: 4b ff 2f e9 bl ffc12ab4 <rtems_rfs_inode_close>
ffc1fad0: 7c 7e 1b 78 mr r30,r3
return rc;
}
ffc1fad4: 39 61 00 78 addi r11,r1,120
ffc1fad8: 7f c3 f3 78 mr r3,r30
ffc1fadc: 4b fe 1a 78 b ffc01554 <_restgpr_25_x>
ffc20300 <rtems_rfs_mutex_create>:
RTEMS_INHERIT_PRIORITY | RTEMS_NO_PRIORITY_CEILING | RTEMS_LOCAL)
#endif
int
rtems_rfs_mutex_create (rtems_rfs_mutex* mutex)
{
ffc20300: 94 21 ff f0 stwu r1,-16(r1)
ffc20304: 7c 08 02 a6 mflr r0
ffc20308: 7c 67 1b 78 mr r7,r3
#if __rtems__
rtems_status_code sc;
sc = rtems_semaphore_create (rtems_build_name ('R', 'F', 'S', 'm'),
ffc2030c: 3c 60 52 46 lis r3,21062
RTEMS_INHERIT_PRIORITY | RTEMS_NO_PRIORITY_CEILING | RTEMS_LOCAL)
#endif
int
rtems_rfs_mutex_create (rtems_rfs_mutex* mutex)
{
ffc20310: bf c1 00 08 stmw r30,8(r1)
#if __rtems__
rtems_status_code sc;
sc = rtems_semaphore_create (rtems_build_name ('R', 'F', 'S', 'm'),
ffc20314: 60 63 53 6d ori r3,r3,21357
ffc20318: 38 80 00 01 li r4,1
RTEMS_INHERIT_PRIORITY | RTEMS_NO_PRIORITY_CEILING | RTEMS_LOCAL)
#endif
int
rtems_rfs_mutex_create (rtems_rfs_mutex* mutex)
{
ffc2031c: 90 01 00 14 stw r0,20(r1)
#if __rtems__
rtems_status_code sc;
sc = rtems_semaphore_create (rtems_build_name ('R', 'F', 'S', 'm'),
ffc20320: 38 a0 00 54 li r5,84
ffc20324: 38 c0 00 00 li r6,0
ffc20328: 4b fe d3 39 bl ffc0d660 <rtems_semaphore_create>
printf ("rtems-rfs: mutex: open failed: %s\n",
rtems_status_text (sc));
return EIO;
}
#endif
return 0;
ffc2032c: 3b e0 00 00 li r31,0
#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)
ffc20330: 7c 7e 1b 79 mr. r30,r3
ffc20334: 41 a2 00 3c beq+ ffc20370 <rtems_rfs_mutex_create+0x70> <== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
ffc20338: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc2033c: 38 80 00 04 li r4,4 <== NOT EXECUTED
ffc20340: 4b ff 40 89 bl ffc143c8 <rtems_rfs_trace> <== NOT EXECUTED
printf ("rtems-rfs: mutex: open failed: %s\n",
rtems_status_text (sc));
return EIO;
ffc20344: 3b e0 00 05 li r31,5 <== 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))
ffc20348: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc2034c: 41 be 00 24 beq+ cr7,ffc20370 <rtems_rfs_mutex_create+0x70><== NOT EXECUTED
printf ("rtems-rfs: mutex: open failed: %s\n",
ffc20350: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc20354: 4b ff 77 cd bl ffc17b20 <rtems_status_text> <== NOT EXECUTED
ffc20358: 7c 64 1b 78 mr r4,r3 <== NOT EXECUTED
ffc2035c: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc20360: 38 63 71 bd addi r3,r3,29117 <== NOT EXECUTED
ffc20364: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc20368: 48 00 36 25 bl ffc2398c <printf> <== NOT EXECUTED
ffc2036c: 48 00 00 04 b ffc20370 <rtems_rfs_mutex_create+0x70> <== NOT EXECUTED
rtems_status_text (sc));
return EIO;
}
#endif
return 0;
}
ffc20370: 39 61 00 10 addi r11,r1,16
ffc20374: 7f e3 fb 78 mr r3,r31
ffc20378: 4b fe 11 f0 b ffc01568 <_restgpr_30_x>
ffc2037c <rtems_rfs_mutex_destroy>:
int
rtems_rfs_mutex_destroy (rtems_rfs_mutex* mutex)
{
ffc2037c: 94 21 ff f0 stwu r1,-16(r1)
ffc20380: 7c 08 02 a6 mflr r0
ffc20384: 90 01 00 14 stw r0,20(r1)
#if __rtems__
rtems_status_code sc;
sc = rtems_semaphore_delete (*mutex);
ffc20388: 80 63 00 00 lwz r3,0(r3)
return 0;
}
int
rtems_rfs_mutex_destroy (rtems_rfs_mutex* mutex)
{
ffc2038c: bf c1 00 08 stmw r30,8(r1)
printf ("rtems-rfs: mutex: close failed: %s\n",
rtems_status_text (sc));
return EIO;
}
#endif
return 0;
ffc20390: 3b e0 00 00 li r31,0
int
rtems_rfs_mutex_destroy (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc;
sc = rtems_semaphore_delete (*mutex);
ffc20394: 4b fe d4 95 bl ffc0d828 <rtems_semaphore_delete>
if (sc != RTEMS_SUCCESSFUL)
ffc20398: 7c 7e 1b 79 mr. r30,r3
ffc2039c: 41 a2 00 3c beq+ ffc203d8 <rtems_rfs_mutex_destroy+0x5c><== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
ffc203a0: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc203a4: 38 80 00 04 li r4,4 <== NOT EXECUTED
ffc203a8: 4b ff 40 21 bl ffc143c8 <rtems_rfs_trace> <== NOT EXECUTED
printf ("rtems-rfs: mutex: close failed: %s\n",
rtems_status_text (sc));
return EIO;
ffc203ac: 3b e0 00 05 li r31,5 <== 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))
ffc203b0: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc203b4: 41 be 00 24 beq+ cr7,ffc203d8 <rtems_rfs_mutex_destroy+0x5c><== NOT EXECUTED
printf ("rtems-rfs: mutex: close failed: %s\n",
ffc203b8: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc203bc: 4b ff 77 65 bl ffc17b20 <rtems_status_text> <== NOT EXECUTED
ffc203c0: 7c 64 1b 78 mr r4,r3 <== NOT EXECUTED
ffc203c4: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc203c8: 38 63 71 e0 addi r3,r3,29152 <== NOT EXECUTED
ffc203cc: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc203d0: 48 00 35 bd bl ffc2398c <printf> <== NOT EXECUTED
ffc203d4: 48 00 00 04 b ffc203d8 <rtems_rfs_mutex_destroy+0x5c><== NOT EXECUTED
rtems_status_text (sc));
return EIO;
}
#endif
return 0;
}
ffc203d8: 39 61 00 10 addi r11,r1,16
ffc203dc: 7f e3 fb 78 mr r3,r31
ffc203e0: 4b fe 11 88 b ffc01568 <_restgpr_30_x>
ffc208b8 <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)
ffc208b8: 94 21 ff f0 stwu r1,-16(r1)
ffc208bc: 7c 08 02 a6 mflr r0
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
ffc208c0: 38 80 00 00 li r4,0
ffc208c4: 38 a0 00 00 li r5,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)
ffc208c8: bf c1 00 08 stmw r30,8(r1)
rtems_status_text (sc));
#endif
return EIO;
}
#endif
return 0;
ffc208cc: 3b e0 00 00 li r31,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)
ffc208d0: 90 01 00 14 stw r0,20(r1)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
ffc208d4: 4b fe d0 11 bl ffc0d8e4 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
ffc208d8: 7c 7e 1b 79 mr. r30,r3
ffc208dc: 41 a2 00 3c beq+ ffc20918 <rtems_rfs_mutex_lock.isra.0+0x60><== ALWAYS TAKEN
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
ffc208e0: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc208e4: 38 80 00 04 li r4,4 <== NOT EXECUTED
ffc208e8: 4b ff 3a e1 bl ffc143c8 <rtems_rfs_trace> <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
rtems_status_text (sc));
#endif
return EIO;
ffc208ec: 3b e0 00 05 li r31,5 <== 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))
ffc208f0: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc208f4: 41 be 00 24 beq+ cr7,ffc20918 <rtems_rfs_mutex_lock.isra.0+0x60><== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
ffc208f8: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc208fc: 4b ff 72 25 bl ffc17b20 <rtems_status_text> <== NOT EXECUTED
ffc20900: 7c 64 1b 78 mr r4,r3 <== NOT EXECUTED
ffc20904: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc20908: 38 63 51 2e addi r3,r3,20782 <== NOT EXECUTED
ffc2090c: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc20910: 48 00 30 7d bl ffc2398c <printf> <== NOT EXECUTED
ffc20914: 48 00 00 04 b ffc20918 <rtems_rfs_mutex_lock.isra.0+0x60><== NOT EXECUTED
#endif
return EIO;
}
#endif
return 0;
}
ffc20918: 39 61 00 10 addi r11,r1,16
ffc2091c: 7f e3 fb 78 mr r3,r31
ffc20920: 4b fe 0c 48 b ffc01568 <_restgpr_30_x>
ffc205fc <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)
ffc205fc: 94 21 ff f0 stwu r1,-16(r1)
ffc20600: 7c 08 02 a6 mflr r0
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
ffc20604: 38 80 00 00 li r4,0
ffc20608: 38 a0 00 00 li r5,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)
ffc2060c: bf c1 00 08 stmw r30,8(r1)
rtems_status_text (sc));
#endif
return EIO;
}
#endif
return 0;
ffc20610: 3b e0 00 00 li r31,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)
ffc20614: 90 01 00 14 stw r0,20(r1)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
ffc20618: 4b fe d2 cd bl ffc0d8e4 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
ffc2061c: 7c 7e 1b 79 mr. r30,r3
ffc20620: 41 a2 00 3c beq+ ffc2065c <rtems_rfs_mutex_lock.isra.1+0x60><== ALWAYS TAKEN
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
ffc20624: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc20628: 38 80 00 04 li r4,4 <== NOT EXECUTED
ffc2062c: 4b ff 3d 9d bl ffc143c8 <rtems_rfs_trace> <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
rtems_status_text (sc));
#endif
return EIO;
ffc20630: 3b e0 00 05 li r31,5 <== 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))
ffc20634: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc20638: 41 be 00 24 beq+ cr7,ffc2065c <rtems_rfs_mutex_lock.isra.1+0x60><== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
ffc2063c: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc20640: 4b ff 74 e1 bl ffc17b20 <rtems_status_text> <== NOT EXECUTED
ffc20644: 7c 64 1b 78 mr r4,r3 <== NOT EXECUTED
ffc20648: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc2064c: 38 63 51 2e addi r3,r3,20782 <== NOT EXECUTED
ffc20650: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc20654: 48 00 33 39 bl ffc2398c <printf> <== NOT EXECUTED
ffc20658: 48 00 00 04 b ffc2065c <rtems_rfs_mutex_lock.isra.1+0x60><== NOT EXECUTED
#endif
return EIO;
}
#endif
return 0;
}
ffc2065c: 39 61 00 10 addi r11,r1,16
ffc20660: 7f e3 fb 78 mr r3,r31
ffc20664: 4b fe 0f 04 b ffc01568 <_restgpr_30_x>
ffc13e18 <rtems_rfs_mutex_lock.isra.20>:
* @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)
ffc13e18: 94 21 ff f0 stwu r1,-16(r1)
ffc13e1c: 7c 08 02 a6 mflr r0
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
ffc13e20: 38 80 00 00 li r4,0
ffc13e24: 38 a0 00 00 li r5,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)
ffc13e28: bf c1 00 08 stmw r30,8(r1)
rtems_status_text (sc));
#endif
return EIO;
}
#endif
return 0;
ffc13e2c: 3b e0 00 00 li r31,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)
ffc13e30: 90 01 00 14 stw r0,20(r1)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
ffc13e34: 4b ff 9a b1 bl ffc0d8e4 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
ffc13e38: 7c 7e 1b 79 mr. r30,r3
ffc13e3c: 41 a2 00 3c beq+ ffc13e78 <rtems_rfs_mutex_lock.isra.20+0x60><== ALWAYS TAKEN
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
ffc13e40: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc13e44: 38 80 00 04 li r4,4 <== NOT EXECUTED
ffc13e48: 48 00 05 81 bl ffc143c8 <rtems_rfs_trace> <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
rtems_status_text (sc));
#endif
return EIO;
ffc13e4c: 3b e0 00 05 li r31,5 <== 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))
ffc13e50: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc13e54: 41 be 00 24 beq+ cr7,ffc13e78 <rtems_rfs_mutex_lock.isra.20+0x60><== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
ffc13e58: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc13e5c: 48 00 3c c5 bl ffc17b20 <rtems_status_text> <== NOT EXECUTED
ffc13e60: 7c 64 1b 78 mr r4,r3 <== NOT EXECUTED
ffc13e64: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc13e68: 38 63 51 2e addi r3,r3,20782 <== NOT EXECUTED
ffc13e6c: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc13e70: 48 00 fb 1d bl ffc2398c <printf> <== NOT EXECUTED
ffc13e74: 48 00 00 04 b ffc13e78 <rtems_rfs_mutex_lock.isra.20+0x60><== NOT EXECUTED
#endif
return EIO;
}
#endif
return 0;
}
ffc13e78: 39 61 00 10 addi r11,r1,16
ffc13e7c: 7f e3 fb 78 mr r3,r31
ffc13e80: 4b fe d6 e8 b ffc01568 <_restgpr_30_x>
ffc20be0 <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)
ffc20be0: 94 21 ff f0 stwu r1,-16(r1) <== NOT EXECUTED
ffc20be4: 7c 08 02 a6 mflr r0 <== NOT EXECUTED
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
ffc20be8: 38 80 00 00 li r4,0 <== NOT EXECUTED
ffc20bec: 38 a0 00 00 li r5,0 <== NOT EXECUTED
* @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)
ffc20bf0: bf c1 00 08 stmw r30,8(r1) <== NOT EXECUTED
rtems_status_text (sc));
#endif
return EIO;
}
#endif
return 0;
ffc20bf4: 3b e0 00 00 li r31,0 <== NOT EXECUTED
* @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)
ffc20bf8: 90 01 00 14 stw r0,20(r1) <== NOT EXECUTED
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
ffc20bfc: 4b fe 76 39 bl ffc08234 <rtems_semaphore_obtain> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
ffc20c00: 7c 7e 1b 79 mr. r30,r3 <== NOT EXECUTED
ffc20c04: 41 a2 00 3c beq+ ffc20c40 <rtems_rfs_mutex_lock.isra.6+0x60><== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
ffc20c08: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc20c0c: 38 80 00 04 li r4,4 <== NOT EXECUTED
ffc20c10: 48 00 11 95 bl ffc21da4 <rtems_rfs_trace> <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
rtems_status_text (sc));
#endif
return EIO;
ffc20c14: 3b e0 00 05 li r31,5 <== 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))
ffc20c18: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc20c1c: 41 be 00 24 beq+ cr7,ffc20c40 <rtems_rfs_mutex_lock.isra.6+0x60><== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
ffc20c20: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc20c24: 48 00 3f c9 bl ffc24bec <rtems_status_text> <== NOT EXECUTED
ffc20c28: 7c 64 1b 78 mr r4,r3 <== NOT EXECUTED
ffc20c2c: 3c 60 ff c6 lis r3,-58 <== NOT EXECUTED
ffc20c30: 38 63 9d ec addi r3,r3,-25108 <== NOT EXECUTED
ffc20c34: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc20c38: 48 01 cb 9d bl ffc3d7d4 <printf> <== NOT EXECUTED
ffc20c3c: 48 00 00 04 b ffc20c40 <rtems_rfs_mutex_lock.isra.6+0x60><== NOT EXECUTED
#endif
return EIO;
}
#endif
return 0;
}
ffc20c40: 39 61 00 10 addi r11,r1,16 <== NOT EXECUTED
ffc20c44: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc20c48: 48 03 38 c0 b ffc54508 <_restgpr_30_x> <== NOT EXECUTED
ffc13db4 <rtems_rfs_mutex_unlock.isra.19>:
* @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)
ffc13db4: 94 21 ff f0 stwu r1,-16(r1)
ffc13db8: 7c 08 02 a6 mflr r0
ffc13dbc: bf c1 00 08 stmw r30,8(r1)
rtems_status_text (sc));
#endif
return EIO;
}
#endif
return 0;
ffc13dc0: 3b e0 00 00 li r31,0
* @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)
ffc13dc4: 90 01 00 14 stw r0,20(r1)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
ffc13dc8: 4b ff 9c 41 bl ffc0da08 <rtems_semaphore_release>
if (sc != RTEMS_SUCCESSFUL)
ffc13dcc: 7c 7e 1b 79 mr. r30,r3
ffc13dd0: 41 a2 00 3c beq+ ffc13e0c <rtems_rfs_mutex_unlock.isra.19+0x58><== ALWAYS TAKEN
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
ffc13dd4: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc13dd8: 38 80 00 04 li r4,4 <== NOT EXECUTED
ffc13ddc: 48 00 05 ed bl ffc143c8 <rtems_rfs_trace> <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
rtems_status_text (sc));
#endif
return EIO;
ffc13de0: 3b e0 00 05 li r31,5 <== 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))
ffc13de4: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc13de8: 41 be 00 24 beq+ cr7,ffc13e0c <rtems_rfs_mutex_unlock.isra.19+0x58><== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
ffc13dec: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc13df0: 48 00 3d 31 bl ffc17b20 <rtems_status_text> <== NOT EXECUTED
ffc13df4: 7c 64 1b 78 mr r4,r3 <== NOT EXECUTED
ffc13df8: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc13dfc: 38 63 51 08 addi r3,r3,20744 <== NOT EXECUTED
ffc13e00: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc13e04: 48 00 fb 89 bl ffc2398c <printf> <== NOT EXECUTED
ffc13e08: 48 00 00 04 b ffc13e0c <rtems_rfs_mutex_unlock.isra.19+0x58><== NOT EXECUTED
#endif
return EIO;
}
#endif
return 0;
}
ffc13e0c: 39 61 00 10 addi r11,r1,16
ffc13e10: 7f e3 fb 78 mr r3,r31
ffc13e14: 4b fe d7 54 b ffc01568 <_restgpr_30_x>
ffc1c4ac <rtems_rfs_release_chain>:
static int
rtems_rfs_release_chain (rtems_chain_control* chain,
uint32_t* count,
bool modified)
{
ffc1c4ac: 94 21 ff e0 stwu r1,-32(r1)
ffc1c4b0: 7c 08 02 a6 mflr r0
ffc1c4b4: bf 41 00 08 stmw r26,8(r1)
ffc1c4b8: 7c 7f 1b 78 mr r31,r3
ffc1c4bc: 7c 9e 23 78 mr r30,r4
rtems_rfs_buffer* buffer;
int rrc = 0;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
ffc1c4c0: 38 60 00 00 li r3,0
static int
rtems_rfs_release_chain (rtems_chain_control* chain,
uint32_t* count,
bool modified)
{
ffc1c4c4: 90 01 00 24 stw r0,36(r1)
rtems_rfs_buffer* buffer;
int rrc = 0;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
ffc1c4c8: 38 80 00 80 li r4,128
static int
rtems_rfs_release_chain (rtems_chain_control* chain,
uint32_t* count,
bool modified)
{
ffc1c4cc: 7c bc 2b 78 mr r28,r5
rtems_rfs_buffer* buffer;
int rrc = 0;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
ffc1c4d0: 4b ff 7e f9 bl ffc143c8 <rtems_rfs_trace>
ffc1c4d4: 2f 83 00 00 cmpwi cr7,r3,0
ffc1c4d8: 41 be 00 18 beq+ cr7,ffc1c4f0 <rtems_rfs_release_chain+0x44><== ALWAYS TAKEN
printf ("rtems-rfs: release-chain: count=%" PRIu32 "\n", *count);
ffc1c4dc: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1c4e0: 80 9e 00 00 lwz r4,0(r30) <== NOT EXECUTED
ffc1c4e4: 38 63 5d d8 addi r3,r3,24024 <== NOT EXECUTED
ffc1c4e8: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1c4ec: 48 00 74 a1 bl ffc2398c <printf> <== NOT EXECUTED
(*count)--;
buffer->user = (void*) 0;
rc = rtems_rfs_buffer_io_release (buffer, modified);
if ((rc > 0) && (rrc == 0))
ffc1c4f0: 3b a0 00 00 li r29,0
ffc1c4f4: 3b 5f 00 04 addi r26,r31,4
while (!rtems_chain_is_empty (chain))
{
buffer = (rtems_rfs_buffer*) rtems_chain_get (chain);
(*count)--;
buffer->user = (void*) 0;
ffc1c4f8: 3b 60 00 00 li r27,0
ffc1c4fc: 48 00 00 38 b ffc1c534 <rtems_rfs_release_chain+0x88>
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
ffc1c500: 7f e3 fb 78 mr r3,r31
ffc1c504: 4b ff 1f 2d bl ffc0e430 <_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)--;
ffc1c508: 81 3e 00 00 lwz r9,0(r30)
buffer->user = (void*) 0;
rc = rtems_rfs_buffer_io_release (buffer, modified);
ffc1c50c: 7f 84 e3 78 mr r4,r28
printf ("rtems-rfs: release-chain: count=%" PRIu32 "\n", *count);
while (!rtems_chain_is_empty (chain))
{
buffer = (rtems_rfs_buffer*) rtems_chain_get (chain);
(*count)--;
ffc1c510: 39 29 ff ff addi r9,r9,-1
ffc1c514: 91 3e 00 00 stw r9,0(r30)
buffer->user = (void*) 0;
ffc1c518: 93 63 00 34 stw r27,52(r3)
rc = rtems_rfs_buffer_io_release (buffer, modified);
ffc1c51c: 48 00 56 8d bl ffc21ba8 <rtems_rfs_buffer_bdbuf_release>
if ((rc > 0) && (rrc == 0))
ffc1c520: 2c 03 00 00 cmpwi r3,0
ffc1c524: 40 81 00 10 ble- ffc1c534 <rtems_rfs_release_chain+0x88><== ALWAYS TAKEN
ffc1c528: 2f 9d 00 00 cmpwi cr7,r29,0 <== NOT EXECUTED
ffc1c52c: 40 9e 00 08 bne- cr7,ffc1c534 <rtems_rfs_release_chain+0x88><== NOT EXECUTED
ffc1c530: 7c 7d 1b 78 mr r29,r3 <== 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))
ffc1c534: 81 3f 00 00 lwz r9,0(r31)
ffc1c538: 7f 89 d0 00 cmpw cr7,r9,r26
ffc1c53c: 40 9e ff c4 bne+ cr7,ffc1c500 <rtems_rfs_release_chain+0x54>
rc = rtems_rfs_buffer_io_release (buffer, modified);
if ((rc > 0) && (rrc == 0))
rrc = rc;
}
return rrc;
}
ffc1c540: 39 61 00 20 addi r11,r1,32
ffc1c544: 7f a3 eb 78 mr r3,r29
ffc1c548: 4b fe 50 10 b ffc01558 <_restgpr_26_x>
ffc13654 <rtems_rfs_rtems_chown>:
static int
rtems_rfs_rtems_chown (const rtems_filesystem_location_info_t *pathloc,
uid_t owner,
gid_t group)
{
ffc13654: 94 21 ff b8 stwu r1,-72(r1)
ffc13658: 7c 08 02 a6 mflr r0
ffc1365c: 7c 69 1b 78 mr r9,r3
ffc13660: 90 01 00 4c stw r0,76(r1)
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);
ffc13664: 38 c0 00 01 li r6,1
static int
rtems_rfs_rtems_chown (const rtems_filesystem_location_info_t *pathloc,
uid_t owner,
gid_t group)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
ffc13668: 81 43 00 14 lwz r10,20(r3)
static int
rtems_rfs_rtems_chown (const rtems_filesystem_location_info_t *pathloc,
uid_t owner,
gid_t group)
{
ffc1366c: bf 81 00 38 stmw r28,56(r1)
ffc13670: 7c 9e 23 78 mr r30,r4
ffc13674: 7c bd 2b 78 mr r29,r5
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
ffc13678: 83 ea 00 08 lwz r31,8(r10)
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);
ffc1367c: 38 a1 00 08 addi r5,r1,8
ffc13680: 80 89 00 08 lwz r4,8(r9)
ffc13684: 7f e3 fb 78 mr r3,r31
ffc13688: 4b ff f2 39 bl ffc128c0 <rtems_rfs_inode_open>
if (rc > 0)
ffc1368c: 7c 7c 1b 79 mr. r28,r3
ffc13690: 40 81 00 10 ble- ffc136a0 <rtems_rfs_rtems_chown+0x4c> <== ALWAYS TAKEN
{
return rtems_rfs_rtems_error ("chown: opening inode", rc);
ffc13694: 48 00 e9 55 bl ffc21fe8 <__errno> <== NOT EXECUTED
ffc13698: 93 83 00 00 stw r28,0(r3) <== NOT EXECUTED
ffc1369c: 48 00 00 a4 b ffc13740 <rtems_rfs_rtems_chown+0xec> <== NOT EXECUTED
/*
* Verify I am the owner of the node or the super user.
*/
#if defined (RTEMS_POSIX_API)
uid = geteuid();
ffc136a0: 48 00 48 99 bl ffc17f38 <geteuid>
if ((uid != rtems_rfs_inode_get_uid (&inode)) && (uid != 0))
ffc136a4: 81 21 00 14 lwz r9,20(r1)
* @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;
ffc136a8: 89 49 00 06 lbz r10,6(r9)
ffc136ac: 89 09 00 07 lbz r8,7(r9)
ffc136b0: 55 4a 40 2e rlwinm r10,r10,8,0,23
ffc136b4: 7d 4a 43 78 or r10,r10,r8
ffc136b8: 55 4a 04 3e clrlwi r10,r10,16
ffc136bc: 7f 83 50 00 cmpw cr7,r3,r10
ffc136c0: 41 9e 00 28 beq- cr7,ffc136e8 <rtems_rfs_rtems_chown+0x94><== ALWAYS TAKEN
ffc136c4: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc136c8: 41 be 00 20 beq+ cr7,ffc136e8 <rtems_rfs_rtems_chown+0x94><== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
ffc136cc: 38 81 00 08 addi r4,r1,8 <== NOT EXECUTED
ffc136d0: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc136d4: 4b ff f3 e1 bl ffc12ab4 <rtems_rfs_inode_close> <== NOT EXECUTED
return rtems_rfs_rtems_error ("chown: not able", EPERM);
ffc136d8: 48 00 e9 11 bl ffc21fe8 <__errno> <== NOT EXECUTED
ffc136dc: 39 20 00 01 li r9,1 <== NOT EXECUTED
ffc136e0: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED
ffc136e4: 48 00 00 5c b ffc13740 <rtems_rfs_rtems_chown+0xec> <== 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);
ffc136e8: 57 a5 80 1e rlwinm r5,r29,16,0,15
ffc136ec: 7c a5 f3 78 or r5,r5,r30
ffc136f0: 54 aa 46 3e rlwinm r10,r5,8,24,31
ffc136f4: 99 49 00 04 stb r10,4(r9)
ffc136f8: 54 aa 84 3e rlwinm r10,r5,16,16,31
ffc136fc: 54 a5 c2 3e rlwinm r5,r5,24,8,31
ffc13700: 81 21 00 14 lwz r9,20(r1)
}
#endif
rtems_rfs_inode_set_uid_gid (&inode, owner, group);
rc = rtems_rfs_inode_close (fs, &inode);
ffc13704: 7f e3 fb 78 mr r3,r31
ffc13708: 38 81 00 08 addi r4,r1,8
ffc1370c: 99 49 00 05 stb r10,5(r9)
ffc13710: 81 21 00 14 lwz r9,20(r1)
ffc13714: 98 a9 00 06 stb r5,6(r9)
ffc13718: 81 21 00 14 lwz r9,20(r1)
ffc1371c: 9b c9 00 07 stb r30,7(r9)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
ffc13720: 39 20 00 01 li r9,1
ffc13724: 99 21 00 18 stb r9,24(r1)
ffc13728: 4b ff f3 8d bl ffc12ab4 <rtems_rfs_inode_close>
if (rc)
ffc1372c: 7c 7f 1b 79 mr. r31,r3
{
return rtems_rfs_rtems_error ("chown: closing inode", rc);
}
return 0;
ffc13730: 39 20 00 00 li r9,0
#endif
rtems_rfs_inode_set_uid_gid (&inode, owner, group);
rc = rtems_rfs_inode_close (fs, &inode);
if (rc)
ffc13734: 41 a2 00 10 beq+ ffc13744 <rtems_rfs_rtems_chown+0xf0> <== ALWAYS TAKEN
{
return rtems_rfs_rtems_error ("chown: closing inode", rc);
ffc13738: 48 00 e8 b1 bl ffc21fe8 <__errno> <== NOT EXECUTED
ffc1373c: 93 e3 00 00 stw r31,0(r3) <== NOT EXECUTED
ffc13740: 39 20 ff ff li r9,-1 <== NOT EXECUTED
}
return 0;
}
ffc13744: 39 61 00 48 addi r11,r1,72
ffc13748: 7d 23 4b 78 mr r3,r9
ffc1374c: 4b fe de 14 b ffc01560 <_restgpr_28_x>
ffc20410 <rtems_rfs_rtems_device_close>:
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);
ffc20410: 80 83 00 2c lwz r4,44(r3) <== NOT EXECUTED
ffc20414: 80 a3 00 30 lwz r5,48(r3) <== NOT EXECUTED
ffc20418: 48 00 0e a4 b ffc212bc <rtems_deviceio_close> <== NOT EXECUTED
ffc203e4 <rtems_rfs_rtems_device_ftruncate>:
static int
rtems_rfs_rtems_device_ftruncate (rtems_libio_t* iop, off_t length)
{
return 0;
}
ffc203e4: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc203e8: 4e 80 00 20 blr <== NOT EXECUTED
ffc203ec <rtems_rfs_rtems_device_ioctl>:
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);
ffc203ec: 80 c3 00 2c lwz r6,44(r3) <== NOT EXECUTED
ffc203f0: 80 e3 00 30 lwz r7,48(r3) <== NOT EXECUTED
ffc203f4: 48 00 10 28 b ffc2141c <rtems_deviceio_control> <== NOT EXECUTED
ffc204cc <rtems_rfs_rtems_device_open>:
static int
rtems_rfs_rtems_device_open ( rtems_libio_t *iop,
const char *pathname,
int oflag,
mode_t mode)
{
ffc204cc: 94 21 ff a8 stwu r1,-88(r1) <== NOT EXECUTED
ffc204d0: 7c 08 02 a6 mflr r0 <== NOT EXECUTED
ffc204d4: 90 01 00 5c stw r0,92(r1) <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (&iop->pathinfo);
ffc204d8: 81 23 00 28 lwz r9,40(r3) <== NOT EXECUTED
static int
rtems_rfs_rtems_device_open ( rtems_libio_t *iop,
const char *pathname,
int oflag,
mode_t mode)
{
ffc204dc: bf 01 00 38 stmw r24,56(r1) <== NOT EXECUTED
ffc204e0: 7c 7e 1b 78 mr r30,r3 <== NOT EXECUTED
ffc204e4: 7c 99 23 78 mr r25,r4 <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (&iop->pathinfo);
ffc204e8: 83 e9 00 08 lwz r31,8(r9) <== NOT EXECUTED
static int
rtems_rfs_rtems_device_open ( rtems_libio_t *iop,
const char *pathname,
int oflag,
mode_t mode)
{
ffc204ec: 7c ba 2b 78 mr r26,r5 <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (&iop->pathinfo);
rtems_rfs_ino ino = rtems_rfs_rtems_get_iop_ino (iop);
ffc204f0: 83 a3 00 1c lwz r29,28(r3) <== 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);
ffc204f4: 38 80 00 00 li r4,0 <== 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
};
ffc204f8: 81 3f 00 80 lwz r9,128(r31) <== NOT EXECUTED
ffc204fc: 38 a0 00 00 li r5,0 <== NOT EXECUTED
static int
rtems_rfs_rtems_device_open ( rtems_libio_t *iop,
const char *pathname,
int oflag,
mode_t mode)
{
ffc20500: 7c db 33 78 mr r27,r6 <== NOT EXECUTED
ffc20504: 80 69 00 00 lwz r3,0(r9) <== NOT EXECUTED
ffc20508: 4b fe d3 dd bl ffc0d8e4 <rtems_semaphore_obtain> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
ffc2050c: 7c 7c 1b 79 mr. r28,r3 <== NOT EXECUTED
ffc20510: 41 a2 00 34 beq+ ffc20544 <rtems_rfs_rtems_device_open+0x78><== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
ffc20514: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc20518: 38 80 00 04 li r4,4 <== NOT EXECUTED
ffc2051c: 4b ff 3e ad bl ffc143c8 <rtems_rfs_trace> <== NOT EXECUTED
ffc20520: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc20524: 41 be 00 20 beq+ cr7,ffc20544 <rtems_rfs_rtems_device_open+0x78><== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
ffc20528: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED
ffc2052c: 4b ff 75 f5 bl ffc17b20 <rtems_status_text> <== NOT EXECUTED
ffc20530: 7c 64 1b 78 mr r4,r3 <== NOT EXECUTED
ffc20534: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc20538: 38 63 51 2e addi r3,r3,20782 <== NOT EXECUTED
ffc2053c: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc20540: 48 00 34 4d bl ffc2398c <printf> <== NOT EXECUTED
rtems_device_minor_number minor;
int rc;
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
ffc20544: 7f a4 eb 78 mr r4,r29 <== NOT EXECUTED
ffc20548: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc2054c: 38 a1 00 08 addi r5,r1,8 <== NOT EXECUTED
ffc20550: 38 c0 00 01 li r6,1 <== NOT EXECUTED
ffc20554: 4b ff 23 6d bl ffc128c0 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc > 0)
ffc20558: 7c 7d 1b 79 mr. r29,r3 <== NOT EXECUTED
ffc2055c: 40 81 00 18 ble- ffc20574 <rtems_rfs_rtems_device_open+0xa8><== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
ffc20560: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc20564: 4b ff fe f5 bl ffc20458 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
return rtems_rfs_rtems_error ("device_open: opening inode", rc);
ffc20568: 48 00 1a 81 bl ffc21fe8 <__errno> <== NOT EXECUTED
ffc2056c: 93 a3 00 00 stw r29,0(r3) <== NOT EXECUTED
ffc20570: 48 00 00 4c b ffc205bc <rtems_rfs_rtems_device_open+0xf0><== NOT EXECUTED
}
major = rtems_rfs_inode_get_block (&inode, 0);
ffc20574: 83 81 00 14 lwz r28,20(r1) <== NOT EXECUTED
ffc20578: 38 80 00 00 li r4,0 <== NOT EXECUTED
ffc2057c: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED
ffc20580: 4b ff fe 9d bl ffc2041c <rtems_rfs_inode_get_block.isra.0><== NOT EXECUTED
minor = rtems_rfs_inode_get_block (&inode, 1);
ffc20584: 38 80 00 01 li r4,1 <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("device_open: opening inode", rc);
}
major = rtems_rfs_inode_get_block (&inode, 0);
ffc20588: 7c 7d 1b 78 mr r29,r3 <== NOT EXECUTED
minor = rtems_rfs_inode_get_block (&inode, 1);
ffc2058c: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED
ffc20590: 4b ff fe 8d bl ffc2041c <rtems_rfs_inode_get_block.isra.0><== NOT EXECUTED
rc = rtems_rfs_inode_close (fs, &inode);
ffc20594: 38 81 00 08 addi r4,r1,8 <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("device_open: opening inode", rc);
}
major = rtems_rfs_inode_get_block (&inode, 0);
minor = rtems_rfs_inode_get_block (&inode, 1);
ffc20598: 7c 7c 1b 78 mr r28,r3 <== NOT EXECUTED
rc = rtems_rfs_inode_close (fs, &inode);
ffc2059c: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc205a0: 4b ff 25 15 bl ffc12ab4 <rtems_rfs_inode_close> <== NOT EXECUTED
if (rc > 0)
ffc205a4: 7c 78 1b 79 mr. r24,r3 <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
ffc205a8: 7f e3 fb 78 mr r3,r31 <== 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)
ffc205ac: 40 81 00 18 ble- ffc205c4 <rtems_rfs_rtems_device_open+0xf8><== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
ffc205b0: 4b ff fe a9 bl ffc20458 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
return rtems_rfs_rtems_error ("device_open: closing inode", rc);
ffc205b4: 48 00 1a 35 bl ffc21fe8 <__errno> <== NOT EXECUTED
ffc205b8: 93 03 00 00 stw r24,0(r3) <== NOT EXECUTED
ffc205bc: 38 60 ff ff li r3,-1 <== NOT EXECUTED
ffc205c0: 48 00 00 2c b ffc205ec <rtems_rfs_rtems_device_open+0x120><== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
ffc205c4: 4b ff fe 95 bl ffc20458 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
iop->data0 = major;
ffc205c8: 93 be 00 2c stw r29,44(r30) <== NOT EXECUTED
iop->data1 = (void *) minor;
return rtems_deviceio_open (iop, pathname, oflag, mode, minor, major);
ffc205cc: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
iop->data0 = major;
iop->data1 = (void *) minor;
ffc205d0: 93 9e 00 30 stw r28,48(r30) <== NOT EXECUTED
return rtems_deviceio_open (iop, pathname, oflag, mode, minor, major);
ffc205d4: 7f 24 cb 78 mr r4,r25 <== NOT EXECUTED
ffc205d8: 7f 45 d3 78 mr r5,r26 <== NOT EXECUTED
ffc205dc: 7f 66 db 78 mr r6,r27 <== NOT EXECUTED
ffc205e0: 7f 87 e3 78 mr r7,r28 <== NOT EXECUTED
ffc205e4: 7f a8 eb 78 mr r8,r29 <== NOT EXECUTED
ffc205e8: 48 00 0c 95 bl ffc2127c <rtems_deviceio_open> <== NOT EXECUTED
}
ffc205ec: 39 61 00 58 addi r11,r1,88 <== NOT EXECUTED
ffc205f0: 4b fe 0f 60 b ffc01550 <_restgpr_24_x> <== NOT EXECUTED
ffc20404 <rtems_rfs_rtems_device_read>:
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);
ffc20404: 80 c3 00 2c lwz r6,44(r3) <== NOT EXECUTED
ffc20408: 80 e3 00 30 lwz r7,48(r3) <== NOT EXECUTED
ffc2040c: 48 00 0e f0 b ffc212fc <rtems_deviceio_read> <== NOT EXECUTED
ffc203f8 <rtems_rfs_rtems_device_write>:
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);
ffc203f8: 80 c3 00 2c lwz r6,44(r3) <== NOT EXECUTED
ffc203fc: 80 e3 00 30 lwz r7,48(r3) <== NOT EXECUTED
ffc20400: 48 00 0f 8c b ffc2138c <rtems_deviceio_write> <== NOT EXECUTED
ffc207f0 <rtems_rfs_rtems_dir_open>:
static int
rtems_rfs_rtems_dir_open (rtems_libio_t* iop,
const char* pathname,
int oflag,
mode_t mode)
{
ffc207f0: 94 21 ff b8 stwu r1,-72(r1)
ffc207f4: 7c 08 02 a6 mflr r0
ffc207f8: 90 01 00 4c stw r0,76(r1)
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (&iop->pathinfo);
ffc207fc: 81 23 00 28 lwz r9,40(r3)
static int
rtems_rfs_rtems_dir_open (rtems_libio_t* iop,
const char* pathname,
int oflag,
mode_t mode)
{
ffc20800: bf a1 00 3c stmw r29,60(r1)
ffc20804: 7c 7e 1b 78 mr r30,r3
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (&iop->pathinfo);
ffc20808: 83 e9 00 08 lwz r31,8(r9)
rtems_rfs_ino ino = rtems_rfs_rtems_get_iop_ino (iop);
ffc2080c: 83 a3 00 1c lwz r29,28(r3)
.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
};
ffc20810: 81 3f 00 80 lwz r9,128(r31)
ffc20814: 80 69 00 00 lwz r3,0(r9)
ffc20818: 4b ff fd e5 bl ffc205fc <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);
ffc2081c: 7f a4 eb 78 mr r4,r29
ffc20820: 7f e3 fb 78 mr r3,r31
ffc20824: 38 a1 00 08 addi r5,r1,8
ffc20828: 38 c0 00 01 li r6,1
ffc2082c: 4b ff 20 95 bl ffc128c0 <rtems_rfs_inode_open>
if (rc)
ffc20830: 7c 7d 1b 79 mr. r29,r3
ffc20834: 41 a2 00 18 beq+ ffc2084c <rtems_rfs_rtems_dir_open+0x5c><== ALWAYS TAKEN
{
rtems_rfs_rtems_unlock (fs);
ffc20838: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc2083c: 4b ff fe 2d bl ffc20668 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
return rtems_rfs_rtems_error ("dir_open: opening inode", rc);
ffc20840: 48 00 17 a9 bl ffc21fe8 <__errno> <== NOT EXECUTED
ffc20844: 93 a3 00 00 stw r29,0(r3) <== NOT EXECUTED
ffc20848: 48 00 00 38 b ffc20880 <rtems_rfs_rtems_dir_open+0x90><== NOT EXECUTED
* @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);
ffc2084c: 81 21 00 14 lwz r9,20(r1)
ffc20850: 89 29 00 02 lbz r9,2(r9)
}
if (!RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)))
ffc20854: 55 29 44 26 rlwinm r9,r9,8,16,19
ffc20858: 2f 89 40 00 cmpwi cr7,r9,16384
ffc2085c: 41 be 00 2c beq+ cr7,ffc20888 <rtems_rfs_rtems_dir_open+0x98><== ALWAYS TAKEN
{
rtems_rfs_inode_close (fs, &inode);
ffc20860: 38 81 00 08 addi r4,r1,8 <== NOT EXECUTED
ffc20864: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc20868: 4b ff 22 4d bl ffc12ab4 <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
ffc2086c: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc20870: 4b ff fd f9 bl ffc20668 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
return rtems_rfs_rtems_error ("dir_open: not dir", ENOTDIR);
ffc20874: 48 00 17 75 bl ffc21fe8 <__errno> <== NOT EXECUTED
ffc20878: 39 20 00 14 li r9,20 <== NOT EXECUTED
ffc2087c: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED
ffc20880: 38 60 ff ff li r3,-1 <== NOT EXECUTED
ffc20884: 48 00 00 2c b ffc208b0 <rtems_rfs_rtems_dir_open+0xc0><== NOT EXECUTED
}
iop->offset = 0;
ffc20888: 39 40 00 00 li r10,0
ffc2088c: 39 60 00 00 li r11,0
ffc20890: 91 5e 00 08 stw r10,8(r30)
rtems_rfs_inode_close (fs, &inode);
ffc20894: 38 81 00 08 addi r4,r1,8
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("dir_open: not dir", ENOTDIR);
}
iop->offset = 0;
ffc20898: 91 7e 00 0c stw r11,12(r30)
rtems_rfs_inode_close (fs, &inode);
ffc2089c: 7f e3 fb 78 mr r3,r31
ffc208a0: 4b ff 22 15 bl ffc12ab4 <rtems_rfs_inode_close>
rtems_rfs_rtems_unlock (fs);
ffc208a4: 7f e3 fb 78 mr r3,r31
ffc208a8: 4b ff fd c1 bl ffc20668 <rtems_rfs_rtems_unlock>
return 0;
ffc208ac: 38 60 00 00 li r3,0
}
ffc208b0: 39 61 00 48 addi r11,r1,72
ffc208b4: 4b fe 0c b0 b ffc01564 <_restgpr_29_x>
ffc206dc <rtems_rfs_rtems_dir_read>:
*/
static ssize_t
rtems_rfs_rtems_dir_read (rtems_libio_t* iop,
void* buffer,
size_t count)
{
ffc206dc: 94 21 ff a0 stwu r1,-96(r1)
ffc206e0: 7c 08 02 a6 mflr r0
ffc206e4: 90 01 00 64 stw r0,100(r1)
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (&iop->pathinfo);
ffc206e8: 81 23 00 28 lwz r9,40(r3)
*/
static ssize_t
rtems_rfs_rtems_dir_read (rtems_libio_t* iop,
void* buffer,
size_t count)
{
ffc206ec: be c1 00 38 stmw r22,56(r1)
ffc206f0: 7c 7c 1b 78 mr r28,r3
ffc206f4: 7c 98 23 78 mr r24,r4
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (&iop->pathinfo);
ffc206f8: 83 a9 00 08 lwz r29,8(r9)
*/
static ssize_t
rtems_rfs_rtems_dir_read (rtems_libio_t* iop,
void* buffer,
size_t count)
{
ffc206fc: 7c bb 2b 78 mr r27,r5
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (&iop->pathinfo);
rtems_rfs_ino ino = rtems_rfs_rtems_get_iop_ino (iop);
ffc20700: 83 43 00 1c lwz r26,28(r3)
.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
};
ffc20704: 81 3d 00 80 lwz r9,128(r29)
*/
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);
ffc20708: 80 69 00 00 lwz r3,0(r9)
ffc2070c: 4b ff fe f1 bl ffc205fc <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);
ffc20710: 7f 44 d3 78 mr r4,r26
ffc20714: 3b 41 00 08 addi r26,r1,8
ffc20718: 7f a3 eb 78 mr r3,r29
ffc2071c: 7f 45 d3 78 mr r5,r26
ffc20720: 38 c0 00 01 li r6,1
ffc20724: 4b ff 21 9d bl ffc128c0 <rtems_rfs_inode_open>
if (rc)
ffc20728: 7c 79 1b 79 mr. r25,r3
ffc2072c: 41 a2 00 80 beq+ ffc207ac <rtems_rfs_rtems_dir_read+0xd0><== ALWAYS TAKEN
{
rtems_rfs_rtems_unlock (fs);
ffc20730: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED
ffc20734: 4b ff ff 35 bl ffc20668 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
return rtems_rfs_rtems_error ("dir_read: read inode", rc);
ffc20738: 3b 40 ff ff li r26,-1 <== NOT EXECUTED
ffc2073c: 48 00 18 ad bl ffc21fe8 <__errno> <== NOT EXECUTED
ffc20740: 93 23 00 00 stw r25,0(r3) <== NOT EXECUTED
ffc20744: 48 00 00 a0 b ffc207e4 <rtems_rfs_rtems_dir_read+0x108><== 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);
ffc20748: 80 bc 00 08 lwz r5,8(r28)
ffc2074c: 7f a3 eb 78 mr r3,r29
ffc20750: 80 dc 00 0c lwz r6,12(r28)
ffc20754: 7e c4 b3 78 mr r4,r22
ffc20758: 39 01 00 30 addi r8,r1,48
ffc2075c: 4b ff d4 cd bl ffc1dc28 <rtems_rfs_dir_read>
if (rc == ENOENT)
ffc20760: 2f 83 00 02 cmpwi cr7,r3,2
bytes_transferred = 0;
for (d = 0; d < count; d++, dirent++)
{
size_t size;
rc = rtems_rfs_dir_read (fs, &inode, iop->offset, dirent, &size);
ffc20764: 7c 79 1b 78 mr r25,r3
if (rc == ENOENT)
ffc20768: 41 9e 00 68 beq- cr7,ffc207d0 <rtems_rfs_rtems_dir_read+0xf4>
{
rc = 0;
break;
}
if (rc > 0)
ffc2076c: 2f 83 00 00 cmpwi cr7,r3,0
ffc20770: 40 bd 00 14 ble+ cr7,ffc20784 <rtems_rfs_rtems_dir_read+0xa8><== ALWAYS TAKEN
{
bytes_transferred = rtems_rfs_rtems_error ("dir_read: dir read", rc);
ffc20774: 48 00 18 75 bl ffc21fe8 <__errno> <== NOT EXECUTED
ffc20778: 3b 40 ff ff li r26,-1 <== NOT EXECUTED
ffc2077c: 93 23 00 00 stw r25,0(r3) <== NOT EXECUTED
ffc20780: 48 00 00 50 b ffc207d0 <rtems_rfs_rtems_dir_read+0xf4><== NOT EXECUTED
break;
}
iop->offset += size;
ffc20784: 81 5c 00 08 lwz r10,8(r28)
ffc20788: 3b c0 00 00 li r30,0
ffc2078c: 81 7c 00 0c lwz r11,12(r28)
return rtems_rfs_rtems_error ("dir_read: read inode", rc);
}
bytes_transferred = 0;
for (d = 0; d < count; d++, dirent++)
ffc20790: 3b 7b 00 01 addi r27,r27,1
if (rc > 0)
{
bytes_transferred = rtems_rfs_rtems_error ("dir_read: dir read", rc);
break;
}
iop->offset += size;
ffc20794: 83 e1 00 30 lwz r31,48(r1)
ffc20798: 7d 6b f8 14 addc r11,r11,r31
ffc2079c: 7d 4a f1 14 adde r10,r10,r30
ffc207a0: 91 5c 00 08 stw r10,8(r28)
ffc207a4: 91 7c 00 0c stw r11,12(r28)
ffc207a8: 48 00 00 14 b ffc207bc <rtems_rfs_rtems_dir_read+0xe0>
struct dirent* dirent;
ssize_t bytes_transferred;
int d;
int rc;
count = count / sizeof (struct dirent);
ffc207ac: 3a e0 01 18 li r23,280
ffc207b0: 7e fb bb 96 divwu r23,r27,r23
bytes_transferred = 0;
for (d = 0; d < count; d++, dirent++)
{
size_t size;
rc = rtems_rfs_dir_read (fs, &inode, iop->offset, dirent, &size);
ffc207b4: 7f 56 d3 78 mr r22,r26
* 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,
ffc207b8: 3b 60 00 00 li r27,0
return rtems_rfs_rtems_error ("dir_read: read inode", rc);
}
bytes_transferred = 0;
for (d = 0; d < count; d++, dirent++)
ffc207bc: 7f 9b b8 00 cmpw cr7,r27,r23
* 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,
ffc207c0: 1d 3b 01 18 mulli r9,r27,280
ffc207c4: 7c f8 4a 14 add r7,r24,r9
ffc207c8: 7d 3a 4b 78 mr r26,r9
return rtems_rfs_rtems_error ("dir_read: read inode", rc);
}
bytes_transferred = 0;
for (d = 0; d < count; d++, dirent++)
ffc207cc: 40 9e ff 7c bne+ cr7,ffc20748 <rtems_rfs_rtems_dir_read+0x6c>
}
iop->offset += size;
bytes_transferred += sizeof (struct dirent);
}
rtems_rfs_inode_close (fs, &inode);
ffc207d0: 7f a3 eb 78 mr r3,r29
ffc207d4: 38 81 00 08 addi r4,r1,8
ffc207d8: 4b ff 22 dd bl ffc12ab4 <rtems_rfs_inode_close>
rtems_rfs_rtems_unlock (fs);
ffc207dc: 7f a3 eb 78 mr r3,r29
ffc207e0: 4b ff fe 89 bl ffc20668 <rtems_rfs_rtems_unlock>
return bytes_transferred;
}
ffc207e4: 39 61 00 60 addi r11,r1,96
ffc207e8: 7f 43 d3 78 mr r3,r26
ffc207ec: 4b fe 0d 5c b ffc01548 <_restgpr_22_x>
ffc13a04 <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)
{
ffc13a04: 94 21 ff b8 stwu r1,-72(r1)
ffc13a08: 7c 08 02 a6 mflr r0
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (currentloc);
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);
ffc13a0c: 38 c0 00 01 li r6,1
.eval_token = rtems_rfs_rtems_eval_token
};
static void
rtems_rfs_rtems_eval_path (rtems_filesystem_eval_path_context_t *ctx)
{
ffc13a10: 90 01 00 4c stw r0,76(r1)
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (currentloc);
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);
ffc13a14: 38 a1 00 08 addi r5,r1,8
static void
rtems_rfs_rtems_eval_path (rtems_filesystem_eval_path_context_t *ctx)
{
rtems_filesystem_location_info_t *currentloc =
rtems_filesystem_eval_path_get_currentloc (ctx);
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (currentloc);
ffc13a18: 81 23 00 2c lwz r9,44(r3)
.eval_token = rtems_rfs_rtems_eval_token
};
static void
rtems_rfs_rtems_eval_path (rtems_filesystem_eval_path_context_t *ctx)
{
ffc13a1c: bf a1 00 3c stmw r29,60(r1)
ffc13a20: 7c 7f 1b 78 mr r31,r3
rtems_filesystem_location_info_t *currentloc =
rtems_filesystem_eval_path_get_currentloc (ctx);
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (currentloc);
ffc13a24: 83 c9 00 08 lwz r30,8(r9)
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);
ffc13a28: 80 9f 00 20 lwz r4,32(r31)
ffc13a2c: 7f c3 f3 78 mr r3,r30
ffc13a30: 4b ff ee 91 bl ffc128c0 <rtems_rfs_inode_open>
if (rc == 0) {
ffc13a34: 7c 7d 1b 79 mr. r29,r3
ffc13a38: 40 82 00 38 bne- ffc13a70 <rtems_rfs_rtems_eval_path+0x6c><== NEVER TAKEN
rtems_filesystem_eval_path_generic (
ffc13a3c: 3c a0 ff c3 lis r5,-61
ffc13a40: 7f e3 fb 78 mr r3,r31
ffc13a44: 38 81 00 08 addi r4,r1,8
ffc13a48: 38 a5 50 80 addi r5,r5,20608
ffc13a4c: 48 00 49 ad bl ffc183f8 <rtems_filesystem_eval_path_generic>
ctx,
&inode,
&rtems_rfs_rtems_eval_config
);
rc = rtems_rfs_inode_close (fs, &inode);
ffc13a50: 7f c3 f3 78 mr r3,r30
ffc13a54: 38 81 00 08 addi r4,r1,8
ffc13a58: 4b ff f0 5d bl ffc12ab4 <rtems_rfs_inode_close>
if (rc != 0) {
ffc13a5c: 7c 7e 1b 79 mr. r30,r3
ffc13a60: 41 a2 00 24 beq+ ffc13a84 <rtems_rfs_rtems_eval_path+0x80><== ALWAYS TAKEN
rtems_filesystem_eval_path_error (
ctx,
rtems_rfs_rtems_error ("eval_path: closing inode", rc)
ffc13a64: 48 00 e5 85 bl ffc21fe8 <__errno> <== NOT EXECUTED
ffc13a68: 93 c3 00 00 stw r30,0(r3) <== NOT EXECUTED
ffc13a6c: 48 00 00 0c b ffc13a78 <rtems_rfs_rtems_eval_path+0x74><== NOT EXECUTED
);
}
} else {
rtems_filesystem_eval_path_error (
ctx,
rtems_rfs_rtems_error ("eval_path: opening inode", rc)
ffc13a70: 48 00 e5 79 bl ffc21fe8 <__errno> <== NOT EXECUTED
ffc13a74: 93 a3 00 00 stw r29,0(r3) <== NOT EXECUTED
ctx,
rtems_rfs_rtems_error ("eval_path: closing inode", rc)
);
}
} else {
rtems_filesystem_eval_path_error (
ffc13a78: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc13a7c: 38 80 ff ff li r4,-1 <== NOT EXECUTED
ffc13a80: 4b ff 68 15 bl ffc0a294 <rtems_filesystem_eval_path_error><== NOT EXECUTED
ctx,
rtems_rfs_rtems_error ("eval_path: opening inode", rc)
);
}
}
ffc13a84: 39 61 00 48 addi r11,r1,72
ffc13a88: 4b fe da dc b ffc01564 <_restgpr_29_x>
ffc14070 <rtems_rfs_rtems_eval_token>:
rtems_filesystem_eval_path_context_t *ctx,
void *arg,
const char *token,
size_t tokenlen
)
{
ffc14070: 94 21 ff d0 stwu r1,-48(r1)
ffc14074: 7c 08 02 a6 mflr r0
ffc14078: 90 01 00 34 stw r0,52(r1)
ffc1407c: bf 61 00 1c stmw r27,28(r1)
ffc14080: 7c bb 2b 78 mr r27,r5
ffc14084: 7c dc 33 78 mr r28,r6
/* FIXME: Return value? */
rtems_rfs_fs_close(fs);
rtems_rfs_mutex_destroy (&rtems->access);
free (rtems);
}
ffc14088: 81 24 00 0c lwz r9,12(r4)
rtems_filesystem_eval_path_context_t *ctx,
void *arg,
const char *token,
size_t tokenlen
)
{
ffc1408c: 7c 9e 23 78 mr r30,r4
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(
ffc14090: 38 80 00 01 li r4,1
* @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;
ffc14094: 89 49 00 06 lbz r10,6(r9)
rtems_filesystem_eval_path_context_t *ctx,
void *arg,
const char *token,
size_t tokenlen
)
{
ffc14098: 7c 7f 1b 78 mr r31,r3
ffc1409c: 88 c9 00 07 lbz r6,7(r9)
* @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);
ffc140a0: 88 a9 00 02 lbz r5,2(r9)
* @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;
ffc140a4: 55 4a 40 2e rlwinm r10,r10,8,0,23
* @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);
ffc140a8: 89 09 00 03 lbz r8,3(r9)
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(
ffc140ac: 7c c6 53 78 or r6,r6,r10
* @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;
ffc140b0: 88 e9 00 04 lbz r7,4(r9)
* @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);
ffc140b4: 54 a5 40 2e rlwinm r5,r5,8,0,23
* @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;
ffc140b8: 89 29 00 05 lbz r9,5(r9)
ffc140bc: 7c a5 43 78 or r5,r5,r8
ffc140c0: 54 e7 c0 0e rlwinm r7,r7,24,0,7
ffc140c4: 55 29 80 1e rlwinm r9,r9,16,0,15
ffc140c8: 7c e7 4b 78 or r7,r7,r9
ffc140cc: 54 e7 84 3e rlwinm r7,r7,16,16,31
ffc140d0: 48 00 42 e1 bl ffc183b0 <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) {
ffc140d4: 2f 83 00 00 cmpwi cr7,r3,0
ffc140d8: 41 9e 01 88 beq- cr7,ffc14260 <rtems_rfs_rtems_eval_token+0x1f0>
static inline bool rtems_filesystem_is_current_directory(
const char *token,
size_t tokenlen
)
{
return tokenlen == 1 && token [0] == '.';
ffc140dc: 2f 9c 00 01 cmpwi cr7,r28,1
ffc140e0: 39 20 00 00 li r9,0
ffc140e4: 40 be 00 14 bne+ cr7,ffc140f8 <rtems_rfs_rtems_eval_token+0x88>
ffc140e8: 89 3b 00 00 lbz r9,0(r27)
ffc140ec: 69 29 00 2e xori r9,r9,46
ffc140f0: 7d 29 00 34 cntlzw r9,r9
ffc140f4: 55 29 d9 7e rlwinm r9,r9,27,5,31
if (rtems_filesystem_is_current_directory (token, tokenlen)) {
ffc140f8: 2f 89 00 00 cmpwi cr7,r9,0
ffc140fc: 41 9e 00 10 beq- cr7,ffc1410c <rtems_rfs_rtems_eval_token+0x9c>
static inline void rtems_filesystem_eval_path_clear_token(
rtems_filesystem_eval_path_context_t *ctx
)
{
ctx->tokenlen = 0;
ffc14100: 39 20 00 00 li r9,0
ffc14104: 91 3f 00 0c stw r9,12(r31)
ffc14108: 48 00 01 58 b ffc14260 <rtems_rfs_rtems_eval_token+0x1f0>
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);
ffc1410c: 81 3f 00 2c lwz r9,44(r31)
rtems_rfs_ino entry_ino;
uint32_t entry_doff;
int rc = rtems_rfs_dir_lookup_ino (
ffc14110: 7f c4 f3 78 mr r4,r30
ffc14114: 7f 65 db 78 mr r5,r27
if (rtems_filesystem_is_current_directory (token, tokenlen)) {
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);
ffc14118: 83 a9 00 08 lwz r29,8(r9)
rtems_rfs_ino entry_ino;
uint32_t entry_doff;
int rc = rtems_rfs_dir_lookup_ino (
ffc1411c: 7f 86 e3 78 mr r6,r28
ffc14120: 38 e1 00 10 addi r7,r1,16
ffc14124: 7f a3 eb 78 mr r3,r29
ffc14128: 39 01 00 0c addi r8,r1,12
ffc1412c: 48 00 8e 71 bl ffc1cf9c <rtems_rfs_dir_lookup_ino>
* rtems_rfs_rtems_eval_path().
*/
memset (inode, 0, sizeof(*inode));
}
} else {
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY;
ffc14130: 39 20 00 02 li r9,2
tokenlen,
&entry_ino,
&entry_doff
);
if (rc == 0) {
ffc14134: 2f 83 00 00 cmpwi cr7,r3,0
ffc14138: 40 be 01 44 bne+ cr7,ffc1427c <rtems_rfs_rtems_eval_token+0x20c>
rc = rtems_rfs_inode_close (fs, inode);
ffc1413c: 7f a3 eb 78 mr r3,r29
ffc14140: 7f c4 f3 78 mr r4,r30
ffc14144: 4b ff e9 71 bl ffc12ab4 <rtems_rfs_inode_close>
if (rc == 0) {
ffc14148: 2f 83 00 00 cmpwi cr7,r3,0
ffc1414c: 41 9e 00 18 beq- cr7,ffc14164 <rtems_rfs_rtems_eval_token+0xf4><== 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));
ffc14150: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc14154: 38 80 00 00 li r4,0 <== NOT EXECUTED
ffc14158: 38 a0 00 28 li r5,40 <== NOT EXECUTED
ffc1415c: 48 00 f5 d5 bl ffc23730 <memset> <== NOT EXECUTED
ffc14160: 48 00 01 00 b ffc14260 <rtems_rfs_rtems_eval_token+0x1f0><== 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);
ffc14164: 80 81 00 10 lwz r4,16(r1)
ffc14168: 7f a3 eb 78 mr r3,r29
ffc1416c: 7f c5 f3 78 mr r5,r30
ffc14170: 38 c0 00 01 li r6,1
ffc14174: 4b ff e7 4d bl ffc128c0 <rtems_rfs_inode_open>
}
if (rc != 0) {
ffc14178: 7c 7b 1b 79 mr. r27,r3
ffc1417c: 41 a2 00 a0 beq+ ffc1421c <rtems_rfs_rtems_eval_token+0x1ac><== ALWAYS TAKEN
ffc14180: 4b ff ff d0 b ffc14150 <rtems_rfs_rtems_eval_token+0xe0><== 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)) {
ffc14184: 2f 89 00 00 cmpwi cr7,r9,0
ffc14188: 40 9e 00 0c bne- cr7,ffc14194 <rtems_rfs_rtems_eval_token+0x124>
ffc1418c: 2f 9c 00 00 cmpwi cr7,r28,0
ffc14190: 40 9e 00 74 bne- cr7,ffc14204 <rtems_rfs_rtems_eval_token+0x194>
rtems_filesystem_eval_path_context_t* ctx,
rtems_rfs_file_system* fs,
rtems_rfs_ino ino
)
{
size_t len = MAXPATHLEN;
ffc14194: 39 20 04 00 li r9,1024
bool terminal = !rtems_filesystem_eval_path_has_path (ctx);
rtems_filesystem_eval_path_clear_token (ctx);
if (is_sym_link && (follow_sym_link || !terminal)) {
rtems_rfs_rtems_follow_link (ctx, fs, entry_ino);
ffc14198: 83 81 00 10 lwz r28,16(r1)
rtems_rfs_file_system* fs,
rtems_rfs_ino ino
)
{
size_t len = MAXPATHLEN;
char *link = malloc(len + 1);
ffc1419c: 38 60 04 01 li r3,1025
rtems_filesystem_eval_path_context_t* ctx,
rtems_rfs_file_system* fs,
rtems_rfs_ino ino
)
{
size_t len = MAXPATHLEN;
ffc141a0: 91 21 00 08 stw r9,8(r1)
char *link = malloc(len + 1);
ffc141a4: 4b ff 50 39 bl ffc091dc <malloc>
if (link != NULL) {
ffc141a8: 7c 7e 1b 79 mr. r30,r3
ffc141ac: 41 82 00 4c beq- ffc141f8 <rtems_rfs_rtems_eval_token+0x188><== NEVER TAKEN
int rc = rtems_rfs_symlink_read (fs, ino, link, len, &len);
ffc141b0: 7f a3 eb 78 mr r3,r29
ffc141b4: 7f 84 e3 78 mr r4,r28
ffc141b8: 7f c5 f3 78 mr r5,r30
ffc141bc: 38 c0 04 00 li r6,1024
ffc141c0: 38 e1 00 08 addi r7,r1,8
ffc141c4: 48 00 bf 61 bl ffc20124 <rtems_rfs_symlink_read>
if (rc == 0) {
ffc141c8: 2f 83 00 00 cmpwi cr7,r3,0
rtems_filesystem_eval_path_recursive (ctx, link, len);
ffc141cc: 7f e3 fb 78 mr r3,r31
char *link = malloc(len + 1);
if (link != NULL) {
int rc = rtems_rfs_symlink_read (fs, ino, link, len, &len);
if (rc == 0) {
ffc141d0: 40 9e 00 14 bne- cr7,ffc141e4 <rtems_rfs_rtems_eval_token+0x174><== NEVER TAKEN
rtems_filesystem_eval_path_recursive (ctx, link, len);
ffc141d4: 80 a1 00 08 lwz r5,8(r1)
ffc141d8: 7f c4 f3 78 mr r4,r30
ffc141dc: 4b ff 66 19 bl ffc0a7f4 <rtems_filesystem_eval_path_recursive>
ffc141e0: 48 00 00 0c b ffc141ec <rtems_rfs_rtems_eval_token+0x17c>
} else {
rtems_filesystem_eval_path_error (ctx, 0);
ffc141e4: 38 80 00 00 li r4,0 <== NOT EXECUTED
ffc141e8: 4b ff 60 ad bl ffc0a294 <rtems_filesystem_eval_path_error><== NOT EXECUTED
}
free(link);
ffc141ec: 7f c3 f3 78 mr r3,r30
ffc141f0: 4b ff 49 25 bl ffc08b14 <free>
ffc141f4: 48 00 00 6c b ffc14260 <rtems_rfs_rtems_eval_token+0x1f0>
} else {
rtems_filesystem_eval_path_error (ctx, ENOMEM);
ffc141f8: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc141fc: 38 80 00 0c li r4,12 <== NOT EXECUTED
ffc14200: 48 00 00 5c b ffc1425c <rtems_rfs_rtems_eval_token+0x1ec><== NOT EXECUTED
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;
ffc14204: 38 7f 00 18 addi r3,r31,24
ffc14208: 7f c4 f3 78 mr r4,r30
ffc1420c: 48 00 00 f9 bl ffc14304 <rtems_rfs_rtems_set_handlers>
ffc14210: 2f 83 00 00 cmpwi cr7,r3,0
ffc14214: 40 9e 00 54 bne- cr7,ffc14268 <rtems_rfs_rtems_eval_token+0x1f8><== ALWAYS TAKEN
ffc14218: 48 00 00 30 b ffc14248 <rtems_rfs_rtems_eval_token+0x1d8><== 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)
ffc1421c: 7f c3 f3 78 mr r3,r30
ffc14220: 4b ff f0 1d bl ffc1323c <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;
bool terminal = !rtems_filesystem_eval_path_has_path (ctx);
ffc14224: 83 9f 00 04 lwz r28,4(r31)
rtems_filesystem_eval_path_clear_token (ctx);
if (is_sym_link && (follow_sym_link || !terminal)) {
ffc14228: 2f 83 00 03 cmpwi cr7,r3,3
if (rc == 0) {
bool is_sym_link = rtems_rfs_rtems_node_type_by_inode (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;
ffc1422c: 81 3f 00 10 lwz r9,16(r31)
bool terminal = !rtems_filesystem_eval_path_has_path (ctx);
ffc14230: 7f 9c 00 34 cntlzw r28,r28
ffc14234: 93 7f 00 0c stw r27,12(r31)
if (rc == 0) {
bool is_sym_link = rtems_rfs_rtems_node_type_by_inode (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;
ffc14238: 55 29 06 f6 rlwinm r9,r9,0,27,27
bool terminal = !rtems_filesystem_eval_path_has_path (ctx);
ffc1423c: 57 9c d9 7e rlwinm r28,r28,27,5,31
rtems_filesystem_eval_path_clear_token (ctx);
if (is_sym_link && (follow_sym_link || !terminal)) {
ffc14240: 40 be ff c4 bne- cr7,ffc14204 <rtems_rfs_rtems_eval_token+0x194>
ffc14244: 4b ff ff 40 b ffc14184 <rtems_rfs_rtems_eval_token+0x114>
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_CONTINUE;
}
} else {
rtems_filesystem_eval_path_error (
ctx,
rtems_rfs_rtems_error ("eval_path: set handlers", rc)
ffc14248: 48 00 dd a1 bl ffc21fe8 <__errno> <== NOT EXECUTED
ffc1424c: 39 20 00 05 li r9,5 <== NOT EXECUTED
ffc14250: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED
if (!terminal) {
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_CONTINUE;
}
} else {
rtems_filesystem_eval_path_error (
ffc14254: 38 80 ff ff li r4,-1 <== NOT EXECUTED
ffc14258: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc1425c: 4b ff 60 39 bl ffc0a294 <rtems_filesystem_eval_path_error><== NOT EXECUTED
void *arg,
const char *token,
size_t tokenlen
)
{
rtems_filesystem_eval_path_generic_status status =
ffc14260: 39 20 00 01 li r9,1
ffc14264: 48 00 00 18 b ffc1427c <rtems_rfs_rtems_eval_token+0x20c>
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);
ffc14268: 81 21 00 10 lwz r9,16(r1)
ffc1426c: 91 3f 00 20 stw r9,32(r31)
rtems_rfs_rtems_set_pathloc_doff (currentloc, entry_doff);
ffc14270: 81 21 00 0c lwz r9,12(r1)
ffc14274: 91 3f 00 24 stw r9,36(r31)
void *arg,
const char *token,
size_t tokenlen
)
{
rtems_filesystem_eval_path_generic_status status =
ffc14278: 7f 89 e3 78 mr r9,r28
}
}
}
return status;
}
ffc1427c: 39 61 00 30 addi r11,r1,48
ffc14280: 7d 23 4b 78 mr r3,r9
ffc14284: 4b fe d2 d8 b ffc0155c <_restgpr_27_x>
ffc13750 <rtems_rfs_rtems_fchmod>:
}
static int
rtems_rfs_rtems_fchmod (const rtems_filesystem_location_info_t* pathloc,
mode_t mode)
{
ffc13750: 94 21 ff b8 stwu r1,-72(r1)
ffc13754: 7c 08 02 a6 mflr r0
ffc13758: 7c 69 1b 78 mr r9,r3
ffc1375c: 90 01 00 4c stw r0,76(r1)
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);
ffc13760: 38 a1 00 08 addi r5,r1,8
ffc13764: 38 c0 00 01 li r6,1
static int
rtems_rfs_rtems_fchmod (const rtems_filesystem_location_info_t* pathloc,
mode_t mode)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
ffc13768: 81 43 00 14 lwz r10,20(r3)
}
static int
rtems_rfs_rtems_fchmod (const rtems_filesystem_location_info_t* pathloc,
mode_t mode)
{
ffc1376c: bf a1 00 3c stmw r29,60(r1)
ffc13770: 7c 9e 23 78 mr r30,r4
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
ffc13774: 83 ea 00 08 lwz r31,8(r10)
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);
ffc13778: 80 89 00 08 lwz r4,8(r9)
ffc1377c: 7f e3 fb 78 mr r3,r31
ffc13780: 4b ff f1 41 bl ffc128c0 <rtems_rfs_inode_open>
if (rc)
ffc13784: 7c 7d 1b 79 mr. r29,r3
ffc13788: 41 82 00 10 beq- ffc13798 <rtems_rfs_rtems_fchmod+0x48> <== ALWAYS TAKEN
{
return rtems_rfs_rtems_error ("fchmod: opening inode", rc);
ffc1378c: 48 00 e8 5d bl ffc21fe8 <__errno> <== NOT EXECUTED
ffc13790: 93 a3 00 00 stw r29,0(r3) <== NOT EXECUTED
ffc13794: 48 00 00 a4 b ffc13838 <rtems_rfs_rtems_fchmod+0xe8> <== NOT EXECUTED
}
imode = rtems_rfs_inode_get_mode (&inode);
ffc13798: 81 21 00 14 lwz r9,20(r1)
* @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);
ffc1379c: 8b a9 00 02 lbz r29,2(r9)
ffc137a0: 89 29 00 03 lbz r9,3(r9)
ffc137a4: 57 bd 40 2e rlwinm r29,r29,8,0,23
ffc137a8: 7f bd 4b 78 or r29,r29,r9
/*
* Verify I am the owner of the node or the super user.
*/
#if defined (RTEMS_POSIX_API)
uid = geteuid();
ffc137ac: 48 00 47 8d bl ffc17f38 <geteuid>
if ((uid != rtems_rfs_inode_get_uid (&inode)) && (uid != 0))
ffc137b0: 81 21 00 14 lwz r9,20(r1)
* @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;
ffc137b4: 89 49 00 06 lbz r10,6(r9)
ffc137b8: 89 09 00 07 lbz r8,7(r9)
ffc137bc: 55 4a 40 2e rlwinm r10,r10,8,0,23
ffc137c0: 7d 4a 43 78 or r10,r10,r8
ffc137c4: 55 4a 04 3e clrlwi r10,r10,16
ffc137c8: 7f 83 50 00 cmpw cr7,r3,r10
ffc137cc: 41 9e 00 28 beq- cr7,ffc137f4 <rtems_rfs_rtems_fchmod+0xa4><== ALWAYS TAKEN
ffc137d0: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc137d4: 41 be 00 20 beq+ cr7,ffc137f4 <rtems_rfs_rtems_fchmod+0xa4><== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
ffc137d8: 38 81 00 08 addi r4,r1,8 <== NOT EXECUTED
ffc137dc: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc137e0: 4b ff f2 d5 bl ffc12ab4 <rtems_rfs_inode_close> <== NOT EXECUTED
return rtems_rfs_rtems_error ("fchmod: checking uid", EPERM);
ffc137e4: 48 00 e8 05 bl ffc21fe8 <__errno> <== NOT EXECUTED
ffc137e8: 39 20 00 01 li r9,1 <== NOT EXECUTED
ffc137ec: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED
ffc137f0: 48 00 00 48 b ffc13838 <rtems_rfs_rtems_fchmod+0xe8> <== NOT EXECUTED
}
#endif
imode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
ffc137f4: 57 a4 04 26 rlwinm r4,r29,0,16,19
imode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
ffc137f8: 57 de 05 3e clrlwi r30,r30,20
ffc137fc: 7c 84 f3 78 or r4,r4,r30
* @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);
ffc13800: 54 8a c2 3e rlwinm r10,r4,24,8,31
ffc13804: 99 49 00 02 stb r10,2(r9)
rtems_rfs_inode_set_mode (&inode, imode);
rc = rtems_rfs_inode_close (fs, &inode);
ffc13808: 7f e3 fb 78 mr r3,r31
ffc1380c: 81 21 00 14 lwz r9,20(r1)
ffc13810: 98 89 00 03 stb r4,3(r9)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
ffc13814: 39 20 00 01 li r9,1
ffc13818: 38 81 00 08 addi r4,r1,8
ffc1381c: 99 21 00 18 stb r9,24(r1)
ffc13820: 4b ff f2 95 bl ffc12ab4 <rtems_rfs_inode_close>
if (rc > 0)
ffc13824: 7c 7f 1b 79 mr. r31,r3
{
return rtems_rfs_rtems_error ("fchmod: closing inode", rc);
}
return 0;
ffc13828: 39 20 00 00 li r9,0
imode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
rtems_rfs_inode_set_mode (&inode, imode);
rc = rtems_rfs_inode_close (fs, &inode);
if (rc > 0)
ffc1382c: 40 81 00 10 ble- ffc1383c <rtems_rfs_rtems_fchmod+0xec> <== ALWAYS TAKEN
{
return rtems_rfs_rtems_error ("fchmod: closing inode", rc);
ffc13830: 48 00 e7 b9 bl ffc21fe8 <__errno> <== NOT EXECUTED
ffc13834: 93 e3 00 00 stw r31,0(r3) <== NOT EXECUTED
ffc13838: 39 20 ff ff li r9,-1 <== NOT EXECUTED
}
return 0;
}
ffc1383c: 39 61 00 48 addi r11,r1,72
ffc13840: 7d 23 4b 78 mr r3,r9
ffc13844: 4b fe dd 20 b ffc01564 <_restgpr_29_x>
ffc142c0 <rtems_rfs_rtems_fdatasync>:
* @param iop
* @return int
*/
int
rtems_rfs_rtems_fdatasync (rtems_libio_t* iop)
{
ffc142c0: 7c 2b 0b 78 mr r11,r1 <== NOT EXECUTED
ffc142c4: 7c 08 02 a6 mflr r0 <== NOT EXECUTED
ffc142c8: 94 21 ff f0 stwu r1,-16(r1) <== NOT EXECUTED
ffc142cc: 90 01 00 14 stw r0,20(r1) <== NOT EXECUTED
ffc142d0: 4b fe d2 51 bl ffc01520 <_savegpr_31> <== NOT EXECUTED
int rc;
rc = rtems_rfs_buffer_sync (rtems_rfs_rtems_pathloc_dev (&iop->pathinfo));
ffc142d4: 81 23 00 28 lwz r9,40(r3) <== NOT EXECUTED
ffc142d8: 80 69 00 08 lwz r3,8(r9) <== NOT EXECUTED
ffc142dc: 48 00 89 91 bl ffc1cc6c <rtems_rfs_buffer_sync> <== NOT EXECUTED
if (rc)
ffc142e0: 7c 7f 1b 79 mr. r31,r3 <== NOT EXECUTED
ffc142e4: 41 a2 00 14 beq+ ffc142f8 <rtems_rfs_rtems_fdatasync+0x38><== NOT EXECUTED
return rtems_rfs_rtems_error ("fdatasync: sync", rc);
ffc142e8: 48 00 dd 01 bl ffc21fe8 <__errno> <== NOT EXECUTED
ffc142ec: 93 e3 00 00 stw r31,0(r3) <== NOT EXECUTED
ffc142f0: 38 60 ff ff li r3,-1 <== NOT EXECUTED
ffc142f4: 48 00 00 08 b ffc142fc <rtems_rfs_rtems_fdatasync+0x3c><== NOT EXECUTED
return 0;
ffc142f8: 38 60 00 00 li r3,0 <== NOT EXECUTED
}
ffc142fc: 39 61 00 10 addi r11,r1,16 <== NOT EXECUTED
ffc14300: 4b fe d2 6c b ffc0156c <_restgpr_31_x> <== NOT EXECUTED
ffc20ad0 <rtems_rfs_rtems_file_close>:
* @param iop
* @return int
*/
static int
rtems_rfs_rtems_file_close (rtems_libio_t* iop)
{
ffc20ad0: 94 21 ff f0 stwu r1,-16(r1)
ffc20ad4: 7c 08 02 a6 mflr r0
ffc20ad8: 90 01 00 14 stw r0,20(r1)
ffc20adc: bf c1 00 08 stmw r30,8(r1)
rtems_rfs_file_handle* file = rtems_rfs_rtems_get_iop_file_handle (iop);
ffc20ae0: 83 c3 00 20 lwz r30,32(r3)
rtems_rfs_file_system* fs = rtems_rfs_file_fs (file);
ffc20ae4: 81 3e 00 1c lwz r9,28(r30)
ffc20ae8: 83 e9 00 98 lwz r31,152(r9)
.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
};
ffc20aec: 81 3f 00 80 lwz r9,128(r31)
ffc20af0: 80 69 00 00 lwz r3,0(r9)
ffc20af4: 4b ff fd c5 bl ffc208b8 <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);
ffc20af8: 7f c4 f3 78 mr r4,r30
ffc20afc: 7f e3 fb 78 mr r3,r31
ffc20b00: 4b ff d6 d9 bl ffc1e1d8 <rtems_rfs_file_close>
if (rc > 0)
ffc20b04: 7c 7e 1b 79 mr. r30,r3
ffc20b08: 40 81 00 10 ble- ffc20b18 <rtems_rfs_rtems_file_close+0x48><== ALWAYS TAKEN
rc = rtems_rfs_rtems_error ("file-close: file close", rc);
ffc20b0c: 48 00 14 dd bl ffc21fe8 <__errno> <== NOT EXECUTED
ffc20b10: 93 c3 00 00 stw r30,0(r3) <== NOT EXECUTED
ffc20b14: 3b c0 ff ff li r30,-1 <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
ffc20b18: 7f e3 fb 78 mr r3,r31
ffc20b1c: 4b ff fe 09 bl ffc20924 <rtems_rfs_rtems_unlock>
return rc;
}
ffc20b20: 39 61 00 10 addi r11,r1,16
ffc20b24: 7f c3 f3 78 mr r3,r30
ffc20b28: 4b fe 0a 40 b ffc01568 <_restgpr_30_x>
ffc20ba4 <rtems_rfs_rtems_file_ftruncate>:
* @return int
*/
static int
rtems_rfs_rtems_file_ftruncate (rtems_libio_t* iop,
off_t length)
{
ffc20ba4: 94 21 ff e8 stwu r1,-24(r1)
ffc20ba8: 7c 08 02 a6 mflr r0
ffc20bac: 90 01 00 1c stw r0,28(r1)
ffc20bb0: bf a1 00 0c stmw r29,12(r1)
ffc20bb4: 7c df 33 78 mr r31,r6
ffc20bb8: 7c be 2b 78 mr r30,r5
rtems_rfs_file_handle* file = rtems_rfs_rtems_get_iop_file_handle (iop);
ffc20bbc: 83 a3 00 20 lwz r29,32(r3)
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));
ffc20bc0: 81 3d 00 1c lwz r9,28(r29)
.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
};
ffc20bc4: 81 29 00 98 lwz r9,152(r9)
ffc20bc8: 81 29 00 80 lwz r9,128(r9)
ffc20bcc: 80 69 00 00 lwz r3,0(r9)
ffc20bd0: 4b ff fc e9 bl ffc208b8 <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);
ffc20bd4: 7f e6 fb 78 mr r6,r31
ffc20bd8: 7f a3 eb 78 mr r3,r29
ffc20bdc: 7f c5 f3 78 mr r5,r30
ffc20be0: 4b ff de 81 bl ffc1ea60 <rtems_rfs_file_set_size>
if (rc)
ffc20be4: 7c 7f 1b 79 mr. r31,r3
ffc20be8: 41 a2 00 10 beq+ ffc20bf8 <rtems_rfs_rtems_file_ftruncate+0x54><== ALWAYS TAKEN
rc = rtems_rfs_rtems_error ("file_ftruncate: set size", rc);
ffc20bec: 48 00 13 fd bl ffc21fe8 <__errno> <== NOT EXECUTED
ffc20bf0: 93 e3 00 00 stw r31,0(r3) <== NOT EXECUTED
ffc20bf4: 3b e0 ff ff li r31,-1 <== NOT EXECUTED
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
ffc20bf8: 81 3d 00 1c lwz r9,28(r29)
ffc20bfc: 80 69 00 98 lwz r3,152(r9)
ffc20c00: 4b ff fd 25 bl ffc20924 <rtems_rfs_rtems_unlock>
return rc;
}
ffc20c04: 39 61 00 18 addi r11,r1,24
ffc20c08: 7f e3 fb 78 mr r3,r31
ffc20c0c: 4b fe 09 58 b ffc01564 <_restgpr_29_x>
ffc20c10 <rtems_rfs_rtems_file_lseek>:
*/
static off_t
rtems_rfs_rtems_file_lseek (rtems_libio_t* iop,
off_t offset,
int whence)
{
ffc20c10: 94 21 ff c0 stwu r1,-64(r1)
ffc20c14: 7c 08 02 a6 mflr r0
ffc20c18: 90 01 00 44 stw r0,68(r1)
ffc20c1c: bf 21 00 24 stmw r25,36(r1)
ffc20c20: 7c 7b 1b 78 mr r27,r3
ffc20c24: 7c df 33 78 mr r31,r6
rtems_rfs_file_handle* file = rtems_rfs_rtems_get_iop_file_handle (iop);
ffc20c28: 83 43 00 20 lwz r26,32(r3)
*/
static off_t
rtems_rfs_rtems_file_lseek (rtems_libio_t* iop,
off_t offset,
int whence)
{
ffc20c2c: 7c be 2b 78 mr r30,r5
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));
ffc20c30: 81 3a 00 1c lwz r9,28(r26)
.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
};
ffc20c34: 81 29 00 98 lwz r9,152(r9)
ffc20c38: 81 29 00 80 lwz r9,128(r9)
ffc20c3c: 80 69 00 00 lwz r3,0(r9)
ffc20c40: 90 e1 00 18 stw r7,24(r1)
ffc20c44: 4b ff fc 75 bl ffc208b8 <rtems_rfs_mutex_lock.isra.0>
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;
new_offset = rtems_filesystem_default_lseek_file (iop, offset, whence);
ffc20c48: 7f c5 f3 78 mr r5,r30
ffc20c4c: 80 e1 00 18 lwz r7,24(r1)
ffc20c50: 7f e6 fb 78 mr r6,r31
ffc20c54: 7f 63 db 78 mr r3,r27
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;
ffc20c58: 83 9b 00 08 lwz r28,8(r27)
ffc20c5c: 83 bb 00 0c lwz r29,12(r27)
new_offset = rtems_filesystem_default_lseek_file (iop, offset, whence);
ffc20c60: 48 00 02 ed bl ffc20f4c <rtems_filesystem_default_lseek_file>
ffc20c64: 7c 7e 1b 78 mr r30,r3
if (new_offset != -1)
ffc20c68: 2f 9e ff ff cmpwi cr7,r30,-1
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;
new_offset = rtems_filesystem_default_lseek_file (iop, offset, whence);
ffc20c6c: 7c 9f 23 78 mr r31,r4
if (new_offset != -1)
ffc20c70: 40 be 00 0c bne+ cr7,ffc20c7c <rtems_rfs_rtems_file_lseek+0x6c>
ffc20c74: 2f 84 ff ff cmpwi cr7,r4,-1
ffc20c78: 41 9e 00 40 beq- cr7,ffc20cb8 <rtems_rfs_rtems_file_lseek+0xa8><== ALWAYS TAKEN
{
rtems_rfs_pos pos = iop->offset;
ffc20c7c: 80 bb 00 08 lwz r5,8(r27)
ffc20c80: 7c 27 0b 78 mr r7,r1
ffc20c84: 80 db 00 0c lwz r6,12(r27)
int rc = rtems_rfs_file_seek (file, pos, &pos);
ffc20c88: 7f 43 d3 78 mr r3,r26
old_offset = iop->offset;
new_offset = rtems_filesystem_default_lseek_file (iop, offset, whence);
if (new_offset != -1)
{
rtems_rfs_pos pos = iop->offset;
ffc20c8c: 94 a7 00 08 stwu r5,8(r7)
ffc20c90: 90 c7 00 04 stw r6,4(r7)
int rc = rtems_rfs_file_seek (file, pos, &pos);
ffc20c94: 4b ff dc c9 bl ffc1e95c <rtems_rfs_file_seek>
if (rc)
ffc20c98: 7c 79 1b 79 mr. r25,r3
ffc20c9c: 41 a2 00 1c beq+ ffc20cb8 <rtems_rfs_rtems_file_lseek+0xa8><== ALWAYS TAKEN
{
rtems_rfs_rtems_error ("file_lseek: lseek", rc);
ffc20ca0: 48 00 13 49 bl ffc21fe8 <__errno> <== NOT EXECUTED
iop->offset = old_offset;
new_offset = -1;
ffc20ca4: 3b c0 ff ff li r30,-1 <== NOT EXECUTED
rtems_rfs_pos pos = iop->offset;
int rc = rtems_rfs_file_seek (file, pos, &pos);
if (rc)
{
rtems_rfs_rtems_error ("file_lseek: lseek", rc);
ffc20ca8: 93 23 00 00 stw r25,0(r3) <== NOT EXECUTED
iop->offset = old_offset;
new_offset = -1;
ffc20cac: 3b e0 ff ff li r31,-1 <== NOT EXECUTED
int rc = rtems_rfs_file_seek (file, pos, &pos);
if (rc)
{
rtems_rfs_rtems_error ("file_lseek: lseek", rc);
iop->offset = old_offset;
ffc20cb0: 93 9b 00 08 stw r28,8(r27) <== NOT EXECUTED
ffc20cb4: 93 bb 00 0c stw r29,12(r27) <== NOT EXECUTED
new_offset = -1;
}
}
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
ffc20cb8: 81 3a 00 1c lwz r9,28(r26)
ffc20cbc: 80 69 00 98 lwz r3,152(r9)
ffc20cc0: 4b ff fc 65 bl ffc20924 <rtems_rfs_rtems_unlock>
return new_offset;
}
ffc20cc4: 39 61 00 40 addi r11,r1,64
ffc20cc8: 7f c3 f3 78 mr r3,r30
ffc20ccc: 7f e4 fb 78 mr r4,r31
ffc20cd0: 4b fe 08 84 b ffc01554 <_restgpr_25_x>
ffc20b2c <rtems_rfs_rtems_file_open>:
static int
rtems_rfs_rtems_file_open (rtems_libio_t* iop,
const char* pathname,
int oflag,
mode_t mode)
{
ffc20b2c: 94 21 ff d8 stwu r1,-40(r1)
ffc20b30: 7c 08 02 a6 mflr r0
ffc20b34: 90 01 00 2c stw r0,44(r1)
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (&iop->pathinfo);
ffc20b38: 81 23 00 28 lwz r9,40(r3)
static int
rtems_rfs_rtems_file_open (rtems_libio_t* iop,
const char* pathname,
int oflag,
mode_t mode)
{
ffc20b3c: bf a1 00 1c stmw r29,28(r1)
ffc20b40: 7c 7e 1b 78 mr r30,r3
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (&iop->pathinfo);
ffc20b44: 83 e9 00 08 lwz r31,8(r9)
.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
};
ffc20b48: 81 3f 00 80 lwz r9,128(r31)
ffc20b4c: 80 69 00 00 lwz r3,0(r9)
ffc20b50: 4b ff fd 69 bl ffc208b8 <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);
ffc20b54: 80 9e 00 1c lwz r4,28(r30)
ffc20b58: 7f e3 fb 78 mr r3,r31
ffc20b5c: 38 a0 00 00 li r5,0
ffc20b60: 38 c1 00 08 addi r6,r1,8
ffc20b64: 4b ff e2 31 bl ffc1ed94 <rtems_rfs_file_open>
if (rc > 0)
ffc20b68: 7c 7d 1b 79 mr. r29,r3
ffc20b6c: 40 81 00 1c ble- ffc20b88 <rtems_rfs_rtems_file_open+0x5c><== ALWAYS TAKEN
{
rtems_rfs_rtems_unlock (fs);
ffc20b70: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc20b74: 4b ff fd b1 bl ffc20924 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
return rtems_rfs_rtems_error ("file-open: open", rc);
ffc20b78: 48 00 14 71 bl ffc21fe8 <__errno> <== NOT EXECUTED
ffc20b7c: 93 a3 00 00 stw r29,0(r3) <== NOT EXECUTED
ffc20b80: 38 60 ff ff li r3,-1 <== NOT EXECUTED
ffc20b84: 48 00 00 18 b ffc20b9c <rtems_rfs_rtems_file_open+0x70><== 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);
ffc20b88: 81 21 00 08 lwz r9,8(r1)
rtems_rfs_rtems_unlock (fs);
ffc20b8c: 7f e3 fb 78 mr r3,r31
}
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);
ffc20b90: 91 3e 00 20 stw r9,32(r30)
rtems_rfs_rtems_unlock (fs);
ffc20b94: 4b ff fd 91 bl ffc20924 <rtems_rfs_rtems_unlock>
return 0;
ffc20b98: 38 60 00 00 li r3,0
}
ffc20b9c: 39 61 00 28 addi r11,r1,40
ffc20ba0: 4b fe 09 c4 b ffc01564 <_restgpr_29_x>
ffc20998 <rtems_rfs_rtems_file_read>:
*/
static ssize_t
rtems_rfs_rtems_file_read (rtems_libio_t* iop,
void* buffer,
size_t count)
{
ffc20998: 94 21 ff c8 stwu r1,-56(r1)
ffc2099c: 7c 08 02 a6 mflr r0
ffc209a0: 90 01 00 3c stw r0,60(r1)
ffc209a4: bf 01 00 18 stmw r24,24(r1)
ffc209a8: 7c 79 1b 78 mr r25,r3
ffc209ac: 7c 98 23 78 mr r24,r4
rtems_rfs_file_handle* file = rtems_rfs_rtems_get_iop_file_handle (iop);
ffc209b0: 83 83 00 20 lwz r28,32(r3)
*/
static ssize_t
rtems_rfs_rtems_file_read (rtems_libio_t* iop,
void* buffer,
size_t count)
{
ffc209b4: 7c bb 2b 78 mr r27,r5
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));
ffc209b8: 81 3c 00 1c lwz r9,28(r28)
.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
};
ffc209bc: 81 29 00 98 lwz r9,152(r9)
ffc209c0: 81 29 00 80 lwz r9,128(r9)
*/
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);
ffc209c4: 80 69 00 00 lwz r3,0(r9)
ffc209c8: 4b ff fe f1 bl ffc208b8 <rtems_rfs_mutex_lock.isra.0>
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
pos = iop->offset;
if (pos < rtems_rfs_file_size (file))
ffc209cc: 80 9c 00 1c lwz r4,28(r28)
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;
ffc209d0: 83 d9 00 08 lwz r30,8(r25)
ffc209d4: 80 64 00 98 lwz r3,152(r4)
ffc209d8: 38 84 00 84 addi r4,r4,132
ffc209dc: 83 f9 00 0c lwz r31,12(r25)
ffc209e0: 4b ff ad f5 bl ffc1b7d4 <rtems_rfs_block_get_size>
if (pos < rtems_rfs_file_size (file))
ffc209e4: 7f 83 f0 40 cmplw cr7,r3,r30
ffc209e8: 41 9d 00 a4 bgt- cr7,ffc20a8c <rtems_rfs_rtems_file_read+0xf4><== NEVER TAKEN
ffc209ec: 7f 83 f0 00 cmpw cr7,r3,r30
ffc209f0: 40 9e 00 0c bne- cr7,ffc209fc <rtems_rfs_rtems_file_read+0x64><== NEVER TAKEN
ffc209f4: 7f 84 f8 40 cmplw cr7,r4,r31
ffc209f8: 41 9d 00 94 bgt- cr7,ffc20a8c <rtems_rfs_rtems_file_read+0xf4>
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;
ffc209fc: 3b a0 00 00 li r29,0
ffc20a00: 48 00 00 a0 b ffc20aa0 <rtems_rfs_rtems_file_read+0x108>
{
while (count)
{
size_t size;
rc = rtems_rfs_file_io_start (file, &size, true);
ffc20a04: 7f 83 e3 78 mr r3,r28
ffc20a08: 38 81 00 08 addi r4,r1,8
ffc20a0c: 38 a0 00 01 li r5,1
ffc20a10: 4b ff da 89 bl ffc1e498 <rtems_rfs_file_io_start>
if (rc > 0)
ffc20a14: 7c 7a 1b 79 mr. r26,r3
ffc20a18: 40 a1 00 08 ble+ ffc20a20 <rtems_rfs_rtems_file_read+0x88><== ALWAYS TAKEN
ffc20a1c: 48 00 00 60 b ffc20a7c <rtems_rfs_rtems_file_read+0xe4><== NOT EXECUTED
{
read = rtems_rfs_rtems_error ("file-read: read: io-start", rc);
break;
}
if (size == 0)
ffc20a20: 81 21 00 08 lwz r9,8(r1)
ffc20a24: 2f 89 00 00 cmpwi cr7,r9,0
ffc20a28: 41 9e 00 70 beq- cr7,ffc20a98 <rtems_rfs_rtems_file_read+0x100>
break;
if (size > count)
ffc20a2c: 7f 89 d8 40 cmplw cr7,r9,r27
ffc20a30: 40 9d 00 08 ble- cr7,ffc20a38 <rtems_rfs_rtems_file_read+0xa0>
size = count;
ffc20a34: 93 61 00 08 stw r27,8(r1)
memcpy (data, rtems_rfs_file_data (file), size);
ffc20a38: 81 3c 00 0c lwz r9,12(r28)
ffc20a3c: 7f 03 c3 78 mr r3,r24
ffc20a40: 83 41 00 08 lwz r26,8(r1)
ffc20a44: 80 89 00 1c lwz r4,28(r9)
ffc20a48: 81 3c 00 14 lwz r9,20(r28)
ffc20a4c: 7f 45 d3 78 mr r5,r26
data += size;
ffc20a50: 7f 18 d2 14 add r24,r24,r26
break;
if (size > count)
size = count;
memcpy (data, rtems_rfs_file_data (file), size);
ffc20a54: 7c 84 4a 14 add r4,r4,r9
ffc20a58: 48 00 2a a9 bl ffc23500 <memcpy>
data += size;
count -= size;
read += size;
rc = rtems_rfs_file_io_end (file, size, true);
ffc20a5c: 7f 44 d3 78 mr r4,r26
ffc20a60: 7f 83 e3 78 mr r3,r28
ffc20a64: 38 a0 00 01 li r5,1
ffc20a68: 4b ff dc 51 bl ffc1e6b8 <rtems_rfs_file_io_end>
size = count;
memcpy (data, rtems_rfs_file_data (file), size);
data += size;
count -= size;
ffc20a6c: 7f 7a d8 50 subf r27,r26,r27
read += size;
ffc20a70: 7f bd d2 14 add r29,r29,r26
rc = rtems_rfs_file_io_end (file, size, true);
if (rc > 0)
ffc20a74: 7c 7a 1b 79 mr. r26,r3
ffc20a78: 40 a1 00 18 ble+ ffc20a90 <rtems_rfs_rtems_file_read+0xf8><== ALWAYS TAKEN
{
read = rtems_rfs_rtems_error ("file-read: read: io-end", rc);
ffc20a7c: 48 00 15 6d bl ffc21fe8 <__errno> <== NOT EXECUTED
ffc20a80: 3b a0 ff ff li r29,-1 <== NOT EXECUTED
ffc20a84: 93 43 00 00 stw r26,0(r3) <== NOT EXECUTED
ffc20a88: 48 00 00 30 b ffc20ab8 <rtems_rfs_rtems_file_read+0x120><== NOT EXECUTED
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
pos = iop->offset;
if (pos < rtems_rfs_file_size (file))
ffc20a8c: 3b a0 00 00 li r29,0
{
while (count)
ffc20a90: 2f 9b 00 00 cmpwi cr7,r27,0
ffc20a94: 40 9e ff 70 bne+ cr7,ffc20a04 <rtems_rfs_rtems_file_read+0x6c>
break;
}
}
}
if (read >= 0)
ffc20a98: 2f 9d 00 00 cmpwi cr7,r29,0
ffc20a9c: 41 9c 00 1c blt- cr7,ffc20ab8 <rtems_rfs_rtems_file_read+0x120><== NEVER TAKEN
iop->offset = pos + read;
ffc20aa0: 7f ab eb 78 mr r11,r29
ffc20aa4: 7f aa fe 70 srawi r10,r29,31
ffc20aa8: 7f ff 58 14 addc r31,r31,r11
ffc20aac: 7f de 51 14 adde r30,r30,r10
ffc20ab0: 93 d9 00 08 stw r30,8(r25)
ffc20ab4: 93 f9 00 0c stw r31,12(r25)
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
ffc20ab8: 81 3c 00 1c lwz r9,28(r28)
ffc20abc: 80 69 00 98 lwz r3,152(r9)
ffc20ac0: 4b ff fe 65 bl ffc20924 <rtems_rfs_rtems_unlock>
return read;
}
ffc20ac4: 39 61 00 38 addi r11,r1,56
ffc20ac8: 7f a3 eb 78 mr r3,r29
ffc20acc: 4b fe 0a 84 b ffc01550 <_restgpr_24_x>
ffc20cd4 <rtems_rfs_rtems_file_write>:
*/
static ssize_t
rtems_rfs_rtems_file_write (rtems_libio_t* iop,
const void* buffer,
size_t count)
{
ffc20cd4: 94 21 ff d0 stwu r1,-48(r1)
ffc20cd8: 7c 08 02 a6 mflr r0
ffc20cdc: 90 01 00 34 stw r0,52(r1)
ffc20ce0: bf 41 00 18 stmw r26,24(r1)
ffc20ce4: 7c 7c 1b 78 mr r28,r3
ffc20ce8: 7c bd 2b 78 mr r29,r5
rtems_rfs_file_handle* file = rtems_rfs_rtems_get_iop_file_handle (iop);
ffc20cec: 83 e3 00 20 lwz r31,32(r3)
*/
static ssize_t
rtems_rfs_rtems_file_write (rtems_libio_t* iop,
const void* buffer,
size_t count)
{
ffc20cf0: 7c 9b 23 78 mr r27,r4
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));
ffc20cf4: 81 3f 00 1c lwz r9,28(r31)
.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
};
ffc20cf8: 81 29 00 98 lwz r9,152(r9)
ffc20cfc: 81 29 00 80 lwz r9,128(r9)
ffc20d00: 80 69 00 00 lwz r3,0(r9)
ffc20d04: 4b ff fb b5 bl ffc208b8 <rtems_rfs_mutex_lock.isra.0>
printf("rtems-rfs: file-write: handle:%p count:%zd\n", file, count);
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
pos = iop->offset;
file_size = rtems_rfs_file_size (file);
ffc20d08: 80 9f 00 1c lwz r4,28(r31)
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;
ffc20d0c: 81 3c 00 08 lwz r9,8(r28)
ffc20d10: 81 5c 00 0c lwz r10,12(r28)
ffc20d14: 80 64 00 98 lwz r3,152(r4)
ffc20d18: 38 84 00 84 addi r4,r4,132
ffc20d1c: 91 21 00 08 stw r9,8(r1)
ffc20d20: 91 41 00 0c stw r10,12(r1)
ffc20d24: 4b ff aa b1 bl ffc1b7d4 <rtems_rfs_block_get_size>
ffc20d28: 7c 69 1b 78 mr r9,r3
file_size = rtems_rfs_file_size (file);
if (pos > file_size)
ffc20d2c: 80 a1 00 08 lwz r5,8(r1)
ffc20d30: 80 c1 00 0c lwz r6,12(r1)
ffc20d34: 7f 85 48 40 cmplw cr7,r5,r9
ffc20d38: 41 9d 00 14 bgt- cr7,ffc20d4c <rtems_rfs_rtems_file_write+0x78><== NEVER TAKEN
ffc20d3c: 7f 85 48 00 cmpw cr7,r5,r9
ffc20d40: 40 be 00 40 bne+ cr7,ffc20d80 <rtems_rfs_rtems_file_write+0xac><== NEVER TAKEN
ffc20d44: 7f 86 20 40 cmplw cr7,r6,r4
ffc20d48: 40 bd 00 38 ble+ cr7,ffc20d80 <rtems_rfs_rtems_file_write+0xac>
/*
* 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);
ffc20d4c: 7f e3 fb 78 mr r3,r31
ffc20d50: 4b ff dd 11 bl ffc1ea60 <rtems_rfs_file_set_size>
ffc20d54: 81 3f 00 1c lwz r9,28(r31)
if (rc)
ffc20d58: 7c 7e 1b 79 mr. r30,r3
{
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
ffc20d5c: 80 69 00 98 lwz r3,152(r9)
* 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);
if (rc)
ffc20d60: 41 82 00 08 beq- ffc20d68 <rtems_rfs_rtems_file_write+0x94><== ALWAYS TAKEN
ffc20d64: 48 00 00 6c b ffc20dd0 <rtems_rfs_rtems_file_write+0xfc><== 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);
ffc20d68: 80 a1 00 08 lwz r5,8(r1)
ffc20d6c: 38 ff 00 10 addi r7,r31,16
ffc20d70: 80 c1 00 0c lwz r6,12(r1)
ffc20d74: 4b ff a9 7d bl ffc1b6f0 <rtems_rfs_block_get_bpos>
*/
static ssize_t
rtems_rfs_rtems_file_write (rtems_libio_t* iop,
const void* buffer,
size_t count)
{
ffc20d78: 3b c0 00 00 li r30,0
ffc20d7c: 48 00 00 e8 b ffc20e64 <rtems_rfs_rtems_file_write+0x190>
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)
ffc20d80: 7f 89 28 40 cmplw cr7,r9,r5
ffc20d84: 41 9d 00 14 bgt- cr7,ffc20d98 <rtems_rfs_rtems_file_write+0xc4><== NEVER TAKEN
ffc20d88: 7f 89 28 00 cmpw cr7,r9,r5
ffc20d8c: 40 be ff ec bne- cr7,ffc20d78 <rtems_rfs_rtems_file_write+0xa4><== NEVER TAKEN
ffc20d90: 7f 84 30 40 cmplw cr7,r4,r6
ffc20d94: 40 bd ff e4 ble- cr7,ffc20d78 <rtems_rfs_rtems_file_write+0xa4>
ffc20d98: 81 1c 00 10 lwz r8,16(r28)
ffc20d9c: 71 0a 02 00 andi. r10,r8,512
ffc20da0: 41 82 ff d8 beq+ ffc20d78 <rtems_rfs_rtems_file_write+0xa4>
{
pos = file_size;
rc = rtems_rfs_file_seek (file, pos, &pos);
ffc20da4: 7f e3 fb 78 mr r3,r31
rtems_rfs_file_set_bpos (file, pos);
}
else if (pos < file_size && (iop->flags & LIBIO_FLAGS_APPEND) != 0)
{
pos = file_size;
ffc20da8: 91 21 00 08 stw r9,8(r1)
rc = rtems_rfs_file_seek (file, pos, &pos);
ffc20dac: 7d 25 4b 78 mr r5,r9
ffc20db0: 7c 86 23 78 mr r6,r4
rtems_rfs_file_set_bpos (file, pos);
}
else if (pos < file_size && (iop->flags & LIBIO_FLAGS_APPEND) != 0)
{
pos = file_size;
ffc20db4: 90 81 00 0c stw r4,12(r1)
rc = rtems_rfs_file_seek (file, pos, &pos);
ffc20db8: 38 e1 00 08 addi r7,r1,8
ffc20dbc: 4b ff db a1 bl ffc1e95c <rtems_rfs_file_seek>
if (rc)
ffc20dc0: 7c 7e 1b 79 mr. r30,r3
ffc20dc4: 41 82 ff b4 beq+ ffc20d78 <rtems_rfs_rtems_file_write+0xa4><== ALWAYS TAKEN
{
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
ffc20dc8: 81 3f 00 1c lwz r9,28(r31) <== NOT EXECUTED
ffc20dcc: 80 69 00 98 lwz r3,152(r9) <== NOT EXECUTED
ffc20dd0: 4b ff fb 55 bl ffc20924 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
return rtems_rfs_rtems_error ("file-write: write append seek", rc);
ffc20dd4: 48 00 12 15 bl ffc21fe8 <__errno> <== NOT EXECUTED
ffc20dd8: 93 c3 00 00 stw r30,0(r3) <== NOT EXECUTED
ffc20ddc: 3b c0 ff ff li r30,-1 <== NOT EXECUTED
ffc20de0: 48 00 00 c0 b ffc20ea0 <rtems_rfs_rtems_file_write+0x1cc><== NOT EXECUTED
while (count)
{
size_t size = count;
rc = rtems_rfs_file_io_start (file, &size, false);
ffc20de4: 7f e3 fb 78 mr r3,r31
}
}
while (count)
{
size_t size = count;
ffc20de8: 93 a1 00 10 stw r29,16(r1)
rc = rtems_rfs_file_io_start (file, &size, false);
ffc20dec: 38 81 00 10 addi r4,r1,16
ffc20df0: 38 a0 00 00 li r5,0
ffc20df4: 4b ff d6 a5 bl ffc1e498 <rtems_rfs_file_io_start>
if (rc)
ffc20df8: 7c 7a 1b 79 mr. r26,r3
ffc20dfc: 41 a2 00 08 beq+ ffc20e04 <rtems_rfs_rtems_file_write+0x130>
ffc20e00: 48 00 00 54 b ffc20e54 <rtems_rfs_rtems_file_write+0x180>
{
write = rtems_rfs_rtems_error ("file-write: write open", rc);
break;
}
if (size > count)
ffc20e04: 81 21 00 10 lwz r9,16(r1)
ffc20e08: 7f 89 e8 40 cmplw cr7,r9,r29
ffc20e0c: 40 9d 00 08 ble- cr7,ffc20e14 <rtems_rfs_rtems_file_write+0x140>
size = count;
ffc20e10: 93 a1 00 10 stw r29,16(r1)
memcpy (rtems_rfs_file_data (file), data, size);
ffc20e14: 81 3f 00 0c lwz r9,12(r31)
ffc20e18: 7f 64 db 78 mr r4,r27
ffc20e1c: 80 a1 00 10 lwz r5,16(r1)
ffc20e20: 80 69 00 1c lwz r3,28(r9)
ffc20e24: 81 3f 00 14 lwz r9,20(r31)
ffc20e28: 7c 63 4a 14 add r3,r3,r9
ffc20e2c: 48 00 26 d5 bl ffc23500 <memcpy>
data += size;
ffc20e30: 80 81 00 10 lwz r4,16(r1)
count -= size;
write += size;
rc = rtems_rfs_file_io_end (file, size, false);
ffc20e34: 7f e3 fb 78 mr r3,r31
ffc20e38: 38 a0 00 00 li r5,0
if (size > count)
size = count;
memcpy (rtems_rfs_file_data (file), data, size);
data += size;
ffc20e3c: 7f 7b 22 14 add r27,r27,r4
count -= size;
ffc20e40: 7f a4 e8 50 subf r29,r4,r29
write += size;
ffc20e44: 7f de 22 14 add r30,r30,r4
rc = rtems_rfs_file_io_end (file, size, false);
ffc20e48: 4b ff d8 71 bl ffc1e6b8 <rtems_rfs_file_io_end>
if (rc)
ffc20e4c: 7c 7a 1b 79 mr. r26,r3
ffc20e50: 41 a2 00 14 beq+ ffc20e64 <rtems_rfs_rtems_file_write+0x190><== ALWAYS TAKEN
{
write = rtems_rfs_rtems_error ("file-write: write close", rc);
ffc20e54: 48 00 11 95 bl ffc21fe8 <__errno>
ffc20e58: 3b c0 ff ff li r30,-1
ffc20e5c: 93 43 00 00 stw r26,0(r3)
ffc20e60: 48 00 00 34 b ffc20e94 <rtems_rfs_rtems_file_write+0x1c0>
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
return rtems_rfs_rtems_error ("file-write: write append seek", rc);
}
}
while (count)
ffc20e64: 2f 9d 00 00 cmpwi cr7,r29,0
ffc20e68: 40 9e ff 7c bne+ cr7,ffc20de4 <rtems_rfs_rtems_file_write+0x110>
write = rtems_rfs_rtems_error ("file-write: write close", rc);
break;
}
}
if (write >= 0)
ffc20e6c: 2f 9e 00 00 cmpwi cr7,r30,0
ffc20e70: 41 9c 00 24 blt- cr7,ffc20e94 <rtems_rfs_rtems_file_write+0x1c0><== NEVER TAKEN
iop->offset = pos + write;
ffc20e74: 81 01 00 08 lwz r8,8(r1)
ffc20e78: 7f cb f3 78 mr r11,r30
ffc20e7c: 81 21 00 0c lwz r9,12(r1)
ffc20e80: 7f ca fe 70 srawi r10,r30,31
ffc20e84: 7d 6b 48 14 addc r11,r11,r9
ffc20e88: 7d 4a 41 14 adde r10,r10,r8
ffc20e8c: 91 5c 00 08 stw r10,8(r28)
ffc20e90: 91 7c 00 0c stw r11,12(r28)
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
ffc20e94: 81 3f 00 1c lwz r9,28(r31)
ffc20e98: 80 69 00 98 lwz r3,152(r9)
ffc20e9c: 4b ff fa 89 bl ffc20924 <rtems_rfs_rtems_unlock>
return write;
}
ffc20ea0: 39 61 00 30 addi r11,r1,48
ffc20ea4: 7f c3 f3 78 mr r3,r30
ffc20ea8: 4b fe 06 b0 b ffc01558 <_restgpr_26_x>
ffc13b08 <rtems_rfs_rtems_fstat>:
}
int
rtems_rfs_rtems_fstat (const rtems_filesystem_location_info_t* pathloc,
struct stat* buf)
{
ffc13b08: 94 21 ff b0 stwu r1,-80(r1)
ffc13b0c: 7c 08 02 a6 mflr r0
ffc13b10: 7c 69 1b 78 mr r9,r3
ffc13b14: 90 01 00 54 stw r0,84(r1)
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);
ffc13b18: 38 a1 00 08 addi r5,r1,8
ffc13b1c: 38 c0 00 01 li r6,1
int
rtems_rfs_rtems_fstat (const rtems_filesystem_location_info_t* pathloc,
struct stat* buf)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
ffc13b20: 81 43 00 14 lwz r10,20(r3)
}
int
rtems_rfs_rtems_fstat (const rtems_filesystem_location_info_t* pathloc,
struct stat* buf)
{
ffc13b24: bf 61 00 3c stmw r27,60(r1)
ffc13b28: 7c 9f 23 78 mr r31,r4
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
ffc13b2c: 83 ca 00 08 lwz r30,8(r10)
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);
ffc13b30: 80 89 00 08 lwz r4,8(r9)
ffc13b34: 7f c3 f3 78 mr r3,r30
ffc13b38: 4b ff ed 89 bl ffc128c0 <rtems_rfs_inode_open>
if (rc)
ffc13b3c: 7c 7d 1b 79 mr. r29,r3
ffc13b40: 41 a2 00 10 beq+ ffc13b50 <rtems_rfs_rtems_fstat+0x48> <== ALWAYS TAKEN
{
return rtems_rfs_rtems_error ("stat: opening inode", rc);
ffc13b44: 48 00 e4 a5 bl ffc21fe8 <__errno> <== NOT EXECUTED
ffc13b48: 93 a3 00 00 stw r29,0(r3) <== NOT EXECUTED
ffc13b4c: 48 00 02 58 b ffc13da4 <rtems_rfs_rtems_fstat+0x29c> <== NOT EXECUTED
}
mode = rtems_rfs_inode_get_mode (&inode);
ffc13b50: 83 a1 00 14 lwz r29,20(r1)
* @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);
ffc13b54: 8b 9d 00 02 lbz r28,2(r29)
ffc13b58: 89 3d 00 03 lbz r9,3(r29)
ffc13b5c: 57 9c 40 2e rlwinm r28,r28,8,0,23
ffc13b60: 7f 9c 4b 78 or r28,r28,r9
if (RTEMS_RFS_S_ISCHR (mode) || RTEMS_RFS_S_ISBLK (mode))
ffc13b64: 57 89 04 26 rlwinm r9,r28,0,16,19
ffc13b68: 2f 89 20 00 cmpwi cr7,r9,8192
ffc13b6c: 41 9e 00 0c beq- cr7,ffc13b78 <rtems_rfs_rtems_fstat+0x70><== NEVER TAKEN
ffc13b70: 2f 89 60 00 cmpwi cr7,r9,24576
ffc13b74: 40 be 00 28 bne+ cr7,ffc13b9c <rtems_rfs_rtems_fstat+0x94><== ALWAYS TAKEN
{
buf->st_rdev =
rtems_filesystem_make_dev_t (rtems_rfs_inode_get_block (&inode, 0),
ffc13b78: 38 80 00 00 li r4,0 <== NOT EXECUTED
ffc13b7c: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED
ffc13b80: 4b ff ff 4d bl ffc13acc <rtems_rfs_inode_get_block.isra.12><== NOT EXECUTED
ffc13b84: 38 80 00 01 li r4,1 <== NOT EXECUTED
ffc13b88: 7c 7b 1b 78 mr r27,r3 <== NOT EXECUTED
ffc13b8c: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED
ffc13b90: 4b ff ff 3d bl ffc13acc <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 =
ffc13b94: 93 7f 00 18 stw r27,24(r31) <== NOT EXECUTED
ffc13b98: 90 7f 00 1c stw r3,28(r31) <== 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);
ffc13b9c: 81 3e 00 10 lwz r9,16(r30)
buf->st_ino = rtems_rfs_inode_ino (&inode);
buf->st_mode = rtems_rfs_rtems_mode (mode);
ffc13ba0: 7f 83 e3 78 mr r3,r28
buf->st_rdev =
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);
ffc13ba4: 91 3f 00 04 stw r9,4(r31)
ffc13ba8: 7d 29 fe 70 srawi r9,r9,31
ffc13bac: 91 3f 00 00 stw r9,0(r31)
buf->st_ino = rtems_rfs_inode_ino (&inode);
ffc13bb0: 81 21 00 10 lwz r9,16(r1)
ffc13bb4: 91 3f 00 08 stw r9,8(r31)
buf->st_mode = rtems_rfs_rtems_mode (mode);
ffc13bb8: 48 00 08 0d bl ffc143c4 <rtems_rfs_rtems_mode>
buf->st_nlink = rtems_rfs_inode_get_links (&inode);
ffc13bbc: 81 21 00 14 lwz r9,20(r1)
rtems_rfs_inode_get_block (&inode, 1));
}
buf->st_dev = rtems_rfs_fs_device (fs);
buf->st_ino = rtems_rfs_inode_ino (&inode);
buf->st_mode = rtems_rfs_rtems_mode (mode);
ffc13bc0: 90 7f 00 0c stw r3,12(r31)
*/
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);
ffc13bc4: 89 49 00 00 lbz r10,0(r9)
ffc13bc8: 89 09 00 01 lbz r8,1(r9)
ffc13bcc: 55 4a 40 2e rlwinm r10,r10,8,0,23
ffc13bd0: 7d 4a 43 78 or r10,r10,r8
if (links == 0xffff)
ffc13bd4: 6d 48 ff ff xoris r8,r10,65535
ffc13bd8: 2f 88 ff ff cmpwi cr7,r8,-1
ffc13bdc: 40 9e 00 08 bne- cr7,ffc13be4 <rtems_rfs_rtems_fstat+0xdc><== ALWAYS TAKEN
links = 0;
ffc13be0: 39 40 00 00 li r10,0 <== NOT EXECUTED
buf->st_nlink = rtems_rfs_inode_get_links (&inode);
ffc13be4: b1 5f 00 10 sth r10,16(r31)
/*
* 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));
ffc13be8: 7f c3 f3 78 mr r3,r30
* @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;
ffc13bec: 89 49 00 06 lbz r10,6(r9)
ffc13bf0: 89 09 00 07 lbz r8,7(r9)
ffc13bf4: 55 4a 40 2e rlwinm r10,r10,8,0,23
ffc13bf8: 80 81 00 10 lwz r4,16(r1)
ffc13bfc: 7d 4a 43 78 or r10,r10,r8
buf->st_dev = rtems_rfs_fs_device (fs);
buf->st_ino = rtems_rfs_inode_ino (&inode);
buf->st_mode = rtems_rfs_rtems_mode (mode);
buf->st_nlink = rtems_rfs_inode_get_links (&inode);
buf->st_uid = rtems_rfs_inode_get_uid (&inode);
ffc13c00: b1 5f 00 12 sth r10,18(r31)
* @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;
ffc13c04: 89 49 00 04 lbz r10,4(r9)
ffc13c08: 89 29 00 05 lbz r9,5(r9)
ffc13c0c: 55 4a c0 0e rlwinm r10,r10,24,0,7
ffc13c10: 55 29 80 1e rlwinm r9,r9,16,0,15
ffc13c14: 7d 49 4b 78 or r9,r10,r9
ffc13c18: 55 29 84 3e rlwinm r9,r9,16,16,31
ffc13c1c: b1 3f 00 14 sth r9,20(r31)
/*
* 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));
ffc13c20: 48 00 b1 41 bl ffc1ed60 <rtems_rfs_file_get_shared>
if (shared)
ffc13c24: 7c 64 1b 79 mr. r4,r3
ffc13c28: 41 82 00 5c beq- ffc13c84 <rtems_rfs_rtems_fstat+0x17c>
{
buf->st_atime = rtems_rfs_file_shared_get_atime (shared);
ffc13c2c: 81 24 00 8c lwz r9,140(r4)
ffc13c30: 91 3f 00 28 stw r9,40(r31)
buf->st_mtime = rtems_rfs_file_shared_get_mtime (shared);
ffc13c34: 81 24 00 90 lwz r9,144(r4)
ffc13c38: 91 3f 00 30 stw r9,48(r31)
buf->st_ctime = rtems_rfs_file_shared_get_ctime (shared);
ffc13c3c: 81 24 00 94 lwz r9,148(r4)
ffc13c40: 91 3f 00 38 stw r9,56(r31)
buf->st_blocks = rtems_rfs_file_shared_get_block_count (shared);
ffc13c44: 81 24 00 84 lwz r9,132(r4)
ffc13c48: 91 3f 00 44 stw r9,68(r31)
if (S_ISLNK (buf->st_mode))
ffc13c4c: 81 3f 00 0c lwz r9,12(r31)
ffc13c50: 55 2a 04 26 rlwinm r10,r9,0,16,19
ffc13c54: 6d 49 ff ff xoris r9,r10,65535
ffc13c58: 2f 89 a0 00 cmpwi cr7,r9,-24576
ffc13c5c: 40 9e 00 18 bne- cr7,ffc13c74 <rtems_rfs_rtems_fstat+0x16c><== ALWAYS TAKEN
buf->st_size = rtems_rfs_file_shared_get_block_offset (shared);
ffc13c60: a1 24 00 8a lhz r9,138(r4) <== NOT EXECUTED
ffc13c64: 91 3f 00 24 stw r9,36(r31) <== NOT EXECUTED
ffc13c68: 39 20 00 00 li r9,0 <== NOT EXECUTED
ffc13c6c: 91 3f 00 20 stw r9,32(r31) <== NOT EXECUTED
ffc13c70: 48 00 01 0c b ffc13d7c <rtems_rfs_rtems_fstat+0x274> <== 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);
ffc13c74: 7f c3 f3 78 mr r3,r30
ffc13c78: 38 84 00 84 addi r4,r4,132
ffc13c7c: 48 00 7b 59 bl ffc1b7d4 <rtems_rfs_block_get_size>
ffc13c80: 48 00 00 f4 b ffc13d74 <rtems_rfs_rtems_fstat+0x26c>
else
buf->st_size = rtems_rfs_file_shared_get_size (fs, shared);
}
else
{
buf->st_atime = rtems_rfs_inode_get_atime (&inode);
ffc13c84: 81 21 00 14 lwz r9,20(r1)
* @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);
ffc13c88: 89 09 00 10 lbz r8,16(r9)
ffc13c8c: 89 49 00 11 lbz r10,17(r9)
ffc13c90: 55 08 c0 0e rlwinm r8,r8,24,0,7
ffc13c94: 55 4a 80 1e rlwinm r10,r10,16,0,15
ffc13c98: 7d 0a 53 78 or r10,r8,r10
ffc13c9c: 89 09 00 13 lbz r8,19(r9)
ffc13ca0: 7d 4a 43 78 or r10,r10,r8
ffc13ca4: 89 09 00 12 lbz r8,18(r9)
ffc13ca8: 55 08 40 2e rlwinm r8,r8,8,0,23
ffc13cac: 7d 4a 43 78 or r10,r10,r8
ffc13cb0: 91 5f 00 28 stw r10,40(r31)
* @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);
ffc13cb4: 89 09 00 14 lbz r8,20(r9)
ffc13cb8: 89 49 00 15 lbz r10,21(r9)
ffc13cbc: 55 08 c0 0e rlwinm r8,r8,24,0,7
ffc13cc0: 55 4a 80 1e rlwinm r10,r10,16,0,15
ffc13cc4: 7d 0a 53 78 or r10,r8,r10
ffc13cc8: 89 09 00 17 lbz r8,23(r9)
ffc13ccc: 7d 4a 43 78 or r10,r10,r8
ffc13cd0: 89 09 00 16 lbz r8,22(r9)
ffc13cd4: 55 08 40 2e rlwinm r8,r8,8,0,23
ffc13cd8: 7d 4a 43 78 or r10,r10,r8
buf->st_mtime = rtems_rfs_inode_get_mtime (&inode);
ffc13cdc: 91 5f 00 30 stw r10,48(r31)
* @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);
ffc13ce0: 89 09 00 18 lbz r8,24(r9)
ffc13ce4: 89 49 00 19 lbz r10,25(r9)
ffc13ce8: 55 08 c0 0e rlwinm r8,r8,24,0,7
ffc13cec: 55 4a 80 1e rlwinm r10,r10,16,0,15
ffc13cf0: 7d 0a 53 78 or r10,r8,r10
ffc13cf4: 89 09 00 1b lbz r8,27(r9)
ffc13cf8: 7d 4a 43 78 or r10,r10,r8
ffc13cfc: 89 09 00 1a lbz r8,26(r9)
ffc13d00: 55 08 40 2e rlwinm r8,r8,8,0,23
ffc13d04: 7d 4a 43 78 or r10,r10,r8
buf->st_ctime = rtems_rfs_inode_get_ctime (&inode);
ffc13d08: 91 5f 00 38 stw r10,56(r31)
* @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);
ffc13d0c: 89 09 00 0c lbz r8,12(r9)
ffc13d10: 89 49 00 0d lbz r10,13(r9)
ffc13d14: 55 08 c0 0e rlwinm r8,r8,24,0,7
ffc13d18: 55 4a 80 1e rlwinm r10,r10,16,0,15
ffc13d1c: 7d 0a 53 78 or r10,r8,r10
ffc13d20: 89 09 00 0f lbz r8,15(r9)
ffc13d24: 7d 4a 43 78 or r10,r10,r8
ffc13d28: 89 09 00 0e lbz r8,14(r9)
ffc13d2c: 55 08 40 2e rlwinm r8,r8,8,0,23
ffc13d30: 7d 4a 43 78 or r10,r10,r8
buf->st_blocks = rtems_rfs_inode_get_block_count (&inode);
ffc13d34: 91 5f 00 44 stw r10,68(r31)
if (S_ISLNK (buf->st_mode))
ffc13d38: 81 5f 00 0c lwz r10,12(r31)
ffc13d3c: 55 48 04 26 rlwinm r8,r10,0,16,19
ffc13d40: 6d 0a ff ff xoris r10,r8,65535
ffc13d44: 2f 8a a0 00 cmpwi cr7,r10,-24576
ffc13d48: 40 9e 00 20 bne- cr7,ffc13d68 <rtems_rfs_rtems_fstat+0x260>
* @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);
ffc13d4c: 89 09 00 0a lbz r8,10(r9)
ffc13d50: 89 49 00 0b lbz r10,11(r9)
ffc13d54: 55 08 40 2e rlwinm r8,r8,8,0,23
buf->st_size = rtems_rfs_inode_get_block_offset (&inode);
ffc13d58: 90 9f 00 20 stw r4,32(r31)
ffc13d5c: 7d 09 53 78 or r9,r8,r10
ffc13d60: 91 3f 00 24 stw r9,36(r31)
ffc13d64: 48 00 00 18 b ffc13d7c <rtems_rfs_rtems_fstat+0x274>
else
buf->st_size = rtems_rfs_inode_get_size (fs, &inode);
ffc13d68: 7f c3 f3 78 mr r3,r30
ffc13d6c: 38 81 00 08 addi r4,r1,8
ffc13d70: 4b ff f4 15 bl ffc13184 <rtems_rfs_inode_get_size>
ffc13d74: 90 7f 00 20 stw r3,32(r31)
ffc13d78: 90 9f 00 24 stw r4,36(r31)
}
buf->st_blksize = rtems_rfs_fs_block_size (fs);
ffc13d7c: 81 3e 00 08 lwz r9,8(r30)
rc = rtems_rfs_inode_close (fs, &inode);
ffc13d80: 7f c3 f3 78 mr r3,r30
ffc13d84: 38 81 00 08 addi r4,r1,8
buf->st_size = rtems_rfs_inode_get_block_offset (&inode);
else
buf->st_size = rtems_rfs_inode_get_size (fs, &inode);
}
buf->st_blksize = rtems_rfs_fs_block_size (fs);
ffc13d88: 91 3f 00 40 stw r9,64(r31)
rc = rtems_rfs_inode_close (fs, &inode);
ffc13d8c: 4b ff ed 29 bl ffc12ab4 <rtems_rfs_inode_close>
if (rc > 0)
{
return rtems_rfs_rtems_error ("stat: closing inode", rc);
}
return 0;
ffc13d90: 39 20 00 00 li r9,0
}
buf->st_blksize = rtems_rfs_fs_block_size (fs);
rc = rtems_rfs_inode_close (fs, &inode);
if (rc > 0)
ffc13d94: 7c 7f 1b 79 mr. r31,r3
ffc13d98: 40 81 00 10 ble- ffc13da8 <rtems_rfs_rtems_fstat+0x2a0> <== ALWAYS TAKEN
{
return rtems_rfs_rtems_error ("stat: closing inode", rc);
ffc13d9c: 48 00 e2 4d bl ffc21fe8 <__errno> <== NOT EXECUTED
ffc13da0: 93 e3 00 00 stw r31,0(r3) <== NOT EXECUTED
ffc13da4: 39 20 ff ff li r9,-1 <== NOT EXECUTED
}
return 0;
}
ffc13da8: 39 61 00 50 addi r11,r1,80
ffc13dac: 7d 23 4b 78 mr r3,r9
ffc13db0: 4b fe d7 ac b ffc0155c <_restgpr_27_x>
ffc13e84 <rtems_rfs_rtems_initialise>:
*/
int
rtems_rfs_rtems_initialise (rtems_filesystem_mount_table_entry_t* mt_entry,
const void* data)
{
ffc13e84: 94 21 ff c8 stwu r1,-56(r1)
ffc13e88: 7c 08 02 a6 mflr r0
ffc13e8c: bf 01 00 18 stmw r24,24(r1)
/*
* Parse the options the user specifiies.
*/
while (options)
{
printf ("options=%s\n", options);
ffc13e90: 3f c0 ff c3 lis r30,-61
if (strncmp (options, "hold-bitmaps",
ffc13e94: 3f 40 ff c3 lis r26,-61
sizeof ("hold-bitmaps") - 1) == 0)
flags |= RTEMS_RFS_FS_BITMAPS_HOLD;
else if (strncmp (options, "no-local-cache",
ffc13e98: 3f 20 ff c3 lis r25,-61
*/
int
rtems_rfs_rtems_initialise (rtems_filesystem_mount_table_entry_t* mt_entry,
const void* data)
{
ffc13e9c: 90 01 00 3c stw r0,60(r1)
sizeof ("hold-bitmaps") - 1) == 0)
flags |= RTEMS_RFS_FS_BITMAPS_HOLD;
else if (strncmp (options, "no-local-cache",
sizeof ("no-local-cache") - 1) == 0)
flags |= RTEMS_RFS_FS_NO_LOCAL_CACHE;
else if (strncmp (options, "max-held-bufs",
ffc13ea0: 3f 00 ff c3 lis r24,-61
*/
int
rtems_rfs_rtems_initialise (rtems_filesystem_mount_table_entry_t* mt_entry,
const void* data)
{
ffc13ea4: 7c 7c 1b 78 mr r28,r3
ffc13ea8: 7c 9f 23 78 mr r31,r4
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;
ffc13eac: 3b 60 00 05 li r27,5
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;
ffc13eb0: 3b a0 00 00 li r29,0
/*
* Parse the options the user specifiies.
*/
while (options)
{
printf ("options=%s\n", options);
ffc13eb4: 3b de 51 53 addi r30,r30,20819
if (strncmp (options, "hold-bitmaps",
ffc13eb8: 3b 5a 51 5f addi r26,r26,20831
sizeof ("hold-bitmaps") - 1) == 0)
flags |= RTEMS_RFS_FS_BITMAPS_HOLD;
else if (strncmp (options, "no-local-cache",
ffc13ebc: 3b 39 51 6c addi r25,r25,20844
sizeof ("no-local-cache") - 1) == 0)
flags |= RTEMS_RFS_FS_NO_LOCAL_CACHE;
else if (strncmp (options, "max-held-bufs",
ffc13ec0: 3b 18 51 7b addi r24,r24,20859
int rc;
/*
* Parse the options the user specifiies.
*/
while (options)
ffc13ec4: 48 00 00 c0 b ffc13f84 <rtems_rfs_rtems_initialise+0x100>
{
printf ("options=%s\n", options);
ffc13ec8: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED
ffc13ecc: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc13ed0: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc13ed4: 48 00 fa b9 bl ffc2398c <printf> <== NOT EXECUTED
if (strncmp (options, "hold-bitmaps",
ffc13ed8: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc13edc: 7f 44 d3 78 mr r4,r26 <== NOT EXECUTED
ffc13ee0: 38 a0 00 0c li r5,12 <== NOT EXECUTED
ffc13ee4: 48 01 0d ad bl ffc24c90 <strncmp> <== NOT EXECUTED
ffc13ee8: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc13eec: 40 9e 00 0c bne- cr7,ffc13ef8 <rtems_rfs_rtems_initialise+0x74><== NOT EXECUTED
sizeof ("hold-bitmaps") - 1) == 0)
flags |= RTEMS_RFS_FS_BITMAPS_HOLD;
ffc13ef0: 63 bd 00 01 ori r29,r29,1 <== NOT EXECUTED
ffc13ef4: 48 00 00 60 b ffc13f54 <rtems_rfs_rtems_initialise+0xd0><== NOT EXECUTED
else if (strncmp (options, "no-local-cache",
ffc13ef8: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc13efc: 7f 24 cb 78 mr r4,r25 <== NOT EXECUTED
ffc13f00: 38 a0 00 0e li r5,14 <== NOT EXECUTED
ffc13f04: 48 01 0d 8d bl ffc24c90 <strncmp> <== NOT EXECUTED
ffc13f08: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc13f0c: 40 9e 00 0c bne- cr7,ffc13f18 <rtems_rfs_rtems_initialise+0x94><== NOT EXECUTED
sizeof ("no-local-cache") - 1) == 0)
flags |= RTEMS_RFS_FS_NO_LOCAL_CACHE;
ffc13f10: 63 bd 00 02 ori r29,r29,2 <== NOT EXECUTED
ffc13f14: 48 00 00 40 b ffc13f54 <rtems_rfs_rtems_initialise+0xd0><== NOT EXECUTED
else if (strncmp (options, "max-held-bufs",
ffc13f18: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc13f1c: 7f 04 c3 78 mr r4,r24 <== NOT EXECUTED
ffc13f20: 38 a0 00 0d li r5,13 <== NOT EXECUTED
ffc13f24: 48 01 0d 6d bl ffc24c90 <strncmp> <== NOT EXECUTED
ffc13f28: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc13f2c: 40 9e 00 1c bne- cr7,ffc13f48 <rtems_rfs_rtems_initialise+0xc4><== NOT EXECUTED
sizeof ("max-held-bufs") - 1) == 0)
{
max_held_buffers = strtoul (options + sizeof ("max-held-bufs"), 0, 0);
ffc13f30: 38 7f 00 0e addi r3,r31,14 <== NOT EXECUTED
ffc13f34: 38 80 00 00 li r4,0 <== NOT EXECUTED
ffc13f38: 38 a0 00 00 li r5,0 <== NOT EXECUTED
ffc13f3c: 48 01 10 ed bl ffc25028 <strtoul> <== NOT EXECUTED
ffc13f40: 7c 7b 1b 78 mr r27,r3 <== NOT EXECUTED
ffc13f44: 48 00 00 10 b ffc13f54 <rtems_rfs_rtems_initialise+0xd0><== NOT EXECUTED
}
else
return rtems_rfs_rtems_error ("initialise: invalid option", EINVAL);
ffc13f48: 48 00 e0 a1 bl ffc21fe8 <__errno> <== NOT EXECUTED
ffc13f4c: 39 20 00 16 li r9,22 <== NOT EXECUTED
ffc13f50: 48 00 00 54 b ffc13fa4 <rtems_rfs_rtems_initialise+0x120><== NOT EXECUTED
options = strchr (options, ',');
ffc13f54: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc13f58: 38 80 00 2c li r4,44 <== NOT EXECUTED
ffc13f5c: 48 01 05 29 bl ffc24484 <strchr> <== NOT EXECUTED
if (options)
ffc13f60: 7c 7f 1b 79 mr. r31,r3 <== NOT EXECUTED
ffc13f64: 41 82 00 28 beq- ffc13f8c <rtems_rfs_rtems_initialise+0x108><== NOT EXECUTED
{
++options;
if (*options == '\0')
ffc13f68: 89 3f 00 01 lbz r9,1(r31) <== NOT EXECUTED
ffc13f6c: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED
ffc13f70: 41 9e 00 0c beq- cr7,ffc13f7c <rtems_rfs_rtems_initialise+0xf8><== NOT EXECUTED
return rtems_rfs_rtems_error ("initialise: invalid option", EINVAL);
options = strchr (options, ',');
if (options)
{
++options;
ffc13f74: 3b ff 00 01 addi r31,r31,1 <== NOT EXECUTED
ffc13f78: 48 00 00 0c b ffc13f84 <rtems_rfs_rtems_initialise+0x100><== NOT EXECUTED
if (*options == '\0')
options = NULL;
ffc13f7c: 3b e0 00 00 li r31,0 <== NOT EXECUTED
ffc13f80: 48 00 00 0c b ffc13f8c <rtems_rfs_rtems_initialise+0x108><== NOT EXECUTED
int rc;
/*
* Parse the options the user specifiies.
*/
while (options)
ffc13f84: 2f 9f 00 00 cmpwi cr7,r31,0
ffc13f88: 40 9e ff 40 bne+ cr7,ffc13ec8 <rtems_rfs_rtems_initialise+0x44><== NEVER TAKEN
if (*options == '\0')
options = NULL;
}
}
rtems = malloc (sizeof (rtems_rfs_rtems_private));
ffc13f8c: 38 60 00 04 li r3,4
ffc13f90: 4b ff 52 4d bl ffc091dc <malloc>
if (!rtems)
ffc13f94: 7c 7e 1b 79 mr. r30,r3
ffc13f98: 40 a2 00 18 bne+ ffc13fb0 <rtems_rfs_rtems_initialise+0x12c><== ALWAYS TAKEN
return rtems_rfs_rtems_error ("initialise: local data", ENOMEM);
ffc13f9c: 48 00 e0 4d bl ffc21fe8 <__errno> <== NOT EXECUTED
ffc13fa0: 39 20 00 0c li r9,12 <== NOT EXECUTED
ffc13fa4: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED
ffc13fa8: 38 60 ff ff li r3,-1 <== NOT EXECUTED
ffc13fac: 48 00 00 ac b ffc14058 <rtems_rfs_rtems_initialise+0x1d4><== NOT EXECUTED
memset (rtems, 0, sizeof (rtems_rfs_rtems_private));
ffc13fb0: 93 fe 00 00 stw r31,0(r30)
rc = rtems_rfs_mutex_create (&rtems->access);
ffc13fb4: 48 00 c3 4d bl ffc20300 <rtems_rfs_mutex_create>
if (rc > 0)
ffc13fb8: 7c 7f 1b 79 mr. r31,r3
ffc13fbc: 40 81 00 08 ble- ffc13fc4 <rtems_rfs_rtems_initialise+0x140><== ALWAYS TAKEN
ffc13fc0: 48 00 00 40 b ffc14000 <rtems_rfs_rtems_initialise+0x17c><== NOT EXECUTED
{
free (rtems);
return rtems_rfs_rtems_error ("initialise: cannot create mutex", rc);
}
rc = rtems_rfs_mutex_lock (&rtems->access);
ffc13fc4: 80 7e 00 00 lwz r3,0(r30)
ffc13fc8: 4b ff fe 51 bl ffc13e18 <rtems_rfs_mutex_lock.isra.20>
if (rc > 0)
ffc13fcc: 7c 7f 1b 79 mr. r31,r3
ffc13fd0: 40 81 00 10 ble- ffc13fe0 <rtems_rfs_rtems_initialise+0x15c><== ALWAYS TAKEN
{
rtems_rfs_mutex_destroy (&rtems->access);
ffc13fd4: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc13fd8: 48 00 c3 a5 bl ffc2037c <rtems_rfs_mutex_destroy> <== NOT EXECUTED
ffc13fdc: 48 00 00 24 b ffc14000 <rtems_rfs_rtems_initialise+0x17c><== NOT EXECUTED
free (rtems);
return rtems_rfs_rtems_error ("initialise: cannot lock access mutex", rc);
}
rc = rtems_rfs_fs_open (mt_entry->dev, rtems, flags, max_held_buffers, &fs);
ffc13fe0: 80 7c 00 38 lwz r3,56(r28)
ffc13fe4: 7f c4 f3 78 mr r4,r30
ffc13fe8: 7f a5 eb 78 mr r5,r29
ffc13fec: 7f 66 db 78 mr r6,r27
ffc13ff0: 38 e1 00 08 addi r7,r1,8
ffc13ff4: 48 00 b1 25 bl ffc1f118 <rtems_rfs_fs_open>
if (rc)
ffc13ff8: 7c 7f 1b 79 mr. r31,r3
ffc13ffc: 41 82 00 18 beq- ffc14014 <rtems_rfs_rtems_initialise+0x190><== ALWAYS TAKEN
{
free (rtems);
ffc14000: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc14004: 4b ff 4b 11 bl ffc08b14 <free> <== NOT EXECUTED
return rtems_rfs_rtems_error ("initialise: open", rc);
ffc14008: 48 00 df e1 bl ffc21fe8 <__errno> <== NOT EXECUTED
ffc1400c: 93 e3 00 00 stw r31,0(r3) <== NOT EXECUTED
ffc14010: 4b ff ff 98 b ffc13fa8 <rtems_rfs_rtems_initialise+0x124><== NOT EXECUTED
}
mt_entry->fs_info = fs;
mt_entry->ops = &rtems_rfs_ops;
ffc14014: 3d 20 ff c3 lis r9,-61
{
free (rtems);
return rtems_rfs_rtems_error ("initialise: open", rc);
}
mt_entry->fs_info = fs;
ffc14018: 80 61 00 08 lwz r3,8(r1)
mt_entry->ops = &rtems_rfs_ops;
ffc1401c: 39 29 50 80 addi r9,r9,20608
ffc14020: 39 29 00 08 addi r9,r9,8
{
free (rtems);
return rtems_rfs_rtems_error ("initialise: open", rc);
}
mt_entry->fs_info = fs;
ffc14024: 90 7c 00 08 stw r3,8(r28)
mt_entry->ops = &rtems_rfs_ops;
mt_entry->mt_fs_root->location.node_access = (void*) RTEMS_RFS_ROOT_INO;
ffc14028: 39 40 00 01 li r10,1
free (rtems);
return rtems_rfs_rtems_error ("initialise: open", rc);
}
mt_entry->fs_info = fs;
mt_entry->ops = &rtems_rfs_ops;
ffc1402c: 91 3c 00 0c stw r9,12(r28)
mt_entry->mt_fs_root->location.node_access = (void*) RTEMS_RFS_ROOT_INO;
ffc14030: 81 3c 00 24 lwz r9,36(r28)
* 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);
ffc14034: 83 e3 00 80 lwz r31,128(r3)
ffc14038: 91 49 00 08 stw r10,8(r9)
mt_entry->mt_fs_root->location.handlers = &rtems_rfs_rtems_dir_handlers;
ffc1403c: 3d 40 ff c3 lis r10,-61
ffc14040: 39 4a 72 30 addi r10,r10,29232
ffc14044: 91 49 00 10 stw r10,16(r9)
rtems_rfs_buffers_release (fs);
ffc14048: 48 00 8c b5 bl ffc1ccfc <rtems_rfs_buffers_release>
rtems_rfs_mutex_unlock (&rtems->access);
ffc1404c: 80 7f 00 00 lwz r3,0(r31)
ffc14050: 4b ff fd 65 bl ffc13db4 <rtems_rfs_mutex_unlock.isra.19>
rtems_rfs_rtems_unlock (fs);
return 0;
ffc14054: 38 60 00 00 li r3,0
}
ffc14058: 39 61 00 38 addi r11,r1,56
ffc1405c: 4b fe d4 f4 b ffc01550 <_restgpr_24_x>
ffc13364 <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)
{
ffc13364: 7c 2b 0b 78 mr r11,r1
ffc13368: 7c 08 02 a6 mflr r0
ffc1336c: 94 21 ff f0 stwu r1,-16(r1)
ffc13370: 7c 89 23 78 mr r9,r4
ffc13374: 90 01 00 14 stw r0,20(r1)
ffc13378: 4b fe e1 a9 bl ffc01520 <_savegpr_31>
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (targetloc);
ffc1337c: 81 44 00 14 lwz r10,20(r4)
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);
ffc13380: 7c a4 2b 78 mr r4,r5
ffc13384: 81 03 00 08 lwz r8,8(r3)
ffc13388: 7c c5 33 78 mr r5,r6
ffc1338c: 80 6a 00 08 lwz r3,8(r10)
ffc13390: 80 e9 00 08 lwz r7,8(r9)
ffc13394: 7d 06 43 78 mr r6,r8
ffc13398: 39 00 00 00 li r8,0
ffc1339c: 48 00 c5 8d bl ffc1f928 <rtems_rfs_link>
if (rc)
ffc133a0: 7c 7f 1b 79 mr. r31,r3
ffc133a4: 41 a2 00 14 beq+ ffc133b8 <rtems_rfs_rtems_link+0x54> <== ALWAYS TAKEN
{
return rtems_rfs_rtems_error ("link: linking", rc);
ffc133a8: 48 00 ec 41 bl ffc21fe8 <__errno> <== NOT EXECUTED
ffc133ac: 93 e3 00 00 stw r31,0(r3) <== NOT EXECUTED
ffc133b0: 38 60 ff ff li r3,-1 <== NOT EXECUTED
ffc133b4: 48 00 00 08 b ffc133bc <rtems_rfs_rtems_link+0x58> <== NOT EXECUTED
}
return 0;
ffc133b8: 38 60 00 00 li r3,0
}
ffc133bc: 39 61 00 10 addi r11,r1,16
ffc133c0: 4b fe e1 ac b ffc0156c <_restgpr_31_x>
ffc138c4 <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)
{
ffc138c4: 94 21 ff 98 stwu r1,-104(r1)
ffc138c8: 7c 08 02 a6 mflr r0
ffc138cc: 90 01 00 6c stw r0,108(r1)
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (parentloc);
ffc138d0: 81 23 00 14 lwz r9,20(r3)
rtems_rfs_rtems_mknod (const rtems_filesystem_location_info_t *parentloc,
const char *name,
size_t namelen,
mode_t mode,
dev_t dev)
{
ffc138d4: be e1 00 44 stmw r23,68(r1)
ffc138d8: 7c 98 23 78 mr r24,r4
ffc138dc: 7c b9 2b 78 mr r25,r5
ffc138e0: 7c de 33 78 mr r30,r6
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (parentloc);
ffc138e4: 83 e9 00 08 lwz r31,8(r9)
rtems_rfs_rtems_mknod (const rtems_filesystem_location_info_t *parentloc,
const char *name,
size_t namelen,
mode_t mode,
dev_t dev)
{
ffc138e8: 7c fc 3b 78 mr r28,r7
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (parentloc);
rtems_rfs_ino parent = rtems_rfs_rtems_get_pathloc_ino (parentloc);
ffc138ec: 82 e3 00 08 lwz r23,8(r3)
rtems_rfs_rtems_mknod (const rtems_filesystem_location_info_t *parentloc,
const char *name,
size_t namelen,
mode_t mode,
dev_t dev)
{
ffc138f0: 7d 1d 43 78 mr r29,r8
uid_t uid;
gid_t gid;
int rc;
#if defined(RTEMS_POSIX_API)
uid = geteuid ();
ffc138f4: 48 00 46 45 bl ffc17f38 <geteuid>
ffc138f8: 7c 7a 1b 78 mr r26,r3
gid = getegid ();
ffc138fc: 48 00 46 2d bl ffc17f28 <getegid>
ffc13900: 7c 7b 1b 78 mr r27,r3
#else
uid = 0;
gid = 0;
#endif
rc = rtems_rfs_inode_create (fs, parent, name, namelen,
ffc13904: 7f c3 f3 78 mr r3,r30
ffc13908: 48 00 0a b5 bl ffc143bc <rtems_rfs_rtems_imode>
ffc1390c: 39 21 00 38 addi r9,r1,56
ffc13910: 91 21 00 08 stw r9,8(r1)
ffc13914: 7c 67 1b 78 mr r7,r3
ffc13918: 7f 6a db 78 mr r10,r27
ffc1391c: 7f e3 fb 78 mr r3,r31
ffc13920: 7e e4 bb 78 mr r4,r23
ffc13924: 7f 05 c3 78 mr r5,r24
ffc13928: 7f 26 cb 78 mr r6,r25
ffc1392c: 39 00 00 01 li r8,1
ffc13930: 7f 49 d3 78 mr r9,r26
ffc13934: 4b ff f5 29 bl ffc12e5c <rtems_rfs_inode_create>
rtems_rfs_rtems_imode (mode),
1, uid, gid, &ino);
if (rc > 0)
ffc13938: 7c 7b 1b 79 mr. r27,r3
ffc1393c: 40 81 00 08 ble- ffc13944 <rtems_rfs_rtems_mknod+0x80>
ffc13940: 48 00 00 20 b ffc13960 <rtems_rfs_rtems_mknod+0x9c>
{
return rtems_rfs_rtems_error ("mknod: inode create", rc);
}
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
ffc13944: 80 81 00 38 lwz r4,56(r1)
ffc13948: 7f e3 fb 78 mr r3,r31
ffc1394c: 38 a1 00 10 addi r5,r1,16
ffc13950: 38 c0 00 01 li r6,1
ffc13954: 4b ff ef 6d bl ffc128c0 <rtems_rfs_inode_open>
if (rc > 0)
ffc13958: 7c 7b 1b 79 mr. r27,r3
ffc1395c: 40 81 00 10 ble- ffc1396c <rtems_rfs_rtems_mknod+0xa8> <== ALWAYS TAKEN
{
return rtems_rfs_rtems_error ("mknod: inode open", rc);
ffc13960: 48 00 e6 89 bl ffc21fe8 <__errno>
ffc13964: 93 63 00 00 stw r27,0(r3)
ffc13968: 48 00 00 8c b ffc139f4 <rtems_rfs_rtems_mknod+0x130>
}
if (S_ISDIR(mode) || S_ISREG(mode))
ffc1396c: 57 c6 04 26 rlwinm r6,r30,0,16,19
ffc13970: 2f 86 40 00 cmpwi cr7,r6,16384
ffc13974: 41 9e 00 60 beq- cr7,ffc139d4 <rtems_rfs_rtems_mknod+0x110>
ffc13978: 6c c9 ff ff xoris r9,r6,65535
ffc1397c: 2f 89 80 00 cmpwi cr7,r9,-32768
ffc13980: 41 9e 00 54 beq- cr7,ffc139d4 <rtems_rfs_rtems_mknod+0x110><== ALWAYS TAKEN
{
}
else if (S_ISCHR (mode) || S_ISBLK (mode))
ffc13984: 2f 86 20 00 cmpwi cr7,r6,8192 <== NOT EXECUTED
ffc13988: 41 9e 00 0c beq- cr7,ffc13994 <rtems_rfs_rtems_mknod+0xd0><== NOT EXECUTED
ffc1398c: 2f 86 60 00 cmpwi cr7,r6,24576 <== NOT EXECUTED
ffc13990: 40 9e 00 28 bne- cr7,ffc139b8 <rtems_rfs_rtems_mknod+0xf4><== NOT EXECUTED
{
int major;
int minor;
rtems_filesystem_split_dev_t (dev, major, minor);
rtems_rfs_inode_set_block (&inode, 0, major);
ffc13994: 38 61 00 10 addi r3,r1,16 <== NOT EXECUTED
ffc13998: 7f 85 e3 78 mr r5,r28 <== NOT EXECUTED
ffc1399c: 38 80 00 00 li r4,0 <== NOT EXECUTED
ffc139a0: 4b ff f8 4d bl ffc131ec <rtems_rfs_inode_set_block> <== NOT EXECUTED
rtems_rfs_inode_set_block (&inode, 1, minor);
ffc139a4: 38 61 00 10 addi r3,r1,16 <== NOT EXECUTED
ffc139a8: 38 80 00 01 li r4,1 <== NOT EXECUTED
ffc139ac: 7f a5 eb 78 mr r5,r29 <== NOT EXECUTED
ffc139b0: 4b ff f8 3d bl ffc131ec <rtems_rfs_inode_set_block> <== NOT EXECUTED
if (S_ISDIR(mode) || S_ISREG(mode))
{
}
else if (S_ISCHR (mode) || S_ISBLK (mode))
{
ffc139b4: 48 00 00 20 b ffc139d4 <rtems_rfs_rtems_mknod+0x110> <== NOT EXECUTED
rtems_rfs_inode_set_block (&inode, 0, major);
rtems_rfs_inode_set_block (&inode, 1, minor);
}
else
{
rtems_rfs_inode_close (fs, &inode);
ffc139b8: 38 81 00 10 addi r4,r1,16 <== NOT EXECUTED
ffc139bc: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc139c0: 4b ff f0 f5 bl ffc12ab4 <rtems_rfs_inode_close> <== NOT EXECUTED
return rtems_rfs_rtems_error ("mknod: bad mode", EINVAL);
ffc139c4: 48 00 e6 25 bl ffc21fe8 <__errno> <== NOT EXECUTED
ffc139c8: 39 20 00 16 li r9,22 <== NOT EXECUTED
ffc139cc: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED
ffc139d0: 48 00 00 24 b ffc139f4 <rtems_rfs_rtems_mknod+0x130> <== NOT EXECUTED
}
rc = rtems_rfs_inode_close (fs, &inode);
ffc139d4: 7f e3 fb 78 mr r3,r31
ffc139d8: 38 81 00 10 addi r4,r1,16
ffc139dc: 4b ff f0 d9 bl ffc12ab4 <rtems_rfs_inode_close>
if (rc > 0)
{
return rtems_rfs_rtems_error ("mknod: closing inode", rc);
}
return 0;
ffc139e0: 39 20 00 00 li r9,0
rtems_rfs_inode_close (fs, &inode);
return rtems_rfs_rtems_error ("mknod: bad mode", EINVAL);
}
rc = rtems_rfs_inode_close (fs, &inode);
if (rc > 0)
ffc139e4: 7c 7f 1b 79 mr. r31,r3
ffc139e8: 40 81 00 10 ble- ffc139f8 <rtems_rfs_rtems_mknod+0x134> <== ALWAYS TAKEN
{
return rtems_rfs_rtems_error ("mknod: closing inode", rc);
ffc139ec: 48 00 e5 fd bl ffc21fe8 <__errno> <== NOT EXECUTED
ffc139f0: 93 e3 00 00 stw r31,0(r3) <== NOT EXECUTED
ffc139f4: 39 20 ff ff li r9,-1
}
return 0;
}
ffc139f8: 39 61 00 68 addi r11,r1,104
ffc139fc: 7d 23 4b 78 mr r3,r9
ffc13a00: 4b fe db 4c b ffc0154c <_restgpr_23_x>
ffc13848 <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)
{
ffc13848: 94 21 ff c0 stwu r1,-64(r1)
ffc1384c: 7c 08 02 a6 mflr r0
ffc13850: 7c 69 1b 78 mr r9,r3
ffc13854: 90 01 00 44 stw r0,68(r1)
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);
ffc13858: 38 a1 00 08 addi r5,r1,8
ffc1385c: 38 c0 00 01 li r6,1
*/
static rtems_filesystem_node_types_t
rtems_rfs_rtems_node_type (const rtems_filesystem_location_info_t* pathloc)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
ffc13860: 81 43 00 14 lwz r10,20(r3)
* @return rtems_filesystem_node_types_t
*/
static rtems_filesystem_node_types_t
rtems_rfs_rtems_node_type (const rtems_filesystem_location_info_t* pathloc)
{
ffc13864: bf c1 00 38 stmw r30,56(r1)
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
ffc13868: 83 ca 00 08 lwz r30,8(r10)
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);
ffc1386c: 80 89 00 08 lwz r4,8(r9)
ffc13870: 7f c3 f3 78 mr r3,r30
ffc13874: 4b ff f0 4d bl ffc128c0 <rtems_rfs_inode_open>
if (rc > 0)
ffc13878: 7c 7f 1b 79 mr. r31,r3
ffc1387c: 40 81 00 10 ble- ffc1388c <rtems_rfs_rtems_node_type+0x44><== ALWAYS TAKEN
{
return rtems_rfs_rtems_error ("node_type: opening inode", rc);
ffc13880: 48 00 e7 69 bl ffc21fe8 <__errno> <== NOT EXECUTED
ffc13884: 93 e3 00 00 stw r31,0(r3) <== NOT EXECUTED
ffc13888: 48 00 00 2c b ffc138b4 <rtems_rfs_rtems_node_type+0x6c><== NOT EXECUTED
}
type = rtems_rfs_rtems_node_type_by_inode (&inode);
ffc1388c: 38 61 00 08 addi r3,r1,8
ffc13890: 4b ff f9 ad bl ffc1323c <rtems_rfs_rtems_node_type_by_inode>
rc = rtems_rfs_inode_close (fs, &inode);
ffc13894: 38 81 00 08 addi r4,r1,8
if (rc > 0)
{
return rtems_rfs_rtems_error ("node_type: opening inode", rc);
}
type = rtems_rfs_rtems_node_type_by_inode (&inode);
ffc13898: 7c 7f 1b 78 mr r31,r3
rc = rtems_rfs_inode_close (fs, &inode);
ffc1389c: 7f c3 f3 78 mr r3,r30
ffc138a0: 4b ff f2 15 bl ffc12ab4 <rtems_rfs_inode_close>
if (rc > 0)
ffc138a4: 7c 7e 1b 79 mr. r30,r3
ffc138a8: 40 81 00 10 ble- ffc138b8 <rtems_rfs_rtems_node_type+0x70><== ALWAYS TAKEN
{
return rtems_rfs_rtems_error ("node_type: closing inode", rc);
ffc138ac: 48 00 e7 3d bl ffc21fe8 <__errno> <== NOT EXECUTED
ffc138b0: 93 c3 00 00 stw r30,0(r3) <== NOT EXECUTED
ffc138b4: 3b e0 ff ff li r31,-1 <== NOT EXECUTED
}
return type;
}
ffc138b8: 39 61 00 40 addi r11,r1,64
ffc138bc: 7f e3 fb 78 mr r3,r31
ffc138c0: 4b fe dc a8 b ffc01568 <_restgpr_30_x>
ffc1323c <rtems_rfs_rtems_node_type_by_inode>:
/* FIXME: Return value? */
rtems_rfs_fs_close(fs);
rtems_rfs_mutex_destroy (&rtems->access);
free (rtems);
}
ffc1323c: 81 23 00 0c lwz r9,12(r3)
* @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);
ffc13240: 89 29 00 02 lbz r9,2(r9)
* link is actually the normal path to a regular file, directory, device
* etc's inode. Links to inodes can be considered "the real" one, yet they
* are all links.
*/
uint16_t mode = rtems_rfs_inode_get_mode (inode);
if (RTEMS_RFS_S_ISDIR (mode))
ffc13244: 55 29 44 26 rlwinm r9,r9,8,16,19
ffc13248: 2f 89 40 00 cmpwi cr7,r9,16384
ffc1324c: 41 9e 00 38 beq- cr7,ffc13284 <rtems_rfs_rtems_node_type_by_inode+0x48>
return RTEMS_FILESYSTEM_DIRECTORY;
else if (RTEMS_RFS_S_ISLNK (mode))
ffc13250: 39 40 00 00 li r10,0
ffc13254: 61 4a a0 00 ori r10,r10,40960
ffc13258: 7f 89 50 00 cmpw cr7,r9,r10
return RTEMS_FILESYSTEM_SYM_LINK;
ffc1325c: 38 60 00 03 li r3,3
* are all links.
*/
uint16_t mode = rtems_rfs_inode_get_mode (inode);
if (RTEMS_RFS_S_ISDIR (mode))
return RTEMS_FILESYSTEM_DIRECTORY;
else if (RTEMS_RFS_S_ISLNK (mode))
ffc13260: 4d 9e 00 20 beqlr cr7
return RTEMS_FILESYSTEM_SYM_LINK;
else if (RTEMS_RFS_S_ISBLK (mode) || RTEMS_RFS_S_ISCHR (mode))
ffc13264: 2f 89 60 00 cmpwi cr7,r9,24576
ffc13268: 40 be 00 0c bne+ cr7,ffc13274 <rtems_rfs_rtems_node_type_by_inode+0x38><== ALWAYS TAKEN
return RTEMS_FILESYSTEM_DEVICE;
ffc1326c: 38 60 00 01 li r3,1 <== NOT EXECUTED
ffc13270: 4e 80 00 20 blr <== NOT EXECUTED
uint16_t mode = rtems_rfs_inode_get_mode (inode);
if (RTEMS_RFS_S_ISDIR (mode))
return RTEMS_FILESYSTEM_DIRECTORY;
else if (RTEMS_RFS_S_ISLNK (mode))
return RTEMS_FILESYSTEM_SYM_LINK;
else if (RTEMS_RFS_S_ISBLK (mode) || RTEMS_RFS_S_ISCHR (mode))
ffc13274: 2f 89 20 00 cmpwi cr7,r9,8192
ffc13278: 41 be ff f4 beq- cr7,ffc1326c <rtems_rfs_rtems_node_type_by_inode+0x30><== NEVER TAKEN
return RTEMS_FILESYSTEM_DEVICE;
else
return RTEMS_FILESYSTEM_MEMORY_FILE;
ffc1327c: 38 60 00 04 li r3,4
ffc13280: 4e 80 00 20 blr
* etc's inode. Links to inodes can be considered "the real" one, yet they
* are all links.
*/
uint16_t mode = rtems_rfs_inode_get_mode (inode);
if (RTEMS_RFS_S_ISDIR (mode))
return RTEMS_FILESYSTEM_DIRECTORY;
ffc13284: 38 60 00 00 li r3,0
return RTEMS_FILESYSTEM_SYM_LINK;
else if (RTEMS_RFS_S_ISBLK (mode) || RTEMS_RFS_S_ISCHR (mode))
return RTEMS_FILESYSTEM_DEVICE;
else
return RTEMS_FILESYSTEM_MEMORY_FILE;
}
ffc13288: 4e 80 00 20 blr
ffc134b0 <rtems_rfs_rtems_readlink>:
static ssize_t
rtems_rfs_rtems_readlink (const rtems_filesystem_location_info_t* pathloc,
char* buf,
size_t bufsize)
{
ffc134b0: 7c 2b 0b 78 mr r11,r1
ffc134b4: 7c 08 02 a6 mflr r0
ffc134b8: 94 21 ff e0 stwu r1,-32(r1)
ffc134bc: 7c 69 1b 78 mr r9,r3
ffc134c0: 7c 8a 23 78 mr r10,r4
ffc134c4: 90 01 00 24 stw r0,36(r1)
ffc134c8: 7c a6 2b 78 mr r6,r5
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);
ffc134cc: 38 e1 00 08 addi r7,r1,8
static ssize_t
rtems_rfs_rtems_readlink (const rtems_filesystem_location_info_t* pathloc,
char* buf,
size_t bufsize)
{
ffc134d0: 4b fe e0 51 bl ffc01520 <_savegpr_31>
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
ffc134d4: 81 03 00 14 lwz r8,20(r3)
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);
ffc134d8: 7d 45 53 78 mr r5,r10
ffc134dc: 80 89 00 08 lwz r4,8(r9)
ffc134e0: 80 68 00 08 lwz r3,8(r8)
ffc134e4: 48 00 cc 41 bl ffc20124 <rtems_rfs_symlink_read>
if (rc)
ffc134e8: 7c 7f 1b 79 mr. r31,r3
ffc134ec: 41 a2 00 14 beq+ ffc13500 <rtems_rfs_rtems_readlink+0x50><== ALWAYS TAKEN
{
return rtems_rfs_rtems_error ("readlink: reading link", rc);
ffc134f0: 48 00 ea f9 bl ffc21fe8 <__errno> <== NOT EXECUTED
ffc134f4: 93 e3 00 00 stw r31,0(r3) <== NOT EXECUTED
ffc134f8: 38 60 ff ff li r3,-1 <== NOT EXECUTED
ffc134fc: 48 00 00 08 b ffc13504 <rtems_rfs_rtems_readlink+0x54><== NOT EXECUTED
}
return (ssize_t) length;
ffc13500: 80 61 00 08 lwz r3,8(r1)
}
ffc13504: 39 61 00 20 addi r11,r1,32
ffc13508: 4b fe e0 64 b ffc0156c <_restgpr_31_x>
ffc133c4 <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)
{
ffc133c4: 94 21 ff e0 stwu r1,-32(r1) <== NOT EXECUTED
ffc133c8: 7c 08 02 a6 mflr r0 <== 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);
ffc133cc: 39 00 00 01 li r8,1 <== NOT EXECUTED
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)
{
ffc133d0: 90 01 00 24 stw r0,36(r1) <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (old_loc);
ffc133d4: 81 44 00 14 lwz r10,20(r4) <== NOT EXECUTED
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)
{
ffc133d8: bf 61 00 0c stmw r27,12(r1) <== 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);
ffc133dc: 81 25 00 08 lwz r9,8(r5) <== NOT EXECUTED
ffc133e0: 7c e5 3b 78 mr r5,r7 <== NOT EXECUTED
int rc;
old_parent = rtems_rfs_rtems_get_pathloc_ino (old_parent_loc);
new_parent = rtems_rfs_rtems_get_pathloc_ino (new_parent_loc);
ino = rtems_rfs_rtems_get_pathloc_ino (old_loc);
ffc133e4: 83 e4 00 08 lwz r31,8(r4) <== NOT EXECUTED
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)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (old_loc);
ffc133e8: 83 ca 00 08 lwz r30,8(r10) <== 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);
ffc133ec: 83 83 00 08 lwz r28,8(r3) <== 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);
ffc133f0: 7f e7 fb 78 mr r7,r31 <== NOT EXECUTED
old_parent = rtems_rfs_rtems_get_pathloc_ino (old_parent_loc);
new_parent = rtems_rfs_rtems_get_pathloc_ino (new_parent_loc);
ino = rtems_rfs_rtems_get_pathloc_ino (old_loc);
doff = rtems_rfs_rtems_get_pathloc_doff (old_loc);
ffc133f4: 83 a4 00 0c lwz r29,12(r4) <== 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);
ffc133f8: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc133fc: 7c c4 33 78 mr r4,r6 <== NOT EXECUTED
ffc13400: 7d 26 4b 78 mr r6,r9 <== NOT EXECUTED
ffc13404: 48 00 c5 25 bl ffc1f928 <rtems_rfs_link> <== NOT EXECUTED
if (rc)
ffc13408: 7c 7b 1b 79 mr. r27,r3 <== NOT EXECUTED
ffc1340c: 41 82 00 10 beq- ffc1341c <rtems_rfs_rtems_rename+0x58> <== NOT EXECUTED
{
return rtems_rfs_rtems_error ("rename: linking", rc);
ffc13410: 48 00 eb d9 bl ffc21fe8 <__errno> <== NOT EXECUTED
ffc13414: 93 63 00 00 stw r27,0(r3) <== NOT EXECUTED
ffc13418: 48 00 00 30 b ffc13448 <rtems_rfs_rtems_rename+0x84> <== 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,
ffc1341c: 7f e5 fb 78 mr r5,r31 <== NOT EXECUTED
ffc13420: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc13424: 7f 84 e3 78 mr r4,r28 <== NOT EXECUTED
ffc13428: 7f a6 eb 78 mr r6,r29 <== NOT EXECUTED
ffc1342c: 38 e0 00 02 li r7,2 <== NOT EXECUTED
ffc13430: 48 00 c6 b1 bl ffc1fae0 <rtems_rfs_unlink> <== NOT EXECUTED
if (rc)
{
return rtems_rfs_rtems_error ("rename: unlinking", rc);
}
return 0;
ffc13434: 39 20 00 00 li r9,0 <== 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)
ffc13438: 7c 7f 1b 79 mr. r31,r3 <== NOT EXECUTED
ffc1343c: 41 a2 00 10 beq+ ffc1344c <rtems_rfs_rtems_rename+0x88> <== NOT EXECUTED
{
return rtems_rfs_rtems_error ("rename: unlinking", rc);
ffc13440: 48 00 eb a9 bl ffc21fe8 <__errno> <== NOT EXECUTED
ffc13444: 93 e3 00 00 stw r31,0(r3) <== NOT EXECUTED
ffc13448: 39 20 ff ff li r9,-1 <== NOT EXECUTED
}
return 0;
}
ffc1344c: 39 61 00 20 addi r11,r1,32 <== NOT EXECUTED
ffc13450: 7d 23 4b 78 mr r3,r9 <== NOT EXECUTED
ffc13454: 4b fe e1 08 b ffc0155c <_restgpr_27_x> <== NOT EXECUTED
ffc14304 <rtems_rfs_rtems_set_handlers>:
{
/*
* Mapping matches RTEMS so no need to change.
*/
return imode;
}
ffc14304: 81 24 00 0c lwz r9,12(r4)
* @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);
ffc14308: 88 89 00 02 lbz r4,2(r9)
ffc1430c: 89 29 00 03 lbz r9,3(r9)
ffc14310: 54 84 40 2e rlwinm r4,r4,8,0,23
ffc14314: 7c 84 4b 78 or r4,r4,r9
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;
ffc14318: 39 20 00 00 li r9,0
ffc1431c: 91 23 00 10 stw r9,16(r3)
if (RTEMS_RFS_S_ISDIR (mode))
ffc14320: 54 89 04 26 rlwinm r9,r4,0,16,19
ffc14324: 2f 89 40 00 cmpwi cr7,r9,16384
ffc14328: 40 be 00 10 bne+ cr7,ffc14338 <rtems_rfs_rtems_set_handlers+0x34>
loc->handlers = rtems_rfs_rtems_handlers (dir);
ffc1432c: 3d 20 ff c3 lis r9,-61
ffc14330: 39 29 72 30 addi r9,r9,29232
ffc14334: 48 00 00 4c b ffc14380 <rtems_rfs_rtems_set_handlers+0x7c>
else if (RTEMS_RFS_S_ISCHR (mode) || RTEMS_RFS_S_ISBLK(mode))
ffc14338: 2f 89 20 00 cmpwi cr7,r9,8192
ffc1433c: 41 9e 00 0c beq- cr7,ffc14348 <rtems_rfs_rtems_set_handlers+0x44><== NEVER TAKEN
ffc14340: 2f 89 60 00 cmpwi cr7,r9,24576
ffc14344: 40 be 00 10 bne+ cr7,ffc14354 <rtems_rfs_rtems_set_handlers+0x50><== ALWAYS TAKEN
loc->handlers = rtems_rfs_rtems_handlers (device);
ffc14348: 3d 20 ff c3 lis r9,-61 <== NOT EXECUTED
ffc1434c: 39 29 72 04 addi r9,r9,29188 <== NOT EXECUTED
ffc14350: 48 00 00 30 b ffc14380 <rtems_rfs_rtems_set_handlers+0x7c><== NOT EXECUTED
else if (RTEMS_RFS_S_ISLNK (mode))
ffc14354: 6d 2a ff ff xoris r10,r9,65535
ffc14358: 2f 8a a0 00 cmpwi cr7,r10,-24576
ffc1435c: 40 9e 00 10 bne- cr7,ffc1436c <rtems_rfs_rtems_set_handlers+0x68>
loc->handlers = rtems_rfs_rtems_handlers (link);
ffc14360: 3d 20 ff c3 lis r9,-61
ffc14364: 39 29 50 dc addi r9,r9,20700
ffc14368: 48 00 00 18 b ffc14380 <rtems_rfs_rtems_set_handlers+0x7c>
else if (RTEMS_RFS_S_ISREG (mode))
ffc1436c: 6d 2a ff ff xoris r10,r9,65535
ffc14370: 2f 8a 80 00 cmpwi cr7,r10,-32768
ffc14374: 40 9e 00 18 bne- cr7,ffc1438c <rtems_rfs_rtems_set_handlers+0x88><== NEVER TAKEN
loc->handlers = rtems_rfs_rtems_handlers (file);
ffc14378: 3d 20 ff c3 lis r9,-61
ffc1437c: 39 29 72 5c addi r9,r9,29276
ffc14380: 91 23 00 10 stw r9,16(r3)
else
{
printf ("rtems-rfs: mode type unknown: %04x\n", mode);
return false;
}
return true;
ffc14384: 38 60 00 01 li r3,1
ffc14388: 4e 80 00 20 blr
*/
bool
rtems_rfs_rtems_set_handlers (rtems_filesystem_location_info_t* loc,
rtems_rfs_inode_handle* inode)
{
ffc1438c: 94 21 ff f8 stwu r1,-8(r1) <== NOT EXECUTED
ffc14390: 7c 08 02 a6 mflr r0 <== NOT EXECUTED
loc->handlers = rtems_rfs_rtems_handlers (link);
else if (RTEMS_RFS_S_ISREG (mode))
loc->handlers = rtems_rfs_rtems_handlers (file);
else
{
printf ("rtems-rfs: mode type unknown: %04x\n", mode);
ffc14394: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc14398: 38 63 51 89 addi r3,r3,20873 <== NOT EXECUTED
*/
bool
rtems_rfs_rtems_set_handlers (rtems_filesystem_location_info_t* loc,
rtems_rfs_inode_handle* inode)
{
ffc1439c: 90 01 00 0c stw r0,12(r1) <== NOT EXECUTED
loc->handlers = rtems_rfs_rtems_handlers (link);
else if (RTEMS_RFS_S_ISREG (mode))
loc->handlers = rtems_rfs_rtems_handlers (file);
else
{
printf ("rtems-rfs: mode type unknown: %04x\n", mode);
ffc143a0: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc143a4: 48 00 f5 e9 bl ffc2398c <printf> <== NOT EXECUTED
return false;
ffc143a8: 38 60 00 00 li r3,0 <== NOT EXECUTED
}
return true;
}
ffc143ac: 80 01 00 0c lwz r0,12(r1) <== NOT EXECUTED
ffc143b0: 38 21 00 08 addi r1,r1,8 <== NOT EXECUTED
ffc143b4: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED
ffc143b8: 4e 80 00 20 blr <== NOT EXECUTED
ffc132b8 <rtems_rfs_rtems_statvfs>:
* @return int
*/
static int
rtems_rfs_rtems_statvfs (const rtems_filesystem_location_info_t* pathloc,
struct statvfs* sb)
{
ffc132b8: 94 21 ff e0 stwu r1,-32(r1) <== NOT EXECUTED
ffc132bc: 7c 08 02 a6 mflr r0 <== NOT EXECUTED
ffc132c0: 90 01 00 24 stw r0,36(r1) <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
size_t blocks;
size_t inodes;
rtems_rfs_group_usage (fs, &blocks, &inodes);
ffc132c4: 38 a1 00 08 addi r5,r1,8 <== NOT EXECUTED
*/
static int
rtems_rfs_rtems_statvfs (const rtems_filesystem_location_info_t* pathloc,
struct statvfs* sb)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
ffc132c8: 81 23 00 14 lwz r9,20(r3) <== NOT EXECUTED
* @return int
*/
static int
rtems_rfs_rtems_statvfs (const rtems_filesystem_location_info_t* pathloc,
struct statvfs* sb)
{
ffc132cc: bf c1 00 18 stmw r30,24(r1) <== NOT EXECUTED
ffc132d0: 7c 9f 23 78 mr r31,r4 <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
size_t blocks;
size_t inodes;
rtems_rfs_group_usage (fs, &blocks, &inodes);
ffc132d4: 38 81 00 0c addi r4,r1,12 <== NOT EXECUTED
*/
static int
rtems_rfs_rtems_statvfs (const rtems_filesystem_location_info_t* pathloc,
struct statvfs* sb)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
ffc132d8: 83 c9 00 08 lwz r30,8(r9) <== NOT EXECUTED
size_t blocks;
size_t inodes;
rtems_rfs_group_usage (fs, &blocks, &inodes);
ffc132dc: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc132e0: 4b ff f4 51 bl ffc12730 <rtems_rfs_group_usage> <== NOT EXECUTED
sb->f_bsize = rtems_rfs_fs_block_size (fs);
ffc132e4: 81 3e 00 08 lwz r9,8(r30) <== NOT EXECUTED
sb->f_frsize = rtems_rfs_fs_media_block_size (fs);
sb->f_blocks = rtems_rfs_fs_media_blocks (fs);
sb->f_bfree = rtems_rfs_fs_blocks (fs) - blocks;
ffc132e8: 81 1e 00 04 lwz r8,4(r30) <== NOT EXECUTED
sb->f_fsid = RTEMS_RFS_SB_MAGIC;
sb->f_flag = rtems_rfs_fs_flags (fs);
sb->f_namemax = rtems_rfs_fs_max_name (fs);
return 0;
}
ffc132ec: 39 61 00 20 addi r11,r1,32 <== NOT EXECUTED
size_t blocks;
size_t inodes;
rtems_rfs_group_usage (fs, &blocks, &inodes);
sb->f_bsize = rtems_rfs_fs_block_size (fs);
ffc132f0: 91 3f 00 00 stw r9,0(r31) <== NOT EXECUTED
sb->f_fsid = RTEMS_RFS_SB_MAGIC;
sb->f_flag = rtems_rfs_fs_flags (fs);
sb->f_namemax = rtems_rfs_fs_max_name (fs);
return 0;
}
ffc132f4: 38 60 00 00 li r3,0 <== NOT EXECUTED
size_t inodes;
rtems_rfs_group_usage (fs, &blocks, &inodes);
sb->f_bsize = rtems_rfs_fs_block_size (fs);
sb->f_frsize = rtems_rfs_fs_media_block_size (fs);
ffc132f8: 81 3e 00 10 lwz r9,16(r30) <== NOT EXECUTED
ffc132fc: 81 49 00 20 lwz r10,32(r9) <== NOT EXECUTED
sb->f_blocks = rtems_rfs_fs_media_blocks (fs);
ffc13300: 81 29 00 1c lwz r9,28(r9) <== NOT EXECUTED
size_t inodes;
rtems_rfs_group_usage (fs, &blocks, &inodes);
sb->f_bsize = rtems_rfs_fs_block_size (fs);
sb->f_frsize = rtems_rfs_fs_media_block_size (fs);
ffc13304: 91 5f 00 04 stw r10,4(r31) <== NOT EXECUTED
sb->f_blocks = rtems_rfs_fs_media_blocks (fs);
sb->f_bfree = rtems_rfs_fs_blocks (fs) - blocks;
ffc13308: 81 41 00 0c lwz r10,12(r1) <== NOT EXECUTED
rtems_rfs_group_usage (fs, &blocks, &inodes);
sb->f_bsize = rtems_rfs_fs_block_size (fs);
sb->f_frsize = rtems_rfs_fs_media_block_size (fs);
sb->f_blocks = rtems_rfs_fs_media_blocks (fs);
ffc1330c: 91 3f 00 0c stw r9,12(r31) <== NOT EXECUTED
ffc13310: 39 20 00 00 li r9,0 <== NOT EXECUTED
sb->f_bfree = rtems_rfs_fs_blocks (fs) - blocks;
ffc13314: 7d 4a 40 50 subf r10,r10,r8 <== NOT EXECUTED
rtems_rfs_group_usage (fs, &blocks, &inodes);
sb->f_bsize = rtems_rfs_fs_block_size (fs);
sb->f_frsize = rtems_rfs_fs_media_block_size (fs);
sb->f_blocks = rtems_rfs_fs_media_blocks (fs);
ffc13318: 91 3f 00 08 stw r9,8(r31) <== NOT EXECUTED
sb->f_bfree = rtems_rfs_fs_blocks (fs) - blocks;
ffc1331c: 91 3f 00 10 stw r9,16(r31) <== NOT EXECUTED
ffc13320: 91 5f 00 14 stw r10,20(r31) <== NOT EXECUTED
sb->f_bavail = sb->f_bfree;
ffc13324: 91 3f 00 18 stw r9,24(r31) <== NOT EXECUTED
ffc13328: 91 5f 00 1c stw r10,28(r31) <== NOT EXECUTED
sb->f_files = rtems_rfs_fs_inodes (fs);
ffc1332c: 81 3e 00 14 lwz r9,20(r30) <== NOT EXECUTED
sb->f_ffree = rtems_rfs_fs_inodes (fs) - inodes;
ffc13330: 81 41 00 08 lwz r10,8(r1) <== NOT EXECUTED
sb->f_bsize = rtems_rfs_fs_block_size (fs);
sb->f_frsize = rtems_rfs_fs_media_block_size (fs);
sb->f_blocks = rtems_rfs_fs_media_blocks (fs);
sb->f_bfree = rtems_rfs_fs_blocks (fs) - blocks;
sb->f_bavail = sb->f_bfree;
sb->f_files = rtems_rfs_fs_inodes (fs);
ffc13334: 91 3f 00 20 stw r9,32(r31) <== NOT EXECUTED
sb->f_ffree = rtems_rfs_fs_inodes (fs) - inodes;
ffc13338: 7d 2a 48 50 subf r9,r10,r9 <== NOT EXECUTED
ffc1333c: 91 3f 00 24 stw r9,36(r31) <== NOT EXECUTED
sb->f_favail = sb->f_ffree;
ffc13340: 91 3f 00 28 stw r9,40(r31) <== NOT EXECUTED
sb->f_fsid = RTEMS_RFS_SB_MAGIC;
ffc13344: 3d 20 28 09 lis r9,10249 <== NOT EXECUTED
ffc13348: 61 29 20 01 ori r9,r9,8193 <== NOT EXECUTED
ffc1334c: 91 3f 00 2c stw r9,44(r31) <== NOT EXECUTED
sb->f_flag = rtems_rfs_fs_flags (fs);
ffc13350: 81 3e 00 00 lwz r9,0(r30) <== NOT EXECUTED
ffc13354: 91 3f 00 30 stw r9,48(r31) <== NOT EXECUTED
sb->f_namemax = rtems_rfs_fs_max_name (fs);
ffc13358: 81 3e 00 1c lwz r9,28(r30) <== NOT EXECUTED
ffc1335c: 91 3f 00 34 stw r9,52(r31) <== NOT EXECUTED
return 0;
}
ffc13360: 4b fe e2 08 b ffc01568 <_restgpr_30_x> <== NOT EXECUTED
ffc1350c <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)
{
ffc1350c: 94 21 ff d8 stwu r1,-40(r1)
ffc13510: 7c 08 02 a6 mflr r0
ffc13514: 90 01 00 2c stw r0,44(r1)
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (parent_loc);
ffc13518: 81 43 00 14 lwz r10,20(r3)
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)
{
ffc1351c: bf 81 00 18 stmw r28,24(r1)
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (parent_loc);
rtems_rfs_ino parent = rtems_rfs_rtems_get_pathloc_ino (parent_loc);
ffc13520: 83 e3 00 08 lwz r31,8(r3)
int rc;
rc = rtems_rfs_symlink (fs, node_name, node_name_len,
target, strlen (target),
ffc13524: 7c c3 33 78 mr r3,r6
rtems_rfs_rtems_symlink (const rtems_filesystem_location_info_t* parent_loc,
const char* node_name,
size_t node_name_len,
const char* target)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (parent_loc);
ffc13528: 83 8a 00 08 lwz r28,8(r10)
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),
ffc1352c: 90 81 00 08 stw r4,8(r1)
ffc13530: 90 a1 00 0c stw r5,12(r1)
ffc13534: 90 c1 00 10 stw r6,16(r1)
ffc13538: 48 01 16 bd bl ffc24bf4 <strlen>
ffc1353c: 7c 7d 1b 78 mr r29,r3
{
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,
ffc13540: 48 00 49 f9 bl ffc17f38 <geteuid>
ffc13544: 7c 7e 1b 78 mr r30,r3
ffc13548: 48 00 49 e1 bl ffc17f28 <getegid>
ffc1354c: 80 81 00 08 lwz r4,8(r1)
ffc13550: 7c 69 1b 78 mr r9,r3
ffc13554: 80 a1 00 0c lwz r5,12(r1)
ffc13558: 7f ea fb 78 mr r10,r31
ffc1355c: 80 c1 00 10 lwz r6,16(r1)
ffc13560: 7f 83 e3 78 mr r3,r28
ffc13564: 7f a7 eb 78 mr r7,r29
ffc13568: 7f c8 f3 78 mr r8,r30
ffc1356c: 48 00 c9 35 bl ffc1fea0 <rtems_rfs_symlink>
target, strlen (target),
geteuid(), getegid(), parent);
if (rc)
ffc13570: 7c 7f 1b 79 mr. r31,r3
ffc13574: 41 a2 00 14 beq+ ffc13588 <rtems_rfs_rtems_symlink+0x7c><== ALWAYS TAKEN
{
return rtems_rfs_rtems_error ("symlink: linking", rc);
ffc13578: 48 00 ea 71 bl ffc21fe8 <__errno> <== NOT EXECUTED
ffc1357c: 93 e3 00 00 stw r31,0(r3) <== NOT EXECUTED
ffc13580: 38 60 ff ff li r3,-1 <== NOT EXECUTED
ffc13584: 48 00 00 08 b ffc1358c <rtems_rfs_rtems_symlink+0x80><== NOT EXECUTED
}
return 0;
ffc13588: 38 60 00 00 li r3,0
}
ffc1358c: 39 61 00 28 addi r11,r1,40
ffc13590: 4b fe df d0 b ffc01560 <_restgpr_28_x>
ffc20458 <rtems_rfs_rtems_unlock>:
/**
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
ffc20458: 7c 2b 0b 78 mr r11,r1
ffc2045c: 7c 08 02 a6 mflr r0
ffc20460: 94 21 ff f0 stwu r1,-16(r1)
ffc20464: 90 01 00 14 stw r0,20(r1)
ffc20468: 4b fe 10 b9 bl ffc01520 <_savegpr_31>
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
ffc2046c: 83 e3 00 80 lwz r31,128(r3)
rtems_rfs_buffers_release (fs);
ffc20470: 4b ff c8 8d bl ffc1ccfc <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);
ffc20474: 80 7f 00 00 lwz r3,0(r31)
ffc20478: 4b fe d5 91 bl ffc0da08 <rtems_semaphore_release>
if (sc != RTEMS_SUCCESSFUL)
ffc2047c: 7c 7f 1b 79 mr. r31,r3
ffc20480: 41 a2 00 44 beq+ ffc204c4 <rtems_rfs_rtems_unlock+0x6c> <== ALWAYS TAKEN
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
ffc20484: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc20488: 38 80 00 04 li r4,4 <== NOT EXECUTED
ffc2048c: 4b ff 3f 3d bl ffc143c8 <rtems_rfs_trace> <== NOT EXECUTED
ffc20490: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc20494: 41 be 00 30 beq+ cr7,ffc204c4 <rtems_rfs_rtems_unlock+0x6c><== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
ffc20498: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc2049c: 4b ff 76 85 bl ffc17b20 <rtems_status_text> <== NOT EXECUTED
rtems_rfs_mutex_unlock (&rtems->access);
}
ffc204a0: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED
ffc204a4: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED
ffc204a8: 7c 64 1b 78 mr r4,r3 <== NOT EXECUTED
ffc204ac: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED
ffc204b0: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc204b4: 38 63 51 08 addi r3,r3,20744 <== NOT EXECUTED
ffc204b8: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED
ffc204bc: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc204c0: 48 00 34 cc b ffc2398c <printf> <== NOT EXECUTED
ffc204c4: 39 61 00 10 addi r11,r1,16
ffc204c8: 4b fe 10 a4 b ffc0156c <_restgpr_31_x>
ffc13594 <rtems_rfs_rtems_utime>:
static int
rtems_rfs_rtems_utime(const rtems_filesystem_location_info_t* pathloc,
time_t atime,
time_t mtime)
{
ffc13594: 94 21 ff b8 stwu r1,-72(r1) <== NOT EXECUTED
ffc13598: 7c 08 02 a6 mflr r0 <== NOT EXECUTED
ffc1359c: 7c 69 1b 78 mr r9,r3 <== NOT EXECUTED
ffc135a0: 90 01 00 4c stw r0,76(r1) <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
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);
ffc135a4: 38 c0 00 01 li r6,1 <== NOT EXECUTED
static int
rtems_rfs_rtems_utime(const rtems_filesystem_location_info_t* pathloc,
time_t atime,
time_t mtime)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
ffc135a8: 81 43 00 14 lwz r10,20(r3) <== NOT EXECUTED
static int
rtems_rfs_rtems_utime(const rtems_filesystem_location_info_t* pathloc,
time_t atime,
time_t mtime)
{
ffc135ac: bf 81 00 38 stmw r28,56(r1) <== NOT EXECUTED
ffc135b0: 7c 9e 23 78 mr r30,r4 <== NOT EXECUTED
ffc135b4: 7c bf 2b 78 mr r31,r5 <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
ffc135b8: 83 aa 00 08 lwz r29,8(r10) <== 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);
ffc135bc: 38 a1 00 08 addi r5,r1,8 <== NOT EXECUTED
ffc135c0: 80 89 00 08 lwz r4,8(r9) <== NOT EXECUTED
ffc135c4: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED
ffc135c8: 4b ff f2 f9 bl ffc128c0 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc)
ffc135cc: 7c 7c 1b 79 mr. r28,r3 <== NOT EXECUTED
ffc135d0: 41 82 00 10 beq- ffc135e0 <rtems_rfs_rtems_utime+0x4c> <== NOT EXECUTED
{
return rtems_rfs_rtems_error ("utime: read inode", rc);
ffc135d4: 48 00 ea 15 bl ffc21fe8 <__errno> <== NOT EXECUTED
ffc135d8: 93 83 00 00 stw r28,0(r3) <== NOT EXECUTED
ffc135dc: 48 00 00 68 b ffc13644 <rtems_rfs_rtems_utime+0xb0> <== 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);
ffc135e0: 81 21 00 14 lwz r9,20(r1) <== NOT EXECUTED
ffc135e4: 57 ca 46 3e rlwinm r10,r30,8,24,31 <== NOT EXECUTED
}
rtems_rfs_inode_set_atime (&inode, atime);
rtems_rfs_inode_set_mtime (&inode, mtime);
rc = rtems_rfs_inode_close (fs, &inode);
ffc135e8: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED
ffc135ec: 99 49 00 10 stb r10,16(r9) <== NOT EXECUTED
ffc135f0: 57 ca 84 3e rlwinm r10,r30,16,16,31 <== NOT EXECUTED
ffc135f4: 38 81 00 08 addi r4,r1,8 <== NOT EXECUTED
ffc135f8: 99 49 00 11 stb r10,17(r9) <== NOT EXECUTED
ffc135fc: 57 ca c2 3e rlwinm r10,r30,24,8,31 <== NOT EXECUTED
ffc13600: 99 49 00 12 stb r10,18(r9) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
ffc13604: 39 40 00 01 li r10,1 <== NOT EXECUTED
ffc13608: 99 41 00 18 stb r10,24(r1) <== 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);
ffc1360c: 57 ea 46 3e rlwinm r10,r31,8,24,31 <== NOT EXECUTED
ffc13610: 99 49 00 14 stb r10,20(r9) <== NOT EXECUTED
ffc13614: 57 ea 84 3e rlwinm r10,r31,16,16,31 <== NOT EXECUTED
ffc13618: 99 49 00 15 stb r10,21(r9) <== NOT EXECUTED
ffc1361c: 57 ea c2 3e rlwinm r10,r31,24,8,31 <== NOT EXECUTED
ffc13620: 9b e9 00 17 stb r31,23(r9) <== 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);
ffc13624: 9b c9 00 13 stb r30,19(r9) <== 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);
ffc13628: 99 49 00 16 stb r10,22(r9) <== NOT EXECUTED
ffc1362c: 4b ff f4 89 bl ffc12ab4 <rtems_rfs_inode_close> <== NOT EXECUTED
if (rc)
{
return rtems_rfs_rtems_error ("utime: closing inode", rc);
}
return 0;
ffc13630: 39 20 00 00 li r9,0 <== 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)
ffc13634: 7c 7f 1b 79 mr. r31,r3 <== NOT EXECUTED
ffc13638: 41 a2 00 10 beq+ ffc13648 <rtems_rfs_rtems_utime+0xb4> <== NOT EXECUTED
{
return rtems_rfs_rtems_error ("utime: closing inode", rc);
ffc1363c: 48 00 e9 ad bl ffc21fe8 <__errno> <== NOT EXECUTED
ffc13640: 93 e3 00 00 stw r31,0(r3) <== NOT EXECUTED
ffc13644: 39 20 ff ff li r9,-1 <== NOT EXECUTED
}
return 0;
}
ffc13648: 39 61 00 48 addi r11,r1,72 <== NOT EXECUTED
ffc1364c: 7d 23 4b 78 mr r3,r9 <== NOT EXECUTED
ffc13650: 4b fe df 10 b ffc01560 <_restgpr_28_x> <== NOT EXECUTED
ffc1c54c <rtems_rfs_scan_chain>:
*/
static rtems_rfs_buffer*
rtems_rfs_scan_chain (rtems_chain_control* chain,
uint32_t* count,
rtems_rfs_buffer_block block)
{
ffc1c54c: 94 21 ff e0 stwu r1,-32(r1)
ffc1c550: 7c 08 02 a6 mflr r0
ffc1c554: 90 01 00 24 stw r0,36(r1)
ffc1c558: bf 61 00 0c stmw r27,12(r1)
ffc1c55c: 7c 7d 1b 78 mr r29,r3
ffc1c560: 7c 9e 23 78 mr r30,r4
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last(
Chain_Control *the_chain
)
{
return _Chain_Tail( the_chain )->previous;
ffc1c564: 83 e3 00 08 lwz r31,8(r3)
rtems_rfs_buffer* buffer;
rtems_chain_node* node;
node = rtems_chain_last (chain);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
ffc1c568: 38 80 00 80 li r4,128
ffc1c56c: 38 60 00 00 li r3,0
*/
static rtems_rfs_buffer*
rtems_rfs_scan_chain (rtems_chain_control* chain,
uint32_t* count,
rtems_rfs_buffer_block block)
{
ffc1c570: 7c bc 2b 78 mr r28,r5
rtems_rfs_buffer* buffer;
rtems_chain_node* node;
node = rtems_chain_last (chain);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
ffc1c574: 4b ff 7e 55 bl ffc143c8 <rtems_rfs_trace>
ffc1c578: 2f 83 00 00 cmpwi cr7,r3,0
ffc1c57c: 41 be 00 9c beq+ cr7,ffc1c618 <rtems_rfs_scan_chain+0xcc><== ALWAYS TAKEN
printf ("rtems-rfs: buffer-scan: count=%" PRIu32 ", block=%" PRIu32 ": ", *count, block);
ffc1c580: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1c584: 80 9e 00 00 lwz r4,0(r30) <== NOT EXECUTED
ffc1c588: 7f 85 e3 78 mr r5,r28 <== NOT EXECUTED
ffc1c58c: 38 63 5d fd addi r3,r3,24061 <== NOT EXECUTED
ffc1c590: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1c594: 48 00 73 f9 bl ffc2398c <printf> <== NOT EXECUTED
ffc1c598: 48 00 00 80 b ffc1c618 <rtems_rfs_scan_chain+0xcc> <== NOT EXECUTED
while (!rtems_chain_is_head (chain, node))
{
buffer = (rtems_rfs_buffer*) node;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
ffc1c59c: 4b ff 7e 2d bl ffc143c8 <rtems_rfs_trace>
ffc1c5a0: 2f 83 00 00 cmpwi cr7,r3,0
ffc1c5a4: 41 be 00 14 beq+ cr7,ffc1c5b8 <rtems_rfs_scan_chain+0x6c><== ALWAYS TAKEN
printf ("%" PRIuPTR " ", ((intptr_t) buffer->user));
ffc1c5a8: 80 9f 00 34 lwz r4,52(r31) <== NOT EXECUTED
ffc1c5ac: 7f 63 db 78 mr r3,r27 <== NOT EXECUTED
ffc1c5b0: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1c5b4: 48 00 73 d9 bl ffc2398c <printf> <== NOT EXECUTED
if (((rtems_rfs_buffer_block) ((intptr_t)(buffer->user))) == block)
ffc1c5b8: 81 3f 00 34 lwz r9,52(r31)
ffc1c5bc: 7f 89 e0 00 cmpw cr7,r9,r28
ffc1c5c0: 40 be 00 50 bne+ cr7,ffc1c610 <rtems_rfs_scan_chain+0xc4>
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
ffc1c5c4: 38 60 00 00 li r3,0
ffc1c5c8: 38 80 00 80 li r4,128
ffc1c5cc: 4b ff 7d fd bl ffc143c8 <rtems_rfs_trace>
ffc1c5d0: 2f 83 00 00 cmpwi cr7,r3,0
ffc1c5d4: 41 be 00 18 beq+ cr7,ffc1c5ec <rtems_rfs_scan_chain+0xa0><== ALWAYS TAKEN
printf (": found block=%" PRIuPTR "\n",
ffc1c5d8: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1c5dc: 80 9f 00 34 lwz r4,52(r31) <== NOT EXECUTED
ffc1c5e0: 38 63 5e 30 addi r3,r3,24112 <== NOT EXECUTED
ffc1c5e4: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1c5e8: 48 00 73 a5 bl ffc2398c <printf> <== NOT EXECUTED
((intptr_t)(buffer->user)));
(*count)--;
ffc1c5ec: 81 3e 00 00 lwz r9,0(r30)
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
ffc1c5f0: 7f e3 fb 78 mr r3,r31
ffc1c5f4: 39 29 ff ff addi r9,r9,-1
ffc1c5f8: 91 3e 00 00 stw r9,0(r30)
ffc1c5fc: 4b ff ce d9 bl ffc194d4 <_Chain_Extract>
*/
RTEMS_INLINE_ROUTINE void _Chain_Set_off_chain(
Chain_Node *node
)
{
node->next = node->previous = NULL;
ffc1c600: 39 20 00 00 li r9,0
ffc1c604: 91 3f 00 04 stw r9,4(r31)
ffc1c608: 91 3f 00 00 stw r9,0(r31)
rtems_chain_extract (node);
rtems_chain_set_off_chain (node);
return buffer;
ffc1c60c: 48 00 00 40 b ffc1c64c <rtems_rfs_scan_chain+0x100>
true);
if ((rc > 0) && (rrc == 0))
rrc = rc;
return rrc;
}
ffc1c610: 83 ff 00 04 lwz r31,4(r31)
ffc1c614: 48 00 00 0c b ffc1c620 <rtems_rfs_scan_chain+0xd4>
while (!rtems_chain_is_head (chain, node))
{
buffer = (rtems_rfs_buffer*) node;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
printf ("%" PRIuPTR " ", ((intptr_t) buffer->user));
ffc1c618: 3f 60 ff c3 lis r27,-61
ffc1c61c: 3b 7b 5e 2c addi r27,r27,24108
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))
ffc1c620: 7f 9f e8 00 cmpw cr7,r31,r29
{
buffer = (rtems_rfs_buffer*) node;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
ffc1c624: 38 60 00 00 li r3,0
ffc1c628: 38 80 00 80 li r4,128
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))
ffc1c62c: 40 9e ff 70 bne+ cr7,ffc1c59c <rtems_rfs_scan_chain+0x50>
return buffer;
}
node = rtems_chain_previous (node);
}
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
ffc1c630: 4b ff 7d 99 bl ffc143c8 <rtems_rfs_trace>
printf (": not found\n");
return NULL;
ffc1c634: 3b e0 00 00 li r31,0
return buffer;
}
node = rtems_chain_previous (node);
}
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
ffc1c638: 2f 83 00 00 cmpwi cr7,r3,0
ffc1c63c: 41 be 00 10 beq+ cr7,ffc1c64c <rtems_rfs_scan_chain+0x100><== ALWAYS TAKEN
printf (": not found\n");
ffc1c640: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1c644: 38 63 5e 42 addi r3,r3,24130 <== NOT EXECUTED
ffc1c648: 48 00 76 ad bl ffc23cf4 <puts> <== NOT EXECUTED
return NULL;
}
ffc1c64c: 39 61 00 20 addi r11,r1,32
ffc1c650: 7f e3 fb 78 mr r3,r31
ffc1c654: 4b fe 4f 08 b ffc0155c <_restgpr_27_x>
ffc1ac08 <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,
ffc1ac08: 94 21 ff c0 stwu r1,-64(r1)
ffc1ac0c: 7c 08 02 a6 mflr r0
rtems_rfs_bitmap_element* map_bits;
int map_index;
int map_offset;
int rc;
*found = false;
ffc1ac10: 39 20 00 00 li r9,0
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
ffc1ac14: be c1 00 18 stmw r22,24(r1)
ffc1ac18: 7c 9d 23 78 mr r29,r4
*found = false;
/*
* Load the bitmap.
*/
rc = rtems_rfs_bitmap_load_map (control, &map);
ffc1ac1c: 38 81 00 08 addi r4,r1,8
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
ffc1ac20: 90 01 00 44 stw r0,68(r1)
ffc1ac24: 7c 7e 1b 78 mr r30,r3
ffc1ac28: 7c bc 2b 78 mr r28,r5
rtems_rfs_bitmap_element* map_bits;
int map_index;
int map_offset;
int rc;
*found = false;
ffc1ac2c: 99 25 00 00 stb r9,0(r5)
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
ffc1ac30: 7c df 33 78 mr r31,r6
*found = false;
/*
* Load the bitmap.
*/
rc = rtems_rfs_bitmap_load_map (control, &map);
ffc1ac34: 4b ff ff 6d bl ffc1aba0 <rtems_rfs_bitmap_load_map>
if (rc > 0)
ffc1ac38: 2c 03 00 00 cmpwi r3,0
ffc1ac3c: 41 a1 01 cc bgt+ ffc1ae08 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x200><== NEVER TAKEN
return rc;
/*
* Calculate the bit we are testing plus the end point we search over.
*/
test_bit = *bit;
ffc1ac40: 81 3d 00 00 lwz r9,0(r29)
end_bit = test_bit + (window * direction);
ffc1ac44: 57 ea 58 28 rlwinm r10,r31,11,0,20
if (end_bit < 0)
ffc1ac48: 7d 4a 4a 15 add. r10,r10,r9
ffc1ac4c: 41 80 00 18 blt- ffc1ac64 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x5c>
end_bit = 0;
else if (end_bit >= control->size)
ffc1ac50: 81 1e 00 0c lwz r8,12(r30)
ffc1ac54: 7f 8a 40 40 cmplw cr7,r10,r8
ffc1ac58: 41 9c 00 10 blt- cr7,ffc1ac68 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x60>
end_bit = control->size - 1;
ffc1ac5c: 39 48 ff ff addi r10,r8,-1
ffc1ac60: 48 00 00 08 b ffc1ac68 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x60>
*/
test_bit = *bit;
end_bit = test_bit + (window * direction);
if (end_bit < 0)
end_bit = 0;
ffc1ac64: 39 40 00 00 li r10,0
ffc1ac68: 2f 9f 00 00 cmpwi cr7,r31,0
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);
search_offset = rtems_rfs_bitmap_map_offset (map_index);
search_bits = &control->search_bits[search_index];
ffc1ac6c: 81 1e 00 14 lwz r8,20(r30)
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);
ffc1ac70: 7d 23 56 70 srawi r3,r9,10
search_offset = rtems_rfs_bitmap_map_offset (map_index);
search_bits = &control->search_bits[search_index];
ffc1ac74: 54 63 10 3a rlwinm r3,r3,2,0,29
if (end_bit < 0)
end_bit = 0;
else if (end_bit >= control->size)
end_bit = control->size - 1;
map_index = rtems_rfs_bitmap_map_index (test_bit);
ffc1ac78: 7d 27 2e 70 srawi r7,r9,5
map_offset = rtems_rfs_bitmap_map_offset (test_bit);
search_index = rtems_rfs_bitmap_map_index (map_index);
search_offset = rtems_rfs_bitmap_map_offset (map_index);
search_bits = &control->search_bits[search_index];
ffc1ac7c: 7c 68 1a 14 add r3,r8,r3
map_bits = &map[map_index];
ffc1ac80: 81 01 00 08 lwz r8,8(r1)
ffc1ac84: 54 e5 10 3a rlwinm r5,r7,2,0,29
ffc1ac88: 7d 08 2a 14 add r8,r8,r5
end_bit = 0;
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);
ffc1ac8c: 55 26 06 fe clrlwi r6,r9,27
search_index = rtems_rfs_bitmap_map_index (map_index);
search_offset = rtems_rfs_bitmap_map_offset (map_index);
ffc1ac90: 54 eb 06 fe clrlwi r11,r7,27
map_offset += direction;
test_bit += direction;
}
}
map_bits += direction;
ffc1ac94: 57 e5 10 3a rlwinm r5,r31,2,0,29
ffc1ac98: 38 00 00 1f li r0,31
ffc1ac9c: 40 9d 00 08 ble- cr7,ffc1aca4 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x9c>
ffc1aca0: 38 00 00 00 li r0,0
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
ffc1aca4: 57 f7 28 34 rlwinm r23,r31,5,0,26
* 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);
if (direction > 0)
ffc1aca8: 2f 9f 00 00 cmpwi cr7,r31,0
*/
static bool
rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_bit bit)
{
return RTEMS_RFS_BITMAP_TEST_BIT (target, bit);
ffc1acac: 38 80 00 01 li r4,1
ffc1acb0: 48 00 00 10 b ffc1acc0 <rtems_rfs_search_map_for_clear_bit.constprop.1+0xb8>
map_bits += direction * bits_skipped;
map_index += direction * bits_skipped;
}
search_bits += direction;
search_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1;
ffc1acb4: 39 60 00 1f li r11,31
ffc1acb8: 48 00 00 08 b ffc1acc0 <rtems_rfs_search_map_for_clear_bit.constprop.1+0xb8>
ffc1acbc: 39 60 00 00 li r11,0
/*
* 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))
ffc1acc0: 83 43 00 00 lwz r26,0(r3)
ffc1acc4: 2f 1a 00 00 cmpwi cr6,r26,0
ffc1acc8: 41 9a 00 d4 beq- cr6,ffc1ad9c <rtems_rfs_search_map_for_clear_bit.constprop.1+0x194>
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
ffc1accc: 7d 87 fa 14 add r12,r7,r31
ffc1acd0: 55 8c 28 34 rlwinm r12,r12,5,0,26
ffc1acd4: 7d 8c 02 14 add r12,r12,r0
ffc1acd8: 7d 67 58 50 subf r11,r7,r11
ffc1acdc: 48 00 00 b0 b ffc1ad8c <rtems_rfs_search_map_for_clear_bit.constprop.1+0x184>
*/
static bool
rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_bit bit)
{
return RTEMS_RFS_BITMAP_TEST_BIT (target, bit);
ffc1ace0: 7c 9b d8 30 slw r27,r4,r27
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))
ffc1ace4: 7f 76 d0 39 and. r22,r27,r26
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
ffc1ace8: 7c c9 30 50 subf r6,r9,r6
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))
ffc1acec: 40 82 00 64 bne- ffc1ad50 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x148>
ffc1acf0: 48 00 00 6c b ffc1ad5c <rtems_rfs_search_map_for_clear_bit.constprop.1+0x154>
* 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))
ffc1acf4: 83 08 00 00 lwz r24,0(r8)
*/
static bool
rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_bit bit)
{
return RTEMS_RFS_BITMAP_TEST_BIT (target, bit);
ffc1acf8: 7c 99 c8 30 slw r25,r4,r25
* 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))
ffc1acfc: 7f 36 c0 39 and. r22,r25,r24
ffc1ad00: 41 a2 00 44 beq+ ffc1ad44 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x13c>
*/
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);
ffc1ad04: 7f 19 c8 78 andc r25,r24,r25
&& (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);
if (rtems_rfs_bitmap_match(*map_bits,
ffc1ad08: 2f 99 00 00 cmpwi cr7,r25,0
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);
ffc1ad0c: 93 28 00 00 stw r25,0(r8)
if (rtems_rfs_bitmap_match(*map_bits,
ffc1ad10: 40 9e 00 10 bne- cr7,ffc1ad20 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x118>
*/
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);
ffc1ad14: 81 43 00 00 lwz r10,0(r3)
ffc1ad18: 7d 5b d8 78 andc r27,r10,r27
if (!rtems_rfs_bitmap_test (*map_bits, map_offset))
{
*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,
ffc1ad1c: 93 63 00 00 stw r27,0(r3)
1 << search_offset);
control->free--;
ffc1ad20: 81 5e 00 10 lwz r10,16(r30)
ffc1ad24: 39 4a ff ff addi r10,r10,-1
ffc1ad28: 91 5e 00 10 stw r10,16(r30)
*bit = test_bit;
*found = true;
rtems_rfs_buffer_mark_dirty (control->buffer);
ffc1ad2c: 81 5e 00 00 lwz r10,0(r30)
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--;
*bit = test_bit;
ffc1ad30: 91 3d 00 00 stw r9,0(r29)
*found = true;
ffc1ad34: 39 20 00 01 li r9,1
ffc1ad38: 99 3c 00 00 stb r9,0(r28)
rtems_rfs_buffer_mark_dirty (control->buffer);
ffc1ad3c: 99 2a 00 00 stb r9,0(r10)
ffc1ad40: 48 00 00 c4 b ffc1ae04 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x1fc>
return 0;
}
if (test_bit == end_bit)
ffc1ad44: 7f 09 50 00 cmpw cr6,r9,r10
ffc1ad48: 41 9a 00 14 beq- cr6,ffc1ad5c <rtems_rfs_search_map_for_clear_bit.constprop.1+0x154>
break;
map_offset += direction;
test_bit += direction;
ffc1ad4c: 7d 29 fa 14 add r9,r9,r31
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
ffc1ad50: 7f 26 4a 14 add r25,r6,r9
{
/*
* 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)
ffc1ad54: 2b 19 00 1f cmplwi cr6,r25,31
ffc1ad58: 40 99 ff 9c ble+ cr6,ffc1acf4 <rtems_rfs_search_map_for_clear_bit.constprop.1+0xec><== ALWAYS TAKEN
map_offset += direction;
test_bit += direction;
}
}
map_bits += direction;
ffc1ad5c: 7d 08 2a 14 add r8,r8,r5
map_index += direction;
ffc1ad60: 7c e7 fa 14 add r7,r7,r31
map_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1;
test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset;
ffc1ad64: 7d 89 63 78 mr r9,r12
search_offset += direction;
if (((direction < 0) && (test_bit <= end_bit))
ffc1ad68: 40 bc 00 10 bge+ cr7,ffc1ad78 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x170>
ffc1ad6c: 7f 0c 50 00 cmpw cr6,r12,r10
ffc1ad70: 41 b9 00 14 bgt+ cr6,ffc1ad84 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x17c>
ffc1ad74: 48 00 00 6c b ffc1ade0 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x1d8>
|| ((direction > 0) && (test_bit >= end_bit)))
ffc1ad78: 41 9e 00 0c beq- cr7,ffc1ad84 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x17c><== NEVER TAKEN
ffc1ad7c: 7f 0c 50 00 cmpw cr6,r12,r10
ffc1ad80: 40 98 00 60 bge- cr6,ffc1ade0 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x1d8>
ffc1ad84: 7d 8c ba 14 add r12,r12,r23
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))
ffc1ad88: 7c 06 03 78 mr r6,r0
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
ffc1ad8c: 7f 6b 3a 14 add r27,r11,r7
* 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)
ffc1ad90: 2b 1b 00 1f cmplwi cr6,r27,31
ffc1ad94: 40 99 ff 4c ble+ cr6,ffc1ace0 <rtems_rfs_search_map_for_clear_bit.constprop.1+0xd8>
ffc1ad98: 48 00 00 4c b ffc1ade4 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x1dc>
*
* 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);
ffc1ad9c: 55 29 00 34 rlwinm r9,r9,0,0,26
if (direction > 0)
ffc1ada0: 40 9d 00 18 ble- cr7,ffc1adb8 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x1b0>
{
bits_skipped = rtems_rfs_bitmap_element_bits () - search_offset;
ffc1ada4: 21 8b 00 20 subfic r12,r11,32
test_bit += bits_skipped * rtems_rfs_bitmap_element_bits ();
ffc1ada8: 55 86 28 34 rlwinm r6,r12,5,0,26
ffc1adac: 7d 26 4a 14 add r9,r6,r9
map_offset = 0;
ffc1adb0: 38 c0 00 00 li r6,0
ffc1adb4: 48 00 00 18 b ffc1adcc <rtems_rfs_search_map_for_clear_bit.constprop.1+0x1c4>
}
else
{
bits_skipped = search_offset + 1;
ffc1adb8: 39 8b 00 01 addi r12,r11,1
/*
* 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;
ffc1adbc: 55 6b 28 34 rlwinm r11,r11,5,0,26
ffc1adc0: 7d 6b 58 f8 not r11,r11
ffc1adc4: 7d 2b 4a 14 add r9,r11,r9
map_offset = rtems_rfs_bitmap_element_bits () - 1;
ffc1adc8: 38 c0 00 1f li r6,31
}
map_bits += direction * bits_skipped;
ffc1adcc: 7d 9f 61 d6 mullw r12,r31,r12
ffc1add0: 55 8b 10 3a rlwinm r11,r12,2,0,29
ffc1add4: 7d 08 5a 14 add r8,r8,r11
map_index += direction * bits_skipped;
ffc1add8: 7c e7 62 14 add r7,r7,r12
ffc1addc: 48 00 00 08 b ffc1ade4 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x1dc>
}
}
map_bits += direction;
map_index += direction;
map_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1;
ffc1ade0: 7c 06 03 78 mr r6,r0
}
map_bits += direction * bits_skipped;
map_index += direction * bits_skipped;
}
search_bits += direction;
ffc1ade4: 7c 63 2a 14 add r3,r3,r5
search_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1;
ffc1ade8: 41 bd 00 14 bgt+ cr7,ffc1adfc <rtems_rfs_search_map_for_clear_bit.constprop.1+0x1f4>
}
while (((direction < 0) && (test_bit >= end_bit))
|| ((direction > 0) && (test_bit <= end_bit)));
ffc1adec: 41 9e 00 18 beq- cr7,ffc1ae04 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x1fc><== NEVER TAKEN
}
search_bits += direction;
search_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1;
}
while (((direction < 0) && (test_bit >= end_bit))
ffc1adf0: 7f 09 50 00 cmpw cr6,r9,r10
ffc1adf4: 40 b8 fe c0 bge- cr6,ffc1acb4 <rtems_rfs_search_map_for_clear_bit.constprop.1+0xac>
ffc1adf8: 48 00 00 0c b ffc1ae04 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x1fc>
|| ((direction > 0) && (test_bit <= end_bit)));
ffc1adfc: 7f 09 50 00 cmpw cr6,r9,r10
ffc1ae00: 40 99 fe bc ble+ cr6,ffc1acbc <rtems_rfs_search_map_for_clear_bit.constprop.1+0xb4>
return 0;
ffc1ae04: 38 60 00 00 li r3,0
}
ffc1ae08: 39 61 00 40 addi r11,r1,64
ffc1ae0c: 4b fe 67 3c b ffc01548 <_restgpr_22_x>
ffc1fea0 <rtems_rfs_symlink>:
const char* link,
int link_length,
uid_t uid,
gid_t gid,
rtems_rfs_ino parent)
{
ffc1fea0: 94 21 ff 38 stwu r1,-200(r1)
ffc1fea4: 7c 08 02 a6 mflr r0
ffc1fea8: be e1 00 a4 stmw r23,164(r1)
ffc1feac: 7c 7f 1b 78 mr r31,r3
ffc1feb0: 7c 9c 23 78 mr r28,r4
rtems_rfs_inode_handle inode;
rtems_rfs_ino ino;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_SYMLINK))
ffc1feb4: 38 60 00 02 li r3,2
const char* link,
int link_length,
uid_t uid,
gid_t gid,
rtems_rfs_ino parent)
{
ffc1feb8: 90 01 00 cc stw r0,204(r1)
rtems_rfs_inode_handle inode;
rtems_rfs_ino ino;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_SYMLINK))
ffc1febc: 38 80 00 00 li r4,0
const char* link,
int link_length,
uid_t uid,
gid_t gid,
rtems_rfs_ino parent)
{
ffc1fec0: 7c b7 2b 78 mr r23,r5
ffc1fec4: 7c db 33 78 mr r27,r6
ffc1fec8: 7c fd 3b 78 mr r29,r7
ffc1fecc: 7d 18 43 78 mr r24,r8
ffc1fed0: 7d 39 4b 78 mr r25,r9
ffc1fed4: 7d 5a 53 78 mr r26,r10
rtems_rfs_inode_handle inode;
rtems_rfs_ino ino;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_SYMLINK))
ffc1fed8: 4b ff 44 f1 bl ffc143c8 <rtems_rfs_trace>
ffc1fedc: 2f 83 00 00 cmpwi cr7,r3,0
ffc1fee0: 40 9e 00 18 bne- cr7,ffc1fef8 <rtems_rfs_symlink+0x58> <== NEVER TAKEN
printf (" link:");
for (c = 0; c < link_length; c++)
printf ("%c", link[c]);
}
if (link_length >= rtems_rfs_fs_block_size (fs))
ffc1fee4: 81 3f 00 08 lwz r9,8(r31)
return ENAMETOOLONG;
ffc1fee8: 3b c0 00 5b li r30,91
printf (" link:");
for (c = 0; c < link_length; c++)
printf ("%c", link[c]);
}
if (link_length >= rtems_rfs_fs_block_size (fs))
ffc1feec: 7f 9d 48 40 cmplw cr7,r29,r9
ffc1fef0: 40 bc 02 28 bge+ cr7,ffc20118 <rtems_rfs_symlink+0x278> <== NEVER TAKEN
ffc1fef4: 48 00 00 64 b ffc1ff58 <rtems_rfs_symlink+0xb8>
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_SYMLINK))
{
int c;
printf ("rtems-rfs: symlink: parent:%" PRIu32 " name:", parent);
ffc1fef8: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1fefc: 38 63 71 6e addi r3,r3,29038 <== NOT EXECUTED
ffc1ff00: 7f 44 d3 78 mr r4,r26 <== NOT EXECUTED
ffc1ff04: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1ff08: 48 00 3a 85 bl ffc2398c <printf> <== NOT EXECUTED
for (c = 0; c < length; c++)
ffc1ff0c: 3b c0 00 00 li r30,0 <== NOT EXECUTED
ffc1ff10: 48 00 00 10 b ffc1ff20 <rtems_rfs_symlink+0x80> <== NOT EXECUTED
printf ("%c", name[c]);
ffc1ff14: 7c 7c f0 ae lbzx r3,r28,r30 <== 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++)
ffc1ff18: 3b de 00 01 addi r30,r30,1 <== NOT EXECUTED
printf ("%c", name[c]);
ffc1ff1c: 48 00 3c fd bl ffc23c18 <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++)
ffc1ff20: 7f 9e b8 00 cmpw cr7,r30,r23 <== NOT EXECUTED
ffc1ff24: 41 9c ff f0 blt+ cr7,ffc1ff14 <rtems_rfs_symlink+0x74> <== NOT EXECUTED
printf ("%c", name[c]);
printf (" link:");
ffc1ff28: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1ff2c: 38 63 71 93 addi r3,r3,29075 <== NOT EXECUTED
ffc1ff30: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1ff34: 48 00 3a 59 bl ffc2398c <printf> <== NOT EXECUTED
for (c = 0; c < link_length; c++)
ffc1ff38: 3b c0 00 00 li r30,0 <== NOT EXECUTED
ffc1ff3c: 48 00 00 10 b ffc1ff4c <rtems_rfs_symlink+0xac> <== NOT EXECUTED
printf ("%c", link[c]);
ffc1ff40: 7c 7b f0 ae lbzx r3,r27,r30 <== 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++)
ffc1ff44: 3b de 00 01 addi r30,r30,1 <== NOT EXECUTED
printf ("%c", link[c]);
ffc1ff48: 48 00 3c d1 bl ffc23c18 <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++)
ffc1ff4c: 7f 9e e8 00 cmpw cr7,r30,r29 <== NOT EXECUTED
ffc1ff50: 41 9c ff f0 blt+ cr7,ffc1ff40 <rtems_rfs_symlink+0xa0> <== NOT EXECUTED
ffc1ff54: 4b ff ff 90 b ffc1fee4 <rtems_rfs_symlink+0x44> <== NOT EXECUTED
}
if (link_length >= rtems_rfs_fs_block_size (fs))
return ENAMETOOLONG;
rc = rtems_rfs_inode_create (fs, parent, name, strlen (name),
ffc1ff58: 7f 83 e3 78 mr r3,r28
ffc1ff5c: 48 00 4c 99 bl ffc24bf4 <strlen>
ffc1ff60: 39 21 00 98 addi r9,r1,152
ffc1ff64: 91 21 00 08 stw r9,8(r1)
ffc1ff68: 38 e0 00 00 li r7,0
ffc1ff6c: 7c 66 1b 78 mr r6,r3
ffc1ff70: 7f 44 d3 78 mr r4,r26
ffc1ff74: 7f e3 fb 78 mr r3,r31
ffc1ff78: 7f 85 e3 78 mr r5,r28
ffc1ff7c: 60 e7 a1 ff ori r7,r7,41471
ffc1ff80: 39 00 00 01 li r8,1
ffc1ff84: 7f 09 c3 78 mr r9,r24
ffc1ff88: 7f 2a cb 78 mr r10,r25
ffc1ff8c: 4b ff 2e d1 bl ffc12e5c <rtems_rfs_inode_create>
RTEMS_RFS_S_SYMLINK,
1, uid, gid, &ino);
if (rc > 0)
ffc1ff90: 7c 7e 1b 79 mr. r30,r3
ffc1ff94: 41 a1 01 84 bgt+ ffc20118 <rtems_rfs_symlink+0x278> <== NEVER TAKEN
return rc;
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
ffc1ff98: 80 81 00 98 lwz r4,152(r1)
ffc1ff9c: 7f e3 fb 78 mr r3,r31
ffc1ffa0: 38 a1 00 60 addi r5,r1,96
ffc1ffa4: 38 c0 00 01 li r6,1
ffc1ffa8: 4b ff 29 19 bl ffc128c0 <rtems_rfs_inode_open>
if (rc > 0)
ffc1ffac: 7c 7e 1b 79 mr. r30,r3
ffc1ffb0: 41 a1 01 68 bgt+ ffc20118 <rtems_rfs_symlink+0x278> <== 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)
ffc1ffb4: 2b 9d 00 13 cmplwi cr7,r29,19
ffc1ffb8: 41 9d 00 54 bgt- cr7,ffc2000c <rtems_rfs_symlink+0x16c> <== NEVER TAKEN
{
memset (inode.node->data.name, 0, RTEMS_RFS_INODE_DATA_NAME_SIZE);
ffc1ffbc: 80 61 00 6c lwz r3,108(r1)
ffc1ffc0: 38 80 00 00 li r4,0
ffc1ffc4: 38 a0 00 14 li r5,20
ffc1ffc8: 38 63 00 1c addi r3,r3,28
ffc1ffcc: 48 00 37 65 bl ffc23730 <memset>
memcpy (inode.node->data.name, link, link_length);
ffc1ffd0: 80 61 00 6c lwz r3,108(r1)
ffc1ffd4: 7f 64 db 78 mr r4,r27
ffc1ffd8: 38 63 00 1c addi r3,r3,28
ffc1ffdc: 7f a5 eb 78 mr r5,r29
ffc1ffe0: 48 00 35 21 bl ffc23500 <memcpy>
* @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);
ffc1ffe4: 81 41 00 6c lwz r10,108(r1)
ffc1ffe8: 39 20 00 00 li r9,0
ffc1ffec: 99 2a 00 0c stb r9,12(r10)
ffc1fff0: 81 41 00 6c lwz r10,108(r1)
ffc1fff4: 99 2a 00 0d stb r9,13(r10)
ffc1fff8: 81 41 00 6c lwz r10,108(r1)
ffc1fffc: 99 2a 00 0e stb r9,14(r10)
ffc20000: 81 41 00 6c lwz r10,108(r1)
ffc20004: 99 2a 00 0f stb r9,15(r10)
ffc20008: 48 00 00 e4 b ffc200ec <rtems_rfs_symlink+0x24c>
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);
ffc2000c: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc20010: 38 81 00 60 addi r4,r1,96 <== NOT EXECUTED
ffc20014: 38 a1 00 10 addi r5,r1,16 <== NOT EXECUTED
ffc20018: 4b ff b8 11 bl ffc1b828 <rtems_rfs_block_map_open> <== NOT EXECUTED
if (rc > 0)
ffc2001c: 7c 7e 1b 79 mr. r30,r3 <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
ffc20020: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
rtems_rfs_block_no block;
rtems_rfs_buffer_handle buffer;
uint8_t* data;
rc = rtems_rfs_block_map_open (fs, &inode, &map);
if (rc > 0)
ffc20024: 40 81 00 08 ble- ffc2002c <rtems_rfs_symlink+0x18c> <== NOT EXECUTED
ffc20028: 48 00 00 b8 b ffc200e0 <rtems_rfs_symlink+0x240> <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
return rc;
}
rc = rtems_rfs_block_map_grow (fs, &map, 1, &block);
ffc2002c: 38 81 00 10 addi r4,r1,16 <== NOT EXECUTED
ffc20030: 38 a0 00 01 li r5,1 <== NOT EXECUTED
ffc20034: 38 c1 00 94 addi r6,r1,148 <== NOT EXECUTED
ffc20038: 4b ff bd c5 bl ffc1bdfc <rtems_rfs_block_map_grow> <== NOT EXECUTED
if (rc > 0)
ffc2003c: 7c 7e 1b 79 mr. r30,r3 <== NOT EXECUTED
ffc20040: 40 81 00 08 ble- ffc20048 <rtems_rfs_symlink+0x1a8> <== NOT EXECUTED
ffc20044: 48 00 00 34 b ffc20078 <rtems_rfs_symlink+0x1d8> <== NOT EXECUTED
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);
ffc20048: 80 a1 00 94 lwz r5,148(r1) <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
ffc2004c: 39 20 00 00 li r9,0 <== NOT EXECUTED
handle->bnum = 0;
ffc20050: 3b 80 00 00 li r28,0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
ffc20054: 99 21 00 88 stb r9,136(r1) <== NOT EXECUTED
ffc20058: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc2005c: 38 81 00 88 addi r4,r1,136 <== NOT EXECUTED
handle->bnum = 0;
ffc20060: 93 81 00 8c stw r28,140(r1) <== NOT EXECUTED
ffc20064: 38 c0 00 00 li r6,0 <== NOT EXECUTED
handle->buffer = NULL;
ffc20068: 93 81 00 90 stw r28,144(r1) <== NOT EXECUTED
ffc2006c: 4b ff c7 d1 bl ffc1c83c <rtems_rfs_buffer_handle_request><== NOT EXECUTED
if (rc > 0)
ffc20070: 7c 7e 1b 79 mr. r30,r3 <== NOT EXECUTED
ffc20074: 40 81 00 14 ble- ffc20088 <rtems_rfs_symlink+0x1e8> <== NOT EXECUTED
{
rtems_rfs_block_map_close (fs, &map);
ffc20078: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc2007c: 38 81 00 10 addi r4,r1,16 <== NOT EXECUTED
ffc20080: 4b ff b9 61 bl ffc1b9e0 <rtems_rfs_block_map_close> <== NOT EXECUTED
ffc20084: 48 00 00 58 b ffc200dc <rtems_rfs_symlink+0x23c> <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
return rc;
}
data = rtems_rfs_buffer_data (&buffer);
ffc20088: 81 21 00 90 lwz r9,144(r1) <== NOT EXECUTED
memset (data, 0xff, rtems_rfs_fs_block_size (fs));
ffc2008c: 38 80 00 ff li r4,255 <== NOT EXECUTED
ffc20090: 80 bf 00 08 lwz r5,8(r31) <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
rtems_rfs_inode_close (fs, &inode);
return rc;
}
data = rtems_rfs_buffer_data (&buffer);
ffc20094: 83 c9 00 1c lwz r30,28(r9) <== NOT EXECUTED
memset (data, 0xff, rtems_rfs_fs_block_size (fs));
ffc20098: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc2009c: 48 00 36 95 bl ffc23730 <memset> <== NOT EXECUTED
memcpy (data, link, link_length);
ffc200a0: 7f a5 eb 78 mr r5,r29 <== NOT EXECUTED
ffc200a4: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc200a8: 7f 64 db 78 mr r4,r27 <== NOT EXECUTED
ffc200ac: 48 00 34 55 bl ffc23500 <memcpy> <== 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);
ffc200b0: 38 81 00 88 addi r4,r1,136 <== NOT EXECUTED
ffc200b4: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc200b8: 4b ff c5 a1 bl ffc1c658 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
rtems_rfs_inode_close (fs, &inode);
return rc;
}
rc = rtems_rfs_block_map_close (fs, &map);
ffc200bc: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc200c0: 38 81 00 10 addi r4,r1,16 <== NOT EXECUTED
handle->dirty = false;
ffc200c4: 9b 81 00 88 stb r28,136(r1) <== NOT EXECUTED
handle->bnum = 0;
ffc200c8: 93 81 00 8c stw r28,140(r1) <== NOT EXECUTED
handle->buffer = NULL;
ffc200cc: 93 81 00 90 stw r28,144(r1) <== NOT EXECUTED
ffc200d0: 4b ff b9 11 bl ffc1b9e0 <rtems_rfs_block_map_close> <== NOT EXECUTED
if (rc > 0)
ffc200d4: 7c 7e 1b 79 mr. r30,r3 <== NOT EXECUTED
ffc200d8: 40 81 00 14 ble- ffc200ec <rtems_rfs_symlink+0x24c> <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
ffc200dc: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc200e0: 38 81 00 60 addi r4,r1,96 <== NOT EXECUTED
ffc200e4: 4b ff 29 d1 bl ffc12ab4 <rtems_rfs_inode_close> <== NOT EXECUTED
ffc200e8: 48 00 00 30 b ffc20118 <rtems_rfs_symlink+0x278> <== NOT EXECUTED
*/
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);
ffc200ec: 81 21 00 6c lwz r9,108(r1)
ffc200f0: 57 aa c6 3e rlwinm r10,r29,24,24,31
}
}
rtems_rfs_inode_set_block_offset (&inode, link_length);
rc = rtems_rfs_inode_close (fs, &inode);
ffc200f4: 7f e3 fb 78 mr r3,r31
ffc200f8: 99 49 00 0a stb r10,10(r9)
ffc200fc: 38 81 00 60 addi r4,r1,96
ffc20100: 81 21 00 6c lwz r9,108(r1)
ffc20104: 9b a9 00 0b stb r29,11(r9)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
ffc20108: 39 20 00 01 li r9,1
ffc2010c: 99 21 00 70 stb r9,112(r1)
ffc20110: 4b ff 29 a5 bl ffc12ab4 <rtems_rfs_inode_close>
ffc20114: 7c 7e 1b 78 mr r30,r3
return rc;
}
ffc20118: 39 61 00 c8 addi r11,r1,200
ffc2011c: 7f c3 f3 78 mr r3,r30
ffc20120: 4b fe 14 2c b ffc0154c <_restgpr_23_x>
ffc20124 <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)
{
ffc20124: 94 21 ff 50 stwu r1,-176(r1)
ffc20128: 7c 08 02 a6 mflr r0
ffc2012c: bf 61 00 9c stmw r27,156(r1)
ffc20130: 7c 7f 1b 78 mr r31,r3
ffc20134: 7c 9e 23 78 mr r30,r4
rtems_rfs_inode_handle inode;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_SYMLINK_READ))
ffc20138: 38 60 00 04 li r3,4
rtems_rfs_symlink_read (rtems_rfs_file_system* fs,
rtems_rfs_ino link,
char* path,
size_t size,
size_t* length)
{
ffc2013c: 90 01 00 b4 stw r0,180(r1)
rtems_rfs_inode_handle inode;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_SYMLINK_READ))
ffc20140: 38 80 00 00 li r4,0
rtems_rfs_symlink_read (rtems_rfs_file_system* fs,
rtems_rfs_ino link,
char* path,
size_t size,
size_t* length)
{
ffc20144: 7c bb 2b 78 mr r27,r5
ffc20148: 7c dd 33 78 mr r29,r6
ffc2014c: 7c fc 3b 78 mr r28,r7
rtems_rfs_inode_handle inode;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_SYMLINK_READ))
ffc20150: 4b ff 42 79 bl ffc143c8 <rtems_rfs_trace>
ffc20154: 2f 83 00 00 cmpwi cr7,r3,0
ffc20158: 41 be 00 18 beq+ cr7,ffc20170 <rtems_rfs_symlink_read+0x4c><== ALWAYS TAKEN
printf ("rtems-rfs: symlink-read: link:%" PRIu32 "\n", link);
ffc2015c: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc20160: 38 63 71 9a addi r3,r3,29082 <== NOT EXECUTED
ffc20164: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED
ffc20168: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc2016c: 48 00 38 21 bl ffc2398c <printf> <== NOT EXECUTED
rc = rtems_rfs_inode_open (fs, link, &inode, true);
ffc20170: 7f c4 f3 78 mr r4,r30
ffc20174: 7f e3 fb 78 mr r3,r31
ffc20178: 38 a1 00 58 addi r5,r1,88
ffc2017c: 38 c0 00 01 li r6,1
ffc20180: 4b ff 27 41 bl ffc128c0 <rtems_rfs_inode_open>
if (rc)
ffc20184: 7c 7e 1b 79 mr. r30,r3
ffc20188: 40 82 01 6c bne- ffc202f4 <rtems_rfs_symlink_read+0x1d0><== NEVER TAKEN
return rc;
if (!RTEMS_RFS_S_ISLNK (rtems_rfs_inode_get_mode (&inode)))
ffc2018c: 80 81 00 64 lwz r4,100(r1)
* @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);
ffc20190: 89 44 00 02 lbz r10,2(r4)
ffc20194: 55 4a 44 26 rlwinm r10,r10,8,16,19
ffc20198: 6d 49 ff ff xoris r9,r10,65535
ffc2019c: 2f 89 a0 00 cmpwi cr7,r9,-24576
ffc201a0: 41 9e 00 18 beq- cr7,ffc201b8 <rtems_rfs_symlink_read+0x94><== ALWAYS TAKEN
{
rtems_rfs_inode_close (fs, &inode);
ffc201a4: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc201a8: 38 81 00 58 addi r4,r1,88 <== NOT EXECUTED
ffc201ac: 4b ff 29 09 bl ffc12ab4 <rtems_rfs_inode_close> <== NOT EXECUTED
return EINVAL;
ffc201b0: 3b c0 00 16 li r30,22 <== NOT EXECUTED
ffc201b4: 48 00 01 40 b ffc202f4 <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);
ffc201b8: 88 a4 00 0a lbz r5,10(r4)
ffc201bc: 89 24 00 0b lbz r9,11(r4)
ffc201c0: 54 a5 40 2e rlwinm r5,r5,8,0,23
}
*length = rtems_rfs_inode_get_block_offset (&inode);
ffc201c4: 7c a5 4b 78 or r5,r5,r9
ffc201c8: 7f 85 e8 40 cmplw cr7,r5,r29
ffc201cc: 40 9d 00 08 ble- cr7,ffc201d4 <rtems_rfs_symlink_read+0xb0>
ffc201d0: 7f a5 eb 78 mr r5,r29
ffc201d4: 90 bc 00 00 stw r5,0(r28)
* @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);
ffc201d8: 89 44 00 0c lbz r10,12(r4)
ffc201dc: 89 24 00 0d lbz r9,13(r4)
ffc201e0: 55 4a c0 0e rlwinm r10,r10,24,0,7
ffc201e4: 55 29 80 1e rlwinm r9,r9,16,0,15
ffc201e8: 7d 4a 4b 78 or r10,r10,r9
ffc201ec: 89 24 00 0f lbz r9,15(r4)
ffc201f0: 7d 4a 4b 78 or r10,r10,r9
ffc201f4: 89 24 00 0e lbz r9,14(r4)
ffc201f8: 55 29 40 2e rlwinm r9,r9,8,0,23
if (size < *length)
{
*length = size;
}
if (rtems_rfs_inode_get_block_count (&inode) == 0)
ffc201fc: 7d 48 4b 79 or. r8,r10,r9
ffc20200: 40 82 00 14 bne- ffc20214 <rtems_rfs_symlink_read+0xf0> <== NEVER TAKEN
{
memcpy (path, inode.node->data.name, *length);
ffc20204: 7f 63 db 78 mr r3,r27
ffc20208: 38 84 00 1c addi r4,r4,28
ffc2020c: 48 00 32 f5 bl ffc23500 <memcpy>
ffc20210: 48 00 00 d4 b ffc202e4 <rtems_rfs_symlink_read+0x1c0>
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);
ffc20214: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc20218: 38 81 00 58 addi r4,r1,88 <== NOT EXECUTED
ffc2021c: 38 a1 00 08 addi r5,r1,8 <== NOT EXECUTED
ffc20220: 4b ff b6 09 bl ffc1b828 <rtems_rfs_block_map_open> <== NOT EXECUTED
if (rc > 0)
ffc20224: 7c 7e 1b 79 mr. r30,r3 <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
ffc20228: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
rtems_rfs_block_no block;
rtems_rfs_buffer_handle buffer;
char* data;
rc = rtems_rfs_block_map_open (fs, &inode, &map);
if (rc > 0)
ffc2022c: 40 81 00 08 ble- ffc20234 <rtems_rfs_symlink_read+0x110><== NOT EXECUTED
ffc20230: 48 00 00 a8 b ffc202d8 <rtems_rfs_symlink_read+0x1b4><== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
return rc;
}
rc = rtems_rfs_block_map_seek (fs, &map, 0, &block);
ffc20234: 38 81 00 08 addi r4,r1,8 <== NOT EXECUTED
ffc20238: 38 a0 00 00 li r5,0 <== NOT EXECUTED
ffc2023c: 38 c0 00 00 li r6,0 <== NOT EXECUTED
ffc20240: 38 e1 00 8c addi r7,r1,140 <== NOT EXECUTED
ffc20244: 4b ff ba e9 bl ffc1bd2c <rtems_rfs_block_map_seek> <== NOT EXECUTED
if (rc > 0)
ffc20248: 7c 7e 1b 79 mr. r30,r3 <== NOT EXECUTED
ffc2024c: 40 81 00 08 ble- ffc20254 <rtems_rfs_symlink_read+0x130><== NOT EXECUTED
ffc20250: 48 00 00 34 b ffc20284 <rtems_rfs_symlink_read+0x160><== NOT EXECUTED
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);
ffc20254: 80 a1 00 8c lwz r5,140(r1) <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
ffc20258: 39 20 00 00 li r9,0 <== NOT EXECUTED
handle->bnum = 0;
ffc2025c: 3b a0 00 00 li r29,0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
ffc20260: 99 21 00 80 stb r9,128(r1) <== NOT EXECUTED
ffc20264: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc20268: 38 81 00 80 addi r4,r1,128 <== NOT EXECUTED
handle->bnum = 0;
ffc2026c: 93 a1 00 84 stw r29,132(r1) <== NOT EXECUTED
ffc20270: 38 c0 00 00 li r6,0 <== NOT EXECUTED
handle->buffer = NULL;
ffc20274: 93 a1 00 88 stw r29,136(r1) <== NOT EXECUTED
ffc20278: 4b ff c5 c5 bl ffc1c83c <rtems_rfs_buffer_handle_request><== NOT EXECUTED
if (rc > 0)
ffc2027c: 7c 7e 1b 79 mr. r30,r3 <== NOT EXECUTED
ffc20280: 40 81 00 14 ble- ffc20294 <rtems_rfs_symlink_read+0x170><== NOT EXECUTED
{
rtems_rfs_block_map_close (fs, &map);
ffc20284: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc20288: 38 81 00 08 addi r4,r1,8 <== NOT EXECUTED
ffc2028c: 4b ff b7 55 bl ffc1b9e0 <rtems_rfs_block_map_close> <== NOT EXECUTED
ffc20290: 48 00 00 44 b ffc202d4 <rtems_rfs_symlink_read+0x1b0><== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
return rc;
}
data = rtems_rfs_buffer_data (&buffer);
memcpy (path, data, *length);
ffc20294: 81 21 00 88 lwz r9,136(r1) <== NOT EXECUTED
ffc20298: 7f 63 db 78 mr r3,r27 <== NOT EXECUTED
ffc2029c: 80 bc 00 00 lwz r5,0(r28) <== NOT EXECUTED
ffc202a0: 80 89 00 1c lwz r4,28(r9) <== NOT EXECUTED
ffc202a4: 48 00 32 5d bl ffc23500 <memcpy> <== 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);
ffc202a8: 38 81 00 80 addi r4,r1,128 <== NOT EXECUTED
ffc202ac: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc202b0: 4b ff c3 a9 bl ffc1c658 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
rtems_rfs_inode_close (fs, &inode);
return rc;
}
rc = rtems_rfs_block_map_close (fs, &map);
ffc202b4: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc202b8: 38 81 00 08 addi r4,r1,8 <== NOT EXECUTED
handle->dirty = false;
ffc202bc: 9b a1 00 80 stb r29,128(r1) <== NOT EXECUTED
handle->bnum = 0;
ffc202c0: 93 a1 00 84 stw r29,132(r1) <== NOT EXECUTED
handle->buffer = NULL;
ffc202c4: 93 a1 00 88 stw r29,136(r1) <== NOT EXECUTED
ffc202c8: 4b ff b7 19 bl ffc1b9e0 <rtems_rfs_block_map_close> <== NOT EXECUTED
if (rc > 0)
ffc202cc: 7c 7e 1b 79 mr. r30,r3 <== NOT EXECUTED
ffc202d0: 40 81 00 14 ble- ffc202e4 <rtems_rfs_symlink_read+0x1c0><== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
ffc202d4: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc202d8: 38 81 00 58 addi r4,r1,88 <== NOT EXECUTED
ffc202dc: 4b ff 27 d9 bl ffc12ab4 <rtems_rfs_inode_close> <== NOT EXECUTED
ffc202e0: 48 00 00 14 b ffc202f4 <rtems_rfs_symlink_read+0x1d0><== NOT EXECUTED
return rc;
}
}
rc = rtems_rfs_inode_close (fs, &inode);
ffc202e4: 7f e3 fb 78 mr r3,r31
ffc202e8: 38 81 00 58 addi r4,r1,88
ffc202ec: 4b ff 27 c9 bl ffc12ab4 <rtems_rfs_inode_close>
ffc202f0: 7c 7e 1b 78 mr r30,r3
return rc;
}
ffc202f4: 39 61 00 b0 addi r11,r1,176
ffc202f8: 7f c3 f3 78 mr r3,r30
ffc202fc: 4b fe 12 60 b ffc0155c <_restgpr_27_x>
ffc14420 <rtems_rfs_trace_clear_mask>:
rtems_rfs_trace_mask
rtems_rfs_trace_clear_mask (rtems_rfs_trace_mask mask)
{
rtems_rfs_trace_mask state = rtems_rfs_trace_flags;
ffc14420: 3d 20 00 01 lis r9,1 <== NOT EXECUTED
ffc14424: 38 e9 2a 90 addi r7,r9,10896 <== NOT EXECUTED
ffc14428: 81 09 2a 90 lwz r8,10896(r9) <== NOT EXECUTED
ffc1442c: 81 47 00 04 lwz r10,4(r7) <== NOT EXECUTED
rtems_rfs_trace_flags &= ~mask;
ffc14430: 7d 03 18 78 andc r3,r8,r3 <== NOT EXECUTED
ffc14434: 7d 44 20 78 andc r4,r10,r4 <== NOT EXECUTED
ffc14438: 90 69 2a 90 stw r3,10896(r9) <== NOT EXECUTED
return state;
}
ffc1443c: 7d 03 43 78 mr r3,r8 <== NOT EXECUTED
rtems_rfs_trace_mask
rtems_rfs_trace_clear_mask (rtems_rfs_trace_mask mask)
{
rtems_rfs_trace_mask state = rtems_rfs_trace_flags;
rtems_rfs_trace_flags &= ~mask;
ffc14440: 90 87 00 04 stw r4,4(r7) <== NOT EXECUTED
return state;
}
ffc14444: 7d 44 53 78 mr r4,r10 <== NOT EXECUTED
ffc14448: 4e 80 00 20 blr <== NOT EXECUTED
ffc143f4 <rtems_rfs_trace_set_mask>:
rtems_rfs_trace_mask
rtems_rfs_trace_set_mask (rtems_rfs_trace_mask mask)
{
rtems_rfs_trace_mask state = rtems_rfs_trace_flags;
ffc143f4: 3d 20 00 01 lis r9,1 <== NOT EXECUTED
ffc143f8: 38 e9 2a 90 addi r7,r9,10896 <== NOT EXECUTED
ffc143fc: 81 09 2a 90 lwz r8,10896(r9) <== NOT EXECUTED
ffc14400: 81 47 00 04 lwz r10,4(r7) <== NOT EXECUTED
rtems_rfs_trace_flags |= mask;
ffc14404: 7c 63 43 78 or r3,r3,r8 <== NOT EXECUTED
ffc14408: 7c 84 53 78 or r4,r4,r10 <== NOT EXECUTED
ffc1440c: 90 69 2a 90 stw r3,10896(r9) <== NOT EXECUTED
return state;
}
ffc14410: 7d 03 43 78 mr r3,r8 <== NOT EXECUTED
rtems_rfs_trace_mask
rtems_rfs_trace_set_mask (rtems_rfs_trace_mask mask)
{
rtems_rfs_trace_mask state = rtems_rfs_trace_flags;
rtems_rfs_trace_flags |= mask;
ffc14414: 90 87 00 04 stw r4,4(r7) <== NOT EXECUTED
return state;
}
ffc14418: 7d 44 53 78 mr r4,r10 <== NOT EXECUTED
ffc1441c: 4e 80 00 20 blr <== NOT EXECUTED
ffc1444c <rtems_rfs_trace_shell_command>:
int
rtems_rfs_trace_shell_command (int argc, char *argv[])
{
ffc1444c: 94 21 ff 18 stwu r1,-232(r1) <== NOT EXECUTED
ffc14450: 7c 08 02 a6 mflr r0 <== NOT EXECUTED
const char* table[] =
ffc14454: 38 a0 00 9c li r5,156 <== NOT EXECUTED
return state;
}
int
rtems_rfs_trace_shell_command (int argc, char *argv[])
{
ffc14458: be 61 00 b4 stmw r19,180(r1) <== NOT EXECUTED
ffc1445c: 7c 98 23 78 mr r24,r4 <== NOT EXECUTED
const char* table[] =
ffc14460: 3c 80 ff c3 lis r4,-61 <== NOT EXECUTED
return state;
}
int
rtems_rfs_trace_shell_command (int argc, char *argv[])
{
ffc14464: 7c 76 1b 78 mr r22,r3 <== NOT EXECUTED
ffc14468: 90 01 00 ec stw r0,236(r1) <== NOT EXECUTED
const char* table[] =
ffc1446c: 38 61 00 08 addi r3,r1,8 <== NOT EXECUTED
ffc14470: 38 84 51 b0 addi r4,r4,20912 <== NOT EXECUTED
return 1;
}
}
else
{
if (strcmp (argv[arg], "set") == 0)
ffc14474: 3e a0 ff c3 lis r21,-61 <== NOT EXECUTED
}
int
rtems_rfs_trace_shell_command (int argc, char *argv[])
{
const char* table[] =
ffc14478: 48 00 f0 89 bl ffc23500 <memcpy> <== NOT EXECUTED
}
else
{
if (strcmp (argv[arg], "set") == 0)
set = true;
if (strcmp (argv[arg], "clear") == 0)
ffc1447c: 3e 80 ff c3 lis r20,-61 <== NOT EXECUTED
set = false;
else if (strcmp (argv[arg], "all") == 0)
ffc14480: 3e 60 ff c3 lis r19,-61 <== NOT EXECUTED
rtems_rfs_trace_mask clear_value = 0;
bool set = true;
int arg;
int t;
for (arg = 1; arg < argc; arg++)
ffc14484: 3b 40 00 01 li r26,1 <== NOT EXECUTED
"file-set"
};
rtems_rfs_trace_mask set_value = 0;
rtems_rfs_trace_mask clear_value = 0;
bool set = true;
ffc14488: 3b 20 00 01 li r25,1 <== NOT EXECUTED
"file-io",
"file-set"
};
rtems_rfs_trace_mask set_value = 0;
rtems_rfs_trace_mask clear_value = 0;
ffc1448c: 3b 80 00 00 li r28,0 <== NOT EXECUTED
ffc14490: 3b a0 00 00 li r29,0 <== NOT EXECUTED
"file-close",
"file-io",
"file-set"
};
rtems_rfs_trace_mask set_value = 0;
ffc14494: 3b c0 00 00 li r30,0 <== NOT EXECUTED
ffc14498: 3b e0 00 00 li r31,0 <== NOT EXECUTED
return 1;
}
}
else
{
if (strcmp (argv[arg], "set") == 0)
ffc1449c: 3a b5 54 92 addi r21,r21,21650 <== NOT EXECUTED
set = true;
if (strcmp (argv[arg], "clear") == 0)
ffc144a0: 3a 94 52 b3 addi r20,r20,21171 <== NOT EXECUTED
set = false;
else if (strcmp (argv[arg], "all") == 0)
ffc144a4: 3a 73 52 b9 addi r19,r19,21177 <== NOT EXECUTED
}
}
}
rtems_rfs_trace_flags |= set_value;
rtems_rfs_trace_flags &= ~clear_value;
ffc144a8: 3e e0 00 01 lis r23,1 <== NOT EXECUTED
rtems_rfs_trace_mask clear_value = 0;
bool set = true;
int arg;
int t;
for (arg = 1; arg < argc; arg++)
ffc144ac: 48 00 01 98 b ffc14644 <rtems_rfs_trace_shell_command+0x1f8><== NOT EXECUTED
rtems_rfs_trace_flags &= ~mask;
return state;
}
int
rtems_rfs_trace_shell_command (int argc, char *argv[])
ffc144b0: 57 49 10 3a rlwinm r9,r26,2,0,29 <== NOT EXECUTED
int arg;
int t;
for (arg = 1; arg < argc; arg++)
{
if (argv[arg][0] == '-')
ffc144b4: 7f 78 48 2e lwzx r27,r24,r9 <== NOT EXECUTED
ffc144b8: 89 3b 00 00 lbz r9,0(r27) <== NOT EXECUTED
ffc144bc: 2f 89 00 2d cmpwi cr7,r9,45 <== NOT EXECUTED
ffc144c0: 40 be 00 90 bne+ cr7,ffc14550 <rtems_rfs_trace_shell_command+0x104><== NOT EXECUTED
{
switch (argv[arg][1])
ffc144c4: 89 3b 00 01 lbz r9,1(r27) <== NOT EXECUTED
ffc144c8: 2f 89 00 68 cmpwi cr7,r9,104 <== NOT EXECUTED
ffc144cc: 41 9e 00 10 beq- cr7,ffc144dc <rtems_rfs_trace_shell_command+0x90><== NOT EXECUTED
ffc144d0: 2f 89 00 6c cmpwi cr7,r9,108 <== NOT EXECUTED
ffc144d4: 40 be 00 68 bne+ cr7,ffc1453c <rtems_rfs_trace_shell_command+0xf0><== NOT EXECUTED
ffc144d8: 48 00 00 1c b ffc144f4 <rtems_rfs_trace_shell_command+0xa8><== NOT EXECUTED
{
case 'h':
printf ("usage: %s [-hl] [set/clear] [flags]\n", argv[0]);
ffc144dc: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc144e0: 80 98 00 00 lwz r4,0(r24) <== NOT EXECUTED
ffc144e4: 38 63 52 4c addi r3,r3,21068 <== NOT EXECUTED
ffc144e8: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc144ec: 48 00 f4 a1 bl ffc2398c <printf> <== NOT EXECUTED
ffc144f0: 48 00 00 44 b ffc14534 <rtems_rfs_trace_shell_command+0xe8><== NOT EXECUTED
return 0;
case 'l':
printf ("%s: valid flags to set or clear are:\n", argv[0]);
ffc144f4: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc144f8: 80 98 00 00 lwz r4,0(r24) <== NOT EXECUTED
ffc144fc: 38 63 52 71 addi r3,r3,21105 <== NOT EXECUTED
for (t = 0; t < (sizeof (table) / sizeof (const char*)); t++)
printf (" %s\n", table[t]);
ffc14500: 3f a0 ff c3 lis r29,-61 <== 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]);
ffc14504: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc14508: 48 00 f4 85 bl ffc2398c <printf> <== NOT EXECUTED
rtems_rfs_trace_flags &= ~mask;
return state;
}
int
rtems_rfs_trace_shell_command (int argc, char *argv[])
ffc1450c: 3b e1 00 04 addi r31,r1,4 <== NOT EXECUTED
ffc14510: 3b c1 00 a0 addi r30,r1,160 <== NOT EXECUTED
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++)
printf (" %s\n", table[t]);
ffc14514: 3b bd 52 97 addi r29,r29,21143 <== 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++)
ffc14518: 48 00 00 14 b ffc1452c <rtems_rfs_trace_shell_command+0xe0><== NOT EXECUTED
printf (" %s\n", table[t]);
ffc1451c: 84 9f 00 04 lwzu r4,4(r31) <== NOT EXECUTED
ffc14520: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED
ffc14524: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc14528: 48 00 f4 65 bl ffc2398c <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++)
ffc1452c: 7f 9f f0 00 cmpw cr7,r31,r30 <== NOT EXECUTED
ffc14530: 40 9e ff ec bne+ cr7,ffc1451c <rtems_rfs_trace_shell_command+0xd0><== NOT EXECUTED
printf (" %s\n", table[t]);
return 0;
ffc14534: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc14538: 48 00 01 18 b ffc14650 <rtems_rfs_trace_shell_command+0x204><== NOT EXECUTED
default:
printf ("error: unknown option\n");
ffc1453c: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc14540: 38 63 52 9d addi r3,r3,21149 <== NOT EXECUTED
ffc14544: 48 00 f7 b1 bl ffc23cf4 <puts> <== NOT EXECUTED
return 1;
ffc14548: 38 60 00 01 li r3,1 <== NOT EXECUTED
ffc1454c: 48 00 01 04 b ffc14650 <rtems_rfs_trace_shell_command+0x204><== NOT EXECUTED
}
}
else
{
if (strcmp (argv[arg], "set") == 0)
ffc14550: 7f 63 db 78 mr r3,r27 <== NOT EXECUTED
ffc14554: 7e a4 ab 78 mr r4,r21 <== NOT EXECUTED
ffc14558: 48 01 00 a1 bl ffc245f8 <strcmp> <== NOT EXECUTED
ffc1455c: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc14560: 40 9e 00 08 bne- cr7,ffc14568 <rtems_rfs_trace_shell_command+0x11c><== NOT EXECUTED
set = true;
ffc14564: 3b 20 00 01 li r25,1 <== NOT EXECUTED
if (strcmp (argv[arg], "clear") == 0)
ffc14568: 7f 63 db 78 mr r3,r27 <== NOT EXECUTED
ffc1456c: 7e 84 a3 78 mr r4,r20 <== NOT EXECUTED
ffc14570: 48 01 00 89 bl ffc245f8 <strcmp> <== NOT EXECUTED
ffc14574: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc14578: 41 9e 00 94 beq- cr7,ffc1460c <rtems_rfs_trace_shell_command+0x1c0><== NOT EXECUTED
set = false;
else if (strcmp (argv[arg], "all") == 0)
ffc1457c: 7f 63 db 78 mr r3,r27 <== NOT EXECUTED
ffc14580: 7e 64 9b 78 mr r4,r19 <== NOT EXECUTED
ffc14584: 48 01 00 75 bl ffc245f8 <strcmp> <== NOT EXECUTED
ffc14588: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc1458c: 40 9e 00 18 bne- cr7,ffc145a4 <rtems_rfs_trace_shell_command+0x158><== NOT EXECUTED
{
if (set)
ffc14590: 2f 99 00 00 cmpwi cr7,r25,0 <== NOT EXECUTED
ffc14594: 41 9e 00 80 beq- cr7,ffc14614 <rtems_rfs_trace_shell_command+0x1c8><== NOT EXECUTED
set_value = RTEMS_RFS_TRACE_ALL;
ffc14598: 3b c0 ff ff li r30,-1 <== NOT EXECUTED
ffc1459c: 3b e0 ff ff li r31,-1 <== NOT EXECUTED
ffc145a0: 48 00 00 7c b ffc1461c <rtems_rfs_trace_shell_command+0x1d0><== 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)
ffc145a4: 38 a0 00 00 li r5,0 <== NOT EXECUTED
rtems_rfs_trace_flags &= ~mask;
return state;
}
int
rtems_rfs_trace_shell_command (int argc, char *argv[])
ffc145a8: 54 a9 10 3a rlwinm r9,r5,2,0,29 <== NOT EXECUTED
}
else
{
for (t = 0; t < (sizeof (table) / sizeof (const char*)); t++)
{
if (strcmp (argv[arg], table[t]) == 0)
ffc145ac: 39 41 00 08 addi r10,r1,8 <== NOT EXECUTED
ffc145b0: 7c 8a 48 2e lwzx r4,r10,r9 <== NOT EXECUTED
ffc145b4: 7f 63 db 78 mr r3,r27 <== NOT EXECUTED
ffc145b8: 90 a1 00 a8 stw r5,168(r1) <== NOT EXECUTED
ffc145bc: 48 01 00 3d bl ffc245f8 <strcmp> <== NOT EXECUTED
ffc145c0: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc145c4: 80 a1 00 a8 lwz r5,168(r1) <== NOT EXECUTED
ffc145c8: 40 be 00 34 bne+ cr7,ffc145fc <rtems_rfs_trace_shell_command+0x1b0><== NOT EXECUTED
{
if (set)
ffc145cc: 2f 99 00 00 cmpwi cr7,r25,0 <== NOT EXECUTED
set_value = 1ULL << t;
ffc145d0: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc145d4: 38 80 00 01 li r4,1 <== NOT EXECUTED
{
for (t = 0; t < (sizeof (table) / sizeof (const char*)); t++)
{
if (strcmp (argv[arg], table[t]) == 0)
{
if (set)
ffc145d8: 41 9e 00 14 beq- cr7,ffc145ec <rtems_rfs_trace_shell_command+0x1a0><== NOT EXECUTED
set_value = 1ULL << t;
ffc145dc: 48 01 c4 f5 bl ffc30ad0 <__ashldi3> <== NOT EXECUTED
ffc145e0: 7c 7e 1b 78 mr r30,r3 <== NOT EXECUTED
ffc145e4: 7c 9f 23 78 mr r31,r4 <== NOT EXECUTED
ffc145e8: 48 00 00 34 b ffc1461c <rtems_rfs_trace_shell_command+0x1d0><== NOT EXECUTED
else
clear_value = 1ULL << t;
ffc145ec: 48 01 c4 e5 bl ffc30ad0 <__ashldi3> <== NOT EXECUTED
ffc145f0: 7c 7c 1b 78 mr r28,r3 <== NOT EXECUTED
ffc145f4: 7c 9d 23 78 mr r29,r4 <== NOT EXECUTED
ffc145f8: 48 00 00 24 b ffc1461c <rtems_rfs_trace_shell_command+0x1d0><== NOT EXECUTED
else
clear_value = RTEMS_RFS_TRACE_ALL;
}
else
{
for (t = 0; t < (sizeof (table) / sizeof (const char*)); t++)
ffc145fc: 2f 85 00 26 cmpwi cr7,r5,38 <== NOT EXECUTED
ffc14600: 38 a5 00 01 addi r5,r5,1 <== NOT EXECUTED
ffc14604: 40 9e ff a4 bne+ cr7,ffc145a8 <rtems_rfs_trace_shell_command+0x15c><== NOT EXECUTED
ffc14608: 48 00 00 14 b ffc1461c <rtems_rfs_trace_shell_command+0x1d0><== NOT EXECUTED
else
{
if (strcmp (argv[arg], "set") == 0)
set = true;
if (strcmp (argv[arg], "clear") == 0)
set = false;
ffc1460c: 3b 20 00 00 li r25,0 <== NOT EXECUTED
ffc14610: 48 00 00 0c b ffc1461c <rtems_rfs_trace_shell_command+0x1d0><== NOT EXECUTED
else if (strcmp (argv[arg], "all") == 0)
{
if (set)
set_value = RTEMS_RFS_TRACE_ALL;
else
clear_value = RTEMS_RFS_TRACE_ALL;
ffc14614: 3b 80 ff ff li r28,-1 <== NOT EXECUTED
ffc14618: 3b a0 ff ff li r29,-1 <== NOT EXECUTED
break;
}
}
}
rtems_rfs_trace_flags |= set_value;
ffc1461c: 81 57 2a 90 lwz r10,10896(r23) <== NOT EXECUTED
rtems_rfs_trace_flags &= ~clear_value;
ffc14620: 39 37 2a 90 addi r9,r23,10896 <== NOT EXECUTED
rtems_rfs_trace_mask clear_value = 0;
bool set = true;
int arg;
int t;
for (arg = 1; arg < argc; arg++)
ffc14624: 3b 5a 00 01 addi r26,r26,1 <== NOT EXECUTED
break;
}
}
}
rtems_rfs_trace_flags |= set_value;
ffc14628: 7d 48 f3 78 or r8,r10,r30 <== NOT EXECUTED
ffc1462c: 81 49 00 04 lwz r10,4(r9) <== NOT EXECUTED
rtems_rfs_trace_flags &= ~clear_value;
ffc14630: 7d 08 e0 78 andc r8,r8,r28 <== NOT EXECUTED
break;
}
}
}
rtems_rfs_trace_flags |= set_value;
ffc14634: 7d 4a fb 78 or r10,r10,r31 <== NOT EXECUTED
rtems_rfs_trace_flags &= ~clear_value;
ffc14638: 91 17 2a 90 stw r8,10896(r23) <== NOT EXECUTED
ffc1463c: 7d 4a e8 78 andc r10,r10,r29 <== NOT EXECUTED
ffc14640: 91 49 00 04 stw r10,4(r9) <== NOT EXECUTED
rtems_rfs_trace_mask clear_value = 0;
bool set = true;
int arg;
int t;
for (arg = 1; arg < argc; arg++)
ffc14644: 7f 9a b0 00 cmpw cr7,r26,r22 <== NOT EXECUTED
ffc14648: 41 9c fe 68 blt+ cr7,ffc144b0 <rtems_rfs_trace_shell_command+0x64><== NOT EXECUTED
ffc1464c: 4b ff fe e8 b ffc14534 <rtems_rfs_trace_shell_command+0xe8><== NOT EXECUTED
rtems_rfs_trace_flags &= ~clear_value;
}
}
return 0;
}
ffc14650: 39 61 00 e8 addi r11,r1,232 <== NOT EXECUTED
ffc14654: 4b fe ce e8 b ffc0153c <_restgpr_19_x> <== NOT EXECUTED
ffc1fae0 <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)
{
ffc1fae0: 94 21 ff 88 stwu r1,-120(r1)
ffc1fae4: 7c 08 02 a6 mflr r0
ffc1fae8: bf 21 00 5c stmw r25,92(r1)
ffc1faec: 7c 7e 1b 78 mr r30,r3
ffc1faf0: 7c 9b 23 78 mr r27,r4
rtems_rfs_inode_handle target_inode;
uint16_t links;
bool dir;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
ffc1faf4: 38 60 00 00 li r3,0
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)
{
ffc1faf8: 90 01 00 7c stw r0,124(r1)
rtems_rfs_inode_handle target_inode;
uint16_t links;
bool dir;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
ffc1fafc: 3c 80 02 00 lis r4,512
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)
{
ffc1fb00: 7c bc 2b 78 mr r28,r5
ffc1fb04: 7c d9 33 78 mr r25,r6
ffc1fb08: 7c fa 3b 78 mr r26,r7
rtems_rfs_inode_handle target_inode;
uint16_t links;
bool dir;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
ffc1fb0c: 4b ff 48 bd bl ffc143c8 <rtems_rfs_trace>
ffc1fb10: 2f 83 00 00 cmpwi cr7,r3,0
ffc1fb14: 41 be 00 1c beq+ cr7,ffc1fb30 <rtems_rfs_unlink+0x50> <== ALWAYS TAKEN
printf ("rtems-rfs: unlink: parent(%" PRIu32 ") -X-> (%" PRIu32 ")\n", parent, target);
ffc1fb18: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1fb1c: 38 63 6f c0 addi r3,r3,28608 <== NOT EXECUTED
ffc1fb20: 7f 64 db 78 mr r4,r27 <== NOT EXECUTED
ffc1fb24: 7f 85 e3 78 mr r5,r28 <== NOT EXECUTED
ffc1fb28: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1fb2c: 48 00 3e 61 bl ffc2398c <printf> <== NOT EXECUTED
rc = rtems_rfs_inode_open (fs, target, &target_inode, true);
ffc1fb30: 7f c3 f3 78 mr r3,r30
ffc1fb34: 7f 84 e3 78 mr r4,r28
ffc1fb38: 38 a1 00 08 addi r5,r1,8
ffc1fb3c: 38 c0 00 01 li r6,1
ffc1fb40: 4b ff 2d 81 bl ffc128c0 <rtems_rfs_inode_open>
if (rc)
ffc1fb44: 7c 7f 1b 79 mr. r31,r3
ffc1fb48: 40 82 03 4c bne- ffc1fe94 <rtems_rfs_unlink+0x3b4> <== NEVER TAKEN
* @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);
ffc1fb4c: 81 21 00 14 lwz r9,20(r1)
ffc1fb50: 8b a9 00 02 lbz r29,2(r9)
/*
* If a directory process the unlink mode.
*/
dir = RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&target_inode));
ffc1fb54: 57 bd 44 26 rlwinm r29,r29,8,16,19
if (dir)
ffc1fb58: 6b bd 40 00 xori r29,r29,16384
ffc1fb5c: 7f bd 00 34 cntlzw r29,r29
ffc1fb60: 57 bd d9 7f rlwinm. r29,r29,27,5,31
ffc1fb64: 41 82 00 8c beq- ffc1fbf0 <rtems_rfs_unlink+0x110>
{
switch (dir_mode)
ffc1fb68: 2f 9a 00 00 cmpwi cr7,r26,0
ffc1fb6c: 41 9e 00 10 beq- cr7,ffc1fb7c <rtems_rfs_unlink+0x9c> <== NEVER TAKEN
ffc1fb70: 2f 9a 00 01 cmpwi cr7,r26,1
ffc1fb74: 40 be 00 7c bne+ cr7,ffc1fbf0 <rtems_rfs_unlink+0x110> <== NEVER TAKEN
ffc1fb78: 48 00 00 38 b ffc1fbb0 <rtems_rfs_unlink+0xd0>
{
case rtems_rfs_unlink_dir_denied:
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
ffc1fb7c: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc1fb80: 3c 80 02 00 lis r4,512 <== NOT EXECUTED
ffc1fb84: 4b ff 48 45 bl ffc143c8 <rtems_rfs_trace> <== NOT EXECUTED
ffc1fb88: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc1fb8c: 41 be 00 10 beq+ cr7,ffc1fb9c <rtems_rfs_unlink+0xbc> <== NOT EXECUTED
printf ("rtems-rfs: link is a directory\n");
ffc1fb90: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1fb94: 38 63 6f eb addi r3,r3,28651 <== NOT EXECUTED
ffc1fb98: 48 00 41 5d bl ffc23cf4 <puts> <== NOT EXECUTED
rtems_rfs_inode_close (fs, &target_inode);
ffc1fb9c: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc1fba0: 38 81 00 08 addi r4,r1,8 <== NOT EXECUTED
ffc1fba4: 4b ff 2f 11 bl ffc12ab4 <rtems_rfs_inode_close> <== NOT EXECUTED
return EISDIR;
ffc1fba8: 3b e0 00 15 li r31,21 <== NOT EXECUTED
ffc1fbac: 48 00 02 e8 b ffc1fe94 <rtems_rfs_unlink+0x3b4> <== NOT EXECUTED
case rtems_rfs_unlink_dir_if_empty:
rc = rtems_rfs_dir_empty (fs, &target_inode);
ffc1fbb0: 7f c3 f3 78 mr r3,r30
ffc1fbb4: 38 81 00 08 addi r4,r1,8
ffc1fbb8: 4b ff e3 f1 bl ffc1dfa8 <rtems_rfs_dir_empty>
if (rc > 0)
ffc1fbbc: 7c 7f 1b 79 mr. r31,r3
ffc1fbc0: 40 81 00 30 ble- ffc1fbf0 <rtems_rfs_unlink+0x110>
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
ffc1fbc4: 38 60 00 00 li r3,0
ffc1fbc8: 3c 80 02 00 lis r4,512
ffc1fbcc: 4b ff 47 fd bl ffc143c8 <rtems_rfs_trace>
ffc1fbd0: 2f 83 00 00 cmpwi cr7,r3,0
ffc1fbd4: 41 be 02 68 beq+ cr7,ffc1fe3c <rtems_rfs_unlink+0x35c> <== ALWAYS TAKEN
printf ("rtems-rfs: dir-empty: %d: %s\n", rc, strerror (rc));
ffc1fbd8: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc1fbdc: 48 00 4f 9d bl ffc24b78 <strerror> <== NOT EXECUTED
ffc1fbe0: 7c 65 1b 78 mr r5,r3 <== NOT EXECUTED
ffc1fbe4: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1fbe8: 38 63 70 0a addi r3,r3,28682 <== NOT EXECUTED
ffc1fbec: 48 00 02 44 b ffc1fe30 <rtems_rfs_unlink+0x350> <== NOT EXECUTED
default:
break;
}
}
rc = rtems_rfs_inode_open (fs, parent, &parent_inode, true);
ffc1fbf0: 7f c3 f3 78 mr r3,r30
ffc1fbf4: 7f 64 db 78 mr r4,r27
ffc1fbf8: 38 a1 00 30 addi r5,r1,48
ffc1fbfc: 38 c0 00 01 li r6,1
ffc1fc00: 4b ff 2c c1 bl ffc128c0 <rtems_rfs_inode_open>
if (rc)
ffc1fc04: 7c 7f 1b 79 mr. r31,r3
ffc1fc08: 41 82 00 30 beq- ffc1fc38 <rtems_rfs_unlink+0x158> <== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
ffc1fc0c: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc1fc10: 3c 80 02 00 lis r4,512 <== NOT EXECUTED
ffc1fc14: 4b ff 47 b5 bl ffc143c8 <rtems_rfs_trace> <== NOT EXECUTED
ffc1fc18: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc1fc1c: 41 be 02 20 beq+ cr7,ffc1fe3c <rtems_rfs_unlink+0x35c> <== NOT EXECUTED
printf ("rtems-rfs: link: inode-open failed: %d: %s\n",
ffc1fc20: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc1fc24: 48 00 4f 55 bl ffc24b78 <strerror> <== NOT EXECUTED
ffc1fc28: 7c 65 1b 78 mr r5,r3 <== NOT EXECUTED
ffc1fc2c: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1fc30: 38 63 70 28 addi r3,r3,28712 <== NOT EXECUTED
ffc1fc34: 48 00 01 fc b ffc1fe30 <rtems_rfs_unlink+0x350> <== 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);
ffc1fc38: 7f c3 f3 78 mr r3,r30
ffc1fc3c: 38 81 00 30 addi r4,r1,48
ffc1fc40: 7f 85 e3 78 mr r5,r28
ffc1fc44: 7f 26 cb 78 mr r6,r25
ffc1fc48: 4b ff db e9 bl ffc1d830 <rtems_rfs_dir_del_entry>
if (rc > 0)
ffc1fc4c: 7c 7f 1b 79 mr. r31,r3
ffc1fc50: 40 81 00 30 ble- ffc1fc80 <rtems_rfs_unlink+0x1a0> <== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
ffc1fc54: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc1fc58: 3c 80 02 00 lis r4,512 <== NOT EXECUTED
ffc1fc5c: 4b ff 47 6d bl ffc143c8 <rtems_rfs_trace> <== NOT EXECUTED
ffc1fc60: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc1fc64: 41 be 01 80 beq+ cr7,ffc1fde4 <rtems_rfs_unlink+0x304> <== NOT EXECUTED
printf ("rtems-rfs: unlink: dir-del failed: %d: %s\n",
ffc1fc68: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc1fc6c: 48 00 4f 0d bl ffc24b78 <strerror> <== NOT EXECUTED
ffc1fc70: 7c 65 1b 78 mr r5,r3 <== NOT EXECUTED
ffc1fc74: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1fc78: 38 63 70 54 addi r3,r3,28756 <== NOT EXECUTED
ffc1fc7c: 48 00 01 5c b ffc1fdd8 <rtems_rfs_unlink+0x2f8> <== 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);
ffc1fc80: 81 21 00 14 lwz r9,20(r1)
*/
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);
ffc1fc84: 8b e9 00 00 lbz r31,0(r9)
ffc1fc88: 89 29 00 01 lbz r9,1(r9)
ffc1fc8c: 57 ff 40 2e rlwinm r31,r31,8,0,23
ffc1fc90: 7f ff 4b 78 or r31,r31,r9
if (links == 0xffff)
ffc1fc94: 6f e9 ff ff xoris r9,r31,65535
ffc1fc98: 2f 89 ff ff cmpwi cr7,r9,-1
ffc1fc9c: 40 9e 00 08 bne- cr7,ffc1fca4 <rtems_rfs_unlink+0x1c4> <== ALWAYS TAKEN
links = 0;
ffc1fca0: 3b e0 00 00 li r31,0 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
ffc1fca4: 38 60 00 00 li r3,0
ffc1fca8: 3c 80 02 00 lis r4,512
ffc1fcac: 4b ff 47 1d bl ffc143c8 <rtems_rfs_trace>
ffc1fcb0: 2f 83 00 00 cmpwi cr7,r3,0
ffc1fcb4: 41 be 00 1c beq+ cr7,ffc1fcd0 <rtems_rfs_unlink+0x1f0> <== ALWAYS TAKEN
printf ("rtems-rfs: unlink: target:%" PRIu32 " links:%u\n", target, links);
ffc1fcb8: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1fcbc: 38 63 70 7f addi r3,r3,28799 <== NOT EXECUTED
ffc1fcc0: 7f 84 e3 78 mr r4,r28 <== NOT EXECUTED
ffc1fcc4: 7f e5 fb 78 mr r5,r31 <== NOT EXECUTED
ffc1fcc8: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1fccc: 48 00 3c c1 bl ffc2398c <printf> <== NOT EXECUTED
if (links > 1)
ffc1fcd0: 2b 9f 00 01 cmplwi cr7,r31,1
ffc1fcd4: 40 9d 00 2c ble- cr7,ffc1fd00 <rtems_rfs_unlink+0x220>
{
links--;
ffc1fcd8: 3b ff ff ff addi r31,r31,-1
* @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);
ffc1fcdc: 81 21 00 14 lwz r9,20(r1)
ffc1fce0: 57 ff 04 3e clrlwi r31,r31,16
ffc1fce4: 57 ea c2 3e rlwinm r10,r31,24,8,31
ffc1fce8: 99 49 00 00 stb r10,0(r9)
ffc1fcec: 81 21 00 14 lwz r9,20(r1)
ffc1fcf0: 9b e9 00 01 stb r31,1(r9)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
ffc1fcf4: 39 20 00 01 li r9,1
ffc1fcf8: 99 21 00 18 stb r9,24(r1)
ffc1fcfc: 48 00 00 9c b ffc1fd98 <rtems_rfs_unlink+0x2b8>
else
{
/*
* Erasing the inode releases all blocks attached to it.
*/
rc = rtems_rfs_inode_delete (fs, &target_inode);
ffc1fd00: 7f c3 f3 78 mr r3,r30
ffc1fd04: 38 81 00 08 addi r4,r1,8
ffc1fd08: 4b ff 2e 51 bl ffc12b58 <rtems_rfs_inode_delete>
if (rc > 0)
ffc1fd0c: 7c 7f 1b 79 mr. r31,r3
ffc1fd10: 40 81 00 30 ble- ffc1fd40 <rtems_rfs_unlink+0x260> <== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
ffc1fd14: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc1fd18: 3c 80 02 00 lis r4,512 <== NOT EXECUTED
ffc1fd1c: 4b ff 46 ad bl ffc143c8 <rtems_rfs_trace> <== NOT EXECUTED
ffc1fd20: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc1fd24: 41 be 00 c0 beq+ cr7,ffc1fde4 <rtems_rfs_unlink+0x304> <== NOT EXECUTED
printf ("rtems-rfs: unlink: inode-del failed: %d: %s\n",
ffc1fd28: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc1fd2c: 48 00 4e 4d bl ffc24b78 <strerror> <== NOT EXECUTED
ffc1fd30: 7c 65 1b 78 mr r5,r3 <== NOT EXECUTED
ffc1fd34: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1fd38: 38 63 70 a7 addi r3,r3,28839 <== NOT EXECUTED
ffc1fd3c: 48 00 00 9c b ffc1fdd8 <rtems_rfs_unlink+0x2f8> <== NOT EXECUTED
rtems_rfs_inode_close (fs, &parent_inode);
rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
if (dir)
ffc1fd40: 2f 9d 00 00 cmpwi cr7,r29,0
ffc1fd44: 41 9e 00 54 beq- cr7,ffc1fd98 <rtems_rfs_unlink+0x2b8>
{
links = rtems_rfs_inode_get_links (&parent_inode);
ffc1fd48: 81 41 00 3c lwz r10,60(r1)
*/
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);
ffc1fd4c: 89 2a 00 00 lbz r9,0(r10)
ffc1fd50: 89 0a 00 01 lbz r8,1(r10)
ffc1fd54: 55 29 40 2e rlwinm r9,r9,8,0,23
ffc1fd58: 7d 29 43 78 or r9,r9,r8
if (links == 0xffff)
ffc1fd5c: 6d 28 ff ff xoris r8,r9,65535
ffc1fd60: 2f 88 ff ff cmpwi cr7,r8,-1
ffc1fd64: 41 9e 00 18 beq- cr7,ffc1fd7c <rtems_rfs_unlink+0x29c> <== NEVER TAKEN
if (links > 1)
ffc1fd68: 2b 89 00 01 cmplwi cr7,r9,1
ffc1fd6c: 40 9d 00 14 ble- cr7,ffc1fd80 <rtems_rfs_unlink+0x2a0>
links--;
ffc1fd70: 39 29 ff ff addi r9,r9,-1
ffc1fd74: 55 29 04 3e clrlwi r9,r9,16
ffc1fd78: 48 00 00 08 b ffc1fd80 <rtems_rfs_unlink+0x2a0>
links = 0;
ffc1fd7c: 39 20 00 00 li r9,0 <== NOT EXECUTED
* @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);
ffc1fd80: 55 28 c2 3e rlwinm r8,r9,24,8,31
ffc1fd84: 99 0a 00 00 stb r8,0(r10)
ffc1fd88: 81 41 00 3c lwz r10,60(r1)
ffc1fd8c: 99 2a 00 01 stb r9,1(r10)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
ffc1fd90: 39 20 00 01 li r9,1
ffc1fd94: 99 21 00 40 stb r9,64(r1)
rtems_rfs_inode_set_links (&parent_inode, links);
}
}
rc = rtems_rfs_inode_time_stamp_now (&parent_inode, true, true);
ffc1fd98: 38 61 00 30 addi r3,r1,48
ffc1fd9c: 38 80 00 01 li r4,1
ffc1fda0: 38 a0 00 01 li r5,1
ffc1fda4: 4b ff 2e a1 bl ffc12c44 <rtems_rfs_inode_time_stamp_now>
if (rc > 0)
ffc1fda8: 7c 7f 1b 79 mr. r31,r3
ffc1fdac: 40 81 00 48 ble- ffc1fdf4 <rtems_rfs_unlink+0x314> <== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
ffc1fdb0: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc1fdb4: 3c 80 02 00 lis r4,512 <== NOT EXECUTED
ffc1fdb8: 4b ff 46 11 bl ffc143c8 <rtems_rfs_trace> <== NOT EXECUTED
ffc1fdbc: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc1fdc0: 41 be 00 24 beq+ cr7,ffc1fde4 <rtems_rfs_unlink+0x304> <== NOT EXECUTED
printf ("rtems-rfs: link: inode-time-stamp failed: %d: %s\n",
ffc1fdc4: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc1fdc8: 48 00 4d b1 bl ffc24b78 <strerror> <== NOT EXECUTED
ffc1fdcc: 7c 65 1b 78 mr r5,r3 <== NOT EXECUTED
ffc1fdd0: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1fdd4: 38 63 70 d4 addi r3,r3,28884 <== NOT EXECUTED
ffc1fdd8: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED
ffc1fddc: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1fde0: 48 00 3b ad bl ffc2398c <printf> <== NOT EXECUTED
rc, strerror (rc));
rtems_rfs_inode_close (fs, &parent_inode);
ffc1fde4: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc1fde8: 38 81 00 30 addi r4,r1,48 <== NOT EXECUTED
ffc1fdec: 4b ff 2c c9 bl ffc12ab4 <rtems_rfs_inode_close> <== NOT EXECUTED
ffc1fdf0: 48 00 00 4c b ffc1fe3c <rtems_rfs_unlink+0x35c> <== NOT EXECUTED
rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
rc = rtems_rfs_inode_close (fs, &parent_inode);
ffc1fdf4: 7f c3 f3 78 mr r3,r30
ffc1fdf8: 38 81 00 30 addi r4,r1,48
ffc1fdfc: 4b ff 2c b9 bl ffc12ab4 <rtems_rfs_inode_close>
if (rc > 0)
ffc1fe00: 7c 7f 1b 79 mr. r31,r3
ffc1fe04: 40 81 00 48 ble- ffc1fe4c <rtems_rfs_unlink+0x36c> <== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
ffc1fe08: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc1fe0c: 3c 80 02 00 lis r4,512 <== NOT EXECUTED
ffc1fe10: 4b ff 45 b9 bl ffc143c8 <rtems_rfs_trace> <== NOT EXECUTED
ffc1fe14: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc1fe18: 41 be 00 24 beq+ cr7,ffc1fe3c <rtems_rfs_unlink+0x35c> <== NOT EXECUTED
printf ("rtems-rfs: link: parent inode-close failed: %d: %s\n",
ffc1fe1c: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc1fe20: 48 00 4d 59 bl ffc24b78 <strerror> <== NOT EXECUTED
ffc1fe24: 7c 65 1b 78 mr r5,r3 <== NOT EXECUTED
ffc1fe28: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1fe2c: 38 63 71 06 addi r3,r3,28934 <== NOT EXECUTED
ffc1fe30: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED
ffc1fe34: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1fe38: 48 00 3b 55 bl ffc2398c <printf> <== NOT EXECUTED
rc, strerror (rc));
rtems_rfs_inode_close (fs, &target_inode);
ffc1fe3c: 7f c3 f3 78 mr r3,r30
ffc1fe40: 38 81 00 08 addi r4,r1,8
ffc1fe44: 4b ff 2c 71 bl ffc12ab4 <rtems_rfs_inode_close>
ffc1fe48: 48 00 00 4c b ffc1fe94 <rtems_rfs_unlink+0x3b4>
return rc;
}
rc = rtems_rfs_inode_close (fs, &target_inode);
ffc1fe4c: 7f c3 f3 78 mr r3,r30
ffc1fe50: 38 81 00 08 addi r4,r1,8
ffc1fe54: 4b ff 2c 61 bl ffc12ab4 <rtems_rfs_inode_close>
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
ffc1fe58: 7c 7f 1b 79 mr. r31,r3
ffc1fe5c: 40 81 00 38 ble- ffc1fe94 <rtems_rfs_unlink+0x3b4> <== ALWAYS TAKEN
ffc1fe60: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc1fe64: 3c 80 02 00 lis r4,512 <== NOT EXECUTED
ffc1fe68: 4b ff 45 61 bl ffc143c8 <rtems_rfs_trace> <== NOT EXECUTED
ffc1fe6c: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc1fe70: 41 be 00 24 beq+ cr7,ffc1fe94 <rtems_rfs_unlink+0x3b4> <== NOT EXECUTED
printf ("rtems-rfs: link: target inode-close failed: %d: %s\n",
ffc1fe74: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc1fe78: 48 00 4d 01 bl ffc24b78 <strerror> <== NOT EXECUTED
ffc1fe7c: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED
ffc1fe80: 7c 65 1b 78 mr r5,r3 <== NOT EXECUTED
ffc1fe84: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED
ffc1fe88: 38 63 71 3a addi r3,r3,28986 <== NOT EXECUTED
ffc1fe8c: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc1fe90: 48 00 3a fd bl ffc2398c <printf> <== NOT EXECUTED
rc, strerror (rc));
return rc;
}
ffc1fe94: 39 61 00 78 addi r11,r1,120
ffc1fe98: 7f e3 fb 78 mr r3,r31
ffc1fe9c: 4b fe 16 b8 b ffc01554 <_restgpr_25_x>
ffc21b98 <rtems_shell_rfs_format>:
int
rtems_shell_rfs_format (int argc, char* argv[])
{
ffc21b98: 94 21 ff c0 stwu r1,-64(r1) <== NOT EXECUTED
ffc21b9c: 7c 08 02 a6 mflr r0 <== NOT EXECUTED
rtems_rfs_format_config config;
const char* driver = NULL;
int arg;
memset (&config, 0, sizeof (rtems_rfs_format_config));
ffc21ba0: 38 a0 00 18 li r5,24 <== NOT EXECUTED
return 1;
}
int
rtems_shell_rfs_format (int argc, char* argv[])
{
ffc21ba4: bf 61 00 2c stmw r27,44(r1) <== NOT EXECUTED
ffc21ba8: 7c 7d 1b 78 mr r29,r3 <== NOT EXECUTED
ffc21bac: 7c 9c 23 78 mr r28,r4 <== NOT EXECUTED
rtems_rfs_format_config config;
const char* driver = NULL;
int arg;
memset (&config, 0, sizeof (rtems_rfs_format_config));
ffc21bb0: 38 61 00 08 addi r3,r1,8 <== NOT EXECUTED
return 1;
}
int
rtems_shell_rfs_format (int argc, char* argv[])
{
ffc21bb4: 90 01 00 44 stw r0,68(r1) <== NOT EXECUTED
rtems_rfs_format_config config;
const char* driver = NULL;
int arg;
memset (&config, 0, sizeof (rtems_rfs_format_config));
ffc21bb8: 38 80 00 00 li r4,0 <== NOT EXECUTED
ffc21bbc: 48 01 a8 3d bl ffc3c3f8 <memset> <== NOT EXECUTED
for (arg = 1; arg < argc; arg++)
ffc21bc0: 3b e0 00 01 li r31,1 <== NOT EXECUTED
int
rtems_shell_rfs_format (int argc, char* argv[])
{
rtems_rfs_format_config config;
const char* driver = NULL;
ffc21bc4: 3b c0 00 00 li r30,0 <== NOT EXECUTED
if (argv[arg][0] == '-')
{
switch (argv[arg][1])
{
case 'v':
config.verbose = true;
ffc21bc8: 3b 60 00 01 li r27,1 <== NOT EXECUTED
const char* driver = NULL;
int arg;
memset (&config, 0, sizeof (rtems_rfs_format_config));
for (arg = 1; arg < argc; arg++)
ffc21bcc: 48 00 01 6c b ffc21d38 <rtems_shell_rfs_format+0x1a0><== NOT EXECUTED
{
if (argv[arg][0] == '-')
ffc21bd0: 57 e9 10 3a rlwinm r9,r31,2,0,29 <== NOT EXECUTED
ffc21bd4: 7c 9c 48 2e lwzx r4,r28,r9 <== NOT EXECUTED
ffc21bd8: 89 24 00 00 lbz r9,0(r4) <== NOT EXECUTED
ffc21bdc: 2f 89 00 2d cmpwi cr7,r9,45 <== NOT EXECUTED
ffc21be0: 40 be 01 34 bne+ cr7,ffc21d14 <rtems_shell_rfs_format+0x17c><== NOT EXECUTED
{
switch (argv[arg][1])
ffc21be4: 89 24 00 01 lbz r9,1(r4) <== NOT EXECUTED
ffc21be8: 2f 89 00 69 cmpwi cr7,r9,105 <== NOT EXECUTED
ffc21bec: 41 9e 00 ac beq- cr7,ffc21c98 <rtems_shell_rfs_format+0x100><== NOT EXECUTED
ffc21bf0: 2b 89 00 69 cmplwi cr7,r9,105 <== NOT EXECUTED
ffc21bf4: 41 9d 00 18 bgt- cr7,ffc21c0c <rtems_shell_rfs_format+0x74><== NOT EXECUTED
ffc21bf8: 2f 89 00 49 cmpwi cr7,r9,73 <== NOT EXECUTED
ffc21bfc: 41 9e 00 d0 beq- cr7,ffc21ccc <rtems_shell_rfs_format+0x134><== NOT EXECUTED
ffc21c00: 2f 89 00 62 cmpwi cr7,r9,98 <== NOT EXECUTED
ffc21c04: 40 be 01 04 bne+ cr7,ffc21d08 <rtems_shell_rfs_format+0x170><== NOT EXECUTED
ffc21c08: 48 00 00 5c b ffc21c64 <rtems_shell_rfs_format+0xcc> <== NOT EXECUTED
ffc21c0c: 2f 89 00 73 cmpwi cr7,r9,115 <== NOT EXECUTED
ffc21c10: 41 9e 00 20 beq- cr7,ffc21c30 <rtems_shell_rfs_format+0x98><== NOT EXECUTED
ffc21c14: 2f 89 00 76 cmpwi cr7,r9,118 <== NOT EXECUTED
ffc21c18: 41 9e 00 10 beq- cr7,ffc21c28 <rtems_shell_rfs_format+0x90><== NOT EXECUTED
ffc21c1c: 2f 89 00 6f cmpwi cr7,r9,111 <== NOT EXECUTED
ffc21c20: 40 be 00 e8 bne+ cr7,ffc21d08 <rtems_shell_rfs_format+0x170><== NOT EXECUTED
ffc21c24: 48 00 00 b0 b ffc21cd4 <rtems_shell_rfs_format+0x13c><== NOT EXECUTED
{
case 'v':
config.verbose = true;
ffc21c28: 9b 61 00 1d stb r27,29(r1) <== NOT EXECUTED
break;
ffc21c2c: 48 00 01 08 b ffc21d34 <rtems_shell_rfs_format+0x19c><== NOT EXECUTED
case 's':
arg++;
ffc21c30: 3b ff 00 01 addi r31,r31,1 <== NOT EXECUTED
if (arg >= argc)
ffc21c34: 7f 9f e8 00 cmpw cr7,r31,r29 <== NOT EXECUTED
ffc21c38: 41 bc 00 10 blt+ cr7,ffc21c48 <rtems_shell_rfs_format+0xb0><== NOT EXECUTED
{
printf ("error: block size needs an argument\n");
ffc21c3c: 3c 60 ff c6 lis r3,-58 <== NOT EXECUTED
ffc21c40: 38 63 a5 05 addi r3,r3,-23291 <== NOT EXECUTED
ffc21c44: 48 00 01 0c b ffc21d50 <rtems_shell_rfs_format+0x1b8><== NOT EXECUTED
return 1;
}
config.block_size = strtoul (argv[arg], 0, 0);
ffc21c48: 57 e9 10 3a rlwinm r9,r31,2,0,29 <== NOT EXECUTED
ffc21c4c: 7c 7c 48 2e lwzx r3,r28,r9 <== NOT EXECUTED
ffc21c50: 38 80 00 00 li r4,0 <== NOT EXECUTED
ffc21c54: 38 a0 00 00 li r5,0 <== NOT EXECUTED
ffc21c58: 48 02 00 b1 bl ffc41d08 <strtoul> <== NOT EXECUTED
ffc21c5c: 90 61 00 08 stw r3,8(r1) <== NOT EXECUTED
break;
ffc21c60: 48 00 00 d4 b ffc21d34 <rtems_shell_rfs_format+0x19c><== NOT EXECUTED
case 'b':
arg++;
ffc21c64: 3b ff 00 01 addi r31,r31,1 <== NOT EXECUTED
if (arg >= argc)
ffc21c68: 7f 9f e8 00 cmpw cr7,r31,r29 <== NOT EXECUTED
ffc21c6c: 41 bc 00 10 blt+ cr7,ffc21c7c <rtems_shell_rfs_format+0xe4><== NOT EXECUTED
{
printf ("error: group block count needs an argument\n");
ffc21c70: 3c 60 ff c6 lis r3,-58 <== NOT EXECUTED
ffc21c74: 38 63 a5 29 addi r3,r3,-23255 <== NOT EXECUTED
ffc21c78: 48 00 00 d8 b ffc21d50 <rtems_shell_rfs_format+0x1b8><== NOT EXECUTED
return 1;
}
config.group_blocks = strtoul (argv[arg], 0, 0);
ffc21c7c: 57 e9 10 3a rlwinm r9,r31,2,0,29 <== NOT EXECUTED
ffc21c80: 7c 7c 48 2e lwzx r3,r28,r9 <== NOT EXECUTED
ffc21c84: 38 80 00 00 li r4,0 <== NOT EXECUTED
ffc21c88: 38 a0 00 00 li r5,0 <== NOT EXECUTED
ffc21c8c: 48 02 00 7d bl ffc41d08 <strtoul> <== NOT EXECUTED
ffc21c90: 90 61 00 0c stw r3,12(r1) <== NOT EXECUTED
break;
ffc21c94: 48 00 00 a0 b ffc21d34 <rtems_shell_rfs_format+0x19c><== NOT EXECUTED
case 'i':
arg++;
ffc21c98: 3b ff 00 01 addi r31,r31,1 <== NOT EXECUTED
if (arg >= argc)
ffc21c9c: 7f 9f e8 00 cmpw cr7,r31,r29 <== NOT EXECUTED
ffc21ca0: 41 bc 00 10 blt+ cr7,ffc21cb0 <rtems_shell_rfs_format+0x118><== NOT EXECUTED
{
printf ("error: group inode count needs an argument\n");
ffc21ca4: 3c 60 ff c6 lis r3,-58 <== NOT EXECUTED
ffc21ca8: 38 63 a5 54 addi r3,r3,-23212 <== NOT EXECUTED
ffc21cac: 48 00 00 a4 b ffc21d50 <rtems_shell_rfs_format+0x1b8><== NOT EXECUTED
return 1;
}
config.group_inodes = strtoul (argv[arg], 0, 0);
ffc21cb0: 57 e9 10 3a rlwinm r9,r31,2,0,29 <== NOT EXECUTED
ffc21cb4: 7c 7c 48 2e lwzx r3,r28,r9 <== NOT EXECUTED
ffc21cb8: 38 80 00 00 li r4,0 <== NOT EXECUTED
ffc21cbc: 38 a0 00 00 li r5,0 <== NOT EXECUTED
ffc21cc0: 48 02 00 49 bl ffc41d08 <strtoul> <== NOT EXECUTED
ffc21cc4: 90 61 00 10 stw r3,16(r1) <== NOT EXECUTED
break;
ffc21cc8: 48 00 00 6c b ffc21d34 <rtems_shell_rfs_format+0x19c><== NOT EXECUTED
case 'I':
config.initialise_inodes = true;
ffc21ccc: 9b 61 00 1c stb r27,28(r1) <== NOT EXECUTED
break;
ffc21cd0: 48 00 00 64 b ffc21d34 <rtems_shell_rfs_format+0x19c><== NOT EXECUTED
case 'o':
arg++;
ffc21cd4: 3b ff 00 01 addi r31,r31,1 <== NOT EXECUTED
if (arg >= argc)
ffc21cd8: 7f 9f e8 00 cmpw cr7,r31,r29 <== NOT EXECUTED
ffc21cdc: 41 bc 00 10 blt+ cr7,ffc21cec <rtems_shell_rfs_format+0x154><== NOT EXECUTED
{
printf ("error: inode percentage overhead needs an argument\n");
ffc21ce0: 3c 60 ff c6 lis r3,-58 <== NOT EXECUTED
ffc21ce4: 38 63 a5 7f addi r3,r3,-23169 <== NOT EXECUTED
ffc21ce8: 48 00 00 68 b ffc21d50 <rtems_shell_rfs_format+0x1b8><== NOT EXECUTED
return 1;
}
config.inode_overhead = strtoul (argv[arg], 0, 0);
ffc21cec: 57 e9 10 3a rlwinm r9,r31,2,0,29 <== NOT EXECUTED
ffc21cf0: 7c 7c 48 2e lwzx r3,r28,r9 <== NOT EXECUTED
ffc21cf4: 38 80 00 00 li r4,0 <== NOT EXECUTED
ffc21cf8: 38 a0 00 00 li r5,0 <== NOT EXECUTED
ffc21cfc: 48 02 00 0d bl ffc41d08 <strtoul> <== NOT EXECUTED
ffc21d00: 90 61 00 14 stw r3,20(r1) <== NOT EXECUTED
break;
ffc21d04: 48 00 00 30 b ffc21d34 <rtems_shell_rfs_format+0x19c><== NOT EXECUTED
default:
printf ("error: invalid option: %s\n", argv[arg]);
ffc21d08: 3c 60 ff c6 lis r3,-58 <== NOT EXECUTED
ffc21d0c: 38 63 8b 23 addi r3,r3,-29917 <== NOT EXECUTED
ffc21d10: 48 00 00 14 b ffc21d24 <rtems_shell_rfs_format+0x18c><== NOT EXECUTED
return 1;
}
}
else
{
if (!driver)
ffc21d14: 2f 9e 00 00 cmpwi cr7,r30,0 <== NOT EXECUTED
ffc21d18: 41 be 00 18 beq+ cr7,ffc21d30 <rtems_shell_rfs_format+0x198><== NOT EXECUTED
driver = argv[arg];
else
{
printf ("error: only one driver name allowed: %s\n", argv[arg]);
ffc21d1c: 3c 60 ff c6 lis r3,-58 <== NOT EXECUTED
ffc21d20: 38 63 a5 b2 addi r3,r3,-23118 <== NOT EXECUTED
ffc21d24: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc21d28: 48 01 ba ad bl ffc3d7d4 <printf> <== NOT EXECUTED
ffc21d2c: 48 00 00 68 b ffc21d94 <rtems_shell_rfs_format+0x1fc><== NOT EXECUTED
return 1;
}
}
else
{
if (!driver)
ffc21d30: 7c 9e 23 78 mr r30,r4 <== NOT EXECUTED
const char* driver = NULL;
int arg;
memset (&config, 0, sizeof (rtems_rfs_format_config));
for (arg = 1; arg < argc; arg++)
ffc21d34: 3b ff 00 01 addi r31,r31,1 <== NOT EXECUTED
ffc21d38: 7f 9f e8 00 cmpw cr7,r31,r29 <== NOT EXECUTED
ffc21d3c: 41 9c fe 94 blt+ cr7,ffc21bd0 <rtems_shell_rfs_format+0x38><== NOT EXECUTED
return 1;
}
}
}
if (!driver) {
ffc21d40: 2f 9e 00 00 cmpwi cr7,r30,0 <== NOT EXECUTED
ffc21d44: 40 be 00 14 bne+ cr7,ffc21d58 <rtems_shell_rfs_format+0x1c0><== NOT EXECUTED
printf ("error: no driver name provided\n");
ffc21d48: 3c 60 ff c6 lis r3,-58 <== NOT EXECUTED
ffc21d4c: 38 63 a5 db addi r3,r3,-23077 <== NOT EXECUTED
ffc21d50: 48 01 bd ed bl ffc3db3c <puts> <== NOT EXECUTED
ffc21d54: 48 00 00 40 b ffc21d94 <rtems_shell_rfs_format+0x1fc><== NOT EXECUTED
return 1;
}
if (rtems_rfs_format (driver, &config) < 0)
ffc21d58: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc21d5c: 38 81 00 08 addi r4,r1,8 <== NOT EXECUTED
ffc21d60: 48 00 d9 91 bl ffc2f6f0 <rtems_rfs_format> <== NOT EXECUTED
printf ("error: format of %s failed: %s\n",
driver, strerror (errno));
return 1;
}
return 0;
ffc21d64: 39 20 00 00 li r9,0 <== NOT EXECUTED
if (!driver) {
printf ("error: no driver name provided\n");
return 1;
}
if (rtems_rfs_format (driver, &config) < 0)
ffc21d68: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc21d6c: 40 bc 00 2c bge+ cr7,ffc21d98 <rtems_shell_rfs_format+0x200><== NOT EXECUTED
{
printf ("error: format of %s failed: %s\n",
driver, strerror (errno));
ffc21d70: 48 01 66 99 bl ffc38408 <__errno> <== NOT EXECUTED
return 1;
}
if (rtems_rfs_format (driver, &config) < 0)
{
printf ("error: format of %s failed: %s\n",
ffc21d74: 80 63 00 00 lwz r3,0(r3) <== NOT EXECUTED
ffc21d78: 48 01 e6 05 bl ffc4037c <strerror> <== NOT EXECUTED
ffc21d7c: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED
ffc21d80: 7c 65 1b 78 mr r5,r3 <== NOT EXECUTED
ffc21d84: 3c 60 ff c6 lis r3,-58 <== NOT EXECUTED
ffc21d88: 38 63 a5 fa addi r3,r3,-23046 <== NOT EXECUTED
ffc21d8c: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc21d90: 48 01 ba 45 bl ffc3d7d4 <printf> <== NOT EXECUTED
driver, strerror (errno));
return 1;
ffc21d94: 39 20 00 01 li r9,1 <== NOT EXECUTED
}
return 0;
}
ffc21d98: 39 61 00 40 addi r11,r1,64 <== NOT EXECUTED
ffc21d9c: 7d 23 4b 78 mr r3,r9 <== NOT EXECUTED
ffc21da0: 48 03 27 5c b ffc544fc <_restgpr_27_x> <== NOT EXECUTED
ffc189f4 <rtems_signal_send>:
rtems_status_code rtems_signal_send(
rtems_id id,
rtems_signal_set signal_set
)
{
ffc189f4: 7c 2b 0b 78 mr r11,r1
ffc189f8: 94 21 ff e0 stwu r1,-32(r1)
ffc189fc: 7c 08 02 a6 mflr r0
ffc18a00: 48 01 6a 11 bl ffc2f410 <_savegpr_31>
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
ffc18a04: 7c 9f 23 79 mr. r31,r4
rtems_status_code rtems_signal_send(
rtems_id id,
rtems_signal_set signal_set
)
{
ffc18a08: 90 01 00 24 stw r0,36(r1)
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
ffc18a0c: 41 a2 00 a8 beq+ ffc18ab4 <rtems_signal_send+0xc0>
return RTEMS_INVALID_NUMBER;
the_thread = _Thread_Get( id, &location );
ffc18a10: 38 81 00 08 addi r4,r1,8
ffc18a14: 48 00 4d 55 bl ffc1d768 <_Thread_Get>
switch ( location ) {
ffc18a18: 81 21 00 08 lwz r9,8(r1)
ffc18a1c: 2f 89 00 00 cmpwi cr7,r9,0
ffc18a20: 40 9e 00 9c bne- cr7,ffc18abc <rtems_signal_send+0xc8>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
ffc18a24: 81 23 01 4c lwz r9,332(r3)
asr = &api->Signal;
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
ffc18a28: 81 49 00 0c lwz r10,12(r9)
ffc18a2c: 2f 8a 00 00 cmpwi cr7,r10,0
ffc18a30: 41 9e 00 78 beq- cr7,ffc18aa8 <rtems_signal_send+0xb4>
if ( asr->is_enabled ) {
ffc18a34: 89 49 00 08 lbz r10,8(r9)
ffc18a38: 2f 8a 00 00 cmpwi cr7,r10,0
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc18a3c: 7d 00 00 a6 mfmsr r8
ffc18a40: 7d 50 42 a6 mfsprg r10,0
ffc18a44: 7d 0a 50 78 andc r10,r8,r10
ffc18a48: 7d 40 01 24 mtmsr r10
ffc18a4c: 41 9e 00 40 beq- cr7,ffc18a8c <rtems_signal_send+0x98>
)
{
ISR_Level _level;
_ISR_Disable( _level );
*signal_set |= signals;
ffc18a50: 81 49 00 14 lwz r10,20(r9)
ffc18a54: 7d 5f fb 78 or r31,r10,r31
ffc18a58: 93 e9 00 14 stw r31,20(r9)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc18a5c: 7d 00 01 24 mtmsr r8
_ASR_Post_signals( signal_set, &asr->signals_posted );
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
ffc18a60: 3d 20 00 00 lis r9,0
ffc18a64: 39 29 75 c0 addi r9,r9,30144
ffc18a68: 81 49 00 08 lwz r10,8(r9)
ffc18a6c: 2f 8a 00 00 cmpwi cr7,r10,0
ffc18a70: 41 9e 00 2c beq- cr7,ffc18a9c <rtems_signal_send+0xa8>
ffc18a74: 81 49 00 10 lwz r10,16(r9)
ffc18a78: 7f 83 50 00 cmpw cr7,r3,r10
ffc18a7c: 40 be 00 20 bne+ cr7,ffc18a9c <rtems_signal_send+0xa8> <== NEVER TAKEN
_Thread_Dispatch_necessary = true;
ffc18a80: 39 40 00 01 li r10,1
ffc18a84: 99 49 00 0c stb r10,12(r9)
ffc18a88: 48 00 00 14 b ffc18a9c <rtems_signal_send+0xa8>
ffc18a8c: 81 49 00 18 lwz r10,24(r9)
ffc18a90: 7d 5f fb 78 or r31,r10,r31
ffc18a94: 93 e9 00 18 stw r31,24(r9)
ffc18a98: 7d 00 01 24 mtmsr r8
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
ffc18a9c: 48 00 4c b1 bl ffc1d74c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
ffc18aa0: 38 60 00 00 li r3,0
ffc18aa4: 48 00 00 1c b ffc18ac0 <rtems_signal_send+0xcc>
}
_Thread_Enable_dispatch();
ffc18aa8: 48 00 4c a5 bl ffc1d74c <_Thread_Enable_dispatch>
return RTEMS_NOT_DEFINED;
ffc18aac: 38 60 00 0b li r3,11
ffc18ab0: 48 00 00 10 b ffc18ac0 <rtems_signal_send+0xcc>
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
return RTEMS_INVALID_NUMBER;
ffc18ab4: 38 60 00 0a li r3,10
ffc18ab8: 48 00 00 08 b ffc18ac0 <rtems_signal_send+0xcc>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
ffc18abc: 38 60 00 04 li r3,4
}
ffc18ac0: 39 61 00 20 addi r11,r1,32
ffc18ac4: 4b ff 58 f8 b ffc0e3bc <_restgpr_31_x>
ffc0f8e4 <rtems_sparse_disk_create_and_register>:
const char *device_file_name,
uint32_t media_block_size,
rtems_blkdev_bnum blocks_with_buffer,
rtems_blkdev_bnum media_block_count,
uint8_t fill_pattern )
{
ffc0f8e4: 94 21 ff e0 stwu r1,-32(r1)
ffc0f8e8: 7c 08 02 a6 mflr r0
ffc0f8ec: bf 61 00 0c stmw r27,12(r1)
ffc0f8f0: 7c 7b 1b 78 mr r27,r3
ffc0f8f4: 38 64 00 08 addi r3,r4,8
const rtems_blkdev_bnum blocks_with_buffer )
{
size_t const key_table_size = blocks_with_buffer
* sizeof( rtems_sparse_disk_key );
size_t const data_size = blocks_with_buffer * media_block_size;
size_t const alloc_size = sizeof( rtems_sparse_disk )
ffc0f8f8: 7c 63 29 d6 mullw r3,r3,r5
const char *device_file_name,
uint32_t media_block_size,
rtems_blkdev_bnum blocks_with_buffer,
rtems_blkdev_bnum media_block_count,
uint8_t fill_pattern )
{
ffc0f8fc: 90 01 00 24 stw r0,36(r1)
ffc0f900: 7c 9e 23 78 mr r30,r4
* sizeof( rtems_sparse_disk_key );
size_t const data_size = blocks_with_buffer * media_block_size;
size_t const alloc_size = sizeof( rtems_sparse_disk )
+ key_table_size + data_size;
rtems_sparse_disk *const sd = (rtems_sparse_disk *) malloc(
ffc0f904: 38 63 00 1c addi r3,r3,28
const char *device_file_name,
uint32_t media_block_size,
rtems_blkdev_bnum blocks_with_buffer,
rtems_blkdev_bnum media_block_count,
uint8_t fill_pattern )
{
ffc0f908: 7c bf 2b 78 mr r31,r5
ffc0f90c: 7c dc 33 78 mr r28,r6
ffc0f910: 7c fd 3b 78 mr r29,r7
* sizeof( rtems_sparse_disk_key );
size_t const data_size = blocks_with_buffer * media_block_size;
size_t const alloc_size = sizeof( rtems_sparse_disk )
+ key_table_size + data_size;
rtems_sparse_disk *const sd = (rtems_sparse_disk *) malloc(
ffc0f914: 4b ff 69 79 bl ffc0628c <malloc>
rtems_sparse_disk *sparse_disk = sparse_disk_allocate(
media_block_size,
blocks_with_buffer
);
if ( sparse_disk != NULL ) {
ffc0f918: 7c 64 1b 79 mr. r4,r3
ffc0f91c: 41 82 00 34 beq- ffc0f950 <rtems_sparse_disk_create_and_register+0x6c><== NEVER TAKEN
} else {
sc = RTEMS_NO_MEMORY;
}
return sc;
}
ffc0f920: 80 01 00 24 lwz r0,36(r1)
media_block_size,
blocks_with_buffer
);
if ( sparse_disk != NULL ) {
sc = rtems_sparse_disk_register(
ffc0f924: 7f 63 db 78 mr r3,r27
ffc0f928: 7f c5 f3 78 mr r5,r30
} else {
sc = RTEMS_NO_MEMORY;
}
return sc;
}
ffc0f92c: 7c 08 03 a6 mtlr r0
media_block_size,
blocks_with_buffer
);
if ( sparse_disk != NULL ) {
sc = rtems_sparse_disk_register(
ffc0f930: 7f e6 fb 78 mr r6,r31
ffc0f934: 7f 87 e3 78 mr r7,r28
ffc0f938: 7f a8 eb 78 mr r8,r29
} else {
sc = RTEMS_NO_MEMORY;
}
return sc;
}
ffc0f93c: bb 61 00 0c lmw r27,12(r1)
media_block_size,
blocks_with_buffer
);
if ( sparse_disk != NULL ) {
sc = rtems_sparse_disk_register(
ffc0f940: 3d 20 ff c1 lis r9,-63
ffc0f944: 39 29 f5 58 addi r9,r9,-2728
} else {
sc = RTEMS_NO_MEMORY;
}
return sc;
}
ffc0f948: 38 21 00 20 addi r1,r1,32
media_block_size,
blocks_with_buffer
);
if ( sparse_disk != NULL ) {
sc = rtems_sparse_disk_register(
ffc0f94c: 4b ff fe 8c b ffc0f7d8 <rtems_sparse_disk_register>
} else {
sc = RTEMS_NO_MEMORY;
}
return sc;
}
ffc0f950: 39 61 00 20 addi r11,r1,32 <== NOT EXECUTED
ffc0f954: 38 60 00 1a li r3,26 <== NOT EXECUTED
ffc0f958: 4b ff 1c 94 b ffc015ec <_restgpr_27_x> <== NOT EXECUTED
ffc0f7d8 <rtems_sparse_disk_register>:
uint8_t fill_pattern,
rtems_sparse_disk_delete_handler sparse_disk_delete )
{
rtems_status_code sc;
if ( blocks_with_buffer <= media_block_count ) {
ffc0f7d8: 7f 86 38 40 cmplw cr7,r6,r7
uint32_t media_block_size,
rtems_blkdev_bnum blocks_with_buffer,
rtems_blkdev_bnum media_block_count,
uint8_t fill_pattern,
rtems_sparse_disk_delete_handler sparse_disk_delete )
{
ffc0f7dc: 94 21 ff d0 stwu r1,-48(r1)
ffc0f7e0: 7c 08 02 a6 mflr r0
ffc0f7e4: be e1 00 0c stmw r23,12(r1)
ffc0f7e8: 7c de 33 78 mr r30,r6
ffc0f7ec: 7c fc 3b 78 mr r28,r7
ffc0f7f0: 90 01 00 34 stw r0,52(r1)
rtems_status_code sc;
if ( blocks_with_buffer <= media_block_count ) {
ffc0f7f4: 41 bd 00 dc bgt+ cr7,ffc0f8d0 <rtems_sparse_disk_register+0xf8><== NEVER TAKEN
const uint8_t fill_pattern )
{
rtems_status_code sc;
rtems_blkdev_bnum i;
if ( NULL == sd )
ffc0f7f8: 2f 84 00 00 cmpwi cr7,r4,0
ffc0f7fc: 7c 9f 23 78 mr r31,r4
ffc0f800: 41 9e 00 d8 beq- cr7,ffc0f8d8 <rtems_sparse_disk_register+0x100><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
uint8_t *data = (uint8_t *) sd;
size_t const key_table_size = blocks_with_buffer
ffc0f804: 54 db 18 38 rlwinm r27,r6,3,0,28
* sizeof( rtems_sparse_disk_key );
size_t const data_size = blocks_with_buffer * media_block_size;
memset( data, 0, sizeof( rtems_sparse_disk ) + key_table_size );
ffc0f808: 3b 3b 00 1c addi r25,r27,28
ffc0f80c: 7c bd 2b 78 mr r29,r5
ffc0f810: 7c 78 1b 78 mr r24,r3
ffc0f814: 7f 25 cb 78 mr r5,r25
ffc0f818: 7c 83 23 78 mr r3,r4
ffc0f81c: 38 80 00 00 li r4,0
ffc0f820: 7d 1a 43 78 mr r26,r8
ffc0f824: 7d 37 4b 78 mr r23,r9
ffc0f828: 48 00 d6 95 bl ffc1cebc <memset>
sd->fill_pattern = fill_pattern;
memset( (uint8_t *) ( data + sizeof( rtems_sparse_disk ) + key_table_size ),
ffc0f82c: 7c be e9 d6 mullw r5,r30,r29
* sizeof( rtems_sparse_disk_key );
size_t const data_size = blocks_with_buffer * media_block_size;
memset( data, 0, sizeof( rtems_sparse_disk ) + key_table_size );
sd->fill_pattern = fill_pattern;
ffc0f830: 9b 5f 00 14 stb r26,20(r31)
memset( (uint8_t *) ( data + sizeof( rtems_sparse_disk ) + key_table_size ),
ffc0f834: 7f 44 d3 78 mr r4,r26
ffc0f838: 7c 7f ca 14 add r3,r31,r25
ffc0f83c: 48 00 d6 81 bl ffc1cebc <memset>
sd->fill_pattern,
data_size );
sd->delete_handler = sparse_disk_delete;
ffc0f840: 92 ff 00 10 stw r23,16(r31)
sc = rtems_semaphore_create(
ffc0f844: 3c 60 53 50 lis r3,21328
ffc0f848: 60 63 41 52 ori r3,r3,16722
ffc0f84c: 38 80 00 01 li r4,1
ffc0f850: 38 a0 00 54 li r5,84
ffc0f854: 38 c0 00 00 li r6,0
ffc0f858: 7f e7 fb 78 mr r7,r31
ffc0f85c: 4b ff aa 79 bl ffc0a2d4 <rtems_semaphore_create>
RTEMS_PRIORITY | RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY,
0,
&sd->mutex
);
if ( sc != RTEMS_SUCCESSFUL ) {
ffc0f860: 2c 03 00 00 cmpwi r3,0
ffc0f864: 40 82 00 78 bne- ffc0f8dc <rtems_sparse_disk_register+0x104><== NEVER TAKEN
return sc;
}
data += sizeof( rtems_sparse_disk );
ffc0f868: 39 5f 00 1c addi r10,r31,28
sd->blocks_with_buffer = blocks_with_buffer;
ffc0f86c: 93 df 00 04 stw r30,4(r31)
sd->key_table = (rtems_sparse_disk_key *) data;
data += key_table_size;
for ( i = 0; i < blocks_with_buffer; ++i, data += media_block_size ) {
ffc0f870: 3b de 00 01 addi r30,r30,1
}
data += sizeof( rtems_sparse_disk );
sd->blocks_with_buffer = blocks_with_buffer;
sd->key_table = (rtems_sparse_disk_key *) data;
ffc0f874: 91 5f 00 18 stw r10,24(r31)
data += key_table_size;
for ( i = 0; i < blocks_with_buffer; ++i, data += media_block_size ) {
ffc0f878: 39 20 00 00 li r9,0
data += sizeof( rtems_sparse_disk );
sd->blocks_with_buffer = blocks_with_buffer;
sd->key_table = (rtems_sparse_disk_key *) data;
data += key_table_size;
ffc0f87c: 7d 4a da 14 add r10,r10,r27
for ( i = 0; i < blocks_with_buffer; ++i, data += media_block_size ) {
ffc0f880: 7f c9 03 a6 mtctr r30
ffc0f884: 48 00 00 18 b ffc0f89c <rtems_sparse_disk_register+0xc4>
}
return sc;
}
rtems_status_code rtems_sparse_disk_register(
ffc0f888: 55 28 18 38 rlwinm r8,r9,3,0,28
ffc0f88c: 7d 1f 42 14 add r8,r31,r8
sd->key_table = (rtems_sparse_disk_key *) data;
data += key_table_size;
for ( i = 0; i < blocks_with_buffer; ++i, data += media_block_size ) {
sd->key_table[i].data = data;
ffc0f890: 91 48 00 20 stw r10,32(r8)
sd->blocks_with_buffer = blocks_with_buffer;
sd->key_table = (rtems_sparse_disk_key *) data;
data += key_table_size;
for ( i = 0; i < blocks_with_buffer; ++i, data += media_block_size ) {
ffc0f894: 39 29 00 01 addi r9,r9,1
ffc0f898: 7d 4a ea 14 add r10,r10,r29
ffc0f89c: 42 00 ff ec bdnz+ ffc0f888 <rtems_sparse_disk_register+0xb0>
} else {
sc = RTEMS_INVALID_NUMBER;
}
return sc;
}
ffc0f8a0: 80 01 00 34 lwz r0,52(r1)
sparse_disk_delete,
fill_pattern
);
if ( RTEMS_SUCCESSFUL == sc ) {
sc = rtems_blkdev_create(
ffc0f8a4: 7f 03 c3 78 mr r3,r24
for ( i = 0; i < blocks_with_buffer; ++i, data += media_block_size ) {
sd->key_table[i].data = data;
}
sd->media_block_size = media_block_size;
ffc0f8a8: 93 bf 00 0c stw r29,12(r31)
sparse_disk_delete,
fill_pattern
);
if ( RTEMS_SUCCESSFUL == sc ) {
sc = rtems_blkdev_create(
ffc0f8ac: 7f a4 eb 78 mr r4,r29
} else {
sc = RTEMS_INVALID_NUMBER;
}
return sc;
}
ffc0f8b0: 7c 08 03 a6 mtlr r0
sparse_disk_delete,
fill_pattern
);
if ( RTEMS_SUCCESSFUL == sc ) {
sc = rtems_blkdev_create(
ffc0f8b4: 7f 85 e3 78 mr r5,r28
ffc0f8b8: 3c c0 ff c1 lis r6,-63
ffc0f8bc: 7f e7 fb 78 mr r7,r31
} else {
sc = RTEMS_INVALID_NUMBER;
}
return sc;
}
ffc0f8c0: ba e1 00 0c lmw r23,12(r1)
sparse_disk_delete,
fill_pattern
);
if ( RTEMS_SUCCESSFUL == sc ) {
sc = rtems_blkdev_create(
ffc0f8c4: 38 c6 f5 5c addi r6,r6,-2724
} else {
sc = RTEMS_INVALID_NUMBER;
}
return sc;
}
ffc0f8c8: 38 21 00 30 addi r1,r1,48
sparse_disk_delete,
fill_pattern
);
if ( RTEMS_SUCCESSFUL == sc ) {
sc = rtems_blkdev_create(
ffc0f8cc: 48 00 2b c8 b ffc12494 <rtems_blkdev_create>
sparse_disk_ioctl,
sparse_disk
);
}
} else {
sc = RTEMS_INVALID_NUMBER;
ffc0f8d0: 38 60 00 0a li r3,10 <== NOT EXECUTED
ffc0f8d4: 48 00 00 08 b ffc0f8dc <rtems_sparse_disk_register+0x104><== NOT EXECUTED
{
rtems_status_code sc;
rtems_blkdev_bnum i;
if ( NULL == sd )
return RTEMS_INVALID_ADDRESS;
ffc0f8d8: 38 60 00 09 li r3,9 <== NOT EXECUTED
} else {
sc = RTEMS_INVALID_NUMBER;
}
return sc;
}
ffc0f8dc: 39 61 00 30 addi r11,r1,48 <== NOT EXECUTED
ffc0f8e0: 4b ff 1c fc b ffc015dc <_restgpr_23_x> <== NOT EXECUTED
ffc234c4 <rtems_stack_checker_create_extension>:
static uint32_t pattern[ 4 ] = {
0xFEEDF00D, 0x0BAD0D06, /* FEED FOOD to BAD DOG */
0xDEADF00D, 0x600D0D06 /* DEAD FOOD but GOOD DOG */
};
if ( Stack_check_Initialized )
ffc234c4: 3d 20 00 00 lis r9,0
ffc234c8: 81 29 5d 50 lwz r9,23888(r9)
*/
bool rtems_stack_checker_create_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *the_thread
)
{
ffc234cc: 7c 8a 23 78 mr r10,r4
static uint32_t pattern[ 4 ] = {
0xFEEDF00D, 0x0BAD0D06, /* FEED FOOD to BAD DOG */
0xDEADF00D, 0x600D0D06 /* DEAD FOOD but GOOD DOG */
};
if ( Stack_check_Initialized )
ffc234d0: 2f 89 00 00 cmpwi cr7,r9,0
ffc234d4: 40 9e 00 40 bne- cr7,ffc23514 <rtems_stack_checker_create_extension+0x50>
/*
* Dope the pattern and fill areas
*/
p = Stack_check_Pattern.pattern;
for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) {
p[i] = pattern[ i%4 ];
ffc234d8: 39 00 00 20 li r8,32
ffc234dc: 7d 09 03 a6 mtctr r8
ffc234e0: 3c a0 ff c6 lis r5,-58
ffc234e4: 3c 80 00 00 lis r4,0
ffc234e8: 38 a5 ae 58 addi r5,r5,-20904
ffc234ec: 55 28 17 3a rlwinm r8,r9,2,28,29
ffc234f0: 7d 05 40 2e lwzx r8,r5,r8
}
/*
* rtems_stack_checker_create_extension
*/
bool rtems_stack_checker_create_extension(
ffc234f4: 55 27 10 3a rlwinm r7,r9,2,0,29
/*
* Dope the pattern and fill areas
*/
p = Stack_check_Pattern.pattern;
for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) {
p[i] = pattern[ i%4 ];
ffc234f8: 38 c4 6e 3c addi r6,r4,28220
ffc234fc: 7d 06 39 2e stwx r8,r6,r7
/*
* Dope the pattern and fill areas
*/
p = Stack_check_Pattern.pattern;
for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) {
ffc23500: 39 29 00 01 addi r9,r9,1
ffc23504: 42 00 ff e8 bdnz+ ffc234ec <rtems_stack_checker_create_extension+0x28>
(char *) _CPU_Interrupt_stack_low;
Stack_check_Dope_stack(&Stack_check_Interrupt_stack);
}
#endif
Stack_check_Initialized = 1;
ffc23508: 39 00 00 01 li r8,1
ffc2350c: 3d 20 00 00 lis r9,0
ffc23510: 91 09 5d 50 stw r8,23888(r9)
Thread_Control *the_thread
)
{
Stack_check_Initialize();
if (the_thread)
ffc23514: 2f 8a 00 00 cmpwi cr7,r10,0
ffc23518: 41 9e 00 34 beq- cr7,ffc2354c <rtems_stack_checker_create_extension+0x88><== NEVER TAKEN
*/
bool rtems_stack_checker_create_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *the_thread
)
{
ffc2351c: 94 21 ff f8 stwu r1,-8(r1)
ffc23520: 7c 08 02 a6 mflr r0
Stack_check_Initialize();
if (the_thread)
Stack_check_Dope_stack(&the_thread->Start.Initial_stack);
ffc23524: 38 80 00 a5 li r4,165
*/
bool rtems_stack_checker_create_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *the_thread
)
{
ffc23528: 90 01 00 0c stw r0,12(r1)
Stack_check_Initialize();
if (the_thread)
Stack_check_Dope_stack(&the_thread->Start.Initial_stack);
ffc2352c: 80 6a 00 b8 lwz r3,184(r10)
ffc23530: 80 aa 00 b4 lwz r5,180(r10)
ffc23534: 48 01 8e c5 bl ffc3c3f8 <memset>
return true;
}
ffc23538: 80 01 00 0c lwz r0,12(r1)
ffc2353c: 38 60 00 01 li r3,1
ffc23540: 7c 08 03 a6 mtlr r0
ffc23544: 38 21 00 08 addi r1,r1,8
ffc23548: 4e 80 00 20 blr
ffc2354c: 38 60 00 01 li r3,1 <== NOT EXECUTED
ffc23550: 4e 80 00 20 blr <== NOT EXECUTED
ffc236e4 <rtems_stack_checker_is_blown>:
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
{
ffc236e4: 94 21 ff e8 stwu r1,-24(r1)
ffc236e8: 7c 08 02 a6 mflr r0
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
ffc236ec: 3d 20 00 00 lis r9,0
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
{
ffc236f0: bf a1 00 0c stmw r29,12(r1)
ffc236f4: 7c 3f 0b 78 mr r31,r1
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
return false;
ffc236f8: 3b a0 00 00 li r29,0
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
{
ffc236fc: 90 01 00 1c stw r0,28(r1)
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
ffc23700: 83 c9 69 30 lwz r30,26928(r9)
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
ffc23704: 80 7e 00 b8 lwz r3,184(r30)
ffc23708: 7f 9f 18 40 cmplw cr7,r31,r3
ffc2370c: 41 9c 00 18 blt- cr7,ffc23724 <rtems_stack_checker_is_blown+0x40><== NEVER TAKEN
return false;
}
if ( sp > (the_stack->area + the_stack->size) ) {
ffc23710: 83 be 00 b4 lwz r29,180(r30)
ffc23714: 7f a3 ea 14 add r29,r3,r29
ffc23718: 7f bf e8 10 subfc r29,r31,r29
ffc2371c: 3b a0 00 00 li r29,0
ffc23720: 7f bd e9 14 adde r29,r29,r29
/*
* The stack checker must be initialized before the pattern is there
* to check.
*/
if ( Stack_check_Initialized ) {
ffc23724: 3d 20 00 00 lis r9,0
ffc23728: 81 29 5d 50 lwz r9,23888(r9)
ffc2372c: 2f 89 00 00 cmpwi cr7,r9,0
ffc23730: 41 9e 00 38 beq- cr7,ffc23768 <rtems_stack_checker_is_blown+0x84><== NEVER TAKEN
pattern_ok = (!memcmp(
ffc23734: 3c 80 00 00 lis r4,0
ffc23738: 38 84 6e 3c addi r4,r4,28220
ffc2373c: 38 63 00 08 addi r3,r3,8
ffc23740: 38 a0 00 80 li r5,128
ffc23744: 48 01 8a 01 bl ffc3c144 <memcmp>
/*
* Let's report as much as we can.
*/
if ( !sp_ok || !pattern_ok ) {
ffc23748: 2f 9d 00 00 cmpwi cr7,r29,0
/*
* The stack checker must be initialized before the pattern is there
* to check.
*/
if ( Stack_check_Initialized ) {
pattern_ok = (!memcmp(
ffc2374c: 7c 64 00 34 cntlzw r4,r3
ffc23750: 54 84 d9 7e rlwinm r4,r4,27,5,31
/*
* Let's report as much as we can.
*/
if ( !sp_ok || !pattern_ok ) {
ffc23754: 41 9e 00 0c beq- cr7,ffc23760 <rtems_stack_checker_is_blown+0x7c><== NEVER TAKEN
ffc23758: 2f 84 00 00 cmpwi cr7,r4,0
ffc2375c: 40 be 00 18 bne+ cr7,ffc23774 <rtems_stack_checker_is_blown+0x90><== ALWAYS TAKEN
Stack_check_report_blown_task( _Thread_Executing, pattern_ok );
ffc23760: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc23764: 4b ff fe 31 bl ffc23594 <Stack_check_report_blown_task><== NOT EXECUTED
/*
* Let's report as much as we can.
*/
if ( !sp_ok || !pattern_ok ) {
ffc23768: 2f 9d 00 00 cmpwi cr7,r29,0 <== NOT EXECUTED
*/
bool rtems_stack_checker_is_blown( void )
{
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
bool sp_ok;
bool pattern_ok = true;
ffc2376c: 38 80 00 01 li r4,1 <== NOT EXECUTED
/*
* Let's report as much as we can.
*/
if ( !sp_ok || !pattern_ok ) {
ffc23770: 41 be ff f0 beq- cr7,ffc23760 <rtems_stack_checker_is_blown+0x7c><== NOT EXECUTED
/*
* The Stack Pointer and the Pattern Area are OK so return false.
*/
return false;
}
ffc23774: 39 7f 00 18 addi r11,r31,24
ffc23778: 38 60 00 00 li r3,0
ffc2377c: 48 03 0d 88 b ffc54504 <_restgpr_29_x>
ffc23780 <rtems_stack_checker_report_usage_with_plugin>:
void rtems_stack_checker_report_usage_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
ffc23780: 94 21 ff e8 stwu r1,-24(r1)
ffc23784: 7c 08 02 a6 mflr r0
ffc23788: bf 81 00 08 stmw r28,8(r1)
if ( !print )
ffc2378c: 7c 9e 23 79 mr. r30,r4
void rtems_stack_checker_report_usage_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
ffc23790: 90 01 00 1c stw r0,28(r1)
if ( !print )
ffc23794: 41 82 00 5c beq- ffc237f0 <rtems_stack_checker_report_usage_with_plugin+0x70><== NEVER TAKEN
return;
print_context = context;
ffc23798: 3f e0 00 00 lis r31,0
print_handler = print;
(*print)( context, "Stack usage by thread\n");
ffc2379c: 7f c9 03 a6 mtctr r30
)
{
if ( !print )
return;
print_context = context;
ffc237a0: 3b bf 5d 48 addi r29,r31,23880
print_handler = print;
ffc237a4: 93 df 5d 48 stw r30,23880(r31)
(*print)( context, "Stack usage by thread\n");
ffc237a8: 3c 80 ff c6 lis r4,-58
ffc237ac: 38 84 af 71 addi r4,r4,-20623
)
{
if ( !print )
return;
print_context = context;
ffc237b0: 90 7d 00 04 stw r3,4(r29)
ffc237b4: 7c 7c 1b 78 mr r28,r3
print_handler = print;
(*print)( context, "Stack usage by thread\n");
ffc237b8: 4c c6 31 82 crclr 4*cr1+eq
ffc237bc: 4e 80 04 21 bctrl
(*print)( context,
ffc237c0: 3c 80 ff c6 lis r4,-58
ffc237c4: 38 84 af 88 addi r4,r4,-20600
ffc237c8: 7f c9 03 a6 mtctr r30
ffc237cc: 7f 83 e3 78 mr r3,r28
ffc237d0: 4c c6 31 82 crclr 4*cr1+eq
ffc237d4: 4e 80 04 21 bctrl
" 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 );
ffc237d8: 3c 60 ff c2 lis r3,-62
ffc237dc: 38 63 33 84 addi r3,r3,13188
ffc237e0: 48 00 4b 11 bl ffc282f0 <rtems_iterate_over_all_threads>
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
/* dump interrupt stack info if any */
Stack_check_Dump_threads_usage((Thread_Control *) -1);
#endif
print_context = NULL;
ffc237e4: 39 20 00 00 li r9,0
ffc237e8: 91 3d 00 04 stw r9,4(r29)
print_handler = NULL;
ffc237ec: 91 3f 5d 48 stw r9,23880(r31)
}
ffc237f0: 39 61 00 18 addi r11,r1,24
ffc237f4: 48 03 0d 0c b ffc54500 <_restgpr_28_x>
ffc2366c <rtems_stack_checker_switch_extension>:
*/
void rtems_stack_checker_switch_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *heir __attribute__((unused))
)
{
ffc2366c: 94 21 ff e8 stwu r1,-24(r1)
ffc23670: 7c 08 02 a6 mflr r0
ffc23674: 90 01 00 1c stw r0,28(r1)
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);
ffc23678: 81 23 00 b8 lwz r9,184(r3)
*/
void rtems_stack_checker_switch_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *heir __attribute__((unused))
)
{
ffc2367c: bf a1 00 0c stmw r29,12(r1)
ffc23680: 7c 3f 0b 78 mr r31,r1
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
ffc23684: 7f 9f 48 40 cmplw cr7,r31,r9
*/
void rtems_stack_checker_switch_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *heir __attribute__((unused))
)
{
ffc23688: 7c 7e 1b 78 mr r30,r3
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
return false;
ffc2368c: 3b a0 00 00 li r29,0
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);
ffc23690: 38 69 00 08 addi r3,r9,8
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
ffc23694: 41 9c 00 18 blt- cr7,ffc236ac <rtems_stack_checker_switch_extension+0x40><== NEVER TAKEN
return false;
}
if ( sp > (the_stack->area + the_stack->size) ) {
ffc23698: 83 be 00 b4 lwz r29,180(r30)
ffc2369c: 7f a9 ea 14 add r29,r9,r29
ffc236a0: 7f bf e8 10 subfc r29,r31,r29
ffc236a4: 3b a0 00 00 li r29,0
ffc236a8: 7f bd e9 14 adde r29,r29,r29
/*
* 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,
ffc236ac: 3c 80 00 00 lis r4,0
ffc236b0: 38 84 6e 3c addi r4,r4,28220
ffc236b4: 38 a0 00 80 li r5,128
ffc236b8: 48 01 8a 8d bl ffc3c144 <memcmp>
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
ffc236bc: 2f 9d 00 00 cmpwi cr7,r29,0
/*
* 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,
ffc236c0: 7c 64 00 34 cntlzw r4,r3
ffc236c4: 54 84 d9 7e rlwinm r4,r4,27,5,31
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
ffc236c8: 41 9e 00 0c beq- cr7,ffc236d4 <rtems_stack_checker_switch_extension+0x68><== NEVER TAKEN
ffc236cc: 2f 84 00 00 cmpwi cr7,r4,0
ffc236d0: 40 be 00 0c bne+ cr7,ffc236dc <rtems_stack_checker_switch_extension+0x70>
Stack_check_report_blown_task( running, pattern_ok );
ffc236d4: 7f c3 f3 78 mr r3,r30
ffc236d8: 4b ff fe bd bl ffc23594 <Stack_check_report_blown_task>
}
}
ffc236dc: 39 7f 00 18 addi r11,r31,24
ffc236e0: 48 03 0e 24 b ffc54504 <_restgpr_29_x>
ffc0e774 <rtems_string_to_double>:
rtems_status_code rtems_string_to_double (
const char *s,
double *n,
char **endptr
)
{
ffc0e774: 94 21 ff d0 stwu r1,-48(r1)
ffc0e778: 7c 08 02 a6 mflr r0
ffc0e77c: bf a1 00 1c stmw r29,28(r1)
double result;
char *end;
if ( !n )
ffc0e780: 7c 9f 23 79 mr. r31,r4
rtems_status_code rtems_string_to_double (
const char *s,
double *n,
char **endptr
)
{
ffc0e784: 90 01 00 34 stw r0,52(r1)
ffc0e788: db e1 00 28 stfd f31,40(r1)
double result;
char *end;
if ( !n )
ffc0e78c: 41 82 00 a0 beq- ffc0e82c <rtems_string_to_double+0xb8>
ffc0e790: 7c bd 2b 78 mr r29,r5
ffc0e794: 7c 7e 1b 78 mr r30,r3
return RTEMS_INVALID_ADDRESS;
errno = 0;
ffc0e798: 48 00 2f e5 bl ffc1177c <__errno>
ffc0e79c: 39 20 00 00 li r9,0
ffc0e7a0: 91 23 00 00 stw r9,0(r3)
*n = 0;
ffc0e7a4: 3d 20 ff c2 lis r9,-62
result = strtod( s, &end );
ffc0e7a8: 7f c3 f3 78 mr r3,r30
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
ffc0e7ac: c8 09 f5 38 lfd f0,-2760(r9)
result = strtod( s, &end );
ffc0e7b0: 38 81 00 08 addi r4,r1,8
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
ffc0e7b4: d8 1f 00 00 stfd f0,0(r31)
result = strtod( s, &end );
ffc0e7b8: 48 00 5b 29 bl ffc142e0 <strtod>
if ( endptr )
ffc0e7bc: 2f 9d 00 00 cmpwi cr7,r29,0
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtod( s, &end );
ffc0e7c0: ff e0 08 90 fmr f31,f1
ffc0e7c4: 81 41 00 08 lwz r10,8(r1)
if ( endptr )
ffc0e7c8: 41 9e 00 08 beq- cr7,ffc0e7d0 <rtems_string_to_double+0x5c>
*endptr = end;
ffc0e7cc: 91 5d 00 00 stw r10,0(r29)
if ( end == s )
ffc0e7d0: 7f 8a f0 00 cmpw cr7,r10,r30
return RTEMS_NOT_DEFINED;
ffc0e7d4: 38 60 00 0b li r3,11
result = strtod( s, &end );
if ( endptr )
*endptr = end;
if ( end == s )
ffc0e7d8: 41 9e 00 58 beq- cr7,ffc0e830 <rtems_string_to_double+0xbc>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
ffc0e7dc: 48 00 2f a1 bl ffc1177c <__errno>
ffc0e7e0: 81 23 00 00 lwz r9,0(r3)
ffc0e7e4: 2f 89 00 22 cmpwi cr7,r9,34
ffc0e7e8: 40 be 00 38 bne+ cr7,ffc0e820 <rtems_string_to_double+0xac>
ffc0e7ec: 3d 40 ff c2 lis r10,-62
ffc0e7f0: c8 0a f5 38 lfd f0,-2760(r10)
(( result == 0 ) || ( result == HUGE_VAL ) || ( result == -HUGE_VAL )))
return RTEMS_INVALID_NUMBER;
ffc0e7f4: 38 60 00 0a li r3,10
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
ffc0e7f8: ff 9f 00 00 fcmpu cr7,f31,f0
ffc0e7fc: 41 be 00 34 beq+ cr7,ffc0e830 <rtems_string_to_double+0xbc><== NEVER TAKEN
(( result == 0 ) || ( result == HUGE_VAL ) || ( result == -HUGE_VAL )))
ffc0e800: 3d 40 ff c2 lis r10,-62
ffc0e804: c8 0a 1b 20 lfd f0,6944(r10)
ffc0e808: ff 9f 00 00 fcmpu cr7,f31,f0
ffc0e80c: 41 bd 00 24 bgt+ cr7,ffc0e830 <rtems_string_to_double+0xbc>
ffc0e810: 3d 40 ff c2 lis r10,-62
ffc0e814: c8 0a 1b 28 lfd f0,6952(r10)
ffc0e818: ff 9f 00 00 fcmpu cr7,f31,f0
ffc0e81c: 41 bc 00 14 blt+ cr7,ffc0e830 <rtems_string_to_double+0xbc><== ALWAYS TAKEN
return RTEMS_INVALID_NUMBER;
*n = result;
ffc0e820: db ff 00 00 stfd f31,0(r31)
return RTEMS_SUCCESSFUL;
ffc0e824: 38 60 00 00 li r3,0
ffc0e828: 48 00 00 08 b ffc0e830 <rtems_string_to_double+0xbc>
{
double result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
ffc0e82c: 38 60 00 09 li r3,9
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
ffc0e830: 80 01 00 34 lwz r0,52(r1)
ffc0e834: bb a1 00 1c lmw r29,28(r1)
ffc0e838: 7c 08 03 a6 mtlr r0
ffc0e83c: cb e1 00 28 lfd f31,40(r1)
ffc0e840: 38 21 00 30 addi r1,r1,48
ffc0e844: 4e 80 00 20 blr
ffc0e848 <rtems_string_to_float>:
rtems_status_code rtems_string_to_float (
const char *s,
float *n,
char **endptr
)
{
ffc0e848: 94 21 ff d0 stwu r1,-48(r1)
ffc0e84c: 7c 08 02 a6 mflr r0
ffc0e850: bf a1 00 1c stmw r29,28(r1)
float result;
char *end;
if ( !n )
ffc0e854: 7c 9f 23 79 mr. r31,r4
rtems_status_code rtems_string_to_float (
const char *s,
float *n,
char **endptr
)
{
ffc0e858: 90 01 00 34 stw r0,52(r1)
ffc0e85c: db e1 00 28 stfd f31,40(r1)
float result;
char *end;
if ( !n )
ffc0e860: 41 82 00 9c beq- ffc0e8fc <rtems_string_to_float+0xb4>
ffc0e864: 7c bd 2b 78 mr r29,r5
ffc0e868: 7c 7e 1b 78 mr r30,r3
return RTEMS_INVALID_ADDRESS;
errno = 0;
ffc0e86c: 48 00 2f 11 bl ffc1177c <__errno>
ffc0e870: 39 20 00 00 li r9,0
ffc0e874: 91 23 00 00 stw r9,0(r3)
*n = 0;
ffc0e878: 39 20 00 00 li r9,0
result = strtof( s, &end );
ffc0e87c: 7f c3 f3 78 mr r3,r30
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
ffc0e880: 91 3f 00 00 stw r9,0(r31)
result = strtof( s, &end );
ffc0e884: 38 81 00 08 addi r4,r1,8
ffc0e888: 48 00 5a 71 bl ffc142f8 <strtof>
if ( endptr )
ffc0e88c: 2f 9d 00 00 cmpwi cr7,r29,0
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtof( s, &end );
ffc0e890: ff e0 08 90 fmr f31,f1
ffc0e894: 81 41 00 08 lwz r10,8(r1)
if ( endptr )
ffc0e898: 41 9e 00 08 beq- cr7,ffc0e8a0 <rtems_string_to_float+0x58>
*endptr = end;
ffc0e89c: 91 5d 00 00 stw r10,0(r29)
if ( end == s )
ffc0e8a0: 7f 8a f0 00 cmpw cr7,r10,r30
return RTEMS_NOT_DEFINED;
ffc0e8a4: 38 60 00 0b li r3,11
result = strtof( s, &end );
if ( endptr )
*endptr = end;
if ( end == s )
ffc0e8a8: 41 9e 00 58 beq- cr7,ffc0e900 <rtems_string_to_float+0xb8>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
ffc0e8ac: 48 00 2e d1 bl ffc1177c <__errno>
ffc0e8b0: 81 23 00 00 lwz r9,0(r3)
ffc0e8b4: 2f 89 00 22 cmpwi cr7,r9,34
ffc0e8b8: 40 be 00 38 bne+ cr7,ffc0e8f0 <rtems_string_to_float+0xa8>
ffc0e8bc: 3d 20 ff c2 lis r9,-62
ffc0e8c0: c0 09 1b 38 lfs f0,6968(r9)
(( result == 0 ) || ( result == HUGE_VALF ) || ( result == -HUGE_VALF )))
return RTEMS_INVALID_NUMBER;
ffc0e8c4: 38 60 00 0a li r3,10
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
ffc0e8c8: ff 9f 00 00 fcmpu cr7,f31,f0
ffc0e8cc: 41 be 00 34 beq+ cr7,ffc0e900 <rtems_string_to_float+0xb8><== NEVER TAKEN
(( result == 0 ) || ( result == HUGE_VALF ) || ( result == -HUGE_VALF )))
ffc0e8d0: 3d 40 ff c2 lis r10,-62
ffc0e8d4: c0 0a 1b 30 lfs f0,6960(r10)
ffc0e8d8: ff 9f 00 00 fcmpu cr7,f31,f0
ffc0e8dc: 41 bd 00 24 bgt+ cr7,ffc0e900 <rtems_string_to_float+0xb8>
ffc0e8e0: 3d 40 ff c2 lis r10,-62
ffc0e8e4: c0 0a 1b 34 lfs f0,6964(r10)
ffc0e8e8: ff 9f 00 00 fcmpu cr7,f31,f0
ffc0e8ec: 41 bc 00 14 blt+ cr7,ffc0e900 <rtems_string_to_float+0xb8><== ALWAYS TAKEN
return RTEMS_INVALID_NUMBER;
*n = result;
ffc0e8f0: d3 ff 00 00 stfs f31,0(r31)
return RTEMS_SUCCESSFUL;
ffc0e8f4: 38 60 00 00 li r3,0
ffc0e8f8: 48 00 00 08 b ffc0e900 <rtems_string_to_float+0xb8>
{
float result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
ffc0e8fc: 38 60 00 09 li r3,9
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
ffc0e900: 80 01 00 34 lwz r0,52(r1)
ffc0e904: bb a1 00 1c lmw r29,28(r1)
ffc0e908: 7c 08 03 a6 mtlr r0
ffc0e90c: cb e1 00 28 lfd f31,40(r1)
ffc0e910: 38 21 00 30 addi r1,r1,48
ffc0e914: 4e 80 00 20 blr
ffc1e41c <rtems_string_to_int>:
const char *s,
int *n,
char **endptr,
int base
)
{
ffc1e41c: 94 21 ff d8 stwu r1,-40(r1)
ffc1e420: 7c 08 02 a6 mflr r0
ffc1e424: bf 81 00 18 stmw r28,24(r1)
long result;
char *end;
if ( !n )
ffc1e428: 7c 9e 23 79 mr. r30,r4
const char *s,
int *n,
char **endptr,
int base
)
{
ffc1e42c: 90 01 00 2c stw r0,44(r1)
long result;
char *end;
if ( !n )
ffc1e430: 41 82 00 90 beq- ffc1e4c0 <rtems_string_to_int+0xa4>
ffc1e434: 7c df 33 78 mr r31,r6
ffc1e438: 7c bc 2b 78 mr r28,r5
ffc1e43c: 7c 7d 1b 78 mr r29,r3
return RTEMS_INVALID_ADDRESS;
errno = 0;
ffc1e440: 48 01 9f c9 bl ffc38408 <__errno>
ffc1e444: 39 20 00 00 li r9,0
ffc1e448: 91 23 00 00 stw r9,0(r3)
*n = 0;
result = strtol( s, &end, base );
ffc1e44c: 7f e5 fb 78 mr r5,r31
ffc1e450: 7f a3 eb 78 mr r3,r29
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
ffc1e454: 91 3e 00 00 stw r9,0(r30)
result = strtol( s, &end, base );
ffc1e458: 38 81 00 08 addi r4,r1,8
ffc1e45c: 48 02 32 b5 bl ffc41710 <strtol>
if ( endptr )
ffc1e460: 2f 9c 00 00 cmpwi cr7,r28,0
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtol( s, &end, base );
ffc1e464: 7c 7f 1b 78 mr r31,r3
ffc1e468: 81 41 00 08 lwz r10,8(r1)
if ( endptr )
ffc1e46c: 41 9e 00 08 beq- cr7,ffc1e474 <rtems_string_to_int+0x58>
*endptr = end;
ffc1e470: 91 5c 00 00 stw r10,0(r28)
if ( end == s )
ffc1e474: 7f 8a e8 00 cmpw cr7,r10,r29
return RTEMS_NOT_DEFINED;
ffc1e478: 38 60 00 0b li r3,11
result = strtol( s, &end, base );
if ( endptr )
*endptr = end;
if ( end == s )
ffc1e47c: 41 9e 00 48 beq- cr7,ffc1e4c4 <rtems_string_to_int+0xa8>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
ffc1e480: 48 01 9f 89 bl ffc38408 <__errno>
ffc1e484: 81 23 00 00 lwz r9,0(r3)
ffc1e488: 2f 89 00 22 cmpwi cr7,r9,34
ffc1e48c: 40 be 00 28 bne+ cr7,ffc1e4b4 <rtems_string_to_int+0x98>
ffc1e490: 2f 9f 00 00 cmpwi cr7,r31,0
(( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
return RTEMS_INVALID_NUMBER;
ffc1e494: 38 60 00 0a li r3,10
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
ffc1e498: 41 be 00 2c beq+ cr7,ffc1e4c4 <rtems_string_to_int+0xa8><== NEVER TAKEN
(( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
ffc1e49c: 6f ea 80 00 xoris r10,r31,32768
ffc1e4a0: 2f 8a ff ff cmpwi cr7,r10,-1
ffc1e4a4: 41 9e 00 20 beq- cr7,ffc1e4c4 <rtems_string_to_int+0xa8>
ffc1e4a8: 3d 40 80 00 lis r10,-32768
ffc1e4ac: 7f 9f 50 00 cmpw cr7,r31,r10
ffc1e4b0: 41 9e 00 14 beq- cr7,ffc1e4c4 <rtems_string_to_int+0xa8><== ALWAYS TAKEN
errno = ERANGE;
return RTEMS_INVALID_NUMBER;
}
#endif
*n = result;
ffc1e4b4: 93 fe 00 00 stw r31,0(r30)
return RTEMS_SUCCESSFUL;
ffc1e4b8: 38 60 00 00 li r3,0
ffc1e4bc: 48 00 00 08 b ffc1e4c4 <rtems_string_to_int+0xa8>
{
long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
ffc1e4c0: 38 60 00 09 li r3,9
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
ffc1e4c4: 39 61 00 28 addi r11,r1,40
ffc1e4c8: 48 03 60 38 b ffc54500 <_restgpr_28_x>
ffc0eaa4 <rtems_string_to_long>:
const char *s,
long *n,
char **endptr,
int base
)
{
ffc0eaa4: 94 21 ff d8 stwu r1,-40(r1)
ffc0eaa8: 7c 08 02 a6 mflr r0
ffc0eaac: bf 81 00 18 stmw r28,24(r1)
long result;
char *end;
if ( !n )
ffc0eab0: 7c 9e 23 79 mr. r30,r4
const char *s,
long *n,
char **endptr,
int base
)
{
ffc0eab4: 90 01 00 2c stw r0,44(r1)
long result;
char *end;
if ( !n )
ffc0eab8: 41 82 00 90 beq- ffc0eb48 <rtems_string_to_long+0xa4>
ffc0eabc: 7c df 33 78 mr r31,r6
ffc0eac0: 7c bc 2b 78 mr r28,r5
ffc0eac4: 7c 7d 1b 78 mr r29,r3
return RTEMS_INVALID_ADDRESS;
errno = 0;
ffc0eac8: 48 00 2c b5 bl ffc1177c <__errno>
ffc0eacc: 39 20 00 00 li r9,0
ffc0ead0: 91 23 00 00 stw r9,0(r3)
*n = 0;
result = strtol( s, &end, base );
ffc0ead4: 7f e5 fb 78 mr r5,r31
ffc0ead8: 7f a3 eb 78 mr r3,r29
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
ffc0eadc: 91 3e 00 00 stw r9,0(r30)
result = strtol( s, &end, base );
ffc0eae0: 38 81 00 08 addi r4,r1,8
ffc0eae4: 48 00 5a bd bl ffc145a0 <strtol>
if ( endptr )
ffc0eae8: 2f 9c 00 00 cmpwi cr7,r28,0
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtol( s, &end, base );
ffc0eaec: 7c 7f 1b 78 mr r31,r3
ffc0eaf0: 81 41 00 08 lwz r10,8(r1)
if ( endptr )
ffc0eaf4: 41 9e 00 08 beq- cr7,ffc0eafc <rtems_string_to_long+0x58>
*endptr = end;
ffc0eaf8: 91 5c 00 00 stw r10,0(r28)
if ( end == s )
ffc0eafc: 7f 8a e8 00 cmpw cr7,r10,r29
return RTEMS_NOT_DEFINED;
ffc0eb00: 38 60 00 0b li r3,11
result = strtol( s, &end, base );
if ( endptr )
*endptr = end;
if ( end == s )
ffc0eb04: 41 9e 00 48 beq- cr7,ffc0eb4c <rtems_string_to_long+0xa8>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
ffc0eb08: 48 00 2c 75 bl ffc1177c <__errno>
ffc0eb0c: 81 23 00 00 lwz r9,0(r3)
ffc0eb10: 2f 89 00 22 cmpwi cr7,r9,34
ffc0eb14: 40 be 00 28 bne+ cr7,ffc0eb3c <rtems_string_to_long+0x98>
ffc0eb18: 2f 9f 00 00 cmpwi cr7,r31,0
(( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
return RTEMS_INVALID_NUMBER;
ffc0eb1c: 38 60 00 0a li r3,10
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
ffc0eb20: 41 be 00 2c beq+ cr7,ffc0eb4c <rtems_string_to_long+0xa8><== NEVER TAKEN
(( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
ffc0eb24: 6f ea 80 00 xoris r10,r31,32768
ffc0eb28: 2f 8a ff ff cmpwi cr7,r10,-1
ffc0eb2c: 41 9e 00 20 beq- cr7,ffc0eb4c <rtems_string_to_long+0xa8>
ffc0eb30: 3d 40 80 00 lis r10,-32768
ffc0eb34: 7f 9f 50 00 cmpw cr7,r31,r10
ffc0eb38: 41 9e 00 14 beq- cr7,ffc0eb4c <rtems_string_to_long+0xa8><== ALWAYS TAKEN
return RTEMS_INVALID_NUMBER;
*n = result;
ffc0eb3c: 93 fe 00 00 stw r31,0(r30)
return RTEMS_SUCCESSFUL;
ffc0eb40: 38 60 00 00 li r3,0
ffc0eb44: 48 00 00 08 b ffc0eb4c <rtems_string_to_long+0xa8>
{
long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
ffc0eb48: 38 60 00 09 li r3,9
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
ffc0eb4c: 39 61 00 28 addi r11,r1,40
ffc0eb50: 4b ff 46 84 b ffc031d4 <_restgpr_28_x>
ffc0e9c8 <rtems_string_to_long_long>:
const char *s,
long long *n,
char **endptr,
int base
)
{
ffc0e9c8: 94 21 ff d0 stwu r1,-48(r1)
ffc0e9cc: 7c 08 02 a6 mflr r0
ffc0e9d0: bf 61 00 1c stmw r27,28(r1)
long long result;
char *end;
if ( !n )
ffc0e9d4: 7c 9d 23 79 mr. r29,r4
const char *s,
long long *n,
char **endptr,
int base
)
{
ffc0e9d8: 90 01 00 34 stw r0,52(r1)
long long result;
char *end;
if ( !n )
ffc0e9dc: 41 82 00 b8 beq- ffc0ea94 <rtems_string_to_long_long+0xcc>
ffc0e9e0: 7c df 33 78 mr r31,r6
ffc0e9e4: 7c bb 2b 78 mr r27,r5
ffc0e9e8: 7c 7c 1b 78 mr r28,r3
return RTEMS_INVALID_ADDRESS;
errno = 0;
ffc0e9ec: 48 00 2d 91 bl ffc1177c <__errno>
*n = 0;
ffc0e9f0: 39 40 00 00 li r10,0
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
ffc0e9f4: 39 20 00 00 li r9,0
*n = 0;
ffc0e9f8: 39 60 00 00 li r11,0
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
ffc0e9fc: 91 23 00 00 stw r9,0(r3)
*n = 0;
result = strtoll( s, &end, base );
ffc0ea00: 7f e5 fb 78 mr r5,r31
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
ffc0ea04: 91 5d 00 00 stw r10,0(r29)
result = strtoll( s, &end, base );
ffc0ea08: 7f 83 e3 78 mr r3,r28
ffc0ea0c: 38 81 00 08 addi r4,r1,8
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
ffc0ea10: 91 7d 00 04 stw r11,4(r29)
result = strtoll( s, &end, base );
ffc0ea14: 48 00 5b ad bl ffc145c0 <strtoll>
if ( endptr )
ffc0ea18: 2f 9b 00 00 cmpwi cr7,r27,0
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtoll( s, &end, base );
ffc0ea1c: 7c 7f 1b 78 mr r31,r3
ffc0ea20: 81 41 00 08 lwz r10,8(r1)
ffc0ea24: 7c 9e 23 78 mr r30,r4
if ( endptr )
ffc0ea28: 41 9e 00 08 beq- cr7,ffc0ea30 <rtems_string_to_long_long+0x68>
*endptr = end;
ffc0ea2c: 91 5b 00 00 stw r10,0(r27)
if ( end == s )
ffc0ea30: 7f 8a e0 00 cmpw cr7,r10,r28
return RTEMS_NOT_DEFINED;
ffc0ea34: 38 60 00 0b li r3,11
result = strtoll( s, &end, base );
if ( endptr )
*endptr = end;
if ( end == s )
ffc0ea38: 41 9e 00 64 beq- cr7,ffc0ea9c <rtems_string_to_long_long+0xd4>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
ffc0ea3c: 48 00 2d 41 bl ffc1177c <__errno>
ffc0ea40: 81 23 00 00 lwz r9,0(r3)
ffc0ea44: 2f 89 00 22 cmpwi cr7,r9,34
ffc0ea48: 40 be 00 3c bne+ cr7,ffc0ea84 <rtems_string_to_long_long+0xbc>
ffc0ea4c: 7f e9 f3 79 or. r9,r31,r30
(( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN )))
return RTEMS_INVALID_NUMBER;
ffc0ea50: 38 60 00 0a li r3,10
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
ffc0ea54: 41 a2 00 48 beq+ ffc0ea9c <rtems_string_to_long_long+0xd4><== NEVER TAKEN
(( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN )))
ffc0ea58: 6f ea 80 00 xoris r10,r31,32768
ffc0ea5c: 2f 8a ff ff cmpwi cr7,r10,-1
ffc0ea60: 40 9e 00 0c bne- cr7,ffc0ea6c <rtems_string_to_long_long+0xa4>
ffc0ea64: 2f 9e ff ff cmpwi cr7,r30,-1
ffc0ea68: 41 9e 00 34 beq- cr7,ffc0ea9c <rtems_string_to_long_long+0xd4><== ALWAYS TAKEN
ffc0ea6c: 3d 20 80 00 lis r9,-32768
ffc0ea70: 7f 9f 48 00 cmpw cr7,r31,r9
ffc0ea74: 40 be 00 10 bne+ cr7,ffc0ea84 <rtems_string_to_long_long+0xbc><== NEVER TAKEN
ffc0ea78: 2f 9e 00 00 cmpwi cr7,r30,0
return RTEMS_INVALID_NUMBER;
ffc0ea7c: 38 60 00 0a li r3,10
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN )))
ffc0ea80: 41 9e 00 1c beq- cr7,ffc0ea9c <rtems_string_to_long_long+0xd4><== ALWAYS TAKEN
return RTEMS_INVALID_NUMBER;
*n = result;
ffc0ea84: 93 fd 00 00 stw r31,0(r29)
return RTEMS_SUCCESSFUL;
ffc0ea88: 38 60 00 00 li r3,0
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN )))
return RTEMS_INVALID_NUMBER;
*n = result;
ffc0ea8c: 93 dd 00 04 stw r30,4(r29)
ffc0ea90: 48 00 00 0c b ffc0ea9c <rtems_string_to_long_long+0xd4>
{
long long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
ffc0ea94: 38 60 00 09 li r3,9
ffc0ea98: 48 00 00 04 b ffc0ea9c <rtems_string_to_long_long+0xd4>
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
ffc0ea9c: 39 61 00 30 addi r11,r1,48
ffc0eaa0: 4b ff 47 30 b ffc031d0 <_restgpr_27_x>
ffc1e4d4 <rtems_string_to_unsigned_char>:
const char *s,
unsigned char *n,
char **endptr,
int base
)
{
ffc1e4d4: 94 21 ff d8 stwu r1,-40(r1)
ffc1e4d8: 7c 08 02 a6 mflr r0
ffc1e4dc: bf 81 00 18 stmw r28,24(r1)
unsigned long result;
char *end;
if ( !n )
ffc1e4e0: 7c 9e 23 79 mr. r30,r4
const char *s,
unsigned char *n,
char **endptr,
int base
)
{
ffc1e4e4: 90 01 00 2c stw r0,44(r1)
unsigned long result;
char *end;
if ( !n )
ffc1e4e8: 41 82 00 9c beq- ffc1e584 <rtems_string_to_unsigned_char+0xb0>
ffc1e4ec: 7c df 33 78 mr r31,r6
ffc1e4f0: 7c bc 2b 78 mr r28,r5
ffc1e4f4: 7c 7d 1b 78 mr r29,r3
return RTEMS_INVALID_ADDRESS;
errno = 0;
ffc1e4f8: 48 01 9f 11 bl ffc38408 <__errno>
ffc1e4fc: 39 20 00 00 li r9,0
ffc1e500: 91 23 00 00 stw r9,0(r3)
*n = 0;
result = strtoul( s, &end, base );
ffc1e504: 7f e5 fb 78 mr r5,r31
ffc1e508: 7f a3 eb 78 mr r3,r29
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
ffc1e50c: 99 3e 00 00 stb r9,0(r30)
result = strtoul( s, &end, base );
ffc1e510: 38 81 00 08 addi r4,r1,8
ffc1e514: 48 02 37 f5 bl ffc41d08 <strtoul>
if ( endptr )
ffc1e518: 2f 9c 00 00 cmpwi cr7,r28,0
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtoul( s, &end, base );
ffc1e51c: 7c 7f 1b 78 mr r31,r3
ffc1e520: 81 41 00 08 lwz r10,8(r1)
if ( endptr )
ffc1e524: 41 9e 00 08 beq- cr7,ffc1e52c <rtems_string_to_unsigned_char+0x58>
*endptr = end;
ffc1e528: 91 5c 00 00 stw r10,0(r28)
if ( end == s )
ffc1e52c: 7f 8a e8 00 cmpw cr7,r10,r29
return RTEMS_NOT_DEFINED;
ffc1e530: 38 60 00 0b li r3,11
result = strtoul( s, &end, base );
if ( endptr )
*endptr = end;
if ( end == s )
ffc1e534: 41 9e 00 54 beq- cr7,ffc1e588 <rtems_string_to_unsigned_char+0xb4>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
ffc1e538: 48 01 9e d1 bl ffc38408 <__errno>
ffc1e53c: 81 23 00 00 lwz r9,0(r3)
ffc1e540: 2f 89 00 22 cmpwi cr7,r9,34
ffc1e544: 40 be 00 18 bne+ cr7,ffc1e55c <rtems_string_to_unsigned_char+0x88>
(( result == 0 ) || ( result == ULONG_MAX )))
ffc1e548: 39 1f ff ff addi r8,r31,-1
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
ffc1e54c: 39 40 ff fd li r10,-3
ffc1e550: 7f 88 50 40 cmplw cr7,r8,r10
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
ffc1e554: 38 60 00 0a li r3,10
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
ffc1e558: 41 bd 00 30 bgt+ cr7,ffc1e588 <rtems_string_to_unsigned_char+0xb4><== ALWAYS TAKEN
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
#if (UCHAR_MAX < ULONG_MAX)
if ( result > UCHAR_MAX ) {
ffc1e55c: 2b 9f 00 ff cmplwi cr7,r31,255
ffc1e560: 40 9d 00 18 ble- cr7,ffc1e578 <rtems_string_to_unsigned_char+0xa4>
errno = ERANGE;
ffc1e564: 48 01 9e a5 bl ffc38408 <__errno>
ffc1e568: 39 20 00 22 li r9,34
ffc1e56c: 91 23 00 00 stw r9,0(r3)
return RTEMS_INVALID_NUMBER;
ffc1e570: 38 60 00 0a li r3,10
ffc1e574: 48 00 00 14 b ffc1e588 <rtems_string_to_unsigned_char+0xb4>
}
#endif
*n = result;
ffc1e578: 9b fe 00 00 stb r31,0(r30)
return RTEMS_SUCCESSFUL;
ffc1e57c: 38 60 00 00 li r3,0
ffc1e580: 48 00 00 08 b ffc1e588 <rtems_string_to_unsigned_char+0xb4>
{
unsigned long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
ffc1e584: 38 60 00 09 li r3,9
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
ffc1e588: 39 61 00 28 addi r11,r1,40
ffc1e58c: 48 03 5f 74 b ffc54500 <_restgpr_28_x>
ffc0ec18 <rtems_string_to_unsigned_int>:
const char *s,
unsigned int *n,
char **endptr,
int base
)
{
ffc0ec18: 94 21 ff d8 stwu r1,-40(r1)
ffc0ec1c: 7c 08 02 a6 mflr r0
ffc0ec20: bf 81 00 18 stmw r28,24(r1)
unsigned long result;
char *end;
if ( !n )
ffc0ec24: 7c 9f 23 79 mr. r31,r4
const char *s,
unsigned int *n,
char **endptr,
int base
)
{
ffc0ec28: 90 01 00 2c stw r0,44(r1)
unsigned long result;
char *end;
if ( !n )
ffc0ec2c: 41 82 00 80 beq- ffc0ecac <rtems_string_to_unsigned_int+0x94>
ffc0ec30: 7c dc 33 78 mr r28,r6
ffc0ec34: 7c bd 2b 78 mr r29,r5
ffc0ec38: 7c 7e 1b 78 mr r30,r3
return RTEMS_INVALID_ADDRESS;
errno = 0;
ffc0ec3c: 48 00 2b 41 bl ffc1177c <__errno>
ffc0ec40: 39 20 00 00 li r9,0
ffc0ec44: 91 23 00 00 stw r9,0(r3)
*n = 0;
result = strtoul( s, &end, base );
ffc0ec48: 7f 85 e3 78 mr r5,r28
ffc0ec4c: 7f c3 f3 78 mr r3,r30
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
ffc0ec50: 91 3f 00 00 stw r9,0(r31)
result = strtoul( s, &end, base );
ffc0ec54: 38 81 00 08 addi r4,r1,8
ffc0ec58: 48 00 5f 41 bl ffc14b98 <strtoul>
if ( endptr )
ffc0ec5c: 2f 9d 00 00 cmpwi cr7,r29,0
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtoul( s, &end, base );
ffc0ec60: 7c 7c 1b 78 mr r28,r3
ffc0ec64: 81 41 00 08 lwz r10,8(r1)
if ( endptr )
ffc0ec68: 41 9e 00 08 beq- cr7,ffc0ec70 <rtems_string_to_unsigned_int+0x58>
*endptr = end;
ffc0ec6c: 91 5d 00 00 stw r10,0(r29)
if ( end == s )
ffc0ec70: 7f 8a f0 00 cmpw cr7,r10,r30
return RTEMS_NOT_DEFINED;
ffc0ec74: 38 60 00 0b li r3,11
result = strtoul( s, &end, base );
if ( endptr )
*endptr = end;
if ( end == s )
ffc0ec78: 41 9e 00 38 beq- cr7,ffc0ecb0 <rtems_string_to_unsigned_int+0x98>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
ffc0ec7c: 48 00 2b 01 bl ffc1177c <__errno>
ffc0ec80: 81 23 00 00 lwz r9,0(r3)
ffc0ec84: 2f 89 00 22 cmpwi cr7,r9,34
ffc0ec88: 40 be 00 18 bne+ cr7,ffc0eca0 <rtems_string_to_unsigned_int+0x88>
(( result == 0 ) || ( result == ULONG_MAX )))
ffc0ec8c: 39 1c ff ff addi r8,r28,-1
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
ffc0ec90: 39 40 ff fd li r10,-3
ffc0ec94: 7f 88 50 40 cmplw cr7,r8,r10
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
ffc0ec98: 38 60 00 0a li r3,10
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
ffc0ec9c: 41 bd 00 14 bgt+ cr7,ffc0ecb0 <rtems_string_to_unsigned_int+0x98><== ALWAYS TAKEN
errno = ERANGE;
return RTEMS_INVALID_NUMBER;
}
#endif
*n = result;
ffc0eca0: 93 9f 00 00 stw r28,0(r31)
return RTEMS_SUCCESSFUL;
ffc0eca4: 38 60 00 00 li r3,0
ffc0eca8: 48 00 00 08 b ffc0ecb0 <rtems_string_to_unsigned_int+0x98>
{
unsigned long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
ffc0ecac: 38 60 00 09 li r3,9
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
ffc0ecb0: 39 61 00 28 addi r11,r1,40
ffc0ecb4: 4b ff 45 20 b ffc031d4 <_restgpr_28_x>
ffc0c5d8 <rtems_string_to_unsigned_long>:
const char *s,
unsigned long *n,
char **endptr,
int base
)
{
ffc0c5d8: 94 21 ff d8 stwu r1,-40(r1)
ffc0c5dc: 7c 08 02 a6 mflr r0
ffc0c5e0: bf 81 00 18 stmw r28,24(r1)
unsigned long result;
char *end;
if ( !n )
ffc0c5e4: 7c 9f 23 79 mr. r31,r4
const char *s,
unsigned long *n,
char **endptr,
int base
)
{
ffc0c5e8: 90 01 00 2c stw r0,44(r1)
unsigned long result;
char *end;
if ( !n )
ffc0c5ec: 41 82 00 80 beq- ffc0c66c <rtems_string_to_unsigned_long+0x94>
ffc0c5f0: 7c dc 33 78 mr r28,r6
ffc0c5f4: 7c bd 2b 78 mr r29,r5
ffc0c5f8: 7c 7e 1b 78 mr r30,r3
return RTEMS_INVALID_ADDRESS;
errno = 0;
ffc0c5fc: 48 02 be 0d bl ffc38408 <__errno>
ffc0c600: 39 20 00 00 li r9,0
ffc0c604: 91 23 00 00 stw r9,0(r3)
*n = 0;
result = strtoul( s, &end, base );
ffc0c608: 7f 85 e3 78 mr r5,r28
ffc0c60c: 7f c3 f3 78 mr r3,r30
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
ffc0c610: 91 3f 00 00 stw r9,0(r31)
result = strtoul( s, &end, base );
ffc0c614: 38 81 00 08 addi r4,r1,8
ffc0c618: 48 03 56 f1 bl ffc41d08 <strtoul>
if ( endptr )
ffc0c61c: 2f 9d 00 00 cmpwi cr7,r29,0
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtoul( s, &end, base );
ffc0c620: 7c 7c 1b 78 mr r28,r3
ffc0c624: 81 41 00 08 lwz r10,8(r1)
if ( endptr )
ffc0c628: 41 9e 00 08 beq- cr7,ffc0c630 <rtems_string_to_unsigned_long+0x58>
*endptr = end;
ffc0c62c: 91 5d 00 00 stw r10,0(r29)
if ( end == s )
ffc0c630: 7f 8a f0 00 cmpw cr7,r10,r30
return RTEMS_NOT_DEFINED;
ffc0c634: 38 60 00 0b li r3,11
result = strtoul( s, &end, base );
if ( endptr )
*endptr = end;
if ( end == s )
ffc0c638: 41 9e 00 38 beq- cr7,ffc0c670 <rtems_string_to_unsigned_long+0x98>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
ffc0c63c: 48 02 bd cd bl ffc38408 <__errno>
ffc0c640: 81 23 00 00 lwz r9,0(r3)
ffc0c644: 2f 89 00 22 cmpwi cr7,r9,34
ffc0c648: 40 be 00 18 bne+ cr7,ffc0c660 <rtems_string_to_unsigned_long+0x88>
(( result == 0 ) || ( result == ULONG_MAX )))
ffc0c64c: 39 1c ff ff addi r8,r28,-1
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
ffc0c650: 39 40 ff fd li r10,-3
ffc0c654: 7f 88 50 40 cmplw cr7,r8,r10
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
ffc0c658: 38 60 00 0a li r3,10
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
ffc0c65c: 41 bd 00 14 bgt+ cr7,ffc0c670 <rtems_string_to_unsigned_long+0x98><== ALWAYS TAKEN
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
*n = result;
ffc0c660: 93 9f 00 00 stw r28,0(r31)
return RTEMS_SUCCESSFUL;
ffc0c664: 38 60 00 00 li r3,0
ffc0c668: 48 00 00 08 b ffc0c670 <rtems_string_to_unsigned_long+0x98>
{
unsigned long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
ffc0c66c: 38 60 00 09 li r3,9
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
ffc0c670: 39 61 00 28 addi r11,r1,40
ffc0c674: 48 04 7e 8c b ffc54500 <_restgpr_28_x>
ffc0ecb8 <rtems_string_to_unsigned_long_long>:
const char *s,
unsigned long long *n,
char **endptr,
int base
)
{
ffc0ecb8: 94 21 ff d0 stwu r1,-48(r1)
ffc0ecbc: 7c 08 02 a6 mflr r0
ffc0ecc0: bf 61 00 1c stmw r27,28(r1)
unsigned long long result;
char *end;
if ( !n )
ffc0ecc4: 7c 9d 23 79 mr. r29,r4
const char *s,
unsigned long long *n,
char **endptr,
int base
)
{
ffc0ecc8: 90 01 00 34 stw r0,52(r1)
unsigned long long result;
char *end;
if ( !n )
ffc0eccc: 41 82 00 a0 beq- ffc0ed6c <rtems_string_to_unsigned_long_long+0xb4>
ffc0ecd0: 7c df 33 78 mr r31,r6
ffc0ecd4: 7c bb 2b 78 mr r27,r5
ffc0ecd8: 7c 7c 1b 78 mr r28,r3
return RTEMS_INVALID_ADDRESS;
errno = 0;
ffc0ecdc: 48 00 2a a1 bl ffc1177c <__errno>
*n = 0;
ffc0ece0: 39 40 00 00 li r10,0
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
ffc0ece4: 39 20 00 00 li r9,0
*n = 0;
ffc0ece8: 39 60 00 00 li r11,0
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
ffc0ecec: 91 23 00 00 stw r9,0(r3)
*n = 0;
result = strtoull( s, &end, base );
ffc0ecf0: 7f e5 fb 78 mr r5,r31
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
ffc0ecf4: 91 5d 00 00 stw r10,0(r29)
result = strtoull( s, &end, base );
ffc0ecf8: 7f 83 e3 78 mr r3,r28
ffc0ecfc: 38 81 00 08 addi r4,r1,8
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
ffc0ed00: 91 7d 00 04 stw r11,4(r29)
result = strtoull( s, &end, base );
ffc0ed04: 48 00 5e b5 bl ffc14bb8 <strtoull>
if ( endptr )
ffc0ed08: 2f 9b 00 00 cmpwi cr7,r27,0
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtoull( s, &end, base );
ffc0ed0c: 7c 9f 23 78 mr r31,r4
ffc0ed10: 81 41 00 08 lwz r10,8(r1)
ffc0ed14: 7c 7e 1b 78 mr r30,r3
if ( endptr )
ffc0ed18: 41 9e 00 08 beq- cr7,ffc0ed20 <rtems_string_to_unsigned_long_long+0x68>
*endptr = end;
ffc0ed1c: 91 5b 00 00 stw r10,0(r27)
if ( end == s )
ffc0ed20: 7f 8a e0 00 cmpw cr7,r10,r28
return RTEMS_NOT_DEFINED;
ffc0ed24: 38 60 00 0b li r3,11
result = strtoull( s, &end, base );
if ( endptr )
*endptr = end;
if ( end == s )
ffc0ed28: 41 9e 00 48 beq- cr7,ffc0ed70 <rtems_string_to_unsigned_long_long+0xb8>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
ffc0ed2c: 48 00 2a 51 bl ffc1177c <__errno>
ffc0ed30: 81 23 00 00 lwz r9,0(r3)
ffc0ed34: 2f 89 00 22 cmpwi cr7,r9,34
ffc0ed38: 40 be 00 24 bne+ cr7,ffc0ed5c <rtems_string_to_unsigned_long_long+0xa4>
(( result == 0 ) || ( result == ULONG_LONG_MAX )))
ffc0ed3c: 31 7f ff ff addic r11,r31,-1
ffc0ed40: 7d 5e 01 d4 addme r10,r30
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
ffc0ed44: 2f 8a ff ff cmpwi cr7,r10,-1
ffc0ed48: 40 9e 00 14 bne- cr7,ffc0ed5c <rtems_string_to_unsigned_long_long+0xa4><== NEVER TAKEN
ffc0ed4c: 39 40 ff fd li r10,-3
ffc0ed50: 7f 8b 50 40 cmplw cr7,r11,r10
(( result == 0 ) || ( result == ULONG_LONG_MAX )))
return RTEMS_INVALID_NUMBER;
ffc0ed54: 38 60 00 0a li r3,10
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
ffc0ed58: 41 bd 00 18 bgt+ cr7,ffc0ed70 <rtems_string_to_unsigned_long_long+0xb8><== ALWAYS TAKEN
(( result == 0 ) || ( result == ULONG_LONG_MAX )))
return RTEMS_INVALID_NUMBER;
*n = result;
ffc0ed5c: 93 dd 00 00 stw r30,0(r29)
return RTEMS_SUCCESSFUL;
ffc0ed60: 38 60 00 00 li r3,0
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == ULONG_LONG_MAX )))
return RTEMS_INVALID_NUMBER;
*n = result;
ffc0ed64: 93 fd 00 04 stw r31,4(r29)
ffc0ed68: 48 00 00 08 b ffc0ed70 <rtems_string_to_unsigned_long_long+0xb8>
{
unsigned long long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
ffc0ed6c: 38 60 00 09 li r3,9
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
ffc0ed70: 39 61 00 30 addi r11,r1,48
ffc0ed74: 4b ff 44 5c b ffc031d0 <_restgpr_27_x>
ffc03c08 <rtems_tarfs_load>:
int rtems_tarfs_load(
const char *mountpoint,
uint8_t *tar_image,
size_t tar_size
)
{
ffc03c08: 94 21 fd f8 stwu r1,-520(r1)
ffc03c0c: 7c 08 02 a6 mflr r0
ffc03c10: be 21 01 cc stmw r17,460(r1)
ffc03c14: 7c 7b 1b 78 mr r27,r3
ffc03c18: 7c 9a 23 78 mr r26,r4
ffc03c1c: 7c b6 2b 78 mr r22,r5
ffc03c20: 90 01 02 0c stw r0,524(r1)
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 =
ffc03c24: 7f 64 db 78 mr r4,r27
ffc03c28: 38 a0 00 18 li r5,24
ffc03c2c: 38 61 01 6c addi r3,r1,364
ffc03c30: 48 00 22 41 bl ffc05e70 <rtems_filesystem_eval_path_start>
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(
ffc03c34: 38 81 01 84 addi r4,r1,388
ffc03c38: 7c 7d 1b 78 mr r29,r3
ffc03c3c: 38 61 01 a4 addi r3,r1,420
ffc03c40: 48 00 27 6d bl ffc063ac <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;
ffc03c44: 39 20 00 60 li r9,96
ffc03c48: 91 21 01 7c stw r9,380(r1)
rtems_filesystem_eval_path_set_flags(
&ctx,
RTEMS_FS_MAKE | RTEMS_FS_EXCLUSIVE
);
if (
ffc03c4c: 3d 40 ff c2 lis r10,-62
ffc03c50: 39 4a 15 ac addi r10,r10,5548
rootloc.mt_entry->ops != &IMFS_ops
ffc03c54: 81 21 01 b8 lwz r9,440(r1)
ffc03c58: 81 29 00 0c lwz r9,12(r9)
rtems_filesystem_eval_path_set_flags(
&ctx,
RTEMS_FS_MAKE | RTEMS_FS_EXCLUSIVE
);
if (
ffc03c5c: 7f 89 50 00 cmpw cr7,r9,r10
ffc03c60: 41 9e 00 14 beq- cr7,ffc03c74 <rtems_tarfs_load+0x6c>
rootloc.mt_entry->ops != &IMFS_ops
&& rootloc.mt_entry->ops != &fifoIMFS_ops
ffc03c64: 3d 40 ff c2 lis r10,-62
ffc03c68: 39 4a 1d 60 addi r10,r10,7520
ffc03c6c: 7f 89 50 00 cmpw cr7,r9,r10
ffc03c70: 40 9e 01 88 bne- cr7,ffc03df8 <rtems_tarfs_load+0x1f0> <== ALWAYS TAKEN
/*
* Read a header.
*/
hdr_ptr = (char *) &tar_image[offset];
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar", 5))
ffc03c74: 3e a0 ff c2 lis r21,-62
filename,
strlen( filename )
);
rtems_filesystem_eval_path_continue( &ctx );
if ( !rtems_filesystem_location_is_null( currentloc ) ) {
ffc03c78: 3e 80 ff c2 lis r20,-62
* - For files, create a file node with special tarfs properties.
*/
if (linkflag == DIRTYPE) {
strcpy(full_filename, mountpoint);
if (full_filename[strlen(full_filename)-1] != '/')
strcat(full_filename, "/");
ffc03c7c: 3e 60 ff c2 lis r19,-62
rtems_filesystem_eval_path_set_flags(
&ctx,
RTEMS_FS_MAKE | RTEMS_FS_EXCLUSIVE
);
if (
ffc03c80: 3b e0 00 00 li r31,0
/*
* Read a header.
*/
hdr_ptr = (char *) &tar_image[offset];
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar", 5))
ffc03c84: 3a b5 16 30 addi r21,r21,5680
break;
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
ffc03c88: 3b 81 01 08 addi r28,r1,264
filename,
strlen( filename )
);
rtems_filesystem_eval_path_continue( &ctx );
if ( !rtems_filesystem_location_is_null( currentloc ) ) {
ffc03c8c: 3a 94 1b e4 addi r20,r20,7140
* - For files, create a file node with special tarfs properties.
*/
if (linkflag == DIRTYPE) {
strcpy(full_filename, mountpoint);
if (full_filename[strlen(full_filename)-1] != '/')
strcat(full_filename, "/");
ffc03c90: 3a 73 e2 5d addi r19,r19,-7587
/*
* Create an IMFS node structure pointing to tar image memory.
*/
offset = 0;
while ( rv == 0 ) {
if (offset + 512 > tar_size)
ffc03c94: 3b df 02 00 addi r30,r31,512
ffc03c98: 7f 9e b0 40 cmplw cr7,r30,r22
ffc03c9c: 41 9d 01 64 bgt- cr7,ffc03e00 <rtems_tarfs_load+0x1f8> <== NEVER TAKEN
break;
/*
* Read a header.
*/
hdr_ptr = (char *) &tar_image[offset];
ffc03ca0: 7f fa fa 14 add r31,r26,r31
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar", 5))
ffc03ca4: 38 7f 01 01 addi r3,r31,257
ffc03ca8: 7e a4 ab 78 mr r4,r21
ffc03cac: 38 a0 00 05 li r5,5
ffc03cb0: 48 01 14 a9 bl ffc15158 <strncmp>
ffc03cb4: 7c 78 1b 79 mr. r24,r3
ffc03cb8: 40 82 01 48 bne- ffc03e00 <rtems_tarfs_load+0x1f8>
break;
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
ffc03cbc: 38 a0 00 63 li r5,99
ffc03cc0: 7f e4 fb 78 mr r4,r31
ffc03cc4: 7f 83 e3 78 mr r3,r28
ffc03cc8: 48 01 15 c9 bl ffc15290 <strncpy>
filename[MAX_NAME_FIELD_SIZE] = '\0';
linkflag = hdr_ptr[156];
file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8);
ffc03ccc: 38 80 00 08 li r4,8
ffc03cd0: 38 7f 00 64 addi r3,r31,100
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar", 5))
break;
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
filename[MAX_NAME_FIELD_SIZE] = '\0';
ffc03cd4: 9b 01 01 6b stb r24,363(r1)
linkflag = hdr_ptr[156];
ffc03cd8: 8a ff 00 9c lbz r23,156(r31)
file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8);
ffc03cdc: 48 00 8a 15 bl ffc0c6f0 <_rtems_octal2ulong>
ffc03ce0: 7c 72 1b 78 mr r18,r3
file_size = _rtems_octal2ulong(&hdr_ptr[124], 12);
ffc03ce4: 38 80 00 0c li r4,12
ffc03ce8: 38 7f 00 7c addi r3,r31,124
ffc03cec: 48 00 8a 05 bl ffc0c6f0 <_rtems_octal2ulong>
hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8);
ffc03cf0: 38 80 00 08 li r4,8
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
filename[MAX_NAME_FIELD_SIZE] = '\0';
linkflag = hdr_ptr[156];
file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8);
file_size = _rtems_octal2ulong(&hdr_ptr[124], 12);
ffc03cf4: 7c 79 1b 78 mr r25,r3
hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8);
ffc03cf8: 38 7f 00 94 addi r3,r31,148
ffc03cfc: 48 00 89 f5 bl ffc0c6f0 <_rtems_octal2ulong>
ffc03d00: 7c 71 1b 78 mr r17,r3
if (_rtems_tar_header_checksum(hdr_ptr) != hdr_chksum)
ffc03d04: 7f e3 fb 78 mr r3,r31
ffc03d08: 48 00 8a 29 bl ffc0c730 <_rtems_tar_header_checksum>
ffc03d0c: 7f 83 88 00 cmpw cr7,r3,r17
ffc03d10: 40 9e 00 f0 bne- cr7,ffc03e00 <rtems_tarfs_load+0x1f8> <== 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) {
ffc03d14: 2f 97 00 35 cmpwi cr7,r23,53
ffc03d18: 40 be 00 54 bne+ cr7,ffc03d6c <rtems_tarfs_load+0x164>
strcpy(full_filename, mountpoint);
ffc03d1c: 7f 64 db 78 mr r4,r27
ffc03d20: 38 61 00 08 addi r3,r1,8
ffc03d24: 48 01 0e a9 bl ffc14bcc <strcpy>
if (full_filename[strlen(full_filename)-1] != '/')
ffc03d28: 38 61 00 08 addi r3,r1,8
ffc03d2c: 48 01 13 91 bl ffc150bc <strlen>
ffc03d30: 39 21 00 08 addi r9,r1,8
ffc03d34: 7c 69 1a 14 add r3,r9,r3
ffc03d38: 89 23 ff ff lbz r9,-1(r3)
ffc03d3c: 2f 89 00 2f cmpwi cr7,r9,47
ffc03d40: 41 9e 00 10 beq- cr7,ffc03d50 <rtems_tarfs_load+0x148> <== ALWAYS TAKEN
strcat(full_filename, "/");
ffc03d44: 38 61 00 08 addi r3,r1,8 <== NOT EXECUTED
ffc03d48: 7e 64 9b 78 mr r4,r19 <== NOT EXECUTED
ffc03d4c: 48 01 0d 49 bl ffc14a94 <strcat> <== NOT EXECUTED
strcat(full_filename, filename);
ffc03d50: 7f 84 e3 78 mr r4,r28
ffc03d54: 38 61 00 08 addi r3,r1,8
ffc03d58: 48 01 0d 3d bl ffc14a94 <strcat>
mkdir(full_filename, S_IRWXU | S_IRWXG | S_IRWXO);
ffc03d5c: 38 61 00 08 addi r3,r1,8
ffc03d60: 38 80 01 ff li r4,511
ffc03d64: 48 00 11 b1 bl ffc04f14 <mkdir>
ffc03d68: 48 00 00 88 b ffc03df0 <rtems_tarfs_load+0x1e8>
}
/*
* Create a LINEAR_FILE node
*/
else if (linkflag == REGTYPE) {
ffc03d6c: 2f 97 00 30 cmpwi cr7,r23,48
ffc03d70: 40 be 00 80 bne+ cr7,ffc03df0 <rtems_tarfs_load+0x1e8>
rtems_filesystem_location_free( currentloc );
ffc03d74: 7f a3 eb 78 mr r3,r29
ffc03d78: 48 00 0a a9 bl ffc04820 <rtems_filesystem_location_free>
rtems_filesystem_location_clone( currentloc, &rootloc );
ffc03d7c: 38 81 01 a4 addi r4,r1,420
ffc03d80: 7f a3 eb 78 mr r3,r29
ffc03d84: 48 00 06 ad bl ffc04430 <rtems_filesystem_location_clone>
rtems_filesystem_eval_path_set_path(
ffc03d88: 7f 83 e3 78 mr r3,r28
ffc03d8c: 48 01 13 31 bl ffc150bc <strlen>
rtems_filesystem_eval_path_context_t *ctx,
const char *path,
size_t pathlen
)
{
ctx->path = path;
ffc03d90: 93 81 01 6c stw r28,364(r1)
ctx->pathlen = pathlen;
ffc03d94: 90 61 01 70 stw r3,368(r1)
&ctx,
filename,
strlen( filename )
);
rtems_filesystem_eval_path_continue( &ctx );
ffc03d98: 38 61 01 6c addi r3,r1,364
ffc03d9c: 48 00 1e cd bl ffc05c68 <rtems_filesystem_eval_path_continue>
if ( !rtems_filesystem_location_is_null( currentloc ) ) {
ffc03da0: 81 3d 00 10 lwz r9,16(r29)
ffc03da4: 7f 89 a0 00 cmpw cr7,r9,r20
ffc03da8: 41 9e 00 3c beq- cr7,ffc03de4 <rtems_tarfs_load+0x1dc> <== NEVER TAKEN
size_t namelen,
mode_t mode,
const IMFS_types_union *info
)
{
const IMFS_fs_info_t *fs_info =
ffc03dac: 81 3d 00 14 lwz r9,20(r29)
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,
ffc03db0: 56 47 05 fe clrlwi r7,r18,23
(const IMFS_fs_info_t *) parentloc->mt_entry->fs_info;
return IMFS_create_node_with_control(
ffc03db4: 80 a1 01 74 lwz r5,372(r1)
ffc03db8: 7f a3 eb 78 mr r3,r29
ffc03dbc: 81 29 00 08 lwz r9,8(r9)
ffc03dc0: 60 e7 80 00 ori r7,r7,32768
ffc03dc4: 80 c1 01 78 lwz r6,376(r1)
ffc03dc8: 39 00 00 00 li r8,0
ffc03dcc: 80 89 00 1c lwz r4,28(r9)
ffc03dd0: 48 00 90 3d bl ffc0ce0c <IMFS_create_node_with_control>
NULL
);
node->info.linearfile.size = file_size;
node->info.linearfile.direct = &tar_image[offset];
ffc03dd4: 7d 5a f2 14 add r10,r26,r30
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;
ffc03dd8: 93 23 00 54 stw r25,84(r3)
ffc03ddc: 93 03 00 50 stw r24,80(r3)
node->info.linearfile.direct = &tar_image[offset];
ffc03de0: 91 43 00 58 stw r10,88(r3)
}
nblocks = (((file_size) + 511) & ~511) / 512;
ffc03de4: 3b 39 01 ff addi r25,r25,511
offset += 512 * nblocks;
ffc03de8: 57 39 00 2c rlwinm r25,r25,0,0,22
ffc03dec: 7f d9 f2 14 add r30,r25,r30
rtems_filesystem_eval_path_set_flags(
&ctx,
RTEMS_FS_MAKE | RTEMS_FS_EXCLUSIVE
);
if (
ffc03df0: 7f df f3 78 mr r31,r30
ffc03df4: 4b ff fe a0 b ffc03c94 <rtems_tarfs_load+0x8c>
rootloc.mt_entry->ops != &IMFS_ops
&& rootloc.mt_entry->ops != &fifoIMFS_ops
) {
rv = -1;
ffc03df8: 3b e0 ff ff li r31,-1
ffc03dfc: 48 00 00 08 b ffc03e04 <rtems_tarfs_load+0x1fc>
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)
ffc03e00: 3b e0 00 00 li r31,0
nblocks = (((file_size) + 511) & ~511) / 512;
offset += 512 * nblocks;
}
}
rtems_filesystem_location_free( &rootloc );
ffc03e04: 38 61 01 a4 addi r3,r1,420
ffc03e08: 48 00 0a 19 bl ffc04820 <rtems_filesystem_location_free>
rtems_filesystem_eval_path_cleanup( &ctx );
ffc03e0c: 38 61 01 6c addi r3,r1,364
ffc03e10: 48 00 21 89 bl ffc05f98 <rtems_filesystem_eval_path_cleanup>
return rv;
}
ffc03e14: 39 61 02 08 addi r11,r1,520
ffc03e18: 7f e3 fb 78 mr r3,r31
ffc03e1c: 4b ff c7 fc b ffc00618 <_restgpr_17_x>
ffc1210c <rtems_task_mode>:
ASR_Information *asr;
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
ffc1210c: 7c a6 2b 79 mr. r6,r5
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
ffc12110: 94 21 ff f8 stwu r1,-8(r1)
ffc12114: 7c 08 02 a6 mflr r0
ffc12118: 90 01 00 0c stw r0,12(r1)
ASR_Information *asr;
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
ffc1211c: 41 82 01 7c beq- ffc12298 <rtems_task_mode+0x18c>
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
ffc12120: 3d 20 00 00 lis r9,0
ffc12124: 81 49 32 10 lwz r10,12816(r9)
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
ffc12128: 80 ea 00 78 lwz r7,120(r10)
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
ffc1212c: 89 0a 00 70 lbz r8,112(r10)
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
ffc12130: 2f 87 00 00 cmpwi cr7,r7,0
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
ffc12134: 81 2a 01 4c lwz r9,332(r10)
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
ffc12138: 7d 08 00 34 cntlzw r8,r8
ffc1213c: 55 08 d9 7e rlwinm r8,r8,27,5,31
ffc12140: 55 08 40 2e rlwinm r8,r8,8,0,23
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
ffc12144: 41 9e 00 08 beq- cr7,ffc1214c <rtems_task_mode+0x40>
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
ffc12148: 61 08 02 00 ori r8,r8,512
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
ffc1214c: 88 e9 00 08 lbz r7,8(r9)
ffc12150: 7c e7 00 34 cntlzw r7,r7
ffc12154: 54 e7 d9 7e rlwinm r7,r7,27,5,31
ffc12158: 54 e7 50 2a rlwinm r7,r7,10,0,21
ffc1215c: 7c e7 43 78 or r7,r7,r8
#ifndef ASM
static inline uint32_t _CPU_ISR_Get_level( void )
{
register unsigned int msr;
_CPU_MSR_GET(msr);
ffc12160: 39 00 00 00 li r8,0
ffc12164: 7d 00 00 a6 mfmsr r8
if (msr & MSR_EE) return 0;
ffc12168: 69 08 80 00 xori r8,r8,32768
ffc1216c: 55 05 8f fe rlwinm r5,r8,17,31,31
old_mode |= _ISR_Get_level();
ffc12170: 7c e8 2b 78 or r8,r7,r5
*previous_mode_set = old_mode;
ffc12174: 91 06 00 00 stw r8,0(r6)
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
ffc12178: 70 88 01 00 andi. r8,r4,256
ffc1217c: 41 82 00 10 beq- ffc1218c <rtems_task_mode+0x80>
*/
RTEMS_INLINE_ROUTINE bool _Modes_Is_preempt (
Modes_Control mode_set
)
{
return (mode_set & RTEMS_PREEMPT_MASK) == RTEMS_PREEMPT;
ffc12180: 68 68 01 00 xori r8,r3,256
ffc12184: 55 08 c7 fe rlwinm r8,r8,24,31,31
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
ffc12188: 99 0a 00 70 stb r8,112(r10)
if ( mask & RTEMS_TIMESLICE_MASK ) {
ffc1218c: 70 88 02 00 andi. r8,r4,512
ffc12190: 41 82 00 28 beq- ffc121b8 <rtems_task_mode+0xac>
if ( _Modes_Is_timeslice(mode_set) ) {
ffc12194: 70 68 02 00 andi. r8,r3,512
ffc12198: 41 82 00 1c beq- ffc121b4 <rtems_task_mode+0xa8>
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
ffc1219c: 39 00 00 01 li r8,1
ffc121a0: 91 0a 00 78 stw r8,120(r10)
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
ffc121a4: 3d 00 00 00 lis r8,0
ffc121a8: 81 08 28 1c lwz r8,10268(r8)
ffc121ac: 91 0a 00 74 stw r8,116(r10)
ffc121b0: 48 00 00 08 b ffc121b8 <rtems_task_mode+0xac>
} else
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
ffc121b4: 91 0a 00 78 stw r8,120(r10)
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
ffc121b8: 70 8a 00 01 andi. r10,r4,1
ffc121bc: 41 a2 00 28 beq+ ffc121e4 <rtems_task_mode+0xd8>
}
static inline void _CPU_ISR_Set_level( uint32_t level )
{
register unsigned int msr;
_CPU_MSR_GET(msr);
ffc121c0: 39 40 00 00 li r10,0
ffc121c4: 7d 40 00 a6 mfmsr r10
if (!(level & CPU_MODES_INTERRUPT_MASK)) {
ffc121c8: 70 68 00 01 andi. r8,r3,1
static inline uint32_t ppc_interrupt_get_disable_mask( void )
{
uint32_t mask;
__asm__ volatile (
ffc121cc: 7d 10 42 a6 mfsprg r8,0
ffc121d0: 40 a2 00 0c bne+ ffc121dc <rtems_task_mode+0xd0>
msr |= ppc_interrupt_get_disable_mask();
ffc121d4: 7d 0a 53 78 or r10,r8,r10
ffc121d8: 48 00 00 08 b ffc121e0 <rtems_task_mode+0xd4>
}
else {
msr &= ~ppc_interrupt_get_disable_mask();
ffc121dc: 7d 4a 40 78 andc r10,r10,r8
}
_CPU_MSR_SET(msr);
ffc121e0: 7d 40 01 24 mtmsr r10
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
ffc121e4: 70 8a 04 00 andi. r10,r4,1024
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
ffc121e8: 38 e0 00 00 li r7,0
if ( mask & RTEMS_ASR_MASK ) {
ffc121ec: 41 82 00 50 beq- ffc1223c <rtems_task_mode+0x130>
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
ffc121f0: 68 63 04 00 xori r3,r3,1024
if ( is_asr_enabled != asr->is_enabled ) {
ffc121f4: 89 49 00 08 lbz r10,8(r9)
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
ffc121f8: 54 63 b7 fe rlwinm r3,r3,22,31,31
if ( is_asr_enabled != asr->is_enabled ) {
ffc121fc: 7f 8a 18 00 cmpw cr7,r10,r3
ffc12200: 41 9e 00 3c beq- cr7,ffc1223c <rtems_task_mode+0x130>
asr->is_enabled = is_asr_enabled;
ffc12204: 98 69 00 08 stb r3,8(r9)
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc12208: 7d 00 00 a6 mfmsr r8
ffc1220c: 7d 50 42 a6 mfsprg r10,0
ffc12210: 7d 0a 50 78 andc r10,r8,r10
ffc12214: 7d 40 01 24 mtmsr r10
{
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
_signals = information->signals_pending;
ffc12218: 80 e9 00 18 lwz r7,24(r9)
information->signals_pending = information->signals_posted;
ffc1221c: 81 49 00 14 lwz r10,20(r9)
information->signals_posted = _signals;
ffc12220: 90 e9 00 14 stw r7,20(r9)
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
_signals = information->signals_pending;
information->signals_pending = information->signals_posted;
ffc12224: 91 49 00 18 stw r10,24(r9)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc12228: 7d 00 01 24 mtmsr r8
_ASR_Swap_signals( asr );
if ( _ASR_Are_signals_pending( asr ) ) {
ffc1222c: 81 29 00 14 lwz r9,20(r9)
ffc12230: 7d 29 00 34 cntlzw r9,r9
ffc12234: 55 29 d9 7e rlwinm r9,r9,27,5,31
ffc12238: 69 27 00 01 xori r7,r9,1
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
ffc1223c: 3d 20 00 00 lis r9,0
ffc12240: 81 29 28 48 lwz r9,10312(r9)
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
}
return RTEMS_SUCCESSFUL;
ffc12244: 38 60 00 00 li r3,0
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
ffc12248: 2f 89 00 03 cmpwi cr7,r9,3
ffc1224c: 40 be 00 50 bne+ cr7,ffc1229c <rtems_task_mode+0x190>
{
Thread_Control *executing;
executing = _Thread_Executing;
if ( are_signals_pending ||
ffc12250: 2f 87 00 00 cmpwi cr7,r7,0
bool are_signals_pending
)
{
Thread_Control *executing;
executing = _Thread_Executing;
ffc12254: 3d 00 00 00 lis r8,0
ffc12258: 39 08 32 00 addi r8,r8,12800
ffc1225c: 81 48 00 10 lwz r10,16(r8)
if ( are_signals_pending ||
ffc12260: 40 9e 00 1c bne- cr7,ffc1227c <rtems_task_mode+0x170>
ffc12264: 81 28 00 14 lwz r9,20(r8)
ffc12268: 7f 8a 48 00 cmpw cr7,r10,r9
ffc1226c: 41 9e 00 30 beq- cr7,ffc1229c <rtems_task_mode+0x190>
(!_Thread_Is_heir( executing ) && executing->is_preemptible) ) {
ffc12270: 89 2a 00 70 lbz r9,112(r10)
ffc12274: 2f 89 00 00 cmpwi cr7,r9,0
ffc12278: 41 9e 00 24 beq- cr7,ffc1229c <rtems_task_mode+0x190> <== NEVER TAKEN
_Thread_Dispatch_necessary = true;
ffc1227c: 3d 20 00 00 lis r9,0
ffc12280: 39 40 00 01 li r10,1
ffc12284: 39 29 32 00 addi r9,r9,12800
ffc12288: 99 49 00 0c stb r10,12(r9)
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
ffc1228c: 4b ff 9f a5 bl ffc0c230 <_Thread_Dispatch>
}
return RTEMS_SUCCESSFUL;
ffc12290: 38 60 00 00 li r3,0
ffc12294: 48 00 00 08 b ffc1229c <rtems_task_mode+0x190>
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
ffc12298: 38 60 00 09 li r3,9
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
}
return RTEMS_SUCCESSFUL;
}
ffc1229c: 80 01 00 0c lwz r0,12(r1)
ffc122a0: 38 21 00 08 addi r1,r1,8
ffc122a4: 7c 08 03 a6 mtlr r0
ffc122a8: 4e 80 00 20 blr
ffc0cfdc <rtems_task_set_priority>:
rtems_status_code rtems_task_set_priority(
rtems_id id,
rtems_task_priority new_priority,
rtems_task_priority *old_priority
)
{
ffc0cfdc: 94 21 ff e0 stwu r1,-32(r1)
ffc0cfe0: 7c 08 02 a6 mflr r0
ffc0cfe4: bf c1 00 18 stmw r30,24(r1)
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
ffc0cfe8: 7c 9f 23 79 mr. r31,r4
rtems_status_code rtems_task_set_priority(
rtems_id id,
rtems_task_priority new_priority,
rtems_task_priority *old_priority
)
{
ffc0cfec: 7c be 2b 78 mr r30,r5
ffc0cff0: 90 01 00 24 stw r0,36(r1)
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
ffc0cff4: 41 82 00 18 beq- ffc0d00c <rtems_task_set_priority+0x30>
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 ) );
ffc0cff8: 3d 20 00 00 lis r9,0
ffc0cffc: 89 49 27 64 lbz r10,10084(r9)
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
ffc0d000: 39 20 00 13 li r9,19
)
{
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
ffc0d004: 7f 9f 50 40 cmplw cr7,r31,r10
ffc0d008: 41 bd 00 6c bgt+ cr7,ffc0d074 <rtems_task_set_priority+0x98>
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
ffc0d00c: 2f 9e 00 00 cmpwi cr7,r30,0
return RTEMS_INVALID_ADDRESS;
ffc0d010: 39 20 00 09 li r9,9
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
ffc0d014: 41 9e 00 60 beq- cr7,ffc0d074 <rtems_task_set_priority+0x98>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
ffc0d018: 38 81 00 08 addi r4,r1,8
ffc0d01c: 48 00 26 a1 bl ffc0f6bc <_Thread_Get>
switch ( location ) {
ffc0d020: 81 21 00 08 lwz r9,8(r1)
ffc0d024: 2f 89 00 00 cmpwi cr7,r9,0
ffc0d028: 40 9e 00 48 bne- cr7,ffc0d070 <rtems_task_set_priority+0x94>
case OBJECTS_LOCAL:
/* XXX need helper to "convert" from core priority */
*old_priority = the_thread->current_priority;
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
ffc0d02c: 2f 9f 00 00 cmpwi cr7,r31,0
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
/* XXX need helper to "convert" from core priority */
*old_priority = the_thread->current_priority;
ffc0d030: 81 23 00 14 lwz r9,20(r3)
ffc0d034: 91 3e 00 00 stw r9,0(r30)
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
ffc0d038: 41 9e 00 2c beq- cr7,ffc0d064 <rtems_task_set_priority+0x88>
the_thread->real_priority = new_priority;
if ( the_thread->resource_count == 0 ||
ffc0d03c: 81 23 00 1c lwz r9,28(r3)
case OBJECTS_LOCAL:
/* XXX need helper to "convert" from core priority */
*old_priority = the_thread->current_priority;
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
the_thread->real_priority = new_priority;
ffc0d040: 93 e3 00 18 stw r31,24(r3)
if ( the_thread->resource_count == 0 ||
ffc0d044: 2f 89 00 00 cmpwi cr7,r9,0
ffc0d048: 41 9e 00 10 beq- cr7,ffc0d058 <rtems_task_set_priority+0x7c>
ffc0d04c: 81 23 00 14 lwz r9,20(r3)
ffc0d050: 7f 89 f8 40 cmplw cr7,r9,r31
ffc0d054: 40 9d 00 10 ble- cr7,ffc0d064 <rtems_task_set_priority+0x88><== ALWAYS TAKEN
the_thread->current_priority > new_priority )
_Thread_Change_priority( the_thread, new_priority, false );
ffc0d058: 7f e4 fb 78 mr r4,r31
ffc0d05c: 38 a0 00 00 li r5,0
ffc0d060: 48 00 20 fd bl ffc0f15c <_Thread_Change_priority>
}
_Thread_Enable_dispatch();
ffc0d064: 48 00 26 3d bl ffc0f6a0 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
ffc0d068: 39 20 00 00 li r9,0
ffc0d06c: 48 00 00 08 b ffc0d074 <rtems_task_set_priority+0x98>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
ffc0d070: 39 20 00 04 li r9,4
}
ffc0d074: 39 61 00 20 addi r11,r1,32
ffc0d078: 7d 23 4b 78 mr r3,r9
ffc0d07c: 4b ff 40 d0 b ffc0114c <_restgpr_30_x>
ffc067dc <rtems_termios_close>:
rtems_interrupt_enable (level);
}
rtems_status_code
rtems_termios_close (void *arg)
{
ffc067dc: 94 21 ff f0 stwu r1,-16(r1)
ffc067e0: 7c 08 02 a6 mflr r0
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
rtems_status_code sc;
sc = rtems_semaphore_obtain(
ffc067e4: 38 80 00 00 li r4,0
rtems_interrupt_enable (level);
}
rtems_status_code
rtems_termios_close (void *arg)
{
ffc067e8: 90 01 00 14 stw r0,20(r1)
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
rtems_status_code sc;
sc = rtems_semaphore_obtain(
ffc067ec: 38 a0 00 00 li r5,0
rtems_status_code
rtems_termios_close (void *arg)
{
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
ffc067f0: 81 23 00 00 lwz r9,0(r3)
rtems_interrupt_enable (level);
}
rtems_status_code
rtems_termios_close (void *arg)
{
ffc067f4: bf c1 00 08 stmw r30,8(r1)
ffc067f8: 7c 7e 1b 78 mr r30,r3
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
ffc067fc: 83 e9 00 30 lwz r31,48(r9)
rtems_status_code sc;
sc = rtems_semaphore_obtain(
ffc06800: 3d 20 00 00 lis r9,0
ffc06804: 80 69 28 58 lwz r3,10328(r9)
ffc06808: 48 00 20 a5 bl ffc088ac <rtems_semaphore_obtain>
rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
ffc0680c: 2f 83 00 00 cmpwi cr7,r3,0
ffc06810: 41 be 00 08 beq+ cr7,ffc06818 <rtems_termios_close+0x3c><== ALWAYS TAKEN
ffc06814: 48 00 00 b8 b ffc068cc <rtems_termios_close+0xf0> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
if (--tty->refcount == 0) {
ffc06818: 81 3f 00 08 lwz r9,8(r31)
ffc0681c: 39 29 ff ff addi r9,r9,-1
ffc06820: 2f 89 00 00 cmpwi cr7,r9,0
ffc06824: 91 3f 00 08 stw r9,8(r31)
ffc06828: 40 9e 01 78 bne- cr7,ffc069a0 <rtems_termios_close+0x1c4>
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
ffc0682c: 81 3f 00 cc lwz r9,204(r31)
ffc06830: 3d 40 00 00 lis r10,0
ffc06834: 39 4a 29 34 addi r10,r10,10548
ffc06838: 55 29 28 34 rlwinm r9,r9,5,0,26
ffc0683c: 7d 2a 4a 14 add r9,r10,r9
ffc06840: 81 29 00 04 lwz r9,4(r9)
ffc06844: 2f 89 00 00 cmpwi cr7,r9,0
ffc06848: 41 9e 00 14 beq- cr7,ffc0685c <rtems_termios_close+0x80>
/*
* call discipline-specific close
*/
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
ffc0684c: 7f e3 fb 78 mr r3,r31
ffc06850: 7d 29 03 a6 mtctr r9
ffc06854: 4e 80 04 21 bctrl
ffc06858: 48 00 00 3c b ffc06894 <rtems_termios_close+0xb8>
} else {
/*
* default: just flush output buffer
*/
sc = rtems_semaphore_obtain(tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
ffc0685c: 80 7f 00 18 lwz r3,24(r31)
ffc06860: 38 80 00 00 li r4,0
ffc06864: 38 a0 00 00 li r5,0
ffc06868: 48 00 20 45 bl ffc088ac <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL) {
ffc0686c: 2f 83 00 00 cmpwi cr7,r3,0
ffc06870: 41 be 00 08 beq+ cr7,ffc06878 <rtems_termios_close+0x9c><== ALWAYS TAKEN
ffc06874: 48 00 00 58 b ffc068cc <rtems_termios_close+0xf0> <== NOT EXECUTED
drainOutput (struct rtems_termios_tty *tty)
{
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
ffc06878: 81 3f 00 b4 lwz r9,180(r31)
ffc0687c: 2f 89 00 00 cmpwi cr7,r9,0
ffc06880: 41 be 00 0c beq+ cr7,ffc0688c <rtems_termios_close+0xb0>
ffc06884: 7f e3 fb 78 mr r3,r31
ffc06888: 4b ff fa b9 bl ffc06340 <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);
ffc0688c: 80 7f 00 18 lwz r3,24(r31)
ffc06890: 48 00 21 41 bl ffc089d0 <rtems_semaphore_release>
}
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
ffc06894: 81 3f 00 b4 lwz r9,180(r31)
ffc06898: 2f 89 00 02 cmpwi cr7,r9,2
ffc0689c: 40 be 00 34 bne+ cr7,ffc068d0 <rtems_termios_close+0xf4>
/*
* send "terminate" to I/O tasks
*/
sc = rtems_event_send( tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT );
ffc068a0: 80 7f 00 c4 lwz r3,196(r31)
ffc068a4: 38 80 00 01 li r4,1
ffc068a8: 48 00 1b 51 bl ffc083f8 <rtems_event_send>
if (sc != RTEMS_SUCCESSFUL)
ffc068ac: 2f 83 00 00 cmpwi cr7,r3,0
ffc068b0: 41 be 00 08 beq+ cr7,ffc068b8 <rtems_termios_close+0xdc><== ALWAYS TAKEN
ffc068b4: 48 00 00 18 b ffc068cc <rtems_termios_close+0xf0> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
sc = rtems_event_send( tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT );
ffc068b8: 80 7f 00 c8 lwz r3,200(r31)
ffc068bc: 38 80 00 01 li r4,1
ffc068c0: 48 00 1b 39 bl ffc083f8 <rtems_event_send>
if (sc != RTEMS_SUCCESSFUL)
ffc068c4: 2f 83 00 00 cmpwi cr7,r3,0
ffc068c8: 41 be 00 08 beq+ cr7,ffc068d0 <rtems_termios_close+0xf4><== ALWAYS TAKEN
rtems_fatal_error_occurred (sc);
ffc068cc: 48 00 27 a9 bl ffc09074 <rtems_fatal_error_occurred> <== NOT EXECUTED
}
if (tty->device.lastClose)
ffc068d0: 81 3f 00 9c lwz r9,156(r31)
ffc068d4: 2f 89 00 00 cmpwi cr7,r9,0
ffc068d8: 41 9e 00 18 beq- cr7,ffc068f0 <rtems_termios_close+0x114><== ALWAYS TAKEN
(*tty->device.lastClose)(tty->major, tty->minor, arg);
ffc068dc: 80 7f 00 0c lwz r3,12(r31) <== NOT EXECUTED
ffc068e0: 7f c5 f3 78 mr r5,r30 <== NOT EXECUTED
ffc068e4: 80 9f 00 10 lwz r4,16(r31) <== NOT EXECUTED
ffc068e8: 7d 29 03 a6 mtctr r9 <== NOT EXECUTED
ffc068ec: 4e 80 04 21 bctrl <== NOT EXECUTED
if (tty->forw == NULL) {
ffc068f0: 81 5f 00 00 lwz r10,0(r31)
ffc068f4: 81 3f 00 04 lwz r9,4(r31)
ffc068f8: 2f 8a 00 00 cmpwi cr7,r10,0
ffc068fc: 40 be 00 1c bne+ cr7,ffc06918 <rtems_termios_close+0x13c>
rtems_termios_ttyTail = tty->back;
if ( rtems_termios_ttyTail != NULL ) {
ffc06900: 2f 89 00 00 cmpwi cr7,r9,0
rtems_fatal_error_occurred (sc);
}
if (tty->device.lastClose)
(*tty->device.lastClose)(tty->major, tty->minor, arg);
if (tty->forw == NULL) {
rtems_termios_ttyTail = tty->back;
ffc06904: 3d 00 00 00 lis r8,0
ffc06908: 91 28 28 5c stw r9,10332(r8)
if ( rtems_termios_ttyTail != NULL ) {
ffc0690c: 41 9e 00 10 beq- cr7,ffc0691c <rtems_termios_close+0x140><== ALWAYS TAKEN
rtems_termios_ttyTail->forw = NULL;
ffc06910: 91 49 00 00 stw r10,0(r9) <== NOT EXECUTED
ffc06914: 48 00 00 08 b ffc0691c <rtems_termios_close+0x140> <== NOT EXECUTED
}
} else {
tty->forw->back = tty->back;
ffc06918: 91 2a 00 04 stw r9,4(r10)
}
if (tty->back == NULL) {
ffc0691c: 81 5f 00 04 lwz r10,4(r31)
ffc06920: 81 3f 00 00 lwz r9,0(r31)
ffc06924: 2f 8a 00 00 cmpwi cr7,r10,0
ffc06928: 40 be 00 1c bne+ cr7,ffc06944 <rtems_termios_close+0x168><== NEVER TAKEN
rtems_termios_ttyHead = tty->forw;
if ( rtems_termios_ttyHead != NULL ) {
ffc0692c: 2f 89 00 00 cmpwi cr7,r9,0
} else {
tty->forw->back = tty->back;
}
if (tty->back == NULL) {
rtems_termios_ttyHead = tty->forw;
ffc06930: 3d 00 00 00 lis r8,0
ffc06934: 91 28 28 60 stw r9,10336(r8)
if ( rtems_termios_ttyHead != NULL ) {
ffc06938: 41 9e 00 10 beq- cr7,ffc06948 <rtems_termios_close+0x16c>
rtems_termios_ttyHead->back = NULL;
ffc0693c: 91 49 00 04 stw r10,4(r9)
ffc06940: 48 00 00 08 b ffc06948 <rtems_termios_close+0x16c>
}
} else {
tty->back->forw = tty->forw;
ffc06944: 91 2a 00 00 stw r9,0(r10) <== NOT EXECUTED
}
rtems_semaphore_delete (tty->isem);
ffc06948: 80 7f 00 14 lwz r3,20(r31)
ffc0694c: 48 00 1e a5 bl ffc087f0 <rtems_semaphore_delete>
rtems_semaphore_delete (tty->osem);
ffc06950: 80 7f 00 18 lwz r3,24(r31)
ffc06954: 48 00 1e 9d bl ffc087f0 <rtems_semaphore_delete>
rtems_semaphore_delete (tty->rawOutBuf.Semaphore);
ffc06958: 80 7f 00 8c lwz r3,140(r31)
ffc0695c: 48 00 1e 95 bl ffc087f0 <rtems_semaphore_delete>
if ((tty->device.pollRead == NULL) ||
ffc06960: 81 3f 00 a0 lwz r9,160(r31)
ffc06964: 2f 89 00 00 cmpwi cr7,r9,0
ffc06968: 41 9e 00 10 beq- cr7,ffc06978 <rtems_termios_close+0x19c>
ffc0696c: 81 3f 00 b4 lwz r9,180(r31)
ffc06970: 2f 89 00 02 cmpwi cr7,r9,2
ffc06974: 40 be 00 0c bne+ cr7,ffc06980 <rtems_termios_close+0x1a4>
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN))
rtems_semaphore_delete (tty->rawInBuf.Semaphore);
ffc06978: 80 7f 00 68 lwz r3,104(r31)
ffc0697c: 48 00 1e 75 bl ffc087f0 <rtems_semaphore_delete>
free (tty->rawInBuf.theBuf);
ffc06980: 80 7f 00 58 lwz r3,88(r31)
ffc06984: 4b ff db d9 bl ffc0455c <free>
free (tty->rawOutBuf.theBuf);
ffc06988: 80 7f 00 7c lwz r3,124(r31)
ffc0698c: 4b ff db d1 bl ffc0455c <free>
free (tty->cbuf);
ffc06990: 80 7f 00 1c lwz r3,28(r31)
ffc06994: 4b ff db c9 bl ffc0455c <free>
free (tty);
ffc06998: 7f e3 fb 78 mr r3,r31
ffc0699c: 4b ff db c1 bl ffc0455c <free>
}
rtems_semaphore_release (rtems_termios_ttyMutex);
ffc069a0: 3d 20 00 00 lis r9,0
ffc069a4: 80 69 28 58 lwz r3,10328(r9)
ffc069a8: 48 00 20 29 bl ffc089d0 <rtems_semaphore_release>
return RTEMS_SUCCESSFUL;
}
ffc069ac: 39 61 00 10 addi r11,r1,16
ffc069b0: 38 60 00 00 li r3,0
ffc069b4: 4b ff 9c 0c b ffc005c0 <_restgpr_30_x>
ffc07d54 <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)
{
ffc07d54: 94 21 ff f8 stwu r1,-8(r1)
ffc07d58: 7c 08 02 a6 mflr r0
ffc07d5c: 90 01 00 0c stw r0,12(r1)
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
ffc07d60: 81 43 00 90 lwz r10,144(r3)
ffc07d64: 7c 8a 22 14 add r4,r10,r4
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
ffc07d68: 81 43 00 b4 lwz r10,180(r3)
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
ffc07d6c: 90 83 00 90 stw r4,144(r3)
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
ffc07d70: 2f 8a 00 02 cmpwi cr7,r10,2
ffc07d74: 40 be 00 1c bne+ cr7,ffc07d90 <rtems_termios_dequeue_characters+0x3c>
/*
* send wake up to transmitter task
*/
sc = rtems_event_send(tty->txTaskId, TERMIOS_TX_START_EVENT);
ffc07d78: 80 63 00 c8 lwz r3,200(r3)
ffc07d7c: 38 80 00 02 li r4,2
ffc07d80: 48 00 06 79 bl ffc083f8 <rtems_event_send>
if (sc != RTEMS_SUCCESSFUL)
ffc07d84: 2f 83 00 00 cmpwi cr7,r3,0
ffc07d88: 41 be 00 40 beq+ cr7,ffc07dc8 <rtems_termios_dequeue_characters+0x74><== ALWAYS TAKEN
rtems_fatal_error_occurred (sc);
ffc07d8c: 48 00 12 e9 bl ffc09074 <rtems_fatal_error_occurred> <== NOT EXECUTED
return 0; /* nothing to output in IRQ... */
}
if (tty->t_line == PPPDISC ) {
ffc07d90: 81 23 00 cc lwz r9,204(r3)
ffc07d94: 2f 89 00 05 cmpwi cr7,r9,5
ffc07d98: 40 9e 00 20 bne- cr7,ffc07db8 <rtems_termios_dequeue_characters+0x64>
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
ffc07d9c: 3d 20 00 00 lis r9,0
ffc07da0: 81 29 29 e8 lwz r9,10728(r9)
ffc07da4: 2f 89 00 00 cmpwi cr7,r9,0
ffc07da8: 41 9e 00 20 beq- cr7,ffc07dc8 <rtems_termios_dequeue_characters+0x74><== NEVER TAKEN
rtems_termios_linesw[tty->t_line].l_start(tty);
ffc07dac: 7d 29 03 a6 mtctr r9
ffc07db0: 4e 80 04 21 bctrl
ffc07db4: 48 00 00 14 b ffc07dc8 <rtems_termios_dequeue_characters+0x74>
}
return 0; /* nothing to output in IRQ... */
}
return rtems_termios_refill_transmitter(tty);
}
ffc07db8: 80 01 00 0c lwz r0,12(r1)
ffc07dbc: 38 21 00 08 addi r1,r1,8
ffc07dc0: 7c 08 03 a6 mtlr r0
rtems_termios_linesw[tty->t_line].l_start(tty);
}
return 0; /* nothing to output in IRQ... */
}
return rtems_termios_refill_transmitter(tty);
ffc07dc4: 4b ff e3 1c b ffc060e0 <rtems_termios_refill_transmitter>
}
ffc07dc8: 80 01 00 0c lwz r0,12(r1)
ffc07dcc: 38 60 00 00 li r3,0
ffc07dd0: 7c 08 03 a6 mtlr r0
ffc07dd4: 38 21 00 08 addi r1,r1,8
ffc07dd8: 4e 80 00 20 blr
ffc079fc <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)
{
ffc079fc: 94 21 ff d0 stwu r1,-48(r1)
ffc07a00: 7c 08 02 a6 mflr r0
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) {
ffc07a04: 3d 20 00 00 lis r9,0
* 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)
{
ffc07a08: 90 01 00 34 stw r0,52(r1)
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) {
ffc07a0c: 39 29 29 34 addi r9,r9,10548
ffc07a10: 81 43 00 cc lwz r10,204(r3)
* 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)
{
ffc07a14: be c1 00 08 stmw r22,8(r1)
ffc07a18: 7c 7f 1b 78 mr r31,r3
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) {
ffc07a1c: 55 4a 28 34 rlwinm r10,r10,5,0,26
ffc07a20: 7d 49 52 14 add r10,r9,r10
ffc07a24: 81 4a 00 10 lwz r10,16(r10)
* 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)
{
ffc07a28: 7c 9e 23 78 mr r30,r4
rtems_interrupt_level level;
if (rtems_termios_linesw[tty->t_line].l_rint != NULL) {
while (len--) {
c = *buf++;
rtems_termios_linesw[tty->t_line].l_rint(c,tty);
ffc07a2c: 7d 3d 4b 78 mr r29,r9
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) {
ffc07a30: 2f 8a 00 00 cmpwi cr7,r10,0
ffc07a34: 7f 24 2a 14 add r25,r4,r5
ffc07a38: 40 be 00 3c bne+ cr7,ffc07a74 <rtems_termios_enqueue_raw_characters+0x78>
* 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)
ffc07a3c: 3b 40 00 00 li r26,0
ffc07a40: 3b a0 00 00 li r29,0
/*
* 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);
ffc07a44: 3b 03 00 30 addi r24,r3,48
(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);
ffc07a48: 3a e3 00 4a addi r23,r3,74
ffc07a4c: 48 00 02 5c b ffc07ca8 <rtems_termios_enqueue_raw_characters+0x2ac>
rtems_interrupt_level level;
if (rtems_termios_linesw[tty->t_line].l_rint != NULL) {
while (len--) {
c = *buf++;
rtems_termios_linesw[tty->t_line].l_rint(c,tty);
ffc07a50: 81 3f 00 cc lwz r9,204(r31)
ffc07a54: 7f e4 fb 78 mr r4,r31
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++;
ffc07a58: 88 7e 00 00 lbz r3,0(r30)
ffc07a5c: 3b de 00 01 addi r30,r30,1
rtems_termios_linesw[tty->t_line].l_rint(c,tty);
ffc07a60: 55 29 28 34 rlwinm r9,r9,5,0,26
ffc07a64: 7d 3d 4a 14 add r9,r29,r9
ffc07a68: 81 29 00 10 lwz r9,16(r9)
ffc07a6c: 7d 29 03 a6 mtctr r9
ffc07a70: 4e 80 04 21 bctrl
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--) {
ffc07a74: 7f 9e c8 00 cmpw cr7,r30,r25
ffc07a78: 40 9e ff d8 bne+ cr7,ffc07a50 <rtems_termios_enqueue_raw_characters+0x54>
}
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
ffc07a7c: 81 3f 00 e4 lwz r9,228(r31)
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
tty->tty_rcvwakeup = 1;
}
return 0;
ffc07a80: 3b a0 00 00 li r29,0
}
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
ffc07a84: 2f 89 00 00 cmpwi cr7,r9,0
ffc07a88: 40 9e 02 48 bne- cr7,ffc07cd0 <rtems_termios_enqueue_raw_characters+0x2d4><== NEVER TAKEN
ffc07a8c: 81 3f 00 dc lwz r9,220(r31)
ffc07a90: 2f 89 00 00 cmpwi cr7,r9,0
ffc07a94: 41 9e 02 3c beq- cr7,ffc07cd0 <rtems_termios_enqueue_raw_characters+0x2d4>
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
ffc07a98: 7d 29 03 a6 mtctr r9
ffc07a9c: 38 7f 00 30 addi r3,r31,48
ffc07aa0: 80 9f 00 e0 lwz r4,224(r31)
ffc07aa4: 4e 80 04 21 bctrl
tty->tty_rcvwakeup = 1;
ffc07aa8: 39 20 00 01 li r9,1
ffc07aac: 91 3f 00 e4 stw r9,228(r31)
ffc07ab0: 48 00 02 20 b ffc07cd0 <rtems_termios_enqueue_raw_characters+0x2d4>
while (len--) {
c = *buf++;
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
ffc07ab4: 81 3f 00 b8 lwz r9,184(r31)
}
return 0;
}
while (len--) {
c = *buf++;
ffc07ab8: 8b 7e 00 00 lbz r27,0(r30)
ffc07abc: 3b de 00 01 addi r30,r30,1
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
ffc07ac0: 71 2a 02 00 andi. r10,r9,512
ffc07ac4: 41 82 00 4c beq- ffc07b10 <rtems_termios_enqueue_raw_characters+0x114>
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
ffc07ac8: 89 5f 00 4a lbz r10,74(r31)
ffc07acc: 89 3f 00 49 lbz r9,73(r31)
ffc07ad0: 7f 8a d8 00 cmpw cr7,r10,r27
if (c == tty->termios.c_cc[VSTART]) {
ffc07ad4: 55 29 06 3e clrlwi r9,r9,24
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]) {
ffc07ad8: 40 be 00 24 bne+ cr7,ffc07afc <rtems_termios_enqueue_raw_characters+0x100>
if (c == tty->termios.c_cc[VSTART]) {
ffc07adc: 7f 89 50 00 cmpw cr7,r9,r10
/* received VSTOP and VSTART==VSTOP? */
/* then toggle "stop output" status */
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
ffc07ae0: 81 3f 00 b8 lwz r9,184(r31)
/* 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]) {
ffc07ae4: 40 be 00 0c bne+ cr7,ffc07af0 <rtems_termios_enqueue_raw_characters+0xf4><== ALWAYS TAKEN
/* received VSTOP and VSTART==VSTOP? */
/* then toggle "stop output" status */
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
ffc07ae8: 69 29 00 10 xori r9,r9,16 <== NOT EXECUTED
ffc07aec: 48 00 00 08 b ffc07af4 <rtems_termios_enqueue_raw_characters+0xf8><== NOT EXECUTED
}
else {
/* VSTOP received (other code than VSTART) */
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
ffc07af0: 61 29 00 10 ori r9,r9,16
ffc07af4: 91 3f 00 b8 stw r9,184(r31)
ffc07af8: 48 00 01 d0 b ffc07cc8 <rtems_termios_enqueue_raw_characters+0x2cc>
}
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
ffc07afc: 7f 89 d8 00 cmpw cr7,r9,r27
ffc07b00: 40 be 00 10 bne+ cr7,ffc07b10 <rtems_termios_enqueue_raw_characters+0x114><== ALWAYS TAKEN
/* VSTART received */
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
ffc07b04: 81 3f 00 b8 lwz r9,184(r31) <== NOT EXECUTED
ffc07b08: 55 29 07 34 rlwinm r9,r9,0,28,26 <== NOT EXECUTED
ffc07b0c: 4b ff ff e8 b ffc07af4 <rtems_termios_enqueue_raw_characters+0xf8><== NOT EXECUTED
flow_rcv = true;
}
}
if (flow_rcv) {
ffc07b10: 2f 9a 00 00 cmpwi cr7,r26,0
ffc07b14: 41 9e 00 5c beq- cr7,ffc07b70 <rtems_termios_enqueue_raw_characters+0x174><== ALWAYS TAKEN
/* restart output according to FL_ORCVXOF flag */
if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) {
ffc07b18: 81 3f 00 b8 lwz r9,184(r31)
ffc07b1c: 55 29 06 b6 rlwinm r9,r9,0,26,27
ffc07b20: 2f 89 00 20 cmpwi cr7,r9,32
ffc07b24: 40 be 01 84 bne+ cr7,ffc07ca8 <rtems_termios_enqueue_raw_characters+0x2ac><== ALWAYS TAKEN
/* disable interrupts */
rtems_interrupt_disable(level);
ffc07b28: 4b ff e5 a5 bl ffc060cc <ppc_interrupt_disable> <== NOT EXECUTED
ffc07b2c: 7c 7c 1b 78 mr r28,r3 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
ffc07b30: 81 3f 00 b8 lwz r9,184(r31) <== NOT EXECUTED
ffc07b34: 55 29 06 f2 rlwinm r9,r9,0,27,25 <== NOT EXECUTED
ffc07b38: 91 3f 00 b8 stw r9,184(r31) <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
ffc07b3c: 81 3f 00 94 lwz r9,148(r31) <== NOT EXECUTED
ffc07b40: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED
ffc07b44: 41 be 00 24 beq+ cr7,ffc07b68 <rtems_termios_enqueue_raw_characters+0x16c><== NOT EXECUTED
/* if chars available, call write function... */
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1);
ffc07b48: 80 9f 00 84 lwz r4,132(r31) <== 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)(
ffc07b4c: 38 a0 00 01 li r5,1 <== NOT EXECUTED
ffc07b50: 81 5f 00 7c lwz r10,124(r31) <== NOT EXECUTED
ffc07b54: 81 3f 00 a4 lwz r9,164(r31) <== NOT EXECUTED
ffc07b58: 80 7f 00 10 lwz r3,16(r31) <== NOT EXECUTED
ffc07b5c: 7c 8a 22 14 add r4,r10,r4 <== NOT EXECUTED
ffc07b60: 7d 29 03 a6 mtctr r9 <== NOT EXECUTED
ffc07b64: 4e 80 04 21 bctrl <== NOT EXECUTED
ffc07b68: 7f 80 01 24 mtmsr r28 <== NOT EXECUTED
ffc07b6c: 48 00 01 3c b ffc07ca8 <rtems_termios_enqueue_raw_characters+0x2ac><== NOT EXECUTED
}
/* reenable interrupts */
rtems_interrupt_enable(level);
}
} else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
ffc07b70: 81 3f 00 60 lwz r9,96(r31)
ffc07b74: 81 5f 00 64 lwz r10,100(r31)
ffc07b78: 39 29 00 01 addi r9,r9,1
ffc07b7c: 7f 89 53 96 divwu r28,r9,r10
ffc07b80: 7f 9c 51 d6 mullw r28,r28,r10
ffc07b84: 7f 9c 48 50 subf r28,r28,r9
/* if chars_in_buffer > highwater */
rtems_interrupt_disable(level);
ffc07b88: 4b ff e5 45 bl ffc060cc <ppc_interrupt_disable>
ffc07b8c: 7c 76 1b 78 mr r22,r3
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
ffc07b90: 81 3f 00 5c lwz r9,92(r31)
ffc07b94: 81 1f 00 64 lwz r8,100(r31)
% tty->rawInBuf.Size) > tty->highwater) &&
ffc07b98: 81 5f 00 64 lwz r10,100(r31)
}
} 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)
ffc07b9c: 7d 29 40 50 subf r9,r9,r8
ffc07ba0: 7d 29 e2 14 add r9,r9,r28
% tty->rawInBuf.Size) > tty->highwater) &&
ffc07ba4: 7d 09 53 96 divwu r8,r9,r10
ffc07ba8: 7d 48 51 d6 mullw r10,r8,r10
ffc07bac: 7d 4a 48 50 subf r10,r10,r9
}
} 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)
ffc07bb0: 81 3f 00 c0 lwz r9,192(r31)
ffc07bb4: 7f 8a 48 40 cmplw cr7,r10,r9
ffc07bb8: 40 9d 00 9c ble- cr7,ffc07c54 <rtems_termios_enqueue_raw_characters+0x258><== ALWAYS TAKEN
% tty->rawInBuf.Size) > tty->highwater) &&
!(tty->flow_ctrl & FL_IREQXOF)) {
ffc07bbc: 81 3f 00 b8 lwz r9,184(r31) <== 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) &&
ffc07bc0: 71 2a 00 01 andi. r10,r9,1 <== NOT EXECUTED
ffc07bc4: 40 82 00 90 bne- ffc07c54 <rtems_termios_enqueue_raw_characters+0x258><== NOT EXECUTED
!(tty->flow_ctrl & FL_IREQXOF)) {
/* incoming data stream should be stopped */
tty->flow_ctrl |= FL_IREQXOF;
ffc07bc8: 81 3f 00 b8 lwz r9,184(r31) <== NOT EXECUTED
ffc07bcc: 61 29 00 01 ori r9,r9,1 <== NOT EXECUTED
ffc07bd0: 91 3f 00 b8 stw r9,184(r31) <== NOT EXECUTED
if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF))
ffc07bd4: 81 3f 00 b8 lwz r9,184(r31) <== NOT EXECUTED
ffc07bd8: 71 29 04 02 andi. r9,r9,1026 <== NOT EXECUTED
ffc07bdc: 2f 89 04 00 cmpwi cr7,r9,1024 <== NOT EXECUTED
== (FL_MDXOF ) ) {
if ((tty->flow_ctrl & FL_OSTOP) ||
ffc07be0: 81 3f 00 b8 lwz r9,184(r31) <== 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))
ffc07be4: 40 be 00 40 bne+ cr7,ffc07c24 <rtems_termios_enqueue_raw_characters+0x228><== NOT EXECUTED
== (FL_MDXOF ) ) {
if ((tty->flow_ctrl & FL_OSTOP) ||
ffc07be8: 71 2a 00 20 andi. r10,r9,32 <== NOT EXECUTED
ffc07bec: 40 82 00 10 bne- ffc07bfc <rtems_termios_enqueue_raw_characters+0x200><== NOT EXECUTED
ffc07bf0: 81 3f 00 94 lwz r9,148(r31) <== NOT EXECUTED
ffc07bf4: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED
ffc07bf8: 40 9e 00 5c bne- cr7,ffc07c54 <rtems_termios_enqueue_raw_characters+0x258><== 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;
ffc07bfc: 81 3f 00 b8 lwz r9,184(r31) <== NOT EXECUTED
(*tty->device.write)(tty->minor,
ffc07c00: 7e e4 bb 78 mr r4,r23 <== NOT EXECUTED
ffc07c04: 80 7f 00 10 lwz r3,16(r31) <== NOT EXECUTED
ffc07c08: 38 a0 00 01 li r5,1 <== NOT EXECUTED
== (FL_MDXOF ) ) {
if ((tty->flow_ctrl & FL_OSTOP) ||
(tty->rawOutBufState == rob_idle)) {
/* if tx is stopped due to XOFF or out of data */
/* call write function here */
tty->flow_ctrl |= FL_ISNTXOF;
ffc07c0c: 61 29 00 02 ori r9,r9,2 <== NOT EXECUTED
ffc07c10: 91 3f 00 b8 stw r9,184(r31) <== NOT EXECUTED
(*tty->device.write)(tty->minor,
ffc07c14: 81 3f 00 a4 lwz r9,164(r31) <== NOT EXECUTED
ffc07c18: 7d 29 03 a6 mtctr r9 <== NOT EXECUTED
ffc07c1c: 4e 80 04 21 bctrl <== NOT EXECUTED
ffc07c20: 48 00 00 34 b ffc07c54 <rtems_termios_enqueue_raw_characters+0x258><== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTOP]), 1);
}
} else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS) ) {
ffc07c24: 71 29 01 04 andi. r9,r9,260 <== NOT EXECUTED
ffc07c28: 2f 89 01 00 cmpwi cr7,r9,256 <== NOT EXECUTED
ffc07c2c: 40 be 00 28 bne+ cr7,ffc07c54 <rtems_termios_enqueue_raw_characters+0x258><== NOT EXECUTED
tty->flow_ctrl |= FL_IRTSOFF;
ffc07c30: 81 3f 00 b8 lwz r9,184(r31) <== NOT EXECUTED
ffc07c34: 61 29 00 04 ori r9,r9,4 <== NOT EXECUTED
ffc07c38: 91 3f 00 b8 stw r9,184(r31) <== NOT EXECUTED
/* deactivate RTS line */
if (tty->device.stopRemoteTx != NULL) {
ffc07c3c: 81 3f 00 ac lwz r9,172(r31) <== NOT EXECUTED
ffc07c40: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED
ffc07c44: 41 9e 00 10 beq- cr7,ffc07c54 <rtems_termios_enqueue_raw_characters+0x258><== NOT EXECUTED
tty->device.stopRemoteTx(tty->minor);
ffc07c48: 80 7f 00 10 lwz r3,16(r31) <== NOT EXECUTED
ffc07c4c: 7d 29 03 a6 mtctr r9 <== NOT EXECUTED
ffc07c50: 4e 80 04 21 bctrl <== NOT EXECUTED
ffc07c54: 7e c0 01 24 mtmsr r22
}
/* reenable interrupts */
rtems_interrupt_enable(level);
if (newTail == tty->rawInBuf.Head) {
ffc07c58: 81 3f 00 5c lwz r9,92(r31)
ffc07c5c: 7f 9c 48 00 cmpw cr7,r28,r9
ffc07c60: 40 be 00 0c bne+ cr7,ffc07c6c <rtems_termios_enqueue_raw_characters+0x270><== ALWAYS TAKEN
dropped++;
ffc07c64: 3b bd 00 01 addi r29,r29,1 <== NOT EXECUTED
ffc07c68: 48 00 00 40 b ffc07ca8 <rtems_termios_enqueue_raw_characters+0x2ac><== NOT EXECUTED
} else {
tty->rawInBuf.theBuf[newTail] = c;
ffc07c6c: 81 3f 00 58 lwz r9,88(r31)
ffc07c70: 7f 69 e1 ae stbx r27,r9,r28
tty->rawInBuf.Tail = newTail;
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
ffc07c74: 81 3f 00 e4 lwz r9,228(r31)
if (newTail == tty->rawInBuf.Head) {
dropped++;
} else {
tty->rawInBuf.theBuf[newTail] = c;
tty->rawInBuf.Tail = newTail;
ffc07c78: 93 9f 00 60 stw r28,96(r31)
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
ffc07c7c: 2f 89 00 00 cmpwi cr7,r9,0
ffc07c80: 40 9e 00 28 bne- cr7,ffc07ca8 <rtems_termios_enqueue_raw_characters+0x2ac><== NEVER TAKEN
ffc07c84: 81 3f 00 dc lwz r9,220(r31)
ffc07c88: 2f 89 00 00 cmpwi cr7,r9,0
ffc07c8c: 41 9e 00 1c beq- cr7,ffc07ca8 <rtems_termios_enqueue_raw_characters+0x2ac><== ALWAYS TAKEN
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
ffc07c90: 7d 29 03 a6 mtctr r9 <== NOT EXECUTED
ffc07c94: 7f 03 c3 78 mr r3,r24 <== NOT EXECUTED
ffc07c98: 80 9f 00 e0 lwz r4,224(r31) <== NOT EXECUTED
ffc07c9c: 4e 80 04 21 bctrl <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
ffc07ca0: 39 20 00 01 li r9,1 <== NOT EXECUTED
ffc07ca4: 91 3f 00 e4 stw r9,228(r31) <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
}
return 0;
}
while (len--) {
ffc07ca8: 7f 9e c8 00 cmpw cr7,r30,r25
ffc07cac: 40 9e fe 08 bne+ cr7,ffc07ab4 <rtems_termios_enqueue_raw_characters+0xb8>
}
}
}
}
tty->rawInBufDropped += dropped;
ffc07cb0: 81 3f 00 78 lwz r9,120(r31)
rtems_semaphore_release (tty->rawInBuf.Semaphore);
ffc07cb4: 80 7f 00 68 lwz r3,104(r31)
}
}
}
}
tty->rawInBufDropped += dropped;
ffc07cb8: 7d 29 ea 14 add r9,r9,r29
ffc07cbc: 91 3f 00 78 stw r9,120(r31)
rtems_semaphore_release (tty->rawInBuf.Semaphore);
ffc07cc0: 48 00 0d 11 bl ffc089d0 <rtems_semaphore_release>
return dropped;
ffc07cc4: 48 00 00 0c b ffc07cd0 <rtems_termios_enqueue_raw_characters+0x2d4>
* 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)
{
ffc07cc8: 3b 40 00 01 li r26,1
ffc07ccc: 4b ff fe 4c b ffc07b18 <rtems_termios_enqueue_raw_characters+0x11c>
}
tty->rawInBufDropped += dropped;
rtems_semaphore_release (tty->rawInBuf.Semaphore);
return dropped;
}
ffc07cd0: 39 61 00 30 addi r11,r1,48
ffc07cd4: 7f a3 eb 78 mr r3,r29
ffc07cd8: 4b ff 88 c8 b ffc005a0 <_restgpr_22_x>
ffc069d4 <rtems_termios_ioctl>:
}
}
rtems_status_code
rtems_termios_ioctl (void *arg)
{
ffc069d4: 94 21 ff e8 stwu r1,-24(r1)
ffc069d8: 7c 08 02 a6 mflr r0
struct rtems_termios_tty *tty = args->iop->data1;
struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer;
rtems_status_code sc;
args->ioctl_return = 0;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
ffc069dc: 38 80 00 00 li r4,0
}
}
rtems_status_code
rtems_termios_ioctl (void *arg)
{
ffc069e0: 90 01 00 1c stw r0,28(r1)
struct rtems_termios_tty *tty = args->iop->data1;
struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer;
rtems_status_code sc;
args->ioctl_return = 0;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
ffc069e4: 38 a0 00 00 li r5,0
rtems_status_code
rtems_termios_ioctl (void *arg)
{
rtems_libio_ioctl_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
ffc069e8: 81 23 00 00 lwz r9,0(r3)
}
}
rtems_status_code
rtems_termios_ioctl (void *arg)
{
ffc069ec: bf 81 00 08 stmw r28,8(r1)
ffc069f0: 7c 7d 1b 78 mr r29,r3
rtems_libio_ioctl_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
ffc069f4: 83 e9 00 30 lwz r31,48(r9)
struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer;
rtems_status_code sc;
args->ioctl_return = 0;
ffc069f8: 39 20 00 00 li r9,0
rtems_status_code
rtems_termios_ioctl (void *arg)
{
rtems_libio_ioctl_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer;
ffc069fc: 83 83 00 08 lwz r28,8(r3)
rtems_status_code sc;
args->ioctl_return = 0;
ffc06a00: 91 23 00 0c stw r9,12(r3)
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
ffc06a04: 80 7f 00 18 lwz r3,24(r31)
ffc06a08: 48 00 1e a5 bl ffc088ac <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL) {
ffc06a0c: 7c 7e 1b 79 mr. r30,r3
ffc06a10: 40 82 04 28 bne- ffc06e38 <rtems_termios_ioctl+0x464> <== NEVER TAKEN
return sc;
}
switch (args->command) {
ffc06a14: 81 3d 00 04 lwz r9,4(r29)
ffc06a18: 2f 89 00 05 cmpwi cr7,r9,5
ffc06a1c: 41 9e 03 34 beq- cr7,ffc06d50 <rtems_termios_ioctl+0x37c>
ffc06a20: 2b 89 00 05 cmplwi cr7,r9,5
ffc06a24: 41 9d 00 34 bgt- cr7,ffc06a58 <rtems_termios_ioctl+0x84>
ffc06a28: 2f 89 00 02 cmpwi cr7,r9,2
ffc06a2c: 41 9e 00 b4 beq- cr7,ffc06ae0 <rtems_termios_ioctl+0x10c>
ffc06a30: 2b 89 00 02 cmplwi cr7,r9,2
ffc06a34: 41 9d 00 10 bgt- cr7,ffc06a44 <rtems_termios_ioctl+0x70>
ffc06a38: 2f 89 00 01 cmpwi cr7,r9,1
ffc06a3c: 40 be 00 58 bne+ cr7,ffc06a94 <rtems_termios_ioctl+0xc0><== NEVER TAKEN
ffc06a40: 48 00 00 8c b ffc06acc <rtems_termios_ioctl+0xf8>
ffc06a44: 2f 89 00 03 cmpwi cr7,r9,3
ffc06a48: 41 9e 02 84 beq- cr7,ffc06ccc <rtems_termios_ioctl+0x2f8>
ffc06a4c: 2f 89 00 04 cmpwi cr7,r9,4
ffc06a50: 40 be 00 44 bne+ cr7,ffc06a94 <rtems_termios_ioctl+0xc0><== NEVER TAKEN
ffc06a54: 48 00 03 10 b ffc06d64 <rtems_termios_ioctl+0x390>
ffc06a58: 3d 40 40 04 lis r10,16388
ffc06a5c: 61 4a 66 7f ori r10,r10,26239
ffc06a60: 7f 89 50 00 cmpw cr7,r9,r10
ffc06a64: 41 9e 03 94 beq- cr7,ffc06df8 <rtems_termios_ioctl+0x424><== NEVER TAKEN
ffc06a68: 7f 89 50 40 cmplw cr7,r9,r10
ffc06a6c: 41 9d 00 10 bgt- cr7,ffc06a7c <rtems_termios_ioctl+0xa8>
ffc06a70: 2f 89 00 06 cmpwi cr7,r9,6
ffc06a74: 40 be 00 20 bne+ cr7,ffc06a94 <rtems_termios_ioctl+0xc0>
ffc06a78: 48 00 02 6c b ffc06ce4 <rtems_termios_ioctl+0x310>
ffc06a7c: 6d 2a 40 04 xoris r10,r9,16388
ffc06a80: 2f 8a 74 1a cmpwi cr7,r10,29722
ffc06a84: 41 9e 03 64 beq- cr7,ffc06de8 <rtems_termios_ioctl+0x414>
ffc06a88: 6d 2a 80 04 xoris r10,r9,32772
ffc06a8c: 2f 8a 74 1b cmpwi cr7,r10,29723
ffc06a90: 41 9e 02 e8 beq- cr7,ffc06d78 <rtems_termios_ioctl+0x3a4><== ALWAYS TAKEN
default:
if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
ffc06a94: 81 3f 00 cc lwz r9,204(r31)
ffc06a98: 3d 40 00 00 lis r10,0
ffc06a9c: 39 4a 29 34 addi r10,r10,10548
ffc06aa0: 55 29 28 34 rlwinm r9,r9,5,0,26
ffc06aa4: 7d 2a 4a 14 add r9,r10,r9
ffc06aa8: 81 29 00 18 lwz r9,24(r9)
sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args);
}
else {
sc = RTEMS_INVALID_NUMBER;
ffc06aac: 3b c0 00 0a li r30,10
if (sc != RTEMS_SUCCESSFUL) {
return sc;
}
switch (args->command) {
default:
if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
ffc06ab0: 2f 89 00 00 cmpwi cr7,r9,0
ffc06ab4: 41 9e 03 7c beq- cr7,ffc06e30 <rtems_termios_ioctl+0x45c>
sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args);
ffc06ab8: 7f e3 fb 78 mr r3,r31
ffc06abc: 7d 29 03 a6 mtctr r9
ffc06ac0: 7f a4 eb 78 mr r4,r29
ffc06ac4: 4e 80 04 21 bctrl
ffc06ac8: 48 00 03 18 b ffc06de0 <rtems_termios_ioctl+0x40c>
sc = RTEMS_INVALID_NUMBER;
}
break;
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
ffc06acc: 80 7d 00 08 lwz r3,8(r29)
ffc06ad0: 38 9f 00 30 addi r4,r31,48
ffc06ad4: 38 a0 00 24 li r5,36
ffc06ad8: 48 00 a7 d9 bl ffc112b0 <memcpy>
break;
ffc06adc: 48 00 03 54 b ffc06e30 <rtems_termios_ioctl+0x45c>
case RTEMS_IO_SET_ATTRIBUTES:
tty->termios = *(struct termios *)args->buffer;
ffc06ae0: 80 9d 00 08 lwz r4,8(r29)
ffc06ae4: 38 7f 00 30 addi r3,r31,48
ffc06ae8: 38 a0 00 24 li r5,36
ffc06aec: 48 00 a7 c5 bl ffc112b0 <memcpy>
/*
* check for flow control options to be switched off
*/
/* check for outgoing XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXON) &&
ffc06af0: 81 3f 00 b8 lwz r9,184(r31)
ffc06af4: 71 28 02 00 andi. r8,r9,512
ffc06af8: 41 82 00 70 beq- ffc06b68 <rtems_termios_ioctl+0x194>
!(tty->termios.c_iflag & IXON)) {
ffc06afc: 81 3f 00 30 lwz r9,48(r31)
/*
* check for flow control options to be switched off
*/
/* check for outgoing XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXON) &&
ffc06b00: 71 2a 04 00 andi. r10,r9,1024
ffc06b04: 40 82 00 64 bne- ffc06b68 <rtems_termios_ioctl+0x194>
!(tty->termios.c_iflag & IXON)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF);
ffc06b08: 81 5f 00 b8 lwz r10,184(r31)
ffc06b0c: 39 20 fd ef li r9,-529
ffc06b10: 7d 49 48 38 and r9,r10,r9
ffc06b14: 91 3f 00 b8 stw r9,184(r31)
/* has output been stopped due to received XOFF? */
if (tty->flow_ctrl & FL_OSTOP) {
ffc06b18: 81 3f 00 b8 lwz r9,184(r31)
ffc06b1c: 71 28 00 20 andi. r8,r9,32
ffc06b20: 41 a2 00 48 beq+ ffc06b68 <rtems_termios_ioctl+0x194> <== ALWAYS TAKEN
/* disable interrupts */
rtems_interrupt_disable(level);
ffc06b24: 4b ff f5 a9 bl ffc060cc <ppc_interrupt_disable> <== NOT EXECUTED
ffc06b28: 7c 7d 1b 78 mr r29,r3 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
ffc06b2c: 81 3f 00 b8 lwz r9,184(r31) <== NOT EXECUTED
ffc06b30: 55 29 06 f2 rlwinm r9,r9,0,27,25 <== NOT EXECUTED
ffc06b34: 91 3f 00 b8 stw r9,184(r31) <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
ffc06b38: 81 3f 00 94 lwz r9,148(r31) <== NOT EXECUTED
ffc06b3c: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED
ffc06b40: 41 be 00 24 beq+ cr7,ffc06b64 <rtems_termios_ioctl+0x190><== NOT EXECUTED
/* if chars available, call write function... */
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
ffc06b44: 80 9f 00 84 lwz r4,132(r31) <== 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)(
ffc06b48: 38 a0 00 01 li r5,1 <== NOT EXECUTED
ffc06b4c: 81 5f 00 7c lwz r10,124(r31) <== NOT EXECUTED
ffc06b50: 81 3f 00 a4 lwz r9,164(r31) <== NOT EXECUTED
ffc06b54: 80 7f 00 10 lwz r3,16(r31) <== NOT EXECUTED
ffc06b58: 7c 8a 22 14 add r4,r10,r4 <== NOT EXECUTED
ffc06b5c: 7d 29 03 a6 mtctr r9 <== NOT EXECUTED
ffc06b60: 4e 80 04 21 bctrl <== NOT EXECUTED
ffc06b64: 7f a0 01 24 mtmsr r29 <== NOT EXECUTED
/* reenable interrupts */
rtems_interrupt_enable(level);
}
}
/* check for incoming XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXOF) && !(tty->termios.c_iflag & IXOFF)) {
ffc06b68: 81 3f 00 b8 lwz r9,184(r31)
ffc06b6c: 71 28 04 00 andi. r8,r9,1024
ffc06b70: 41 82 00 28 beq- ffc06b98 <rtems_termios_ioctl+0x1c4>
ffc06b74: 81 3f 00 30 lwz r9,48(r31)
ffc06b78: 71 2a 10 00 andi. r10,r9,4096
ffc06b7c: 40 82 00 1c bne- ffc06b98 <rtems_termios_ioctl+0x1c4>
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXOF);
ffc06b80: 81 3f 00 b8 lwz r9,184(r31)
ffc06b84: 55 29 05 a8 rlwinm r9,r9,0,22,20
ffc06b88: 91 3f 00 b8 stw r9,184(r31)
/* FIXME: what happens, if we had sent XOFF but not yet XON? */
tty->flow_ctrl &= ~(FL_ISNTXOF);
ffc06b8c: 81 3f 00 b8 lwz r9,184(r31)
ffc06b90: 55 29 07 fa rlwinm r9,r9,0,31,29
ffc06b94: 91 3f 00 b8 stw r9,184(r31)
}
/* check for incoming RTS/CTS flow control switched off */
if (( tty->flow_ctrl & FL_MDRTS) && !(tty->termios.c_cflag & CRTSCTS)) {
ffc06b98: 81 3f 00 b8 lwz r9,184(r31)
ffc06b9c: 71 28 01 00 andi. r8,r9,256
ffc06ba0: 41 82 00 4c beq- ffc06bec <rtems_termios_ioctl+0x218> <== ALWAYS TAKEN
ffc06ba4: 81 3f 00 38 lwz r9,56(r31) <== NOT EXECUTED
ffc06ba8: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED
ffc06bac: 41 9c 00 40 blt- cr7,ffc06bec <rtems_termios_ioctl+0x218><== NOT EXECUTED
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDRTS);
ffc06bb0: 81 3f 00 b8 lwz r9,184(r31) <== NOT EXECUTED
ffc06bb4: 55 29 06 2c rlwinm r9,r9,0,24,22 <== NOT EXECUTED
ffc06bb8: 91 3f 00 b8 stw r9,184(r31) <== NOT EXECUTED
/* restart remote Tx, if it was stopped */
if ((tty->flow_ctrl & FL_IRTSOFF) && (tty->device.startRemoteTx != NULL)) {
ffc06bbc: 81 3f 00 b8 lwz r9,184(r31) <== NOT EXECUTED
ffc06bc0: 71 2a 00 04 andi. r10,r9,4 <== NOT EXECUTED
ffc06bc4: 41 82 00 1c beq- ffc06be0 <rtems_termios_ioctl+0x20c> <== NOT EXECUTED
ffc06bc8: 81 3f 00 b0 lwz r9,176(r31) <== NOT EXECUTED
ffc06bcc: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED
ffc06bd0: 41 9e 00 10 beq- cr7,ffc06be0 <rtems_termios_ioctl+0x20c><== NOT EXECUTED
tty->device.startRemoteTx(tty->minor);
ffc06bd4: 80 7f 00 10 lwz r3,16(r31) <== NOT EXECUTED
ffc06bd8: 7d 29 03 a6 mtctr r9 <== NOT EXECUTED
ffc06bdc: 4e 80 04 21 bctrl <== NOT EXECUTED
}
tty->flow_ctrl &= ~(FL_IRTSOFF);
ffc06be0: 81 3f 00 b8 lwz r9,184(r31) <== NOT EXECUTED
ffc06be4: 55 29 07 b8 rlwinm r9,r9,0,30,28 <== NOT EXECUTED
ffc06be8: 91 3f 00 b8 stw r9,184(r31) <== 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) {
ffc06bec: 81 3f 00 38 lwz r9,56(r31)
ffc06bf0: 2f 89 00 00 cmpwi cr7,r9,0
ffc06bf4: 40 bc 00 10 bge+ cr7,ffc06c04 <rtems_termios_ioctl+0x230><== ALWAYS TAKEN
tty->flow_ctrl |= FL_MDRTS;
ffc06bf8: 81 3f 00 b8 lwz r9,184(r31) <== NOT EXECUTED
ffc06bfc: 61 29 01 00 ori r9,r9,256 <== NOT EXECUTED
ffc06c00: 91 3f 00 b8 stw r9,184(r31) <== NOT EXECUTED
}
/* check for incoming XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXOFF) {
ffc06c04: 81 3f 00 30 lwz r9,48(r31)
ffc06c08: 71 28 10 00 andi. r8,r9,4096
ffc06c0c: 41 82 00 10 beq- ffc06c1c <rtems_termios_ioctl+0x248>
tty->flow_ctrl |= FL_MDXOF;
ffc06c10: 81 5f 00 b8 lwz r10,184(r31)
ffc06c14: 61 4a 04 00 ori r10,r10,1024
ffc06c18: 91 5f 00 b8 stw r10,184(r31)
}
/* check for outgoing XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXON) {
ffc06c1c: 71 2a 04 00 andi. r10,r9,1024
ffc06c20: 41 82 00 10 beq- ffc06c30 <rtems_termios_ioctl+0x25c>
tty->flow_ctrl |= FL_MDXON;
ffc06c24: 81 3f 00 b8 lwz r9,184(r31)
ffc06c28: 61 29 02 00 ori r9,r9,512
ffc06c2c: 91 3f 00 b8 stw r9,184(r31)
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) {
ffc06c30: 83 bf 00 3c lwz r29,60(r31)
ffc06c34: 73 bd 00 02 andi. r29,r29,2
ffc06c38: 41 82 00 0c beq- ffc06c44 <rtems_termios_ioctl+0x270>
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
ffc06c3c: 39 20 00 00 li r9,0
ffc06c40: 48 00 00 54 b ffc06c94 <rtems_termios_ioctl+0x2c0>
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
ffc06c44: 8b 9f 00 46 lbz r28,70(r31)
rtems_clock_get_ticks_per_second() / 10;
ffc06c48: 48 00 15 65 bl ffc081ac <rtems_clock_get_ticks_per_second>
ffc06c4c: 39 20 00 0a li r9,10
ffc06c50: 89 5f 00 47 lbz r10,71(r31)
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] *
ffc06c54: 7c 63 e1 d6 mullw r3,r3,r28
rtems_clock_get_ticks_per_second() / 10;
ffc06c58: 7c 63 4b 96 divwu r3,r3,r9
if (tty->termios.c_cc[VTIME]) {
ffc06c5c: 89 3f 00 46 lbz r9,70(r31)
ffc06c60: 2f 89 00 00 cmpwi cr7,r9,0
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] *
ffc06c64: 90 7f 00 54 stw r3,84(r31)
rtems_clock_get_ticks_per_second() / 10;
if (tty->termios.c_cc[VTIME]) {
ffc06c68: 41 9e 00 24 beq- cr7,ffc06c8c <rtems_termios_ioctl+0x2b8>
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
if (tty->termios.c_cc[VMIN])
ffc06c6c: 71 48 00 ff andi. r8,r10,255
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
rtems_clock_get_ticks_per_second() / 10;
if (tty->termios.c_cc[VTIME]) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
ffc06c70: 93 bf 00 6c stw r29,108(r31)
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
ffc06c74: 90 7f 00 70 stw r3,112(r31)
if (tty->termios.c_cc[VMIN])
ffc06c78: 41 82 00 0c beq- ffc06c84 <rtems_termios_ioctl+0x2b0>
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
ffc06c7c: 93 bf 00 74 stw r29,116(r31)
ffc06c80: 48 00 00 2c b ffc06cac <rtems_termios_ioctl+0x2d8>
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
ffc06c84: 90 7f 00 74 stw r3,116(r31)
ffc06c88: 48 00 00 24 b ffc06cac <rtems_termios_ioctl+0x2d8>
} else {
if (tty->termios.c_cc[VMIN]) {
ffc06c8c: 71 48 00 ff andi. r8,r10,255
ffc06c90: 41 82 00 14 beq- ffc06ca4 <rtems_termios_ioctl+0x2d0> <== ALWAYS TAKEN
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
ffc06c94: 91 3f 00 6c stw r9,108(r31)
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
ffc06c98: 91 3f 00 70 stw r9,112(r31)
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
ffc06c9c: 91 3f 00 74 stw r9,116(r31)
ffc06ca0: 48 00 00 0c b ffc06cac <rtems_termios_ioctl+0x2d8>
} else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
ffc06ca4: 39 20 00 01 li r9,1
ffc06ca8: 91 3f 00 6c stw r9,108(r31)
}
}
}
if (tty->device.setAttributes)
ffc06cac: 81 3f 00 a8 lwz r9,168(r31)
ffc06cb0: 2f 89 00 00 cmpwi cr7,r9,0
ffc06cb4: 41 9e 01 7c beq- cr7,ffc06e30 <rtems_termios_ioctl+0x45c>
(*tty->device.setAttributes)(tty->minor, &tty->termios);
ffc06cb8: 80 7f 00 10 lwz r3,16(r31)
ffc06cbc: 38 9f 00 30 addi r4,r31,48
ffc06cc0: 7d 29 03 a6 mtctr r9
ffc06cc4: 4e 80 04 21 bctrl
ffc06cc8: 48 00 01 68 b ffc06e30 <rtems_termios_ioctl+0x45c>
drainOutput (struct rtems_termios_tty *tty)
{
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
ffc06ccc: 81 3f 00 b4 lwz r9,180(r31)
ffc06cd0: 2f 89 00 00 cmpwi cr7,r9,0
ffc06cd4: 41 be 01 5c beq+ cr7,ffc06e30 <rtems_termios_ioctl+0x45c><== ALWAYS TAKEN
ffc06cd8: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc06cdc: 4b ff f6 65 bl ffc06340 <drainOutput.part.0> <== NOT EXECUTED
ffc06ce0: 48 00 01 50 b ffc06e30 <rtems_termios_ioctl+0x45c> <== NOT EXECUTED
case RTEMS_IO_TCDRAIN:
drainOutput (tty);
break;
case RTEMS_IO_TCFLUSH:
switch ((intptr_t) args->buffer) {
ffc06ce4: 81 3d 00 08 lwz r9,8(r29)
ffc06ce8: 2f 89 00 01 cmpwi cr7,r9,1
ffc06cec: 41 9e 00 24 beq- cr7,ffc06d10 <rtems_termios_ioctl+0x33c>
ffc06cf0: 2f 89 00 02 cmpwi cr7,r9,2
ffc06cf4: 41 9e 00 30 beq- cr7,ffc06d24 <rtems_termios_ioctl+0x350>
ffc06cf8: 2f 89 00 00 cmpwi cr7,r9,0
ffc06cfc: 40 9e 01 30 bne- cr7,ffc06e2c <rtems_termios_ioctl+0x458>
static void
flushInput (struct rtems_termios_tty *tty)
{
rtems_interrupt_level level;
rtems_interrupt_disable (level);
ffc06d00: 4b ff f3 cd bl ffc060cc <ppc_interrupt_disable>
tty->rawInBuf.Tail = 0;
ffc06d04: 93 df 00 60 stw r30,96(r31)
tty->rawInBuf.Head = 0;
ffc06d08: 93 df 00 5c stw r30,92(r31)
ffc06d0c: 48 00 00 3c b ffc06d48 <rtems_termios_ioctl+0x374>
static void
flushOutput (struct rtems_termios_tty *tty)
{
rtems_interrupt_level level;
rtems_interrupt_disable (level);
ffc06d10: 4b ff f3 bd bl ffc060cc <ppc_interrupt_disable>
tty->rawOutBuf.Tail = 0;
ffc06d14: 93 df 00 84 stw r30,132(r31)
tty->rawOutBuf.Head = 0;
tty->rawOutBufState = rob_idle;
ffc06d18: 93 df 00 94 stw r30,148(r31)
{
rtems_interrupt_level level;
rtems_interrupt_disable (level);
tty->rawOutBuf.Tail = 0;
tty->rawOutBuf.Head = 0;
ffc06d1c: 93 df 00 80 stw r30,128(r31)
ffc06d20: 48 00 00 28 b ffc06d48 <rtems_termios_ioctl+0x374>
static void
flushOutput (struct rtems_termios_tty *tty)
{
rtems_interrupt_level level;
rtems_interrupt_disable (level);
ffc06d24: 4b ff f3 a9 bl ffc060cc <ppc_interrupt_disable>
tty->rawOutBuf.Tail = 0;
ffc06d28: 93 df 00 84 stw r30,132(r31)
tty->rawOutBuf.Head = 0;
tty->rawOutBufState = rob_idle;
ffc06d2c: 93 df 00 94 stw r30,148(r31)
{
rtems_interrupt_level level;
rtems_interrupt_disable (level);
tty->rawOutBuf.Tail = 0;
tty->rawOutBuf.Head = 0;
ffc06d30: 93 df 00 80 stw r30,128(r31)
ffc06d34: 7c 60 01 24 mtmsr r3
static void
flushInput (struct rtems_termios_tty *tty)
{
rtems_interrupt_level level;
rtems_interrupt_disable (level);
ffc06d38: 4b ff f3 95 bl ffc060cc <ppc_interrupt_disable>
tty->rawInBuf.Tail = 0;
ffc06d3c: 39 20 00 00 li r9,0
ffc06d40: 91 3f 00 60 stw r9,96(r31)
tty->rawInBuf.Head = 0;
ffc06d44: 91 3f 00 5c stw r9,92(r31)
ffc06d48: 7c 60 01 24 mtmsr r3
ffc06d4c: 48 00 00 e4 b ffc06e30 <rtems_termios_ioctl+0x45c>
break;
}
break;
case RTEMS_IO_SNDWAKEUP:
tty->tty_snd = *wakeup;
ffc06d50: 81 1c 00 00 lwz r8,0(r28)
ffc06d54: 81 3c 00 04 lwz r9,4(r28)
ffc06d58: 91 1f 00 d4 stw r8,212(r31)
ffc06d5c: 91 3f 00 d8 stw r9,216(r31)
break;
ffc06d60: 48 00 00 d0 b ffc06e30 <rtems_termios_ioctl+0x45c>
case RTEMS_IO_RCVWAKEUP:
tty->tty_rcv = *wakeup;
ffc06d64: 81 3c 00 00 lwz r9,0(r28)
ffc06d68: 81 5c 00 04 lwz r10,4(r28)
ffc06d6c: 91 3f 00 dc stw r9,220(r31)
ffc06d70: 91 5f 00 e0 stw r10,224(r31)
break;
ffc06d74: 48 00 00 bc b ffc06e30 <rtems_termios_ioctl+0x45c>
#if 1 /* FIXME */
case TIOCSETD:
/*
* close old line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
ffc06d78: 81 3f 00 cc lwz r9,204(r31)
ffc06d7c: 3d 40 00 00 lis r10,0
ffc06d80: 39 4a 29 34 addi r10,r10,10548
ffc06d84: 55 29 28 34 rlwinm r9,r9,5,0,26
ffc06d88: 7d 2a 4a 14 add r9,r10,r9
ffc06d8c: 81 29 00 04 lwz r9,4(r9)
ffc06d90: 2f 89 00 00 cmpwi cr7,r9,0
ffc06d94: 41 9e 00 14 beq- cr7,ffc06da8 <rtems_termios_ioctl+0x3d4>
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
ffc06d98: 7f e3 fb 78 mr r3,r31
ffc06d9c: 7d 29 03 a6 mtctr r9
ffc06da0: 4e 80 04 21 bctrl
ffc06da4: 7c 7e 1b 78 mr r30,r3
}
tty->t_line=*(int*)(args->buffer);
ffc06da8: 81 3d 00 08 lwz r9,8(r29)
tty->t_sc = NULL; /* ensure that no more valid data */
ffc06dac: 39 40 00 00 li r10,0
* close old line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
}
tty->t_line=*(int*)(args->buffer);
ffc06db0: 81 29 00 00 lwz r9,0(r9)
tty->t_sc = NULL; /* ensure that no more valid data */
ffc06db4: 91 5f 00 d0 stw r10,208(r31)
/*
* open new line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
ffc06db8: 3d 40 00 00 lis r10,0
ffc06dbc: 39 4a 29 34 addi r10,r10,10548
* close old line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
}
tty->t_line=*(int*)(args->buffer);
ffc06dc0: 91 3f 00 cc stw r9,204(r31)
tty->t_sc = NULL; /* ensure that no more valid data */
/*
* open new line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
ffc06dc4: 55 29 28 34 rlwinm r9,r9,5,0,26
ffc06dc8: 7d 2a 48 2e lwzx r9,r10,r9
ffc06dcc: 2f 89 00 00 cmpwi cr7,r9,0
ffc06dd0: 41 9e 00 60 beq- cr7,ffc06e30 <rtems_termios_ioctl+0x45c>
sc = rtems_termios_linesw[tty->t_line].l_open(tty);
ffc06dd4: 7f e3 fb 78 mr r3,r31
ffc06dd8: 7d 29 03 a6 mtctr r9
ffc06ddc: 4e 80 04 21 bctrl
ffc06de0: 7c 7e 1b 78 mr r30,r3
ffc06de4: 48 00 00 4c b ffc06e30 <rtems_termios_ioctl+0x45c>
}
break;
case TIOCGETD:
*(int*)(args->buffer)=tty->t_line;
ffc06de8: 81 3f 00 cc lwz r9,204(r31)
ffc06dec: 81 5d 00 08 lwz r10,8(r29)
ffc06df0: 91 2a 00 00 stw r9,0(r10)
break;
ffc06df4: 48 00 00 3c b ffc06e30 <rtems_termios_ioctl+0x45c>
#endif
case FIONREAD: {
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
ffc06df8: 81 5f 00 60 lwz r10,96(r31) <== NOT EXECUTED
ffc06dfc: 81 3f 00 5c lwz r9,92(r31) <== NOT EXECUTED
if ( rawnc < 0 )
ffc06e00: 7d 29 50 51 subf. r9,r9,r10 <== NOT EXECUTED
ffc06e04: 40 a0 00 0c bge+ ffc06e10 <rtems_termios_ioctl+0x43c> <== NOT EXECUTED
rawnc += tty->rawInBuf.Size;
ffc06e08: 81 5f 00 64 lwz r10,100(r31) <== NOT EXECUTED
ffc06e0c: 7d 29 52 14 add r9,r9,r10 <== NOT EXECUTED
/* Half guess that this is the right operation */
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
ffc06e10: 81 1f 00 20 lwz r8,32(r31) <== NOT EXECUTED
ffc06e14: 81 5f 00 24 lwz r10,36(r31) <== NOT EXECUTED
ffc06e18: 80 fd 00 08 lwz r7,8(r29) <== NOT EXECUTED
ffc06e1c: 7d 4a 40 50 subf r10,r10,r8 <== NOT EXECUTED
ffc06e20: 7d 2a 4a 14 add r9,r10,r9 <== NOT EXECUTED
ffc06e24: 91 27 00 00 stw r9,0(r7) <== NOT EXECUTED
}
break;
ffc06e28: 48 00 00 08 b ffc06e30 <rtems_termios_ioctl+0x45c> <== NOT EXECUTED
case TCIOFLUSH:
flushOutput (tty);
flushInput (tty);
break;
default:
sc = RTEMS_INVALID_NAME;
ffc06e2c: 3b c0 00 03 li r30,3
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
}
break;
}
rtems_semaphore_release (tty->osem);
ffc06e30: 80 7f 00 18 lwz r3,24(r31)
ffc06e34: 48 00 1b 9d bl ffc089d0 <rtems_semaphore_release>
return sc;
}
ffc06e38: 39 61 00 18 addi r11,r1,24
ffc06e3c: 7f c3 f3 78 mr r3,r30
ffc06e40: 4b ff 97 78 b ffc005b8 <_restgpr_28_x>
ffc063a4 <rtems_termios_open>:
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
ffc063a4: 94 21 ff d0 stwu r1,-48(r1)
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain(
ffc063a8: 3d 20 00 00 lis r9,0
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
ffc063ac: 7c 08 02 a6 mflr r0
ffc063b0: be c1 00 08 stmw r22,8(r1)
ffc063b4: 7c 7b 1b 78 mr r27,r3
ffc063b8: 7c 9a 23 78 mr r26,r4
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain(
ffc063bc: 80 69 28 58 lwz r3,10328(r9)
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
ffc063c0: 7c b8 2b 78 mr r24,r5
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain(
ffc063c4: 38 80 00 00 li r4,0
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
ffc063c8: 90 01 00 34 stw r0,52(r1)
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain(
ffc063cc: 38 a0 00 00 li r5,0
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
ffc063d0: 7c d6 33 78 mr r22,r6
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain(
ffc063d4: 48 00 24 d9 bl ffc088ac <rtems_semaphore_obtain>
rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
ffc063d8: 7c 7e 1b 79 mr. r30,r3
ffc063dc: 40 82 03 f4 bne- ffc067d0 <rtems_termios_open+0x42c> <== NEVER TAKEN
return sc;
for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) {
ffc063e0: 3d 20 00 00 lis r9,0
ffc063e4: 83 a9 28 60 lwz r29,10336(r9)
ffc063e8: 7f bf eb 78 mr r31,r29
ffc063ec: 48 00 00 20 b ffc0640c <rtems_termios_open+0x68>
if ((tty->major == major) && (tty->minor == minor))
ffc063f0: 81 3f 00 0c lwz r9,12(r31)
ffc063f4: 7f 89 d8 00 cmpw cr7,r9,r27
ffc063f8: 40 be 00 10 bne+ cr7,ffc06408 <rtems_termios_open+0x64>
ffc063fc: 81 3f 00 10 lwz r9,16(r31)
ffc06400: 7f 89 d0 00 cmpw cr7,r9,r26
ffc06404: 41 9e 03 1c beq- cr7,ffc06720 <rtems_termios_open+0x37c><== ALWAYS TAKEN
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) {
ffc06408: 83 ff 00 00 lwz r31,0(r31)
ffc0640c: 2f 9f 00 00 cmpwi cr7,r31,0
ffc06410: 40 9e ff e0 bne+ cr7,ffc063f0 <rtems_termios_open+0x4c>
ffc06414: 48 00 03 a4 b ffc067b8 <rtems_termios_open+0x414>
return RTEMS_NO_MEMORY;
}
/*
* allocate raw input buffer
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
ffc06418: 3d 20 00 00 lis r9,0
ffc0641c: 3a e9 21 5c addi r23,r9,8540
ffc06420: 81 29 21 5c lwz r9,8540(r9)
ffc06424: 91 3f 00 64 stw r9,100(r31)
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
ffc06428: 80 7f 00 64 lwz r3,100(r31)
ffc0642c: 4b ff e4 cd bl ffc048f8 <malloc>
if (tty->rawInBuf.theBuf == NULL) {
ffc06430: 2f 83 00 00 cmpwi cr7,r3,0
}
/*
* allocate raw input buffer
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
ffc06434: 90 7f 00 58 stw r3,88(r31)
ffc06438: 7c 7c 1b 78 mr r28,r3
if (tty->rawInBuf.theBuf == NULL) {
ffc0643c: 40 be 00 08 bne+ cr7,ffc06444 <rtems_termios_open+0xa0>
ffc06440: 48 00 00 4c b ffc0648c <rtems_termios_open+0xe8>
return RTEMS_NO_MEMORY;
}
/*
* allocate raw output buffer
*/
tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
ffc06444: 81 37 00 04 lwz r9,4(r23)
ffc06448: 91 3f 00 88 stw r9,136(r31)
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
ffc0644c: 80 7f 00 88 lwz r3,136(r31)
ffc06450: 4b ff e4 a9 bl ffc048f8 <malloc>
if (tty->rawOutBuf.theBuf == NULL) {
ffc06454: 2f 83 00 00 cmpwi cr7,r3,0
}
/*
* allocate raw output buffer
*/
tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
ffc06458: 90 7f 00 7c stw r3,124(r31)
ffc0645c: 7c 79 1b 78 mr r25,r3
if (tty->rawOutBuf.theBuf == NULL) {
ffc06460: 40 be 00 08 bne+ cr7,ffc06468 <rtems_termios_open+0xc4>
ffc06464: 48 00 00 20 b ffc06484 <rtems_termios_open+0xe0>
return RTEMS_NO_MEMORY;
}
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
ffc06468: 80 77 00 08 lwz r3,8(r23)
ffc0646c: 4b ff e4 8d bl ffc048f8 <malloc>
if (tty->cbuf == NULL) {
ffc06470: 2f 83 00 00 cmpwi cr7,r3,0
return RTEMS_NO_MEMORY;
}
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
ffc06474: 90 7f 00 1c stw r3,28(r31)
if (tty->cbuf == NULL) {
ffc06478: 40 be 00 30 bne+ cr7,ffc064a8 <rtems_termios_open+0x104>
free((void *)(tty->rawOutBuf.theBuf));
ffc0647c: 7f 23 cb 78 mr r3,r25
ffc06480: 4b ff e0 dd bl ffc0455c <free>
free((void *)(tty->rawInBuf.theBuf));
ffc06484: 7f 83 e3 78 mr r3,r28
ffc06488: 4b ff e0 d5 bl ffc0455c <free>
free(tty);
ffc0648c: 7f e3 fb 78 mr r3,r31
ffc06490: 4b ff e0 cd bl ffc0455c <free>
rtems_semaphore_release (rtems_termios_ttyMutex);
ffc06494: 3d 20 00 00 lis r9,0
ffc06498: 80 69 28 58 lwz r3,10328(r9)
return RTEMS_NO_MEMORY;
ffc0649c: 3b c0 00 1a li r30,26
tty->cbuf = malloc (CBUFSIZE);
if (tty->cbuf == NULL) {
free((void *)(tty->rawOutBuf.theBuf));
free((void *)(tty->rawInBuf.theBuf));
free(tty);
rtems_semaphore_release (rtems_termios_ttyMutex);
ffc064a0: 48 00 25 31 bl ffc089d0 <rtems_semaphore_release>
return RTEMS_NO_MEMORY;
ffc064a4: 48 00 03 2c b ffc067d0 <rtems_termios_open+0x42c>
/*
* link tty
*/
tty->forw = rtems_termios_ttyHead;
tty->back = NULL;
if (rtems_termios_ttyHead != NULL)
ffc064a8: 2f 9d 00 00 cmpwi cr7,r29,0
tty->tty_rcvwakeup = 0;
/*
* link tty
*/
tty->forw = rtems_termios_ttyHead;
ffc064ac: 93 bf 00 00 stw r29,0(r31)
return RTEMS_NO_MEMORY;
}
/*
* Initialize wakeup callbacks
*/
tty->tty_snd.sw_pfn = NULL;
ffc064b0: 39 20 00 00 li r9,0
ffc064b4: 91 3f 00 d4 stw r9,212(r31)
tty->tty_snd.sw_arg = NULL;
ffc064b8: 91 3f 00 d8 stw r9,216(r31)
tty->tty_rcv.sw_pfn = NULL;
ffc064bc: 91 3f 00 dc stw r9,220(r31)
tty->tty_rcv.sw_arg = NULL;
ffc064c0: 91 3f 00 e0 stw r9,224(r31)
tty->tty_rcvwakeup = 0;
ffc064c4: 91 3f 00 e4 stw r9,228(r31)
/*
* link tty
*/
tty->forw = rtems_termios_ttyHead;
tty->back = NULL;
ffc064c8: 91 3f 00 04 stw r9,4(r31)
if (rtems_termios_ttyHead != NULL)
ffc064cc: 41 9e 00 08 beq- cr7,ffc064d4 <rtems_termios_open+0x130>
rtems_termios_ttyHead->back = tty;
ffc064d0: 93 fd 00 04 stw r31,4(r29)
rtems_termios_ttyHead = tty;
ffc064d4: 3d 20 00 00 lis r9,0
ffc064d8: 93 e9 28 60 stw r31,10336(r9)
if (rtems_termios_ttyTail == NULL)
ffc064dc: 3d 20 00 00 lis r9,0
ffc064e0: 81 49 28 5c lwz r10,10332(r9)
ffc064e4: 2f 8a 00 00 cmpwi cr7,r10,0
ffc064e8: 40 be 00 08 bne+ cr7,ffc064f0 <rtems_termios_open+0x14c>
rtems_termios_ttyTail = tty;
ffc064ec: 93 e9 28 5c stw r31,10332(r9)
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
rtems_build_name ('T', 'R', 'i', c),
ffc064f0: 3f a0 00 00 lis r29,0
rtems_termios_ttyHead->back = tty;
rtems_termios_ttyHead = tty;
if (rtems_termios_ttyTail == NULL)
rtems_termios_ttyTail = tty;
tty->minor = minor;
ffc064f4: 93 5f 00 10 stw r26,16(r31)
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
rtems_build_name ('T', 'R', 'i', c),
ffc064f8: 3b bd 21 5c addi r29,r29,8540
ffc064fc: 88 7d 00 0c lbz r3,12(r29)
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
ffc06500: 38 80 00 01 li r4,1
rtems_termios_ttyHead = tty;
if (rtems_termios_ttyTail == NULL)
rtems_termios_ttyTail = tty;
tty->minor = minor;
tty->major = major;
ffc06504: 93 7f 00 0c stw r27,12(r31)
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
ffc06508: 38 a0 00 54 li r5,84
ffc0650c: 64 63 54 52 oris r3,r3,21586
ffc06510: 60 63 69 00 ori r3,r3,26880
ffc06514: 38 c0 00 00 li r6,0
ffc06518: 38 ff 00 14 addi r7,r31,20
ffc0651c: 48 00 21 0d bl ffc08628 <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)
ffc06520: 2f 83 00 00 cmpwi cr7,r3,0
ffc06524: 41 be 00 08 beq+ cr7,ffc0652c <rtems_termios_open+0x188>
ffc06528: 48 00 02 7c b ffc067a4 <rtems_termios_open+0x400>
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
rtems_build_name ('T', 'R', 'o', c),
ffc0652c: 88 7d 00 0c lbz r3,12(r29)
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 (
ffc06530: 38 80 00 01 li r4,1
ffc06534: 38 a0 00 54 li r5,84
ffc06538: 64 63 54 52 oris r3,r3,21586
ffc0653c: 60 63 6f 00 ori r3,r3,28416
ffc06540: 38 c0 00 00 li r6,0
ffc06544: 38 ff 00 18 addi r7,r31,24
ffc06548: 48 00 20 e1 bl ffc08628 <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)
ffc0654c: 2f 83 00 00 cmpwi cr7,r3,0
ffc06550: 41 be 00 08 beq+ cr7,ffc06558 <rtems_termios_open+0x1b4>
ffc06554: 48 00 02 50 b ffc067a4 <rtems_termios_open+0x400>
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
rtems_build_name ('T', 'R', 'x', c),
ffc06558: 88 7d 00 0c lbz r3,12(r29)
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 (
ffc0655c: 38 80 00 00 li r4,0
ffc06560: 38 a0 00 20 li r5,32
ffc06564: 64 63 54 52 oris r3,r3,21586
ffc06568: 60 63 78 00 ori r3,r3,30720
ffc0656c: 38 c0 00 00 li r6,0
ffc06570: 38 ff 00 8c addi r7,r31,140
ffc06574: 48 00 20 b5 bl ffc08628 <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)
ffc06578: 7c 69 1b 79 mr. r9,r3
ffc0657c: 41 a2 00 08 beq+ ffc06584 <rtems_termios_open+0x1e0>
ffc06580: 48 00 02 24 b ffc067a4 <rtems_termios_open+0x400>
tty->rawOutBufState = rob_idle;
/*
* Set callbacks
*/
tty->device = *callbacks;
ffc06584: 38 9f 00 98 addi r4,r31,152
RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO,
RTEMS_NO_PRIORITY,
&tty->rawOutBuf.Semaphore);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
tty->rawOutBufState = rob_idle;
ffc06588: 91 3f 00 94 stw r9,148(r31)
/*
* Set callbacks
*/
tty->device = *callbacks;
ffc0658c: 7c b6 04 aa lswi r5,r22,32
ffc06590: 7c a4 05 aa stswi r5,r4,32
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
ffc06594: 81 3f 00 b4 lwz r9,180(r31)
ffc06598: 2f 89 00 02 cmpwi cr7,r9,2
ffc0659c: 40 be 00 64 bne+ cr7,ffc06600 <rtems_termios_open+0x25c>
sc = rtems_task_create (
rtems_build_name ('T', 'x', 'T', c),
ffc065a0: 88 7d 00 0c lbz r3,12(r29)
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
sc = rtems_task_create (
ffc065a4: 38 80 00 0a li r4,10
ffc065a8: 38 a0 04 00 li r5,1024
ffc065ac: 64 63 54 78 oris r3,r3,21624
ffc065b0: 60 63 54 00 ori r3,r3,21504
ffc065b4: 38 c0 05 00 li r6,1280
ffc065b8: 38 e0 00 00 li r7,0
ffc065bc: 39 1f 00 c8 addi r8,r31,200
ffc065c0: 48 00 25 29 bl ffc08ae8 <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)
ffc065c4: 2f 83 00 00 cmpwi cr7,r3,0
ffc065c8: 41 be 00 08 beq+ cr7,ffc065d0 <rtems_termios_open+0x22c><== ALWAYS TAKEN
ffc065cc: 48 00 01 d8 b ffc067a4 <rtems_termios_open+0x400> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
sc = rtems_task_create (
rtems_build_name ('R', 'x', 'T', c),
ffc065d0: 88 7d 00 0c lbz r3,12(r29)
RTEMS_NO_ASR,
RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
&tty->txTaskId);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
sc = rtems_task_create (
ffc065d4: 38 80 00 09 li r4,9
ffc065d8: 38 a0 04 00 li r5,1024
ffc065dc: 64 63 52 78 oris r3,r3,21112
ffc065e0: 60 63 54 00 ori r3,r3,21504
ffc065e4: 38 c0 05 00 li r6,1280
ffc065e8: 38 e0 00 00 li r7,0
ffc065ec: 39 1f 00 c4 addi r8,r31,196
ffc065f0: 48 00 24 f9 bl ffc08ae8 <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)
ffc065f4: 2f 83 00 00 cmpwi cr7,r3,0
ffc065f8: 41 be 00 08 beq+ cr7,ffc06600 <rtems_termios_open+0x25c><== ALWAYS TAKEN
ffc065fc: 48 00 01 a8 b ffc067a4 <rtems_termios_open+0x400> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
ffc06600: 81 3f 00 a0 lwz r9,160(r31)
ffc06604: 2f 89 00 00 cmpwi cr7,r9,0
ffc06608: 41 9e 00 10 beq- cr7,ffc06618 <rtems_termios_open+0x274>
ffc0660c: 81 3f 00 b4 lwz r9,180(r31)
ffc06610: 2f 89 00 02 cmpwi cr7,r9,2
ffc06614: 40 be 00 34 bne+ cr7,ffc06648 <rtems_termios_open+0x2a4>
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
sc = rtems_semaphore_create (
rtems_build_name ('T', 'R', 'r', c),
ffc06618: 3d 20 00 00 lis r9,0
ffc0661c: 88 69 21 68 lbz r3,8552(r9)
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
sc = rtems_semaphore_create (
ffc06620: 38 80 00 00 li r4,0
ffc06624: 38 a0 00 24 li r5,36
ffc06628: 64 63 54 52 oris r3,r3,21586
ffc0662c: 60 63 72 00 ori r3,r3,29184
ffc06630: 38 c0 00 00 li r6,0
ffc06634: 38 ff 00 68 addi r7,r31,104
ffc06638: 48 00 1f f1 bl ffc08628 <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)
ffc0663c: 2f 83 00 00 cmpwi cr7,r3,0
ffc06640: 41 be 00 08 beq+ cr7,ffc06648 <rtems_termios_open+0x2a4><== ALWAYS TAKEN
ffc06644: 48 00 01 60 b ffc067a4 <rtems_termios_open+0x400> <== NOT EXECUTED
}
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
ffc06648: 39 20 25 02 li r9,9474
ffc0664c: 91 3f 00 30 stw r9,48(r31)
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
ffc06650: 39 20 18 05 li r9,6149
ffc06654: 91 3f 00 34 stw r9,52(r31)
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
ffc06658: 39 20 08 bd li r9,2237
ffc0665c: 91 3f 00 38 stw r9,56(r31)
tty->termios.c_lflag =
ffc06660: 39 20 00 00 li r9,0
ffc06664: 61 29 82 3b ori r9,r9,33339
ffc06668: 91 3f 00 3c stw r9,60(r31)
ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
tty->termios.c_cc[VINTR] = '\003';
ffc0666c: 39 20 00 03 li r9,3
ffc06670: 99 3f 00 41 stb r9,65(r31)
tty->termios.c_cc[VQUIT] = '\034';
ffc06674: 39 20 00 1c li r9,28
ffc06678: 99 3f 00 42 stb r9,66(r31)
tty->termios.c_cc[VERASE] = '\177';
ffc0667c: 39 20 00 7f li r9,127
ffc06680: 99 3f 00 43 stb r9,67(r31)
tty->termios.c_cc[VKILL] = '\025';
ffc06684: 39 20 00 15 li r9,21
ffc06688: 99 3f 00 44 stb r9,68(r31)
tty->termios.c_cc[VEOF] = '\004';
ffc0668c: 39 20 00 04 li r9,4
ffc06690: 99 3f 00 45 stb r9,69(r31)
tty->termios.c_cc[VEOL] = '\000';
ffc06694: 39 20 00 00 li r9,0
ffc06698: 99 3f 00 4c stb r9,76(r31)
tty->termios.c_cc[VEOL2] = '\000';
ffc0669c: 99 3f 00 51 stb r9,81(r31)
tty->termios.c_cc[VSTART] = '\021';
ffc066a0: 39 20 00 11 li r9,17
ffc066a4: 99 3f 00 49 stb r9,73(r31)
tty->termios.c_cc[VSTOP] = '\023';
ffc066a8: 39 20 00 13 li r9,19
ffc066ac: 99 3f 00 4a stb r9,74(r31)
tty->termios.c_cc[VSUSP] = '\032';
ffc066b0: 39 20 00 1a li r9,26
ffc066b4: 99 3f 00 4b stb r9,75(r31)
tty->termios.c_cc[VREPRINT] = '\022';
ffc066b8: 39 20 00 12 li r9,18
ffc066bc: 99 3f 00 4d stb r9,77(r31)
tty->termios.c_cc[VDISCARD] = '\017';
ffc066c0: 39 20 00 0f li r9,15
ffc066c4: 99 3f 00 4e stb r9,78(r31)
tty->termios.c_cc[VWERASE] = '\027';
ffc066c8: 39 20 00 17 li r9,23
ffc066cc: 99 3f 00 4f stb r9,79(r31)
tty->termios.c_cc[VLNEXT] = '\026';
ffc066d0: 39 20 00 16 li r9,22
ffc066d4: 99 3f 00 50 stb r9,80(r31)
/* start with no flow control, clear flow control flags */
tty->flow_ctrl = 0;
ffc066d8: 39 20 00 00 li r9,0
ffc066dc: 91 3f 00 b8 stw r9,184(r31)
/*
* set low/highwater mark for XON/XOFF support
*/
tty->lowwater = tty->rawInBuf.Size * 1/2;
ffc066e0: 81 3f 00 64 lwz r9,100(r31)
ffc066e4: 55 29 f8 7e rlwinm r9,r9,31,1,31
ffc066e8: 91 3f 00 bc stw r9,188(r31)
tty->highwater = tty->rawInBuf.Size * 3/4;
ffc066ec: 81 3f 00 64 lwz r9,100(r31)
ffc066f0: 1d 29 00 03 mulli r9,r9,3
ffc066f4: 55 29 f0 be rlwinm r9,r9,30,2,31
ffc066f8: 91 3f 00 c0 stw r9,192(r31)
/*
* Bump name characer
*/
if (c++ == 'z')
ffc066fc: 3d 20 00 00 lis r9,0
ffc06700: 39 29 21 5c addi r9,r9,8540
ffc06704: 89 49 00 0c lbz r10,12(r9)
ffc06708: 2f 8a 00 7a cmpwi cr7,r10,122
ffc0670c: 41 9e 00 0c beq- cr7,ffc06718 <rtems_termios_open+0x374>
ffc06710: 39 4a 00 01 addi r10,r10,1
ffc06714: 48 00 00 08 b ffc0671c <rtems_termios_open+0x378>
c = 'a';
ffc06718: 39 40 00 61 li r10,97
ffc0671c: 99 49 00 0c stb r10,12(r9)
}
args->iop->data1 = tty;
ffc06720: 81 38 00 00 lwz r9,0(r24)
ffc06724: 93 e9 00 30 stw r31,48(r9)
if (!tty->refcount++) {
ffc06728: 81 3f 00 08 lwz r9,8(r31)
ffc0672c: 2f 89 00 00 cmpwi cr7,r9,0
ffc06730: 39 49 00 01 addi r10,r9,1
ffc06734: 91 5f 00 08 stw r10,8(r31)
ffc06738: 40 9e 00 70 bne- cr7,ffc067a8 <rtems_termios_open+0x404>
if (tty->device.firstOpen)
ffc0673c: 81 3f 00 98 lwz r9,152(r31)
ffc06740: 2f 89 00 00 cmpwi cr7,r9,0
ffc06744: 41 9e 00 18 beq- cr7,ffc0675c <rtems_termios_open+0x3b8><== ALWAYS TAKEN
(*tty->device.firstOpen)(major, minor, arg);
ffc06748: 7f 63 db 78 mr r3,r27 <== NOT EXECUTED
ffc0674c: 7d 29 03 a6 mtctr r9 <== NOT EXECUTED
ffc06750: 7f 44 d3 78 mr r4,r26 <== NOT EXECUTED
ffc06754: 7f 05 c3 78 mr r5,r24 <== NOT EXECUTED
ffc06758: 4e 80 04 21 bctrl <== NOT EXECUTED
/*
* start I/O tasks, if needed
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
ffc0675c: 81 3f 00 b4 lwz r9,180(r31)
ffc06760: 2f 89 00 02 cmpwi cr7,r9,2
ffc06764: 40 be 00 44 bne+ cr7,ffc067a8 <rtems_termios_open+0x404>
sc = rtems_task_start(
ffc06768: 80 7f 00 c4 lwz r3,196(r31)
ffc0676c: 3c 80 ff c0 lis r4,-64
ffc06770: 38 84 7c dc addi r4,r4,31964
ffc06774: 7f e5 fb 78 mr r5,r31
ffc06778: 48 00 26 41 bl ffc08db8 <rtems_task_start>
tty->rxTaskId, rtems_termios_rxdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
ffc0677c: 2f 83 00 00 cmpwi cr7,r3,0
ffc06780: 41 be 00 08 beq+ cr7,ffc06788 <rtems_termios_open+0x3e4><== ALWAYS TAKEN
ffc06784: 48 00 00 20 b ffc067a4 <rtems_termios_open+0x400> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
sc = rtems_task_start(
ffc06788: 80 7f 00 c8 lwz r3,200(r31)
ffc0678c: 3c 80 ff c0 lis r4,-64
ffc06790: 38 84 62 c4 addi r4,r4,25284
ffc06794: 7f e5 fb 78 mr r5,r31
ffc06798: 48 00 26 21 bl ffc08db8 <rtems_task_start>
tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
ffc0679c: 2f 83 00 00 cmpwi cr7,r3,0
ffc067a0: 41 be 00 08 beq+ cr7,ffc067a8 <rtems_termios_open+0x404><== ALWAYS TAKEN
rtems_fatal_error_occurred (sc);
ffc067a4: 48 00 28 d1 bl ffc09074 <rtems_fatal_error_occurred>
}
}
rtems_semaphore_release (rtems_termios_ttyMutex);
ffc067a8: 3d 20 00 00 lis r9,0
ffc067ac: 80 69 28 58 lwz r3,10328(r9)
ffc067b0: 48 00 22 21 bl ffc089d0 <rtems_semaphore_release>
return RTEMS_SUCCESSFUL;
ffc067b4: 48 00 00 1c b ffc067d0 <rtems_termios_open+0x42c>
static char c = 'a';
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
ffc067b8: 38 60 00 01 li r3,1
ffc067bc: 38 80 00 e8 li r4,232
ffc067c0: 4b ff da 41 bl ffc04200 <calloc>
if (tty == NULL) {
ffc067c4: 7c 7f 1b 79 mr. r31,r3
ffc067c8: 40 82 fc 50 bne+ ffc06418 <rtems_termios_open+0x74>
ffc067cc: 4b ff fc c8 b ffc06494 <rtems_termios_open+0xf0>
rtems_fatal_error_occurred (sc);
}
}
rtems_semaphore_release (rtems_termios_ttyMutex);
return RTEMS_SUCCESSFUL;
}
ffc067d0: 39 61 00 30 addi r11,r1,48
ffc067d4: 7f c3 f3 78 mr r3,r30
ffc067d8: 4b ff 9d c8 b ffc005a0 <_restgpr_22_x>
ffc06e44 <rtems_termios_puts>:
* Send characters to device-specific code
*/
void
rtems_termios_puts (
const void *_buf, size_t len, struct rtems_termios_tty *tty)
{
ffc06e44: 94 21 ff d8 stwu r1,-40(r1)
ffc06e48: 7c 08 02 a6 mflr r0
ffc06e4c: 7c 89 23 78 mr r9,r4
ffc06e50: 90 01 00 2c stw r0,44(r1)
const unsigned char *buf = _buf;
unsigned int newHead;
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
ffc06e54: 81 45 00 b4 lwz r10,180(r5)
* Send characters to device-specific code
*/
void
rtems_termios_puts (
const void *_buf, size_t len, struct rtems_termios_tty *tty)
{
ffc06e58: bf 21 00 0c stmw r25,12(r1)
ffc06e5c: 7c 7e 1b 78 mr r30,r3
const unsigned char *buf = _buf;
unsigned int newHead;
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
ffc06e60: 2f 8a 00 00 cmpwi cr7,r10,0
* Send characters to device-specific code
*/
void
rtems_termios_puts (
const void *_buf, size_t len, struct rtems_termios_tty *tty)
{
ffc06e64: 7c bf 2b 78 mr r31,r5
const unsigned char *buf = _buf;
unsigned int newHead;
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
ffc06e68: 40 be 00 2c bne+ cr7,ffc06e94 <rtems_termios_puts+0x50>
(*tty->device.write)(tty->minor, buf, len);
ffc06e6c: 81 45 00 a4 lwz r10,164(r5)
ffc06e70: 7f c4 f3 78 mr r4,r30
tty->rawOutBufState = rob_busy;
}
rtems_interrupt_enable (level);
len--;
}
}
ffc06e74: 80 01 00 2c lwz r0,44(r1)
unsigned int newHead;
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, buf, len);
ffc06e78: 7d 49 03 a6 mtctr r10
ffc06e7c: 80 65 00 10 lwz r3,16(r5)
tty->rawOutBufState = rob_busy;
}
rtems_interrupt_enable (level);
len--;
}
}
ffc06e80: 7c 08 03 a6 mtlr r0
ffc06e84: bb 21 00 0c lmw r25,12(r1)
unsigned int newHead;
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, buf, len);
ffc06e88: 7d 25 4b 78 mr r5,r9
tty->rawOutBufState = rob_busy;
}
rtems_interrupt_enable (level);
len--;
}
}
ffc06e8c: 38 21 00 28 addi r1,r1,40
unsigned int newHead;
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, buf, len);
ffc06e90: 4e 80 04 20 bctr
return;
}
newHead = tty->rawOutBuf.Head;
ffc06e94: 83 a5 00 80 lwz r29,128(r5)
/*
* Send characters to device-specific code
*/
void
rtems_termios_puts (
ffc06e98: 7f 63 22 14 add r27,r3,r4
* with interrupts enabled.
*/
newHead = (newHead + 1) % tty->rawOutBuf.Size;
rtems_interrupt_disable (level);
while (newHead == tty->rawOutBuf.Tail) {
tty->rawOutBufState = rob_wait;
ffc06e9c: 3b 40 00 02 li r26,2
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;
}
tty->rawOutBufState = rob_busy;
ffc06ea0: 3b 20 00 01 li r25,1
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
while (len) {
ffc06ea4: 48 00 00 bc b ffc06f60 <rtems_termios_puts+0x11c>
* len -= ncopy
*
* To minimize latency, the memcpy should be done
* with interrupts enabled.
*/
newHead = (newHead + 1) % tty->rawOutBuf.Size;
ffc06ea8: 81 5f 00 88 lwz r10,136(r31)
ffc06eac: 3b bd 00 01 addi r29,r29,1
ffc06eb0: 7d 3d 53 96 divwu r9,r29,r10
ffc06eb4: 7d 49 51 d6 mullw r10,r9,r10
ffc06eb8: 7f aa e8 50 subf r29,r10,r29
ffc06ebc: 48 00 00 28 b ffc06ee4 <rtems_termios_puts+0xa0>
rtems_interrupt_disable (level);
while (newHead == tty->rawOutBuf.Tail) {
tty->rawOutBufState = rob_wait;
ffc06ec0: 93 5f 00 94 stw r26,148(r31)
ffc06ec4: 7f 80 01 24 mtmsr r28
rtems_interrupt_enable (level);
sc = rtems_semaphore_obtain(
ffc06ec8: 80 7f 00 8c lwz r3,140(r31)
ffc06ecc: 38 80 00 00 li r4,0
ffc06ed0: 38 a0 00 00 li r5,0
ffc06ed4: 48 00 19 d9 bl ffc088ac <rtems_semaphore_obtain>
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
ffc06ed8: 2f 83 00 00 cmpwi cr7,r3,0
ffc06edc: 41 be 00 08 beq+ cr7,ffc06ee4 <rtems_termios_puts+0xa0> <== ALWAYS TAKEN
rtems_fatal_error_occurred (sc);
ffc06ee0: 48 00 21 95 bl ffc09074 <rtems_fatal_error_occurred> <== NOT EXECUTED
rtems_interrupt_disable (level);
ffc06ee4: 4b ff f1 e9 bl ffc060cc <ppc_interrupt_disable>
ffc06ee8: 7c 7c 1b 78 mr r28,r3
* 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) {
ffc06eec: 81 3f 00 84 lwz r9,132(r31)
ffc06ef0: 7f 9d 48 00 cmpw cr7,r29,r9
ffc06ef4: 41 9e ff cc beq+ cr7,ffc06ec0 <rtems_termios_puts+0x7c>
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++;
ffc06ef8: 89 1e 00 00 lbz r8,0(r30)
ffc06efc: 3b de 00 01 addi r30,r30,1
ffc06f00: 81 5f 00 80 lwz r10,128(r31)
ffc06f04: 81 3f 00 7c lwz r9,124(r31)
ffc06f08: 7d 09 51 ae stbx r8,r9,r10
tty->rawOutBuf.Head = newHead;
if (tty->rawOutBufState == rob_idle) {
ffc06f0c: 81 3f 00 94 lwz r9,148(r31)
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
}
tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++;
tty->rawOutBuf.Head = newHead;
ffc06f10: 93 bf 00 80 stw r29,128(r31)
if (tty->rawOutBufState == rob_idle) {
ffc06f14: 2f 89 00 00 cmpwi cr7,r9,0
ffc06f18: 40 9e 00 44 bne- cr7,ffc06f5c <rtems_termios_puts+0x118>
/* check, whether XOFF has been received */
if (!(tty->flow_ctrl & FL_ORCVXOF)) {
ffc06f1c: 81 3f 00 b8 lwz r9,184(r31)
ffc06f20: 71 2a 00 10 andi. r10,r9,16
ffc06f24: 40 a2 00 28 bne+ ffc06f4c <rtems_termios_puts+0x108> <== NEVER TAKEN
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
ffc06f28: 80 9f 00 84 lwz r4,132(r31)
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)(
ffc06f2c: 38 a0 00 01 li r5,1
ffc06f30: 81 5f 00 7c lwz r10,124(r31)
ffc06f34: 81 3f 00 a4 lwz r9,164(r31)
ffc06f38: 80 7f 00 10 lwz r3,16(r31)
ffc06f3c: 7c 8a 22 14 add r4,r10,r4
ffc06f40: 7d 29 03 a6 mtctr r9
ffc06f44: 4e 80 04 21 bctrl
ffc06f48: 48 00 00 10 b ffc06f58 <rtems_termios_puts+0x114>
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;
ffc06f4c: 81 3f 00 b8 lwz r9,184(r31) <== NOT EXECUTED
ffc06f50: 61 29 00 20 ori r9,r9,32 <== NOT EXECUTED
ffc06f54: 91 3f 00 b8 stw r9,184(r31) <== NOT EXECUTED
}
tty->rawOutBufState = rob_busy;
ffc06f58: 93 3f 00 94 stw r25,148(r31)
ffc06f5c: 7f 80 01 24 mtmsr r28
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
while (len) {
ffc06f60: 7f 9e d8 00 cmpw cr7,r30,r27
ffc06f64: 40 9e ff 44 bne+ cr7,ffc06ea8 <rtems_termios_puts+0x64>
tty->rawOutBufState = rob_busy;
}
rtems_interrupt_enable (level);
len--;
}
}
ffc06f68: 39 61 00 28 addi r11,r1,40
ffc06f6c: 4b ff 96 40 b ffc005ac <_restgpr_25_x>
ffc07680 <rtems_termios_read>:
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_termios_read (void *arg)
{
ffc07680: 94 21 ff d0 stwu r1,-48(r1)
ffc07684: 7c 08 02 a6 mflr r0
struct rtems_termios_tty *tty = args->iop->data1;
uint32_t count = args->count;
char *buffer = args->buffer;
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
ffc07688: 38 80 00 00 li r4,0
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_termios_read (void *arg)
{
ffc0768c: 90 01 00 34 stw r0,52(r1)
struct rtems_termios_tty *tty = args->iop->data1;
uint32_t count = args->count;
char *buffer = args->buffer;
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
ffc07690: 38 a0 00 00 li r5,0
rtems_status_code
rtems_termios_read (void *arg)
{
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
ffc07694: 81 23 00 00 lwz r9,0(r3)
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_termios_read (void *arg)
{
ffc07698: be e1 00 0c stmw r23,12(r1)
ffc0769c: 7c 7e 1b 78 mr r30,r3
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
ffc076a0: 83 e9 00 30 lwz r31,48(r9)
uint32_t count = args->count;
ffc076a4: 83 83 00 14 lwz r28,20(r3)
char *buffer = args->buffer;
ffc076a8: 83 23 00 10 lwz r25,16(r3)
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
ffc076ac: 80 7f 00 14 lwz r3,20(r31)
ffc076b0: 48 00 11 fd bl ffc088ac <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
ffc076b4: 7c 7d 1b 79 mr. r29,r3
ffc076b8: 40 82 03 2c bne- ffc079e4 <rtems_termios_read+0x364> <== NEVER TAKEN
return sc;
if (rtems_termios_linesw[tty->t_line].l_read != NULL) {
ffc076bc: 81 3f 00 cc lwz r9,204(r31)
ffc076c0: 3d 40 00 00 lis r10,0
ffc076c4: 39 4a 29 34 addi r10,r10,10548
ffc076c8: 55 29 28 34 rlwinm r9,r9,5,0,26
ffc076cc: 7d 2a 4a 14 add r9,r10,r9
ffc076d0: 81 29 00 08 lwz r9,8(r9)
ffc076d4: 2f 89 00 00 cmpwi cr7,r9,0
ffc076d8: 41 9e 00 1c beq- cr7,ffc076f4 <rtems_termios_read+0x74>
sc = rtems_termios_linesw[tty->t_line].l_read(tty,args);
ffc076dc: 7f e3 fb 78 mr r3,r31
ffc076e0: 7d 29 03 a6 mtctr r9
ffc076e4: 7f c4 f3 78 mr r4,r30
ffc076e8: 4e 80 04 21 bctrl
ffc076ec: 7c 7d 1b 78 mr r29,r3
ffc076f0: 48 00 02 e4 b ffc079d4 <rtems_termios_read+0x354>
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
ffc076f4: 81 5f 00 24 lwz r10,36(r31)
ffc076f8: 81 3f 00 20 lwz r9,32(r31)
ffc076fc: 7f 8a 48 00 cmpw cr7,r10,r9
ffc07700: 40 be 02 8c bne+ cr7,ffc0798c <rtems_termios_read+0x30c><== NEVER TAKEN
tty->cindex = tty->ccount = 0;
tty->read_start_column = tty->column;
ffc07704: 81 3f 00 28 lwz r9,40(r31)
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
tty->cindex = tty->ccount = 0;
ffc07708: 93 bf 00 20 stw r29,32(r31)
tty->read_start_column = tty->column;
ffc0770c: 91 3f 00 2c stw r9,44(r31)
if (tty->device.pollRead != NULL &&
ffc07710: 81 3f 00 a0 lwz r9,160(r31)
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
tty->cindex = tty->ccount = 0;
ffc07714: 93 bf 00 24 stw r29,36(r31)
tty->read_start_column = tty->column;
if (tty->device.pollRead != NULL &&
ffc07718: 2f 89 00 00 cmpwi cr7,r9,0
ffc0771c: 41 9e 00 fc beq- cr7,ffc07818 <rtems_termios_read+0x198>
ffc07720: 81 3f 00 b4 lwz r9,180(r31)
ffc07724: 2f 89 00 00 cmpwi cr7,r9,0
ffc07728: 40 be 00 f0 bne+ cr7,ffc07818 <rtems_termios_read+0x198>
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
ffc0772c: 81 3f 00 3c lwz r9,60(r31)
ffc07730: 71 2a 00 02 andi. r10,r9,2
ffc07734: 41 82 00 40 beq- ffc07774 <rtems_termios_read+0xf4>
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
ffc07738: 81 3f 00 a0 lwz r9,160(r31)
ffc0773c: 80 7f 00 10 lwz r3,16(r31)
ffc07740: 7d 29 03 a6 mtctr r9
ffc07744: 4e 80 04 21 bctrl
if (n < 0) {
ffc07748: 2c 03 00 00 cmpwi r3,0
ffc0774c: 40 a0 00 10 bge+ ffc0775c <rtems_termios_read+0xdc>
rtems_task_wake_after (1);
ffc07750: 38 60 00 01 li r3,1
ffc07754: 48 00 16 dd bl ffc08e30 <rtems_task_wake_after>
ffc07758: 4b ff ff e0 b ffc07738 <rtems_termios_read+0xb8>
} else {
if (siproc (n, tty))
ffc0775c: 54 63 06 3e clrlwi r3,r3,24
ffc07760: 7f e4 fb 78 mr r4,r31
ffc07764: 4b ff fd e1 bl ffc07544 <siproc>
ffc07768: 2f 83 00 00 cmpwi cr7,r3,0
ffc0776c: 41 9e ff cc beq+ cr7,ffc07738 <rtems_termios_read+0xb8>
ffc07770: 48 00 02 1c b ffc0798c <rtems_termios_read+0x30c>
}
}
} else {
rtems_interval then, now;
then = rtems_clock_get_ticks_since_boot();
ffc07774: 48 00 0a 51 bl ffc081c4 <rtems_clock_get_ticks_since_boot>
ffc07778: 7c 7b 1b 78 mr r27,r3
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
ffc0777c: 81 3f 00 a0 lwz r9,160(r31)
ffc07780: 80 7f 00 10 lwz r3,16(r31)
ffc07784: 7d 29 03 a6 mtctr r9
ffc07788: 4e 80 04 21 bctrl
if (n < 0) {
ffc0778c: 2c 03 00 00 cmpwi r3,0
ffc07790: 40 80 00 54 bge- ffc077e4 <rtems_termios_read+0x164>
if (tty->termios.c_cc[VMIN]) {
ffc07794: 89 3f 00 47 lbz r9,71(r31)
ffc07798: 2f 89 00 00 cmpwi cr7,r9,0
ffc0779c: 89 3f 00 46 lbz r9,70(r31)
if (tty->termios.c_cc[VTIME] && tty->ccount) {
ffc077a0: 71 2a 00 ff andi. r10,r9,255
then = rtems_clock_get_ticks_since_boot();
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
if (n < 0) {
if (tty->termios.c_cc[VMIN]) {
ffc077a4: 41 9e 00 24 beq- cr7,ffc077c8 <rtems_termios_read+0x148>
if (tty->termios.c_cc[VTIME] && tty->ccount) {
ffc077a8: 40 82 00 10 bne- ffc077b8 <rtems_termios_read+0x138> <== ALWAYS TAKEN
now = rtems_clock_get_ticks_since_boot();
if ((now - then) > tty->vtimeTicks) {
break;
}
}
rtems_task_wake_after (1);
ffc077ac: 38 60 00 01 li r3,1
ffc077b0: 48 00 16 81 bl ffc08e30 <rtems_task_wake_after>
ffc077b4: 4b ff ff c8 b ffc0777c <rtems_termios_read+0xfc>
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) {
ffc077b8: 81 3f 00 20 lwz r9,32(r31)
ffc077bc: 2f 89 00 00 cmpwi cr7,r9,0
ffc077c0: 41 9e ff ec beq+ cr7,ffc077ac <rtems_termios_read+0x12c>
ffc077c4: 48 00 00 08 b ffc077cc <rtems_termios_read+0x14c>
if ((now - then) > tty->vtimeTicks) {
break;
}
}
} else {
if (!tty->termios.c_cc[VTIME])
ffc077c8: 41 82 01 c4 beq- ffc0798c <rtems_termios_read+0x30c> <== NEVER TAKEN
break;
now = rtems_clock_get_ticks_since_boot();
ffc077cc: 48 00 09 f9 bl ffc081c4 <rtems_clock_get_ticks_since_boot>
if ((now - then) > tty->vtimeTicks) {
ffc077d0: 81 3f 00 54 lwz r9,84(r31)
ffc077d4: 7c 7b 18 50 subf r3,r27,r3
ffc077d8: 7f 83 48 40 cmplw cr7,r3,r9
ffc077dc: 40 9d ff d0 ble+ cr7,ffc077ac <rtems_termios_read+0x12c>
ffc077e0: 48 00 01 ac b ffc0798c <rtems_termios_read+0x30c>
break;
}
}
rtems_task_wake_after (1);
} else {
siproc (n, tty);
ffc077e4: 54 63 06 3e clrlwi r3,r3,24
ffc077e8: 7f e4 fb 78 mr r4,r31
ffc077ec: 4b ff fd 59 bl ffc07544 <siproc>
if (tty->ccount >= tty->termios.c_cc[VMIN])
ffc077f0: 89 3f 00 47 lbz r9,71(r31)
ffc077f4: 81 5f 00 20 lwz r10,32(r31)
ffc077f8: 7f 8a 48 00 cmpw cr7,r10,r9
ffc077fc: 40 9c 01 90 bge- cr7,ffc0798c <rtems_termios_read+0x30c>
break;
if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME])
ffc07800: 2f 89 00 00 cmpwi cr7,r9,0
ffc07804: 41 be ff 78 beq- cr7,ffc0777c <rtems_termios_read+0xfc> <== NEVER TAKEN
ffc07808: 89 3f 00 46 lbz r9,70(r31)
ffc0780c: 2f 89 00 00 cmpwi cr7,r9,0
ffc07810: 41 9e ff 6c beq+ cr7,ffc0777c <rtems_termios_read+0xfc> <== NEVER TAKEN
ffc07814: 4b ff ff 60 b ffc07774 <rtems_termios_read+0xf4>
* Fill the input buffer from the raw input queue
*/
static rtems_status_code
fillBufferQueue (struct rtems_termios_tty *tty)
{
rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout;
ffc07818: 83 5f 00 74 lwz r26,116(r31)
rtems_status_code sc;
int wait = 1;
ffc0781c: 3b 60 00 01 li r27,1
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
(tty->ccount < (CBUFSIZE-1))) {
ffc07820: 3f 00 00 00 lis r24,0
== (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);
ffc07824: 3a ff 00 49 addi r23,r31,73
ffc07828: 48 00 01 14 b ffc0793c <rtems_termios_read+0x2bc>
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;
ffc0782c: 81 1f 00 5c lwz r8,92(r31)
ffc07830: 80 ff 00 64 lwz r7,100(r31)
ffc07834: 39 08 00 01 addi r8,r8,1
c = tty->rawInBuf.theBuf[newHead];
ffc07838: 81 5f 00 58 lwz r10,88(r31)
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;
ffc0783c: 7d 28 3b 96 divwu r9,r8,r7
ffc07840: 7d 29 39 d6 mullw r9,r9,r7
ffc07844: 7d 29 40 50 subf r9,r9,r8
c = tty->rawInBuf.theBuf[newHead];
ffc07848: 7f 4a 48 ae lbzx r26,r10,r9
tty->rawInBuf.Head = newHead;
ffc0784c: 91 3f 00 5c stw r9,92(r31)
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
ffc07850: 81 5f 00 60 lwz r10,96(r31)
ffc07854: 80 ff 00 64 lwz r7,100(r31)
% tty->rawInBuf.Size)
ffc07858: 81 1f 00 64 lwz r8,100(r31)
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)
ffc0785c: 7d 47 52 14 add r10,r7,r10
ffc07860: 7d 29 50 50 subf r9,r9,r10
% tty->rawInBuf.Size)
ffc07864: 7d 49 43 96 divwu r10,r9,r8
ffc07868: 7d 0a 41 d6 mullw r8,r10,r8
ffc0786c: 7d 08 48 50 subf r8,r8,r9
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)
ffc07870: 81 3f 00 bc lwz r9,188(r31)
ffc07874: 7f 88 48 40 cmplw cr7,r8,r9
ffc07878: 40 9c 00 84 bge- cr7,ffc078fc <rtems_termios_read+0x27c><== NEVER TAKEN
% tty->rawInBuf.Size)
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
ffc0787c: 81 3f 00 b8 lwz r9,184(r31)
ffc07880: 55 29 00 3c rlwinm r9,r9,0,0,30
ffc07884: 91 3f 00 b8 stw r9,184(r31)
/* if tx stopped and XON should be sent... */
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
ffc07888: 81 3f 00 b8 lwz r9,184(r31)
ffc0788c: 71 29 02 02 andi. r9,r9,514
ffc07890: 2f 89 02 02 cmpwi cr7,r9,514
ffc07894: 40 be 00 38 bne+ cr7,ffc078cc <rtems_termios_read+0x24c><== ALWAYS TAKEN
== (FL_MDXON | FL_ISNTXOF))
&& ((tty->rawOutBufState == rob_idle)
ffc07898: 81 3f 00 94 lwz r9,148(r31) <== NOT EXECUTED
ffc0789c: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED
ffc078a0: 41 9e 00 10 beq- cr7,ffc078b0 <rtems_termios_read+0x230><== NOT EXECUTED
|| (tty->flow_ctrl & FL_OSTOP))) {
ffc078a4: 81 3f 00 b8 lwz r9,184(r31) <== NOT EXECUTED
ffc078a8: 71 2a 00 20 andi. r10,r9,32 <== NOT EXECUTED
ffc078ac: 41 82 00 20 beq- ffc078cc <rtems_termios_read+0x24c> <== NOT EXECUTED
/* XON should be sent now... */
(*tty->device.write)(
ffc078b0: 81 3f 00 a4 lwz r9,164(r31) <== NOT EXECUTED
ffc078b4: 7e e4 bb 78 mr r4,r23 <== NOT EXECUTED
ffc078b8: 80 7f 00 10 lwz r3,16(r31) <== NOT EXECUTED
ffc078bc: 38 a0 00 01 li r5,1 <== NOT EXECUTED
ffc078c0: 7d 29 03 a6 mtctr r9 <== NOT EXECUTED
ffc078c4: 4e 80 04 21 bctrl <== NOT EXECUTED
ffc078c8: 48 00 00 34 b ffc078fc <rtems_termios_read+0x27c> <== NOT EXECUTED
tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1);
} else if (tty->flow_ctrl & FL_MDRTS) {
ffc078cc: 81 3f 00 b8 lwz r9,184(r31)
ffc078d0: 71 2a 01 00 andi. r10,r9,256
ffc078d4: 41 82 00 28 beq- ffc078fc <rtems_termios_read+0x27c> <== ALWAYS TAKEN
tty->flow_ctrl &= ~FL_IRTSOFF;
ffc078d8: 81 3f 00 b8 lwz r9,184(r31) <== NOT EXECUTED
ffc078dc: 55 29 07 b8 rlwinm r9,r9,0,30,28 <== NOT EXECUTED
ffc078e0: 91 3f 00 b8 stw r9,184(r31) <== NOT EXECUTED
/* activate RTS line */
if (tty->device.startRemoteTx != NULL) {
ffc078e4: 81 3f 00 b0 lwz r9,176(r31) <== NOT EXECUTED
ffc078e8: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED
ffc078ec: 41 9e 00 10 beq- cr7,ffc078fc <rtems_termios_read+0x27c><== NOT EXECUTED
tty->device.startRemoteTx(tty->minor);
ffc078f0: 80 7f 00 10 lwz r3,16(r31) <== NOT EXECUTED
ffc078f4: 7d 29 03 a6 mtctr r9 <== NOT EXECUTED
ffc078f8: 4e 80 04 21 bctrl <== NOT EXECUTED
}
}
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
ffc078fc: 81 3f 00 3c lwz r9,60(r31)
if (siproc (c, tty))
ffc07900: 7f 43 d3 78 mr r3,r26
ffc07904: 7f e4 fb 78 mr r4,r31
}
}
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
ffc07908: 71 2a 00 02 andi. r10,r9,2
ffc0790c: 41 82 00 18 beq- ffc07924 <rtems_termios_read+0x2a4> <== NEVER TAKEN
if (siproc (c, tty))
ffc07910: 4b ff fc 35 bl ffc07544 <siproc>
ffc07914: 2f 83 00 00 cmpwi cr7,r3,0
ffc07918: 41 9e 00 20 beq- cr7,ffc07938 <rtems_termios_read+0x2b8>
wait = 0;
ffc0791c: 3b 60 00 00 li r27,0
ffc07920: 48 00 00 18 b ffc07938 <rtems_termios_read+0x2b8>
} else {
siproc (c, tty);
ffc07924: 4b ff fc 21 bl ffc07544 <siproc> <== NOT EXECUTED
if (tty->ccount >= tty->termios.c_cc[VMIN])
ffc07928: 89 5f 00 47 lbz r10,71(r31) <== NOT EXECUTED
ffc0792c: 81 3f 00 20 lwz r9,32(r31) <== NOT EXECUTED
ffc07930: 7f 89 50 00 cmpw cr7,r9,r10 <== NOT EXECUTED
ffc07934: 40 bc ff e8 bge- cr7,ffc0791c <rtems_termios_read+0x29c><== NOT EXECUTED
wait = 0;
}
timeout = tty->rawInBufSemaphoreTimeout;
ffc07938: 83 5f 00 70 lwz r26,112(r31)
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
ffc0793c: 81 5f 00 5c lwz r10,92(r31)
ffc07940: 81 3f 00 60 lwz r9,96(r31)
ffc07944: 7f 8a 48 00 cmpw cr7,r10,r9
ffc07948: 40 be 00 10 bne+ cr7,ffc07958 <rtems_termios_read+0x2d8>
}
/*
* Wait for characters
*/
if ( wait ) {
ffc0794c: 2f 9b 00 00 cmpwi cr7,r27,0
ffc07950: 41 be 00 3c beq+ cr7,ffc0798c <rtems_termios_read+0x30c>
ffc07954: 48 00 00 20 b ffc07974 <rtems_termios_read+0x2f4>
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
(tty->ccount < (CBUFSIZE-1))) {
ffc07958: 39 38 21 5c addi r9,r24,8540
ffc0795c: 81 49 00 08 lwz r10,8(r9)
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
ffc07960: 81 3f 00 20 lwz r9,32(r31)
(tty->ccount < (CBUFSIZE-1))) {
ffc07964: 39 4a ff ff addi r10,r10,-1
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
ffc07968: 7f 89 50 40 cmplw cr7,r9,r10
ffc0796c: 41 9c fe c0 blt+ cr7,ffc0782c <rtems_termios_read+0x1ac><== ALWAYS TAKEN
ffc07970: 4b ff ff dc b ffc0794c <rtems_termios_read+0x2cc> <== NOT EXECUTED
/*
* Wait for characters
*/
if ( wait ) {
sc = rtems_semaphore_obtain(
ffc07974: 80 7f 00 68 lwz r3,104(r31)
ffc07978: 7f 45 d3 78 mr r5,r26
ffc0797c: 80 9f 00 6c lwz r4,108(r31)
ffc07980: 48 00 0f 2d bl ffc088ac <rtems_semaphore_obtain>
tty->rawInBuf.Semaphore, tty->rawInBufSemaphoreOptions, timeout);
if (sc != RTEMS_SUCCESSFUL)
ffc07984: 2f 83 00 00 cmpwi cr7,r3,0
ffc07988: 41 9e ff b4 beq+ cr7,ffc0793c <rtems_termios_read+0x2bc><== ALWAYS TAKEN
}
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_termios_read (void *arg)
ffc0798c: 39 3c 00 01 addi r9,r28,1
ffc07990: 39 59 ff ff addi r10,r25,-1
ffc07994: 7d 29 03 a6 mtctr r9
ffc07998: 48 00 00 1c b ffc079b4 <rtems_termios_read+0x334>
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
*buffer++ = tty->cbuf[tty->cindex++];
ffc0799c: 81 1f 00 1c lwz r8,28(r31)
count--;
ffc079a0: 3b 9c ff ff addi r28,r28,-1
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
*buffer++ = tty->cbuf[tty->cindex++];
ffc079a4: 7d 08 48 ae lbzx r8,r8,r9
ffc079a8: 39 29 00 01 addi r9,r9,1
ffc079ac: 9d 0a 00 01 stbu r8,1(r10)
ffc079b0: 91 3f 00 24 stw r9,36(r31)
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
ffc079b4: 42 40 00 14 bdz- ffc079c8 <rtems_termios_read+0x348>
ffc079b8: 81 3f 00 24 lwz r9,36(r31)
ffc079bc: 81 1f 00 20 lwz r8,32(r31)
ffc079c0: 7f 89 40 00 cmpw cr7,r9,r8
ffc079c4: 41 9c ff d8 blt+ cr7,ffc0799c <rtems_termios_read+0x31c>
*buffer++ = tty->cbuf[tty->cindex++];
count--;
}
args->bytes_moved = args->count - count;
ffc079c8: 81 3e 00 14 lwz r9,20(r30)
ffc079cc: 7f 9c 48 50 subf r28,r28,r9
ffc079d0: 93 9e 00 1c stw r28,28(r30)
tty->tty_rcvwakeup = 0;
ffc079d4: 39 20 00 00 li r9,0
rtems_semaphore_release (tty->isem);
ffc079d8: 80 7f 00 14 lwz r3,20(r31)
while (count && (tty->cindex < tty->ccount)) {
*buffer++ = tty->cbuf[tty->cindex++];
count--;
}
args->bytes_moved = args->count - count;
tty->tty_rcvwakeup = 0;
ffc079dc: 91 3f 00 e4 stw r9,228(r31)
rtems_semaphore_release (tty->isem);
ffc079e0: 48 00 0f f1 bl ffc089d0 <rtems_semaphore_release>
return sc;
}
ffc079e4: 39 61 00 30 addi r11,r1,48
ffc079e8: 7f a3 eb 78 mr r3,r29
ffc079ec: 4b ff 8b b8 b ffc005a4 <_restgpr_23_x>
ffc060e0 <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)
{
ffc060e0: 94 21 ff e8 stwu r1,-24(r1)
ffc060e4: 7c 08 02 a6 mflr r0
ffc060e8: 90 01 00 1c stw r0,28(r1)
int nToSend;
rtems_interrupt_level level;
int len;
/* check for XOF/XON to send */
if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF))
ffc060ec: 81 23 00 b8 lwz r9,184(r3)
* 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)
{
ffc060f0: bf a1 00 0c stmw r29,12(r1)
ffc060f4: 7c 7f 1b 78 mr r31,r3
int nToSend;
rtems_interrupt_level level;
int len;
/* check for XOF/XON to send */
if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF))
ffc060f8: 71 29 04 03 andi. r9,r9,1027
ffc060fc: 2f 89 04 01 cmpwi cr7,r9,1025
ffc06100: 40 be 00 38 bne+ cr7,ffc06138 <rtems_termios_refill_transmitter+0x58><== ALWAYS TAKEN
== (FL_MDXOF | FL_IREQXOF)) {
/* XOFF should be sent now... */
(*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1);
ffc06104: 81 23 00 a4 lwz r9,164(r3) <== NOT EXECUTED
ffc06108: 38 9f 00 4a addi r4,r31,74 <== NOT EXECUTED
ffc0610c: 38 a0 00 01 li r5,1 <== NOT EXECUTED
ffc06110: 80 63 00 10 lwz r3,16(r3) <== NOT EXECUTED
ffc06114: 7d 29 03 a6 mtctr r9 <== NOT EXECUTED
ffc06118: 4e 80 04 21 bctrl <== NOT EXECUTED
rtems_interrupt_disable(level);
ffc0611c: 4b ff ff b1 bl ffc060cc <ppc_interrupt_disable> <== NOT EXECUTED
tty->t_dqlen--;
ffc06120: 81 3f 00 90 lwz r9,144(r31) <== NOT EXECUTED
ffc06124: 39 29 ff ff addi r9,r9,-1 <== NOT EXECUTED
ffc06128: 91 3f 00 90 stw r9,144(r31) <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
ffc0612c: 81 3f 00 b8 lwz r9,184(r31) <== NOT EXECUTED
ffc06130: 61 29 00 02 ori r9,r9,2 <== NOT EXECUTED
ffc06134: 48 00 00 44 b ffc06178 <rtems_termios_refill_transmitter+0x98><== NOT EXECUTED
rtems_interrupt_enable(level);
nToSend = 1;
} else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) == FL_ISNTXOF) {
ffc06138: 81 23 00 b8 lwz r9,184(r3)
ffc0613c: 55 29 07 be clrlwi r9,r9,30
ffc06140: 2f 89 00 02 cmpwi cr7,r9,2
ffc06144: 40 be 00 44 bne+ cr7,ffc06188 <rtems_termios_refill_transmitter+0xa8><== 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);
ffc06148: 81 23 00 a4 lwz r9,164(r3) <== NOT EXECUTED
ffc0614c: 38 9f 00 49 addi r4,r31,73 <== NOT EXECUTED
ffc06150: 38 a0 00 01 li r5,1 <== NOT EXECUTED
ffc06154: 80 63 00 10 lwz r3,16(r3) <== NOT EXECUTED
ffc06158: 7d 29 03 a6 mtctr r9 <== NOT EXECUTED
ffc0615c: 4e 80 04 21 bctrl <== NOT EXECUTED
rtems_interrupt_disable(level);
ffc06160: 4b ff ff 6d bl ffc060cc <ppc_interrupt_disable> <== NOT EXECUTED
tty->t_dqlen--;
ffc06164: 81 3f 00 90 lwz r9,144(r31) <== NOT EXECUTED
ffc06168: 39 29 ff ff addi r9,r9,-1 <== NOT EXECUTED
ffc0616c: 91 3f 00 90 stw r9,144(r31) <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
ffc06170: 81 3f 00 b8 lwz r9,184(r31) <== NOT EXECUTED
ffc06174: 55 29 07 fa rlwinm r9,r9,0,31,29 <== NOT EXECUTED
ffc06178: 91 3f 00 b8 stw r9,184(r31) <== NOT EXECUTED
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0617c: 7c 60 01 24 mtmsr r3 <== NOT EXECUTED
rtems_interrupt_enable(level);
nToSend = 1;
ffc06180: 3b c0 00 01 li r30,1 <== NOT EXECUTED
ffc06184: 48 00 01 34 b ffc062b8 <rtems_termios_refill_transmitter+0x1d8><== NOT EXECUTED
} else {
if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
ffc06188: 81 43 00 80 lwz r10,128(r3)
ffc0618c: 81 23 00 84 lwz r9,132(r3)
ffc06190: 7f 8a 48 00 cmpw cr7,r10,r9
ffc06194: 40 9e 00 20 bne- cr7,ffc061b4 <rtems_termios_refill_transmitter+0xd4>
/*
* buffer was empty
*/
if (tty->rawOutBufState == rob_wait) {
ffc06198: 81 23 00 94 lwz r9,148(r3)
/*
* this should never happen...
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
}
return 0;
ffc0619c: 3b c0 00 00 li r30,0
} else {
if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
/*
* buffer was empty
*/
if (tty->rawOutBufState == rob_wait) {
ffc061a0: 2f 89 00 02 cmpwi cr7,r9,2
ffc061a4: 40 be 01 14 bne+ cr7,ffc062b8 <rtems_termios_refill_transmitter+0x1d8><== ALWAYS TAKEN
/*
* this should never happen...
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
ffc061a8: 80 63 00 8c lwz r3,140(r3) <== NOT EXECUTED
ffc061ac: 48 00 28 25 bl ffc089d0 <rtems_semaphore_release> <== NOT EXECUTED
ffc061b0: 48 00 01 08 b ffc062b8 <rtems_termios_refill_transmitter+0x1d8><== NOT EXECUTED
}
return 0;
}
rtems_interrupt_disable(level);
ffc061b4: 4b ff ff 19 bl ffc060cc <ppc_interrupt_disable>
len = tty->t_dqlen;
tty->t_dqlen = 0;
ffc061b8: 39 20 00 00 li r9,0
}
return 0;
}
rtems_interrupt_disable(level);
len = tty->t_dqlen;
ffc061bc: 83 bf 00 90 lwz r29,144(r31)
tty->t_dqlen = 0;
ffc061c0: 91 3f 00 90 stw r9,144(r31)
ffc061c4: 7c 60 01 24 mtmsr r3
rtems_interrupt_enable(level);
newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size;
ffc061c8: 81 3f 00 84 lwz r9,132(r31)
ffc061cc: 81 5f 00 88 lwz r10,136(r31)
ffc061d0: 7d 3d 4a 14 add r9,r29,r9
ffc061d4: 7f a9 53 96 divwu r29,r9,r10
ffc061d8: 7f bd 51 d6 mullw r29,r29,r10
ffc061dc: 7f bd 48 50 subf r29,r29,r9
tty->rawOutBuf.Tail = newTail;
if (tty->rawOutBufState == rob_wait) {
ffc061e0: 81 3f 00 94 lwz r9,148(r31)
len = tty->t_dqlen;
tty->t_dqlen = 0;
rtems_interrupt_enable(level);
newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size;
tty->rawOutBuf.Tail = newTail;
ffc061e4: 93 bf 00 84 stw r29,132(r31)
if (tty->rawOutBufState == rob_wait) {
ffc061e8: 2f 89 00 02 cmpwi cr7,r9,2
ffc061ec: 40 be 00 0c bne+ cr7,ffc061f8 <rtems_termios_refill_transmitter+0x118>
/*
* wake up any pending writer task
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
ffc061f0: 80 7f 00 8c lwz r3,140(r31)
ffc061f4: 48 00 27 dd bl ffc089d0 <rtems_semaphore_release>
}
if (newTail == tty->rawOutBuf.Head) {
ffc061f8: 81 3f 00 80 lwz r9,128(r31)
ffc061fc: 7f 9d 48 00 cmpw cr7,r29,r9
ffc06200: 40 be 00 30 bne+ cr7,ffc06230 <rtems_termios_refill_transmitter+0x150>
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
ffc06204: 39 20 00 00 li r9,0
ffc06208: 91 3f 00 94 stw r9,148(r31)
nToSend = 0;
ffc0620c: 3b c0 00 00 li r30,0
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
ffc06210: 81 3f 00 d4 lwz r9,212(r31)
ffc06214: 2f 89 00 00 cmpwi cr7,r9,0
ffc06218: 41 9e 00 9c beq- cr7,ffc062b4 <rtems_termios_refill_transmitter+0x1d4><== ALWAYS TAKEN
(*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg);
ffc0621c: 38 7f 00 30 addi r3,r31,48 <== NOT EXECUTED
ffc06220: 80 9f 00 d8 lwz r4,216(r31) <== NOT EXECUTED
ffc06224: 7d 29 03 a6 mtctr r9 <== NOT EXECUTED
ffc06228: 4e 80 04 21 bctrl <== NOT EXECUTED
ffc0622c: 48 00 00 88 b ffc062b4 <rtems_termios_refill_transmitter+0x1d4><== NOT EXECUTED
}
}
/* check, whether output should stop due to received XOFF */
else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF))
ffc06230: 81 3f 00 b8 lwz r9,184(r31)
ffc06234: 71 29 02 10 andi. r9,r9,528
ffc06238: 2f 89 02 10 cmpwi cr7,r9,528
ffc0623c: 40 be 00 28 bne+ cr7,ffc06264 <rtems_termios_refill_transmitter+0x184><== 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);
ffc06240: 4b ff fe 8d bl ffc060cc <ppc_interrupt_disable> <== NOT EXECUTED
tty->flow_ctrl |= FL_OSTOP;
ffc06244: 81 3f 00 b8 lwz r9,184(r31) <== NOT EXECUTED
ffc06248: 61 29 00 20 ori r9,r9,32 <== NOT EXECUTED
ffc0624c: 91 3f 00 b8 stw r9,184(r31) <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/
ffc06250: 39 20 00 01 li r9,1 <== NOT EXECUTED
ffc06254: 91 3f 00 94 stw r9,148(r31) <== NOT EXECUTED
ffc06258: 7c 60 01 24 mtmsr r3 <== NOT EXECUTED
rtems_interrupt_enable(level);
nToSend = 0;
ffc0625c: 3b c0 00 00 li r30,0 <== NOT EXECUTED
ffc06260: 48 00 00 54 b ffc062b4 <rtems_termios_refill_transmitter+0x1d4><== NOT EXECUTED
} else {
/*
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
ffc06264: 81 3f 00 80 lwz r9,128(r31)
ffc06268: 7f 9d 48 40 cmplw cr7,r29,r9
ffc0626c: 40 9d 00 0c ble- cr7,ffc06278 <rtems_termios_refill_transmitter+0x198>
nToSend = tty->rawOutBuf.Size - newTail;
ffc06270: 83 df 00 88 lwz r30,136(r31)
ffc06274: 48 00 00 08 b ffc0627c <rtems_termios_refill_transmitter+0x19c>
else
nToSend = tty->rawOutBuf.Head - newTail;
ffc06278: 83 df 00 80 lwz r30,128(r31)
/* 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)) {
ffc0627c: 81 3f 00 b8 lwz r9,184(r31)
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
nToSend = tty->rawOutBuf.Size - newTail;
else
nToSend = tty->rawOutBuf.Head - newTail;
ffc06280: 7f dd f0 50 subf r30,r29,r30
/* 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)) {
ffc06284: 71 2a 06 00 andi. r10,r9,1536
ffc06288: 41 82 00 08 beq- ffc06290 <rtems_termios_refill_transmitter+0x1b0>
nToSend = 1;
ffc0628c: 3b c0 00 01 li r30,1
}
tty->rawOutBufState = rob_busy; /*apm*/
ffc06290: 39 20 00 01 li r9,1
(*tty->device.write)(
ffc06294: 80 9f 00 7c lwz r4,124(r31)
/* to allow fast reaction on incoming flow ctrl and low latency*/
/* for outgoing flow control */
if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) {
nToSend = 1;
}
tty->rawOutBufState = rob_busy; /*apm*/
ffc06298: 91 3f 00 94 stw r9,148(r31)
(*tty->device.write)(
ffc0629c: 7f c5 f3 78 mr r5,r30
ffc062a0: 7c 84 ea 14 add r4,r4,r29
ffc062a4: 81 3f 00 a4 lwz r9,164(r31)
ffc062a8: 80 7f 00 10 lwz r3,16(r31)
ffc062ac: 7d 29 03 a6 mtctr r9
ffc062b0: 4e 80 04 21 bctrl
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
ffc062b4: 93 bf 00 84 stw r29,132(r31)
}
return nToSend;
}
ffc062b8: 39 61 00 18 addi r11,r1,24
ffc062bc: 7f c3 f3 78 mr r3,r30
ffc062c0: 4b ff a2 fc b ffc005bc <_restgpr_29_x>
ffc07cdc <rtems_termios_rxdaemon>:
/*
* this task actually processes any receive events
*/
static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument)
{
ffc07cdc: 7c 2b 0b 78 mr r11,r1
ffc07ce0: 7c 08 02 a6 mflr r0
ffc07ce4: 94 21 ff e0 stwu r1,-32(r1)
ffc07ce8: 90 01 00 24 stw r0,36(r1)
ffc07cec: 48 01 30 d1 bl ffc1adbc <_savegpr_31>
ffc07cf0: 7c 7f 1b 78 mr r31,r3
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
ffc07cf4: 38 60 00 03 li r3,3
ffc07cf8: 38 80 00 02 li r4,2
ffc07cfc: 38 a0 00 00 li r5,0
ffc07d00: 38 c1 00 08 addi r6,r1,8
ffc07d04: 48 00 05 51 bl ffc08254 <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) {
ffc07d08: 81 21 00 08 lwz r9,8(r1)
ffc07d0c: 71 2a 00 01 andi. r10,r9,1
ffc07d10: 41 a2 00 14 beq+ ffc07d24 <rtems_termios_rxdaemon+0x48> <== ALWAYS TAKEN
tty->rxTaskId = 0;
ffc07d14: 39 20 00 00 li r9,0 <== NOT EXECUTED
ffc07d18: 91 3f 00 c4 stw r9,196(r31) <== NOT EXECUTED
rtems_task_delete(RTEMS_SELF);
ffc07d1c: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc07d20: 48 00 0f 05 bl ffc08c24 <rtems_task_delete> <== NOT EXECUTED
}
/*
* do something
*/
c = tty->device.pollRead(tty->minor);
ffc07d24: 81 3f 00 a0 lwz r9,160(r31)
ffc07d28: 80 7f 00 10 lwz r3,16(r31)
ffc07d2c: 7d 29 03 a6 mtctr r9
ffc07d30: 4e 80 04 21 bctrl
if (c != EOF) {
ffc07d34: 2f 83 ff ff cmpwi cr7,r3,-1
ffc07d38: 41 9e ff bc beq+ cr7,ffc07cf4 <rtems_termios_rxdaemon+0x18>
/*
* pollRead did call enqueue on its own
*/
c_buf = c;
ffc07d3c: 98 61 00 0c stb r3,12(r1)
rtems_termios_enqueue_raw_characters ( tty,&c_buf,1);
ffc07d40: 38 81 00 0c addi r4,r1,12
ffc07d44: 7f e3 fb 78 mr r3,r31
ffc07d48: 38 a0 00 01 li r5,1
ffc07d4c: 4b ff fc b1 bl ffc079fc <rtems_termios_enqueue_raw_characters>
ffc07d50: 4b ff ff a4 b ffc07cf4 <rtems_termios_rxdaemon+0x18>
ffc062c4 <rtems_termios_txdaemon>:
/*
* this task actually processes any transmit events
*/
static rtems_task rtems_termios_txdaemon(rtems_task_argument argument)
{
ffc062c4: 94 21 ff e0 stwu r1,-32(r1)
ffc062c8: 7c 08 02 a6 mflr r0
ffc062cc: bf c1 00 18 stmw r30,24(r1)
}
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
ffc062d0: 3f c0 00 00 lis r30,0
/*
* this task actually processes any transmit events
*/
static rtems_task rtems_termios_txdaemon(rtems_task_argument argument)
{
ffc062d4: 7c 7f 1b 78 mr r31,r3
ffc062d8: 90 01 00 24 stw r0,36(r1)
}
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
ffc062dc: 3b de 29 34 addi r30,r30,10548
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
ffc062e0: 38 60 00 03 li r3,3
ffc062e4: 38 80 00 02 li r4,2
ffc062e8: 38 a0 00 00 li r5,0
ffc062ec: 38 c1 00 08 addi r6,r1,8
ffc062f0: 48 00 1f 65 bl ffc08254 <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) {
ffc062f4: 81 21 00 08 lwz r9,8(r1)
ffc062f8: 71 2a 00 01 andi. r10,r9,1
ffc062fc: 41 a2 00 14 beq+ ffc06310 <rtems_termios_txdaemon+0x4c> <== ALWAYS TAKEN
tty->txTaskId = 0;
ffc06300: 39 20 00 00 li r9,0 <== NOT EXECUTED
ffc06304: 91 3f 00 c8 stw r9,200(r31) <== NOT EXECUTED
rtems_task_delete(RTEMS_SELF);
ffc06308: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc0630c: 48 00 29 19 bl ffc08c24 <rtems_task_delete> <== NOT EXECUTED
}
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
ffc06310: 81 3f 00 cc lwz r9,204(r31)
ffc06314: 55 29 28 34 rlwinm r9,r9,5,0,26
ffc06318: 7d 3e 4a 14 add r9,r30,r9
ffc0631c: 81 29 00 14 lwz r9,20(r9)
ffc06320: 2f 89 00 00 cmpwi cr7,r9,0
ffc06324: 41 9e 00 10 beq- cr7,ffc06334 <rtems_termios_txdaemon+0x70><== ALWAYS TAKEN
rtems_termios_linesw[tty->t_line].l_start(tty);
ffc06328: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc0632c: 7d 29 03 a6 mtctr r9 <== NOT EXECUTED
ffc06330: 4e 80 04 21 bctrl <== NOT EXECUTED
}
/*
* try to push further characters to device
*/
rtems_termios_refill_transmitter(tty);
ffc06334: 7f e3 fb 78 mr r3,r31
ffc06338: 4b ff fd a9 bl ffc060e0 <rtems_termios_refill_transmitter>
}
ffc0633c: 4b ff ff a4 b ffc062e0 <rtems_termios_txdaemon+0x1c>
ffc075b0 <rtems_termios_write>:
rtems_termios_puts (&c, 1, tty);
}
rtems_status_code
rtems_termios_write (void *arg)
{
ffc075b0: 94 21 ff e0 stwu r1,-32(r1)
ffc075b4: 7c 08 02 a6 mflr r0
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
ffc075b8: 38 80 00 00 li r4,0
rtems_termios_puts (&c, 1, tty);
}
rtems_status_code
rtems_termios_write (void *arg)
{
ffc075bc: 90 01 00 24 stw r0,36(r1)
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
ffc075c0: 38 a0 00 00 li r5,0
rtems_status_code
rtems_termios_write (void *arg)
{
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
ffc075c4: 81 23 00 00 lwz r9,0(r3)
rtems_termios_puts (&c, 1, tty);
}
rtems_status_code
rtems_termios_write (void *arg)
{
ffc075c8: bf 41 00 08 stmw r26,8(r1)
ffc075cc: 7c 7e 1b 78 mr r30,r3
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
ffc075d0: 83 e9 00 30 lwz r31,48(r9)
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
ffc075d4: 80 7f 00 18 lwz r3,24(r31)
ffc075d8: 48 00 12 d5 bl ffc088ac <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
ffc075dc: 7c 7c 1b 79 mr. r28,r3
ffc075e0: 40 82 00 94 bne- ffc07674 <rtems_termios_write+0xc4>
return sc;
if (rtems_termios_linesw[tty->t_line].l_write != NULL) {
ffc075e4: 81 3f 00 cc lwz r9,204(r31)
ffc075e8: 3d 40 00 00 lis r10,0
ffc075ec: 39 4a 29 34 addi r10,r10,10548
ffc075f0: 55 29 28 34 rlwinm r9,r9,5,0,26
ffc075f4: 7d 2a 4a 14 add r9,r10,r9
ffc075f8: 81 29 00 0c lwz r9,12(r9)
ffc075fc: 2f 89 00 00 cmpwi cr7,r9,0
ffc07600: 41 9e 00 1c beq- cr7,ffc0761c <rtems_termios_write+0x6c>
sc = rtems_termios_linesw[tty->t_line].l_write(tty,args);
ffc07604: 7f e3 fb 78 mr r3,r31
ffc07608: 7d 29 03 a6 mtctr r9
ffc0760c: 7f c4 f3 78 mr r4,r30
ffc07610: 4e 80 04 21 bctrl
ffc07614: 7c 7c 1b 78 mr r28,r3
ffc07618: 48 00 00 54 b ffc0766c <rtems_termios_write+0xbc>
rtems_semaphore_release (tty->osem);
return sc;
}
if (tty->termios.c_oflag & OPOST) {
ffc0761c: 81 3f 00 34 lwz r9,52(r31)
uint32_t count = args->count;
char *buffer = args->buffer;
while (count--)
ffc07620: 3b a0 00 00 li r29,0
ffc07624: 83 7e 00 14 lwz r27,20(r30)
if (rtems_termios_linesw[tty->t_line].l_write != NULL) {
sc = rtems_termios_linesw[tty->t_line].l_write(tty,args);
rtems_semaphore_release (tty->osem);
return sc;
}
if (tty->termios.c_oflag & OPOST) {
ffc07628: 71 2a 00 01 andi. r10,r9,1
ffc0762c: 83 5e 00 10 lwz r26,16(r30)
ffc07630: 40 a2 00 18 bne+ ffc07648 <rtems_termios_write+0x98> <== ALWAYS TAKEN
ffc07634: 48 00 00 20 b ffc07654 <rtems_termios_write+0xa4> <== NOT EXECUTED
uint32_t count = args->count;
char *buffer = args->buffer;
while (count--)
oproc (*buffer++, tty);
ffc07638: 7c 7a e8 ae lbzx r3,r26,r29
ffc0763c: 7f e4 fb 78 mr r4,r31
ffc07640: 3b bd 00 01 addi r29,r29,1
ffc07644: 4b ff f9 2d bl ffc06f70 <oproc>
return sc;
}
if (tty->termios.c_oflag & OPOST) {
uint32_t count = args->count;
char *buffer = args->buffer;
while (count--)
ffc07648: 7f 9d d8 00 cmpw cr7,r29,r27
ffc0764c: 40 9e ff ec bne+ cr7,ffc07638 <rtems_termios_write+0x88>
ffc07650: 48 00 00 14 b ffc07664 <rtems_termios_write+0xb4>
oproc (*buffer++, tty);
args->bytes_moved = args->count;
} else {
rtems_termios_puts (args->buffer, args->count, tty);
ffc07654: 7f 43 d3 78 mr r3,r26 <== NOT EXECUTED
ffc07658: 7f 64 db 78 mr r4,r27 <== NOT EXECUTED
ffc0765c: 7f e5 fb 78 mr r5,r31 <== NOT EXECUTED
ffc07660: 4b ff f7 e5 bl ffc06e44 <rtems_termios_puts> <== NOT EXECUTED
args->bytes_moved = args->count;
ffc07664: 81 3e 00 14 lwz r9,20(r30)
ffc07668: 91 3e 00 1c stw r9,28(r30)
}
rtems_semaphore_release (tty->osem);
ffc0766c: 80 7f 00 18 lwz r3,24(r31)
ffc07670: 48 00 13 61 bl ffc089d0 <rtems_semaphore_release>
return sc;
}
ffc07674: 39 61 00 20 addi r11,r1,32
ffc07678: 7f 83 e3 78 mr r3,r28
ffc0767c: 4b ff 8f 34 b ffc005b0 <_restgpr_26_x>
ffc1955c <rtems_timer_cancel>:
*/
rtems_status_code rtems_timer_cancel(
rtems_id id
)
{
ffc1955c: 94 21 ff e8 stwu r1,-24(r1)
ffc19560: 7c 08 02 a6 mflr r0
ffc19564: 7c 64 1b 78 mr r4,r3
RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
ffc19568: 3c 60 00 00 lis r3,0
ffc1956c: 90 01 00 1c stw r0,28(r1)
ffc19570: 38 63 7a 1c addi r3,r3,31260
ffc19574: 38 a1 00 08 addi r5,r1,8
ffc19578: 48 00 32 e9 bl ffc1c860 <_Objects_Get>
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
ffc1957c: 81 21 00 08 lwz r9,8(r1)
ffc19580: 2f 89 00 00 cmpwi cr7,r9,0
ffc19584: 40 9e 00 24 bne- cr7,ffc195a8 <rtems_timer_cancel+0x4c>
case OBJECTS_LOCAL:
if ( !_Timer_Is_dormant_class( the_timer->the_class ) )
ffc19588: 81 23 00 38 lwz r9,56(r3)
ffc1958c: 2f 89 00 04 cmpwi cr7,r9,4
ffc19590: 41 9e 00 0c beq- cr7,ffc1959c <rtems_timer_cancel+0x40> <== NEVER TAKEN
(void) _Watchdog_Remove( &the_timer->Ticker );
ffc19594: 38 63 00 10 addi r3,r3,16
ffc19598: 48 00 52 79 bl ffc1e810 <_Watchdog_Remove>
_Thread_Enable_dispatch();
ffc1959c: 48 00 41 b1 bl ffc1d74c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
ffc195a0: 38 60 00 00 li r3,0
ffc195a4: 48 00 00 08 b ffc195ac <rtems_timer_cancel+0x50>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
ffc195a8: 38 60 00 04 li r3,4
}
ffc195ac: 80 01 00 1c lwz r0,28(r1)
ffc195b0: 38 21 00 18 addi r1,r1,24
ffc195b4: 7c 08 03 a6 mtlr r0
ffc195b8: 4e 80 00 20 blr
ffc19b24 <rtems_timer_server_fire_when>:
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
ffc19b24: 94 21 ff c8 stwu r1,-56(r1)
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
ffc19b28: 3d 20 00 00 lis r9,0
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
ffc19b2c: 7c 08 02 a6 mflr r0
ffc19b30: bf 01 00 18 stmw r24,24(r1)
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
ffc19b34: 83 c9 29 80 lwz r30,10624(r9)
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
ffc19b38: 90 01 00 3c stw r0,60(r1)
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
ffc19b3c: 2f 9e 00 00 cmpwi cr7,r30,0
ffc19b40: 41 9e 01 04 beq- cr7,ffc19c44 <rtems_timer_server_fire_when+0x120>
return RTEMS_INCORRECT_STATE;
if ( !_TOD.is_set )
ffc19b44: 3f a0 00 00 lis r29,0
ffc19b48: 3b bd 70 80 addi r29,r29,28800
ffc19b4c: 89 5d 00 14 lbz r10,20(r29)
ffc19b50: 7c 7b 1b 78 mr r27,r3
return RTEMS_NOT_DEFINED;
ffc19b54: 38 60 00 0b li r3,11
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
return RTEMS_INCORRECT_STATE;
if ( !_TOD.is_set )
ffc19b58: 2f 8a 00 00 cmpwi cr7,r10,0
ffc19b5c: 41 be 00 f0 beq+ cr7,ffc19c4c <rtems_timer_server_fire_when+0x128><== NEVER TAKEN
return RTEMS_NOT_DEFINED;
if ( !routine )
ffc19b60: 2f 85 00 00 cmpwi cr7,r5,0
ffc19b64: 7c ba 2b 78 mr r26,r5
return RTEMS_INVALID_ADDRESS;
ffc19b68: 38 60 00 09 li r3,9
return RTEMS_INCORRECT_STATE;
if ( !_TOD.is_set )
return RTEMS_NOT_DEFINED;
if ( !routine )
ffc19b6c: 41 9e 00 e0 beq- cr7,ffc19c4c <rtems_timer_server_fire_when+0x128>
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
ffc19b70: 7c 83 23 78 mr r3,r4
ffc19b74: 7c 9f 23 78 mr r31,r4
ffc19b78: 7c d8 33 78 mr r24,r6
ffc19b7c: 4b ff c9 01 bl ffc1647c <_TOD_Validate>
ffc19b80: 2f 83 00 00 cmpwi cr7,r3,0
ffc19b84: 40 9e 00 0c bne- cr7,ffc19b90 <rtems_timer_server_fire_when+0x6c>
return RTEMS_INVALID_CLOCK;
ffc19b88: 38 60 00 14 li r3,20
ffc19b8c: 48 00 00 c0 b ffc19c4c <rtems_timer_server_fire_when+0x128>
seconds = _TOD_To_seconds( wall_time );
ffc19b90: 7f e3 fb 78 mr r3,r31
ffc19b94: 4b ff c8 45 bl ffc163d8 <_TOD_To_seconds>
ffc19b98: 80 9d 00 04 lwz r4,4(r29)
ffc19b9c: 7c 7c 1b 78 mr r28,r3
ffc19ba0: 80 7d 00 00 lwz r3,0(r29)
ffc19ba4: 3c c0 3b 9a lis r6,15258
ffc19ba8: 38 a0 00 00 li r5,0
ffc19bac: 60 c6 ca 00 ori r6,r6,51712
ffc19bb0: 48 01 48 d9 bl ffc2e488 <__divdi3>
if ( seconds <= _TOD_Seconds_since_epoch() )
ffc19bb4: 7f 9c 20 40 cmplw cr7,r28,r4
ffc19bb8: 40 9d ff d0 ble+ cr7,ffc19b88 <rtems_timer_server_fire_when+0x64>
ffc19bbc: 3c 60 00 00 lis r3,0
ffc19bc0: 38 63 7a 1c addi r3,r3,31260
ffc19bc4: 7f 64 db 78 mr r4,r27
ffc19bc8: 38 a1 00 08 addi r5,r1,8
ffc19bcc: 48 00 2c 95 bl ffc1c860 <_Objects_Get>
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
ffc19bd0: 83 21 00 08 lwz r25,8(r1)
ffc19bd4: 7c 7f 1b 78 mr r31,r3
ffc19bd8: 2f 99 00 00 cmpwi cr7,r25,0
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
ffc19bdc: 38 60 00 04 li r3,4
seconds = _TOD_To_seconds( wall_time );
if ( seconds <= _TOD_Seconds_since_epoch() )
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
ffc19be0: 40 9e 00 6c bne- cr7,ffc19c4c <rtems_timer_server_fire_when+0x128>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
ffc19be4: 38 7f 00 10 addi r3,r31,16
ffc19be8: 48 00 4c 29 bl ffc1e810 <_Watchdog_Remove>
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
ffc19bec: 39 20 00 03 li r9,3
ffc19bf0: 91 3f 00 38 stw r9,56(r31)
ffc19bf4: 3c c0 3b 9a lis r6,15258
ffc19bf8: 38 a0 00 00 li r5,0
ffc19bfc: 80 7d 00 00 lwz r3,0(r29)
ffc19c00: 60 c6 ca 00 ori r6,r6,51712
ffc19c04: 80 9d 00 04 lwz r4,4(r29)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
ffc19c08: 93 3f 00 18 stw r25,24(r31)
the_watchdog->routine = routine;
ffc19c0c: 93 5f 00 2c stw r26,44(r31)
the_watchdog->id = id;
ffc19c10: 93 7f 00 30 stw r27,48(r31)
the_watchdog->user_data = user_data;
ffc19c14: 93 1f 00 34 stw r24,52(r31)
ffc19c18: 48 01 48 71 bl ffc2e488 <__divdi3>
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
(*timer_server->schedule_operation)( timer_server, the_timer );
ffc19c1c: 81 3e 00 04 lwz r9,4(r30)
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
ffc19c20: 7c 84 e0 50 subf r4,r4,r28
(*timer_server->schedule_operation)( timer_server, the_timer );
ffc19c24: 7f c3 f3 78 mr r3,r30
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
ffc19c28: 90 9f 00 1c stw r4,28(r31)
(*timer_server->schedule_operation)( timer_server, the_timer );
ffc19c2c: 7d 29 03 a6 mtctr r9
ffc19c30: 7f e4 fb 78 mr r4,r31
ffc19c34: 4e 80 04 21 bctrl
_Thread_Enable_dispatch();
ffc19c38: 48 00 3b 15 bl ffc1d74c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
ffc19c3c: 38 60 00 00 li r3,0
ffc19c40: 48 00 00 0c b ffc19c4c <rtems_timer_server_fire_when+0x128>
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
return RTEMS_INCORRECT_STATE;
ffc19c44: 38 60 00 0e li r3,14
ffc19c48: 48 00 00 04 b ffc19c4c <rtems_timer_server_fire_when+0x128>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
ffc19c4c: 39 61 00 38 addi r11,r1,56
ffc19c50: 4b ff 47 50 b ffc0e3a0 <_restgpr_24_x>
ffc0426c <rtems_verror>:
{
int local_errno = 0;
int chars_written = 0;
rtems_status_code status;
if (error_flag & RTEMS_ERROR_PANIC) {
ffc0426c: 74 69 20 00 andis. r9,r3,8192
static int rtems_verror(
rtems_error_code_t error_flag,
const char *printf_format,
va_list arglist
)
{
ffc04270: 94 21 ff e0 stwu r1,-32(r1)
ffc04274: 7c 08 02 a6 mflr r0
ffc04278: bf 61 00 0c stmw r27,12(r1)
ffc0427c: 7c 7e 1b 78 mr r30,r3
ffc04280: 7c 9b 23 78 mr r27,r4
ffc04284: 90 01 00 24 stw r0,36(r1)
ffc04288: 7c bc 2b 78 mr r28,r5
int local_errno = 0;
int chars_written = 0;
rtems_status_code status;
if (error_flag & RTEMS_ERROR_PANIC) {
ffc0428c: 40 a2 00 28 bne+ ffc042b4 <rtems_verror+0x48>
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
ffc04290: 3f e0 00 00 lis r31,0
ffc04294: 81 3f 27 e8 lwz r9,10216(r31)
status = error_flag & ~RTEMS_ERROR_MASK;
ffc04298: 57 dd 01 00 rlwinm r29,r30,0,4,0
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
ffc0429c: 80 69 00 08 lwz r3,8(r9)
ffc042a0: 48 00 c7 d5 bl ffc10a74 <fflush>
status = error_flag & ~RTEMS_ERROR_MASK;
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
ffc042a4: 77 c9 40 00 andis. r9,r30,16384
ffc042a8: 40 82 00 4c bne- ffc042f4 <rtems_verror+0x88>
rtems_error_code_t error_flag,
const char *printf_format,
va_list arglist
)
{
int local_errno = 0;
ffc042ac: 3b c0 00 00 li r30,0
ffc042b0: 48 00 00 4c b ffc042fc <rtems_verror+0x90>
int chars_written = 0;
rtems_status_code status;
if (error_flag & RTEMS_ERROR_PANIC) {
if (rtems_panic_in_progress++)
ffc042b4: 3d 40 00 00 lis r10,0
ffc042b8: 81 2a 28 48 lwz r9,10312(r10)
ffc042bc: 2f 89 00 00 cmpwi cr7,r9,0
ffc042c0: 39 09 00 01 addi r8,r9,1
ffc042c4: 91 0a 28 48 stw r8,10312(r10)
ffc042c8: 41 be 00 14 beq+ cr7,ffc042dc <rtems_verror+0x70> <== ALWAYS TAKEN
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
ffc042cc: 3d 20 00 00 lis r9,0 <== NOT EXECUTED
ffc042d0: 81 49 28 68 lwz r10,10344(r9) <== NOT EXECUTED
++level;
ffc042d4: 39 4a 00 01 addi r10,r10,1 <== NOT EXECUTED
_Thread_Dispatch_disable_level = level;
ffc042d8: 91 49 28 68 stw r10,10344(r9) <== NOT EXECUTED
_Thread_Disable_dispatch(); /* disable task switches */
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
ffc042dc: 3d 20 00 00 lis r9,0
ffc042e0: 81 29 28 48 lwz r9,10312(r9)
return 0;
ffc042e4: 3b e0 00 00 li r31,0
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)
ffc042e8: 2f 89 00 02 cmpwi cr7,r9,2
ffc042ec: 40 9d ff a4 ble+ cr7,ffc04290 <rtems_verror+0x24> <== ALWAYS TAKEN
ffc042f0: 48 00 00 f4 b ffc043e4 <rtems_verror+0x178> <== 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;
ffc042f4: 48 00 c2 b9 bl ffc105ac <__errno>
ffc042f8: 83 c3 00 00 lwz r30,0(r3)
#if defined(RTEMS_MULTIPROCESSING)
if (_System_state_Is_multiprocessing)
fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node);
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
ffc042fc: 81 3f 27 e8 lwz r9,10216(r31)
ffc04300: 7f 64 db 78 mr r4,r27
ffc04304: 7f 85 e3 78 mr r5,r28
ffc04308: 80 69 00 0c lwz r3,12(r9)
ffc0430c: 48 01 1f 39 bl ffc16244 <vfprintf>
if (status)
ffc04310: 2f 9d 00 00 cmpwi cr7,r29,0
#if defined(RTEMS_MULTIPROCESSING)
if (_System_state_Is_multiprocessing)
fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node);
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
ffc04314: 7c 7f 1b 78 mr r31,r3
if (status)
ffc04318: 41 be 00 34 beq+ cr7,ffc0434c <rtems_verror+0xe0>
chars_written +=
fprintf(stderr, " (status: %s)", rtems_status_text(status));
ffc0431c: 3d 20 00 00 lis r9,0
ffc04320: 81 29 27 e8 lwz r9,10216(r9)
ffc04324: 7f a3 eb 78 mr r3,r29
ffc04328: 83 89 00 0c lwz r28,12(r9)
ffc0432c: 4b ff ff 31 bl ffc0425c <rtems_status_text>
ffc04330: 3c 80 ff c2 lis r4,-62
ffc04334: 7c 65 1b 78 mr r5,r3
ffc04338: 38 84 cd 84 addi r4,r4,-12924
ffc0433c: 7f 83 e3 78 mr r3,r28
ffc04340: 4c c6 31 82 crclr 4*cr1+eq
ffc04344: 48 00 cc 79 bl ffc10fbc <fprintf>
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
if (status)
chars_written +=
ffc04348: 7f ff 1a 14 add r31,r31,r3
fprintf(stderr, " (status: %s)", rtems_status_text(status));
if (local_errno) {
ffc0434c: 2f 9e 00 00 cmpwi cr7,r30,0
ffc04350: 41 9e 00 68 beq- cr7,ffc043b8 <rtems_verror+0x14c>
if ((local_errno > 0) && *strerror(local_errno))
ffc04354: 40 9d 00 40 ble- cr7,ffc04394 <rtems_verror+0x128>
ffc04358: 7f c3 f3 78 mr r3,r30
ffc0435c: 48 00 da fd bl ffc11e58 <strerror>
ffc04360: 89 23 00 00 lbz r9,0(r3)
ffc04364: 2f 89 00 00 cmpwi cr7,r9,0
ffc04368: 41 be 00 2c beq+ cr7,ffc04394 <rtems_verror+0x128> <== NEVER TAKEN
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
ffc0436c: 3d 20 00 00 lis r9,0
ffc04370: 81 29 27 e8 lwz r9,10216(r9)
ffc04374: 7f c3 f3 78 mr r3,r30
ffc04378: 83 a9 00 0c lwz r29,12(r9)
ffc0437c: 48 00 da dd bl ffc11e58 <strerror>
ffc04380: 3c 80 ff c2 lis r4,-62
ffc04384: 7c 65 1b 78 mr r5,r3
ffc04388: 38 84 cd 92 addi r4,r4,-12910
ffc0438c: 7f a3 eb 78 mr r3,r29
ffc04390: 48 00 00 1c b ffc043ac <rtems_verror+0x140>
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
ffc04394: 3d 20 00 00 lis r9,0
ffc04398: 81 29 27 e8 lwz r9,10216(r9)
ffc0439c: 3c 80 ff c2 lis r4,-62
ffc043a0: 38 84 cd 9f addi r4,r4,-12897
ffc043a4: 80 69 00 0c lwz r3,12(r9)
ffc043a8: 7f c5 f3 78 mr r5,r30
ffc043ac: 4c c6 31 82 crclr 4*cr1+eq
ffc043b0: 48 00 cc 0d bl ffc10fbc <fprintf>
ffc043b4: 7f ff 1a 14 add r31,r31,r3
}
chars_written += fprintf(stderr, "\n");
ffc043b8: 3f c0 00 00 lis r30,0
ffc043bc: 81 3e 27 e8 lwz r9,10216(r30)
ffc043c0: 3c 80 ff c2 lis r4,-62
ffc043c4: 38 84 d0 c6 addi r4,r4,-12090
ffc043c8: 80 69 00 0c lwz r3,12(r9)
ffc043cc: 4c c6 31 82 crclr 4*cr1+eq
ffc043d0: 48 00 cb ed bl ffc10fbc <fprintf>
(void) fflush(stderr);
ffc043d4: 81 3e 27 e8 lwz r9,10216(r30)
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
}
chars_written += fprintf(stderr, "\n");
ffc043d8: 7f ff 1a 14 add r31,r31,r3
(void) fflush(stderr);
ffc043dc: 80 69 00 0c lwz r3,12(r9)
ffc043e0: 48 00 c6 95 bl ffc10a74 <fflush>
return chars_written;
}
ffc043e4: 39 61 00 20 addi r11,r1,32
ffc043e8: 7f e3 fb 78 mr r3,r31
ffc043ec: 4b ff c1 c8 b ffc005b4 <_restgpr_27_x>
ffc251b8 <scanInt>:
/**
* Extract an integer value from the database
*/
static int
scanInt(FILE *fp, int *val)
{
ffc251b8: 94 21 ff d8 stwu r1,-40(r1)
ffc251bc: 7c 08 02 a6 mflr r0
ffc251c0: bf 01 00 08 stmw r24,8(r1)
int c;
unsigned int i = 0;
unsigned int limit = INT_MAX;
ffc251c4: 3f 80 7f ff lis r28,32767
/**
* Extract an integer value from the database
*/
static int
scanInt(FILE *fp, int *val)
{
ffc251c8: 7c 7e 1b 78 mr r30,r3
ffc251cc: 90 01 00 2c stw r0,44(r1)
ffc251d0: 7c 9b 23 78 mr r27,r4
int c;
unsigned int i = 0;
unsigned int limit = INT_MAX;
int sign = 0;
ffc251d4: 3b a0 00 00 li r29,0
static int
scanInt(FILE *fp, int *val)
{
int c;
unsigned int i = 0;
unsigned int limit = INT_MAX;
ffc251d8: 63 9c ff ff ori r28,r28,65535
*/
static int
scanInt(FILE *fp, int *val)
{
int c;
unsigned int i = 0;
ffc251dc: 3b e0 00 00 li r31,0
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
ffc251e0: 3f 40 00 00 lis r26,0
limit++;
continue;
}
sign = 1;
}
if (!isdigit(c))
ffc251e4: 3f 20 00 00 lis r25,0
return 0;
d = c - '0';
if ((i > (limit / 10))
ffc251e8: 3b 00 00 0a li r24,10
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
ffc251ec: 81 3e 00 04 lwz r9,4(r30)
ffc251f0: 39 29 ff ff addi r9,r9,-1
ffc251f4: 2f 89 00 00 cmpwi cr7,r9,0
ffc251f8: 91 3e 00 04 stw r9,4(r30)
ffc251fc: 40 bc 00 14 bge+ cr7,ffc25210 <scanInt+0x58> <== ALWAYS TAKEN
ffc25200: 80 7a 34 54 lwz r3,13396(r26) <== NOT EXECUTED
ffc25204: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED
ffc25208: 48 01 99 a9 bl ffc3ebb0 <__srget_r> <== NOT EXECUTED
ffc2520c: 48 00 00 14 b ffc25220 <scanInt+0x68> <== NOT EXECUTED
ffc25210: 81 3e 00 00 lwz r9,0(r30)
ffc25214: 88 69 00 00 lbz r3,0(r9)
ffc25218: 39 29 00 01 addi r9,r9,1
ffc2521c: 91 3e 00 00 stw r9,0(r30)
if (c == ':')
ffc25220: 2f 03 00 3a cmpwi cr6,r3,58
ffc25224: 2f 9d 00 00 cmpwi cr7,r29,0
ffc25228: 41 9a 00 6c beq- cr6,ffc25294 <scanInt+0xdc>
break;
if (sign == 0) {
ffc2522c: 40 9e 00 1c bne- cr7,ffc25248 <scanInt+0x90>
if (c == '-') {
ffc25230: 2f 83 00 2d cmpwi cr7,r3,45
sign = -1;
limit++;
continue;
}
sign = 1;
ffc25234: 3b a0 00 01 li r29,1
for (;;) {
c = getc(fp);
if (c == ':')
break;
if (sign == 0) {
if (c == '-') {
ffc25238: 40 be 00 10 bne+ cr7,ffc25248 <scanInt+0x90>
sign = -1;
limit++;
ffc2523c: 3b 9c 00 01 addi r28,r28,1
c = getc(fp);
if (c == ':')
break;
if (sign == 0) {
if (c == '-') {
sign = -1;
ffc25240: 3b a0 ff ff li r29,-1
limit++;
continue;
ffc25244: 4b ff ff a8 b ffc251ec <scanInt+0x34>
}
sign = 1;
}
if (!isdigit(c))
ffc25248: 81 39 34 44 lwz r9,13380(r25)
ffc2524c: 7d 29 1a 14 add r9,r9,r3
ffc25250: 89 29 00 01 lbz r9,1(r9)
ffc25254: 55 29 07 7a rlwinm r9,r9,0,29,29
ffc25258: 71 2a 00 ff andi. r10,r9,255
ffc2525c: 41 82 00 4c beq- ffc252a8 <scanInt+0xf0>
return 0;
d = c - '0';
if ((i > (limit / 10))
ffc25260: 7d 3c c3 96 divwu r9,r28,r24
ffc25264: 7f 9f 48 40 cmplw cr7,r31,r9
}
sign = 1;
}
if (!isdigit(c))
return 0;
d = c - '0';
ffc25268: 38 63 ff d0 addi r3,r3,-48
if ((i > (limit / 10))
ffc2526c: 41 9d 00 3c bgt- cr7,ffc252a8 <scanInt+0xf0>
|| ((i == (limit / 10)) && (d > (limit % 10))))
ffc25270: 7f 9f 48 00 cmpw cr7,r31,r9
ffc25274: 40 be 00 14 bne+ cr7,ffc25288 <scanInt+0xd0>
ffc25278: 1d 3f 00 0a mulli r9,r31,10
ffc2527c: 7d 29 e0 50 subf r9,r9,r28
ffc25280: 7f 83 48 40 cmplw cr7,r3,r9
ffc25284: 41 9d 00 24 bgt- cr7,ffc252a8 <scanInt+0xf0> <== ALWAYS TAKEN
return 0;
i = i * 10 + d;
ffc25288: 1f ff 00 0a mulli r31,r31,10
ffc2528c: 7f e3 fa 14 add r31,r3,r31
ffc25290: 4b ff ff 5c b ffc251ec <scanInt+0x34>
}
if (sign == 0)
ffc25294: 41 9e 00 14 beq- cr7,ffc252a8 <scanInt+0xf0> <== NEVER TAKEN
return 0;
*val = i * sign;
ffc25298: 7f fd f9 d6 mullw r31,r29,r31
return 1;
ffc2529c: 38 60 00 01 li r3,1
return 0;
i = i * 10 + d;
}
if (sign == 0)
return 0;
*val = i * sign;
ffc252a0: 93 fb 00 00 stw r31,0(r27)
return 1;
ffc252a4: 48 00 00 08 b ffc252ac <scanInt+0xf4>
continue;
}
sign = 1;
}
if (!isdigit(c))
return 0;
ffc252a8: 38 60 00 00 li r3,0
}
if (sign == 0)
return 0;
*val = i * sign;
return 1;
}
ffc252ac: 39 61 00 28 addi r11,r1,40
ffc252b0: 48 02 f2 40 b ffc544f0 <_restgpr_24_x>
ffc253b4 <scangr>:
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
ffc253b4: 94 21 ff d8 stwu r1,-40(r1)
ffc253b8: 7c 08 02 a6 mflr r0
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
ffc253bc: 38 e0 00 00 li r7,0
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
ffc253c0: 90 a1 00 18 stw r5,24(r1)
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
ffc253c4: 38 a1 00 18 addi r5,r1,24
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
ffc253c8: 90 c1 00 1c stw r6,28(r1)
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
ffc253cc: 38 c1 00 1c addi r6,r1,28
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
ffc253d0: bf c1 00 20 stmw r30,32(r1)
ffc253d4: 7c 7e 1b 78 mr r30,r3
ffc253d8: 7c 9f 23 78 mr r31,r4
ffc253dc: 90 01 00 2c stw r0,44(r1)
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
ffc253e0: 4b ff fe d5 bl ffc252b4 <scanString>
ffc253e4: 2f 83 00 00 cmpwi cr7,r3,0
ffc253e8: 40 9e 00 0c bne- cr7,ffc253f4 <scangr+0x40>
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
|| !scanInt(fp, &grgid)
|| !scanString(fp, &grmem, &buffer, &bufsize, 1))
return 0;
ffc253ec: 38 60 00 00 li r3,0
ffc253f0: 48 00 01 0c b ffc254fc <scangr+0x148>
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
ffc253f4: 7f c3 f3 78 mr r3,r30
ffc253f8: 38 9f 00 04 addi r4,r31,4
ffc253fc: 38 a1 00 18 addi r5,r1,24
ffc25400: 38 c1 00 1c addi r6,r1,28
ffc25404: 38 e0 00 00 li r7,0
ffc25408: 4b ff fe ad bl ffc252b4 <scanString>
ffc2540c: 2f 83 00 00 cmpwi cr7,r3,0
ffc25410: 41 9e ff dc beq+ cr7,ffc253ec <scangr+0x38> <== NEVER TAKEN
|| !scanInt(fp, &grgid)
ffc25414: 7f c3 f3 78 mr r3,r30
ffc25418: 38 81 00 0c addi r4,r1,12
ffc2541c: 4b ff fd 9d bl ffc251b8 <scanInt>
ffc25420: 2f 83 00 00 cmpwi cr7,r3,0
ffc25424: 41 9e ff c8 beq+ cr7,ffc253ec <scangr+0x38> <== NEVER TAKEN
|| !scanString(fp, &grmem, &buffer, &bufsize, 1))
ffc25428: 7f c3 f3 78 mr r3,r30
ffc2542c: 38 81 00 08 addi r4,r1,8
ffc25430: 38 a1 00 18 addi r5,r1,24
ffc25434: 38 c1 00 1c addi r6,r1,28
ffc25438: 38 e0 00 01 li r7,1
ffc2543c: 4b ff fe 79 bl ffc252b4 <scanString>
ffc25440: 2f 83 00 00 cmpwi cr7,r3,0
ffc25444: 41 be ff a8 beq- cr7,ffc253ec <scangr+0x38> <== NEVER TAKEN
return 0;
grp->gr_gid = grgid;
ffc25448: 81 21 00 0c lwz r9,12(r1)
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
ffc2544c: 81 41 00 08 lwz r10,8(r1)
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
|| !scanInt(fp, &grgid)
|| !scanString(fp, &grmem, &buffer, &bufsize, 1))
return 0;
grp->gr_gid = grgid;
ffc25450: b1 3f 00 08 sth r9,8(r31)
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
ffc25454: 39 20 00 01 li r9,1
}
/**
* Extract a single group record from the database
*/
static int scangr(
ffc25458: 38 ea ff ff addi r7,r10,-1
grp->gr_gid = grgid;
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
ffc2545c: 48 00 00 14 b ffc25470 <scangr+0xbc>
if(*cp == ',')
memcount++;
ffc25460: 69 06 00 2c xori r6,r8,44
ffc25464: 20 c6 00 00 subfic r6,r6,0
ffc25468: 7c c9 01 94 addze r6,r9
ffc2546c: 7c c9 33 78 mr r9,r6
grp->gr_gid = grgid;
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
ffc25470: 8d 07 00 01 lbzu r8,1(r7)
ffc25474: 2f 88 00 00 cmpwi cr7,r8,0
ffc25478: 40 9e ff e8 bne+ cr7,ffc25460 <scangr+0xac>
}
/*
* Hack to produce (hopefully) a suitably-aligned array of pointers
*/
if (bufsize < (((memcount+1)*sizeof(char *)) + 15))
ffc2547c: 55 29 10 3a rlwinm r9,r9,2,0,29
ffc25480: 81 01 00 1c lwz r8,28(r1)
ffc25484: 39 29 00 13 addi r9,r9,19
ffc25488: 7f 88 48 40 cmplw cr7,r8,r9
ffc2548c: 41 bc ff 60 blt- cr7,ffc253ec <scangr+0x38> <== NEVER TAKEN
return 0;
grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15);
ffc25490: 81 21 00 18 lwz r9,24(r1)
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
if(*cp == ',') {
*cp = '\0';
ffc25494: 38 c0 00 00 li r6,0
/*
* Hack to produce (hopefully) a suitably-aligned array of pointers
*/
if (bufsize < (((memcount+1)*sizeof(char *)) + 15))
return 0;
grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15);
ffc25498: 39 29 00 0f addi r9,r9,15
ffc2549c: 55 29 00 36 rlwinm r9,r9,0,0,27
ffc254a0: 91 3f 00 0c stw r9,12(r31)
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
ffc254a4: 91 49 00 00 stw r10,0(r9)
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
ffc254a8: 39 20 00 01 li r9,1
}
/**
* Extract a single group record from the database
*/
static int scangr(
ffc254ac: 81 41 00 08 lwz r10,8(r1)
ffc254b0: 39 4a ff ff addi r10,r10,-1
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
ffc254b4: 48 00 00 28 b ffc254dc <scangr+0x128>
if(*cp == ',') {
ffc254b8: 2f 88 00 2c cmpwi cr7,r8,44
ffc254bc: 40 be 00 1c bne+ cr7,ffc254d8 <scangr+0x124>
*cp = '\0';
ffc254c0: 98 c7 00 00 stb r6,0(r7)
grp->gr_mem[memcount++] = cp + 1;
ffc254c4: 55 25 10 3a rlwinm r5,r9,2,0,29
}
/**
* Extract a single group record from the database
*/
static int scangr(
ffc254c8: 39 4a 00 02 addi r10,r10,2
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
if(*cp == ',') {
*cp = '\0';
grp->gr_mem[memcount++] = cp + 1;
ffc254cc: 81 1f 00 0c lwz r8,12(r31)
ffc254d0: 39 29 00 01 addi r9,r9,1
ffc254d4: 7d 48 29 2e stwx r10,r8,r5
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
ffc254d8: 7c ea 3b 78 mr r10,r7
ffc254dc: 89 0a 00 01 lbz r8,1(r10)
ffc254e0: 38 ea 00 01 addi r7,r10,1
ffc254e4: 2f 88 00 00 cmpwi cr7,r8,0
ffc254e8: 40 9e ff d0 bne+ cr7,ffc254b8 <scangr+0x104>
if(*cp == ',') {
*cp = '\0';
grp->gr_mem[memcount++] = cp + 1;
}
}
grp->gr_mem[memcount] = NULL;
ffc254ec: 81 5f 00 0c lwz r10,12(r31)
ffc254f0: 55 29 10 3a rlwinm r9,r9,2,0,29
return 1;
ffc254f4: 38 60 00 01 li r3,1
if(*cp == ',') {
*cp = '\0';
grp->gr_mem[memcount++] = cp + 1;
}
}
grp->gr_mem[memcount] = NULL;
ffc254f8: 7d 0a 49 2e stwx r8,r10,r9
return 1;
}
ffc254fc: 39 61 00 28 addi r11,r1,40
ffc25500: 48 02 f0 08 b ffc54508 <_restgpr_30_x>
ffc25504 <scanpw>:
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
ffc25504: 94 21 ff d8 stwu r1,-40(r1)
ffc25508: 7c 08 02 a6 mflr r0
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
ffc2550c: 38 e0 00 00 li r7,0
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
ffc25510: 90 a1 00 18 stw r5,24(r1)
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
ffc25514: 38 a1 00 18 addi r5,r1,24
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
ffc25518: 90 c1 00 1c stw r6,28(r1)
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
ffc2551c: 38 c1 00 1c addi r6,r1,28
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
ffc25520: bf c1 00 20 stmw r30,32(r1)
ffc25524: 7c 7e 1b 78 mr r30,r3
ffc25528: 7c 9f 23 78 mr r31,r4
ffc2552c: 90 01 00 2c stw r0,44(r1)
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
ffc25530: 4b ff fd 85 bl ffc252b4 <scanString>
ffc25534: 2f 83 00 00 cmpwi cr7,r3,0
ffc25538: 40 9e 00 0c bne- cr7,ffc25544 <scanpw+0x40>
|| !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;
ffc2553c: 38 60 00 00 li r3,0
ffc25540: 48 00 00 e0 b ffc25620 <scanpw+0x11c>
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0)
ffc25544: 7f c3 f3 78 mr r3,r30
ffc25548: 38 9f 00 04 addi r4,r31,4
ffc2554c: 38 a1 00 18 addi r5,r1,24
ffc25550: 38 c1 00 1c addi r6,r1,28
ffc25554: 38 e0 00 00 li r7,0
ffc25558: 4b ff fd 5d bl ffc252b4 <scanString>
ffc2555c: 2f 83 00 00 cmpwi cr7,r3,0
ffc25560: 41 9e ff dc beq+ cr7,ffc2553c <scanpw+0x38> <== NEVER TAKEN
|| !scanInt(fp, &pwuid)
ffc25564: 7f c3 f3 78 mr r3,r30
ffc25568: 38 81 00 0c addi r4,r1,12
ffc2556c: 4b ff fc 4d bl ffc251b8 <scanInt>
ffc25570: 2f 83 00 00 cmpwi cr7,r3,0
ffc25574: 41 9e ff c8 beq+ cr7,ffc2553c <scanpw+0x38>
|| !scanInt(fp, &pwgid)
ffc25578: 7f c3 f3 78 mr r3,r30
ffc2557c: 38 81 00 08 addi r4,r1,8
ffc25580: 4b ff fc 39 bl ffc251b8 <scanInt>
ffc25584: 2f 83 00 00 cmpwi cr7,r3,0
ffc25588: 41 9e ff b4 beq+ cr7,ffc2553c <scanpw+0x38>
|| !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0)
ffc2558c: 7f c3 f3 78 mr r3,r30
ffc25590: 38 9f 00 0c addi r4,r31,12
ffc25594: 38 a1 00 18 addi r5,r1,24
ffc25598: 38 c1 00 1c addi r6,r1,28
ffc2559c: 38 e0 00 00 li r7,0
ffc255a0: 4b ff fd 15 bl ffc252b4 <scanString>
ffc255a4: 2f 83 00 00 cmpwi cr7,r3,0
ffc255a8: 41 9e ff 94 beq+ cr7,ffc2553c <scanpw+0x38> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0)
ffc255ac: 7f c3 f3 78 mr r3,r30
ffc255b0: 38 9f 00 10 addi r4,r31,16
ffc255b4: 38 a1 00 18 addi r5,r1,24
ffc255b8: 38 c1 00 1c addi r6,r1,28
ffc255bc: 38 e0 00 00 li r7,0
ffc255c0: 4b ff fc f5 bl ffc252b4 <scanString>
ffc255c4: 2f 83 00 00 cmpwi cr7,r3,0
ffc255c8: 41 9e ff 74 beq+ cr7,ffc2553c <scanpw+0x38> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0)
ffc255cc: 7f c3 f3 78 mr r3,r30
ffc255d0: 38 9f 00 14 addi r4,r31,20
ffc255d4: 38 a1 00 18 addi r5,r1,24
ffc255d8: 38 c1 00 1c addi r6,r1,28
ffc255dc: 38 e0 00 00 li r7,0
ffc255e0: 4b ff fc d5 bl ffc252b4 <scanString>
ffc255e4: 2f 83 00 00 cmpwi cr7,r3,0
ffc255e8: 41 9e ff 54 beq+ cr7,ffc2553c <scanpw+0x38> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1))
ffc255ec: 7f c3 f3 78 mr r3,r30
ffc255f0: 38 9f 00 18 addi r4,r31,24
ffc255f4: 38 a1 00 18 addi r5,r1,24
ffc255f8: 38 c1 00 1c addi r6,r1,28
ffc255fc: 38 e0 00 01 li r7,1
ffc25600: 4b ff fc b5 bl ffc252b4 <scanString>
ffc25604: 2f 83 00 00 cmpwi cr7,r3,0
ffc25608: 41 be ff 34 beq- cr7,ffc2553c <scanpw+0x38>
return 0;
pwd->pw_uid = pwuid;
ffc2560c: 81 21 00 0c lwz r9,12(r1)
pwd->pw_gid = pwgid;
return 1;
ffc25610: 38 60 00 01 li r3,1
|| !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;
pwd->pw_uid = pwuid;
ffc25614: b1 3f 00 08 sth r9,8(r31)
pwd->pw_gid = pwgid;
ffc25618: 81 21 00 08 lwz r9,8(r1)
ffc2561c: b1 3f 00 0a sth r9,10(r31)
return 1;
}
ffc25620: 39 61 00 28 addi r11,r1,40
ffc25624: 48 02 ee e4 b ffc54508 <_restgpr_30_x>
ffc08c1c <sched_get_priority_max>:
int sched_get_priority_max(
int policy
)
{
switch ( policy ) {
ffc08c1c: 2b 83 00 04 cmplwi cr7,r3,4
#include <rtems/posix/priority.h>
int sched_get_priority_max(
int policy
)
{
ffc08c20: 94 21 ff f8 stwu r1,-8(r1)
ffc08c24: 7c 08 02 a6 mflr r0
ffc08c28: 90 01 00 0c stw r0,12(r1)
switch ( policy ) {
ffc08c2c: 41 9d 00 14 bgt- cr7,ffc08c40 <sched_get_priority_max+0x24>
ffc08c30: 39 20 00 01 li r9,1
ffc08c34: 7d 23 18 30 slw r3,r9,r3
ffc08c38: 70 69 00 17 andi. r9,r3,23
ffc08c3c: 40 82 00 18 bne- ffc08c54 <sched_get_priority_max+0x38> <== ALWAYS TAKEN
case SCHED_RR:
case SCHED_SPORADIC:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
ffc08c40: 48 00 82 21 bl ffc10e60 <__errno>
ffc08c44: 39 20 00 16 li r9,22
ffc08c48: 91 23 00 00 stw r9,0(r3)
ffc08c4c: 38 60 ff ff li r3,-1
ffc08c50: 48 00 00 10 b ffc08c60 <sched_get_priority_max+0x44>
}
return POSIX_SCHEDULER_MAXIMUM_PRIORITY;
ffc08c54: 3d 20 00 00 lis r9,0
ffc08c58: 88 69 27 84 lbz r3,10116(r9)
ffc08c5c: 38 63 ff ff addi r3,r3,-1
}
ffc08c60: 80 01 00 0c lwz r0,12(r1)
ffc08c64: 38 21 00 08 addi r1,r1,8
ffc08c68: 7c 08 03 a6 mtlr r0
ffc08c6c: 4e 80 00 20 blr
ffc08c70 <sched_get_priority_min>:
*/
int sched_get_priority_min(
int policy
)
{
switch ( policy ) {
ffc08c70: 2b 83 00 04 cmplwi cr7,r3,4
* 13.3.6 Get Scheduling Parameter Limits, P1003.1b-1993, p. 258
*/
int sched_get_priority_min(
int policy
)
{
ffc08c74: 94 21 ff f8 stwu r1,-8(r1)
ffc08c78: 7c 08 02 a6 mflr r0
ffc08c7c: 90 01 00 0c stw r0,12(r1)
switch ( policy ) {
ffc08c80: 41 9d 00 18 bgt- cr7,ffc08c98 <sched_get_priority_min+0x28>
ffc08c84: 39 20 00 01 li r9,1
ffc08c88: 7d 29 18 30 slw r9,r9,r3
ffc08c8c: 71 2a 00 17 andi. r10,r9,23
default:
rtems_set_errno_and_return_minus_one( EINVAL );
}
return POSIX_SCHEDULER_MINIMUM_PRIORITY;
ffc08c90: 38 60 00 01 li r3,1
*/
int sched_get_priority_min(
int policy
)
{
switch ( policy ) {
ffc08c94: 40 82 00 14 bne- ffc08ca8 <sched_get_priority_min+0x38> <== ALWAYS TAKEN
case SCHED_RR:
case SCHED_SPORADIC:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
ffc08c98: 48 00 81 c9 bl ffc10e60 <__errno>
ffc08c9c: 39 20 00 16 li r9,22
ffc08ca0: 91 23 00 00 stw r9,0(r3)
ffc08ca4: 38 60 ff ff li r3,-1
}
return POSIX_SCHEDULER_MINIMUM_PRIORITY;
}
ffc08ca8: 80 01 00 0c lwz r0,12(r1)
ffc08cac: 38 21 00 08 addi r1,r1,8
ffc08cb0: 7c 08 03 a6 mtlr r0
ffc08cb4: 4e 80 00 20 blr
ffc08cb8 <sched_rr_get_interval>:
int sched_rr_get_interval(
pid_t pid,
struct timespec *interval
)
{
ffc08cb8: 7c 2b 0b 78 mr r11,r1
ffc08cbc: 94 21 ff e8 stwu r1,-24(r1)
ffc08cc0: 7c 08 02 a6 mflr r0
ffc08cc4: 48 01 3a 41 bl ffc1c704 <_savegpr_31>
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid && pid != getpid() )
ffc08cc8: 7c 7f 1b 79 mr. r31,r3
int sched_rr_get_interval(
pid_t pid,
struct timespec *interval
)
{
ffc08ccc: 90 01 00 1c stw r0,28(r1)
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid && pid != getpid() )
ffc08cd0: 41 a2 00 24 beq+ ffc08cf4 <sched_rr_get_interval+0x3c> <== NEVER TAKEN
ffc08cd4: 90 81 00 08 stw r4,8(r1)
ffc08cd8: 4b ff bc 41 bl ffc04918 <getpid>
ffc08cdc: 7f 9f 18 00 cmpw cr7,r31,r3
ffc08ce0: 80 81 00 08 lwz r4,8(r1)
ffc08ce4: 41 be 00 10 beq+ cr7,ffc08cf4 <sched_rr_get_interval+0x3c>
rtems_set_errno_and_return_minus_one( ESRCH );
ffc08ce8: 48 00 81 79 bl ffc10e60 <__errno>
ffc08cec: 39 20 00 03 li r9,3
ffc08cf0: 48 00 00 14 b ffc08d04 <sched_rr_get_interval+0x4c>
if ( !interval )
ffc08cf4: 2f 84 00 00 cmpwi cr7,r4,0
ffc08cf8: 40 be 00 18 bne+ cr7,ffc08d10 <sched_rr_get_interval+0x58>
rtems_set_errno_and_return_minus_one( EINVAL );
ffc08cfc: 48 00 81 65 bl ffc10e60 <__errno>
ffc08d00: 39 20 00 16 li r9,22
ffc08d04: 91 23 00 00 stw r9,0(r3)
ffc08d08: 38 60 ff ff li r3,-1
ffc08d0c: 48 00 00 14 b ffc08d20 <sched_rr_get_interval+0x68>
_Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval );
ffc08d10: 3d 20 00 00 lis r9,0
ffc08d14: 80 69 28 68 lwz r3,10344(r9)
ffc08d18: 48 00 3b e9 bl ffc0c900 <_Timespec_From_ticks>
return 0;
ffc08d1c: 38 60 00 00 li r3,0
}
ffc08d20: 39 61 00 18 addi r11,r1,24
ffc08d24: 4b ff 7e 8c b ffc00bb0 <_restgpr_31_x>
ffc0963c <sem_open>:
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
ffc0963c: 3d 20 00 00 lis r9,0
int oflag,
...
/* mode_t mode, */
/* unsigned int value */
)
{
ffc09640: 94 21 ff b8 stwu r1,-72(r1)
ffc09644: 7c 08 02 a6 mflr r0
ffc09648: 81 49 28 a8 lwz r10,10408(r9)
ffc0964c: bf 41 00 30 stmw r26,48(r1)
ffc09650: 7c 7d 1b 78 mr r29,r3
++level;
ffc09654: 39 4a 00 01 addi r10,r10,1
ffc09658: 90 01 00 4c stw r0,76(r1)
ffc0965c: 7c 9f 23 78 mr r31,r4
ffc09660: 90 a1 00 28 stw r5,40(r1)
ffc09664: 90 c1 00 2c stw r6,44(r1)
_Thread_Dispatch_disable_level = level;
ffc09668: 91 49 28 a8 stw r10,10408(r9)
Objects_Locations location;
size_t name_len;
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
ffc0966c: 70 9a 02 00 andi. r26,r4,512
/* unsigned int value */
)
{
va_list arg;
mode_t mode;
unsigned int value = 0;
ffc09670: 3b c0 00 00 li r30,0
Objects_Locations location;
size_t name_len;
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
ffc09674: 41 a2 00 20 beq+ ffc09694 <sem_open+0x58>
va_start(arg, oflag);
ffc09678: 39 21 00 50 addi r9,r1,80
mode = va_arg( arg, mode_t );
value = va_arg( arg, unsigned int );
ffc0967c: 83 c1 00 2c lwz r30,44(r1)
size_t name_len;
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
va_start(arg, oflag);
ffc09680: 91 21 00 0c stw r9,12(r1)
ffc09684: 39 21 00 20 addi r9,r1,32
ffc09688: 91 21 00 10 stw r9,16(r1)
mode = va_arg( arg, mode_t );
ffc0968c: 39 20 00 03 li r9,3
ffc09690: 99 21 00 08 stb r9,8(r1)
const char *name,
Objects_Id *id,
size_t *len
)
{
return _POSIX_Name_to_id( &_POSIX_Semaphore_Information, name, id, len );
ffc09694: 3f 80 00 00 lis r28,0
ffc09698: 3b 9c 59 00 addi r28,r28,22784
ffc0969c: 7f 83 e3 78 mr r3,r28
ffc096a0: 7f a4 eb 78 mr r4,r29
ffc096a4: 38 a1 00 20 addi r5,r1,32
ffc096a8: 38 c1 00 14 addi r6,r1,20
ffc096ac: 4b ff f9 99 bl ffc09044 <_POSIX_Name_to_id>
* 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 ) {
ffc096b0: 7c 7b 1b 79 mr. r27,r3
ffc096b4: 41 82 00 24 beq- ffc096d8 <sem_open+0x9c>
/*
* 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) ) ) {
ffc096b8: 2f 9b 00 02 cmpwi cr7,r27,2
ffc096bc: 40 9e 00 0c bne- cr7,ffc096c8 <sem_open+0x8c>
ffc096c0: 2f 9a 00 00 cmpwi cr7,r26,0
ffc096c4: 40 9e 00 60 bne- cr7,ffc09724 <sem_open+0xe8>
_Thread_Enable_dispatch();
ffc096c8: 48 00 38 01 bl ffc0cec8 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one_cast( status, sem_t * );
ffc096cc: 48 00 8e 49 bl ffc12514 <__errno>
ffc096d0: 93 63 00 00 stw r27,0(r3)
ffc096d4: 48 00 00 84 b ffc09758 <sem_open+0x11c>
/*
* Check for existence with creation.
*/
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
ffc096d8: 73 ff 0a 00 andi. r31,r31,2560
ffc096dc: 2f 9f 0a 00 cmpwi cr7,r31,2560
ffc096e0: 40 be 00 18 bne+ cr7,ffc096f8 <sem_open+0xbc>
_Thread_Enable_dispatch();
ffc096e4: 48 00 37 e5 bl ffc0cec8 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * );
ffc096e8: 48 00 8e 2d bl ffc12514 <__errno>
ffc096ec: 39 20 00 11 li r9,17
ffc096f0: 91 23 00 00 stw r9,0(r3)
ffc096f4: 48 00 00 64 b ffc09758 <sem_open+0x11c>
RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Get (
sem_t *id,
Objects_Locations *location
)
{
return (POSIX_Semaphore_Control *)
ffc096f8: 80 81 00 20 lwz r4,32(r1)
ffc096fc: 38 a1 00 18 addi r5,r1,24
ffc09700: 7f 83 e3 78 mr r3,r28
ffc09704: 48 00 28 7d bl ffc0bf80 <_Objects_Get>
}
the_semaphore = _POSIX_Semaphore_Get( (sem_t *) &the_semaphore_id, &location );
the_semaphore->open_count += 1;
ffc09708: 81 23 00 18 lwz r9,24(r3)
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * );
}
the_semaphore = _POSIX_Semaphore_Get( (sem_t *) &the_semaphore_id, &location );
ffc0970c: 90 61 00 1c stw r3,28(r1)
the_semaphore->open_count += 1;
ffc09710: 39 29 00 01 addi r9,r9,1
ffc09714: 91 23 00 18 stw r9,24(r3)
_Thread_Enable_dispatch();
ffc09718: 48 00 37 b1 bl ffc0cec8 <_Thread_Enable_dispatch>
_Thread_Enable_dispatch();
ffc0971c: 48 00 37 ad bl ffc0cec8 <_Thread_Enable_dispatch>
goto return_id;
ffc09720: 48 00 00 2c b ffc0974c <sem_open+0x110>
/*
* 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(
ffc09724: 80 81 00 14 lwz r4,20(r1)
ffc09728: 38 a0 00 00 li r5,0
ffc0972c: 7f c6 f3 78 mr r6,r30
ffc09730: 38 e1 00 1c addi r7,r1,28
ffc09734: 7f a3 eb 78 mr r3,r29
ffc09738: 48 00 65 e1 bl ffc0fd18 <_POSIX_Semaphore_Create_support>
ffc0973c: 7c 7f 1b 78 mr r31,r3
/*
* errno was set by Create_support, so don't set it again.
*/
_Thread_Enable_dispatch();
ffc09740: 48 00 37 89 bl ffc0cec8 <_Thread_Enable_dispatch>
if ( status == -1 )
ffc09744: 2f 9f ff ff cmpwi cr7,r31,-1
ffc09748: 41 9e 00 10 beq- cr7,ffc09758 <sem_open+0x11c> <== 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;
ffc0974c: 80 61 00 1c lwz r3,28(r1)
ffc09750: 38 63 00 08 addi r3,r3,8
ffc09754: 48 00 00 08 b ffc0975c <sem_open+0x120>
*/
_Thread_Enable_dispatch();
if ( status == -1 )
return SEM_FAILED;
ffc09758: 38 60 ff ff li r3,-1
the_semaphore->Semaphore_id = the_semaphore->Object.id;
return &the_semaphore->Semaphore_id;
#else
return (sem_t *)&the_semaphore->Object.id;
#endif
}
ffc0975c: 39 61 00 48 addi r11,r1,72
ffc09760: 48 01 36 40 b ffc1cda0 <_restgpr_26_x>
ffc08b34 <sigaction>:
struct sigaction *oact
)
{
ISR_Level level;
if ( oact )
ffc08b34: 7c a9 2b 79 mr. r9,r5
int sigaction(
int sig,
const struct sigaction *act,
struct sigaction *oact
)
{
ffc08b38: 94 21 ff e8 stwu r1,-24(r1)
ffc08b3c: 7c 08 02 a6 mflr r0
ffc08b40: bf 81 00 08 stmw r28,8(r1)
ffc08b44: 7c 7f 1b 78 mr r31,r3
ffc08b48: 7c 9e 23 78 mr r30,r4
ffc08b4c: 90 01 00 1c stw r0,28(r1)
ISR_Level level;
if ( oact )
ffc08b50: 41 82 00 1c beq- ffc08b6c <sigaction+0x38>
*oact = _POSIX_signals_Vectors[ sig ];
ffc08b54: 1d 03 00 0c mulli r8,r3,12
ffc08b58: 3d 40 00 00 lis r10,0
ffc08b5c: 39 4a 32 60 addi r10,r10,12896
ffc08b60: 7d 4a 42 14 add r10,r10,r8
ffc08b64: 7c aa 64 aa lswi r5,r10,12
ffc08b68: 7c a9 65 aa stswi r5,r9,12
if ( !sig )
ffc08b6c: 2f 9f 00 00 cmpwi cr7,r31,0
ffc08b70: 40 be 00 08 bne+ cr7,ffc08b78 <sigaction+0x44>
ffc08b74: 48 00 00 1c b ffc08b90 <sigaction+0x5c>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
ffc08b78: 39 3f ff ff addi r9,r31,-1
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
ffc08b7c: 2b 89 00 1f cmplwi cr7,r9,31
ffc08b80: 40 bd 00 08 ble+ cr7,ffc08b88 <sigaction+0x54>
ffc08b84: 48 00 00 0c b ffc08b90 <sigaction+0x5c>
*
* NOTE: Solaris documentation claims to "silently enforce" this which
* contradicts the POSIX specification.
*/
if ( sig == SIGKILL )
ffc08b88: 2f 9f 00 09 cmpwi cr7,r31,9
ffc08b8c: 40 be 00 18 bne+ cr7,ffc08ba4 <sigaction+0x70>
rtems_set_errno_and_return_minus_one( EINVAL );
ffc08b90: 48 00 86 41 bl ffc111d0 <__errno>
ffc08b94: 39 20 00 16 li r9,22
ffc08b98: 91 23 00 00 stw r9,0(r3)
ffc08b9c: 38 60 ff ff li r3,-1
ffc08ba0: 48 00 00 74 b ffc08c14 <sigaction+0xe0>
/*
* Evaluate the new action structure and set the global signal vector
* appropriately.
*/
if ( act ) {
ffc08ba4: 2f 9e 00 00 cmpwi cr7,r30,0
* 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;
ffc08ba8: 38 60 00 00 li r3,0
/*
* Evaluate the new action structure and set the global signal vector
* appropriately.
*/
if ( act ) {
ffc08bac: 41 9e 00 68 beq- cr7,ffc08c14 <sigaction+0xe0> <== NEVER TAKEN
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc08bb0: 7f 80 00 a6 mfmsr r28
ffc08bb4: 7d 30 42 a6 mfsprg r9,0
ffc08bb8: 7f 89 48 78 andc r9,r28,r9
ffc08bbc: 7d 20 01 24 mtmsr r9
* Unless the user is installing the default signal actions, then
* we can just copy the provided sigaction structure into the vectors.
*/
_ISR_Disable( level );
if ( act->sa_handler == SIG_DFL ) {
ffc08bc0: 81 3e 00 08 lwz r9,8(r30)
ffc08bc4: 3f a0 00 00 lis r29,0
ffc08bc8: 3b bd 32 60 addi r29,r29,12896
ffc08bcc: 2f 89 00 00 cmpwi cr7,r9,0
ffc08bd0: 40 be 00 24 bne+ cr7,ffc08bf4 <sigaction+0xc0>
_POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ];
ffc08bd4: 1f ff 00 0c mulli r31,r31,12
ffc08bd8: 3d 20 ff c2 lis r9,-62
ffc08bdc: 39 29 ab 0c addi r9,r9,-21748
ffc08be0: 7f bd fa 14 add r29,r29,r31
ffc08be4: 7f e9 fa 14 add r31,r9,r31
ffc08be8: 7c bf 64 aa lswi r5,r31,12
ffc08bec: 7c bd 65 aa stswi r5,r29,12
ffc08bf0: 48 00 00 1c b ffc08c0c <sigaction+0xd8>
} else {
_POSIX_signals_Clear_process_signals( sig );
ffc08bf4: 7f e3 fb 78 mr r3,r31
_POSIX_signals_Vectors[ sig ] = *act;
ffc08bf8: 1f ff 00 0c mulli r31,r31,12
_ISR_Disable( level );
if ( act->sa_handler == SIG_DFL ) {
_POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ];
} else {
_POSIX_signals_Clear_process_signals( sig );
ffc08bfc: 48 00 5a 1d bl ffc0e618 <_POSIX_signals_Clear_process_signals>
_POSIX_signals_Vectors[ sig ] = *act;
ffc08c00: 7f bd fa 14 add r29,r29,r31
ffc08c04: 7c be 64 aa lswi r5,r30,12
ffc08c08: 7c bd 65 aa stswi r5,r29,12
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc08c0c: 7f 80 01 24 mtmsr r28
* 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;
ffc08c10: 38 60 00 00 li r3,0
}
ffc08c14: 39 61 00 18 addi r11,r1,24
ffc08c18: 4b ff 7d 74 b ffc0098c <_restgpr_28_x>
ffc0912c <sigtimedwait>:
int sigtimedwait(
const sigset_t *set,
siginfo_t *info,
const struct timespec *timeout
)
{
ffc0912c: 94 21 ff d0 stwu r1,-48(r1)
ffc09130: 7c 08 02 a6 mflr r0
ffc09134: bf 61 00 1c stmw r27,28(r1)
ISR_Level level;
/*
* Error check parameters before disabling interrupts.
*/
if ( !set )
ffc09138: 7c 7c 1b 79 mr. r28,r3
int sigtimedwait(
const sigset_t *set,
siginfo_t *info,
const struct timespec *timeout
)
{
ffc0913c: 90 01 00 34 stw r0,52(r1)
ISR_Level level;
/*
* Error check parameters before disabling interrupts.
*/
if ( !set )
ffc09140: 40 a2 00 08 bne+ ffc09148 <sigtimedwait+0x1c>
ffc09144: 48 00 00 38 b ffc0917c <sigtimedwait+0x50>
/* NOTE: This is very specifically a RELATIVE not ABSOLUTE time
* in the Open Group specification.
*/
interval = 0;
if ( timeout ) {
ffc09148: 2f 85 00 00 cmpwi cr7,r5,0
ffc0914c: 7c 9f 23 78 mr r31,r4
ffc09150: 7c be 2b 78 mr r30,r5
ffc09154: 41 9e 00 34 beq- cr7,ffc09188 <sigtimedwait+0x5c>
if ( !_Timespec_Is_valid( timeout ) )
ffc09158: 7c a3 2b 78 mr r3,r5
ffc0915c: 48 00 3d 01 bl ffc0ce5c <_Timespec_Is_valid>
ffc09160: 2f 83 00 00 cmpwi cr7,r3,0
ffc09164: 40 be 00 08 bne+ cr7,ffc0916c <sigtimedwait+0x40>
ffc09168: 48 00 00 14 b ffc0917c <sigtimedwait+0x50>
rtems_set_errno_and_return_minus_one( EINVAL );
interval = _Timespec_To_ticks( timeout );
ffc0916c: 7f c3 f3 78 mr r3,r30
ffc09170: 48 00 3d 2d bl ffc0ce9c <_Timespec_To_ticks>
if ( !interval )
ffc09174: 7c 64 1b 79 mr. r4,r3
ffc09178: 40 a2 00 14 bne+ ffc0918c <sigtimedwait+0x60> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
ffc0917c: 48 00 87 c1 bl ffc1193c <__errno>
ffc09180: 39 20 00 16 li r9,22
ffc09184: 48 00 01 7c b ffc09300 <sigtimedwait+0x1d4>
/* NOTE: This is very specifically a RELATIVE not ABSOLUTE time
* in the Open Group specification.
*/
interval = 0;
ffc09188: 38 80 00 00 li r4,0
/*
* Initialize local variables.
*/
the_info = ( info ) ? info : &signal_information;
ffc0918c: 2f 9f 00 00 cmpwi cr7,r31,0
ffc09190: 40 be 00 08 bne+ cr7,ffc09198 <sigtimedwait+0x6c>
ffc09194: 3b e1 00 08 addi r31,r1,8
the_thread = _Thread_Executing;
ffc09198: 3d 20 00 00 lis r9,0
ffc0919c: 81 29 31 f0 lwz r9,12784(r9)
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
ffc091a0: 83 a9 01 50 lwz r29,336(r9)
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc091a4: 7f 60 00 a6 mfmsr r27
ffc091a8: 7d 50 42 a6 mfsprg r10,0
ffc091ac: 7f 6a 50 78 andc r10,r27,r10
ffc091b0: 7d 40 01 24 mtmsr r10
*/
/* API signals pending? */
_ISR_Disable( level );
if ( *set & api->signals_pending ) {
ffc091b4: 81 5c 00 00 lwz r10,0(r28)
ffc091b8: 80 7d 00 d4 lwz r3,212(r29)
ffc091bc: 7d 48 18 39 and. r8,r10,r3
ffc091c0: 41 a2 00 40 beq+ ffc09200 <sigtimedwait+0xd4>
/* XXX real info later */
the_info->si_signo = _POSIX_signals_Get_lowest( api->signals_pending );
ffc091c4: 4b ff ff 11 bl ffc090d4 <_POSIX_signals_Get_lowest>
_POSIX_signals_Clear_signals(
ffc091c8: 7f e5 fb 78 mr r5,r31
/* API signals pending? */
_ISR_Disable( level );
if ( *set & api->signals_pending ) {
/* XXX real info later */
the_info->si_signo = _POSIX_signals_Get_lowest( api->signals_pending );
ffc091cc: 90 7f 00 00 stw r3,0(r31)
ffc091d0: 7c 64 1b 78 mr r4,r3
_POSIX_signals_Clear_signals(
ffc091d4: 38 c0 00 00 li r6,0
ffc091d8: 7f a3 eb 78 mr r3,r29
ffc091dc: 38 e0 00 00 li r7,0
ffc091e0: 48 00 5c e5 bl ffc0eec4 <_POSIX_signals_Clear_signals>
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc091e4: 7f 60 01 24 mtmsr r27
false,
false
);
_ISR_Enable( level );
the_info->si_code = SI_USER;
ffc091e8: 39 20 00 01 li r9,1
the_info->si_value.sival_int = 0;
return the_info->si_signo;
ffc091ec: 83 df 00 00 lwz r30,0(r31)
false,
false
);
_ISR_Enable( level );
the_info->si_code = SI_USER;
ffc091f0: 91 3f 00 04 stw r9,4(r31)
the_info->si_value.sival_int = 0;
ffc091f4: 39 20 00 00 li r9,0
ffc091f8: 91 3f 00 08 stw r9,8(r31)
ffc091fc: 48 00 01 0c b ffc09308 <sigtimedwait+0x1dc>
return the_info->si_signo;
}
/* Process pending signals? */
if ( *set & _POSIX_signals_Pending ) {
ffc09200: 3d 00 00 00 lis r8,0
ffc09204: 80 68 29 04 lwz r3,10500(r8)
ffc09208: 7d 48 18 39 and. r8,r10,r3
ffc0920c: 41 a2 00 40 beq+ ffc0924c <sigtimedwait+0x120>
signo = _POSIX_signals_Get_lowest( _POSIX_signals_Pending );
ffc09210: 4b ff fe c5 bl ffc090d4 <_POSIX_signals_Get_lowest>
_POSIX_signals_Clear_signals( api, signo, the_info, true, false );
ffc09214: 7f e5 fb 78 mr r5,r31
}
/* Process pending signals? */
if ( *set & _POSIX_signals_Pending ) {
signo = _POSIX_signals_Get_lowest( _POSIX_signals_Pending );
ffc09218: 7c 7e 1b 78 mr r30,r3
_POSIX_signals_Clear_signals( api, signo, the_info, true, false );
ffc0921c: 7f c4 f3 78 mr r4,r30
ffc09220: 7f a3 eb 78 mr r3,r29
ffc09224: 38 c0 00 01 li r6,1
ffc09228: 38 e0 00 00 li r7,0
ffc0922c: 48 00 5c 99 bl ffc0eec4 <_POSIX_signals_Clear_signals>
ffc09230: 7f 60 01 24 mtmsr r27
_ISR_Enable( level );
the_info->si_signo = signo;
the_info->si_code = SI_USER;
ffc09234: 39 20 00 01 li r9,1
if ( *set & _POSIX_signals_Pending ) {
signo = _POSIX_signals_Get_lowest( _POSIX_signals_Pending );
_POSIX_signals_Clear_signals( api, signo, the_info, true, false );
_ISR_Enable( level );
the_info->si_signo = signo;
ffc09238: 93 df 00 00 stw r30,0(r31)
the_info->si_code = SI_USER;
ffc0923c: 91 3f 00 04 stw r9,4(r31)
the_info->si_value.sival_int = 0;
ffc09240: 39 20 00 00 li r9,0
ffc09244: 91 3f 00 08 stw r9,8(r31)
ffc09248: 48 00 00 c0 b ffc09308 <sigtimedwait+0x1dc>
return signo;
}
the_info->si_signo = -1;
ffc0924c: 39 40 ff ff li r10,-1
ffc09250: 91 5f 00 00 stw r10,0(r31)
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
ffc09254: 3d 40 00 00 lis r10,0
ffc09258: 81 0a 28 d4 lwz r8,10452(r10)
++level;
ffc0925c: 39 08 00 01 addi r8,r8,1
_Thread_Dispatch_disable_level = level;
ffc09260: 91 0a 28 d4 stw r8,10452(r10)
_Thread_Disable_dispatch();
the_thread->Wait.queue = &_POSIX_signals_Wait_queue;
the_thread->Wait.return_code = EINTR;
ffc09264: 39 00 00 04 li r8,4
ffc09268: 91 09 00 34 stw r8,52(r9)
}
the_info->si_signo = -1;
_Thread_Disable_dispatch();
the_thread->Wait.queue = &_POSIX_signals_Wait_queue;
ffc0926c: 3d 40 00 00 lis r10,0
ffc09270: 39 4a 33 ec addi r10,r10,13292
the_thread->Wait.return_code = EINTR;
the_thread->Wait.option = *set;
ffc09274: 81 1c 00 00 lwz r8,0(r28)
}
the_info->si_signo = -1;
_Thread_Disable_dispatch();
the_thread->Wait.queue = &_POSIX_signals_Wait_queue;
ffc09278: 91 49 00 44 stw r10,68(r9)
the_thread->Wait.return_code = EINTR;
the_thread->Wait.option = *set;
ffc0927c: 91 09 00 30 stw r8,48(r9)
the_thread->Wait.return_argument = the_info;
ffc09280: 93 e9 00 28 stw r31,40(r9)
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;
ffc09284: 39 20 00 01 li r9,1
ffc09288: 91 2a 00 30 stw r9,48(r10)
ffc0928c: 7f 60 01 24 mtmsr r27
_Thread_queue_Enter_critical_section( &_POSIX_signals_Wait_queue );
_ISR_Enable( level );
_Thread_queue_Enqueue( &_POSIX_signals_Wait_queue, interval );
ffc09290: 3c 60 00 00 lis r3,0
ffc09294: 3c a0 ff c1 lis r5,-63
ffc09298: 38 63 33 ec addi r3,r3,13292
ffc0929c: 38 a5 cb f4 addi r5,r5,-13324
ffc092a0: 48 00 35 a1 bl ffc0c840 <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
ffc092a4: 48 00 30 4d bl ffc0c2f0 <_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 );
ffc092a8: 80 9f 00 00 lwz r4,0(r31)
ffc092ac: 7f a3 eb 78 mr r3,r29
ffc092b0: 7f e5 fb 78 mr r5,r31
ffc092b4: 38 c0 00 00 li r6,0
ffc092b8: 38 e0 00 00 li r7,0
ffc092bc: 48 00 5c 09 bl ffc0eec4 <_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)
ffc092c0: 3d 20 00 00 lis r9,0
ffc092c4: 81 29 31 f0 lwz r9,12784(r9)
ffc092c8: 81 29 00 34 lwz r9,52(r9)
ffc092cc: 2f 89 00 04 cmpwi cr7,r9,4
ffc092d0: 40 9e 00 20 bne- cr7,ffc092f0 <sigtimedwait+0x1c4>
|| !(*set & signo_to_mask( the_info->si_signo )) ) {
ffc092d4: 83 df 00 00 lwz r30,0(r31)
ffc092d8: 39 40 00 01 li r10,1
ffc092dc: 39 3e ff ff addi r9,r30,-1
ffc092e0: 7d 4a 48 30 slw r10,r10,r9
ffc092e4: 81 3c 00 00 lwz r9,0(r28)
ffc092e8: 7d 48 48 39 and. r8,r10,r9
ffc092ec: 40 a2 00 1c bne+ ffc09308 <sigtimedwait+0x1dc>
errno = _Thread_Executing->Wait.return_code;
ffc092f0: 48 00 86 4d bl ffc1193c <__errno>
ffc092f4: 3d 20 00 00 lis r9,0
ffc092f8: 81 29 31 f0 lwz r9,12784(r9)
ffc092fc: 81 29 00 34 lwz r9,52(r9)
ffc09300: 91 23 00 00 stw r9,0(r3)
return -1;
ffc09304: 3b c0 ff ff li r30,-1
}
return the_info->si_signo;
}
ffc09308: 39 61 00 30 addi r11,r1,48
ffc0930c: 7f c3 f3 78 mr r3,r30
ffc09310: 4b ff 7a 80 b ffc00d90 <_restgpr_27_x>
ffc0b308 <sigwait>:
int sigwait(
const sigset_t *set,
int *sig
)
{
ffc0b308: 7c 2b 0b 78 mr r11,r1
ffc0b30c: 94 21 ff f0 stwu r1,-16(r1)
ffc0b310: 7c 08 02 a6 mflr r0
int status;
status = sigtimedwait( set, NULL, NULL );
ffc0b314: 38 a0 00 00 li r5,0
int sigwait(
const sigset_t *set,
int *sig
)
{
ffc0b318: 4b ff 75 11 bl ffc02828 <_savegpr_31>
ffc0b31c: 7c 9f 23 78 mr r31,r4
int status;
status = sigtimedwait( set, NULL, NULL );
ffc0b320: 38 80 00 00 li r4,0
int sigwait(
const sigset_t *set,
int *sig
)
{
ffc0b324: 90 01 00 14 stw r0,20(r1)
int status;
status = sigtimedwait( set, NULL, NULL );
ffc0b328: 4b ff fd f1 bl ffc0b118 <sigtimedwait>
if ( status != -1 ) {
ffc0b32c: 2f 83 ff ff cmpwi cr7,r3,-1
ffc0b330: 41 9e 00 14 beq- cr7,ffc0b344 <sigwait+0x3c>
if ( sig )
ffc0b334: 2f 9f 00 00 cmpwi cr7,r31,0
ffc0b338: 41 9e 00 18 beq- cr7,ffc0b350 <sigwait+0x48> <== NEVER TAKEN
*sig = status;
ffc0b33c: 90 7f 00 00 stw r3,0(r31)
ffc0b340: 48 00 00 10 b ffc0b350 <sigwait+0x48>
return 0;
}
return errno;
ffc0b344: 48 00 82 cd bl ffc13610 <__errno>
ffc0b348: 80 63 00 00 lwz r3,0(r3)
ffc0b34c: 48 00 00 08 b ffc0b354 <sigwait+0x4c>
status = sigtimedwait( set, NULL, NULL );
if ( status != -1 ) {
if ( sig )
*sig = status;
return 0;
ffc0b350: 38 60 00 00 li r3,0
}
return errno;
}
ffc0b354: 39 61 00 10 addi r11,r1,16
ffc0b358: 4b ff 75 1c b ffc02874 <_restgpr_31_x>
ffc07544 <siproc>:
/*
* Process input character, with semaphore.
*/
static int
siproc (unsigned char c, struct rtems_termios_tty *tty)
{
ffc07544: 94 21 ff f0 stwu r1,-16(r1)
ffc07548: 7c 08 02 a6 mflr r0
ffc0754c: 90 01 00 14 stw r0,20(r1)
int i;
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
ffc07550: 81 24 00 3c lwz r9,60(r4)
/*
* Process input character, with semaphore.
*/
static int
siproc (unsigned char c, struct rtems_termios_tty *tty)
{
ffc07554: bf c1 00 08 stmw r30,8(r1)
ffc07558: 7c 9f 23 78 mr r31,r4
int i;
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
ffc0755c: 71 2a 0e 78 andi. r10,r9,3704
ffc07560: 40 82 00 18 bne- ffc07578 <siproc+0x34> <== ALWAYS TAKEN
}
else {
i = iproc (c, tty);
}
return i;
}
ffc07564: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED
ffc07568: bb c1 00 08 lmw r30,8(r1) <== NOT EXECUTED
ffc0756c: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED
ffc07570: 38 21 00 10 addi r1,r1,16 <== 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);
ffc07574: 4b ff fd c4 b ffc07338 <iproc> <== NOT EXECUTED
ffc07578: 7c 7e 1b 78 mr r30,r3
/*
* 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);
ffc0757c: 80 64 00 18 lwz r3,24(r4)
ffc07580: 38 a0 00 00 li r5,0
ffc07584: 38 80 00 00 li r4,0
ffc07588: 48 00 13 25 bl ffc088ac <rtems_semaphore_obtain>
i = iproc (c, tty);
ffc0758c: 7f c3 f3 78 mr r3,r30
ffc07590: 7f e4 fb 78 mr r4,r31
ffc07594: 4b ff fd a5 bl ffc07338 <iproc>
ffc07598: 7c 7e 1b 78 mr r30,r3
rtems_semaphore_release (tty->osem);
ffc0759c: 80 7f 00 18 lwz r3,24(r31)
ffc075a0: 48 00 14 31 bl ffc089d0 <rtems_semaphore_release>
}
else {
i = iproc (c, tty);
}
return i;
}
ffc075a4: 39 61 00 10 addi r11,r1,16
ffc075a8: 7f c3 f3 78 mr r3,r30
ffc075ac: 4b ff 90 14 b ffc005c0 <_restgpr_30_x>
ffc0f55c <sparse_disk_ioctl>:
static int sparse_disk_ioctl( rtems_disk_device *dd, uint32_t req, void *argp )
{
rtems_status_code sc;
rtems_sparse_disk *sd = rtems_disk_get_driver_data( dd );
if ( RTEMS_BLKIO_REQUEST == req ) {
ffc0f55c: 6c 8a c0 18 xoris r10,r4,49176
/*
* ioctl handler to be passed to the block device handler
*/
static int sparse_disk_ioctl( rtems_disk_device *dd, uint32_t req, void *argp )
{
ffc0f560: 7d 80 00 26 mfcr r12
rtems_status_code sc;
rtems_sparse_disk *sd = rtems_disk_get_driver_data( dd );
if ( RTEMS_BLKIO_REQUEST == req ) {
ffc0f564: 2f 8a 42 01 cmpwi cr7,r10,16897
/*
* ioctl handler to be passed to the block device handler
*/
static int sparse_disk_ioctl( rtems_disk_device *dd, uint32_t req, void *argp )
{
ffc0f568: 94 21 ff b0 stwu r1,-80(r1)
ffc0f56c: 7c 08 02 a6 mflr r0
ffc0f570: be 61 00 1c stmw r19,28(r1)
ffc0f574: 90 01 00 54 stw r0,84(r1)
ffc0f578: 91 81 00 18 stw r12,24(r1)
} else {
sc = RTEMS_INVALID_NUMBER;
}
return sc;
}
ffc0f57c: 83 e3 00 3c lwz r31,60(r3)
static int sparse_disk_ioctl( rtems_disk_device *dd, uint32_t req, void *argp )
{
rtems_status_code sc;
rtems_sparse_disk *sd = rtems_disk_get_driver_data( dd );
if ( RTEMS_BLKIO_REQUEST == req ) {
ffc0f580: 40 9e 01 c0 bne- cr7,ffc0f740 <sparse_disk_ioctl+0x1e4>
rtems_blkdev_request *r = argp;
switch ( r->req ) {
ffc0f584: 83 05 00 00 lwz r24,0(r5)
ffc0f588: 7c bc 2b 78 mr r28,r5
ffc0f58c: 2b 98 00 01 cmplwi cr7,r24,1
ffc0f590: 41 9d 02 08 bgt- cr7,ffc0f798 <sparse_disk_ioctl+0x23c> <== NEVER TAKEN
rtems_blkdev_bnum block;
uint8_t *buff;
size_t buff_size;
unsigned int bytes_handled;
rtems_semaphore_obtain( sparse_disk->mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
ffc0f594: 80 7f 00 00 lwz r3,0(r31)
ffc0f598: 38 80 00 00 li r4,0
ffc0f59c: 38 a0 00 00 li r5,0
/* we only need to write the block if it is different from the fill pattern.
* If the read method does not find a block it will deliver the fill pattern anyway.
*/
key = bsearch(
ffc0f5a0: 3e c0 ff c1 lis r22,-63
rtems_blkdev_bnum block;
uint8_t *buff;
size_t buff_size;
unsigned int bytes_handled;
rtems_semaphore_obtain( sparse_disk->mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
ffc0f5a4: 4b ff af b5 bl ffc0a558 <rtems_semaphore_obtain>
static int sparse_disk_read_write(
rtems_sparse_disk *sparse_disk,
rtems_blkdev_request *req,
const bool read )
{
int rv = 0;
ffc0f5a8: 3b a0 00 00 li r29,0
size_t buff_size;
unsigned int bytes_handled;
rtems_semaphore_obtain( sparse_disk->mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
for ( req_buffer = 0;
ffc0f5ac: 3b 40 00 00 li r26,0
( 0 <= rv ) && ( req_buffer < req->bufnum );
++req_buffer ) {
scatter_gather = &req->bufs[req_buffer];
bytes_handled = 0;
ffc0f5b0: 3a 80 00 00 li r20,0
buff = (uint8_t *) scatter_gather->buffer;
block = scatter_gather->block;
buff_size = scatter_gather->length;
while ( ( 0 <= rv ) && ( 0 < buff_size ) ) {
if ( read )
ffc0f5b4: 2e 18 00 00 cmpwi cr4,r24,0
/* we only need to write the block if it is different from the fill pattern.
* If the read method does not find a block it will deliver the fill pattern anyway.
*/
key = bsearch(
ffc0f5b8: 3a d6 f5 2c addi r22,r22,-2772
ffc0f5bc: 48 00 01 48 b ffc0f704 <sparse_disk_ioctl+0x1a8>
rtems_semaphore_obtain( sparse_disk->mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
for ( req_buffer = 0;
( 0 <= rv ) && ( req_buffer < req->bufnum );
++req_buffer ) {
scatter_gather = &req->bufs[req_buffer];
ffc0f5c0: 39 5a 00 01 addi r10,r26,1
ffc0f5c4: 55 4a 20 36 rlwinm r10,r10,4,0,27
ffc0f5c8: 7d 5c 52 14 add r10,r28,r10
bytes_handled = 0;
buff = (uint8_t *) scatter_gather->buffer;
ffc0f5cc: 82 aa 00 10 lwz r21,16(r10)
for ( req_buffer = 0;
( 0 <= rv ) && ( req_buffer < req->bufnum );
++req_buffer ) {
scatter_gather = &req->bufs[req_buffer];
bytes_handled = 0;
ffc0f5d0: 3a e0 00 00 li r23,0
buff = (uint8_t *) scatter_gather->buffer;
block = scatter_gather->block;
ffc0f5d4: 83 6a 00 08 lwz r27,8(r10)
buff_size = scatter_gather->length;
ffc0f5d8: 83 ca 00 0c lwz r30,12(r10)
ffc0f5dc: 48 00 01 14 b ffc0f6f0 <sparse_disk_ioctl+0x194>
ffc0f5e0: 7f 35 ba 14 add r25,r21,r23
const rtems_blkdev_bnum block,
uint8_t *buffer,
const size_t buffer_size )
{
rtems_sparse_disk_key *key;
rtems_sparse_disk_key block_key = {
ffc0f5e4: 93 61 00 08 stw r27,8(r1)
buff = (uint8_t *) scatter_gather->buffer;
block = scatter_gather->block;
buff_size = scatter_gather->length;
while ( ( 0 <= rv ) && ( 0 < buff_size ) ) {
if ( read )
ffc0f5e8: 40 92 00 58 bne- cr4,ffc0f640 <sparse_disk_ioctl+0xe4>
rtems_sparse_disk_key *key;
rtems_sparse_disk_key block_key = {
.block = block,
.data = NULL
};
size_t bytes_to_copy = sparse_disk->media_block_size;
ffc0f5ec: 81 3f 00 0c lwz r9,12(r31)
ffc0f5f0: 7f dd f3 78 mr r29,r30
const rtems_blkdev_bnum block,
uint8_t *buffer,
const size_t buffer_size )
{
rtems_sparse_disk_key *key;
rtems_sparse_disk_key block_key = {
ffc0f5f4: 93 01 00 0c stw r24,12(r1)
ffc0f5f8: 7f 9e 48 40 cmplw cr7,r30,r9
ffc0f5fc: 40 9d 00 08 ble- cr7,ffc0f604 <sparse_disk_ioctl+0xa8>
ffc0f600: 7d 3d 4b 78 mr r29,r9
size_t bytes_to_copy = sparse_disk->media_block_size;
if ( buffer_size < bytes_to_copy )
bytes_to_copy = buffer_size;
key = bsearch(
ffc0f604: 80 9f 00 18 lwz r4,24(r31)
ffc0f608: 38 61 00 08 addi r3,r1,8
ffc0f60c: 80 bf 00 08 lwz r5,8(r31)
ffc0f610: 38 c0 00 08 li r6,8
ffc0f614: 7e c7 b3 78 mr r7,r22
ffc0f618: 48 00 c9 fd bl ffc1c014 <bsearch>
sparse_disk->used_count,
sizeof( rtems_sparse_disk_key ),
sparse_disk_compare
);
if ( NULL != key )
ffc0f61c: 7c 69 1b 79 mr. r9,r3
memcpy( buffer, key->data, bytes_to_copy );
ffc0f620: 7f 23 cb 78 mr r3,r25
sparse_disk->used_count,
sizeof( rtems_sparse_disk_key ),
sparse_disk_compare
);
if ( NULL != key )
ffc0f624: 41 82 00 0c beq- ffc0f630 <sparse_disk_ioctl+0xd4>
memcpy( buffer, key->data, bytes_to_copy );
ffc0f628: 80 89 00 04 lwz r4,4(r9)
ffc0f62c: 48 00 00 a8 b ffc0f6d4 <sparse_disk_ioctl+0x178>
else
memset( buffer, sparse_disk->fill_pattern, buffer_size );
ffc0f630: 88 9f 00 14 lbz r4,20(r31)
ffc0f634: 7f c5 f3 78 mr r5,r30
ffc0f638: 48 00 d8 85 bl ffc1cebc <memset>
ffc0f63c: 48 00 00 a0 b ffc0f6dc <sparse_disk_ioctl+0x180>
rtems_sparse_disk_key *key;
rtems_sparse_disk_key block_key = {
.block = block,
.data = NULL
};
size_t bytes_to_copy = sparse_disk->media_block_size;
ffc0f640: 81 3f 00 0c lwz r9,12(r31)
ffc0f644: 7f dd f3 78 mr r29,r30
const size_t buffer_size )
{
unsigned int i;
bool block_needs_writing = false;
rtems_sparse_disk_key *key;
rtems_sparse_disk_key block_key = {
ffc0f648: 92 81 00 0c stw r20,12(r1)
ffc0f64c: 7f 9e 48 40 cmplw cr7,r30,r9
ffc0f650: 40 9d 00 08 ble- cr7,ffc0f658 <sparse_disk_ioctl+0xfc>
ffc0f654: 7d 3d 4b 78 mr r29,r9
/* we only need to write the block if it is different from the fill pattern.
* If the read method does not find a block it will deliver the fill pattern anyway.
*/
key = bsearch(
ffc0f658: 80 9f 00 18 lwz r4,24(r31)
ffc0f65c: 38 61 00 08 addi r3,r1,8
ffc0f660: 80 bf 00 08 lwz r5,8(r31)
ffc0f664: 38 c0 00 08 li r6,8
ffc0f668: 7e c7 b3 78 mr r7,r22
ffc0f66c: 48 00 c9 a9 bl ffc1c014 <bsearch>
sparse_disk->used_count,
sizeof( rtems_sparse_disk_key ),
sparse_disk_compare
);
if ( NULL == key ) {
ffc0f670: 7c 73 1b 79 mr. r19,r3
ffc0f674: 40 a2 00 58 bne+ ffc0f6cc <sparse_disk_ioctl+0x170>
ffc0f678: 48 00 00 1c b ffc0f694 <sparse_disk_ioctl+0x138>
for ( i = 0; ( !block_needs_writing ) && ( i < bytes_to_copy ); ++i ) {
if ( buffer[i] != sparse_disk->fill_pattern )
ffc0f67c: 7d 59 48 ae lbzx r10,r25,r9
sizeof( rtems_sparse_disk_key ),
sparse_disk_compare
);
if ( NULL == key ) {
for ( i = 0; ( !block_needs_writing ) && ( i < bytes_to_copy ); ++i ) {
ffc0f680: 39 29 00 01 addi r9,r9,1
ffc0f684: 89 1f 00 14 lbz r8,20(r31)
ffc0f688: 7f 88 50 00 cmpw cr7,r8,r10
ffc0f68c: 41 be 00 14 beq+ cr7,ffc0f6a0 <sparse_disk_ioctl+0x144>
ffc0f690: 48 00 01 1c b ffc0f7ac <sparse_disk_ioctl+0x250>
sparse_disk->used_count,
sizeof( rtems_sparse_disk_key ),
sparse_disk_compare
);
if ( NULL == key ) {
ffc0f694: 39 5d 00 01 addi r10,r29,1
ffc0f698: 7d 49 03 a6 mtctr r10
ffc0f69c: 39 20 00 00 li r9,0
for ( i = 0; ( !block_needs_writing ) && ( i < bytes_to_copy ); ++i ) {
ffc0f6a0: 42 00 ff dc bdnz+ ffc0f67c <sparse_disk_ioctl+0x120>
ffc0f6a4: 48 00 00 38 b ffc0f6dc <sparse_disk_ioctl+0x180>
const rtems_blkdev_bnum block )
{
rtems_sparse_disk_key *key;
if ( sparse_disk->used_count < sparse_disk->blocks_with_buffer ) {
key = &sparse_disk->key_table[sparse_disk->used_count];
ffc0f6a8: 80 7f 00 18 lwz r3,24(r31)
ffc0f6ac: 54 89 18 38 rlwinm r9,r4,3,0,28
key->block = block;
++sparse_disk->used_count;
ffc0f6b0: 38 84 00 01 addi r4,r4,1
{
rtems_sparse_disk_key *key;
if ( sparse_disk->used_count < sparse_disk->blocks_with_buffer ) {
key = &sparse_disk->key_table[sparse_disk->used_count];
key->block = block;
ffc0f6b4: 7f 63 49 2e stwx r27,r3,r9
++sparse_disk->used_count;
qsort( sparse_disk->key_table, sparse_disk->used_count,
ffc0f6b8: 38 a0 00 08 li r5,8
ffc0f6bc: 7e c6 b3 78 mr r6,r22
rtems_sparse_disk_key *key;
if ( sparse_disk->used_count < sparse_disk->blocks_with_buffer ) {
key = &sparse_disk->key_table[sparse_disk->used_count];
key->block = block;
++sparse_disk->used_count;
ffc0f6c0: 90 9f 00 08 stw r4,8(r31)
const rtems_blkdev_bnum block )
{
rtems_sparse_disk_key *key;
if ( sparse_disk->used_count < sparse_disk->blocks_with_buffer ) {
key = &sparse_disk->key_table[sparse_disk->used_count];
ffc0f6c4: 7e 63 4a 14 add r19,r3,r9
key->block = block;
++sparse_disk->used_count;
qsort( sparse_disk->key_table, sparse_disk->used_count,
ffc0f6c8: 48 00 d9 0d bl ffc1cfd4 <qsort>
key = sparse_disk_get_new_block( sparse_disk, block );
}
}
if ( NULL != key )
memcpy( key->data, buffer, bytes_to_copy );
ffc0f6cc: 80 73 00 04 lwz r3,4(r19)
ffc0f6d0: 7f 24 cb 78 mr r4,r25
ffc0f6d4: 7f a5 eb 78 mr r5,r29
ffc0f6d8: 48 00 d6 f1 bl ffc1cdc8 <memcpy>
bytes_handled = 0;
buff = (uint8_t *) scatter_gather->buffer;
block = scatter_gather->block;
buff_size = scatter_gather->length;
while ( ( 0 <= rv ) && ( 0 < buff_size ) ) {
ffc0f6dc: 2f 9d 00 00 cmpwi cr7,r29,0
rv = sparse_disk_write_block( sparse_disk,
block,
&buff[bytes_handled],
buff_size );
++block;
ffc0f6e0: 3b 7b 00 01 addi r27,r27,1
bytes_handled += rv;
ffc0f6e4: 7e f7 ea 14 add r23,r23,r29
buff_size -= rv;
ffc0f6e8: 7f dd f0 50 subf r30,r29,r30
bytes_handled = 0;
buff = (uint8_t *) scatter_gather->buffer;
block = scatter_gather->block;
buff_size = scatter_gather->length;
while ( ( 0 <= rv ) && ( 0 < buff_size ) ) {
ffc0f6ec: 41 9c 00 0c blt- cr7,ffc0f6f8 <sparse_disk_ioctl+0x19c> <== NEVER TAKEN
ffc0f6f0: 2f 9e 00 00 cmpwi cr7,r30,0
ffc0f6f4: 40 9e fe ec bne+ cr7,ffc0f5e0 <sparse_disk_ioctl+0x84>
size_t buff_size;
unsigned int bytes_handled;
rtems_semaphore_obtain( sparse_disk->mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
for ( req_buffer = 0;
ffc0f6f8: 2f 9d 00 00 cmpwi cr7,r29,0
( 0 <= rv ) && ( req_buffer < req->bufnum );
++req_buffer ) {
ffc0f6fc: 3b 5a 00 01 addi r26,r26,1
size_t buff_size;
unsigned int bytes_handled;
rtems_semaphore_obtain( sparse_disk->mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
for ( req_buffer = 0;
ffc0f700: 41 9c 00 10 blt- cr7,ffc0f710 <sparse_disk_ioctl+0x1b4> <== NEVER TAKEN
( 0 <= rv ) && ( req_buffer < req->bufnum );
ffc0f704: 81 3c 00 10 lwz r9,16(r28)
ffc0f708: 7f 9a 48 40 cmplw cr7,r26,r9
ffc0f70c: 41 9c fe b4 blt+ cr7,ffc0f5c0 <sparse_disk_ioctl+0x64>
bytes_handled += rv;
buff_size -= rv;
}
}
rtems_semaphore_release( sparse_disk->mutex );
ffc0f710: 80 7f 00 00 lwz r3,0(r31)
ffc0f714: 4b ff af 69 bl ffc0a67c <rtems_semaphore_release>
if ( 0 > rv )
ffc0f718: 2f 9d 00 00 cmpwi cr7,r29,0
ffc0f71c: 81 3c 00 04 lwz r9,4(r28)
static inline void rtems_blkdev_request_done(
rtems_blkdev_request *req,
rtems_status_code status
)
{
(*req->done)(req, status);
ffc0f720: 7f 83 e3 78 mr r3,r28
ffc0f724: 38 80 00 1b li r4,27
ffc0f728: 7d 29 03 a6 mtctr r9
ffc0f72c: 41 9c 00 08 blt- cr7,ffc0f734 <sparse_disk_ioctl+0x1d8> <== NEVER TAKEN
ffc0f730: 38 80 00 00 li r4,0
ffc0f734: 4e 80 04 21 bctrl
rtems_blkdev_request *r = argp;
switch ( r->req ) {
case RTEMS_BLKDEV_REQ_READ:
case RTEMS_BLKDEV_REQ_WRITE:
return sparse_disk_read_write( sd, r, r->req == RTEMS_BLKDEV_REQ_READ );
ffc0f738: 3b c0 00 00 li r30,0
ffc0f73c: 48 00 00 88 b ffc0f7c4 <sparse_disk_ioctl+0x268>
default:
break;
}
} else if ( RTEMS_BLKIO_DELETED == req ) {
ffc0f740: 6c 8a 20 00 xoris r10,r4,8192
ffc0f744: 2f 8a 42 07 cmpwi cr7,r10,16903
ffc0f748: 40 9e 00 44 bne- cr7,ffc0f78c <sparse_disk_ioctl+0x230>
sc = rtems_semaphore_delete( sd->mutex );
ffc0f74c: 80 7f 00 00 lwz r3,0(r31)
ffc0f750: 4b ff ad 4d bl ffc0a49c <rtems_semaphore_delete>
if ( RTEMS_SUCCESSFUL != sc )
ffc0f754: 2c 03 00 00 cmpwi r3,0
ffc0f758: 41 a2 00 10 beq+ ffc0f768 <sparse_disk_ioctl+0x20c> <== ALWAYS TAKEN
rtems_fatal_error_occurred( 0xdeadbeef );
ffc0f75c: 3c 60 de ad lis r3,-8531 <== NOT EXECUTED
ffc0f760: 60 63 be ef ori r3,r3,48879 <== NOT EXECUTED
ffc0f764: 4b ff b5 85 bl ffc0ace8 <rtems_fatal_error_occurred> <== NOT EXECUTED
sd->mutex = RTEMS_ID_NONE;
if ( NULL != sd->delete_handler )
ffc0f768: 81 3f 00 10 lwz r9,16(r31)
( *sd->delete_handler )( sd );
return 0;
ffc0f76c: 3b c0 00 00 li r30,0
sc = rtems_semaphore_delete( sd->mutex );
if ( RTEMS_SUCCESSFUL != sc )
rtems_fatal_error_occurred( 0xdeadbeef );
sd->mutex = RTEMS_ID_NONE;
ffc0f770: 90 7f 00 00 stw r3,0(r31)
if ( NULL != sd->delete_handler )
ffc0f774: 2f 89 00 00 cmpwi cr7,r9,0
ffc0f778: 41 9e 00 4c beq- cr7,ffc0f7c4 <sparse_disk_ioctl+0x268> <== NEVER TAKEN
( *sd->delete_handler )( sd );
ffc0f77c: 7f e3 fb 78 mr r3,r31
ffc0f780: 7d 29 03 a6 mtctr r9
ffc0f784: 4e 80 04 21 bctrl
ffc0f788: 48 00 00 3c b ffc0f7c4 <sparse_disk_ioctl+0x268>
return 0;
} else {
return rtems_blkdev_ioctl( dd, req, argp );
ffc0f78c: 48 00 2e b9 bl ffc12644 <rtems_blkdev_ioctl>
ffc0f790: 7c 7e 1b 78 mr r30,r3
ffc0f794: 48 00 00 30 b ffc0f7c4 <sparse_disk_ioctl+0x268>
}
errno = EINVAL;
ffc0f798: 48 00 c9 51 bl ffc1c0e8 <__errno> <== NOT EXECUTED
ffc0f79c: 39 20 00 16 li r9,22 <== NOT EXECUTED
ffc0f7a0: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED
return -1;
ffc0f7a4: 3b c0 ff ff li r30,-1 <== NOT EXECUTED
ffc0f7a8: 48 00 00 1c b ffc0f7c4 <sparse_disk_ioctl+0x268> <== NOT EXECUTED
rtems_sparse_disk *sparse_disk,
const rtems_blkdev_bnum block )
{
rtems_sparse_disk_key *key;
if ( sparse_disk->used_count < sparse_disk->blocks_with_buffer ) {
ffc0f7ac: 80 9f 00 08 lwz r4,8(r31)
ffc0f7b0: 81 3f 00 04 lwz r9,4(r31)
ffc0f7b4: 7f 84 48 40 cmplw cr7,r4,r9
ffc0f7b8: 41 9c fe f0 blt+ cr7,ffc0f6a8 <sparse_disk_ioctl+0x14c> <== ALWAYS TAKEN
}
if ( NULL != key )
memcpy( key->data, buffer, bytes_to_copy );
else if ( block_needs_writing )
return -1;
ffc0f7bc: 3b a0 ff ff li r29,-1 <== NOT EXECUTED
ffc0f7c0: 4b ff ff 1c b ffc0f6dc <sparse_disk_ioctl+0x180> <== NOT EXECUTED
return rtems_blkdev_ioctl( dd, req, argp );
}
errno = EINVAL;
return -1;
}
ffc0f7c4: 81 81 00 18 lwz r12,24(r1)
ffc0f7c8: 39 61 00 50 addi r11,r1,80
ffc0f7cc: 7f c3 f3 78 mr r3,r30
ffc0f7d0: 7d 80 81 20 mtcrf 8,r12
ffc0f7d4: 4b ff 1d f8 b ffc015cc <_restgpr_19_x>
ffc07db4 <sysconf>:
long sysconf(
int name
)
{
if ( name == _SC_CLK_TCK )
ffc07db4: 2f 83 00 02 cmpwi cr7,r3,2
ffc07db8: 40 be 00 20 bne+ cr7,ffc07dd8 <sysconf+0x24>
return (TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick());
ffc07dbc: 3d 20 ff c1 lis r9,-63
long sysconf(
int name
)
{
if ( name == _SC_CLK_TCK )
return (TOD_MICROSECONDS_PER_SECOND /
ffc07dc0: 81 49 65 e0 lwz r10,26080(r9)
ffc07dc4: 3d 20 00 0f lis r9,15
ffc07dc8: 61 29 42 40 ori r9,r9,16960
ffc07dcc: 7d 29 53 96 divwu r9,r9,r10
if ( name == 515 ) /* Solaris _SC_STACK_PROT */
return 0;
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
}
ffc07dd0: 7d 23 4b 78 mr r3,r9
ffc07dd4: 4e 80 00 20 blr
{
if ( name == _SC_CLK_TCK )
return (TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick());
if ( name == _SC_OPEN_MAX )
ffc07dd8: 2f 83 00 04 cmpwi cr7,r3,4
return rtems_libio_number_iops;
ffc07ddc: 3d 20 00 00 lis r9,0
ffc07de0: 81 29 27 a0 lwz r9,10144(r9)
{
if ( name == _SC_CLK_TCK )
return (TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick());
if ( name == _SC_OPEN_MAX )
ffc07de4: 41 be ff ec beq- cr7,ffc07dd0 <sysconf+0x1c>
return rtems_libio_number_iops;
if ( name == _SC_GETPW_R_SIZE_MAX )
ffc07de8: 2f 83 00 33 cmpwi cr7,r3,51
return 1024;
ffc07dec: 39 20 04 00 li r9,1024
rtems_configuration_get_microseconds_per_tick());
if ( name == _SC_OPEN_MAX )
return rtems_libio_number_iops;
if ( name == _SC_GETPW_R_SIZE_MAX )
ffc07df0: 41 be ff e0 beq- cr7,ffc07dd0 <sysconf+0x1c>
return 1024;
if ( name == _SC_PAGESIZE )
ffc07df4: 2f 83 00 08 cmpwi cr7,r3,8
return PAGE_SIZE;
ffc07df8: 39 20 10 00 li r9,4096
return rtems_libio_number_iops;
if ( name == _SC_GETPW_R_SIZE_MAX )
return 1024;
if ( name == _SC_PAGESIZE )
ffc07dfc: 41 be ff d4 beq- cr7,ffc07dd0 <sysconf+0x1c>
return PAGE_SIZE;
if ( name == _SC_SYMLOOP_MAX )
ffc07e00: 2f 83 00 4f cmpwi cr7,r3,79
return RTEMS_FILESYSTEM_SYMLOOP_MAX;
ffc07e04: 39 20 00 20 li r9,32
return 1024;
if ( name == _SC_PAGESIZE )
return PAGE_SIZE;
if ( name == _SC_SYMLOOP_MAX )
ffc07e08: 41 9e ff c8 beq+ cr7,ffc07dd0 <sysconf+0x1c> <== NEVER TAKEN
*/
long sysconf(
int name
)
{
ffc07e0c: 94 21 ff f8 stwu r1,-8(r1)
ffc07e10: 7c 08 02 a6 mflr r0
ffc07e14: 90 01 00 0c stw r0,12(r1)
#if defined(__sparc__)
if ( name == 515 ) /* Solaris _SC_STACK_PROT */
return 0;
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
ffc07e18: 48 00 85 5d bl ffc10374 <__errno>
ffc07e1c: 39 20 00 16 li r9,22
}
ffc07e20: 80 01 00 0c lwz r0,12(r1)
#if defined(__sparc__)
if ( name == 515 ) /* Solaris _SC_STACK_PROT */
return 0;
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
ffc07e24: 91 23 00 00 stw r9,0(r3)
ffc07e28: 39 20 ff ff li r9,-1
}
ffc07e2c: 7c 08 03 a6 mtlr r0
ffc07e30: 7d 23 4b 78 mr r3,r9
ffc07e34: 38 21 00 08 addi r1,r1,8
ffc07e38: 4e 80 00 20 blr
ffc1421c <tcsetattr>:
int fd,
int opt,
struct termios *tp
)
{
switch (opt) {
ffc1421c: 2c 04 00 00 cmpwi r4,0
int tcsetattr(
int fd,
int opt,
struct termios *tp
)
{
ffc14220: 94 21 ff f0 stwu r1,-16(r1)
ffc14224: 7c 08 02 a6 mflr r0
ffc14228: bf c1 00 08 stmw r30,8(r1)
ffc1422c: 7c 7e 1b 78 mr r30,r3
ffc14230: 7c bf 2b 78 mr r31,r5
ffc14234: 90 01 00 14 stw r0,20(r1)
switch (opt) {
ffc14238: 41 82 00 34 beq- ffc1426c <tcsetattr+0x50>
ffc1423c: 2f 84 00 01 cmpwi cr7,r4,1
ffc14240: 41 9e 00 14 beq- cr7,ffc14254 <tcsetattr+0x38>
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
ffc14244: 48 00 46 c5 bl ffc18908 <__errno>
ffc14248: 39 20 00 86 li r9,134
ffc1424c: 91 23 00 00 stw r9,0(r3)
ffc14250: 48 00 00 40 b ffc14290 <tcsetattr+0x74>
case TCSADRAIN:
if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0)
ffc14254: 38 80 00 03 li r4,3
ffc14258: 38 a0 00 00 li r5,0
ffc1425c: 4c c6 31 82 crclr 4*cr1+eq
ffc14260: 48 00 38 c1 bl ffc17b20 <ioctl>
ffc14264: 2f 83 00 00 cmpwi cr7,r3,0
ffc14268: 41 9c 00 28 blt- cr7,ffc14290 <tcsetattr+0x74> <== NEVER TAKEN
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
}
}
ffc1426c: 80 01 00 14 lwz r0,20(r1)
return -1;
/*
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
ffc14270: 7f c3 f3 78 mr r3,r30
ffc14274: 7f e5 fb 78 mr r5,r31
}
}
ffc14278: bb c1 00 08 lmw r30,8(r1)
ffc1427c: 7c 08 03 a6 mtlr r0
return -1;
/*
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
ffc14280: 38 80 00 02 li r4,2
}
}
ffc14284: 38 21 00 10 addi r1,r1,16
return -1;
/*
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
ffc14288: 4c c6 31 82 crclr 4*cr1+eq
ffc1428c: 48 00 38 94 b ffc17b20 <ioctl>
}
}
ffc14290: 39 61 00 10 addi r11,r1,16
ffc14294: 38 60 ff ff li r3,-1
ffc14298: 4b fe c5 94 b ffc0082c <_restgpr_30_x>
ffc09764 <timer_create>:
timer_t *timerid
)
{
POSIX_Timer_Control *ptimer;
if ( clock_id != CLOCK_REALTIME )
ffc09764: 2f 83 00 01 cmpwi cr7,r3,1
int timer_create(
clockid_t clock_id,
struct sigevent *evp,
timer_t *timerid
)
{
ffc09768: 94 21 ff f0 stwu r1,-16(r1)
ffc0976c: 7c 08 02 a6 mflr r0
ffc09770: bf c1 00 08 stmw r30,8(r1)
ffc09774: 90 01 00 14 stw r0,20(r1)
POSIX_Timer_Control *ptimer;
if ( clock_id != CLOCK_REALTIME )
ffc09778: 41 be 00 08 beq+ cr7,ffc09780 <timer_create+0x1c>
ffc0977c: 48 00 00 50 b ffc097cc <timer_create+0x68>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !timerid )
ffc09780: 2f 85 00 00 cmpwi cr7,r5,0
ffc09784: 7c be 2b 78 mr r30,r5
ffc09788: 40 be 00 08 bne+ cr7,ffc09790 <timer_create+0x2c>
ffc0978c: 48 00 00 40 b ffc097cc <timer_create+0x68>
/*
* The data of the structure evp are checked in order to verify if they
* are coherent.
*/
if (evp != NULL) {
ffc09790: 2f 84 00 00 cmpwi cr7,r4,0
ffc09794: 7c 9f 23 78 mr r31,r4
ffc09798: 41 9e 00 40 beq- cr7,ffc097d8 <timer_create+0x74>
/* The structure has data */
if ( ( evp->sigev_notify != SIGEV_NONE ) &&
ffc0979c: 81 24 00 00 lwz r9,0(r4)
ffc097a0: 39 29 ff ff addi r9,r9,-1
ffc097a4: 2b 89 00 01 cmplwi cr7,r9,1
ffc097a8: 40 bd 00 08 ble+ cr7,ffc097b0 <timer_create+0x4c> <== ALWAYS TAKEN
ffc097ac: 48 00 00 20 b ffc097cc <timer_create+0x68> <== 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 )
ffc097b0: 81 24 00 04 lwz r9,4(r4)
ffc097b4: 2f 89 00 00 cmpwi cr7,r9,0
ffc097b8: 40 be 00 08 bne+ cr7,ffc097c0 <timer_create+0x5c> <== ALWAYS TAKEN
ffc097bc: 48 00 00 10 b ffc097cc <timer_create+0x68> <== NOT EXECUTED
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
ffc097c0: 39 29 ff ff addi r9,r9,-1
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(evp->sigev_signo) )
ffc097c4: 2b 89 00 1f cmplwi cr7,r9,31
ffc097c8: 40 bd 00 10 ble+ cr7,ffc097d8 <timer_create+0x74> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
ffc097cc: 48 00 8d 49 bl ffc12514 <__errno>
ffc097d0: 39 20 00 16 li r9,22
ffc097d4: 48 00 00 34 b ffc09808 <timer_create+0xa4>
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
ffc097d8: 3d 20 00 00 lis r9,0
ffc097dc: 81 49 28 a8 lwz r10,10408(r9)
++level;
ffc097e0: 39 4a 00 01 addi r10,r10,1
_Thread_Dispatch_disable_level = level;
ffc097e4: 91 49 28 a8 stw r10,10408(r9)
* 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 );
ffc097e8: 3c 60 00 00 lis r3,0
ffc097ec: 38 63 59 40 addi r3,r3,22848
ffc097f0: 48 00 22 9d bl ffc0ba8c <_Objects_Allocate>
/*
* Allocate a timer
*/
ptimer = _POSIX_Timer_Allocate();
if ( !ptimer ) {
ffc097f4: 2c 03 00 00 cmpwi r3,0
ffc097f8: 40 a2 00 1c bne+ ffc09814 <timer_create+0xb0>
_Thread_Enable_dispatch();
ffc097fc: 48 00 36 cd bl ffc0cec8 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EAGAIN );
ffc09800: 48 00 8d 15 bl ffc12514 <__errno>
ffc09804: 39 20 00 0b li r9,11
ffc09808: 91 23 00 00 stw r9,0(r3)
ffc0980c: 38 60 ff ff li r3,-1
ffc09810: 48 00 00 88 b ffc09898 <timer_create+0x134>
}
/* The data of the created timer are stored to use them later */
ptimer->state = POSIX_TIMER_STATE_CREATE_NEW;
ffc09814: 39 40 00 02 li r10,2
ffc09818: 99 43 00 3c stb r10,60(r3)
ptimer->thread_id = _Thread_Executing->Object.id;
if ( evp != NULL ) {
ffc0981c: 2f 9f 00 00 cmpwi cr7,r31,0
}
/* The data of the created timer are stored to use them later */
ptimer->state = POSIX_TIMER_STATE_CREATE_NEW;
ptimer->thread_id = _Thread_Executing->Object.id;
ffc09820: 3d 40 00 00 lis r10,0
ffc09824: 81 4a 5b b0 lwz r10,23472(r10)
ffc09828: 81 4a 00 08 lwz r10,8(r10)
ffc0982c: 91 43 00 38 stw r10,56(r3)
if ( evp != NULL ) {
ffc09830: 41 9e 00 1c beq- cr7,ffc0984c <timer_create+0xe8>
ptimer->inf.sigev_notify = evp->sigev_notify;
ffc09834: 81 5f 00 00 lwz r10,0(r31)
ffc09838: 91 43 00 40 stw r10,64(r3)
ptimer->inf.sigev_signo = evp->sigev_signo;
ffc0983c: 81 5f 00 04 lwz r10,4(r31)
ffc09840: 91 43 00 44 stw r10,68(r3)
ptimer->inf.sigev_value = evp->sigev_value;
ffc09844: 81 5f 00 08 lwz r10,8(r31)
ffc09848: 91 43 00 48 stw r10,72(r3)
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
ffc0984c: 81 03 00 08 lwz r8,8(r3)
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
ffc09850: 3c e0 00 00 lis r7,0
ffc09854: 80 c7 59 5c lwz r6,22876(r7)
}
ptimer->overrun = 0;
ffc09858: 39 40 00 00 li r10,0
ffc0985c: 55 07 13 ba rlwinm r7,r8,2,14,29
ffc09860: 91 43 00 68 stw r10,104(r3)
ptimer->timer_data.it_value.tv_sec = 0;
ffc09864: 91 43 00 5c stw r10,92(r3)
ptimer->timer_data.it_value.tv_nsec = 0;
ffc09868: 91 43 00 60 stw r10,96(r3)
ptimer->timer_data.it_interval.tv_sec = 0;
ffc0986c: 91 43 00 54 stw r10,84(r3)
ptimer->timer_data.it_interval.tv_nsec = 0;
ffc09870: 91 43 00 58 stw r10,88(r3)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
ffc09874: 91 43 00 18 stw r10,24(r3)
the_watchdog->routine = routine;
ffc09878: 91 43 00 2c stw r10,44(r3)
the_watchdog->id = id;
ffc0987c: 91 43 00 30 stw r10,48(r3)
the_watchdog->user_data = user_data;
ffc09880: 91 43 00 34 stw r10,52(r3)
ffc09884: 7c 66 39 2e stwx r3,r6,r7
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
ffc09888: 91 43 00 0c stw r10,12(r3)
_Watchdog_Initialize( &ptimer->Timer, NULL, 0, NULL );
_Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0);
*timerid = ptimer->Object.id;
ffc0988c: 91 1e 00 00 stw r8,0(r30)
_Thread_Enable_dispatch();
ffc09890: 48 00 36 39 bl ffc0cec8 <_Thread_Enable_dispatch>
return 0;
ffc09894: 38 60 00 00 li r3,0
}
ffc09898: 39 61 00 10 addi r11,r1,16
ffc0989c: 48 01 35 14 b ffc1cdb0 <_restgpr_30_x>
ffc08438 <timer_settime>:
timer_t timerid,
int flags,
const struct itimerspec *value,
struct itimerspec *ovalue
)
{
ffc08438: 94 21 ff c8 stwu r1,-56(r1)
ffc0843c: 7c 08 02 a6 mflr r0
ffc08440: bf 81 00 28 stmw r28,40(r1)
Objects_Locations location;
bool activated;
uint32_t initial_period;
struct itimerspec normalize;
if ( !value )
ffc08444: 7c bd 2b 79 mr. r29,r5
timer_t timerid,
int flags,
const struct itimerspec *value,
struct itimerspec *ovalue
)
{
ffc08448: 90 01 00 3c stw r0,60(r1)
Objects_Locations location;
bool activated;
uint32_t initial_period;
struct itimerspec normalize;
if ( !value )
ffc0844c: 40 a2 00 08 bne+ ffc08454 <timer_settime+0x1c> <== ALWAYS TAKEN
ffc08450: 48 00 01 78 b ffc085c8 <timer_settime+0x190> <== NOT EXECUTED
ffc08454: 7c 7c 1b 78 mr r28,r3
/*
* 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) ) ) {
ffc08458: 38 7d 00 08 addi r3,r29,8
ffc0845c: 7c 9f 23 78 mr r31,r4
ffc08460: 7c de 33 78 mr r30,r6
ffc08464: 48 00 3e b1 bl ffc0c314 <_Timespec_Is_valid>
ffc08468: 2f 83 00 00 cmpwi cr7,r3,0
ffc0846c: 40 be 00 08 bne+ cr7,ffc08474 <timer_settime+0x3c>
ffc08470: 48 00 01 58 b ffc085c8 <timer_settime+0x190>
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( !_Timespec_Is_valid( &(value->it_interval) ) ) {
ffc08474: 7f a3 eb 78 mr r3,r29
ffc08478: 48 00 3e 9d bl ffc0c314 <_Timespec_Is_valid>
ffc0847c: 2f 83 00 00 cmpwi cr7,r3,0
ffc08480: 40 be 00 08 bne+ cr7,ffc08488 <timer_settime+0x50> <== ALWAYS TAKEN
ffc08484: 48 00 01 44 b ffc085c8 <timer_settime+0x190> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) {
ffc08488: 2f 9f 00 04 cmpwi cr7,r31,4
ffc0848c: 41 9e 00 10 beq- cr7,ffc0849c <timer_settime+0x64>
ffc08490: 2f 9f 00 00 cmpwi cr7,r31,0
ffc08494: 41 be 00 08 beq+ cr7,ffc0849c <timer_settime+0x64>
ffc08498: 48 00 01 30 b ffc085c8 <timer_settime+0x190>
}
normalize = *value;
/* Convert absolute to relative time */
if (flags == TIMER_ABSTIME) {
ffc0849c: 2f 9f 00 04 cmpwi cr7,r31,4
if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) {
rtems_set_errno_and_return_minus_one( EINVAL );
}
normalize = *value;
ffc084a0: 39 21 00 08 addi r9,r1,8
ffc084a4: 7c bd 84 aa lswi r5,r29,16
ffc084a8: 7c a9 85 aa stswi r5,r9,16
/* Convert absolute to relative time */
if (flags == TIMER_ABSTIME) {
ffc084ac: 40 be 00 34 bne+ cr7,ffc084e0 <timer_settime+0xa8>
struct timespec now;
_TOD_Get( &now );
ffc084b0: 38 61 00 18 addi r3,r1,24
ffc084b4: 4b ff ff 19 bl ffc083cc <_TOD_Get>
/* Check for seconds in the past */
if ( _Timespec_Greater_than( &now, &normalize.it_value ) )
ffc084b8: 38 61 00 10 addi r3,r1,16
ffc084bc: 38 81 00 18 addi r4,r1,24
ffc084c0: 48 00 3e 95 bl ffc0c354 <_Timespec_Less_than>
ffc084c4: 2f 83 00 00 cmpwi cr7,r3,0
ffc084c8: 41 be 00 08 beq+ cr7,ffc084d0 <timer_settime+0x98>
ffc084cc: 48 00 00 fc b ffc085c8 <timer_settime+0x190>
rtems_set_errno_and_return_minus_one( EINVAL );
_Timespec_Subtract( &now, &normalize.it_value, &normalize.it_value );
ffc084d0: 38 81 00 10 addi r4,r1,16
ffc084d4: 38 61 00 18 addi r3,r1,24
ffc084d8: 7c 85 23 78 mr r5,r4
ffc084dc: 48 00 3e b5 bl ffc0c390 <_Timespec_Subtract>
RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get (
timer_t id,
Objects_Locations *location
)
{
return (POSIX_Timer_Control *)
ffc084e0: 3c 60 00 00 lis r3,0
ffc084e4: 38 63 2f 80 addi r3,r3,12160
ffc084e8: 7f 84 e3 78 mr r4,r28
ffc084ec: 38 a1 00 20 addi r5,r1,32
ffc084f0: 48 00 24 65 bl ffc0a954 <_Objects_Get>
* something with the structure of times of the timer: to stop, start
* or start it again
*/
ptimer = _POSIX_Timer_Get( timerid, &location );
switch ( location ) {
ffc084f4: 81 21 00 20 lwz r9,32(r1)
ffc084f8: 7c 7f 1b 78 mr r31,r3
ffc084fc: 2f 89 00 00 cmpwi cr7,r9,0
ffc08500: 40 9e 00 c8 bne- cr7,ffc085c8 <timer_settime+0x190>
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 ) {
ffc08504: 81 21 00 10 lwz r9,16(r1)
ffc08508: 2f 89 00 00 cmpwi cr7,r9,0
ffc0850c: 40 9e 00 44 bne- cr7,ffc08550 <timer_settime+0x118>
ffc08510: 81 21 00 14 lwz r9,20(r1)
ffc08514: 2f 89 00 00 cmpwi cr7,r9,0
ffc08518: 40 be 00 38 bne+ cr7,ffc08550 <timer_settime+0x118>
/* Stop the timer */
(void) _Watchdog_Remove( &ptimer->Timer );
ffc0851c: 38 63 00 10 addi r3,r3,16
ffc08520: 48 00 42 71 bl ffc0c790 <_Watchdog_Remove>
/* The old data of the timer are returned */
if ( ovalue )
ffc08524: 2f 9e 00 00 cmpwi cr7,r30,0
ffc08528: 39 3f 00 54 addi r9,r31,84
ffc0852c: 41 9e 00 0c beq- cr7,ffc08538 <timer_settime+0x100>
*ovalue = ptimer->timer_data;
ffc08530: 7c a9 84 aa lswi r5,r9,16
ffc08534: 7c be 85 aa stswi r5,r30,16
/* The new data are set */
ptimer->timer_data = normalize;
ffc08538: 39 41 00 08 addi r10,r1,8
ffc0853c: 7c aa 84 aa lswi r5,r10,16
ffc08540: 7c a9 85 aa stswi r5,r9,16
/* Indicates that the timer is created and stopped */
ptimer->state = POSIX_TIMER_STATE_CREATE_STOP;
ffc08544: 39 20 00 04 li r9,4
ffc08548: 99 3f 00 3c stb r9,60(r31)
ffc0854c: 48 00 00 70 b ffc085bc <timer_settime+0x184>
_Thread_Enable_dispatch();
return 0;
}
/* Convert from seconds and nanoseconds to ticks */
ptimer->ticks = _Timespec_To_ticks( &value->it_interval );
ffc08550: 7f a3 eb 78 mr r3,r29
ffc08554: 48 00 3e 7d bl ffc0c3d0 <_Timespec_To_ticks>
ffc08558: 90 7f 00 64 stw r3,100(r31)
initial_period = _Timespec_To_ticks( &normalize.it_value );
ffc0855c: 38 61 00 10 addi r3,r1,16
ffc08560: 48 00 3e 71 bl ffc0c3d0 <_Timespec_To_ticks>
activated = _POSIX_Timer_Insert_helper(
ffc08564: 80 bf 00 08 lwz r5,8(r31)
ffc08568: 3c c0 ff c1 lis r6,-63
return 0;
}
/* Convert from seconds and nanoseconds to ticks */
ptimer->ticks = _Timespec_To_ticks( &value->it_interval );
initial_period = _Timespec_To_ticks( &normalize.it_value );
ffc0856c: 7c 64 1b 78 mr r4,r3
activated = _POSIX_Timer_Insert_helper(
ffc08570: 38 c6 85 e0 addi r6,r6,-31264
ffc08574: 38 7f 00 10 addi r3,r31,16
ffc08578: 7f e7 fb 78 mr r7,r31
ffc0857c: 48 00 60 89 bl ffc0e604 <_POSIX_Timer_Insert_helper>
initial_period,
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated ) {
ffc08580: 2f 83 00 00 cmpwi cr7,r3,0
ffc08584: 40 be 00 08 bne+ cr7,ffc0858c <timer_settime+0x154>
ffc08588: 48 00 00 34 b ffc085bc <timer_settime+0x184>
/*
* The timer has been started and is running. So we return the
* old ones in "ovalue"
*/
if ( ovalue )
ffc0858c: 2f 9e 00 00 cmpwi cr7,r30,0
ffc08590: 39 3f 00 54 addi r9,r31,84
ffc08594: 41 9e 00 0c beq- cr7,ffc085a0 <timer_settime+0x168>
*ovalue = ptimer->timer_data;
ffc08598: 7c a9 84 aa lswi r5,r9,16
ffc0859c: 7c be 85 aa stswi r5,r30,16
ptimer->timer_data = normalize;
ffc085a0: 39 41 00 08 addi r10,r1,8
ffc085a4: 7c aa 84 aa lswi r5,r10,16
ffc085a8: 7c a9 85 aa stswi r5,r9,16
/* Indicate that the time is running */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
ffc085ac: 39 20 00 03 li r9,3
_TOD_Get( &ptimer->time );
ffc085b0: 38 7f 00 6c addi r3,r31,108
if ( ovalue )
*ovalue = ptimer->timer_data;
ptimer->timer_data = normalize;
/* Indicate that the time is running */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
ffc085b4: 99 3f 00 3c stb r9,60(r31)
_TOD_Get( &ptimer->time );
ffc085b8: 4b ff fe 15 bl ffc083cc <_TOD_Get>
_Thread_Enable_dispatch();
ffc085bc: 48 00 31 ed bl ffc0b7a8 <_Thread_Enable_dispatch>
return 0;
ffc085c0: 38 60 00 00 li r3,0
ffc085c4: 48 00 00 14 b ffc085d8 <timer_settime+0x1a0>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
ffc085c8: 48 00 88 bd bl ffc10e84 <__errno>
ffc085cc: 39 20 00 16 li r9,22
ffc085d0: 91 23 00 00 stw r9,0(r3)
ffc085d4: 38 60 ff ff li r3,-1
}
ffc085d8: 39 61 00 38 addi r11,r1,56
ffc085dc: 4b ff 80 c0 b ffc0069c <_restgpr_28_x>
ffc081e0 <ualarm>:
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
ffc081e0: 94 21 ff d8 stwu r1,-40(r1)
ffc081e4: 7c 08 02 a6 mflr r0
ffc081e8: bf a1 00 1c stmw r29,28(r1)
/*
* Initialize the timer used to implement alarm().
*/
if ( !the_timer->routine ) {
ffc081ec: 3f e0 00 00 lis r31,0
ffc081f0: 3b ff 35 f4 addi r31,r31,13812
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
ffc081f4: 90 01 00 2c stw r0,44(r1)
ffc081f8: 7c 7d 1b 78 mr r29,r3
/*
* Initialize the timer used to implement alarm().
*/
if ( !the_timer->routine ) {
ffc081fc: 81 3f 00 1c lwz r9,28(r31)
ffc08200: 2f 89 00 00 cmpwi cr7,r9,0
ffc08204: 40 be 00 24 bne+ cr7,ffc08228 <ualarm+0x48>
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
ffc08208: 3d 40 ff c1 lis r10,-63
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
ffc0820c: 91 3f 00 08 stw r9,8(r31)
the_watchdog->routine = routine;
ffc08210: 39 4a 81 90 addi r10,r10,-32368
ffc08214: 91 5f 00 1c stw r10,28(r31)
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
useconds_t remaining = 0;
ffc08218: 3b c0 00 00 li r30,0
the_watchdog->id = id;
ffc0821c: 91 3f 00 20 stw r9,32(r31)
the_watchdog->user_data = user_data;
ffc08220: 91 3f 00 24 stw r9,36(r31)
ffc08224: 48 00 00 58 b ffc0827c <ualarm+0x9c>
if ( !the_timer->routine ) {
_Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL );
} else {
Watchdog_States state;
state = _Watchdog_Remove( the_timer );
ffc08228: 7f e3 fb 78 mr r3,r31
ffc0822c: 48 00 40 35 bl ffc0c260 <_Watchdog_Remove>
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
useconds_t remaining = 0;
ffc08230: 3b c0 00 00 li r30,0
_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) ) {
ffc08234: 38 63 ff fe addi r3,r3,-2
ffc08238: 2b 83 00 01 cmplwi cr7,r3,1
ffc0823c: 41 bd 00 40 bgt+ cr7,ffc0827c <ualarm+0x9c> <== 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);
ffc08240: 81 3f 00 0c lwz r9,12(r31)
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
ffc08244: 38 81 00 08 addi r4,r1,8
* 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);
ffc08248: 80 7f 00 14 lwz r3,20(r31)
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND;
remaining += tp.tv_nsec / 1000;
ffc0824c: 3b c0 03 e8 li r30,1000
* 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);
ffc08250: 81 5f 00 18 lwz r10,24(r31)
ffc08254: 7c 63 4a 14 add r3,r3,r9
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
ffc08258: 7c 6a 18 50 subf r3,r10,r3
ffc0825c: 48 00 3b 59 bl ffc0bdb4 <_Timespec_From_ticks>
remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND;
ffc08260: 81 21 00 08 lwz r9,8(r1)
ffc08264: 3d 40 00 0f lis r10,15
ffc08268: 61 4a 42 40 ori r10,r10,16960
ffc0826c: 7d 4a 49 d6 mullw r10,r10,r9
remaining += tp.tv_nsec / 1000;
ffc08270: 81 21 00 0c lwz r9,12(r1)
ffc08274: 7f c9 f3 d6 divw r30,r9,r30
ffc08278: 7f de 52 14 add r30,r30,r10
/*
* 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 ) {
ffc0827c: 2f 9d 00 00 cmpwi cr7,r29,0
ffc08280: 41 be 00 4c beq+ cr7,ffc082cc <ualarm+0xec>
Watchdog_Interval ticks;
tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND;
ffc08284: 3d 20 00 0f lis r9,15
ffc08288: 61 29 42 40 ori r9,r9,16960
ffc0828c: 7d 5d 4b 96 divwu r10,r29,r9
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
ffc08290: 7d 2a 49 d6 mullw r9,r10,r9
* less than a single clock tick, then fudge it to a clock tick.
*/
if ( useconds ) {
Watchdog_Interval ticks;
tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND;
ffc08294: 91 41 00 08 stw r10,8(r1)
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
ticks = _Timespec_To_ticks( &tp );
ffc08298: 38 61 00 08 addi r3,r1,8
*/
if ( useconds ) {
Watchdog_Interval ticks;
tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND;
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
ffc0829c: 7f a9 e8 50 subf r29,r9,r29
ffc082a0: 1f bd 03 e8 mulli r29,r29,1000
ffc082a4: 93 a1 00 0c stw r29,12(r1)
ticks = _Timespec_To_ticks( &tp );
ffc082a8: 48 00 3b 3d bl ffc0bde4 <_Timespec_To_ticks>
if ( ticks == 0 )
ticks = 1;
_Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) );
ffc082ac: 38 61 00 08 addi r3,r1,8
ffc082b0: 48 00 3b 35 bl ffc0bde4 <_Timespec_To_ticks>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
ffc082b4: 3c 80 00 00 lis r4,0
ffc082b8: 38 84 35 f4 addi r4,r4,13812
ffc082bc: 90 64 00 0c stw r3,12(r4)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc082c0: 3c 60 00 00 lis r3,0
ffc082c4: 38 63 2e 08 addi r3,r3,11784
ffc082c8: 48 00 3e 3d bl ffc0c104 <_Watchdog_Insert>
}
return remaining;
}
ffc082cc: 39 61 00 28 addi r11,r1,40
ffc082d0: 7f c3 f3 78 mr r3,r30
ffc082d4: 4b ff 83 40 b ffc00614 <_restgpr_29_x>
ffc07d9c <unmount>:
* in some form is supported on most UNIX and POSIX systems. This
* routine is necessary to mount instantiations of a file system
* into the file system name space.
*/
int unmount( const char *path )
{
ffc07d9c: 94 21 ff b0 stwu r1,-80(r1)
ffc07da0: 7c 08 02 a6 mflr r0
ffc07da4: 7c 64 1b 78 mr r4,r3
int rv = 0;
rtems_filesystem_eval_path_context_t ctx;
int eval_flags = RTEMS_FS_FOLLOW_LINK;
const rtems_filesystem_location_info_t *currentloc =
ffc07da8: 38 a0 00 18 li r5,24
* in some form is supported on most UNIX and POSIX systems. This
* routine is necessary to mount instantiations of a file system
* into the file system name space.
*/
int unmount( const char *path )
{
ffc07dac: 90 01 00 54 stw r0,84(r1)
int rv = 0;
rtems_filesystem_eval_path_context_t ctx;
int eval_flags = RTEMS_FS_FOLLOW_LINK;
const rtems_filesystem_location_info_t *currentloc =
ffc07db0: 38 61 00 08 addi r3,r1,8
* in some form is supported on most UNIX and POSIX systems. This
* routine is necessary to mount instantiations of a file system
* into the file system name space.
*/
int unmount( const char *path )
{
ffc07db4: bf c1 00 48 stmw r30,72(r1)
int rv = 0;
rtems_filesystem_eval_path_context_t ctx;
int eval_flags = RTEMS_FS_FOLLOW_LINK;
const rtems_filesystem_location_info_t *currentloc =
ffc07db8: 4b ff da a1 bl ffc05858 <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;
ffc07dbc: 83 e3 00 14 lwz r31,20(r3)
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)(
ffc07dc0: 81 3f 00 0c lwz r9,12(r31)
ffc07dc4: 80 9f 00 24 lwz r4,36(r31)
ffc07dc8: 81 29 00 10 lwz r9,16(r9)
ffc07dcc: 7d 29 03 a6 mtctr r9
ffc07dd0: 4e 80 04 21 bctrl
if ( rtems_filesystem_location_is_instance_root( currentloc ) ) {
ffc07dd4: 2f 83 00 00 cmpwi cr7,r3,0
ffc07dd8: 41 9e 00 94 beq- cr7,ffc07e6c <unmount+0xd0>
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;
ffc07ddc: 3d 20 00 00 lis r9,0
ffc07de0: 81 29 27 b8 lwz r9,10168(r9)
const rtems_filesystem_location_info_t *current =
&rtems_filesystem_current->location;
ffc07de4: 81 49 00 00 lwz r10,0(r9)
return mt_entry == root->mt_entry || mt_entry == current->mt_entry;
ffc07de8: 81 29 00 04 lwz r9,4(r9)
ffc07dec: 81 29 00 14 lwz r9,20(r9)
ffc07df0: 7f 9f 48 00 cmpw cr7,r31,r9
ffc07df4: 41 9e 00 18 beq- cr7,ffc07e0c <unmount+0x70>
ffc07df8: 81 2a 00 14 lwz r9,20(r10)
ffc07dfc: 7f e9 4a 78 xor r9,r31,r9
ffc07e00: 7d 29 00 34 cntlzw r9,r9
ffc07e04: 55 29 d9 7e rlwinm r9,r9,27,5,31
ffc07e08: 48 00 00 08 b ffc07e10 <unmount+0x74>
ffc07e0c: 39 20 00 01 li r9,1
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_instance_root( currentloc ) ) {
if ( !contains_root_or_current_directory( mt_entry ) ) {
ffc07e10: 2f 89 00 00 cmpwi cr7,r9,0
ffc07e14: 40 9e 00 4c bne- cr7,ffc07e60 <unmount+0xc4>
const rtems_filesystem_operations_table *mt_point_ops =
mt_entry->mt_point_node->location.mt_entry->ops;
ffc07e18: 81 3f 00 20 lwz r9,32(r31)
rv = (*mt_point_ops->unmount_h)( mt_entry );
ffc07e1c: 7f e3 fb 78 mr r3,r31
rtems_filesystem_mount_table_entry_t *mt_entry = currentloc->mt_entry;
if ( rtems_filesystem_location_is_instance_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;
ffc07e20: 81 29 00 14 lwz r9,20(r9)
rv = (*mt_point_ops->unmount_h)( mt_entry );
ffc07e24: 81 29 00 0c lwz r9,12(r9)
ffc07e28: 81 29 00 38 lwz r9,56(r9)
ffc07e2c: 7d 29 03 a6 mtctr r9
ffc07e30: 4e 80 04 21 bctrl
if ( rv == 0 ) {
ffc07e34: 7c 7e 1b 79 mr. r30,r3
ffc07e38: 40 a2 00 44 bne+ ffc07e7c <unmount+0xe0>
rtems_id self_task_id = rtems_task_self();
ffc07e3c: 48 00 10 65 bl ffc08ea0 <rtems_task_self>
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc07e40: 7d 20 00 a6 mfmsr r9
ffc07e44: 7d 50 42 a6 mfsprg r10,0
ffc07e48: 7d 2a 50 78 andc r10,r9,r10
ffc07e4c: 7d 40 01 24 mtmsr r10
rtems_filesystem_mt_entry_declare_lock_context( lock_context );
rtems_filesystem_mt_entry_lock( lock_context );
mt_entry->unmount_task = self_task_id;
ffc07e50: 90 7f 00 3c stw r3,60(r31)
mt_entry->mounted = false;
ffc07e54: 9b df 00 28 stb r30,40(r31)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc07e58: 7d 20 01 24 mtmsr r9
ffc07e5c: 48 00 00 20 b ffc07e7c <unmount+0xe0>
rtems_filesystem_mt_entry_unlock( lock_context );
}
} else {
errno = EBUSY;
ffc07e60: 48 00 87 4d bl ffc105ac <__errno>
ffc07e64: 39 20 00 10 li r9,16
ffc07e68: 48 00 00 0c b ffc07e74 <unmount+0xd8>
rv = -1;
}
} else {
errno = EACCES;
ffc07e6c: 48 00 87 41 bl ffc105ac <__errno>
ffc07e70: 39 20 00 0d li r9,13
ffc07e74: 91 23 00 00 stw r9,0(r3)
rv = -1;
ffc07e78: 3b c0 ff ff li r30,-1
}
rtems_filesystem_eval_path_cleanup( &ctx );
ffc07e7c: 38 61 00 08 addi r3,r1,8
ffc07e80: 4b ff db 01 bl ffc05980 <rtems_filesystem_eval_path_cleanup>
if ( rv == 0 ) {
ffc07e84: 2f 9e 00 00 cmpwi cr7,r30,0
ffc07e88: 40 be 00 2c bne+ cr7,ffc07eb4 <unmount+0x118>
rtems_interval ticks
)
{
rtems_event_set event_out;
return rtems_event_system_receive(
ffc07e8c: 3c 60 80 00 lis r3,-32768
ffc07e90: 38 80 00 00 li r4,0
ffc07e94: 38 a0 00 00 li r5,0
ffc07e98: 38 c1 00 40 addi r6,r1,64
ffc07e9c: 48 00 0c d1 bl ffc08b6c <rtems_event_system_receive>
rtems_status_code sc = rtems_event_transient_receive(
RTEMS_WAIT,
RTEMS_NO_TIMEOUT
);
if ( sc != RTEMS_SUCCESSFUL ) {
ffc07ea0: 2f 83 00 00 cmpwi cr7,r3,0
ffc07ea4: 41 be 00 10 beq+ cr7,ffc07eb4 <unmount+0x118> <== ALWAYS TAKEN
rtems_fatal_error_occurred( 0xdeadbeef );
ffc07ea8: 3c 60 de ad lis r3,-8531 <== NOT EXECUTED
ffc07eac: 60 63 be ef ori r3,r3,48879 <== NOT EXECUTED
ffc07eb0: 48 00 12 71 bl ffc09120 <rtems_fatal_error_occurred> <== NOT EXECUTED
}
}
return rv;
}
ffc07eb4: 39 61 00 50 addi r11,r1,80
ffc07eb8: 7f c3 f3 78 mr r3,r30
ffc07ebc: 48 00 d5 2c b ffc153e8 <_restgpr_30_x>
ffc07e64 <vprintk>:
*/
void vprintk(
const char *fmt,
va_list ap
)
{
ffc07e64: 94 21 ff b0 stwu r1,-80(r1)
ffc07e68: 7c 08 02 a6 mflr r0
ffc07e6c: be c1 00 28 stmw r22,40(r1)
ffc07e70: 7c 7e 1b 78 mr r30,r3
ffc07e74: 7c 9f 23 78 mr r31,r4
ffc07e78: 90 01 00 54 stw r0,84(r1)
for (n=maxwidth ; n > count; n-- )
rtems_putc(lead);
for (n = 0; n < count; n++) {
rtems_putc("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]);
ffc07e7c: 3f 00 ff c2 lis r24,-62
* console is not yet initialized or in ISR's.
*
* Arguments:
* as in printf: fmt - format string, ... - unnamed arguments.
*/
void vprintk(
ffc07e80: 3b 21 00 08 addi r25,r1,8
char *s, *str;
str = va_arg(ap, char *);
if ( str == NULL ) {
str = "";
ffc07e84: 3e e0 ff c2 lis r23,-62
void vprintk(
const char *fmt,
va_list ap
)
{
for (; *fmt != '\0'; fmt++) {
ffc07e88: 48 00 03 10 b ffc08198 <vprintk+0x334>
bool minus = false;
bool sign = false;
char lead = ' ';
char c;
if (*fmt != '%') {
ffc07e8c: 2f 83 00 25 cmpwi cr7,r3,37
ffc07e90: 41 9e 00 08 beq- cr7,ffc07e98 <vprintk+0x34>
ffc07e94: 48 00 01 f0 b ffc08084 <vprintk+0x220>
rtems_putc(*fmt);
continue;
}
fmt++;
if (*fmt == '0' ) {
ffc07e98: 89 3e 00 01 lbz r9,1(r30)
ffc07e9c: 2f 89 00 30 cmpwi cr7,r9,48
ffc07ea0: 41 9e 00 10 beq- cr7,ffc07eb0 <vprintk+0x4c>
if (*fmt != '%') {
rtems_putc(*fmt);
continue;
}
fmt++;
ffc07ea4: 3b de 00 01 addi r30,r30,1
unsigned base = 0;
unsigned width = 0;
bool lflag = false;
bool minus = false;
bool sign = false;
char lead = ' ';
ffc07ea8: 3a c0 00 20 li r22,32
ffc07eac: 48 00 00 0c b ffc07eb8 <vprintk+0x54>
continue;
}
fmt++;
if (*fmt == '0' ) {
lead = '0';
fmt++;
ffc07eb0: 3b de 00 02 addi r30,r30,2
rtems_putc(*fmt);
continue;
}
fmt++;
if (*fmt == '0' ) {
lead = '0';
ffc07eb4: 3a c0 00 30 li r22,48
fmt++;
}
if (*fmt == '-' ) {
ffc07eb8: 89 3e 00 00 lbz r9,0(r30)
{
for (; *fmt != '\0'; fmt++) {
unsigned base = 0;
unsigned width = 0;
bool lflag = false;
bool minus = false;
ffc07ebc: 3b 40 00 00 li r26,0
fmt++;
if (*fmt == '0' ) {
lead = '0';
fmt++;
}
if (*fmt == '-' ) {
ffc07ec0: 2f 89 00 2d cmpwi cr7,r9,45
ffc07ec4: 40 be 00 0c bne+ cr7,ffc07ed0 <vprintk+0x6c>
minus = true;
fmt++;
ffc07ec8: 3b de 00 01 addi r30,r30,1
if (*fmt == '0' ) {
lead = '0';
fmt++;
}
if (*fmt == '-' ) {
minus = true;
ffc07ecc: 3b 40 00 01 li r26,1
{
for (; *fmt != '\0'; fmt++) {
unsigned base = 0;
unsigned width = 0;
bool lflag = false;
bool minus = false;
ffc07ed0: 3b 80 00 00 li r28,0
ffc07ed4: 48 00 00 14 b ffc07ee8 <vprintk+0x84>
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
width *= 10;
ffc07ed8: 1f 9c 00 0a mulli r28,r28,10
width += ((unsigned) *fmt - '0');
ffc07edc: 3b 9c ff d0 addi r28,r28,-48
ffc07ee0: 7f 9c 1a 14 add r28,r28,r3
fmt++;
ffc07ee4: 3b de 00 01 addi r30,r30,1
}
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
ffc07ee8: 88 7e 00 00 lbz r3,0(r30)
ffc07eec: 39 43 ff d0 addi r10,r3,-48
ffc07ef0: 2b 8a 00 09 cmplwi cr7,r10,9
ffc07ef4: 40 9d ff e4 ble+ cr7,ffc07ed8 <vprintk+0x74>
width *= 10;
width += ((unsigned) *fmt - '0');
fmt++;
}
if ((c = *fmt) == 'l') {
ffc07ef8: 2f 83 00 6c cmpwi cr7,r3,108
}
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
ffc07efc: 7f 9b e3 78 mr r27,r28
ffc07f00: 7f c8 f3 78 mr r8,r30
width *= 10;
width += ((unsigned) *fmt - '0');
fmt++;
}
if ((c = *fmt) == 'l') {
ffc07f04: 40 be 00 0c bne+ cr7,ffc07f10 <vprintk+0xac>
lflag = true;
c = *++fmt;
ffc07f08: 88 68 00 01 lbz r3,1(r8)
ffc07f0c: 3b de 00 01 addi r30,r30,1
}
if ( c == 'c' ) {
ffc07f10: 2f 83 00 63 cmpwi cr7,r3,99
ffc07f14: 40 be 00 3c bne+ cr7,ffc07f50 <vprintk+0xec>
/* need a cast here since va_arg() only takes fully promoted types */
char chr = (char) va_arg(ap, int);
ffc07f18: 89 5f 00 00 lbz r10,0(r31)
ffc07f1c: 2b 8a 00 08 cmplwi cr7,r10,8
ffc07f20: 40 9c 00 1c bge- cr7,ffc07f3c <vprintk+0xd8> <== NEVER TAKEN
ffc07f24: 81 3f 00 08 lwz r9,8(r31)
ffc07f28: 55 48 10 3a rlwinm r8,r10,2,0,29
ffc07f2c: 39 4a 00 01 addi r10,r10,1
ffc07f30: 7d 29 42 14 add r9,r9,r8
ffc07f34: 99 5f 00 00 stb r10,0(r31)
ffc07f38: 48 00 00 10 b ffc07f48 <vprintk+0xe4>
ffc07f3c: 81 3f 00 04 lwz r9,4(r31) <== NOT EXECUTED
ffc07f40: 39 49 00 04 addi r10,r9,4 <== NOT EXECUTED
ffc07f44: 91 5f 00 04 stw r10,4(r31) <== NOT EXECUTED
rtems_putc(chr);
ffc07f48: 88 69 00 03 lbz r3,3(r9)
ffc07f4c: 48 00 01 38 b ffc08084 <vprintk+0x220>
continue;
}
if ( c == 's' ) {
ffc07f50: 2f 83 00 73 cmpwi cr7,r3,115
ffc07f54: 40 be 00 d8 bne+ cr7,ffc0802c <vprintk+0x1c8>
unsigned i, len;
char *s, *str;
str = va_arg(ap, char *);
ffc07f58: 89 5f 00 00 lbz r10,0(r31)
ffc07f5c: 2b 8a 00 08 cmplwi cr7,r10,8
ffc07f60: 40 9c 00 1c bge- cr7,ffc07f7c <vprintk+0x118> <== NEVER TAKEN
ffc07f64: 81 3f 00 08 lwz r9,8(r31)
ffc07f68: 55 48 10 3a rlwinm r8,r10,2,0,29
ffc07f6c: 39 4a 00 01 addi r10,r10,1
ffc07f70: 7d 29 42 14 add r9,r9,r8
ffc07f74: 99 5f 00 00 stb r10,0(r31)
ffc07f78: 48 00 00 10 b ffc07f88 <vprintk+0x124>
ffc07f7c: 81 3f 00 04 lwz r9,4(r31) <== NOT EXECUTED
ffc07f80: 39 49 00 04 addi r10,r9,4 <== NOT EXECUTED
ffc07f84: 91 5f 00 04 stw r10,4(r31) <== NOT EXECUTED
ffc07f88: 83 69 00 00 lwz r27,0(r9)
if ( str == NULL ) {
ffc07f8c: 2f 9b 00 00 cmpwi cr7,r27,0
ffc07f90: 40 be 00 08 bne+ cr7,ffc07f98 <vprintk+0x134>
str = "";
ffc07f94: 3b 77 d1 01 addi r27,r23,-12031
}
/* calculate length of string */
for ( len=0, s=str ; *s ; len++, s++ )
ffc07f98: 3b a0 00 00 li r29,0
ffc07f9c: 48 00 00 08 b ffc07fa4 <vprintk+0x140>
ffc07fa0: 3b bd 00 01 addi r29,r29,1
ffc07fa4: 7d 3b e8 ae lbzx r9,r27,r29
ffc07fa8: 2f 89 00 00 cmpwi cr7,r9,0
ffc07fac: 40 9e ff f4 bne+ cr7,ffc07fa0 <vprintk+0x13c>
;
/* leading spaces */
if ( !minus )
ffc07fb0: 2f 9a 00 00 cmpwi cr7,r26,0
ffc07fb4: 7f b6 eb 78 mr r22,r29
ffc07fb8: 41 9e 00 1c beq- cr7,ffc07fd4 <vprintk+0x170>
for ( i=len ; i<width ; i++ )
rtems_putc(' ');
/* no width option */
if (width == 0) {
ffc07fbc: 2f 9c 00 00 cmpwi cr7,r28,0
ffc07fc0: 41 9e 00 20 beq- cr7,ffc07fe0 <vprintk+0x17c>
ffc07fc4: 48 00 00 34 b ffc07ff8 <vprintk+0x194>
;
/* leading spaces */
if ( !minus )
for ( i=len ; i<width ; i++ )
rtems_putc(' ');
ffc07fc8: 38 60 00 20 li r3,32
ffc07fcc: 48 00 53 c9 bl ffc0d394 <rtems_putc>
for ( len=0, s=str ; *s ; len++, s++ )
;
/* leading spaces */
if ( !minus )
for ( i=len ; i<width ; i++ )
ffc07fd0: 3a d6 00 01 addi r22,r22,1
ffc07fd4: 7f 96 e0 40 cmplw cr7,r22,r28
ffc07fd8: 41 9c ff f0 blt+ cr7,ffc07fc8 <vprintk+0x164>
ffc07fdc: 4b ff ff e0 b ffc07fbc <vprintk+0x158>
if (width == 0) {
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
ffc07fe0: 2f 9d 00 00 cmpwi cr7,r29,0
ffc07fe4: 7f bc eb 78 mr r28,r29
ffc07fe8: 40 9e 00 10 bne- cr7,ffc07ff8 <vprintk+0x194>
rtems_putc(*str);
/* trailing spaces */
if ( minus )
ffc07fec: 2f 9a 00 00 cmpwi cr7,r26,0
ffc07ff0: 41 9e 01 a4 beq- cr7,ffc08194 <vprintk+0x330>
ffc07ff4: 48 00 00 2c b ffc08020 <vprintk+0x1bc>
* console is not yet initialized or in ISR's.
*
* Arguments:
* as in printf: fmt - format string, ... - unnamed arguments.
*/
void vprintk(
ffc07ff8: 3b 7b ff ff addi r27,r27,-1
ffc07ffc: 48 00 00 08 b ffc08004 <vprintk+0x1a0>
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
rtems_putc(*str);
ffc08000: 48 00 53 95 bl ffc0d394 <rtems_putc>
if (width == 0) {
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
ffc08004: 8c 7b 00 01 lbzu r3,1(r27)
ffc08008: 2f 83 00 00 cmpwi cr7,r3,0
ffc0800c: 40 9e ff f4 bne+ cr7,ffc08000 <vprintk+0x19c>
ffc08010: 4b ff ff dc b ffc07fec <vprintk+0x188>
rtems_putc(*str);
/* trailing spaces */
if ( minus )
for ( i=len ; i<width ; i++ )
rtems_putc(' ');
ffc08014: 38 60 00 20 li r3,32
ffc08018: 48 00 53 7d bl ffc0d394 <rtems_putc>
for ( i=0 ; i<width && *str ; str++ )
rtems_putc(*str);
/* trailing spaces */
if ( minus )
for ( i=len ; i<width ; i++ )
ffc0801c: 3b bd 00 01 addi r29,r29,1
ffc08020: 7f 9d e0 40 cmplw cr7,r29,r28
ffc08024: 41 9c ff f0 blt+ cr7,ffc08014 <vprintk+0x1b0>
ffc08028: 48 00 01 6c b ffc08194 <vprintk+0x330>
continue;
}
/* must be a numeric format or something unsupported */
if ( c == 'o' || c == 'O' ) {
ffc0802c: 2f 83 00 6f cmpwi cr7,r3,111
ffc08030: 41 9e 00 5c beq- cr7,ffc0808c <vprintk+0x228>
ffc08034: 2f 83 00 4f cmpwi cr7,r3,79
ffc08038: 41 9e 00 54 beq- cr7,ffc0808c <vprintk+0x228>
base = 8; sign = false;
} else if ( c == 'i' || c == 'I' ||
ffc0803c: 2f 83 00 69 cmpwi cr7,r3,105
ffc08040: 41 9e 00 58 beq- cr7,ffc08098 <vprintk+0x234>
ffc08044: 2f 83 00 49 cmpwi cr7,r3,73
ffc08048: 41 9e 00 50 beq- cr7,ffc08098 <vprintk+0x234>
ffc0804c: 2f 83 00 64 cmpwi cr7,r3,100
ffc08050: 41 9e 00 48 beq- cr7,ffc08098 <vprintk+0x234>
c == 'd' || c == 'D' ) {
ffc08054: 2f 83 00 44 cmpwi cr7,r3,68
ffc08058: 41 9e 00 40 beq- cr7,ffc08098 <vprintk+0x234>
base = 10; sign = true;
} else if ( c == 'u' || c == 'U' ) {
ffc0805c: 2f 83 00 75 cmpwi cr7,r3,117
ffc08060: 41 9e 00 40 beq- cr7,ffc080a0 <vprintk+0x23c>
ffc08064: 2f 83 00 55 cmpwi cr7,r3,85
ffc08068: 41 9e 00 38 beq- cr7,ffc080a0 <vprintk+0x23c>
base = 10; sign = false;
} else if ( c == 'x' || c == 'X' ) {
ffc0806c: 2f 83 00 78 cmpwi cr7,r3,120
ffc08070: 41 9e 00 3c beq- cr7,ffc080ac <vprintk+0x248>
ffc08074: 2f 83 00 58 cmpwi cr7,r3,88
ffc08078: 41 9e 00 34 beq- cr7,ffc080ac <vprintk+0x248>
base = 16; sign = false;
} else if ( c == 'p' ) {
ffc0807c: 2f 83 00 70 cmpwi cr7,r3,112
ffc08080: 41 9e 00 2c beq- cr7,ffc080ac <vprintk+0x248>
base = 16; sign = false; lflag = true;
} else {
rtems_putc(c);
ffc08084: 48 00 53 11 bl ffc0d394 <rtems_putc>
continue;
ffc08088: 48 00 01 0c b ffc08194 <vprintk+0x330>
continue;
}
/* must be a numeric format or something unsupported */
if ( c == 'o' || c == 'O' ) {
base = 8; sign = false;
ffc0808c: 39 20 00 00 li r9,0
ffc08090: 3b a0 00 08 li r29,8
ffc08094: 48 00 00 20 b ffc080b4 <vprintk+0x250>
} else if ( c == 'i' || c == 'I' ||
c == 'd' || c == 'D' ) {
base = 10; sign = true;
ffc08098: 39 20 00 01 li r9,1
ffc0809c: 48 00 00 08 b ffc080a4 <vprintk+0x240>
} else if ( c == 'u' || c == 'U' ) {
base = 10; sign = false;
ffc080a0: 39 20 00 00 li r9,0
ffc080a4: 3b a0 00 0a li r29,10
ffc080a8: 48 00 00 0c b ffc080b4 <vprintk+0x250>
} else if ( c == 'x' || c == 'X' ) {
base = 16; sign = false;
} else if ( c == 'p' ) {
base = 16; sign = false; lflag = true;
ffc080ac: 39 20 00 00 li r9,0
ffc080b0: 3b a0 00 10 li r29,16
rtems_putc(c);
continue;
}
printNum(
lflag ? va_arg(ap, long) : (long) va_arg(ap, int),
ffc080b4: 89 1f 00 00 lbz r8,0(r31)
ffc080b8: 2b 88 00 08 cmplwi cr7,r8,8
ffc080bc: 40 9c 00 1c bge- cr7,ffc080d8 <vprintk+0x274>
ffc080c0: 81 5f 00 08 lwz r10,8(r31)
ffc080c4: 55 07 10 3a rlwinm r7,r8,2,0,29
ffc080c8: 39 08 00 01 addi r8,r8,1
ffc080cc: 7d 4a 3a 14 add r10,r10,r7
ffc080d0: 99 1f 00 00 stb r8,0(r31)
} else {
rtems_putc(c);
continue;
}
printNum(
ffc080d4: 48 00 00 10 b ffc080e4 <vprintk+0x280>
lflag ? va_arg(ap, long) : (long) va_arg(ap, int),
ffc080d8: 81 5f 00 04 lwz r10,4(r31)
ffc080dc: 39 0a 00 04 addi r8,r10,4
ffc080e0: 91 1f 00 04 stw r8,4(r31)
unsigned long unsigned_num;
unsigned long n;
unsigned count;
char toPrint[20];
if ( sign && (num < 0) ) {
ffc080e4: 2f 89 00 00 cmpwi cr7,r9,0
} else {
rtems_putc(c);
continue;
}
printNum(
ffc080e8: 83 4a 00 00 lwz r26,0(r10)
unsigned long unsigned_num;
unsigned long n;
unsigned count;
char toPrint[20];
if ( sign && (num < 0) ) {
ffc080ec: 41 9e 00 28 beq- cr7,ffc08114 <vprintk+0x2b0>
ffc080f0: 2f 9a 00 00 cmpwi cr7,r26,0
ffc080f4: 40 bc 00 20 bge+ cr7,ffc08114 <vprintk+0x2b0>
rtems_putc('-');
ffc080f8: 38 60 00 2d li r3,45
ffc080fc: 48 00 52 99 bl ffc0d394 <rtems_putc>
unsigned_num = (unsigned long) -num;
if (maxwidth) maxwidth--;
ffc08100: 2f 9c 00 00 cmpwi cr7,r28,0
unsigned count;
char toPrint[20];
if ( sign && (num < 0) ) {
rtems_putc('-');
unsigned_num = (unsigned long) -num;
ffc08104: 7d 3a 00 d0 neg r9,r26
if (maxwidth) maxwidth--;
ffc08108: 41 9e 00 14 beq- cr7,ffc0811c <vprintk+0x2b8>
ffc0810c: 3b 7c ff ff addi r27,r28,-1
ffc08110: 48 00 00 0c b ffc0811c <vprintk+0x2b8>
} else {
unsigned_num = (unsigned long) num;
ffc08114: 7f 49 d3 78 mr r9,r26
ffc08118: 7f 9b e3 78 mr r27,r28
}
count = 0;
ffc0811c: 3b 80 00 00 li r28,0
ffc08120: 48 00 00 18 b ffc08138 <vprintk+0x2d4>
while ((n = unsigned_num / base) > 0) {
toPrint[count++] = (char) (unsigned_num - (n * base));
ffc08124: 7d 0a e9 d6 mullw r8,r10,r29
ffc08128: 7d 28 48 50 subf r9,r8,r9
ffc0812c: 7d 3c c9 ae stbx r9,r28,r25
ffc08130: 3b 9c 00 01 addi r28,r28,1
ffc08134: 7d 49 53 78 mr r9,r10
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
ffc08138: 7d 49 eb 96 divwu r10,r9,r29
ffc0813c: 2f 8a 00 00 cmpwi cr7,r10,0
ffc08140: 40 9e ff e4 bne+ cr7,ffc08124 <vprintk+0x2c0>
toPrint[count++] = (char) (unsigned_num - (n * base));
unsigned_num = n;
}
toPrint[count++] = (char) unsigned_num;
ffc08144: 7d 41 e2 14 add r10,r1,r28
ffc08148: 99 2a 00 08 stb r9,8(r10)
ffc0814c: 3b 5c 00 01 addi r26,r28,1
ffc08150: 48 00 00 10 b ffc08160 <vprintk+0x2fc>
for (n=maxwidth ; n > count; n-- )
rtems_putc(lead);
ffc08154: 7e c3 b3 78 mr r3,r22
ffc08158: 48 00 52 3d bl ffc0d394 <rtems_putc>
toPrint[count++] = (char) (unsigned_num - (n * base));
unsigned_num = n;
}
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
ffc0815c: 3b 7b ff ff addi r27,r27,-1
ffc08160: 7f 9b d0 40 cmplw cr7,r27,r26
ffc08164: 41 9d ff f0 bgt+ cr7,ffc08154 <vprintk+0x2f0>
ffc08168: 3b a0 00 00 li r29,0
ffc0816c: 48 00 00 20 b ffc0818c <vprintk+0x328>
* console is not yet initialized or in ISR's.
*
* Arguments:
* as in printf: fmt - format string, ... - unnamed arguments.
*/
void vprintk(
ffc08170: 7d 19 e2 14 add r8,r25,r28
ffc08174: 7d 3d 00 d0 neg r9,r29
for (n=maxwidth ; n > count; n-- )
rtems_putc(lead);
for (n = 0; n < count; n++) {
rtems_putc("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]);
ffc08178: 7d 28 48 ae lbzx r9,r8,r9
ffc0817c: 39 58 d1 84 addi r10,r24,-11900
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
rtems_putc(lead);
for (n = 0; n < count; n++) {
ffc08180: 3b bd 00 01 addi r29,r29,1
rtems_putc("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]);
ffc08184: 7c 6a 48 ae lbzx r3,r10,r9
ffc08188: 48 00 52 0d bl ffc0d394 <rtems_putc>
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
rtems_putc(lead);
for (n = 0; n < count; n++) {
ffc0818c: 7f 9d d0 40 cmplw cr7,r29,r26
ffc08190: 41 9c ff e0 blt+ cr7,ffc08170 <vprintk+0x30c>
void vprintk(
const char *fmt,
va_list ap
)
{
for (; *fmt != '\0'; fmt++) {
ffc08194: 3b de 00 01 addi r30,r30,1
ffc08198: 88 7e 00 00 lbz r3,0(r30)
ffc0819c: 2f 83 00 00 cmpwi cr7,r3,0
ffc081a0: 40 9e fc ec bne+ cr7,ffc07e8c <vprintk+0x28>
sign,
width,
lead
);
}
}
ffc081a4: 39 61 00 50 addi r11,r1,80
ffc081a8: 4b ff 83 f8 b ffc005a0 <_restgpr_22_x>
ffc1b4f4 <write>:
size_t count
)
{
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
ffc1b4f4: 3d 20 00 00 lis r9,0
ssize_t write(
int fd,
const void *buffer,
size_t count
)
{
ffc1b4f8: 94 21 ff f8 stwu r1,-8(r1)
ffc1b4fc: 7c 08 02 a6 mflr r0
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
ffc1b500: 81 29 27 98 lwz r9,10136(r9)
ssize_t write(
int fd,
const void *buffer,
size_t count
)
{
ffc1b504: 90 01 00 0c stw r0,12(r1)
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
ffc1b508: 7f 83 48 40 cmplw cr7,r3,r9
ffc1b50c: 41 bc 00 08 blt+ cr7,ffc1b514 <write+0x20>
ffc1b510: 48 00 00 48 b ffc1b558 <write+0x64>
iop = rtems_libio_iop( fd );
ffc1b514: 3d 20 00 00 lis r9,0
ffc1b518: 81 29 28 4c lwz r9,10316(r9)
ffc1b51c: 1c 63 00 38 mulli r3,r3,56
ffc1b520: 7c 69 1a 14 add r3,r9,r3
rtems_libio_check_is_open( iop );
ffc1b524: 81 23 00 10 lwz r9,16(r3)
ffc1b528: 71 27 01 00 andi. r7,r9,256
ffc1b52c: 40 a2 00 08 bne+ ffc1b534 <write+0x40>
ffc1b530: 48 00 00 28 b ffc1b558 <write+0x64>
rtems_libio_check_buffer( buffer );
ffc1b534: 2f 84 00 00 cmpwi cr7,r4,0
ffc1b538: 40 be 00 10 bne+ cr7,ffc1b548 <write+0x54> <== ALWAYS TAKEN
ffc1b53c: 4b ff 50 71 bl ffc105ac <__errno> <== NOT EXECUTED
ffc1b540: 39 20 00 16 li r9,22 <== NOT EXECUTED
ffc1b544: 48 00 00 1c b ffc1b560 <write+0x6c> <== NOT EXECUTED
rtems_libio_check_count( count );
ffc1b548: 2f 85 00 00 cmpwi cr7,r5,0
ffc1b54c: 41 9e 00 3c beq- cr7,ffc1b588 <write+0x94>
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF );
ffc1b550: 71 2a 00 04 andi. r10,r9,4
ffc1b554: 40 a2 00 18 bne+ ffc1b56c <write+0x78>
ffc1b558: 4b ff 50 55 bl ffc105ac <__errno>
ffc1b55c: 39 20 00 09 li r9,9
ffc1b560: 91 23 00 00 stw r9,0(r3)
ffc1b564: 38 60 ff ff li r3,-1
ffc1b568: 48 00 00 24 b ffc1b58c <write+0x98>
/*
* Now process the write() request.
*/
return (*iop->pathinfo.handlers->write_h)( iop, buffer, count );
ffc1b56c: 81 23 00 24 lwz r9,36(r3)
}
ffc1b570: 80 01 00 0c lwz r0,12(r1)
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 );
ffc1b574: 81 29 00 0c lwz r9,12(r9)
}
ffc1b578: 7c 08 03 a6 mtlr r0
ffc1b57c: 38 21 00 08 addi r1,r1,8
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 );
ffc1b580: 7d 29 03 a6 mtctr r9
ffc1b584: 4e 80 04 20 bctr
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 );
ffc1b588: 38 60 00 00 li r3,0
/*
* Now process the write() request.
*/
return (*iop->pathinfo.handlers->write_h)( iop, buffer, count );
}
ffc1b58c: 80 01 00 0c lwz r0,12(r1)
ffc1b590: 38 21 00 08 addi r1,r1,8
ffc1b594: 7c 08 03 a6 mtlr r0
ffc1b598: 4e 80 00 20 blr
ffc08e44 <writev>:
int bytes;
rtems_libio_t *iop;
ssize_t old;
bool all_zeros;
rtems_libio_check_fd( fd );
ffc08e44: 3d 20 00 00 lis r9,0
ssize_t writev(
int fd,
const struct iovec *iov,
int iovcnt
)
{
ffc08e48: 94 21 ff e0 stwu r1,-32(r1)
ffc08e4c: 7c 08 02 a6 mflr r0
int bytes;
rtems_libio_t *iop;
ssize_t old;
bool all_zeros;
rtems_libio_check_fd( fd );
ffc08e50: 81 29 27 78 lwz r9,10104(r9)
ssize_t writev(
int fd,
const struct iovec *iov,
int iovcnt
)
{
ffc08e54: 90 01 00 24 stw r0,36(r1)
int bytes;
rtems_libio_t *iop;
ssize_t old;
bool all_zeros;
rtems_libio_check_fd( fd );
ffc08e58: 7f 83 48 40 cmplw cr7,r3,r9
ssize_t writev(
int fd,
const struct iovec *iov,
int iovcnt
)
{
ffc08e5c: bf 41 00 08 stmw r26,8(r1)
int bytes;
rtems_libio_t *iop;
ssize_t old;
bool all_zeros;
rtems_libio_check_fd( fd );
ffc08e60: 41 bc 00 08 blt+ cr7,ffc08e68 <writev+0x24>
ffc08e64: 48 00 00 2c b ffc08e90 <writev+0x4c>
iop = rtems_libio_iop( fd );
ffc08e68: 3d 20 00 00 lis r9,0
ffc08e6c: 83 89 28 28 lwz r28,10280(r9)
ffc08e70: 1c 63 00 38 mulli r3,r3,56
ffc08e74: 7f 9c 1a 14 add r28,r28,r3
rtems_libio_check_is_open( iop );
ffc08e78: 81 3c 00 10 lwz r9,16(r28)
ffc08e7c: 71 2a 01 00 andi. r10,r9,256
ffc08e80: 40 a2 00 08 bne+ ffc08e88 <writev+0x44>
ffc08e84: 48 00 00 0c b ffc08e90 <writev+0x4c>
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF );
ffc08e88: 71 2a 00 04 andi. r10,r9,4
ffc08e8c: 40 a2 00 10 bne+ ffc08e9c <writev+0x58> <== ALWAYS TAKEN
ffc08e90: 48 00 80 d1 bl ffc10f60 <__errno>
ffc08e94: 39 20 00 09 li r9,9
ffc08e98: 48 00 00 8c b ffc08f24 <writev+0xe0>
/*
* Argument validation on IO vector
*/
if ( !iov )
ffc08e9c: 2f 84 00 00 cmpwi cr7,r4,0
ffc08ea0: 7c 9d 23 78 mr r29,r4
ffc08ea4: 40 be 00 08 bne+ cr7,ffc08eac <writev+0x68>
ffc08ea8: 48 00 00 74 b ffc08f1c <writev+0xd8>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
ffc08eac: 2f 85 00 00 cmpwi cr7,r5,0
ffc08eb0: 41 bd 00 08 bgt+ cr7,ffc08eb8 <writev+0x74>
ffc08eb4: 48 00 00 68 b ffc08f1c <writev+0xd8>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
ffc08eb8: 2f 85 04 00 cmpwi cr7,r5,1024
ffc08ebc: 40 bd 00 08 ble+ cr7,ffc08ec4 <writev+0x80> <== ALWAYS TAKEN
ffc08ec0: 48 00 00 5c b ffc08f1c <writev+0xd8> <== NOT EXECUTED
#include <sys/uio.h>
#include <rtems/libio_.h>
#include <rtems/seterr.h>
ssize_t writev(
ffc08ec4: 54 bb 18 38 rlwinm r27,r5,3,0,28
ffc08ec8: 38 fb ff f8 addi r7,r27,-8
ffc08ecc: 54 e7 e8 fe rlwinm r7,r7,29,3,31
ffc08ed0: 38 e7 00 01 addi r7,r7,1
ffc08ed4: 39 20 00 00 li r9,0
ffc08ed8: 7c e9 03 a6 mtctr r7
ffc08edc: 39 40 00 01 li r10,1
ffc08ee0: 39 00 00 00 li r8,0
ffc08ee4: 48 00 00 08 b ffc08eec <writev+0xa8>
* 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++ ) {
ffc08ee8: 7c e8 3b 78 mr r8,r7
/*
* 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 )
ffc08eec: 7c fd 48 2e lwzx r7,r29,r9
ffc08ef0: 2f 87 00 00 cmpwi cr7,r7,0
ffc08ef4: 40 be 00 08 bne+ cr7,ffc08efc <writev+0xb8>
ffc08ef8: 48 00 00 24 b ffc08f1c <writev+0xd8>
#include <sys/uio.h>
#include <rtems/libio_.h>
#include <rtems/seterr.h>
ssize_t writev(
ffc08efc: 7c fd 4a 14 add r7,r29,r9
* So we only check for zero.
*/
if ( iov[v].iov_base == 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
ffc08f00: 80 e7 00 04 lwz r7,4(r7)
all_zeros = false;
ffc08f04: 30 c7 ff ff addic r6,r7,-1
ffc08f08: 7c c6 31 10 subfe r6,r6,r6
/* check for wrap */
old = total;
total += iov[v].iov_len;
ffc08f0c: 7c e7 42 14 add r7,r7,r8
if ( total < old || total > SSIZE_MAX )
ffc08f10: 7f 87 40 00 cmpw cr7,r7,r8
*/
if ( iov[v].iov_base == 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
all_zeros = false;
ffc08f14: 7d 4a 30 38 and r10,r10,r6
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old || total > SSIZE_MAX )
ffc08f18: 40 bc 00 14 bge+ cr7,ffc08f2c <writev+0xe8>
rtems_set_errno_and_return_minus_one( EINVAL );
ffc08f1c: 48 00 80 45 bl ffc10f60 <__errno>
ffc08f20: 39 20 00 16 li r9,22
ffc08f24: 91 23 00 00 stw r9,0(r3)
ffc08f28: 48 00 00 70 b ffc08f98 <writev+0x154>
ffc08f2c: 39 29 00 08 addi r9,r9,8
* 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++ ) {
ffc08f30: 42 00 ff b8 bdnz+ ffc08ee8 <writev+0xa4>
}
/*
* A writev with all zeros is supposed to have no effect per OpenGroup.
*/
if ( all_zeros == true ) {
ffc08f34: 2f 8a 00 00 cmpwi cr7,r10,0
return 0;
ffc08f38: 3b e0 00 00 li r31,0
}
/*
* A writev with all zeros is supposed to have no effect per OpenGroup.
*/
if ( all_zeros == true ) {
ffc08f3c: 40 9e 00 60 bne- cr7,ffc08f9c <writev+0x158>
ffc08f40: 3b c0 00 00 li r30,0
#include <sys/uio.h>
#include <rtems/libio_.h>
#include <rtems/seterr.h>
ssize_t writev(
ffc08f44: 7f 5d f2 14 add r26,r29,r30
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
/* all zero lengths has no effect */
if ( iov[v].iov_len == 0 )
ffc08f48: 80 ba 00 04 lwz r5,4(r26)
ffc08f4c: 2f 85 00 00 cmpwi cr7,r5,0
ffc08f50: 41 be 00 38 beq+ cr7,ffc08f88 <writev+0x144> <== NEVER TAKEN
continue;
bytes = (*iop->pathinfo.handlers->write_h)(
ffc08f54: 81 3c 00 24 lwz r9,36(r28)
ffc08f58: 7f 83 e3 78 mr r3,r28
ffc08f5c: 7c 9d f0 2e lwzx r4,r29,r30
ffc08f60: 81 29 00 0c lwz r9,12(r9)
ffc08f64: 7d 29 03 a6 mtctr r9
ffc08f68: 4e 80 04 21 bctrl
iop,
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
ffc08f6c: 2c 03 00 00 cmpwi r3,0
ffc08f70: 41 80 00 28 blt- ffc08f98 <writev+0x154> <== NEVER TAKEN
return -1;
if ( bytes > 0 ) {
ffc08f74: 41 82 00 08 beq- ffc08f7c <writev+0x138> <== NEVER TAKEN
total += bytes;
ffc08f78: 7f ff 1a 14 add r31,r31,r3
}
if (bytes != iov[ v ].iov_len)
ffc08f7c: 81 5a 00 04 lwz r10,4(r26)
ffc08f80: 7f 83 50 00 cmpw cr7,r3,r10
ffc08f84: 40 9e 00 18 bne- cr7,ffc08f9c <writev+0x158> <== NEVER TAKEN
ffc08f88: 3b de 00 08 addi r30,r30,8
}
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
ffc08f8c: 7f 9e d8 00 cmpw cr7,r30,r27
ffc08f90: 40 9e ff b4 bne+ cr7,ffc08f44 <writev+0x100>
ffc08f94: 48 00 00 08 b ffc08f9c <writev+0x158>
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
return -1;
ffc08f98: 3b e0 ff ff li r31,-1
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
ffc08f9c: 39 61 00 20 addi r11,r1,32
ffc08fa0: 7f e3 fb 78 mr r3,r31
ffc08fa4: 4b ff 7c 4c b ffc00bf0 <_restgpr_26_x>